@zappar/zappar-cv 2.0.0 → 2.1.0-beta.0
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/CHANGELOG.md +9 -0
- package/README.md +2 -2
- package/lib/permission.js +4 -3
- package/lib/tr.d.ts +6 -0
- package/lib/tr.js +42 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/zappar-cv.wasm +0 -0
- package/package.json +1 -1
- package/umd/56.zappar-cv.js +1 -1
- package/umd/{ad56c9a01f0d026178a3.wasm → 70a4106e0fc426006459.wasm} +0 -0
- package/umd/zappar-cv.js +1 -1
- package/umd/zappar-cv.worker.js +1 -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",h="architecture",m="console",b="mobile",w="tablet",g="smarttv",y="wearable",v="embedded",E="Amazon",A="Apple",T="ASUS",x="BlackBerry",k="Google",R="Huawei",L="LG",F="Microsoft",z="Motorola",M="Samsung",I="Sony",P="Xiaomi",O="Zebra",S="Facebook",B=function(e){var t={};for(var r in e)t[e[r].toUpperCase()]=e[r];return t},D=function(e,t){return typeof e===c&&-1!==C(t).indexOf(C(e))},C=function(e){return e.toLowerCase()},U=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===s?e:e.substring(0,255)},V=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}},N=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(D(t[r][i],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"},W={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,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[p,[f,"Opera"]],[/(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)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[f,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[f,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/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 Browser"],p],[/\bfocus\/([\w\.]+)/i],[p,[f,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[p,[f,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[f,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[f,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[p,[f,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 Browser"],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],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,S],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,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,"Chrome WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[f,"Android Browser"]],[/(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,N,{"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,"Firefox 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]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,C]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",C]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,C]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,M],[l,w]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,M],[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]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,R],[l,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[u,[d,R],[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)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[d,P],[l,b]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,P],[l,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\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,z],[l,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,z],[l,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,L],[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,L],[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,k],[l,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,k],[l,b]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,I],[l,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,I],[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,x],[l,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,T],[l,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,T],[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)[-_ ]?([-\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,"Sharp"],[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,O],[l,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,O],[l,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[l,m]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[l,m]],[/(playstation [345portablevi]+)/i],[u,[d,I],[l,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,F],[l,m]],[/smart-tv.+(samsung)/i],[d,[l,g]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,M],[l,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,L],[l,g]],[/(apple) ?tv/i],[d,[u,"Apple TV"],[l,g]],[/crkey/i],[[u,"Chromecast"],[d,k],[l,g]],[/droid.+aft(\w)( bui|\))/i],[u,[d,E],[l,g]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[l,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,U],[u,U],[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,k],[l,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,O],[l,y]],[/(quest( 2)?)/i],[u,[d,S],[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(?:[;\/]| 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,N,G]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,"Windows"],[p,N,G]],[/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)/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,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[f,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[f,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[f,"Chromecast"]],[/(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]]},H=function(e,t){if(typeof e===_&&(t=e,e=n),!(this instanceof H))return new H(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}(W,t):W;return this.getBrowser=function(){var e,t={};return t.name=n,t.version=n,V.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.architecture=n,V.call(e,r,i.cpu),e},this.getDevice=function(){var e={};return e.vendor=n,e.model=n,e.type=n,V.call(e,r,i.device),e},this.getEngine=function(){var e={};return e.name=n,e.version=n,V.call(e,r,i.engine),e},this.getOS=function(){var e={};return e.name=n,e.version=n,V.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>255?U(e,255):e,this},this.setUA(r),this};H.VERSION="0.7.30",H.BROWSER=B([f,p,"major"]),H.CPU=B([h]),H.DEVICE=B([u,d,l,m,b,g,w,y,v]),H.ENGINE=H.OS=B([f,p]),typeof t!==s?(e.exports&&(t=e.exports=H),t.UAParser=H):r.amdO?(i=function(){return H}.call(t,r,t,e))===n||(e.exports=i):typeof a!==s&&(a.UAParser=H);var Y=typeof a!==s&&(a.jQuery||a.Zepto);if(Y&&!Y.ua){var X=new H;Y.ua=X.getResult(),Y.ua.get=function(){return X.getUA()},Y.ua.set=function(e){X.setUA(e);var t=X.getResult();for(var r in t)Y.ua[r]=t[r]}}}("object"==typeof window?window:this)},751:(e,t,r)=>{"use strict";e.exports=r.p+"ad56c9a01f0d026178a3.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 h=r.noExitRuntime||!0;"object"!=typeof WebAssembly&&K("no native wasm support detected");var m,b,w=!1;function g(e,t){e||K("Assertion failed: "+t)}function y(e){var t=r["_"+e];return g(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function v(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=gr(r),O(e,T,t,r)}return t},array:function(e){var t=gr(e.length);return A.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=br()),s[_]=c(i[_])):s[_]=i[_]}return a=r=o.apply(null,s),r="string"===t?P(a):"boolean"===t?!!a:a,0!==e&&wr(e),r}var E,A,T,x,k,R,L,F,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 P(e,t){return e?I(T,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 S(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 B(e){var t=S(e)+1,r=fr(t);return r&&O(e,A,r,t),r}function D(e,t){for(var r=0;r<e.length;++r)A[t++>>0]=e.charCodeAt(r);A[t>>0]=0}function C(){var e=m.buffer;E=e,r.HEAP8=A=new Int8Array(e),r.HEAP16=x=new Int16Array(e),r.HEAP32=R=new Int32Array(e),r.HEAPU8=T=new Uint8Array(e),r.HEAPU16=k=new Uint16Array(e),r.HEAPU32=L=new Uint32Array(e),r.HEAPF32=F=new Float32Array(e),r.HEAPF64=z=new Float64Array(e)}var U,V=[],N=[],G=[],W=[];function H(){var e=r.preRun.shift();V.unshift(e)}var Y=0,X=null,q=null;function Z(){Y++,r.monitorRunDependencies&&r.monitorRunDependencies(Y)}function j(){if(Y--,r.monitorRunDependencies&&r.monitorRunDependencies(Y),0==Y&&(null!==X&&(clearInterval(X),X=null),q)){var e=q;q=null,e()}}function K(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 J="zappar-cv.wasm";if(String.prototype.startsWith?!J.startsWith("data:application/octet-stream;base64,"):0!==J.indexOf("data:application/octet-stream;base64,")){var $=J;J=r.locateFile?r.locateFile($,u):u+$}var Q,ee,te,re={490708:function(){if(self.crypto&&self.crypto.getRandomValues){var e=new Uint32Array(1);return self.crypto.getRandomValues(e),e[0]}return 9007199254740991*Math.random()}};function ie(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t(r);else{var i=t.wd;"number"==typeof i?void 0===t.Pc?U.get(i)():U.get(i)(t.Pc):i(void 0===t.Pc?null:t.Pc)}}}function ae(e,t){if(0===e)e=Date.now();else{if(1!==e&&4!==e)return R[dr()>>2]=28,-1;e=te()}return R[t>>2]=e/1e3|0,R[t+4>>2]=e%1e3*1e6|0,0}function ne(e){this.Ic=e-16,this.Nd=function(e){R[this.Ic+8>>2]=e},this.Kd=function(e){R[this.Ic+0>>2]=e},this.Ld=function(){R[this.Ic+4>>2]=0},this.Jd=function(){A[this.Ic+12>>0]=0},this.Md=function(){A[this.Ic+13>>0]=0},this.zd=function(e,t){this.Nd(e),this.Kd(t),this.Ld(),this.Jd(),this.Md()}}function oe(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 se(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=oe(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function _e(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 ce(e){if("/"===e)return"/";var t=(e=(e=se(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)}function ue(){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=oe(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."}te=function(){return performance.now()};var fe=[];function le(e,t){fe[e]={input:[],xc:[],Hc:t},De(e,de)}var de={open:function(e){var t=fe[e.node.Mc];if(!t)throw new Te(43);e.vc=t,e.seekable=!1},close:function(e){e.vc.Hc.flush(e.vc)},flush:function(e){e.vc.Hc.flush(e.vc)},read:function(e,t,r,i){if(!e.vc||!e.vc.Hc.jd)throw new Te(60);for(var a=0,n=0;n<i;n++){try{var o=e.vc.Hc.jd(e.vc)}catch(e){throw new Te(29)}if(void 0===o&&0===a)throw new Te(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.vc||!e.vc.Hc.ad)throw new Te(60);try{for(var a=0;a<i;a++)e.vc.Hc.ad(e.vc,t[r+a])}catch(e){throw new Te(29)}return i&&(e.node.timestamp=Date.now()),a}},pe={jd: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=sr(t,!0)}return e.input.shift()},ad:function(e,t){null===t||10===t?(d(I(e.xc,0)),e.xc=[]):0!=t&&e.xc.push(t)},flush:function(e){e.xc&&0<e.xc.length&&(d(I(e.xc,0)),e.xc=[])}},he={ad:function(e,t){null===t||10===t?(p(I(e.xc,0)),e.xc=[]):0!=t&&e.xc.push(t)},flush:function(e){e.xc&&0<e.xc.length&&(p(I(e.xc,0)),e.xc=[])}},me={Ac:null,Cc:function(){return me.createNode(null,"/",16895,0)},createNode:function(e,t,r,i){if(24576==(61440&r)||4096==(61440&r))throw new Te(63);return me.Ac||(me.Ac={dir:{node:{zc:me.rc.zc,Bc:me.rc.Bc,Kc:me.rc.Kc,Rc:me.rc.Rc,od:me.rc.od,Xc:me.rc.Xc,pd:me.rc.pd,Sc:me.rc.Sc,Tc:me.rc.Tc},stream:{Fc:me.tc.Fc}},file:{node:{zc:me.rc.zc,Bc:me.rc.Bc},stream:{Fc:me.tc.Fc,read:me.tc.read,write:me.tc.write,dd:me.tc.dd,kd:me.tc.kd,md:me.tc.md}},link:{node:{zc:me.rc.zc,Bc:me.rc.Bc,Nc:me.rc.Nc},stream:{}},ed:{node:{zc:me.rc.zc,Bc:me.rc.Bc},stream:Be}}),16384==(61440&(r=ze(e,t,r,i)).mode)?(r.rc=me.Ac.dir.node,r.tc=me.Ac.dir.stream,r.sc={}):32768==(61440&r.mode)?(r.rc=me.Ac.file.node,r.tc=me.Ac.file.stream,r.uc=0,r.sc=null):40960==(61440&r.mode)?(r.rc=me.Ac.link.node,r.tc=me.Ac.link.stream):8192==(61440&r.mode)&&(r.rc=me.Ac.ed.node,r.tc=me.Ac.ed.stream),r.timestamp=Date.now(),e&&(e.sc[t]=r,e.timestamp=r.timestamp),r},Zd:function(e){return e.sc?e.sc.subarray?e.sc.subarray(0,e.uc):new Uint8Array(e.sc):new Uint8Array(0)},fd:function(e,t){var r=e.sc?e.sc.length:0;r>=t||(t=Math.max(t,r*(1048576>r?2:1.125)>>>0),0!=r&&(t=Math.max(t,256)),r=e.sc,e.sc=new Uint8Array(t),0<e.uc&&e.sc.set(r.subarray(0,e.uc),0))},Hd:function(e,t){if(e.uc!=t)if(0==t)e.sc=null,e.uc=0;else{var r=e.sc;e.sc=new Uint8Array(t),r&&e.sc.set(r.subarray(0,Math.min(t,e.uc))),e.uc=t}},rc:{zc:function(e){var t={};return t.ud=8192==(61440&e.mode)?e.id:1,t.$c=e.id,t.mode=e.mode,t.Fd=1,t.uid=0,t.xd=0,t.Mc=e.Mc,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.uc:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.qd=new Date(e.timestamp),t.Ed=new Date(e.timestamp),t.td=new Date(e.timestamp),t.rd=4096,t.sd=Math.ceil(t.size/t.rd),t},Bc:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&me.Hd(e,t.size)},Kc:function(){throw xe[44]},Rc:function(e,t,r,i){return me.createNode(e,t,r,i)},od:function(e,t,r){if(16384==(61440&e.mode)){try{var i=Fe(t,r)}catch(e){}if(i)for(var a in i.sc)throw new Te(55)}delete e.parent.sc[e.name],e.parent.timestamp=Date.now(),e.name=r,t.sc[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},Xc:function(e,t){delete e.sc[t],e.timestamp=Date.now()},pd:function(e,t){var r,i=Fe(e,t);for(r in i.sc)throw new Te(55);delete e.sc[t],e.timestamp=Date.now()},Sc:function(e){var t,r=[".",".."];for(t in e.sc)e.sc.hasOwnProperty(t)&&r.push(t);return r},Tc:function(e,t,r){return(e=me.createNode(e,t,41471,0)).link=r,e},Nc:function(e){if(40960!=(61440&e.mode))throw new Te(28);return e.link}},tc:{read:function(e,t,r,i,a){var n=e.node.sc;if(a>=e.node.uc)return 0;if(8<(e=Math.min(e.node.uc-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===A.buffer&&(n=!1),!i)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.sc||e.sc.subarray)){if(n)return e.sc=t.subarray(r,r+i),e.uc=i;if(0===e.uc&&0===a)return e.sc=t.slice(r,r+i),e.uc=i;if(a+i<=e.uc)return e.sc.set(t.subarray(r,r+i),a),i}if(me.fd(e,a+i),e.sc.subarray&&t.subarray)e.sc.set(t.subarray(r,r+i),a);else for(n=0;n<i;n++)e.sc[a+n]=t[r+n];return e.uc=Math.max(e.uc,a+i),i},Fc:function(e,t,r){if(1===r?t+=e.position:2===r&&32768==(61440&e.node.mode)&&(t+=e.node.uc),0>t)throw new Te(28);return t},dd:function(e,t,r){me.fd(e.node,t+r),e.node.uc=Math.max(e.node.uc,t+r)},kd:function(e,t,r,i,a,n){if(0!==t)throw new Te(28);if(32768!=(61440&e.node.mode))throw new Te(43);if(e=e.node.sc,2&n||e.buffer!==E){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=fr(n);r<n;)A[t+r++]=0;if(!(r=t))throw new Te(48);A.set(e,r)}else i=!1,r=e.byteOffset;return{Ic:r,Vd:i}},md:function(e,t,r,i,a){if(32768!=(61440&e.node.mode))throw new Te(43);return 2&a||me.tc.write(e,t,0,i,r,!1),0}}},be=null,we={},ge=[],ye=1,ve=null,Ee=!0,Ae={},Te=null,xe={};function ke(e,t){if(t=t||{},!(e=ue("/",e)))return{path:"",node:null};var r,i={gd:!0,bd:0};for(r in i)void 0===t[r]&&(t[r]=i[r]);if(8<t.bd)throw new Te(32);e=oe(e.split("/").filter((function(e){return!!e})),!1);var a=be;for(i="/",r=0;r<e.length;r++){var n=r===e.length-1;if(n&&t.parent)break;if(a=Fe(a,e[r]),i=se(i+"/"+e[r]),a.Lc&&(!n||n&&t.gd)&&(a=a.Lc.root),!n||t.Qc)for(n=0;40960==(61440&a.mode);)if(a=We(i),a=ke(i=ue(_e(i),a),{bd:t.bd}).node,40<n++)throw new Te(32)}return{path:i,node:a}}function Re(e){for(var t;;){if(e===e.parent)return e=e.Cc.ld,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}}function Le(e,t){for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%ve.length}function Fe(e,t){var r;if(r=(r=Pe(e,"x"))?r:e.rc.Kc?0:2)throw new Te(r,e);for(r=ve[Le(e.id,t)];r;r=r.Gc){var i=r.name;if(r.parent.id===e.id&&i===t)return r}return e.rc.Kc(e,t)}function ze(e,t,r,i){return t=Le((e=new or(e,t,r,i)).parent.id,e.name),e.Gc=ve[t],ve[t]=e}var Me={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Ie(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function Pe(e,t){return Ee||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2}function Oe(e,t){try{return Fe(e,t),20}catch(e){}return Pe(e,"wx")}var Se,Be={open:function(e){e.tc=we[e.node.Mc].tc,e.tc.open&&e.tc.open(e)},Fc:function(){throw new Te(70)}};function De(e,t){we[e]={tc:t}}function Ce(e,t){var r="/"===t,i=!t;if(r&&be)throw new Te(10);if(!r&&!i){var a=ke(t,{gd:!1});if(t=a.path,(a=a.node).Lc)throw new Te(10);if(16384!=(61440&a.mode))throw new Te(54)}t={type:e,ce:{},ld:t,Dd:[]},(e=e.Cc(t)).Cc=t,t.root=e,r?be=e:a&&(a.Lc=t,a.Cc&&a.Cc.Dd.push(t))}function Ue(e,t,r){var i=ke(e,{parent:!0}).node;if(!(e=ce(e))||"."===e||".."===e)throw new Te(28);var a=Oe(i,e);if(a)throw new Te(a);if(!i.rc.Rc)throw new Te(63);return i.rc.Rc(i,e,t,r)}function Ve(e){return Ue(e,16895,0)}function Ne(e,t,r){void 0===r&&(r=t,t=438),Ue(e,8192|t,r)}function Ge(e,t){if(!ue(e))throw new Te(44);var r=ke(t,{parent:!0}).node;if(!r)throw new Te(44);var i=Oe(r,t=ce(t));if(i)throw new Te(i);if(!r.rc.Tc)throw new Te(63);r.rc.Tc(r,t,e)}function We(e){if(!(e=ke(e).node))throw new Te(44);if(!e.rc.Nc)throw new Te(28);return ue(Re(e.parent),e.rc.Nc(e))}function He(e,t){if(!(e=ke(e,{Qc:!t}).node))throw new Te(44);if(!e.rc.zc)throw new Te(63);return e.rc.zc(e)}function Ye(e){return He(e,!0)}function Xe(e,t,i,a){if(""===e)throw new Te(44);if("string"==typeof t){var n=Me[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=se(e);try{o=ke(e,{Qc:!(131072&t)}).node}catch(e){}}if(n=!1,64&t)if(o){if(128&t)throw new Te(20)}else o=Ue(e,i,0),n=!0;if(!o)throw new Te(44);if(8192==(61440&o.mode)&&(t&=-513),65536&t&&16384!=(61440&o.mode))throw new Te(54);if(!n&&(i=o?40960==(61440&o.mode)?32:16384==(61440&o.mode)&&("r"!==Ie(t)||512&t)?31:Pe(o,Ie(t)):44))throw new Te(i);if(512&t){if(!(i="string"==typeof(i=o)?ke(i,{Qc:!0}).node:i).rc.Bc)throw new Te(63);if(16384==(61440&i.mode))throw new Te(31);if(32768!=(61440&i.mode))throw new Te(28);if(n=Pe(i,"w"))throw new Te(n);i.rc.Bc(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(!ge[e])return e;throw new Te(33)}(t),e.Dc=t,ge[t]=e}({node:o,path:Re(o),flags:t,seekable:!0,position:0,tc:o.tc,Sd:[],error:!1},a)).tc.open&&a.tc.open(a),!r.logReadFiles||1&t||($e||($e={}),e in $e||($e[e]=1,p("FS.trackingDelegate error on read file: "+e)));try{Ae.onOpenFile&&(o=0,1!=(2097155&t)&&(o|=1),0!=(2097155&t)&&(o|=2),Ae.onOpenFile(e,o))}catch(t){p("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+t.message)}return a}function qe(e,t,r){if(null===e.Dc)throw new Te(8);if(!e.seekable||!e.tc.Fc)throw new Te(70);if(0!=r&&1!=r&&2!=r)throw new Te(28);return e.position=e.tc.Fc(e,t,r),e.Sd=[],e.position}function Ze(){Te||((Te=function(e,t){this.node=t,this.Id=function(e){this.wc=e},this.Id(e),this.message="FS error"}).prototype=Error(),Te.prototype.constructor=Te,[44].forEach((function(e){xe[e]=new Te(e),xe[e].stack="<generic error, no stack>"})))}function je(e,t,r){e=se("/dev/"+e);var i=function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r}(!!t,!!r);Ke||(Ke=64);var a=Ke++<<8|0;De(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 Te(29)}if(void 0===s&&0===n)throw new Te(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 Te(29)}return a&&(e.node.timestamp=Date.now()),n}}),Ne(e,i,a)}var Ke,Je,$e,Qe={};function et(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&se(t)!==se(Re(e.node)))return-54;throw e}return R[r>>2]=i.ud,R[r+4>>2]=0,R[r+8>>2]=i.$c,R[r+12>>2]=i.mode,R[r+16>>2]=i.Fd,R[r+20>>2]=i.uid,R[r+24>>2]=i.xd,R[r+28>>2]=i.Mc,R[r+32>>2]=0,ee=[i.size>>>0,(Q=i.size,1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[r+40>>2]=ee[0],R[r+44>>2]=ee[1],R[r+48>>2]=4096,R[r+52>>2]=i.sd,R[r+56>>2]=i.qd.getTime()/1e3|0,R[r+60>>2]=0,R[r+64>>2]=i.Ed.getTime()/1e3|0,R[r+68>>2]=0,R[r+72>>2]=i.td.getTime()/1e3|0,R[r+76>>2]=0,ee=[i.$c>>>0,(Q=i.$c,1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[r+80>>2]=ee[0],R[r+84>>2]=ee[1],0}var tt=void 0;function rt(){return R[(tt+=4)-4>>2]}function it(e){if(!(e=ge[e]))throw new Te(8);return e}function at(e){try{e()}catch(e){if(!(e instanceof yr)&&"unwind"!==e)throw e&&"object"==typeof e&&e.stack&&p("exception thrown: "+[e,e.stack]),e}}var nt,ot,st,_t=!1,ct=null,ut=0,ft=null,lt=0,dt=0,pt=0,ht=[],mt={},bt=!1,wt=!1,gt=[];function yt(e,t,i,a){if(t&&r.Zc&&e==r.canvas)return r.Zc;var n;if(t){var o={antialias:!1,alpha:!1,Cd:1};if(a)for(var s in a)o[s]=a[s];if(void 0!==$t&&(n=function(e,t){e.hd||(e.hd=e.getContext,e.getContext=function(t,r){return"webgl"==t==(r=e.hd(t,r))instanceof WebGLRenderingContext?r:null});var r=e.getContext("webgl",t);return r?function(e,t){var r=Zt(qt),i={$d:r,attributes:t,version:t.Cd,Yc:e};return e.canvas&&(e.canvas.Ud=i),qt[r]=i,(void 0===t.vd||t.vd)&&function(e){if(e||(e=Kt),!e.Ad){e.Ad=!0;var t=e.Yc;!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.Xd=t.getExtension("EXT_disjoint_timer_query"),t.ae=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 _=qt[n].Yc}else _=e.getContext("2d");return _?(i&&(t||g(void 0===ar,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),r.Zc=_,t&&(Kt=qt[n],r.Zc=ar=Kt&&Kt.Yc),r.fe=t,gt.forEach((function(e){e()})),function(){function e(){wt=document.pointerLockElement===r.canvas||document.mozPointerLockElement===r.canvas||document.webkitPointerLockElement===r.canvas||document.msPointerLockElement===r.canvas}if(r.preloadPlugins||(r.preloadPlugins=[]),!Ft){Ft=!0;try{zt=!0}catch(e){zt=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Mt="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:zt?null:console.log("warning: no BlobBuilder"),It="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,r.nd||void 0!==It||(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),r.nd=!0),r.preloadPlugins.push({canHandle:function(e){return!r.nd&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,i,a){var n=null;if(zt)try{(n=new Blob([e],{type:Lt(t)})).size!==e.length&&(n=new Blob([new Uint8Array(e).buffer],{type:Lt(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 Mt).append(new Uint8Array(e).buffer),n=n.getBlob());var o=It.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,It.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.be&&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(!zt)return o();try{var _=new Blob([e],{type:Lt(t)})}catch(e){return o()}_=It.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=_,Rt((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){!wt&&r.canvas.requestPointerLock&&(r.canvas.requestPointerLock(),e.preventDefault())}),!1))}}()),_):null}var vt=!1,Et=void 0,At=void 0;function Tt(){return!!bt&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)}var xt=0;function kt(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 Rt(e,t){setTimeout((function(){at(e)}),t)}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 Ft,zt,Mt,It,Pt=[];function Ot(){var e=r.canvas;Pt.forEach((function(t){t(e.width,e.height)}))}function St(e,t,i){t&&i?(e.Td=t,e.yd=i):(t=e.Td,i=e.yd);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)}At?(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 Bt(){return!1}r._emscripten_is_main_browser_thread=Bt;var Dt,Ct=[];function Ut(e,t){L[e>>2]=t,L[e+4>>2]=t/4294967296|0}function Vt(e,t,r,i,a){function n(t){var r=0,i=0;t&&(i=y.response?y.response.byteLength:0,r=fr(i),T.set(new Uint8Array(y.response),r)),L[e+12>>2]=r,Ut(e+16,i)}var o=L[e+8>>2];if(o){var s=P(o),_=e+112,c=P(_);c||(c="GET");var u=L[_+52>>2],f=L[_+56>>2],l=!!L[_+60>>2],d=L[_+68>>2],p=L[_+72>>2];o=L[_+76>>2];var h=L[_+80>>2],m=L[_+84>>2];_=L[_+88>>2];var b=!!(1&u),w=!!(2&u);u=!!(64&u),d=d?P(d):void 0,p=p?P(p):void 0;var g=h?P(h):void 0,y=new XMLHttpRequest;if(y.withCredentials=l,y.open(c,s,!u,d,p),u||(y.timeout=f),y.de=s,y.responseType="arraybuffer",h&&y.overrideMimeType(g),o)for(;(c=L[o>>2])&&(s=L[o+4>>2]);)o+=8,c=P(c),s=P(s),y.setRequestHeader(c,s);Ct.push(y),L[e+0>>2]=Ct.length,o=m&&_?T.slice(m,m+_):null,y.onload=function(i){n(b&&!w);var a=y.response?y.response.byteLength:0;Ut(e+24,0),a&&Ut(e+32,a),k[e+40>>1]=y.readyState,k[e+42>>1]=y.status,y.statusText&&O(y.statusText,T,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;Ut(e+24,0),Ut(e+32,y.response?y.response.byteLength:0),k[e+40>>1]=y.readyState,k[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=fr(r),T.set(new Uint8Array(y.response),a)),L[e+12>>2]=a,Ut(e+16,r),Ut(e+24,t.loaded-r),Ut(e+32,t.total),k[e+40>>1]=y.readyState,3<=y.readyState&&0===y.status&&0<t.loaded&&(y.status=200),k[e+42>>1]=y.status,y.statusText&&O(y.statusText,T,e+44,64),i&&i(e,y,t),a&&ur(a)},y.onreadystatechange=function(t){k[e+40>>1]=y.readyState,2<=y.readyState&&(k[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 Nt(e,t,r,i){var a=Dt;if(a){var n=L[e+112+64>>2];n||(n=L[e+8>>2]);var o=P(n);try{var s=a.transaction(["FILES"],"readwrite").objectStore("FILES").put(t,o);s.onsuccess=function(){k[e+40>>1]=4,k[e+42>>1]=200,O("OK",T,e+44,64),r(e,0,o)},s.onerror=function(t){k[e+40>>1]=4,k[e+42>>1]=413,O("Payload Too Large",T,e+44,64),i(e,0,t)}}catch(t){i(e,0,t)}}else i(e,0,"IndexedDB not available!")}var Gt,Wt={};function Ht(){if(!Gt){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 Wt)t[e]=Wt[e];var r=[];for(e in t)r.push(e+"="+t[e]);Gt=r}return Gt}var Yt=1,Xt=[],qt=[];function Zt(e){for(var t=Yt++,r=e.length;r<t;r++)e[r]=null;return t}var jt,Kt,Jt,$t={};function Qt(e){return 0==e%4&&(0!=e%100||0==e%400)}function er(e,t){for(var r=0,i=0;i<=t;r+=e[i++]);return r}var tr=[31,29,31,30,31,30,31,31,30,31,30,31],rr=[31,28,31,30,31,30,31,31,30,31,30,31];function ir(e,t){for(e=new Date(e.getTime());0<t;){var r=e.getMonth(),i=(Qt(e.getFullYear())?tr:rr)[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}var ar,nr=[];function or(e,t,r,i){e||(e=this),this.parent=e,this.Cc=e.Cc,this.Lc=null,this.id=ye++,this.name=t,this.mode=r,this.rc={},this.tc={},this.Mc=i}function sr(e,t){var r=Array(S(e)+1);return e=O(e,r,0,r.length),t&&(r.length=e),r}Object.defineProperties(or.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}}}),Ze(),ve=Array(4096),Ce(me,"/"),Ve("/tmp"),Ve("/home"),Ve("/home/web_user"),function(){Ve("/dev"),De(259,{read:function(){return 0},write:function(e,t,r,i){return i}}),Ne("/dev/null",259),le(1280,pe),le(1536,he),Ne("/dev/tty",1280),Ne("/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(){K("randomDevice")}}();je("random",e),je("urandom",e),Ve("/dev/shm"),Ve("/dev/shm/tmp")}(),function(){Ve("/proc");var e=Ve("/proc/self");Ve("/proc/self/fd"),Ce({Cc:function(){var t=ze(e,"fd",16895,73);return t.rc={Kc:function(e,t){var r=ge[+t];if(!r)throw new Te(8);return(e={parent:null,Cc:{ld:"fake"},rc:{Nc:function(){return r.path}}}).parent=e}},t}},"/proc/self/fd")}(),r.requestFullscreen=function(e,t){!function(e,t){function i(){bt=!1;var e=a.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(a.exitFullscreen=Tt,Et&&a.requestPointerLock(),bt=!0,At?("undefined"!=typeof SDL&&(R[SDL.screen>>2]=8388608|L[SDL.screen>>2]),St(r.canvas),Ot()):St(a)):(e.parentNode.insertBefore(a,e),e.parentNode.removeChild(e),At?("undefined"!=typeof SDL&&(R[SDL.screen>>2]=-8388609&L[SDL.screen>>2]),St(r.canvas),Ot()):St(a)),r.onFullScreen&&r.onFullScreen(bt),r.onFullscreen&&r.onFullscreen(bt)}void 0===(Et=e)&&(Et=!0),void 0===(At=t)&&(At=!1);var a=r.canvas;vt||(vt=!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){St(r.canvas,e,t),i||Ot()},r.pauseMainLoop=function(){ct=null,ut++},r.resumeMainLoop=function(){ut++;var e=lt,t=dt,i=ft;ft=null,function(e){function t(){if(i<ut){if(!h)try{Er(b)}catch(e){if(!(e instanceof yr))throw e}return!1}return!0}g(!ft,"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."),ft=e;var i=ut;_t=!1,ot=function(){if(!w)if(0<ht.length){var i=Date.now(),a=ht.shift();if(a.wd(a.Pc),st){var n=st,o=0==n%1?n-1:Math.floor(n);st=a.Wd?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=mt.Yd,(a=st)?a<n?r.setStatus(i+" ("+(n-a)+"/"+n+")"):r.setStatus(i):r.setStatus("")),t()&&setTimeout(ot,0)}else t()&&(pt=pt+1|0,1==lt&&1<dt&&0!=pt%dt?ct():(0==lt&&(nt=te()),w||r.preMainLoop&&!1===r.preMainLoop()||(at(e),r.postMainLoop&&r.postMainLoop()),t()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.Gd&&SDL.audio.Gd(),ct())))}}(i),function(e,t){if(lt=e,dt=t,ft)if(_t||(_t=!0),0==e)ct=function(){var e=0|Math.max(0,nt+t-te());setTimeout(ot,e)};else if(1==e)ct=function(){kt(ot)};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"})}}ct=function(){setImmediate(ot)}}}(e,t),ct()},r.getUserMedia=function(){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(void 0)},r.createContext=function(e,t,r,i){return yt(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){Dt=e,j()}(e.target.result)},r.onerror=function(e){t()}}(0,(function(){Dt=!1,j()})),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||Z();var _r={H:function(e,t){return ae(e,t)},a:function(e){return fr(e+16)+16},b:function(e,t,r){throw new ne(e).zd(t,r),e},e:function(e,t,r){tt=r;try{var i=it(e);switch(t){case 0:var a=rt();return 0>a?-28:Xe(i.path,i.flags,0,a).Dc;case 1:case 2:case 13:case 14:return 0;case 3:return i.flags;case 4:return a=rt(),i.flags|=a,0;case 12:return a=rt(),x[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return R[dr()>>2]=28,-1}}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},D:function(e,t,r){try{var i=it(e);if(!i.Ec){var a=ke(i.path,{Qc:!0}).node;if(!a.rc.Sc)throw new Te(54);var n=a.rc.Sc(a);i.Ec=n}e=0;for(var o=qe(i,0,1),s=Math.floor(o/280);s<i.Ec.length&&e+280<=r;){var _=i.Ec[s];if("."===_[0])var c=1,u=4;else{var f=Fe(i.node,_);c=f.id,u=8192==(61440&f.mode)?2:16384==(61440&f.mode)?4:40960==(61440&f.mode)?10:8}ee=[c>>>0,(Q=c,1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[t+e>>2]=ee[0],R[t+e+4>>2]=ee[1],ee=[280*(s+1)>>>0,(Q=280*(s+1),1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[t+e+8>>2]=ee[0],R[t+e+12>>2]=ee[1],x[t+e+16>>1]=280,A[t+e+18>>0]=u,O(_,T,t+e+19,256),e+=280,s+=1}return qe(i,280*s,0),e}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},o:function(){return 42},F:function(e,t,r){tt=r;try{var i=it(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.vc?0:-59;case 21519:if(!i.vc)return-59;var a=rt();return R[a>>2]=0;case 21520:return i.vc?-28:-59;case 21531:if(e=a=rt(),!i.tc.Bd)throw new Te(59);return i.tc.Bd(i,t,e);default:K("bad ioctl syscall "+t)}}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},G:function(e,t){try{return et(Ye,e=P(e),t)}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},p:function(e,t,r){tt=r;try{return Xe(P(e),t,r?rt():0).Dc}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},J:function(e,t){try{return et(He,e=P(e),t)}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},C:function(e,t){try{return Ge(e=P(e),t=P(t)),0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},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 D("Emscripten",e+t.sysname),D("emscripten",e+t.nodename),D("1.0",e+t.release),D("#1",e+t.version),D("wasm32",e+t.machine),0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},I:function(e){try{var t=ke(e=P(e),{parent:!0}).node,r=ce(e),i=Fe(t,r);e:{try{var a=Fe(t,r)}catch(e){var n=e.wc;break e}n=Pe(t,"wx")||(16384==(61440&a.mode)?31:0)}if(n)throw new Te(n);if(!t.rc.Xc)throw new Te(63);if(i.Lc)throw new Te(10);try{Ae.willDeletePath&&Ae.willDeletePath(e)}catch(t){p("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}t.rc.Xc(t,r);var o=Le(i.parent.id,i.name);if(ve[o]===i)ve[o]=i.Gc;else for(var s=ve[o];s;){if(s.Gc===i){s.Gc=i.Gc;break}s=s.Gc}try{Ae.onDeletePath&&Ae.onDeletePath(e)}catch(t){p("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}return 0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},L:function(e){delete Ct[e-1]},c:function(){K()},h:ae,P:function(e,t){return e-t},R:function(){self.postMessage({t:"gfx"})},t: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)+".arweb"+String.fromCharCode(92)+".app)$","i")).test(e)&&(e="*.arweb.app")}t=S(e)+1;var r=fr(t);return O(e,T,r,t+1),r},S:function(){self.postMessage({t:"licerr"})},m:function(e,t,r){var i;for(nr.length=0,r>>=2;i=T[t++];)(i=105>i)&&1&r&&r++,nr.push(i?z[r++>>1]:R[r]),++r;return re[e].apply(null,nr)},l:function(e,t,r){function i(){U.get(e)(t)}0<=r?Rt(i,r):function(e){kt((function(){at(e)}))}(i)},x:function(){return 2147483648},N:Bt,v:function(e,t,r){T.copyWithin(e,t,t+r)},w:function(e){var t=T.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{m.grow(Math.min(2147483648,i)-E.byteLength+65535>>>16),C();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){Nt(e,r.response,(function(e){at((function(){l?U.get(l)(e):t&&t(e)}))}),(function(e){at((function(){l?U.get(l)(e):t&&t(e)}))}))}function o(e){at((function(){h?U.get(h)(e):a&&a(e)}))}function s(e){at((function(){d?U.get(d)(e):r&&r(e)}))}function _(e){at((function(){p?U.get(p)(e):i&&i(e)}))}function c(e){at((function(){l?U.get(l)(e):t&&t(e)}))}var u=e+112,f=P(u),l=L[u+36>>2],d=L[u+40>>2],p=L[u+44>>2],h=L[u+48>>2],m=L[u+52>>2],b=!!(4&m),w=!!(32&m);if(m=!!(16&m),"EM_IDB_STORE"===f)f=L[u+84>>2],Nt(e,T.slice(f,f+L[u+88>>2]),c,s);else if("EM_IDB_DELETE"===f)!function(e,t,r){var i=Dt;if(i){var a=L[e+112+64>>2];a||(a=L[e+8>>2]),a=P(a);try{var n=i.transaction(["FILES"],"readwrite").objectStore("FILES").delete(a);n.onsuccess=function(r){r=r.target.result,L[e+12>>2]=0,Ut(e+16,0),Ut(e+24,0),Ut(e+32,0),k[e+40>>1]=4,k[e+42>>1]=200,O("OK",T,e+44,64),t(e,0,r)},n.onerror=function(t){k[e+40>>1]=4,k[e+42>>1]=404,O("Not Found",T,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(m){if(w)return 0;Vt(e,b?n:c,s,_,o)}else!function(e,t,r){var i=Dt;if(i){var a=L[e+112+64>>2];a||(a=L[e+8>>2]),a=P(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=fr(a);T.set(new Uint8Array(i),n),L[e+12>>2]=n,Ut(e+16,a),Ut(e+24,0),Ut(e+32,a),k[e+40>>1]=4,k[e+42>>1]=200,O("OK",T,e+44,64),t(e,0,i)}else k[e+40>>1]=4,k[e+42>>1]=404,O("Not Found",T,e+44,64),r(e,0,"no data")},n.onerror=function(t){k[e+40>>1]=4,k[e+42>>1]=404,O("Not Found",T,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){Vt(e,n,s,_,o)}:function(e){Vt(e,c,s,_,o)});return e},A:function(e,t){try{var r=0;return Ht().forEach((function(i,a){var n=t+r;R[e+4*a>>2]=n,D(i,n),r+=i.length+1})),0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),e.wc}},B:function(e,t){try{var r=Ht();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!==Qe&&e instanceof Te||K(e),e.wc}},O:function(e){Er(e)},g:function(e){try{var t=it(e);if(null===t.Dc)throw new Te(8);t.Ec&&(t.Ec=null);try{t.tc.close&&t.tc.close(t)}catch(e){throw e}finally{ge[t.Dc]=null}return t.Dc=null,0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),e.wc}},E:function(e,t,r,i){try{e:{for(var a=it(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=A;if(0>c||0>u)throw new Te(28);if(null===s.Dc)throw new Te(8);if(1==(2097155&s.flags))throw new Te(8);if(16384==(61440&s.node.mode))throw new Te(31);if(!s.tc.read)throw new Te(28);var l=void 0!==u;if(l){if(!s.seekable)throw new Te(70)}else u=s.position;var d=s.tc.read(s,f,_,c,u);l||(s.position+=d);var p=d;if(0>p){var h=-1;break e}if(e+=p,p<o)break}h=e}return R[i>>2]=h,0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),e.wc}},u:function(e,t,r,i,a){try{var n=it(e);return-9007199254740992>=(e=4294967296*r+(t>>>0))||9007199254740992<=e?-61:(qe(n,e,i),ee=[n.position>>>0,(Q=n.position,1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[a>>2]=ee[0],R[a+4>>2]=ee[1],n.Ec&&0===e&&0===i&&(n.Ec=null),0)}catch(e){return void 0!==Qe&&e instanceof Te||K(e),e.wc}},k:function(e,t,r,i){try{e:{for(var a=it(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=A;if(0>_||0>c)throw new Te(28);if(null===o.Dc)throw new Te(8);if(0==(2097155&o.flags))throw new Te(8);if(16384==(61440&o.node.mode))throw new Te(31);if(!o.tc.write)throw new Te(28);o.seekable&&1024&o.flags&&qe(o,0,2);var f=void 0!==c;if(f){if(!o.seekable)throw new Te(70)}else c=o.position;var l=o.tc.write(o,u,s,_,c,void 0);f||(o.position+=l);try{o.path&&Ae.onWriteToFile&&Ae.onWriteToFile(o.path)}catch(e){p("FS.trackingDelegate['onWriteToFile']('"+o.path+"') threw an exception: "+e.message)}var d=l;if(0>d){var h=-1;break e}e+=d}h=e}return R[i>>2]=h,0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),e.wc}},f:function(e){var t=Date.now();return R[e>>2]=t/1e3|0,R[e+4>>2]=t%1e3*1e3|0,0},n:function(e,t){ar.bindTexture(e,Xt[t])},q:function(e,t){for(var r=0;r<e;r++){var i=ar.createTexture(),a=i&&Zt(Xt);i?(i.name=a,Xt[a]=i):jt||(jt=1282),R[t+4*r>>2]=a}},i:function(e,t,r,i,a,n,o,s,_){var c=ar,u=c.texImage2D;if(_){var f=s-5120;f=1==f?T:4==f?R:6==f?F:5==f||28922==f?L:k;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){ar.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.cd||(e.cd=B("GMT")),R[r+40>>2]=e.cd,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[mr()>>2]=60*n,R[hr()>>2]=Number(t!=a),r=e(r),i=e(i),r=B(r),i=B(i),a<t?(R[pr()>>2]=r,R[pr()+4>>2]=i):(R[pr()>>2]=i,R[pr()+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[pr()+(e?4:0)>>2],R[t+40>>2]=e,t},Q:function(){return 6},y:function(){return 28},z: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=ir(new Date(e.yc+1900,0,1),e.Wc);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={Qd:R[i>>2],Pd:R[i+4>>2],Uc:R[i+8>>2],Oc:R[i+12>>2],Jc:R[i+16>>2],yc:R[i+20>>2],Vc:R[i+24>>2],Wc:R[i+28>>2],ee:R[i+32>>2],Od:R[i+36>>2],Rd:c?P(c):""},r=P(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.Vc].substring(0,3)},"%A":function(e){return f[e.Vc]},"%b":function(e){return l[e.Jc].substring(0,3)},"%B":function(e){return l[e.Jc]},"%C":function(e){return n((e.yc+1900)/100|0,2)},"%d":function(e){return n(e.Oc,2)},"%e":function(e){return a(e.Oc,2," ")},"%g":function(e){return _(e).toString().substring(2)},"%G":function(e){return _(e)},"%H":function(e){return n(e.Uc,2)},"%I":function(e){return 0==(e=e.Uc)?e=12:12<e&&(e-=12),n(e,2)},"%j":function(e){return n(e.Oc+er(Qt(e.yc+1900)?tr:rr,e.Jc-1),3)},"%m":function(e){return n(e.Jc+1,2)},"%M":function(e){return n(e.Pd,2)},"%n":function(){return"\n"},"%p":function(e){return 0<=e.Uc&&12>e.Uc?"AM":"PM"},"%S":function(e){return n(e.Qd,2)},"%t":function(){return"\t"},"%u":function(e){return e.Vc||7},"%U":function(e){var t=new Date(e.yc+1900,0,1),r=0===t.getDay()?t:ir(t,7-t.getDay());return 0>o(r,e=new Date(e.yc+1900,e.Jc,e.Oc))?n(Math.ceil((31-r.getDate()+(er(Qt(e.getFullYear())?tr:rr,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(r,t)?"01":"00"},"%V":function(e){var t=new Date(e.yc+1901,0,4),r=s(new Date(e.yc+1900,0,4));t=s(t);var i=ir(new Date(e.yc+1900,0,1),e.Wc);return 0>o(i,r)?"53":0>=o(t,i)?"01":n(Math.ceil((r.getFullYear()<e.yc+1900?e.Wc+32-r.getDate():e.Wc+1-r.getDate())/7),2)},"%w":function(e){return e.Vc},"%W":function(e){var t=new Date(e.yc,0,1),r=1===t.getDay()?t:ir(t,0===t.getDay()?1:7-t.getDay()+1);return 0>o(r,e=new Date(e.yc+1900,e.Jc,e.Oc))?n(Math.ceil((31-r.getDate()+(er(Qt(e.getFullYear())?tr:rr,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(r,t)?"01":"00"},"%y":function(e){return(e.yc+1900).toString().substring(2)},"%Y":function(e){return e.yc+1900},"%z":function(e){var t=0<=(e=e.Od);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":function(e){return e.Rd},"%%":function(){return"%"}})0<=r.indexOf(u)&&(r=r.replace(new RegExp(u,"g"),c[u](i)));return(u=sr(r,!1)).length>t?0:(A.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}},cr=function(){function e(e){r.asm=e.exports,m=r.asm.T,C(),U=r.asm.Y,N.unshift(r.asm.U),j()}var t={a:_r};if(Z(),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=J;try{e:{try{if(t==J&&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){K(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=cr.U,r._zappar_has_initialized=cr.V,r._zappar_invert=cr.W,r._zappar_loaded=cr.X,r._zappar_pipeline_create=cr.Z,r._zappar_pipeline_destroy=cr._,r._zappar_pipeline_camera_frame_submit=cr.$,r._zappar_pipeline_camera_frame_submit_raw_pointer=cr.aa,r._zappar_pipeline_frame_update=cr.ba,r._zappar_pipeline_camera_frame_user_data=cr.ca,r._zappar_pipeline_camera_model=cr.da,r._zappar_pipeline_frame_number=cr.ea,r._zappar_pipeline_motion_accelerometer_submit=cr.fa,r._zappar_pipeline_motion_rotation_rate_submit=cr.ga,r._zappar_pipeline_motion_attitude_submit=cr.ha,r._zappar_pipeline_motion_attitude_matrix_submit=cr.ia,r._zappar_pipeline_camera_frame_user_facing=cr.ja,r._zappar_pipeline_camera_frame_texture_matrix=cr.ka,r._zappar_pipeline_camera_pose_with_attitude=cr.la,r._zappar_pipeline_camera_pose_with_origin=cr.ma,r._zappar_pipeline_camera_frame_camera_attitude=cr.na,r._zappar_pipeline_camera_frame_device_attitude=cr.oa,r._zappar_pipeline_camera_frame_texture_gl=cr.pa,r._zappar_pipeline_camera_frame_upload_gl=cr.qa,r._zappar_pipeline_sequence_record_start=cr.ra,r._zappar_pipeline_sequence_record_stop=cr.sa,r._zappar_pipeline_sequence_record_clear=cr.ta,r._zappar_pipeline_sequence_record_device_attitude_matrices_set=cr.ua,r._zappar_pipeline_sequence_record_data_size=cr.va,r._zappar_pipeline_sequence_record_data=cr.wa,r._zappar_pipeline_process_gl=cr.xa,r._zappar_pipeline_camera_pose_default=cr.ya,r._zappar_instant_world_tracker_create=cr.za,r._zappar_instant_world_tracker_destroy=cr.Aa,r._zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw=cr.Ba,r._zappar_instant_world_tracker_anchor_pose_raw=cr.Ca,r._zappar_instant_world_tracker_enabled_set=cr.Da,r._zappar_instant_world_tracker_enabled=cr.Ea,r._zappar_image_tracker_create=cr.Fa,r._zappar_image_tracker_destroy=cr.Ga,r._zappar_image_tracker_target_load_from_memory=cr.Ha,r.__Z42zappar_image_tracker_target_load_from_fileP23zappar_image_tracker_tiPKc=cr.Ia;var ur=r._free=cr.Ja;r._zappar_image_tracker_anchor_count=cr.Ka,r._zappar_image_tracker_anchor_id=cr.La,r._zappar_image_tracker_anchor_pose_raw=cr.Ma,r._zappar_image_tracker_enabled_set=cr.Na,r._zappar_image_tracker_enabled=cr.Oa,r._zappar_image_tracker_target_loaded_version=cr.Pa,r.__Z33zappar_image_tracker_target_countP23zappar_image_tracker_ti=cr.Qa,r.__Z46zappar_image_tracker_target_preview_compressedP23zappar_image_tracker_tii=cr.Ra,r.__Z51zappar_image_tracker_target_preview_compressed_sizeP23zappar_image_tracker_tii=cr.Sa,r.__Z55zappar_image_tracker_target_preview_compressed_mimetypeP23zappar_image_tracker_tii=cr.Ta,r.__Z40zappar_image_tracker_target_preview_rgbaP23zappar_image_tracker_tii=cr.Ua,r.__Z45zappar_image_tracker_target_preview_rgba_sizeP23zappar_image_tracker_tii=cr.Va,r.__Z46zappar_image_tracker_target_preview_rgba_widthP23zappar_image_tracker_tii=cr.Wa,r.__Z47zappar_image_tracker_target_preview_rgba_heightP23zappar_image_tracker_tii=cr.Xa,r.__Z38zappar_image_tracker_target_radius_topP23zappar_image_tracker_tii=cr.Ya,r.__Z41zappar_image_tracker_target_radius_bottomP23zappar_image_tracker_tii=cr.Za,r.__Z39zappar_image_tracker_target_side_lengthP23zappar_image_tracker_tii=cr._a,r.__Z49zappar_image_tracker_target_physical_scale_factorP23zappar_image_tracker_tii=cr.$a,r.__Z49zappar_image_tracker_target_preview_mesh_verticesP23zappar_image_tracker_tii=cr.ab,r.__Z48zappar_image_tracker_target_preview_mesh_normalsP23zappar_image_tracker_tii=cr.bb,r.__Z44zappar_image_tracker_target_preview_mesh_uvsP23zappar_image_tracker_tii=cr.cb,r.__Z48zappar_image_tracker_target_preview_mesh_indicesP23zappar_image_tracker_tii=cr.db,r.__Z54zappar_image_tracker_target_preview_mesh_vertices_sizeP23zappar_image_tracker_tii=cr.eb,r.__Z53zappar_image_tracker_target_preview_mesh_normals_sizeP23zappar_image_tracker_tii=cr.fb,r.__Z49zappar_image_tracker_target_preview_mesh_uvs_sizeP23zappar_image_tracker_tii=cr.gb,r.__Z53zappar_image_tracker_target_preview_mesh_indices_sizeP23zappar_image_tracker_tii=cr.hb,r.__Z32zappar_image_tracker_target_typeP23zappar_image_tracker_tii=cr.ib,r._zappar_face_tracker_create=cr.jb,r._zappar_face_tracker_destroy=cr.kb,r._zappar_face_tracker_model_load_from_memory=cr.lb,r._zappar_face_tracker_anchor_count=cr.mb,r._zappar_face_tracker_anchor_id=cr.nb,r._zappar_face_tracker_anchor_pose_raw=cr.ob,r._zappar_face_tracker_anchor_identity_coefficients=cr.pb,r._zappar_face_tracker_anchor_expression_coefficients=cr.qb,r._zappar_face_tracker_enabled_set=cr.rb,r._zappar_face_tracker_enabled=cr.sb,r._zappar_face_tracker_max_faces_set=cr.tb,r._zappar_face_tracker_max_faces=cr.ub,r._zappar_face_tracker_model_loaded_version=cr.vb,r._zappar_face_landmark_create=cr.wb,r._zappar_face_landmark_destroy=cr.xb,r.__Z27zappar_face_landmark_updateP23zappar_face_landmark_tiPKfS2_i=cr.yb,r._zappar_face_landmark_anchor_pose=cr.zb,r._zappar_barcode_finder_create=cr.Ab,r._zappar_barcode_finder_destroy=cr.Bb,r._zappar_barcode_finder_found_number=cr.Cb,r._zappar_barcode_finder_found_text=cr.Db,r._zappar_barcode_finder_enabled_set=cr.Eb,r._zappar_barcode_finder_enabled=cr.Fb,r._zappar_barcode_finder_found_format=cr.Gb,r._zappar_barcode_finder_formats=cr.Hb,r._zappar_barcode_finder_formats_set=cr.Ib;var fr=r._malloc=cr.Jb;r._zappar_face_mesh_create=cr.Kb,r._zappar_face_mesh_destroy=cr.Lb,r.__Z33zappar_face_mesh_load_from_memoryP19zappar_face_mesh_tiPKciiiii=cr.Mb,r.__Z29zappar_face_mesh_indices_sizeP19zappar_face_mesh_ti=cr.Nb,r.__Z25zappar_face_mesh_uvs_sizeP19zappar_face_mesh_ti=cr.Ob,r.__Z30zappar_face_mesh_vertices_sizeP19zappar_face_mesh_ti=cr.Pb,r.__Z31zappar_face_mesh_loaded_versionP19zappar_face_mesh_ti=cr.Qb,r.__Z25zappar_face_mesh_verticesP19zappar_face_mesh_ti=cr.Rb,r.__Z20zappar_face_mesh_uvsP19zappar_face_mesh_ti=cr.Sb,r.__Z24zappar_face_mesh_indicesP19zappar_face_mesh_ti=cr.Tb,r.__Z23zappar_face_mesh_updateP19zappar_face_mesh_tiPKfS2_i=cr.Ub,r.__Z29zappar_face_mesh_normals_sizeP19zappar_face_mesh_ti=cr.Vb,r.__Z24zappar_face_mesh_normalsP19zappar_face_mesh_ti=cr.Wb,r._zappar_camera_source_create=cr.Xb,r._zappar_camera_source_destroy=cr.Yb,r._zappar_camera_source_start=cr.Zb,r._zappar_camera_source_pause=cr._b,r._zappar_camera_default_device_id=cr.$b,r._zappar_sequence_source_create=cr.ac,r.__Z28zappar_sequence_source_startP25zappar_sequence_source_ti=cr.bc,r.__Z39zappar_sequence_source_load_from_memoryP25zappar_sequence_source_tiPKci=cr.cc,r.__Z28zappar_sequence_source_pauseP25zappar_sequence_source_ti=cr.dc,r._zappar_sequence_source_destroy=cr.ec,r._zappar_sequence_source_max_playback_fps_set=cr.fc,r._zappar_log_level_set=cr.gc,r._zappar_log_level=cr.hc,r.__Z23zappar_log_redirect_setPFv18zappar_log_level_tPKcE=cr.ic,r._zappar_analytics_project_id_set=cr.jc;var lr,dr=r.___errno_location=cr.kc,pr=r.__get_tzname=cr.lc,hr=r.__get_daylight=cr.mc,mr=r.__get_timezone=cr.nc,br=r.stackSave=cr.oc,wr=r.stackRestore=cr.pc,gr=r.stackAlloc=cr.qc;function yr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function vr(){function e(){if(!lr&&(lr=!0,r.calledRun=!0,!w)){if(r.noFSInit||Se||(Se=!0,Ze(),r.stdin=r.stdin,r.stdout=r.stdout,r.stderr=r.stderr,r.stdin?je("stdin",r.stdin):Ge("/dev/tty","/dev/stdin"),r.stdout?je("stdout",null,r.stdout):Ge("/dev/tty","/dev/stdout"),r.stderr?je("stderr",null,r.stderr):Ge("/dev/tty1","/dev/stderr"),Xe("/dev/stdin",0),Xe("/dev/stdout",1),Xe("/dev/stderr",1)),ie(N),Ee=!1,ie(G),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();W.unshift(e)}ie(W)}}if(!(0<Y)){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)H();ie(V),0<Y||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),e()}),1)):e())}}function Er(e){b=e,h||(r.onExit&&r.onExit(e),w=!0),_(e,new yr(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 v(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":A[e>>0]=t;break;case"i16":x[e>>1]=t;break;case"i32":R[e>>2]=t;break;case"i64":ee=[t>>>0,(Q=t,1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[e>>2]=ee[0],R[e+4>>2]=ee[1];break;case"float":F[e>>2]=t;break;case"double":z[e>>3]=t;break;default:K("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 A[e>>0];case"i16":return x[e>>1];case"i32":case"i64":return R[e>>2];case"float":return F[e>>2];case"double":return z[e>>3];default:K("invalid type for getValue: "+t)}return null},r.UTF8ToString=P,q=function e(){lr||vr(),lr||(q=e)},r.run=vr,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();return vr(),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}processBuffer(e){this._deserializer.setData(e),this._deserializer.forMessages(((e,t)=>{switch(e){case 34:this._impl.log_level_set(t.logLevel());break;case 31:this._impl.analytics_project_id_set(t.string());break;case 27:{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 28:{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 11:{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 12:{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 13:{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 29:{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 30:{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 35:{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 36:{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 14:{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 20:{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 21:{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 22:{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 23:{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 24:{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 25:{let e=t.type(),r=this._impl.face_mesh_create();this._face_mesh_by_instance.set(e,r);break}case 26:{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 32:{let e=t.type(),r=t.faceLandmarkName(),i=this._impl.face_landmark_create(r);this._face_landmark_by_instance.set(e,i);break}case 33:{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 16:{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 17:{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 18:{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 19:{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 15:{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}}}))}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))}))}}}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="undefined"!=typeof Float32Array?Float32Array:Array;function h(){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 m(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={}));const b=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,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=b.get(e);return t||(t=new w(e),b.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 g,y=r(238);!function(e){e[e.OBJECT_URL=0]="OBJECT_URL",e[e.SRC_OBJECT=1]="SRC_OBJECT"}(g||(g={}));let v={deviceMotionMutliplier:-1,blacklisted:!1,showGyroPermissionsWarningIfNecessary:!1,showSafariPermissionsResetIfNecessary:!1,requestHighFrameRate:!1,videoWidth:640,videoHeight:480,dataWidth:320,dataHeight:240,videoElementInDOM:!1,preferMediaStreamTrackProcessorCamera:!1,preferImageBitmapCamera:!1};"undefined"!=typeof window&&(window.zeeProfile=v,window.location.href.indexOf("_mstppipeline")>=0&&(console.log("Configuring for MSTP camera pipeline (if supported)"),v.preferMediaStreamTrackProcessorCamera=!0),window.location.href.indexOf("_imagebitmappipeline")>=0&&(console.log("Configuring for ImageBitmap camera pipeline (if supported)"),v.preferImageBitmapCamera=!0));let E=new y.UAParser,A=(E.getOS().name||"unknown").toLowerCase(),T=(E.getEngine().name||"unknown").toLowerCase();function x(e){let t=e.split(".");if(t.length>=2){const e=parseInt(t[0]),r=parseInt(t[1]);(e<11||11===e&&r<3)&&(v.blacklisted=!0),(e<12||12===e&&r<2)&&(v.videoElementInDOM=!0),(12===e&&r>=2||e>=13)&&(v.showGyroPermissionsWarningIfNecessary=!0),e>=13&&(v.showSafariPermissionsResetIfNecessary=!0),(e>=12&&r>1||e>=13)&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&navigator.mediaDevices.getSupportedConstraints().frameRate&&(v.requestHighFrameRate=!0,e<14&&(v.videoHeight=360,v.dataHeight=180))}}function k(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"!==A&&(v.deviceMotionMutliplier=1,"undefined"!=typeof window&&void 0!==window.orientation&&x("15.0")),"webkit"===T&&"ios"===A&&(v.deviceMotionMutliplier=1,x(E.getOS().version||"15.0"));class R{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=w.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),h=a.getParameter(a.FRAMEBUFFER_BINDING),m=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 g=a.RGBA,y=a.RGBA,E=a.UNSIGNED_BYTE;a.texImage2D(a.TEXTURE_2D,0,g,y,E,t);let A=0,T=0;"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?(A=t.videoWidth,T=t.videoHeight):(A=t.width,T=t.height),T>A&&(T=[A,A=T][0]),this._updateTransforms(r,i);let x=this._getFramebuffer(a,v.dataWidth/4,v.dataHeight),k=this._getVertexBuffer(a),R=this._getIndexBuffer(a),L=this._getGreyscaleShader(a);const F=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_SIZE),z=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_TYPE),M=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_NORMALIZED),I=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_STRIDE),P=a.getVertexAttribOffset(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_POINTER),O=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_ENABLED),S=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING),B=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_SIZE),D=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_TYPE),C=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 W=0,H=0;this._isWebGL2?(W=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_DIVISOR),H=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_DIVISOR),a.vertexAttribDivisor(L.aVertexPositionLoc,0),a.vertexAttribDivisor(L.aTextureCoordLoc,0)):this._instancedArraysExtension&&(W=a.getVertexAttrib(L.aVertexPositionLoc,this._instancedArraysExtension.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),H=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,x),a.viewport(0,0,this._framebufferWidth,this._framebufferHeight),a.clear(a.COLOR_BUFFER_BIT),a.bindBuffer(a.ARRAY_BUFFER,k),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,R),a.useProgram(L.program),a.uniform1f(L.uTexWidthLoc,v.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,F,z,M,I,P),a.bindBuffer(a.ARRAY_BUFFER,N),a.vertexAttribPointer(L.aTextureCoordLoc,B,D,C,U,V),a.bindBuffer(a.ARRAY_BUFFER,m),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,b),O||a.disableVertexAttribArray(L.aVertexPositionLoc),G||a.disableVertexAttribArray(L.aTextureCoordLoc),this._isWebGL2?(a.vertexAttribDivisor(L.aVertexPositionLoc,W),a.vertexAttribDivisor(L.aTextureCoordLoc,H)):this._instancedArraysExtension&&(this._instancedArraysExtension.vertexAttribDivisorANGLE(L.aVertexPositionLoc,W),this._instancedArraysExtension.vertexAttribDivisorANGLE(L.aTextureCoordLoc,H)),a.bindFramebuffer(a.FRAMEBUFFER,h),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,v.dataWidth/4,v.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:v.dataWidth,dataHeight:v.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=k(e,e.VERTEX_SHADER,I),i=k(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 L,F,z,M,I="\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 O=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 S=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}},B=0;function D(e){return O(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"]),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"]),h=e.cwrap("zappar_pipeline_motion_rotation_rate_submit",null,["number","number","number","number","number"]),m=e.cwrap("zappar_pipeline_motion_attitude_submit",null,["number","number","number","number","number"]),b=e.cwrap("zappar_pipeline_motion_attitude_matrix_submit",null,["number","number"]),w=e.cwrap("zappar_camera_source_create","number",["number","string"]),g=e.cwrap("zappar_camera_source_destroy",null,["number"]),y=e.cwrap("zappar_sequence_source_create","number",["number"]),v=e.cwrap("zappar_sequence_source_destroy",null,["number"]),E=e.cwrap("zappar_image_tracker_create","number",["number"]),A=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"]),k=e.cwrap("zappar_image_tracker_enabled","number",["number"]),R=e.cwrap("zappar_image_tracker_enabled_set",null,["number","number"]),L=e.cwrap("zappar_image_tracker_anchor_count","number",["number"]),F=e.cwrap("zappar_image_tracker_anchor_id","string",["number","number"]),z=e.cwrap("zappar_image_tracker_anchor_pose_raw","number",["number","number"]),M=e.cwrap("zappar_face_tracker_create","number",["number"]),I=e.cwrap("zappar_face_tracker_destroy",null,["number"]),P=e.cwrap("zappar_face_tracker_model_load_from_memory",null,["number","number","number"]),O=e.cwrap("zappar_face_tracker_model_loaded_version","number",["number"]),S=e.cwrap("zappar_face_tracker_enabled_set",null,["number","number"]),B=e.cwrap("zappar_face_tracker_enabled","number",["number"]),D=e.cwrap("zappar_face_tracker_max_faces_set",null,["number","number"]),C=e.cwrap("zappar_face_tracker_max_faces","number",["number"]),U=e.cwrap("zappar_face_tracker_anchor_count","number",["number"]),V=e.cwrap("zappar_face_tracker_anchor_id","string",["number","number"]),N=e.cwrap("zappar_face_tracker_anchor_pose_raw","number",["number","number"]),G=e.cwrap("zappar_face_tracker_anchor_identity_coefficients","number",["number","number"]),W=e.cwrap("zappar_face_tracker_anchor_expression_coefficients","number",["number","number"]),H=e.cwrap("zappar_face_mesh_create","number",[]),Y=e.cwrap("zappar_face_mesh_destroy",null,["number"]),X=e.cwrap("zappar_face_landmark_create","number",["number"]),q=e.cwrap("zappar_face_landmark_destroy",null,["number"]),Z=e.cwrap("zappar_barcode_finder_create","number",["number"]),j=e.cwrap("zappar_barcode_finder_destroy",null,["number"]),K=e.cwrap("zappar_barcode_finder_enabled_set",null,["number","number"]),J=e.cwrap("zappar_barcode_finder_enabled","number",["number"]),$=e.cwrap("zappar_barcode_finder_found_number","number",["number"]),Q=e.cwrap("zappar_barcode_finder_found_text","string",["number","number"]),ee=e.cwrap("zappar_barcode_finder_found_format","number",["number","number"]),te=e.cwrap("zappar_barcode_finder_formats","number",["number"]),re=e.cwrap("zappar_barcode_finder_formats_set",null,["number","number"]),ie=e.cwrap("zappar_instant_world_tracker_create","number",["number"]),ae=e.cwrap("zappar_instant_world_tracker_destroy",null,["number"]),ne=e.cwrap("zappar_instant_world_tracker_enabled_set",null,["number","number"]),oe=e.cwrap("zappar_instant_world_tracker_enabled","number",["number"]),se=e.cwrap("zappar_instant_world_tracker_anchor_pose_raw","number",["number"]),_e=e.cwrap("zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw",null,["number","number","number","number","number"]),ce=32,ue=e._malloc(ce),fe=(e._malloc(64),new Map),le=(t,r)=>{let i=fe.get(t);return(!i||i[0]<r)&&(i&&e._free(i[1]),i=[r,e._malloc(r)],fe.set(t,i)),i[1]};return{log_level:()=>t(),log_level_set:e=>r(e),analytics_project_id_set:e=>i(e),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,_)=>{ce<r.byteLength&&(e._free(ue),ce=r.byteLength,ue=e._malloc(ce));let c=ue,f=r.byteLength;e.HEAPU8.set(new Uint8Array(r),ue);let l=i,d=a,p=n,h=le(4,o.byteLength);e.HEAPF32.set(o,h/4);let m=le(5,s.byteLength);return e.HEAPF32.set(s,m/4),u(t,c,f,l,d,p,h,m,_?1:0)},pipeline_camera_frame_submit_raw_pointer:(t,r,i,a,n,o,s,_,c,u,l)=>{let d=r,p=i,h=a,m=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,h,m,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_rotation_rate_submit:(e,t,r,i,a)=>h(e,t,r,i,a),pipeline_motion_attitude_submit:(e,t,r,i,a)=>m(e,t,r,i,a),pipeline_motion_attitude_matrix_submit:(t,r)=>{let i=le(0,r.byteLength);return e.HEAPF32.set(r,i/4),b(t,i)},camera_source_create:(e,t)=>w(e,t),camera_source_destroy:()=>{g()},sequence_source_create:e=>y(e),sequence_source_destroy:()=>{v()},image_tracker_create:e=>E(e),image_tracker_destroy:()=>{A()},image_tracker_target_load_from_memory:(t,r)=>{ce<r.byteLength&&(e._free(ue),ce=r.byteLength,ue=e._malloc(ce));let i=ue,a=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),ue),T(t,i,a)},image_tracker_target_loaded_version:e=>x(e),image_tracker_enabled:e=>{let t=k(e);return t=1===t,t},image_tracker_enabled_set:(e,t)=>R(e,t?1:0),image_tracker_anchor_count:e=>L(e),image_tracker_anchor_id:(e,t)=>F(e,t),image_tracker_anchor_pose_raw:(t,r)=>{let i=z(t,r),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(i/4,16+i/4)),i=a,i},face_tracker_create:e=>M(e),face_tracker_destroy:()=>{I()},face_tracker_model_load_from_memory:(t,r)=>{ce<r.byteLength&&(e._free(ue),ce=r.byteLength,ue=e._malloc(ce));let i=ue,a=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),ue),P(t,i,a)},face_tracker_model_loaded_version:e=>O(e),face_tracker_enabled_set:(e,t)=>S(e,t?1:0),face_tracker_enabled:e=>{let t=B(e);return t=1===t,t},face_tracker_max_faces_set:(e,t)=>D(e,t),face_tracker_max_faces:e=>C(e),face_tracker_anchor_count:e=>U(e),face_tracker_anchor_id:(e,t)=>V(e,t),face_tracker_anchor_pose_raw:(t,r)=>{let i=N(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=G(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=W(t,r),a=new Float32Array(29);return a.set(e.HEAPF32.subarray(i/4,29+i/4)),i=a,i},face_mesh_create:()=>H(),face_mesh_destroy:()=>{Y()},face_landmark_create:e=>X(e),face_landmark_destroy:()=>{q()},barcode_finder_create:e=>Z(e),barcode_finder_destroy:()=>{j()},barcode_finder_enabled_set:(e,t)=>K(e,t?1:0),barcode_finder_enabled:e=>{let t=J(e);return t=1===t,t},barcode_finder_found_number:e=>$(e),barcode_finder_found_text:(e,t)=>Q(e,t),barcode_finder_found_format:(e,t)=>ee(e,t),barcode_finder_formats:e=>te(e),barcode_finder_formats_set:(e,t)=>re(e,t),instant_world_tracker_create:e=>ie(e),instant_world_tracker_destroy:()=>{ae()},instant_world_tracker_enabled_set:(e,t)=>ne(e,t?1:0),instant_world_tracker_enabled:e=>{let t=oe(e);return t=1===t,t},instant_world_tracker_anchor_pose_raw:t=>{let r=se(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)=>_e(e,t,r,i,a)}}(r),t=new n(e,((e,t)=>{S.postOutgoingMessage({p:e,t:"zappar",d:t},[t])}));S.postOutgoingMessage("loaded",[]),S.onIncomingMessage.bind((i=>{var a;switch(i.t){case"zappar":t.processBuffer(i.d),S.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};S.postOutgoingMessage(o,[a.d]);break}case"streamC2S":{let a=i;!function(e,t,r,i,a,n,o){O(this,void 0,void 0,(function*(){const s=yield r.getReader();for(;;){let r=yield s.read();if(r.done)return void console.log("Stream done");let u=r.value,f=u.allocationSize();f>U&&(C>0&&e._free(C),C=e._malloc(f),U=f),yield u.copyTo(e.HEAPU8.subarray(C,C+U));let l=V;V++;const d=u.visibleRect.width,p=u.visibleRect.height;let h,b=d,w=p;switch(B){case 270:h=new Float32Array([0,1,0,0,-1,0,0,0,0,0,1,0,1,0,0,1]),b=p,w=d;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]),b=p,w=d;break;default:h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}let g=u.clone();a?(c=[-1,1,-1],(_=N)[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):m(N);let y=300*v.dataWidth/320;G[0]=y,G[1]=y,G[2]=.5*v.dataWidth,G[3]=.5*v.dataHeight;const E={token:l,d:g,p:i,t:"videoFrameS2C",userFacing:a,uvTransform:h,w:b,h:w,cameraToDevice:N,cameraModel:G,source:o};S.postOutgoingMessage(E,[E.d,E.uvTransform.buffer]);const A=n._pipeline_by_instance.get(i);A&&(t.pipeline_camera_frame_submit_raw_pointer(A,C,f,W(u.format),d,p,l,N,B,G,a),t.pipeline_frame_update(A),n.exploreState()),u.close()}var _,c}))}(r,e,a.s,a.p,a.userFacing,t,a.source);break}case"cameraToScreenC2S":B=i.r;break;case"imageBitmapC2S":!function(e,t,r,i){const[a,n]=function(){if(!z||!M){const e=new OffscreenCanvas(1,1);if(M=e.getContext("webgl"),!M)throw new Error("Unable to get offscreen GL context");z=new R(M)}return[z,M]}();if(F||(F=n.createTexture(),n.bindTexture(n.TEXTURE_2D,F),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)),!F)return;(!L||L.byteLength<v.dataWidth*v.dataHeight)&&(console.log("Generating pixel buffer",v.dataWidth*v.dataHeight),L=new ArrayBuffer(v.dataWidth*v.dataHeight)),a.uploadFrame(F,e.i,e.r,e.userFacing);let o=a.readFrame(F,L),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(_,L,o.dataWidth,o.dataHeight,e.tokenId,e.cameraToDevice,e.cameraModel,o.userFacing),t.pipeline_frame_update(_),r.exploreState())}(i,e,t,S)}}))}})}))}let C=0,U=0,V=1;const N=h(),G=new Float32Array([300,300,160,120,0,0]);function W(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 H=self;S.onOutgoingMessage.bind((()=>{let e=S.getOutgoingMessages();for(let t of e)H.postMessage(t.msg,t.transferables)}));let Y=e=>{e&&e.data&&"wasm"===e.data.t&&(D(location.href.startsWith("blob")?e.data.url:new URL(r(751),r.b).toString()),H.removeEventListener("message",Y))};H.addEventListener("message",Y),H.addEventListener("message",(e=>{S.postIncomingMessage(e.data)}))})()})();
|
|
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",h="architecture",m="console",b="mobile",w="tablet",g="smarttv",y="wearable",v="embedded",E="Amazon",A="Apple",T="ASUS",x="BlackBerry",k="Google",R="Huawei",L="LG",F="Microsoft",z="Motorola",M="Samsung",I="Sony",P="Xiaomi",O="Zebra",S="Facebook",B=function(e){var t={};for(var r in e)t[e[r].toUpperCase()]=e[r];return t},D=function(e,t){return typeof e===c&&-1!==C(t).indexOf(C(e))},C=function(e){return e.toLowerCase()},U=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===s?e:e.substring(0,255)},V=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}},N=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(D(t[r][i],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"},W={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,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[p,[f,"Opera"]],[/(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)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[f,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[f,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/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 Browser"],p],[/\bfocus\/([\w\.]+)/i],[p,[f,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[p,[f,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[f,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[f,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[p,[f,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 Browser"],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],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,S],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,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,"Chrome WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[f,"Android Browser"]],[/(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,N,{"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,"Firefox 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]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,C]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",C]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,C]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,M],[l,w]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,M],[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]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,R],[l,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[u,[d,R],[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)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[d,P],[l,b]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,P],[l,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\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,z],[l,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,z],[l,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,L],[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,L],[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,k],[l,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,k],[l,b]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,I],[l,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,I],[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,x],[l,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,T],[l,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,T],[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)[-_ ]?([-\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,"Sharp"],[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,O],[l,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,O],[l,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[l,m]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[l,m]],[/(playstation [345portablevi]+)/i],[u,[d,I],[l,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,F],[l,m]],[/smart-tv.+(samsung)/i],[d,[l,g]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,M],[l,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,L],[l,g]],[/(apple) ?tv/i],[d,[u,"Apple TV"],[l,g]],[/crkey/i],[[u,"Chromecast"],[d,k],[l,g]],[/droid.+aft(\w)( bui|\))/i],[u,[d,E],[l,g]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[l,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,U],[u,U],[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,k],[l,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,O],[l,y]],[/(quest( 2)?)/i],[u,[d,S],[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(?:[;\/]| 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,N,G]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,"Windows"],[p,N,G]],[/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)/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,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[f,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[f,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[f,"Chromecast"]],[/(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]]},H=function(e,t){if(typeof e===_&&(t=e,e=n),!(this instanceof H))return new H(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}(W,t):W;return this.getBrowser=function(){var e,t={};return t.name=n,t.version=n,V.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.architecture=n,V.call(e,r,i.cpu),e},this.getDevice=function(){var e={};return e.vendor=n,e.model=n,e.type=n,V.call(e,r,i.device),e},this.getEngine=function(){var e={};return e.name=n,e.version=n,V.call(e,r,i.engine),e},this.getOS=function(){var e={};return e.name=n,e.version=n,V.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>255?U(e,255):e,this},this.setUA(r),this};H.VERSION="0.7.30",H.BROWSER=B([f,p,"major"]),H.CPU=B([h]),H.DEVICE=B([u,d,l,m,b,g,w,y,v]),H.ENGINE=H.OS=B([f,p]),typeof t!==s?(e.exports&&(t=e.exports=H),t.UAParser=H):r.amdO?(i=function(){return H}.call(t,r,t,e))===n||(e.exports=i):typeof a!==s&&(a.UAParser=H);var Y=typeof a!==s&&(a.jQuery||a.Zepto);if(Y&&!Y.ua){var X=new H;Y.ua=X.getResult(),Y.ua.get=function(){return X.getUA()},Y.ua.set=function(e){X.setUA(e);var t=X.getResult();for(var r in t)Y.ua[r]=t[r]}}}("object"==typeof window?window:this)},751:(e,t,r)=>{"use strict";e.exports=r.p+"70a4106e0fc426006459.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 h=r.noExitRuntime||!0;"object"!=typeof WebAssembly&&K("no native wasm support detected");var m,b,w=!1;function g(e,t){e||K("Assertion failed: "+t)}function y(e){var t=r["_"+e];return g(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function v(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=gr(r),O(e,T,t,r)}return t},array:function(e){var t=gr(e.length);return A.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=br()),s[_]=c(i[_])):s[_]=i[_]}return a=r=o.apply(null,s),r="string"===t?P(a):"boolean"===t?!!a:a,0!==e&&wr(e),r}var E,A,T,x,k,R,L,F,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 P(e,t){return e?I(T,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 S(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 B(e){var t=S(e)+1,r=fr(t);return r&&O(e,A,r,t),r}function D(e,t){for(var r=0;r<e.length;++r)A[t++>>0]=e.charCodeAt(r);A[t>>0]=0}function C(){var e=m.buffer;E=e,r.HEAP8=A=new Int8Array(e),r.HEAP16=x=new Int16Array(e),r.HEAP32=R=new Int32Array(e),r.HEAPU8=T=new Uint8Array(e),r.HEAPU16=k=new Uint16Array(e),r.HEAPU32=L=new Uint32Array(e),r.HEAPF32=F=new Float32Array(e),r.HEAPF64=z=new Float64Array(e)}var U,V=[],N=[],G=[],W=[];function H(){var e=r.preRun.shift();V.unshift(e)}var Y=0,X=null,q=null;function Z(){Y++,r.monitorRunDependencies&&r.monitorRunDependencies(Y)}function j(){if(Y--,r.monitorRunDependencies&&r.monitorRunDependencies(Y),0==Y&&(null!==X&&(clearInterval(X),X=null),q)){var e=q;q=null,e()}}function K(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 J="zappar-cv.wasm";if(String.prototype.startsWith?!J.startsWith("data:application/octet-stream;base64,"):0!==J.indexOf("data:application/octet-stream;base64,")){var $=J;J=r.locateFile?r.locateFile($,u):u+$}var Q,ee,te,re={490708:function(){if(self.crypto&&self.crypto.getRandomValues){var e=new Uint32Array(1);return self.crypto.getRandomValues(e),e[0]}return 9007199254740991*Math.random()}};function ie(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t(r);else{var i=t.wd;"number"==typeof i?void 0===t.Pc?U.get(i)():U.get(i)(t.Pc):i(void 0===t.Pc?null:t.Pc)}}}function ae(e,t){if(0===e)e=Date.now();else{if(1!==e&&4!==e)return R[dr()>>2]=28,-1;e=te()}return R[t>>2]=e/1e3|0,R[t+4>>2]=e%1e3*1e6|0,0}function ne(e){this.Ic=e-16,this.Nd=function(e){R[this.Ic+8>>2]=e},this.Kd=function(e){R[this.Ic+0>>2]=e},this.Ld=function(){R[this.Ic+4>>2]=0},this.Jd=function(){A[this.Ic+12>>0]=0},this.Md=function(){A[this.Ic+13>>0]=0},this.zd=function(e,t){this.Nd(e),this.Kd(t),this.Ld(),this.Jd(),this.Md()}}function oe(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 se(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=oe(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function _e(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 ce(e){if("/"===e)return"/";var t=(e=(e=se(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)}function ue(){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=oe(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."}te=function(){return performance.now()};var fe=[];function le(e,t){fe[e]={input:[],xc:[],Hc:t},De(e,de)}var de={open:function(e){var t=fe[e.node.Mc];if(!t)throw new Te(43);e.vc=t,e.seekable=!1},close:function(e){e.vc.Hc.flush(e.vc)},flush:function(e){e.vc.Hc.flush(e.vc)},read:function(e,t,r,i){if(!e.vc||!e.vc.Hc.jd)throw new Te(60);for(var a=0,n=0;n<i;n++){try{var o=e.vc.Hc.jd(e.vc)}catch(e){throw new Te(29)}if(void 0===o&&0===a)throw new Te(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.vc||!e.vc.Hc.ad)throw new Te(60);try{for(var a=0;a<i;a++)e.vc.Hc.ad(e.vc,t[r+a])}catch(e){throw new Te(29)}return i&&(e.node.timestamp=Date.now()),a}},pe={jd: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=sr(t,!0)}return e.input.shift()},ad:function(e,t){null===t||10===t?(d(I(e.xc,0)),e.xc=[]):0!=t&&e.xc.push(t)},flush:function(e){e.xc&&0<e.xc.length&&(d(I(e.xc,0)),e.xc=[])}},he={ad:function(e,t){null===t||10===t?(p(I(e.xc,0)),e.xc=[]):0!=t&&e.xc.push(t)},flush:function(e){e.xc&&0<e.xc.length&&(p(I(e.xc,0)),e.xc=[])}},me={Ac:null,Cc:function(){return me.createNode(null,"/",16895,0)},createNode:function(e,t,r,i){if(24576==(61440&r)||4096==(61440&r))throw new Te(63);return me.Ac||(me.Ac={dir:{node:{zc:me.rc.zc,Bc:me.rc.Bc,Kc:me.rc.Kc,Rc:me.rc.Rc,od:me.rc.od,Xc:me.rc.Xc,pd:me.rc.pd,Sc:me.rc.Sc,Tc:me.rc.Tc},stream:{Fc:me.tc.Fc}},file:{node:{zc:me.rc.zc,Bc:me.rc.Bc},stream:{Fc:me.tc.Fc,read:me.tc.read,write:me.tc.write,dd:me.tc.dd,kd:me.tc.kd,md:me.tc.md}},link:{node:{zc:me.rc.zc,Bc:me.rc.Bc,Nc:me.rc.Nc},stream:{}},ed:{node:{zc:me.rc.zc,Bc:me.rc.Bc},stream:Be}}),16384==(61440&(r=ze(e,t,r,i)).mode)?(r.rc=me.Ac.dir.node,r.tc=me.Ac.dir.stream,r.sc={}):32768==(61440&r.mode)?(r.rc=me.Ac.file.node,r.tc=me.Ac.file.stream,r.uc=0,r.sc=null):40960==(61440&r.mode)?(r.rc=me.Ac.link.node,r.tc=me.Ac.link.stream):8192==(61440&r.mode)&&(r.rc=me.Ac.ed.node,r.tc=me.Ac.ed.stream),r.timestamp=Date.now(),e&&(e.sc[t]=r,e.timestamp=r.timestamp),r},Zd:function(e){return e.sc?e.sc.subarray?e.sc.subarray(0,e.uc):new Uint8Array(e.sc):new Uint8Array(0)},fd:function(e,t){var r=e.sc?e.sc.length:0;r>=t||(t=Math.max(t,r*(1048576>r?2:1.125)>>>0),0!=r&&(t=Math.max(t,256)),r=e.sc,e.sc=new Uint8Array(t),0<e.uc&&e.sc.set(r.subarray(0,e.uc),0))},Hd:function(e,t){if(e.uc!=t)if(0==t)e.sc=null,e.uc=0;else{var r=e.sc;e.sc=new Uint8Array(t),r&&e.sc.set(r.subarray(0,Math.min(t,e.uc))),e.uc=t}},rc:{zc:function(e){var t={};return t.ud=8192==(61440&e.mode)?e.id:1,t.$c=e.id,t.mode=e.mode,t.Fd=1,t.uid=0,t.xd=0,t.Mc=e.Mc,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.uc:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.qd=new Date(e.timestamp),t.Ed=new Date(e.timestamp),t.td=new Date(e.timestamp),t.rd=4096,t.sd=Math.ceil(t.size/t.rd),t},Bc:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&me.Hd(e,t.size)},Kc:function(){throw xe[44]},Rc:function(e,t,r,i){return me.createNode(e,t,r,i)},od:function(e,t,r){if(16384==(61440&e.mode)){try{var i=Fe(t,r)}catch(e){}if(i)for(var a in i.sc)throw new Te(55)}delete e.parent.sc[e.name],e.parent.timestamp=Date.now(),e.name=r,t.sc[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},Xc:function(e,t){delete e.sc[t],e.timestamp=Date.now()},pd:function(e,t){var r,i=Fe(e,t);for(r in i.sc)throw new Te(55);delete e.sc[t],e.timestamp=Date.now()},Sc:function(e){var t,r=[".",".."];for(t in e.sc)e.sc.hasOwnProperty(t)&&r.push(t);return r},Tc:function(e,t,r){return(e=me.createNode(e,t,41471,0)).link=r,e},Nc:function(e){if(40960!=(61440&e.mode))throw new Te(28);return e.link}},tc:{read:function(e,t,r,i,a){var n=e.node.sc;if(a>=e.node.uc)return 0;if(8<(e=Math.min(e.node.uc-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===A.buffer&&(n=!1),!i)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.sc||e.sc.subarray)){if(n)return e.sc=t.subarray(r,r+i),e.uc=i;if(0===e.uc&&0===a)return e.sc=t.slice(r,r+i),e.uc=i;if(a+i<=e.uc)return e.sc.set(t.subarray(r,r+i),a),i}if(me.fd(e,a+i),e.sc.subarray&&t.subarray)e.sc.set(t.subarray(r,r+i),a);else for(n=0;n<i;n++)e.sc[a+n]=t[r+n];return e.uc=Math.max(e.uc,a+i),i},Fc:function(e,t,r){if(1===r?t+=e.position:2===r&&32768==(61440&e.node.mode)&&(t+=e.node.uc),0>t)throw new Te(28);return t},dd:function(e,t,r){me.fd(e.node,t+r),e.node.uc=Math.max(e.node.uc,t+r)},kd:function(e,t,r,i,a,n){if(0!==t)throw new Te(28);if(32768!=(61440&e.node.mode))throw new Te(43);if(e=e.node.sc,2&n||e.buffer!==E){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=fr(n);r<n;)A[t+r++]=0;if(!(r=t))throw new Te(48);A.set(e,r)}else i=!1,r=e.byteOffset;return{Ic:r,Vd:i}},md:function(e,t,r,i,a){if(32768!=(61440&e.node.mode))throw new Te(43);return 2&a||me.tc.write(e,t,0,i,r,!1),0}}},be=null,we={},ge=[],ye=1,ve=null,Ee=!0,Ae={},Te=null,xe={};function ke(e,t){if(t=t||{},!(e=ue("/",e)))return{path:"",node:null};var r,i={gd:!0,bd:0};for(r in i)void 0===t[r]&&(t[r]=i[r]);if(8<t.bd)throw new Te(32);e=oe(e.split("/").filter((function(e){return!!e})),!1);var a=be;for(i="/",r=0;r<e.length;r++){var n=r===e.length-1;if(n&&t.parent)break;if(a=Fe(a,e[r]),i=se(i+"/"+e[r]),a.Lc&&(!n||n&&t.gd)&&(a=a.Lc.root),!n||t.Qc)for(n=0;40960==(61440&a.mode);)if(a=We(i),a=ke(i=ue(_e(i),a),{bd:t.bd}).node,40<n++)throw new Te(32)}return{path:i,node:a}}function Re(e){for(var t;;){if(e===e.parent)return e=e.Cc.ld,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}}function Le(e,t){for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%ve.length}function Fe(e,t){var r;if(r=(r=Pe(e,"x"))?r:e.rc.Kc?0:2)throw new Te(r,e);for(r=ve[Le(e.id,t)];r;r=r.Gc){var i=r.name;if(r.parent.id===e.id&&i===t)return r}return e.rc.Kc(e,t)}function ze(e,t,r,i){return t=Le((e=new or(e,t,r,i)).parent.id,e.name),e.Gc=ve[t],ve[t]=e}var Me={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Ie(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function Pe(e,t){return Ee||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2}function Oe(e,t){try{return Fe(e,t),20}catch(e){}return Pe(e,"wx")}var Se,Be={open:function(e){e.tc=we[e.node.Mc].tc,e.tc.open&&e.tc.open(e)},Fc:function(){throw new Te(70)}};function De(e,t){we[e]={tc:t}}function Ce(e,t){var r="/"===t,i=!t;if(r&&be)throw new Te(10);if(!r&&!i){var a=ke(t,{gd:!1});if(t=a.path,(a=a.node).Lc)throw new Te(10);if(16384!=(61440&a.mode))throw new Te(54)}t={type:e,ce:{},ld:t,Dd:[]},(e=e.Cc(t)).Cc=t,t.root=e,r?be=e:a&&(a.Lc=t,a.Cc&&a.Cc.Dd.push(t))}function Ue(e,t,r){var i=ke(e,{parent:!0}).node;if(!(e=ce(e))||"."===e||".."===e)throw new Te(28);var a=Oe(i,e);if(a)throw new Te(a);if(!i.rc.Rc)throw new Te(63);return i.rc.Rc(i,e,t,r)}function Ve(e){return Ue(e,16895,0)}function Ne(e,t,r){void 0===r&&(r=t,t=438),Ue(e,8192|t,r)}function Ge(e,t){if(!ue(e))throw new Te(44);var r=ke(t,{parent:!0}).node;if(!r)throw new Te(44);var i=Oe(r,t=ce(t));if(i)throw new Te(i);if(!r.rc.Tc)throw new Te(63);r.rc.Tc(r,t,e)}function We(e){if(!(e=ke(e).node))throw new Te(44);if(!e.rc.Nc)throw new Te(28);return ue(Re(e.parent),e.rc.Nc(e))}function He(e,t){if(!(e=ke(e,{Qc:!t}).node))throw new Te(44);if(!e.rc.zc)throw new Te(63);return e.rc.zc(e)}function Ye(e){return He(e,!0)}function Xe(e,t,i,a){if(""===e)throw new Te(44);if("string"==typeof t){var n=Me[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=se(e);try{o=ke(e,{Qc:!(131072&t)}).node}catch(e){}}if(n=!1,64&t)if(o){if(128&t)throw new Te(20)}else o=Ue(e,i,0),n=!0;if(!o)throw new Te(44);if(8192==(61440&o.mode)&&(t&=-513),65536&t&&16384!=(61440&o.mode))throw new Te(54);if(!n&&(i=o?40960==(61440&o.mode)?32:16384==(61440&o.mode)&&("r"!==Ie(t)||512&t)?31:Pe(o,Ie(t)):44))throw new Te(i);if(512&t){if(!(i="string"==typeof(i=o)?ke(i,{Qc:!0}).node:i).rc.Bc)throw new Te(63);if(16384==(61440&i.mode))throw new Te(31);if(32768!=(61440&i.mode))throw new Te(28);if(n=Pe(i,"w"))throw new Te(n);i.rc.Bc(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(!ge[e])return e;throw new Te(33)}(t),e.Dc=t,ge[t]=e}({node:o,path:Re(o),flags:t,seekable:!0,position:0,tc:o.tc,Sd:[],error:!1},a)).tc.open&&a.tc.open(a),!r.logReadFiles||1&t||($e||($e={}),e in $e||($e[e]=1,p("FS.trackingDelegate error on read file: "+e)));try{Ae.onOpenFile&&(o=0,1!=(2097155&t)&&(o|=1),0!=(2097155&t)&&(o|=2),Ae.onOpenFile(e,o))}catch(t){p("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+t.message)}return a}function qe(e,t,r){if(null===e.Dc)throw new Te(8);if(!e.seekable||!e.tc.Fc)throw new Te(70);if(0!=r&&1!=r&&2!=r)throw new Te(28);return e.position=e.tc.Fc(e,t,r),e.Sd=[],e.position}function Ze(){Te||((Te=function(e,t){this.node=t,this.Id=function(e){this.wc=e},this.Id(e),this.message="FS error"}).prototype=Error(),Te.prototype.constructor=Te,[44].forEach((function(e){xe[e]=new Te(e),xe[e].stack="<generic error, no stack>"})))}function je(e,t,r){e=se("/dev/"+e);var i=function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r}(!!t,!!r);Ke||(Ke=64);var a=Ke++<<8|0;De(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 Te(29)}if(void 0===s&&0===n)throw new Te(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 Te(29)}return a&&(e.node.timestamp=Date.now()),n}}),Ne(e,i,a)}var Ke,Je,$e,Qe={};function et(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&se(t)!==se(Re(e.node)))return-54;throw e}return R[r>>2]=i.ud,R[r+4>>2]=0,R[r+8>>2]=i.$c,R[r+12>>2]=i.mode,R[r+16>>2]=i.Fd,R[r+20>>2]=i.uid,R[r+24>>2]=i.xd,R[r+28>>2]=i.Mc,R[r+32>>2]=0,ee=[i.size>>>0,(Q=i.size,1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[r+40>>2]=ee[0],R[r+44>>2]=ee[1],R[r+48>>2]=4096,R[r+52>>2]=i.sd,R[r+56>>2]=i.qd.getTime()/1e3|0,R[r+60>>2]=0,R[r+64>>2]=i.Ed.getTime()/1e3|0,R[r+68>>2]=0,R[r+72>>2]=i.td.getTime()/1e3|0,R[r+76>>2]=0,ee=[i.$c>>>0,(Q=i.$c,1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[r+80>>2]=ee[0],R[r+84>>2]=ee[1],0}var tt=void 0;function rt(){return R[(tt+=4)-4>>2]}function it(e){if(!(e=ge[e]))throw new Te(8);return e}function at(e){try{e()}catch(e){if(!(e instanceof yr)&&"unwind"!==e)throw e&&"object"==typeof e&&e.stack&&p("exception thrown: "+[e,e.stack]),e}}var nt,ot,st,_t=!1,ct=null,ut=0,ft=null,lt=0,dt=0,pt=0,ht=[],mt={},bt=!1,wt=!1,gt=[];function yt(e,t,i,a){if(t&&r.Zc&&e==r.canvas)return r.Zc;var n;if(t){var o={antialias:!1,alpha:!1,Cd:1};if(a)for(var s in a)o[s]=a[s];if(void 0!==$t&&(n=function(e,t){e.hd||(e.hd=e.getContext,e.getContext=function(t,r){return"webgl"==t==(r=e.hd(t,r))instanceof WebGLRenderingContext?r:null});var r=e.getContext("webgl",t);return r?function(e,t){var r=Zt(qt),i={$d:r,attributes:t,version:t.Cd,Yc:e};return e.canvas&&(e.canvas.Ud=i),qt[r]=i,(void 0===t.vd||t.vd)&&function(e){if(e||(e=Kt),!e.Ad){e.Ad=!0;var t=e.Yc;!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.Xd=t.getExtension("EXT_disjoint_timer_query"),t.ae=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 _=qt[n].Yc}else _=e.getContext("2d");return _?(i&&(t||g(void 0===ar,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),r.Zc=_,t&&(Kt=qt[n],r.Zc=ar=Kt&&Kt.Yc),r.fe=t,gt.forEach((function(e){e()})),function(){function e(){wt=document.pointerLockElement===r.canvas||document.mozPointerLockElement===r.canvas||document.webkitPointerLockElement===r.canvas||document.msPointerLockElement===r.canvas}if(r.preloadPlugins||(r.preloadPlugins=[]),!Ft){Ft=!0;try{zt=!0}catch(e){zt=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Mt="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:zt?null:console.log("warning: no BlobBuilder"),It="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,r.nd||void 0!==It||(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),r.nd=!0),r.preloadPlugins.push({canHandle:function(e){return!r.nd&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,i,a){var n=null;if(zt)try{(n=new Blob([e],{type:Lt(t)})).size!==e.length&&(n=new Blob([new Uint8Array(e).buffer],{type:Lt(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 Mt).append(new Uint8Array(e).buffer),n=n.getBlob());var o=It.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,It.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.be&&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(!zt)return o();try{var _=new Blob([e],{type:Lt(t)})}catch(e){return o()}_=It.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=_,Rt((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){!wt&&r.canvas.requestPointerLock&&(r.canvas.requestPointerLock(),e.preventDefault())}),!1))}}()),_):null}var vt=!1,Et=void 0,At=void 0;function Tt(){return!!bt&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)}var xt=0;function kt(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 Rt(e,t){setTimeout((function(){at(e)}),t)}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 Ft,zt,Mt,It,Pt=[];function Ot(){var e=r.canvas;Pt.forEach((function(t){t(e.width,e.height)}))}function St(e,t,i){t&&i?(e.Td=t,e.yd=i):(t=e.Td,i=e.yd);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)}At?(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 Bt(){return!1}r._emscripten_is_main_browser_thread=Bt;var Dt,Ct=[];function Ut(e,t){L[e>>2]=t,L[e+4>>2]=t/4294967296|0}function Vt(e,t,r,i,a){function n(t){var r=0,i=0;t&&(i=y.response?y.response.byteLength:0,r=fr(i),T.set(new Uint8Array(y.response),r)),L[e+12>>2]=r,Ut(e+16,i)}var o=L[e+8>>2];if(o){var s=P(o),_=e+112,c=P(_);c||(c="GET");var u=L[_+52>>2],f=L[_+56>>2],l=!!L[_+60>>2],d=L[_+68>>2],p=L[_+72>>2];o=L[_+76>>2];var h=L[_+80>>2],m=L[_+84>>2];_=L[_+88>>2];var b=!!(1&u),w=!!(2&u);u=!!(64&u),d=d?P(d):void 0,p=p?P(p):void 0;var g=h?P(h):void 0,y=new XMLHttpRequest;if(y.withCredentials=l,y.open(c,s,!u,d,p),u||(y.timeout=f),y.de=s,y.responseType="arraybuffer",h&&y.overrideMimeType(g),o)for(;(c=L[o>>2])&&(s=L[o+4>>2]);)o+=8,c=P(c),s=P(s),y.setRequestHeader(c,s);Ct.push(y),L[e+0>>2]=Ct.length,o=m&&_?T.slice(m,m+_):null,y.onload=function(i){n(b&&!w);var a=y.response?y.response.byteLength:0;Ut(e+24,0),a&&Ut(e+32,a),k[e+40>>1]=y.readyState,k[e+42>>1]=y.status,y.statusText&&O(y.statusText,T,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;Ut(e+24,0),Ut(e+32,y.response?y.response.byteLength:0),k[e+40>>1]=y.readyState,k[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=fr(r),T.set(new Uint8Array(y.response),a)),L[e+12>>2]=a,Ut(e+16,r),Ut(e+24,t.loaded-r),Ut(e+32,t.total),k[e+40>>1]=y.readyState,3<=y.readyState&&0===y.status&&0<t.loaded&&(y.status=200),k[e+42>>1]=y.status,y.statusText&&O(y.statusText,T,e+44,64),i&&i(e,y,t),a&&ur(a)},y.onreadystatechange=function(t){k[e+40>>1]=y.readyState,2<=y.readyState&&(k[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 Nt(e,t,r,i){var a=Dt;if(a){var n=L[e+112+64>>2];n||(n=L[e+8>>2]);var o=P(n);try{var s=a.transaction(["FILES"],"readwrite").objectStore("FILES").put(t,o);s.onsuccess=function(){k[e+40>>1]=4,k[e+42>>1]=200,O("OK",T,e+44,64),r(e,0,o)},s.onerror=function(t){k[e+40>>1]=4,k[e+42>>1]=413,O("Payload Too Large",T,e+44,64),i(e,0,t)}}catch(t){i(e,0,t)}}else i(e,0,"IndexedDB not available!")}var Gt,Wt={};function Ht(){if(!Gt){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 Wt)t[e]=Wt[e];var r=[];for(e in t)r.push(e+"="+t[e]);Gt=r}return Gt}var Yt=1,Xt=[],qt=[];function Zt(e){for(var t=Yt++,r=e.length;r<t;r++)e[r]=null;return t}var jt,Kt,Jt,$t={};function Qt(e){return 0==e%4&&(0!=e%100||0==e%400)}function er(e,t){for(var r=0,i=0;i<=t;r+=e[i++]);return r}var tr=[31,29,31,30,31,30,31,31,30,31,30,31],rr=[31,28,31,30,31,30,31,31,30,31,30,31];function ir(e,t){for(e=new Date(e.getTime());0<t;){var r=e.getMonth(),i=(Qt(e.getFullYear())?tr:rr)[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}var ar,nr=[];function or(e,t,r,i){e||(e=this),this.parent=e,this.Cc=e.Cc,this.Lc=null,this.id=ye++,this.name=t,this.mode=r,this.rc={},this.tc={},this.Mc=i}function sr(e,t){var r=Array(S(e)+1);return e=O(e,r,0,r.length),t&&(r.length=e),r}Object.defineProperties(or.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}}}),Ze(),ve=Array(4096),Ce(me,"/"),Ve("/tmp"),Ve("/home"),Ve("/home/web_user"),function(){Ve("/dev"),De(259,{read:function(){return 0},write:function(e,t,r,i){return i}}),Ne("/dev/null",259),le(1280,pe),le(1536,he),Ne("/dev/tty",1280),Ne("/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(){K("randomDevice")}}();je("random",e),je("urandom",e),Ve("/dev/shm"),Ve("/dev/shm/tmp")}(),function(){Ve("/proc");var e=Ve("/proc/self");Ve("/proc/self/fd"),Ce({Cc:function(){var t=ze(e,"fd",16895,73);return t.rc={Kc:function(e,t){var r=ge[+t];if(!r)throw new Te(8);return(e={parent:null,Cc:{ld:"fake"},rc:{Nc:function(){return r.path}}}).parent=e}},t}},"/proc/self/fd")}(),r.requestFullscreen=function(e,t){!function(e,t){function i(){bt=!1;var e=a.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(a.exitFullscreen=Tt,Et&&a.requestPointerLock(),bt=!0,At?("undefined"!=typeof SDL&&(R[SDL.screen>>2]=8388608|L[SDL.screen>>2]),St(r.canvas),Ot()):St(a)):(e.parentNode.insertBefore(a,e),e.parentNode.removeChild(e),At?("undefined"!=typeof SDL&&(R[SDL.screen>>2]=-8388609&L[SDL.screen>>2]),St(r.canvas),Ot()):St(a)),r.onFullScreen&&r.onFullScreen(bt),r.onFullscreen&&r.onFullscreen(bt)}void 0===(Et=e)&&(Et=!0),void 0===(At=t)&&(At=!1);var a=r.canvas;vt||(vt=!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){St(r.canvas,e,t),i||Ot()},r.pauseMainLoop=function(){ct=null,ut++},r.resumeMainLoop=function(){ut++;var e=lt,t=dt,i=ft;ft=null,function(e){function t(){if(i<ut){if(!h)try{Er(b)}catch(e){if(!(e instanceof yr))throw e}return!1}return!0}g(!ft,"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."),ft=e;var i=ut;_t=!1,ot=function(){if(!w)if(0<ht.length){var i=Date.now(),a=ht.shift();if(a.wd(a.Pc),st){var n=st,o=0==n%1?n-1:Math.floor(n);st=a.Wd?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=mt.Yd,(a=st)?a<n?r.setStatus(i+" ("+(n-a)+"/"+n+")"):r.setStatus(i):r.setStatus("")),t()&&setTimeout(ot,0)}else t()&&(pt=pt+1|0,1==lt&&1<dt&&0!=pt%dt?ct():(0==lt&&(nt=te()),w||r.preMainLoop&&!1===r.preMainLoop()||(at(e),r.postMainLoop&&r.postMainLoop()),t()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.Gd&&SDL.audio.Gd(),ct())))}}(i),function(e,t){if(lt=e,dt=t,ft)if(_t||(_t=!0),0==e)ct=function(){var e=0|Math.max(0,nt+t-te());setTimeout(ot,e)};else if(1==e)ct=function(){kt(ot)};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"})}}ct=function(){setImmediate(ot)}}}(e,t),ct()},r.getUserMedia=function(){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(void 0)},r.createContext=function(e,t,r,i){return yt(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){Dt=e,j()}(e.target.result)},r.onerror=function(e){t()}}(0,(function(){Dt=!1,j()})),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||Z();var _r={H:function(e,t){return ae(e,t)},a:function(e){return fr(e+16)+16},b:function(e,t,r){throw new ne(e).zd(t,r),e},e:function(e,t,r){tt=r;try{var i=it(e);switch(t){case 0:var a=rt();return 0>a?-28:Xe(i.path,i.flags,0,a).Dc;case 1:case 2:case 13:case 14:return 0;case 3:return i.flags;case 4:return a=rt(),i.flags|=a,0;case 12:return a=rt(),x[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return R[dr()>>2]=28,-1}}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},D:function(e,t,r){try{var i=it(e);if(!i.Ec){var a=ke(i.path,{Qc:!0}).node;if(!a.rc.Sc)throw new Te(54);var n=a.rc.Sc(a);i.Ec=n}e=0;for(var o=qe(i,0,1),s=Math.floor(o/280);s<i.Ec.length&&e+280<=r;){var _=i.Ec[s];if("."===_[0])var c=1,u=4;else{var f=Fe(i.node,_);c=f.id,u=8192==(61440&f.mode)?2:16384==(61440&f.mode)?4:40960==(61440&f.mode)?10:8}ee=[c>>>0,(Q=c,1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[t+e>>2]=ee[0],R[t+e+4>>2]=ee[1],ee=[280*(s+1)>>>0,(Q=280*(s+1),1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[t+e+8>>2]=ee[0],R[t+e+12>>2]=ee[1],x[t+e+16>>1]=280,A[t+e+18>>0]=u,O(_,T,t+e+19,256),e+=280,s+=1}return qe(i,280*s,0),e}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},o:function(){return 42},F:function(e,t,r){tt=r;try{var i=it(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.vc?0:-59;case 21519:if(!i.vc)return-59;var a=rt();return R[a>>2]=0;case 21520:return i.vc?-28:-59;case 21531:if(e=a=rt(),!i.tc.Bd)throw new Te(59);return i.tc.Bd(i,t,e);default:K("bad ioctl syscall "+t)}}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},G:function(e,t){try{return et(Ye,e=P(e),t)}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},p:function(e,t,r){tt=r;try{return Xe(P(e),t,r?rt():0).Dc}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},J:function(e,t){try{return et(He,e=P(e),t)}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},C:function(e,t){try{return Ge(e=P(e),t=P(t)),0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},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 D("Emscripten",e+t.sysname),D("emscripten",e+t.nodename),D("1.0",e+t.release),D("#1",e+t.version),D("wasm32",e+t.machine),0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},I:function(e){try{var t=ke(e=P(e),{parent:!0}).node,r=ce(e),i=Fe(t,r);e:{try{var a=Fe(t,r)}catch(e){var n=e.wc;break e}n=Pe(t,"wx")||(16384==(61440&a.mode)?31:0)}if(n)throw new Te(n);if(!t.rc.Xc)throw new Te(63);if(i.Lc)throw new Te(10);try{Ae.willDeletePath&&Ae.willDeletePath(e)}catch(t){p("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}t.rc.Xc(t,r);var o=Le(i.parent.id,i.name);if(ve[o]===i)ve[o]=i.Gc;else for(var s=ve[o];s;){if(s.Gc===i){s.Gc=i.Gc;break}s=s.Gc}try{Ae.onDeletePath&&Ae.onDeletePath(e)}catch(t){p("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}return 0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),-e.wc}},L:function(e){delete Ct[e-1]},c:function(){K()},h:ae,P:function(e,t){return e-t},R:function(){self.postMessage({t:"gfx"})},t: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)+".arweb"+String.fromCharCode(92)+".app)$","i")).test(e)&&(e="*.arweb.app")}t=S(e)+1;var r=fr(t);return O(e,T,r,t+1),r},S:function(){self.postMessage({t:"licerr"})},m:function(e,t,r){var i;for(nr.length=0,r>>=2;i=T[t++];)(i=105>i)&&1&r&&r++,nr.push(i?z[r++>>1]:R[r]),++r;return re[e].apply(null,nr)},l:function(e,t,r){function i(){U.get(e)(t)}0<=r?Rt(i,r):function(e){kt((function(){at(e)}))}(i)},x:function(){return 2147483648},N:Bt,v:function(e,t,r){T.copyWithin(e,t,t+r)},w:function(e){var t=T.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{m.grow(Math.min(2147483648,i)-E.byteLength+65535>>>16),C();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){Nt(e,r.response,(function(e){at((function(){l?U.get(l)(e):t&&t(e)}))}),(function(e){at((function(){l?U.get(l)(e):t&&t(e)}))}))}function o(e){at((function(){h?U.get(h)(e):a&&a(e)}))}function s(e){at((function(){d?U.get(d)(e):r&&r(e)}))}function _(e){at((function(){p?U.get(p)(e):i&&i(e)}))}function c(e){at((function(){l?U.get(l)(e):t&&t(e)}))}var u=e+112,f=P(u),l=L[u+36>>2],d=L[u+40>>2],p=L[u+44>>2],h=L[u+48>>2],m=L[u+52>>2],b=!!(4&m),w=!!(32&m);if(m=!!(16&m),"EM_IDB_STORE"===f)f=L[u+84>>2],Nt(e,T.slice(f,f+L[u+88>>2]),c,s);else if("EM_IDB_DELETE"===f)!function(e,t,r){var i=Dt;if(i){var a=L[e+112+64>>2];a||(a=L[e+8>>2]),a=P(a);try{var n=i.transaction(["FILES"],"readwrite").objectStore("FILES").delete(a);n.onsuccess=function(r){r=r.target.result,L[e+12>>2]=0,Ut(e+16,0),Ut(e+24,0),Ut(e+32,0),k[e+40>>1]=4,k[e+42>>1]=200,O("OK",T,e+44,64),t(e,0,r)},n.onerror=function(t){k[e+40>>1]=4,k[e+42>>1]=404,O("Not Found",T,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(m){if(w)return 0;Vt(e,b?n:c,s,_,o)}else!function(e,t,r){var i=Dt;if(i){var a=L[e+112+64>>2];a||(a=L[e+8>>2]),a=P(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=fr(a);T.set(new Uint8Array(i),n),L[e+12>>2]=n,Ut(e+16,a),Ut(e+24,0),Ut(e+32,a),k[e+40>>1]=4,k[e+42>>1]=200,O("OK",T,e+44,64),t(e,0,i)}else k[e+40>>1]=4,k[e+42>>1]=404,O("Not Found",T,e+44,64),r(e,0,"no data")},n.onerror=function(t){k[e+40>>1]=4,k[e+42>>1]=404,O("Not Found",T,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){Vt(e,n,s,_,o)}:function(e){Vt(e,c,s,_,o)});return e},A:function(e,t){try{var r=0;return Ht().forEach((function(i,a){var n=t+r;R[e+4*a>>2]=n,D(i,n),r+=i.length+1})),0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),e.wc}},B:function(e,t){try{var r=Ht();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!==Qe&&e instanceof Te||K(e),e.wc}},O:function(e){Er(e)},g:function(e){try{var t=it(e);if(null===t.Dc)throw new Te(8);t.Ec&&(t.Ec=null);try{t.tc.close&&t.tc.close(t)}catch(e){throw e}finally{ge[t.Dc]=null}return t.Dc=null,0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),e.wc}},E:function(e,t,r,i){try{e:{for(var a=it(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=A;if(0>c||0>u)throw new Te(28);if(null===s.Dc)throw new Te(8);if(1==(2097155&s.flags))throw new Te(8);if(16384==(61440&s.node.mode))throw new Te(31);if(!s.tc.read)throw new Te(28);var l=void 0!==u;if(l){if(!s.seekable)throw new Te(70)}else u=s.position;var d=s.tc.read(s,f,_,c,u);l||(s.position+=d);var p=d;if(0>p){var h=-1;break e}if(e+=p,p<o)break}h=e}return R[i>>2]=h,0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),e.wc}},u:function(e,t,r,i,a){try{var n=it(e);return-9007199254740992>=(e=4294967296*r+(t>>>0))||9007199254740992<=e?-61:(qe(n,e,i),ee=[n.position>>>0,(Q=n.position,1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[a>>2]=ee[0],R[a+4>>2]=ee[1],n.Ec&&0===e&&0===i&&(n.Ec=null),0)}catch(e){return void 0!==Qe&&e instanceof Te||K(e),e.wc}},k:function(e,t,r,i){try{e:{for(var a=it(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=A;if(0>_||0>c)throw new Te(28);if(null===o.Dc)throw new Te(8);if(0==(2097155&o.flags))throw new Te(8);if(16384==(61440&o.node.mode))throw new Te(31);if(!o.tc.write)throw new Te(28);o.seekable&&1024&o.flags&&qe(o,0,2);var f=void 0!==c;if(f){if(!o.seekable)throw new Te(70)}else c=o.position;var l=o.tc.write(o,u,s,_,c,void 0);f||(o.position+=l);try{o.path&&Ae.onWriteToFile&&Ae.onWriteToFile(o.path)}catch(e){p("FS.trackingDelegate['onWriteToFile']('"+o.path+"') threw an exception: "+e.message)}var d=l;if(0>d){var h=-1;break e}e+=d}h=e}return R[i>>2]=h,0}catch(e){return void 0!==Qe&&e instanceof Te||K(e),e.wc}},f:function(e){var t=Date.now();return R[e>>2]=t/1e3|0,R[e+4>>2]=t%1e3*1e3|0,0},n:function(e,t){ar.bindTexture(e,Xt[t])},q:function(e,t){for(var r=0;r<e;r++){var i=ar.createTexture(),a=i&&Zt(Xt);i?(i.name=a,Xt[a]=i):jt||(jt=1282),R[t+4*r>>2]=a}},i:function(e,t,r,i,a,n,o,s,_){var c=ar,u=c.texImage2D;if(_){var f=s-5120;f=1==f?T:4==f?R:6==f?F:5==f||28922==f?L:k;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){ar.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.cd||(e.cd=B("GMT")),R[r+40>>2]=e.cd,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[mr()>>2]=60*n,R[hr()>>2]=Number(t!=a),r=e(r),i=e(i),r=B(r),i=B(i),a<t?(R[pr()>>2]=r,R[pr()+4>>2]=i):(R[pr()>>2]=i,R[pr()+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[pr()+(e?4:0)>>2],R[t+40>>2]=e,t},Q:function(){return 6},y:function(){return 28},z: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=ir(new Date(e.yc+1900,0,1),e.Wc);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={Qd:R[i>>2],Pd:R[i+4>>2],Uc:R[i+8>>2],Oc:R[i+12>>2],Jc:R[i+16>>2],yc:R[i+20>>2],Vc:R[i+24>>2],Wc:R[i+28>>2],ee:R[i+32>>2],Od:R[i+36>>2],Rd:c?P(c):""},r=P(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.Vc].substring(0,3)},"%A":function(e){return f[e.Vc]},"%b":function(e){return l[e.Jc].substring(0,3)},"%B":function(e){return l[e.Jc]},"%C":function(e){return n((e.yc+1900)/100|0,2)},"%d":function(e){return n(e.Oc,2)},"%e":function(e){return a(e.Oc,2," ")},"%g":function(e){return _(e).toString().substring(2)},"%G":function(e){return _(e)},"%H":function(e){return n(e.Uc,2)},"%I":function(e){return 0==(e=e.Uc)?e=12:12<e&&(e-=12),n(e,2)},"%j":function(e){return n(e.Oc+er(Qt(e.yc+1900)?tr:rr,e.Jc-1),3)},"%m":function(e){return n(e.Jc+1,2)},"%M":function(e){return n(e.Pd,2)},"%n":function(){return"\n"},"%p":function(e){return 0<=e.Uc&&12>e.Uc?"AM":"PM"},"%S":function(e){return n(e.Qd,2)},"%t":function(){return"\t"},"%u":function(e){return e.Vc||7},"%U":function(e){var t=new Date(e.yc+1900,0,1),r=0===t.getDay()?t:ir(t,7-t.getDay());return 0>o(r,e=new Date(e.yc+1900,e.Jc,e.Oc))?n(Math.ceil((31-r.getDate()+(er(Qt(e.getFullYear())?tr:rr,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(r,t)?"01":"00"},"%V":function(e){var t=new Date(e.yc+1901,0,4),r=s(new Date(e.yc+1900,0,4));t=s(t);var i=ir(new Date(e.yc+1900,0,1),e.Wc);return 0>o(i,r)?"53":0>=o(t,i)?"01":n(Math.ceil((r.getFullYear()<e.yc+1900?e.Wc+32-r.getDate():e.Wc+1-r.getDate())/7),2)},"%w":function(e){return e.Vc},"%W":function(e){var t=new Date(e.yc,0,1),r=1===t.getDay()?t:ir(t,0===t.getDay()?1:7-t.getDay()+1);return 0>o(r,e=new Date(e.yc+1900,e.Jc,e.Oc))?n(Math.ceil((31-r.getDate()+(er(Qt(e.getFullYear())?tr:rr,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(r,t)?"01":"00"},"%y":function(e){return(e.yc+1900).toString().substring(2)},"%Y":function(e){return e.yc+1900},"%z":function(e){var t=0<=(e=e.Od);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":function(e){return e.Rd},"%%":function(){return"%"}})0<=r.indexOf(u)&&(r=r.replace(new RegExp(u,"g"),c[u](i)));return(u=sr(r,!1)).length>t?0:(A.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}},cr=function(){function e(e){r.asm=e.exports,m=r.asm.T,C(),U=r.asm.Y,N.unshift(r.asm.U),j()}var t={a:_r};if(Z(),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=J;try{e:{try{if(t==J&&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){K(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=cr.U,r._zappar_has_initialized=cr.V,r._zappar_invert=cr.W,r._zappar_loaded=cr.X,r._zappar_pipeline_create=cr.Z,r._zappar_pipeline_destroy=cr._,r._zappar_pipeline_camera_frame_submit=cr.$,r._zappar_pipeline_camera_frame_submit_raw_pointer=cr.aa,r._zappar_pipeline_frame_update=cr.ba,r._zappar_pipeline_camera_frame_user_data=cr.ca,r._zappar_pipeline_camera_model=cr.da,r._zappar_pipeline_frame_number=cr.ea,r._zappar_pipeline_motion_accelerometer_submit=cr.fa,r._zappar_pipeline_motion_rotation_rate_submit=cr.ga,r._zappar_pipeline_motion_attitude_submit=cr.ha,r._zappar_pipeline_motion_attitude_matrix_submit=cr.ia,r._zappar_pipeline_camera_frame_user_facing=cr.ja,r._zappar_pipeline_camera_frame_texture_matrix=cr.ka,r._zappar_pipeline_camera_pose_with_attitude=cr.la,r._zappar_pipeline_camera_pose_with_origin=cr.ma,r._zappar_pipeline_camera_frame_camera_attitude=cr.na,r._zappar_pipeline_camera_frame_device_attitude=cr.oa,r._zappar_pipeline_camera_frame_texture_gl=cr.pa,r._zappar_pipeline_camera_frame_upload_gl=cr.qa,r._zappar_pipeline_sequence_record_start=cr.ra,r._zappar_pipeline_sequence_record_stop=cr.sa,r._zappar_pipeline_sequence_record_clear=cr.ta,r._zappar_pipeline_sequence_record_device_attitude_matrices_set=cr.ua,r._zappar_pipeline_sequence_record_data_size=cr.va,r._zappar_pipeline_sequence_record_data=cr.wa,r._zappar_pipeline_process_gl=cr.xa,r._zappar_pipeline_camera_pose_default=cr.ya,r._zappar_instant_world_tracker_create=cr.za,r._zappar_instant_world_tracker_destroy=cr.Aa,r._zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw=cr.Ba,r._zappar_instant_world_tracker_anchor_pose_raw=cr.Ca,r._zappar_instant_world_tracker_enabled_set=cr.Da,r._zappar_instant_world_tracker_enabled=cr.Ea,r._zappar_image_tracker_create=cr.Fa,r._zappar_image_tracker_destroy=cr.Ga,r._zappar_image_tracker_target_load_from_memory=cr.Ha,r.__Z42zappar_image_tracker_target_load_from_fileP23zappar_image_tracker_tiPKc=cr.Ia;var ur=r._free=cr.Ja;r._zappar_image_tracker_anchor_count=cr.Ka,r._zappar_image_tracker_anchor_id=cr.La,r._zappar_image_tracker_anchor_pose_raw=cr.Ma,r._zappar_image_tracker_enabled_set=cr.Na,r._zappar_image_tracker_enabled=cr.Oa,r._zappar_image_tracker_target_loaded_version=cr.Pa,r.__Z33zappar_image_tracker_target_countP23zappar_image_tracker_ti=cr.Qa,r.__Z46zappar_image_tracker_target_preview_compressedP23zappar_image_tracker_tii=cr.Ra,r.__Z51zappar_image_tracker_target_preview_compressed_sizeP23zappar_image_tracker_tii=cr.Sa,r.__Z55zappar_image_tracker_target_preview_compressed_mimetypeP23zappar_image_tracker_tii=cr.Ta,r.__Z40zappar_image_tracker_target_preview_rgbaP23zappar_image_tracker_tii=cr.Ua,r.__Z45zappar_image_tracker_target_preview_rgba_sizeP23zappar_image_tracker_tii=cr.Va,r.__Z46zappar_image_tracker_target_preview_rgba_widthP23zappar_image_tracker_tii=cr.Wa,r.__Z47zappar_image_tracker_target_preview_rgba_heightP23zappar_image_tracker_tii=cr.Xa,r.__Z38zappar_image_tracker_target_radius_topP23zappar_image_tracker_tii=cr.Ya,r.__Z41zappar_image_tracker_target_radius_bottomP23zappar_image_tracker_tii=cr.Za,r.__Z39zappar_image_tracker_target_side_lengthP23zappar_image_tracker_tii=cr._a,r.__Z49zappar_image_tracker_target_physical_scale_factorP23zappar_image_tracker_tii=cr.$a,r.__Z49zappar_image_tracker_target_preview_mesh_verticesP23zappar_image_tracker_tii=cr.ab,r.__Z48zappar_image_tracker_target_preview_mesh_normalsP23zappar_image_tracker_tii=cr.bb,r.__Z44zappar_image_tracker_target_preview_mesh_uvsP23zappar_image_tracker_tii=cr.cb,r.__Z48zappar_image_tracker_target_preview_mesh_indicesP23zappar_image_tracker_tii=cr.db,r.__Z54zappar_image_tracker_target_preview_mesh_vertices_sizeP23zappar_image_tracker_tii=cr.eb,r.__Z53zappar_image_tracker_target_preview_mesh_normals_sizeP23zappar_image_tracker_tii=cr.fb,r.__Z49zappar_image_tracker_target_preview_mesh_uvs_sizeP23zappar_image_tracker_tii=cr.gb,r.__Z53zappar_image_tracker_target_preview_mesh_indices_sizeP23zappar_image_tracker_tii=cr.hb,r.__Z32zappar_image_tracker_target_typeP23zappar_image_tracker_tii=cr.ib,r._zappar_face_tracker_create=cr.jb,r._zappar_face_tracker_destroy=cr.kb,r._zappar_face_tracker_model_load_from_memory=cr.lb,r._zappar_face_tracker_anchor_count=cr.mb,r._zappar_face_tracker_anchor_id=cr.nb,r._zappar_face_tracker_anchor_pose_raw=cr.ob,r._zappar_face_tracker_anchor_identity_coefficients=cr.pb,r._zappar_face_tracker_anchor_expression_coefficients=cr.qb,r._zappar_face_tracker_enabled_set=cr.rb,r._zappar_face_tracker_enabled=cr.sb,r._zappar_face_tracker_max_faces_set=cr.tb,r._zappar_face_tracker_max_faces=cr.ub,r._zappar_face_tracker_model_loaded_version=cr.vb,r._zappar_face_landmark_create=cr.wb,r._zappar_face_landmark_destroy=cr.xb,r.__Z27zappar_face_landmark_updateP23zappar_face_landmark_tiPKfS2_i=cr.yb,r._zappar_face_landmark_anchor_pose=cr.zb,r._zappar_barcode_finder_create=cr.Ab,r._zappar_barcode_finder_destroy=cr.Bb,r._zappar_barcode_finder_found_number=cr.Cb,r._zappar_barcode_finder_found_text=cr.Db,r._zappar_barcode_finder_enabled_set=cr.Eb,r._zappar_barcode_finder_enabled=cr.Fb,r._zappar_barcode_finder_found_format=cr.Gb,r._zappar_barcode_finder_formats=cr.Hb,r._zappar_barcode_finder_formats_set=cr.Ib;var fr=r._malloc=cr.Jb;r._zappar_face_mesh_create=cr.Kb,r._zappar_face_mesh_destroy=cr.Lb,r.__Z33zappar_face_mesh_load_from_memoryP19zappar_face_mesh_tiPKciiiii=cr.Mb,r.__Z29zappar_face_mesh_indices_sizeP19zappar_face_mesh_ti=cr.Nb,r.__Z25zappar_face_mesh_uvs_sizeP19zappar_face_mesh_ti=cr.Ob,r.__Z30zappar_face_mesh_vertices_sizeP19zappar_face_mesh_ti=cr.Pb,r.__Z31zappar_face_mesh_loaded_versionP19zappar_face_mesh_ti=cr.Qb,r.__Z25zappar_face_mesh_verticesP19zappar_face_mesh_ti=cr.Rb,r.__Z20zappar_face_mesh_uvsP19zappar_face_mesh_ti=cr.Sb,r.__Z24zappar_face_mesh_indicesP19zappar_face_mesh_ti=cr.Tb,r.__Z23zappar_face_mesh_updateP19zappar_face_mesh_tiPKfS2_i=cr.Ub,r.__Z29zappar_face_mesh_normals_sizeP19zappar_face_mesh_ti=cr.Vb,r.__Z24zappar_face_mesh_normalsP19zappar_face_mesh_ti=cr.Wb,r._zappar_camera_source_create=cr.Xb,r._zappar_camera_source_destroy=cr.Yb,r._zappar_camera_source_start=cr.Zb,r._zappar_camera_source_pause=cr._b,r._zappar_camera_default_device_id=cr.$b,r._zappar_sequence_source_create=cr.ac,r.__Z28zappar_sequence_source_startP25zappar_sequence_source_ti=cr.bc,r.__Z39zappar_sequence_source_load_from_memoryP25zappar_sequence_source_tiPKci=cr.cc,r.__Z28zappar_sequence_source_pauseP25zappar_sequence_source_ti=cr.dc,r._zappar_sequence_source_destroy=cr.ec,r._zappar_sequence_source_max_playback_fps_set=cr.fc,r._zappar_log_level_set=cr.gc,r._zappar_log_level=cr.hc,r.__Z23zappar_log_redirect_setPFv18zappar_log_level_tPKcE=cr.ic,r._zappar_analytics_project_id_set=cr.jc;var lr,dr=r.___errno_location=cr.kc,pr=r.__get_tzname=cr.lc,hr=r.__get_daylight=cr.mc,mr=r.__get_timezone=cr.nc,br=r.stackSave=cr.oc,wr=r.stackRestore=cr.pc,gr=r.stackAlloc=cr.qc;function yr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function vr(){function e(){if(!lr&&(lr=!0,r.calledRun=!0,!w)){if(r.noFSInit||Se||(Se=!0,Ze(),r.stdin=r.stdin,r.stdout=r.stdout,r.stderr=r.stderr,r.stdin?je("stdin",r.stdin):Ge("/dev/tty","/dev/stdin"),r.stdout?je("stdout",null,r.stdout):Ge("/dev/tty","/dev/stdout"),r.stderr?je("stderr",null,r.stderr):Ge("/dev/tty1","/dev/stderr"),Xe("/dev/stdin",0),Xe("/dev/stdout",1),Xe("/dev/stderr",1)),ie(N),Ee=!1,ie(G),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();W.unshift(e)}ie(W)}}if(!(0<Y)){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)H();ie(V),0<Y||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),e()}),1)):e())}}function Er(e){b=e,h||(r.onExit&&r.onExit(e),w=!0),_(e,new yr(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 v(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":A[e>>0]=t;break;case"i16":x[e>>1]=t;break;case"i32":R[e>>2]=t;break;case"i64":ee=[t>>>0,(Q=t,1<=+Math.abs(Q)?0<Q?(0|Math.min(+Math.floor(Q/4294967296),4294967295))>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],R[e>>2]=ee[0],R[e+4>>2]=ee[1];break;case"float":F[e>>2]=t;break;case"double":z[e>>3]=t;break;default:K("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 A[e>>0];case"i16":return x[e>>1];case"i32":case"i64":return R[e>>2];case"float":return F[e>>2];case"double":return z[e>>3];default:K("invalid type for getValue: "+t)}return null},r.UTF8ToString=P,q=function e(){lr||vr(),lr||(q=e)},r.run=vr,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();return vr(),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}processBuffer(e){this._deserializer.setData(e),this._deserializer.forMessages(((e,t)=>{switch(e){case 34:this._impl.log_level_set(t.logLevel());break;case 31:this._impl.analytics_project_id_set(t.string());break;case 27:{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 28:{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 11:{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 12:{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 13:{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 29:{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 30:{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 35:{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 36:{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 14:{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 20:{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 21:{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 22:{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 23:{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 24:{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 25:{let e=t.type(),r=this._impl.face_mesh_create();this._face_mesh_by_instance.set(e,r);break}case 26:{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 32:{let e=t.type(),r=t.faceLandmarkName(),i=this._impl.face_landmark_create(r);this._face_landmark_by_instance.set(e,i);break}case 33:{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 16:{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 17:{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 18:{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 19:{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 15:{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}}}))}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))}))}}}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="undefined"!=typeof Float32Array?Float32Array:Array;function h(){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 m(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={}));const b=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,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=b.get(e);return t||(t=new w(e),b.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 g,y=r(238);!function(e){e[e.OBJECT_URL=0]="OBJECT_URL",e[e.SRC_OBJECT=1]="SRC_OBJECT"}(g||(g={}));let v={deviceMotionMutliplier:-1,blacklisted:!1,showGyroPermissionsWarningIfNecessary:!1,showSafariPermissionsResetIfNecessary:!1,requestHighFrameRate:!1,videoWidth:640,videoHeight:480,dataWidth:320,dataHeight:240,videoElementInDOM:!1,preferMediaStreamTrackProcessorCamera:!1,preferImageBitmapCamera:!1};"undefined"!=typeof window&&(window.zeeProfile=v,window.location.href.indexOf("_mstppipeline")>=0&&(console.log("Configuring for MSTP camera pipeline (if supported)"),v.preferMediaStreamTrackProcessorCamera=!0),window.location.href.indexOf("_imagebitmappipeline")>=0&&(console.log("Configuring for ImageBitmap camera pipeline (if supported)"),v.preferImageBitmapCamera=!0));let E=new y.UAParser,A=(E.getOS().name||"unknown").toLowerCase(),T=(E.getEngine().name||"unknown").toLowerCase();function x(e){let t=e.split(".");if(t.length>=2){const e=parseInt(t[0]),r=parseInt(t[1]);(e<11||11===e&&r<3)&&(v.blacklisted=!0),(e<12||12===e&&r<2)&&(v.videoElementInDOM=!0),(12===e&&r>=2||e>=13)&&(v.showGyroPermissionsWarningIfNecessary=!0),e>=13&&(v.showSafariPermissionsResetIfNecessary=!0),(e>=12&&r>1||e>=13)&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&navigator.mediaDevices.getSupportedConstraints().frameRate&&(v.requestHighFrameRate=!0,e<14&&(v.videoHeight=360,v.dataHeight=180))}}function k(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"!==A&&(v.deviceMotionMutliplier=1,"undefined"!=typeof window&&void 0!==window.orientation&&x("15.0")),"webkit"===T&&"ios"===A&&(v.deviceMotionMutliplier=1,x(E.getOS().version||"15.0"));class R{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=w.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),h=a.getParameter(a.FRAMEBUFFER_BINDING),m=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 g=a.RGBA,y=a.RGBA,E=a.UNSIGNED_BYTE;a.texImage2D(a.TEXTURE_2D,0,g,y,E,t);let A=0,T=0;"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?(A=t.videoWidth,T=t.videoHeight):(A=t.width,T=t.height),T>A&&(T=[A,A=T][0]),this._updateTransforms(r,i);let x=this._getFramebuffer(a,v.dataWidth/4,v.dataHeight),k=this._getVertexBuffer(a),R=this._getIndexBuffer(a),L=this._getGreyscaleShader(a);const F=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_SIZE),z=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_TYPE),M=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_NORMALIZED),I=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_STRIDE),P=a.getVertexAttribOffset(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_POINTER),O=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_ENABLED),S=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING),B=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_SIZE),D=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_TYPE),C=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 W=0,H=0;this._isWebGL2?(W=a.getVertexAttrib(L.aVertexPositionLoc,a.VERTEX_ATTRIB_ARRAY_DIVISOR),H=a.getVertexAttrib(L.aTextureCoordLoc,a.VERTEX_ATTRIB_ARRAY_DIVISOR),a.vertexAttribDivisor(L.aVertexPositionLoc,0),a.vertexAttribDivisor(L.aTextureCoordLoc,0)):this._instancedArraysExtension&&(W=a.getVertexAttrib(L.aVertexPositionLoc,this._instancedArraysExtension.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),H=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,x),a.viewport(0,0,this._framebufferWidth,this._framebufferHeight),a.clear(a.COLOR_BUFFER_BIT),a.bindBuffer(a.ARRAY_BUFFER,k),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,R),a.useProgram(L.program),a.uniform1f(L.uTexWidthLoc,v.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,F,z,M,I,P),a.bindBuffer(a.ARRAY_BUFFER,N),a.vertexAttribPointer(L.aTextureCoordLoc,B,D,C,U,V),a.bindBuffer(a.ARRAY_BUFFER,m),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,b),O||a.disableVertexAttribArray(L.aVertexPositionLoc),G||a.disableVertexAttribArray(L.aTextureCoordLoc),this._isWebGL2?(a.vertexAttribDivisor(L.aVertexPositionLoc,W),a.vertexAttribDivisor(L.aTextureCoordLoc,H)):this._instancedArraysExtension&&(this._instancedArraysExtension.vertexAttribDivisorANGLE(L.aVertexPositionLoc,W),this._instancedArraysExtension.vertexAttribDivisorANGLE(L.aTextureCoordLoc,H)),a.bindFramebuffer(a.FRAMEBUFFER,h),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,v.dataWidth/4,v.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:v.dataWidth,dataHeight:v.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=k(e,e.VERTEX_SHADER,I),i=k(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 L,F,z,M,I="\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 O=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 S=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}},B=0;function D(e){return O(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"]),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"]),h=e.cwrap("zappar_pipeline_motion_rotation_rate_submit",null,["number","number","number","number","number"]),m=e.cwrap("zappar_pipeline_motion_attitude_submit",null,["number","number","number","number","number"]),b=e.cwrap("zappar_pipeline_motion_attitude_matrix_submit",null,["number","number"]),w=e.cwrap("zappar_camera_source_create","number",["number","string"]),g=e.cwrap("zappar_camera_source_destroy",null,["number"]),y=e.cwrap("zappar_sequence_source_create","number",["number"]),v=e.cwrap("zappar_sequence_source_destroy",null,["number"]),E=e.cwrap("zappar_image_tracker_create","number",["number"]),A=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"]),k=e.cwrap("zappar_image_tracker_enabled","number",["number"]),R=e.cwrap("zappar_image_tracker_enabled_set",null,["number","number"]),L=e.cwrap("zappar_image_tracker_anchor_count","number",["number"]),F=e.cwrap("zappar_image_tracker_anchor_id","string",["number","number"]),z=e.cwrap("zappar_image_tracker_anchor_pose_raw","number",["number","number"]),M=e.cwrap("zappar_face_tracker_create","number",["number"]),I=e.cwrap("zappar_face_tracker_destroy",null,["number"]),P=e.cwrap("zappar_face_tracker_model_load_from_memory",null,["number","number","number"]),O=e.cwrap("zappar_face_tracker_model_loaded_version","number",["number"]),S=e.cwrap("zappar_face_tracker_enabled_set",null,["number","number"]),B=e.cwrap("zappar_face_tracker_enabled","number",["number"]),D=e.cwrap("zappar_face_tracker_max_faces_set",null,["number","number"]),C=e.cwrap("zappar_face_tracker_max_faces","number",["number"]),U=e.cwrap("zappar_face_tracker_anchor_count","number",["number"]),V=e.cwrap("zappar_face_tracker_anchor_id","string",["number","number"]),N=e.cwrap("zappar_face_tracker_anchor_pose_raw","number",["number","number"]),G=e.cwrap("zappar_face_tracker_anchor_identity_coefficients","number",["number","number"]),W=e.cwrap("zappar_face_tracker_anchor_expression_coefficients","number",["number","number"]),H=e.cwrap("zappar_face_mesh_create","number",[]),Y=e.cwrap("zappar_face_mesh_destroy",null,["number"]),X=e.cwrap("zappar_face_landmark_create","number",["number"]),q=e.cwrap("zappar_face_landmark_destroy",null,["number"]),Z=e.cwrap("zappar_barcode_finder_create","number",["number"]),j=e.cwrap("zappar_barcode_finder_destroy",null,["number"]),K=e.cwrap("zappar_barcode_finder_enabled_set",null,["number","number"]),J=e.cwrap("zappar_barcode_finder_enabled","number",["number"]),$=e.cwrap("zappar_barcode_finder_found_number","number",["number"]),Q=e.cwrap("zappar_barcode_finder_found_text","string",["number","number"]),ee=e.cwrap("zappar_barcode_finder_found_format","number",["number","number"]),te=e.cwrap("zappar_barcode_finder_formats","number",["number"]),re=e.cwrap("zappar_barcode_finder_formats_set",null,["number","number"]),ie=e.cwrap("zappar_instant_world_tracker_create","number",["number"]),ae=e.cwrap("zappar_instant_world_tracker_destroy",null,["number"]),ne=e.cwrap("zappar_instant_world_tracker_enabled_set",null,["number","number"]),oe=e.cwrap("zappar_instant_world_tracker_enabled","number",["number"]),se=e.cwrap("zappar_instant_world_tracker_anchor_pose_raw","number",["number"]),_e=e.cwrap("zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw",null,["number","number","number","number","number"]),ce=32,ue=e._malloc(ce),fe=(e._malloc(64),new Map),le=(t,r)=>{let i=fe.get(t);return(!i||i[0]<r)&&(i&&e._free(i[1]),i=[r,e._malloc(r)],fe.set(t,i)),i[1]};return{log_level:()=>t(),log_level_set:e=>r(e),analytics_project_id_set:e=>i(e),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,_)=>{ce<r.byteLength&&(e._free(ue),ce=r.byteLength,ue=e._malloc(ce));let c=ue,f=r.byteLength;e.HEAPU8.set(new Uint8Array(r),ue);let l=i,d=a,p=n,h=le(4,o.byteLength);e.HEAPF32.set(o,h/4);let m=le(5,s.byteLength);return e.HEAPF32.set(s,m/4),u(t,c,f,l,d,p,h,m,_?1:0)},pipeline_camera_frame_submit_raw_pointer:(t,r,i,a,n,o,s,_,c,u,l)=>{let d=r,p=i,h=a,m=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,h,m,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_rotation_rate_submit:(e,t,r,i,a)=>h(e,t,r,i,a),pipeline_motion_attitude_submit:(e,t,r,i,a)=>m(e,t,r,i,a),pipeline_motion_attitude_matrix_submit:(t,r)=>{let i=le(0,r.byteLength);return e.HEAPF32.set(r,i/4),b(t,i)},camera_source_create:(e,t)=>w(e,t),camera_source_destroy:()=>{g()},sequence_source_create:e=>y(e),sequence_source_destroy:()=>{v()},image_tracker_create:e=>E(e),image_tracker_destroy:()=>{A()},image_tracker_target_load_from_memory:(t,r)=>{ce<r.byteLength&&(e._free(ue),ce=r.byteLength,ue=e._malloc(ce));let i=ue,a=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),ue),T(t,i,a)},image_tracker_target_loaded_version:e=>x(e),image_tracker_enabled:e=>{let t=k(e);return t=1===t,t},image_tracker_enabled_set:(e,t)=>R(e,t?1:0),image_tracker_anchor_count:e=>L(e),image_tracker_anchor_id:(e,t)=>F(e,t),image_tracker_anchor_pose_raw:(t,r)=>{let i=z(t,r),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(i/4,16+i/4)),i=a,i},face_tracker_create:e=>M(e),face_tracker_destroy:()=>{I()},face_tracker_model_load_from_memory:(t,r)=>{ce<r.byteLength&&(e._free(ue),ce=r.byteLength,ue=e._malloc(ce));let i=ue,a=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),ue),P(t,i,a)},face_tracker_model_loaded_version:e=>O(e),face_tracker_enabled_set:(e,t)=>S(e,t?1:0),face_tracker_enabled:e=>{let t=B(e);return t=1===t,t},face_tracker_max_faces_set:(e,t)=>D(e,t),face_tracker_max_faces:e=>C(e),face_tracker_anchor_count:e=>U(e),face_tracker_anchor_id:(e,t)=>V(e,t),face_tracker_anchor_pose_raw:(t,r)=>{let i=N(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=G(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=W(t,r),a=new Float32Array(29);return a.set(e.HEAPF32.subarray(i/4,29+i/4)),i=a,i},face_mesh_create:()=>H(),face_mesh_destroy:()=>{Y()},face_landmark_create:e=>X(e),face_landmark_destroy:()=>{q()},barcode_finder_create:e=>Z(e),barcode_finder_destroy:()=>{j()},barcode_finder_enabled_set:(e,t)=>K(e,t?1:0),barcode_finder_enabled:e=>{let t=J(e);return t=1===t,t},barcode_finder_found_number:e=>$(e),barcode_finder_found_text:(e,t)=>Q(e,t),barcode_finder_found_format:(e,t)=>ee(e,t),barcode_finder_formats:e=>te(e),barcode_finder_formats_set:(e,t)=>re(e,t),instant_world_tracker_create:e=>ie(e),instant_world_tracker_destroy:()=>{ae()},instant_world_tracker_enabled_set:(e,t)=>ne(e,t?1:0),instant_world_tracker_enabled:e=>{let t=oe(e);return t=1===t,t},instant_world_tracker_anchor_pose_raw:t=>{let r=se(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)=>_e(e,t,r,i,a)}}(r),t=new n(e,((e,t)=>{S.postOutgoingMessage({p:e,t:"zappar",d:t},[t])}));S.postOutgoingMessage("loaded",[]),S.onIncomingMessage.bind((i=>{var a;switch(i.t){case"zappar":t.processBuffer(i.d),S.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};S.postOutgoingMessage(o,[a.d]);break}case"streamC2S":{let a=i;!function(e,t,r,i,a,n,o){O(this,void 0,void 0,(function*(){const s=yield r.getReader();for(;;){let r=yield s.read();if(r.done)return void console.log("Stream done");let u=r.value,f=u.allocationSize();f>U&&(C>0&&e._free(C),C=e._malloc(f),U=f),yield u.copyTo(e.HEAPU8.subarray(C,C+U));let l=V;V++;const d=u.visibleRect.width,p=u.visibleRect.height;let h,b=d,w=p;switch(B){case 270:h=new Float32Array([0,1,0,0,-1,0,0,0,0,0,1,0,1,0,0,1]),b=p,w=d;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]),b=p,w=d;break;default:h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}let g=u.clone();a?(c=[-1,1,-1],(_=N)[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):m(N);let y=300*v.dataWidth/320;G[0]=y,G[1]=y,G[2]=.5*v.dataWidth,G[3]=.5*v.dataHeight;const E={token:l,d:g,p:i,t:"videoFrameS2C",userFacing:a,uvTransform:h,w:b,h:w,cameraToDevice:N,cameraModel:G,source:o};S.postOutgoingMessage(E,[E.d,E.uvTransform.buffer]);const A=n._pipeline_by_instance.get(i);A&&(t.pipeline_camera_frame_submit_raw_pointer(A,C,f,W(u.format),d,p,l,N,B,G,a),t.pipeline_frame_update(A),n.exploreState()),u.close()}var _,c}))}(r,e,a.s,a.p,a.userFacing,t,a.source);break}case"cameraToScreenC2S":B=i.r;break;case"imageBitmapC2S":!function(e,t,r,i){const[a,n]=function(){if(!z||!M){const e=new OffscreenCanvas(1,1);if(M=e.getContext("webgl"),!M)throw new Error("Unable to get offscreen GL context");z=new R(M)}return[z,M]}();if(F||(F=n.createTexture(),n.bindTexture(n.TEXTURE_2D,F),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)),!F)return;(!L||L.byteLength<v.dataWidth*v.dataHeight)&&(console.log("Generating pixel buffer",v.dataWidth*v.dataHeight),L=new ArrayBuffer(v.dataWidth*v.dataHeight)),a.uploadFrame(F,e.i,e.r,e.userFacing);let o=a.readFrame(F,L),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(_,L,o.dataWidth,o.dataHeight,e.tokenId,e.cameraToDevice,e.cameraModel,o.userFacing),t.pipeline_frame_update(_),r.exploreState())}(i,e,t,S)}}))}})}))}let C=0,U=0,V=1;const N=h(),G=new Float32Array([300,300,160,120,0,0]);function W(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 H=self;S.onOutgoingMessage.bind((()=>{let e=S.getOutgoingMessages();for(let t of e)H.postMessage(t.msg,t.transferables)}));let Y=e=>{e&&e.data&&"wasm"===e.data.t&&(D(location.href.startsWith("blob")?e.data.url:new URL(r(751),r.b).toString()),H.removeEventListener("message",Y))};H.addEventListener("message",Y),H.addEventListener("message",(e=>{S.postIncomingMessage(e.data)}))})()})();
|