@zappar/zappar-cv 3.0.0-beta.6 → 3.0.1-alpha.1
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/README.md +2 -2
- package/lib/camera-source.js +8 -4
- package/lib/ceres-worker.d.ts +1 -0
- package/lib/ceres-worker.js +67 -0
- package/lib/direct.js +3 -1
- package/lib/gen/zappar-client.js +1 -1
- package/lib/gen/zappar-cwrap.js +4 -3
- package/lib/gen/zappar-native.d.ts +1 -1
- package/lib/mstp-camera-source.d.ts +9 -0
- package/lib/mstp-camera-source.js +79 -6
- package/lib/native.js +5 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/worker-client.d.ts +1 -0
- package/lib/worker-client.js +19 -1
- package/lib/worker-messages.d.ts +10 -0
- package/lib/worker-messages.js +10 -0
- package/lib/worker-server.d.ts +1 -1
- package/lib/worker-server.js +49 -8
- package/lib/worker.js +1 -1
- package/lib/zappar-cv.js +177 -134
- package/lib/zappar-cv.wasm +0 -0
- package/package.json +4 -3
- package/umd/169.zappar-cv.js +1 -1
- package/umd/25.zappar-cv.js +1 -0
- package/umd/429.zappar-cv.js +1 -0
- package/umd/501114eb92cddf5f56fe.wasm +0 -0
- package/umd/867.zappar-cv.js +1 -0
- package/umd/zappar-cv.js +1 -1
- package/umd/zappar-cv.worker.js +1 -1
- package/umd/22a0ba3553d400112656.wasm +0 -0
- package/umd/56.zappar-cv.js +0 -1
package/umd/zappar-cv.worker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={238:function(e,t,r){var i;!function(a,n){"use strict";var o="function",s="undefined",_="object",c="string",u="model",f="name",l="type",d="vendor",p="version",m="architecture",h="console",b="mobile",w="tablet",g="smarttv",y="wearable",v="embedded",E="Amazon",A="Apple",k="ASUS",T="BlackBerry",R="Browser",x="Chrome",L="Firefox",z="Google",M="Huawei",I="LG",F="Microsoft",O="Motorola",P="Opera",S="Samsung",C="Sharp",D="Sony",B="Xiaomi",U="Zebra",V="Facebook",N=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},G=function(e,t){return typeof e===c&&-1!==H(t).indexOf(H(e))},H=function(e){return e.toLowerCase()},W=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===s?e:e.substring(0,350)},Y=function(e,t){for(var r,i,a,s,c,u,f=0;f<t.length&&!c;){var l=t[f],d=t[f+1];for(r=i=0;r<l.length&&!c;)if(c=l[r++].exec(e))for(a=0;a<d.length;a++)u=c[++i],typeof(s=d[a])===_&&s.length>0?2===s.length?typeof s[1]==o?this[s[0]]=s[1].call(this,u):this[s[0]]=s[1]:3===s.length?typeof s[1]!==o||s[1].exec&&s[1].test?this[s[0]]=u?u.replace(s[1],s[2]):n:this[s[0]]=u?s[1].call(this,u,s[2]):n:4===s.length&&(this[s[0]]=u?s[3].call(this,u.replace(s[1],s[2])):n):this[s]=u||n;f+=2}},X=function(e,t){for(var r in t)if(typeof t[r]===_&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(G(t[r][i],e))return"?"===r?n:r}else if(G(t[r],e))return"?"===r?n:r;return e},q={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Z={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,p],[/opios[\/ ]+([\w\.]+)/i],[p,[f,P+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[f,P]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[f,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[f,"UC"+R]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[f,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[f,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[f,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+R],p],[/\bfocus\/([\w\.]+)/i],[p,[f,L+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[f,P+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[f,P+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[f,"MIUI "+R]],[/fxios\/([-\w\.]+)/i],[p,[f,L]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 "+R]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 "+R],p],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[f,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,V],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[f,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[f,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[f,x+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,x+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[f,"Android "+R]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[p,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[f,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[f,L+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[f,p],[/(cobalt)\/([\w\.]+)/i],[f,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,H]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",H]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,H]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,S],[l,w]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,S],[l,b]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,A],[l,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,A],[l,w]],[/(macintosh);/i],[u,[d,A]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,M],[l,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,M],[l,b]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[d,B],[l,b]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,B],[l,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[d,"OPPO"],[l,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[l,b]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[l,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[d,O],[l,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,O],[l,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,I],[l,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,I],[l,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[d,"Lenovo"],[l,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[d,"Nokia"],[l,b]],[/(pixel c)\b/i],[u,[d,z],[l,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,z],[l,b]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,D],[l,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,D],[l,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[l,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,E],[l,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,E],[l,b]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[l,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,T],[l,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,k],[l,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,k],[l,b]],[/(nexus 9)/i],[u,[d,"HTC"],[l,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[l,b]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[l,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[l,b]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,C],[l,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,u,[l,b]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,u,[l,w]],[/(surface duo)/i],[u,[d,F],[l,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[l,b]],[/(u304aa)/i],[u,[d,"AT&T"],[l,b]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[l,b]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[l,w]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[l,w]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[l,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[l,w]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[l,w]],[/\b(k88) b/i],[u,[d,"ZTE"],[l,w]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[l,b]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[l,b]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[l,w]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[l,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[l,w]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[l,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[l,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[l,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[l,b]],[/\b(ph-1) /i],[u,[d,"Essential"],[l,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[l,w]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[l,w]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[l,w]],[/(shield[\w ]+) b/i],[u,[d,"Nvidia"],[l,w]],[/(sprint) (\w+)/i],[d,u,[l,b]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,F],[l,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,U],[l,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,U],[l,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[l,h]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[l,h]],[/(playstation [345portablevi]+)/i],[u,[d,D],[l,h]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,F],[l,h]],[/smart-tv.+(samsung)/i],[d,[l,g]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,S],[l,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,I],[l,g]],[/(apple) ?tv/i],[d,[u,A+" TV"],[l,g]],[/crkey/i],[[u,x+"cast"],[d,z],[l,g]],[/droid.+aft(\w)( bui|\))/i],[u,[d,E],[l,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[d,C],[l,g]],[/(bravia[\w ]+)( bui|\))/i],[u,[d,D],[l,g]],[/(mitv-\w{5}) bui/i],[u,[d,B],[l,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,W],[u,W],[l,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,g]],[/((pebble))app/i],[d,u,[l,y]],[/droid.+; (glass) \d/i],[u,[d,z],[l,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,U],[l,y]],[/(quest( 2)?)/i],[u,[d,V],[l,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[l,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[l,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[l,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[l,b]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[f,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[f,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[f,[p,X,q]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,"Windows"],[p,X,q]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,p],[/\(bb(10);/i],[p,[f,T]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[f,L+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[f,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[f,x+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[f,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,p],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[f,p]]},j=function(e,t){if(typeof e===_&&(t=e,e=n),!(this instanceof j))return new j(e,t).getResult();var r=e||(typeof a!==s&&a.navigator&&a.navigator.userAgent?a.navigator.userAgent:""),i=t?function(e,t){var r={};for(var i in e)t[i]&&t[i].length%2==0?r[i]=t[i].concat(e[i]):r[i]=e[i];return r}(Z,t):Z;return this.getBrowser=function(){var e,t={};return t[f]=n,t[p]=n,Y.call(t,r,i.browser),t.major=typeof(e=t.version)===c?e.replace(/[^\d\.]/g,"").split(".")[0]:n,t},this.getCPU=function(){var e={};return e[m]=n,Y.call(e,r,i.cpu),e},this.getDevice=function(){var e={};return e[d]=n,e[u]=n,e[l]=n,Y.call(e,r,i.device),e},this.getEngine=function(){var e={};return e[f]=n,e[p]=n,Y.call(e,r,i.engine),e},this.getOS=function(){var e={};return e[f]=n,e[p]=n,Y.call(e,r,i.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===c&&e.length>350?W(e,350):e,this},this.setUA(r),this};j.VERSION="1.0.33",j.BROWSER=N([f,p,"major"]),j.CPU=N([m]),j.DEVICE=N([u,d,l,h,b,g,w,y,v]),j.ENGINE=j.OS=N([f,p]),typeof t!==s?(e.exports&&(t=e.exports=j),t.UAParser=j):r.amdO?(i=function(){return j}.call(t,r,t,e))===n||(e.exports=i):typeof a!==s&&(a.UAParser=j);var K=typeof a!==s&&(a.jQuery||a.Zepto);if(K&&!K.ua){var J=new j;K.ua=J.getResult(),K.ua.get=function(){return J.getUA()},K.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var r in t)K.ua[r]=t[r]}}}("object"==typeof window?window:this)},751:(e,t,r)=>{"use strict";e.exports=r.p+"22a0ba3553d400112656.wasm"}},t={};function r(i){var a=t[i];if(void 0!==a)return a.exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,r),n.exports}r.m=e,r.amdO={},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");i.length&&(e=i[i.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.b=self.location+"",(()=>{"use strict";var e;const t=(e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t){var r,i,a;t=t||{},r||(r=void 0!==t?t:{}),r.ready=new Promise((function(e,t){i=e,a=t}));var n,o={};for(n in r)r.hasOwnProperty(n)&&(o[n]=r[n]);var s="./this.program";function _(e,t){throw t}var c,u="";u=self.location.href,e&&(u=e),u=0!==u.indexOf("blob:")?u.substr(0,u.lastIndexOf("/")+1):"",c=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)};var f,l,d=r.print||console.log.bind(console),p=r.printErr||console.warn.bind(console);for(n in o)o.hasOwnProperty(n)&&(r[n]=o[n]);o=null,r.thisProgram&&(s=r.thisProgram),r.quit&&(_=r.quit),r.wasmBinary&&(l=r.wasmBinary);var m=r.noExitRuntime||!0;"object"!=typeof WebAssembly&&j("no native wasm support detected");var h,b,w=!1;function g(e,t){e||j("Assertion failed: "+t)}function y(e){var t=r["_"+e];return g(t,"Cannot call unknown function "+e+", make sure it is exported"),t}var v,E,A,k,T,R,x,L,z,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function I(e,t,r){var i=t+r;for(r=t;e[r]&&!(r>=i);)++r;if(16<r-t&&e.subarray&&M)return M.decode(e.subarray(t,r));for(i="";t<r;){var a=e[t++];if(128&a){var n=63&e[t++];if(192==(224&a))i+=String.fromCharCode((31&a)<<6|n);else{var o=63&e[t++];65536>(a=224==(240&a)?(15&a)<<12|n<<6|o:(7&a)<<18|n<<12|o<<6|63&e[t++])?i+=String.fromCharCode(a):(a-=65536,i+=String.fromCharCode(55296|a>>10,56320|1023&a))}}else i+=String.fromCharCode(a)}return i}function F(e,t){return e?I(A,e,t):""}function O(e,t,r,i){if(!(0<i))return 0;var a=r;i=r+i-1;for(var n=0;n<e.length;++n){var o=e.charCodeAt(n);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++n)),127>=o){if(r>=i)break;t[r++]=o}else{if(2047>=o){if(r+1>=i)break;t[r++]=192|o>>6}else{if(65535>=o){if(r+2>=i)break;t[r++]=224|o>>12}else{if(r+3>=i)break;t[r++]=240|o>>18,t[r++]=128|o>>12&63}t[r++]=128|o>>6&63}t[r++]=128|63&o}}return t[r]=0,r-a}function P(e){for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);55296<=i&&57343>=i&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++r)),127>=i?++t:t=2047>=i?t+2:65535>=i?t+3:t+4}return t}function S(e){var t=P(e)+1,r=_r(t);return r&&O(e,E,r,t),r}function C(e,t){for(var r=0;r<e.length;++r)E[t++>>0]=e.charCodeAt(r);E[t>>0]=0}function D(){var e=h.buffer;v=e,r.HEAP8=E=new Int8Array(e),r.HEAP16=k=new Int16Array(e),r.HEAP32=R=new Int32Array(e),r.HEAPU8=A=new Uint8Array(e),r.HEAPU16=T=new Uint16Array(e),r.HEAPU32=x=new Uint32Array(e),r.HEAPF32=L=new Float32Array(e),r.HEAPF64=z=new Float64Array(e)}var B,U=[],V=[],N=[],G=[];function H(){var e=r.preRun.shift();U.unshift(e)}var W=0,Y=null,X=null;function q(){W++,r.monitorRunDependencies&&r.monitorRunDependencies(W)}function Z(){if(W--,r.monitorRunDependencies&&r.monitorRunDependencies(W),0==W&&(null!==Y&&(clearInterval(Y),Y=null),X)){var e=X;X=null,e()}}function j(e){throw r.onAbort&&r.onAbort(e),p(e),w=!0,b=1,e=new WebAssembly.RuntimeError("abort("+e+"). Build with -s ASSERTIONS=1 for more info."),a(e),e}r.preloadedImages={},r.preloadedAudios={};var K,J,Q,$="zappar-cv.wasm";if(String.prototype.startsWith?!$.startsWith("data:application/octet-stream;base64,"):0!==$.indexOf("data:application/octet-stream;base64,")){var ee=$;$=r.locateFile?r.locateFile(ee,u):u+ee}function te(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t(r);else{var i=t.Ld;"number"==typeof i?void 0===t.dd?B.get(i)():B.get(i)(t.dd):i(void 0===t.dd?null:t.dd)}}}function re(e,t){if(0===e)e=Date.now();else{if(1!==e&&4!==e)return R[ur()>>2]=28,-1;e=Q()}return R[t>>2]=e/1e3|0,R[t+4>>2]=e%1e3*1e6|0,0}function ie(e){this.Xc=e-16,this.be=function(e){R[this.Xc+8>>2]=e},this.Zd=function(e){R[this.Xc+0>>2]=e},this.$d=function(){R[this.Xc+4>>2]=0},this.Yd=function(){E[this.Xc+12>>0]=0},this.ae=function(){E[this.Xc+13>>0]=0},this.Od=function(e,t){this.be(e),this.Zd(t),this.$d(),this.Yd(),this.ae()}}function ae(e,t){for(var r=0,i=e.length-1;0<=i;i--){var a=e[i];"."===a?e.splice(i,1):".."===a?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e}function ne(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=ae(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function oe(e){var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&(t=t.substr(0,t.length-1)),e+t):"."}function se(e){if("/"===e)return"/";var t=(e=(e=ne(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)}function _e(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){if("string"!=typeof(t=0<=r?arguments[r]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=ae(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."}Q=function(){return performance.now()};var ce=[];function ue(e,t){ce[e]={input:[],Mc:[],Wc:t},Se(e,fe)}var fe={open:function(e){var t=ce[e.node.ad];if(!t)throw new Ee(43);e.Kc=t,e.seekable=!1},close:function(e){e.Kc.Wc.flush(e.Kc)},flush:function(e){e.Kc.Wc.flush(e.Kc)},read:function(e,t,r,i){if(!e.Kc||!e.Kc.Wc.yd)throw new Ee(60);for(var a=0,n=0;n<i;n++){try{var o=e.Kc.Wc.yd(e.Kc)}catch(e){throw new Ee(29)}if(void 0===o&&0===a)throw new Ee(6);if(null==o)break;a++,t[r+n]=o}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,i){if(!e.Kc||!e.Kc.Wc.qd)throw new Ee(60);try{for(var a=0;a<i;a++)e.Kc.Wc.qd(e.Kc,t[r+a])}catch(e){throw new Ee(29)}return i&&(e.node.timestamp=Date.now()),a}},le={yd:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=ar(t,!0)}return e.input.shift()},qd:function(e,t){null===t||10===t?(d(I(e.Mc,0)),e.Mc=[]):0!=t&&e.Mc.push(t)},flush:function(e){e.Mc&&0<e.Mc.length&&(d(I(e.Mc,0)),e.Mc=[])}},de={qd:function(e,t){null===t||10===t?(p(I(e.Mc,0)),e.Mc=[]):0!=t&&e.Mc.push(t)},flush:function(e){e.Mc&&0<e.Mc.length&&(p(I(e.Mc,0)),e.Mc=[])}},pe={Pc:null,Rc:function(){return pe.createNode(null,"/",16895,0)},createNode:function(e,t,r,i){if(24576==(61440&r)||4096==(61440&r))throw new Ee(63);return pe.Pc||(pe.Pc={dir:{node:{Oc:pe.Gc.Oc,Qc:pe.Gc.Qc,Zc:pe.Gc.Zc,fd:pe.Gc.fd,Dd:pe.Gc.Dd,md:pe.Gc.md,Ed:pe.Gc.Ed,gd:pe.Gc.gd,hd:pe.Gc.hd},stream:{Uc:pe.Ic.Uc}},file:{node:{Oc:pe.Gc.Oc,Qc:pe.Gc.Qc},stream:{Uc:pe.Ic.Uc,read:pe.Ic.read,write:pe.Ic.write,td:pe.Ic.td,zd:pe.Ic.zd,Bd:pe.Ic.Bd}},link:{node:{Oc:pe.Gc.Oc,Qc:pe.Gc.Qc,bd:pe.Gc.bd},stream:{}},ud:{node:{Oc:pe.Gc.Oc,Qc:pe.Gc.Qc},stream:Pe}}),16384==(61440&(r=Le(e,t,r,i)).mode)?(r.Gc=pe.Pc.dir.node,r.Ic=pe.Pc.dir.stream,r.Hc={}):32768==(61440&r.mode)?(r.Gc=pe.Pc.file.node,r.Ic=pe.Pc.file.stream,r.Jc=0,r.Hc=null):40960==(61440&r.mode)?(r.Gc=pe.Pc.link.node,r.Ic=pe.Pc.link.stream):8192==(61440&r.mode)&&(r.Gc=pe.Pc.ud.node,r.Ic=pe.Pc.ud.stream),r.timestamp=Date.now(),e&&(e.Hc[t]=r,e.timestamp=r.timestamp),r},oe:function(e){return e.Hc?e.Hc.subarray?e.Hc.subarray(0,e.Jc):new Uint8Array(e.Hc):new Uint8Array(0)},vd:function(e,t){var r=e.Hc?e.Hc.length:0;r>=t||(t=Math.max(t,r*(1048576>r?2:1.125)>>>0),0!=r&&(t=Math.max(t,256)),r=e.Hc,e.Hc=new Uint8Array(t),0<e.Jc&&e.Hc.set(r.subarray(0,e.Jc),0))},Wd:function(e,t){if(e.Jc!=t)if(0==t)e.Hc=null,e.Jc=0;else{var r=e.Hc;e.Hc=new Uint8Array(t),r&&e.Hc.set(r.subarray(0,Math.min(t,e.Jc))),e.Jc=t}},Gc:{Oc:function(e){var t={};return t.Jd=8192==(61440&e.mode)?e.id:1,t.pd=e.id,t.mode=e.mode,t.Ud=1,t.uid=0,t.Md=0,t.ad=e.ad,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.Jc:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.Fd=new Date(e.timestamp),t.Td=new Date(e.timestamp),t.Id=new Date(e.timestamp),t.Gd=4096,t.Hd=Math.ceil(t.size/t.Gd),t},Qc:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&pe.Wd(e,t.size)},Zc:function(){throw Ae[44]},fd:function(e,t,r,i){return pe.createNode(e,t,r,i)},Dd:function(e,t,r){if(16384==(61440&e.mode)){try{var i=xe(t,r)}catch(e){}if(i)for(var a in i.Hc)throw new Ee(55)}delete e.parent.Hc[e.name],e.parent.timestamp=Date.now(),e.name=r,t.Hc[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},md:function(e,t){delete e.Hc[t],e.timestamp=Date.now()},Ed:function(e,t){var r,i=xe(e,t);for(r in i.Hc)throw new Ee(55);delete e.Hc[t],e.timestamp=Date.now()},gd:function(e){var t,r=[".",".."];for(t in e.Hc)e.Hc.hasOwnProperty(t)&&r.push(t);return r},hd:function(e,t,r){return(e=pe.createNode(e,t,41471,0)).link=r,e},bd:function(e){if(40960!=(61440&e.mode))throw new Ee(28);return e.link}},Ic:{read:function(e,t,r,i,a){var n=e.node.Hc;if(a>=e.node.Jc)return 0;if(8<(e=Math.min(e.node.Jc-a,i))&&n.subarray)t.set(n.subarray(a,a+e),r);else for(i=0;i<e;i++)t[r+i]=n[a+i];return e},write:function(e,t,r,i,a,n){if(t.buffer===E.buffer&&(n=!1),!i)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.Hc||e.Hc.subarray)){if(n)return e.Hc=t.subarray(r,r+i),e.Jc=i;if(0===e.Jc&&0===a)return e.Hc=t.slice(r,r+i),e.Jc=i;if(a+i<=e.Jc)return e.Hc.set(t.subarray(r,r+i),a),i}if(pe.vd(e,a+i),e.Hc.subarray&&t.subarray)e.Hc.set(t.subarray(r,r+i),a);else for(n=0;n<i;n++)e.Hc[a+n]=t[r+n];return e.Jc=Math.max(e.Jc,a+i),i},Uc:function(e,t,r){if(1===r?t+=e.position:2===r&&32768==(61440&e.node.mode)&&(t+=e.node.Jc),0>t)throw new Ee(28);return t},td:function(e,t,r){pe.vd(e.node,t+r),e.node.Jc=Math.max(e.node.Jc,t+r)},zd:function(e,t,r,i,a,n){if(0!==t)throw new Ee(28);if(32768!=(61440&e.node.mode))throw new Ee(43);if(e=e.node.Hc,2&n||e.buffer!==v){for((0<i||i+r<e.length)&&(e=e.subarray?e.subarray(i,i+r):Array.prototype.slice.call(e,i,i+r)),i=!0,n=16384*Math.ceil(r/16384),t=_r(n);r<n;)E[t+r++]=0;if(!(r=t))throw new Ee(48);E.set(e,r)}else i=!1,r=e.byteOffset;return{Xc:r,ke:i}},Bd:function(e,t,r,i,a){if(32768!=(61440&e.node.mode))throw new Ee(43);return 2&a||pe.Ic.write(e,t,0,i,r,!1),0}}},me=null,he={},be=[],we=1,ge=null,ye=!0,ve={},Ee=null,Ae={};function ke(e,t){if(t=t||{},!(e=_e("/",e)))return{path:"",node:null};var r,i={wd:!0,rd:0};for(r in i)void 0===t[r]&&(t[r]=i[r]);if(8<t.rd)throw new Ee(32);e=ae(e.split("/").filter((function(e){return!!e})),!1);var a=me;for(i="/",r=0;r<e.length;r++){var n=r===e.length-1;if(n&&t.parent)break;if(a=xe(a,e[r]),i=ne(i+"/"+e[r]),a.$c&&(!n||n&&t.wd)&&(a=a.$c.root),!n||t.ed)for(n=0;40960==(61440&a.mode);)if(a=Ne(i),a=ke(i=_e(oe(i),a),{rd:t.rd}).node,40<n++)throw new Ee(32)}return{path:i,node:a}}function Te(e){for(var t;;){if(e===e.parent)return e=e.Rc.Ad,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}}function Re(e,t){for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%ge.length}function xe(e,t){var r;if(r=(r=Ie(e,"x"))?r:e.Gc.Zc?0:2)throw new Ee(r,e);for(r=ge[Re(e.id,t)];r;r=r.Vc){var i=r.name;if(r.parent.id===e.id&&i===t)return r}return e.Gc.Zc(e,t)}function Le(e,t,r,i){return t=Re((e=new ir(e,t,r,i)).parent.id,e.name),e.Vc=ge[t],ge[t]=e}var ze={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Me(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function Ie(e,t){return ye||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2}function Fe(e,t){try{return xe(e,t),20}catch(e){}return Ie(e,"wx")}var Oe,Pe={open:function(e){e.Ic=he[e.node.ad].Ic,e.Ic.open&&e.Ic.open(e)},Uc:function(){throw new Ee(70)}};function Se(e,t){he[e]={Ic:t}}function Ce(e,t){var r="/"===t,i=!t;if(r&&me)throw new Ee(10);if(!r&&!i){var a=ke(t,{wd:!1});if(t=a.path,(a=a.node).$c)throw new Ee(10);if(16384!=(61440&a.mode))throw new Ee(54)}t={type:e,se:{},Ad:t,Sd:[]},(e=e.Rc(t)).Rc=t,t.root=e,r?me=e:a&&(a.$c=t,a.Rc&&a.Rc.Sd.push(t))}function De(e,t,r){var i=ke(e,{parent:!0}).node;if(!(e=se(e))||"."===e||".."===e)throw new Ee(28);var a=Fe(i,e);if(a)throw new Ee(a);if(!i.Gc.fd)throw new Ee(63);return i.Gc.fd(i,e,t,r)}function Be(e){return De(e,16895,0)}function Ue(e,t,r){void 0===r&&(r=t,t=438),De(e,8192|t,r)}function Ve(e,t){if(!_e(e))throw new Ee(44);var r=ke(t,{parent:!0}).node;if(!r)throw new Ee(44);var i=Fe(r,t=se(t));if(i)throw new Ee(i);if(!r.Gc.hd)throw new Ee(63);r.Gc.hd(r,t,e)}function Ne(e){if(!(e=ke(e).node))throw new Ee(44);if(!e.Gc.bd)throw new Ee(28);return _e(Te(e.parent),e.Gc.bd(e))}function Ge(e,t){if(!(e=ke(e,{ed:!t}).node))throw new Ee(44);if(!e.Gc.Oc)throw new Ee(63);return e.Gc.Oc(e)}function He(e){return Ge(e,!0)}function We(e,t,i,a){if(""===e)throw new Ee(44);if("string"==typeof t){var n=ze[t];if(void 0===n)throw Error("Unknown file open mode: "+t);t=n}if(i=64&t?4095&(void 0===i?438:i)|32768:0,"object"==typeof e)var o=e;else{e=ne(e);try{o=ke(e,{ed:!(131072&t)}).node}catch(e){}}if(n=!1,64&t)if(o){if(128&t)throw new Ee(20)}else o=De(e,i,0),n=!0;if(!o)throw new Ee(44);if(8192==(61440&o.mode)&&(t&=-513),65536&t&&16384!=(61440&o.mode))throw new Ee(54);if(!n&&(i=o?40960==(61440&o.mode)?32:16384==(61440&o.mode)&&("r"!==Me(t)||512&t)?31:Ie(o,Me(t)):44))throw new Ee(i);if(512&t){if(!(i="string"==typeof(i=o)?ke(i,{ed:!0}).node:i).Gc.Qc)throw new Ee(63);if(16384==(61440&i.mode))throw new Ee(31);if(32768!=(61440&i.mode))throw new Ee(28);if(n=Ie(i,"w"))throw new Ee(n);i.Gc.Qc(i,{size:0,timestamp:Date.now()})}t&=-131713,(a=function(e,t){je||((je=function(){}).prototype={});var r,i=new je;for(r in e)i[r]=e[r];return e=i,t=function(e){for(e=e||0;e<=4096;e++)if(!be[e])return e;throw new Ee(33)}(t),e.Sc=t,be[t]=e}({node:o,path:Te(o),flags:t,seekable:!0,position:0,Ic:o.Ic,ge:[],error:!1},a)).Ic.open&&a.Ic.open(a),!r.logReadFiles||1&t||(Ke||(Ke={}),e in Ke||(Ke[e]=1,p("FS.trackingDelegate error on read file: "+e)));try{ve.onOpenFile&&(o=0,1!=(2097155&t)&&(o|=1),0!=(2097155&t)&&(o|=2),ve.onOpenFile(e,o))}catch(t){p("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+t.message)}return a}function Ye(e,t,r){if(null===e.Sc)throw new Ee(8);if(!e.seekable||!e.Ic.Uc)throw new Ee(70);if(0!=r&&1!=r&&2!=r)throw new Ee(28);return e.position=e.Ic.Uc(e,t,r),e.ge=[],e.position}function Xe(){Ee||((Ee=function(e,t){this.node=t,this.Xd=function(e){this.Lc=e},this.Xd(e),this.message="FS error"}).prototype=Error(),Ee.prototype.constructor=Ee,[44].forEach((function(e){Ae[e]=new Ee(e),Ae[e].stack="<generic error, no stack>"})))}function qe(e,t,r){e=ne("/dev/"+e);var i=function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r}(!!t,!!r);Ze||(Ze=64);var a=Ze++<<8|0;Se(a,{open:function(e){e.seekable=!1},close:function(){r&&r.buffer&&r.buffer.length&&r(10)},read:function(e,r,i,a){for(var n=0,o=0;o<a;o++){try{var s=t()}catch(e){throw new Ee(29)}if(void 0===s&&0===n)throw new Ee(6);if(null==s)break;n++,r[i+o]=s}return n&&(e.node.timestamp=Date.now()),n},write:function(e,t,i,a){for(var n=0;n<a;n++)try{r(t[i+n])}catch(e){throw new Ee(29)}return a&&(e.node.timestamp=Date.now()),n}}),Ue(e,i,a)}var Ze,je,Ke,Je={};function Qe(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&ne(t)!==ne(Te(e.node)))return-54;throw e}return R[r>>2]=i.Jd,R[r+4>>2]=0,R[r+8>>2]=i.pd,R[r+12>>2]=i.mode,R[r+16>>2]=i.Ud,R[r+20>>2]=i.uid,R[r+24>>2]=i.Md,R[r+28>>2]=i.ad,R[r+32>>2]=0,J=[i.size>>>0,(K=i.size,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],R[r+40>>2]=J[0],R[r+44>>2]=J[1],R[r+48>>2]=4096,R[r+52>>2]=i.Hd,R[r+56>>2]=i.Fd.getTime()/1e3|0,R[r+60>>2]=0,R[r+64>>2]=i.Td.getTime()/1e3|0,R[r+68>>2]=0,R[r+72>>2]=i.Id.getTime()/1e3|0,R[r+76>>2]=0,J=[i.pd>>>0,(K=i.pd,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],R[r+80>>2]=J[0],R[r+84>>2]=J[1],0}var $e=void 0;function et(){return R[($e+=4)-4>>2]}function tt(e){if(!(e=be[e]))throw new Ee(8);return e}function rt(e){try{e()}catch(e){if(!(e instanceof br)&&"unwind"!==e)throw e&&"object"==typeof e&&e.stack&&p("exception thrown: "+[e,e.stack]),e}}var it,at,nt,ot=!1,st=null,_t=0,ct=null,ut=0,ft=0,lt=0,dt=[],pt={},mt=!1,ht=!1,bt=[];function wt(e,t,i,a){if(t&&r.od&&e==r.canvas)return r.od;var n;if(t){var o={antialias:!1,alpha:!1,Rd:1};if(a)for(var s in a)o[s]=a[s];if(void 0!==Kt&&(n=function(e,t){e.xd||(e.xd=e.getContext,e.getContext=function(t,r){return"webgl"==t==(r=e.xd(t,r))instanceof WebGLRenderingContext?r:null});var r=e.getContext("webgl",t);return r?function(e,t){var r=Xt(Yt),i={pe:r,attributes:t,version:t.Rd,nd:e};return e.canvas&&(e.canvas.ie=i),Yt[r]=i,(void 0===t.Kd||t.Kd)&&function(e){if(e||(e=Zt),!e.Pd){e.Pd=!0;var t=e.nd;!function(e){var t=e.getExtension("ANGLE_instanced_arrays");t&&(e.vertexAttribDivisor=function(e,r){t.vertexAttribDivisorANGLE(e,r)},e.drawArraysInstanced=function(e,r,i,a){t.drawArraysInstancedANGLE(e,r,i,a)},e.drawElementsInstanced=function(e,r,i,a,n){t.drawElementsInstancedANGLE(e,r,i,a,n)})}(t),function(e){var t=e.getExtension("OES_vertex_array_object");t&&(e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},e.bindVertexArray=function(e){t.bindVertexArrayOES(e)},e.isVertexArray=function(e){return t.isVertexArrayOES(e)})}(t),function(e){var t=e.getExtension("WEBGL_draw_buffers");t&&(e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)})}(t),t.me=t.getExtension("EXT_disjoint_timer_query"),t.qe=t.getExtension("WEBGL_multi_draw"),(t.getSupportedExtensions()||[]).forEach((function(e){0>e.indexOf("lose_context")&&0>e.indexOf("debug")&&t.getExtension(e)}))}}(i),r}(r,t):0}(e,o)))var _=Yt[n].nd}else _=e.getContext("2d");return _?(i&&(t||g(void 0===$t,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),r.od=_,t&&(Zt=Yt[n],r.od=$t=Zt&&Zt.nd),r.ue=t,bt.forEach((function(e){e()})),function(){function e(){ht=document.pointerLockElement===r.canvas||document.mozPointerLockElement===r.canvas||document.webkitPointerLockElement===r.canvas||document.msPointerLockElement===r.canvas}if(r.preloadPlugins||(r.preloadPlugins=[]),!xt){xt=!0;try{Lt=!0}catch(e){Lt=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}zt="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:Lt?null:console.log("warning: no BlobBuilder"),Mt="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,r.Cd||void 0!==Mt||(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),r.Cd=!0),r.preloadPlugins.push({canHandle:function(e){return!r.Cd&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,i,a){var n=null;if(Lt)try{(n=new Blob([e],{type:Rt(t)})).size!==e.length&&(n=new Blob([new Uint8Array(e).buffer],{type:Rt(t)}))}catch(e){!function(e){f||(f={}),f[e]||(f[e]=1,p(e))}("Blob constructor present but fails: "+e+"; falling back to blob builder")}n||((n=new zt).append(new Uint8Array(e).buffer),n=n.getBlob());var o=Mt.createObjectURL(n),s=new Image;s.onload=function(){g(s.complete,"Image "+t+" could not be decoded");var a=document.createElement("canvas");a.width=s.width,a.height=s.height,a.getContext("2d").drawImage(s,0,0),r.preloadedImages[t]=a,Mt.revokeObjectURL(o),i&&i(e)},s.onerror=function(){console.log("Image "+o+" could not be decoded"),a&&a()},s.src=o}}),r.preloadPlugins.push({canHandle:function(e){return!r.re&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,i,a){function n(a){s||(s=!0,r.preloadedAudios[t]=a,i&&i(e))}function o(){s||(s=!0,r.preloadedAudios[t]=new Audio,a&&a())}var s=!1;if(!Lt)return o();try{var _=new Blob([e],{type:Rt(t)})}catch(e){return o()}_=Mt.createObjectURL(_);var c=new Audio;c.addEventListener("canplaythrough",(function(){n(c)}),!1),c.onerror=function(){if(!s){console.log("warning: browser could not fully decode audio "+t+", trying slower base64 approach");for(var r="",i=0,a=0,o=0;o<e.length;o++)for(i=i<<8|e[o],a+=8;6<=a;){var _=i>>a-6&63;a-=6,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[_]}2==a?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&i)<<4],r+="=="):4==a&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&i)<<2],r+="="),c.src="data:audio/x-"+t.substr(-3)+";base64,"+r,n(c)}},c.src=_,Tt((function(){n(c)}),1e4)}});var t=r.canvas;t&&(t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock||t.msRequestPointerLock||function(){},t.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},t.exitPointerLock=t.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",e,!1),document.addEventListener("mozpointerlockchange",e,!1),document.addEventListener("webkitpointerlockchange",e,!1),document.addEventListener("mspointerlockchange",e,!1),r.elementPointerLock&&t.addEventListener("click",(function(e){!ht&&r.canvas.requestPointerLock&&(r.canvas.requestPointerLock(),e.preventDefault())}),!1))}}()),_):null}var gt=!1,yt=void 0,vt=void 0;function Et(){return!!mt&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)}var At=0;function kt(e){if("function"==typeof requestAnimationFrame)requestAnimationFrame(e);else{var t=Date.now();if(0===At)At=t+1e3/60;else for(;t+2>=At;)At+=1e3/60;setTimeout(e,Math.max(At-t,0))}}function Tt(e,t){setTimeout((function(){rt(e)}),t)}function Rt(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]}var xt,Lt,zt,Mt,It=[];function Ft(){var e=r.canvas;It.forEach((function(t){t(e.width,e.height)}))}function Ot(e,t,i){t&&i?(e.he=t,e.Nd=i):(t=e.he,i=e.Nd);var a=t,n=i;if(r.forcedAspectRatio&&0<r.forcedAspectRatio&&(a/n<r.forcedAspectRatio?a=Math.round(n*r.forcedAspectRatio):n=Math.round(a/r.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&"undefined"!=typeof screen){var o=Math.min(screen.width/a,screen.height/n);a=Math.round(a*o),n=Math.round(n*o)}vt?(e.width!=a&&(e.width=a),e.height!=n&&(e.height=n),void 0!==e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=t&&(e.width=t),e.height!=i&&(e.height=i),void 0!==e.style&&(a!=t||n!=i?(e.style.setProperty("width",a+"px","important"),e.style.setProperty("height",n+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))}function Pt(){return!1}r._emscripten_is_main_browser_thread=Pt;var St,Ct=[];function Dt(e,t){x[e>>2]=t,x[e+4>>2]=t/4294967296|0}function Bt(e,t,r,i,a){function n(t){var r=0,i=0;t&&(i=y.response?y.response.byteLength:0,r=_r(i),A.set(new Uint8Array(y.response),r)),x[e+12>>2]=r,Dt(e+16,i)}var o=x[e+8>>2];if(o){var s=F(o),_=e+112,c=F(_);c||(c="GET");var u=x[_+52>>2],f=x[_+56>>2],l=!!x[_+60>>2],d=x[_+68>>2],p=x[_+72>>2];o=x[_+76>>2];var m=x[_+80>>2],h=x[_+84>>2];_=x[_+88>>2];var b=!!(1&u),w=!!(2&u);u=!!(64&u),d=d?F(d):void 0,p=p?F(p):void 0;var g=m?F(m):void 0,y=new XMLHttpRequest;if(y.withCredentials=l,y.open(c,s,!u,d,p),u||(y.timeout=f),y.je=s,y.responseType="arraybuffer",m&&y.overrideMimeType(g),o)for(;(c=x[o>>2])&&(s=x[o+4>>2]);)o+=8,c=F(c),s=F(s),y.setRequestHeader(c,s);Ct.push(y),x[e+0>>2]=Ct.length,o=h&&_?A.slice(h,h+_):null,y.onload=function(i){n(b&&!w);var a=y.response?y.response.byteLength:0;Dt(e+24,0),a&&Dt(e+32,a),T[e+40>>1]=y.readyState,T[e+42>>1]=y.status,y.statusText&&O(y.statusText,A,e+44,64),200<=y.status&&300>y.status?t&&t(e,y,i):r&&r(e,y,i)},y.onerror=function(t){n(b);var i=y.status;Dt(e+24,0),Dt(e+32,y.response?y.response.byteLength:0),T[e+40>>1]=y.readyState,T[e+42>>1]=i,r&&r(e,y,t)},y.ontimeout=function(t){r&&r(e,y,t)},y.onprogress=function(t){var r=b&&w&&y.response?y.response.byteLength:0,a=0;b&&w&&(a=_r(r),A.set(new Uint8Array(y.response),a)),x[e+12>>2]=a,Dt(e+16,r),Dt(e+24,t.loaded-r),Dt(e+32,t.total),T[e+40>>1]=y.readyState,3<=y.readyState&&0===y.status&&0<t.loaded&&(y.status=200),T[e+42>>1]=y.status,y.statusText&&O(y.statusText,A,e+44,64),i&&i(e,y,t),a&&sr(a)},y.onreadystatechange=function(t){T[e+40>>1]=y.readyState,2<=y.readyState&&(T[e+42>>1]=y.status),a&&a(e,y,t)};try{y.send(o)}catch(t){r&&r(e,y,t)}}else r(e,0,"no url specified!")}function Ut(e,t,r,i){var a=St;if(a){var n=x[e+112+64>>2];n||(n=x[e+8>>2]);var o=F(n);try{var s=a.transaction(["FILES"],"readwrite").objectStore("FILES").put(t,o);s.onsuccess=function(){T[e+40>>1]=4,T[e+42>>1]=200,O("OK",A,e+44,64),r(e,0,o)},s.onerror=function(t){T[e+40>>1]=4,T[e+42>>1]=413,O("Payload Too Large",A,e+44,64),i(e,0,t)}}catch(t){i(e,0,t)}}else i(e,0,"IndexedDB not available!")}var Vt,Nt={};function Gt(){if(!Vt){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:s||"./this.program"};for(e in Nt)t[e]=Nt[e];var r=[];for(e in t)r.push(e+"="+t[e]);Vt=r}return Vt}var Ht=1,Wt=[],Yt=[];function Xt(e){for(var t=Ht++,r=e.length;r<t;r++)e[r]=null;return t}var qt,Zt,jt,Kt={};function Jt(e){return 0==e%4&&(0!=e%100||0==e%400)}function Qt(e,t){for(var r=0,i=0;i<=t;r+=e[i++]);return r}var $t,er=[31,29,31,30,31,30,31,31,30,31,30,31],tr=[31,28,31,30,31,30,31,31,30,31,30,31];function rr(e,t){for(e=new Date(e.getTime());0<t;){var r=e.getMonth(),i=(Jt(e.getFullYear())?er:tr)[r];if(!(t>i-e.getDate())){e.setDate(e.getDate()+t);break}t-=i-e.getDate()+1,e.setDate(1),11>r?e.setMonth(r+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function ir(e,t,r,i){e||(e=this),this.parent=e,this.Rc=e.Rc,this.$c=null,this.id=we++,this.name=t,this.mode=r,this.Gc={},this.Ic={},this.ad=i}function ar(e,t){var r=Array(P(e)+1);return e=O(e,r,0,r.length),t&&(r.length=e),r}Object.defineProperties(ir.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}}}),Xe(),ge=Array(4096),Ce(pe,"/"),Be("/tmp"),Be("/home"),Be("/home/web_user"),function(){Be("/dev"),Se(259,{read:function(){return 0},write:function(e,t,r,i){return i}}),Ue("/dev/null",259),ue(1280,le),ue(1536,de),Ue("/dev/tty",1280),Ue("/dev/tty1",1536);var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){j("randomDevice")}}();qe("random",e),qe("urandom",e),Be("/dev/shm"),Be("/dev/shm/tmp")}(),function(){Be("/proc");var e=Be("/proc/self");Be("/proc/self/fd"),Ce({Rc:function(){var t=Le(e,"fd",16895,73);return t.Gc={Zc:function(e,t){var r=be[+t];if(!r)throw new Ee(8);return(e={parent:null,Rc:{Ad:"fake"},Gc:{bd:function(){return r.path}}}).parent=e}},t}},"/proc/self/fd")}(),r.requestFullscreen=function(e,t){!function(e,t){function i(){mt=!1;var e=a.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(a.exitFullscreen=Et,yt&&a.requestPointerLock(),mt=!0,vt?("undefined"!=typeof SDL&&(R[SDL.screen>>2]=8388608|x[SDL.screen>>2]),Ot(r.canvas),Ft()):Ot(a)):(e.parentNode.insertBefore(a,e),e.parentNode.removeChild(e),vt?("undefined"!=typeof SDL&&(R[SDL.screen>>2]=-8388609&x[SDL.screen>>2]),Ot(r.canvas),Ft()):Ot(a)),r.onFullScreen&&r.onFullScreen(mt),r.onFullscreen&&r.onFullscreen(mt)}void 0===(yt=e)&&(yt=!0),void 0===(vt=t)&&(vt=!1);var a=r.canvas;gt||(gt=!0,document.addEventListener("fullscreenchange",i,!1),document.addEventListener("mozfullscreenchange",i,!1),document.addEventListener("webkitfullscreenchange",i,!1),document.addEventListener("MSFullscreenChange",i,!1));var n=document.createElement("div");a.parentNode.insertBefore(n,a),n.appendChild(a),n.requestFullscreen=n.requestFullscreen||n.mozRequestFullScreen||n.msRequestFullscreen||(n.webkitRequestFullscreen?function(){n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(n.webkitRequestFullScreen?function(){n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),n.requestFullscreen()}(e,t)},r.requestAnimationFrame=function(e){kt(e)},r.setCanvasSize=function(e,t,i){Ot(r.canvas,e,t),i||Ft()},r.pauseMainLoop=function(){st=null,_t++},r.resumeMainLoop=function(){_t++;var e=ut,t=ft,i=ct;ct=null,function(e){function t(){if(i<_t){if(!m)try{gr(b)}catch(e){if(!(e instanceof br))throw e}return!1}return!0}g(!ct,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),ct=e;var i=_t;ot=!1,at=function(){if(!w)if(0<dt.length){var i=Date.now(),a=dt.shift();if(a.Ld(a.dd),nt){var n=nt,o=0==n%1?n-1:Math.floor(n);nt=a.le?o:(8*n+(o+.5))/9}console.log('main loop blocker "'+a.name+'" took '+(Date.now()-i)+" ms"),r.setStatus&&(i=r.statusMessage||"Please wait...",n=pt.ne,(a=nt)?a<n?r.setStatus(i+" ("+(n-a)+"/"+n+")"):r.setStatus(i):r.setStatus("")),t()&&setTimeout(at,0)}else t()&&(lt=lt+1|0,1==ut&&1<ft&&0!=lt%ft?st():(0==ut&&(it=Q()),w||r.preMainLoop&&!1===r.preMainLoop()||(rt(e),r.postMainLoop&&r.postMainLoop()),t()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.Vd&&SDL.audio.Vd(),st())))}}(i),function(e,t){if(ut=e,ft=t,ct)if(ot||(ot=!0),0==e)st=function(){var e=0|Math.max(0,it+t-Q());setTimeout(at,e)};else if(1==e)st=function(){kt(at)};else if(2==e){if("undefined"==typeof setImmediate){var i=[];addEventListener("message",(function(e){"setimmediate"!==e.data&&"setimmediate"!==e.data.target||(e.stopPropagation(),i.shift()())}),!0),setImmediate=function(e){i.push(e),void 0===r.setImmediates&&(r.setImmediates=[]),r.setImmediates.push(e),postMessage({target:"setimmediate"})}}st=function(){setImmediate(at)}}}(e,t),st()},r.getUserMedia=function(){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(void 0)},r.createContext=function(e,t,r,i){return wt(e,t,r,i)},function(e,t){try{var r=indexedDB.open("emscripten_filesystem",1)}catch(e){return void t()}r.onupgradeneeded=function(e){(e=e.target.result).objectStoreNames.contains("FILES")&&e.deleteObjectStore("FILES"),e.createObjectStore("FILES")},r.onsuccess=function(e){!function(e){St=e,Z()}(e.target.result)},r.onerror=function(e){t()}}(0,(function(){St=!1,Z()})),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||q();var nr={D:function(e,t){return re(e,t)},a:function(e){return _r(e+16)+16},b:function(e,t,r){throw new ie(e).Od(t,r),e},e:function(e,t,r){$e=r;try{var i=tt(e);switch(t){case 0:var a=et();return 0>a?-28:We(i.path,i.flags,0,a).Sc;case 1:case 2:case 13:case 14:return 0;case 3:return i.flags;case 4:return a=et(),i.flags|=a,0;case 12:return a=et(),k[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return R[ur()>>2]=28,-1}}catch(e){return void 0!==Je&&e instanceof Ee||j(e),-e.Lc}},E:function(e,t,r){try{var i=tt(e);if(!i.Tc){var a=ke(i.path,{ed:!0}).node;if(!a.Gc.gd)throw new Ee(54);var n=a.Gc.gd(a);i.Tc=n}e=0;for(var o=Ye(i,0,1),s=Math.floor(o/280);s<i.Tc.length&&e+280<=r;){var _=i.Tc[s];if("."===_[0])var c=1,u=4;else{var f=xe(i.node,_);c=f.id,u=8192==(61440&f.mode)?2:16384==(61440&f.mode)?4:40960==(61440&f.mode)?10:8}J=[c>>>0,(K=c,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],R[t+e>>2]=J[0],R[t+e+4>>2]=J[1],J=[280*(s+1)>>>0,(K=280*(s+1),1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],R[t+e+8>>2]=J[0],R[t+e+12>>2]=J[1],k[t+e+16>>1]=280,E[t+e+18>>0]=u,O(_,A,t+e+19,256),e+=280,s+=1}return Ye(i,280*s,0),e}catch(e){return void 0!==Je&&e instanceof Ee||j(e),-e.Lc}},n:function(){return 42},J:function(e,t,r){$e=r;try{var i=tt(e);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return i.Kc?0:-59;case 21519:if(!i.Kc)return-59;var a=et();return R[a>>2]=0;case 21520:return i.Kc?-28:-59;case 21531:if(e=a=et(),!i.Ic.Qd)throw new Ee(59);return i.Ic.Qd(i,t,e);default:j("bad ioctl syscall "+t)}}catch(e){return void 0!==Je&&e instanceof Ee||j(e),-e.Lc}},I:function(e,t){try{return Qe(He,e=F(e),t)}catch(e){return void 0!==Je&&e instanceof Ee||j(e),-e.Lc}},p:function(e,t,r){$e=r;try{return We(F(e),t,r?et():0).Sc}catch(e){return void 0!==Je&&e instanceof Ee||j(e),-e.Lc}},F:function(e,t){try{return Qe(Ge,e=F(e),t)}catch(e){return void 0!==Je&&e instanceof Ee||j(e),-e.Lc}},H:function(e,t){try{return Ve(e=F(e),t=F(t)),0}catch(e){return void 0!==Je&&e instanceof Ee||j(e),-e.Lc}},K:function(e){try{if(!e)return-21;var t={__size__:390,domainname:325,machine:260,nodename:65,release:130,sysname:0,version:195};return C("Emscripten",e+t.sysname),C("emscripten",e+t.nodename),C("1.0",e+t.release),C("#1",e+t.version),C("wasm32",e+t.machine),0}catch(e){return void 0!==Je&&e instanceof Ee||j(e),-e.Lc}},G:function(e){try{var t=ke(e=F(e),{parent:!0}).node,r=se(e),i=xe(t,r);e:{try{var a=xe(t,r)}catch(e){var n=e.Lc;break e}n=Ie(t,"wx")||(16384==(61440&a.mode)?31:0)}if(n)throw new Ee(n);if(!t.Gc.md)throw new Ee(63);if(i.$c)throw new Ee(10);try{ve.willDeletePath&&ve.willDeletePath(e)}catch(t){p("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}t.Gc.md(t,r);var o=Re(i.parent.id,i.name);if(ge[o]===i)ge[o]=i.Vc;else for(var s=ge[o];s;){if(s.Vc===i){s.Vc=i.Vc;break}s=s.Vc}try{ve.onDeletePath&&ve.onDeletePath(e)}catch(t){p("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}return 0}catch(e){return void 0!==Je&&e instanceof Ee||j(e),-e.Lc}},L:function(e){delete Ct[e-1]},c:function(){j()},h:re,P:function(e,t){return e-t},R:function(){self.postMessage({t:"gfx"})},u:function(){var e=new URL(location.origin).hostname;if(0===e.length&&(e=new URL(location.href.replace("blob:","")).hostname),/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(e))0===e.indexOf("10.")&&(e="10.*"),0===e.indexOf("192.168.")&&(e="192.168.*"),0===e.indexOf("172.")&&(e="172.*"),0===e.indexOf("127.")&&(e="127.*");else{var t=new RegExp("("+String.fromCharCode(92)+".ngrok"+String.fromCharCode(92)+".io)$","i");t.test(e)&&(e="*.ngrok.io"),(t=new RegExp("("+String.fromCharCode(92)+".ngrok-free"+String.fromCharCode(92)+".app)$","i")).test(e)&&(e="*.ngrok.io"),(t=new RegExp("("+String.fromCharCode(92)+".arweb"+String.fromCharCode(92)+".app)$","i")).test(e)&&(e="*.arweb.app")}t=P(e)+1;var r=_r(t);return O(e,A,r,t+1),r},t:function(){self.postMessage({t:"licerr"})},l:function(e,t,r){function i(){B.get(e)(t)}0<=r?Tt(i,r):function(e){kt((function(){rt(e)}))}(i)},y:function(){return 2147483648},N:Pt,w:function(e,t,r){A.copyWithin(e,t,t+r)},x:function(e){var t=A.length;if(2147483648<e)return!1;for(var r=1;4>=r;r*=2){var i=t*(1+.2/r);i=Math.min(i,e+100663296),0<(i=Math.max(e,i))%65536&&(i+=65536-i%65536);e:{try{h.grow(Math.min(2147483648,i)-v.byteLength+65535>>>16),D();var a=1;break e}catch(e){}a=void 0}if(a)return!0}return!1},M:function(e,t,r,i,a){function n(e,r){Ut(e,r.response,(function(e){rt((function(){l?B.get(l)(e):t&&t(e)}))}),(function(e){rt((function(){l?B.get(l)(e):t&&t(e)}))}))}function o(e){rt((function(){m?B.get(m)(e):a&&a(e)}))}function s(e){rt((function(){d?B.get(d)(e):r&&r(e)}))}function _(e){rt((function(){p?B.get(p)(e):i&&i(e)}))}function c(e){rt((function(){l?B.get(l)(e):t&&t(e)}))}var u=e+112,f=F(u),l=x[u+36>>2],d=x[u+40>>2],p=x[u+44>>2],m=x[u+48>>2],h=x[u+52>>2],b=!!(4&h),w=!!(32&h);if(h=!!(16&h),"EM_IDB_STORE"===f)f=x[u+84>>2],Ut(e,A.slice(f,f+x[u+88>>2]),c,s);else if("EM_IDB_DELETE"===f)!function(e,t,r){var i=St;if(i){var a=x[e+112+64>>2];a||(a=x[e+8>>2]),a=F(a);try{var n=i.transaction(["FILES"],"readwrite").objectStore("FILES").delete(a);n.onsuccess=function(r){r=r.target.result,x[e+12>>2]=0,Dt(e+16,0),Dt(e+24,0),Dt(e+32,0),T[e+40>>1]=4,T[e+42>>1]=200,O("OK",A,e+44,64),t(e,0,r)},n.onerror=function(t){T[e+40>>1]=4,T[e+42>>1]=404,O("Not Found",A,e+44,64),r(e,0,t)}}catch(t){r(e,0,t)}}else r(e,0,"IndexedDB not available!")}(e,c,s);else if(h){if(w)return 0;Bt(e,b?n:c,s,_,o)}else!function(e,t,r){var i=St;if(i){var a=x[e+112+64>>2];a||(a=x[e+8>>2]),a=F(a);try{var n=i.transaction(["FILES"],"readonly").objectStore("FILES").get(a);n.onsuccess=function(i){if(i.target.result){var a=(i=i.target.result).byteLength||i.length,n=_r(a);A.set(new Uint8Array(i),n),x[e+12>>2]=n,Dt(e+16,a),Dt(e+24,0),Dt(e+32,a),T[e+40>>1]=4,T[e+42>>1]=200,O("OK",A,e+44,64),t(e,0,i)}else T[e+40>>1]=4,T[e+42>>1]=404,O("Not Found",A,e+44,64),r(e,0,"no data")},n.onerror=function(t){T[e+40>>1]=4,T[e+42>>1]=404,O("Not Found",A,e+44,64),r(e,0,t)}}catch(t){r(e,0,t)}}else r(e,0,"IndexedDB not available!")}(e,c,w?s:b?function(e){Bt(e,n,s,_,o)}:function(e){Bt(e,c,s,_,o)});return e},B:function(e,t){try{var r=0;return Gt().forEach((function(i,a){var n=t+r;R[e+4*a>>2]=n,C(i,n),r+=i.length+1})),0}catch(e){return void 0!==Je&&e instanceof Ee||j(e),e.Lc}},C:function(e,t){try{var r=Gt();R[e>>2]=r.length;var i=0;return r.forEach((function(e){i+=e.length+1})),R[t>>2]=i,0}catch(e){return void 0!==Je&&e instanceof Ee||j(e),e.Lc}},O:function(e){gr(e)},g:function(e){try{var t=tt(e);if(null===t.Sc)throw new Ee(8);t.Tc&&(t.Tc=null);try{t.Ic.close&&t.Ic.close(t)}catch(e){throw e}finally{be[t.Sc]=null}return t.Sc=null,0}catch(e){return void 0!==Je&&e instanceof Ee||j(e),e.Lc}},q:function(e,t,r,i){try{e:{for(var a=tt(e),n=e=0;n<r;n++){var o=R[t+(8*n+4)>>2],s=a,_=R[t+8*n>>2],c=o,u=void 0,f=E;if(0>c||0>u)throw new Ee(28);if(null===s.Sc)throw new Ee(8);if(1==(2097155&s.flags))throw new Ee(8);if(16384==(61440&s.node.mode))throw new Ee(31);if(!s.Ic.read)throw new Ee(28);var l=void 0!==u;if(l){if(!s.seekable)throw new Ee(70)}else u=s.position;var d=s.Ic.read(s,f,_,c,u);l||(s.position+=d);var p=d;if(0>p){var m=-1;break e}if(e+=p,p<o)break}m=e}return R[i>>2]=m,0}catch(e){return void 0!==Je&&e instanceof Ee||j(e),e.Lc}},v:function(e,t,r,i,a){try{var n=tt(e);return-9007199254740992>=(e=4294967296*r+(t>>>0))||9007199254740992<=e?-61:(Ye(n,e,i),J=[n.position>>>0,(K=n.position,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],R[a>>2]=J[0],R[a+4>>2]=J[1],n.Tc&&0===e&&0===i&&(n.Tc=null),0)}catch(e){return void 0!==Je&&e instanceof Ee||j(e),e.Lc}},k:function(e,t,r,i){try{e:{for(var a=tt(e),n=e=0;n<r;n++){var o=a,s=R[t+8*n>>2],_=R[t+(8*n+4)>>2],c=void 0,u=E;if(0>_||0>c)throw new Ee(28);if(null===o.Sc)throw new Ee(8);if(0==(2097155&o.flags))throw new Ee(8);if(16384==(61440&o.node.mode))throw new Ee(31);if(!o.Ic.write)throw new Ee(28);o.seekable&&1024&o.flags&&Ye(o,0,2);var f=void 0!==c;if(f){if(!o.seekable)throw new Ee(70)}else c=o.position;var l=o.Ic.write(o,u,s,_,c,void 0);f||(o.position+=l);try{o.path&&ve.onWriteToFile&&ve.onWriteToFile(o.path)}catch(e){p("FS.trackingDelegate['onWriteToFile']('"+o.path+"') threw an exception: "+e.message)}var d=l;if(0>d){var m=-1;break e}e+=d}m=e}return R[i>>2]=m,0}catch(e){return void 0!==Je&&e instanceof Ee||j(e),e.Lc}},f:function(e){var t=Date.now();return R[e>>2]=t/1e3|0,R[e+4>>2]=t%1e3*1e3|0,0},m:function(e,t){$t.bindTexture(e,Wt[t])},o:function(e,t){for(var r=0;r<e;r++){var i=$t.createTexture(),a=i&&Xt(Wt);i?(i.name=a,Wt[a]=i):qt||(qt=1282),R[t+4*r>>2]=a}},i:function(e,t,r,i,a,n,o,s,_){var c=$t,u=c.texImage2D;if(_){var f=s-5120;f=1==f?A:4==f?R:6==f?L:5==f||28922==f?x:T;var l=31-Math.clz32(f.BYTES_PER_ELEMENT);_=f.subarray(_>>l,_+a*(i*({5:3,6:4,8:2,29502:3,29504:4}[o-6402]||1)*(1<<l)+4-1&-4)>>l)}else _=null;u.call(c,e,t,r,i,a,n,o,s,_)},j:function(e,t,r){$t.texParameteri(e,t,r)},s:function e(t,r){return t=new Date(1e3*R[t>>2]),R[r>>2]=t.getUTCSeconds(),R[r+4>>2]=t.getUTCMinutes(),R[r+8>>2]=t.getUTCHours(),R[r+12>>2]=t.getUTCDate(),R[r+16>>2]=t.getUTCMonth(),R[r+20>>2]=t.getUTCFullYear()-1900,R[r+24>>2]=t.getUTCDay(),R[r+36>>2]=0,R[r+32>>2]=0,R[r+28>>2]=(t.getTime()-Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0))/864e5|0,e.sd||(e.sd=S("GMT")),R[r+40>>2]=e.sd,r},r:function(e,t){!function(){function e(e){return(e=e.toTimeString().match(/\(([A-Za-z ]+)\)$/))?e[1]:"GMT"}if(!jt){jt=!0;var t=(new Date).getFullYear(),r=new Date(t,0,1),i=new Date(t,6,1);t=r.getTimezoneOffset();var a=i.getTimezoneOffset(),n=Math.max(t,a);R[dr()>>2]=60*n,R[lr()>>2]=Number(t!=a),r=e(r),i=e(i),r=S(r),i=S(i),a<t?(R[fr()>>2]=r,R[fr()+4>>2]=i):(R[fr()>>2]=i,R[fr()+4>>2]=r)}}(),e=new Date(1e3*R[e>>2]),R[t>>2]=e.getSeconds(),R[t+4>>2]=e.getMinutes(),R[t+8>>2]=e.getHours(),R[t+12>>2]=e.getDate(),R[t+16>>2]=e.getMonth(),R[t+20>>2]=e.getFullYear()-1900,R[t+24>>2]=e.getDay();var r=new Date(e.getFullYear(),0,1);R[t+28>>2]=(e.getTime()-r.getTime())/864e5|0,R[t+36>>2]=-60*e.getTimezoneOffset();var i=new Date(e.getFullYear(),6,1).getTimezoneOffset();return e=0|(i!=(r=r.getTimezoneOffset())&&e.getTimezoneOffset()==Math.min(r,i)),R[t+32>>2]=e,e=R[fr()+(e?4:0)>>2],R[t+40>>2]=e,t},Q:function(){return 6},z:function(){return 28},A:function(e,t,r,i){return function(e,t,r,i){function a(e,t,r){for(e="number"==typeof e?e.toString():e||"";e.length<t;)e=r[0]+e;return e}function n(e,t){return a(e,t,"0")}function o(e,t){function r(e){return 0>e?-1:0<e?1:0}var i;return 0===(i=r(e.getFullYear()-t.getFullYear()))&&0===(i=r(e.getMonth()-t.getMonth()))&&(i=r(e.getDate()-t.getDate())),i}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function _(e){e=rr(new Date(e.Nc+1900,0,1),e.ld);var t=new Date(e.getFullYear()+1,0,4),r=s(new Date(e.getFullYear(),0,4));return t=s(t),0>=o(r,e)?0>=o(t,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var c=R[i+40>>2];for(var u in i={ee:R[i>>2],de:R[i+4>>2],jd:R[i+8>>2],cd:R[i+12>>2],Yc:R[i+16>>2],Nc:R[i+20>>2],kd:R[i+24>>2],ld:R[i+28>>2],te:R[i+32>>2],ce:R[i+36>>2],fe:c?F(c):""},r=F(r),c={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})r=r.replace(new RegExp(u,"g"),c[u]);var f="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),l="January February March April May June July August September October November December".split(" ");for(u in c={"%a":function(e){return f[e.kd].substring(0,3)},"%A":function(e){return f[e.kd]},"%b":function(e){return l[e.Yc].substring(0,3)},"%B":function(e){return l[e.Yc]},"%C":function(e){return n((e.Nc+1900)/100|0,2)},"%d":function(e){return n(e.cd,2)},"%e":function(e){return a(e.cd,2," ")},"%g":function(e){return _(e).toString().substring(2)},"%G":function(e){return _(e)},"%H":function(e){return n(e.jd,2)},"%I":function(e){return 0==(e=e.jd)?e=12:12<e&&(e-=12),n(e,2)},"%j":function(e){return n(e.cd+Qt(Jt(e.Nc+1900)?er:tr,e.Yc-1),3)},"%m":function(e){return n(e.Yc+1,2)},"%M":function(e){return n(e.de,2)},"%n":function(){return"\n"},"%p":function(e){return 0<=e.jd&&12>e.jd?"AM":"PM"},"%S":function(e){return n(e.ee,2)},"%t":function(){return"\t"},"%u":function(e){return e.kd||7},"%U":function(e){var t=new Date(e.Nc+1900,0,1),r=0===t.getDay()?t:rr(t,7-t.getDay());return 0>o(r,e=new Date(e.Nc+1900,e.Yc,e.cd))?n(Math.ceil((31-r.getDate()+(Qt(Jt(e.getFullYear())?er:tr,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(r,t)?"01":"00"},"%V":function(e){var t=new Date(e.Nc+1901,0,4),r=s(new Date(e.Nc+1900,0,4));t=s(t);var i=rr(new Date(e.Nc+1900,0,1),e.ld);return 0>o(i,r)?"53":0>=o(t,i)?"01":n(Math.ceil((r.getFullYear()<e.Nc+1900?e.ld+32-r.getDate():e.ld+1-r.getDate())/7),2)},"%w":function(e){return e.kd},"%W":function(e){var t=new Date(e.Nc,0,1),r=1===t.getDay()?t:rr(t,0===t.getDay()?1:7-t.getDay()+1);return 0>o(r,e=new Date(e.Nc+1900,e.Yc,e.cd))?n(Math.ceil((31-r.getDate()+(Qt(Jt(e.getFullYear())?er:tr,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(r,t)?"01":"00"},"%y":function(e){return(e.Nc+1900).toString().substring(2)},"%Y":function(e){return e.Nc+1900},"%z":function(e){var t=0<=(e=e.ce);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":function(e){return e.fe},"%%":function(){return"%"}})0<=r.indexOf(u)&&(r=r.replace(new RegExp(u,"g"),c[u](i)));return(u=ar(r,!1)).length>t?0:(E.set(u,e),u.length-1)}(e,t,r,i)},d:function(e){var t=Date.now()/1e3|0;return e&&(R[e>>2]=t),t}},or=function(){function e(e){r.asm=e.exports,h=r.asm.S,D(),B=r.asm.X,V.unshift(r.asm.T),Z()}var t={a:nr};if(q(),r.instantiateWasm)try{return r.instantiateWasm(t,e)}catch(e){return p("Module.instantiateWasm callback failed with error: "+e),!1}return t=function(e){var t=$;try{e:{try{if(t==$&&l){var r=new Uint8Array(l);break e}if(c){r=c(t);break e}throw"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)"}catch(e){j(e)}r=void 0}var i=new WebAssembly.Module(r),a=new WebAssembly.Instance(i,e)}catch(t){throw e=t.toString(),p("failed to compile wasm module: "+e),(0<=e.indexOf("imported Memory")||0<=e.indexOf("memory import"))&&p("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."),t}return[a,i]}(t),e(t[0]),r.asm}();r.___wasm_call_ctors=or.T,r._zappar_has_initialized=or.U,r._zappar_invert=or.V,r._zappar_loaded=or.W,r._zappar_pipeline_create=or.Y,r._zappar_pipeline_destroy=or.Z,r._zappar_pipeline_camera_frame_submit=or._,r._zappar_pipeline_camera_frame_submit_raw_pointer=or.$,r._zappar_pipeline_frame_update=or.aa,r._zappar_pipeline_camera_frame_user_data=or.ba,r._zappar_pipeline_camera_model=or.ca,r._zappar_pipeline_frame_number=or.da,r._zappar_pipeline_motion_accelerometer_submit=or.ea,r._zappar_pipeline_motion_accelerometer_with_gravity_submit_int=or.fa,r._zappar_pipeline_motion_accelerometer_without_gravity_submit_int=or.ga,r._zappar_pipeline_motion_rotation_rate_submit_int=or.ha,r._zappar_pipeline_motion_attitude_submit_int=or.ia,r._zappar_pipeline_motion_rotation_rate_submit=or.ja,r._zappar_pipeline_motion_attitude_submit=or.ka,r._zappar_pipeline_motion_attitude_matrix_submit=or.la,r._zappar_pipeline_camera_frame_user_facing=or.ma,r._zappar_pipeline_camera_frame_texture_matrix=or.na,r._zappar_pipeline_camera_pose_with_attitude=or.oa,r._zappar_pipeline_camera_pose_with_origin=or.pa,r._zappar_pipeline_camera_frame_camera_attitude=or.qa,r._zappar_pipeline_camera_frame_device_attitude=or.ra,r._zappar_pipeline_camera_frame_texture_gl=or.sa,r._zappar_pipeline_camera_frame_upload_gl=or.ta,r._zappar_pipeline_sequence_record_start=or.ua,r._zappar_pipeline_sequence_record_stop=or.va,r._zappar_pipeline_sequence_record_clear=or.wa,r._zappar_pipeline_sequence_record_device_attitude_matrices_set=or.xa,r._zappar_pipeline_sequence_record_data_size=or.ya,r._zappar_pipeline_sequence_record_data=or.za,r._zappar_pipeline_process_gl=or.Aa,r._zappar_pipeline_camera_pose_default=or.Ba,r._zappar_instant_world_tracker_create=or.Ca,r._zappar_instant_world_tracker_destroy=or.Da,r._zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw=or.Ea,r._zappar_instant_world_tracker_anchor_pose_raw=or.Fa,r._zappar_instant_world_tracker_enabled_set=or.Ga,r._zappar_instant_world_tracker_enabled=or.Ha,r._zappar_image_tracker_create=or.Ia,r._zappar_image_tracker_destroy=or.Ja,r._zappar_image_tracker_target_load_from_memory=or.Ka,r.__Z42zappar_image_tracker_target_load_from_fileP23zappar_image_tracker_tiPKc=or.La;var sr=r._free=or.Ma;r._zappar_image_tracker_anchor_count=or.Na,r._zappar_image_tracker_anchor_id=or.Oa,r._zappar_image_tracker_anchor_pose_raw=or.Pa,r._zappar_image_tracker_enabled_set=or.Qa,r._zappar_image_tracker_enabled=or.Ra,r._zappar_image_tracker_target_loaded_version=or.Sa,r.__Z33zappar_image_tracker_target_countP23zappar_image_tracker_ti=or.Ta,r.__Z46zappar_image_tracker_target_preview_compressedP23zappar_image_tracker_tii=or.Ua,r.__Z51zappar_image_tracker_target_preview_compressed_sizeP23zappar_image_tracker_tii=or.Va,r.__Z55zappar_image_tracker_target_preview_compressed_mimetypeP23zappar_image_tracker_tii=or.Wa,r.__Z40zappar_image_tracker_target_preview_rgbaP23zappar_image_tracker_tii=or.Xa,r.__Z45zappar_image_tracker_target_preview_rgba_sizeP23zappar_image_tracker_tii=or.Ya,r.__Z46zappar_image_tracker_target_preview_rgba_widthP23zappar_image_tracker_tii=or.Za,r.__Z47zappar_image_tracker_target_preview_rgba_heightP23zappar_image_tracker_tii=or._a,r.__Z38zappar_image_tracker_target_radius_topP23zappar_image_tracker_tii=or.$a,r.__Z41zappar_image_tracker_target_radius_bottomP23zappar_image_tracker_tii=or.ab,r.__Z39zappar_image_tracker_target_side_lengthP23zappar_image_tracker_tii=or.bb,r.__Z49zappar_image_tracker_target_physical_scale_factorP23zappar_image_tracker_tii=or.cb,r.__Z49zappar_image_tracker_target_preview_mesh_verticesP23zappar_image_tracker_tii=or.db,r.__Z48zappar_image_tracker_target_preview_mesh_normalsP23zappar_image_tracker_tii=or.eb,r.__Z44zappar_image_tracker_target_preview_mesh_uvsP23zappar_image_tracker_tii=or.fb,r.__Z48zappar_image_tracker_target_preview_mesh_indicesP23zappar_image_tracker_tii=or.gb,r.__Z54zappar_image_tracker_target_preview_mesh_vertices_sizeP23zappar_image_tracker_tii=or.hb,r.__Z53zappar_image_tracker_target_preview_mesh_normals_sizeP23zappar_image_tracker_tii=or.ib,r.__Z49zappar_image_tracker_target_preview_mesh_uvs_sizeP23zappar_image_tracker_tii=or.jb,r.__Z53zappar_image_tracker_target_preview_mesh_indices_sizeP23zappar_image_tracker_tii=or.kb,r.__Z32zappar_image_tracker_target_typeP23zappar_image_tracker_tii=or.lb,r._zappar_face_tracker_create=or.mb,r._zappar_face_tracker_destroy=or.nb,r._zappar_face_tracker_model_load_from_memory=or.ob,r._zappar_face_tracker_anchor_count=or.pb,r._zappar_face_tracker_anchor_id=or.qb,r._zappar_face_tracker_anchor_pose_raw=or.rb,r._zappar_face_tracker_anchor_identity_coefficients=or.sb,r._zappar_face_tracker_anchor_expression_coefficients=or.tb,r._zappar_face_tracker_enabled_set=or.ub,r._zappar_face_tracker_enabled=or.vb,r._zappar_face_tracker_max_faces_set=or.wb,r._zappar_face_tracker_max_faces=or.xb,r._zappar_face_tracker_model_loaded_version=or.yb,r._zappar_face_landmark_create=or.zb,r._zappar_face_landmark_destroy=or.Ab,r.__Z27zappar_face_landmark_updateP23zappar_face_landmark_tiPKfS2_i=or.Bb,r._zappar_face_landmark_anchor_pose=or.Cb,r._zappar_barcode_finder_create=or.Db,r._zappar_barcode_finder_destroy=or.Eb,r._zappar_barcode_finder_found_number=or.Fb,r._zappar_barcode_finder_found_text=or.Gb,r._zappar_barcode_finder_enabled_set=or.Hb,r._zappar_barcode_finder_enabled=or.Ib,r._zappar_barcode_finder_found_format=or.Jb,r._zappar_barcode_finder_formats=or.Kb,r._zappar_barcode_finder_formats_set=or.Lb;var _r=r._malloc=or.Mb;r._zappar_face_mesh_create=or.Nb,r._zappar_face_mesh_destroy=or.Ob,r.__Z33zappar_face_mesh_load_from_memoryP19zappar_face_mesh_tiPKciiiii=or.Pb,r.__Z29zappar_face_mesh_indices_sizeP19zappar_face_mesh_ti=or.Qb,r.__Z25zappar_face_mesh_uvs_sizeP19zappar_face_mesh_ti=or.Rb,r.__Z30zappar_face_mesh_vertices_sizeP19zappar_face_mesh_ti=or.Sb,r.__Z31zappar_face_mesh_loaded_versionP19zappar_face_mesh_ti=or.Tb,r.__Z25zappar_face_mesh_verticesP19zappar_face_mesh_ti=or.Ub,r.__Z20zappar_face_mesh_uvsP19zappar_face_mesh_ti=or.Vb,r.__Z24zappar_face_mesh_indicesP19zappar_face_mesh_ti=or.Wb,r.__Z23zappar_face_mesh_updateP19zappar_face_mesh_tiPKfS2_i=or.Xb,r.__Z29zappar_face_mesh_normals_sizeP19zappar_face_mesh_ti=or.Yb,r.__Z24zappar_face_mesh_normalsP19zappar_face_mesh_ti=or.Zb,r._zappar_camera_source_create=or._b,r._zappar_camera_source_destroy=or.$b,r._zappar_camera_source_start=or.ac,r._zappar_camera_source_pause=or.bc,r._zappar_camera_default_device_id=or.cc,r._zappar_sequence_source_create=or.dc,r.__Z28zappar_sequence_source_startP25zappar_sequence_source_ti=or.ec,r.__Z39zappar_sequence_source_load_from_memoryP25zappar_sequence_source_tiPKci=or.fc,r.__Z28zappar_sequence_source_pauseP25zappar_sequence_source_ti=or.gc,r._zappar_sequence_source_destroy=or.hc,r._zappar_sequence_source_max_playback_fps_set=or.ic,r._zappar_log_level_set=or.jc,r._zappar_log_level=or.kc,r.__Z23zappar_log_redirect_setPFv18zappar_log_level_tPKcE=or.lc,r._zappar_world_tracker_create=or.mc,r._zappar_world_tracker_destroy=or.nc,r._zappar_world_tracker_world_anchor_valid=or.oc,r._zappar_world_tracker_plane_count=or.pc,r._zappar_world_tracker_plane_pose_raw=or.qc,r._zappar_world_tracker_world_anchor_pose_raw=or.rc,r._zappar_world_tracker_ground_anchor_valid=or.sc,r._zappar_world_tracker_ground_anchor_pose_raw=or.tc,r._zappar_world_tracker_reset=or.uc,r._zappar_world_tracker_enabled_set=or.vc,r._zappar_world_tracker_quality=or.wc,r._zappar_world_tracker_enabled=or.xc,r._zappar_analytics_project_id_set=or.yc;var cr,ur=r.___errno_location=or.zc,fr=r.__get_tzname=or.Ac,lr=r.__get_daylight=or.Bc,dr=r.__get_timezone=or.Cc,pr=r.stackSave=or.Dc,mr=r.stackRestore=or.Ec,hr=r.stackAlloc=or.Fc;function br(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function wr(){function e(){if(!cr&&(cr=!0,r.calledRun=!0,!w)){if(r.noFSInit||Oe||(Oe=!0,Xe(),r.stdin=r.stdin,r.stdout=r.stdout,r.stderr=r.stderr,r.stdin?qe("stdin",r.stdin):Ve("/dev/tty","/dev/stdin"),r.stdout?qe("stdout",null,r.stdout):Ve("/dev/tty","/dev/stdout"),r.stderr?qe("stderr",null,r.stderr):Ve("/dev/tty1","/dev/stderr"),We("/dev/stdin",0),We("/dev/stdout",1),We("/dev/stderr",1)),te(V),ye=!1,te(N),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;){var e=r.postRun.shift();G.unshift(e)}te(G)}}if(!(0<W)){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)H();te(U),0<W||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),e()}),1)):e())}}function gr(e){b=e,m||(r.onExit&&r.onExit(e),w=!0),_(e,new br(e))}if(r.cwrap=function(e,t,r,i){var a=(r=r||[]).every((function(e){return"number"===e}));return"string"!==t&&a&&!i?y(e):function(){return function(e,t,r,i){var a,n={string:function(e){var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);t=hr(r),O(e,A,t,r)}return t},array:function(e){var t=hr(e.length);return E.set(e,t),t}},o=y(e),s=[];if(e=0,i)for(var _=0;_<i.length;_++){var c=n[r[_]];c?(0===e&&(e=pr()),s[_]=c(i[_])):s[_]=i[_]}return a=r=o.apply(null,s),r="string"===t?F(a):"boolean"===t?!!a:a,0!==e&&mr(e),r}(e,t,r,arguments)}},r.setValue=function(e,t,r){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":E[e>>0]=t;break;case"i16":k[e>>1]=t;break;case"i32":R[e>>2]=t;break;case"i64":J=[t>>>0,(K=t,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],R[e>>2]=J[0],R[e+4>>2]=J[1];break;case"float":L[e>>2]=t;break;case"double":z[e>>3]=t;break;default:j("invalid type for setValue: "+r)}},r.getValue=function(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return E[e>>0];case"i16":return k[e>>1];case"i32":case"i64":return R[e>>2];case"float":return L[e>>2];case"double":return z[e>>3];default:j("invalid type for getValue: "+t)}return null},r.UTF8ToString=F,X=function e(){cr||wr(),cr||(X=e)},r.run=wr,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();return wr(),t});class i{constructor(e){this._messageSender=e,this._freeBufferPool=[],this._buffer=new ArrayBuffer(16),this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u8cView=new Uint8ClampedArray(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=1,this._startOffset=-1,this._timeoutSet=!1,this._appender={int:e=>this.int(e),bool:e=>this.int(e?1:0),float:e=>this.float(e),string:e=>this.string(e),dataWithLength:e=>this.arrayBuffer(e),type:e=>this.int(e),matrix4x4:e=>this.float32ArrayBuffer(e),matrix3x3:e=>this.float32ArrayBuffer(e),identityCoefficients:e=>this.float32ArrayBuffer(e),expressionCoefficients:e=>this.float32ArrayBuffer(e),cameraModel:e=>this.float32ArrayBuffer(e),timestamp:e=>this.double(e),barcodeFormat:e=>this.int(e),faceLandmarkName:e=>this.int(e),instantTrackerTransformOrientation:e=>this.int(e),logLevel:e=>this.int(e)},this._freeBufferPool.push(new ArrayBuffer(16)),this._freeBufferPool.push(new ArrayBuffer(16))}bufferReturn(e){this._freeBufferPool.push(e)}_ensureArrayBuffer(e){let t,r=4*(this._offset+e+8);if(this._buffer&&this._buffer.byteLength>=r)return;if(!t){let e=r;e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,t=new ArrayBuffer(e)}let i=this._buffer?this._i32View:void 0;this._buffer=t,this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u8cView=new Uint8ClampedArray(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),i&&this._i32View.set(i.subarray(0,this._offset))}sendMessage(e,t){this._ensureArrayBuffer(4),this._startOffset=this._offset,this._i32View[this._offset+1]=e,this._offset+=2,t(this._appender),this._i32View[this._startOffset]=this._offset-this._startOffset,this._startOffset=-1,this._sendOneTime()}_sendOneTime(){!1===this._timeoutSet&&(this._timeoutSet=!0,setTimeout((()=>{this._timeoutSet=!1,this._send()}),0))}_send(){0!==this._freeBufferPool.length?(this._i32View[0]=this._offset,this._messageSender(this._buffer),this._buffer=void 0,this._buffer=this._freeBufferPool.pop(),this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u8cView=new Uint8ClampedArray(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=1,this._startOffset=-1):this._sendOneTime()}int(e){this._ensureArrayBuffer(1),this._i32View[this._offset]=e,this._offset++}double(e){this._ensureArrayBuffer(2),this._offset%2==1&&this._offset++,this._f64View[this._offset/2]=e,this._offset+=2}float(e){this._ensureArrayBuffer(1),this._f32View[this._offset]=e,this._offset++}int32Array(e){this._ensureArrayBuffer(e.length);for(let t=0;t<e.length;++t)this._i32View[this._offset+t]=e[t];this._offset+=e.length}float32Array(e){this._ensureArrayBuffer(e.length);for(let t=0;t<e.length;++t)this._f32View[this._offset+t]=e[t];this._offset+=e.length}booleanArray(e){this._ensureArrayBuffer(e.length);for(let t=0;t<e.length;++t)this._i32View[this._offset+t]=e[t]?1:0;this._offset+=e.length}uint8ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.byteLength,this._offset++,this._u8View.set(e,4*this._offset),this._offset+=e.byteLength>>2,0!=(3&e.byteLength)&&this._offset++}arrayBuffer(e){let t=new Uint8Array(e);this.uint8ArrayBuffer(t)}uint8ClampedArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.byteLength,this._offset++,this._u8cView.set(e,4*this._offset),this._offset+=e.byteLength>>2,0!=(3&e.byteLength)&&this._offset++}float32ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++,this._f32View.set(e,this._offset),this._offset+=e.length}uint16ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++;let t=2*this._offset;this._u16View.set(e,t),this._offset+=e.length>>1,0!=(1&e.length)&&this._offset++}int32ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++,this._i32View.set(e,this._offset),this._offset+=e.length}uint32ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++,this._u32View.set(e,this._offset),this._offset+=e.length}string(e){let t=(new TextEncoder).encode(e);this._ensureArrayBuffer(t.byteLength/4),this._i32View[this._offset]=t.byteLength,this._offset++,this._u8View.set(t,4*this._offset),this._offset+=t.byteLength>>2,0!=(3&t.byteLength)&&this._offset++}}class a{constructor(){this._buffer=new ArrayBuffer(0),this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=0,this._length=0,this._startOffset=-1,this._processor={int:()=>this._i32View[this._startOffset++],bool:()=>1===this._i32View[this._startOffset++],type:()=>this._i32View[this._startOffset++],float:()=>this._f32View[this._startOffset++],timestamp:()=>{this._startOffset%2==1&&this._startOffset++;let e=this._f64View[this._startOffset/2];return this._startOffset+=2,e},string:()=>{let e=this._i32View[this._startOffset++],t=(new TextDecoder).decode(new Uint8Array(this._buffer,4*this._startOffset,e));return this._startOffset+=e>>2,0!=(3&e)&&this._startOffset++,t},dataWithLength:()=>{let e=this._i32View[this._startOffset++],t=new Uint8Array(e);return t.set(this._u8View.subarray(4*this._startOffset,4*this._startOffset+e)),this._startOffset+=t.byteLength>>2,0!=(3&t.byteLength)&&this._startOffset++,t.buffer},matrix4x4:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+16)),this._startOffset+=e,t},matrix3x3:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+9)),this._startOffset+=e,t},identityCoefficients:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+50)),this._startOffset+=e,t},expressionCoefficients:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+29)),this._startOffset+=e,t},cameraModel:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+6)),this._startOffset+=e,t},barcodeFormat:()=>this._i32View[this._startOffset++],faceLandmarkName:()=>this._i32View[this._startOffset++],instantTrackerTransformOrientation:()=>this._i32View[this._startOffset++],logLevel:()=>this._i32View[this._startOffset++]}}setData(e){this._buffer=e,this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=0,this._length=0,e.byteLength>=4&&(this._offset=1,this._length=this._i32View[0]),this._startOffset=-1}hasMessage(){return this._offset+1<this._length}forMessages(e){for(;this.hasMessage();){let t=this._i32View[this._offset],r=this._i32View[this._offset+1];this._startOffset=this._offset+2,this._offset+=t,e(r,this._processor)}}}class n{constructor(e,t){this._impl=e,this._sender=t,this._deserializer=new a,this.serializersByPipelineId=new Map,this._pipeline_id_by_pipeline_id=new Map,this._pipeline_by_instance=new Map,this._pipeline_id_by_camera_source_id=new Map,this._camera_source_by_instance=new Map,this._pipeline_id_by_sequence_source_id=new Map,this._sequence_source_by_instance=new Map,this._pipeline_id_by_image_tracker_id=new Map,this._image_tracker_by_instance=new Map,this._pipeline_id_by_face_tracker_id=new Map,this._face_tracker_by_instance=new Map,this._pipeline_id_by_face_mesh_id=new Map,this._face_mesh_by_instance=new Map,this._pipeline_id_by_face_landmark_id=new Map,this._face_landmark_by_instance=new Map,this._pipeline_id_by_barcode_finder_id=new Map,this._barcode_finder_by_instance=new Map,this._pipeline_id_by_instant_world_tracker_id=new Map,this._instant_world_tracker_by_instance=new Map,this._pipeline_id_by_world_tracker_id=new Map,this._world_tracker_by_instance=new Map}processBuffer(e){this._deserializer.setData(e),this._deserializer.forMessages(((e,t)=>{switch(e){case 38:this._impl.log_level_set(t.logLevel());break;case 35:this._impl.analytics_project_id_set(t.string(),t.string());break;case 31:{let e=t.type(),r=this._impl.pipeline_create();this._pipeline_by_instance.set(e,r),this._pipeline_id_by_pipeline_id.set(e,e),this.serializersByPipelineId.set(e,new i((t=>{this._sender(e,t)})));break}case 32:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_destroy(r),this._pipeline_by_instance.delete(e);break}case 9:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_frame_update(r);break}case 8:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_camera_frame_submit(r,t.dataWithLength(),t.int(),t.int(),t.int(),t.matrix4x4(),t.cameraModel(),t.bool());break}case 10:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_accelerometer_submit(r,t.timestamp(),t.float(),t.float(),t.float());break}case 12:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_accelerometer_with_gravity_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 11:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_accelerometer_without_gravity_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 15:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_rotation_rate_submit(r,t.timestamp(),t.float(),t.float(),t.float());break}case 13:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_rotation_rate_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 16:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_attitude_submit(r,t.timestamp(),t.float(),t.float(),t.float());break}case 14:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_attitude_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 17:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_attitude_matrix_submit(r,t.matrix4x4());break}case 33:{let e=t.type(),r=t.type(),i=this._pipeline_by_instance.get(r),a=t.string(),n=this._impl.camera_source_create(i,a);this._camera_source_by_instance.set(e,n),this._pipeline_id_by_camera_source_id.set(e,r);break}case 34:{let e=t.type(),r=this._camera_source_by_instance.get(e);if(void 0===r)return;this._impl.camera_source_destroy(r),this._camera_source_by_instance.delete(e);break}case 39:{let e=t.type(),r=t.type(),i=this._pipeline_by_instance.get(r),a=this._impl.sequence_source_create(i);this._sequence_source_by_instance.set(e,a),this._pipeline_id_by_sequence_source_id.set(e,r);break}case 40:{let e=t.type(),r=this._sequence_source_by_instance.get(e);if(void 0===r)return;this._impl.sequence_source_destroy(r),this._sequence_source_by_instance.delete(e);break}case 2:{let e=t.type(),r=t.type(),i=this._pipeline_by_instance.get(r),a=this._impl.image_tracker_create(i);this._image_tracker_by_instance.set(e,a),this._pipeline_id_by_image_tracker_id.set(e,r);break}case 18:{let e=t.type(),r=this._image_tracker_by_instance.get(e);if(void 0===r)return;this._impl.image_tracker_destroy(r),this._image_tracker_by_instance.delete(e);break}case 4:{let e=t.type(),r=this._image_tracker_by_instance.get(e);if(void 0===r)return;this._impl.image_tracker_target_load_from_memory(r,t.dataWithLength());break}case 3:{let e=t.type(),r=this._image_tracker_by_instance.get(e);if(void 0===r)return;this._impl.image_tracker_enabled_set(r,t.bool());break}case 24:{let e=t.type(),r=t.type(),i=this._pipeline_by_instance.get(r),a=this._impl.face_tracker_create(i);this._face_tracker_by_instance.set(e,a),this._pipeline_id_by_face_tracker_id.set(e,r);break}case 25:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_destroy(r),this._face_tracker_by_instance.delete(e);break}case 26:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_model_load_from_memory(r,t.dataWithLength());break}case 27:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_enabled_set(r,t.bool());break}case 28:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_max_faces_set(r,t.int());break}case 29:{let e=t.type(),r=this._impl.face_mesh_create();this._face_mesh_by_instance.set(e,r);break}case 30:{let e=t.type(),r=this._face_mesh_by_instance.get(e);if(void 0===r)return;this._impl.face_mesh_destroy(r),this._face_mesh_by_instance.delete(e);break}case 36:{let e=t.type(),r=t.faceLandmarkName(),i=this._impl.face_landmark_create(r);this._face_landmark_by_instance.set(e,i);break}case 37:{let e=t.type(),r=this._face_landmark_by_instance.get(e);if(void 0===r)return;this._impl.face_landmark_destroy(r),this._face_landmark_by_instance.delete(e);break}case 20:{let e=t.type(),r=t.type(),i=this._pipeline_by_instance.get(r),a=this._impl.barcode_finder_create(i);this._barcode_finder_by_instance.set(e,a),this._pipeline_id_by_barcode_finder_id.set(e,r);break}case 21:{let e=t.type(),r=this._barcode_finder_by_instance.get(e);if(void 0===r)return;this._impl.barcode_finder_destroy(r),this._barcode_finder_by_instance.delete(e);break}case 22:{let e=t.type(),r=this._barcode_finder_by_instance.get(e);if(void 0===r)return;this._impl.barcode_finder_enabled_set(r,t.bool());break}case 23:{let e=t.type(),r=this._barcode_finder_by_instance.get(e);if(void 0===r)return;this._impl.barcode_finder_formats_set(r,t.barcodeFormat());break}case 5:{let e=t.type(),r=t.type(),i=this._pipeline_by_instance.get(r),a=this._impl.instant_world_tracker_create(i);this._instant_world_tracker_by_instance.set(e,a),this._pipeline_id_by_instant_world_tracker_id.set(e,r);break}case 19:{let e=t.type(),r=this._instant_world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.instant_world_tracker_destroy(r),this._instant_world_tracker_by_instance.delete(e);break}case 6:{let e=t.type(),r=this._instant_world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.instant_world_tracker_enabled_set(r,t.bool());break}case 7:{let e=t.type(),r=this._instant_world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.instant_world_tracker_anchor_pose_set_from_camera_offset_raw(r,t.float(),t.float(),t.float(),t.instantTrackerTransformOrientation());break}case 41:{let e=t.type(),r=t.type(),i=this._pipeline_by_instance.get(r),a=this._impl.world_tracker_create(i);this._world_tracker_by_instance.set(e,a),this._pipeline_id_by_world_tracker_id.set(e,r);break}case 42:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_destroy(r),this._world_tracker_by_instance.delete(e);break}case 43:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_enabled_set(r,t.bool());break}case 44:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_reset(r);break}}}))}exploreState(){for(let[e,t]of this._pipeline_by_instance){let r=this._pipeline_id_by_pipeline_id.get(e);if(!r)continue;let i=this.serializersByPipelineId.get(r);i&&(i.sendMessage(7,(r=>{r.type(e),r.int(this._impl.pipeline_frame_number(t))})),i.sendMessage(6,(r=>{r.type(e),r.cameraModel(this._impl.pipeline_camera_model(t))})),i.sendMessage(5,(r=>{r.type(e),r.int(this._impl.pipeline_camera_frame_user_data(t))})),i.sendMessage(11,(r=>{r.type(e),r.matrix4x4(this._impl.pipeline_camera_frame_camera_attitude(t))})),i.sendMessage(12,(r=>{r.type(e),r.matrix4x4(this._impl.pipeline_camera_frame_device_attitude(t))})))}for(let[e,t]of this._camera_source_by_instance){let t=this._pipeline_id_by_camera_source_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._sequence_source_by_instance){let t=this._pipeline_id_by_sequence_source_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._image_tracker_by_instance){let r=this._pipeline_id_by_image_tracker_id.get(e);if(!r)continue;let i=this.serializersByPipelineId.get(r);if(i){i.sendMessage(19,(r=>{r.type(e),r.int(this._impl.image_tracker_target_loaded_version(t))})),i.sendMessage(1,(r=>{r.type(e),r.int(this._impl.image_tracker_anchor_count(t))}));for(let r=0;r<this._impl.image_tracker_anchor_count(t);r++)i.sendMessage(2,(i=>{i.type(e),i.int(r),i.string(this._impl.image_tracker_anchor_id(t,r))}));for(let r=0;r<this._impl.image_tracker_anchor_count(t);r++)i.sendMessage(3,(i=>{i.type(e),i.int(r),i.matrix4x4(this._impl.image_tracker_anchor_pose_raw(t,r))}))}}for(let[e,t]of this._face_tracker_by_instance){let r=this._pipeline_id_by_face_tracker_id.get(e);if(!r)continue;let i=this.serializersByPipelineId.get(r);if(i){i.sendMessage(18,(r=>{r.type(e),r.int(this._impl.face_tracker_model_loaded_version(t))})),i.sendMessage(13,(r=>{r.type(e),r.int(this._impl.face_tracker_anchor_count(t))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)i.sendMessage(14,(i=>{i.type(e),i.int(r),i.string(this._impl.face_tracker_anchor_id(t,r))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)i.sendMessage(15,(i=>{i.type(e),i.int(r),i.matrix4x4(this._impl.face_tracker_anchor_pose_raw(t,r))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)i.sendMessage(16,(i=>{i.type(e),i.int(r),i.identityCoefficients(this._impl.face_tracker_anchor_identity_coefficients(t,r))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)i.sendMessage(17,(i=>{i.type(e),i.int(r),i.expressionCoefficients(this._impl.face_tracker_anchor_expression_coefficients(t,r))}))}}for(let[e,t]of this._face_mesh_by_instance){let t=this._pipeline_id_by_face_mesh_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._face_landmark_by_instance){let t=this._pipeline_id_by_face_landmark_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._barcode_finder_by_instance){let r=this._pipeline_id_by_barcode_finder_id.get(e);if(!r)continue;let i=this.serializersByPipelineId.get(r);if(i){i.sendMessage(8,(r=>{r.type(e),r.int(this._impl.barcode_finder_found_number(t))}));for(let r=0;r<this._impl.barcode_finder_found_number(t);r++)i.sendMessage(9,(i=>{i.type(e),i.int(r),i.string(this._impl.barcode_finder_found_text(t,r))}));for(let r=0;r<this._impl.barcode_finder_found_number(t);r++)i.sendMessage(10,(i=>{i.type(e),i.int(r),i.barcodeFormat(this._impl.barcode_finder_found_format(t,r))}))}}for(let[e,t]of this._instant_world_tracker_by_instance){let r=this._pipeline_id_by_instant_world_tracker_id.get(e);if(!r)continue;let i=this.serializersByPipelineId.get(r);i&&i.sendMessage(4,(r=>{r.type(e),r.matrix4x4(this._impl.instant_world_tracker_anchor_pose_raw(t))}))}for(let[e,t]of this._world_tracker_by_instance){let r=this._pipeline_id_by_world_tracker_id.get(e);if(!r)continue;let i=this.serializersByPipelineId.get(r);if(i){i.sendMessage(27,(r=>{r.type(e),r.int(this._impl.world_tracker_quality(t))})),i.sendMessage(21,(r=>{r.type(e),r.int(this._impl.world_tracker_plane_count(t))}));for(let r=0;r<this._impl.world_tracker_plane_count(t);r++)i.sendMessage(22,(i=>{i.type(e),i.int(r),i.matrix4x4(this._impl.world_tracker_plane_pose_raw(t,r))}));i.sendMessage(23,(r=>{r.type(e),r.bool(this._impl.world_tracker_world_anchor_valid(t))})),i.sendMessage(24,(r=>{r.type(e),r.matrix4x4(this._impl.world_tracker_world_anchor_pose_raw(t))})),i.sendMessage(23,(r=>{r.type(e),r.bool(this._impl.world_tracker_ground_anchor_valid(t))})),i.sendMessage(26,(r=>{r.type(e),r.matrix4x4(this._impl.world_tracker_ground_anchor_pose_raw(t))}))}}}}class o{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(){for(var e=0,t=this._funcs.length;e<t;e++)this._funcs[e]()}}class s{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e){for(var t=0,r=this._funcs.length;t<r;t++)this._funcs[t](e)}}var _,c,u,f,l,d,p,m="undefined"!=typeof Float32Array?Float32Array:Array;function h(){var e=new m(16);return m!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function b(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.random,Math.PI,Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),function(e){e[e.UNKNOWN=131072]="UNKNOWN",e[e.AZTEC=1]="AZTEC",e[e.CODABAR=2]="CODABAR",e[e.CODE_39=4]="CODE_39",e[e.CODE_93=8]="CODE_93",e[e.CODE_128=16]="CODE_128",e[e.DATA_MATRIX=32]="DATA_MATRIX",e[e.EAN_8=64]="EAN_8",e[e.EAN_13=128]="EAN_13",e[e.ITF=256]="ITF",e[e.MAXICODE=512]="MAXICODE",e[e.PDF_417=1024]="PDF_417",e[e.QR_CODE=2048]="QR_CODE",e[e.RSS_14=4096]="RSS_14",e[e.RSS_EXPANDED=8192]="RSS_EXPANDED",e[e.UPC_A=16384]="UPC_A",e[e.UPC_E=32768]="UPC_E",e[e.UPC_EAN_EXTENSION=65536]="UPC_EAN_EXTENSION",e[e.ALL=131071]="ALL"}(_||(_={})),function(e){e[e.EYE_LEFT=0]="EYE_LEFT",e[e.EYE_RIGHT=1]="EYE_RIGHT",e[e.EAR_LEFT=2]="EAR_LEFT",e[e.EAR_RIGHT=3]="EAR_RIGHT",e[e.NOSE_BRIDGE=4]="NOSE_BRIDGE",e[e.NOSE_TIP=5]="NOSE_TIP",e[e.NOSE_BASE=6]="NOSE_BASE",e[e.LIP_TOP=7]="LIP_TOP",e[e.LIP_BOTTOM=8]="LIP_BOTTOM",e[e.MOUTH_CENTER=9]="MOUTH_CENTER",e[e.CHIN=10]="CHIN",e[e.EYEBROW_LEFT=11]="EYEBROW_LEFT",e[e.EYEBROW_RIGHT=12]="EYEBROW_RIGHT"}(c||(c={})),function(e){e[e.WORLD=3]="WORLD",e[e.MINUS_Z_AWAY_FROM_USER=4]="MINUS_Z_AWAY_FROM_USER",e[e.MINUS_Z_HEADING=5]="MINUS_Z_HEADING",e[e.UNCHANGED=6]="UNCHANGED"}(u||(u={})),function(e){e[e.LOG_LEVEL_NONE=0]="LOG_LEVEL_NONE",e[e.LOG_LEVEL_ERROR=1]="LOG_LEVEL_ERROR",e[e.LOG_LEVEL_WARNING=2]="LOG_LEVEL_WARNING",e[e.LOG_LEVEL_VERBOSE=3]="LOG_LEVEL_VERBOSE"}(f||(f={})),function(e){e[e.FRAME_PIXEL_FORMAT_I420=0]="FRAME_PIXEL_FORMAT_I420",e[e.FRAME_PIXEL_FORMAT_I420A=1]="FRAME_PIXEL_FORMAT_I420A",e[e.FRAME_PIXEL_FORMAT_I422=2]="FRAME_PIXEL_FORMAT_I422",e[e.FRAME_PIXEL_FORMAT_I444=3]="FRAME_PIXEL_FORMAT_I444",e[e.FRAME_PIXEL_FORMAT_NV12=4]="FRAME_PIXEL_FORMAT_NV12",e[e.FRAME_PIXEL_FORMAT_RGBA=5]="FRAME_PIXEL_FORMAT_RGBA",e[e.FRAME_PIXEL_FORMAT_BGRA=6]="FRAME_PIXEL_FORMAT_BGRA",e[e.FRAME_PIXEL_FORMAT_Y=7]="FRAME_PIXEL_FORMAT_Y"}(l||(l={})),function(e){e[e.IMAGE_TRACKER_TYPE_PLANAR=0]="IMAGE_TRACKER_TYPE_PLANAR",e[e.IMAGE_TRACKER_TYPE_CYLINDRICAL=1]="IMAGE_TRACKER_TYPE_CYLINDRICAL",e[e.IMAGE_TRACKER_TYPE_CONICAL=2]="IMAGE_TRACKER_TYPE_CONICAL"}(d||(d={})),function(e){e[e.WORLD_TRACKER_QUALITY_INITIALIZING=0]="WORLD_TRACKER_QUALITY_INITIALIZING",e[e.WORLD_TRACKER_QUALITY_GOOD=1]="WORLD_TRACKER_QUALITY_GOOD",e[e.WORLD_TRACKER_QUALITY_ORIENTATION_ONLY=2]="WORLD_TRACKER_QUALITY_ORIENTATION_ONLY"}(p||(p={}));const w=new Map;class g{constructor(e){this._gl=e,this._viewports=[],this._underlyingViewport=this._gl.viewport,this._viewports.push(this._gl.getParameter(this._gl.VIEWPORT)),this._gl.viewport=(e,t,r,i)=>{this._viewports[this._viewports.length-1]=[e,t,r,i],this._underlyingViewport.call(this._gl,e,t,r,i)}}static get(e){let t=w.get(e);return t||(t=new g(e),w.set(e,t)),t}push(){this._viewports.push(this._viewports[this._viewports.length-1])}pop(){const e=this._viewports.pop(),t=this._viewports[this._viewports.length-1];e&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]||this._underlyingViewport.call(this._gl,t[0],t[1],t[2],t[3])}}var y,v=r(238);!function(e){e[e.OBJECT_URL=0]="OBJECT_URL",e[e.SRC_OBJECT=1]="SRC_OBJECT"}(y||(y={}));let E={deviceMotionMutliplier:-1,blacklisted:!1,showGyroPermissionsWarningIfNecessary:!1,showSafariPermissionsResetIfNecessary:!1,requestHighFrameRate:!1,videoWidth:640,videoHeight:480,dataWidth:320,dataHeight:240,videoElementInDOM:!1,preferMediaStreamTrackProcessorCamera:!0,preferImageBitmapCamera:!1,ios164CameraSelection:!1,relyOnConstraintsForCameraSelection:!1,forceWindowOrientation:!1,intervalMultiplier:1,trustSensorIntervals:!1};"undefined"!=typeof window&&(window.zeeProfile=E,window.location.href.indexOf("_mstppipeline")>=0&&(console.log("Configuring for MSTP camera pipeline (if supported)"),E.preferMediaStreamTrackProcessorCamera=!0),window.location.href.indexOf("_imagebitmappipeline")>=0&&(console.log("Configuring for ImageBitmap camera pipeline (if supported)"),E.preferImageBitmapCamera=!0));let A=new v.UAParser,k=(A.getOS().name||"unknown").toLowerCase(),T=(A.getEngine().name||"unknown").toLowerCase();function R(e){E.forceWindowOrientation=!0,E.preferMediaStreamTrackProcessorCamera=!1,E.intervalMultiplier=1e3,E.trustSensorIntervals=!0;let t=e.split(".");if(t.length>=2){const e=parseInt(t[0]),r=parseInt(t[1]);(e<11||11===e&&r<3)&&(E.blacklisted=!0),(e<12||12===e&&r<2)&&(E.videoElementInDOM=!0),(12===e&&r>=2||e>=13)&&(E.showGyroPermissionsWarningIfNecessary=!0),e>=13&&(E.showSafariPermissionsResetIfNecessary=!0),(e>=12&&r>1||e>=13)&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&navigator.mediaDevices.getSupportedConstraints().frameRate&&(E.requestHighFrameRate=!0,e<14&&(E.videoHeight=360,E.dataHeight=180)),16===e&&r>=4&&(E.ios164CameraSelection=!0),e>=17&&(E.relyOnConstraintsForCameraSelection=!0)}}function x(e,t,r){let i=e.createShader(t);if(!i)throw new Error("Unable to create shader");e.shaderSource(i,r),e.compileShader(i);let a=e.getShaderInfoLog(i);if(a&&a.trim().length>0)throw new Error("Shader compile error: "+a);return i}"webkit"===T&&"ios"!==k&&(E.deviceMotionMutliplier=1,"undefined"!=typeof window&&void 0!==window.orientation&&R("15.0")),"webkit"===T&&"ios"===k&&(E.deviceMotionMutliplier=1,R(A.getOS().version||"15.0"));class L{constructor(e){this._gl=e,this._isPaused=!0,this._hadFrames=!1,this._isUserFacing=!1,this._cameraToScreenRotation=0,this._isUploadFrame=!0,this._computedTransformRotation=-1,this._computedFrontCameraRotation=!1,this._cameraUvTransform=h(),this._framebufferWidth=0,this._framebufferHeight=0,this._framebufferId=null,this._renderTexture=null,this._isWebGL2=!1,this._isWebGL2=e.getParameter(e.VERSION).indexOf("WebGL 2")>=0,this._isWebGL2||(this._instancedArraysExtension=this._gl.getExtension("ANGLE_instanced_arrays"))}resetGLContext(){this._framebufferId=null,this._renderTexture=null,this._vertexBuffer=void 0,this._indexBuffer=void 0,this._greyscaleShader=void 0}destroy(){this.resetGLContext()}uploadFrame(e,t,r,i){let a=this._gl;const n=g.get(a);n.push();const o=a.isEnabled(a.SCISSOR_TEST),s=a.isEnabled(a.DEPTH_TEST),_=a.isEnabled(a.BLEND),c=a.isEnabled(a.CULL_FACE),u=a.isEnabled(a.STENCIL_TEST),f=a.getParameter(a.ACTIVE_TEXTURE),l=a.getParameter(a.UNPACK_FLIP_Y_WEBGL),d=a.getParameter(a.CURRENT_PROGRAM);a.activeTexture(a.TEXTURE0);const p=a.getParameter(a.TEXTURE_BINDING_2D),m=a.getParameter(a.FRAMEBUFFER_BINDING),h=a.getParameter(a.ARRAY_BUFFER_BINDING),b=a.getParameter(a.ELEMENT_ARRAY_BUFFER_BINDING);a.disable(a.SCISSOR_TEST),a.disable(a.DEPTH_TEST),a.disable(a.BLEND),a.disable(a.CULL_FACE),a.disable(a.STENCIL_TEST),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),a.bindTexture(a.TEXTURE_2D,e);const w=a.RGBA,y=a.RGBA,v=a.UNSIGNED_BYTE;a.texImage2D(a.TEXTURE_2D,0,w,y,v,t);let A=0,k=0;"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?(A=t.videoWidth,k=t.videoHeight):(A=t.width,k=t.height),k>A&&(k=[A,A=k][0]),this._updateTransforms(r,i);let T=this._getFramebuffer(a,E.dataWidth/4,E.dataHeight),R=this._getVertexBuffer(a),x=this._getIndexBuffer(a),L=this._getGreyscaleShader(a);const z=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_SIZE),M=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_TYPE),I=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_NORMALIZED),F=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_STRIDE),O=a.getVertexAttribOffset(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_POINTER),P=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_ENABLED),S=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING),C=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_SIZE),D=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_TYPE),B=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_NORMALIZED),U=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_STRIDE),V=a.getVertexAttribOffset(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_POINTER),N=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING),G=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_ENABLED);let H=0,W=0;this._isWebGL2?(H=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_DIVISOR),W=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_DIVISOR),a.vertexAttribDivisor(L.aVertexPositionLoc,0),a.vertexAttribDivisor(L.aTextureCoordLoc,0)):this._instancedArraysExtension&&(H=a.getVertexAttrib(L.aVertexPositionLoc,this._instancedArraysExtension.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),W=a.getVertexAttrib(L.aTextureCoordLoc,this._instancedArraysExtension.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),this._instancedArraysExtension.vertexAttribDivisorANGLE(L.aVertexPositionLoc,0),this._instancedArraysExtension.vertexAttribDivisorANGLE(L.aTextureCoordLoc,0)),a.bindFramebuffer(a.FRAMEBUFFER,T),a.viewport(0,0,this._framebufferWidth,this._framebufferHeight),a.clear(a.COLOR_BUFFER_BIT),a.bindBuffer(a.ARRAY_BUFFER,R),a.vertexAttribPointer(L.aVertexPositionLoc,2,a.FLOAT,!1,16,0),a.enableVertexAttribArray(L.aVertexPositionLoc),a.vertexAttribPointer(L.aTextureCoordLoc,2,a.FLOAT,!1,16,8),a.enableVertexAttribArray(L.aTextureCoordLoc),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,x),a.useProgram(L.program),a.uniform1f(L.uTexWidthLoc,E.dataWidth),a.uniformMatrix4fv(L.uUvTransformLoc,!1,this._cameraUvTransform),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,e),a.uniform1i(L.uSamplerLoc,0),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0),a.bindBuffer(a.ARRAY_BUFFER,S),a.vertexAttribPointer(L.aVertexPositionLoc,z,M,I,F,O),a.bindBuffer(a.ARRAY_BUFFER,N),a.vertexAttribPointer(L.aTextureCoordLoc,C,D,B,U,V),a.bindBuffer(a.ARRAY_BUFFER,h),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,b),P||a.disableVertexAttribArray(L.aVertexPositionLoc),G||a.disableVertexAttribArray(L.aTextureCoordLoc),this._isWebGL2?(a.vertexAttribDivisor(L.aVertexPositionLoc,H),a.vertexAttribDivisor(L.aTextureCoordLoc,W)):this._instancedArraysExtension&&(this._instancedArraysExtension.vertexAttribDivisorANGLE(L.aVertexPositionLoc,H),this._instancedArraysExtension.vertexAttribDivisorANGLE(L.aTextureCoordLoc,W)),a.bindFramebuffer(a.FRAMEBUFFER,m),a.useProgram(d),a.bindTexture(a.TEXTURE_2D,p),a.activeTexture(f),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,l),n.pop(),_&&a.enable(a.BLEND),c&&a.enable(a.CULL_FACE),s&&a.enable(a.DEPTH_TEST),o&&a.enable(a.SCISSOR_TEST),u&&a.enable(a.STENCIL_TEST)}readFrame(e,t){let r=this._gl,i=new Uint8Array(t);const a=r.getParameter(r.FRAMEBUFFER_BINDING);let n=this._getFramebuffer(r,E.dataWidth/4,E.dataHeight);return r.bindFramebuffer(r.FRAMEBUFFER,n),r.readPixels(0,0,this._framebufferWidth,this._framebufferHeight,r.RGBA,r.UNSIGNED_BYTE,i),r.bindFramebuffer(r.FRAMEBUFFER,a),{uvTransform:this._cameraUvTransform,data:t,texture:e,dataWidth:E.dataWidth,dataHeight:E.dataHeight,userFacing:this._computedFrontCameraRotation}}_updateTransforms(e,t){e==this._computedTransformRotation&&t==this._computedFrontCameraRotation||(this._computedTransformRotation=e,this._computedFrontCameraRotation=t,this._cameraUvTransform=this._getCameraUvTransform())}_getCameraUvTransform(){switch(this._computedTransformRotation){case 270:return new Float32Array([0,1,0,0,-1,0,0,0,0,0,1,0,1,0,0,1]);case 180:return new Float32Array([-1,0,0,0,0,-1,0,0,0,0,1,0,1,1,0,1]);case 90:return new Float32Array([0,-1,0,0,1,0,0,0,0,0,1,0,0,1,0,1])}return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}_getFramebuffer(e,t,r){if(this._framebufferWidth===t&&this._framebufferHeight===r&&this._framebufferId)return this._framebufferId;if(this._framebufferId&&(e.deleteFramebuffer(this._framebufferId),this._framebufferId=null),this._renderTexture&&(e.deleteTexture(this._renderTexture),this._renderTexture=null),this._framebufferId=e.createFramebuffer(),!this._framebufferId)throw new Error("Unable to create framebuffer");if(e.bindFramebuffer(e.FRAMEBUFFER,this._framebufferId),this._renderTexture=e.createTexture(),!this._renderTexture)throw new Error("Unable to create render texture");e.activeTexture(e.TEXTURE0);const i=e.getParameter(e.TEXTURE_BINDING_2D);e.bindTexture(e.TEXTURE_2D,this._renderTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t,r,0,e.RGBA,e.UNSIGNED_BYTE,null),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.texParameterf(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this._renderTexture,0);let a=e.checkFramebufferStatus(e.FRAMEBUFFER);if(a!==e.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer not complete: "+a.toString());return this._framebufferWidth=t,this._framebufferHeight=r,e.bindTexture(e.TEXTURE_2D,i),e.bindFramebuffer(e.FRAMEBUFFER,null),this._framebufferId}_getVertexBuffer(e){if(this._vertexBuffer)return this._vertexBuffer;if(this._vertexBuffer=e.createBuffer(),!this._vertexBuffer)throw new Error("Unable to create vertex buffer");e.bindBuffer(e.ARRAY_BUFFER,this._vertexBuffer);let t=new Float32Array([-1,-1,0,0,-1,1,0,1,1,1,1,1,1,-1,1,0]);return e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),this._vertexBuffer}_getIndexBuffer(e){if(this._indexBuffer)return this._indexBuffer;if(this._indexBuffer=e.createBuffer(),!this._indexBuffer)throw new Error("Unable to create index buffer");e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this._indexBuffer);let t=new Uint16Array([0,1,2,0,2,3]);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,t,e.STATIC_DRAW),this._indexBuffer}_getGreyscaleShader(e){if(this._greyscaleShader)return this._greyscaleShader;let t=e.createProgram();if(!t)throw new Error("Unable to create program");let r=x(e,e.VERTEX_SHADER,O),i=x(e,e.FRAGMENT_SHADER,P);e.attachShader(t,r),e.attachShader(t,i),function(e,t){e.linkProgram(t);let r=e.getProgramInfoLog(t);if(r&&r.trim().length>0)throw new Error("Unable to link: "+r)}(e,t);let a=e.getUniformLocation(t,"uTexWidth");if(!a)throw new Error("Unable to get uniform location uTexWidth");let n=e.getUniformLocation(t,"uUvTransform");if(!n)throw new Error("Unable to get uniform location uUvTransform");let o=e.getUniformLocation(t,"uSampler");if(!o)throw new Error("Unable to get uniform location uSampler");return this._greyscaleShader={program:t,aVertexPositionLoc:e.getAttribLocation(t,"aVertexPosition"),aTextureCoordLoc:e.getAttribLocation(t,"aTextureCoord"),uTexWidthLoc:a,uUvTransformLoc:n,uSamplerLoc:o},this._greyscaleShader}}let z,M,I,F,O="\n attribute vec4 aVertexPosition;\n attribute vec2 aTextureCoord;\n\n varying highp vec2 vTextureCoord1;\n varying highp vec2 vTextureCoord2;\n varying highp vec2 vTextureCoord3;\n varying highp vec2 vTextureCoord4;\n\n uniform float uTexWidth;\n\tuniform mat4 uUvTransform;\n\n void main(void) {\n highp vec2 offset1 = vec2(1.5 / uTexWidth, 0);\n highp vec2 offset2 = vec2(0.5 / uTexWidth, 0);\n\n gl_Position = aVertexPosition;\n vTextureCoord1 = (uUvTransform * vec4(aTextureCoord - offset1, 0, 1)).xy;\n vTextureCoord2 = (uUvTransform * vec4(aTextureCoord - offset2, 0, 1)).xy;\n vTextureCoord3 = (uUvTransform * vec4(aTextureCoord + offset2, 0, 1)).xy;\n vTextureCoord4 = (uUvTransform * vec4(aTextureCoord + offset1, 0, 1)).xy;\n }\n",P="\n varying highp vec2 vTextureCoord1;\n varying highp vec2 vTextureCoord2;\n varying highp vec2 vTextureCoord3;\n varying highp vec2 vTextureCoord4;\n\n uniform sampler2D uSampler;\n\n const lowp vec3 colorWeights = vec3(77.0 / 256.0, 150.0 / 256.0, 29.0 / 256.0);\n\n void main(void) {\n lowp vec4 outpx;\n\n outpx.r = dot(colorWeights, texture2D(uSampler, vTextureCoord1).xyz);\n outpx.g = dot(colorWeights, texture2D(uSampler, vTextureCoord2).xyz);\n outpx.b = dot(colorWeights, texture2D(uSampler, vTextureCoord3).xyz);\n outpx.a = dot(colorWeights, texture2D(uSampler, vTextureCoord4).xyz);\n\n gl_FragColor = outpx;\n }\n";var S=function(e,t,r,i){return new(r||(r=Promise))((function(a,n){function o(e){try{_(i.next(e))}catch(e){n(e)}}function s(e){try{_(i.throw(e))}catch(e){n(e)}}function _(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}_((i=i.apply(e,t||[])).next())}))};let C=new class{constructor(){this.onOutgoingMessage=new o,this.onIncomingMessage=new s,this._outgoingMessages=[]}postIncomingMessage(e){this.onIncomingMessage.emit(e)}postOutgoingMessage(e,t){this._outgoingMessages.push({msg:e,transferables:t}),this.onOutgoingMessage.emit()}getOutgoingMessages(){let e=this._outgoingMessages;return this._outgoingMessages=[],e}},D=0;function B(e){return S(this,void 0,void 0,(function*(){let r=t({locateFile:(t,r)=>t.endsWith("zappar-cv.wasm")?e:r+t,onRuntimeInitialized:()=>{let e=function(e){let t=e.cwrap("zappar_log_level","number",[]),r=e.cwrap("zappar_log_level_set",null,["number"]),i=e.cwrap("zappar_analytics_project_id_set",null,["string","string"]),a=e.cwrap("zappar_pipeline_create","number",[]),n=e.cwrap("zappar_pipeline_destroy",null,["number"]),o=e.cwrap("zappar_pipeline_frame_update",null,["number"]),s=e.cwrap("zappar_pipeline_frame_number","number",["number"]),_=e.cwrap("zappar_pipeline_camera_model","number",["number"]),c=e.cwrap("zappar_pipeline_camera_frame_user_data","number",["number"]),u=e.cwrap("zappar_pipeline_camera_frame_submit",null,["number","number","number","number","number","number","number","number","number"]),f=e.cwrap("zappar_pipeline_camera_frame_submit_raw_pointer",null,["number","number","number","number","number","number","number","number","number","number","number"]),l=e.cwrap("zappar_pipeline_camera_frame_camera_attitude","number",["number"]),d=e.cwrap("zappar_pipeline_camera_frame_device_attitude","number",["number"]),p=e.cwrap("zappar_pipeline_motion_accelerometer_submit",null,["number","number","number","number","number"]),m=e.cwrap("zappar_pipeline_motion_accelerometer_with_gravity_submit_int",null,["number","number","number","number","number","number"]),h=e.cwrap("zappar_pipeline_motion_accelerometer_without_gravity_submit_int",null,["number","number","number","number","number","number"]),b=e.cwrap("zappar_pipeline_motion_rotation_rate_submit",null,["number","number","number","number","number"]),w=e.cwrap("zappar_pipeline_motion_rotation_rate_submit_int",null,["number","number","number","number","number","number"]),g=e.cwrap("zappar_pipeline_motion_attitude_submit",null,["number","number","number","number","number"]),y=e.cwrap("zappar_pipeline_motion_attitude_submit_int",null,["number","number","number","number","number","number"]),v=e.cwrap("zappar_pipeline_motion_attitude_matrix_submit",null,["number","number"]),E=e.cwrap("zappar_camera_source_create","number",["number","string"]),A=e.cwrap("zappar_camera_source_destroy",null,["number"]),k=e.cwrap("zappar_sequence_source_create","number",["number"]),T=e.cwrap("zappar_sequence_source_destroy",null,["number"]),R=e.cwrap("zappar_image_tracker_create","number",["number"]),x=e.cwrap("zappar_image_tracker_destroy",null,["number"]),L=e.cwrap("zappar_image_tracker_target_load_from_memory",null,["number","number","number"]),z=e.cwrap("zappar_image_tracker_target_loaded_version","number",["number"]),M=e.cwrap("zappar_image_tracker_enabled","number",["number"]),I=e.cwrap("zappar_image_tracker_enabled_set",null,["number","number"]),F=e.cwrap("zappar_image_tracker_anchor_count","number",["number"]),O=e.cwrap("zappar_image_tracker_anchor_id","string",["number","number"]),P=e.cwrap("zappar_image_tracker_anchor_pose_raw","number",["number","number"]),S=e.cwrap("zappar_face_tracker_create","number",["number"]),C=e.cwrap("zappar_face_tracker_destroy",null,["number"]),D=e.cwrap("zappar_face_tracker_model_load_from_memory",null,["number","number","number"]),B=e.cwrap("zappar_face_tracker_model_loaded_version","number",["number"]),U=e.cwrap("zappar_face_tracker_enabled_set",null,["number","number"]),V=e.cwrap("zappar_face_tracker_enabled","number",["number"]),N=e.cwrap("zappar_face_tracker_max_faces_set",null,["number","number"]),G=e.cwrap("zappar_face_tracker_max_faces","number",["number"]),H=e.cwrap("zappar_face_tracker_anchor_count","number",["number"]),W=e.cwrap("zappar_face_tracker_anchor_id","string",["number","number"]),Y=e.cwrap("zappar_face_tracker_anchor_pose_raw","number",["number","number"]),X=e.cwrap("zappar_face_tracker_anchor_identity_coefficients","number",["number","number"]),q=e.cwrap("zappar_face_tracker_anchor_expression_coefficients","number",["number","number"]),Z=e.cwrap("zappar_face_mesh_create","number",[]),j=e.cwrap("zappar_face_mesh_destroy",null,["number"]),K=e.cwrap("zappar_face_landmark_create","number",["number"]),J=e.cwrap("zappar_face_landmark_destroy",null,["number"]),Q=e.cwrap("zappar_barcode_finder_create","number",["number"]),$=e.cwrap("zappar_barcode_finder_destroy",null,["number"]),ee=e.cwrap("zappar_barcode_finder_enabled_set",null,["number","number"]),te=e.cwrap("zappar_barcode_finder_enabled","number",["number"]),re=e.cwrap("zappar_barcode_finder_found_number","number",["number"]),ie=e.cwrap("zappar_barcode_finder_found_text","string",["number","number"]),ae=e.cwrap("zappar_barcode_finder_found_format","number",["number","number"]),ne=e.cwrap("zappar_barcode_finder_formats","number",["number"]),oe=e.cwrap("zappar_barcode_finder_formats_set",null,["number","number"]),se=e.cwrap("zappar_instant_world_tracker_create","number",["number"]),_e=e.cwrap("zappar_instant_world_tracker_destroy",null,["number"]),ce=e.cwrap("zappar_instant_world_tracker_enabled_set",null,["number","number"]),ue=e.cwrap("zappar_instant_world_tracker_enabled","number",["number"]),fe=e.cwrap("zappar_instant_world_tracker_anchor_pose_raw","number",["number"]),le=e.cwrap("zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw",null,["number","number","number","number","number"]),de=e.cwrap("zappar_world_tracker_create","number",["number"]),pe=e.cwrap("zappar_world_tracker_destroy",null,["number"]),me=e.cwrap("zappar_world_tracker_enabled","number",["number"]),he=e.cwrap("zappar_world_tracker_enabled_set",null,["number","number"]),be=e.cwrap("zappar_world_tracker_quality","number",["number"]),we=e.cwrap("zappar_world_tracker_plane_count","number",["number"]),ge=e.cwrap("zappar_world_tracker_plane_pose_raw","number",["number","number"]),ye=e.cwrap("zappar_world_tracker_world_anchor_valid","number",["number"]),ve=e.cwrap("zappar_world_tracker_world_anchor_pose_raw","number",["number"]),Ee=e.cwrap("zappar_world_tracker_ground_anchor_valid","number",["number"]),Ae=e.cwrap("zappar_world_tracker_ground_anchor_pose_raw","number",["number"]),ke=e.cwrap("zappar_world_tracker_reset",null,["number"]),Te=32,Re=e._malloc(Te),xe=(e._malloc(64),new Map),Le=(t,r)=>{let i=xe.get(t);return(!i||i[0]<r)&&(i&&e._free(i[1]),i=[r,e._malloc(r)],xe.set(t,i)),i[1]};return{log_level:()=>t(),log_level_set:e=>r(e),analytics_project_id_set:(e,t)=>i(e,t),pipeline_create:()=>a(),pipeline_destroy:()=>{n()},pipeline_frame_update:e=>o(e),pipeline_frame_number:e=>s(e),pipeline_camera_model:t=>{let r=_(t),i=new Float32Array(6);return i.set(e.HEAPF32.subarray(r/4,6+r/4)),r=i,r},pipeline_camera_frame_user_data:e=>c(e),pipeline_camera_frame_submit:(t,r,i,a,n,o,s,_)=>{Te<r.byteLength&&(e._free(Re),Te=r.byteLength,Re=e._malloc(Te));let c=Re,f=r.byteLength;e.HEAPU8.set(new Uint8Array(r),Re);let l=i,d=a,p=n,m=Le(4,o.byteLength);e.HEAPF32.set(o,m/4);let h=Le(5,s.byteLength);return e.HEAPF32.set(s,h/4),u(t,c,f,l,d,p,m,h,_?1:0)},pipeline_camera_frame_submit_raw_pointer:(t,r,i,a,n,o,s,_,c,u,l)=>{let d=r,p=i,m=a,h=n,b=o,w=s,g=Le(6,_.byteLength);e.HEAPF32.set(_,g/4);let y=c,v=Le(8,u.byteLength);return e.HEAPF32.set(u,v/4),f(t,d,p,m,h,b,w,g,y,v,l?1:0)},pipeline_camera_frame_camera_attitude:t=>{let r=l(t),i=new Float32Array(16);return i.set(e.HEAPF32.subarray(r/4,16+r/4)),r=i,r},pipeline_camera_frame_device_attitude:t=>{let r=d(t),i=new Float32Array(16);return i.set(e.HEAPF32.subarray(r/4,16+r/4)),r=i,r},pipeline_motion_accelerometer_submit:(e,t,r,i,a)=>p(e,t,r,i,a),pipeline_motion_accelerometer_with_gravity_submit_int:(e,t,r,i,a,n)=>m(e,t,r,i,a,n),pipeline_motion_accelerometer_without_gravity_submit_int:(e,t,r,i,a,n)=>h(e,t,r,i,a,n),pipeline_motion_rotation_rate_submit:(e,t,r,i,a)=>b(e,t,r,i,a),pipeline_motion_rotation_rate_submit_int:(e,t,r,i,a,n)=>w(e,t,r,i,a,n),pipeline_motion_attitude_submit:(e,t,r,i,a)=>g(e,t,r,i,a),pipeline_motion_attitude_submit_int:(e,t,r,i,a,n)=>y(e,t,r,i,a,n),pipeline_motion_attitude_matrix_submit:(t,r)=>{let i=Le(0,r.byteLength);return e.HEAPF32.set(r,i/4),v(t,i)},camera_source_create:(e,t)=>E(e,t),camera_source_destroy:()=>{A()},sequence_source_create:e=>k(e),sequence_source_destroy:()=>{T()},image_tracker_create:e=>R(e),image_tracker_destroy:()=>{x()},image_tracker_target_load_from_memory:(t,r)=>{Te<r.byteLength&&(e._free(Re),Te=r.byteLength,Re=e._malloc(Te));let i=Re,a=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),Re),L(t,i,a)},image_tracker_target_loaded_version:e=>z(e),image_tracker_enabled:e=>{let t=M(e);return t=1===t,t},image_tracker_enabled_set:(e,t)=>I(e,t?1:0),image_tracker_anchor_count:e=>F(e),image_tracker_anchor_id:(e,t)=>O(e,t),image_tracker_anchor_pose_raw:(t,r)=>{let i=P(t,r),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(i/4,16+i/4)),i=a,i},face_tracker_create:e=>S(e),face_tracker_destroy:()=>{C()},face_tracker_model_load_from_memory:(t,r)=>{Te<r.byteLength&&(e._free(Re),Te=r.byteLength,Re=e._malloc(Te));let i=Re,a=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),Re),D(t,i,a)},face_tracker_model_loaded_version:e=>B(e),face_tracker_enabled_set:(e,t)=>U(e,t?1:0),face_tracker_enabled:e=>{let t=V(e);return t=1===t,t},face_tracker_max_faces_set:(e,t)=>N(e,t),face_tracker_max_faces:e=>G(e),face_tracker_anchor_count:e=>H(e),face_tracker_anchor_id:(e,t)=>W(e,t),face_tracker_anchor_pose_raw:(t,r)=>{let i=Y(t,r),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(i/4,16+i/4)),i=a,i},face_tracker_anchor_identity_coefficients:(t,r)=>{let i=X(t,r),a=new Float32Array(50);return a.set(e.HEAPF32.subarray(i/4,50+i/4)),i=a,i},face_tracker_anchor_expression_coefficients:(t,r)=>{let i=q(t,r),a=new Float32Array(29);return a.set(e.HEAPF32.subarray(i/4,29+i/4)),i=a,i},face_mesh_create:()=>Z(),face_mesh_destroy:()=>{j()},face_landmark_create:e=>K(e),face_landmark_destroy:()=>{J()},barcode_finder_create:e=>Q(e),barcode_finder_destroy:()=>{$()},barcode_finder_enabled_set:(e,t)=>ee(e,t?1:0),barcode_finder_enabled:e=>{let t=te(e);return t=1===t,t},barcode_finder_found_number:e=>re(e),barcode_finder_found_text:(e,t)=>ie(e,t),barcode_finder_found_format:(e,t)=>ae(e,t),barcode_finder_formats:e=>ne(e),barcode_finder_formats_set:(e,t)=>oe(e,t),instant_world_tracker_create:e=>se(e),instant_world_tracker_destroy:()=>{_e()},instant_world_tracker_enabled_set:(e,t)=>ce(e,t?1:0),instant_world_tracker_enabled:e=>{let t=ue(e);return t=1===t,t},instant_world_tracker_anchor_pose_raw:t=>{let r=fe(t),i=new Float32Array(16);return i.set(e.HEAPF32.subarray(r/4,16+r/4)),r=i,r},instant_world_tracker_anchor_pose_set_from_camera_offset_raw:(e,t,r,i,a)=>le(e,t,r,i,a),world_tracker_create:e=>de(e),world_tracker_destroy:()=>{pe()},world_tracker_enabled:e=>{let t=me(e);return t=1===t,t},world_tracker_enabled_set:(e,t)=>he(e,t?1:0),world_tracker_quality:e=>be(e),world_tracker_plane_count:e=>we(e),world_tracker_plane_pose_raw:(t,r)=>{let i=ge(t,r),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(i/4,16+i/4)),i=a,i},world_tracker_world_anchor_valid:e=>{let t=ye(e);return t=1===t,t},world_tracker_world_anchor_pose_raw:t=>{let r=ve(t),i=new Float32Array(16);return i.set(e.HEAPF32.subarray(r/4,16+r/4)),r=i,r},world_tracker_ground_anchor_valid:e=>{let t=Ee(e);return t=1===t,t},world_tracker_ground_anchor_pose_raw:t=>{let r=Ae(t),i=new Float32Array(16);return i.set(e.HEAPF32.subarray(r/4,16+r/4)),r=i,r},world_tracker_reset:e=>ke(e)}}(r),t=new n(e,((e,t)=>{C.postOutgoingMessage({p:e,t:"zappar",d:t},[t])}));C.postOutgoingMessage("loaded",[]),C.onIncomingMessage.bind((i=>{var a;switch(i.t){case"zappar":t.processBuffer(i.d),C.postOutgoingMessage({t:"buf",d:i.d},[i.d]);break;case"buf":null===(a=t.serializersByPipelineId.get(i.p))||void 0===a||a.bufferReturn(i.d);break;case"cameraFrameC2S":{let r,a=i,n=t._pipeline_by_instance.get(a.p);n&&(e.pipeline_camera_frame_submit(n,a.d,a.width,a.height,a.token,a.c2d,a.cm,a.userFacing),e.pipeline_frame_update(n),r=e.pipeline_camera_frame_device_attitude(n),t.exploreState());let o={token:a.token,d:a.d,p:a.p,t:"cameraFrameRecycleS2C",att:r};C.postOutgoingMessage(o,[a.d]);break}case"streamC2S":{let a=i;(function(e,t,r,i,a,n,o){return S(this,void 0,void 0,(function*(){for(;;){let s;try{s=yield r.getReader()}catch(e){yield X(1e3);continue}try{return void(yield Y(e,t,s,i,a,n,o))}catch(e){}return void(yield X(1e3))}}))})(r,e,a.s,a.p,a.userFacing,t,a.source).then((()=>{let e={t:"streamEndedS2C",p:a.p,source:a.source};C.postOutgoingMessage(e,[])})).catch((e=>{}));break}case"cameraToScreenC2S":D=i.r;break;case"imageBitmapC2S":!function(e,t,r,i){const[a,n]=function(){if(!I||!F){const e=new OffscreenCanvas(1,1);if(F=e.getContext("webgl"),!F)throw new Error("Unable to get offscreen GL context");I=new L(F)}return[I,F]}();if(M||(M=n.createTexture(),n.bindTexture(n.TEXTURE_2D,M),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR)),!M)return;(!z||z.byteLength<E.dataWidth*E.dataHeight)&&(z=new ArrayBuffer(E.dataWidth*E.dataHeight)),a.uploadFrame(M,e.i,e.r,e.userFacing);let o=a.readFrame(M,z),s={t:"imageBitmapS2C",dataWidth:o.dataWidth,dataHeight:o.dataHeight,frame:e.i,userFacing:o.userFacing,uvTransform:o.uvTransform||h(),tokenId:e.tokenId,p:e.p};i.postOutgoingMessage(s,[e.i]);let _=r._pipeline_by_instance.get(e.p);_&&(t.pipeline_camera_frame_submit(_,z,o.dataWidth,o.dataHeight,e.tokenId,e.cameraToDevice,e.cameraModel,o.userFacing),t.pipeline_frame_update(_),r.exploreState())}(i,e,t,C);break;case"sensorDataC2S":{const r=i,a=t._pipeline_by_instance.get(r.p);if(!a)break;switch(r.sensor){case"accel":e.pipeline_motion_accelerometer_submit(a,r.timestamp,r.x,r.y,r.z);break;case"accel_w_gravity_int":e.pipeline_motion_accelerometer_with_gravity_submit_int(a,r.timestamp,r.interval,r.x,r.y,r.z);break;case"accel_wo_gravity_int":e.pipeline_motion_accelerometer_without_gravity_submit_int(a,r.timestamp,r.interval,r.x,r.y,r.z);break;case"attitude_int":e.pipeline_motion_attitude_submit_int(a,r.timestamp,r.interval,r.x,r.y,r.z);break;case"attitude":e.pipeline_motion_attitude_submit(a,r.timestamp,r.x,r.y,r.z);break;case"rotation_rate_int":e.pipeline_motion_rotation_rate_submit_int(a,r.timestamp,r.interval,r.x,r.y,r.z);break;case"rotation_rate":e.pipeline_motion_rotation_rate_submit(a,r.timestamp,r.x,r.y,r.z)}break}case"attitudeMatrixC2S":{const r=i,a=t._pipeline_by_instance.get(r.p);if(!a)break;e.pipeline_motion_attitude_matrix_submit(a,r.m);break}}}))}})}))}let U=0,V=0,N=1;function G(e){return new Promise(((t,r)=>{const i=setTimeout((()=>{r("Frame timeout")}),2e3);e.read().then((e=>{clearTimeout(i),t(e)}))}))}const H=h(),W=new Float32Array([300,300,160,120,0,0]);function Y(e,t,r,i,a,n,o){var s;return S(this,void 0,void 0,(function*(){for(;;){let u=yield G(r);if(u.done)return void(null===(s=u.value)||void 0===s||s.close());let f=u.value,l=f.allocationSize();l>V&&(U>0&&e._free(U),U=e._malloc(l),V=l),yield f.copyTo(e.HEAPU8.subarray(U,U+V));let d=N;N++;const p=f.visibleRect.width,m=f.visibleRect.height;let h,w=p,g=m;switch(D){case 270:h=new Float32Array([0,1,0,0,-1,0,0,0,0,0,1,0,1,0,0,1]),w=m,g=p;break;case 180:h=new Float32Array([-1,0,0,0,0,-1,0,0,0,0,1,0,1,1,0,1]);break;case 90:h=new Float32Array([0,-1,0,0,1,0,0,0,0,0,1,0,0,1,0,1]),w=m,g=p;break;default:h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}let y=f.clone();a?(c=[-1,1,-1],(_=H)[0]=c[0],_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=c[1],_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=c[2],_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1):b(H);let v=300*E.dataWidth/320;W[0]=v,W[1]=v,W[2]=.5*E.dataWidth,W[3]=.5*E.dataHeight;const A={token:d,d:y,p:i,t:"videoFrameS2C",userFacing:a,uvTransform:h,w,h:g,cameraToDevice:H,cameraModel:W,source:o};C.postOutgoingMessage(A,[A.d,A.uvTransform.buffer]);const k=n._pipeline_by_instance.get(i);if(k){try{t.pipeline_camera_frame_submit_raw_pointer(k,U,l,q(f.format),p,m,d,H,D,W,a)}catch(e){}t.pipeline_frame_update(k),n.exploreState()}f.close()}var _,c}))}function X(e){return new Promise((t=>{setTimeout(t,e)}))}function q(e){switch(e){case"I420":return l.FRAME_PIXEL_FORMAT_I420;case"I420A":return l.FRAME_PIXEL_FORMAT_I420A;case"I422":return l.FRAME_PIXEL_FORMAT_I422;case"I444":return l.FRAME_PIXEL_FORMAT_I444;case"NV12":return l.FRAME_PIXEL_FORMAT_NV12;case"RGBA":case"RGBX":return l.FRAME_PIXEL_FORMAT_RGBA;case"BGRA":case"BGRX":return l.FRAME_PIXEL_FORMAT_BGRA}return l.FRAME_PIXEL_FORMAT_Y}const Z=self;C.onOutgoingMessage.bind((()=>{let e=C.getOutgoingMessages();for(let t of e)Z.postMessage(t.msg,t.transferables)}));let j=e=>{e&&e.data&&"wasm"===e.data.t&&(B(location.href.startsWith("blob")?e.data.url:new URL(r(751),r.b).toString()),Z.removeEventListener("message",j))};Z.addEventListener("message",j),Z.addEventListener("message",(e=>{C.postIncomingMessage(e.data)}))})()})();
|
|
1
|
+
(()=>{var e={238:function(e,t,r){var a;!function(i,n){"use strict";var _="function",o="undefined",s="object",c="string",h="model",l="name",f="type",u="vendor",d="version",p="architecture",m="console",b="mobile",g="tablet",w="smarttv",v="wearable",E="embedded",y="Amazon",A="Apple",k="ASUS",R="BlackBerry",N="Browser",S="Chrome",T="Firefox",x="Google",I="Huawei",L="LG",z="Microsoft",P="Motorola",M="Opera",F="Samsung",O="Sharp",C="Sony",V="Xiaomi",B="Zebra",U="Facebook",j=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},D=function(e,t){return typeof e===c&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},W=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,350)},Z=function(e,t){for(var r,a,i,o,c,h,l=0;l<t.length&&!c;){var f=t[l],u=t[l+1];for(r=a=0;r<f.length&&!c;)if(c=f[r++].exec(e))for(i=0;i<u.length;i++)h=c[++a],typeof(o=u[i])===s&&o.length>0?2===o.length?typeof o[1]==_?this[o[0]]=o[1].call(this,h):this[o[0]]=o[1]:3===o.length?typeof o[1]!==_||o[1].exec&&o[1].test?this[o[0]]=h?h.replace(o[1],o[2]):n:this[o[0]]=h?o[1].call(this,h,o[2]):n:4===o.length&&(this[o[0]]=h?o[3].call(this,h.replace(o[1],o[2])):n):this[o]=h||n;l+=2}},X=function(e,t){for(var r in t)if(typeof t[r]===s&&t[r].length>0){for(var a=0;a<t[r].length;a++)if(D(t[r][a],e))return"?"===r?n:r}else if(D(t[r],e))return"?"===r?n:r;return e},G={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,d],[/opios[\/ ]+([\w\.]+)/i],[d,[l,M+" Mini"]],[/\bopr\/([\w\.]+)/i],[d,[l,M]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[l,d],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[l,"UC"+N]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[d,[l,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[l,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[l,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+N],d],[/\bfocus\/([\w\.]+)/i],[d,[l,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[d,[l,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[l,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[l,"MIUI "+N]],[/fxios\/([-\w\.]+)/i],[d,[l,T]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+N]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+N],d],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[l,d],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,U],d],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[l,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[l,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[l,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,S+" WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[l,"Android "+N]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,d],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[d,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[d,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[d,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[l,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,d],[/(cobalt)\/([\w\.]+)/i],[l,[d,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,K]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",K]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[h,[u,F],[f,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[h,[u,F],[f,b]],[/\((ip(?:hone|od)[\w ]*);/i],[h,[u,A],[f,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[h,[u,A],[f,g]],[/(macintosh);/i],[h,[u,A]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[h,[u,I],[f,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[h,[u,I],[f,b]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[h,/_/g," "],[u,V],[f,b]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[h,/_/g," "],[u,V],[f,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[h,[u,"OPPO"],[f,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[h,[u,"Vivo"],[f,b]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[h,[u,"Realme"],[f,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[h,[u,P],[f,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[h,[u,P],[f,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[h,[u,L],[f,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[h,[u,L],[f,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[h,[u,"Lenovo"],[f,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[h,/_/g," "],[u,"Nokia"],[f,b]],[/(pixel c)\b/i],[h,[u,x],[f,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[h,[u,x],[f,b]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[h,[u,C],[f,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[h,"Xperia Tablet"],[u,C],[f,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[h,[u,"OnePlus"],[f,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[h,[u,y],[f,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[h,/(.+)/g,"Fire Phone $1"],[u,y],[f,b]],[/(playbook);[-\w\),; ]+(rim)/i],[h,u,[f,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[h,[u,R],[f,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[h,[u,k],[f,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[h,[u,k],[f,b]],[/(nexus 9)/i],[h,[u,"HTC"],[f,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[u,[h,/_/g," "],[f,b]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[h,[u,"Acer"],[f,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[h,[u,"Meizu"],[f,b]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[h,[u,O],[f,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,h,[f,b]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,h,[f,g]],[/(surface duo)/i],[h,[u,z],[f,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[h,[u,"Fairphone"],[f,b]],[/(u304aa)/i],[h,[u,"AT&T"],[f,b]],[/\bsie-(\w*)/i],[h,[u,"Siemens"],[f,b]],[/\b(rct\w+) b/i],[h,[u,"RCA"],[f,g]],[/\b(venue[\d ]{2,7}) b/i],[h,[u,"Dell"],[f,g]],[/\b(q(?:mv|ta)\w+) b/i],[h,[u,"Verizon"],[f,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[h,[u,"Barnes & Noble"],[f,g]],[/\b(tm\d{3}\w+) b/i],[h,[u,"NuVision"],[f,g]],[/\b(k88) b/i],[h,[u,"ZTE"],[f,g]],[/\b(nx\d{3}j) b/i],[h,[u,"ZTE"],[f,b]],[/\b(gen\d{3}) b.+49h/i],[h,[u,"Swiss"],[f,b]],[/\b(zur\d{3}) b/i],[h,[u,"Swiss"],[f,g]],[/\b((zeki)?tb.*\b) b/i],[h,[u,"Zeki"],[f,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],h,[f,g]],[/\b(ns-?\w{0,9}) b/i],[h,[u,"Insignia"],[f,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[h,[u,"NextBook"],[f,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],h,[f,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],h,[f,b]],[/\b(ph-1) /i],[h,[u,"Essential"],[f,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[h,[u,"Envizen"],[f,g]],[/\b(trio[-\w\. ]+) b/i],[h,[u,"MachSpeed"],[f,g]],[/\btu_(1491) b/i],[h,[u,"Rotor"],[f,g]],[/(shield[\w ]+) b/i],[h,[u,"Nvidia"],[f,g]],[/(sprint) (\w+)/i],[u,h,[f,b]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[u,z],[f,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[h,[u,B],[f,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[h,[u,B],[f,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,h,[f,m]],[/droid.+; (shield) bui/i],[h,[u,"Nvidia"],[f,m]],[/(playstation [345portablevi]+)/i],[h,[u,C],[f,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[h,[u,z],[f,m]],[/smart-tv.+(samsung)/i],[u,[f,w]],[/hbbtv.+maple;(\d+)/i],[[h,/^/,"SmartTV"],[u,F],[f,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,L],[f,w]],[/(apple) ?tv/i],[u,[h,A+" TV"],[f,w]],[/crkey/i],[[h,S+"cast"],[u,x],[f,w]],[/droid.+aft(\w)( bui|\))/i],[h,[u,y],[f,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[h,[u,O],[f,w]],[/(bravia[\w ]+)( bui|\))/i],[h,[u,C],[f,w]],[/(mitv-\w{5}) bui/i],[h,[u,V],[f,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[u,W],[h,W],[f,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,w]],[/((pebble))app/i],[u,h,[f,v]],[/droid.+; (glass) \d/i],[h,[u,x],[f,v]],[/droid.+; (wt63?0{2,3})\)/i],[h,[u,B],[f,v]],[/(quest( 2)?)/i],[h,[u,U],[f,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[f,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[h,[f,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[h,[f,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,b]],[/(android[-\w\. ]{0,9});.+buil/i],[h,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[l,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,d],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[l,[d,X,G]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[l,"Windows"],[d,X,G]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,"Mac OS"],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[d,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,d],[/\(bb(10);/i],[d,[l,R]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[l,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[l,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[l,S+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[l,"Chromium OS"],d],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,d],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[l,d]]},H=function(e,t){if(typeof e===s&&(t=e,e=n),!(this instanceof H))return new H(e,t).getResult();var r=e||(typeof i!==o&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),a=t?function(e,t){var r={};for(var a in e)t[a]&&t[a].length%2==0?r[a]=t[a].concat(e[a]):r[a]=e[a];return r}(Y,t):Y;return this.getBrowser=function(){var e,t={};return t[l]=n,t[d]=n,Z.call(t,r,a.browser),t.major=typeof(e=t.version)===c?e.replace(/[^\d\.]/g,"").split(".")[0]:n,t},this.getCPU=function(){var e={};return e[p]=n,Z.call(e,r,a.cpu),e},this.getDevice=function(){var e={};return e[u]=n,e[h]=n,e[f]=n,Z.call(e,r,a.device),e},this.getEngine=function(){var e={};return e[l]=n,e[d]=n,Z.call(e,r,a.engine),e},this.getOS=function(){var e={};return e[l]=n,e[d]=n,Z.call(e,r,a.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===c&&e.length>350?W(e,350):e,this},this.setUA(r),this};H.VERSION="1.0.33",H.BROWSER=j([l,d,"major"]),H.CPU=j([p]),H.DEVICE=j([h,u,f,m,b,w,g,v,E]),H.ENGINE=H.OS=j([l,d]),typeof t!==o?(e.exports&&(t=e.exports=H),t.UAParser=H):r.amdO?(a=function(){return H}.call(t,r,t,e))===n||(e.exports=a):typeof i!==o&&(i.UAParser=H);var q=typeof i!==o&&(i.jQuery||i.Zepto);if(q&&!q.ua){var $=new H;q.ua=$.getResult(),q.ua.get=function(){return $.getUA()},q.ua.set=function(e){$.setUA(e);var t=$.getResult();for(var r in t)q.ua[r]=t[r]}}}("object"==typeof window?window:this)},751:(e,t,r)=>{"use strict";e.exports=r.p+"501114eb92cddf5f56fe.wasm"}},t={};function r(a){var i=t[a];if(void 0!==i)return i.exports;var n=t[a]={exports:{}};return e[a].call(n.exports,n,n.exports,r),n.exports}r.m=e,r.amdO={},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var a=t.getElementsByTagName("script");if(a.length)for(var i=a.length-1;i>-1&&!e;)e=a[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.b=self.location+"",(()=>{"use strict";var e;const t=(e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t={}){var r,a,i=t;i.ready=new Promise(((e,t)=>{r=e,a=t}));var n,_=Object.assign({},i),o="./this.program",s=(e,t)=>{throw t},c="";c=self.location.href,e&&(c=e),c=c.startsWith("blob:")?"":c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1),n=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)};var h,l=i.print||console.log.bind(console),f=i.printErr||console.error.bind(console);Object.assign(i,_),_=null,i.thisProgram&&(o=i.thisProgram),i.quit&&(s=i.quit),i.wasmBinary&&(h=i.wasmBinary),"object"!=typeof WebAssembly&&C("no native wasm support detected");var u,d,p,m,b,g,w,v,E,y,A=!1;function k(){var e=u.buffer;i.HEAP8=p=new Int8Array(e),i.HEAP16=b=new Int16Array(e),i.HEAPU8=m=new Uint8Array(e),i.HEAPU16=g=new Uint16Array(e),i.HEAP32=w=new Int32Array(e),i.HEAPU32=v=new Uint32Array(e),i.HEAPF32=E=new Float32Array(e),i.HEAPF64=y=new Float64Array(e)}var R=[],N=[],S=[];function T(){var e=i.preRun.shift();R.unshift(e)}var x,I,L,z=0,P=null,M=null;function F(){z++,i.monitorRunDependencies?.(z)}function O(){if(z--,i.monitorRunDependencies?.(z),0==z&&(null!==P&&(clearInterval(P),P=null),M)){var e=M;M=null,e()}}function C(e){throw i.onAbort?.(e),f(e="Aborted("+e+")"),A=!0,d=1,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),a(e),e}if(!(x="zappar-cv.wasm").startsWith("data:application/octet-stream;base64,")){var V=x;x=i.locateFile?i.locateFile(V,c):c+V}function B(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var U=e=>{for(;0<e.length;)e.shift()(i)},j=i.noExitRuntime||!0,D=[],K=0,W=0;class Z{constructor(e){this.lh=e,this.$g=e-24}}var X=e=>{var t=W;if(!t)return fr(0),0;var r=new Z(t);v[r.$g+16>>2]=t;var a=v[r.$g+4>>2];if(!a)return fr(0),t;for(var i in e){var n=e[i];if(0===n||n===a)break;if(gr(n,a,r.$g+16))return fr(n),t}return fr(a),t},G=()=>{var e=D.pop();e||C("no exception to throw");var t=e.lh;throw 0==p[e.$g+13>>0]&&(D.push(e),p[e.$g+13>>0]=1,p[e.$g+12>>0]=0,K++),W=t},Y=(e,t)=>{for(var r=0,a=e.length-1;0<=a;a--){var i=e[a];"."===i?e.splice(a,1):".."===i?(e.splice(a,1),r++):r&&(e.splice(a,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},H=e=>{var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=Y(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},q=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&=t.substr(0,t.length-1),e+t):"."},$=e=>{if("/"===e)return"/";var t=(e=(e=H(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},J=e=>(J=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);C("initRandomDevice")})())(e);function Q(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){if("string"!=typeof(t=0<=r?arguments[r]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=Y(e.split("/").filter((e=>!!e)),!t).join("/"))||"."}var ee="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,te=(e,t,r)=>{var a=t+r;for(r=t;e[r]&&!(r>=a);)++r;if(16<r-t&&e.buffer&&ee)return ee.decode(e.subarray(t,r));for(a="";t<r;){var i=e[t++];if(128&i){var n=63&e[t++];if(192==(224&i))a+=String.fromCharCode((31&i)<<6|n);else{var _=63&e[t++];65536>(i=224==(240&i)?(15&i)<<12|n<<6|_:(7&i)<<18|n<<12|_<<6|63&e[t++])?a+=String.fromCharCode(i):(i-=65536,a+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else a+=String.fromCharCode(i)}return a},re=[],ae=e=>{for(var t=0,r=0;r<e.length;++r){var a=e.charCodeAt(r);127>=a?t++:2047>=a?t+=2:55296<=a&&57343>=a?(t+=4,++r):t+=3}return t},ie=(e,t,r,a)=>{if(!(0<a))return 0;var i=r;a=r+a-1;for(var n=0;n<e.length;++n){var _=e.charCodeAt(n);if(55296<=_&&57343>=_&&(_=65536+((1023&_)<<10)|1023&e.charCodeAt(++n)),127>=_){if(r>=a)break;t[r++]=_}else{if(2047>=_){if(r+1>=a)break;t[r++]=192|_>>6}else{if(65535>=_){if(r+2>=a)break;t[r++]=224|_>>12}else{if(r+3>=a)break;t[r++]=240|_>>18,t[r++]=128|_>>12&63}t[r++]=128|_>>6&63}t[r++]=128|63&_}}return t[r]=0,r-i};function ne(e,t){var r=Array(ae(e)+1);return e=ie(e,r,0,r.length),t&&(r.length=e),r}var _e=[];function oe(e,t){_e[e]={input:[],ah:[],jh:t},Ve(e,se)}var se={open(e){var t=_e[e.node.uh];if(!t)throw new Ee(43);e.Yg=t,e.seekable=!1},close(e){e.Yg.jh.yh(e.Yg)},yh(e){e.Yg.jh.yh(e.Yg)},read(e,t,r,a){if(!e.Yg||!e.Yg.jh.Nh)throw new Ee(60);for(var i=0,n=0;n<a;n++){try{var _=e.Yg.jh.Nh(e.Yg)}catch(e){throw new Ee(29)}if(void 0===_&&0===i)throw new Ee(6);if(null==_)break;i++,t[r+n]=_}return i&&(e.node.timestamp=Date.now()),i},write(e,t,r,a){if(!e.Yg||!e.Yg.jh.Ih)throw new Ee(60);try{for(var i=0;i<a;i++)e.Yg.jh.Ih(e.Yg,t[r+i])}catch(e){throw new Ee(29)}return a&&(e.node.timestamp=Date.now()),i}},ce={Nh(){e:{if(!re.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e){e=null;break e}re=ne(e,!0)}e=re.shift()}return e},Ih(e,t){null===t||10===t?(l(te(e.ah,0)),e.ah=[]):0!=t&&e.ah.push(t)},yh(e){e.ah&&0<e.ah.length&&(l(te(e.ah,0)),e.ah=[])},ci:()=>({ui:25856,wi:5,ti:191,vi:35387,si:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),di:()=>0,ei:()=>[24,80]},he={Ih(e,t){null===t||10===t?(f(te(e.ah,0)),e.ah=[]):0!=t&&e.ah.push(t)},yh(e){e.ah&&0<e.ah.length&&(f(te(e.ah,0)),e.ah=[])}};function le(e,t){var r=e.Wg?e.Wg.length:0;r>=t||(t=Math.max(t,r*(1048576>r?2:1.125)>>>0),0!=r&&(t=Math.max(t,256)),r=e.Wg,e.Wg=new Uint8Array(t),0<e.Zg&&e.Wg.set(r.subarray(0,e.Zg),0))}var fe={fh:null,ih:()=>fe.createNode(null,"/",16895,0),createNode(e,t,r,a){if(24576==(61440&r)||4096==(61440&r))throw new Ee(63);return fe.fh||(fe.fh={dir:{node:{eh:fe.Vg.eh,gh:fe.Vg.gh,th:fe.Vg.th,zh:fe.Vg.zh,Sh:fe.Vg.Sh,Fh:fe.Vg.Fh,Bh:fe.Vg.Bh,Ah:fe.Vg.Ah,Ch:fe.Vg.Ch},stream:{nh:fe.Xg.nh}},file:{node:{eh:fe.Vg.eh,gh:fe.Vg.gh},stream:{nh:fe.Xg.nh,read:fe.Xg.read,write:fe.Xg.write,wh:fe.Xg.wh,Ph:fe.Xg.Ph,Rh:fe.Xg.Rh}},link:{node:{eh:fe.Vg.eh,gh:fe.Vg.gh,vh:fe.Vg.vh},stream:{}},Lh:{node:{eh:fe.Vg.eh,gh:fe.Vg.gh},stream:Ce}}),xe((r=Te(e,t,r,a)).mode)?(r.Vg=fe.fh.dir.node,r.Xg=fe.fh.dir.stream,r.Wg={}):32768==(61440&r.mode)?(r.Vg=fe.fh.file.node,r.Xg=fe.fh.file.stream,r.Zg=0,r.Wg=null):40960==(61440&r.mode)?(r.Vg=fe.fh.link.node,r.Xg=fe.fh.link.stream):8192==(61440&r.mode)&&(r.Vg=fe.fh.Lh.node,r.Xg=fe.fh.Lh.stream),r.timestamp=Date.now(),e&&(e.Wg[t]=r,e.timestamp=r.timestamp),r},Bi:e=>e.Wg?e.Wg.subarray?e.Wg.subarray(0,e.Zg):new Uint8Array(e.Wg):new Uint8Array(0),Vg:{eh(e){var t={};return t.Xh=8192==(61440&e.mode)?e.id:1,t.Oh=e.id,t.mode=e.mode,t.ii=1,t.uid=0,t.Zh=0,t.uh=e.uh,xe(e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.Zg:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.Th=new Date(e.timestamp),t.hi=new Date(e.timestamp),t.Wh=new Date(e.timestamp),t.Uh=4096,t.Vh=Math.ceil(t.size/t.Uh),t},gh(e,t){if(void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&(t=t.size,e.Zg!=t))if(0==t)e.Wg=null,e.Zg=0;else{var r=e.Wg;e.Wg=new Uint8Array(t),r&&e.Wg.set(r.subarray(0,Math.min(t,e.Zg))),e.Zg=t}},th(){throw ye[44]},zh:(e,t,r,a)=>fe.createNode(e,t,r,a),Sh(e,t,r){if(xe(e.mode)){try{var a=Se(t,r)}catch(e){}if(a)for(var i in a.Wg)throw new Ee(55)}delete e.parent.Wg[e.name],e.parent.timestamp=Date.now(),e.name=r,t.Wg[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},Fh(e,t){delete e.Wg[t],e.timestamp=Date.now()},Bh(e,t){var r,a=Se(e,t);for(r in a.Wg)throw new Ee(55);delete e.Wg[t],e.timestamp=Date.now()},Ah(e){var t,r=[".",".."];for(t of Object.keys(e.Wg))r.push(t);return r},Ch:(e,t,r)=>((e=fe.createNode(e,t,41471,0)).link=r,e),vh(e){if(40960!=(61440&e.mode))throw new Ee(28);return e.link}},Xg:{read(e,t,r,a,i){var n=e.node.Wg;if(i>=e.node.Zg)return 0;if(8<(e=Math.min(e.node.Zg-i,a))&&n.subarray)t.set(n.subarray(i,i+e),r);else for(a=0;a<e;a++)t[r+a]=n[i+a];return e},write(e,t,r,a,i,n){if(t.buffer===p.buffer&&(n=!1),!a)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.Wg||e.Wg.subarray)){if(n)return e.Wg=t.subarray(r,r+a),e.Zg=a;if(0===e.Zg&&0===i)return e.Wg=t.slice(r,r+a),e.Zg=a;if(i+a<=e.Zg)return e.Wg.set(t.subarray(r,r+a),i),a}if(le(e,i+a),e.Wg.subarray&&t.subarray)e.Wg.set(t.subarray(r,r+a),i);else for(n=0;n<a;n++)e.Wg[i+n]=t[r+n];return e.Zg=Math.max(e.Zg,i+a),a},nh(e,t,r){if(1===r?t+=e.position:2===r&&32768==(61440&e.node.mode)&&(t+=e.node.Zg),0>t)throw new Ee(28);return t},wh(e,t,r){le(e.node,t+r),e.node.Zg=Math.max(e.node.Zg,t+r)},Ph(e,t,r,a,i){if(32768!=(61440&e.node.mode))throw new Ee(43);if(e=e.node.Wg,2&i||e.buffer!==p.buffer){if((0<r||r+t<e.length)&&(e=e.subarray?e.subarray(r,r+t):Array.prototype.slice.call(e,r,r+t)),r=!0,C(),!(t=void 0))throw new Ee(48);p.set(e,t)}else r=!1,t=e.byteOffset;return{$g:t,qh:r}},Rh:(e,t,r,a)=>(fe.Xg.write(e,t,0,a,r,!1),0)}},ue=i.preloadPlugins||[],de=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},pe=null,me={},be=[],ge=1,we=null,ve=!0,Ee=class{constructor(e){this.name="ErrnoError",this.bh=e}},ye={};function Ae(e,t={}){if(!(e=Q(e)))return{path:"",node:null};if(8<(t=Object.assign({Mh:!0,Jh:0},t)).Jh)throw new Ee(32);e=e.split("/").filter((e=>!!e));for(var r=pe,a="/",i=0;i<e.length;i++){var n=i===e.length-1;if(n&&t.parent)break;if(r=Se(r,e[i]),a=H(a+"/"+e[i]),r.rh&&(!n||n&&t.Mh)&&(r=r.rh.root),!n||t.xh)for(n=0;40960==(61440&r.mode);)if(r=We(a),r=Ae(a=Q(q(a),r),{Jh:t.Jh+1}).node,40<n++)throw new Ee(32)}return{path:a,node:r}}function ke(e){for(var t;;){if(e===e.parent)return e=e.ih.Qh,t?"/"!==e[e.length-1]?`${e}/${t}`:e+t:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function Re(e,t){for(var r=0,a=0;a<t.length;a++)r=(r<<5)-r+t.charCodeAt(a)|0;return(e+r>>>0)%we.length}function Ne(e){var t=Re(e.parent.id,e.name);if(we[t]===e)we[t]=e.sh;else for(t=we[t];t;){if(t.sh===e){t.sh=e.sh;break}t=t.sh}}function Se(e,t){var r=xe(e.mode)?(r=Le(e,"x"))?r:e.Vg.th?0:2:54;if(r)throw new Ee(r);for(r=we[Re(e.id,t)];r;r=r.sh){var a=r.name;if(r.parent.id===e.id&&a===t)return r}return e.Vg.th(e,t)}function Te(e,t,r,a){return t=Re((e=new ir(e,t,r,a)).parent.id,e.name),e.sh=we[t],we[t]=e}function xe(e){return 16384==(61440&e)}function Ie(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function Le(e,t){return ve?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2}function ze(e,t){try{return Se(e,t),20}catch(e){}return Le(e,"wx")}function Pe(e,t,r){try{var a=Se(e,t)}catch(e){return e.bh}if(e=Le(e,"wx"))return e;if(r){if(!xe(a.mode))return 54;if(a===a.parent||"/"===ke(a))return 10}else if(xe(a.mode))return 31;return 0}function Me(e){if(!(e=be[e]))throw new Ee(8);return e}function Fe(e,t=-1){return He||((He=function(){this.dh={}}).prototype={},Object.defineProperties(He.prototype,{object:{get(){return this.node},set(e){this.node=e}},flags:{get(){return this.dh.flags},set(e){this.dh.flags=e}},position:{get(){return this.dh.position},set(e){this.dh.position=e}}})),e=Object.assign(new He,e),-1==t&&(t=function(){for(var e=0;4096>=e;e++)if(!be[e])return e;throw new Ee(33)}()),e.kh=t,be[t]=e}var Oe,Ce={open(e){e.Xg=me[e.node.uh].Xg,e.Xg.open?.(e)},nh(){throw new Ee(70)}};function Ve(e,t){me[e]={Xg:t}}function Be(e,t){var r="/"===t;if(r&&pe)throw new Ee(10);if(!r&&t){var a=Ae(t,{Mh:!1});if(t=a.path,(a=a.node).rh)throw new Ee(10);if(!xe(a.mode))throw new Ee(54)}t={type:e,Fi:{},Qh:t,gi:[]},(e=e.ih(t)).ih=t,t.root=e,r?pe=e:a&&(a.rh=t,a.ih&&a.ih.gi.push(t))}function Ue(e,t,r){var a=Ae(e,{parent:!0}).node;if(!(e=$(e))||"."===e||".."===e)throw new Ee(28);var i=ze(a,e);if(i)throw new Ee(i);if(!a.Vg.zh)throw new Ee(63);return a.Vg.zh(a,e,t,r)}function je(e){return Ue(e,16895,0)}function De(e,t,r){void 0===r&&(r=t,t=438),Ue(e,8192|t,r)}function Ke(e,t){if(!Q(e))throw new Ee(44);var r=Ae(t,{parent:!0}).node;if(!r)throw new Ee(44);var a=ze(r,t=$(t));if(a)throw new Ee(a);if(!r.Vg.Ch)throw new Ee(63);r.Vg.Ch(r,t,e)}function We(e){if(!(e=Ae(e).node))throw new Ee(44);if(!e.Vg.vh)throw new Ee(28);return Q(ke(e.parent),e.Vg.vh(e))}function Ze(e,t,r){if(""===e)throw new Ee(44);if("string"==typeof t){var a={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(void 0===a)throw Error(`Unknown file open mode: ${t}`);t=a}if(r=64&t?4095&(void 0===r?438:r)|32768:0,"object"==typeof e)var n=e;else{e=H(e);try{n=Ae(e,{xh:!(131072&t)}).node}catch(e){}}if(a=!1,64&t)if(n){if(128&t)throw new Ee(20)}else n=Ue(e,r,0),a=!0;if(!n)throw new Ee(44);if(8192==(61440&n.mode)&&(t&=-513),65536&t&&!xe(n.mode))throw new Ee(54);if(!a&&(r=n?40960==(61440&n.mode)?32:xe(n.mode)&&("r"!==Ie(t)||512&t)?31:Le(n,Ie(t)):44))throw new Ee(r);if(512&t&&!a){if(!(r="string"==typeof(r=n)?Ae(r,{xh:!0}).node:r).Vg.gh)throw new Ee(63);if(xe(r.mode))throw new Ee(31);if(32768!=(61440&r.mode))throw new Ee(28);if(a=Le(r,"w"))throw new Ee(a);r.Vg.gh(r,{size:0,timestamp:Date.now()})}return t&=-131713,(n=Fe({node:n,path:ke(n),flags:t,seekable:!0,position:0,Xg:n.Xg,ni:[],error:!1})).Xg.open&&n.Xg.open(n),!i.logReadFiles||1&t||(qe||={},e in qe||(qe[e]=1)),n}function Xe(e,t,r){if(null===e.kh)throw new Ee(8);if(!e.seekable||!e.Xg.nh)throw new Ee(70);if(0!=r&&1!=r&&2!=r)throw new Ee(28);return e.position=e.Xg.nh(e,t,r),e.ni=[],e.position}function Ge(e,t,r){e=H("/dev/"+e);var a=de(!!t,!!r);Ye||=64;var i=Ye++<<8|0;Ve(i,{open(e){e.seekable=!1},close(){r?.buffer?.length&&r(10)},read(e,r,a,i){for(var n=0,_=0;_<i;_++){try{var o=t()}catch(e){throw new Ee(29)}if(void 0===o&&0===n)throw new Ee(6);if(null==o)break;n++,r[a+_]=o}return n&&(e.node.timestamp=Date.now()),n},write(e,t,a,i){for(var n=0;n<i;n++)try{r(t[a+n])}catch(e){throw new Ee(29)}return i&&(e.node.timestamp=Date.now()),n}}),De(e,a,i)}var Ye,He,qe,$e={},Je=(e,t)=>e?te(m,e,t):"";function Qe(e,t){if("/"===t.charAt(0))return t;if(e=-100===e?"/":Me(e).path,0==t.length)throw new Ee(44);return H(e+"/"+t)}var et=void 0;function tt(){var e=w[+et>>2];return et+=4,e}var rt,at=e=>0==e%4&&(0!=e%100||0==e%400),it=[0,31,60,91,121,152,182,213,244,274,305,335],nt=[0,31,59,90,120,151,181,212,243,273,304,334],_t=e=>{var t=ae(e)+1,r=cr(t);return r&&ie(e,m,r,t),r},ot=e=>{d=e,j||(i.onExit?.(e),A=!0),s(e,new B(e))},st=e=>{if(!A)try{if(e(),!j)try{d=e=d,ot(e)}catch(e){e instanceof B||"unwind"==e||s(1,e)}}catch(e){e instanceof B||"unwind"==e||s(1,e)}},ct=(e,t)=>{setTimeout((()=>{st(e)}),t)};rt=()=>performance.now();var ht,lt,ft,ut=!1,dt=null,pt=0,mt=null,bt=0,gt=0,wt=0,vt=[],Et={},yt=!1,At=!1,kt=[],Rt=!1,Nt=void 0,St=void 0;function Tt(){return!!yt&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||(()=>{})).apply(document,[]),!0)}var xt=0;function It(e){if("function"==typeof requestAnimationFrame)requestAnimationFrame(e);else{var t=Date.now();if(0===xt)xt=t+1e3/60;else for(;t+2>=xt;)xt+=1e3/60;setTimeout(e,Math.max(xt-t,0))}}function Lt(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]}var zt=[];function Pt(){var e=i.canvas;zt.forEach((t=>t(e.width,e.height)))}function Mt(e,t,r){t&&r?(e.oi=t,e.$h=r):(t=e.oi,r=e.$h);var a=t,n=r;if(i.forcedAspectRatio&&0<i.forcedAspectRatio&&(a/n<i.forcedAspectRatio?a=Math.round(n*i.forcedAspectRatio):n=Math.round(a/i.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&"undefined"!=typeof screen){var _=Math.min(screen.width/a,screen.height/n);a=Math.round(a*_),n=Math.round(n*_)}St?(e.width!=a&&(e.width=a),e.height!=n&&(e.height=n),void 0!==e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=t&&(e.width=t),e.height!=r&&(e.height=r),void 0!==e.style&&(a!=t||n!=r?(e.style.setProperty("width",a+"px","important"),e.style.setProperty("height",n+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))}var Ft,Ot,Ct,Vt,Bt,Ut=[],jt=e=>{var t=Ut[e];return t||(e>=Ut.length&&(Ut.length=e+1),Ut[e]=t=Ct.get(e)),t};function Dt(e,t,r,a,i){function n(){var t=0,r=0;y.response&&w&&0===v[e+12>>2]&&(r=y.response.byteLength),0<r&&(t=cr(r),m.set(new Uint8Array(y.response),t)),v[e+12>>2]=t,Kt(e+16,r),Kt(e+24,0),(t=y.response?y.response.byteLength:0)&&Kt(e+32,t),g[e+40>>1]=y.readyState,g[e+42>>1]=y.status,y.statusText&&ie(y.statusText,m,e+44,64)}var _=v[e+8>>2];if(_){var o=_?te(m,_):"",s=e+112,c=Je(s+0);c||="GET";var h=v[s+56>>2],l=v[s+68>>2],f=v[s+72>>2];_=v[s+76>>2];var u=v[s+80>>2],d=v[s+84>>2],p=v[s+88>>2],b=v[s+52>>2],w=!!(1&b),E=!!(2&b);b=!!(64&b),l=l?l?te(m,l):"":void 0,f=f?f?te(m,f):"":void 0;var y=new XMLHttpRequest;if(y.withCredentials=!!m[s+60>>0],y.open(c,o,!b,l,f),b||(y.timeout=h),y.dh=o,y.responseType="arraybuffer",u&&(o=u?te(m,u):"",y.overrideMimeType(o)),_)for(;(s=v[_>>2])&&(o=v[_+4>>2]);)_+=8,s=s?te(m,s):"",o=o?te(m,o):"",y.setRequestHeader(s,o);var A=Vt.wh(y);v[e>>2]=A,_=d&&p?m.slice(d,d+p):null,y.onload=a=>{Vt.has(A)&&(n(),200<=y.status&&300>y.status?t?.(e,y,a):r?.(e,y,a))},y.onerror=t=>{Vt.has(A)&&(n(),r?.(e,y,t))},y.ontimeout=t=>{Vt.has(A)&&r?.(e,y,t)},y.onprogress=t=>{if(Vt.has(A)){var r=w&&E&&y.response?y.response.byteLength:0,i=0;0<r&&w&&E&&(i=cr(r),m.set(new Uint8Array(y.response),i)),v[e+12>>2]=i,Kt(e+16,r),Kt(e+24,t.loaded-r),Kt(e+32,t.total),g[e+40>>1]=y.readyState,3<=y.readyState&&0===y.status&&0<t.loaded&&(y.status=200),g[e+42>>1]=y.status,y.statusText&&ie(y.statusText,m,e+44,64),a?.(e,y,t),i&&sr(i)}},y.onreadystatechange=t=>{Vt.has(A)&&(g[e+40>>1]=y.readyState,2<=y.readyState&&(g[e+42>>1]=y.status),i?.(e,y,t))};try{y.send(_)}catch(t){r?.(e,y,t)}}else r(e,0,"no url specified!")}var Kt=(e,t)=>{v[e>>2]=t,v[e+4>>2]=(t-v[e>>2])/4294967296};function Wt(e,t,r,a){var i=Bt;if(i){var n=v[e+112+64>>2];n||=v[e+8>>2];var _=n?te(m,n):"";try{var o=i.transaction(["FILES"],"readwrite").objectStore("FILES").put(t,_);o.onsuccess=()=>{g[e+40>>1]=4,g[e+42>>1]=200,ie("OK",m,e+44,64),r(e,0,_)},o.onerror=t=>{g[e+40>>1]=4,g[e+42>>1]=413,ie("Payload Too Large",m,e+44,64),a(e,0,t)}}catch(t){a(e,0,t)}}else a(e,0,"IndexedDB not available!")}var Zt,Xt,Gt,Yt={},Ht=()=>{if(!Zt){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:o||"./this.program"};for(e in Yt)void 0===Yt[e]?delete t[e]:t[e]=Yt[e];var r=[];for(e in t)r.push(`${e}=${t[e]}`);Zt=r}return Zt},qt=1,$t=[],Jt=[],Qt=e=>{for(var t=qt++,r=e.length;r<t;r++)e[r]=null;return t},er=e=>{if(e||=Gt,!e.ai){e.ai=!0;var t=e.Gh;(e=>{var t=e.getExtension("ANGLE_instanced_arrays");t&&(e.vertexAttribDivisor=(e,r)=>t.vertexAttribDivisorANGLE(e,r),e.drawArraysInstanced=(e,r,a,i)=>t.drawArraysInstancedANGLE(e,r,a,i),e.drawElementsInstanced=(e,r,a,i,n)=>t.drawElementsInstancedANGLE(e,r,a,i,n))})(t),(e=>{var t=e.getExtension("OES_vertex_array_object");t&&(e.createVertexArray=()=>t.createVertexArrayOES(),e.deleteVertexArray=e=>t.deleteVertexArrayOES(e),e.bindVertexArray=e=>t.bindVertexArrayOES(e),e.isVertexArray=e=>t.isVertexArrayOES(e))})(t),(e=>{var t=e.getExtension("WEBGL_draw_buffers");t&&(e.drawBuffers=(e,r)=>t.drawBuffersWEBGL(e,r))})(t),t.yi=t.getExtension("EXT_disjoint_timer_query"),t.Ci=t.getExtension("WEBGL_multi_draw"),function(e){var t="ANGLE_instanced_arrays EXT_blend_minmax EXT_disjoint_timer_query EXT_frag_depth EXT_shader_texture_lod EXT_sRGB OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_depth_texture WEBGL_draw_buffers EXT_color_buffer_half_float EXT_float_blend EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw".split(" ");return(e.getSupportedExtensions()||[]).filter((e=>t.includes(e)))}(t).forEach((e=>{e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}},tr={},rr=[31,29,31,30,31,30,31,31,30,31,30,31],ar=[31,28,31,30,31,30,31,31,30,31,30,31];function ir(e,t,r,a){e||=this,this.parent=e,this.ih=e.ih,this.rh=null,this.id=ge++,this.name=t,this.mode=r,this.Vg={},this.Xg={},this.uh=a}Object.defineProperties(ir.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}}}),[44].forEach((e=>{ye[e]=new Ee(e),ye[e].stack="<generic error, no stack>"})),we=Array(4096),Be(fe,"/"),je("/tmp"),je("/home"),je("/home/web_user"),function(){je("/dev"),Ve(259,{read:()=>0,write:(e,t,r,a)=>a}),De("/dev/null",259),oe(1280,ce),oe(1536,he),De("/dev/tty",1280),De("/dev/tty1",1536);var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=J(e).byteLength),e[--t]);Ge("random",r),Ge("urandom",r),je("/dev/shm"),je("/dev/shm/tmp")}(),function(){je("/proc");var e=je("/proc/self");je("/proc/self/fd"),Be({ih(){var t=Te(e,"fd",16895,73);return t.Vg={th(e,t){var r=Me(+t);return(e={parent:null,ih:{Qh:"fake"},Vg:{vh:()=>r.path}}).parent=e}},t}},"/proc/self/fd")}(),i.requestFullscreen=function(e,t){function r(){yt=!1;var e=a.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(a.exitFullscreen=Tt,Nt&&a.requestPointerLock(),yt=!0,St?("undefined"!=typeof SDL&&(w[SDL.screen>>2]=8388608|v[SDL.screen>>2]),Mt(i.canvas),Pt()):Mt(a)):(e.parentNode.insertBefore(a,e),e.parentNode.removeChild(e),St?("undefined"!=typeof SDL&&(w[SDL.screen>>2]=-8388609&v[SDL.screen>>2]),Mt(i.canvas),Pt()):Mt(a)),i.onFullScreen?.(yt),i.onFullscreen?.(yt)}void 0===(Nt=e)&&(Nt=!0),void 0===(St=t)&&(St=!1);var a=i.canvas;Rt||(Rt=!0,document.addEventListener("fullscreenchange",r,!1),document.addEventListener("mozfullscreenchange",r,!1),document.addEventListener("webkitfullscreenchange",r,!1),document.addEventListener("MSFullscreenChange",r,!1));var n=document.createElement("div");a.parentNode.insertBefore(n,a),n.appendChild(a),n.requestFullscreen=n.requestFullscreen||n.mozRequestFullScreen||n.msRequestFullscreen||(n.webkitRequestFullscreen?()=>n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):null)||(n.webkitRequestFullScreen?()=>n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):null),n.requestFullscreen()},i.requestAnimationFrame=It,i.setCanvasSize=function(e,t,r){Mt(i.canvas,e,t),r||Pt()},i.pauseMainLoop=function(){dt=null,pt++},i.resumeMainLoop=function(){pt++;var e=bt,t=gt,r=mt;mt=null,(e=>{!mt||C("emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),mt=e;var t=pt;ut=!1,lt=function(){if(!A)if(0<vt.length){var r=vt.shift();if(r.Ai(r.ri),ft){var a=ft,n=0==a%1?a-1:Math.floor(a);ft=r.xi?n:(8*a+(n+.5))/9}i.setStatus&&(r=i.statusMessage||"Please wait...",n=Et.zi,(a=ft)?a<n?i.setStatus(r+" ("+(n-a)+"/"+n+")"):i.setStatus(r):i.setStatus("")),t<pt||setTimeout(lt,0)}else t<pt||(wt=wt+1|0,1==bt&&1<gt&&0!=wt%gt?dt():(0==bt&&(ht=rt()),A||i.preMainLoop&&!1===i.preMainLoop()||(st(e),i.postMainLoop?.()),t<pt||("object"==typeof SDL&&SDL.audio?.Gi?.(),dt())))}})(r),((e,t)=>{if(bt=e,gt=t,mt)if(ut||=!0,0==e)dt=function(){var e=0|Math.max(0,ht+t-rt());setTimeout(lt,e)};else if(1==e)dt=function(){It(lt)};else if(2==e){if(void 0===Ft)if("undefined"==typeof setImmediate){var r=[];addEventListener("message",(e=>{"setimmediate"!==e.data&&"setimmediate"!==e.data.target||(e.stopPropagation(),r.shift()())}),!0),Ft=function(e){r.push(e),void 0===i.setImmediates&&(i.setImmediates=[]),i.setImmediates.push(e),postMessage({target:"setimmediate"})}}else Ft=setImmediate;dt=function(){Ft(lt)}}})(e,t),dt()},i.getUserMedia=function(e){let t;(t=window).getUserMedia||(t.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},i.createContext=function(e,t,r,a){if(t&&i.Hh&&e==i.canvas)return i.Hh;var n;if(t){var _={antialias:!1,alpha:!1,fi:1};if(a)for(var o in a)_[o]=a[o];if(void 0!==tr&&(n=((e,t)=>{e.dh||(e.dh=e.getContext,e.getContext=function(t,r){return"webgl"==t==(r=e.dh(t,r))instanceof WebGLRenderingContext?r:null});var r=e.getContext("webgl",t);return r?((e,t)=>{var r=Qt(Jt),a={handle:r,attributes:t,version:t.fi,Gh:e};return e.canvas&&(e.canvas.pi=a),Jt[r]=a,(void 0===t.Yh||t.Yh)&&er(a),r})(r,t):0})(e,_)))var s=Jt[n].Gh}else s=e.getContext("2d");return s?(r&&(t||void 0===nr||C("cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),i.Hh=s,t&&(Gt=Jt[n],i.Hh=nr=Gt?.Gh),i.Ii=t,kt.forEach((e=>e())),function(){function e(){At=document.pointerLockElement===i.canvas||document.mozPointerLockElement===i.canvas||document.webkitPointerLockElement===i.canvas||document.msPointerLockElement===i.canvas}if(!Ot){Ot=!0,ue.push({canHandle:function(e){return!i.Ei&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,r,a){var i=new Blob([e],{type:Lt(t)});i.size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:Lt(t)}));var n=URL.createObjectURL(i),_=new Image;_.onload=()=>{_.complete||C(`Image ${t} could not be decoded`);var a=document.createElement("canvas");a.width=_.width,a.height=_.height,a.getContext("2d").drawImage(_,0,0),URL.revokeObjectURL(n),r?.(e)},_.onerror=()=>{f(`Image ${n} could not be decoded`),a?.()},_.src=n}}),ue.push({canHandle:function(e){return!i.Di&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,r){function a(){i||(i=!0,r?.(e))}var i=!1,n=URL.createObjectURL(new Blob([e],{type:Lt(t)})),_=new Audio;_.addEventListener("canplaythrough",(()=>a()),!1),_.onerror=function(){if(!i){f(`warning: browser could not fully decode audio ${t}, trying slower base64 approach`);for(var r="",n=0,o=0,s=0;s<e.length;s++)for(n=n<<8|e[s],o+=8;6<=o;){var c=n>>o-6&63;o-=6,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[c]}2==o?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&n)<<4],r+="=="):4==o&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&n)<<2],r+="="),_.src="data:audio/x-"+t.substr(-3)+";base64,"+r,a()}},_.src=n,ct((()=>{a()}),1e4)}});var t=i.canvas;t&&(t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock||t.msRequestPointerLock||(()=>{}),t.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||(()=>{}),t.exitPointerLock=t.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",e,!1),document.addEventListener("mozpointerlockchange",e,!1),document.addEventListener("webkitpointerlockchange",e,!1),document.addEventListener("mspointerlockchange",e,!1),i.elementPointerLock&&t.addEventListener("click",(e=>{!At&&i.canvas.requestPointerLock&&(i.canvas.requestPointerLock(),e.preventDefault())}),!1))}}()),s):null},Vt=new class{constructor(){this.qh=[void 0],this.dh=[]}get(e){return this.qh[e]}has(e){return void 0!==this.qh[e]}wh(e){var t=this.dh.pop()||this.qh.length;return this.qh[t]=e,t}},F(),function(e,t){try{var r=indexedDB.open("emscripten_filesystem",1)}catch(e){return void t()}r.onupgradeneeded=e=>{(e=e.target.result).objectStoreNames.contains("FILES")&&e.deleteObjectStore("FILES"),e.createObjectStore("FILES")},r.onsuccess=e=>(e=>{Bt=e,O()})(e.target.result),r.onerror=t}(0,(()=>{Bt=!1,O()}));var nr,_r={q:e=>{if(e=new Z(e),0==p[e.$g+12>>0]&&(p[e.$g+12>>0]=1,K--),p[e.$g+13>>0]=0,D.push(e),br(e.lh),wr(v[e.$g+4>>2]))e=v[e.lh>>2];else{var t=v[e.$g+16>>2];e=0!==t?t:e.lh}return e},Lb:()=>{if(!D.length)return 0;var e=D[D.length-1];return br(e.lh),e.lh},y:()=>{lr(0,0);var e=D.pop();mr(e.lh),W=0},a:()=>X([]),i:e=>X([e]),G:(e,t)=>X([e,t]),Fa:G,Kb:e=>{e&&(e=new Z(e),D.push(e),p[e.$g+13>>0]=1,G())},n:(e,t,r)=>{var a=new Z(e);throw v[a.$g+16>>2]=0,v[a.$g+4>>2]=t,v[a.$g+8>>2]=r,K++,W=e},Mb:()=>K,d:e=>{throw W||=e,W},Q:function(e,t,r){et=r;try{var a=Me(e);switch(t){case 0:var i=tt();if(0>i)break;for(;be[i];)i++;return Fe(a,i).kh;case 1:case 2:case 13:case 14:return 0;case 3:return a.flags;case 4:return i=tt(),a.flags|=i,0;case 12:return i=tt(),b[i+0>>1]=2,0}return-28}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return-e.bh}},Sb:function(e,t,r){try{var a=Me(e);if(!a.mh){var i=Ae(a.path,{xh:!0}).node;if(!i.Vg.Ah)throw new Ee(54);var n=i.Vg.Ah(i);a.mh=n}e=0;for(var _=Xe(a,0,1),o=Math.floor(_/280);o<a.mh.length&&e+280<=r;){var s=a.mh[o];if("."===s)var c=a.node.id,h=4;else if(".."===s)c=Ae(a.path,{parent:!0}).node.id,h=4;else{var l=Se(a.node,s);c=l.id,h=8192==(61440&l.mode)?2:xe(l.mode)?4:40960==(61440&l.mode)?10:8}L=[c>>>0,(I=c,1<=+Math.abs(I)?0<I?+Math.floor(I/4294967296)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],w[t+e>>2]=L[0],w[t+e+4>>2]=L[1],L=[280*(o+1)>>>0,(I=280*(o+1),1<=+Math.abs(I)?0<I?+Math.floor(I/4294967296)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],w[t+e+8>>2]=L[0],w[t+e+12>>2]=L[1],b[t+e+16>>1]=280,p[t+e+18>>0]=h,ie(s,m,t+e+19,256),e+=280,o+=1}return Xe(a,280*o,0),e}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return-e.bh}},Zb:function(e,t,r){et=r;try{var a=Me(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return a.Yg?0:-59;case 21505:if(!a.Yg)return-59;if(a.Yg.jh.ci){e=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var i=tt();w[i>>2]=25856,w[i+4>>2]=5,w[i+8>>2]=191,w[i+12>>2]=35387;for(var n=0;32>n;n++)p[i+n+17>>0]=e[n]||0}return 0;case 21506:case 21507:case 21508:if(!a.Yg)return-59;if(a.Yg.jh.di)for(i=tt(),e=[],n=0;32>n;n++)e.push(p[i+n+17>>0]);return 0;case 21519:return a.Yg?(i=tt(),w[i>>2]=0):-59;case 21520:return a.Yg?-28:-59;case 21531:if(i=tt(),!a.Xg.bi)throw new Ee(59);return a.Xg.bi(a,t,i);case 21523:return a.Yg?(a.Yg.jh.ei&&(n=[24,80],i=tt(),b[i>>1]=n[0],b[i+2>>1]=n[1]),0):-59;default:return-28}}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return-e.bh}},Ja:function(e,t,r,a){et=a;try{return Ze(t=Qe(e,t=t?te(m,t):""),r,a?tt():0).kh}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return-e.bh}},Qb:function(e,t,r,a){try{if(t=Qe(e,t=t?te(m,t):""),0>=a)return-28;var i=We(t),n=Math.min(a,ae(i)),_=p[r+n];return ie(i,m,r,a+1),p[r+n]=_,n}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return-e.bh}},Vb:function(e,t){try{var r=Ae(e=e?te(m,e):"",{xh:!0}).node;if(!r)throw new Ee(44);if(!r.Vg.eh)throw new Ee(63);var a=r.Vg.eh(r);w[t>>2]=a.Xh,w[t+4>>2]=a.mode,v[t+8>>2]=a.ii,w[t+12>>2]=a.uid,w[t+16>>2]=a.Zh,w[t+20>>2]=a.uh,L=[a.size>>>0,(I=a.size,1<=+Math.abs(I)?0<I?+Math.floor(I/4294967296)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],w[t+24>>2]=L[0],w[t+28>>2]=L[1],w[t+32>>2]=4096,w[t+36>>2]=a.Vh;var i=a.Th.getTime(),n=a.hi.getTime(),_=a.Wh.getTime();return L=[Math.floor(i/1e3)>>>0,(I=Math.floor(i/1e3),1<=+Math.abs(I)?0<I?+Math.floor(I/4294967296)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],w[t+40>>2]=L[0],w[t+44>>2]=L[1],v[t+48>>2]=i%1e3*1e3,L=[Math.floor(n/1e3)>>>0,(I=Math.floor(n/1e3),1<=+Math.abs(I)?0<I?+Math.floor(I/4294967296)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],w[t+56>>2]=L[0],w[t+60>>2]=L[1],v[t+64>>2]=n%1e3*1e3,L=[Math.floor(_/1e3)>>>0,(I=Math.floor(_/1e3),1<=+Math.abs(I)?0<I?+Math.floor(I/4294967296)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],w[t+72>>2]=L[0],w[t+76>>2]=L[1],v[t+80>>2]=_%1e3*1e3,L=[a.Oh>>>0,(I=a.Oh,1<=+Math.abs(I)?0<I?+Math.floor(I/4294967296)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],w[t+88>>2]=L[0],w[t+92>>2]=L[1],0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return-e.bh}},Rb:function(e,t){try{return Ke(e=e?te(m,e):"",t=t?te(m,t):""),0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return-e.bh}},Ob:function(e,t,r){try{if(t=Qe(e,t=t?te(m,t):""),0===r){var a=t,i=Ae(a,{parent:!0}).node;if(!i)throw new Ee(44);var n=$(a),_=Se(i,n),o=Pe(i,n,!1);if(o)throw new Ee(o);if(!i.Vg.Fh)throw new Ee(63);if(_.rh)throw new Ee(10);i.Vg.Fh(i,n),Ne(_)}else if(512===r){a=Ae(i=t,{parent:!0}).node;var s=$(i),c=Se(a,s),h=Pe(a,s,!0);if(h)throw new Ee(h);if(!a.Vg.Bh)throw new Ee(63);if(c.rh)throw new Ee(10);a.Vg.Bh(a,s),Ne(c)}else C("Invalid flags passed to unlinkat");return 0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return-e.bh}},_b:function(e){if(Vt.has(e)){var t=Vt.get(e),r=Vt;r.qh[e]=void 0,r.dh.push(e),0<t.readyState&&4>t.readyState&&t.abort()}},Xb:()=>1,kb:function(e,t,r){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN)),w[r>>2]=e.getUTCSeconds(),w[r+4>>2]=e.getUTCMinutes(),w[r+8>>2]=e.getUTCHours(),w[r+12>>2]=e.getUTCDate(),w[r+16>>2]=e.getUTCMonth(),w[r+20>>2]=e.getUTCFullYear()-1900,w[r+24>>2]=e.getUTCDay(),w[r+28>>2]=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864e5|0},lb:function(e,t,r){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN)),w[r>>2]=e.getSeconds(),w[r+4>>2]=e.getMinutes(),w[r+8>>2]=e.getHours(),w[r+12>>2]=e.getDate(),w[r+16>>2]=e.getMonth(),w[r+20>>2]=e.getFullYear()-1900,w[r+24>>2]=e.getDay(),w[r+28>>2]=(at(e.getFullYear())?it:nt)[e.getMonth()]+e.getDate()-1|0,w[r+36>>2]=-60*e.getTimezoneOffset(),t=new Date(e.getFullYear(),6,1).getTimezoneOffset();var a=new Date(e.getFullYear(),0,1).getTimezoneOffset();w[r+32>>2]=0|(t!=a&&e.getTimezoneOffset()==Math.min(a,t))},Pb:(e,t,r)=>{function a(e){return(e=e.toTimeString().match(/\(([A-Za-z ]+)\)$/))?e[1]:"GMT"}var i=(new Date).getFullYear(),n=new Date(i,0,1),_=new Date(i,6,1);i=n.getTimezoneOffset();var o=_.getTimezoneOffset();v[e>>2]=60*Math.max(i,o),w[t>>2]=Number(i!=o),e=a(n),t=a(_),e=_t(e),t=_t(t),o<i?(v[r>>2]=e,v[r+4>>2]=t):(v[r>>2]=t,v[r+4>>2]=e)},F:()=>{C("")},fb:function(){self.postMessage({t:"gfx"})},hb:function(){var e=new URL(location.origin).hostname;if(0===e.length&&(e=new URL(location.href.replace("blob:","")).hostname),/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(e))0===e.indexOf("10.")&&(e="10.*"),0===e.indexOf("192.168.")&&(e="192.168.*"),0===e.indexOf("172.")&&(e="172.*"),0===e.indexOf("127.")&&(e="127.*");else{var t=new RegExp("("+String.fromCharCode(92)+".ngrok"+String.fromCharCode(92)+".io)$","i");t.test(e)&&(e="*.ngrok.io"),(t=new RegExp("("+String.fromCharCode(92)+".ngrok-free"+String.fromCharCode(92)+".app)$","i")).test(e)&&(e="*.ngrok.io"),(t=new RegExp("("+String.fromCharCode(92)+".arweb"+String.fromCharCode(92)+".app)$","i")).test(e)&&(e="*.arweb.app")}t=ae(e)+1;var r=cr(t);return ie(e,m,r,t+1),r},gb:function(){self.postMessage({t:"licerr"})},Ea:(e,t,r)=>{function a(){jt(e)(t)}0<=r?ct(a,r):function(e){It((()=>{st(e)}))}(a)},na:()=>Date.now(),Ib:()=>2147483648,Wb:rt,ac:()=>!1,Yb:(e,t,r)=>m.copyWithin(e,t,t+r),Nb:e=>{var t=m.length;if(2147483648<(e>>>=0))return!1;for(var r=1;4>=r;r*=2){var a=t*(1+.2/r);a=Math.min(a,e+100663296);var i=Math;a=Math.max(e,a);e:{i=(i.min.call(i,2147483648,a+(65536-a%65536)%65536)-u.buffer.byteLength+65535)/65536;try{u.grow(i),k();var n=1;break e}catch(e){}n=void 0}if(n)return!0}return!1},$b:function(e,t,r,a,i){function n(e){f?e():st(e)}var _=e+112,o=v[_+36>>2],s=v[_+40>>2],c=v[_+44>>2],h=v[_+48>>2],l=v[_+52>>2],f=!!(64&l),u=e=>{n((()=>{o?jt(o)(e):t?.(e)}))},d=e=>{n((()=>{c?jt(c)(e):a?.(e)}))},p=e=>{n((()=>{s?jt(s)(e):r?.(e)}))},b=e=>{n((()=>{h?jt(h)(e):i?.(e)}))},w=e=>{Dt(e,u,p,d,b)},E=(e,r)=>{Wt(e,r.response,(e=>{n((()=>{o?jt(o)(e):t?.(e)}))}),(e=>{n((()=>{o?jt(o)(e):t?.(e)}))}))},y=Je(_+0),A=!!(16&l),k=!!(4&l);if(l=!!(32&l),"EM_IDB_STORE"===y)w=v[_+84>>2],Wt(e,m.slice(w,w+v[_+88>>2]),u,p);else if("EM_IDB_DELETE"===y)!function(e,t,r){var a=Bt;if(a){var i=v[e+112+64>>2];i||=v[e+8>>2],i=i?te(m,i):"";try{var n=a.transaction(["FILES"],"readwrite").objectStore("FILES").delete(i);n.onsuccess=r=>{r=r.target.result,v[e+12>>2]=0,Kt(e+16,0),Kt(e+24,0),Kt(e+32,0),g[e+40>>1]=4,g[e+42>>1]=200,ie("OK",m,e+44,64),t(e,0,r)},n.onerror=t=>{g[e+40>>1]=4,g[e+42>>1]=404,ie("Not Found",m,e+44,64),r(e,0,t)}}catch(t){r(e,0,t)}}else r(e,0,"IndexedDB not available!")}(e,u,p);else if(A){if(l)return 0;Dt(e,k?E:u,p,d,b)}else!function(e,t,r){var a=Bt;if(a){var i=v[e+112+64>>2];i||=v[e+8>>2],i=i?te(m,i):"";try{var n=a.transaction(["FILES"],"readonly").objectStore("FILES").get(i);n.onsuccess=a=>{if(a.target.result){var i=(a=a.target.result).byteLength||a.length,n=cr(i);m.set(new Uint8Array(a),n),v[e+12>>2]=n,Kt(e+16,i),Kt(e+24,0),Kt(e+32,i),g[e+40>>1]=4,g[e+42>>1]=200,ie("OK",m,e+44,64),t(e,0,a)}else g[e+40>>1]=4,g[e+42>>1]=404,ie("Not Found",m,e+44,64),r(e,0,"no data")},n.onerror=t=>{g[e+40>>1]=4,g[e+42>>1]=404,ie("Not Found",m,e+44,64),r(e,0,t)}}catch(t){r(e,0,t)}}else r(e,0,"IndexedDB not available!")}(e,u,l?p:k?e=>{Dt(e,E,p,d,b)}:w);return e},Tb:(e,t)=>{var r=0;return Ht().forEach(((a,i)=>{var n=t+r;for(i=v[e+4*i>>2]=n,n=0;n<a.length;++n)p[i++>>0]=a.charCodeAt(n);p[i>>0]=0,r+=a.length+1})),0},Ub:(e,t)=>{var r=Ht();v[e>>2]=r.length;var a=0;return r.forEach((e=>a+=e.length+1)),v[t>>2]=a,0},cc:e=>{d=e,ot(e)},Z:function(e){try{var t=Me(e);if(null===t.kh)throw new Ee(8);t.mh&&(t.mh=null);try{t.Xg.close&&t.Xg.close(t)}catch(e){throw e}finally{be[t.kh]=null}return t.kh=null,0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return e.bh}},Ka:function(e,t,r,a){try{e:{var i=Me(e);e=t;for(var n,_=t=0;_<r;_++){var o=v[e>>2],s=v[e+4>>2];e+=8;var c=i,h=n,l=p;if(0>s||0>h)throw new Ee(28);if(null===c.kh)throw new Ee(8);if(1==(2097155&c.flags))throw new Ee(8);if(xe(c.node.mode))throw new Ee(31);if(!c.Xg.read)throw new Ee(28);var f=void 0!==h;if(f){if(!c.seekable)throw new Ee(70)}else h=c.position;var u=c.Xg.read(c,l,o,s,h);f||(c.position+=u);var d=u;if(0>d){var m=-1;break e}if(t+=d,d<s)break;void 0!==n&&(n+=d)}m=t}return v[a>>2]=m,0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return e.bh}},mb:function(e,t,r,a,i){t=r+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*r:NaN;try{if(isNaN(t))return 61;var n=Me(e);return Xe(n,t,a),L=[n.position>>>0,(I=n.position,1<=+Math.abs(I)?0<I?+Math.floor(I/4294967296)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],w[i>>2]=L[0],w[i+4>>2]=L[1],n.mh&&0===t&&0===a&&(n.mh=null),0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return e.bh}},oa:function(e,t,r,a){try{e:{var i=Me(e);e=t;for(var n,_=t=0;_<r;_++){var o=v[e>>2],s=v[e+4>>2];e+=8;var c=i,h=o,l=s,f=n,u=p;if(0>l||0>f)throw new Ee(28);if(null===c.kh)throw new Ee(8);if(0==(2097155&c.flags))throw new Ee(8);if(xe(c.node.mode))throw new Ee(31);if(!c.Xg.write)throw new Ee(28);c.seekable&&1024&c.flags&&Xe(c,0,2);var d=void 0!==f;if(d){if(!c.seekable)throw new Ee(70)}else f=c.position;var m=c.Xg.write(c,u,h,l,f,void 0);d||(c.position+=m);var b=m;if(0>b){var g=-1;break e}t+=b,void 0!==n&&(n+=b)}g=t}return v[a>>2]=g,0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return e.bh}},Ha:(e,t)=>{nr.bindTexture(e,$t[t])},Ia:(e,t)=>{for(var r=0;r<e;r++){var a=nr.createTexture(),i=a&&Qt($t);a?(a.name=i,$t[i]=a):Xt||=1282,w[t+4*r>>2]=i}},la:(e,t,r,a,i,n,_,o,s)=>{var c=nr,h=c.texImage2D;if(s){var l=o-5120;l=1==l?m:4==l?w:6==l?E:5==l||28922==l?v:g;var f=31-Math.clz32(l.BYTES_PER_ELEMENT);s=l.subarray(s>>f,s+i*(a*({5:3,6:4,8:2,29502:3,29504:4}[_-6402]||1)*(1<<f)+4-1&-4)>>f)}else s=null;h.call(c,e,t,r,a,i,n,_,o,s)},ma:function(e,t,r){nr.texParameteri(e,t,r)},w:function(e){var t=ur();try{return jt(e)()}catch(e){if(dr(t),e!==e+0)throw e;lr(1,0)}},fa:function(e,t){var r=ur();try{return jt(e)(t)}catch(e){if(dr(r),e!==e+0)throw e;lr(1,0)}},bc:function(e,t,r){var a=ur();try{return jt(e)(t,r)}catch(e){if(dr(a),e!==e+0)throw e;lr(1,0)}},Aa:function(e,t,r){var a=ur();try{return jt(e)(t,r)}catch(e){if(dr(a),e!==e+0)throw e;lr(1,0)}},P:function(e,t,r,a){var i=ur();try{return jt(e)(t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},Ya:function(e,t,r,a,i){var n=ur();try{return jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},da:function(e,t,r,a,i,n,_,o){var s=ur();try{return jt(e)(t,r,a,i,n,_,o)}catch(e){if(dr(s),e!==e+0)throw e;lr(1,0)}},yb:function(e,t,r,a,i){var n=ur();try{return Lr(e,t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},nb:function(e,t,r,a,i){var n=ur();try{return Ur(e,t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},Y:function(e,t){var r=ur();try{return jt(e)(t)}catch(e){if(dr(r),e!==e+0)throw e;lr(1,0)}},aa:function(e,t,r){var a=ur();try{return jt(e)(t,r)}catch(e){if(dr(a),e!==e+0)throw e;lr(1,0)}},Ca:function(e,t,r,a){var i=ur();try{return jt(e)(t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},Sa:function(e,t,r,a,i,n){var _=ur();try{return jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},s:function(e){var t=ur();try{return jt(e)()}catch(e){if(dr(t),e!==e+0)throw e;lr(1,0)}},La:function(e,t,r,a,i){var n=ur();try{return jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},ta:function(e,t,r,a,i,n){var _=ur();try{return jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},b:function(e,t){var r=ur();try{return jt(e)(t)}catch(e){if(dr(r),e!==e+0)throw e;lr(1,0)}},r:function(e,t,r){var a=ur();try{return jt(e)(t,r)}catch(e){if(dr(a),e!==e+0)throw e;lr(1,0)}},ea:function(e,t,r,a){var i=ur();try{return jt(e)(t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},ga:function(e,t,r,a,i){var n=ur();try{return jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},Ra:function(e,t,r,a,i){var n=ur();try{return jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},Oa:function(e,t,r,a){var i=ur();try{return jt(e)(t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},bb:function(e,t,r){var a=ur();try{return jt(e)(t,r)}catch(e){if(dr(a),e!==e+0)throw e;lr(1,0)}},va:function(e,t,r,a,i){var n=ur();try{return jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},ua:function(e,t,r,a,i,n){var _=ur();try{return jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},f:function(e,t,r){var a=ur();try{return jt(e)(t,r)}catch(e){if(dr(a),e!==e+0)throw e;lr(1,0)}},T:function(e,t,r,a){var i=ur();try{return jt(e)(t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},Za:function(e,t,r,a,i){var n=ur();try{return jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},ec:function(e,t,r,a,i,n,_,o){var s=ur();try{return jt(e)(t,r,a,i,n,_,o)}catch(e){if(dr(s),e!==e+0)throw e;lr(1,0)}},sa:function(e,t,r,a,i,n,_,o,s,c,h,l,f){var u=ur();try{return jt(e)(t,r,a,i,n,_,o,s,c,h,l,f)}catch(e){if(dr(u),e!==e+0)throw e;lr(1,0)}},wa:function(e,t,r,a,i,n){var _=ur();try{return jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},c:function(e,t,r,a){var i=ur();try{return jt(e)(t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},Na:function(e,t,r,a,i,n){var _=ur();try{return jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},l:function(e,t,r,a,i){var n=ur();try{return jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},Ma:function(e,t,r,a,i,n){var _=ur();try{return jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},u:function(e,t,r,a,i,n){var _=ur();try{return jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},B:function(e,t,r,a,i,n,_){var o=ur();try{return jt(e)(t,r,a,i,n,_)}catch(e){if(dr(o),e!==e+0)throw e;lr(1,0)}},x:function(e,t,r,a,i,n,_,o){var s=ur();try{return jt(e)(t,r,a,i,n,_,o)}catch(e){if(dr(s),e!==e+0)throw e;lr(1,0)}},L:function(e,t,r,a,i,n,_,o,s){var c=ur();try{return jt(e)(t,r,a,i,n,_,o,s)}catch(e){if(dr(c),e!==e+0)throw e;lr(1,0)}},$:function(e,t,r,a,i,n,_,o,s,c){var h=ur();try{return jt(e)(t,r,a,i,n,_,o,s,c)}catch(e){if(dr(h),e!==e+0)throw e;lr(1,0)}},K:function(e,t,r,a,i,n,_,o,s,c,h){var l=ur();try{return jt(e)(t,r,a,i,n,_,o,s,c,h)}catch(e){if(dr(l),e!==e+0)throw e;lr(1,0)}},ba:function(e,t,r,a,i,n,_,o,s,c,h,l){var f=ur();try{return jt(e)(t,r,a,i,n,_,o,s,c,h,l)}catch(e){if(dr(f),e!==e+0)throw e;lr(1,0)}},jb:function(e,t,r,a,i,n,_){var o=ur();try{return jr(e,t,r,a,i,n,_)}catch(e){if(dr(o),e!==e+0)throw e;lr(1,0)}},pb:function(e,t,r,a,i,n){var _=ur();try{return Vr(e,t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},wb:function(e,t,r,a,i,n,_,o,s){var c=ur();try{return zr(e,t,r,a,i,n,_,o,s)}catch(e){if(dr(c),e!==e+0)throw e;lr(1,0)}},Ab:function(e,t,r,a,i,n,_,o,s,c,h){var l=ur();try{return Tr(e,t,r,a,i,n,_,o,s,c,h)}catch(e){if(dr(l),e!==e+0)throw e;lr(1,0)}},Fb:function(e,t,r,a){var i=ur();try{return Ar(e,t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},Cb:function(e,t,r,a,i){var n=ur();try{return Rr(e,t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},xb:function(e,t,r,a,i,n,_,o,s,c,h,l,f,u,d){var p=ur();try{return xr(e,t,r,a,i,n,_,o,s,c,h,l,f,u,d)}catch(e){if(dr(p),e!==e+0)throw e;lr(1,0)}},qb:function(e,t,r,a){var i=ur();try{return Cr(e,t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},Gb:function(e){var t=ur();try{return vr(e)}catch(e){if(dr(t),e!==e+0)throw e;lr(1,0)}},Bb:function(e,t){var r=ur();try{return Sr(e,t)}catch(e){if(dr(r),e!==e+0)throw e;lr(1,0)}},ub:function(e,t,r){var a=ur();try{return Mr(e,t,r)}catch(e){if(dr(a),e!==e+0)throw e;lr(1,0)}},vb:function(e,t,r,a){var i=ur();try{return Pr(e,t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},ib:function(e,t,r,a,i){var n=ur();try{return Dr(e,t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},ob:function(e,t,r){var a=ur();try{return Br(e,t,r)}catch(e){if(dr(a),e!==e+0)throw e;lr(1,0)}},m:function(e){var t=ur();try{jt(e)()}catch(e){if(dr(t),e!==e+0)throw e;lr(1,0)}},ab:function(e,t,r){var a=ur();try{jt(e)(t,r)}catch(e){if(dr(a),e!==e+0)throw e;lr(1,0)}},cb:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},g:function(e,t){var r=ur();try{jt(e)(t)}catch(e){if(dr(r),e!==e+0)throw e;lr(1,0)}},Pa:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},_:function(e,t,r,a,i,n,_){var o=ur();try{jt(e)(t,r,a,i,n,_)}catch(e){if(dr(o),e!==e+0)throw e;lr(1,0)}},ra:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},Ga:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},dc:function(e,t,r,a){var i=ur();try{jt(e)(t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},S:function(e,t,r,a,i){var n=ur();try{jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},Qa:function(e,t,r,a,i){var n=ur();try{jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},Ua:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},e:function(e,t,r){var a=ur();try{jt(e)(t,r)}catch(e){if(dr(a),e!==e+0)throw e;lr(1,0)}},t:function(e,t,r,a){var i=ur();try{jt(e)(t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},R:function(e,t,r,a,i){var n=ur();try{jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},M:function(e,t,r,a){var i=ur();try{jt(e)(t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},X:function(e,t,r,a,i){var n=ur();try{jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},xa:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},Va:function(e,t,r,a,i,n,_,o,s){var c=ur();try{jt(e)(t,r,a,i,n,_,o,s)}catch(e){if(dr(c),e!==e+0)throw e;lr(1,0)}},N:function(e,t,r,a,i){var n=ur();try{jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},h:function(e,t,r,a){var i=ur();try{jt(e)(t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},ha:function(e,t,r,a,i){var n=ur();try{jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},qa:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},_a:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},Xa:function(e,t,r,a,i,n,_,o){var s=ur();try{jt(e)(t,r,a,i,n,_,o)}catch(e){if(dr(s),e!==e+0)throw e;lr(1,0)}},Da:function(e,t,r,a,i,n,_,o){var s=ur();try{jt(e)(t,r,a,i,n,_,o)}catch(e){if(dr(s),e!==e+0)throw e;lr(1,0)}},V:function(e,t,r,a,i,n,_,o,s,c,h,l){var f=ur();try{jt(e)(t,r,a,i,n,_,o,s,c,h,l)}catch(e){if(dr(f),e!==e+0)throw e;lr(1,0)}},db:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},ja:function(e,t,r,a,i,n,_){var o=ur();try{jt(e)(t,r,a,i,n,_)}catch(e){if(dr(o),e!==e+0)throw e;lr(1,0)}},k:function(e,t,r,a,i){var n=ur();try{jt(e)(t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},ya:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},eb:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},Ta:function(e,t,r,a,i,n,_,o,s,c,h){var l=ur();try{jt(e)(t,r,a,i,n,_,o,s,c,h)}catch(e){if(dr(l),e!==e+0)throw e;lr(1,0)}},ka:function(e,t,r,a,i,n,_){var o=ur();try{jt(e)(t,r,a,i,n,_)}catch(e){if(dr(o),e!==e+0)throw e;lr(1,0)}},Wa:function(e,t,r,a,i,n,_,o){var s=ur();try{jt(e)(t,r,a,i,n,_,o)}catch(e){if(dr(s),e!==e+0)throw e;lr(1,0)}},j:function(e,t,r,a,i,n){var _=ur();try{jt(e)(t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},U:function(e,t,r,a,i,n,_){var o=ur();try{jt(e)(t,r,a,i,n,_)}catch(e){if(dr(o),e!==e+0)throw e;lr(1,0)}},$a:function(e,t,r,a,i,n,_,o){var s=ur();try{jt(e)(t,r,a,i,n,_,o)}catch(e){if(dr(s),e!==e+0)throw e;lr(1,0)}},Ba:function(e,t,r,a,i,n,_,o){var s=ur();try{jt(e)(t,r,a,i,n,_,o)}catch(e){if(dr(s),e!==e+0)throw e;lr(1,0)}},o:function(e,t,r,a,i,n,_){var o=ur();try{jt(e)(t,r,a,i,n,_)}catch(e){if(dr(o),e!==e+0)throw e;lr(1,0)}},z:function(e,t,r,a,i,n,_,o){var s=ur();try{jt(e)(t,r,a,i,n,_,o)}catch(e){if(dr(s),e!==e+0)throw e;lr(1,0)}},ia:function(e,t,r,a,i,n,_,o){var s=ur();try{jt(e)(t,r,a,i,n,_,o)}catch(e){if(dr(s),e!==e+0)throw e;lr(1,0)}},p:function(e,t,r,a,i,n,_,o){var s=ur();try{jt(e)(t,r,a,i,n,_,o)}catch(e){if(dr(s),e!==e+0)throw e;lr(1,0)}},v:function(e,t,r,a,i,n,_,o,s,c,h,l,f){var u=ur();try{jt(e)(t,r,a,i,n,_,o,s,c,h,l,f)}catch(e){if(dr(u),e!==e+0)throw e;lr(1,0)}},O:function(e,t,r,a,i,n,_,o,s,c){var h=ur();try{jt(e)(t,r,a,i,n,_,o,s,c)}catch(e){if(dr(h),e!==e+0)throw e;lr(1,0)}},W:function(e,t,r,a,i,n,_,o,s,c,h,l,f){var u=ur();try{jt(e)(t,r,a,i,n,_,o,s,c,h,l,f)}catch(e){if(dr(u),e!==e+0)throw e;lr(1,0)}},C:function(e,t,r,a,i,n,_,o,s){var c=ur();try{jt(e)(t,r,a,i,n,_,o,s)}catch(e){if(dr(c),e!==e+0)throw e;lr(1,0)}},E:function(e,t,r,a,i,n,_,o,s,c){var h=ur();try{jt(e)(t,r,a,i,n,_,o,s,c)}catch(e){if(dr(h),e!==e+0)throw e;lr(1,0)}},H:function(e,t,r,a,i,n,_,o,s,c,h){var l=ur();try{jt(e)(t,r,a,i,n,_,o,s,c,h)}catch(e){if(dr(l),e!==e+0)throw e;lr(1,0)}},za:function(e,t,r,a,i,n,_,o,s,c,h,l){var f=ur();try{jt(e)(t,r,a,i,n,_,o,s,c,h,l)}catch(e){if(dr(f),e!==e+0)throw e;lr(1,0)}},I:function(e,t,r,a,i,n,_,o,s,c,h,l,f,u){var d=ur();try{jt(e)(t,r,a,i,n,_,o,s,c,h,l,f,u)}catch(e){if(dr(d),e!==e+0)throw e;lr(1,0)}},D:function(e,t,r,a,i,n,_,o,s,c,h,l){var f=ur();try{jt(e)(t,r,a,i,n,_,o,s,c,h,l)}catch(e){if(dr(f),e!==e+0)throw e;lr(1,0)}},J:function(e,t,r,a,i,n,_,o,s,c,h,l,f){var u=ur();try{jt(e)(t,r,a,i,n,_,o,s,c,h,l,f)}catch(e){if(dr(u),e!==e+0)throw e;lr(1,0)}},pa:function(e,t,r,a,i,n,_,o,s,c,h,l,f,u,d){var p=ur();try{jt(e)(t,r,a,i,n,_,o,s,c,h,l,f,u,d)}catch(e){if(dr(p),e!==e+0)throw e;lr(1,0)}},ca:function(e,t,r,a,i,n,_,o,s,c,h,l,f,u,d,p){var m=ur();try{jt(e)(t,r,a,i,n,_,o,s,c,h,l,f,u,d,p)}catch(e){if(dr(m),e!==e+0)throw e;lr(1,0)}},Hb:function(e,t,r,a,i){var n=ur();try{Er(e,t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},zb:function(e,t,r,a,i,n){var _=ur();try{Ir(e,t,r,a,i,n)}catch(e){if(dr(_),e!==e+0)throw e;lr(1,0)}},Db:function(e,t,r,a,i,n,_){var o=ur();try{yr(e,t,r,a,i,n,_)}catch(e){if(dr(o),e!==e+0)throw e;lr(1,0)}},Eb:function(e,t,r,a){var i=ur();try{kr(e,t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},tb:function(e,t,r,a,i){var n=ur();try{Nr(e,t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},rb:function(e,t,r,a){var i=ur();try{Or(e,t,r,a)}catch(e){if(dr(i),e!==e+0)throw e;lr(1,0)}},sb:function(e,t,r,a,i){var n=ur();try{Fr(e,t,r,a,i)}catch(e){if(dr(n),e!==e+0)throw e;lr(1,0)}},A:e=>e,Jb:(e,t,r,a)=>((e,t,r,a)=>{function i(e,t,r){for(e="number"==typeof e?e.toString():e||"";e.length<t;)e=r[0]+e;return e}function n(e,t){return i(e,t,"0")}function _(e,t){function r(e){return 0>e?-1:0<e?1:0}var a;return 0===(a=r(e.getFullYear()-t.getFullYear()))&&0===(a=r(e.getMonth()-t.getMonth()))&&(a=r(e.getDate()-t.getDate())),a}function o(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function s(e){var t=e.oh;for(e=new Date(new Date(e.ph+1900,0,1).getTime());0<t;){var r=e.getMonth(),a=(at(e.getFullYear())?rr:ar)[r];if(!(t>a-e.getDate())){e.setDate(e.getDate()+t);break}t-=a-e.getDate()+1,e.setDate(1),11>r?e.setMonth(r+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return r=new Date(e.getFullYear()+1,0,4),t=o(new Date(e.getFullYear(),0,4)),r=o(r),0>=_(t,e)?0>=_(r,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var c=v[a+40>>2];for(var h in a={li:w[a>>2],ki:w[a+4>>2],Dh:w[a+8>>2],Kh:w[a+12>>2],Eh:w[a+16>>2],ph:w[a+20>>2],hh:w[a+24>>2],oh:w[a+28>>2],Hi:w[a+32>>2],ji:w[a+36>>2],mi:c&&c?te(m,c):""},r=r?te(m,r):"",c={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})r=r.replace(new RegExp(h,"g"),c[h]);var l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),f="January February March April May June July August September October November December".split(" ");for(h in c={"%a":e=>l[e.hh].substring(0,3),"%A":e=>l[e.hh],"%b":e=>f[e.Eh].substring(0,3),"%B":e=>f[e.Eh],"%C":e=>n((e.ph+1900)/100|0,2),"%d":e=>n(e.Kh,2),"%e":e=>i(e.Kh,2," "),"%g":e=>s(e).toString().substring(2),"%G":s,"%H":e=>n(e.Dh,2),"%I":e=>(0==(e=e.Dh)?e=12:12<e&&(e-=12),n(e,2)),"%j":e=>{for(var t=0,r=0;r<=e.Eh-1;t+=(at(e.ph+1900)?rr:ar)[r++]);return n(e.Kh+t,3)},"%m":e=>n(e.Eh+1,2),"%M":e=>n(e.ki,2),"%n":()=>"\n","%p":e=>0<=e.Dh&&12>e.Dh?"AM":"PM","%S":e=>n(e.li,2),"%t":()=>"\t","%u":e=>e.hh||7,"%U":e=>n(Math.floor((e.oh+7-e.hh)/7),2),"%V":e=>{var t=Math.floor((e.oh+7-(e.hh+6)%7)/7);if(2>=(e.hh+371-e.oh-2)%7&&t++,t)53==t&&(4==(r=(e.hh+371-e.oh)%7)||3==r&&at(e.ph)||(t=1));else{t=52;var r=(e.hh+7-e.oh-1)%7;(4==r||5==r&&at(e.ph%400-1))&&t++}return n(t,2)},"%w":e=>e.hh,"%W":e=>n(Math.floor((e.oh+7-(e.hh+6)%7)/7),2),"%y":e=>(e.ph+1900).toString().substring(2),"%Y":e=>e.ph+1900,"%z":e=>{var t=0<=(e=e.ji);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.mi,"%%":()=>"%"},r=r.replace(/%%/g,"\0\0"),c)r.includes(h)&&(r=r.replace(new RegExp(h,"g"),c[h](a)));return(h=ne(r=r.replace(/\0\0/g,"%"),!1)).length>t?0:(p.set(h,e),h.length-1)})(e,t,r,a)},or=function(){function e(e){return or=e.exports,u=or.fc,k(),Ct=or.kc,N.unshift(or.gc),O(),or}var t={a:_r};if(F(),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(e){f(`Module.instantiateWasm callback failed with error: ${e}`),a(e)}return t=function(e){if(x==x&&h)var t=new Uint8Array(h);else{if(!n)throw'sync fetching of the wasm failed: you can preload it to Module["wasmBinary"] manually, or emcc.py will do that for you when generating HTML (but not JS)';t=n(x)}return t=new WebAssembly.Module(t),[new WebAssembly.Instance(t,e),t]}(t),e(t[0])}();i._zappar_has_initialized=or.hc,i._zappar_invert=or.ic,i._zappar_loaded=or.jc,i._zappar_pipeline_create=or.lc,i._zappar_pipeline_destroy=or.mc,i._zappar_pipeline_camera_frame_submit=or.nc,i._zappar_pipeline_camera_frame_submit_raw_pointer=or.oc,i._zappar_pipeline_frame_update=or.pc,i._zappar_pipeline_camera_frame_user_data=or.qc,i._zappar_pipeline_camera_model=or.rc,i._zappar_pipeline_frame_number=or.sc,i._zappar_pipeline_motion_accelerometer_submit=or.tc,i._zappar_pipeline_motion_accelerometer_with_gravity_submit_int=or.uc,i._zappar_pipeline_motion_accelerometer_without_gravity_submit_int=or.vc,i._zappar_pipeline_motion_rotation_rate_submit_int=or.wc,i._zappar_pipeline_motion_attitude_submit_int=or.xc,i._zappar_pipeline_motion_rotation_rate_submit=or.yc,i._zappar_pipeline_motion_attitude_submit=or.zc,i._zappar_pipeline_motion_attitude_matrix_submit=or.Ac,i._zappar_pipeline_camera_frame_user_facing=or.Bc,i._zappar_pipeline_camera_frame_texture_matrix=or.Cc,i._zappar_pipeline_camera_pose_with_attitude=or.Dc,i._zappar_pipeline_camera_pose_with_origin=or.Ec,i._zappar_pipeline_camera_frame_camera_attitude=or.Fc,i._zappar_pipeline_camera_frame_device_attitude=or.Gc,i._zappar_pipeline_camera_frame_texture_gl=or.Hc,i._zappar_pipeline_camera_frame_upload_gl=or.Ic,i._zappar_pipeline_sequence_record_start=or.Jc,i._zappar_pipeline_sequence_record_stop=or.Kc,i._zappar_pipeline_sequence_record_clear=or.Lc,i._zappar_pipeline_sequence_record_device_attitude_matrices_set=or.Mc,i._zappar_pipeline_sequence_record_data_size=or.Nc,i._zappar_pipeline_sequence_record_data=or.Oc,i._zappar_pipeline_process_gl=or.Pc,i._zappar_pipeline_camera_pose_default=or.Qc,i._zappar_instant_world_tracker_create=or.Rc,i._zappar_instant_world_tracker_destroy=or.Sc,i._zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw=or.Tc,i._zappar_instant_world_tracker_anchor_pose_raw=or.Uc,i._zappar_instant_world_tracker_enabled_set=or.Vc,i._zappar_instant_world_tracker_enabled=or.Wc,i._zappar_image_tracker_create=or.Xc,i._zappar_image_tracker_destroy=or.Yc,i._zappar_image_tracker_target_load_from_memory=or.Zc,i.__Z42zappar_image_tracker_target_load_from_fileP23zappar_image_tracker_tiPKc=or._c;var sr=i._free=or.$c;i._zappar_image_tracker_anchor_count=or.ad,i._zappar_image_tracker_anchor_id=or.bd,i._zappar_image_tracker_anchor_pose_raw=or.cd,i._zappar_image_tracker_enabled_set=or.dd,i._zappar_image_tracker_enabled=or.ed,i._zappar_image_tracker_target_loaded_version=or.fd,i.__Z33zappar_image_tracker_target_countP23zappar_image_tracker_ti=or.gd,i.__Z46zappar_image_tracker_target_preview_compressedP23zappar_image_tracker_tii=or.hd,i.__Z51zappar_image_tracker_target_preview_compressed_sizeP23zappar_image_tracker_tii=or.id,i.__Z55zappar_image_tracker_target_preview_compressed_mimetypeP23zappar_image_tracker_tii=or.jd,i.__Z40zappar_image_tracker_target_preview_rgbaP23zappar_image_tracker_tii=or.kd,i.__Z45zappar_image_tracker_target_preview_rgba_sizeP23zappar_image_tracker_tii=or.ld,i.__Z46zappar_image_tracker_target_preview_rgba_widthP23zappar_image_tracker_tii=or.md,i.__Z47zappar_image_tracker_target_preview_rgba_heightP23zappar_image_tracker_tii=or.nd,i.__Z38zappar_image_tracker_target_radius_topP23zappar_image_tracker_tii=or.od,i.__Z41zappar_image_tracker_target_radius_bottomP23zappar_image_tracker_tii=or.pd,i.__Z39zappar_image_tracker_target_side_lengthP23zappar_image_tracker_tii=or.qd,i.__Z49zappar_image_tracker_target_physical_scale_factorP23zappar_image_tracker_tii=or.rd,i.__Z49zappar_image_tracker_target_preview_mesh_verticesP23zappar_image_tracker_tii=or.sd,i.__Z48zappar_image_tracker_target_preview_mesh_normalsP23zappar_image_tracker_tii=or.td,i.__Z44zappar_image_tracker_target_preview_mesh_uvsP23zappar_image_tracker_tii=or.ud,i.__Z48zappar_image_tracker_target_preview_mesh_indicesP23zappar_image_tracker_tii=or.vd,i.__Z54zappar_image_tracker_target_preview_mesh_vertices_sizeP23zappar_image_tracker_tii=or.wd,i.__Z53zappar_image_tracker_target_preview_mesh_normals_sizeP23zappar_image_tracker_tii=or.xd,i.__Z49zappar_image_tracker_target_preview_mesh_uvs_sizeP23zappar_image_tracker_tii=or.yd,i.__Z53zappar_image_tracker_target_preview_mesh_indices_sizeP23zappar_image_tracker_tii=or.zd,i.__Z32zappar_image_tracker_target_typeP23zappar_image_tracker_tii=or.Ad,i._zappar_face_tracker_create=or.Bd,i._zappar_face_tracker_destroy=or.Cd,i._zappar_face_tracker_model_load_from_memory=or.Dd,i._zappar_face_tracker_anchor_count=or.Ed,i._zappar_face_tracker_anchor_id=or.Fd,i._zappar_face_tracker_anchor_pose_raw=or.Gd,i._zappar_face_tracker_anchor_identity_coefficients=or.Hd,i._zappar_face_tracker_anchor_expression_coefficients=or.Id,i._zappar_face_tracker_enabled_set=or.Jd,i._zappar_face_tracker_enabled=or.Kd,i._zappar_face_tracker_max_faces_set=or.Ld,i._zappar_face_tracker_max_faces=or.Md,i._zappar_face_tracker_model_loaded_version=or.Nd,i._zappar_face_landmark_create=or.Od,i._zappar_face_landmark_destroy=or.Pd,i.__Z27zappar_face_landmark_updateP23zappar_face_landmark_tiPKfS2_i=or.Qd,i._zappar_face_landmark_anchor_pose=or.Rd,i._zappar_barcode_finder_create=or.Sd,i._zappar_barcode_finder_destroy=or.Td,i._zappar_barcode_finder_found_number=or.Ud,i._zappar_barcode_finder_found_text=or.Vd,i._zappar_barcode_finder_enabled_set=or.Wd,i._zappar_barcode_finder_enabled=or.Xd,i._zappar_barcode_finder_found_format=or.Yd,i._zappar_barcode_finder_formats=or.Zd,i._zappar_barcode_finder_formats_set=or._d;var cr=i._malloc=or.$d;i._zappar_face_mesh_create=or.ae,i._zappar_face_mesh_destroy=or.be,i.__Z33zappar_face_mesh_load_from_memoryP19zappar_face_mesh_tiPKciiiii=or.ce,i.__Z29zappar_face_mesh_indices_sizeP19zappar_face_mesh_ti=or.de,i.__Z25zappar_face_mesh_uvs_sizeP19zappar_face_mesh_ti=or.ee,i.__Z30zappar_face_mesh_vertices_sizeP19zappar_face_mesh_ti=or.fe,i.__Z31zappar_face_mesh_loaded_versionP19zappar_face_mesh_ti=or.ge,i.__Z25zappar_face_mesh_verticesP19zappar_face_mesh_ti=or.he,i.__Z20zappar_face_mesh_uvsP19zappar_face_mesh_ti=or.ie,i.__Z24zappar_face_mesh_indicesP19zappar_face_mesh_ti=or.je,i.__Z23zappar_face_mesh_updateP19zappar_face_mesh_tiPKfS2_i=or.ke,i.__Z29zappar_face_mesh_normals_sizeP19zappar_face_mesh_ti=or.le,i.__Z24zappar_face_mesh_normalsP19zappar_face_mesh_ti=or.me,i._zappar_camera_source_create=or.ne,i._zappar_camera_source_destroy=or.oe,i._zappar_camera_source_start=or.pe,i._zappar_camera_source_pause=or.qe,i._zappar_camera_default_device_id=or.re,i._zappar_sequence_source_create=or.se,i.__Z28zappar_sequence_source_startP25zappar_sequence_source_ti=or.te,i.__Z39zappar_sequence_source_load_from_memoryP25zappar_sequence_source_tiPKci=or.ue,i.__Z28zappar_sequence_source_pauseP25zappar_sequence_source_ti=or.ve,i._zappar_sequence_source_destroy=or.we,i._zappar_sequence_source_max_playback_fps_set=or.xe,i._zappar_log_level_set=or.ye,i._zappar_log_level=or.ze,i.__Z23zappar_log_redirect_setPFv18zappar_log_level_tPKcE=or.Ae,i._zappar_world_tracker_create=or.Be,i._zappar_world_tracker_destroy=or.Ce,i._zappar_world_tracker_world_anchor_valid=or.De,i._zappar_world_tracker_plane_count=or.Ee,i._zappar_world_tracker_plane_pose_raw=or.Fe,i._zappar_world_tracker_world_anchor_pose_raw=or.Ge,i._zappar_world_tracker_ground_anchor_valid=or.He,i._zappar_world_tracker_ground_anchor_pose_raw=or.Ie,i._zappar_world_tracker_reset=or.Je,i._zappar_world_tracker_enabled_set=or.Ke,i._zappar_world_tracker_quality=or.Le,i._zappar_world_tracker_enabled=or.Me,i._worker_message_send_count=or.Ne,i._worker_message_send_clear=or.Oe,i._worker_message_send_data_size=or.Pe,i._worker_message_send_reference=or.Qe,i._worker_message_send_data=or.Re,i._worker_message_receive=or.Se,i._ceres_worker=or.Te,i._zappar_analytics_project_id_set=or.Ue,i.__ZN5boost13serialization16singleton_module8get_lockEv=or.Ve,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN10SLAMSystem19InitializationInputEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.We,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__23mapIi5FrameNS4_4lessIiEENS4_9allocatorINS4_4pairIKiS6_EEEEEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.Xe,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__24pairIKi5FrameEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.Ye,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveE5FrameE16load_object_dataERNS1_14basic_iarchiveEPvj=or.Ze,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__23mapIiN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEENS4_4lessIiEENS4_9allocatorINS4_4pairIKiS8_EEEEEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or._e,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__24pairIKiN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.$e,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.af,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5gtsam5Pose3EE16load_object_dataERNS1_14basic_iarchiveEPvj=or.bf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5Eigen6MatrixIdLi6ELi1ELi0ELi6ELi1EEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.cf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5Eigen6MatrixIdLi3ELi1ELi0ELi3ELi1EEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.df,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5gtsam7imuBias12ConstantBiasEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.ef,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__26bitsetILm2EEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.ff,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__26vectorI3ImuNS4_9allocatorIS6_EEEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.gf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveE3ImuE16load_object_dataERNS1_14basic_iarchiveEPvj=or.hf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__23mapIi12WorldFeatureNS4_4lessIiEENS4_9allocatorINS4_4pairIKiS6_EEEEEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.jf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__24pairIKi12WorldFeatureEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.kf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveE12WorldFeatureE16load_object_dataERNS1_14basic_iarchiveEPvj=or.lf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__23setIiNS4_4lessIiEENS4_9allocatorIiEEEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.mf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__210shared_ptrIN5gtsam7Cal3_S2EEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.nf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5gtsam7Cal3_S2EE16load_object_dataERNS1_14basic_iarchiveEPvj=or.of,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5Eigen6MatrixIdLi5ELi1ELi0ELi5ELi1EEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.pf,i.__ZNK5boost7archive6detail19pointer_iserializerINS0_15binary_iarchiveEN5gtsam7Cal3_S2EE15load_object_ptrERNS1_14basic_iarchiveEPvj=or.qf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__210shared_ptrIN5gtsam28PreintegrationCombinedParamsEEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.rf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5gtsam28PreintegrationCombinedParamsEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.sf,i.__ZN5boost13serialization18void_cast_registerIN5gtsam28PreintegrationCombinedParamsENS2_20PreintegrationParamsEEERKNS0_16void_cast_detail11void_casterEPKT_PKT0_=or.tf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5gtsam20PreintegrationParamsEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.uf,i.__ZN5boost13serialization18void_cast_registerIN5gtsam20PreintegrationParamsENS2_27PreintegratedRotationParamsEEERKNS0_16void_cast_detail11void_casterEPKT_PKT0_=or.vf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5gtsam27PreintegratedRotationParamsEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.wf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__28optionalIN5gtsam5Pose3EEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.xf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveENSt3__28optionalIN5Eigen6MatrixIdLi3ELi1ELi0ELi3ELi1EEEEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.yf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5Eigen6MatrixIdLi3ELi3ELi0ELi3ELi3EEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.zf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.Af,i.__ZNK5boost7archive6detail19pointer_iserializerINS0_15binary_iarchiveEN5gtsam28PreintegrationCombinedParamsEE15load_object_ptrERNS1_14basic_iarchiveEPvj=or.Bf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN10SLAMSystem10ParametersEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.Cf,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN2cv12TermCriteriaEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.Df,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN10SLAMSystem20InitializationResultEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Ef,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__23mapIi5FrameNS4_4lessIiEENS4_9allocatorINS4_4pairIKiS6_EEEEEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Ff,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__24pairIKi5FrameEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Gf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveE5FrameE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Hf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__23mapIiN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEENS4_4lessIiEENS4_9allocatorINS4_4pairIKiS8_EEEEEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.If,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__24pairIKiN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEEEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Jf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Kf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5gtsam5Pose3EE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Lf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5Eigen6MatrixIdLi6ELi1ELi0ELi6ELi1EEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Mf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5Eigen6MatrixIdLi3ELi1ELi0ELi3ELi1EEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Nf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5gtsam7imuBias12ConstantBiasEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Of,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__26bitsetILm2EEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Pf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__26vectorI3ImuNS4_9allocatorIS6_EEEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Qf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveE3ImuE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Rf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__23mapIi12WorldFeatureNS4_4lessIiEENS4_9allocatorINS4_4pairIKiS6_EEEEEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Sf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__24pairIKi12WorldFeatureEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Tf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveE12WorldFeatureE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Uf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__23setIiNS4_4lessIiEENS4_9allocatorIiEEEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Vf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN10SLAMSystem19InitializationInputEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Wf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__210shared_ptrIN5gtsam7Cal3_S2EEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Xf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5gtsam7Cal3_S2EE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Yf,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5Eigen6MatrixIdLi5ELi1ELi0ELi5ELi1EEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.Zf,i.__ZNK5boost7archive6detail19pointer_oserializerINS0_15binary_oarchiveEN5gtsam7Cal3_S2EE15save_object_ptrERNS1_14basic_oarchiveEPKv=or._f,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__210shared_ptrIN5gtsam28PreintegrationCombinedParamsEEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.$f,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5gtsam28PreintegrationCombinedParamsEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.ag,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5gtsam20PreintegrationParamsEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.bg,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5gtsam27PreintegratedRotationParamsEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.cg,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__28optionalIN5gtsam5Pose3EEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.dg,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveENSt3__28optionalIN5Eigen6MatrixIdLi3ELi1ELi0ELi3ELi1EEEEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.eg,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5Eigen6MatrixIdLi3ELi3ELi0ELi3ELi3EEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.fg,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.gg,i.__ZNK5boost7archive6detail19pointer_oserializerINS0_15binary_oarchiveEN5gtsam28PreintegrationCombinedParamsEE15save_object_ptrERNS1_14basic_oarchiveEPKv=or.hg,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN10SLAMSystem10ParametersEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.ig,i.__ZNK5boost7archive6detail11oserializerINS0_15binary_oarchiveEN2cv12TermCriteriaEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.jg,i.__ZNK5boost7archive6detail11iserializerINS0_15binary_iarchiveEN10SLAMSystem20InitializationResultEE16load_object_dataERNS1_14basic_iarchiveEPvj=or.kg,i.__ZNK5boost7archive6detail11oserializerINS0_12xml_oarchiveE9RecordingE16save_object_dataERNS1_14basic_oarchiveEPKv=or.lg,i.__ZNK5boost7archive6detail11oserializerINS0_12xml_oarchiveENSt3__26vectorI11SensorEventNS4_9allocatorIS6_EEEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.mg,i.__ZNK5boost7archive6detail11oserializerINS0_12xml_oarchiveE11SensorEventE16save_object_dataERNS1_14basic_oarchiveEPKv=or.ng,i.__ZNK5boost7archive6detail11oserializerINS0_12xml_oarchiveEN5Eigen6MatrixIdLin1ELi1ELi0ELin1ELi1EEEE16save_object_dataERNS1_14basic_oarchiveEPKv=or.og;var hr,lr=or.pg,fr=or.qg,ur=or.rg,dr=or.sg,pr=or.tg,mr=or.ug,br=or.vg,gr=or.wg,wr=or.xg,vr=i.dynCall_j=or.yg,Er=i.dynCall_viij=or.zg,yr=i.dynCall_viijii=or.Ag,Ar=i.dynCall_iij=or.Bg,kr=i.dynCall_vij=or.Cg,Rr=i.dynCall_iiji=or.Dg,Nr=i.dynCall_viji=or.Eg,Sr=i.dynCall_ji=or.Fg,Tr=i.dynCall_iiiijjji=or.Gg,xr=i.dynCall_iijjjjjji=or.Hg,Ir=i.dynCall_viiji=or.Ig,Lr=i.dynCall_diji=or.Jg,zr=i.dynCall_iiiijji=or.Kg,Pr=i.dynCall_jiii=or.Lg,Mr=i.dynCall_jii=or.Mg,Fr=i.dynCall_vjii=or.Ng,Or=i.dynCall_vji=or.Og,Cr=i.dynCall_iji=or.Pg,Vr=i.dynCall_iiiij=or.Qg,Br=i.dynCall_jj=or.Rg,Ur=i.dynCall_djj=or.Sg,jr=i.dynCall_iiiiij=or.Tg,Dr=i.dynCall_jiiii=or.Ug;function Kr(){function e(){if(!hr&&(hr=!0,i.calledRun=!0,!A)){if(i.noFSInit||Oe||(Oe=!0,i.stdin=i.stdin,i.stdout=i.stdout,i.stderr=i.stderr,i.stdin?Ge("stdin",i.stdin):Ke("/dev/tty","/dev/stdin"),i.stdout?Ge("stdout",null,i.stdout):Ke("/dev/tty","/dev/stdout"),i.stderr?Ge("stderr",null,i.stderr):Ke("/dev/tty1","/dev/stderr"),Ze("/dev/stdin",0),Ze("/dev/stdout",1),Ze("/dev/stderr",1)),ve=!1,U(N),r(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;){var e=i.postRun.shift();S.unshift(e)}U(S)}}if(!(0<z)){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)T();U(R),0<z||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e())}}if(i.___start_em_js=624444,i.___stop_em_js=625609,i.cwrap=(e,t,r,a)=>{var n=!r||r.every((e=>"number"===e||"boolean"===e));return"string"!==t&&n&&!a?i["_"+e]:function(){return((e,t,r,a)=>{var n={string:e=>{var t=0;if(null!=e&&0!==e){t=ae(e)+1;var r=pr(t);ie(e,m,r,t),t=r}return t},array:e=>{var t=pr(e.length);return p.set(e,t),t}};e=i["_"+e];var _,o=[],s=0;if(a)for(var c=0;c<a.length;c++){var h=n[r[c]];h?(0===s&&(s=ur()),o[c]=h(a[c])):o[c]=a[c]}return _=r=e.apply(null,o),0!==s&&dr(s),"string"===t?_?te(m,_):"":"boolean"===t?!!_:_})(e,t,r,arguments)}},i.setValue=function(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":case"i8":p[e>>0]=t;break;case"i16":b[e>>1]=t;break;case"i32":w[e>>2]=t;break;case"i64":C("to do setValue(i64) use WASM_BIGINT");case"float":E[e>>2]=t;break;case"double":y[e>>3]=t;break;case"*":v[e>>2]=t;break;default:C(`invalid type for setValue: ${r}`)}},i.getValue=function(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return p[e>>0];case"i16":return b[e>>1];case"i32":return w[e>>2];case"i64":C("to do getValue(i64) use WASM_BIGINT");case"float":return E[e>>2];case"double":return y[e>>3];case"*":return v[e>>2];default:C(`invalid type for getValue: ${t}`)}},i.UTF8ToString=Je,M=function e(){hr||Kr(),hr||(M=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);0<i.preInit.length;)i.preInit.pop()();return Kr(),t});class a{constructor(e){this._messageSender=e,this._freeBufferPool=[],this._buffer=new ArrayBuffer(16),this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u8cView=new Uint8ClampedArray(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=1,this._startOffset=-1,this._timeoutSet=!1,this._appender={int:e=>this.int(e),bool:e=>this.int(e?1:0),float:e=>this.float(e),string:e=>this.string(e),dataWithLength:e=>this.arrayBuffer(e),type:e=>this.int(e),matrix4x4:e=>this.float32ArrayBuffer(e),matrix3x3:e=>this.float32ArrayBuffer(e),identityCoefficients:e=>this.float32ArrayBuffer(e),expressionCoefficients:e=>this.float32ArrayBuffer(e),cameraModel:e=>this.float32ArrayBuffer(e),timestamp:e=>this.double(e),barcodeFormat:e=>this.int(e),faceLandmarkName:e=>this.int(e),instantTrackerTransformOrientation:e=>this.int(e),logLevel:e=>this.int(e)},this._freeBufferPool.push(new ArrayBuffer(16)),this._freeBufferPool.push(new ArrayBuffer(16))}bufferReturn(e){this._freeBufferPool.push(e)}_ensureArrayBuffer(e){let t,r=4*(this._offset+e+8);if(this._buffer&&this._buffer.byteLength>=r)return;if(!t){let e=r;e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,t=new ArrayBuffer(e)}let a=this._buffer?this._i32View:void 0;this._buffer=t,this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u8cView=new Uint8ClampedArray(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),a&&this._i32View.set(a.subarray(0,this._offset))}sendMessage(e,t){this._ensureArrayBuffer(4),this._startOffset=this._offset,this._i32View[this._offset+1]=e,this._offset+=2,t(this._appender),this._i32View[this._startOffset]=this._offset-this._startOffset,this._startOffset=-1,this._sendOneTime()}_sendOneTime(){!1===this._timeoutSet&&(this._timeoutSet=!0,setTimeout((()=>{this._timeoutSet=!1,this._send()}),0))}_send(){0!==this._freeBufferPool.length?(this._i32View[0]=this._offset,this._messageSender(this._buffer),this._buffer=void 0,this._buffer=this._freeBufferPool.pop(),this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u8cView=new Uint8ClampedArray(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=1,this._startOffset=-1):this._sendOneTime()}int(e){this._ensureArrayBuffer(1),this._i32View[this._offset]=e,this._offset++}double(e){this._ensureArrayBuffer(2),this._offset%2==1&&this._offset++,this._f64View[this._offset/2]=e,this._offset+=2}float(e){this._ensureArrayBuffer(1),this._f32View[this._offset]=e,this._offset++}int32Array(e){this._ensureArrayBuffer(e.length);for(let t=0;t<e.length;++t)this._i32View[this._offset+t]=e[t];this._offset+=e.length}float32Array(e){this._ensureArrayBuffer(e.length);for(let t=0;t<e.length;++t)this._f32View[this._offset+t]=e[t];this._offset+=e.length}booleanArray(e){this._ensureArrayBuffer(e.length);for(let t=0;t<e.length;++t)this._i32View[this._offset+t]=e[t]?1:0;this._offset+=e.length}uint8ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.byteLength,this._offset++,this._u8View.set(e,4*this._offset),this._offset+=e.byteLength>>2,0!=(3&e.byteLength)&&this._offset++}arrayBuffer(e){let t=new Uint8Array(e);this.uint8ArrayBuffer(t)}uint8ClampedArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.byteLength,this._offset++,this._u8cView.set(e,4*this._offset),this._offset+=e.byteLength>>2,0!=(3&e.byteLength)&&this._offset++}float32ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++,this._f32View.set(e,this._offset),this._offset+=e.length}uint16ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++;let t=2*this._offset;this._u16View.set(e,t),this._offset+=e.length>>1,0!=(1&e.length)&&this._offset++}int32ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++,this._i32View.set(e,this._offset),this._offset+=e.length}uint32ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++,this._u32View.set(e,this._offset),this._offset+=e.length}string(e){let t=(new TextEncoder).encode(e);this._ensureArrayBuffer(t.byteLength/4),this._i32View[this._offset]=t.byteLength,this._offset++,this._u8View.set(t,4*this._offset),this._offset+=t.byteLength>>2,0!=(3&t.byteLength)&&this._offset++}}class i{constructor(){this._buffer=new ArrayBuffer(0),this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=0,this._length=0,this._startOffset=-1,this._processor={int:()=>this._i32View[this._startOffset++],bool:()=>1===this._i32View[this._startOffset++],type:()=>this._i32View[this._startOffset++],float:()=>this._f32View[this._startOffset++],timestamp:()=>{this._startOffset%2==1&&this._startOffset++;let e=this._f64View[this._startOffset/2];return this._startOffset+=2,e},string:()=>{let e=this._i32View[this._startOffset++],t=(new TextDecoder).decode(new Uint8Array(this._buffer,4*this._startOffset,e));return this._startOffset+=e>>2,0!=(3&e)&&this._startOffset++,t},dataWithLength:()=>{let e=this._i32View[this._startOffset++],t=new Uint8Array(e);return t.set(this._u8View.subarray(4*this._startOffset,4*this._startOffset+e)),this._startOffset+=t.byteLength>>2,0!=(3&t.byteLength)&&this._startOffset++,t.buffer},matrix4x4:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+16)),this._startOffset+=e,t},matrix3x3:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+9)),this._startOffset+=e,t},identityCoefficients:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+50)),this._startOffset+=e,t},expressionCoefficients:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+29)),this._startOffset+=e,t},cameraModel:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+6)),this._startOffset+=e,t},barcodeFormat:()=>this._i32View[this._startOffset++],faceLandmarkName:()=>this._i32View[this._startOffset++],instantTrackerTransformOrientation:()=>this._i32View[this._startOffset++],logLevel:()=>this._i32View[this._startOffset++]}}setData(e){this._buffer=e,this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=0,this._length=0,e.byteLength>=4&&(this._offset=1,this._length=this._i32View[0]),this._startOffset=-1}hasMessage(){return this._offset+1<this._length}forMessages(e){for(;this.hasMessage();){let t=this._i32View[this._offset],r=this._i32View[this._offset+1];this._startOffset=this._offset+2,this._offset+=t,e(r,this._processor)}}}class n{constructor(e,t){this._impl=e,this._sender=t,this._deserializer=new i,this.serializersByPipelineId=new Map,this._pipeline_id_by_pipeline_id=new Map,this._pipeline_by_instance=new Map,this._pipeline_id_by_camera_source_id=new Map,this._camera_source_by_instance=new Map,this._pipeline_id_by_sequence_source_id=new Map,this._sequence_source_by_instance=new Map,this._pipeline_id_by_image_tracker_id=new Map,this._image_tracker_by_instance=new Map,this._pipeline_id_by_face_tracker_id=new Map,this._face_tracker_by_instance=new Map,this._pipeline_id_by_face_mesh_id=new Map,this._face_mesh_by_instance=new Map,this._pipeline_id_by_face_landmark_id=new Map,this._face_landmark_by_instance=new Map,this._pipeline_id_by_barcode_finder_id=new Map,this._barcode_finder_by_instance=new Map,this._pipeline_id_by_instant_world_tracker_id=new Map,this._instant_world_tracker_by_instance=new Map,this._pipeline_id_by_world_tracker_id=new Map,this._world_tracker_by_instance=new Map}processBuffer(e){this._deserializer.setData(e),this._deserializer.forMessages(((e,t)=>{switch(e){case 38:this._impl.log_level_set(t.logLevel());break;case 35:this._impl.analytics_project_id_set(t.string(),t.string());break;case 31:{let e=t.type(),r=this._impl.pipeline_create();this._pipeline_by_instance.set(e,r),this._pipeline_id_by_pipeline_id.set(e,e),this.serializersByPipelineId.set(e,new a((t=>{this._sender(e,t)})));break}case 32:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_destroy(r),this._pipeline_by_instance.delete(e);break}case 9:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_frame_update(r);break}case 8:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_camera_frame_submit(r,t.dataWithLength(),t.int(),t.int(),t.int(),t.matrix4x4(),t.cameraModel(),t.bool());break}case 10:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_accelerometer_submit(r,t.timestamp(),t.float(),t.float(),t.float());break}case 12:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_accelerometer_with_gravity_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 11:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_accelerometer_without_gravity_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 15:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_rotation_rate_submit(r,t.timestamp(),t.float(),t.float(),t.float());break}case 13:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_rotation_rate_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 16:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_attitude_submit(r,t.timestamp(),t.float(),t.float(),t.float());break}case 14:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_attitude_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 17:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_attitude_matrix_submit(r,t.matrix4x4());break}case 33:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),i=t.string(),n=this._impl.camera_source_create(a,i);this._camera_source_by_instance.set(e,n),this._pipeline_id_by_camera_source_id.set(e,r);break}case 34:{let e=t.type(),r=this._camera_source_by_instance.get(e);if(void 0===r)return;this._impl.camera_source_destroy(r),this._camera_source_by_instance.delete(e);break}case 39:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),i=this._impl.sequence_source_create(a);this._sequence_source_by_instance.set(e,i),this._pipeline_id_by_sequence_source_id.set(e,r);break}case 40:{let e=t.type(),r=this._sequence_source_by_instance.get(e);if(void 0===r)return;this._impl.sequence_source_destroy(r),this._sequence_source_by_instance.delete(e);break}case 2:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),i=this._impl.image_tracker_create(a);this._image_tracker_by_instance.set(e,i),this._pipeline_id_by_image_tracker_id.set(e,r);break}case 18:{let e=t.type(),r=this._image_tracker_by_instance.get(e);if(void 0===r)return;this._impl.image_tracker_destroy(r),this._image_tracker_by_instance.delete(e);break}case 4:{let e=t.type(),r=this._image_tracker_by_instance.get(e);if(void 0===r)return;this._impl.image_tracker_target_load_from_memory(r,t.dataWithLength());break}case 3:{let e=t.type(),r=this._image_tracker_by_instance.get(e);if(void 0===r)return;this._impl.image_tracker_enabled_set(r,t.bool());break}case 24:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),i=this._impl.face_tracker_create(a);this._face_tracker_by_instance.set(e,i),this._pipeline_id_by_face_tracker_id.set(e,r);break}case 25:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_destroy(r),this._face_tracker_by_instance.delete(e);break}case 26:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_model_load_from_memory(r,t.dataWithLength());break}case 27:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_enabled_set(r,t.bool());break}case 28:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_max_faces_set(r,t.int());break}case 29:{let e=t.type(),r=this._impl.face_mesh_create();this._face_mesh_by_instance.set(e,r);break}case 30:{let e=t.type(),r=this._face_mesh_by_instance.get(e);if(void 0===r)return;this._impl.face_mesh_destroy(r),this._face_mesh_by_instance.delete(e);break}case 36:{let e=t.type(),r=t.faceLandmarkName(),a=this._impl.face_landmark_create(r);this._face_landmark_by_instance.set(e,a);break}case 37:{let e=t.type(),r=this._face_landmark_by_instance.get(e);if(void 0===r)return;this._impl.face_landmark_destroy(r),this._face_landmark_by_instance.delete(e);break}case 20:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),i=this._impl.barcode_finder_create(a);this._barcode_finder_by_instance.set(e,i),this._pipeline_id_by_barcode_finder_id.set(e,r);break}case 21:{let e=t.type(),r=this._barcode_finder_by_instance.get(e);if(void 0===r)return;this._impl.barcode_finder_destroy(r),this._barcode_finder_by_instance.delete(e);break}case 22:{let e=t.type(),r=this._barcode_finder_by_instance.get(e);if(void 0===r)return;this._impl.barcode_finder_enabled_set(r,t.bool());break}case 23:{let e=t.type(),r=this._barcode_finder_by_instance.get(e);if(void 0===r)return;this._impl.barcode_finder_formats_set(r,t.barcodeFormat());break}case 5:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),i=this._impl.instant_world_tracker_create(a);this._instant_world_tracker_by_instance.set(e,i),this._pipeline_id_by_instant_world_tracker_id.set(e,r);break}case 19:{let e=t.type(),r=this._instant_world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.instant_world_tracker_destroy(r),this._instant_world_tracker_by_instance.delete(e);break}case 6:{let e=t.type(),r=this._instant_world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.instant_world_tracker_enabled_set(r,t.bool());break}case 7:{let e=t.type(),r=this._instant_world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.instant_world_tracker_anchor_pose_set_from_camera_offset_raw(r,t.float(),t.float(),t.float(),t.instantTrackerTransformOrientation());break}case 41:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),i=this._impl.world_tracker_create(a);this._world_tracker_by_instance.set(e,i),this._pipeline_id_by_world_tracker_id.set(e,r);break}case 42:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_destroy(r),this._world_tracker_by_instance.delete(e);break}case 43:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_enabled_set(r,t.bool());break}case 44:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_reset(r);break}}}))}exploreState(){for(let[e,t]of this._pipeline_by_instance){let r=this._pipeline_id_by_pipeline_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);a&&(a.sendMessage(7,(r=>{r.type(e),r.int(this._impl.pipeline_frame_number(t))})),a.sendMessage(6,(r=>{r.type(e),r.cameraModel(this._impl.pipeline_camera_model(t))})),a.sendMessage(5,(r=>{r.type(e),r.int(this._impl.pipeline_camera_frame_user_data(t))})),a.sendMessage(11,(r=>{r.type(e),r.matrix4x4(this._impl.pipeline_camera_frame_camera_attitude(t))})),a.sendMessage(12,(r=>{r.type(e),r.matrix4x4(this._impl.pipeline_camera_frame_device_attitude(t))})))}for(let[e,t]of this._camera_source_by_instance){let t=this._pipeline_id_by_camera_source_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._sequence_source_by_instance){let t=this._pipeline_id_by_sequence_source_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._image_tracker_by_instance){let r=this._pipeline_id_by_image_tracker_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);if(a){a.sendMessage(19,(r=>{r.type(e),r.int(this._impl.image_tracker_target_loaded_version(t))})),a.sendMessage(1,(r=>{r.type(e),r.int(this._impl.image_tracker_anchor_count(t))}));for(let r=0;r<this._impl.image_tracker_anchor_count(t);r++)a.sendMessage(2,(a=>{a.type(e),a.int(r),a.string(this._impl.image_tracker_anchor_id(t,r))}));for(let r=0;r<this._impl.image_tracker_anchor_count(t);r++)a.sendMessage(3,(a=>{a.type(e),a.int(r),a.matrix4x4(this._impl.image_tracker_anchor_pose_raw(t,r))}))}}for(let[e,t]of this._face_tracker_by_instance){let r=this._pipeline_id_by_face_tracker_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);if(a){a.sendMessage(18,(r=>{r.type(e),r.int(this._impl.face_tracker_model_loaded_version(t))})),a.sendMessage(13,(r=>{r.type(e),r.int(this._impl.face_tracker_anchor_count(t))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)a.sendMessage(14,(a=>{a.type(e),a.int(r),a.string(this._impl.face_tracker_anchor_id(t,r))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)a.sendMessage(15,(a=>{a.type(e),a.int(r),a.matrix4x4(this._impl.face_tracker_anchor_pose_raw(t,r))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)a.sendMessage(16,(a=>{a.type(e),a.int(r),a.identityCoefficients(this._impl.face_tracker_anchor_identity_coefficients(t,r))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)a.sendMessage(17,(a=>{a.type(e),a.int(r),a.expressionCoefficients(this._impl.face_tracker_anchor_expression_coefficients(t,r))}))}}for(let[e,t]of this._face_mesh_by_instance){let t=this._pipeline_id_by_face_mesh_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._face_landmark_by_instance){let t=this._pipeline_id_by_face_landmark_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._barcode_finder_by_instance){let r=this._pipeline_id_by_barcode_finder_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);if(a){a.sendMessage(8,(r=>{r.type(e),r.int(this._impl.barcode_finder_found_number(t))}));for(let r=0;r<this._impl.barcode_finder_found_number(t);r++)a.sendMessage(9,(a=>{a.type(e),a.int(r),a.string(this._impl.barcode_finder_found_text(t,r))}));for(let r=0;r<this._impl.barcode_finder_found_number(t);r++)a.sendMessage(10,(a=>{a.type(e),a.int(r),a.barcodeFormat(this._impl.barcode_finder_found_format(t,r))}))}}for(let[e,t]of this._instant_world_tracker_by_instance){let r=this._pipeline_id_by_instant_world_tracker_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);a&&a.sendMessage(4,(r=>{r.type(e),r.matrix4x4(this._impl.instant_world_tracker_anchor_pose_raw(t))}))}for(let[e,t]of this._world_tracker_by_instance){let r=this._pipeline_id_by_world_tracker_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);if(a){a.sendMessage(27,(r=>{r.type(e),r.int(this._impl.world_tracker_quality(t))})),a.sendMessage(21,(r=>{r.type(e),r.int(this._impl.world_tracker_plane_count(t))}));for(let r=0;r<this._impl.world_tracker_plane_count(t);r++)a.sendMessage(22,(a=>{a.type(e),a.int(r),a.matrix4x4(this._impl.world_tracker_plane_pose_raw(t,r))}));a.sendMessage(23,(r=>{r.type(e),r.bool(this._impl.world_tracker_world_anchor_valid(t))})),a.sendMessage(24,(r=>{r.type(e),r.matrix4x4(this._impl.world_tracker_world_anchor_pose_raw(t))})),a.sendMessage(23,(r=>{r.type(e),r.bool(this._impl.world_tracker_ground_anchor_valid(t))})),a.sendMessage(26,(r=>{r.type(e),r.matrix4x4(this._impl.world_tracker_ground_anchor_pose_raw(t))}))}}}}class _{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(){for(var e=0,t=this._funcs.length;e<t;e++)this._funcs[e]()}}class o{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e){for(var t=0,r=this._funcs.length;t<r;t++)this._funcs[t](e)}}var s,c,h,l,f,u,d,p="undefined"!=typeof Float32Array?Float32Array:Array;function m(){var e=new p(16);return p!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function b(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.random,Math.PI,Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),function(e){e[e.UNKNOWN=131072]="UNKNOWN",e[e.AZTEC=1]="AZTEC",e[e.CODABAR=2]="CODABAR",e[e.CODE_39=4]="CODE_39",e[e.CODE_93=8]="CODE_93",e[e.CODE_128=16]="CODE_128",e[e.DATA_MATRIX=32]="DATA_MATRIX",e[e.EAN_8=64]="EAN_8",e[e.EAN_13=128]="EAN_13",e[e.ITF=256]="ITF",e[e.MAXICODE=512]="MAXICODE",e[e.PDF_417=1024]="PDF_417",e[e.QR_CODE=2048]="QR_CODE",e[e.RSS_14=4096]="RSS_14",e[e.RSS_EXPANDED=8192]="RSS_EXPANDED",e[e.UPC_A=16384]="UPC_A",e[e.UPC_E=32768]="UPC_E",e[e.UPC_EAN_EXTENSION=65536]="UPC_EAN_EXTENSION",e[e.ALL=131071]="ALL"}(s||(s={})),function(e){e[e.EYE_LEFT=0]="EYE_LEFT",e[e.EYE_RIGHT=1]="EYE_RIGHT",e[e.EAR_LEFT=2]="EAR_LEFT",e[e.EAR_RIGHT=3]="EAR_RIGHT",e[e.NOSE_BRIDGE=4]="NOSE_BRIDGE",e[e.NOSE_TIP=5]="NOSE_TIP",e[e.NOSE_BASE=6]="NOSE_BASE",e[e.LIP_TOP=7]="LIP_TOP",e[e.LIP_BOTTOM=8]="LIP_BOTTOM",e[e.MOUTH_CENTER=9]="MOUTH_CENTER",e[e.CHIN=10]="CHIN",e[e.EYEBROW_LEFT=11]="EYEBROW_LEFT",e[e.EYEBROW_RIGHT=12]="EYEBROW_RIGHT"}(c||(c={})),function(e){e[e.WORLD=3]="WORLD",e[e.MINUS_Z_AWAY_FROM_USER=4]="MINUS_Z_AWAY_FROM_USER",e[e.MINUS_Z_HEADING=5]="MINUS_Z_HEADING",e[e.UNCHANGED=6]="UNCHANGED"}(h||(h={})),function(e){e[e.LOG_LEVEL_NONE=0]="LOG_LEVEL_NONE",e[e.LOG_LEVEL_ERROR=1]="LOG_LEVEL_ERROR",e[e.LOG_LEVEL_WARNING=2]="LOG_LEVEL_WARNING",e[e.LOG_LEVEL_VERBOSE=3]="LOG_LEVEL_VERBOSE"}(l||(l={})),function(e){e[e.FRAME_PIXEL_FORMAT_I420=0]="FRAME_PIXEL_FORMAT_I420",e[e.FRAME_PIXEL_FORMAT_I420A=1]="FRAME_PIXEL_FORMAT_I420A",e[e.FRAME_PIXEL_FORMAT_I422=2]="FRAME_PIXEL_FORMAT_I422",e[e.FRAME_PIXEL_FORMAT_I444=3]="FRAME_PIXEL_FORMAT_I444",e[e.FRAME_PIXEL_FORMAT_NV12=4]="FRAME_PIXEL_FORMAT_NV12",e[e.FRAME_PIXEL_FORMAT_RGBA=5]="FRAME_PIXEL_FORMAT_RGBA",e[e.FRAME_PIXEL_FORMAT_BGRA=6]="FRAME_PIXEL_FORMAT_BGRA",e[e.FRAME_PIXEL_FORMAT_Y=7]="FRAME_PIXEL_FORMAT_Y"}(f||(f={})),function(e){e[e.IMAGE_TRACKER_TYPE_PLANAR=0]="IMAGE_TRACKER_TYPE_PLANAR",e[e.IMAGE_TRACKER_TYPE_CYLINDRICAL=1]="IMAGE_TRACKER_TYPE_CYLINDRICAL",e[e.IMAGE_TRACKER_TYPE_CONICAL=2]="IMAGE_TRACKER_TYPE_CONICAL"}(u||(u={})),function(e){e[e.WORLD_TRACKER_QUALITY_INITIALIZING=0]="WORLD_TRACKER_QUALITY_INITIALIZING",e[e.WORLD_TRACKER_QUALITY_GOOD=1]="WORLD_TRACKER_QUALITY_GOOD",e[e.WORLD_TRACKER_QUALITY_ORIENTATION_ONLY=2]="WORLD_TRACKER_QUALITY_ORIENTATION_ONLY"}(d||(d={}));const g=new Map;class w{constructor(e){this._gl=e,this._viewports=[],this._underlyingViewport=this._gl.viewport,this._viewports.push(this._gl.getParameter(this._gl.VIEWPORT)),this._gl.viewport=(e,t,r,a)=>{this._viewports[this._viewports.length-1]=[e,t,r,a],this._underlyingViewport.call(this._gl,e,t,r,a)}}static get(e){let t=g.get(e);return t||(t=new w(e),g.set(e,t)),t}push(){this._viewports.push(this._viewports[this._viewports.length-1])}pop(){const e=this._viewports.pop(),t=this._viewports[this._viewports.length-1];e&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]||this._underlyingViewport.call(this._gl,t[0],t[1],t[2],t[3])}}var v,E=r(238);!function(e){e[e.OBJECT_URL=0]="OBJECT_URL",e[e.SRC_OBJECT=1]="SRC_OBJECT"}(v||(v={}));let y={deviceMotionMutliplier:-1,blacklisted:!1,showGyroPermissionsWarningIfNecessary:!1,showSafariPermissionsResetIfNecessary:!1,requestHighFrameRate:!1,videoWidth:640,videoHeight:480,dataWidth:320,dataHeight:240,videoElementInDOM:!1,preferMediaStreamTrackProcessorCamera:!0,preferImageBitmapCamera:!1,ios164CameraSelection:!1,relyOnConstraintsForCameraSelection:!1,forceWindowOrientation:!1,intervalMultiplier:1,trustSensorIntervals:!1};"undefined"!=typeof window&&(window.zeeProfile=y,window.location.href.indexOf("_mstppipeline")>=0&&(console.log("Configuring for MSTP camera pipeline (if supported)"),y.preferMediaStreamTrackProcessorCamera=!0),window.location.href.indexOf("_imagebitmappipeline")>=0&&(console.log("Configuring for ImageBitmap camera pipeline (if supported)"),y.preferImageBitmapCamera=!0));let A=new E.UAParser,k=(A.getOS().name||"unknown").toLowerCase(),R=(A.getEngine().name||"unknown").toLowerCase();function N(e){y.forceWindowOrientation=!0,y.preferMediaStreamTrackProcessorCamera=!1,y.intervalMultiplier=1e3,y.trustSensorIntervals=!0;let t=e.split(".");if(t.length>=2){const e=parseInt(t[0]),r=parseInt(t[1]);(e<11||11===e&&r<3)&&(y.blacklisted=!0),(e<12||12===e&&r<2)&&(y.videoElementInDOM=!0),(12===e&&r>=2||e>=13)&&(y.showGyroPermissionsWarningIfNecessary=!0),e>=13&&(y.showSafariPermissionsResetIfNecessary=!0),(e>=12&&r>1||e>=13)&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&navigator.mediaDevices.getSupportedConstraints().frameRate&&(y.requestHighFrameRate=!0,e<14&&(y.videoHeight=360,y.dataHeight=180)),16===e&&r>=4&&(y.ios164CameraSelection=!0),e>=17&&(y.relyOnConstraintsForCameraSelection=!0)}}function S(e,t,r){let a=e.createShader(t);if(!a)throw new Error("Unable to create shader");e.shaderSource(a,r),e.compileShader(a);let i=e.getShaderInfoLog(a);if(i&&i.trim().length>0)throw new Error("Shader compile error: "+i);return a}"webkit"===R&&"ios"!==k&&(y.deviceMotionMutliplier=1,"undefined"!=typeof window&&void 0!==window.orientation&&N("15.0")),"webkit"===R&&"ios"===k&&(y.deviceMotionMutliplier=1,N(A.getOS().version||"15.0"));class T{constructor(e){this._gl=e,this._isPaused=!0,this._hadFrames=!1,this._isUserFacing=!1,this._cameraToScreenRotation=0,this._isUploadFrame=!0,this._computedTransformRotation=-1,this._computedFrontCameraRotation=!1,this._cameraUvTransform=m(),this._framebufferWidth=0,this._framebufferHeight=0,this._framebufferId=null,this._renderTexture=null,this._isWebGL2=!1,this._isWebGL2=e.getParameter(e.VERSION).indexOf("WebGL 2")>=0,this._isWebGL2||(this._instancedArraysExtension=this._gl.getExtension("ANGLE_instanced_arrays"))}resetGLContext(){this._framebufferId=null,this._renderTexture=null,this._vertexBuffer=void 0,this._indexBuffer=void 0,this._greyscaleShader=void 0}destroy(){this.resetGLContext()}uploadFrame(e,t,r,a){let i=this._gl;const n=w.get(i);n.push();const _=i.isEnabled(i.SCISSOR_TEST),o=i.isEnabled(i.DEPTH_TEST),s=i.isEnabled(i.BLEND),c=i.isEnabled(i.CULL_FACE),h=i.isEnabled(i.STENCIL_TEST),l=i.getParameter(i.ACTIVE_TEXTURE),f=i.getParameter(i.UNPACK_FLIP_Y_WEBGL),u=i.getParameter(i.CURRENT_PROGRAM);i.activeTexture(i.TEXTURE0);const d=i.getParameter(i.TEXTURE_BINDING_2D),p=i.getParameter(i.FRAMEBUFFER_BINDING),m=i.getParameter(i.ARRAY_BUFFER_BINDING),b=i.getParameter(i.ELEMENT_ARRAY_BUFFER_BINDING);i.disable(i.SCISSOR_TEST),i.disable(i.DEPTH_TEST),i.disable(i.BLEND),i.disable(i.CULL_FACE),i.disable(i.STENCIL_TEST),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),i.bindTexture(i.TEXTURE_2D,e);const g=i.RGBA,v=i.RGBA,E=i.UNSIGNED_BYTE;i.texImage2D(i.TEXTURE_2D,0,g,v,E,t);let A=0,k=0;"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?(A=t.videoWidth,k=t.videoHeight):(A=t.width,k=t.height),k>A&&(k=[A,A=k][0]),this._updateTransforms(r,a);let R=this._getFramebuffer(i,y.dataWidth/4,y.dataHeight),N=this._getVertexBuffer(i),S=this._getIndexBuffer(i),T=this._getGreyscaleShader(i);const x=i.getVertexAttrib(T.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_SIZE),I=i.getVertexAttrib(T.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_TYPE),L=i.getVertexAttrib(T.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_NORMALIZED),z=i.getVertexAttrib(T.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_STRIDE),P=i.getVertexAttribOffset(T.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_POINTER),M=i.getVertexAttrib(T.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_ENABLED),F=i.getVertexAttrib(T.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING),O=i.getVertexAttrib(T.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_SIZE),C=i.getVertexAttrib(T.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_TYPE),V=i.getVertexAttrib(T.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_NORMALIZED),B=i.getVertexAttrib(T.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_STRIDE),U=i.getVertexAttribOffset(T.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_POINTER),j=i.getVertexAttrib(T.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING),D=i.getVertexAttrib(T.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_ENABLED);let K=0,W=0;this._isWebGL2?(K=i.getVertexAttrib(T.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_DIVISOR),W=i.getVertexAttrib(T.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_DIVISOR),i.vertexAttribDivisor(T.aVertexPositionLoc,0),i.vertexAttribDivisor(T.aTextureCoordLoc,0)):this._instancedArraysExtension&&(K=i.getVertexAttrib(T.aVertexPositionLoc,this._instancedArraysExtension.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),W=i.getVertexAttrib(T.aTextureCoordLoc,this._instancedArraysExtension.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),this._instancedArraysExtension.vertexAttribDivisorANGLE(T.aVertexPositionLoc,0),this._instancedArraysExtension.vertexAttribDivisorANGLE(T.aTextureCoordLoc,0)),i.bindFramebuffer(i.FRAMEBUFFER,R),i.viewport(0,0,this._framebufferWidth,this._framebufferHeight),i.clear(i.COLOR_BUFFER_BIT),i.bindBuffer(i.ARRAY_BUFFER,N),i.vertexAttribPointer(T.aVertexPositionLoc,2,i.FLOAT,!1,16,0),i.enableVertexAttribArray(T.aVertexPositionLoc),i.vertexAttribPointer(T.aTextureCoordLoc,2,i.FLOAT,!1,16,8),i.enableVertexAttribArray(T.aTextureCoordLoc),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,S),i.useProgram(T.program),i.uniform1f(T.uTexWidthLoc,y.dataWidth),i.uniformMatrix4fv(T.uUvTransformLoc,!1,this._cameraUvTransform),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e),i.uniform1i(T.uSamplerLoc,0),i.drawElements(i.TRIANGLES,6,i.UNSIGNED_SHORT,0),i.bindBuffer(i.ARRAY_BUFFER,F),i.vertexAttribPointer(T.aVertexPositionLoc,x,I,L,z,P),i.bindBuffer(i.ARRAY_BUFFER,j),i.vertexAttribPointer(T.aTextureCoordLoc,O,C,V,B,U),i.bindBuffer(i.ARRAY_BUFFER,m),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,b),M||i.disableVertexAttribArray(T.aVertexPositionLoc),D||i.disableVertexAttribArray(T.aTextureCoordLoc),this._isWebGL2?(i.vertexAttribDivisor(T.aVertexPositionLoc,K),i.vertexAttribDivisor(T.aTextureCoordLoc,W)):this._instancedArraysExtension&&(this._instancedArraysExtension.vertexAttribDivisorANGLE(T.aVertexPositionLoc,K),this._instancedArraysExtension.vertexAttribDivisorANGLE(T.aTextureCoordLoc,W)),i.bindFramebuffer(i.FRAMEBUFFER,p),i.useProgram(u),i.bindTexture(i.TEXTURE_2D,d),i.activeTexture(l),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,f),n.pop(),s&&i.enable(i.BLEND),c&&i.enable(i.CULL_FACE),o&&i.enable(i.DEPTH_TEST),_&&i.enable(i.SCISSOR_TEST),h&&i.enable(i.STENCIL_TEST)}readFrame(e,t){let r=this._gl,a=new Uint8Array(t);const i=r.getParameter(r.FRAMEBUFFER_BINDING);let n=this._getFramebuffer(r,y.dataWidth/4,y.dataHeight);return r.bindFramebuffer(r.FRAMEBUFFER,n),r.readPixels(0,0,this._framebufferWidth,this._framebufferHeight,r.RGBA,r.UNSIGNED_BYTE,a),r.bindFramebuffer(r.FRAMEBUFFER,i),{uvTransform:this._cameraUvTransform,data:t,texture:e,dataWidth:y.dataWidth,dataHeight:y.dataHeight,userFacing:this._computedFrontCameraRotation}}_updateTransforms(e,t){e==this._computedTransformRotation&&t==this._computedFrontCameraRotation||(this._computedTransformRotation=e,this._computedFrontCameraRotation=t,this._cameraUvTransform=this._getCameraUvTransform())}_getCameraUvTransform(){switch(this._computedTransformRotation){case 270:return new Float32Array([0,1,0,0,-1,0,0,0,0,0,1,0,1,0,0,1]);case 180:return new Float32Array([-1,0,0,0,0,-1,0,0,0,0,1,0,1,1,0,1]);case 90:return new Float32Array([0,-1,0,0,1,0,0,0,0,0,1,0,0,1,0,1])}return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}_getFramebuffer(e,t,r){if(this._framebufferWidth===t&&this._framebufferHeight===r&&this._framebufferId)return this._framebufferId;if(this._framebufferId&&(e.deleteFramebuffer(this._framebufferId),this._framebufferId=null),this._renderTexture&&(e.deleteTexture(this._renderTexture),this._renderTexture=null),this._framebufferId=e.createFramebuffer(),!this._framebufferId)throw new Error("Unable to create framebuffer");if(e.bindFramebuffer(e.FRAMEBUFFER,this._framebufferId),this._renderTexture=e.createTexture(),!this._renderTexture)throw new Error("Unable to create render texture");e.activeTexture(e.TEXTURE0);const a=e.getParameter(e.TEXTURE_BINDING_2D);e.bindTexture(e.TEXTURE_2D,this._renderTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t,r,0,e.RGBA,e.UNSIGNED_BYTE,null),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.texParameterf(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this._renderTexture,0);let i=e.checkFramebufferStatus(e.FRAMEBUFFER);if(i!==e.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer not complete: "+i.toString());return this._framebufferWidth=t,this._framebufferHeight=r,e.bindTexture(e.TEXTURE_2D,a),e.bindFramebuffer(e.FRAMEBUFFER,null),this._framebufferId}_getVertexBuffer(e){if(this._vertexBuffer)return this._vertexBuffer;if(this._vertexBuffer=e.createBuffer(),!this._vertexBuffer)throw new Error("Unable to create vertex buffer");e.bindBuffer(e.ARRAY_BUFFER,this._vertexBuffer);let t=new Float32Array([-1,-1,0,0,-1,1,0,1,1,1,1,1,1,-1,1,0]);return e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),this._vertexBuffer}_getIndexBuffer(e){if(this._indexBuffer)return this._indexBuffer;if(this._indexBuffer=e.createBuffer(),!this._indexBuffer)throw new Error("Unable to create index buffer");e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this._indexBuffer);let t=new Uint16Array([0,1,2,0,2,3]);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,t,e.STATIC_DRAW),this._indexBuffer}_getGreyscaleShader(e){if(this._greyscaleShader)return this._greyscaleShader;let t=e.createProgram();if(!t)throw new Error("Unable to create program");let r=S(e,e.VERTEX_SHADER,P),a=S(e,e.FRAGMENT_SHADER,M);e.attachShader(t,r),e.attachShader(t,a),function(e,t){e.linkProgram(t);let r=e.getProgramInfoLog(t);if(r&&r.trim().length>0)throw new Error("Unable to link: "+r)}(e,t);let i=e.getUniformLocation(t,"uTexWidth");if(!i)throw new Error("Unable to get uniform location uTexWidth");let n=e.getUniformLocation(t,"uUvTransform");if(!n)throw new Error("Unable to get uniform location uUvTransform");let _=e.getUniformLocation(t,"uSampler");if(!_)throw new Error("Unable to get uniform location uSampler");return this._greyscaleShader={program:t,aVertexPositionLoc:e.getAttribLocation(t,"aVertexPosition"),aTextureCoordLoc:e.getAttribLocation(t,"aTextureCoord"),uTexWidthLoc:i,uUvTransformLoc:n,uSamplerLoc:_},this._greyscaleShader}}let x,I,L,z,P="\n attribute vec4 aVertexPosition;\n attribute vec2 aTextureCoord;\n\n varying highp vec2 vTextureCoord1;\n varying highp vec2 vTextureCoord2;\n varying highp vec2 vTextureCoord3;\n varying highp vec2 vTextureCoord4;\n\n uniform float uTexWidth;\n\tuniform mat4 uUvTransform;\n\n void main(void) {\n highp vec2 offset1 = vec2(1.5 / uTexWidth, 0);\n highp vec2 offset2 = vec2(0.5 / uTexWidth, 0);\n\n gl_Position = aVertexPosition;\n vTextureCoord1 = (uUvTransform * vec4(aTextureCoord - offset1, 0, 1)).xy;\n vTextureCoord2 = (uUvTransform * vec4(aTextureCoord - offset2, 0, 1)).xy;\n vTextureCoord3 = (uUvTransform * vec4(aTextureCoord + offset2, 0, 1)).xy;\n vTextureCoord4 = (uUvTransform * vec4(aTextureCoord + offset1, 0, 1)).xy;\n }\n",M="\n varying highp vec2 vTextureCoord1;\n varying highp vec2 vTextureCoord2;\n varying highp vec2 vTextureCoord3;\n varying highp vec2 vTextureCoord4;\n\n uniform sampler2D uSampler;\n\n const lowp vec3 colorWeights = vec3(77.0 / 256.0, 150.0 / 256.0, 29.0 / 256.0);\n\n void main(void) {\n lowp vec4 outpx;\n\n outpx.r = dot(colorWeights, texture2D(uSampler, vTextureCoord1).xyz);\n outpx.g = dot(colorWeights, texture2D(uSampler, vTextureCoord2).xyz);\n outpx.b = dot(colorWeights, texture2D(uSampler, vTextureCoord3).xyz);\n outpx.a = dot(colorWeights, texture2D(uSampler, vTextureCoord4).xyz);\n\n gl_FragColor = outpx;\n }\n";var F=function(e,t,r,a){return new(r||(r=Promise))((function(i,n){function _(e){try{s(a.next(e))}catch(e){n(e)}}function o(e){try{s(a.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(_,o)}s((a=a.apply(e,t||[])).next())}))};let O,C=new class{constructor(){this.onOutgoingMessage=new _,this.onIncomingMessage=new o,this._outgoingMessages=[]}postIncomingMessage(e){this.onIncomingMessage.emit(e)}postOutgoingMessage(e,t){this._outgoingMessages.push({msg:e,transferables:t}),this.onOutgoingMessage.emit()}getOutgoingMessages(){let e=this._outgoingMessages;return this._outgoingMessages=[],e}},V=0;function B(e,r){return F(this,void 0,void 0,(function*(){let a=t({locateFile:(t,r)=>t.endsWith("zappar-cv.wasm")?e:r+t,instantiateWasm:(e,t)=>{const a=new WebAssembly.Instance(r,e);return t(a),a.exports},onRuntimeInitialized:()=>{let e=function(e){let t=e.cwrap("zappar_log_level","number",[]),r=e.cwrap("zappar_log_level_set",null,["number"]),a=e.cwrap("zappar_analytics_project_id_set",null,["string","string"]),i=e.cwrap("zappar_pipeline_create","number",[]),n=e.cwrap("zappar_pipeline_destroy",null,["number"]),_=e.cwrap("zappar_pipeline_frame_update",null,["number"]),o=e.cwrap("zappar_pipeline_frame_number","number",["number"]),s=e.cwrap("zappar_pipeline_camera_model","number",["number"]),c=e.cwrap("zappar_pipeline_camera_frame_user_data","number",["number"]),h=e.cwrap("zappar_pipeline_camera_frame_submit",null,["number","number","number","number","number","number","number","number","number"]),l=e.cwrap("zappar_pipeline_camera_frame_submit_raw_pointer",null,["number","number","number","number","number","number","number","number","number","number","number","number"]),f=e.cwrap("zappar_pipeline_camera_frame_camera_attitude","number",["number"]),u=e.cwrap("zappar_pipeline_camera_frame_device_attitude","number",["number"]),d=e.cwrap("zappar_pipeline_motion_accelerometer_submit",null,["number","number","number","number","number"]),p=e.cwrap("zappar_pipeline_motion_accelerometer_with_gravity_submit_int",null,["number","number","number","number","number","number"]),m=e.cwrap("zappar_pipeline_motion_accelerometer_without_gravity_submit_int",null,["number","number","number","number","number","number"]),b=e.cwrap("zappar_pipeline_motion_rotation_rate_submit",null,["number","number","number","number","number"]),g=e.cwrap("zappar_pipeline_motion_rotation_rate_submit_int",null,["number","number","number","number","number","number"]),w=e.cwrap("zappar_pipeline_motion_attitude_submit",null,["number","number","number","number","number"]),v=e.cwrap("zappar_pipeline_motion_attitude_submit_int",null,["number","number","number","number","number","number"]),E=e.cwrap("zappar_pipeline_motion_attitude_matrix_submit",null,["number","number"]),y=e.cwrap("zappar_camera_source_create","number",["number","string"]),A=e.cwrap("zappar_camera_source_destroy",null,["number"]),k=e.cwrap("zappar_sequence_source_create","number",["number"]),R=e.cwrap("zappar_sequence_source_destroy",null,["number"]),N=e.cwrap("zappar_image_tracker_create","number",["number"]),S=e.cwrap("zappar_image_tracker_destroy",null,["number"]),T=e.cwrap("zappar_image_tracker_target_load_from_memory",null,["number","number","number"]),x=e.cwrap("zappar_image_tracker_target_loaded_version","number",["number"]),I=e.cwrap("zappar_image_tracker_enabled","number",["number"]),L=e.cwrap("zappar_image_tracker_enabled_set",null,["number","number"]),z=e.cwrap("zappar_image_tracker_anchor_count","number",["number"]),P=e.cwrap("zappar_image_tracker_anchor_id","string",["number","number"]),M=e.cwrap("zappar_image_tracker_anchor_pose_raw","number",["number","number"]),F=e.cwrap("zappar_face_tracker_create","number",["number"]),O=e.cwrap("zappar_face_tracker_destroy",null,["number"]),C=e.cwrap("zappar_face_tracker_model_load_from_memory",null,["number","number","number"]),V=e.cwrap("zappar_face_tracker_model_loaded_version","number",["number"]),B=e.cwrap("zappar_face_tracker_enabled_set",null,["number","number"]),U=e.cwrap("zappar_face_tracker_enabled","number",["number"]),j=e.cwrap("zappar_face_tracker_max_faces_set",null,["number","number"]),D=e.cwrap("zappar_face_tracker_max_faces","number",["number"]),K=e.cwrap("zappar_face_tracker_anchor_count","number",["number"]),W=e.cwrap("zappar_face_tracker_anchor_id","string",["number","number"]),Z=e.cwrap("zappar_face_tracker_anchor_pose_raw","number",["number","number"]),X=e.cwrap("zappar_face_tracker_anchor_identity_coefficients","number",["number","number"]),G=e.cwrap("zappar_face_tracker_anchor_expression_coefficients","number",["number","number"]),Y=e.cwrap("zappar_face_mesh_create","number",[]),H=e.cwrap("zappar_face_mesh_destroy",null,["number"]),q=e.cwrap("zappar_face_landmark_create","number",["number"]),$=e.cwrap("zappar_face_landmark_destroy",null,["number"]),J=e.cwrap("zappar_barcode_finder_create","number",["number"]),Q=e.cwrap("zappar_barcode_finder_destroy",null,["number"]),ee=e.cwrap("zappar_barcode_finder_enabled_set",null,["number","number"]),te=e.cwrap("zappar_barcode_finder_enabled","number",["number"]),re=e.cwrap("zappar_barcode_finder_found_number","number",["number"]),ae=e.cwrap("zappar_barcode_finder_found_text","string",["number","number"]),ie=e.cwrap("zappar_barcode_finder_found_format","number",["number","number"]),ne=e.cwrap("zappar_barcode_finder_formats","number",["number"]),_e=e.cwrap("zappar_barcode_finder_formats_set",null,["number","number"]),oe=e.cwrap("zappar_instant_world_tracker_create","number",["number"]),se=e.cwrap("zappar_instant_world_tracker_destroy",null,["number"]),ce=e.cwrap("zappar_instant_world_tracker_enabled_set",null,["number","number"]),he=e.cwrap("zappar_instant_world_tracker_enabled","number",["number"]),le=e.cwrap("zappar_instant_world_tracker_anchor_pose_raw","number",["number"]),fe=e.cwrap("zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw",null,["number","number","number","number","number"]),ue=e.cwrap("zappar_world_tracker_create","number",["number"]),de=e.cwrap("zappar_world_tracker_destroy",null,["number"]),pe=e.cwrap("zappar_world_tracker_enabled","number",["number"]),me=e.cwrap("zappar_world_tracker_enabled_set",null,["number","number"]),be=e.cwrap("zappar_world_tracker_quality","number",["number"]),ge=e.cwrap("zappar_world_tracker_plane_count","number",["number"]),we=e.cwrap("zappar_world_tracker_plane_pose_raw","number",["number","number"]),ve=e.cwrap("zappar_world_tracker_world_anchor_valid","number",["number"]),Ee=e.cwrap("zappar_world_tracker_world_anchor_pose_raw","number",["number"]),ye=e.cwrap("zappar_world_tracker_ground_anchor_valid","number",["number"]),Ae=e.cwrap("zappar_world_tracker_ground_anchor_pose_raw","number",["number"]),ke=e.cwrap("zappar_world_tracker_reset",null,["number"]),Re=32,Ne=e._malloc(Re),Se=(e._malloc(64),new Map),Te=(t,r)=>{let a=Se.get(t);return(!a||a[0]<r)&&(a&&e._free(a[1]),a=[r,e._malloc(r)],Se.set(t,a)),a[1]};return{log_level:()=>t(),log_level_set:e=>r(e),analytics_project_id_set:(e,t)=>a(e,t),pipeline_create:()=>i(),pipeline_destroy:()=>{n()},pipeline_frame_update:e=>_(e),pipeline_frame_number:e=>o(e),pipeline_camera_model:t=>{let r=s(t),a=new Float32Array(6);return a.set(e.HEAPF32.subarray(r/4,6+r/4)),r=a,r},pipeline_camera_frame_user_data:e=>c(e),pipeline_camera_frame_submit:(t,r,a,i,n,_,o,s)=>{Re<r.byteLength&&(e._free(Ne),Re=r.byteLength,Ne=e._malloc(Re));let c=Ne,l=r.byteLength;e.HEAPU8.set(new Uint8Array(r),Ne);let f=a,u=i,d=n,p=Te(4,_.byteLength);e.HEAPF32.set(_,p/4);let m=Te(5,o.byteLength);return e.HEAPF32.set(o,m/4),h(t,c,l,f,u,d,p,m,s?1:0)},pipeline_camera_frame_submit_raw_pointer:(t,r,a,i,n,_,o,s,c,h,f,u)=>{let d=r,p=a,m=i,b=n,g=_,w=o,v=Te(6,s.byteLength);e.HEAPF32.set(s,v/4);let E=c,y=Te(8,h.byteLength);return e.HEAPF32.set(h,y/4),l(t,d,p,m,b,g,w,v,E,y,f?1:0,u)},pipeline_camera_frame_camera_attitude:t=>{let r=f(t),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(r/4,16+r/4)),r=a,r},pipeline_camera_frame_device_attitude:t=>{let r=u(t),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(r/4,16+r/4)),r=a,r},pipeline_motion_accelerometer_submit:(e,t,r,a,i)=>d(e,t,r,a,i),pipeline_motion_accelerometer_with_gravity_submit_int:(e,t,r,a,i,n)=>p(e,t,r,a,i,n),pipeline_motion_accelerometer_without_gravity_submit_int:(e,t,r,a,i,n)=>m(e,t,r,a,i,n),pipeline_motion_rotation_rate_submit:(e,t,r,a,i)=>b(e,t,r,a,i),pipeline_motion_rotation_rate_submit_int:(e,t,r,a,i,n)=>g(e,t,r,a,i,n),pipeline_motion_attitude_submit:(e,t,r,a,i)=>w(e,t,r,a,i),pipeline_motion_attitude_submit_int:(e,t,r,a,i,n)=>v(e,t,r,a,i,n),pipeline_motion_attitude_matrix_submit:(t,r)=>{let a=Te(0,r.byteLength);return e.HEAPF32.set(r,a/4),E(t,a)},camera_source_create:(e,t)=>y(e,t),camera_source_destroy:()=>{A()},sequence_source_create:e=>k(e),sequence_source_destroy:()=>{R()},image_tracker_create:e=>N(e),image_tracker_destroy:()=>{S()},image_tracker_target_load_from_memory:(t,r)=>{Re<r.byteLength&&(e._free(Ne),Re=r.byteLength,Ne=e._malloc(Re));let a=Ne,i=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),Ne),T(t,a,i)},image_tracker_target_loaded_version:e=>x(e),image_tracker_enabled:e=>{let t=I(e);return t=1===t,t},image_tracker_enabled_set:(e,t)=>L(e,t?1:0),image_tracker_anchor_count:e=>z(e),image_tracker_anchor_id:(e,t)=>P(e,t),image_tracker_anchor_pose_raw:(t,r)=>{let a=M(t,r),i=new Float32Array(16);return i.set(e.HEAPF32.subarray(a/4,16+a/4)),a=i,a},face_tracker_create:e=>F(e),face_tracker_destroy:()=>{O()},face_tracker_model_load_from_memory:(t,r)=>{Re<r.byteLength&&(e._free(Ne),Re=r.byteLength,Ne=e._malloc(Re));let a=Ne,i=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),Ne),C(t,a,i)},face_tracker_model_loaded_version:e=>V(e),face_tracker_enabled_set:(e,t)=>B(e,t?1:0),face_tracker_enabled:e=>{let t=U(e);return t=1===t,t},face_tracker_max_faces_set:(e,t)=>j(e,t),face_tracker_max_faces:e=>D(e),face_tracker_anchor_count:e=>K(e),face_tracker_anchor_id:(e,t)=>W(e,t),face_tracker_anchor_pose_raw:(t,r)=>{let a=Z(t,r),i=new Float32Array(16);return i.set(e.HEAPF32.subarray(a/4,16+a/4)),a=i,a},face_tracker_anchor_identity_coefficients:(t,r)=>{let a=X(t,r),i=new Float32Array(50);return i.set(e.HEAPF32.subarray(a/4,50+a/4)),a=i,a},face_tracker_anchor_expression_coefficients:(t,r)=>{let a=G(t,r),i=new Float32Array(29);return i.set(e.HEAPF32.subarray(a/4,29+a/4)),a=i,a},face_mesh_create:()=>Y(),face_mesh_destroy:()=>{H()},face_landmark_create:e=>q(e),face_landmark_destroy:()=>{$()},barcode_finder_create:e=>J(e),barcode_finder_destroy:()=>{Q()},barcode_finder_enabled_set:(e,t)=>ee(e,t?1:0),barcode_finder_enabled:e=>{let t=te(e);return t=1===t,t},barcode_finder_found_number:e=>re(e),barcode_finder_found_text:(e,t)=>ae(e,t),barcode_finder_found_format:(e,t)=>ie(e,t),barcode_finder_formats:e=>ne(e),barcode_finder_formats_set:(e,t)=>_e(e,t),instant_world_tracker_create:e=>oe(e),instant_world_tracker_destroy:()=>{se()},instant_world_tracker_enabled_set:(e,t)=>ce(e,t?1:0),instant_world_tracker_enabled:e=>{let t=he(e);return t=1===t,t},instant_world_tracker_anchor_pose_raw:t=>{let r=le(t),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(r/4,16+r/4)),r=a,r},instant_world_tracker_anchor_pose_set_from_camera_offset_raw:(e,t,r,a,i)=>fe(e,t,r,a,i),world_tracker_create:e=>ue(e),world_tracker_destroy:()=>{de()},world_tracker_enabled:e=>{let t=pe(e);return t=1===t,t},world_tracker_enabled_set:(e,t)=>me(e,t?1:0),world_tracker_quality:e=>be(e),world_tracker_plane_count:e=>ge(e),world_tracker_plane_pose_raw:(t,r)=>{let a=we(t,r),i=new Float32Array(16);return i.set(e.HEAPF32.subarray(a/4,16+a/4)),a=i,a},world_tracker_world_anchor_valid:e=>{let t=ve(e);return t=1===t,t},world_tracker_world_anchor_pose_raw:t=>{let r=Ee(t),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(r/4,16+r/4)),r=a,r},world_tracker_ground_anchor_valid:e=>{let t=ye(e);return t=1===t,t},world_tracker_ground_anchor_pose_raw:t=>{let r=Ae(t),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(r/4,16+r/4)),r=a,r},world_tracker_reset:e=>ke(e)}}(a);const t=function(e){return{worker_message_send_count:e.cwrap("worker_message_send_count","number",[]),worker_message_send_clear:e.cwrap("worker_message_send_clear",null,[]),worker_message_send_data_size:e.cwrap("worker_message_send_data_size","number",["number"]),worker_message_send_data:e.cwrap("worker_message_send_data","number",["number"]),worker_message_send_reference:e.cwrap("worker_message_send_reference","number",["number"]),worker_message_receive:e.cwrap("worker_message_receive",null,["number","number","number"])}}(a);let r=new n(e,((e,t)=>{C.postOutgoingMessage({p:e,t:"zappar",d:t},[t])}));C.postOutgoingMessage("loaded",[]),C.onIncomingMessage.bind((i=>{var n;switch(i.t){case"zappar":r.processBuffer(i.d),C.postOutgoingMessage({t:"buf",d:i.d},[i.d]);break;case"buf":null===(n=r.serializersByPipelineId.get(i.p))||void 0===n||n.bufferReturn(i.d);break;case"cameraFrameC2S":{let n,_=i,o=r._pipeline_by_instance.get(_.p);o&&(e.pipeline_camera_frame_submit(o,_.d,_.width,_.height,_.token,_.c2d,_.cm,_.userFacing),e.pipeline_frame_update(o),n=e.pipeline_camera_frame_device_attitude(o),r.exploreState(),H(a,t));let s={token:_.token,d:_.d,p:_.p,t:"cameraFrameRecycleS2C",att:n};C.postOutgoingMessage(s,[_.d]);break}case"streamC2S":{let n=i;(function(e,t,r,a,i,n,_,o){return F(this,void 0,void 0,(function*(){for(;;){let s;try{s=yield r.getReader()}catch(e){yield G(1e3);continue}try{return void(yield X(e,t,s,a,i,n,_,o))}catch(e){}return void(yield G(1e3))}}))})(a,e,n.s,n.p,n.userFacing,r,n.source,t).then((()=>{let e={t:"streamEndedS2C",p:n.p,source:n.source};C.postOutgoingMessage(e,[])})).catch((e=>{}));break}case"cameraToScreenC2S":V=i.r;break;case"imageBitmapC2S":!function(e,t,r,a){const[i,n]=function(){if(!L||!z){const e=new OffscreenCanvas(1,1);if(z=e.getContext("webgl"),!z)throw new Error("Unable to get offscreen GL context");L=new T(z)}return[L,z]}();if(I||(I=n.createTexture(),n.bindTexture(n.TEXTURE_2D,I),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR)),!I)return;(!x||x.byteLength<y.dataWidth*y.dataHeight)&&(x=new ArrayBuffer(y.dataWidth*y.dataHeight)),i.uploadFrame(I,e.i,e.r,e.userFacing);let _=i.readFrame(I,x),o={t:"imageBitmapS2C",dataWidth:_.dataWidth,dataHeight:_.dataHeight,frame:e.i,userFacing:_.userFacing,uvTransform:_.uvTransform||m(),tokenId:e.tokenId,p:e.p};a.postOutgoingMessage(o,[e.i]);let s=r._pipeline_by_instance.get(e.p);s&&(t.pipeline_camera_frame_submit(s,x,_.dataWidth,_.dataHeight,e.tokenId,e.cameraToDevice,e.cameraModel,_.userFacing),t.pipeline_frame_update(s),r.exploreState())}(i,e,r,C);break;case"sensorDataC2S":{const t=i,a=r._pipeline_by_instance.get(t.p);if(!a)break;switch(t.sensor){case"accel":e.pipeline_motion_accelerometer_submit(a,t.timestamp,t.x,t.y,t.z);break;case"accel_w_gravity_int":e.pipeline_motion_accelerometer_with_gravity_submit_int(a,t.timestamp,t.interval,t.x,t.y,t.z);break;case"accel_wo_gravity_int":e.pipeline_motion_accelerometer_without_gravity_submit_int(a,t.timestamp,t.interval,t.x,t.y,t.z);break;case"attitude_int":e.pipeline_motion_attitude_submit_int(a,t.timestamp,t.interval,t.x,t.y,t.z);break;case"attitude":e.pipeline_motion_attitude_submit(a,t.timestamp,t.x,t.y,t.z);break;case"rotation_rate_int":e.pipeline_motion_rotation_rate_submit_int(a,t.timestamp,t.interval,t.x,t.y,t.z);break;case"rotation_rate":e.pipeline_motion_rotation_rate_submit(a,t.timestamp,t.x,t.y,t.z)}break}case"attitudeMatrixC2S":{const t=i,a=r._pipeline_by_instance.get(t.p);if(!a)break;e.pipeline_motion_attitude_matrix_submit(a,t.m);break}}}))}})}))}let U=0,j=0,D=1;function K(e){return new Promise(((t,r)=>{const a=setTimeout((()=>{r("Frame timeout")}),2e3);e.read().then((e=>{clearTimeout(a),t(e)}))}))}const W=m(),Z=new Float32Array([300,300,160,120,0,0]);function X(e,t,r,a,i,n,_,o){var s,c;return F(this,void 0,void 0,(function*(){for(;;){let f=yield K(r);if(f.done)return void(null===(s=f.value)||void 0===s||s.close());let u=f.value,d=u.allocationSize();d>j&&(U>0&&e._free(U),U=e._malloc(d),j=d),yield u.copyTo(e.HEAPU8.subarray(U,U+j));let p=D;D++;const m=u.visibleRect.width,g=u.visibleRect.height;let w,v=m,E=g;switch(V){case 270:w=new Float32Array([0,1,0,0,-1,0,0,0,0,0,1,0,1,0,0,1]),v=g,E=m;break;case 180:w=new Float32Array([-1,0,0,0,0,-1,0,0,0,0,1,0,1,1,0,1]);break;case 90:w=new Float32Array([0,-1,0,0,1,0,0,0,0,0,1,0,0,1,0,1]),v=g,E=m;break;default:w=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}let A=u.clone();i?(l=[-1,1,-1],(h=W)[0]=l[0],h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=l[1],h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=l[2],h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1):b(W);let k=300*y.dataWidth/320;Z[0]=k,Z[1]=k,Z[2]=.5*y.dataWidth,Z[3]=.5*y.dataHeight;const R={token:p,d:A,p:a,t:"videoFrameS2C",userFacing:i,uvTransform:w,w:v,h:E,cameraToDevice:W,cameraModel:Z,source:_};C.postOutgoingMessage(R,[R.d,R.uvTransform.buffer]);const N=n._pipeline_by_instance.get(a);if(N){try{t.pipeline_camera_frame_submit_raw_pointer(N,U,d,Y(u.format),m,g,p,W,V,Z,i,null!==(c=u.timestamp)&&void 0!==c?c:-1),H(e,o)}catch(e){console.log("Exception during camera processing",e)}t.pipeline_frame_update(N),n.exploreState()}u.close()}var h,l}))}function G(e){return new Promise((t=>{setTimeout(t,e)}))}function Y(e){switch(e){case"I420":return f.FRAME_PIXEL_FORMAT_I420;case"I420A":return f.FRAME_PIXEL_FORMAT_I420A;case"I422":return f.FRAME_PIXEL_FORMAT_I422;case"I444":return f.FRAME_PIXEL_FORMAT_I444;case"NV12":return f.FRAME_PIXEL_FORMAT_NV12;case"RGBA":case"RGBX":return f.FRAME_PIXEL_FORMAT_RGBA;case"BGRA":case"BGRX":return f.FRAME_PIXEL_FORMAT_BGRA}return f.FRAME_PIXEL_FORMAT_Y}function H(e,t){const r=t.worker_message_send_count();if(0!==r){O||(O=new MessageChannel,O.port1.start(),O.port1.addEventListener("message",(r=>{if("msgrec"!==r.data.t)return;const a=r.data.data,i=e._malloc(a.byteLength);e.HEAPU8.set(a,i),t.worker_message_receive(r.data.reference,a.byteLength,i),e._free(i)})),C.postOutgoingMessage({t:"setupCeresWorker",port:O.port2},[O.port2]));for(let a=0;a<r;a++){const r=t.worker_message_send_reference(a),i=t.worker_message_send_data_size(a),n=t.worker_message_send_data(a),_=e.HEAPU8.slice(n,n+i);O.port1.postMessage({t:"msgsend",data:_,reference:r},[_.buffer])}t.worker_message_send_clear()}}const q=self;C.onOutgoingMessage.bind((()=>{let e=C.getOutgoingMessages();for(let t of e)q.postMessage(t.msg,t.transferables)}));let $=e=>{e&&e.data&&"wasm"===e.data.t&&(B(location.href.startsWith("blob")?e.data.url:new URL(r(751),r.b).toString(),e.data.module),q.removeEventListener("message",$))};q.addEventListener("message",$),q.addEventListener("message",(e=>{C.postIncomingMessage(e.data)}))})()})();
|