miva-proctor-sdk 0.0.48 → 0.0.49
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={669:(t,e,n)=>{t.exports=n(609)},448:(t,e,n)=>{"use strict";var r=n(867),i=n(26),o=n(372),s=n(327),a=n(97),u=n(109),c=n(985),l=n(61);t.exports=function(t){return new Promise((function(e,n){var h=t.data,f=t.headers,d=t.responseType;r.isFormData(h)&&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?u(p.getAllResponseHeaders()):null,o={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,o),p=null}}if(p.open(t.method.toUpperCase(),s(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(l("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(l("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var _=(t.withCredentials||c(v))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;_&&(f[t.xsrfHeaderName]=_)}"setRequestHeader"in p&&r.forEach(f,(function(t,e){void 0===h&&"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)})),h||(h=null),p.send(h)}))}},609:(t,e,n)=>{"use strict";var r=n(867),i=n(849),o=n(321),s=n(185);function a(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=a(n(655));u.Axios=o,u.create=function(t){return a(s(u.defaults,t))},u.Cancel=n(263),u.CancelToken=n(972),u.isCancel=n(502),u.all=function(t){return Promise.all(t)},u.spread=n(713),u.isAxiosError=n(268),t.exports=u,t.exports.default=u},263: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},972:(t,e,n)=>{"use strict";var r=n(263);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},502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(867),i=n(327),o=n(782),s=n(572),a=n(185),u=n(875),c=u.validators;function l(t){this.defaults=t,this.interceptors={request:new o,response:new o}}l.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&&u.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.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,o=[];if(this.interceptors.response.forEach((function(t){o.push(t.fulfilled,t.rejected)})),!r){var l=[s,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(o),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var h=t;n.length;){var f=n.shift(),d=n.shift();try{h=f(h)}catch(t){d(t);break}}try{i=s(h)}catch(t){return Promise.reject(t)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},l.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){l.prototype[t]=function(e,n){return this.request(a(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(a(r||{},{method:t,url:e,data:n}))}})),t.exports=l},782:(t,e,n)=>{"use strict";var r=n(867);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},97:(t,e,n)=>{"use strict";var r=n(793),i=n(303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},61:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,i,o){var s=new Error(t);return r(s,e,n,i,o)}},572:(t,e,n)=>{"use strict";var r=n(867),i=n(527),o=n(502),s=n(655);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||s.adapter)(t).then((function(e){return a(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(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}},185:(t,e,n)=>{"use strict";var r=n(867);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["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 u(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 c(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=u(void 0,e[t]))})),r.forEach(o,c),r.forEach(s,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(void 0,e[i])})),r.forEach(a,(function(r){r in e?n[r]=u(t[r],e[r]):r in t&&(n[r]=u(void 0,t[r]))}));var l=i.concat(o).concat(s).concat(a),h=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===l.indexOf(t)}));return r.forEach(h,c),n}},26:(t,e,n)=>{"use strict";var r=n(61);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)}},527:(t,e,n)=>{"use strict";var r=n(867),i=n(655);t.exports=function(t,e,n){var o=this||i;return r.forEach(n,(function(n){t=n.call(o,t,e)})),t}},655:(t,e,n)=>{"use strict";var r=n(867),i=n(16),o=n(481),s={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(448)),u),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,s=!n&&"json"===this.responseType;if(s||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(s){if("SyntaxError"===t.name)throw o(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){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(s)})),t.exports=c},849: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)}}},327:(t,e,n)=>{"use strict";var r=n(867);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 o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var s=[];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)),s.push(i(e)+"="+i(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},372:(t,e,n)=>{"use strict";var r=n(867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,s){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(o)&&a.push("domain="+o),!0===s&&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(){}}},793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},985:(t,e,n)=>{"use strict";var r=n(867);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}},16:(t,e,n)=>{"use strict";var r=n(867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},109:(t,e,n)=>{"use strict";var r=n(867),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,o,s={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},875:(t,e,n)=>{"use strict";var r=n(593),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 o={},s=r.version.split(".");function a(t,e){for(var n=e?e.split("."):s,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 s(t,e){return"[Axios v"+r.version+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,a){if(!1===t)throw new Error(s(r," has been removed in "+e));return i&&!o[r]&&(o[r]=!0,console.warn(s(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 o=r[i],s=e[o];if(s){var a=t[o],u=void 0===a||s(a,o,t);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},867:(t,e,n)=>{"use strict";var r=n(849),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function s(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(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:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(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:u,isUndefined:s,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:c,isStream:function(t){return a(t)&&c(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:l,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(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}}},486:function(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,h=9007199254740991,f=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",_="[object Error]",w="[object Function]",b="[object GeneratorFunction]",E="[object Map]",S="[object Number]",A="[object Object]",T="[object Promise]",k="[object RegExp]",x="[object Set]",I="[object String]",P="[object Symbol]",O="[object WeakMap]",M="[object ArrayBuffer]",R="[object DataView]",L="[object Float32Array]",C="[object Float64Array]",F="[object Int8Array]",D="[object Int16Array]",N="[object Int32Array]",U="[object Uint8Array]",j="[object Uint8ClampedArray]",B="[object Uint16Array]",G="[object Uint32Array]",V=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,X=RegExp(H.source),$=RegExp(q.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+/,ot=/\s+$/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/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=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,bt="\\ud800-\\udfff",Et="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",At="a-z\\xdf-\\xf6\\xf8-\\xff",Tt="A-Z\\xc0-\\xd6\\xd8-\\xde",kt="\\ufe0e\\ufe0f",xt="\\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",It="["+bt+"]",Pt="["+xt+"]",Ot="["+Et+"]",Mt="\\d+",Rt="["+St+"]",Lt="["+At+"]",Ct="[^"+bt+xt+Mt+St+At+Tt+"]",Ft="\\ud83c[\\udffb-\\udfff]",Dt="[^"+bt+"]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ut="[\\ud800-\\udbff][\\udc00-\\udfff]",jt="["+Tt+"]",Bt="\\u200d",Gt="(?:"+Lt+"|"+Ct+")",Vt="(?:"+jt+"|"+Ct+")",zt="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ht="(?:"+Ot+"|"+Ft+")?",qt="["+kt+"]?",Xt=qt+Ht+"(?:"+Bt+"(?:"+[Dt,Nt,Ut].join("|")+")"+qt+Ht+")*",$t="(?:"+[Rt,Nt,Ut].join("|")+")"+Xt,Kt="(?:"+[Dt+Ot+"?",Ot,Nt,Ut,It].join("|")+")",Yt=RegExp("['’]","g"),Jt=RegExp(Ot,"g"),Zt=RegExp(Ft+"(?="+Ft+")|"+Kt+Xt,"g"),Qt=RegExp([jt+"?"+Lt+"+"+zt+"(?="+[Pt,jt,"$"].join("|")+")",Vt+"+"+Wt+"(?="+[Pt,jt+Gt,"$"].join("|")+")",jt+"?"+Gt+"+"+zt,jt+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mt,$t].join("|"),"g"),te=RegExp("["+Bt+bt+Et+kt+"]"),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[L]=ie[C]=ie[F]=ie[D]=ie[N]=ie[U]=ie[j]=ie[B]=ie[G]=!0,ie[g]=ie[m]=ie[M]=ie[v]=ie[R]=ie[y]=ie[_]=ie[w]=ie[E]=ie[S]=ie[A]=ie[k]=ie[x]=ie[I]=ie[O]=!1;var oe={};oe[g]=oe[m]=oe[M]=oe[R]=oe[v]=oe[y]=oe[L]=oe[C]=oe[F]=oe[D]=oe[N]=oe[E]=oe[S]=oe[A]=oe[k]=oe[x]=oe[I]=oe[P]=oe[U]=oe[j]=oe[B]=oe[G]=!0,oe[_]=oe[w]=oe[O]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,ce="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,le="object"==typeof self&&self&&self.Object===Object&&self,he=ce||le||Function("return this")(),fe=e&&!e.nodeType&&e,de=fe&&t&&!t.nodeType&&t,pe=de&&de.exports===fe,ge=pe&&ce.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,we=me&&me.isRegExp,be=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 Ae(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(r,s,n(s),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 ke(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function xe(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 Ie(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function Pe(t,e){return!(null==t||!t.length)&&je(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 Me(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 Re(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Le(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Ce(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 Fe(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 De=ze("length");function Ne(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Ue(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function je(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):Ue(t,Ge,n)}function Be(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Ge(t){return t!=t}function Ve(t,e){var n=null==t?0:t.length;return n?qe(t,e)/n:f}function ze(t){return function(e){return null==e?i:e[t]}}function We(t){return function(e){return null==t?i:t[e]}}function He(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function qe(t,e){for(var n,r=-1,o=t.length;++r<o;){var s=e(t[r]);s!==i&&(n=n===i?s:n+s)}return n}function Xe(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function $e(t){return function(e){return t(e)}}function Ke(t,e){return Me(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&&je(e,t[n],0)>-1;);return n}function Ze(t,e){for(var n=t.length;n--&&je(e,t[n],0)>-1;);return n}var Qe=We({À:"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=We({"&":"&","<":"<",">":">",'"':""","'":"'"});function en(t){return"\\"+se[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 on(t,e){return function(n){return t(e(n))}}function sn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n];s!==e&&s!==a||(t[n]=a,o[i++]=n)}return o}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function cn(t){return nn(t)?function(t){for(var e=Zt.lastIndex=0;Zt.test(t);)++e;return e}(t):De(t)}function ln(t){return nn(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.split("")}(t)}var hn=We({"&":"&","<":"<",">":">",""":'"',"'":"'"}),fn=function t(e){var n,r=(e=null==e?he:fn.defaults(he.Object(),e,fn.pick(he,ne))).Array,bt=e.Date,Et=e.Error,St=e.Function,At=e.Math,Tt=e.Object,kt=e.RegExp,xt=e.String,It=e.TypeError,Pt=r.prototype,Ot=St.prototype,Mt=Tt.prototype,Rt=e["__core-js_shared__"],Lt=Ot.toString,Ct=Mt.hasOwnProperty,Ft=0,Dt=(n=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Nt=Mt.toString,Ut=Lt.call(Tt),jt=he._,Bt=kt("^"+Lt.call(Ct).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gt=pe?e.Buffer:i,Vt=e.Symbol,zt=e.Uint8Array,Wt=Gt?Gt.allocUnsafe:i,Ht=on(Tt.getPrototypeOf,Tt),qt=Tt.create,Xt=Mt.propertyIsEnumerable,$t=Pt.splice,Kt=Vt?Vt.isConcatSpreadable:i,Zt=Vt?Vt.iterator:i,te=Vt?Vt.toStringTag:i,se=function(){try{var t=ao(Tt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ce=e.clearTimeout!==he.clearTimeout&&e.clearTimeout,le=bt&&bt.now!==he.Date.now&&bt.now,fe=e.setTimeout!==he.setTimeout&&e.setTimeout,de=At.ceil,ge=At.floor,me=Tt.getOwnPropertySymbols,De=Gt?Gt.isBuffer:i,We=e.isFinite,dn=Pt.join,pn=on(Tt.keys,Tt),gn=At.max,mn=At.min,vn=bt.now,yn=e.parseInt,_n=At.random,wn=Pt.reverse,bn=ao(e,"DataView"),En=ao(e,"Map"),Sn=ao(e,"Promise"),An=ao(e,"Set"),Tn=ao(e,"WeakMap"),kn=ao(Tt,"create"),xn=Tn&&new Tn,In={},Pn=Do(bn),On=Do(En),Mn=Do(Sn),Rn=Do(An),Ln=Do(Tn),Cn=Vt?Vt.prototype:i,Fn=Cn?Cn.valueOf:i,Dn=Cn?Cn.toString:i;function Nn(t){if(Qs(t)&&!Vs(t)&&!(t instanceof Gn)){if(t instanceof Bn)return t;if(Ct.call(t,"__wrapped__"))return No(t)}return new Bn(t)}var Un=function(){function t(){}return function(e){if(!Zs(e))return{};if(qt)return qt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function jn(){}function Bn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Gn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vn(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 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 Hn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Wn;++e<n;)this.add(t[e])}function qn(t){var e=this.__data__=new zn(t);this.size=e.size}function Xn(t,e){var n=Vs(t),r=!n&&Gs(t),i=!n&&!r&&qs(t),o=!n&&!r&&!i&&aa(t),s=n||r||i||o,a=s?Xe(t.length,xt):[],u=a.length;for(var c in t)!e&&!Ct.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||go(c,u))||a.push(c);return a}function $n(t){var e=t.length;return e?t[Wr(0,e-1)]:i}function Kn(t,e){return Mo(Ti(t),ir(e,0,t.length))}function Yn(t){return Mo(Ti(t))}function Jn(t,e,n){(n!==i&&!Us(t[e],n)||n===i&&!(e in t))&&nr(t,e,n)}function Zn(t,e,n){var r=t[e];Ct.call(t,e)&&Us(r,n)&&(n!==i||e in t)||nr(t,e,n)}function Qn(t,e){for(var n=t.length;n--;)if(Us(t[n][0],e))return n;return-1}function tr(t,e,n,r){return cr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function er(t,e){return t&&ki(e,Pa(e),t)}function nr(t,e,n){"__proto__"==e&&se?se(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function rr(t,e){for(var n=-1,o=e.length,s=r(o),a=null==t;++n<o;)s[n]=a?i:Aa(t,e[n]);return s}function ir(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function or(t,e,n,r,o,s){var a,u=1&e,c=2&e,l=4&e;if(n&&(a=o?n(t,r,o,s):n(t)),a!==i)return a;if(!Zs(t))return t;var h=Vs(t);if(h){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Ct.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Ti(t,a)}else{var f=lo(t),d=f==w||f==b;if(qs(t))return _i(t,u);if(f==A||f==g||d&&!o){if(a=c||d?{}:fo(t),!u)return c?function(t,e){return ki(t,co(t),e)}(t,function(t,e){return t&&ki(e,Oa(e),t)}(a,t)):function(t,e){return ki(t,uo(t),e)}(t,er(a,t))}else{if(!oe[f])return o?t:{};a=function(t,e,n){var r,i=t.constructor;switch(e){case M:return wi(t);case v:case y:return new i(+t);case R:return function(t,e){var n=e?wi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case L:case C:case F:case D:case N:case U:case j:case B:case G:return bi(t,n);case E:return new i;case S:case I:return new i(t);case k:return function(t){var e=new t.constructor(t.source,ft.exec(t));return e.lastIndex=t.lastIndex,e}(t);case x:return new i;case P:return r=t,Fn?Tt(Fn.call(r)):{}}}(t,f,u)}}s||(s=new qn);var p=s.get(t);if(p)return p;s.set(t,a),ia(t)?t.forEach((function(r){a.add(or(r,e,n,r,t,s))})):ta(t)&&t.forEach((function(r,i){a.set(i,or(r,e,n,i,t,s))}));var m=h?i:(l?c?to:Qi:c?Oa:Pa)(t);return Te(m||t,(function(r,i){m&&(r=t[i=r]),Zn(a,i,or(r,e,n,i,t,s))})),a}function sr(t,e,n){var r=n.length;if(null==t)return!r;for(t=Tt(t);r--;){var o=n[r],s=e[o],a=t[o];if(a===i&&!(o in t)||!s(a))return!1}return!0}function ar(t,e,n){if("function"!=typeof t)throw new It(o);return xo((function(){t.apply(i,n)}),e)}function ur(t,e,n,r){var i=-1,o=Pe,s=!0,a=t.length,u=[],c=e.length;if(!a)return u;n&&(e=Me(e,$e(n))),r?(o=Oe,s=!1):e.length>=200&&(o=Ye,s=!1,e=new Hn(e));t:for(;++i<a;){var l=t[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,s&&h==h){for(var f=c;f--;)if(e[f]===h)continue t;u.push(l)}else o(e,h,r)||u.push(l)}return u}Nn.templateSettings={escape:K,evaluate:Y,interpolate:J,variable:"",imports:{_:Nn}},Nn.prototype=jn.prototype,Nn.prototype.constructor=Nn,Bn.prototype=Un(jn.prototype),Bn.prototype.constructor=Bn,Gn.prototype=Un(jn.prototype),Gn.prototype.constructor=Gn,Vn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},Vn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Vn.prototype.get=function(t){var e=this.__data__;if(kn){var n=e[t];return n===s?i:n}return Ct.call(e,t)?e[t]:i},Vn.prototype.has=function(t){var e=this.__data__;return kn?e[t]!==i:Ct.call(e,t)},Vn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=kn&&e===i?s:e,this},zn.prototype.clear=function(){this.__data__=[],this.size=0},zn.prototype.delete=function(t){var e=this.__data__,n=Qn(e,t);return!(n<0||(n==e.length-1?e.pop():$t.call(e,n,1),--this.size,0))},zn.prototype.get=function(t){var e=this.__data__,n=Qn(e,t);return n<0?i:e[n][1]},zn.prototype.has=function(t){return Qn(this.__data__,t)>-1},zn.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},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(En||zn),string:new Vn}},Wn.prototype.delete=function(t){var e=oo(this,t).delete(t);return this.size-=e?1:0,e},Wn.prototype.get=function(t){return oo(this,t).get(t)},Wn.prototype.has=function(t){return oo(this,t).has(t)},Wn.prototype.set=function(t,e){var n=oo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(t){return this.__data__.set(t,s),this},Hn.prototype.has=function(t){return this.__data__.has(t)},qn.prototype.clear=function(){this.__data__=new zn,this.size=0},qn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},qn.prototype.get=function(t){return this.__data__.get(t)},qn.prototype.has=function(t){return this.__data__.has(t)},qn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof zn){var r=n.__data__;if(!En||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(t,e),this.size=n.size,this};var cr=Pi(vr),lr=Pi(yr,!0);function hr(t,e){var n=!0;return cr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function fr(t,e,n){for(var r=-1,o=t.length;++r<o;){var s=t[r],a=e(s);if(null!=a&&(u===i?a==a&&!sa(a):n(a,u)))var u=a,c=s}return c}function dr(t,e){var n=[];return cr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function pr(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=po),i||(i=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?pr(a,e-1,n,r,i):Re(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 Ie(e,(function(e){return Ks(t[e])}))}function wr(t,e){for(var n=0,r=(e=gi(e,t)).length;null!=t&&n<r;)t=t[Fo(e[n++])];return n&&n==r?t:i}function br(t,e,n){var r=e(t);return Vs(t)?r:Re(r,n(t))}function Er(t){return null==t?t===i?"[object Undefined]":"[object Null]":te&&te in Tt(t)?function(t){var e=Ct.call(t,te),n=t[te];try{t[te]=i;var r=!0}catch(t){}var o=Nt.call(t);return r&&(e?t[te]=n:delete t[te]),o}(t):function(t){return Nt.call(t)}(t)}function Sr(t,e){return t>e}function Ar(t,e){return null!=t&&Ct.call(t,e)}function Tr(t,e){return null!=t&&e in Tt(t)}function kr(t,e,n){for(var o=n?Oe:Pe,s=t[0].length,a=t.length,u=a,c=r(a),l=1/0,h=[];u--;){var f=t[u];u&&e&&(f=Me(f,$e(e))),l=mn(f.length,l),c[u]=!n&&(e||s>=120&&f.length>=120)?new Hn(u&&f):i}f=t[0];var d=-1,p=c[0];t:for(;++d<s&&h.length<l;){var g=f[d],m=e?e(g):g;if(g=n||0!==g?g:0,!(p?Ye(p,m):o(h,m,n))){for(u=a;--u;){var v=c[u];if(!(v?Ye(v,m):o(t[u],m,n)))continue t}p&&p.push(m),h.push(g)}}return h}function xr(t,e,n){var r=null==(t=Ao(t,e=gi(e,t)))?t:t[Fo($o(e))];return null==r?i:Se(r,t,n)}function Ir(t){return Qs(t)&&Er(t)==g}function Pr(t,e,n,r,o){return t===e||(null==t||null==e||!Qs(t)&&!Qs(e)?t!=t&&e!=e:function(t,e,n,r,o,s){var a=Vs(t),u=Vs(e),c=a?m:lo(t),l=u?m:lo(e),h=(c=c==g?A:c)==A,f=(l=l==g?A:l)==A,d=c==l;if(d&&qs(t)){if(!qs(e))return!1;a=!0,h=!1}if(d&&!h)return s||(s=new qn),a||aa(t)?Ji(t,e,n,r,o,s):function(t,e,n,r,i,o,s){switch(n){case R:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M:return!(t.byteLength!=e.byteLength||!o(new zt(t),new zt(e)));case v:case y:case S:return Us(+t,+e);case _:return t.name==e.name&&t.message==e.message;case k:case I:return t==e+"";case E:var a=rn;case x:var u=1&r;if(a||(a=an),t.size!=e.size&&!u)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var l=Ji(a(t),a(e),r,i,o,s);return s.delete(t),l;case P:if(Fn)return Fn.call(t)==Fn.call(e)}return!1}(t,e,c,n,r,o,s);if(!(1&n)){var p=h&&Ct.call(t,"__wrapped__"),w=f&&Ct.call(e,"__wrapped__");if(p||w){var b=p?t.value():t,T=w?e.value():e;return s||(s=new qn),o(b,T,n,r,s)}}return!!d&&(s||(s=new qn),function(t,e,n,r,o,s){var a=1&n,u=Qi(t),c=u.length;if(c!=Qi(e).length&&!a)return!1;for(var l=c;l--;){var h=u[l];if(!(a?h in e:Ct.call(e,h)))return!1}var f=s.get(t),d=s.get(e);if(f&&d)return f==e&&d==t;var p=!0;s.set(t,e),s.set(e,t);for(var g=a;++l<c;){var m=t[h=u[l]],v=e[h];if(r)var y=a?r(v,m,h,e,t,s):r(m,v,h,t,e,s);if(!(y===i?m===v||o(m,v,n,r,s):y)){p=!1;break}g||(g="constructor"==h)}if(p&&!g){var _=t.constructor,w=e.constructor;_==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(t),s.delete(e),p}(t,e,n,r,o,s))}(t,e,n,r,Pr,o))}function Or(t,e,n,r){var o=n.length,s=o,a=!r;if(null==t)return!s;for(t=Tt(t);o--;){var u=n[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var c=(u=n[o])[0],l=t[c],h=u[1];if(a&&u[2]){if(l===i&&!(c in t))return!1}else{var f=new qn;if(r)var d=r(l,h,c,t,e,f);if(!(d===i?Pr(h,l,3,r,f):d))return!1}}return!0}function Mr(t){return!(!Zs(t)||(e=t,Dt&&Dt in e))&&(Ks(t)?Bt:gt).test(Do(t));var e}function Rr(t){return"function"==typeof t?t:null==t?eu:"object"==typeof t?Vs(t)?Nr(t[0],t[1]):Dr(t):lu(t)}function Lr(t){if(!wo(t))return pn(t);var e=[];for(var n in Tt(t))Ct.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Cr(t,e){return t<e}function Fr(t,e){var n=-1,i=Ws(t)?r(t.length):[];return cr(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Dr(t){var e=so(t);return 1==e.length&&e[0][2]?Eo(e[0][0],e[0][1]):function(n){return n===t||Or(n,t,e)}}function Nr(t,e){return vo(t)&&bo(e)?Eo(Fo(t),e):function(n){var r=Aa(n,t);return r===i&&r===e?Ta(n,t):Pr(e,r,3)}}function Ur(t,e,n,r,o){t!==e&&gr(e,(function(s,a){if(o||(o=new qn),Zs(s))!function(t,e,n,r,o,s,a){var u=To(t,n),c=To(e,n),l=a.get(c);if(l)Jn(t,n,l);else{var h=s?s(u,c,n+"",t,e,a):i,f=h===i;if(f){var d=Vs(c),p=!d&&qs(c),g=!d&&!p&&aa(c);h=c,d||p||g?Vs(u)?h=u:Hs(u)?h=Ti(u):p?(f=!1,h=_i(c,!0)):g?(f=!1,h=bi(c,!0)):h=[]:na(c)||Gs(c)?(h=u,Gs(u)?h=ga(u):Zs(u)&&!Ks(u)||(h=fo(c))):f=!1}f&&(a.set(c,h),o(h,c,r,s,a),a.delete(c)),Jn(t,n,h)}}(t,e,a,n,Ur,r,o);else{var u=r?r(To(t,a),s,a+"",t,e,o):i;u===i&&(u=s),Jn(t,a,u)}}),Oa)}function jr(t,e){var n=t.length;if(n)return go(e+=e<0?n:0,n)?t[e]:i}function Br(t,e,n){e=e.length?Me(e,(function(t){return Vs(t)?function(e){return wr(e,1===t.length?t[0]:t)}:t})):[eu];var r=-1;e=Me(e,$e(io()));var i=Fr(t,(function(t,n,i){var o=Me(e,(function(e){return e(t)}));return{criteria:o,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,o=e.criteria,s=i.length,a=n.length;++r<s;){var u=Ei(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function Gr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var s=e[r],a=wr(t,s);n(a,s)&&Kr(o,gi(s,t),a)}return o}function Vr(t,e,n,r){var i=r?Be:je,o=-1,s=e.length,a=t;for(t===e&&(e=Ti(e)),n&&(a=Me(t,$e(n)));++o<s;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==t&&$t.call(a,u,1),$t.call(t,u,1);return t}function zr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;go(i)?$t.call(t,i,1):ai(t,i)}}return t}function Wr(t,e){return t+ge(_n()*(e-t+1))}function Hr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function qr(t,e){return Io(So(t,e,eu),t+"")}function Xr(t){return $n(Ua(t))}function $r(t,e){var n=Ua(t);return Mo(n,ir(e,0,n.length))}function Kr(t,e,n,r){if(!Zs(t))return t;for(var o=-1,s=(e=gi(e,t)).length,a=s-1,u=t;null!=u&&++o<s;){var c=Fo(e[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var h=u[c];(l=r?r(h,c,u):i)===i&&(l=Zs(h)?h:go(e[o+1])?[]:{})}Zn(u,c,l),u=u[c]}return t}var Yr=xn?function(t,e){return xn.set(t,e),t}:eu,Jr=se?function(t,e){return se(t,"toString",{configurable:!0,enumerable:!1,value:Za(e),writable:!0})}:eu;function Zr(t){return Mo(Ua(t))}function Qr(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=r(o);++i<o;)s[i]=t[i+e];return s}function ti(t,e){var n;return cr(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 o=r+i>>>1,s=t[o];null!==s&&!sa(s)&&(n?s<=e:s<e)?r=o+1:i=o}return i}return ni(t,e,eu,n)}function ni(t,e,n,r){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(e=n(e))!=e,u=null===e,c=sa(e),l=e===i;o<s;){var h=ge((o+s)/2),f=n(t[h]),d=f!==i,p=null===f,g=f==f,m=sa(f);if(a)var v=r||g;else v=l?g&&(r||d):u?g&&d&&(r||!p):c?g&&d&&!p&&(r||!m):!p&&!m&&(r?f<=e:f<e);v?o=h+1:s=h}return mn(s,4294967294)}function ri(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n],a=e?e(s):s;if(!n||!Us(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function ii(t){return"number"==typeof t?t:sa(t)?f:+t}function oi(t){if("string"==typeof t)return t;if(Vs(t))return Me(t,oi)+"";if(sa(t))return Dn?Dn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function si(t,e,n){var r=-1,i=Pe,o=t.length,s=!0,a=[],u=a;if(n)s=!1,i=Oe;else if(o>=200){var c=e?null:Hi(t);if(c)return an(c);s=!1,i=Ye,u=new Hn}else u=e?[]:a;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,s&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),a.push(l)}else i(u,h,n)||(u!==a&&u.push(h),a.push(l))}return a}function ai(t,e){return null==(t=Ao(t,e=gi(e,t)))||delete t[Fo($o(e))]}function ui(t,e,n,r){return Kr(t,e,n(wr(t,e)),r)}function ci(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Qr(t,r?0:o,r?o+1:i):Qr(t,r?o+1:0,r?i:o)}function li(t,e){var n=t;return n instanceof Gn&&(n=n.value()),Le(e,(function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))}),n)}function hi(t,e,n){var i=t.length;if(i<2)return i?si(t[0]):[];for(var o=-1,s=r(i);++o<i;)for(var a=t[o],u=-1;++u<i;)u!=o&&(s[o]=ur(s[o]||a,t[u],e,n));return si(pr(s,1),e,n)}function fi(t,e,n){for(var r=-1,o=t.length,s=e.length,a={};++r<o;){var u=r<s?e[r]:i;n(a,t[r],u)}return a}function di(t){return Hs(t)?t:[]}function pi(t){return"function"==typeof t?t:eu}function gi(t,e){return Vs(t)?t:vo(t,e)?[t]:Co(ma(t))}var mi=qr;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=ce||function(t){return he.clearTimeout(t)};function _i(t,e){if(e)return t.slice();var n=t.length,r=Wt?Wt(n):new t.constructor(n);return t.copy(r),r}function wi(t){var e=new t.constructor(t.byteLength);return new zt(e).set(new zt(t)),e}function bi(t,e){var n=e?wi(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,o=t==t,s=sa(t),a=e!==i,u=null===e,c=e==e,l=sa(e);if(!u&&!l&&!s&&t>e||s&&a&&c&&!u&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!s&&!l&&t<e||l&&n&&o&&!r&&!s||u&&n&&o||!a&&o||!c)return-1}return 0}function Si(t,e,n,i){for(var o=-1,s=t.length,a=n.length,u=-1,c=e.length,l=gn(s-a,0),h=r(c+l),f=!i;++u<c;)h[u]=e[u];for(;++o<a;)(f||o<s)&&(h[n[o]]=t[o]);for(;l--;)h[u++]=t[o++];return h}function Ai(t,e,n,i){for(var o=-1,s=t.length,a=-1,u=n.length,c=-1,l=e.length,h=gn(s-u,0),f=r(h+l),d=!i;++o<h;)f[o]=t[o];for(var p=o;++c<l;)f[p+c]=e[c];for(;++a<u;)(d||o<s)&&(f[p+n[a]]=t[o++]);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 ki(t,e,n,r){var o=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var u=e[s],c=r?r(n[u],t[u],u,n,t):i;c===i&&(c=t[u]),o?nr(n,u,c):Zn(n,u,c)}return n}function xi(t,e){return function(n,r){var i=Vs(n)?Ae:tr,o=e?e():{};return i(n,t,io(r,2),o)}}function Ii(t){return qr((function(e,n){var r=-1,o=n.length,s=o>1?n[o-1]:i,a=o>2?n[2]:i;for(s=t.length>3&&"function"==typeof s?(o--,s):i,a&&mo(n[0],n[1],a)&&(s=o<3?i:s,o=1),e=Tt(e);++r<o;){var u=n[r];u&&t(e,u,r,s)}return e}))}function Pi(t,e){return function(n,r){if(null==n)return n;if(!Ws(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=Tt(n);(e?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Oi(t){return function(e,n,r){for(var i=-1,o=Tt(e),s=r(e),a=s.length;a--;){var u=s[t?a:++i];if(!1===n(o[u],u,o))break}return e}}function Mi(t){return function(e){var n=nn(e=ma(e))?ln(e):i,r=n?n[0]:e.charAt(0),o=n?vi(n,1).join(""):e.slice(1);return r[t]()+o}}function Ri(t){return function(e){return Le(Ka(Ga(e).replace(Yt,"")),t,"")}}function Li(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=Un(t.prototype),r=t.apply(n,e);return Zs(r)?r:n}}function Ci(t){return function(e,n,r){var o=Tt(e);if(!Ws(e)){var s=io(n,3);e=Pa(e),n=function(t){return s(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[s?e[a]:a]:i}}function Fi(t){return Zi((function(e){var n=e.length,r=n,s=Bn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new It(o);if(s&&!u&&"wrapper"==no(a))var u=new Bn([],!0)}for(r=u?r:n;++r<n;){var c=no(a=e[r]),l="wrapper"==c?eo(a):i;u=l&&yo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[no(l[0])].apply(u,l[3]):1==a.length&&yo(a)?u[c]():u.thru(a)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Vs(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Di(t,e,n,o,s,a,u,l,h,f){var d=e&c,p=1&e,g=2&e,m=24&e,v=512&e,y=g?i:Li(t);return function c(){for(var _=arguments.length,w=r(_),b=_;b--;)w[b]=arguments[b];if(m)var E=ro(c),S=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(w,E);if(o&&(w=Si(w,o,s,m)),a&&(w=Ai(w,a,u,m)),_-=S,m&&_<f){var A=sn(w,E);return zi(t,e,Di,c.placeholder,n,w,A,l,h,f-_)}var T=p?n:this,k=g?T[t]:t;return _=w.length,l?w=function(t,e){for(var n=t.length,r=mn(e.length,n),o=Ti(t);r--;){var s=e[r];t[r]=go(s,n)?o[s]:i}return t}(w,l):v&&_>1&&w.reverse(),d&&h<_&&(w.length=h),this&&this!==he&&this instanceof c&&(k=y||Li(k)),k.apply(T,w)}}function Ni(t,e){return function(n,r){return function(t,e,n,r){return vr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Ui(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=oi(n),r=oi(r)):(n=ii(n),r=ii(r)),o=t(n,r)}return o}}function ji(t){return Zi((function(e){return e=Me(e,$e(io())),qr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Bi(t,e){var n=(e=e===i?" ":oi(e)).length;if(n<2)return n?Hr(e,t):e;var r=Hr(e,de(t/cn(e)));return nn(e)?vi(ln(r),0,t).join(""):r.slice(0,t)}function Gi(t){return function(e,n,o){return o&&"number"!=typeof o&&mo(e,n,o)&&(n=o=i),e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n,i){for(var o=-1,s=gn(de((e-t)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=t,t+=n;return a}(e,n,o=o===i?e<n?1:-1:ha(o),t)}}function Vi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=pa(e),n=pa(n)),t(e,n)}}function zi(t,e,n,r,o,s,a,c,l,h){var f=8&e;e|=f?u:64,4&(e&=~(f?64:u))||(e&=-4);var d=[t,e,o,f?s:i,f?a:i,f?i:s,f?i:a,c,l,h],p=n.apply(i,d);return yo(t)&&ko(p,d),p.placeholder=r,Po(p,t,e)}function Wi(t){var e=At[t];return function(t,n){if(t=pa(t),(n=null==n?0:mn(fa(n),292))&&We(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 Hi=An&&1/an(new An([,-0]))[1]==l?function(t){return new An(t)}:su;function qi(t){return function(e){var n=lo(e);return n==E?rn(e):n==x?un(e):function(t,e){return Me(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Xi(t,e,n,s,l,h,f,d){var p=2&e;if(!p&&"function"!=typeof t)throw new It(o);var g=s?s.length:0;if(g||(e&=-97,s=l=i),f=f===i?f:gn(fa(f),0),d=d===i?d:fa(d),g-=l?l.length:0,64&e){var m=s,v=l;s=l=i}var y=p?i:eo(t),_=[t,e,n,s,l,m,v,h,f,d];if(y&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,s=r==c&&8==n||r==c&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!s)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var l=t[3];t[3]=l?Si(l,u,e[4]):u,t[4]=l?sn(t[3],a):e[4]}(u=e[5])&&(l=t[5],t[5]=l?Ai(l,u,e[6]):u,t[6]=l?sn(t[5],a):e[6]),(u=e[7])&&(t[7]=u),r&c&&(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],s=_[3],l=_[4],!(d=_[9]=_[9]===i?p?0:t.length:gn(_[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,n){var o=Li(t);return function s(){for(var a=arguments.length,u=r(a),c=a,l=ro(s);c--;)u[c]=arguments[c];var h=a<3&&u[0]!==l&&u[a-1]!==l?[]:sn(u,l);return(a-=h.length)<n?zi(t,e,Di,s.placeholder,i,u,h,i,i,n-a):Se(this&&this!==he&&this instanceof s?o:t,this,u)}}(t,e,d):e!=u&&33!=e||l.length?Di.apply(i,_):function(t,e,n,i){var o=1&e,s=Li(t);return function e(){for(var a=-1,u=arguments.length,c=-1,l=i.length,h=r(l+u),f=this&&this!==he&&this instanceof e?s:t;++c<l;)h[c]=i[c];for(;u--;)h[c++]=arguments[++a];return Se(f,o?n:this,h)}}(t,e,n,s);else var w=function(t,e,n){var r=1&e,i=Li(t);return function e(){return(this&&this!==he&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Po((y?Yr:ko)(w,_),t,e)}function $i(t,e,n,r){return t===i||Us(t,Mt[n])&&!Ct.call(r,n)?e:t}function Ki(t,e,n,r,o,s){return Zs(t)&&Zs(e)&&(s.set(e,t),Ur(t,e,i,Ki,s),s.delete(e)),t}function Yi(t){return na(t)?i:t}function Ji(t,e,n,r,o,s){var a=1&n,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(t),h=s.get(e);if(l&&h)return l==e&&h==t;var f=-1,d=!0,p=2&n?new Hn:i;for(s.set(t,e),s.set(e,t);++f<u;){var g=t[f],m=e[f];if(r)var v=a?r(m,g,f,e,t,s):r(g,m,f,t,e,s);if(v!==i){if(v)continue;d=!1;break}if(p){if(!Fe(e,(function(t,e){if(!Ye(p,e)&&(g===t||o(g,t,n,r,s)))return p.push(e)}))){d=!1;break}}else if(g!==m&&!o(g,m,n,r,s)){d=!1;break}}return s.delete(t),s.delete(e),d}function Zi(t){return Io(So(t,i,zo),t+"")}function Qi(t){return br(t,Pa,uo)}function to(t){return br(t,Oa,co)}var eo=xn?function(t){return xn.get(t)}:su;function no(t){for(var e=t.name+"",n=In[e],r=Ct.call(In,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function ro(t){return(Ct.call(Nn,"placeholder")?Nn:t).placeholder}function io(){var t=Nn.iteratee||nu;return t=t===nu?Rr:t,arguments.length?t(arguments[0],arguments[1]):t}function oo(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 so(t){for(var e=Pa(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,bo(i)]}return e}function ao(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Mr(n)?n:i}var uo=me?function(t){return null==t?[]:(t=Tt(t),Ie(me(t),(function(e){return Xt.call(t,e)})))}:du,co=me?function(t){for(var e=[];t;)Re(e,uo(t)),t=Ht(t);return e}:du,lo=Er;function ho(t,e,n){for(var r=-1,i=(e=gi(e,t)).length,o=!1;++r<i;){var s=Fo(e[r]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Js(i)&&go(s,i)&&(Vs(t)||Gs(t))}function fo(t){return"function"!=typeof t.constructor||wo(t)?{}:Un(Ht(t))}function po(t){return Vs(t)||Gs(t)||!!(Kt&&t&&t[Kt])}function go(t,e){var n=typeof t;return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function mo(t,e,n){if(!Zs(n))return!1;var r=typeof e;return!!("number"==r?Ws(n)&&go(e,n.length):"string"==r&&e in n)&&Us(n[e],t)}function vo(t,e){if(Vs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!sa(t))||Q.test(t)||!Z.test(t)||null!=e&&t in Tt(e)}function yo(t){var e=no(t),n=Nn[e];if("function"!=typeof n||!(e in Gn.prototype))return!1;if(t===n)return!0;var r=eo(n);return!!r&&t===r[0]}(bn&&lo(new bn(new ArrayBuffer(1)))!=R||En&&lo(new En)!=E||Sn&&lo(Sn.resolve())!=T||An&&lo(new An)!=x||Tn&&lo(new Tn)!=O)&&(lo=function(t){var e=Er(t),n=e==A?t.constructor:i,r=n?Do(n):"";if(r)switch(r){case Pn:return R;case On:return E;case Mn:return T;case Rn:return x;case Ln:return O}return e});var _o=Rt?Ks:pu;function wo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Mt)}function bo(t){return t==t&&!Zs(t)}function Eo(t,e){return function(n){return null!=n&&n[t]===e&&(e!==i||t in Tt(n))}}function So(t,e,n){return e=gn(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,s=gn(i.length-e,0),a=r(s);++o<s;)a[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(a),Se(t,this,u)}}function Ao(t,e){return e.length<2?t:wr(t,Qr(e,0,-1))}function To(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var ko=Oo(Yr),xo=fe||function(t,e){return he.setTimeout(t,e)},Io=Oo(Jr);function Po(t,e,n){var r=e+"";return Io(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(st,"{\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(ut):[]}(r),n)))}function Oo(t){var e=0,n=0;return function(){var r=vn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Mo(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n<e;){var s=Wr(n,o),a=t[s];t[s]=t[n],t[n]=a}return t.length=e,t}var Ro,Lo,Co=(Ro=Rs((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,i){e.push(r?i.replace(lt,"$1"):n||t)})),e}),(function(t){return 500===Lo.size&&Lo.clear(),t})),Lo=Ro.cache,Ro);function Fo(t){if("string"==typeof t||sa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Do(t){if(null!=t){try{return Lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function No(t){if(t instanceof Gn)return t.clone();var e=new Bn(t.__wrapped__,t.__chain__);return e.__actions__=Ti(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Uo=qr((function(t,e){return Hs(t)?ur(t,pr(e,1,Hs,!0)):[]})),jo=qr((function(t,e){var n=$o(e);return Hs(n)&&(n=i),Hs(t)?ur(t,pr(e,1,Hs,!0),io(n,2)):[]})),Bo=qr((function(t,e){var n=$o(e);return Hs(n)&&(n=i),Hs(t)?ur(t,pr(e,1,Hs,!0),i,n):[]}));function Go(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)),Ue(t,io(e,3),i)}function Vo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==i&&(o=fa(n),o=n<0?gn(r+o,0):mn(o,r-1)),Ue(t,io(e,3),o,!0)}function zo(t){return null!=t&&t.length?pr(t,1):[]}function Wo(t){return t&&t.length?t[0]:i}var Ho=qr((function(t){var e=Me(t,di);return e.length&&e[0]===t[0]?kr(e):[]})),qo=qr((function(t){var e=$o(t),n=Me(t,di);return e===$o(n)?e=i:n.pop(),n.length&&n[0]===t[0]?kr(n,io(e,2)):[]})),Xo=qr((function(t){var e=$o(t),n=Me(t,di);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?kr(n,i,e):[]}));function $o(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Ko=qr(Yo);function Yo(t,e){return t&&t.length&&e&&e.length?Vr(t,e):t}var Jo=Zi((function(t,e){var n=null==t?0:t.length,r=rr(t,e);return zr(t,Me(e,(function(t){return go(t,n)?+t:t})).sort(Ei)),r}));function Zo(t){return null==t?t:wn.call(t)}var Qo=qr((function(t){return si(pr(t,1,Hs,!0))})),ts=qr((function(t){var e=$o(t);return Hs(e)&&(e=i),si(pr(t,1,Hs,!0),io(e,2))})),es=qr((function(t){var e=$o(t);return e="function"==typeof e?e:i,si(pr(t,1,Hs,!0),i,e)}));function ns(t){if(!t||!t.length)return[];var e=0;return t=Ie(t,(function(t){if(Hs(t))return e=gn(t.length,e),!0})),Xe(e,(function(e){return Me(t,ze(e))}))}function rs(t,e){if(!t||!t.length)return[];var n=ns(t);return null==e?n:Me(n,(function(t){return Se(e,i,t)}))}var is=qr((function(t,e){return Hs(t)?ur(t,e):[]})),os=qr((function(t){return hi(Ie(t,Hs))})),ss=qr((function(t){var e=$o(t);return Hs(e)&&(e=i),hi(Ie(t,Hs),io(e,2))})),as=qr((function(t){var e=$o(t);return e="function"==typeof e?e:i,hi(Ie(t,Hs),i,e)})),us=qr(ns),cs=qr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,rs(t,n)}));function ls(t){var e=Nn(t);return e.__chain__=!0,e}function hs(t,e){return e(t)}var fs=Zi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return rr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Gn&&go(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Bn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ds=xi((function(t,e,n){Ct.call(t,n)?++t[n]:nr(t,n,1)})),ps=Ci(Go),gs=Ci(Vo);function ms(t,e){return(Vs(t)?Te:cr)(t,io(e,3))}function vs(t,e){return(Vs(t)?ke:lr)(t,io(e,3))}var ys=xi((function(t,e,n){Ct.call(t,n)?t[n].push(e):nr(t,n,[e])})),_s=qr((function(t,e,n){var i=-1,o="function"==typeof e,s=Ws(t)?r(t.length):[];return cr(t,(function(t){s[++i]=o?Se(e,t,n):xr(t,e,n)})),s})),ws=xi((function(t,e,n){nr(t,n,e)}));function bs(t,e){return(Vs(t)?Me:Fr)(t,io(e,3))}var Es=xi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Ss=qr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&mo(t,e[0],e[1])?e=[]:n>2&&mo(e[0],e[1],e[2])&&(e=[e[0]]),Br(t,pr(e,1),[])})),As=le||function(){return he.Date.now()};function Ts(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Xi(t,c,i,i,i,i,e)}function ks(t,e){var n;if("function"!=typeof e)throw new It(o);return t=fa(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var xs=qr((function(t,e,n){var r=1;if(n.length){var i=sn(n,ro(xs));r|=u}return Xi(t,r,e,n,i)})),Is=qr((function(t,e,n){var r=3;if(n.length){var i=sn(n,ro(Is));r|=u}return Xi(e,r,t,n,i)}));function Ps(t,e,n){var r,s,a,u,c,l,h=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new It(o);function g(e){var n=r,o=s;return r=s=i,h=e,u=t.apply(o,n)}function m(t){var n=t-l;return l===i||n>=e||n<0||d&&t-h>=a}function v(){var t=As();if(m(t))return y(t);c=xo(v,function(t){var n=e-(t-l);return d?mn(n,a-(t-h)):n}(t))}function y(t){return c=i,p&&r?g(t):(r=s=i,u)}function _(){var t=As(),n=m(t);if(r=arguments,s=this,l=t,n){if(c===i)return function(t){return h=t,c=xo(v,e),f?g(t):u}(l);if(d)return yi(c),c=xo(v,e),g(l)}return c===i&&(c=xo(v,e)),u}return e=pa(e)||0,Zs(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(){c!==i&&yi(c),h=0,r=l=s=c=i},_.flush=function(){return c===i?u:y(As())},_}var Os=qr((function(t,e){return ar(t,1,e)})),Ms=qr((function(t,e,n){return ar(t,pa(e)||0,n)}));function Rs(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new It(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Rs.Cache||Wn),n}function Ls(t){if("function"!=typeof t)throw new It(o);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)}}Rs.Cache=Wn;var Cs=mi((function(t,e){var n=(e=1==e.length&&Vs(e[0])?Me(e[0],$e(io())):Me(pr(e,1),$e(io()))).length;return qr((function(r){for(var i=-1,o=mn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Se(t,this,r)}))})),Fs=qr((function(t,e){var n=sn(e,ro(Fs));return Xi(t,u,i,e,n)})),Ds=qr((function(t,e){var n=sn(e,ro(Ds));return Xi(t,64,i,e,n)})),Ns=Zi((function(t,e){return Xi(t,256,i,i,i,e)}));function Us(t,e){return t===e||t!=t&&e!=e}var js=Vi(Sr),Bs=Vi((function(t,e){return t>=e})),Gs=Ir(function(){return arguments}())?Ir:function(t){return Qs(t)&&Ct.call(t,"callee")&&!Xt.call(t,"callee")},Vs=r.isArray,zs=ve?$e(ve):function(t){return Qs(t)&&Er(t)==M};function Ws(t){return null!=t&&Js(t.length)&&!Ks(t)}function Hs(t){return Qs(t)&&Ws(t)}var qs=De||pu,Xs=ye?$e(ye):function(t){return Qs(t)&&Er(t)==y};function $s(t){if(!Qs(t))return!1;var e=Er(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!na(t)}function Ks(t){if(!Zs(t))return!1;var e=Er(t);return e==w||e==b||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ys(t){return"number"==typeof t&&t==fa(t)}function Js(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function Zs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Qs(t){return null!=t&&"object"==typeof t}var ta=_e?$e(_e):function(t){return Qs(t)&&lo(t)==E};function ea(t){return"number"==typeof t||Qs(t)&&Er(t)==S}function na(t){if(!Qs(t)||Er(t)!=A)return!1;var e=Ht(t);if(null===e)return!0;var n=Ct.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Lt.call(n)==Ut}var ra=we?$e(we):function(t){return Qs(t)&&Er(t)==k},ia=be?$e(be):function(t){return Qs(t)&&lo(t)==x};function oa(t){return"string"==typeof t||!Vs(t)&&Qs(t)&&Er(t)==I}function sa(t){return"symbol"==typeof t||Qs(t)&&Er(t)==P}var aa=Ee?$e(Ee):function(t){return Qs(t)&&Js(t.length)&&!!ie[Er(t)]},ua=Vi(Cr),ca=Vi((function(t,e){return t<=e}));function la(t){if(!t)return[];if(Ws(t))return oa(t)?ln(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=lo(t);return(e==E?rn:e==x?an:Ua)(t)}function ha(t){return t?(t=pa(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function fa(t){var e=ha(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(sa(t))return f;if(Zs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Zs(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)?ue(t.slice(2),n?2:8):dt.test(t)?f:+t}function ga(t){return ki(t,Oa(t))}function ma(t){return null==t?"":oi(t)}var va=Ii((function(t,e){if(wo(e)||Ws(e))ki(e,Pa(e),t);else for(var n in e)Ct.call(e,n)&&Zn(t,n,e[n])})),ya=Ii((function(t,e){ki(e,Oa(e),t)})),_a=Ii((function(t,e,n,r){ki(e,Oa(e),t,r)})),wa=Ii((function(t,e,n,r){ki(e,Pa(e),t,r)})),ba=Zi(rr),Ea=qr((function(t,e){t=Tt(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&mo(e[0],e[1],o)&&(r=1);++n<r;)for(var s=e[n],a=Oa(s),u=-1,c=a.length;++u<c;){var l=a[u],h=t[l];(h===i||Us(h,Mt[l])&&!Ct.call(t,l))&&(t[l]=s[l])}return t})),Sa=qr((function(t){return t.push(i,Ki),Se(Ra,i,t)}));function Aa(t,e,n){var r=null==t?i:wr(t,e);return r===i?n:r}function Ta(t,e){return null!=t&&ho(t,e,Tr)}var ka=Ni((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),t[e]=n}),Za(eu)),xa=Ni((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),Ct.call(t,e)?t[e].push(n):t[e]=[n]}),io),Ia=qr(xr);function Pa(t){return Ws(t)?Xn(t):Lr(t)}function Oa(t){return Ws(t)?Xn(t,!0):function(t){if(!Zs(t))return function(t){var e=[];if(null!=t)for(var n in Tt(t))e.push(n);return e}(t);var e=wo(t),n=[];for(var r in t)("constructor"!=r||!e&&Ct.call(t,r))&&n.push(r);return n}(t)}var Ma=Ii((function(t,e,n){Ur(t,e,n)})),Ra=Ii((function(t,e,n,r){Ur(t,e,n,r)})),La=Zi((function(t,e){var n={};if(null==t)return n;var r=!1;e=Me(e,(function(e){return e=gi(e,t),r||(r=e.length>1),e})),ki(t,to(t),n),r&&(n=or(n,7,Yi));for(var i=e.length;i--;)ai(n,e[i]);return n})),Ca=Zi((function(t,e){return null==t?{}:function(t,e){return Gr(t,e,(function(e,n){return Ta(t,n)}))}(t,e)}));function Fa(t,e){if(null==t)return{};var n=Me(to(t),(function(t){return[t]}));return e=io(e),Gr(t,n,(function(t,n){return e(t,n[0])}))}var Da=qi(Pa),Na=qi(Oa);function Ua(t){return null==t?[]:Ke(t,Pa(t))}var ja=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?Ba(e):e)}));function Ba(t){return $a(ma(t).toLowerCase())}function Ga(t){return(t=ma(t))&&t.replace(yt,Qe).replace(Jt,"")}var Va=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),za=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Wa=Mi("toLowerCase"),Ha=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),qa=Ri((function(t,e,n){return t+(n?" ":"")+$a(e)})),Xa=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),$a=Mi("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(ct)||[]}(t):t.match(e)||[]}var Ya=qr((function(t,e){try{return Se(t,i,e)}catch(t){return $s(t)?t:new Et(t)}})),Ja=Zi((function(t,e){return Te(e,(function(e){e=Fo(e),nr(t,e,xs(t[e],t))})),t}));function Za(t){return function(){return t}}var Qa=Fi(),tu=Fi(!0);function eu(t){return t}function nu(t){return Rr("function"==typeof t?t:or(t,1))}var ru=qr((function(t,e){return function(n){return xr(n,t,e)}})),iu=qr((function(t,e){return function(n){return xr(t,n,e)}}));function ou(t,e,n){var r=Pa(e),i=_r(e,r);null!=n||Zs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=_r(e,Pa(e)));var o=!(Zs(n)&&"chain"in n&&!n.chain),s=Ks(t);return Te(i,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||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,Re([this.value()],arguments))})})),t}function su(){}var au=ji(Me),uu=ji(xe),cu=ji(Fe);function lu(t){return vo(t)?ze(Fo(t)):function(t){return function(e){return wr(e,t)}}(t)}var hu=Gi(),fu=Gi(!0);function du(){return[]}function pu(){return!1}var gu,mu=Ui((function(t,e){return t+e}),0),vu=Wi("ceil"),yu=Ui((function(t,e){return t/e}),1),_u=Wi("floor"),wu=Ui((function(t,e){return t*e}),1),bu=Wi("round"),Eu=Ui((function(t,e){return t-e}),0);return Nn.after=function(t,e){if("function"!=typeof e)throw new It(o);return t=fa(t),function(){if(--t<1)return e.apply(this,arguments)}},Nn.ary=Ts,Nn.assign=va,Nn.assignIn=ya,Nn.assignInWith=_a,Nn.assignWith=wa,Nn.at=ba,Nn.before=ks,Nn.bind=xs,Nn.bindAll=Ja,Nn.bindKey=Is,Nn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Vs(t)?t:[t]},Nn.chain=ls,Nn.chunk=function(t,e,n){e=(n?mo(t,e,n):e===i)?1:gn(fa(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,u=r(de(o/e));s<o;)u[a++]=Qr(t,s,s+=e);return u},Nn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Nn.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 Re(Vs(n)?Ti(n):[n],pr(e,1))},Nn.cond=function(t){var e=null==t?0:t.length,n=io();return t=e?Me(t,(function(t){if("function"!=typeof t[1])throw new It(o);return[n(t[0]),t[1]]})):[],qr((function(n){for(var r=-1;++r<e;){var i=t[r];if(Se(i[0],this,n))return Se(i[1],this,n)}}))},Nn.conforms=function(t){return function(t){var e=Pa(t);return function(n){return sr(n,t,e)}}(or(t,1))},Nn.constant=Za,Nn.countBy=ds,Nn.create=function(t,e){var n=Un(t);return null==e?n:er(n,e)},Nn.curry=function t(e,n,r){var o=Xi(e,8,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},Nn.curryRight=function t(e,n,r){var o=Xi(e,16,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},Nn.debounce=Ps,Nn.defaults=Ea,Nn.defaultsDeep=Sa,Nn.defer=Os,Nn.delay=Ms,Nn.difference=Uo,Nn.differenceBy=jo,Nn.differenceWith=Bo,Nn.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):[]},Nn.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):[]},Nn.dropRightWhile=function(t,e){return t&&t.length?ci(t,io(e,3),!0,!0):[]},Nn.dropWhile=function(t,e){return t&&t.length?ci(t,io(e,3),!0):[]},Nn.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&mo(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=fa(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:fa(r))<0&&(r+=o),r=n>r?0:da(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Nn.filter=function(t,e){return(Vs(t)?Ie:dr)(t,io(e,3))},Nn.flatMap=function(t,e){return pr(bs(t,e),1)},Nn.flatMapDeep=function(t,e){return pr(bs(t,e),l)},Nn.flatMapDepth=function(t,e,n){return n=n===i?1:fa(n),pr(bs(t,e),n)},Nn.flatten=zo,Nn.flattenDeep=function(t){return null!=t&&t.length?pr(t,l):[]},Nn.flattenDepth=function(t,e){return null!=t&&t.length?pr(t,e=e===i?1:fa(e)):[]},Nn.flip=function(t){return Xi(t,512)},Nn.flow=Qa,Nn.flowRight=tu,Nn.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},Nn.functions=function(t){return null==t?[]:_r(t,Pa(t))},Nn.functionsIn=function(t){return null==t?[]:_r(t,Oa(t))},Nn.groupBy=ys,Nn.initial=function(t){return null!=t&&t.length?Qr(t,0,-1):[]},Nn.intersection=Ho,Nn.intersectionBy=qo,Nn.intersectionWith=Xo,Nn.invert=ka,Nn.invertBy=xa,Nn.invokeMap=_s,Nn.iteratee=nu,Nn.keyBy=ws,Nn.keys=Pa,Nn.keysIn=Oa,Nn.map=bs,Nn.mapKeys=function(t,e){var n={};return e=io(e,3),vr(t,(function(t,r,i){nr(n,e(t,r,i),t)})),n},Nn.mapValues=function(t,e){var n={};return e=io(e,3),vr(t,(function(t,r,i){nr(n,r,e(t,r,i))})),n},Nn.matches=function(t){return Dr(or(t,1))},Nn.matchesProperty=function(t,e){return Nr(t,or(e,1))},Nn.memoize=Rs,Nn.merge=Ma,Nn.mergeWith=Ra,Nn.method=ru,Nn.methodOf=iu,Nn.mixin=ou,Nn.negate=Ls,Nn.nthArg=function(t){return t=fa(t),qr((function(e){return jr(e,t)}))},Nn.omit=La,Nn.omitBy=function(t,e){return Fa(t,Ls(io(e)))},Nn.once=function(t){return ks(2,t)},Nn.orderBy=function(t,e,n,r){return null==t?[]:(Vs(e)||(e=null==e?[]:[e]),Vs(n=r?i:n)||(n=null==n?[]:[n]),Br(t,e,n))},Nn.over=au,Nn.overArgs=Cs,Nn.overEvery=uu,Nn.overSome=cu,Nn.partial=Fs,Nn.partialRight=Ds,Nn.partition=Es,Nn.pick=Ca,Nn.pickBy=Fa,Nn.property=lu,Nn.propertyOf=function(t){return function(e){return null==t?i:wr(t,e)}},Nn.pull=Ko,Nn.pullAll=Yo,Nn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Vr(t,e,io(n,2)):t},Nn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Vr(t,e,i,n):t},Nn.pullAt=Jo,Nn.range=hu,Nn.rangeRight=fu,Nn.rearg=Ns,Nn.reject=function(t,e){return(Vs(t)?Ie:dr)(t,Ls(io(e,3)))},Nn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=io(e,3);++r<o;){var s=t[r];e(s,r,t)&&(n.push(s),i.push(r))}return zr(t,i),n},Nn.rest=function(t,e){if("function"!=typeof t)throw new It(o);return qr(t,e=e===i?e:fa(e))},Nn.reverse=Zo,Nn.sampleSize=function(t,e,n){return e=(n?mo(t,e,n):e===i)?1:fa(e),(Vs(t)?Kn:$r)(t,e)},Nn.set=function(t,e,n){return null==t?t:Kr(t,e,n)},Nn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:Kr(t,e,n,r)},Nn.shuffle=function(t){return(Vs(t)?Yn:Zr)(t)},Nn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&mo(t,e,n)?(e=0,n=r):(e=null==e?0:fa(e),n=n===i?r:fa(n)),Qr(t,e,n)):[]},Nn.sortBy=Ss,Nn.sortedUniq=function(t){return t&&t.length?ri(t):[]},Nn.sortedUniqBy=function(t,e){return t&&t.length?ri(t,io(e,2)):[]},Nn.split=function(t,e,n){return n&&"number"!=typeof n&&mo(t,e,n)&&(e=n=i),(n=n===i?d:n>>>0)?(t=ma(t))&&("string"==typeof e||null!=e&&!ra(e))&&!(e=oi(e))&&nn(t)?vi(ln(t),0,n):t.split(e,n):[]},Nn.spread=function(t,e){if("function"!=typeof t)throw new It(o);return e=null==e?0:gn(fa(e),0),qr((function(n){var r=n[e],i=vi(n,0,e);return r&&Re(i,r),Se(t,this,i)}))},Nn.tail=function(t){var e=null==t?0:t.length;return e?Qr(t,1,e):[]},Nn.take=function(t,e,n){return t&&t.length?Qr(t,0,(e=n||e===i?1:fa(e))<0?0:e):[]},Nn.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):[]},Nn.takeRightWhile=function(t,e){return t&&t.length?ci(t,io(e,3),!1,!0):[]},Nn.takeWhile=function(t,e){return t&&t.length?ci(t,io(e,3)):[]},Nn.tap=function(t,e){return e(t),t},Nn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new It(o);return Zs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ps(t,e,{leading:r,maxWait:e,trailing:i})},Nn.thru=hs,Nn.toArray=la,Nn.toPairs=Da,Nn.toPairsIn=Na,Nn.toPath=function(t){return Vs(t)?Me(t,Fo):sa(t)?[t]:Ti(Co(ma(t)))},Nn.toPlainObject=ga,Nn.transform=function(t,e,n){var r=Vs(t),i=r||qs(t)||aa(t);if(e=io(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Zs(t)&&Ks(o)?Un(Ht(t)):{}}return(i?Te:vr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Nn.unary=function(t){return Ts(t,1)},Nn.union=Qo,Nn.unionBy=ts,Nn.unionWith=es,Nn.uniq=function(t){return t&&t.length?si(t):[]},Nn.uniqBy=function(t,e){return t&&t.length?si(t,io(e,2)):[]},Nn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?si(t,i,e):[]},Nn.unset=function(t,e){return null==t||ai(t,e)},Nn.unzip=ns,Nn.unzipWith=rs,Nn.update=function(t,e,n){return null==t?t:ui(t,e,pi(n))},Nn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ui(t,e,pi(n),r)},Nn.values=Ua,Nn.valuesIn=function(t){return null==t?[]:Ke(t,Oa(t))},Nn.without=is,Nn.words=Ka,Nn.wrap=function(t,e){return Fs(pi(e),t)},Nn.xor=os,Nn.xorBy=ss,Nn.xorWith=as,Nn.zip=us,Nn.zipObject=function(t,e){return fi(t||[],e||[],Zn)},Nn.zipObjectDeep=function(t,e){return fi(t||[],e||[],Kr)},Nn.zipWith=cs,Nn.entries=Da,Nn.entriesIn=Na,Nn.extend=ya,Nn.extendWith=_a,ou(Nn,Nn),Nn.add=mu,Nn.attempt=Ya,Nn.camelCase=ja,Nn.capitalize=Ba,Nn.ceil=vu,Nn.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)},Nn.clone=function(t){return or(t,4)},Nn.cloneDeep=function(t){return or(t,5)},Nn.cloneDeepWith=function(t,e){return or(t,5,e="function"==typeof e?e:i)},Nn.cloneWith=function(t,e){return or(t,4,e="function"==typeof e?e:i)},Nn.conformsTo=function(t,e){return null==e||sr(t,e,Pa(e))},Nn.deburr=Ga,Nn.defaultTo=function(t,e){return null==t||t!=t?e:t},Nn.divide=yu,Nn.endsWith=function(t,e,n){t=ma(t),e=oi(e);var r=t.length,o=n=n===i?r:ir(fa(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Nn.eq=Us,Nn.escape=function(t){return(t=ma(t))&&$.test(t)?t.replace(q,tn):t},Nn.escapeRegExp=function(t){return(t=ma(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Nn.every=function(t,e,n){var r=Vs(t)?xe:hr;return n&&mo(t,e,n)&&(e=i),r(t,io(e,3))},Nn.find=ps,Nn.findIndex=Go,Nn.findKey=function(t,e){return Ne(t,io(e,3),vr)},Nn.findLast=gs,Nn.findLastIndex=Vo,Nn.findLastKey=function(t,e){return Ne(t,io(e,3),yr)},Nn.floor=_u,Nn.forEach=ms,Nn.forEachRight=vs,Nn.forIn=function(t,e){return null==t?t:gr(t,io(e,3),Oa)},Nn.forInRight=function(t,e){return null==t?t:mr(t,io(e,3),Oa)},Nn.forOwn=function(t,e){return t&&vr(t,io(e,3))},Nn.forOwnRight=function(t,e){return t&&yr(t,io(e,3))},Nn.get=Aa,Nn.gt=js,Nn.gte=Bs,Nn.has=function(t,e){return null!=t&&ho(t,e,Ar)},Nn.hasIn=Ta,Nn.head=Wo,Nn.identity=eu,Nn.includes=function(t,e,n,r){t=Ws(t)?t:Ua(t),n=n&&!r?fa(n):0;var i=t.length;return n<0&&(n=gn(i+n,0)),oa(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&je(t,e,n)>-1},Nn.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)),je(t,e,i)},Nn.inRange=function(t,e,n){return e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n){return t>=mn(e,n)&&t<gn(e,n)}(t=pa(t),e,n)},Nn.invoke=Ia,Nn.isArguments=Gs,Nn.isArray=Vs,Nn.isArrayBuffer=zs,Nn.isArrayLike=Ws,Nn.isArrayLikeObject=Hs,Nn.isBoolean=function(t){return!0===t||!1===t||Qs(t)&&Er(t)==v},Nn.isBuffer=qs,Nn.isDate=Xs,Nn.isElement=function(t){return Qs(t)&&1===t.nodeType&&!na(t)},Nn.isEmpty=function(t){if(null==t)return!0;if(Ws(t)&&(Vs(t)||"string"==typeof t||"function"==typeof t.splice||qs(t)||aa(t)||Gs(t)))return!t.length;var e=lo(t);if(e==E||e==x)return!t.size;if(wo(t))return!Lr(t).length;for(var n in t)if(Ct.call(t,n))return!1;return!0},Nn.isEqual=function(t,e){return Pr(t,e)},Nn.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},Nn.isError=$s,Nn.isFinite=function(t){return"number"==typeof t&&We(t)},Nn.isFunction=Ks,Nn.isInteger=Ys,Nn.isLength=Js,Nn.isMap=ta,Nn.isMatch=function(t,e){return t===e||Or(t,e,so(e))},Nn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Or(t,e,so(e),n)},Nn.isNaN=function(t){return ea(t)&&t!=+t},Nn.isNative=function(t){if(_o(t))throw new Et("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(t)},Nn.isNil=function(t){return null==t},Nn.isNull=function(t){return null===t},Nn.isNumber=ea,Nn.isObject=Zs,Nn.isObjectLike=Qs,Nn.isPlainObject=na,Nn.isRegExp=ra,Nn.isSafeInteger=function(t){return Ys(t)&&t>=-9007199254740991&&t<=h},Nn.isSet=ia,Nn.isString=oa,Nn.isSymbol=sa,Nn.isTypedArray=aa,Nn.isUndefined=function(t){return t===i},Nn.isWeakMap=function(t){return Qs(t)&&lo(t)==O},Nn.isWeakSet=function(t){return Qs(t)&&"[object WeakSet]"==Er(t)},Nn.join=function(t,e){return null==t?"":dn.call(t,e)},Nn.kebabCase=Va,Nn.last=$o,Nn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=fa(n))<0?gn(r+o,0):mn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Ue(t,Ge,o,!0)},Nn.lowerCase=za,Nn.lowerFirst=Wa,Nn.lt=ua,Nn.lte=ca,Nn.max=function(t){return t&&t.length?fr(t,eu,Sr):i},Nn.maxBy=function(t,e){return t&&t.length?fr(t,io(e,2),Sr):i},Nn.mean=function(t){return Ve(t,eu)},Nn.meanBy=function(t,e){return Ve(t,io(e,2))},Nn.min=function(t){return t&&t.length?fr(t,eu,Cr):i},Nn.minBy=function(t,e){return t&&t.length?fr(t,io(e,2),Cr):i},Nn.stubArray=du,Nn.stubFalse=pu,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=wu,Nn.nth=function(t,e){return t&&t.length?jr(t,fa(e)):i},Nn.noConflict=function(){return he._===this&&(he._=jt),this},Nn.noop=su,Nn.now=As,Nn.pad=function(t,e,n){t=ma(t);var r=(e=fa(e))?cn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Bi(ge(i),n)+t+Bi(de(i),n)},Nn.padEnd=function(t,e,n){t=ma(t);var r=(e=fa(e))?cn(t):0;return e&&r<e?t+Bi(e-r,n):t},Nn.padStart=function(t,e,n){t=ma(t);var r=(e=fa(e))?cn(t):0;return e&&r<e?Bi(e-r,n)+t:t},Nn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),yn(ma(t).replace(it,""),e||0)},Nn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&mo(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=ha(t),e===i?(e=t,t=0):e=ha(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=_n();return mn(t+o*(e-t+ae("1e-"+((o+"").length-1))),e)}return Wr(t,e)},Nn.reduce=function(t,e,n){var r=Vs(t)?Le:He,i=arguments.length<3;return r(t,io(e,4),n,i,cr)},Nn.reduceRight=function(t,e,n){var r=Vs(t)?Ce:He,i=arguments.length<3;return r(t,io(e,4),n,i,lr)},Nn.repeat=function(t,e,n){return e=(n?mo(t,e,n):e===i)?1:fa(e),Hr(ma(t),e)},Nn.replace=function(){var t=arguments,e=ma(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Nn.result=function(t,e,n){var r=-1,o=(e=gi(e,t)).length;for(o||(o=1,t=i);++r<o;){var s=null==t?i:t[Fo(e[r])];s===i&&(r=o,s=n),t=Ks(s)?s.call(t):s}return t},Nn.round=bu,Nn.runInContext=t,Nn.sample=function(t){return(Vs(t)?$n:Xr)(t)},Nn.size=function(t){if(null==t)return 0;if(Ws(t))return oa(t)?cn(t):t.length;var e=lo(t);return e==E||e==x?t.size:Lr(t).length},Nn.snakeCase=Ha,Nn.some=function(t,e,n){var r=Vs(t)?Fe:ti;return n&&mo(t,e,n)&&(e=i),r(t,io(e,3))},Nn.sortedIndex=function(t,e){return ei(t,e)},Nn.sortedIndexBy=function(t,e,n){return ni(t,e,io(n,2))},Nn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ei(t,e);if(r<n&&Us(t[r],e))return r}return-1},Nn.sortedLastIndex=function(t,e){return ei(t,e,!0)},Nn.sortedLastIndexBy=function(t,e,n){return ni(t,e,io(n,2),!0)},Nn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ei(t,e,!0)-1;if(Us(t[n],e))return n}return-1},Nn.startCase=qa,Nn.startsWith=function(t,e,n){return t=ma(t),n=null==n?0:ir(fa(n),0,t.length),e=oi(e),t.slice(n,n+e.length)==e},Nn.subtract=Eu,Nn.sum=function(t){return t&&t.length?qe(t,eu):0},Nn.sumBy=function(t,e){return t&&t.length?qe(t,io(e,2)):0},Nn.template=function(t,e,n){var r=Nn.templateSettings;n&&mo(t,e,n)&&(e=i),t=ma(t),e=_a({},e,r,$i);var o,s,a=_a({},e.imports,r.imports,$i),u=Pa(a),c=Ke(a,u),l=0,h=e.interpolate||_t,f="__p += '",d=kt((e.escape||_t).source+"|"+h.source+"|"+(h===J?ht:_t).source+"|"+(e.evaluate||_t).source+"|$","g"),p="//# sourceURL="+(Ct.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(d,(function(e,n,r,i,a,u){return r||(r=i),f+=t.slice(l,u).replace(wt,en),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),f+="';\n";var g=Ct.call(e,"variable")&&e.variable;g||(f="with (obj) {\n"+f+"\n}\n"),f=(s?f.replace(V,""):f).replace(z,"$1").replace(W,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Ya((function(){return St(u,p+"return "+f).apply(i,c)}));if(m.source=f,$s(m))throw m;return m},Nn.times=function(t,e){if((t=fa(t))<1||t>h)return[];var n=d,r=mn(t,d);e=io(e),t-=d;for(var i=Xe(r,e);++n<t;)e(n);return i},Nn.toFinite=ha,Nn.toInteger=fa,Nn.toLength=da,Nn.toLower=function(t){return ma(t).toLowerCase()},Nn.toNumber=pa,Nn.toSafeInteger=function(t){return t?ir(fa(t),-9007199254740991,h):0===t?t:0},Nn.toString=ma,Nn.toUpper=function(t){return ma(t).toUpperCase()},Nn.trim=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(rt,"");if(!t||!(e=oi(e)))return t;var r=ln(t),o=ln(e);return vi(r,Je(r,o),Ze(r,o)+1).join("")},Nn.trimEnd=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(ot,"");if(!t||!(e=oi(e)))return t;var r=ln(t);return vi(r,0,Ze(r,ln(e))+1).join("")},Nn.trimStart=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(it,"");if(!t||!(e=oi(e)))return t;var r=ln(t);return vi(r,Je(r,ln(e))).join("")},Nn.truncate=function(t,e){var n=30,r="...";if(Zs(e)){var o="separator"in e?e.separator:o;n="length"in e?fa(e.length):n,r="omission"in e?oi(e.omission):r}var s=(t=ma(t)).length;if(nn(t)){var a=ln(t);s=a.length}if(n>=s)return t;var u=n-cn(r);if(u<1)return r;var c=a?vi(a,0,u).join(""):t.slice(0,u);if(o===i)return c+r;if(a&&(u+=c.length-u),ra(o)){if(t.slice(u).search(o)){var l,h=c;for(o.global||(o=kt(o.source,ma(ft.exec(o))+"g")),o.lastIndex=0;l=o.exec(h);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(t.indexOf(oi(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},Nn.unescape=function(t){return(t=ma(t))&&X.test(t)?t.replace(H,hn):t},Nn.uniqueId=function(t){var e=++Ft;return ma(t)+e},Nn.upperCase=Xa,Nn.upperFirst=$a,Nn.each=ms,Nn.eachRight=vs,Nn.first=Wo,ou(Nn,(gu={},vr(Nn,(function(t,e){Ct.call(Nn.prototype,e)||(gu[e]=t)})),gu),{chain:!1}),Nn.VERSION="4.17.20",Te(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Nn[t].placeholder=Nn})),Te(["drop","take"],(function(t,e){Gn.prototype[t]=function(n){n=n===i?1:gn(fa(n),0);var r=this.__filtered__&&!e?new Gn(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},Gn.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;Gn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:io(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Te(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Gn.prototype[t]=function(){return this[n](1).value()[0]}})),Te(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Gn.prototype[t]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(eu)},Gn.prototype.find=function(t){return this.filter(t).head()},Gn.prototype.findLast=function(t){return this.reverse().find(t)},Gn.prototype.invokeMap=qr((function(t,e){return"function"==typeof t?new Gn(this):this.map((function(n){return xr(n,t,e)}))})),Gn.prototype.reject=function(t){return this.filter(Ls(io(t)))},Gn.prototype.slice=function(t,e){t=fa(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Gn(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)},Gn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Gn.prototype.toArray=function(){return this.take(d)},vr(Gn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Nn[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);o&&(Nn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof Gn,c=a[0],l=u||Vs(e),h=function(t){var e=o.apply(Nn,Re([t],a));return r&&f?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,d=!!this.__actions__.length,p=s&&!f,g=u&&!d;if(!s&&l){e=g?e:new Gn(this);var m=t.apply(e,a);return m.__actions__.push({func:hs,args:[h],thisArg:i}),new Bn(m,f)}return p&&g?t.apply(this,a):(m=this.thru(h),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);Nn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Vs(i)?i:[],t)}return this[n]((function(n){return e.apply(Vs(n)?n:[],t)}))}})),vr(Gn.prototype,(function(t,e){var n=Nn[e];if(n){var r=n.name+"";Ct.call(In,r)||(In[r]=[]),In[r].push({name:e,func:n})}})),In[Di(i,2).name]=[{name:"wrapper",func:i}],Gn.prototype.clone=function(){var t=new Gn(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},Gn.prototype.reverse=function(){if(this.__filtered__){var t=new Gn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Gn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Vs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=mn(e,t+s);break;case"takeRight":t=gn(t,e-s)}}return{start:t,end:e}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,h=l.length,f=0,d=mn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return li(t,this.__actions__);var p=[];t:for(;u--&&f<d;){for(var g=-1,m=t[c+=e];++g<h;){var v=l[g],y=v.iteratee,_=v.type,w=y(m);if(2==_)m=w;else if(!w){if(1==_)continue t;break t}}p[f++]=m}return p},Nn.prototype.at=fs,Nn.prototype.chain=function(){return ls(this)},Nn.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Nn.prototype.next=function(){this.__values__===i&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Nn.prototype.plant=function(t){for(var e,n=this;n instanceof jn;){var r=No(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Nn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Gn){var e=t;return this.__actions__.length&&(e=new Gn(this)),(e=e.reverse()).__actions__.push({func:hs,args:[Zo],thisArg:i}),new Bn(e,this.__chain__)}return this.thru(Zo)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,Zt&&(Nn.prototype[Zt]=function(){return this}),Nn}();he._=fn,(r=function(){return fn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},464:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AxiosServerError=e.AxiosError=void 0;const r=n(749);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}}},749:(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{}},746: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(669)),o=r(n(486)),s=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=o.default.omit(t.toJSON(),"config");if(t.response){const n=o.default.pick(t.response,["data","status","statusText"]);throw new s.AxiosServerError(n,e)}throw new s.AxiosError(`Axios: ${t.message}`,e)}throw t}}}},310: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(669)),o=n(134);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 s={[o.Environment.Staging]:e.API_STAGING_HOST,[o.Environment.UAT]:e.API_UAT_HOST,[o.Environment.Prod]:e.API_PROD_HOST},a={[o.Environment.Staging]:e.STAGING_API_KEY,[o.Environment.UAT]:e.UAT_API_KEY,[o.Environment.Prod]:e.PROD_API_KEY};e.MIVA_PROCTOR_SERVICE_ENDPOINT=e.API_STAGING_HOST,e.createAxios=t=>{const e=s[t],n=a[t];return i.default.create({baseURL:e,headers:{"Content-Type":"application/json","x-api-key":n},timeout:3e4})}},726:(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"}}},338:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctorMetricService=void 0;const r=n(746),i=n(310),o=n(726);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:o.CONFIG.API_SESSIONS_PATH.START_SESSION,method:"POST",data:t})}async getSessions(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_SESSIONS_PATH.SESSIONS,method:"GET",data:t})}async getActiveSessions(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_SESSIONS_PATH.SESSIONS_ACTIVE,method:"GET",params:{studentId:t}})}async endSession(t){return await this.axiosWrapper.makeRequest({url:o.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:o.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:o.CONFIG.API_SESSIONS_PATH.DELETE_SESSION.replace(":id",t),method:"DELETE"})}async updateActivities(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES,method:"POST",data:t})}async updateMultipleActivities(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_ACTIVITIES_PATH.MULTIPLE_ACTIVITIES,method:"POST",data:{activities:t.data}})}async getActivityMetrics(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES_METRICS,method:"POST",data:t})}async getActivities(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES,method:"GET",params:t})}}},200:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},108: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(338),e),i(n(200),e),i(n(726),e),i(n(310),e),i(n(746),e)},763:(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:.08,silenceVolume:.001,muteVolume:1e-4,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.events=t,this.isSEB=this.detectSEB()}detectSEB(){const t=navigator.userAgent.toLowerCase();return t.includes("seb")||t.includes("safe exam browser")}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)console.log("Using SEB-compatible audio detection"),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}):(console.warn("No supported MIME types found for MediaRecorder, using default"),this.recorder=new MediaRecorder(this.mediaStream)),this.recorder.ondataavailable=t=>{t.data.size>0&&this.recordedChunks.push(t.data)},this.recorder.onstop=()=>{const t=new Blob(this.recordedChunks,{type:"audio/webm"});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()}}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<35;n++)n<t.length&&(e+=t[n],i++);let o=(i>0?e/i:0)/255;o=Math.pow(o,.7),o<.01&&(o=0),this.meter.volume=o,this.sampleThresholdsDecision(r.muteVolume,r.speakingMinVolume)}),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.sampleThresholdsDecision(r.muteVolume,r.speakingMinVolume)}),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?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,o=0;o<r;o++)e=n[o],Math.abs(e)>=this.meter.clipLevel&&(this.meter.clipping=!0,this.meter.lastClip=window.performance.now()),i+=e*e;var s=Math.sqrt(i/r);this.meter.volume=Math.max(s,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"),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)}))}}},415:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FaceDetector=void 0;const r=n(811);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(135);Object.defineProperty(e,"PossibleViolation",{enumerable:!0,get:function(){return r.PossibleViolation}});const i=n(763),o=n(415),s=n(410);Object.defineProperty(e,"MediaPermissions",{enumerable:!0,get:function(){return s.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=s.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 o.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=s.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=s.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,o)=>{const s=setTimeout((()=>{console.error("Screenshot timeout - likely blocked by SEB"),i(this.takeScreenshotFallback(t))}),1e4);e.addEventListener("loadeddata",(async()=>{try{const{videoWidth:o,videoHeight:a}=e,u=Math.floor(.75*o),c=Math.floor(.75*a);n.width=u,n.height=c,await e.play(),r.drawImage(e,0,0,u,c),"function"==typeof n.toBlob?n.toBlob((e=>{clearTimeout(s),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(s),i(this.takeScreenshotFallback(t)))}catch(e){console.error("Error taking screenshot:",e),clearTimeout(s),i(this.takeScreenshotFallback(t))}})),e.addEventListener("error",(e=>{console.error("Video error during screenshot:",e),clearTimeout(s),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)}}},410:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MediaPermissions=void 0;const r=n(763);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},432: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(108),e),i(n(383),e),i(n(921),e)},863:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctoringManager=void 0;const r=n(108),i=n(410);class o{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 o.instance||(o.instance=new o(t)),o.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=o},383: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(863),e)},134:(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"},921: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(134),e),i(n(135),e)},135:(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"},811:(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 o,s;const a="undefined"!=typeof TextDecoder;let u;const c="undefined"!=typeof TextEncoder;function l(t){if(c)t=(u||=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 o=t.charCodeAt(++i);if(o>=56320&&o<=57343){e=1024*(e-55296)+o-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 h,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];h=null!=v&&v;const y=n.navigator;function _(t){return!!h&&!!m&&m.brands.some((({brand:e})=>e&&-1!=e.indexOf(t)))}function w(t){var e;return(e=n.navigator)&&(e=e.userAgent)||(e=""),-1!=e.indexOf(t)}function b(){return!!h&&!!m&&m.brands.length>0}function E(){return b()?_("Chromium"):(w("Chrome")||w("CriOS"))&&!(!b()&&w("Edge"))||w("Silk")}function S(t){return S[" "](t),t}m=y&&y.userAgentData||null,S[" "]=function(){};var A=!b()&&(w("Trident")||w("MSIE"));!w("Android")||E(),E(),w("Safari")&&(E()||!b()&&w("Coast")||!b()&&w("Opera")||!b()&&w("Edge")||(b()?_("Microsoft Edge"):w("Edg/"))||b()&&_("Opera"));var T={},k=null;function x(){if(!k){k={};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===k[e]&&(k[e]=t)}}}}var I="undefined"!=typeof Uint8Array,P=!A&&"function"==typeof btoa;function O(t){if(!P){var e;void 0===e&&(e=0),x(),e=T[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let u=0,c=0;for(;u<t.length-2;u+=3){var i=t[u],o=t[u+1],s=t[u+2],a=e[i>>2];i=e[(3&i)<<4|o>>4],o=e[(15&o)<<2|s>>6],s=e[63&s],n[c++]=a+i+o+s}switch(a=0,s=r,t.length-u){case 2:s=e[(15&(a=t[u+1]))<<2]||r;case 1:t=t[u],n[c]=e[t>>2]+e[(3&t)<<4|a>>4]+s+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 M=/[-_.]/g,R={"-":"+",_:"/",".":"="};function L(t){return R[t]||""}function C(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=k[e];if(null!=n)return n;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}x();let r=0;for(;;){const t=n(-1),r=n(0),i=n(64),o=n(64);if(64===o&&-1===t)break;e(t<<2|r>>4),64!=i&&(e(r<<4&240|i>>2),64!=o&&e(i<<6&192|o))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}(t);M.test(t)&&(t=t.replace(M,L)),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 F(t){return I&&null!=t&&t instanceof Uint8Array}var D={};function N(){return B||=new j(null,D)}function U(t){V(D);var e=t.g;return null==(e=null==e||F(e)?e:"string"==typeof e?C(e):null)?e:t.g=e}var j=class{h(){return new Uint8Array(U(this)||0)}constructor(t,e){if(V(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};let B,G;function V(t){if(t!==D)throw Error("illegal external caller")}function z(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function W(t){return z(t=Error(t),"warning"),t}var H="function"==typeof Symbol&&"symbol"==typeof Symbol(),q=new Set;function X(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&&q.add(t),t}var $=X("jas",void 0,!0,!0),K=X(void 0,"0di"),Y=X(void 0,"2ex"),J=X(void 0,"1oa",!0),Z=X(void 0,Symbol(),!0);const Q=H?$:"Ga",tt={Ga:{value:0,configurable:!0,writable:!0,enumerable:!1}},et=Object.defineProperties;function nt(t,e){H||Q in t||et(t,tt),t[Q]|=e}function rt(t,e){H||Q in t||et(t,tt),t[Q]=e}function it(t){return nt(t,34),t}function ot(t,e){rt(e,-30975&(0|t))}function st(t,e){rt(e,-30941&(34|t))}function at(){return"function"==typeof BigInt}function ut(t){return Array.prototype.slice.call(t)}var ct,lt={},ht={};function ft(t){return!(!t||"object"!=typeof t||t.Ia!==ht)}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 j(t,D):N();else if(t.constructor!==j)if(F(t))t=t.length?new j(new Uint8Array(t),D):N();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),ct=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 wt=Object.freeze({});function bt(t){return t.Qa=!0,t}var Et=bt((t=>"number"==typeof t)),St=bt((t=>"string"==typeof t)),At=bt((t=>"boolean"==typeof t)),Tt="function"==typeof n.BigInt&&"bigint"==typeof n.BigInt(0),kt=bt((t=>Tt?t>=It&&t<=Ot:"-"===t[0]?Mt(t,xt):Mt(t,Pt)));const xt=Number.MIN_SAFE_INTEGER.toString(),It=Tt?BigInt(Number.MIN_SAFE_INTEGER):void 0,Pt=Number.MAX_SAFE_INTEGER.toString(),Ot=Tt?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Mt(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 Rt="function"==typeof Uint8Array.prototype.slice;let Lt,Ct=0,Ft=0;function Dt(t){const e=t>>>0;Ct=e,Ft=(t-e)/4294967296>>>0}function Nt(t){if(t<0){Dt(-t);const[e,n]=Wt(Ct,Ft);Ct=e>>>0,Ft=n>>>0}else Dt(t)}function Ut(t){const e=Lt||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),Ft=0,Ct=e.getUint32(0,!0)}function jt(t,e){const n=4294967296*e+(t>>>0);return Number.isSafeInteger(n)?n:Gt(t,e)}function Bt(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),"number"==typeof(t=jt(t,e))?n?-t:t:n?"-"+t:t}function Gt(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+Vt(n)+Vt(t));return n}function Vt(t){return t=String(t),"0000000".slice(t.length)+t}function zt(t){if(t.length<16)Nt(Number(t));else if(at())t=BigInt(t),Ct=Number(t&BigInt(4294967295))>>>0,Ft=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);Ft=Ct=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));Ft*=1e6,Ct=1e6*Ct+e,Ct>=4294967296&&(Ft+=Math.trunc(Ct/4294967296),Ft>>>=0,Ct>>>=0)}if(e){const[t,e]=Wt(Ct,Ft);Ct=t,Ft=e}}}function Wt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}const Ht="function"==typeof BigInt?BigInt.asIntN:void 0,qt="function"==typeof BigInt?BigInt.asUintN:void 0,Xt=Number.isSafeInteger,$t=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 $t(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 $t(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 $t(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),Xt(t)||(Nt(t),t=Bt(Ct,Ft)),t}function ie(t){var e=Kt(Number(t));if(Xt(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(zt(t),t=Ct,2147483648&(e=Ft))if(at())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=Wt(t,e);t="-"+Gt(n,r)}else t=Gt(t,e);return t}function oe(t){return null==t?t:"bigint"==typeof t?(kt(t)?t=Number(t):(t=Ht(64,t),t=kt(t)?Number(t):String(t)),t):Qt(t)?"number"==typeof t?re(t):ie(t):void 0}function se(t){if("string"!=typeof t)throw Error();return t}function ae(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function ue(t){return null==t||"string"==typeof t?t:void 0}function ce(t,e,n,r){if(null!=t&&"object"==typeof t&&t.W===lt)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 le(t,e,n){if(e)t:{if(!Qt(e=t))throw W("int64");switch(typeof e){case"string":e=ie(e);break t;case"bigint":if(t=e=Ht(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):At(e)?e?"1":"0":St(e)?e.trim()||"0":String(e);break t;default:e=re(e)}}else e=oe(t);return"string"==typeof(n=null==(t=e)?n?0:void 0:t)&&Xt(e=+n)?e:n}const he={};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 o=0;o<t.length;o++){const s=t[o],a=n(s[0],!1,!0);let u=s[1];e?void 0===u&&(u=null):u=r(s[1],!1,!0,void 0,void 0,i),super.set(a,u)}}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,we,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,o){return t=ce(t,r,n,o),i&&(t=Ce(t)),t}function _e(t){return t}function we(t){return[t,this.get(t)]}let be,Ee,Se;function Ae(){return be||=new ve(it([]),void 0,void 0,void 0,he)}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:ke(t,e,n,void 0!==r,i);else if(dt(t)){const o={};for(let s in t)o[s]=Te(t[s],e,n,r,i);t=o}else t=e(t,r);return t}}function ke(t,e,n,r,i){const o=r||n?0|t[Q]:0,s=r?!!(32&o):void 0;r=ut(t);for(let t=0;t<r.length;t++)r[t]=Te(r[t],e,n,s,i);return n&&((t=_t(t))&&(r[Z]=ut(t)),n(o,r)),r}function xe(t){return Te(t,Ie,void 0,void 0,!1)}function Ie(t){return t.W===lt?t.toJSON():t instanceof ve?t.na(xe):function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"bigint":return kt(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(F(t))return O(t);if(t instanceof j){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 ke(t,Ie,void 0,void 0,!1)}function Oe(t,e,n){return t=Me(t,e[0],e[1],n?1:2),e!==Ee&&n&&nt(t,16384),t}function Me(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 Re(t,e,n=st){if(null!=t){if(I&&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):ke(t,Re,4&r?st:n,!0,!0))}return t.W===lt?t=2&(r=0|(n=t.u)[Q])?t:new t.constructor(Le(n,r,!0)):t instanceof ve&&!(2&t.L)&&(n=it(t.X(Re)),t=new ve(n,t.S,t.R,t.Y)),t}}function Le(t,e,n){const r=n||2&e?st:ot,i=!!(32&e);return t=function(t,e,n){const r=ut(t);var i=r.length;const o=256&e?r[i-1]:void 0;for(i+=o?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(o){e=r[e]={};for(const t in o)e[t]=n(o[t])}return(t=_t(t))&&(r[Z]=ut(t)),r}(t,e,(t=>Re(t,i,r))),nt(t,32|(n?2:0)),t}function Ce(t){const e=t.u,n=0|e[Q];return 2&n?new t.constructor(Le(e,n,!1)):t}function Fe(t,e){return De(t=t.u,0|t[Q],e)}function De(t,e,r,i){if(-1===r)return null;var o=r+(512&e?0:-1);const s=t.length-1;return o>=s&&256&e?t[s][r]:i&&256&e&&null!=(e=t[s][r])?(null!=t[o]&&null!=Y&&((o=(t=G??={})[Y]||0)>=4||(t[Y]=o+1,z(t=Error(),"incident"),function(t){n.setTimeout((()=>{throw t}),0)}(t))),e):o<=s?t[o]:void 0}function Ne(t,e,n){const r=t.u;let i=0|r[Q];return vt(i),Ue(r,i,e,n),t}function Ue(t,e,n,r){const i=512&e?0:-1,o=n+i;var s=t.length-1;return o>=s&&256&e?(t[s][n]=r,e):o<=s?(t[o]=r,256&e&&n in(t=t[s])&&delete t[n],e):(void 0!==r&&(n>=(s=e>>15&1023||536870912)?null!=r&&(t[s+i]={[n]:r},rt(t,e|=256)):t[o]=r),e)}function je(t,e){let n=0|(t=t.u)[Q];const r=De(t,n,e),i=Yt(r);return null!=i&&i!==r&&Ue(t,n,e,i),i}function Be(t){let e=0|(t=t.u)[Q];const n=De(t,e,1),r=pt(n,!0);return null!=r&&r!==n&&Ue(t,e,1,r),r}function Ge(){return void 0===wt?2:4}function Ve(t,e,n,r,i){const o=t.u,s=2&(t=0|o[Q])?1:r;i=!!i;let a=0|(r=ze(o,t,e))[Q];if(!(4&a)){4&a&&(r=ut(r),a=an(a,t),t=Ue(o,t,e,r));let i=0,s=0;for(;i<r.length;i++){const t=n(r[i]);null!=t&&(r[s++]=t)}s<i&&(r.length=s),a=We(a,t),n=-4097&(20|a),a=n&=-8193,rt(r,a),2&a&&Object.freeze(r)}return 1===s||4===s&&32&a?He(a)||(i=a,a|=2,a!==i&&rt(r,a),Object.freeze(r)):(2===s&&He(a)&&(r=ut(r),a=an(a,t),a=un(a,t,i),rt(r,a),t=Ue(o,t,e,r)),He(a)||(e=a,a=un(a,t,i),a!==e&&rt(r,a))),r}function ze(t,e,n,r){return t=De(t,e,n,r),Array.isArray(t)?t:ct}function We(t,e){return 0===t&&(t=an(t,e)),1|t}function He(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function qe(t){t=ut(t);for(let e=0;e<t.length;e++){const n=t[e]=ut(t[e]);Array.isArray(n[1])&&(n[1]=it(n[1]))}return t}function Xe(t,e,n,r){let i=0|(t=t.u)[Q];vt(i),Ue(t,i,e,("0"===r?0===Number(n):n===r)?void 0:n)}function $e(t,e,n,r,i){vt(e);var o=!(!(64&e)&&16384&e);const s=(i=ze(t,e,n,i))!==ct;if(o||!s){let a=o=s?0|i[Q]:0;(!s||2&a||He(a)||4&a&&!(32&a))&&(i=ut(i),a=an(a,e),e=Ue(t,e,n,i)),a=-13&We(a,e),a=un(r?-17&a:16|a,e,!0),a!==o&&rt(i,a)}return i}function Ke(t,e){var n=wo;return Ze(Ye(t=t.u),t,0|t[Q],n)===e?e:-1}function Ye(t){if(H)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),o=Ze(i,t,e,n);return o!==r&&(o&&(e=Ue(t,e,o)),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 o=r[t];null!=De(e,n,o)&&(0!==i&&(n=Ue(e,n,i)),i=o)}return t.set(r,i),i}function Qe(t,e,n,r){let i,o=0|t[Q];if(null!=(r=De(t,o,n,r))&&r.W===lt)return(e=Ce(r))!==r&&Ue(t,o,n,e),e.u;if(Array.isArray(r)){const t=0|r[Q];i=2&t?Oe(Le(r,t,!1),e,!0):64&t?r:Oe(i,e,!0)}else i=Oe(void 0,e,!0);return i!==r&&Ue(t,o,n,i),i}function tn(t,e,n,r){let i=0|(t=t.u)[Q];return(e=ce(r=De(t,i,n,r),e,!1,i))!==r&&null!=e&&Ue(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=Ce(e);i!==e&&Ue(t,r,n,e=i)}return e}function nn(t,e,n,r,i,o,s){t=t.u;var a=!!(2&e);const u=a?1:i;o=!!o,s&&=!a;var c=0|(i=ze(t,e,r))[Q];if(!(a=!!(4&c))){var l=i,h=e;const t=!!(2&(c=We(c,e)));t&&(h|=2);let r=!t,o=!0,s=0,a=0;for(;s<l.length;s++){const e=ce(l[s],n,!1,h);if(e instanceof n){if(!t){const t=!!(2&(0|e.u[Q]));r&&=!t,o&&=t}l[a++]=e}}a<s&&(l.length=a),c|=4,c=o?16|c:-17&c,rt(l,c=r?8|c:-9&c),t&&Object.freeze(l)}if(s&&!(8&c||!i.length&&(1===u||4===u&&32&c))){for(He(c)&&(i=ut(i),c=an(c,e),e=Ue(t,e,r,i)),n=i,s=c,l=0;l<n.length;l++)(c=n[l])!==(h=Ce(c))&&(n[l]=h);s|=8,rt(n,s=n.length?-17&s:16|s),c=s}return 1===u||4===u&&32&c?He(c)||(e=c,(c|=!i.length||16&c&&(!a||32&c)?2:2048)!==e&&rt(i,c),Object.freeze(i)):(2===u&&He(c)&&(rt(i=ut(i),c=un(c=an(c,e),e,o)),e=Ue(t,e,r,i)),He(c)||(r=c,(c=un(c,e,o))!==r&&rt(i,c))),i}function rn(t,e,n){const r=0|t.u[Q];return nn(t,r,e,n,Ge(),!1,!(2&r))}function on(t,e,n,r){return null==r&&(r=void 0),Ne(t,n,r)}function sn(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);Ue(t,i,e,r)}}function an(t,e){return-2049&(32|(2&e?2|t:-3&t))}function un(t,e,n){return 32&e&&n||(t&=-33),t}function cn(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 ln(t,e){return te(Fe(t,e))}function hn(t,e){return ue(Fe(t,e))}function fn(t,e){return je(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}`);Ne(t,e,n)}function pn(t,e,n){if(null!=n){if("number"!=typeof n)throw W("int32");if(!$t(n))throw W("int32");n|=0}Ne(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}`);Ne(t,e,n)}function mn(t,e,n){{const s=t.u;let a=0|s[Q];if(vt(a),null==n)Ue(s,a,e);else{var r=t=0|n[Q],i=He(t),o=i||Object.isFrozen(n);for(i||(t=0),o||(n=ut(n),r=0,t=un(t=an(t,a),a,!0),o=!1),t|=21,i=0;i<n.length;i++){const e=n[i],s=se(e);Object.is(e,s)||(o&&(n=ut(n),r=0,t=un(t=an(t,a),a,!0),o=!1),n[i]=s)}t!==r&&(o&&(n=ut(n),t=un(t=an(t,a),a,!0)),rt(n,t)),Ue(s,a,e,n)}}}function vn(t,e,n){vt(0|t.u[Q]),Ve(t,e,ue,2,!0).push(se(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 wn(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function bn(t){if("string"==typeof t)return{buffer:C(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===j)return{buffer:U(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,o=0;const s=t.h;let a=t.g;do{n=s[a++],r|=(127&n)<<o,o+=7}while(o<32&&128&n);for(o>32&&(i|=(127&n)>>4),o=3;o<32&&128&n;o+=7)n=s[a++],i|=(127&n)<<o;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 An(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 An(t)>>>0}function kn(t){var e=t.h;const n=t.g,r=e[n],i=e[n+1],o=e[n+2];return e=e[n+3],On(t,t.g+4),(r<<0|i<<8|o<<16|e<<24)>>>0}function xn(t){var e=kn(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 In(t){return An(t)}function Pn(t,e,{ba:n=!1}={}){t.ba=n,e&&(e=bn(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 wn(t.l,e)}function Mn(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 wn(e,t.l-n);return t.g=r,n}function Rn(t,e){if(0==e)return N();var n=Mn(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):Rt?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?N():new j(n,D)}ve.prototype.toJSON=void 0,ve.prototype.Ia=ht;var Ln=[];function Cn(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 Fn(t){switch(t.h){case 0:0!=t.h?Fn(t):Sn(t.g);break;case 1:On(t=t.g,t.g+8);break;case 2:if(2!=t.h)Fn(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(!Cn(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.m!=e)throw Error("Unmatched end-group tag");break}Fn(t)}break;default:throw yn(t.h,t.l)}}function Dn(t,e,n){const r=t.g.l,i=Tn(t.g),o=t.g.g+i;let s=o-r;if(s<=0&&(t.g.l=o,n(e,t,void 0,void 0,void 0),s=o-t.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-s} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=o,t.g.l=r,e}function Nn(t){var e=Tn(t.g),n=Mn(t=t.g,e);if(t=t.h,a){var u,c=t;(u=s)||(u=s=new TextDecoder("utf-8",{fatal:!0})),e=n+e,c=0===n&&e===c.length?c:c.subarray(n,e);try{var l=u.decode(c)}catch(t){if(void 0===o){try{u.decode(new Uint8Array([128]))}catch(t){}try{u.decode(new Uint8Array([97])),o=!0}catch(t){o=!1}}throw!o&&(s=void 0),t}}else{e=(l=n)+e,n=[];let o,s=null;for(;l<e;){var h=t[l++];h<128?n.push(h):h<224?l>=e?r():(o=t[l++],h<194||128!=(192&o)?(l--,r()):n.push((31&h)<<6|63&o)):h<240?l>=e-1?r():(o=t[l++],128!=(192&o)||224===h&&o<160||237===h&&o>=160||128!=(192&(u=t[l++]))?(l--,r()):n.push((15&h)<<12|(63&o)<<6|63&u)):h<=244?l>=e-2?r():(o=t[l++],128!=(192&o)||o-144+(h<<28)>>30!=0||128!=(192&(u=t[l++]))||128!=(192&(c=t[l++]))?(l--,r()):(h=(7&h)<<18|(63&o)<<12|(63&u)<<6|63&c,h-=65536,n.push(55296+(h>>10&1023),56320+(1023&h)))):r(),n.length>=8192&&(s=i(s,n),n.length=0)}l=i(s,n)}return l}function Un(t){const e=Tn(t.g);return Rn(t.g,e)}function jn(t,e,n){var r=Tn(t.g);for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var Bn=[];function Gn(t){return t}let Vn;function zn(t,e,n){e.g?e.m(t,e.g,e.h,n):e.m(t,e.h,n)}var Wn=class{constructor(t,e){this.u=Me(t,e)}toJSON(){const t=!Vn;try{return t&&(Vn=Pe),Hn(this)}finally{t&&(Vn=void 0)}}l(){var t=gs;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(Le(t,0|t[Q],!1))}N(){return!!(2&(0|this.u[Q]))}};function Hn(t){var e=t.u;{e=(t=Vn(e))!==e;let c=t.length;if(c){var n=t[c-1],r=dt(n);r?c--:n=void 0;var i=t;if(r){t:{var o,s=n,a=!1;if(s)for(let t in s)isNaN(+t)?(o??={})[t]=s[t]:(r=s[t],Array.isArray(r)&&(gt(r)||ft(r)&&0===r.size)&&(r=null),null==r&&(a=!0),null!=r&&((o??={})[t]=r));if(a||(o=s),o)for(let t in o){a=o;break t}a=null}s=null==a?null!=n:a!==n}for(;c>0&&(null==(o=i[c-1])||gt(o)||ft(o)&&0===o.size);c--)var u=!0;(i!==t||s||u)&&(e?(u||s||a)&&(i.length=c):i=Array.prototype.slice.call(i,0,c),a&&i.push(a)),u=i}else u=t}return u}function qn(t){return t?/^\d+$/.test(t)?(zt(t),new Xn(Ct,Ft)):null:$n||=new Xn(0,0)}Wn.prototype.W=lt,Wn.prototype.toString=function(){try{return Vn=Gn,Hn(this).toString()}finally{Vn=void 0}};var Xn=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let $n;function Kn(t){return t?/^-?\d+$/.test(t)?(zt(t),new Yn(Ct,Ft)):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 or(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 sr(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),or(t,e))}function ur(){const t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var cr=ur(),lr=ur(),hr=ur(),fr=ur(),dr=ur(),pr=ur(),gr=ur(),mr=ur(),vr=ur(),yr=class{constructor(t,e,n){this.g=t,this.h=e,t=cr,this.l=!!t&&n===t||!1}};function _r(t,e){return new yr(t,e,cr)}function wr(t,e,n,r,i){ar(t,n,Mr(e,r),i)}const br=_r((function(t,e,n,r,i){return 2===t.h&&(Dn(t,Qe(e,r,n),i),!0)}),wr),Er=_r((function(t,e,n,r,i){return 2===t.h&&(Dn(t,Qe(e,r,n,!0),i),!0)}),wr);var Sr=Symbol(),Ar=Symbol(),Tr=Symbol(),kr=Symbol();let xr,Ir;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 o=r[1];let s=1;o&&o.constructor===Object&&(i.ga=o,"function"==typeof(o=r[++s])&&(i.la=!0,xr??=o,Ir??=r[s+1],o=r[s+=2]));const a={};for(;o&&Array.isArray(o)&&o.length&&"number"==typeof o[0]&&o[0]>0;){for(var u=0;u<o.length;u++)a[o[u]]=o;o=r[++s]}for(u=1;void 0!==o;){let t;"number"==typeof o&&(u+=o,o=r[++s]);var c=void 0;if(o instanceof yr?t=o:(t=br,s--),t?.l){o=r[++s],c=r;var l=s;"function"==typeof o&&(o=o(),c[l]=o),c=o}for(l=u+1,"number"==typeof(o=r[++s])&&o<0&&(l-=o,o=r[++s]);u<l;u++){const r=a[u];c?n(i,u,t,c,r):e(i,u,t,r)}}return r[t]=i}function Or(t){return Array.isArray(t)?t[0]instanceof yr?t:[Er,t]:[t,void 0]}function Mr(t,e){return t instanceof Wn?t.u:Array.isArray(t)?Oe(t,e,!1):void 0}function Rr(t,e,n,r){const i=n.g;t[e]=r?(t,e,n)=>i(t,e,n,r):i}function Lr(t,e,n,r,i){const o=n.g;let s,a;t[e]=(t,e,n)=>o(t,e,n,a||=Pr(Ar,Rr,Lr,r).V,s||=Cr(r),i)}function Cr(t){let e=t[Tr];if(null!=e)return e;const n=Pr(Ar,Rr,Lr,t);return e=n.la?(t,e)=>xr(t,e,n):(t,e)=>{const r=0|t[Q];for(;Cn(e)&&4!=e.h;){var i=e.m,o=n[i];if(null==o){var s=n.ga;s&&(s=s[i])&&null!=(s=Fr(s))&&(o=n[i]=s)}null!=o&&o(e,t,i)||(i=(o=e).l,Fn(o),o.fa?o=void 0:(s=o.g.g-i,o.g.g=i,o=Rn(o.g,s)),i=t,o&&((s=i[Z])?s.push(o):i[Z]=[o]))}return 16384&r&&it(t),!0},t[Tr]=e}function Fr(t){const e=(t=Or(t))[0].g;if(t=t[1]){const n=Cr(t),r=Pr(Ar,Rr,Lr,t).V;return(t,i,o)=>e(t,i,o,r,n)}return e}function Dr(t,e,n){t[e]=n.h}function Nr(t,e,n,r){let i,o;const s=n.h;t[e]=(t,e,n)=>s(t,e,n,o||=Pr(Sr,Dr,Nr,r).V,i||=Ur(r))}function Ur(t){let e=t[kr];if(!e){const n=Pr(Sr,Dr,Nr,t);e=(t,e)=>jr(t,e,n),t[kr]=e}return e}function jr(t,e,n){for(var r=0|t[Q],i=512&r?0:-1,o=t.length,s=512&r?1:0,a=o+(256&r?-1:0);s<a;s++){const r=t[s];if(null==r)continue;const o=s-i,a=Br(n,o);a&&a(e,r,o)}if(256&r){r=t[o-1];for(const t in r)i=+t,Number.isNaN(i)||null!=(o=r[i])&&(a=Br(n,i))&&a(e,o,i)}if(t=_t(t))for(nr(e,e.g.end()),n=0;n<t.length;n++)nr(e,U(t[n])||new Uint8Array(0))}function Br(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=Ur(n),i=Pr(Sr,Dr,Nr,n).V;n=t.la?Ir(i,e):(t,n,o)=>r(t,n,o,i,e)}else n=r;return t[e]=n}}function Gr(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 Vr(t,e,n){return new yr(t,e,n)}function zr(t,e,n){return new yr(t,e,n)}function Wr(t,e,n){Ue(t,0|t[Q],e,n)}var Hr=_r((function(t,e,n,r,i){return 2===t.h&&(t=Dn(t,Oe([void 0,void 0],r,!0),i),vt(r=0|e[Q]),(i=De(e,r,n))instanceof ve?0!=(2&i.L)?((i=i.X()).push(t),Ue(e,r,n,i)):i.Na(t):Array.isArray(i)?(2&(0|i[Q])&&Ue(e,r,n,i=qe(i)),i.push(t)):Ue(e,r,n,[t]),!0)}),(function(t,e,n,r,i){if(e instanceof ve)e.forEach(((e,o)=>{ar(t,n,Oe([o,e],r,!1),i)}));else if(Array.isArray(e))for(let o=0;o<e.length;o++){const s=e[o];Array.isArray(s)&&ar(t,n,Oe(s,r,!1),i)}}));function qr(t,e,n){if(e=function(t){if(null==t)return t;const e=typeof t;if("bigint"===e)return String(Ht(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,Nt(e),Zn(t,Ct,Ft);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 Xr(t,e,n){null!=(e=te(e))&&null!=e&&(rr(t,n,0),tr(t.g,e))}function $r(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=ue(e))&&sr(t,n,l(e))}function Yr(t,e,n,r,i){ar(t,n,Mr(e,r),i)}function Jr(t,e,n){null!=(e=null==e||"string"==typeof e||F(e)||e instanceof j?e:void 0)&&sr(t,n,bn(e).buffer)}function Zr(t,e,n){return(5===t.h||2===t.h)&&(e=$e(e,0|e[Q],n,!1,!1),2==t.h?jn(t,xn,e):e.push(xn(t.g)),!0)}var Qr=Vr((function(t,e,n){if(1!==t.h)return!1;var r=t.g;t=kn(r);const i=kn(r);r=2*(i>>31)+1;const o=i>>>20&2047;return t=4294967296*(1048575&i)+t,Wr(e,n,2047==o?t?NaN:r*(1/0):0==o?5e-324*r*t:r*Math.pow(2,o-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=Yt(e))&&(rr(t,n,1),t=t.g,(n=Lt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),Ct=n.getUint32(0,!0),Ft=n.getUint32(4,!0),er(t,Ct),er(t,Ft))}),ur()),ti=Vr((function(t,e,n){return 5===t.h&&(Wr(e,n,xn(t.g)),!0)}),(function(t,e,n){null!=(e=Yt(e))&&(rr(t,n,5),t=t.g,Ut(e),er(t,Ct))}),gr),ei=zr(Zr,(function(t,e,n){if(null!=(e=Gr(Yt,e)))for(let s=0;s<e.length;s++){var r=t,i=n,o=e[s];null!=o&&(rr(r,i,5),r=r.g,Ut(o),er(r,Ct))}}),gr),ni=zr(Zr,(function(t,e,n){if(null!=(e=Gr(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,Ut(e[r]),er(n,Ct)}}),gr),ri=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,En(t.g,Bt)),!0)}),qr,pr),ii=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,0===(t=En(t.g,Bt))?void 0:t),!0)}),qr,pr),oi=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,En(t.g,jt)),!0)}),(function(t,e,n){if(null!=(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(qt(64,t));if(Qt(t)){if("string"===e)return e=Kt(Number(t)),Xt(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),ne(t)||(zt(t),t=Gt(Ct,Ft))),t;if("number"===e)return(t=Kt(t))>=0&&Xt(t)?t:function(t){if(t<0){Nt(t);var e=Gt(Ct,Ft);return t=Number(e),Xt(t)?t:e}return ne(e=String(t))?e:(Nt(t),jt(Ct,Ft))}(t)}}(e))&&("string"==typeof e&&qn(e),null!=e))switch(rr(t,n,0),typeof e){case"number":t=t.g,Nt(e),Zn(t,Ct,Ft);break;case"bigint":n=BigInt.asUintN(64,e),n=new Xn(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Zn(t.g,n.h,n.g);break;default:n=qn(e),Zn(t.g,n.h,n.g)}}),ur()),si=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,An(t.g)),!0)}),Xr,fr),ai=zr((function(t,e,n){return(0===t.h||2===t.h)&&(e=$e(e,0|e[Q],n,!1,!1),2==t.h?jn(t,An,e):e.push(An(t.g)),!0)}),(function(t,e,n){if(null!=(e=Gr(te,e))&&e.length){n=ir(t,n);for(let n=0;n<e.length;n++)tr(t.g,e[n]);or(t,n)}}),fr),ui=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,0===(t=An(t.g))?void 0:t),!0)}),Xr,fr),ci=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,Sn(t.g)),!0)}),$r,lr),li=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,!1===(t=Sn(t.g))?void 0:t),!0)}),$r,lr),hi=zr((function(t,e,n){return 2===t.h&&(t=Nn(t),$e(e,0|e[Q],n,!1).push(t),!0)}),(function(t,e,n){if(null!=(e=Gr(ue,e)))for(let s=0;s<e.length;s++){var r=t,i=n,o=e[s];null!=o&&sr(r,i,l(o))}}),hr),fi=Vr((function(t,e,n){return 2===t.h&&(Wr(e,n,""===(t=Nn(t))?void 0:t),!0)}),Kr,hr),di=Vr((function(t,e,n){return 2===t.h&&(Wr(e,n,Nn(t)),!0)}),Kr,hr),pi=function(t,e,n=cr){return new yr(t,e,n)}((function(t,e,n,r,i){return 2===t.h&&(r=Oe(void 0,r,!0),$e(e,0|e[Q],n,!0).push(r),Dn(t,r,i),!0)}),(function(t,e,n,r,i){if(Array.isArray(e))for(let o=0;o<e.length;o++)Yr(t,e[o],n,r,i)})),gi=_r((function(t,e,n,r,i,o){return 2===t.h&&(Je(e,0|e[Q],o,n),Dn(t,e=Qe(e,r,n),i),!0)}),Yr),mi=Vr((function(t,e,n){return 2===t.h&&(Wr(e,n,Un(t)),!0)}),Jr,mr),vi=zr((function(t,e,n){return(0===t.h||2===t.h)&&(e=$e(e,0|e[Q],n,!1,!1),2==t.h?jn(t,Tn,e):e.push(Tn(t.g)),!0)}),(function(t,e,n){if(null!=(e=Gr(ee,e)))for(let s=0;s<e.length;s++){var r=t,i=n,o=e[s];null!=o&&(rr(r,i,0),Qn(r.g,o))}}),dr),yi=Vr((function(t,e,n){return 0===t.h&&(Wr(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=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,An(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 wi{constructor(t,e){this.h=t,this.g=e,this.l=en,this.m=on,this.defaultValue=void 0}}function bi(t,e){return new wi(t,e)}function Ei(t,e){return(n,r)=>{if(Bn.length){const t=Bn.pop();t.o(r),Pn(t.g,n,r),n=t}else n=new class{constructor(t,e){if(Ln.length){const n=Ln.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,o=r.u;Cr(e)(o,n);var i=r}finally{n.g.clear(),n.m=-1,n.h=-1,Bn.length<100&&Bn.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}}}};jr(this.u,e,Pr(Sr,Dr,Nr,t)),nr(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,i=r.length;let o=0;for(let t=0;t<i;t++){const e=r[t];n.set(e,o),o+=e.length}return e.l=[n],n}}var Ai=class extends Wn{constructor(t){super(t)}},Ti=[0,fi,Vr((function(t,e,n){return 2===t.h&&(Wr(e,n,(t=Un(t))===N()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof Wn){const r=e.Ra;return void(r&&(e=r(e),null!=e&&sr(t,n,bn(e).buffer)))}if(Array.isArray(e))return}Jr(t,e,n)}),mr)];let ki,xi=globalThis.trustedTypes;function Ii(t){void 0===ki&&(ki=function(){let t=null;if(!xi)return t;try{const e=t=>t;t=xi.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}());var e=ki;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 Ii(t[0]);let n=t[0];for(let r=0;r<e.length;r++)n+=encodeURIComponent(e[r])+t[r+1];return Ii(n)}var Oi=[0,si,_i,ci,-1,ai,_i,-1],Mi=class extends Wn{constructor(t){super(t)}},Ri=[0,ci,di,ci,_i,-1,zr((function(t,e,n){return(0===t.h||2===t.h)&&(e=$e(e,0|e[Q],n,!1,!1),2==t.h?jn(t,In,e):e.push(An(t.g)),!0)}),(function(t,e,n){if(null!=(e=Gr(te,e))&&e.length){n=ir(t,n);for(let n=0;n<e.length;n++)tr(t.g,e[n]);or(t,n)}}),vr),di,-1,[0,ci,-1],_i,ci,-1],Li=[0,di,-2],Ci=class extends Wn{constructor(t){super(t)}},Fi=[0],Di=[0,si,ci,1,ci,-3],Ni=class extends Wn{constructor(t){super(t,2)}},Ui={};Ui[336783863]=[0,di,ci,-1,si,[0,[1,2,3,4,5,6,7,8],gi,Fi,gi,Ri,gi,Li,gi,Di,gi,Oi,gi,[0,di,-2],gi,[0,di,_i],gi,[0,_i,di]],[0,di],ci,[0,[1,3],[2,4],gi,[0,ai],-1,gi,[0,hi],-1,pi,[0,di,-1]],di];var ji=[0,ii,-1,li,-3,ii,ai,fi,ui,ii,-1,li,ui,li,-2,fi];function Bi(t,e){Xe(t,2,ae(e),"")}function Gi(t,e){vn(t,3,e)}function Vi(t,e){vn(t,4,e)}var zi=class extends Wn{constructor(t){super(t,500)}o(t){return on(this,0,7,t)}},Wi=[-1,{}],Hi=[0,di,1,Wi],qi=[0,di,hi,Wi];function Xi(t,e){cn(t,1,zi,e)}function $i(t,e){vn(t,10,e)}function Ki(t,e){vn(t,15,e)}var Yi=class extends Wn{constructor(t){super(t,500)}o(t){return on(this,0,1001,t)}},Ji=[-500,pi,[-500,fi,-1,hi,-3,[-2,Ui,ci],pi,Ti,ui,-1,Hi,qi,pi,[0,fi,li],fi,ji,ui,hi,987,hi],4,pi,[-500,di,-1,[-1,{}],998,di],pi,[-500,di,hi,-1,[-2,{},ci],997,hi,-1],ui,pi,[-500,di,hi,Wi,998,hi],hi,ui,Hi,qi,pi,[0,fi,-1,Wi],hi,-2,ji,fi,-1,li,[0,li,yi],978,Wi,pi,Ti];Yi.prototype.g=Si(Ji);var Zi=Ei(Yi,Ji),Qi=class extends Wn{constructor(t){super(t)}},to=class extends Wn{constructor(t){super(t)}g(){return rn(this,Qi,1)}},eo=[0,pi,[0,si,ti,di,-1]],no=Ei(to,eo),ro=class extends Wn{constructor(t){super(t)}},io=class extends Wn{constructor(t){super(t)}},oo=class extends Wn{constructor(t){super(t)}h(){return en(this,ro,2)}g(){return rn(this,io,5)}},so=Ei(class extends Wn{constructor(t){super(t)}},[0,hi,ai,ni,[0,_i,[0,si,-3],[0,ti,-3],[0,si,-1,[0,pi,[0,si,-2]]],pi,[0,ti,-1,di,ti]],di,-1,ri,pi,[0,si,ti],hi,ri]),ao=class extends Wn{constructor(t){super(t)}},uo=Ei(class extends Wn{constructor(t){super(t)}},[0,pi,[0,ti,-4]]),co=class extends Wn{constructor(t){super(t)}},lo=Ei(class extends Wn{constructor(t){super(t)}},[0,pi,[0,ti,-4]]),ho=class extends Wn{constructor(t){super(t)}},fo=[0,si,-1,ni,_i],po=class extends Wn{constructor(t){super(t)}};po.prototype.g=Si([0,ti,-4,ri]);var go=class extends Wn{constructor(t){super(t)}},mo=Ei(class extends Wn{constructor(t){super(t)}},[0,pi,[0,1,si,di,eo],ri]),vo=class extends Wn{constructor(t){super(t)}},yo=class extends Wn{constructor(t){super(t)}oa(){const t=Be(this);return null==t?N():t}},_o=class extends Wn{constructor(t){super(t)}},wo=[1,2],bo=Ei(class extends Wn{constructor(t){super(t)}},[0,pi,[0,wo,gi,[0,ni],gi,[0,mi],si,di],ri]),Eo=class extends Wn{constructor(t){super(t)}},So=[0,di,si,ti,hi,-1],Ao=class extends Wn{constructor(t){super(t)}},To=[0,ci,-1],ko=class extends Wn{constructor(t){super(t)}},xo=[1,2,3,4,5],Io=class extends Wn{constructor(t){super(t)}g(){return null!=Be(this)}h(){return null!=hn(this,2)}},Po=class extends Wn{constructor(t){super(t)}g(){return Jt(Fe(this,2))??!1}},Oo=[0,mi,di,[0,si,ri,-1],[0,oi,ri]],Mo=[0,Oo,ci,[0,xo,gi,Di,gi,Ri,gi,Oi,gi,Fi,gi,Li],_i],Ro=class extends Wn{constructor(t){super(t)}},Lo=[0,Mo,ti,-1,si],Co=bi(502141897,Ro);Ui[502141897]=Lo;var Fo=Ei(class extends Wn{constructor(t){super(t)}},[0,[0,_i,-1,ei,vi],fo]),Do=class extends Wn{constructor(t){super(t)}},No=class extends Wn{constructor(t){super(t)}},Uo=[0,Mo,ti,[0,Mo],ci],jo=[0,Mo,Lo,Uo,ti,[0,[0,Oo]]],Bo=bi(508968150,No);Ui[508968150]=jo,Ui[508968149]=Uo;var Go=class extends Wn{constructor(t){super(t)}},Vo=bi(513916220,Go);Ui[513916220]=[0,Mo,jo,si];var zo=class extends Wn{constructor(t){super(t)}h(){return en(this,Eo,2)}g(){Ne(this,2)}},Wo=[0,Mo,So];Ui[478825465]=Wo;var Ho=class extends Wn{constructor(t){super(t)}},qo=class extends Wn{constructor(t){super(t)}},Xo=class extends Wn{constructor(t){super(t)}},$o=class extends Wn{constructor(t){super(t)}},Ko=class extends Wn{constructor(t){super(t)}},Yo=[0,Mo,[0,Mo],Wo,-1],Jo=[0,Mo,ti,si],Zo=[0,Mo,ti],Qo=[0,Mo,Jo,Zo,ti],ts=bi(479097054,Ko);Ui[479097054]=[0,Mo,Qo,Yo],Ui[463370452]=Yo,Ui[464864288]=Jo;var es=bi(462713202,$o);Ui[462713202]=Qo,Ui[474472470]=Zo;var ns=class extends Wn{constructor(t){super(t)}},rs=class extends Wn{constructor(t){super(t)}},is=class extends Wn{constructor(t){super(t)}},os=class extends Wn{constructor(t){super(t)}},ss=[0,Mo,ti,-1,si],as=[0,Mo,ti,ci];os.prototype.g=Si([0,Mo,Zo,[0,Mo],Lo,Uo,ss,as]);var us=class extends Wn{constructor(t){super(t)}},cs=bi(456383383,us);Ui[456383383]=[0,Mo,So];var ls=class extends Wn{constructor(t){super(t)}},hs=bi(476348187,ls);Ui[476348187]=[0,Mo,To];var fs=class extends Wn{constructor(t){super(t)}},ds=class extends Wn{constructor(t){super(t)}},ps=[0,_i,-1],gs=bi(458105876,class extends Wn{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=ds;const i=2&e;let o=!1;if(null==n){if(i)return Ae();n=[]}else if(n.constructor===ve){if(0==(2&n.L)||i)return n;n=n.X()}else Array.isArray(n)?o=!!(2&(0|n[Q])):n=[];if(i){if(!n.length)return Ae();o||(o=!0,it(n))}else o&&(o=!1,n=qe(n));return o||(64&(0|n[Q])?n[Q]&=-33:32&e&&nt(n,32)),Ue(t,e,2,r=new ve(n,r,le,void 0)),r}(t,e,De(t,e,2)),!n&&ds&&(t.ra=!0),t}});Ui[458105876]=[0,ps,Hr,[!0,ri,[0,di,-1,hi]]];var ms=class extends Wn{constructor(t){super(t)}},vs=bi(458105758,ms);Ui[458105758]=[0,Mo,di,ps];var ys=class extends Wn{constructor(t){super(t)}},_s=bi(443442058,ys);Ui[443442058]=[0,Mo,di,si,ti,hi,-1,ci,ti],Ui[514774813]=ss;var ws=class extends Wn{constructor(t){super(t)}},bs=bi(516587230,ws);function Es(t,e){return e=e?e.clone():new Eo,void 0!==t.displayNamesLocale?Ne(e,1,ae(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Ne(e,1),void 0!==t.maxResults?pn(e,2,t.maxResults):"maxResults"in t&&Ne(e,2),void 0!==t.scoreThreshold?gn(e,3,t.scoreThreshold):"scoreThreshold"in t&&Ne(e,3),void 0!==t.categoryAllowlist?mn(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Ne(e,4),void 0!==t.categoryDenylist?mn(e,5,t.categoryDenylist):"categoryDenylist"in t&&Ne(e,5),e}function Ss(t,e=-1,n=""){return{categories:t.map((t=>({index:ln(t,1)??0??-1,score:fn(t,2)??0,categoryName:hn(t,3)??""??"",displayName:hn(t,4)??""??""}))),headIndex:e,headName:n}}function As(t){var e=Ve(t,3,Yt,Ge()),n=Ve(t,2,te,Ge()),r=Ve(t,1,ue,Ge()),i=Ve(t,9,ue,Ge());const o={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)o.categories.push({score:e[t],index:n[t]??-1,categoryName:r[t]??"",displayName:i[t]??""});if((e=en(t,oo,4)?.h())&&(o.boundingBox={originX:ln(e,1)??0,originY:ln(e,2)??0,width:ln(e,3)??0,height:ln(e,4)??0,angle:0}),en(t,oo,4)?.g().length)for(const e of en(t,oo,4).g())o.keypoints.push({x:je(e,1)??0,y:je(e,2)??0,score:je(e,4)??0,label:hn(e,3)??""});return o}function Ts(t){const e=[];for(const n of rn(t,co,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 ks(t){const e=[];for(const n of rn(t,ao,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 xs(t){return Array.from(t,(t=>t>127?t-256:t))}function Is(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 o=0;o<t.length;o++)n+=t[o]*e[o],r+=t[o]*t[o],i+=e[o]*e[o];if(r<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let Ps;Ui[516587230]=[0,Mo,ss,as,ti],Ui[518928384]=as;const Os=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 Ms(){if(void 0===Ps)try{await WebAssembly.instantiate(Os),Ps=!0}catch{Ps=!1}return Ps}async function Rs(t,e=Pi``){const n=await Ms()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Ls=class{};function Cs(){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 Fs(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 Ds(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 Ns(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 Us(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]=Ds(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 js(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 Bs(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function Gs(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 Vs(t,e){const n=en(t.baseOptions,Io,1)||new Io;"string"==typeof e?(Ne(n,2,ae(e)),Ne(n,1)):e instanceof Uint8Array&&(Ne(n,1,pt(e,!1)),Ne(n,2)),on(t.baseOptions,0,1,n)}function zs(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 Ws(t,e){t.B=Math.max(t.B,e)}function Hs(t,e){t.A=new zi,Bi(t.A,"PassThroughCalculator"),Gi(t.A,"free_memory"),Vi(t.A,"free_memory_unused_out"),$i(e,"free_memory"),Xi(e,t.A)}function qs(t,e){Gi(t.A,e),Vi(t.A,e+"_unused_out")}function Xs(t){t.g.addBoolToStream(!0,"free_memory",t.B)}Ls.forVisionTasks=function(t){return Rs("vision",t)},Ls.forTextTasks=function(t){return Rs("text",t)},Ls.forGenAiExperimentalTasks=function(t){return Rs("genai_experimental",t)},Ls.forGenAiTasks=function(t){return Rs("genai",t)},Ls.forAudioTasks=function(t){return Rs("audio",t)},Ls.isSimdSupported=function(){return Ms()};var $s=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,Io,1)?.g()||en(this.baseOptions,Io,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,ko,3);if(!n){var r=n=new ko,i=new Ci;sn(r,4,xo,i)}"delegate"in e&&("GPU"===e.delegate?(e=n,r=new Mi,sn(e,2,xo,r)):(e=n,r=new Ci,sn(e,4,xo,r))),on(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),Vs(this,"/model.dat"),this.m(),this.I()}));if(e.modelAssetBuffer instanceof Uint8Array)Vs(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=>{Vs(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,zs(this)}finishProcessing(){this.g.finishProcessing(),zs(this)}close(){this.A=void 0,this.g.closeGraph()}};function Ks(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}$s.prototype.close=$s.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",$s);class Ys{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 Js(t,e,n){const r=t.g;if(n=Ks(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 Zs(t,e){const n=t.g,r=Ks(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(r);const i=Ks(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 o=Ks(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,o),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 Ys(n,r,i,o)}function Qs(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 Qs(t,e),t.h||(t.m(),t.C()),n?(t.s||(t.s=Zs(t,!0)),n=t.s):(t.v||(t.v=Zs(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 Qs(t,e),t=Ks(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){Qs(t,e),t.A||(t.A=Ks(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=Ks(t.createProgram(),"Failed to create WebGL program"),this.aa=Js(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=Js(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()}},oa=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=Ks(t.getUniformLocation(this.h,"backgroundTexture"),"Uniform location"),this.T=Ks(t.getUniformLocation(this.h,"colorMappingTexture"),"Uniform location"),this.J=Ks(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()}},sa=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=Ks(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.K=Ks(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.H=Ks(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 ua(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=la(t);var n=fa(t);if(na(n,r,ca(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 ca(t){let e=aa(t,2);if(!e){const n=la(t);e=da(t);const r=ua(t),i=ha(t);n.texImage2D(n.TEXTURE_2D,0,i,t.width,t.height,0,n.RED,n.FLOAT,r),pa(t)}return e}function la(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=Ks(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function ha(t){if(t=la(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=la(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,o,s){this.g=t,this.m=e,this.j=n,this.canvas=r,this.l=i,this.width=o,this.height=s,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=ua(this),t=new Uint8Array(t.map((t=>255*t))),this.g.push(t)),t;var t}ha(){return ua(this)}M(){return ca(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=la(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=ha(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&&la(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 wa(t,e){return t instanceof Function?t(e):t}function ba(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 Aa(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 oa),t.g}(t),o=Sa(t),s=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;ta(i,o,!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 o=i;var n=e.next();if(n.done)return!1;const[s,a]=n.value;if(n=a,t!==s||o[0]!==n[0]||o[1]!==n[1]||o[2]!==n[2]||o[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,s,r),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),o.drawArrays(o.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 ka(t,e,n,r){const i=Sa(t),o=function(t){return t.h||(t.h=new sa),t.h}(t),s=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n,a=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;ta(o,i,!0,(()=>{var t=o.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,o.j),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,s),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,o.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=o.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 xa=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 o of t)n.fillStyle=wa(e.fillColor,{index:i,from:o}),n.strokeStyle=wa(e.color,{index:i,from:o}),n.lineWidth=wa(e.lineWidth,{index:i,from:o}),(t=new Path2D).arc(o.x*r.width,o.y*r.height,wa(e.radius,{index:i,from:o}),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,o=0;for(const s of e){r.beginPath(),e=t[s.start];const a=t[s.end];e&&a&&(r.strokeStyle=wa(n.color,{index:o,from:e,to:a}),r.lineWidth=wa(n.lineWidth,{index:o,from:e,to:a}),r.moveTo(e.x*i.width,e.y*i.height),r.lineTo(a.x*i.width,a.y*i.height)),++o,r.stroke()}r.restore()}}ua(t,e){const n=Ea(this);e=_a(e),n.save(),n.beginPath(),n.lineWidth=wa(e.lineWidth,{}),n.strokeStyle=wa(e.color,{}),n.fillStyle=wa(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);Aa(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);Aa(t,e,(e=>{ka(t,e,n,r),(e=Ea(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)}))}(this,t,e,n):ka(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 Ia(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=Ia(t,0);if(!e){e=Ma(t);const n=Ra(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=Ia(t,2);if(!e){const n=Ma(t);e=La(t);const r=Ia(t,1)||Pa(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Ca(t)}return e}function Ma(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=Ks(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Ra(t){return t.l||(t.l=new ia),t.l}function La(t){const e=Ma(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Ia(t,2);return n||(n=ea(Ra(t),e),t.g.push(n),t.m=!0),e.bindTexture(e.TEXTURE_2D,n),n}function Ca(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function Fa(t){const e=Ma(t);return ta(Ra(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()}))))}xa.prototype.close=xa.prototype.close,xa.prototype.drawConfidenceMask=xa.prototype.wa,xa.prototype.drawCategoryMask=xa.prototype.va,xa.prototype.drawBoundingBox=xa.prototype.ua,xa.prototype.drawConnectors=xa.prototype.xa,xa.prototype.drawLandmarks=xa.prototype.ya,xa.lerp=function(t,e,n,r,i){return ba(r*(1-(t-e)/(n-e))+i*(1-(n-t)/(n-e)),r,i)},xa.clamp=ba;var Da=class{constructor(t,e,n,r,i,o,s){this.g=t,this.j=e,this.m=n,this.canvas=r,this.l=i,this.width=o,this.height=s,(this.j||this.m)&&0==--Na&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ea(){return!!Ia(this,0)}ka(){return!!Ia(this,1)}P(){return!!Ia(this,2)}Ca(){return Pa(this)}Ba(){var t=Ia(this,1);return t||(Oa(this),La(this),t=Fa(this),Ca(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=Ma(this),e=Ra(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,(()=>{La(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Ca(this)})),ra(e),Ca(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);Oa(this),La(this),n=Fa(this),Ca(this)}t.push(n)}return new Da(t,this.ka(),this.P(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ia(this,1).close(),this.m&&Ma(this).deleteTexture(Ia(this,2)),Na=-1}};Da.prototype.close=Da.prototype.close,Da.prototype.clone=Da.prototype.clone,Da.prototype.getAsWebGLTexture=Da.prototype.M,Da.prototype.getAsImageBitmap=Da.prototype.Ba,Da.prototype.getAsImageData=Da.prototype.Ca,Da.prototype.hasWebGLTexture=Da.prototype.P,Da.prototype.hasImageBitmap=Da.prototype.ka,Da.prototype.hasImageData=Da.prototype.Ea;var Na=250;function Ua(...t){return t.map((([t,e])=>({start:t,end:e})))}const ja=function(t){return class extends t{La(){this.i._registerModelResourcesGraphService()}}}((Ba=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:Cs()?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?'),Ns(this,r||"input_audio",(r=>{Ns(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){Bs(this,"__graph_config__",(e=>{t(e)})),Ns(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 o=4*t.length;this.h!==o&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(o),this.h=o),this.i.HEAPF32.set(t,this.g/4),Ns(this,r,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){Ns(this,e,(e=>{const[r,i]=Us(this,t,e);this.i._addBoundTextureToStream(e,r,i,n)}))}addBoolToStream(t,e,n){Ns(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){Ns(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){Ns(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){Ns(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addUintToStream(t,e,n){Ns(this,e,(e=>{this.i._addUintToInputStream(t,e,n)}))}addStringToStream(t,e,n){Ns(this,e,(e=>{Ns(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){Ns(this,e,(e=>{js(this,Object.keys(t),(r=>{js(this,Object.values(t),(i=>{this.i._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){Ns(this,n,(n=>{Ns(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){Ns(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){Ns(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){Ns(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){Ns(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){Ns(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){Ns(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){Ns(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)Ns(this,e,(t=>{this.i._addStringVectorEntry(r,t)}));this.i._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){Ns(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){Ns(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){Ns(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){Ns(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addUintToInputSidePacket(t,e){Ns(this,e,(e=>{this.i._addUintToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){Ns(this,e,(e=>{Ns(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){Ns(this,n,(n=>{Ns(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){Ns(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){Ns(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){Ns(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){Ns(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){Ns(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){Ns(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)Ns(this,e,(t=>{this.i._addStringVectorEntry(n,t)}));this.i._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachUintListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachUintListener(t)}))}attachUintVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachUintVectorListener(t)}))}attachDoubleListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){Gs(this,t,e),Ns(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?'),Bs(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),Ns(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 Ba{get ea(){return this.i}qa(t,e,n){Ns(this,e,(e=>{const[r,i]=Us(this,t,e);this.ea._addBoundTextureAsImageToStream(e,r,i,n)}))}U(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.ea._attachImageListener(t)}))}ca(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.ea._attachImageVectorListener(t)}))}}));var Ba,Ga=class extends ja{};async function Va(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 Fs(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await Fs(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??(Cs()?void 0:document.createElement("canvas")),e,n)}function za(t,e,n,r){if(t.T){const o=new po;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(o,1,(i.left+i.right)/2),gn(o,2,(i.top+i.bottom)/2),gn(o,4,i.right-i.left),gn(o,3,i.bottom-i.top)}else gn(o,1,.5),gn(o,2,.5),gn(o,4,1),gn(o,3,1);if(n?.rotationDegrees){if(n?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(gn(o,5,-Math.PI*n.rotationDegrees/180),n?.rotationDegrees%180!=0){const[t,r]=Ds(e);n=fn(o,3)*r/t,i=fn(o,4)*t/r,gn(o,4,n),gn(o,3,i)}}t.g.addProtoToStream(o.g(),"mediapipe.NormalizedRect",t.T,r)}t.g.qa(e,t.aa,r??performance.now()),t.finishProcessing()}function Wa(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");za(t,e,n,t.B+1)}function Ha(t,e,n,r){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");za(t,e,n,r)}function qa(t,e,n,r){var i=e.data;const o=e.width,s=o*(e=e.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==s)throw Error("Unsupported channel count: "+i.length/s);return t=new ma([i],n,!1,t.g.i.canvas,t.O,o,e),r?t.clone():t}var Xa=class extends $s{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()}};Xa.prototype.close=Xa.prototype.close;var $a=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},on(t=this.h=new Ro,0,1,e=new Po),gn(this.h,2,.5),gn(this.h,3,.3)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(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:[]},Wa(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},Ha(this,t,n,e),this.j}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect_in"),Ki(t,"detections");const e=new Ni;zn(e,Co,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect_in"),Vi(n,"DETECTIONS:detections"),n.o(e),Xi(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=so(e),this.j.detections.push(As(t));Ws(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};$a.prototype.detectForVideo=$a.prototype.F,$a.prototype.detect=$a.prototype.D,$a.prototype.setOptions=$a.prototype.o,$a.createFromModelPath=async function(t,e){return Va($a,t,{baseOptions:{modelAssetPath:e}})},$a.createFromModelBuffer=function(t,e){return Va($a,t,{baseOptions:{modelAssetBuffer:e}})},$a.createFromOptions=function(t,e){return Va($a,t,e)};var Ka=Ua([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=Ua([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=Ua([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Za=Ua([474,475],[475,476],[476,477],[477,474]),Qa=Ua([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]),tu=Ua([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),eu=Ua([469,470],[470,471],[471,472],[472,469]),nu=Ua([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]),ru=[...Ka,...Ya,...Ja,...Qa,...tu,...nu],iu=Ua([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 ou(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var su=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,on(t=this.h=new No,0,1,e=new Po),this.v=new Do,on(this.h,0,3,this.v),this.s=new Ro,on(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,Po,1)}set baseOptions(t){on(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 ou(this),Wa(this,t,e),this.j}F(t,e,n){return ou(this),Ha(this,t,n,e),this.j}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"face_landmarks");const e=new Ni;zn(e,Bo,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),Xi(t,n),this.g.attachProtoVectorListener("face_landmarks",((t,e)=>{for(const e of t)t=lo(e),this.j.faceLandmarks.push(Ts(t));Ws(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{Ws(this,t)})),this.outputFaceBlendshapes&&(Ki(t,"blendshapes"),Vi(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((t,e)=>{if(this.outputFaceBlendshapes)for(const e of t)t=no(e),this.j.faceBlendshapes.push(Ss(t.g()??[]));Ws(this,e)})),this.g.attachEmptyPacketListener("blendshapes",(t=>{Ws(this,t)}))),this.outputFacialTransformationMatrixes&&(Ki(t,"face_geometry"),Vi(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((t,e)=>{if(this.outputFacialTransformationMatrixes)for(const e of t)(t=en(Fo(e),ho,2))&&this.j.facialTransformationMatrixes.push({rows:ln(t,1)??0??0,columns:ln(t,2)??0??0,data:Ve(t,3,Yt,Ge()).slice()??[]});Ws(this,e)})),this.g.attachEmptyPacketListener("face_geometry",(t=>{Ws(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};su.prototype.detectForVideo=su.prototype.F,su.prototype.detect=su.prototype.D,su.prototype.setOptions=su.prototype.o,su.createFromModelPath=function(t,e){return Va(su,t,{baseOptions:{modelAssetPath:e}})},su.createFromModelBuffer=function(t,e){return Va(su,t,{baseOptions:{modelAssetBuffer:e}})},su.createFromOptions=function(t,e){return Va(su,t,e)},su.FACE_LANDMARKS_LIPS=Ka,su.FACE_LANDMARKS_LEFT_EYE=Ya,su.FACE_LANDMARKS_LEFT_EYEBROW=Ja,su.FACE_LANDMARKS_LEFT_IRIS=Za,su.FACE_LANDMARKS_RIGHT_EYE=Qa,su.FACE_LANDMARKS_RIGHT_EYEBROW=tu,su.FACE_LANDMARKS_RIGHT_IRIS=eu,su.FACE_LANDMARKS_FACE_OVAL=nu,su.FACE_LANDMARKS_CONTOURS=ru,su.FACE_LANDMARKS_TESSELATION=iu;var au=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!0),on(t=this.j=new Go,0,1,e=new Po)}get baseOptions(){return en(this.j,Po,1)}set baseOptions(t){on(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,Wa(this,t,r??{}),!this.h)return this.s}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"stylized_image");const e=new Ni;zn(e,Vo,this.j);const n=new zi;Bi(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),Xi(t,n),this.g.U("stylized_image",((t,e)=>{var n=!this.h,r=t.data,i=t.width;const o=i*(t=t.height);if(r instanceof Uint8Array)if(r.length===3*o){const e=new Uint8ClampedArray(4*o);for(let t=0;t<o;++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*o)throw Error("Unsupported channel count: "+r.length/o);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 Da([r],!1,!1,this.g.i.canvas,this.O,i,t),this.s=n=n?i.clone():i,this.h&&this.h(n),Ws(this,e)})),this.g.attachEmptyPacketListener("stylized_image",(t=>{this.s=null,this.h&&this.h(null),Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};au.prototype.stylize=au.prototype.Oa,au.prototype.setOptions=au.prototype.o,au.createFromModelPath=function(t,e){return Va(au,t,{baseOptions:{modelAssetPath:e}})},au.createFromModelBuffer=function(t,e){return Va(au,t,{baseOptions:{modelAssetBuffer:e}})},au.createFromOptions=function(t,e){return Va(au,t,e)};var uu=Ua([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 cu(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function lu(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 hu(t,e=!0){const n=[];for(const i of t){var r=no(i);t=[];for(const n of r.g())r=e&&null!=ln(n,1)?ln(n,1)??0:-1,t.push({score:fn(n,2)??0,index:r,categoryName:hn(n,3)??""??"",displayName:hn(n,4)??""??""});n.push(t)}return n}var fu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],on(t=this.j=new Ko,0,1,e=new Po),this.s=new $o,on(this.j,0,2,this.s),this.C=new Xo,on(this.s,0,3,this.C),this.v=new qo,on(this.s,0,2,this.v),this.h=new Ho,on(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,Po,1)}set baseOptions(t){on(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 zo,n=e,r=Es(t.cannedGesturesClassifierOptions,en(this.h,zo,3)?.h());on(n,0,2,r),on(this.h,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&en(this.h,zo,3)?.g();return t.customGesturesClassifierOptions?(on(n=e=new zo,0,2,r=Es(t.customGesturesClassifierOptions,en(this.h,zo,4)?.h())),on(this.h,0,4,e)):void 0===t.customGesturesClassifierOptions&&en(this.h,zo,4)?.g(),this.l(t)}Ja(t,e){return cu(this),Wa(this,t,e),lu(this)}Ka(t,e,n){return cu(this),Ha(this,t,n,e),lu(this)}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"hand_gestures"),Ki(t,"hand_landmarks"),Ki(t,"world_hand_landmarks"),Ki(t,"handedness");const e=new Ni;zn(e,ts,this.j);const n=new zi;Bi(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"HAND_GESTURES:hand_gestures"),Vi(n,"LANDMARKS:hand_landmarks"),Vi(n,"WORLD_LANDMARKS:world_hand_landmarks"),Vi(n,"HANDEDNESS:handedness"),n.o(e),Xi(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t){t=lo(e);const n=[];for(const e of rn(t,co,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)}Ws(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t){t=uo(e);const n=[];for(const e of rn(t,ao,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)}Ws(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoVectorListener("hand_gestures",((t,e)=>{this.gestures.push(...hu(t,!1)),Ws(this,e)})),this.g.attachEmptyPacketListener("hand_gestures",(t=>{Ws(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{this.handedness.push(...hu(t)),Ws(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function du(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}fu.prototype.recognizeForVideo=fu.prototype.Ka,fu.prototype.recognize=fu.prototype.Ja,fu.prototype.setOptions=fu.prototype.o,fu.createFromModelPath=function(t,e){return Va(fu,t,{baseOptions:{modelAssetPath:e}})},fu.createFromModelBuffer=function(t,e){return Va(fu,t,{baseOptions:{modelAssetBuffer:e}})},fu.createFromOptions=function(t,e){return Va(fu,t,e)},fu.HAND_CONNECTIONS=uu;var pu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],on(t=this.h=new $o,0,1,e=new Po),this.s=new Xo,on(this.h,0,3,this.s),this.j=new qo,on(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,Po,1)}set baseOptions(t){on(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=[],Wa(this,t,e),du(this)}F(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Ha(this,t,n,e),du(this)}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"hand_landmarks"),Ki(t,"world_hand_landmarks"),Ki(t,"handedness");const e=new Ni;zn(e,es,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"LANDMARKS:hand_landmarks"),Vi(n,"WORLD_LANDMARKS:world_hand_landmarks"),Vi(n,"HANDEDNESS:handedness"),n.o(e),Xi(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t)t=lo(e),this.landmarks.push(Ts(t));Ws(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t)t=uo(e),this.worldLandmarks.push(ks(t));Ws(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{var n=this.handedness,r=n.push;const i=[];for(const e of t){t=no(e);const n=[];for(const e of t.g())n.push({score:fn(e,2)??0,index:ln(e,1)??0??-1,categoryName:hn(e,3)??""??"",displayName:hn(e,4)??""??""});i.push(n)}r.call(n,...i),Ws(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};pu.prototype.detectForVideo=pu.prototype.F,pu.prototype.detect=pu.prototype.D,pu.prototype.setOptions=pu.prototype.o,pu.createFromModelPath=function(t,e){return Va(pu,t,{baseOptions:{modelAssetPath:e}})},pu.createFromModelBuffer=function(t,e){return Va(pu,t,{baseOptions:{modelAssetBuffer:e}})},pu.createFromOptions=function(t,e){return Va(pu,t,e)},pu.HAND_CONNECTIONS=uu;var gu=Ua([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 mu(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function vu(t){try{if(!t.C)return t.h;t.C(t.h)}finally{Xs(t)}}function yu(t,e){t=lo(t),e.push(Ts(t))}var _u=class extends Xa{constructor(t,e){super(new Ga(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,on(t=this.j=new os,0,1,e=new Po),this.J=new Xo,on(this.j,0,2,this.J),this.Z=new ns,on(this.j,0,3,this.Z),this.s=new Ro,on(this.j,0,4,this.s),this.H=new Do,on(this.j,0,5,this.H),this.v=new rs,on(this.j,0,6,this.v),this.K=new is,on(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,Po,1)}set baseOptions(t){on(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,mu(this),Wa(this,t,r),vu(this)}F(t,e,n,r){const i="function"!=typeof n?n:{};return this.C="function"==typeof n?n:r,mu(this),Ha(this,t,i,e),vu(this)}m(){var t=new Yi;$i(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 Ni,n=new Ai;Xe(n,1,ae("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(t,e){if(null!=e)if(Array.isArray(e))Ne(t,2,Pe(e));else{if(!("string"==typeof e||e instanceof j||F(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");Xe(t,2,pt(e,!1),N())}}(n,this.j.g());const r=new zi;Bi(r,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),cn(r,8,Ai,n),Gi(r,"IMAGE:input_frames_image"),Vi(r,"POSE_LANDMARKS:pose_landmarks"),Vi(r,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),Vi(r,"FACE_LANDMARKS:face_landmarks"),Vi(r,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),Vi(r,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),Vi(r,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),Vi(r,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),r.o(e),Xi(t,r),Hs(this,t),this.g.attachProtoListener("pose_landmarks",((t,e)=>{yu(t,this.h.poseLandmarks),Ws(this,e)})),this.g.attachEmptyPacketListener("pose_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoListener("pose_world_landmarks",((t,e)=>{var n=this.h.poseWorldLandmarks;t=uo(t),n.push(ks(t)),Ws(this,e)})),this.g.attachEmptyPacketListener("pose_world_landmarks",(t=>{Ws(this,t)})),this.outputPoseSegmentationMasks&&(Vi(r,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),qs(this,"pose_segmentation_mask"),this.g.U("pose_segmentation_mask",((t,e)=>{this.h.poseSegmentationMasks=[qa(this,t,!0,!this.C)],Ws(this,e)})),this.g.attachEmptyPacketListener("pose_segmentation_mask",(t=>{this.h.poseSegmentationMasks=[],Ws(this,t)}))),this.g.attachProtoListener("face_landmarks",((t,e)=>{yu(t,this.h.faceLandmarks),Ws(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{Ws(this,t)})),this.outputFaceBlendshapes&&(Ki(t,"extra_blendshapes"),Vi(r,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",((t,e)=>{var n=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(t=no(t),n.push(Ss(t.g()??[]))),Ws(this,e)})),this.g.attachEmptyPacketListener("extra_blendshapes",(t=>{Ws(this,t)}))),this.g.attachProtoListener("left_hand_landmarks",((t,e)=>{yu(t,this.h.leftHandLandmarks),Ws(this,e)})),this.g.attachEmptyPacketListener("left_hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoListener("left_hand_world_landmarks",((t,e)=>{var n=this.h.leftHandWorldLandmarks;t=uo(t),n.push(ks(t)),Ws(this,e)})),this.g.attachEmptyPacketListener("left_hand_world_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoListener("right_hand_landmarks",((t,e)=>{yu(t,this.h.rightHandLandmarks),Ws(this,e)})),this.g.attachEmptyPacketListener("right_hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoListener("right_hand_world_landmarks",((t,e)=>{var n=this.h.rightHandWorldLandmarks;t=uo(t),n.push(ks(t)),Ws(this,e)})),this.g.attachEmptyPacketListener("right_hand_world_landmarks",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};_u.prototype.detectForVideo=_u.prototype.F,_u.prototype.detect=_u.prototype.D,_u.prototype.setOptions=_u.prototype.o,_u.createFromModelPath=function(t,e){return Va(_u,t,{baseOptions:{modelAssetPath:e}})},_u.createFromModelBuffer=function(t,e){return Va(_u,t,{baseOptions:{modelAssetBuffer:e}})},_u.createFromOptions=function(t,e){return Va(_u,t,e)},_u.HAND_CONNECTIONS=uu,_u.POSE_CONNECTIONS=gu,_u.FACE_LANDMARKS_LIPS=Ka,_u.FACE_LANDMARKS_LEFT_EYE=Ya,_u.FACE_LANDMARKS_LEFT_EYEBROW=Ja,_u.FACE_LANDMARKS_LEFT_IRIS=Za,_u.FACE_LANDMARKS_RIGHT_EYE=Qa,_u.FACE_LANDMARKS_RIGHT_EYEBROW=tu,_u.FACE_LANDMARKS_RIGHT_IRIS=eu,_u.FACE_LANDMARKS_FACE_OVAL=nu,_u.FACE_LANDMARKS_CONTOURS=ru,_u.FACE_LANDMARKS_TESSELATION=iu;var wu=class extends Xa{constructor(t,e){super(new Ga(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},on(t=this.h=new us,0,1,e=new Po)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return on(this.h,0,2,Es(t,en(this.h,Eo,2))),this.l(t)}sa(t,e){return this.j={classifications:[]},Wa(this,t,e),this.j}ta(t,e,n){return this.j={classifications:[]},Ha(this,t,n,e),this.j}m(){var t=new Yi;$i(t,"input_image"),$i(t,"norm_rect"),Ki(t,"classifications");const e=new Ni;zn(e,cs,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),Gi(n,"IMAGE:input_image"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"CLASSIFICATIONS:classifications"),n.o(e),Xi(t,n),this.g.attachProtoListener("classifications",((t,e)=>{this.j=function(t){const e={classifications:rn(t,go,1).map((t=>Ss(en(t,to,4)?.g()??[],ln(t,2)??0,hn(t,3)??"")))};return null!=oe(Fe(t,2))&&(e.timestampMs=oe(Fe(t,2))??0),e}(mo(t)),Ws(this,e)})),this.g.attachEmptyPacketListener("classifications",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};wu.prototype.classifyForVideo=wu.prototype.ta,wu.prototype.classify=wu.prototype.sa,wu.prototype.setOptions=wu.prototype.o,wu.createFromModelPath=function(t,e){return Va(wu,t,{baseOptions:{modelAssetPath:e}})},wu.createFromModelBuffer=function(t,e){return Va(wu,t,{baseOptions:{modelAssetBuffer:e}})},wu.createFromOptions=function(t,e){return Va(wu,t,e)};var bu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!0),this.h=new ls,this.embeddings={embeddings:[]},on(t=this.h,0,1,e=new Po)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){var e=this.h,n=en(this.h,Ao,2);return n=n?n.clone():new Ao,void 0!==t.l2Normalize?dn(n,1,t.l2Normalize):"l2Normalize"in t&&Ne(n,1),void 0!==t.quantize?dn(n,2,t.quantize):"quantize"in t&&Ne(n,2),on(e,0,2,n),this.l(t)}za(t,e){return Wa(this,t,e),this.embeddings}Aa(t,e,n){return Ha(this,t,n,e),this.embeddings}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"embeddings_out");const e=new Ni;zn(e,hs,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"EMBEDDINGS:embeddings_out"),n.o(e),Xi(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=bo(t),this.embeddings=function(t){return{embeddings:rn(t,_o,1).map((t=>{const e={headIndex:ln(t,3)??0??-1,headName:hn(t,4)??""??""};if(void 0!==tn(t,vo,Ke(t,1)))t=Ve(t=en(t,vo,Ke(t,1)),1,Yt,Ge()),e.floatEmbedding=t.slice();else{const n=new Uint8Array(0);e.quantizedEmbedding=en(t,yo,Ke(t,2))?.oa()?.h()??n}return e})),timestampMs:oe(Fe(t,2))??0}}(t),Ws(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};bu.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=Is(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=Is(xs(t.quantizedEmbedding),xs(e.quantizedEmbedding))}return t},bu.prototype.embedForVideo=bu.prototype.Aa,bu.prototype.embed=bu.prototype.za,bu.prototype.setOptions=bu.prototype.o,bu.createFromModelPath=function(t,e){return Va(bu,t,{baseOptions:{modelAssetPath:e}})},bu.createFromModelBuffer=function(t,e){return Va(bu,t,{baseOptions:{modelAssetBuffer:e}})},bu.createFromOptions=function(t,e){return Va(bu,t,e)};var Eu=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 Su(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Au(t){try{const e=new Eu(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{Xs(t)}}Eu.prototype.close=Eu.prototype.close;var Tu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ms,this.v=new fs,on(this.h,0,3,this.v),on(t=this.h,0,1,e=new Po)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Ne(this.h,2,ae(t.displayNamesLocale)):"displayNamesLocale"in t&&Ne(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(),zi,1).filter((t=>(hn(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],Ni,7)?.l()?.g()??new Map).forEach(((e,n)=>{t.s[Number(n)]=hn(e,1)??""}))}(this)}segment(t,e,n){const r="function"!=typeof e?e:{};return this.j="function"==typeof e?e:n,Su(this),Wa(this,t,r),Au(this)}Ma(t,e,n,r){const i="function"!=typeof n?n:{};return this.j="function"==typeof n?n:r,Su(this),Ha(this,t,i,e),Au(this)}Da(){return this.s}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect");const e=new Ni;zn(e,vs,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),n.o(e),Xi(t,n),Hs(this,t),this.outputConfidenceMasks&&(Ki(t,"confidence_masks"),Vi(n,"CONFIDENCE_MASKS:confidence_masks"),qs(this,"confidence_masks"),this.g.ca("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>qa(this,t,!0,!this.j))),Ws(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],Ws(this,t)}))),this.outputCategoryMask&&(Ki(t,"category_mask"),Vi(n,"CATEGORY_MASK:category_mask"),qs(this,"category_mask"),this.g.U("category_mask",((t,e)=>{this.categoryMask=qa(this,t,!1,!this.j),Ws(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,Ws(this,t)}))),Ki(t,"quality_scores"),Vi(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,Ws(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Tu.prototype.getLabels=Tu.prototype.Da,Tu.prototype.segmentForVideo=Tu.prototype.Ma,Tu.prototype.segment=Tu.prototype.segment,Tu.prototype.setOptions=Tu.prototype.o,Tu.createFromModelPath=function(t,e){return Va(Tu,t,{baseOptions:{modelAssetPath:e}})},Tu.createFromModelBuffer=function(t,e){return Va(Tu,t,{baseOptions:{modelAssetBuffer:e}})},Tu.createFromOptions=function(t,e){return Va(Tu,t,e)};var ku=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};ku.prototype.close=ku.prototype.close;var xu=class extends Wn{constructor(t){super(t)}},Iu=[0,si,-2],Pu=[0,Qr,-3,ci,Qr,-1],Ou=[0,Pu],Mu=[0,Pu,si,-1],Ru=class extends Wn{constructor(t){super(t)}},Lu=[0,Qr,-1,ci],Cu=class extends Wn{constructor(t){super(t)}},Fu=class extends Wn{constructor(t){super(t)}},Du=[1,2,3,4,5,6,7,8,9,10,14,15],Nu=class extends Wn{constructor(t){super(t)}};Nu.prototype.g=Si([0,pi,[0,Du,gi,Pu,gi,[0,Pu,Iu],gi,Ou,gi,[0,Ou,Iu],gi,Lu,gi,[0,Qr,-3,ci,_i],gi,[0,Qr,-3,ci],gi,[0,di,Qr,-2,ci,si,ci,-1,2,Qr,Iu],gi,Mu,gi,[0,Mu,Iu],Qr,Iu,di,gi,[0,Qr,-3,ci,Iu,-1],gi,[0,pi,Lu]],di,[0,di,si,-1,ci]]);var Uu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ms,this.s=new fs,on(this.h,0,3,this.s),on(t=this.h,0,1,e=new Po)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(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 Nu;const o=new Fu;var s=new xu;if(pn(s,1,255),on(o,0,12,s),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new Ru;dn(a,3,!0),gn(a,1,e.keypoint.x),gn(a,2,e.keypoint.y),sn(o,5,Du,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(s=new Cu,e.scribble))dn(e=new Ru,3,!0),gn(e,1,a.x),gn(e,2,a.y),cn(s,1,Ru,e);sn(o,15,Du,s)}cn(r,1,Fu,o),this.g.addProtoToStream(r.g(),"drishti.RenderData","roi_in",n),Wa(this,t,i);t:{try{const t=new ku(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var u=t;break t}this.j(t)}finally{Xs(this)}u=void 0}return u}m(){var t=new Yi;$i(t,"image_in"),$i(t,"roi_in"),$i(t,"norm_rect_in");const e=new Ni;zn(e,vs,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"ROI:roi_in"),Gi(n,"NORM_RECT:norm_rect_in"),n.o(e),Xi(t,n),Hs(this,t),this.outputConfidenceMasks&&(Ki(t,"confidence_masks"),Vi(n,"CONFIDENCE_MASKS:confidence_masks"),qs(this,"confidence_masks"),this.g.ca("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>qa(this,t,!0,!this.j))),Ws(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],Ws(this,t)}))),this.outputCategoryMask&&(Ki(t,"category_mask"),Vi(n,"CATEGORY_MASK:category_mask"),qs(this,"category_mask"),this.g.U("category_mask",((t,e)=>{this.categoryMask=qa(this,t,!1,!this.j),Ws(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,Ws(this,t)}))),Ki(t,"quality_scores"),Vi(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,Ws(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Uu.prototype.segment=Uu.prototype.segment,Uu.prototype.setOptions=Uu.prototype.o,Uu.createFromModelPath=function(t,e){return Va(Uu,t,{baseOptions:{modelAssetPath:e}})},Uu.createFromModelBuffer=function(t,e){return Va(Uu,t,{baseOptions:{modelAssetBuffer:e}})},Uu.createFromOptions=function(t,e){return Va(Uu,t,e)};var ju=class extends Xa{constructor(t,e){super(new Ga(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},on(t=this.h=new ys,0,1,e=new Po)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Ne(this.h,2,ae(t.displayNamesLocale)):"displayNamesLocale"in t&&Ne(this.h,2),void 0!==t.maxResults?pn(this.h,3,t.maxResults):"maxResults"in t&&Ne(this.h,3),void 0!==t.scoreThreshold?gn(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&Ne(this.h,4),void 0!==t.categoryAllowlist?mn(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&Ne(this.h,5),void 0!==t.categoryDenylist?mn(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&Ne(this.h,6),this.l(t)}D(t,e){return this.j={detections:[]},Wa(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},Ha(this,t,n,e),this.j}m(){var t=new Yi;$i(t,"input_frame_gpu"),$i(t,"norm_rect"),Ki(t,"detections");const e=new Ni;zn(e,_s,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),Gi(n,"IMAGE:input_frame_gpu"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"DETECTIONS:detections"),n.o(e),Xi(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=so(e),this.j.detections.push(As(t));Ws(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ju.prototype.detectForVideo=ju.prototype.F,ju.prototype.detect=ju.prototype.D,ju.prototype.setOptions=ju.prototype.o,ju.createFromModelPath=async function(t,e){return Va(ju,t,{baseOptions:{modelAssetPath:e}})},ju.createFromModelBuffer=function(t,e){return Va(ju,t,{baseOptions:{modelAssetBuffer:e}})},ju.createFromOptions=function(t,e){return Va(ju,t,e)};var Bu=class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=n}close(){this.segmentationMasks?.forEach((t=>{t.close()}))}};function Gu(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Vu(t){try{const e=new Bu(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.s)return e;t.s(e)}finally{Xs(t)}}Bu.prototype.close=Bu.prototype.close;var zu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,on(t=this.h=new ws,0,1,e=new Po),this.v=new is,on(this.h,0,3,this.v),this.j=new rs,on(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,Po,1)}set baseOptions(t){on(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,Gu(this),Wa(this,t,r),Vu(this)}F(t,e,n,r){const i="function"!=typeof n?n:{};return this.s="function"==typeof n?n:r,Gu(this),Ha(this,t,i,e),Vu(this)}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"normalized_landmarks"),Ki(t,"world_landmarks"),Ki(t,"segmentation_masks");const e=new Ni;zn(e,bs,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"NORM_LANDMARKS:normalized_landmarks"),Vi(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),Xi(t,n),Hs(this,t),this.g.attachProtoVectorListener("normalized_landmarks",((t,e)=>{this.landmarks=[];for(const e of t)t=lo(e),this.landmarks.push(Ts(t));Ws(this,e)})),this.g.attachEmptyPacketListener("normalized_landmarks",(t=>{this.landmarks=[],Ws(this,t)})),this.g.attachProtoVectorListener("world_landmarks",((t,e)=>{this.worldLandmarks=[];for(const e of t)t=uo(e),this.worldLandmarks.push(ks(t));Ws(this,e)})),this.g.attachEmptyPacketListener("world_landmarks",(t=>{this.worldLandmarks=[],Ws(this,t)})),this.outputSegmentationMasks&&(Vi(n,"SEGMENTATION_MASK:segmentation_masks"),qs(this,"segmentation_masks"),this.g.ca("segmentation_masks",((t,e)=>{this.segmentationMasks=t.map((t=>qa(this,t,!0,!this.s))),Ws(this,e)})),this.g.attachEmptyPacketListener("segmentation_masks",(t=>{this.segmentationMasks=[],Ws(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};zu.prototype.detectForVideo=zu.prototype.F,zu.prototype.detect=zu.prototype.D,zu.prototype.setOptions=zu.prototype.o,zu.createFromModelPath=function(t,e){return Va(zu,t,{baseOptions:{modelAssetPath:e}})},zu.createFromModelBuffer=function(t,e){return Va(zu,t,{baseOptions:{modelAssetBuffer:e}})},zu.createFromOptions=function(t,e){return Va(zu,t,e)},zu.POSE_CONNECTIONS=gu,e.DrawingUtils=xa,e.FaceDetector=$a,e.FaceLandmarker=su,e.FaceStylizer=au,e.FilesetResolver=Ls,e.GestureRecognizer=fu,e.HandLandmarker=pu,e.HolisticLandmarker=_u,e.ImageClassifier=wu,e.ImageEmbedder=bu,e.ImageSegmenter=Tu,e.ImageSegmenterResult=Eu,e.InteractiveSegmenter=Uu,e.InteractiveSegmenterResult=ku,e.MPImage=Da,e.MPMask=ma,e.ObjectDetector=ju,e.PoseLandmarker=zu,e.VisionTaskRunner=Xa},593: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 o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return 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.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(432)})()}));
|
|
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={669:(t,e,n)=>{t.exports=n(609)},448:(t,e,n)=>{"use strict";var r=n(867),i=n(26),o=n(372),s=n(327),a=n(97),u=n(109),c=n(985),l=n(61);t.exports=function(t){return new Promise((function(e,n){var h=t.data,f=t.headers,d=t.responseType;r.isFormData(h)&&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?u(p.getAllResponseHeaders()):null,o={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,o),p=null}}if(p.open(t.method.toUpperCase(),s(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(l("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(l("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var _=(t.withCredentials||c(v))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;_&&(f[t.xsrfHeaderName]=_)}"setRequestHeader"in p&&r.forEach(f,(function(t,e){void 0===h&&"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)})),h||(h=null),p.send(h)}))}},609:(t,e,n)=>{"use strict";var r=n(867),i=n(849),o=n(321),s=n(185);function a(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=a(n(655));u.Axios=o,u.create=function(t){return a(s(u.defaults,t))},u.Cancel=n(263),u.CancelToken=n(972),u.isCancel=n(502),u.all=function(t){return Promise.all(t)},u.spread=n(713),u.isAxiosError=n(268),t.exports=u,t.exports.default=u},263: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},972:(t,e,n)=>{"use strict";var r=n(263);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},502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(867),i=n(327),o=n(782),s=n(572),a=n(185),u=n(875),c=u.validators;function l(t){this.defaults=t,this.interceptors={request:new o,response:new o}}l.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&&u.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.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,o=[];if(this.interceptors.response.forEach((function(t){o.push(t.fulfilled,t.rejected)})),!r){var l=[s,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(o),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var h=t;n.length;){var f=n.shift(),d=n.shift();try{h=f(h)}catch(t){d(t);break}}try{i=s(h)}catch(t){return Promise.reject(t)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},l.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){l.prototype[t]=function(e,n){return this.request(a(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(a(r||{},{method:t,url:e,data:n}))}})),t.exports=l},782:(t,e,n)=>{"use strict";var r=n(867);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},97:(t,e,n)=>{"use strict";var r=n(793),i=n(303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},61:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,i,o){var s=new Error(t);return r(s,e,n,i,o)}},572:(t,e,n)=>{"use strict";var r=n(867),i=n(527),o=n(502),s=n(655);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||s.adapter)(t).then((function(e){return a(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(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}},185:(t,e,n)=>{"use strict";var r=n(867);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["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 u(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 c(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=u(void 0,e[t]))})),r.forEach(o,c),r.forEach(s,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(void 0,e[i])})),r.forEach(a,(function(r){r in e?n[r]=u(t[r],e[r]):r in t&&(n[r]=u(void 0,t[r]))}));var l=i.concat(o).concat(s).concat(a),h=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===l.indexOf(t)}));return r.forEach(h,c),n}},26:(t,e,n)=>{"use strict";var r=n(61);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)}},527:(t,e,n)=>{"use strict";var r=n(867),i=n(655);t.exports=function(t,e,n){var o=this||i;return r.forEach(n,(function(n){t=n.call(o,t,e)})),t}},655:(t,e,n)=>{"use strict";var r=n(867),i=n(16),o=n(481),s={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(448)),u),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,s=!n&&"json"===this.responseType;if(s||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(s){if("SyntaxError"===t.name)throw o(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){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(s)})),t.exports=c},849: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)}}},327:(t,e,n)=>{"use strict";var r=n(867);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 o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var s=[];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)),s.push(i(e)+"="+i(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},372:(t,e,n)=>{"use strict";var r=n(867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,s){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(o)&&a.push("domain="+o),!0===s&&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(){}}},793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},985:(t,e,n)=>{"use strict";var r=n(867);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}},16:(t,e,n)=>{"use strict";var r=n(867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},109:(t,e,n)=>{"use strict";var r=n(867),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,o,s={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},875:(t,e,n)=>{"use strict";var r=n(593),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 o={},s=r.version.split(".");function a(t,e){for(var n=e?e.split("."):s,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 s(t,e){return"[Axios v"+r.version+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,a){if(!1===t)throw new Error(s(r," has been removed in "+e));return i&&!o[r]&&(o[r]=!0,console.warn(s(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 o=r[i],s=e[o];if(s){var a=t[o],u=void 0===a||s(a,o,t);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},867:(t,e,n)=>{"use strict";var r=n(849),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function s(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(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:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(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:u,isUndefined:s,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:c,isStream:function(t){return a(t)&&c(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:l,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(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}}},486:function(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,h=9007199254740991,f=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",_="[object Error]",w="[object Function]",b="[object GeneratorFunction]",E="[object Map]",S="[object Number]",A="[object Object]",T="[object Promise]",k="[object RegExp]",x="[object Set]",I="[object String]",P="[object Symbol]",O="[object WeakMap]",M="[object ArrayBuffer]",R="[object DataView]",L="[object Float32Array]",C="[object Float64Array]",F="[object Int8Array]",D="[object Int16Array]",N="[object Int32Array]",U="[object Uint8Array]",j="[object Uint8ClampedArray]",B="[object Uint16Array]",G="[object Uint32Array]",V=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,X=RegExp(H.source),$=RegExp(q.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+/,ot=/\s+$/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/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=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,bt="\\ud800-\\udfff",Et="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",At="a-z\\xdf-\\xf6\\xf8-\\xff",Tt="A-Z\\xc0-\\xd6\\xd8-\\xde",kt="\\ufe0e\\ufe0f",xt="\\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",It="["+bt+"]",Pt="["+xt+"]",Ot="["+Et+"]",Mt="\\d+",Rt="["+St+"]",Lt="["+At+"]",Ct="[^"+bt+xt+Mt+St+At+Tt+"]",Ft="\\ud83c[\\udffb-\\udfff]",Dt="[^"+bt+"]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ut="[\\ud800-\\udbff][\\udc00-\\udfff]",jt="["+Tt+"]",Bt="\\u200d",Gt="(?:"+Lt+"|"+Ct+")",Vt="(?:"+jt+"|"+Ct+")",zt="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ht="(?:"+Ot+"|"+Ft+")?",qt="["+kt+"]?",Xt=qt+Ht+"(?:"+Bt+"(?:"+[Dt,Nt,Ut].join("|")+")"+qt+Ht+")*",$t="(?:"+[Rt,Nt,Ut].join("|")+")"+Xt,Kt="(?:"+[Dt+Ot+"?",Ot,Nt,Ut,It].join("|")+")",Yt=RegExp("['’]","g"),Jt=RegExp(Ot,"g"),Zt=RegExp(Ft+"(?="+Ft+")|"+Kt+Xt,"g"),Qt=RegExp([jt+"?"+Lt+"+"+zt+"(?="+[Pt,jt,"$"].join("|")+")",Vt+"+"+Wt+"(?="+[Pt,jt+Gt,"$"].join("|")+")",jt+"?"+Gt+"+"+zt,jt+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mt,$t].join("|"),"g"),te=RegExp("["+Bt+bt+Et+kt+"]"),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[L]=ie[C]=ie[F]=ie[D]=ie[N]=ie[U]=ie[j]=ie[B]=ie[G]=!0,ie[g]=ie[m]=ie[M]=ie[v]=ie[R]=ie[y]=ie[_]=ie[w]=ie[E]=ie[S]=ie[A]=ie[k]=ie[x]=ie[I]=ie[O]=!1;var oe={};oe[g]=oe[m]=oe[M]=oe[R]=oe[v]=oe[y]=oe[L]=oe[C]=oe[F]=oe[D]=oe[N]=oe[E]=oe[S]=oe[A]=oe[k]=oe[x]=oe[I]=oe[P]=oe[U]=oe[j]=oe[B]=oe[G]=!0,oe[_]=oe[w]=oe[O]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,ce="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,le="object"==typeof self&&self&&self.Object===Object&&self,he=ce||le||Function("return this")(),fe=e&&!e.nodeType&&e,de=fe&&t&&!t.nodeType&&t,pe=de&&de.exports===fe,ge=pe&&ce.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,we=me&&me.isRegExp,be=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 Ae(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(r,s,n(s),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 ke(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function xe(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 Ie(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function Pe(t,e){return!(null==t||!t.length)&&je(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 Me(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 Re(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Le(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Ce(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 Fe(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 De=ze("length");function Ne(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Ue(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function je(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):Ue(t,Ge,n)}function Be(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Ge(t){return t!=t}function Ve(t,e){var n=null==t?0:t.length;return n?qe(t,e)/n:f}function ze(t){return function(e){return null==e?i:e[t]}}function We(t){return function(e){return null==t?i:t[e]}}function He(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function qe(t,e){for(var n,r=-1,o=t.length;++r<o;){var s=e(t[r]);s!==i&&(n=n===i?s:n+s)}return n}function Xe(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function $e(t){return function(e){return t(e)}}function Ke(t,e){return Me(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&&je(e,t[n],0)>-1;);return n}function Ze(t,e){for(var n=t.length;n--&&je(e,t[n],0)>-1;);return n}var Qe=We({À:"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=We({"&":"&","<":"<",">":">",'"':""","'":"'"});function en(t){return"\\"+se[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 on(t,e){return function(n){return t(e(n))}}function sn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n];s!==e&&s!==a||(t[n]=a,o[i++]=n)}return o}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function cn(t){return nn(t)?function(t){for(var e=Zt.lastIndex=0;Zt.test(t);)++e;return e}(t):De(t)}function ln(t){return nn(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.split("")}(t)}var hn=We({"&":"&","<":"<",">":">",""":'"',"'":"'"}),fn=function t(e){var n,r=(e=null==e?he:fn.defaults(he.Object(),e,fn.pick(he,ne))).Array,bt=e.Date,Et=e.Error,St=e.Function,At=e.Math,Tt=e.Object,kt=e.RegExp,xt=e.String,It=e.TypeError,Pt=r.prototype,Ot=St.prototype,Mt=Tt.prototype,Rt=e["__core-js_shared__"],Lt=Ot.toString,Ct=Mt.hasOwnProperty,Ft=0,Dt=(n=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Nt=Mt.toString,Ut=Lt.call(Tt),jt=he._,Bt=kt("^"+Lt.call(Ct).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gt=pe?e.Buffer:i,Vt=e.Symbol,zt=e.Uint8Array,Wt=Gt?Gt.allocUnsafe:i,Ht=on(Tt.getPrototypeOf,Tt),qt=Tt.create,Xt=Mt.propertyIsEnumerable,$t=Pt.splice,Kt=Vt?Vt.isConcatSpreadable:i,Zt=Vt?Vt.iterator:i,te=Vt?Vt.toStringTag:i,se=function(){try{var t=ao(Tt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ce=e.clearTimeout!==he.clearTimeout&&e.clearTimeout,le=bt&&bt.now!==he.Date.now&&bt.now,fe=e.setTimeout!==he.setTimeout&&e.setTimeout,de=At.ceil,ge=At.floor,me=Tt.getOwnPropertySymbols,De=Gt?Gt.isBuffer:i,We=e.isFinite,dn=Pt.join,pn=on(Tt.keys,Tt),gn=At.max,mn=At.min,vn=bt.now,yn=e.parseInt,_n=At.random,wn=Pt.reverse,bn=ao(e,"DataView"),En=ao(e,"Map"),Sn=ao(e,"Promise"),An=ao(e,"Set"),Tn=ao(e,"WeakMap"),kn=ao(Tt,"create"),xn=Tn&&new Tn,In={},Pn=Do(bn),On=Do(En),Mn=Do(Sn),Rn=Do(An),Ln=Do(Tn),Cn=Vt?Vt.prototype:i,Fn=Cn?Cn.valueOf:i,Dn=Cn?Cn.toString:i;function Nn(t){if(Qs(t)&&!Vs(t)&&!(t instanceof Gn)){if(t instanceof Bn)return t;if(Ct.call(t,"__wrapped__"))return No(t)}return new Bn(t)}var Un=function(){function t(){}return function(e){if(!Zs(e))return{};if(qt)return qt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function jn(){}function Bn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Gn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vn(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 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 Hn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Wn;++e<n;)this.add(t[e])}function qn(t){var e=this.__data__=new zn(t);this.size=e.size}function Xn(t,e){var n=Vs(t),r=!n&&Gs(t),i=!n&&!r&&qs(t),o=!n&&!r&&!i&&aa(t),s=n||r||i||o,a=s?Xe(t.length,xt):[],u=a.length;for(var c in t)!e&&!Ct.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||go(c,u))||a.push(c);return a}function $n(t){var e=t.length;return e?t[Wr(0,e-1)]:i}function Kn(t,e){return Mo(Ti(t),ir(e,0,t.length))}function Yn(t){return Mo(Ti(t))}function Jn(t,e,n){(n!==i&&!Us(t[e],n)||n===i&&!(e in t))&&nr(t,e,n)}function Zn(t,e,n){var r=t[e];Ct.call(t,e)&&Us(r,n)&&(n!==i||e in t)||nr(t,e,n)}function Qn(t,e){for(var n=t.length;n--;)if(Us(t[n][0],e))return n;return-1}function tr(t,e,n,r){return cr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function er(t,e){return t&&ki(e,Pa(e),t)}function nr(t,e,n){"__proto__"==e&&se?se(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function rr(t,e){for(var n=-1,o=e.length,s=r(o),a=null==t;++n<o;)s[n]=a?i:Aa(t,e[n]);return s}function ir(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function or(t,e,n,r,o,s){var a,u=1&e,c=2&e,l=4&e;if(n&&(a=o?n(t,r,o,s):n(t)),a!==i)return a;if(!Zs(t))return t;var h=Vs(t);if(h){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Ct.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Ti(t,a)}else{var f=lo(t),d=f==w||f==b;if(qs(t))return _i(t,u);if(f==A||f==g||d&&!o){if(a=c||d?{}:fo(t),!u)return c?function(t,e){return ki(t,co(t),e)}(t,function(t,e){return t&&ki(e,Oa(e),t)}(a,t)):function(t,e){return ki(t,uo(t),e)}(t,er(a,t))}else{if(!oe[f])return o?t:{};a=function(t,e,n){var r,i=t.constructor;switch(e){case M:return wi(t);case v:case y:return new i(+t);case R:return function(t,e){var n=e?wi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case L:case C:case F:case D:case N:case U:case j:case B:case G:return bi(t,n);case E:return new i;case S:case I:return new i(t);case k:return function(t){var e=new t.constructor(t.source,ft.exec(t));return e.lastIndex=t.lastIndex,e}(t);case x:return new i;case P:return r=t,Fn?Tt(Fn.call(r)):{}}}(t,f,u)}}s||(s=new qn);var p=s.get(t);if(p)return p;s.set(t,a),ia(t)?t.forEach((function(r){a.add(or(r,e,n,r,t,s))})):ta(t)&&t.forEach((function(r,i){a.set(i,or(r,e,n,i,t,s))}));var m=h?i:(l?c?to:Qi:c?Oa:Pa)(t);return Te(m||t,(function(r,i){m&&(r=t[i=r]),Zn(a,i,or(r,e,n,i,t,s))})),a}function sr(t,e,n){var r=n.length;if(null==t)return!r;for(t=Tt(t);r--;){var o=n[r],s=e[o],a=t[o];if(a===i&&!(o in t)||!s(a))return!1}return!0}function ar(t,e,n){if("function"!=typeof t)throw new It(o);return xo((function(){t.apply(i,n)}),e)}function ur(t,e,n,r){var i=-1,o=Pe,s=!0,a=t.length,u=[],c=e.length;if(!a)return u;n&&(e=Me(e,$e(n))),r?(o=Oe,s=!1):e.length>=200&&(o=Ye,s=!1,e=new Hn(e));t:for(;++i<a;){var l=t[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,s&&h==h){for(var f=c;f--;)if(e[f]===h)continue t;u.push(l)}else o(e,h,r)||u.push(l)}return u}Nn.templateSettings={escape:K,evaluate:Y,interpolate:J,variable:"",imports:{_:Nn}},Nn.prototype=jn.prototype,Nn.prototype.constructor=Nn,Bn.prototype=Un(jn.prototype),Bn.prototype.constructor=Bn,Gn.prototype=Un(jn.prototype),Gn.prototype.constructor=Gn,Vn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},Vn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Vn.prototype.get=function(t){var e=this.__data__;if(kn){var n=e[t];return n===s?i:n}return Ct.call(e,t)?e[t]:i},Vn.prototype.has=function(t){var e=this.__data__;return kn?e[t]!==i:Ct.call(e,t)},Vn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=kn&&e===i?s:e,this},zn.prototype.clear=function(){this.__data__=[],this.size=0},zn.prototype.delete=function(t){var e=this.__data__,n=Qn(e,t);return!(n<0||(n==e.length-1?e.pop():$t.call(e,n,1),--this.size,0))},zn.prototype.get=function(t){var e=this.__data__,n=Qn(e,t);return n<0?i:e[n][1]},zn.prototype.has=function(t){return Qn(this.__data__,t)>-1},zn.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},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(En||zn),string:new Vn}},Wn.prototype.delete=function(t){var e=oo(this,t).delete(t);return this.size-=e?1:0,e},Wn.prototype.get=function(t){return oo(this,t).get(t)},Wn.prototype.has=function(t){return oo(this,t).has(t)},Wn.prototype.set=function(t,e){var n=oo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(t){return this.__data__.set(t,s),this},Hn.prototype.has=function(t){return this.__data__.has(t)},qn.prototype.clear=function(){this.__data__=new zn,this.size=0},qn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},qn.prototype.get=function(t){return this.__data__.get(t)},qn.prototype.has=function(t){return this.__data__.has(t)},qn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof zn){var r=n.__data__;if(!En||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(t,e),this.size=n.size,this};var cr=Pi(vr),lr=Pi(yr,!0);function hr(t,e){var n=!0;return cr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function fr(t,e,n){for(var r=-1,o=t.length;++r<o;){var s=t[r],a=e(s);if(null!=a&&(u===i?a==a&&!sa(a):n(a,u)))var u=a,c=s}return c}function dr(t,e){var n=[];return cr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function pr(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=po),i||(i=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?pr(a,e-1,n,r,i):Re(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 Ie(e,(function(e){return Ks(t[e])}))}function wr(t,e){for(var n=0,r=(e=gi(e,t)).length;null!=t&&n<r;)t=t[Fo(e[n++])];return n&&n==r?t:i}function br(t,e,n){var r=e(t);return Vs(t)?r:Re(r,n(t))}function Er(t){return null==t?t===i?"[object Undefined]":"[object Null]":te&&te in Tt(t)?function(t){var e=Ct.call(t,te),n=t[te];try{t[te]=i;var r=!0}catch(t){}var o=Nt.call(t);return r&&(e?t[te]=n:delete t[te]),o}(t):function(t){return Nt.call(t)}(t)}function Sr(t,e){return t>e}function Ar(t,e){return null!=t&&Ct.call(t,e)}function Tr(t,e){return null!=t&&e in Tt(t)}function kr(t,e,n){for(var o=n?Oe:Pe,s=t[0].length,a=t.length,u=a,c=r(a),l=1/0,h=[];u--;){var f=t[u];u&&e&&(f=Me(f,$e(e))),l=mn(f.length,l),c[u]=!n&&(e||s>=120&&f.length>=120)?new Hn(u&&f):i}f=t[0];var d=-1,p=c[0];t:for(;++d<s&&h.length<l;){var g=f[d],m=e?e(g):g;if(g=n||0!==g?g:0,!(p?Ye(p,m):o(h,m,n))){for(u=a;--u;){var v=c[u];if(!(v?Ye(v,m):o(t[u],m,n)))continue t}p&&p.push(m),h.push(g)}}return h}function xr(t,e,n){var r=null==(t=Ao(t,e=gi(e,t)))?t:t[Fo($o(e))];return null==r?i:Se(r,t,n)}function Ir(t){return Qs(t)&&Er(t)==g}function Pr(t,e,n,r,o){return t===e||(null==t||null==e||!Qs(t)&&!Qs(e)?t!=t&&e!=e:function(t,e,n,r,o,s){var a=Vs(t),u=Vs(e),c=a?m:lo(t),l=u?m:lo(e),h=(c=c==g?A:c)==A,f=(l=l==g?A:l)==A,d=c==l;if(d&&qs(t)){if(!qs(e))return!1;a=!0,h=!1}if(d&&!h)return s||(s=new qn),a||aa(t)?Ji(t,e,n,r,o,s):function(t,e,n,r,i,o,s){switch(n){case R:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M:return!(t.byteLength!=e.byteLength||!o(new zt(t),new zt(e)));case v:case y:case S:return Us(+t,+e);case _:return t.name==e.name&&t.message==e.message;case k:case I:return t==e+"";case E:var a=rn;case x:var u=1&r;if(a||(a=an),t.size!=e.size&&!u)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var l=Ji(a(t),a(e),r,i,o,s);return s.delete(t),l;case P:if(Fn)return Fn.call(t)==Fn.call(e)}return!1}(t,e,c,n,r,o,s);if(!(1&n)){var p=h&&Ct.call(t,"__wrapped__"),w=f&&Ct.call(e,"__wrapped__");if(p||w){var b=p?t.value():t,T=w?e.value():e;return s||(s=new qn),o(b,T,n,r,s)}}return!!d&&(s||(s=new qn),function(t,e,n,r,o,s){var a=1&n,u=Qi(t),c=u.length;if(c!=Qi(e).length&&!a)return!1;for(var l=c;l--;){var h=u[l];if(!(a?h in e:Ct.call(e,h)))return!1}var f=s.get(t),d=s.get(e);if(f&&d)return f==e&&d==t;var p=!0;s.set(t,e),s.set(e,t);for(var g=a;++l<c;){var m=t[h=u[l]],v=e[h];if(r)var y=a?r(v,m,h,e,t,s):r(m,v,h,t,e,s);if(!(y===i?m===v||o(m,v,n,r,s):y)){p=!1;break}g||(g="constructor"==h)}if(p&&!g){var _=t.constructor,w=e.constructor;_==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(t),s.delete(e),p}(t,e,n,r,o,s))}(t,e,n,r,Pr,o))}function Or(t,e,n,r){var o=n.length,s=o,a=!r;if(null==t)return!s;for(t=Tt(t);o--;){var u=n[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var c=(u=n[o])[0],l=t[c],h=u[1];if(a&&u[2]){if(l===i&&!(c in t))return!1}else{var f=new qn;if(r)var d=r(l,h,c,t,e,f);if(!(d===i?Pr(h,l,3,r,f):d))return!1}}return!0}function Mr(t){return!(!Zs(t)||(e=t,Dt&&Dt in e))&&(Ks(t)?Bt:gt).test(Do(t));var e}function Rr(t){return"function"==typeof t?t:null==t?eu:"object"==typeof t?Vs(t)?Nr(t[0],t[1]):Dr(t):lu(t)}function Lr(t){if(!wo(t))return pn(t);var e=[];for(var n in Tt(t))Ct.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Cr(t,e){return t<e}function Fr(t,e){var n=-1,i=Ws(t)?r(t.length):[];return cr(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Dr(t){var e=so(t);return 1==e.length&&e[0][2]?Eo(e[0][0],e[0][1]):function(n){return n===t||Or(n,t,e)}}function Nr(t,e){return vo(t)&&bo(e)?Eo(Fo(t),e):function(n){var r=Aa(n,t);return r===i&&r===e?Ta(n,t):Pr(e,r,3)}}function Ur(t,e,n,r,o){t!==e&&gr(e,(function(s,a){if(o||(o=new qn),Zs(s))!function(t,e,n,r,o,s,a){var u=To(t,n),c=To(e,n),l=a.get(c);if(l)Jn(t,n,l);else{var h=s?s(u,c,n+"",t,e,a):i,f=h===i;if(f){var d=Vs(c),p=!d&&qs(c),g=!d&&!p&&aa(c);h=c,d||p||g?Vs(u)?h=u:Hs(u)?h=Ti(u):p?(f=!1,h=_i(c,!0)):g?(f=!1,h=bi(c,!0)):h=[]:na(c)||Gs(c)?(h=u,Gs(u)?h=ga(u):Zs(u)&&!Ks(u)||(h=fo(c))):f=!1}f&&(a.set(c,h),o(h,c,r,s,a),a.delete(c)),Jn(t,n,h)}}(t,e,a,n,Ur,r,o);else{var u=r?r(To(t,a),s,a+"",t,e,o):i;u===i&&(u=s),Jn(t,a,u)}}),Oa)}function jr(t,e){var n=t.length;if(n)return go(e+=e<0?n:0,n)?t[e]:i}function Br(t,e,n){e=e.length?Me(e,(function(t){return Vs(t)?function(e){return wr(e,1===t.length?t[0]:t)}:t})):[eu];var r=-1;e=Me(e,$e(io()));var i=Fr(t,(function(t,n,i){var o=Me(e,(function(e){return e(t)}));return{criteria:o,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,o=e.criteria,s=i.length,a=n.length;++r<s;){var u=Ei(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function Gr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var s=e[r],a=wr(t,s);n(a,s)&&Kr(o,gi(s,t),a)}return o}function Vr(t,e,n,r){var i=r?Be:je,o=-1,s=e.length,a=t;for(t===e&&(e=Ti(e)),n&&(a=Me(t,$e(n)));++o<s;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==t&&$t.call(a,u,1),$t.call(t,u,1);return t}function zr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;go(i)?$t.call(t,i,1):ai(t,i)}}return t}function Wr(t,e){return t+ge(_n()*(e-t+1))}function Hr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function qr(t,e){return Io(So(t,e,eu),t+"")}function Xr(t){return $n(Ua(t))}function $r(t,e){var n=Ua(t);return Mo(n,ir(e,0,n.length))}function Kr(t,e,n,r){if(!Zs(t))return t;for(var o=-1,s=(e=gi(e,t)).length,a=s-1,u=t;null!=u&&++o<s;){var c=Fo(e[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var h=u[c];(l=r?r(h,c,u):i)===i&&(l=Zs(h)?h:go(e[o+1])?[]:{})}Zn(u,c,l),u=u[c]}return t}var Yr=xn?function(t,e){return xn.set(t,e),t}:eu,Jr=se?function(t,e){return se(t,"toString",{configurable:!0,enumerable:!1,value:Za(e),writable:!0})}:eu;function Zr(t){return Mo(Ua(t))}function Qr(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=r(o);++i<o;)s[i]=t[i+e];return s}function ti(t,e){var n;return cr(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 o=r+i>>>1,s=t[o];null!==s&&!sa(s)&&(n?s<=e:s<e)?r=o+1:i=o}return i}return ni(t,e,eu,n)}function ni(t,e,n,r){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(e=n(e))!=e,u=null===e,c=sa(e),l=e===i;o<s;){var h=ge((o+s)/2),f=n(t[h]),d=f!==i,p=null===f,g=f==f,m=sa(f);if(a)var v=r||g;else v=l?g&&(r||d):u?g&&d&&(r||!p):c?g&&d&&!p&&(r||!m):!p&&!m&&(r?f<=e:f<e);v?o=h+1:s=h}return mn(s,4294967294)}function ri(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n],a=e?e(s):s;if(!n||!Us(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function ii(t){return"number"==typeof t?t:sa(t)?f:+t}function oi(t){if("string"==typeof t)return t;if(Vs(t))return Me(t,oi)+"";if(sa(t))return Dn?Dn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function si(t,e,n){var r=-1,i=Pe,o=t.length,s=!0,a=[],u=a;if(n)s=!1,i=Oe;else if(o>=200){var c=e?null:Hi(t);if(c)return an(c);s=!1,i=Ye,u=new Hn}else u=e?[]:a;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,s&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),a.push(l)}else i(u,h,n)||(u!==a&&u.push(h),a.push(l))}return a}function ai(t,e){return null==(t=Ao(t,e=gi(e,t)))||delete t[Fo($o(e))]}function ui(t,e,n,r){return Kr(t,e,n(wr(t,e)),r)}function ci(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Qr(t,r?0:o,r?o+1:i):Qr(t,r?o+1:0,r?i:o)}function li(t,e){var n=t;return n instanceof Gn&&(n=n.value()),Le(e,(function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))}),n)}function hi(t,e,n){var i=t.length;if(i<2)return i?si(t[0]):[];for(var o=-1,s=r(i);++o<i;)for(var a=t[o],u=-1;++u<i;)u!=o&&(s[o]=ur(s[o]||a,t[u],e,n));return si(pr(s,1),e,n)}function fi(t,e,n){for(var r=-1,o=t.length,s=e.length,a={};++r<o;){var u=r<s?e[r]:i;n(a,t[r],u)}return a}function di(t){return Hs(t)?t:[]}function pi(t){return"function"==typeof t?t:eu}function gi(t,e){return Vs(t)?t:vo(t,e)?[t]:Co(ma(t))}var mi=qr;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=ce||function(t){return he.clearTimeout(t)};function _i(t,e){if(e)return t.slice();var n=t.length,r=Wt?Wt(n):new t.constructor(n);return t.copy(r),r}function wi(t){var e=new t.constructor(t.byteLength);return new zt(e).set(new zt(t)),e}function bi(t,e){var n=e?wi(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,o=t==t,s=sa(t),a=e!==i,u=null===e,c=e==e,l=sa(e);if(!u&&!l&&!s&&t>e||s&&a&&c&&!u&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!s&&!l&&t<e||l&&n&&o&&!r&&!s||u&&n&&o||!a&&o||!c)return-1}return 0}function Si(t,e,n,i){for(var o=-1,s=t.length,a=n.length,u=-1,c=e.length,l=gn(s-a,0),h=r(c+l),f=!i;++u<c;)h[u]=e[u];for(;++o<a;)(f||o<s)&&(h[n[o]]=t[o]);for(;l--;)h[u++]=t[o++];return h}function Ai(t,e,n,i){for(var o=-1,s=t.length,a=-1,u=n.length,c=-1,l=e.length,h=gn(s-u,0),f=r(h+l),d=!i;++o<h;)f[o]=t[o];for(var p=o;++c<l;)f[p+c]=e[c];for(;++a<u;)(d||o<s)&&(f[p+n[a]]=t[o++]);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 ki(t,e,n,r){var o=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var u=e[s],c=r?r(n[u],t[u],u,n,t):i;c===i&&(c=t[u]),o?nr(n,u,c):Zn(n,u,c)}return n}function xi(t,e){return function(n,r){var i=Vs(n)?Ae:tr,o=e?e():{};return i(n,t,io(r,2),o)}}function Ii(t){return qr((function(e,n){var r=-1,o=n.length,s=o>1?n[o-1]:i,a=o>2?n[2]:i;for(s=t.length>3&&"function"==typeof s?(o--,s):i,a&&mo(n[0],n[1],a)&&(s=o<3?i:s,o=1),e=Tt(e);++r<o;){var u=n[r];u&&t(e,u,r,s)}return e}))}function Pi(t,e){return function(n,r){if(null==n)return n;if(!Ws(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=Tt(n);(e?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Oi(t){return function(e,n,r){for(var i=-1,o=Tt(e),s=r(e),a=s.length;a--;){var u=s[t?a:++i];if(!1===n(o[u],u,o))break}return e}}function Mi(t){return function(e){var n=nn(e=ma(e))?ln(e):i,r=n?n[0]:e.charAt(0),o=n?vi(n,1).join(""):e.slice(1);return r[t]()+o}}function Ri(t){return function(e){return Le(Ka(Ga(e).replace(Yt,"")),t,"")}}function Li(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=Un(t.prototype),r=t.apply(n,e);return Zs(r)?r:n}}function Ci(t){return function(e,n,r){var o=Tt(e);if(!Ws(e)){var s=io(n,3);e=Pa(e),n=function(t){return s(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[s?e[a]:a]:i}}function Fi(t){return Zi((function(e){var n=e.length,r=n,s=Bn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new It(o);if(s&&!u&&"wrapper"==no(a))var u=new Bn([],!0)}for(r=u?r:n;++r<n;){var c=no(a=e[r]),l="wrapper"==c?eo(a):i;u=l&&yo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[no(l[0])].apply(u,l[3]):1==a.length&&yo(a)?u[c]():u.thru(a)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Vs(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Di(t,e,n,o,s,a,u,l,h,f){var d=e&c,p=1&e,g=2&e,m=24&e,v=512&e,y=g?i:Li(t);return function c(){for(var _=arguments.length,w=r(_),b=_;b--;)w[b]=arguments[b];if(m)var E=ro(c),S=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(w,E);if(o&&(w=Si(w,o,s,m)),a&&(w=Ai(w,a,u,m)),_-=S,m&&_<f){var A=sn(w,E);return zi(t,e,Di,c.placeholder,n,w,A,l,h,f-_)}var T=p?n:this,k=g?T[t]:t;return _=w.length,l?w=function(t,e){for(var n=t.length,r=mn(e.length,n),o=Ti(t);r--;){var s=e[r];t[r]=go(s,n)?o[s]:i}return t}(w,l):v&&_>1&&w.reverse(),d&&h<_&&(w.length=h),this&&this!==he&&this instanceof c&&(k=y||Li(k)),k.apply(T,w)}}function Ni(t,e){return function(n,r){return function(t,e,n,r){return vr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Ui(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=oi(n),r=oi(r)):(n=ii(n),r=ii(r)),o=t(n,r)}return o}}function ji(t){return Zi((function(e){return e=Me(e,$e(io())),qr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Bi(t,e){var n=(e=e===i?" ":oi(e)).length;if(n<2)return n?Hr(e,t):e;var r=Hr(e,de(t/cn(e)));return nn(e)?vi(ln(r),0,t).join(""):r.slice(0,t)}function Gi(t){return function(e,n,o){return o&&"number"!=typeof o&&mo(e,n,o)&&(n=o=i),e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n,i){for(var o=-1,s=gn(de((e-t)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=t,t+=n;return a}(e,n,o=o===i?e<n?1:-1:ha(o),t)}}function Vi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=pa(e),n=pa(n)),t(e,n)}}function zi(t,e,n,r,o,s,a,c,l,h){var f=8&e;e|=f?u:64,4&(e&=~(f?64:u))||(e&=-4);var d=[t,e,o,f?s:i,f?a:i,f?i:s,f?i:a,c,l,h],p=n.apply(i,d);return yo(t)&&ko(p,d),p.placeholder=r,Po(p,t,e)}function Wi(t){var e=At[t];return function(t,n){if(t=pa(t),(n=null==n?0:mn(fa(n),292))&&We(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 Hi=An&&1/an(new An([,-0]))[1]==l?function(t){return new An(t)}:su;function qi(t){return function(e){var n=lo(e);return n==E?rn(e):n==x?un(e):function(t,e){return Me(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Xi(t,e,n,s,l,h,f,d){var p=2&e;if(!p&&"function"!=typeof t)throw new It(o);var g=s?s.length:0;if(g||(e&=-97,s=l=i),f=f===i?f:gn(fa(f),0),d=d===i?d:fa(d),g-=l?l.length:0,64&e){var m=s,v=l;s=l=i}var y=p?i:eo(t),_=[t,e,n,s,l,m,v,h,f,d];if(y&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,s=r==c&&8==n||r==c&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!s)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var l=t[3];t[3]=l?Si(l,u,e[4]):u,t[4]=l?sn(t[3],a):e[4]}(u=e[5])&&(l=t[5],t[5]=l?Ai(l,u,e[6]):u,t[6]=l?sn(t[5],a):e[6]),(u=e[7])&&(t[7]=u),r&c&&(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],s=_[3],l=_[4],!(d=_[9]=_[9]===i?p?0:t.length:gn(_[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,n){var o=Li(t);return function s(){for(var a=arguments.length,u=r(a),c=a,l=ro(s);c--;)u[c]=arguments[c];var h=a<3&&u[0]!==l&&u[a-1]!==l?[]:sn(u,l);return(a-=h.length)<n?zi(t,e,Di,s.placeholder,i,u,h,i,i,n-a):Se(this&&this!==he&&this instanceof s?o:t,this,u)}}(t,e,d):e!=u&&33!=e||l.length?Di.apply(i,_):function(t,e,n,i){var o=1&e,s=Li(t);return function e(){for(var a=-1,u=arguments.length,c=-1,l=i.length,h=r(l+u),f=this&&this!==he&&this instanceof e?s:t;++c<l;)h[c]=i[c];for(;u--;)h[c++]=arguments[++a];return Se(f,o?n:this,h)}}(t,e,n,s);else var w=function(t,e,n){var r=1&e,i=Li(t);return function e(){return(this&&this!==he&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Po((y?Yr:ko)(w,_),t,e)}function $i(t,e,n,r){return t===i||Us(t,Mt[n])&&!Ct.call(r,n)?e:t}function Ki(t,e,n,r,o,s){return Zs(t)&&Zs(e)&&(s.set(e,t),Ur(t,e,i,Ki,s),s.delete(e)),t}function Yi(t){return na(t)?i:t}function Ji(t,e,n,r,o,s){var a=1&n,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(t),h=s.get(e);if(l&&h)return l==e&&h==t;var f=-1,d=!0,p=2&n?new Hn:i;for(s.set(t,e),s.set(e,t);++f<u;){var g=t[f],m=e[f];if(r)var v=a?r(m,g,f,e,t,s):r(g,m,f,t,e,s);if(v!==i){if(v)continue;d=!1;break}if(p){if(!Fe(e,(function(t,e){if(!Ye(p,e)&&(g===t||o(g,t,n,r,s)))return p.push(e)}))){d=!1;break}}else if(g!==m&&!o(g,m,n,r,s)){d=!1;break}}return s.delete(t),s.delete(e),d}function Zi(t){return Io(So(t,i,zo),t+"")}function Qi(t){return br(t,Pa,uo)}function to(t){return br(t,Oa,co)}var eo=xn?function(t){return xn.get(t)}:su;function no(t){for(var e=t.name+"",n=In[e],r=Ct.call(In,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function ro(t){return(Ct.call(Nn,"placeholder")?Nn:t).placeholder}function io(){var t=Nn.iteratee||nu;return t=t===nu?Rr:t,arguments.length?t(arguments[0],arguments[1]):t}function oo(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 so(t){for(var e=Pa(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,bo(i)]}return e}function ao(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Mr(n)?n:i}var uo=me?function(t){return null==t?[]:(t=Tt(t),Ie(me(t),(function(e){return Xt.call(t,e)})))}:du,co=me?function(t){for(var e=[];t;)Re(e,uo(t)),t=Ht(t);return e}:du,lo=Er;function ho(t,e,n){for(var r=-1,i=(e=gi(e,t)).length,o=!1;++r<i;){var s=Fo(e[r]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Js(i)&&go(s,i)&&(Vs(t)||Gs(t))}function fo(t){return"function"!=typeof t.constructor||wo(t)?{}:Un(Ht(t))}function po(t){return Vs(t)||Gs(t)||!!(Kt&&t&&t[Kt])}function go(t,e){var n=typeof t;return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function mo(t,e,n){if(!Zs(n))return!1;var r=typeof e;return!!("number"==r?Ws(n)&&go(e,n.length):"string"==r&&e in n)&&Us(n[e],t)}function vo(t,e){if(Vs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!sa(t))||Q.test(t)||!Z.test(t)||null!=e&&t in Tt(e)}function yo(t){var e=no(t),n=Nn[e];if("function"!=typeof n||!(e in Gn.prototype))return!1;if(t===n)return!0;var r=eo(n);return!!r&&t===r[0]}(bn&&lo(new bn(new ArrayBuffer(1)))!=R||En&&lo(new En)!=E||Sn&&lo(Sn.resolve())!=T||An&&lo(new An)!=x||Tn&&lo(new Tn)!=O)&&(lo=function(t){var e=Er(t),n=e==A?t.constructor:i,r=n?Do(n):"";if(r)switch(r){case Pn:return R;case On:return E;case Mn:return T;case Rn:return x;case Ln:return O}return e});var _o=Rt?Ks:pu;function wo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Mt)}function bo(t){return t==t&&!Zs(t)}function Eo(t,e){return function(n){return null!=n&&n[t]===e&&(e!==i||t in Tt(n))}}function So(t,e,n){return e=gn(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,s=gn(i.length-e,0),a=r(s);++o<s;)a[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(a),Se(t,this,u)}}function Ao(t,e){return e.length<2?t:wr(t,Qr(e,0,-1))}function To(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var ko=Oo(Yr),xo=fe||function(t,e){return he.setTimeout(t,e)},Io=Oo(Jr);function Po(t,e,n){var r=e+"";return Io(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(st,"{\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(ut):[]}(r),n)))}function Oo(t){var e=0,n=0;return function(){var r=vn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Mo(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n<e;){var s=Wr(n,o),a=t[s];t[s]=t[n],t[n]=a}return t.length=e,t}var Ro,Lo,Co=(Ro=Rs((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,i){e.push(r?i.replace(lt,"$1"):n||t)})),e}),(function(t){return 500===Lo.size&&Lo.clear(),t})),Lo=Ro.cache,Ro);function Fo(t){if("string"==typeof t||sa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Do(t){if(null!=t){try{return Lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function No(t){if(t instanceof Gn)return t.clone();var e=new Bn(t.__wrapped__,t.__chain__);return e.__actions__=Ti(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Uo=qr((function(t,e){return Hs(t)?ur(t,pr(e,1,Hs,!0)):[]})),jo=qr((function(t,e){var n=$o(e);return Hs(n)&&(n=i),Hs(t)?ur(t,pr(e,1,Hs,!0),io(n,2)):[]})),Bo=qr((function(t,e){var n=$o(e);return Hs(n)&&(n=i),Hs(t)?ur(t,pr(e,1,Hs,!0),i,n):[]}));function Go(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)),Ue(t,io(e,3),i)}function Vo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==i&&(o=fa(n),o=n<0?gn(r+o,0):mn(o,r-1)),Ue(t,io(e,3),o,!0)}function zo(t){return null!=t&&t.length?pr(t,1):[]}function Wo(t){return t&&t.length?t[0]:i}var Ho=qr((function(t){var e=Me(t,di);return e.length&&e[0]===t[0]?kr(e):[]})),qo=qr((function(t){var e=$o(t),n=Me(t,di);return e===$o(n)?e=i:n.pop(),n.length&&n[0]===t[0]?kr(n,io(e,2)):[]})),Xo=qr((function(t){var e=$o(t),n=Me(t,di);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?kr(n,i,e):[]}));function $o(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Ko=qr(Yo);function Yo(t,e){return t&&t.length&&e&&e.length?Vr(t,e):t}var Jo=Zi((function(t,e){var n=null==t?0:t.length,r=rr(t,e);return zr(t,Me(e,(function(t){return go(t,n)?+t:t})).sort(Ei)),r}));function Zo(t){return null==t?t:wn.call(t)}var Qo=qr((function(t){return si(pr(t,1,Hs,!0))})),ts=qr((function(t){var e=$o(t);return Hs(e)&&(e=i),si(pr(t,1,Hs,!0),io(e,2))})),es=qr((function(t){var e=$o(t);return e="function"==typeof e?e:i,si(pr(t,1,Hs,!0),i,e)}));function ns(t){if(!t||!t.length)return[];var e=0;return t=Ie(t,(function(t){if(Hs(t))return e=gn(t.length,e),!0})),Xe(e,(function(e){return Me(t,ze(e))}))}function rs(t,e){if(!t||!t.length)return[];var n=ns(t);return null==e?n:Me(n,(function(t){return Se(e,i,t)}))}var is=qr((function(t,e){return Hs(t)?ur(t,e):[]})),os=qr((function(t){return hi(Ie(t,Hs))})),ss=qr((function(t){var e=$o(t);return Hs(e)&&(e=i),hi(Ie(t,Hs),io(e,2))})),as=qr((function(t){var e=$o(t);return e="function"==typeof e?e:i,hi(Ie(t,Hs),i,e)})),us=qr(ns),cs=qr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,rs(t,n)}));function ls(t){var e=Nn(t);return e.__chain__=!0,e}function hs(t,e){return e(t)}var fs=Zi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return rr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Gn&&go(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Bn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ds=xi((function(t,e,n){Ct.call(t,n)?++t[n]:nr(t,n,1)})),ps=Ci(Go),gs=Ci(Vo);function ms(t,e){return(Vs(t)?Te:cr)(t,io(e,3))}function vs(t,e){return(Vs(t)?ke:lr)(t,io(e,3))}var ys=xi((function(t,e,n){Ct.call(t,n)?t[n].push(e):nr(t,n,[e])})),_s=qr((function(t,e,n){var i=-1,o="function"==typeof e,s=Ws(t)?r(t.length):[];return cr(t,(function(t){s[++i]=o?Se(e,t,n):xr(t,e,n)})),s})),ws=xi((function(t,e,n){nr(t,n,e)}));function bs(t,e){return(Vs(t)?Me:Fr)(t,io(e,3))}var Es=xi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Ss=qr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&mo(t,e[0],e[1])?e=[]:n>2&&mo(e[0],e[1],e[2])&&(e=[e[0]]),Br(t,pr(e,1),[])})),As=le||function(){return he.Date.now()};function Ts(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Xi(t,c,i,i,i,i,e)}function ks(t,e){var n;if("function"!=typeof e)throw new It(o);return t=fa(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var xs=qr((function(t,e,n){var r=1;if(n.length){var i=sn(n,ro(xs));r|=u}return Xi(t,r,e,n,i)})),Is=qr((function(t,e,n){var r=3;if(n.length){var i=sn(n,ro(Is));r|=u}return Xi(e,r,t,n,i)}));function Ps(t,e,n){var r,s,a,u,c,l,h=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new It(o);function g(e){var n=r,o=s;return r=s=i,h=e,u=t.apply(o,n)}function m(t){var n=t-l;return l===i||n>=e||n<0||d&&t-h>=a}function v(){var t=As();if(m(t))return y(t);c=xo(v,function(t){var n=e-(t-l);return d?mn(n,a-(t-h)):n}(t))}function y(t){return c=i,p&&r?g(t):(r=s=i,u)}function _(){var t=As(),n=m(t);if(r=arguments,s=this,l=t,n){if(c===i)return function(t){return h=t,c=xo(v,e),f?g(t):u}(l);if(d)return yi(c),c=xo(v,e),g(l)}return c===i&&(c=xo(v,e)),u}return e=pa(e)||0,Zs(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(){c!==i&&yi(c),h=0,r=l=s=c=i},_.flush=function(){return c===i?u:y(As())},_}var Os=qr((function(t,e){return ar(t,1,e)})),Ms=qr((function(t,e,n){return ar(t,pa(e)||0,n)}));function Rs(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new It(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Rs.Cache||Wn),n}function Ls(t){if("function"!=typeof t)throw new It(o);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)}}Rs.Cache=Wn;var Cs=mi((function(t,e){var n=(e=1==e.length&&Vs(e[0])?Me(e[0],$e(io())):Me(pr(e,1),$e(io()))).length;return qr((function(r){for(var i=-1,o=mn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Se(t,this,r)}))})),Fs=qr((function(t,e){var n=sn(e,ro(Fs));return Xi(t,u,i,e,n)})),Ds=qr((function(t,e){var n=sn(e,ro(Ds));return Xi(t,64,i,e,n)})),Ns=Zi((function(t,e){return Xi(t,256,i,i,i,e)}));function Us(t,e){return t===e||t!=t&&e!=e}var js=Vi(Sr),Bs=Vi((function(t,e){return t>=e})),Gs=Ir(function(){return arguments}())?Ir:function(t){return Qs(t)&&Ct.call(t,"callee")&&!Xt.call(t,"callee")},Vs=r.isArray,zs=ve?$e(ve):function(t){return Qs(t)&&Er(t)==M};function Ws(t){return null!=t&&Js(t.length)&&!Ks(t)}function Hs(t){return Qs(t)&&Ws(t)}var qs=De||pu,Xs=ye?$e(ye):function(t){return Qs(t)&&Er(t)==y};function $s(t){if(!Qs(t))return!1;var e=Er(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!na(t)}function Ks(t){if(!Zs(t))return!1;var e=Er(t);return e==w||e==b||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ys(t){return"number"==typeof t&&t==fa(t)}function Js(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function Zs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Qs(t){return null!=t&&"object"==typeof t}var ta=_e?$e(_e):function(t){return Qs(t)&&lo(t)==E};function ea(t){return"number"==typeof t||Qs(t)&&Er(t)==S}function na(t){if(!Qs(t)||Er(t)!=A)return!1;var e=Ht(t);if(null===e)return!0;var n=Ct.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Lt.call(n)==Ut}var ra=we?$e(we):function(t){return Qs(t)&&Er(t)==k},ia=be?$e(be):function(t){return Qs(t)&&lo(t)==x};function oa(t){return"string"==typeof t||!Vs(t)&&Qs(t)&&Er(t)==I}function sa(t){return"symbol"==typeof t||Qs(t)&&Er(t)==P}var aa=Ee?$e(Ee):function(t){return Qs(t)&&Js(t.length)&&!!ie[Er(t)]},ua=Vi(Cr),ca=Vi((function(t,e){return t<=e}));function la(t){if(!t)return[];if(Ws(t))return oa(t)?ln(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=lo(t);return(e==E?rn:e==x?an:Ua)(t)}function ha(t){return t?(t=pa(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function fa(t){var e=ha(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(sa(t))return f;if(Zs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Zs(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)?ue(t.slice(2),n?2:8):dt.test(t)?f:+t}function ga(t){return ki(t,Oa(t))}function ma(t){return null==t?"":oi(t)}var va=Ii((function(t,e){if(wo(e)||Ws(e))ki(e,Pa(e),t);else for(var n in e)Ct.call(e,n)&&Zn(t,n,e[n])})),ya=Ii((function(t,e){ki(e,Oa(e),t)})),_a=Ii((function(t,e,n,r){ki(e,Oa(e),t,r)})),wa=Ii((function(t,e,n,r){ki(e,Pa(e),t,r)})),ba=Zi(rr),Ea=qr((function(t,e){t=Tt(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&mo(e[0],e[1],o)&&(r=1);++n<r;)for(var s=e[n],a=Oa(s),u=-1,c=a.length;++u<c;){var l=a[u],h=t[l];(h===i||Us(h,Mt[l])&&!Ct.call(t,l))&&(t[l]=s[l])}return t})),Sa=qr((function(t){return t.push(i,Ki),Se(Ra,i,t)}));function Aa(t,e,n){var r=null==t?i:wr(t,e);return r===i?n:r}function Ta(t,e){return null!=t&&ho(t,e,Tr)}var ka=Ni((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),t[e]=n}),Za(eu)),xa=Ni((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Nt.call(e)),Ct.call(t,e)?t[e].push(n):t[e]=[n]}),io),Ia=qr(xr);function Pa(t){return Ws(t)?Xn(t):Lr(t)}function Oa(t){return Ws(t)?Xn(t,!0):function(t){if(!Zs(t))return function(t){var e=[];if(null!=t)for(var n in Tt(t))e.push(n);return e}(t);var e=wo(t),n=[];for(var r in t)("constructor"!=r||!e&&Ct.call(t,r))&&n.push(r);return n}(t)}var Ma=Ii((function(t,e,n){Ur(t,e,n)})),Ra=Ii((function(t,e,n,r){Ur(t,e,n,r)})),La=Zi((function(t,e){var n={};if(null==t)return n;var r=!1;e=Me(e,(function(e){return e=gi(e,t),r||(r=e.length>1),e})),ki(t,to(t),n),r&&(n=or(n,7,Yi));for(var i=e.length;i--;)ai(n,e[i]);return n})),Ca=Zi((function(t,e){return null==t?{}:function(t,e){return Gr(t,e,(function(e,n){return Ta(t,n)}))}(t,e)}));function Fa(t,e){if(null==t)return{};var n=Me(to(t),(function(t){return[t]}));return e=io(e),Gr(t,n,(function(t,n){return e(t,n[0])}))}var Da=qi(Pa),Na=qi(Oa);function Ua(t){return null==t?[]:Ke(t,Pa(t))}var ja=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?Ba(e):e)}));function Ba(t){return $a(ma(t).toLowerCase())}function Ga(t){return(t=ma(t))&&t.replace(yt,Qe).replace(Jt,"")}var Va=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),za=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Wa=Mi("toLowerCase"),Ha=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),qa=Ri((function(t,e,n){return t+(n?" ":"")+$a(e)})),Xa=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),$a=Mi("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(ct)||[]}(t):t.match(e)||[]}var Ya=qr((function(t,e){try{return Se(t,i,e)}catch(t){return $s(t)?t:new Et(t)}})),Ja=Zi((function(t,e){return Te(e,(function(e){e=Fo(e),nr(t,e,xs(t[e],t))})),t}));function Za(t){return function(){return t}}var Qa=Fi(),tu=Fi(!0);function eu(t){return t}function nu(t){return Rr("function"==typeof t?t:or(t,1))}var ru=qr((function(t,e){return function(n){return xr(n,t,e)}})),iu=qr((function(t,e){return function(n){return xr(t,n,e)}}));function ou(t,e,n){var r=Pa(e),i=_r(e,r);null!=n||Zs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=_r(e,Pa(e)));var o=!(Zs(n)&&"chain"in n&&!n.chain),s=Ks(t);return Te(i,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||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,Re([this.value()],arguments))})})),t}function su(){}var au=ji(Me),uu=ji(xe),cu=ji(Fe);function lu(t){return vo(t)?ze(Fo(t)):function(t){return function(e){return wr(e,t)}}(t)}var hu=Gi(),fu=Gi(!0);function du(){return[]}function pu(){return!1}var gu,mu=Ui((function(t,e){return t+e}),0),vu=Wi("ceil"),yu=Ui((function(t,e){return t/e}),1),_u=Wi("floor"),wu=Ui((function(t,e){return t*e}),1),bu=Wi("round"),Eu=Ui((function(t,e){return t-e}),0);return Nn.after=function(t,e){if("function"!=typeof e)throw new It(o);return t=fa(t),function(){if(--t<1)return e.apply(this,arguments)}},Nn.ary=Ts,Nn.assign=va,Nn.assignIn=ya,Nn.assignInWith=_a,Nn.assignWith=wa,Nn.at=ba,Nn.before=ks,Nn.bind=xs,Nn.bindAll=Ja,Nn.bindKey=Is,Nn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Vs(t)?t:[t]},Nn.chain=ls,Nn.chunk=function(t,e,n){e=(n?mo(t,e,n):e===i)?1:gn(fa(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,u=r(de(o/e));s<o;)u[a++]=Qr(t,s,s+=e);return u},Nn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Nn.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 Re(Vs(n)?Ti(n):[n],pr(e,1))},Nn.cond=function(t){var e=null==t?0:t.length,n=io();return t=e?Me(t,(function(t){if("function"!=typeof t[1])throw new It(o);return[n(t[0]),t[1]]})):[],qr((function(n){for(var r=-1;++r<e;){var i=t[r];if(Se(i[0],this,n))return Se(i[1],this,n)}}))},Nn.conforms=function(t){return function(t){var e=Pa(t);return function(n){return sr(n,t,e)}}(or(t,1))},Nn.constant=Za,Nn.countBy=ds,Nn.create=function(t,e){var n=Un(t);return null==e?n:er(n,e)},Nn.curry=function t(e,n,r){var o=Xi(e,8,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},Nn.curryRight=function t(e,n,r){var o=Xi(e,16,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},Nn.debounce=Ps,Nn.defaults=Ea,Nn.defaultsDeep=Sa,Nn.defer=Os,Nn.delay=Ms,Nn.difference=Uo,Nn.differenceBy=jo,Nn.differenceWith=Bo,Nn.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):[]},Nn.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):[]},Nn.dropRightWhile=function(t,e){return t&&t.length?ci(t,io(e,3),!0,!0):[]},Nn.dropWhile=function(t,e){return t&&t.length?ci(t,io(e,3),!0):[]},Nn.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&mo(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=fa(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:fa(r))<0&&(r+=o),r=n>r?0:da(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Nn.filter=function(t,e){return(Vs(t)?Ie:dr)(t,io(e,3))},Nn.flatMap=function(t,e){return pr(bs(t,e),1)},Nn.flatMapDeep=function(t,e){return pr(bs(t,e),l)},Nn.flatMapDepth=function(t,e,n){return n=n===i?1:fa(n),pr(bs(t,e),n)},Nn.flatten=zo,Nn.flattenDeep=function(t){return null!=t&&t.length?pr(t,l):[]},Nn.flattenDepth=function(t,e){return null!=t&&t.length?pr(t,e=e===i?1:fa(e)):[]},Nn.flip=function(t){return Xi(t,512)},Nn.flow=Qa,Nn.flowRight=tu,Nn.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},Nn.functions=function(t){return null==t?[]:_r(t,Pa(t))},Nn.functionsIn=function(t){return null==t?[]:_r(t,Oa(t))},Nn.groupBy=ys,Nn.initial=function(t){return null!=t&&t.length?Qr(t,0,-1):[]},Nn.intersection=Ho,Nn.intersectionBy=qo,Nn.intersectionWith=Xo,Nn.invert=ka,Nn.invertBy=xa,Nn.invokeMap=_s,Nn.iteratee=nu,Nn.keyBy=ws,Nn.keys=Pa,Nn.keysIn=Oa,Nn.map=bs,Nn.mapKeys=function(t,e){var n={};return e=io(e,3),vr(t,(function(t,r,i){nr(n,e(t,r,i),t)})),n},Nn.mapValues=function(t,e){var n={};return e=io(e,3),vr(t,(function(t,r,i){nr(n,r,e(t,r,i))})),n},Nn.matches=function(t){return Dr(or(t,1))},Nn.matchesProperty=function(t,e){return Nr(t,or(e,1))},Nn.memoize=Rs,Nn.merge=Ma,Nn.mergeWith=Ra,Nn.method=ru,Nn.methodOf=iu,Nn.mixin=ou,Nn.negate=Ls,Nn.nthArg=function(t){return t=fa(t),qr((function(e){return jr(e,t)}))},Nn.omit=La,Nn.omitBy=function(t,e){return Fa(t,Ls(io(e)))},Nn.once=function(t){return ks(2,t)},Nn.orderBy=function(t,e,n,r){return null==t?[]:(Vs(e)||(e=null==e?[]:[e]),Vs(n=r?i:n)||(n=null==n?[]:[n]),Br(t,e,n))},Nn.over=au,Nn.overArgs=Cs,Nn.overEvery=uu,Nn.overSome=cu,Nn.partial=Fs,Nn.partialRight=Ds,Nn.partition=Es,Nn.pick=Ca,Nn.pickBy=Fa,Nn.property=lu,Nn.propertyOf=function(t){return function(e){return null==t?i:wr(t,e)}},Nn.pull=Ko,Nn.pullAll=Yo,Nn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Vr(t,e,io(n,2)):t},Nn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Vr(t,e,i,n):t},Nn.pullAt=Jo,Nn.range=hu,Nn.rangeRight=fu,Nn.rearg=Ns,Nn.reject=function(t,e){return(Vs(t)?Ie:dr)(t,Ls(io(e,3)))},Nn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=io(e,3);++r<o;){var s=t[r];e(s,r,t)&&(n.push(s),i.push(r))}return zr(t,i),n},Nn.rest=function(t,e){if("function"!=typeof t)throw new It(o);return qr(t,e=e===i?e:fa(e))},Nn.reverse=Zo,Nn.sampleSize=function(t,e,n){return e=(n?mo(t,e,n):e===i)?1:fa(e),(Vs(t)?Kn:$r)(t,e)},Nn.set=function(t,e,n){return null==t?t:Kr(t,e,n)},Nn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:Kr(t,e,n,r)},Nn.shuffle=function(t){return(Vs(t)?Yn:Zr)(t)},Nn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&mo(t,e,n)?(e=0,n=r):(e=null==e?0:fa(e),n=n===i?r:fa(n)),Qr(t,e,n)):[]},Nn.sortBy=Ss,Nn.sortedUniq=function(t){return t&&t.length?ri(t):[]},Nn.sortedUniqBy=function(t,e){return t&&t.length?ri(t,io(e,2)):[]},Nn.split=function(t,e,n){return n&&"number"!=typeof n&&mo(t,e,n)&&(e=n=i),(n=n===i?d:n>>>0)?(t=ma(t))&&("string"==typeof e||null!=e&&!ra(e))&&!(e=oi(e))&&nn(t)?vi(ln(t),0,n):t.split(e,n):[]},Nn.spread=function(t,e){if("function"!=typeof t)throw new It(o);return e=null==e?0:gn(fa(e),0),qr((function(n){var r=n[e],i=vi(n,0,e);return r&&Re(i,r),Se(t,this,i)}))},Nn.tail=function(t){var e=null==t?0:t.length;return e?Qr(t,1,e):[]},Nn.take=function(t,e,n){return t&&t.length?Qr(t,0,(e=n||e===i?1:fa(e))<0?0:e):[]},Nn.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):[]},Nn.takeRightWhile=function(t,e){return t&&t.length?ci(t,io(e,3),!1,!0):[]},Nn.takeWhile=function(t,e){return t&&t.length?ci(t,io(e,3)):[]},Nn.tap=function(t,e){return e(t),t},Nn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new It(o);return Zs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ps(t,e,{leading:r,maxWait:e,trailing:i})},Nn.thru=hs,Nn.toArray=la,Nn.toPairs=Da,Nn.toPairsIn=Na,Nn.toPath=function(t){return Vs(t)?Me(t,Fo):sa(t)?[t]:Ti(Co(ma(t)))},Nn.toPlainObject=ga,Nn.transform=function(t,e,n){var r=Vs(t),i=r||qs(t)||aa(t);if(e=io(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Zs(t)&&Ks(o)?Un(Ht(t)):{}}return(i?Te:vr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Nn.unary=function(t){return Ts(t,1)},Nn.union=Qo,Nn.unionBy=ts,Nn.unionWith=es,Nn.uniq=function(t){return t&&t.length?si(t):[]},Nn.uniqBy=function(t,e){return t&&t.length?si(t,io(e,2)):[]},Nn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?si(t,i,e):[]},Nn.unset=function(t,e){return null==t||ai(t,e)},Nn.unzip=ns,Nn.unzipWith=rs,Nn.update=function(t,e,n){return null==t?t:ui(t,e,pi(n))},Nn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ui(t,e,pi(n),r)},Nn.values=Ua,Nn.valuesIn=function(t){return null==t?[]:Ke(t,Oa(t))},Nn.without=is,Nn.words=Ka,Nn.wrap=function(t,e){return Fs(pi(e),t)},Nn.xor=os,Nn.xorBy=ss,Nn.xorWith=as,Nn.zip=us,Nn.zipObject=function(t,e){return fi(t||[],e||[],Zn)},Nn.zipObjectDeep=function(t,e){return fi(t||[],e||[],Kr)},Nn.zipWith=cs,Nn.entries=Da,Nn.entriesIn=Na,Nn.extend=ya,Nn.extendWith=_a,ou(Nn,Nn),Nn.add=mu,Nn.attempt=Ya,Nn.camelCase=ja,Nn.capitalize=Ba,Nn.ceil=vu,Nn.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)},Nn.clone=function(t){return or(t,4)},Nn.cloneDeep=function(t){return or(t,5)},Nn.cloneDeepWith=function(t,e){return or(t,5,e="function"==typeof e?e:i)},Nn.cloneWith=function(t,e){return or(t,4,e="function"==typeof e?e:i)},Nn.conformsTo=function(t,e){return null==e||sr(t,e,Pa(e))},Nn.deburr=Ga,Nn.defaultTo=function(t,e){return null==t||t!=t?e:t},Nn.divide=yu,Nn.endsWith=function(t,e,n){t=ma(t),e=oi(e);var r=t.length,o=n=n===i?r:ir(fa(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Nn.eq=Us,Nn.escape=function(t){return(t=ma(t))&&$.test(t)?t.replace(q,tn):t},Nn.escapeRegExp=function(t){return(t=ma(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Nn.every=function(t,e,n){var r=Vs(t)?xe:hr;return n&&mo(t,e,n)&&(e=i),r(t,io(e,3))},Nn.find=ps,Nn.findIndex=Go,Nn.findKey=function(t,e){return Ne(t,io(e,3),vr)},Nn.findLast=gs,Nn.findLastIndex=Vo,Nn.findLastKey=function(t,e){return Ne(t,io(e,3),yr)},Nn.floor=_u,Nn.forEach=ms,Nn.forEachRight=vs,Nn.forIn=function(t,e){return null==t?t:gr(t,io(e,3),Oa)},Nn.forInRight=function(t,e){return null==t?t:mr(t,io(e,3),Oa)},Nn.forOwn=function(t,e){return t&&vr(t,io(e,3))},Nn.forOwnRight=function(t,e){return t&&yr(t,io(e,3))},Nn.get=Aa,Nn.gt=js,Nn.gte=Bs,Nn.has=function(t,e){return null!=t&&ho(t,e,Ar)},Nn.hasIn=Ta,Nn.head=Wo,Nn.identity=eu,Nn.includes=function(t,e,n,r){t=Ws(t)?t:Ua(t),n=n&&!r?fa(n):0;var i=t.length;return n<0&&(n=gn(i+n,0)),oa(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&je(t,e,n)>-1},Nn.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)),je(t,e,i)},Nn.inRange=function(t,e,n){return e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n){return t>=mn(e,n)&&t<gn(e,n)}(t=pa(t),e,n)},Nn.invoke=Ia,Nn.isArguments=Gs,Nn.isArray=Vs,Nn.isArrayBuffer=zs,Nn.isArrayLike=Ws,Nn.isArrayLikeObject=Hs,Nn.isBoolean=function(t){return!0===t||!1===t||Qs(t)&&Er(t)==v},Nn.isBuffer=qs,Nn.isDate=Xs,Nn.isElement=function(t){return Qs(t)&&1===t.nodeType&&!na(t)},Nn.isEmpty=function(t){if(null==t)return!0;if(Ws(t)&&(Vs(t)||"string"==typeof t||"function"==typeof t.splice||qs(t)||aa(t)||Gs(t)))return!t.length;var e=lo(t);if(e==E||e==x)return!t.size;if(wo(t))return!Lr(t).length;for(var n in t)if(Ct.call(t,n))return!1;return!0},Nn.isEqual=function(t,e){return Pr(t,e)},Nn.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},Nn.isError=$s,Nn.isFinite=function(t){return"number"==typeof t&&We(t)},Nn.isFunction=Ks,Nn.isInteger=Ys,Nn.isLength=Js,Nn.isMap=ta,Nn.isMatch=function(t,e){return t===e||Or(t,e,so(e))},Nn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Or(t,e,so(e),n)},Nn.isNaN=function(t){return ea(t)&&t!=+t},Nn.isNative=function(t){if(_o(t))throw new Et("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(t)},Nn.isNil=function(t){return null==t},Nn.isNull=function(t){return null===t},Nn.isNumber=ea,Nn.isObject=Zs,Nn.isObjectLike=Qs,Nn.isPlainObject=na,Nn.isRegExp=ra,Nn.isSafeInteger=function(t){return Ys(t)&&t>=-9007199254740991&&t<=h},Nn.isSet=ia,Nn.isString=oa,Nn.isSymbol=sa,Nn.isTypedArray=aa,Nn.isUndefined=function(t){return t===i},Nn.isWeakMap=function(t){return Qs(t)&&lo(t)==O},Nn.isWeakSet=function(t){return Qs(t)&&"[object WeakSet]"==Er(t)},Nn.join=function(t,e){return null==t?"":dn.call(t,e)},Nn.kebabCase=Va,Nn.last=$o,Nn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=fa(n))<0?gn(r+o,0):mn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Ue(t,Ge,o,!0)},Nn.lowerCase=za,Nn.lowerFirst=Wa,Nn.lt=ua,Nn.lte=ca,Nn.max=function(t){return t&&t.length?fr(t,eu,Sr):i},Nn.maxBy=function(t,e){return t&&t.length?fr(t,io(e,2),Sr):i},Nn.mean=function(t){return Ve(t,eu)},Nn.meanBy=function(t,e){return Ve(t,io(e,2))},Nn.min=function(t){return t&&t.length?fr(t,eu,Cr):i},Nn.minBy=function(t,e){return t&&t.length?fr(t,io(e,2),Cr):i},Nn.stubArray=du,Nn.stubFalse=pu,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=wu,Nn.nth=function(t,e){return t&&t.length?jr(t,fa(e)):i},Nn.noConflict=function(){return he._===this&&(he._=jt),this},Nn.noop=su,Nn.now=As,Nn.pad=function(t,e,n){t=ma(t);var r=(e=fa(e))?cn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Bi(ge(i),n)+t+Bi(de(i),n)},Nn.padEnd=function(t,e,n){t=ma(t);var r=(e=fa(e))?cn(t):0;return e&&r<e?t+Bi(e-r,n):t},Nn.padStart=function(t,e,n){t=ma(t);var r=(e=fa(e))?cn(t):0;return e&&r<e?Bi(e-r,n)+t:t},Nn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),yn(ma(t).replace(it,""),e||0)},Nn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&mo(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=ha(t),e===i?(e=t,t=0):e=ha(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=_n();return mn(t+o*(e-t+ae("1e-"+((o+"").length-1))),e)}return Wr(t,e)},Nn.reduce=function(t,e,n){var r=Vs(t)?Le:He,i=arguments.length<3;return r(t,io(e,4),n,i,cr)},Nn.reduceRight=function(t,e,n){var r=Vs(t)?Ce:He,i=arguments.length<3;return r(t,io(e,4),n,i,lr)},Nn.repeat=function(t,e,n){return e=(n?mo(t,e,n):e===i)?1:fa(e),Hr(ma(t),e)},Nn.replace=function(){var t=arguments,e=ma(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Nn.result=function(t,e,n){var r=-1,o=(e=gi(e,t)).length;for(o||(o=1,t=i);++r<o;){var s=null==t?i:t[Fo(e[r])];s===i&&(r=o,s=n),t=Ks(s)?s.call(t):s}return t},Nn.round=bu,Nn.runInContext=t,Nn.sample=function(t){return(Vs(t)?$n:Xr)(t)},Nn.size=function(t){if(null==t)return 0;if(Ws(t))return oa(t)?cn(t):t.length;var e=lo(t);return e==E||e==x?t.size:Lr(t).length},Nn.snakeCase=Ha,Nn.some=function(t,e,n){var r=Vs(t)?Fe:ti;return n&&mo(t,e,n)&&(e=i),r(t,io(e,3))},Nn.sortedIndex=function(t,e){return ei(t,e)},Nn.sortedIndexBy=function(t,e,n){return ni(t,e,io(n,2))},Nn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ei(t,e);if(r<n&&Us(t[r],e))return r}return-1},Nn.sortedLastIndex=function(t,e){return ei(t,e,!0)},Nn.sortedLastIndexBy=function(t,e,n){return ni(t,e,io(n,2),!0)},Nn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ei(t,e,!0)-1;if(Us(t[n],e))return n}return-1},Nn.startCase=qa,Nn.startsWith=function(t,e,n){return t=ma(t),n=null==n?0:ir(fa(n),0,t.length),e=oi(e),t.slice(n,n+e.length)==e},Nn.subtract=Eu,Nn.sum=function(t){return t&&t.length?qe(t,eu):0},Nn.sumBy=function(t,e){return t&&t.length?qe(t,io(e,2)):0},Nn.template=function(t,e,n){var r=Nn.templateSettings;n&&mo(t,e,n)&&(e=i),t=ma(t),e=_a({},e,r,$i);var o,s,a=_a({},e.imports,r.imports,$i),u=Pa(a),c=Ke(a,u),l=0,h=e.interpolate||_t,f="__p += '",d=kt((e.escape||_t).source+"|"+h.source+"|"+(h===J?ht:_t).source+"|"+(e.evaluate||_t).source+"|$","g"),p="//# sourceURL="+(Ct.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(d,(function(e,n,r,i,a,u){return r||(r=i),f+=t.slice(l,u).replace(wt,en),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),f+="';\n";var g=Ct.call(e,"variable")&&e.variable;g||(f="with (obj) {\n"+f+"\n}\n"),f=(s?f.replace(V,""):f).replace(z,"$1").replace(W,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Ya((function(){return St(u,p+"return "+f).apply(i,c)}));if(m.source=f,$s(m))throw m;return m},Nn.times=function(t,e){if((t=fa(t))<1||t>h)return[];var n=d,r=mn(t,d);e=io(e),t-=d;for(var i=Xe(r,e);++n<t;)e(n);return i},Nn.toFinite=ha,Nn.toInteger=fa,Nn.toLength=da,Nn.toLower=function(t){return ma(t).toLowerCase()},Nn.toNumber=pa,Nn.toSafeInteger=function(t){return t?ir(fa(t),-9007199254740991,h):0===t?t:0},Nn.toString=ma,Nn.toUpper=function(t){return ma(t).toUpperCase()},Nn.trim=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(rt,"");if(!t||!(e=oi(e)))return t;var r=ln(t),o=ln(e);return vi(r,Je(r,o),Ze(r,o)+1).join("")},Nn.trimEnd=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(ot,"");if(!t||!(e=oi(e)))return t;var r=ln(t);return vi(r,0,Ze(r,ln(e))+1).join("")},Nn.trimStart=function(t,e,n){if((t=ma(t))&&(n||e===i))return t.replace(it,"");if(!t||!(e=oi(e)))return t;var r=ln(t);return vi(r,Je(r,ln(e))).join("")},Nn.truncate=function(t,e){var n=30,r="...";if(Zs(e)){var o="separator"in e?e.separator:o;n="length"in e?fa(e.length):n,r="omission"in e?oi(e.omission):r}var s=(t=ma(t)).length;if(nn(t)){var a=ln(t);s=a.length}if(n>=s)return t;var u=n-cn(r);if(u<1)return r;var c=a?vi(a,0,u).join(""):t.slice(0,u);if(o===i)return c+r;if(a&&(u+=c.length-u),ra(o)){if(t.slice(u).search(o)){var l,h=c;for(o.global||(o=kt(o.source,ma(ft.exec(o))+"g")),o.lastIndex=0;l=o.exec(h);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(t.indexOf(oi(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},Nn.unescape=function(t){return(t=ma(t))&&X.test(t)?t.replace(H,hn):t},Nn.uniqueId=function(t){var e=++Ft;return ma(t)+e},Nn.upperCase=Xa,Nn.upperFirst=$a,Nn.each=ms,Nn.eachRight=vs,Nn.first=Wo,ou(Nn,(gu={},vr(Nn,(function(t,e){Ct.call(Nn.prototype,e)||(gu[e]=t)})),gu),{chain:!1}),Nn.VERSION="4.17.20",Te(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Nn[t].placeholder=Nn})),Te(["drop","take"],(function(t,e){Gn.prototype[t]=function(n){n=n===i?1:gn(fa(n),0);var r=this.__filtered__&&!e?new Gn(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},Gn.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;Gn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:io(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Te(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Gn.prototype[t]=function(){return this[n](1).value()[0]}})),Te(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Gn.prototype[t]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(eu)},Gn.prototype.find=function(t){return this.filter(t).head()},Gn.prototype.findLast=function(t){return this.reverse().find(t)},Gn.prototype.invokeMap=qr((function(t,e){return"function"==typeof t?new Gn(this):this.map((function(n){return xr(n,t,e)}))})),Gn.prototype.reject=function(t){return this.filter(Ls(io(t)))},Gn.prototype.slice=function(t,e){t=fa(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Gn(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)},Gn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Gn.prototype.toArray=function(){return this.take(d)},vr(Gn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Nn[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);o&&(Nn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof Gn,c=a[0],l=u||Vs(e),h=function(t){var e=o.apply(Nn,Re([t],a));return r&&f?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,d=!!this.__actions__.length,p=s&&!f,g=u&&!d;if(!s&&l){e=g?e:new Gn(this);var m=t.apply(e,a);return m.__actions__.push({func:hs,args:[h],thisArg:i}),new Bn(m,f)}return p&&g?t.apply(this,a):(m=this.thru(h),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);Nn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Vs(i)?i:[],t)}return this[n]((function(n){return e.apply(Vs(n)?n:[],t)}))}})),vr(Gn.prototype,(function(t,e){var n=Nn[e];if(n){var r=n.name+"";Ct.call(In,r)||(In[r]=[]),In[r].push({name:e,func:n})}})),In[Di(i,2).name]=[{name:"wrapper",func:i}],Gn.prototype.clone=function(){var t=new Gn(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},Gn.prototype.reverse=function(){if(this.__filtered__){var t=new Gn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Gn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Vs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=mn(e,t+s);break;case"takeRight":t=gn(t,e-s)}}return{start:t,end:e}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,h=l.length,f=0,d=mn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return li(t,this.__actions__);var p=[];t:for(;u--&&f<d;){for(var g=-1,m=t[c+=e];++g<h;){var v=l[g],y=v.iteratee,_=v.type,w=y(m);if(2==_)m=w;else if(!w){if(1==_)continue t;break t}}p[f++]=m}return p},Nn.prototype.at=fs,Nn.prototype.chain=function(){return ls(this)},Nn.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Nn.prototype.next=function(){this.__values__===i&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Nn.prototype.plant=function(t){for(var e,n=this;n instanceof jn;){var r=No(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Nn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Gn){var e=t;return this.__actions__.length&&(e=new Gn(this)),(e=e.reverse()).__actions__.push({func:hs,args:[Zo],thisArg:i}),new Bn(e,this.__chain__)}return this.thru(Zo)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,Zt&&(Nn.prototype[Zt]=function(){return this}),Nn}();he._=fn,(r=function(){return fn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},464:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AxiosServerError=e.AxiosError=void 0;const r=n(749);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}}},749:(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{}},746: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(669)),o=r(n(486)),s=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=o.default.omit(t.toJSON(),"config");if(t.response){const n=o.default.pick(t.response,["data","status","statusText"]);throw new s.AxiosServerError(n,e)}throw new s.AxiosError(`Axios: ${t.message}`,e)}throw t}}}},310: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(669)),o=n(134);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 s={[o.Environment.Staging]:e.API_STAGING_HOST,[o.Environment.UAT]:e.API_UAT_HOST,[o.Environment.Prod]:e.API_PROD_HOST},a={[o.Environment.Staging]:e.STAGING_API_KEY,[o.Environment.UAT]:e.UAT_API_KEY,[o.Environment.Prod]:e.PROD_API_KEY};e.MIVA_PROCTOR_SERVICE_ENDPOINT=e.API_STAGING_HOST,e.createAxios=t=>{const e=s[t],n=a[t];return i.default.create({baseURL:e,headers:{"Content-Type":"application/json","x-api-key":n},timeout:3e4})}},726:(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"}}},338:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctorMetricService=void 0;const r=n(746),i=n(310),o=n(726);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:o.CONFIG.API_SESSIONS_PATH.START_SESSION,method:"POST",data:t})}async getSessions(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_SESSIONS_PATH.SESSIONS,method:"GET",data:t})}async getActiveSessions(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_SESSIONS_PATH.SESSIONS_ACTIVE,method:"GET",params:{studentId:t}})}async endSession(t){return await this.axiosWrapper.makeRequest({url:o.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:o.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:o.CONFIG.API_SESSIONS_PATH.DELETE_SESSION.replace(":id",t),method:"DELETE"})}async updateActivities(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES,method:"POST",data:t})}async updateMultipleActivities(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_ACTIVITIES_PATH.MULTIPLE_ACTIVITIES,method:"POST",data:{activities:t.data}})}async getActivityMetrics(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES_METRICS,method:"POST",data:t})}async getActivities(t){return await this.axiosWrapper.makeRequest({url:o.CONFIG.API_ACTIVITIES_PATH.ACTIVITIES,method:"GET",params:t})}}},200:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},108: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(338),e),i(n(200),e),i(n(726),e),i(n(310),e),i(n(746),e)},763:(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.events=t,this.isSEB=this.detectSEB()}detectSEB(){const t=navigator.userAgent.toLowerCase();return t.includes("seb")||t.includes("safe exam browser")}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)console.log("Using SEB-compatible audio detection"),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}):(console.warn("No supported MIME types found for MediaRecorder, using default"),this.recorder=new MediaRecorder(this.mediaStream)),this.recorder.ondataavailable=t=>{t.data.size>0&&this.recordedChunks.push(t.data)},this.recorder.onstop=()=>{const t=new Blob(this.recordedChunks,{type:"audio/webm"});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()}}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<35;n++)n<t.length&&(e+=t[n],i++);let o=(i>0?e/i:0)/255;o=Math.pow(o,.6),o<.005&&(o=0),this.meter.volume=o,this.sampleThresholdsDecision(r.muteVolume,r.speakingMinVolume)}),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.sampleThresholdsDecision(r.muteVolume,r.speakingMinVolume)}),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,o=0;o<r;o++)e=n[o],Math.abs(e)>=this.meter.clipLevel&&(this.meter.clipping=!0,this.meter.lastClip=window.performance.now()),i+=e*e;var s=Math.sqrt(i/r);this.meter.volume=Math.max(s,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"),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)}))}}},415:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FaceDetector=void 0;const r=n(811);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(135);Object.defineProperty(e,"PossibleViolation",{enumerable:!0,get:function(){return r.PossibleViolation}});const i=n(763),o=n(415),s=n(410);Object.defineProperty(e,"MediaPermissions",{enumerable:!0,get:function(){return s.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=s.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 o.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=s.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=s.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,o)=>{const s=setTimeout((()=>{console.error("Screenshot timeout - likely blocked by SEB"),i(this.takeScreenshotFallback(t))}),1e4);e.addEventListener("loadeddata",(async()=>{try{const{videoWidth:o,videoHeight:a}=e,u=Math.floor(.75*o),c=Math.floor(.75*a);n.width=u,n.height=c,await e.play(),r.drawImage(e,0,0,u,c),"function"==typeof n.toBlob?n.toBlob((e=>{clearTimeout(s),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(s),i(this.takeScreenshotFallback(t)))}catch(e){console.error("Error taking screenshot:",e),clearTimeout(s),i(this.takeScreenshotFallback(t))}})),e.addEventListener("error",(e=>{console.error("Video error during screenshot:",e),clearTimeout(s),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)}}},410:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MediaPermissions=void 0;const r=n(763);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},432: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(108),e),i(n(383),e),i(n(921),e)},863:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProctoringManager=void 0;const r=n(108),i=n(410);class o{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 o.instance||(o.instance=new o(t)),o.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=o},383: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(863),e)},134:(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"},921: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(134),e),i(n(135),e)},135:(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"},811:(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 o,s;const a="undefined"!=typeof TextDecoder;let u;const c="undefined"!=typeof TextEncoder;function l(t){if(c)t=(u||=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 o=t.charCodeAt(++i);if(o>=56320&&o<=57343){e=1024*(e-55296)+o-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 h,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];h=null!=v&&v;const y=n.navigator;function _(t){return!!h&&!!m&&m.brands.some((({brand:e})=>e&&-1!=e.indexOf(t)))}function w(t){var e;return(e=n.navigator)&&(e=e.userAgent)||(e=""),-1!=e.indexOf(t)}function b(){return!!h&&!!m&&m.brands.length>0}function E(){return b()?_("Chromium"):(w("Chrome")||w("CriOS"))&&!(!b()&&w("Edge"))||w("Silk")}function S(t){return S[" "](t),t}m=y&&y.userAgentData||null,S[" "]=function(){};var A=!b()&&(w("Trident")||w("MSIE"));!w("Android")||E(),E(),w("Safari")&&(E()||!b()&&w("Coast")||!b()&&w("Opera")||!b()&&w("Edge")||(b()?_("Microsoft Edge"):w("Edg/"))||b()&&_("Opera"));var T={},k=null;function x(){if(!k){k={};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===k[e]&&(k[e]=t)}}}}var I="undefined"!=typeof Uint8Array,P=!A&&"function"==typeof btoa;function O(t){if(!P){var e;void 0===e&&(e=0),x(),e=T[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let u=0,c=0;for(;u<t.length-2;u+=3){var i=t[u],o=t[u+1],s=t[u+2],a=e[i>>2];i=e[(3&i)<<4|o>>4],o=e[(15&o)<<2|s>>6],s=e[63&s],n[c++]=a+i+o+s}switch(a=0,s=r,t.length-u){case 2:s=e[(15&(a=t[u+1]))<<2]||r;case 1:t=t[u],n[c]=e[t>>2]+e[(3&t)<<4|a>>4]+s+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 M=/[-_.]/g,R={"-":"+",_:"/",".":"="};function L(t){return R[t]||""}function C(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=k[e];if(null!=n)return n;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}x();let r=0;for(;;){const t=n(-1),r=n(0),i=n(64),o=n(64);if(64===o&&-1===t)break;e(t<<2|r>>4),64!=i&&(e(r<<4&240|i>>2),64!=o&&e(i<<6&192|o))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}(t);M.test(t)&&(t=t.replace(M,L)),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 F(t){return I&&null!=t&&t instanceof Uint8Array}var D={};function N(){return B||=new j(null,D)}function U(t){V(D);var e=t.g;return null==(e=null==e||F(e)?e:"string"==typeof e?C(e):null)?e:t.g=e}var j=class{h(){return new Uint8Array(U(this)||0)}constructor(t,e){if(V(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};let B,G;function V(t){if(t!==D)throw Error("illegal external caller")}function z(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function W(t){return z(t=Error(t),"warning"),t}var H="function"==typeof Symbol&&"symbol"==typeof Symbol(),q=new Set;function X(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&&q.add(t),t}var $=X("jas",void 0,!0,!0),K=X(void 0,"0di"),Y=X(void 0,"2ex"),J=X(void 0,"1oa",!0),Z=X(void 0,Symbol(),!0);const Q=H?$:"Ga",tt={Ga:{value:0,configurable:!0,writable:!0,enumerable:!1}},et=Object.defineProperties;function nt(t,e){H||Q in t||et(t,tt),t[Q]|=e}function rt(t,e){H||Q in t||et(t,tt),t[Q]=e}function it(t){return nt(t,34),t}function ot(t,e){rt(e,-30975&(0|t))}function st(t,e){rt(e,-30941&(34|t))}function at(){return"function"==typeof BigInt}function ut(t){return Array.prototype.slice.call(t)}var ct,lt={},ht={};function ft(t){return!(!t||"object"!=typeof t||t.Ia!==ht)}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 j(t,D):N();else if(t.constructor!==j)if(F(t))t=t.length?new j(new Uint8Array(t),D):N();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),ct=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 wt=Object.freeze({});function bt(t){return t.Qa=!0,t}var Et=bt((t=>"number"==typeof t)),St=bt((t=>"string"==typeof t)),At=bt((t=>"boolean"==typeof t)),Tt="function"==typeof n.BigInt&&"bigint"==typeof n.BigInt(0),kt=bt((t=>Tt?t>=It&&t<=Ot:"-"===t[0]?Mt(t,xt):Mt(t,Pt)));const xt=Number.MIN_SAFE_INTEGER.toString(),It=Tt?BigInt(Number.MIN_SAFE_INTEGER):void 0,Pt=Number.MAX_SAFE_INTEGER.toString(),Ot=Tt?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Mt(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 Rt="function"==typeof Uint8Array.prototype.slice;let Lt,Ct=0,Ft=0;function Dt(t){const e=t>>>0;Ct=e,Ft=(t-e)/4294967296>>>0}function Nt(t){if(t<0){Dt(-t);const[e,n]=Wt(Ct,Ft);Ct=e>>>0,Ft=n>>>0}else Dt(t)}function Ut(t){const e=Lt||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),Ft=0,Ct=e.getUint32(0,!0)}function jt(t,e){const n=4294967296*e+(t>>>0);return Number.isSafeInteger(n)?n:Gt(t,e)}function Bt(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),"number"==typeof(t=jt(t,e))?n?-t:t:n?"-"+t:t}function Gt(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+Vt(n)+Vt(t));return n}function Vt(t){return t=String(t),"0000000".slice(t.length)+t}function zt(t){if(t.length<16)Nt(Number(t));else if(at())t=BigInt(t),Ct=Number(t&BigInt(4294967295))>>>0,Ft=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);Ft=Ct=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));Ft*=1e6,Ct=1e6*Ct+e,Ct>=4294967296&&(Ft+=Math.trunc(Ct/4294967296),Ft>>>=0,Ct>>>=0)}if(e){const[t,e]=Wt(Ct,Ft);Ct=t,Ft=e}}}function Wt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}const Ht="function"==typeof BigInt?BigInt.asIntN:void 0,qt="function"==typeof BigInt?BigInt.asUintN:void 0,Xt=Number.isSafeInteger,$t=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 $t(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 $t(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 $t(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),Xt(t)||(Nt(t),t=Bt(Ct,Ft)),t}function ie(t){var e=Kt(Number(t));if(Xt(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(zt(t),t=Ct,2147483648&(e=Ft))if(at())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=Wt(t,e);t="-"+Gt(n,r)}else t=Gt(t,e);return t}function oe(t){return null==t?t:"bigint"==typeof t?(kt(t)?t=Number(t):(t=Ht(64,t),t=kt(t)?Number(t):String(t)),t):Qt(t)?"number"==typeof t?re(t):ie(t):void 0}function se(t){if("string"!=typeof t)throw Error();return t}function ae(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function ue(t){return null==t||"string"==typeof t?t:void 0}function ce(t,e,n,r){if(null!=t&&"object"==typeof t&&t.W===lt)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 le(t,e,n){if(e)t:{if(!Qt(e=t))throw W("int64");switch(typeof e){case"string":e=ie(e);break t;case"bigint":if(t=e=Ht(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):At(e)?e?"1":"0":St(e)?e.trim()||"0":String(e);break t;default:e=re(e)}}else e=oe(t);return"string"==typeof(n=null==(t=e)?n?0:void 0:t)&&Xt(e=+n)?e:n}const he={};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 o=0;o<t.length;o++){const s=t[o],a=n(s[0],!1,!0);let u=s[1];e?void 0===u&&(u=null):u=r(s[1],!1,!0,void 0,void 0,i),super.set(a,u)}}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,we,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,o){return t=ce(t,r,n,o),i&&(t=Ce(t)),t}function _e(t){return t}function we(t){return[t,this.get(t)]}let be,Ee,Se;function Ae(){return be||=new ve(it([]),void 0,void 0,void 0,he)}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:ke(t,e,n,void 0!==r,i);else if(dt(t)){const o={};for(let s in t)o[s]=Te(t[s],e,n,r,i);t=o}else t=e(t,r);return t}}function ke(t,e,n,r,i){const o=r||n?0|t[Q]:0,s=r?!!(32&o):void 0;r=ut(t);for(let t=0;t<r.length;t++)r[t]=Te(r[t],e,n,s,i);return n&&((t=_t(t))&&(r[Z]=ut(t)),n(o,r)),r}function xe(t){return Te(t,Ie,void 0,void 0,!1)}function Ie(t){return t.W===lt?t.toJSON():t instanceof ve?t.na(xe):function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"bigint":return kt(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(F(t))return O(t);if(t instanceof j){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 ke(t,Ie,void 0,void 0,!1)}function Oe(t,e,n){return t=Me(t,e[0],e[1],n?1:2),e!==Ee&&n&&nt(t,16384),t}function Me(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 Re(t,e,n=st){if(null!=t){if(I&&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):ke(t,Re,4&r?st:n,!0,!0))}return t.W===lt?t=2&(r=0|(n=t.u)[Q])?t:new t.constructor(Le(n,r,!0)):t instanceof ve&&!(2&t.L)&&(n=it(t.X(Re)),t=new ve(n,t.S,t.R,t.Y)),t}}function Le(t,e,n){const r=n||2&e?st:ot,i=!!(32&e);return t=function(t,e,n){const r=ut(t);var i=r.length;const o=256&e?r[i-1]:void 0;for(i+=o?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(o){e=r[e]={};for(const t in o)e[t]=n(o[t])}return(t=_t(t))&&(r[Z]=ut(t)),r}(t,e,(t=>Re(t,i,r))),nt(t,32|(n?2:0)),t}function Ce(t){const e=t.u,n=0|e[Q];return 2&n?new t.constructor(Le(e,n,!1)):t}function Fe(t,e){return De(t=t.u,0|t[Q],e)}function De(t,e,r,i){if(-1===r)return null;var o=r+(512&e?0:-1);const s=t.length-1;return o>=s&&256&e?t[s][r]:i&&256&e&&null!=(e=t[s][r])?(null!=t[o]&&null!=Y&&((o=(t=G??={})[Y]||0)>=4||(t[Y]=o+1,z(t=Error(),"incident"),function(t){n.setTimeout((()=>{throw t}),0)}(t))),e):o<=s?t[o]:void 0}function Ne(t,e,n){const r=t.u;let i=0|r[Q];return vt(i),Ue(r,i,e,n),t}function Ue(t,e,n,r){const i=512&e?0:-1,o=n+i;var s=t.length-1;return o>=s&&256&e?(t[s][n]=r,e):o<=s?(t[o]=r,256&e&&n in(t=t[s])&&delete t[n],e):(void 0!==r&&(n>=(s=e>>15&1023||536870912)?null!=r&&(t[s+i]={[n]:r},rt(t,e|=256)):t[o]=r),e)}function je(t,e){let n=0|(t=t.u)[Q];const r=De(t,n,e),i=Yt(r);return null!=i&&i!==r&&Ue(t,n,e,i),i}function Be(t){let e=0|(t=t.u)[Q];const n=De(t,e,1),r=pt(n,!0);return null!=r&&r!==n&&Ue(t,e,1,r),r}function Ge(){return void 0===wt?2:4}function Ve(t,e,n,r,i){const o=t.u,s=2&(t=0|o[Q])?1:r;i=!!i;let a=0|(r=ze(o,t,e))[Q];if(!(4&a)){4&a&&(r=ut(r),a=an(a,t),t=Ue(o,t,e,r));let i=0,s=0;for(;i<r.length;i++){const t=n(r[i]);null!=t&&(r[s++]=t)}s<i&&(r.length=s),a=We(a,t),n=-4097&(20|a),a=n&=-8193,rt(r,a),2&a&&Object.freeze(r)}return 1===s||4===s&&32&a?He(a)||(i=a,a|=2,a!==i&&rt(r,a),Object.freeze(r)):(2===s&&He(a)&&(r=ut(r),a=an(a,t),a=un(a,t,i),rt(r,a),t=Ue(o,t,e,r)),He(a)||(e=a,a=un(a,t,i),a!==e&&rt(r,a))),r}function ze(t,e,n,r){return t=De(t,e,n,r),Array.isArray(t)?t:ct}function We(t,e){return 0===t&&(t=an(t,e)),1|t}function He(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function qe(t){t=ut(t);for(let e=0;e<t.length;e++){const n=t[e]=ut(t[e]);Array.isArray(n[1])&&(n[1]=it(n[1]))}return t}function Xe(t,e,n,r){let i=0|(t=t.u)[Q];vt(i),Ue(t,i,e,("0"===r?0===Number(n):n===r)?void 0:n)}function $e(t,e,n,r,i){vt(e);var o=!(!(64&e)&&16384&e);const s=(i=ze(t,e,n,i))!==ct;if(o||!s){let a=o=s?0|i[Q]:0;(!s||2&a||He(a)||4&a&&!(32&a))&&(i=ut(i),a=an(a,e),e=Ue(t,e,n,i)),a=-13&We(a,e),a=un(r?-17&a:16|a,e,!0),a!==o&&rt(i,a)}return i}function Ke(t,e){var n=wo;return Ze(Ye(t=t.u),t,0|t[Q],n)===e?e:-1}function Ye(t){if(H)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),o=Ze(i,t,e,n);return o!==r&&(o&&(e=Ue(t,e,o)),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 o=r[t];null!=De(e,n,o)&&(0!==i&&(n=Ue(e,n,i)),i=o)}return t.set(r,i),i}function Qe(t,e,n,r){let i,o=0|t[Q];if(null!=(r=De(t,o,n,r))&&r.W===lt)return(e=Ce(r))!==r&&Ue(t,o,n,e),e.u;if(Array.isArray(r)){const t=0|r[Q];i=2&t?Oe(Le(r,t,!1),e,!0):64&t?r:Oe(i,e,!0)}else i=Oe(void 0,e,!0);return i!==r&&Ue(t,o,n,i),i}function tn(t,e,n,r){let i=0|(t=t.u)[Q];return(e=ce(r=De(t,i,n,r),e,!1,i))!==r&&null!=e&&Ue(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=Ce(e);i!==e&&Ue(t,r,n,e=i)}return e}function nn(t,e,n,r,i,o,s){t=t.u;var a=!!(2&e);const u=a?1:i;o=!!o,s&&=!a;var c=0|(i=ze(t,e,r))[Q];if(!(a=!!(4&c))){var l=i,h=e;const t=!!(2&(c=We(c,e)));t&&(h|=2);let r=!t,o=!0,s=0,a=0;for(;s<l.length;s++){const e=ce(l[s],n,!1,h);if(e instanceof n){if(!t){const t=!!(2&(0|e.u[Q]));r&&=!t,o&&=t}l[a++]=e}}a<s&&(l.length=a),c|=4,c=o?16|c:-17&c,rt(l,c=r?8|c:-9&c),t&&Object.freeze(l)}if(s&&!(8&c||!i.length&&(1===u||4===u&&32&c))){for(He(c)&&(i=ut(i),c=an(c,e),e=Ue(t,e,r,i)),n=i,s=c,l=0;l<n.length;l++)(c=n[l])!==(h=Ce(c))&&(n[l]=h);s|=8,rt(n,s=n.length?-17&s:16|s),c=s}return 1===u||4===u&&32&c?He(c)||(e=c,(c|=!i.length||16&c&&(!a||32&c)?2:2048)!==e&&rt(i,c),Object.freeze(i)):(2===u&&He(c)&&(rt(i=ut(i),c=un(c=an(c,e),e,o)),e=Ue(t,e,r,i)),He(c)||(r=c,(c=un(c,e,o))!==r&&rt(i,c))),i}function rn(t,e,n){const r=0|t.u[Q];return nn(t,r,e,n,Ge(),!1,!(2&r))}function on(t,e,n,r){return null==r&&(r=void 0),Ne(t,n,r)}function sn(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);Ue(t,i,e,r)}}function an(t,e){return-2049&(32|(2&e?2|t:-3&t))}function un(t,e,n){return 32&e&&n||(t&=-33),t}function cn(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 ln(t,e){return te(Fe(t,e))}function hn(t,e){return ue(Fe(t,e))}function fn(t,e){return je(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}`);Ne(t,e,n)}function pn(t,e,n){if(null!=n){if("number"!=typeof n)throw W("int32");if(!$t(n))throw W("int32");n|=0}Ne(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}`);Ne(t,e,n)}function mn(t,e,n){{const s=t.u;let a=0|s[Q];if(vt(a),null==n)Ue(s,a,e);else{var r=t=0|n[Q],i=He(t),o=i||Object.isFrozen(n);for(i||(t=0),o||(n=ut(n),r=0,t=un(t=an(t,a),a,!0),o=!1),t|=21,i=0;i<n.length;i++){const e=n[i],s=se(e);Object.is(e,s)||(o&&(n=ut(n),r=0,t=un(t=an(t,a),a,!0),o=!1),n[i]=s)}t!==r&&(o&&(n=ut(n),t=un(t=an(t,a),a,!0)),rt(n,t)),Ue(s,a,e,n)}}}function vn(t,e,n){vt(0|t.u[Q]),Ve(t,e,ue,2,!0).push(se(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 wn(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function bn(t){if("string"==typeof t)return{buffer:C(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===j)return{buffer:U(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,o=0;const s=t.h;let a=t.g;do{n=s[a++],r|=(127&n)<<o,o+=7}while(o<32&&128&n);for(o>32&&(i|=(127&n)>>4),o=3;o<32&&128&n;o+=7)n=s[a++],i|=(127&n)<<o;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 An(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 An(t)>>>0}function kn(t){var e=t.h;const n=t.g,r=e[n],i=e[n+1],o=e[n+2];return e=e[n+3],On(t,t.g+4),(r<<0|i<<8|o<<16|e<<24)>>>0}function xn(t){var e=kn(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 In(t){return An(t)}function Pn(t,e,{ba:n=!1}={}){t.ba=n,e&&(e=bn(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 wn(t.l,e)}function Mn(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 wn(e,t.l-n);return t.g=r,n}function Rn(t,e){if(0==e)return N();var n=Mn(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):Rt?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?N():new j(n,D)}ve.prototype.toJSON=void 0,ve.prototype.Ia=ht;var Ln=[];function Cn(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 Fn(t){switch(t.h){case 0:0!=t.h?Fn(t):Sn(t.g);break;case 1:On(t=t.g,t.g+8);break;case 2:if(2!=t.h)Fn(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(!Cn(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.m!=e)throw Error("Unmatched end-group tag");break}Fn(t)}break;default:throw yn(t.h,t.l)}}function Dn(t,e,n){const r=t.g.l,i=Tn(t.g),o=t.g.g+i;let s=o-r;if(s<=0&&(t.g.l=o,n(e,t,void 0,void 0,void 0),s=o-t.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-s} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=o,t.g.l=r,e}function Nn(t){var e=Tn(t.g),n=Mn(t=t.g,e);if(t=t.h,a){var u,c=t;(u=s)||(u=s=new TextDecoder("utf-8",{fatal:!0})),e=n+e,c=0===n&&e===c.length?c:c.subarray(n,e);try{var l=u.decode(c)}catch(t){if(void 0===o){try{u.decode(new Uint8Array([128]))}catch(t){}try{u.decode(new Uint8Array([97])),o=!0}catch(t){o=!1}}throw!o&&(s=void 0),t}}else{e=(l=n)+e,n=[];let o,s=null;for(;l<e;){var h=t[l++];h<128?n.push(h):h<224?l>=e?r():(o=t[l++],h<194||128!=(192&o)?(l--,r()):n.push((31&h)<<6|63&o)):h<240?l>=e-1?r():(o=t[l++],128!=(192&o)||224===h&&o<160||237===h&&o>=160||128!=(192&(u=t[l++]))?(l--,r()):n.push((15&h)<<12|(63&o)<<6|63&u)):h<=244?l>=e-2?r():(o=t[l++],128!=(192&o)||o-144+(h<<28)>>30!=0||128!=(192&(u=t[l++]))||128!=(192&(c=t[l++]))?(l--,r()):(h=(7&h)<<18|(63&o)<<12|(63&u)<<6|63&c,h-=65536,n.push(55296+(h>>10&1023),56320+(1023&h)))):r(),n.length>=8192&&(s=i(s,n),n.length=0)}l=i(s,n)}return l}function Un(t){const e=Tn(t.g);return Rn(t.g,e)}function jn(t,e,n){var r=Tn(t.g);for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var Bn=[];function Gn(t){return t}let Vn;function zn(t,e,n){e.g?e.m(t,e.g,e.h,n):e.m(t,e.h,n)}var Wn=class{constructor(t,e){this.u=Me(t,e)}toJSON(){const t=!Vn;try{return t&&(Vn=Pe),Hn(this)}finally{t&&(Vn=void 0)}}l(){var t=gs;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(Le(t,0|t[Q],!1))}N(){return!!(2&(0|this.u[Q]))}};function Hn(t){var e=t.u;{e=(t=Vn(e))!==e;let c=t.length;if(c){var n=t[c-1],r=dt(n);r?c--:n=void 0;var i=t;if(r){t:{var o,s=n,a=!1;if(s)for(let t in s)isNaN(+t)?(o??={})[t]=s[t]:(r=s[t],Array.isArray(r)&&(gt(r)||ft(r)&&0===r.size)&&(r=null),null==r&&(a=!0),null!=r&&((o??={})[t]=r));if(a||(o=s),o)for(let t in o){a=o;break t}a=null}s=null==a?null!=n:a!==n}for(;c>0&&(null==(o=i[c-1])||gt(o)||ft(o)&&0===o.size);c--)var u=!0;(i!==t||s||u)&&(e?(u||s||a)&&(i.length=c):i=Array.prototype.slice.call(i,0,c),a&&i.push(a)),u=i}else u=t}return u}function qn(t){return t?/^\d+$/.test(t)?(zt(t),new Xn(Ct,Ft)):null:$n||=new Xn(0,0)}Wn.prototype.W=lt,Wn.prototype.toString=function(){try{return Vn=Gn,Hn(this).toString()}finally{Vn=void 0}};var Xn=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let $n;function Kn(t){return t?/^-?\d+$/.test(t)?(zt(t),new Yn(Ct,Ft)):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 or(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 sr(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),or(t,e))}function ur(){const t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var cr=ur(),lr=ur(),hr=ur(),fr=ur(),dr=ur(),pr=ur(),gr=ur(),mr=ur(),vr=ur(),yr=class{constructor(t,e,n){this.g=t,this.h=e,t=cr,this.l=!!t&&n===t||!1}};function _r(t,e){return new yr(t,e,cr)}function wr(t,e,n,r,i){ar(t,n,Mr(e,r),i)}const br=_r((function(t,e,n,r,i){return 2===t.h&&(Dn(t,Qe(e,r,n),i),!0)}),wr),Er=_r((function(t,e,n,r,i){return 2===t.h&&(Dn(t,Qe(e,r,n,!0),i),!0)}),wr);var Sr=Symbol(),Ar=Symbol(),Tr=Symbol(),kr=Symbol();let xr,Ir;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 o=r[1];let s=1;o&&o.constructor===Object&&(i.ga=o,"function"==typeof(o=r[++s])&&(i.la=!0,xr??=o,Ir??=r[s+1],o=r[s+=2]));const a={};for(;o&&Array.isArray(o)&&o.length&&"number"==typeof o[0]&&o[0]>0;){for(var u=0;u<o.length;u++)a[o[u]]=o;o=r[++s]}for(u=1;void 0!==o;){let t;"number"==typeof o&&(u+=o,o=r[++s]);var c=void 0;if(o instanceof yr?t=o:(t=br,s--),t?.l){o=r[++s],c=r;var l=s;"function"==typeof o&&(o=o(),c[l]=o),c=o}for(l=u+1,"number"==typeof(o=r[++s])&&o<0&&(l-=o,o=r[++s]);u<l;u++){const r=a[u];c?n(i,u,t,c,r):e(i,u,t,r)}}return r[t]=i}function Or(t){return Array.isArray(t)?t[0]instanceof yr?t:[Er,t]:[t,void 0]}function Mr(t,e){return t instanceof Wn?t.u:Array.isArray(t)?Oe(t,e,!1):void 0}function Rr(t,e,n,r){const i=n.g;t[e]=r?(t,e,n)=>i(t,e,n,r):i}function Lr(t,e,n,r,i){const o=n.g;let s,a;t[e]=(t,e,n)=>o(t,e,n,a||=Pr(Ar,Rr,Lr,r).V,s||=Cr(r),i)}function Cr(t){let e=t[Tr];if(null!=e)return e;const n=Pr(Ar,Rr,Lr,t);return e=n.la?(t,e)=>xr(t,e,n):(t,e)=>{const r=0|t[Q];for(;Cn(e)&&4!=e.h;){var i=e.m,o=n[i];if(null==o){var s=n.ga;s&&(s=s[i])&&null!=(s=Fr(s))&&(o=n[i]=s)}null!=o&&o(e,t,i)||(i=(o=e).l,Fn(o),o.fa?o=void 0:(s=o.g.g-i,o.g.g=i,o=Rn(o.g,s)),i=t,o&&((s=i[Z])?s.push(o):i[Z]=[o]))}return 16384&r&&it(t),!0},t[Tr]=e}function Fr(t){const e=(t=Or(t))[0].g;if(t=t[1]){const n=Cr(t),r=Pr(Ar,Rr,Lr,t).V;return(t,i,o)=>e(t,i,o,r,n)}return e}function Dr(t,e,n){t[e]=n.h}function Nr(t,e,n,r){let i,o;const s=n.h;t[e]=(t,e,n)=>s(t,e,n,o||=Pr(Sr,Dr,Nr,r).V,i||=Ur(r))}function Ur(t){let e=t[kr];if(!e){const n=Pr(Sr,Dr,Nr,t);e=(t,e)=>jr(t,e,n),t[kr]=e}return e}function jr(t,e,n){for(var r=0|t[Q],i=512&r?0:-1,o=t.length,s=512&r?1:0,a=o+(256&r?-1:0);s<a;s++){const r=t[s];if(null==r)continue;const o=s-i,a=Br(n,o);a&&a(e,r,o)}if(256&r){r=t[o-1];for(const t in r)i=+t,Number.isNaN(i)||null!=(o=r[i])&&(a=Br(n,i))&&a(e,o,i)}if(t=_t(t))for(nr(e,e.g.end()),n=0;n<t.length;n++)nr(e,U(t[n])||new Uint8Array(0))}function Br(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=Ur(n),i=Pr(Sr,Dr,Nr,n).V;n=t.la?Ir(i,e):(t,n,o)=>r(t,n,o,i,e)}else n=r;return t[e]=n}}function Gr(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 Vr(t,e,n){return new yr(t,e,n)}function zr(t,e,n){return new yr(t,e,n)}function Wr(t,e,n){Ue(t,0|t[Q],e,n)}var Hr=_r((function(t,e,n,r,i){return 2===t.h&&(t=Dn(t,Oe([void 0,void 0],r,!0),i),vt(r=0|e[Q]),(i=De(e,r,n))instanceof ve?0!=(2&i.L)?((i=i.X()).push(t),Ue(e,r,n,i)):i.Na(t):Array.isArray(i)?(2&(0|i[Q])&&Ue(e,r,n,i=qe(i)),i.push(t)):Ue(e,r,n,[t]),!0)}),(function(t,e,n,r,i){if(e instanceof ve)e.forEach(((e,o)=>{ar(t,n,Oe([o,e],r,!1),i)}));else if(Array.isArray(e))for(let o=0;o<e.length;o++){const s=e[o];Array.isArray(s)&&ar(t,n,Oe(s,r,!1),i)}}));function qr(t,e,n){if(e=function(t){if(null==t)return t;const e=typeof t;if("bigint"===e)return String(Ht(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,Nt(e),Zn(t,Ct,Ft);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 Xr(t,e,n){null!=(e=te(e))&&null!=e&&(rr(t,n,0),tr(t.g,e))}function $r(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=ue(e))&&sr(t,n,l(e))}function Yr(t,e,n,r,i){ar(t,n,Mr(e,r),i)}function Jr(t,e,n){null!=(e=null==e||"string"==typeof e||F(e)||e instanceof j?e:void 0)&&sr(t,n,bn(e).buffer)}function Zr(t,e,n){return(5===t.h||2===t.h)&&(e=$e(e,0|e[Q],n,!1,!1),2==t.h?jn(t,xn,e):e.push(xn(t.g)),!0)}var Qr=Vr((function(t,e,n){if(1!==t.h)return!1;var r=t.g;t=kn(r);const i=kn(r);r=2*(i>>31)+1;const o=i>>>20&2047;return t=4294967296*(1048575&i)+t,Wr(e,n,2047==o?t?NaN:r*(1/0):0==o?5e-324*r*t:r*Math.pow(2,o-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=Yt(e))&&(rr(t,n,1),t=t.g,(n=Lt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),Ct=n.getUint32(0,!0),Ft=n.getUint32(4,!0),er(t,Ct),er(t,Ft))}),ur()),ti=Vr((function(t,e,n){return 5===t.h&&(Wr(e,n,xn(t.g)),!0)}),(function(t,e,n){null!=(e=Yt(e))&&(rr(t,n,5),t=t.g,Ut(e),er(t,Ct))}),gr),ei=zr(Zr,(function(t,e,n){if(null!=(e=Gr(Yt,e)))for(let s=0;s<e.length;s++){var r=t,i=n,o=e[s];null!=o&&(rr(r,i,5),r=r.g,Ut(o),er(r,Ct))}}),gr),ni=zr(Zr,(function(t,e,n){if(null!=(e=Gr(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,Ut(e[r]),er(n,Ct)}}),gr),ri=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,En(t.g,Bt)),!0)}),qr,pr),ii=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,0===(t=En(t.g,Bt))?void 0:t),!0)}),qr,pr),oi=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,En(t.g,jt)),!0)}),(function(t,e,n){if(null!=(e=function(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(qt(64,t));if(Qt(t)){if("string"===e)return e=Kt(Number(t)),Xt(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),ne(t)||(zt(t),t=Gt(Ct,Ft))),t;if("number"===e)return(t=Kt(t))>=0&&Xt(t)?t:function(t){if(t<0){Nt(t);var e=Gt(Ct,Ft);return t=Number(e),Xt(t)?t:e}return ne(e=String(t))?e:(Nt(t),jt(Ct,Ft))}(t)}}(e))&&("string"==typeof e&&qn(e),null!=e))switch(rr(t,n,0),typeof e){case"number":t=t.g,Nt(e),Zn(t,Ct,Ft);break;case"bigint":n=BigInt.asUintN(64,e),n=new Xn(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Zn(t.g,n.h,n.g);break;default:n=qn(e),Zn(t.g,n.h,n.g)}}),ur()),si=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,An(t.g)),!0)}),Xr,fr),ai=zr((function(t,e,n){return(0===t.h||2===t.h)&&(e=$e(e,0|e[Q],n,!1,!1),2==t.h?jn(t,An,e):e.push(An(t.g)),!0)}),(function(t,e,n){if(null!=(e=Gr(te,e))&&e.length){n=ir(t,n);for(let n=0;n<e.length;n++)tr(t.g,e[n]);or(t,n)}}),fr),ui=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,0===(t=An(t.g))?void 0:t),!0)}),Xr,fr),ci=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,Sn(t.g)),!0)}),$r,lr),li=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,!1===(t=Sn(t.g))?void 0:t),!0)}),$r,lr),hi=zr((function(t,e,n){return 2===t.h&&(t=Nn(t),$e(e,0|e[Q],n,!1).push(t),!0)}),(function(t,e,n){if(null!=(e=Gr(ue,e)))for(let s=0;s<e.length;s++){var r=t,i=n,o=e[s];null!=o&&sr(r,i,l(o))}}),hr),fi=Vr((function(t,e,n){return 2===t.h&&(Wr(e,n,""===(t=Nn(t))?void 0:t),!0)}),Kr,hr),di=Vr((function(t,e,n){return 2===t.h&&(Wr(e,n,Nn(t)),!0)}),Kr,hr),pi=function(t,e,n=cr){return new yr(t,e,n)}((function(t,e,n,r,i){return 2===t.h&&(r=Oe(void 0,r,!0),$e(e,0|e[Q],n,!0).push(r),Dn(t,r,i),!0)}),(function(t,e,n,r,i){if(Array.isArray(e))for(let o=0;o<e.length;o++)Yr(t,e[o],n,r,i)})),gi=_r((function(t,e,n,r,i,o){return 2===t.h&&(Je(e,0|e[Q],o,n),Dn(t,e=Qe(e,r,n),i),!0)}),Yr),mi=Vr((function(t,e,n){return 2===t.h&&(Wr(e,n,Un(t)),!0)}),Jr,mr),vi=zr((function(t,e,n){return(0===t.h||2===t.h)&&(e=$e(e,0|e[Q],n,!1,!1),2==t.h?jn(t,Tn,e):e.push(Tn(t.g)),!0)}),(function(t,e,n){if(null!=(e=Gr(ee,e)))for(let s=0;s<e.length;s++){var r=t,i=n,o=e[s];null!=o&&(rr(r,i,0),Qn(r.g,o))}}),dr),yi=Vr((function(t,e,n){return 0===t.h&&(Wr(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=Vr((function(t,e,n){return 0===t.h&&(Wr(e,n,An(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 wi{constructor(t,e){this.h=t,this.g=e,this.l=en,this.m=on,this.defaultValue=void 0}}function bi(t,e){return new wi(t,e)}function Ei(t,e){return(n,r)=>{if(Bn.length){const t=Bn.pop();t.o(r),Pn(t.g,n,r),n=t}else n=new class{constructor(t,e){if(Ln.length){const n=Ln.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,o=r.u;Cr(e)(o,n);var i=r}finally{n.g.clear(),n.m=-1,n.h=-1,Bn.length<100&&Bn.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}}}};jr(this.u,e,Pr(Sr,Dr,Nr,t)),nr(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,i=r.length;let o=0;for(let t=0;t<i;t++){const e=r[t];n.set(e,o),o+=e.length}return e.l=[n],n}}var Ai=class extends Wn{constructor(t){super(t)}},Ti=[0,fi,Vr((function(t,e,n){return 2===t.h&&(Wr(e,n,(t=Un(t))===N()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof Wn){const r=e.Ra;return void(r&&(e=r(e),null!=e&&sr(t,n,bn(e).buffer)))}if(Array.isArray(e))return}Jr(t,e,n)}),mr)];let ki,xi=globalThis.trustedTypes;function Ii(t){void 0===ki&&(ki=function(){let t=null;if(!xi)return t;try{const e=t=>t;t=xi.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}());var e=ki;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 Ii(t[0]);let n=t[0];for(let r=0;r<e.length;r++)n+=encodeURIComponent(e[r])+t[r+1];return Ii(n)}var Oi=[0,si,_i,ci,-1,ai,_i,-1],Mi=class extends Wn{constructor(t){super(t)}},Ri=[0,ci,di,ci,_i,-1,zr((function(t,e,n){return(0===t.h||2===t.h)&&(e=$e(e,0|e[Q],n,!1,!1),2==t.h?jn(t,In,e):e.push(An(t.g)),!0)}),(function(t,e,n){if(null!=(e=Gr(te,e))&&e.length){n=ir(t,n);for(let n=0;n<e.length;n++)tr(t.g,e[n]);or(t,n)}}),vr),di,-1,[0,ci,-1],_i,ci,-1],Li=[0,di,-2],Ci=class extends Wn{constructor(t){super(t)}},Fi=[0],Di=[0,si,ci,1,ci,-3],Ni=class extends Wn{constructor(t){super(t,2)}},Ui={};Ui[336783863]=[0,di,ci,-1,si,[0,[1,2,3,4,5,6,7,8],gi,Fi,gi,Ri,gi,Li,gi,Di,gi,Oi,gi,[0,di,-2],gi,[0,di,_i],gi,[0,_i,di]],[0,di],ci,[0,[1,3],[2,4],gi,[0,ai],-1,gi,[0,hi],-1,pi,[0,di,-1]],di];var ji=[0,ii,-1,li,-3,ii,ai,fi,ui,ii,-1,li,ui,li,-2,fi];function Bi(t,e){Xe(t,2,ae(e),"")}function Gi(t,e){vn(t,3,e)}function Vi(t,e){vn(t,4,e)}var zi=class extends Wn{constructor(t){super(t,500)}o(t){return on(this,0,7,t)}},Wi=[-1,{}],Hi=[0,di,1,Wi],qi=[0,di,hi,Wi];function Xi(t,e){cn(t,1,zi,e)}function $i(t,e){vn(t,10,e)}function Ki(t,e){vn(t,15,e)}var Yi=class extends Wn{constructor(t){super(t,500)}o(t){return on(this,0,1001,t)}},Ji=[-500,pi,[-500,fi,-1,hi,-3,[-2,Ui,ci],pi,Ti,ui,-1,Hi,qi,pi,[0,fi,li],fi,ji,ui,hi,987,hi],4,pi,[-500,di,-1,[-1,{}],998,di],pi,[-500,di,hi,-1,[-2,{},ci],997,hi,-1],ui,pi,[-500,di,hi,Wi,998,hi],hi,ui,Hi,qi,pi,[0,fi,-1,Wi],hi,-2,ji,fi,-1,li,[0,li,yi],978,Wi,pi,Ti];Yi.prototype.g=Si(Ji);var Zi=Ei(Yi,Ji),Qi=class extends Wn{constructor(t){super(t)}},to=class extends Wn{constructor(t){super(t)}g(){return rn(this,Qi,1)}},eo=[0,pi,[0,si,ti,di,-1]],no=Ei(to,eo),ro=class extends Wn{constructor(t){super(t)}},io=class extends Wn{constructor(t){super(t)}},oo=class extends Wn{constructor(t){super(t)}h(){return en(this,ro,2)}g(){return rn(this,io,5)}},so=Ei(class extends Wn{constructor(t){super(t)}},[0,hi,ai,ni,[0,_i,[0,si,-3],[0,ti,-3],[0,si,-1,[0,pi,[0,si,-2]]],pi,[0,ti,-1,di,ti]],di,-1,ri,pi,[0,si,ti],hi,ri]),ao=class extends Wn{constructor(t){super(t)}},uo=Ei(class extends Wn{constructor(t){super(t)}},[0,pi,[0,ti,-4]]),co=class extends Wn{constructor(t){super(t)}},lo=Ei(class extends Wn{constructor(t){super(t)}},[0,pi,[0,ti,-4]]),ho=class extends Wn{constructor(t){super(t)}},fo=[0,si,-1,ni,_i],po=class extends Wn{constructor(t){super(t)}};po.prototype.g=Si([0,ti,-4,ri]);var go=class extends Wn{constructor(t){super(t)}},mo=Ei(class extends Wn{constructor(t){super(t)}},[0,pi,[0,1,si,di,eo],ri]),vo=class extends Wn{constructor(t){super(t)}},yo=class extends Wn{constructor(t){super(t)}oa(){const t=Be(this);return null==t?N():t}},_o=class extends Wn{constructor(t){super(t)}},wo=[1,2],bo=Ei(class extends Wn{constructor(t){super(t)}},[0,pi,[0,wo,gi,[0,ni],gi,[0,mi],si,di],ri]),Eo=class extends Wn{constructor(t){super(t)}},So=[0,di,si,ti,hi,-1],Ao=class extends Wn{constructor(t){super(t)}},To=[0,ci,-1],ko=class extends Wn{constructor(t){super(t)}},xo=[1,2,3,4,5],Io=class extends Wn{constructor(t){super(t)}g(){return null!=Be(this)}h(){return null!=hn(this,2)}},Po=class extends Wn{constructor(t){super(t)}g(){return Jt(Fe(this,2))??!1}},Oo=[0,mi,di,[0,si,ri,-1],[0,oi,ri]],Mo=[0,Oo,ci,[0,xo,gi,Di,gi,Ri,gi,Oi,gi,Fi,gi,Li],_i],Ro=class extends Wn{constructor(t){super(t)}},Lo=[0,Mo,ti,-1,si],Co=bi(502141897,Ro);Ui[502141897]=Lo;var Fo=Ei(class extends Wn{constructor(t){super(t)}},[0,[0,_i,-1,ei,vi],fo]),Do=class extends Wn{constructor(t){super(t)}},No=class extends Wn{constructor(t){super(t)}},Uo=[0,Mo,ti,[0,Mo],ci],jo=[0,Mo,Lo,Uo,ti,[0,[0,Oo]]],Bo=bi(508968150,No);Ui[508968150]=jo,Ui[508968149]=Uo;var Go=class extends Wn{constructor(t){super(t)}},Vo=bi(513916220,Go);Ui[513916220]=[0,Mo,jo,si];var zo=class extends Wn{constructor(t){super(t)}h(){return en(this,Eo,2)}g(){Ne(this,2)}},Wo=[0,Mo,So];Ui[478825465]=Wo;var Ho=class extends Wn{constructor(t){super(t)}},qo=class extends Wn{constructor(t){super(t)}},Xo=class extends Wn{constructor(t){super(t)}},$o=class extends Wn{constructor(t){super(t)}},Ko=class extends Wn{constructor(t){super(t)}},Yo=[0,Mo,[0,Mo],Wo,-1],Jo=[0,Mo,ti,si],Zo=[0,Mo,ti],Qo=[0,Mo,Jo,Zo,ti],ts=bi(479097054,Ko);Ui[479097054]=[0,Mo,Qo,Yo],Ui[463370452]=Yo,Ui[464864288]=Jo;var es=bi(462713202,$o);Ui[462713202]=Qo,Ui[474472470]=Zo;var ns=class extends Wn{constructor(t){super(t)}},rs=class extends Wn{constructor(t){super(t)}},is=class extends Wn{constructor(t){super(t)}},os=class extends Wn{constructor(t){super(t)}},ss=[0,Mo,ti,-1,si],as=[0,Mo,ti,ci];os.prototype.g=Si([0,Mo,Zo,[0,Mo],Lo,Uo,ss,as]);var us=class extends Wn{constructor(t){super(t)}},cs=bi(456383383,us);Ui[456383383]=[0,Mo,So];var ls=class extends Wn{constructor(t){super(t)}},hs=bi(476348187,ls);Ui[476348187]=[0,Mo,To];var fs=class extends Wn{constructor(t){super(t)}},ds=class extends Wn{constructor(t){super(t)}},ps=[0,_i,-1],gs=bi(458105876,class extends Wn{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=ds;const i=2&e;let o=!1;if(null==n){if(i)return Ae();n=[]}else if(n.constructor===ve){if(0==(2&n.L)||i)return n;n=n.X()}else Array.isArray(n)?o=!!(2&(0|n[Q])):n=[];if(i){if(!n.length)return Ae();o||(o=!0,it(n))}else o&&(o=!1,n=qe(n));return o||(64&(0|n[Q])?n[Q]&=-33:32&e&&nt(n,32)),Ue(t,e,2,r=new ve(n,r,le,void 0)),r}(t,e,De(t,e,2)),!n&&ds&&(t.ra=!0),t}});Ui[458105876]=[0,ps,Hr,[!0,ri,[0,di,-1,hi]]];var ms=class extends Wn{constructor(t){super(t)}},vs=bi(458105758,ms);Ui[458105758]=[0,Mo,di,ps];var ys=class extends Wn{constructor(t){super(t)}},_s=bi(443442058,ys);Ui[443442058]=[0,Mo,di,si,ti,hi,-1,ci,ti],Ui[514774813]=ss;var ws=class extends Wn{constructor(t){super(t)}},bs=bi(516587230,ws);function Es(t,e){return e=e?e.clone():new Eo,void 0!==t.displayNamesLocale?Ne(e,1,ae(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Ne(e,1),void 0!==t.maxResults?pn(e,2,t.maxResults):"maxResults"in t&&Ne(e,2),void 0!==t.scoreThreshold?gn(e,3,t.scoreThreshold):"scoreThreshold"in t&&Ne(e,3),void 0!==t.categoryAllowlist?mn(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Ne(e,4),void 0!==t.categoryDenylist?mn(e,5,t.categoryDenylist):"categoryDenylist"in t&&Ne(e,5),e}function Ss(t,e=-1,n=""){return{categories:t.map((t=>({index:ln(t,1)??0??-1,score:fn(t,2)??0,categoryName:hn(t,3)??""??"",displayName:hn(t,4)??""??""}))),headIndex:e,headName:n}}function As(t){var e=Ve(t,3,Yt,Ge()),n=Ve(t,2,te,Ge()),r=Ve(t,1,ue,Ge()),i=Ve(t,9,ue,Ge());const o={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)o.categories.push({score:e[t],index:n[t]??-1,categoryName:r[t]??"",displayName:i[t]??""});if((e=en(t,oo,4)?.h())&&(o.boundingBox={originX:ln(e,1)??0,originY:ln(e,2)??0,width:ln(e,3)??0,height:ln(e,4)??0,angle:0}),en(t,oo,4)?.g().length)for(const e of en(t,oo,4).g())o.keypoints.push({x:je(e,1)??0,y:je(e,2)??0,score:je(e,4)??0,label:hn(e,3)??""});return o}function Ts(t){const e=[];for(const n of rn(t,co,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 ks(t){const e=[];for(const n of rn(t,ao,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 xs(t){return Array.from(t,(t=>t>127?t-256:t))}function Is(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 o=0;o<t.length;o++)n+=t[o]*e[o],r+=t[o]*t[o],i+=e[o]*e[o];if(r<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let Ps;Ui[516587230]=[0,Mo,ss,as,ti],Ui[518928384]=as;const Os=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 Ms(){if(void 0===Ps)try{await WebAssembly.instantiate(Os),Ps=!0}catch{Ps=!1}return Ps}async function Rs(t,e=Pi``){const n=await Ms()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Ls=class{};function Cs(){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 Fs(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 Ds(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 Ns(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 Us(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]=Ds(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 js(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 Bs(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function Gs(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 Vs(t,e){const n=en(t.baseOptions,Io,1)||new Io;"string"==typeof e?(Ne(n,2,ae(e)),Ne(n,1)):e instanceof Uint8Array&&(Ne(n,1,pt(e,!1)),Ne(n,2)),on(t.baseOptions,0,1,n)}function zs(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 Ws(t,e){t.B=Math.max(t.B,e)}function Hs(t,e){t.A=new zi,Bi(t.A,"PassThroughCalculator"),Gi(t.A,"free_memory"),Vi(t.A,"free_memory_unused_out"),$i(e,"free_memory"),Xi(e,t.A)}function qs(t,e){Gi(t.A,e),Vi(t.A,e+"_unused_out")}function Xs(t){t.g.addBoolToStream(!0,"free_memory",t.B)}Ls.forVisionTasks=function(t){return Rs("vision",t)},Ls.forTextTasks=function(t){return Rs("text",t)},Ls.forGenAiExperimentalTasks=function(t){return Rs("genai_experimental",t)},Ls.forGenAiTasks=function(t){return Rs("genai",t)},Ls.forAudioTasks=function(t){return Rs("audio",t)},Ls.isSimdSupported=function(){return Ms()};var $s=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,Io,1)?.g()||en(this.baseOptions,Io,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,ko,3);if(!n){var r=n=new ko,i=new Ci;sn(r,4,xo,i)}"delegate"in e&&("GPU"===e.delegate?(e=n,r=new Mi,sn(e,2,xo,r)):(e=n,r=new Ci,sn(e,4,xo,r))),on(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),Vs(this,"/model.dat"),this.m(),this.I()}));if(e.modelAssetBuffer instanceof Uint8Array)Vs(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=>{Vs(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,zs(this)}finishProcessing(){this.g.finishProcessing(),zs(this)}close(){this.A=void 0,this.g.closeGraph()}};function Ks(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}$s.prototype.close=$s.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",$s);class Ys{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 Js(t,e,n){const r=t.g;if(n=Ks(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 Zs(t,e){const n=t.g,r=Ks(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(r);const i=Ks(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 o=Ks(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,o),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 Ys(n,r,i,o)}function Qs(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 Qs(t,e),t.h||(t.m(),t.C()),n?(t.s||(t.s=Zs(t,!0)),n=t.s):(t.v||(t.v=Zs(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 Qs(t,e),t=Ks(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){Qs(t,e),t.A||(t.A=Ks(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=Ks(t.createProgram(),"Failed to create WebGL program"),this.aa=Js(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=Js(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()}},oa=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=Ks(t.getUniformLocation(this.h,"backgroundTexture"),"Uniform location"),this.T=Ks(t.getUniformLocation(this.h,"colorMappingTexture"),"Uniform location"),this.J=Ks(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()}},sa=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=Ks(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.K=Ks(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.H=Ks(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 ua(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=la(t);var n=fa(t);if(na(n,r,ca(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 ca(t){let e=aa(t,2);if(!e){const n=la(t);e=da(t);const r=ua(t),i=ha(t);n.texImage2D(n.TEXTURE_2D,0,i,t.width,t.height,0,n.RED,n.FLOAT,r),pa(t)}return e}function la(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=Ks(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function ha(t){if(t=la(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=la(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,o,s){this.g=t,this.m=e,this.j=n,this.canvas=r,this.l=i,this.width=o,this.height=s,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=ua(this),t=new Uint8Array(t.map((t=>255*t))),this.g.push(t)),t;var t}ha(){return ua(this)}M(){return ca(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=la(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=ha(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&&la(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 wa(t,e){return t instanceof Function?t(e):t}function ba(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 Aa(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 oa),t.g}(t),o=Sa(t),s=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;ta(i,o,!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 o=i;var n=e.next();if(n.done)return!1;const[s,a]=n.value;if(n=a,t!==s||o[0]!==n[0]||o[1]!==n[1]||o[2]!==n[2]||o[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,s,r),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),o.drawArrays(o.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 ka(t,e,n,r){const i=Sa(t),o=function(t){return t.h||(t.h=new sa),t.h}(t),s=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n,a=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;ta(o,i,!0,(()=>{var t=o.g;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,o.j),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,s),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,o.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=o.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 xa=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 o of t)n.fillStyle=wa(e.fillColor,{index:i,from:o}),n.strokeStyle=wa(e.color,{index:i,from:o}),n.lineWidth=wa(e.lineWidth,{index:i,from:o}),(t=new Path2D).arc(o.x*r.width,o.y*r.height,wa(e.radius,{index:i,from:o}),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,o=0;for(const s of e){r.beginPath(),e=t[s.start];const a=t[s.end];e&&a&&(r.strokeStyle=wa(n.color,{index:o,from:e,to:a}),r.lineWidth=wa(n.lineWidth,{index:o,from:e,to:a}),r.moveTo(e.x*i.width,e.y*i.height),r.lineTo(a.x*i.width,a.y*i.height)),++o,r.stroke()}r.restore()}}ua(t,e){const n=Ea(this);e=_a(e),n.save(),n.beginPath(),n.lineWidth=wa(e.lineWidth,{}),n.strokeStyle=wa(e.color,{}),n.fillStyle=wa(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);Aa(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);Aa(t,e,(e=>{ka(t,e,n,r),(e=Ea(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)}))}(this,t,e,n):ka(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 Ia(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=Ia(t,0);if(!e){e=Ma(t);const n=Ra(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=Ia(t,2);if(!e){const n=Ma(t);e=La(t);const r=Ia(t,1)||Pa(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Ca(t)}return e}function Ma(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=Ks(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Ra(t){return t.l||(t.l=new ia),t.l}function La(t){const e=Ma(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Ia(t,2);return n||(n=ea(Ra(t),e),t.g.push(n),t.m=!0),e.bindTexture(e.TEXTURE_2D,n),n}function Ca(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function Fa(t){const e=Ma(t);return ta(Ra(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()}))))}xa.prototype.close=xa.prototype.close,xa.prototype.drawConfidenceMask=xa.prototype.wa,xa.prototype.drawCategoryMask=xa.prototype.va,xa.prototype.drawBoundingBox=xa.prototype.ua,xa.prototype.drawConnectors=xa.prototype.xa,xa.prototype.drawLandmarks=xa.prototype.ya,xa.lerp=function(t,e,n,r,i){return ba(r*(1-(t-e)/(n-e))+i*(1-(n-t)/(n-e)),r,i)},xa.clamp=ba;var Da=class{constructor(t,e,n,r,i,o,s){this.g=t,this.j=e,this.m=n,this.canvas=r,this.l=i,this.width=o,this.height=s,(this.j||this.m)&&0==--Na&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ea(){return!!Ia(this,0)}ka(){return!!Ia(this,1)}P(){return!!Ia(this,2)}Ca(){return Pa(this)}Ba(){var t=Ia(this,1);return t||(Oa(this),La(this),t=Fa(this),Ca(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=Ma(this),e=Ra(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,(()=>{La(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Ca(this)})),ra(e),Ca(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);Oa(this),La(this),n=Fa(this),Ca(this)}t.push(n)}return new Da(t,this.ka(),this.P(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ia(this,1).close(),this.m&&Ma(this).deleteTexture(Ia(this,2)),Na=-1}};Da.prototype.close=Da.prototype.close,Da.prototype.clone=Da.prototype.clone,Da.prototype.getAsWebGLTexture=Da.prototype.M,Da.prototype.getAsImageBitmap=Da.prototype.Ba,Da.prototype.getAsImageData=Da.prototype.Ca,Da.prototype.hasWebGLTexture=Da.prototype.P,Da.prototype.hasImageBitmap=Da.prototype.ka,Da.prototype.hasImageData=Da.prototype.Ea;var Na=250;function Ua(...t){return t.map((([t,e])=>({start:t,end:e})))}const ja=function(t){return class extends t{La(){this.i._registerModelResourcesGraphService()}}}((Ba=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:Cs()?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?'),Ns(this,r||"input_audio",(r=>{Ns(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){Bs(this,"__graph_config__",(e=>{t(e)})),Ns(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 o=4*t.length;this.h!==o&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(o),this.h=o),this.i.HEAPF32.set(t,this.g/4),Ns(this,r,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){Ns(this,e,(e=>{const[r,i]=Us(this,t,e);this.i._addBoundTextureToStream(e,r,i,n)}))}addBoolToStream(t,e,n){Ns(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){Ns(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){Ns(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){Ns(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addUintToStream(t,e,n){Ns(this,e,(e=>{this.i._addUintToInputStream(t,e,n)}))}addStringToStream(t,e,n){Ns(this,e,(e=>{Ns(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){Ns(this,e,(e=>{js(this,Object.keys(t),(r=>{js(this,Object.values(t),(i=>{this.i._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){Ns(this,n,(n=>{Ns(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){Ns(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){Ns(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){Ns(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){Ns(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){Ns(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){Ns(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){Ns(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)Ns(this,e,(t=>{this.i._addStringVectorEntry(r,t)}));this.i._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){Ns(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){Ns(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){Ns(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){Ns(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addUintToInputSidePacket(t,e){Ns(this,e,(e=>{this.i._addUintToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){Ns(this,e,(e=>{Ns(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){Ns(this,n,(n=>{Ns(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){Ns(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){Ns(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){Ns(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){Ns(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){Ns(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){Ns(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)Ns(this,e,(t=>{this.i._addStringVectorEntry(n,t)}));this.i._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachUintListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachUintListener(t)}))}attachUintVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachUintVectorListener(t)}))}attachDoubleListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){Bs(this,t,e),Ns(this,t,(t=>{this.i._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){Gs(this,t,e),Ns(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?'),Bs(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),Ns(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 Ba{get ea(){return this.i}qa(t,e,n){Ns(this,e,(e=>{const[r,i]=Us(this,t,e);this.ea._addBoundTextureAsImageToStream(e,r,i,n)}))}U(t,e){Bs(this,t,e),Ns(this,t,(t=>{this.ea._attachImageListener(t)}))}ca(t,e){Gs(this,t,e),Ns(this,t,(t=>{this.ea._attachImageVectorListener(t)}))}}));var Ba,Ga=class extends ja{};async function Va(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 Fs(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await Fs(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??(Cs()?void 0:document.createElement("canvas")),e,n)}function za(t,e,n,r){if(t.T){const o=new po;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(o,1,(i.left+i.right)/2),gn(o,2,(i.top+i.bottom)/2),gn(o,4,i.right-i.left),gn(o,3,i.bottom-i.top)}else gn(o,1,.5),gn(o,2,.5),gn(o,4,1),gn(o,3,1);if(n?.rotationDegrees){if(n?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(gn(o,5,-Math.PI*n.rotationDegrees/180),n?.rotationDegrees%180!=0){const[t,r]=Ds(e);n=fn(o,3)*r/t,i=fn(o,4)*t/r,gn(o,4,n),gn(o,3,i)}}t.g.addProtoToStream(o.g(),"mediapipe.NormalizedRect",t.T,r)}t.g.qa(e,t.aa,r??performance.now()),t.finishProcessing()}function Wa(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");za(t,e,n,t.B+1)}function Ha(t,e,n,r){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");za(t,e,n,r)}function qa(t,e,n,r){var i=e.data;const o=e.width,s=o*(e=e.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==s)throw Error("Unsupported channel count: "+i.length/s);return t=new ma([i],n,!1,t.g.i.canvas,t.O,o,e),r?t.clone():t}var Xa=class extends $s{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()}};Xa.prototype.close=Xa.prototype.close;var $a=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},on(t=this.h=new Ro,0,1,e=new Po),gn(this.h,2,.5),gn(this.h,3,.3)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(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:[]},Wa(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},Ha(this,t,n,e),this.j}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect_in"),Ki(t,"detections");const e=new Ni;zn(e,Co,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect_in"),Vi(n,"DETECTIONS:detections"),n.o(e),Xi(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=so(e),this.j.detections.push(As(t));Ws(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};$a.prototype.detectForVideo=$a.prototype.F,$a.prototype.detect=$a.prototype.D,$a.prototype.setOptions=$a.prototype.o,$a.createFromModelPath=async function(t,e){return Va($a,t,{baseOptions:{modelAssetPath:e}})},$a.createFromModelBuffer=function(t,e){return Va($a,t,{baseOptions:{modelAssetBuffer:e}})},$a.createFromOptions=function(t,e){return Va($a,t,e)};var Ka=Ua([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=Ua([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=Ua([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Za=Ua([474,475],[475,476],[476,477],[477,474]),Qa=Ua([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]),tu=Ua([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),eu=Ua([469,470],[470,471],[471,472],[472,469]),nu=Ua([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]),ru=[...Ka,...Ya,...Ja,...Qa,...tu,...nu],iu=Ua([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 ou(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var su=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,on(t=this.h=new No,0,1,e=new Po),this.v=new Do,on(this.h,0,3,this.v),this.s=new Ro,on(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,Po,1)}set baseOptions(t){on(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 ou(this),Wa(this,t,e),this.j}F(t,e,n){return ou(this),Ha(this,t,n,e),this.j}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"face_landmarks");const e=new Ni;zn(e,Bo,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),Xi(t,n),this.g.attachProtoVectorListener("face_landmarks",((t,e)=>{for(const e of t)t=lo(e),this.j.faceLandmarks.push(Ts(t));Ws(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{Ws(this,t)})),this.outputFaceBlendshapes&&(Ki(t,"blendshapes"),Vi(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((t,e)=>{if(this.outputFaceBlendshapes)for(const e of t)t=no(e),this.j.faceBlendshapes.push(Ss(t.g()??[]));Ws(this,e)})),this.g.attachEmptyPacketListener("blendshapes",(t=>{Ws(this,t)}))),this.outputFacialTransformationMatrixes&&(Ki(t,"face_geometry"),Vi(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((t,e)=>{if(this.outputFacialTransformationMatrixes)for(const e of t)(t=en(Fo(e),ho,2))&&this.j.facialTransformationMatrixes.push({rows:ln(t,1)??0??0,columns:ln(t,2)??0??0,data:Ve(t,3,Yt,Ge()).slice()??[]});Ws(this,e)})),this.g.attachEmptyPacketListener("face_geometry",(t=>{Ws(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};su.prototype.detectForVideo=su.prototype.F,su.prototype.detect=su.prototype.D,su.prototype.setOptions=su.prototype.o,su.createFromModelPath=function(t,e){return Va(su,t,{baseOptions:{modelAssetPath:e}})},su.createFromModelBuffer=function(t,e){return Va(su,t,{baseOptions:{modelAssetBuffer:e}})},su.createFromOptions=function(t,e){return Va(su,t,e)},su.FACE_LANDMARKS_LIPS=Ka,su.FACE_LANDMARKS_LEFT_EYE=Ya,su.FACE_LANDMARKS_LEFT_EYEBROW=Ja,su.FACE_LANDMARKS_LEFT_IRIS=Za,su.FACE_LANDMARKS_RIGHT_EYE=Qa,su.FACE_LANDMARKS_RIGHT_EYEBROW=tu,su.FACE_LANDMARKS_RIGHT_IRIS=eu,su.FACE_LANDMARKS_FACE_OVAL=nu,su.FACE_LANDMARKS_CONTOURS=ru,su.FACE_LANDMARKS_TESSELATION=iu;var au=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!0),on(t=this.j=new Go,0,1,e=new Po)}get baseOptions(){return en(this.j,Po,1)}set baseOptions(t){on(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,Wa(this,t,r??{}),!this.h)return this.s}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"stylized_image");const e=new Ni;zn(e,Vo,this.j);const n=new zi;Bi(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),Xi(t,n),this.g.U("stylized_image",((t,e)=>{var n=!this.h,r=t.data,i=t.width;const o=i*(t=t.height);if(r instanceof Uint8Array)if(r.length===3*o){const e=new Uint8ClampedArray(4*o);for(let t=0;t<o;++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*o)throw Error("Unsupported channel count: "+r.length/o);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 Da([r],!1,!1,this.g.i.canvas,this.O,i,t),this.s=n=n?i.clone():i,this.h&&this.h(n),Ws(this,e)})),this.g.attachEmptyPacketListener("stylized_image",(t=>{this.s=null,this.h&&this.h(null),Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};au.prototype.stylize=au.prototype.Oa,au.prototype.setOptions=au.prototype.o,au.createFromModelPath=function(t,e){return Va(au,t,{baseOptions:{modelAssetPath:e}})},au.createFromModelBuffer=function(t,e){return Va(au,t,{baseOptions:{modelAssetBuffer:e}})},au.createFromOptions=function(t,e){return Va(au,t,e)};var uu=Ua([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 cu(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function lu(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 hu(t,e=!0){const n=[];for(const i of t){var r=no(i);t=[];for(const n of r.g())r=e&&null!=ln(n,1)?ln(n,1)??0:-1,t.push({score:fn(n,2)??0,index:r,categoryName:hn(n,3)??""??"",displayName:hn(n,4)??""??""});n.push(t)}return n}var fu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],on(t=this.j=new Ko,0,1,e=new Po),this.s=new $o,on(this.j,0,2,this.s),this.C=new Xo,on(this.s,0,3,this.C),this.v=new qo,on(this.s,0,2,this.v),this.h=new Ho,on(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,Po,1)}set baseOptions(t){on(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 zo,n=e,r=Es(t.cannedGesturesClassifierOptions,en(this.h,zo,3)?.h());on(n,0,2,r),on(this.h,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&en(this.h,zo,3)?.g();return t.customGesturesClassifierOptions?(on(n=e=new zo,0,2,r=Es(t.customGesturesClassifierOptions,en(this.h,zo,4)?.h())),on(this.h,0,4,e)):void 0===t.customGesturesClassifierOptions&&en(this.h,zo,4)?.g(),this.l(t)}Ja(t,e){return cu(this),Wa(this,t,e),lu(this)}Ka(t,e,n){return cu(this),Ha(this,t,n,e),lu(this)}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"hand_gestures"),Ki(t,"hand_landmarks"),Ki(t,"world_hand_landmarks"),Ki(t,"handedness");const e=new Ni;zn(e,ts,this.j);const n=new zi;Bi(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"HAND_GESTURES:hand_gestures"),Vi(n,"LANDMARKS:hand_landmarks"),Vi(n,"WORLD_LANDMARKS:world_hand_landmarks"),Vi(n,"HANDEDNESS:handedness"),n.o(e),Xi(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t){t=lo(e);const n=[];for(const e of rn(t,co,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)}Ws(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t){t=uo(e);const n=[];for(const e of rn(t,ao,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)}Ws(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoVectorListener("hand_gestures",((t,e)=>{this.gestures.push(...hu(t,!1)),Ws(this,e)})),this.g.attachEmptyPacketListener("hand_gestures",(t=>{Ws(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{this.handedness.push(...hu(t)),Ws(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function du(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}fu.prototype.recognizeForVideo=fu.prototype.Ka,fu.prototype.recognize=fu.prototype.Ja,fu.prototype.setOptions=fu.prototype.o,fu.createFromModelPath=function(t,e){return Va(fu,t,{baseOptions:{modelAssetPath:e}})},fu.createFromModelBuffer=function(t,e){return Va(fu,t,{baseOptions:{modelAssetBuffer:e}})},fu.createFromOptions=function(t,e){return Va(fu,t,e)},fu.HAND_CONNECTIONS=uu;var pu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],on(t=this.h=new $o,0,1,e=new Po),this.s=new Xo,on(this.h,0,3,this.s),this.j=new qo,on(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,Po,1)}set baseOptions(t){on(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=[],Wa(this,t,e),du(this)}F(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Ha(this,t,n,e),du(this)}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"hand_landmarks"),Ki(t,"world_hand_landmarks"),Ki(t,"handedness");const e=new Ni;zn(e,es,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"LANDMARKS:hand_landmarks"),Vi(n,"WORLD_LANDMARKS:world_hand_landmarks"),Vi(n,"HANDEDNESS:handedness"),n.o(e),Xi(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t)t=lo(e),this.landmarks.push(Ts(t));Ws(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t)t=uo(e),this.worldLandmarks.push(ks(t));Ws(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{var n=this.handedness,r=n.push;const i=[];for(const e of t){t=no(e);const n=[];for(const e of t.g())n.push({score:fn(e,2)??0,index:ln(e,1)??0??-1,categoryName:hn(e,3)??""??"",displayName:hn(e,4)??""??""});i.push(n)}r.call(n,...i),Ws(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};pu.prototype.detectForVideo=pu.prototype.F,pu.prototype.detect=pu.prototype.D,pu.prototype.setOptions=pu.prototype.o,pu.createFromModelPath=function(t,e){return Va(pu,t,{baseOptions:{modelAssetPath:e}})},pu.createFromModelBuffer=function(t,e){return Va(pu,t,{baseOptions:{modelAssetBuffer:e}})},pu.createFromOptions=function(t,e){return Va(pu,t,e)},pu.HAND_CONNECTIONS=uu;var gu=Ua([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 mu(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function vu(t){try{if(!t.C)return t.h;t.C(t.h)}finally{Xs(t)}}function yu(t,e){t=lo(t),e.push(Ts(t))}var _u=class extends Xa{constructor(t,e){super(new Ga(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,on(t=this.j=new os,0,1,e=new Po),this.J=new Xo,on(this.j,0,2,this.J),this.Z=new ns,on(this.j,0,3,this.Z),this.s=new Ro,on(this.j,0,4,this.s),this.H=new Do,on(this.j,0,5,this.H),this.v=new rs,on(this.j,0,6,this.v),this.K=new is,on(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,Po,1)}set baseOptions(t){on(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,mu(this),Wa(this,t,r),vu(this)}F(t,e,n,r){const i="function"!=typeof n?n:{};return this.C="function"==typeof n?n:r,mu(this),Ha(this,t,i,e),vu(this)}m(){var t=new Yi;$i(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 Ni,n=new Ai;Xe(n,1,ae("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(t,e){if(null!=e)if(Array.isArray(e))Ne(t,2,Pe(e));else{if(!("string"==typeof e||e instanceof j||F(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");Xe(t,2,pt(e,!1),N())}}(n,this.j.g());const r=new zi;Bi(r,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),cn(r,8,Ai,n),Gi(r,"IMAGE:input_frames_image"),Vi(r,"POSE_LANDMARKS:pose_landmarks"),Vi(r,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),Vi(r,"FACE_LANDMARKS:face_landmarks"),Vi(r,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),Vi(r,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),Vi(r,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),Vi(r,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),r.o(e),Xi(t,r),Hs(this,t),this.g.attachProtoListener("pose_landmarks",((t,e)=>{yu(t,this.h.poseLandmarks),Ws(this,e)})),this.g.attachEmptyPacketListener("pose_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoListener("pose_world_landmarks",((t,e)=>{var n=this.h.poseWorldLandmarks;t=uo(t),n.push(ks(t)),Ws(this,e)})),this.g.attachEmptyPacketListener("pose_world_landmarks",(t=>{Ws(this,t)})),this.outputPoseSegmentationMasks&&(Vi(r,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),qs(this,"pose_segmentation_mask"),this.g.U("pose_segmentation_mask",((t,e)=>{this.h.poseSegmentationMasks=[qa(this,t,!0,!this.C)],Ws(this,e)})),this.g.attachEmptyPacketListener("pose_segmentation_mask",(t=>{this.h.poseSegmentationMasks=[],Ws(this,t)}))),this.g.attachProtoListener("face_landmarks",((t,e)=>{yu(t,this.h.faceLandmarks),Ws(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{Ws(this,t)})),this.outputFaceBlendshapes&&(Ki(t,"extra_blendshapes"),Vi(r,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",((t,e)=>{var n=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(t=no(t),n.push(Ss(t.g()??[]))),Ws(this,e)})),this.g.attachEmptyPacketListener("extra_blendshapes",(t=>{Ws(this,t)}))),this.g.attachProtoListener("left_hand_landmarks",((t,e)=>{yu(t,this.h.leftHandLandmarks),Ws(this,e)})),this.g.attachEmptyPacketListener("left_hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoListener("left_hand_world_landmarks",((t,e)=>{var n=this.h.leftHandWorldLandmarks;t=uo(t),n.push(ks(t)),Ws(this,e)})),this.g.attachEmptyPacketListener("left_hand_world_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoListener("right_hand_landmarks",((t,e)=>{yu(t,this.h.rightHandLandmarks),Ws(this,e)})),this.g.attachEmptyPacketListener("right_hand_landmarks",(t=>{Ws(this,t)})),this.g.attachProtoListener("right_hand_world_landmarks",((t,e)=>{var n=this.h.rightHandWorldLandmarks;t=uo(t),n.push(ks(t)),Ws(this,e)})),this.g.attachEmptyPacketListener("right_hand_world_landmarks",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};_u.prototype.detectForVideo=_u.prototype.F,_u.prototype.detect=_u.prototype.D,_u.prototype.setOptions=_u.prototype.o,_u.createFromModelPath=function(t,e){return Va(_u,t,{baseOptions:{modelAssetPath:e}})},_u.createFromModelBuffer=function(t,e){return Va(_u,t,{baseOptions:{modelAssetBuffer:e}})},_u.createFromOptions=function(t,e){return Va(_u,t,e)},_u.HAND_CONNECTIONS=uu,_u.POSE_CONNECTIONS=gu,_u.FACE_LANDMARKS_LIPS=Ka,_u.FACE_LANDMARKS_LEFT_EYE=Ya,_u.FACE_LANDMARKS_LEFT_EYEBROW=Ja,_u.FACE_LANDMARKS_LEFT_IRIS=Za,_u.FACE_LANDMARKS_RIGHT_EYE=Qa,_u.FACE_LANDMARKS_RIGHT_EYEBROW=tu,_u.FACE_LANDMARKS_RIGHT_IRIS=eu,_u.FACE_LANDMARKS_FACE_OVAL=nu,_u.FACE_LANDMARKS_CONTOURS=ru,_u.FACE_LANDMARKS_TESSELATION=iu;var wu=class extends Xa{constructor(t,e){super(new Ga(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},on(t=this.h=new us,0,1,e=new Po)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return on(this.h,0,2,Es(t,en(this.h,Eo,2))),this.l(t)}sa(t,e){return this.j={classifications:[]},Wa(this,t,e),this.j}ta(t,e,n){return this.j={classifications:[]},Ha(this,t,n,e),this.j}m(){var t=new Yi;$i(t,"input_image"),$i(t,"norm_rect"),Ki(t,"classifications");const e=new Ni;zn(e,cs,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),Gi(n,"IMAGE:input_image"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"CLASSIFICATIONS:classifications"),n.o(e),Xi(t,n),this.g.attachProtoListener("classifications",((t,e)=>{this.j=function(t){const e={classifications:rn(t,go,1).map((t=>Ss(en(t,to,4)?.g()??[],ln(t,2)??0,hn(t,3)??"")))};return null!=oe(Fe(t,2))&&(e.timestampMs=oe(Fe(t,2))??0),e}(mo(t)),Ws(this,e)})),this.g.attachEmptyPacketListener("classifications",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};wu.prototype.classifyForVideo=wu.prototype.ta,wu.prototype.classify=wu.prototype.sa,wu.prototype.setOptions=wu.prototype.o,wu.createFromModelPath=function(t,e){return Va(wu,t,{baseOptions:{modelAssetPath:e}})},wu.createFromModelBuffer=function(t,e){return Va(wu,t,{baseOptions:{modelAssetBuffer:e}})},wu.createFromOptions=function(t,e){return Va(wu,t,e)};var bu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!0),this.h=new ls,this.embeddings={embeddings:[]},on(t=this.h,0,1,e=new Po)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){var e=this.h,n=en(this.h,Ao,2);return n=n?n.clone():new Ao,void 0!==t.l2Normalize?dn(n,1,t.l2Normalize):"l2Normalize"in t&&Ne(n,1),void 0!==t.quantize?dn(n,2,t.quantize):"quantize"in t&&Ne(n,2),on(e,0,2,n),this.l(t)}za(t,e){return Wa(this,t,e),this.embeddings}Aa(t,e,n){return Ha(this,t,n,e),this.embeddings}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"embeddings_out");const e=new Ni;zn(e,hs,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"EMBEDDINGS:embeddings_out"),n.o(e),Xi(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=bo(t),this.embeddings=function(t){return{embeddings:rn(t,_o,1).map((t=>{const e={headIndex:ln(t,3)??0??-1,headName:hn(t,4)??""??""};if(void 0!==tn(t,vo,Ke(t,1)))t=Ve(t=en(t,vo,Ke(t,1)),1,Yt,Ge()),e.floatEmbedding=t.slice();else{const n=new Uint8Array(0);e.quantizedEmbedding=en(t,yo,Ke(t,2))?.oa()?.h()??n}return e})),timestampMs:oe(Fe(t,2))??0}}(t),Ws(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};bu.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=Is(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=Is(xs(t.quantizedEmbedding),xs(e.quantizedEmbedding))}return t},bu.prototype.embedForVideo=bu.prototype.Aa,bu.prototype.embed=bu.prototype.za,bu.prototype.setOptions=bu.prototype.o,bu.createFromModelPath=function(t,e){return Va(bu,t,{baseOptions:{modelAssetPath:e}})},bu.createFromModelBuffer=function(t,e){return Va(bu,t,{baseOptions:{modelAssetBuffer:e}})},bu.createFromOptions=function(t,e){return Va(bu,t,e)};var Eu=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 Su(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Au(t){try{const e=new Eu(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{Xs(t)}}Eu.prototype.close=Eu.prototype.close;var Tu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ms,this.v=new fs,on(this.h,0,3,this.v),on(t=this.h,0,1,e=new Po)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Ne(this.h,2,ae(t.displayNamesLocale)):"displayNamesLocale"in t&&Ne(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(),zi,1).filter((t=>(hn(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],Ni,7)?.l()?.g()??new Map).forEach(((e,n)=>{t.s[Number(n)]=hn(e,1)??""}))}(this)}segment(t,e,n){const r="function"!=typeof e?e:{};return this.j="function"==typeof e?e:n,Su(this),Wa(this,t,r),Au(this)}Ma(t,e,n,r){const i="function"!=typeof n?n:{};return this.j="function"==typeof n?n:r,Su(this),Ha(this,t,i,e),Au(this)}Da(){return this.s}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect");const e=new Ni;zn(e,vs,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),n.o(e),Xi(t,n),Hs(this,t),this.outputConfidenceMasks&&(Ki(t,"confidence_masks"),Vi(n,"CONFIDENCE_MASKS:confidence_masks"),qs(this,"confidence_masks"),this.g.ca("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>qa(this,t,!0,!this.j))),Ws(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],Ws(this,t)}))),this.outputCategoryMask&&(Ki(t,"category_mask"),Vi(n,"CATEGORY_MASK:category_mask"),qs(this,"category_mask"),this.g.U("category_mask",((t,e)=>{this.categoryMask=qa(this,t,!1,!this.j),Ws(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,Ws(this,t)}))),Ki(t,"quality_scores"),Vi(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,Ws(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Tu.prototype.getLabels=Tu.prototype.Da,Tu.prototype.segmentForVideo=Tu.prototype.Ma,Tu.prototype.segment=Tu.prototype.segment,Tu.prototype.setOptions=Tu.prototype.o,Tu.createFromModelPath=function(t,e){return Va(Tu,t,{baseOptions:{modelAssetPath:e}})},Tu.createFromModelBuffer=function(t,e){return Va(Tu,t,{baseOptions:{modelAssetBuffer:e}})},Tu.createFromOptions=function(t,e){return Va(Tu,t,e)};var ku=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};ku.prototype.close=ku.prototype.close;var xu=class extends Wn{constructor(t){super(t)}},Iu=[0,si,-2],Pu=[0,Qr,-3,ci,Qr,-1],Ou=[0,Pu],Mu=[0,Pu,si,-1],Ru=class extends Wn{constructor(t){super(t)}},Lu=[0,Qr,-1,ci],Cu=class extends Wn{constructor(t){super(t)}},Fu=class extends Wn{constructor(t){super(t)}},Du=[1,2,3,4,5,6,7,8,9,10,14,15],Nu=class extends Wn{constructor(t){super(t)}};Nu.prototype.g=Si([0,pi,[0,Du,gi,Pu,gi,[0,Pu,Iu],gi,Ou,gi,[0,Ou,Iu],gi,Lu,gi,[0,Qr,-3,ci,_i],gi,[0,Qr,-3,ci],gi,[0,di,Qr,-2,ci,si,ci,-1,2,Qr,Iu],gi,Mu,gi,[0,Mu,Iu],Qr,Iu,di,gi,[0,Qr,-3,ci,Iu,-1],gi,[0,pi,Lu]],di,[0,di,si,-1,ci]]);var Uu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ms,this.s=new fs,on(this.h,0,3,this.s),on(t=this.h,0,1,e=new Po)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(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 Nu;const o=new Fu;var s=new xu;if(pn(s,1,255),on(o,0,12,s),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new Ru;dn(a,3,!0),gn(a,1,e.keypoint.x),gn(a,2,e.keypoint.y),sn(o,5,Du,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(s=new Cu,e.scribble))dn(e=new Ru,3,!0),gn(e,1,a.x),gn(e,2,a.y),cn(s,1,Ru,e);sn(o,15,Du,s)}cn(r,1,Fu,o),this.g.addProtoToStream(r.g(),"drishti.RenderData","roi_in",n),Wa(this,t,i);t:{try{const t=new ku(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var u=t;break t}this.j(t)}finally{Xs(this)}u=void 0}return u}m(){var t=new Yi;$i(t,"image_in"),$i(t,"roi_in"),$i(t,"norm_rect_in");const e=new Ni;zn(e,vs,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"ROI:roi_in"),Gi(n,"NORM_RECT:norm_rect_in"),n.o(e),Xi(t,n),Hs(this,t),this.outputConfidenceMasks&&(Ki(t,"confidence_masks"),Vi(n,"CONFIDENCE_MASKS:confidence_masks"),qs(this,"confidence_masks"),this.g.ca("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>qa(this,t,!0,!this.j))),Ws(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],Ws(this,t)}))),this.outputCategoryMask&&(Ki(t,"category_mask"),Vi(n,"CATEGORY_MASK:category_mask"),qs(this,"category_mask"),this.g.U("category_mask",((t,e)=>{this.categoryMask=qa(this,t,!1,!this.j),Ws(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,Ws(this,t)}))),Ki(t,"quality_scores"),Vi(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,Ws(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Uu.prototype.segment=Uu.prototype.segment,Uu.prototype.setOptions=Uu.prototype.o,Uu.createFromModelPath=function(t,e){return Va(Uu,t,{baseOptions:{modelAssetPath:e}})},Uu.createFromModelBuffer=function(t,e){return Va(Uu,t,{baseOptions:{modelAssetBuffer:e}})},Uu.createFromOptions=function(t,e){return Va(Uu,t,e)};var ju=class extends Xa{constructor(t,e){super(new Ga(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},on(t=this.h=new ys,0,1,e=new Po)}get baseOptions(){return en(this.h,Po,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Ne(this.h,2,ae(t.displayNamesLocale)):"displayNamesLocale"in t&&Ne(this.h,2),void 0!==t.maxResults?pn(this.h,3,t.maxResults):"maxResults"in t&&Ne(this.h,3),void 0!==t.scoreThreshold?gn(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&Ne(this.h,4),void 0!==t.categoryAllowlist?mn(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&Ne(this.h,5),void 0!==t.categoryDenylist?mn(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&Ne(this.h,6),this.l(t)}D(t,e){return this.j={detections:[]},Wa(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},Ha(this,t,n,e),this.j}m(){var t=new Yi;$i(t,"input_frame_gpu"),$i(t,"norm_rect"),Ki(t,"detections");const e=new Ni;zn(e,_s,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),Gi(n,"IMAGE:input_frame_gpu"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"DETECTIONS:detections"),n.o(e),Xi(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=so(e),this.j.detections.push(As(t));Ws(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{Ws(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ju.prototype.detectForVideo=ju.prototype.F,ju.prototype.detect=ju.prototype.D,ju.prototype.setOptions=ju.prototype.o,ju.createFromModelPath=async function(t,e){return Va(ju,t,{baseOptions:{modelAssetPath:e}})},ju.createFromModelBuffer=function(t,e){return Va(ju,t,{baseOptions:{modelAssetBuffer:e}})},ju.createFromOptions=function(t,e){return Va(ju,t,e)};var Bu=class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=n}close(){this.segmentationMasks?.forEach((t=>{t.close()}))}};function Gu(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Vu(t){try{const e=new Bu(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.s)return e;t.s(e)}finally{Xs(t)}}Bu.prototype.close=Bu.prototype.close;var zu=class extends Xa{constructor(t,e){super(new Ga(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,on(t=this.h=new ws,0,1,e=new Po),this.v=new is,on(this.h,0,3,this.v),this.j=new rs,on(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,Po,1)}set baseOptions(t){on(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,Gu(this),Wa(this,t,r),Vu(this)}F(t,e,n,r){const i="function"!=typeof n?n:{};return this.s="function"==typeof n?n:r,Gu(this),Ha(this,t,i,e),Vu(this)}m(){var t=new Yi;$i(t,"image_in"),$i(t,"norm_rect"),Ki(t,"normalized_landmarks"),Ki(t,"world_landmarks"),Ki(t,"segmentation_masks");const e=new Ni;zn(e,bs,this.h);const n=new zi;Bi(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),Gi(n,"IMAGE:image_in"),Gi(n,"NORM_RECT:norm_rect"),Vi(n,"NORM_LANDMARKS:normalized_landmarks"),Vi(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),Xi(t,n),Hs(this,t),this.g.attachProtoVectorListener("normalized_landmarks",((t,e)=>{this.landmarks=[];for(const e of t)t=lo(e),this.landmarks.push(Ts(t));Ws(this,e)})),this.g.attachEmptyPacketListener("normalized_landmarks",(t=>{this.landmarks=[],Ws(this,t)})),this.g.attachProtoVectorListener("world_landmarks",((t,e)=>{this.worldLandmarks=[];for(const e of t)t=uo(e),this.worldLandmarks.push(ks(t));Ws(this,e)})),this.g.attachEmptyPacketListener("world_landmarks",(t=>{this.worldLandmarks=[],Ws(this,t)})),this.outputSegmentationMasks&&(Vi(n,"SEGMENTATION_MASK:segmentation_masks"),qs(this,"segmentation_masks"),this.g.ca("segmentation_masks",((t,e)=>{this.segmentationMasks=t.map((t=>qa(this,t,!0,!this.s))),Ws(this,e)})),this.g.attachEmptyPacketListener("segmentation_masks",(t=>{this.segmentationMasks=[],Ws(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};zu.prototype.detectForVideo=zu.prototype.F,zu.prototype.detect=zu.prototype.D,zu.prototype.setOptions=zu.prototype.o,zu.createFromModelPath=function(t,e){return Va(zu,t,{baseOptions:{modelAssetPath:e}})},zu.createFromModelBuffer=function(t,e){return Va(zu,t,{baseOptions:{modelAssetBuffer:e}})},zu.createFromOptions=function(t,e){return Va(zu,t,e)},zu.POSE_CONNECTIONS=gu,e.DrawingUtils=xa,e.FaceDetector=$a,e.FaceLandmarker=su,e.FaceStylizer=au,e.FilesetResolver=Ls,e.GestureRecognizer=fu,e.HandLandmarker=pu,e.HolisticLandmarker=_u,e.ImageClassifier=wu,e.ImageEmbedder=bu,e.ImageSegmenter=Tu,e.ImageSegmenterResult=Eu,e.InteractiveSegmenter=Uu,e.InteractiveSegmenterResult=ku,e.MPImage=Da,e.MPMask=ma,e.ObjectDetector=ju,e.PoseLandmarker=zu,e.VisionTaskRunner=Xa},593: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 o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return 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.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(432)})()}));
|