@zappar/zappar-cv 0.4.0-beta.8 → 0.4.0-beta.9

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/umd/zappar-cv.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ZCV=t():e.ZCV=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=18)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zcwarn=t.zcerr=t.zcout=t.setLogLevel=void 0;const n=r(12);let i=n.log_level_t.LOG_LEVEL_ERROR;t.setLogLevel=function(e){i=e},t.zcout=function(...e){i>=n.log_level_t.LOG_LEVEL_VERBOSE&&console.log("[Zappar] INFO",...e)},t.zcerr=function(...e){i>=n.log_level_t.LOG_LEVEL_ERROR&&console.error("[Zappar] ERROR",...e)},t.zcwarn=function(...e){i>=n.log_level_t.LOG_LEVEL_VERBOSE&&console.log("[Zappar] WARN",...e)}},function(e,t,r){"use strict";r.r(t),r.d(t,"glMatrix",(function(){return n})),r.d(t,"mat2",(function(){return i})),r.d(t,"mat2d",(function(){return a})),r.d(t,"mat3",(function(){return o})),r.d(t,"mat4",(function(){return s})),r.d(t,"quat",(function(){return f})),r.d(t,"quat2",(function(){return d})),r.d(t,"vec2",(function(){return _})),r.d(t,"vec3",(function(){return u})),r.d(t,"vec4",(function(){return c}));var n={};r.r(n),r.d(n,"EPSILON",(function(){return l})),r.d(n,"ARRAY_TYPE",(function(){return h})),r.d(n,"RANDOM",(function(){return m})),r.d(n,"setMatrixArrayType",(function(){return p})),r.d(n,"toRadian",(function(){return v})),r.d(n,"equals",(function(){return g}));var i={};r.r(i),r.d(i,"create",(function(){return w})),r.d(i,"clone",(function(){return y})),r.d(i,"copy",(function(){return M})),r.d(i,"identity",(function(){return x})),r.d(i,"fromValues",(function(){return E})),r.d(i,"set",(function(){return A})),r.d(i,"transpose",(function(){return T})),r.d(i,"invert",(function(){return k})),r.d(i,"adjoint",(function(){return R})),r.d(i,"determinant",(function(){return F})),r.d(i,"multiply",(function(){return S})),r.d(i,"rotate",(function(){return L})),r.d(i,"scale",(function(){return P})),r.d(i,"fromRotation",(function(){return O})),r.d(i,"fromScaling",(function(){return I})),r.d(i,"str",(function(){return z})),r.d(i,"frob",(function(){return U})),r.d(i,"LDU",(function(){return C})),r.d(i,"add",(function(){return D})),r.d(i,"subtract",(function(){return B})),r.d(i,"exactEquals",(function(){return V})),r.d(i,"equals",(function(){return q})),r.d(i,"multiplyScalar",(function(){return N})),r.d(i,"multiplyScalarAndAdd",(function(){return j})),r.d(i,"mul",(function(){return H})),r.d(i,"sub",(function(){return G}));var a={};r.r(a),r.d(a,"create",(function(){return W})),r.d(a,"clone",(function(){return X})),r.d(a,"copy",(function(){return Y})),r.d(a,"identity",(function(){return Z})),r.d(a,"fromValues",(function(){return K})),r.d(a,"set",(function(){return $})),r.d(a,"invert",(function(){return Q})),r.d(a,"determinant",(function(){return J})),r.d(a,"multiply",(function(){return ee})),r.d(a,"rotate",(function(){return te})),r.d(a,"scale",(function(){return re})),r.d(a,"translate",(function(){return ne})),r.d(a,"fromRotation",(function(){return ie})),r.d(a,"fromScaling",(function(){return ae})),r.d(a,"fromTranslation",(function(){return oe})),r.d(a,"str",(function(){return se})),r.d(a,"frob",(function(){return ue})),r.d(a,"add",(function(){return ce})),r.d(a,"subtract",(function(){return fe})),r.d(a,"multiplyScalar",(function(){return de})),r.d(a,"multiplyScalarAndAdd",(function(){return _e})),r.d(a,"exactEquals",(function(){return le})),r.d(a,"equals",(function(){return he})),r.d(a,"mul",(function(){return me})),r.d(a,"sub",(function(){return pe}));var o={};r.r(o),r.d(o,"create",(function(){return be})),r.d(o,"fromMat4",(function(){return ve})),r.d(o,"clone",(function(){return ge})),r.d(o,"copy",(function(){return we})),r.d(o,"fromValues",(function(){return ye})),r.d(o,"set",(function(){return Me})),r.d(o,"identity",(function(){return xe})),r.d(o,"transpose",(function(){return Ee})),r.d(o,"invert",(function(){return Ae})),r.d(o,"adjoint",(function(){return Te})),r.d(o,"determinant",(function(){return ke})),r.d(o,"multiply",(function(){return Re})),r.d(o,"translate",(function(){return Fe})),r.d(o,"rotate",(function(){return Se})),r.d(o,"scale",(function(){return Le})),r.d(o,"fromTranslation",(function(){return Pe})),r.d(o,"fromRotation",(function(){return Oe})),r.d(o,"fromScaling",(function(){return Ie})),r.d(o,"fromMat2d",(function(){return ze})),r.d(o,"fromQuat",(function(){return Ue})),r.d(o,"normalFromMat4",(function(){return Ce})),r.d(o,"projection",(function(){return De})),r.d(o,"str",(function(){return Be})),r.d(o,"frob",(function(){return Ve})),r.d(o,"add",(function(){return qe})),r.d(o,"subtract",(function(){return Ne})),r.d(o,"multiplyScalar",(function(){return je})),r.d(o,"multiplyScalarAndAdd",(function(){return He})),r.d(o,"exactEquals",(function(){return Ge})),r.d(o,"equals",(function(){return We})),r.d(o,"mul",(function(){return Xe})),r.d(o,"sub",(function(){return Ye}));var s={};r.r(s),r.d(s,"create",(function(){return Ze})),r.d(s,"clone",(function(){return Ke})),r.d(s,"copy",(function(){return $e})),r.d(s,"fromValues",(function(){return Qe})),r.d(s,"set",(function(){return Je})),r.d(s,"identity",(function(){return et})),r.d(s,"transpose",(function(){return tt})),r.d(s,"invert",(function(){return rt})),r.d(s,"adjoint",(function(){return nt})),r.d(s,"determinant",(function(){return it})),r.d(s,"multiply",(function(){return at})),r.d(s,"translate",(function(){return ot})),r.d(s,"scale",(function(){return st})),r.d(s,"rotate",(function(){return ut})),r.d(s,"rotateX",(function(){return ct})),r.d(s,"rotateY",(function(){return ft})),r.d(s,"rotateZ",(function(){return dt})),r.d(s,"fromTranslation",(function(){return _t})),r.d(s,"fromScaling",(function(){return lt})),r.d(s,"fromRotation",(function(){return ht})),r.d(s,"fromXRotation",(function(){return mt})),r.d(s,"fromYRotation",(function(){return pt})),r.d(s,"fromZRotation",(function(){return bt})),r.d(s,"fromRotationTranslation",(function(){return vt})),r.d(s,"fromQuat2",(function(){return gt})),r.d(s,"getTranslation",(function(){return wt})),r.d(s,"getScaling",(function(){return yt})),r.d(s,"getRotation",(function(){return Mt})),r.d(s,"fromRotationTranslationScale",(function(){return xt})),r.d(s,"fromRotationTranslationScaleOrigin",(function(){return Et})),r.d(s,"fromQuat",(function(){return At})),r.d(s,"frustum",(function(){return Tt})),r.d(s,"perspective",(function(){return kt})),r.d(s,"perspectiveFromFieldOfView",(function(){return Rt})),r.d(s,"ortho",(function(){return Ft})),r.d(s,"lookAt",(function(){return St})),r.d(s,"targetTo",(function(){return Lt})),r.d(s,"str",(function(){return Pt})),r.d(s,"frob",(function(){return Ot})),r.d(s,"add",(function(){return It})),r.d(s,"subtract",(function(){return zt})),r.d(s,"multiplyScalar",(function(){return Ut})),r.d(s,"multiplyScalarAndAdd",(function(){return Ct})),r.d(s,"exactEquals",(function(){return Dt})),r.d(s,"equals",(function(){return Bt})),r.d(s,"mul",(function(){return Vt})),r.d(s,"sub",(function(){return qt}));var u={};r.r(u),r.d(u,"create",(function(){return Nt})),r.d(u,"clone",(function(){return jt})),r.d(u,"length",(function(){return Ht})),r.d(u,"fromValues",(function(){return Gt})),r.d(u,"copy",(function(){return Wt})),r.d(u,"set",(function(){return Xt})),r.d(u,"add",(function(){return Yt})),r.d(u,"subtract",(function(){return Zt})),r.d(u,"multiply",(function(){return Kt})),r.d(u,"divide",(function(){return $t})),r.d(u,"ceil",(function(){return Qt})),r.d(u,"floor",(function(){return Jt})),r.d(u,"min",(function(){return er})),r.d(u,"max",(function(){return tr})),r.d(u,"round",(function(){return rr})),r.d(u,"scale",(function(){return nr})),r.d(u,"scaleAndAdd",(function(){return ir})),r.d(u,"distance",(function(){return ar})),r.d(u,"squaredDistance",(function(){return or})),r.d(u,"squaredLength",(function(){return sr})),r.d(u,"negate",(function(){return ur})),r.d(u,"inverse",(function(){return cr})),r.d(u,"normalize",(function(){return fr})),r.d(u,"dot",(function(){return dr})),r.d(u,"cross",(function(){return _r})),r.d(u,"lerp",(function(){return lr})),r.d(u,"hermite",(function(){return hr})),r.d(u,"bezier",(function(){return mr})),r.d(u,"random",(function(){return pr})),r.d(u,"transformMat4",(function(){return br})),r.d(u,"transformMat3",(function(){return vr})),r.d(u,"transformQuat",(function(){return gr})),r.d(u,"rotateX",(function(){return wr})),r.d(u,"rotateY",(function(){return yr})),r.d(u,"rotateZ",(function(){return Mr})),r.d(u,"angle",(function(){return xr})),r.d(u,"zero",(function(){return Er})),r.d(u,"str",(function(){return Ar})),r.d(u,"exactEquals",(function(){return Tr})),r.d(u,"equals",(function(){return kr})),r.d(u,"sub",(function(){return Fr})),r.d(u,"mul",(function(){return Sr})),r.d(u,"div",(function(){return Lr})),r.d(u,"dist",(function(){return Pr})),r.d(u,"sqrDist",(function(){return Or})),r.d(u,"len",(function(){return Ir})),r.d(u,"sqrLen",(function(){return zr})),r.d(u,"forEach",(function(){return Ur}));var c={};r.r(c),r.d(c,"create",(function(){return Cr})),r.d(c,"clone",(function(){return Dr})),r.d(c,"fromValues",(function(){return Br})),r.d(c,"copy",(function(){return Vr})),r.d(c,"set",(function(){return qr})),r.d(c,"add",(function(){return Nr})),r.d(c,"subtract",(function(){return jr})),r.d(c,"multiply",(function(){return Hr})),r.d(c,"divide",(function(){return Gr})),r.d(c,"ceil",(function(){return Wr})),r.d(c,"floor",(function(){return Xr})),r.d(c,"min",(function(){return Yr})),r.d(c,"max",(function(){return Zr})),r.d(c,"round",(function(){return Kr})),r.d(c,"scale",(function(){return $r})),r.d(c,"scaleAndAdd",(function(){return Qr})),r.d(c,"distance",(function(){return Jr})),r.d(c,"squaredDistance",(function(){return en})),r.d(c,"length",(function(){return tn})),r.d(c,"squaredLength",(function(){return rn})),r.d(c,"negate",(function(){return nn})),r.d(c,"inverse",(function(){return an})),r.d(c,"normalize",(function(){return on})),r.d(c,"dot",(function(){return sn})),r.d(c,"cross",(function(){return un})),r.d(c,"lerp",(function(){return cn})),r.d(c,"random",(function(){return fn})),r.d(c,"transformMat4",(function(){return dn})),r.d(c,"transformQuat",(function(){return _n})),r.d(c,"zero",(function(){return ln})),r.d(c,"str",(function(){return hn})),r.d(c,"exactEquals",(function(){return mn})),r.d(c,"equals",(function(){return pn})),r.d(c,"sub",(function(){return bn})),r.d(c,"mul",(function(){return vn})),r.d(c,"div",(function(){return gn})),r.d(c,"dist",(function(){return wn})),r.d(c,"sqrDist",(function(){return yn})),r.d(c,"len",(function(){return Mn})),r.d(c,"sqrLen",(function(){return xn})),r.d(c,"forEach",(function(){return En}));var f={};r.r(f),r.d(f,"create",(function(){return An})),r.d(f,"identity",(function(){return Tn})),r.d(f,"setAxisAngle",(function(){return kn})),r.d(f,"getAxisAngle",(function(){return Rn})),r.d(f,"getAngle",(function(){return Fn})),r.d(f,"multiply",(function(){return Sn})),r.d(f,"rotateX",(function(){return Ln})),r.d(f,"rotateY",(function(){return Pn})),r.d(f,"rotateZ",(function(){return On})),r.d(f,"calculateW",(function(){return In})),r.d(f,"exp",(function(){return zn})),r.d(f,"ln",(function(){return Un})),r.d(f,"pow",(function(){return Cn})),r.d(f,"slerp",(function(){return Dn})),r.d(f,"random",(function(){return Bn})),r.d(f,"invert",(function(){return Vn})),r.d(f,"conjugate",(function(){return qn})),r.d(f,"fromMat3",(function(){return Nn})),r.d(f,"fromEuler",(function(){return jn})),r.d(f,"str",(function(){return Hn})),r.d(f,"clone",(function(){return $n})),r.d(f,"fromValues",(function(){return Qn})),r.d(f,"copy",(function(){return Jn})),r.d(f,"set",(function(){return ei})),r.d(f,"add",(function(){return ti})),r.d(f,"mul",(function(){return ri})),r.d(f,"scale",(function(){return ni})),r.d(f,"dot",(function(){return ii})),r.d(f,"lerp",(function(){return ai})),r.d(f,"length",(function(){return oi})),r.d(f,"len",(function(){return si})),r.d(f,"squaredLength",(function(){return ui})),r.d(f,"sqrLen",(function(){return ci})),r.d(f,"normalize",(function(){return fi})),r.d(f,"exactEquals",(function(){return di})),r.d(f,"equals",(function(){return _i})),r.d(f,"rotationTo",(function(){return li})),r.d(f,"sqlerp",(function(){return hi})),r.d(f,"setAxes",(function(){return mi}));var d={};r.r(d),r.d(d,"create",(function(){return pi})),r.d(d,"clone",(function(){return bi})),r.d(d,"fromValues",(function(){return vi})),r.d(d,"fromRotationTranslationValues",(function(){return gi})),r.d(d,"fromRotationTranslation",(function(){return wi})),r.d(d,"fromTranslation",(function(){return yi})),r.d(d,"fromRotation",(function(){return Mi})),r.d(d,"fromMat4",(function(){return xi})),r.d(d,"copy",(function(){return Ei})),r.d(d,"identity",(function(){return Ai})),r.d(d,"set",(function(){return Ti})),r.d(d,"getReal",(function(){return ki})),r.d(d,"getDual",(function(){return Ri})),r.d(d,"setReal",(function(){return Fi})),r.d(d,"setDual",(function(){return Si})),r.d(d,"getTranslation",(function(){return Li})),r.d(d,"translate",(function(){return Pi})),r.d(d,"rotateX",(function(){return Oi})),r.d(d,"rotateY",(function(){return Ii})),r.d(d,"rotateZ",(function(){return zi})),r.d(d,"rotateByQuatAppend",(function(){return Ui})),r.d(d,"rotateByQuatPrepend",(function(){return Ci})),r.d(d,"rotateAroundAxis",(function(){return Di})),r.d(d,"add",(function(){return Bi})),r.d(d,"multiply",(function(){return Vi})),r.d(d,"mul",(function(){return qi})),r.d(d,"scale",(function(){return Ni})),r.d(d,"dot",(function(){return ji})),r.d(d,"lerp",(function(){return Hi})),r.d(d,"invert",(function(){return Gi})),r.d(d,"conjugate",(function(){return Wi})),r.d(d,"length",(function(){return Xi})),r.d(d,"len",(function(){return Yi})),r.d(d,"squaredLength",(function(){return Zi})),r.d(d,"sqrLen",(function(){return Ki})),r.d(d,"normalize",(function(){return $i})),r.d(d,"str",(function(){return Qi})),r.d(d,"exactEquals",(function(){return Ji})),r.d(d,"equals",(function(){return ea}));var _={};r.r(_),r.d(_,"create",(function(){return ta})),r.d(_,"clone",(function(){return ra})),r.d(_,"fromValues",(function(){return na})),r.d(_,"copy",(function(){return ia})),r.d(_,"set",(function(){return aa})),r.d(_,"add",(function(){return oa})),r.d(_,"subtract",(function(){return sa})),r.d(_,"multiply",(function(){return ua})),r.d(_,"divide",(function(){return ca})),r.d(_,"ceil",(function(){return fa})),r.d(_,"floor",(function(){return da})),r.d(_,"min",(function(){return _a})),r.d(_,"max",(function(){return la})),r.d(_,"round",(function(){return ha})),r.d(_,"scale",(function(){return ma})),r.d(_,"scaleAndAdd",(function(){return pa})),r.d(_,"distance",(function(){return ba})),r.d(_,"squaredDistance",(function(){return va})),r.d(_,"length",(function(){return ga})),r.d(_,"squaredLength",(function(){return wa})),r.d(_,"negate",(function(){return ya})),r.d(_,"inverse",(function(){return Ma})),r.d(_,"normalize",(function(){return xa})),r.d(_,"dot",(function(){return Ea})),r.d(_,"cross",(function(){return Aa})),r.d(_,"lerp",(function(){return Ta})),r.d(_,"random",(function(){return ka})),r.d(_,"transformMat2",(function(){return Ra})),r.d(_,"transformMat2d",(function(){return Fa})),r.d(_,"transformMat3",(function(){return Sa})),r.d(_,"transformMat4",(function(){return La})),r.d(_,"rotate",(function(){return Pa})),r.d(_,"angle",(function(){return Oa})),r.d(_,"zero",(function(){return Ia})),r.d(_,"str",(function(){return za})),r.d(_,"exactEquals",(function(){return Ua})),r.d(_,"equals",(function(){return Ca})),r.d(_,"len",(function(){return Da})),r.d(_,"sub",(function(){return Ba})),r.d(_,"mul",(function(){return Va})),r.d(_,"div",(function(){return qa})),r.d(_,"dist",(function(){return Na})),r.d(_,"sqrDist",(function(){return ja})),r.d(_,"sqrLen",(function(){return Ha})),r.d(_,"forEach",(function(){return Ga}));var l=1e-6,h="undefined"!=typeof Float32Array?Float32Array:Array,m=Math.random;function p(e){h=e}var b=Math.PI/180;function v(e){return e*b}function g(e,t){return Math.abs(e-t)<=l*Math.max(1,Math.abs(e),Math.abs(t))}function w(){var e=new h(4);return h!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function y(e){var t=new h(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function M(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function x(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function E(e,t,r,n){var i=new h(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}function A(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function T(e,t){if(e===t){var r=t[1];e[1]=t[2],e[2]=r}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function k(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*a-i*n;return o?(o=1/o,e[0]=a*o,e[1]=-n*o,e[2]=-i*o,e[3]=r*o,e):null}function R(e,t){var r=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=r,e}function F(e){return e[0]*e[3]-e[2]*e[1]}function S(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1],c=r[2],f=r[3];return e[0]=n*s+a*u,e[1]=i*s+o*u,e[2]=n*c+a*f,e[3]=i*c+o*f,e}function L(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+a*s,e[1]=i*u+o*s,e[2]=n*-s+a*u,e[3]=i*-s+o*u,e}function P(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1];return e[0]=n*s,e[1]=i*s,e[2]=a*u,e[3]=o*u,e}function O(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=-r,e[3]=n,e}function I(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e}function z(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function U(e){return Math.hypot(e[0],e[1],e[2],e[3])}function C(e,t,r,n){return e[2]=n[2]/n[0],r[0]=n[0],r[1]=n[1],r[3]=n[3]-e[2]*r[1],[e,t,r]}function D(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function B(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function V(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function q(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],u=t[2],c=t[3];return Math.abs(r-o)<=l*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=l*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-u)<=l*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-c)<=l*Math.max(1,Math.abs(a),Math.abs(c))}function N(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function j(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var H=S,G=B;function W(){var e=new h(6);return h!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function X(e){var t=new h(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Z(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function K(e,t,r,n,i,a){var o=new h(6);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o[4]=i,o[5]=a,o}function $(e,t,r,n,i,a,o){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a,e[5]=o,e}function Q(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=r*a-n*i;return u?(u=1/u,e[0]=a*u,e[1]=-n*u,e[2]=-i*u,e[3]=r*u,e[4]=(i*s-a*o)*u,e[5]=(n*o-r*s)*u,e):null}function J(e){return e[0]*e[3]-e[1]*e[2]}function ee(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=r[0],f=r[1],d=r[2],_=r[3],l=r[4],h=r[5];return e[0]=n*c+a*f,e[1]=i*c+o*f,e[2]=n*d+a*_,e[3]=i*d+o*_,e[4]=n*l+a*h+s,e[5]=i*l+o*h+u,e}function te(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=Math.sin(r),f=Math.cos(r);return e[0]=n*f+a*c,e[1]=i*f+o*c,e[2]=n*-c+a*f,e[3]=i*-c+o*f,e[4]=s,e[5]=u,e}function re(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=r[0],f=r[1];return e[0]=n*c,e[1]=i*c,e[2]=a*f,e[3]=o*f,e[4]=s,e[5]=u,e}function ne(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=r[0],f=r[1];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=n*c+a*f+s,e[5]=i*c+o*f+u,e}function ie(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=-r,e[3]=n,e[4]=0,e[5]=0,e}function ae(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function oe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function se(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function ue(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],1)}function ce(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e}function fe(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e}function de(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e}function _e(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e}function le(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function he(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=t[0],c=t[1],f=t[2],d=t[3],_=t[4],h=t[5];return Math.abs(r-u)<=l*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-c)<=l*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-f)<=l*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(a-d)<=l*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(o-_)<=l*Math.max(1,Math.abs(o),Math.abs(_))&&Math.abs(s-h)<=l*Math.max(1,Math.abs(s),Math.abs(h))}var me=ee,pe=fe;function be(){var e=new h(9);return h!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ve(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function ge(e){var t=new h(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function we(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function ye(e,t,r,n,i,a,o,s,u){var c=new h(9);return c[0]=e,c[1]=t,c[2]=r,c[3]=n,c[4]=i,c[5]=a,c[6]=o,c[7]=s,c[8]=u,c}function Me(e,t,r,n,i,a,o,s,u,c){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=u,e[8]=c,e}function xe(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ee(e,t){if(e===t){var r=t[1],n=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=n,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function Ae(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8],d=f*o-s*c,_=-f*a+s*u,l=c*a-o*u,h=r*d+n*_+i*l;return h?(h=1/h,e[0]=d*h,e[1]=(-f*n+i*c)*h,e[2]=(s*n-i*o)*h,e[3]=_*h,e[4]=(f*r-i*u)*h,e[5]=(-s*r+i*a)*h,e[6]=l*h,e[7]=(-c*r+n*u)*h,e[8]=(o*r-n*a)*h,e):null}function Te(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8];return e[0]=o*f-s*c,e[1]=i*c-n*f,e[2]=n*s-i*o,e[3]=s*u-a*f,e[4]=r*f-i*u,e[5]=i*a-r*s,e[6]=a*c-o*u,e[7]=n*u-r*c,e[8]=r*o-n*a,e}function ke(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],c=e[8];return t*(c*a-o*u)+r*(-c*i+o*s)+n*(u*i-a*s)}function Re(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],d=t[8],_=r[0],l=r[1],h=r[2],m=r[3],p=r[4],b=r[5],v=r[6],g=r[7],w=r[8];return e[0]=_*n+l*o+h*c,e[1]=_*i+l*s+h*f,e[2]=_*a+l*u+h*d,e[3]=m*n+p*o+b*c,e[4]=m*i+p*s+b*f,e[5]=m*a+p*u+b*d,e[6]=v*n+g*o+w*c,e[7]=v*i+g*s+w*f,e[8]=v*a+g*u+w*d,e}function Fe(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],d=t[8],_=r[0],l=r[1];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=_*n+l*o+c,e[7]=_*i+l*s+f,e[8]=_*a+l*u+d,e}function Se(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],d=t[8],_=Math.sin(r),l=Math.cos(r);return e[0]=l*n+_*o,e[1]=l*i+_*s,e[2]=l*a+_*u,e[3]=l*o-_*n,e[4]=l*s-_*i,e[5]=l*u-_*a,e[6]=c,e[7]=f,e[8]=d,e}function Le(e,t,r){var n=r[0],i=r[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Pe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function Oe(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ie(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function ze(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function Ue(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,c=r*o,f=n*o,d=n*s,_=i*o,l=i*s,h=i*u,m=a*o,p=a*s,b=a*u;return e[0]=1-d-h,e[3]=f-b,e[6]=_+p,e[1]=f+b,e[4]=1-c-h,e[7]=l-m,e[2]=_-p,e[5]=l+m,e[8]=1-c-d,e}function Ce(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8],d=t[9],_=t[10],l=t[11],h=t[12],m=t[13],p=t[14],b=t[15],v=r*s-n*o,g=r*u-i*o,w=r*c-a*o,y=n*u-i*s,M=n*c-a*s,x=i*c-a*u,E=f*m-d*h,A=f*p-_*h,T=f*b-l*h,k=d*p-_*m,R=d*b-l*m,F=_*b-l*p,S=v*F-g*R+w*k+y*T-M*A+x*E;return S?(S=1/S,e[0]=(s*F-u*R+c*k)*S,e[1]=(u*T-o*F-c*A)*S,e[2]=(o*R-s*T+c*E)*S,e[3]=(i*R-n*F-a*k)*S,e[4]=(r*F-i*T+a*A)*S,e[5]=(n*T-r*R-a*E)*S,e[6]=(m*x-p*M+b*y)*S,e[7]=(p*w-h*x-b*g)*S,e[8]=(h*M-m*w+b*v)*S,e):null}function De(e,t,r){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/r,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function Be(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function Ve(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function qe(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e}function Ne(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e}function je(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e}function He(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e}function Ge(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function We(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],f=e[8],d=t[0],_=t[1],h=t[2],m=t[3],p=t[4],b=t[5],v=t[6],g=t[7],w=t[8];return Math.abs(r-d)<=l*Math.max(1,Math.abs(r),Math.abs(d))&&Math.abs(n-_)<=l*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(i-h)<=l*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(a-m)<=l*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(o-p)<=l*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(s-b)<=l*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(u-v)<=l*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-g)<=l*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(f-w)<=l*Math.max(1,Math.abs(f),Math.abs(w))}var Xe=Re,Ye=Ne;function Ze(){var e=new h(16);return h!=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 Ke(e){var t=new h(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function $e(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Qe(e,t,r,n,i,a,o,s,u,c,f,d,_,l,m,p){var b=new h(16);return b[0]=e,b[1]=t,b[2]=r,b[3]=n,b[4]=i,b[5]=a,b[6]=o,b[7]=s,b[8]=u,b[9]=c,b[10]=f,b[11]=d,b[12]=_,b[13]=l,b[14]=m,b[15]=p,b}function Je(e,t,r,n,i,a,o,s,u,c,f,d,_,l,h,m,p){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=u,e[8]=c,e[9]=f,e[10]=d,e[11]=_,e[12]=l,e[13]=h,e[14]=m,e[15]=p,e}function et(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}function tt(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function rt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8],d=t[9],_=t[10],l=t[11],h=t[12],m=t[13],p=t[14],b=t[15],v=r*s-n*o,g=r*u-i*o,w=r*c-a*o,y=n*u-i*s,M=n*c-a*s,x=i*c-a*u,E=f*m-d*h,A=f*p-_*h,T=f*b-l*h,k=d*p-_*m,R=d*b-l*m,F=_*b-l*p,S=v*F-g*R+w*k+y*T-M*A+x*E;return S?(S=1/S,e[0]=(s*F-u*R+c*k)*S,e[1]=(i*R-n*F-a*k)*S,e[2]=(m*x-p*M+b*y)*S,e[3]=(_*M-d*x-l*y)*S,e[4]=(u*T-o*F-c*A)*S,e[5]=(r*F-i*T+a*A)*S,e[6]=(p*w-h*x-b*g)*S,e[7]=(f*x-_*w+l*g)*S,e[8]=(o*R-s*T+c*E)*S,e[9]=(n*T-r*R-a*E)*S,e[10]=(h*M-m*w+b*v)*S,e[11]=(d*w-f*M-l*v)*S,e[12]=(s*A-o*k-u*E)*S,e[13]=(r*k-n*A+i*E)*S,e[14]=(m*g-h*y-p*v)*S,e[15]=(f*y-d*g+_*v)*S,e):null}function nt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8],d=t[9],_=t[10],l=t[11],h=t[12],m=t[13],p=t[14],b=t[15];return e[0]=s*(_*b-l*p)-d*(u*b-c*p)+m*(u*l-c*_),e[1]=-(n*(_*b-l*p)-d*(i*b-a*p)+m*(i*l-a*_)),e[2]=n*(u*b-c*p)-s*(i*b-a*p)+m*(i*c-a*u),e[3]=-(n*(u*l-c*_)-s*(i*l-a*_)+d*(i*c-a*u)),e[4]=-(o*(_*b-l*p)-f*(u*b-c*p)+h*(u*l-c*_)),e[5]=r*(_*b-l*p)-f*(i*b-a*p)+h*(i*l-a*_),e[6]=-(r*(u*b-c*p)-o*(i*b-a*p)+h*(i*c-a*u)),e[7]=r*(u*l-c*_)-o*(i*l-a*_)+f*(i*c-a*u),e[8]=o*(d*b-l*m)-f*(s*b-c*m)+h*(s*l-c*d),e[9]=-(r*(d*b-l*m)-f*(n*b-a*m)+h*(n*l-a*d)),e[10]=r*(s*b-c*m)-o*(n*b-a*m)+h*(n*c-a*s),e[11]=-(r*(s*l-c*d)-o*(n*l-a*d)+f*(n*c-a*s)),e[12]=-(o*(d*p-_*m)-f*(s*p-u*m)+h*(s*_-u*d)),e[13]=r*(d*p-_*m)-f*(n*p-i*m)+h*(n*_-i*d),e[14]=-(r*(s*p-u*m)-o*(n*p-i*m)+h*(n*u-i*s)),e[15]=r*(s*_-u*d)-o*(n*_-i*d)+f*(n*u-i*s),e}function it(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],c=e[8],f=e[9],d=e[10],_=e[11],l=e[12],h=e[13],m=e[14],p=e[15];return(t*o-r*a)*(d*p-_*m)-(t*s-n*a)*(f*p-_*h)+(t*u-i*a)*(f*m-d*h)+(r*s-n*o)*(c*p-_*l)-(r*u-i*o)*(c*m-d*l)+(n*u-i*s)*(c*h-f*l)}function at(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],d=t[8],_=t[9],l=t[10],h=t[11],m=t[12],p=t[13],b=t[14],v=t[15],g=r[0],w=r[1],y=r[2],M=r[3];return e[0]=g*n+w*s+y*d+M*m,e[1]=g*i+w*u+y*_+M*p,e[2]=g*a+w*c+y*l+M*b,e[3]=g*o+w*f+y*h+M*v,g=r[4],w=r[5],y=r[6],M=r[7],e[4]=g*n+w*s+y*d+M*m,e[5]=g*i+w*u+y*_+M*p,e[6]=g*a+w*c+y*l+M*b,e[7]=g*o+w*f+y*h+M*v,g=r[8],w=r[9],y=r[10],M=r[11],e[8]=g*n+w*s+y*d+M*m,e[9]=g*i+w*u+y*_+M*p,e[10]=g*a+w*c+y*l+M*b,e[11]=g*o+w*f+y*h+M*v,g=r[12],w=r[13],y=r[14],M=r[15],e[12]=g*n+w*s+y*d+M*m,e[13]=g*i+w*u+y*_+M*p,e[14]=g*a+w*c+y*l+M*b,e[15]=g*o+w*f+y*h+M*v,e}function ot(e,t,r){var n,i,a,o,s,u,c,f,d,_,l,h,m=r[0],p=r[1],b=r[2];return t===e?(e[12]=t[0]*m+t[4]*p+t[8]*b+t[12],e[13]=t[1]*m+t[5]*p+t[9]*b+t[13],e[14]=t[2]*m+t[6]*p+t[10]*b+t[14],e[15]=t[3]*m+t[7]*p+t[11]*b+t[15]):(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],d=t[8],_=t[9],l=t[10],h=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=c,e[7]=f,e[8]=d,e[9]=_,e[10]=l,e[11]=h,e[12]=n*m+s*p+d*b+t[12],e[13]=i*m+u*p+_*b+t[13],e[14]=a*m+c*p+l*b+t[14],e[15]=o*m+f*p+h*b+t[15]),e}function st(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function ut(e,t,r,n){var i,a,o,s,u,c,f,d,_,h,m,p,b,v,g,w,y,M,x,E,A,T,k,R,F=n[0],S=n[1],L=n[2],P=Math.hypot(F,S,L);return P<l?null:(F*=P=1/P,S*=P,L*=P,i=Math.sin(r),o=1-(a=Math.cos(r)),s=t[0],u=t[1],c=t[2],f=t[3],d=t[4],_=t[5],h=t[6],m=t[7],p=t[8],b=t[9],v=t[10],g=t[11],w=F*F*o+a,y=S*F*o+L*i,M=L*F*o-S*i,x=F*S*o-L*i,E=S*S*o+a,A=L*S*o+F*i,T=F*L*o+S*i,k=S*L*o-F*i,R=L*L*o+a,e[0]=s*w+d*y+p*M,e[1]=u*w+_*y+b*M,e[2]=c*w+h*y+v*M,e[3]=f*w+m*y+g*M,e[4]=s*x+d*E+p*A,e[5]=u*x+_*E+b*A,e[6]=c*x+h*E+v*A,e[7]=f*x+m*E+g*A,e[8]=s*T+d*k+p*R,e[9]=u*T+_*k+b*R,e[10]=c*T+h*k+v*R,e[11]=f*T+m*k+g*R,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function ct(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],u=t[7],c=t[8],f=t[9],d=t[10],_=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+c*n,e[5]=o*i+f*n,e[6]=s*i+d*n,e[7]=u*i+_*n,e[8]=c*i-a*n,e[9]=f*i-o*n,e[10]=d*i-s*n,e[11]=_*i-u*n,e}function ft(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],c=t[8],f=t[9],d=t[10],_=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-c*n,e[1]=o*i-f*n,e[2]=s*i-d*n,e[3]=u*i-_*n,e[8]=a*n+c*i,e[9]=o*n+f*i,e[10]=s*n+d*i,e[11]=u*n+_*i,e}function dt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],c=t[4],f=t[5],d=t[6],_=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+c*n,e[1]=o*i+f*n,e[2]=s*i+d*n,e[3]=u*i+_*n,e[4]=c*i-a*n,e[5]=f*i-o*n,e[6]=d*i-s*n,e[7]=_*i-u*n,e}function _t(e,t){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]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function lt(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ht(e,t,r){var n,i,a,o=r[0],s=r[1],u=r[2],c=Math.hypot(o,s,u);return c<l?null:(o*=c=1/c,s*=c,u*=c,n=Math.sin(t),a=1-(i=Math.cos(t)),e[0]=o*o*a+i,e[1]=s*o*a+u*n,e[2]=u*o*a-s*n,e[3]=0,e[4]=o*s*a-u*n,e[5]=s*s*a+i,e[6]=u*s*a+o*n,e[7]=0,e[8]=o*u*a+s*n,e[9]=s*u*a-o*n,e[10]=u*u*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function mt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function pt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function bt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,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}function vt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,u=i+i,c=a+a,f=n*s,d=n*u,_=n*c,l=i*u,h=i*c,m=a*c,p=o*s,b=o*u,v=o*c;return e[0]=1-(l+m),e[1]=d+v,e[2]=_-b,e[3]=0,e[4]=d-v,e[5]=1-(f+m),e[6]=h+p,e[7]=0,e[8]=_+b,e[9]=h-p,e[10]=1-(f+l),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function gt(e,t){var r=new h(3),n=-t[0],i=-t[1],a=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],d=n*n+i*i+a*a+o*o;return d>0?(r[0]=2*(s*o+f*n+u*a-c*i)/d,r[1]=2*(u*o+f*i+c*n-s*a)/d,r[2]=2*(c*o+f*a+s*i-u*n)/d):(r[0]=2*(s*o+f*n+u*a-c*i),r[1]=2*(u*o+f*i+c*n-s*a),r[2]=2*(c*o+f*a+s*i-u*n)),vt(e,t,r),e}function wt(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function yt(e,t){var r=t[0],n=t[1],i=t[2],a=t[4],o=t[5],s=t[6],u=t[8],c=t[9],f=t[10];return e[0]=Math.hypot(r,n,i),e[1]=Math.hypot(a,o,s),e[2]=Math.hypot(u,c,f),e}function Mt(e,t){var r=new h(3);yt(r,t);var n=1/r[0],i=1/r[1],a=1/r[2],o=t[0]*n,s=t[1]*i,u=t[2]*a,c=t[4]*n,f=t[5]*i,d=t[6]*a,_=t[8]*n,l=t[9]*i,m=t[10]*a,p=o+f+m,b=0;return p>0?(b=2*Math.sqrt(p+1),e[3]=.25*b,e[0]=(d-l)/b,e[1]=(_-u)/b,e[2]=(s-c)/b):o>f&&o>m?(b=2*Math.sqrt(1+o-f-m),e[3]=(d-l)/b,e[0]=.25*b,e[1]=(s+c)/b,e[2]=(_+u)/b):f>m?(b=2*Math.sqrt(1+f-o-m),e[3]=(_-u)/b,e[0]=(s+c)/b,e[1]=.25*b,e[2]=(d+l)/b):(b=2*Math.sqrt(1+m-o-f),e[3]=(s-c)/b,e[0]=(_+u)/b,e[1]=(d+l)/b,e[2]=.25*b),e}function xt(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=t[3],u=i+i,c=a+a,f=o+o,d=i*u,_=i*c,l=i*f,h=a*c,m=a*f,p=o*f,b=s*u,v=s*c,g=s*f,w=n[0],y=n[1],M=n[2];return e[0]=(1-(h+p))*w,e[1]=(_+g)*w,e[2]=(l-v)*w,e[3]=0,e[4]=(_-g)*y,e[5]=(1-(d+p))*y,e[6]=(m+b)*y,e[7]=0,e[8]=(l+v)*M,e[9]=(m-b)*M,e[10]=(1-(d+h))*M,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function Et(e,t,r,n,i){var a=t[0],o=t[1],s=t[2],u=t[3],c=a+a,f=o+o,d=s+s,_=a*c,l=a*f,h=a*d,m=o*f,p=o*d,b=s*d,v=u*c,g=u*f,w=u*d,y=n[0],M=n[1],x=n[2],E=i[0],A=i[1],T=i[2],k=(1-(m+b))*y,R=(l+w)*y,F=(h-g)*y,S=(l-w)*M,L=(1-(_+b))*M,P=(p+v)*M,O=(h+g)*x,I=(p-v)*x,z=(1-(_+m))*x;return e[0]=k,e[1]=R,e[2]=F,e[3]=0,e[4]=S,e[5]=L,e[6]=P,e[7]=0,e[8]=O,e[9]=I,e[10]=z,e[11]=0,e[12]=r[0]+E-(k*E+S*A+O*T),e[13]=r[1]+A-(R*E+L*A+I*T),e[14]=r[2]+T-(F*E+P*A+z*T),e[15]=1,e}function At(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,c=r*o,f=n*o,d=n*s,_=i*o,l=i*s,h=i*u,m=a*o,p=a*s,b=a*u;return e[0]=1-d-h,e[1]=f+b,e[2]=_-p,e[3]=0,e[4]=f-b,e[5]=1-c-h,e[6]=l+m,e[7]=0,e[8]=_+p,e[9]=l-m,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Tt(e,t,r,n,i,a,o){var s=1/(r-t),u=1/(i-n),c=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*u,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*u,e[10]=(o+a)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*c,e[15]=0,e}function kt(e,t,r,n,i){var a,o=1/Math.tan(t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(a=1/(n-i),e[10]=(i+n)*a,e[14]=2*i*n*a):(e[10]=-1,e[14]=-2*n),e}function Rt(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),u=2/(o+s),c=2/(i+a);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-s)*u*.5,e[9]=(i-a)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}function Ft(e,t,r,n,i,a,o){var s=1/(t-r),u=1/(n-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*u,e[14]=(o+a)*c,e[15]=1,e}function St(e,t,r,n){var i,a,o,s,u,c,f,d,_,h,m=t[0],p=t[1],b=t[2],v=n[0],g=n[1],w=n[2],y=r[0],M=r[1],x=r[2];return Math.abs(m-y)<l&&Math.abs(p-M)<l&&Math.abs(b-x)<l?et(e):(f=m-y,d=p-M,_=b-x,i=g*(_*=h=1/Math.hypot(f,d,_))-w*(d*=h),a=w*(f*=h)-v*_,o=v*d-g*f,(h=Math.hypot(i,a,o))?(i*=h=1/h,a*=h,o*=h):(i=0,a=0,o=0),s=d*o-_*a,u=_*i-f*o,c=f*a-d*i,(h=Math.hypot(s,u,c))?(s*=h=1/h,u*=h,c*=h):(s=0,u=0,c=0),e[0]=i,e[1]=s,e[2]=f,e[3]=0,e[4]=a,e[5]=u,e[6]=d,e[7]=0,e[8]=o,e[9]=c,e[10]=_,e[11]=0,e[12]=-(i*m+a*p+o*b),e[13]=-(s*m+u*p+c*b),e[14]=-(f*m+d*p+_*b),e[15]=1,e)}function Lt(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=n[0],u=n[1],c=n[2],f=i-r[0],d=a-r[1],_=o-r[2],l=f*f+d*d+_*_;l>0&&(f*=l=1/Math.sqrt(l),d*=l,_*=l);var h=u*_-c*d,m=c*f-s*_,p=s*d-u*f;return(l=h*h+m*m+p*p)>0&&(h*=l=1/Math.sqrt(l),m*=l,p*=l),e[0]=h,e[1]=m,e[2]=p,e[3]=0,e[4]=d*p-_*m,e[5]=_*h-f*p,e[6]=f*m-d*h,e[7]=0,e[8]=f,e[9]=d,e[10]=_,e[11]=0,e[12]=i,e[13]=a,e[14]=o,e[15]=1,e}function Pt(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function Ot(e){return Math.hypot(e[0],e[1],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function It(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e}function zt(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function Ut(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e}function Ct(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e}function Dt(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function Bt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],f=e[8],d=e[9],_=e[10],h=e[11],m=e[12],p=e[13],b=e[14],v=e[15],g=t[0],w=t[1],y=t[2],M=t[3],x=t[4],E=t[5],A=t[6],T=t[7],k=t[8],R=t[9],F=t[10],S=t[11],L=t[12],P=t[13],O=t[14],I=t[15];return Math.abs(r-g)<=l*Math.max(1,Math.abs(r),Math.abs(g))&&Math.abs(n-w)<=l*Math.max(1,Math.abs(n),Math.abs(w))&&Math.abs(i-y)<=l*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(a-M)<=l*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(o-x)<=l*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(s-E)<=l*Math.max(1,Math.abs(s),Math.abs(E))&&Math.abs(u-A)<=l*Math.max(1,Math.abs(u),Math.abs(A))&&Math.abs(c-T)<=l*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(f-k)<=l*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(d-R)<=l*Math.max(1,Math.abs(d),Math.abs(R))&&Math.abs(_-F)<=l*Math.max(1,Math.abs(_),Math.abs(F))&&Math.abs(h-S)<=l*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(m-L)<=l*Math.max(1,Math.abs(m),Math.abs(L))&&Math.abs(p-P)<=l*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(b-O)<=l*Math.max(1,Math.abs(b),Math.abs(O))&&Math.abs(v-I)<=l*Math.max(1,Math.abs(v),Math.abs(I))}var Vt=at,qt=zt;function Nt(){var e=new h(3);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function jt(e){var t=new h(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ht(e){var t=e[0],r=e[1],n=e[2];return Math.hypot(t,r,n)}function Gt(e,t,r){var n=new h(3);return n[0]=e,n[1]=t,n[2]=r,n}function Wt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Xt(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function Yt(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function Zt(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function Kt(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function $t(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function Qt(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function Jt(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function er(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function tr(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function rr(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function nr(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function ir(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function ar(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.hypot(r,n,i)}function or(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function sr(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function ur(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function cr(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function fr(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function dr(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _r(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2];return e[0]=i*u-a*s,e[1]=a*o-n*u,e[2]=n*s-i*o,e}function lr(e,t,r,n){var i=t[0],a=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e}function hr(e,t,r,n,i,a){var o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,c=o*(a-1),f=o*(3-2*a);return e[0]=t[0]*s+r[0]*u+n[0]*c+i[0]*f,e[1]=t[1]*s+r[1]*u+n[1]*c+i[1]*f,e[2]=t[2]*s+r[2]*u+n[2]*c+i[2]*f,e}function mr(e,t,r,n,i,a){var o=1-a,s=o*o,u=a*a,c=s*o,f=3*a*s,d=3*u*o,_=u*a;return e[0]=t[0]*c+r[0]*f+n[0]*d+i[0]*_,e[1]=t[1]*c+r[1]*f+n[1]*d+i[1]*_,e[2]=t[2]*c+r[2]*f+n[2]*d+i[2]*_,e}function pr(e,t){t=t||1;var r=2*m()*Math.PI,n=2*m()-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e}function br(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,e}function vr(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e}function gr(e,t,r){var n=r[0],i=r[1],a=r[2],o=r[3],s=t[0],u=t[1],c=t[2],f=i*c-a*u,d=a*s-n*c,_=n*u-i*s,l=i*_-a*d,h=a*f-n*_,m=n*d-i*f,p=2*o;return f*=p,d*=p,_*=p,l*=2,h*=2,m*=2,e[0]=s+f+l,e[1]=u+d+h,e[2]=c+_+m,e}function wr(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function yr(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function Mr(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function xr(e,t){var r=Gt(e[0],e[1],e[2]),n=Gt(t[0],t[1],t[2]);fr(r,r),fr(n,n);var i=dr(r,n);return i>1?0:i<-1?Math.PI:Math.acos(i)}function Er(e){return e[0]=0,e[1]=0,e[2]=0,e}function Ar(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function Tr(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function kr(e,t){var r=e[0],n=e[1],i=e[2],a=t[0],o=t[1],s=t[2];return Math.abs(r-a)<=l*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-o)<=l*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=l*Math.max(1,Math.abs(i),Math.abs(s))}var Rr,Fr=Zt,Sr=Kt,Lr=$t,Pr=ar,Or=or,Ir=Ht,zr=sr,Ur=(Rr=Nt(),function(e,t,r,n,i,a){var o,s;for(t||(t=3),r||(r=0),s=n?Math.min(n*t+r,e.length):e.length,o=r;o<s;o+=t)Rr[0]=e[o],Rr[1]=e[o+1],Rr[2]=e[o+2],i(Rr,Rr,a),e[o]=Rr[0],e[o+1]=Rr[1],e[o+2]=Rr[2];return e});function Cr(){var e=new h(4);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function Dr(e){var t=new h(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Br(e,t,r,n){var i=new h(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}function Vr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function qr(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function Nr(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function jr(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function Hr(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function Gr(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function Wr(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function Xr(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function Yr(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function Zr(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function Kr(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function $r(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function Qr(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}function Jr(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.hypot(r,n,i,a)}function en(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+i*i+a*a}function tn(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.hypot(t,r,n,i)}function rn(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}function nn(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function an(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function on(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),e[0]=r*o,e[1]=n*o,e[2]=i*o,e[3]=a*o,e}function sn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function un(e,t,r,n){var i=r[0]*n[1]-r[1]*n[0],a=r[0]*n[2]-r[2]*n[0],o=r[0]*n[3]-r[3]*n[0],s=r[1]*n[2]-r[2]*n[1],u=r[1]*n[3]-r[3]*n[1],c=r[2]*n[3]-r[3]*n[2],f=t[0],d=t[1],_=t[2],l=t[3];return e[0]=d*c-_*u+l*s,e[1]=-f*c+_*o-l*a,e[2]=f*u-d*o+l*i,e[3]=-f*s+d*a-_*i,e}function cn(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e[3]=s+n*(r[3]-s),e}function fn(e,t){var r,n,i,a,o,s;t=t||1;do{o=(r=2*m()-1)*r+(n=2*m()-1)*n}while(o>=1);do{s=(i=2*m()-1)*i+(a=2*m()-1)*a}while(s>=1);var u=Math.sqrt((1-o)/s);return e[0]=t*r,e[1]=t*n,e[2]=t*i*u,e[3]=t*a*u,e}function dn(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e}function _n(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2],c=r[3],f=c*n+s*a-u*i,d=c*i+u*n-o*a,_=c*a+o*i-s*n,l=-o*n-s*i-u*a;return e[0]=f*c+l*-o+d*-u-_*-s,e[1]=d*c+l*-s+_*-o-f*-u,e[2]=_*c+l*-u+f*-s-d*-o,e[3]=t[3],e}function ln(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function hn(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function mn(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function pn(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],u=t[2],c=t[3];return Math.abs(r-o)<=l*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=l*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-u)<=l*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-c)<=l*Math.max(1,Math.abs(a),Math.abs(c))}var bn=jr,vn=Hr,gn=Gr,wn=Jr,yn=en,Mn=tn,xn=rn,En=function(){var e=Cr();return function(t,r,n,i,a,o){var s,u;for(r||(r=4),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;s<u;s+=r)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}}();function An(){var e=new h(4);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Tn(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function kn(e,t,r){r*=.5;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e}function Rn(e,t){var r=2*Math.acos(t[3]),n=Math.sin(r/2);return n>l?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r}function Fn(e,t){var r=ii(e,t);return Math.acos(2*r*r-1)}function Sn(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1],c=r[2],f=r[3];return e[0]=n*f+o*s+i*c-a*u,e[1]=i*f+o*u+a*s-n*c,e[2]=a*f+o*c+n*u-i*s,e[3]=o*f-n*s-i*u-a*c,e}function Ln(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+o*s,e[1]=i*u+a*s,e[2]=a*u-i*s,e[3]=o*u-n*s,e}function Pn(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u-a*s,e[1]=i*u+o*s,e[2]=a*u+n*s,e[3]=o*u-i*s,e}function On(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+i*s,e[1]=i*u-n*s,e[2]=a*u+o*s,e[3]=o*u-a*s,e}function In(e,t){var r=t[0],n=t[1],i=t[2];return e[0]=r,e[1]=n,e[2]=i,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),e}function zn(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=Math.sqrt(r*r+n*n+i*i),s=Math.exp(a),u=o>0?s*Math.sin(o)/o:0;return e[0]=r*u,e[1]=n*u,e[2]=i*u,e[3]=s*Math.cos(o),e}function Un(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=Math.sqrt(r*r+n*n+i*i),s=o>0?Math.atan2(o,a)/o:0;return e[0]=r*s,e[1]=n*s,e[2]=i*s,e[3]=.5*Math.log(r*r+n*n+i*i+a*a),e}function Cn(e,t,r){return Un(e,t),ni(e,e,r),zn(e,e),e}function Dn(e,t,r,n){var i,a,o,s,u,c=t[0],f=t[1],d=t[2],_=t[3],h=r[0],m=r[1],p=r[2],b=r[3];return(a=c*h+f*m+d*p+_*b)<0&&(a=-a,h=-h,m=-m,p=-p,b=-b),1-a>l?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,u=Math.sin(n*i)/o):(s=1-n,u=n),e[0]=s*c+u*h,e[1]=s*f+u*m,e[2]=s*d+u*p,e[3]=s*_+u*b,e}function Bn(e){var t=m(),r=m(),n=m(),i=Math.sqrt(1-t),a=Math.sqrt(t);return e[0]=i*Math.sin(2*Math.PI*r),e[1]=i*Math.cos(2*Math.PI*r),e[2]=a*Math.sin(2*Math.PI*n),e[3]=a*Math.cos(2*Math.PI*n),e}function Vn(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return e[0]=-r*s,e[1]=-n*s,e[2]=-i*s,e[3]=a*s,e}function qn(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function Nn(e,t){var r,n=t[0]+t[4]+t[8];if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(t[3*i+i]-t[3*a+a]-t[3*o+o]+1),e[i]=.5*r,r=.5/r,e[3]=(t[3*a+o]-t[3*o+a])*r,e[a]=(t[3*a+i]+t[3*i+a])*r,e[o]=(t[3*o+i]+t[3*i+o])*r}return e}function jn(e,t,r,n){var i=.5*Math.PI/180;t*=i,r*=i,n*=i;var a=Math.sin(t),o=Math.cos(t),s=Math.sin(r),u=Math.cos(r),c=Math.sin(n),f=Math.cos(n);return e[0]=a*u*f-o*s*c,e[1]=o*s*f+a*u*c,e[2]=o*u*c-a*s*f,e[3]=o*u*f+a*s*c,e}function Hn(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var Gn,Wn,Xn,Yn,Zn,Kn,$n=Dr,Qn=Br,Jn=Vr,ei=qr,ti=Nr,ri=Sn,ni=$r,ii=sn,ai=cn,oi=tn,si=oi,ui=rn,ci=ui,fi=on,di=mn,_i=pn,li=(Gn=Nt(),Wn=Gt(1,0,0),Xn=Gt(0,1,0),function(e,t,r){var n=dr(t,r);return n<-.999999?(_r(Gn,Wn,t),Ir(Gn)<1e-6&&_r(Gn,Xn,t),fr(Gn,Gn),kn(e,Gn,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(_r(Gn,t,r),e[0]=Gn[0],e[1]=Gn[1],e[2]=Gn[2],e[3]=1+n,fi(e,e))}),hi=(Yn=An(),Zn=An(),function(e,t,r,n,i,a){return Dn(Yn,t,i,a),Dn(Zn,r,n,a),Dn(e,Yn,Zn,2*a*(1-a)),e}),mi=(Kn=be(),function(e,t,r,n){return Kn[0]=r[0],Kn[3]=r[1],Kn[6]=r[2],Kn[1]=n[0],Kn[4]=n[1],Kn[7]=n[2],Kn[2]=-t[0],Kn[5]=-t[1],Kn[8]=-t[2],fi(e,Nn(e,Kn))});function pi(){var e=new h(8);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0),e[3]=1,e}function bi(e){var t=new h(8);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function vi(e,t,r,n,i,a,o,s){var u=new h(8);return u[0]=e,u[1]=t,u[2]=r,u[3]=n,u[4]=i,u[5]=a,u[6]=o,u[7]=s,u}function gi(e,t,r,n,i,a,o){var s=new h(8);s[0]=e,s[1]=t,s[2]=r,s[3]=n;var u=.5*i,c=.5*a,f=.5*o;return s[4]=u*n+c*r-f*t,s[5]=c*n+f*e-u*r,s[6]=f*n+u*t-c*e,s[7]=-u*e-c*t-f*r,s}function wi(e,t,r){var n=.5*r[0],i=.5*r[1],a=.5*r[2],o=t[0],s=t[1],u=t[2],c=t[3];return e[0]=o,e[1]=s,e[2]=u,e[3]=c,e[4]=n*c+i*u-a*s,e[5]=i*c+a*o-n*u,e[6]=a*c+n*s-i*o,e[7]=-n*o-i*s-a*u,e}function yi(e,t){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=.5*t[0],e[5]=.5*t[1],e[6]=.5*t[2],e[7]=0,e}function Mi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function xi(e,t){var r=An();Mt(r,t);var n=new h(3);return wt(n,t),wi(e,r,n),e}function Ei(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function Ai(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function Ti(e,t,r,n,i,a,o,s,u){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=u,e}var ki=Jn;function Ri(e,t){return e[0]=t[4],e[1]=t[5],e[2]=t[6],e[3]=t[7],e}var Fi=Jn;function Si(e,t){return e[4]=t[0],e[5]=t[1],e[6]=t[2],e[7]=t[3],e}function Li(e,t){var r=t[4],n=t[5],i=t[6],a=t[7],o=-t[0],s=-t[1],u=-t[2],c=t[3];return e[0]=2*(r*c+a*o+n*u-i*s),e[1]=2*(n*c+a*s+i*o-r*u),e[2]=2*(i*c+a*u+r*s-n*o),e}function Pi(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=.5*r[0],u=.5*r[1],c=.5*r[2],f=t[4],d=t[5],_=t[6],l=t[7];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=o*s+i*c-a*u+f,e[5]=o*u+a*s-n*c+d,e[6]=o*c+n*u-i*s+_,e[7]=-n*s-i*u-a*c+l,e}function Oi(e,t,r){var n=-t[0],i=-t[1],a=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],d=s*o+f*n+u*a-c*i,_=u*o+f*i+c*n-s*a,l=c*o+f*a+s*i-u*n,h=f*o-s*n-u*i-c*a;return Ln(e,t,r),n=e[0],i=e[1],a=e[2],o=e[3],e[4]=d*o+h*n+_*a-l*i,e[5]=_*o+h*i+l*n-d*a,e[6]=l*o+h*a+d*i-_*n,e[7]=h*o-d*n-_*i-l*a,e}function Ii(e,t,r){var n=-t[0],i=-t[1],a=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],d=s*o+f*n+u*a-c*i,_=u*o+f*i+c*n-s*a,l=c*o+f*a+s*i-u*n,h=f*o-s*n-u*i-c*a;return Pn(e,t,r),n=e[0],i=e[1],a=e[2],o=e[3],e[4]=d*o+h*n+_*a-l*i,e[5]=_*o+h*i+l*n-d*a,e[6]=l*o+h*a+d*i-_*n,e[7]=h*o-d*n-_*i-l*a,e}function zi(e,t,r){var n=-t[0],i=-t[1],a=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],d=s*o+f*n+u*a-c*i,_=u*o+f*i+c*n-s*a,l=c*o+f*a+s*i-u*n,h=f*o-s*n-u*i-c*a;return On(e,t,r),n=e[0],i=e[1],a=e[2],o=e[3],e[4]=d*o+h*n+_*a-l*i,e[5]=_*o+h*i+l*n-d*a,e[6]=l*o+h*a+d*i-_*n,e[7]=h*o-d*n-_*i-l*a,e}function Ui(e,t,r){var n=r[0],i=r[1],a=r[2],o=r[3],s=t[0],u=t[1],c=t[2],f=t[3];return e[0]=s*o+f*n+u*a-c*i,e[1]=u*o+f*i+c*n-s*a,e[2]=c*o+f*a+s*i-u*n,e[3]=f*o-s*n-u*i-c*a,s=t[4],u=t[5],c=t[6],f=t[7],e[4]=s*o+f*n+u*a-c*i,e[5]=u*o+f*i+c*n-s*a,e[6]=c*o+f*a+s*i-u*n,e[7]=f*o-s*n-u*i-c*a,e}function Ci(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1],c=r[2],f=r[3];return e[0]=n*f+o*s+i*c-a*u,e[1]=i*f+o*u+a*s-n*c,e[2]=a*f+o*c+n*u-i*s,e[3]=o*f-n*s-i*u-a*c,s=r[4],u=r[5],c=r[6],f=r[7],e[4]=n*f+o*s+i*c-a*u,e[5]=i*f+o*u+a*s-n*c,e[6]=a*f+o*c+n*u-i*s,e[7]=o*f-n*s-i*u-a*c,e}function Di(e,t,r,n){if(Math.abs(n)<l)return Ei(e,t);var i=Math.hypot(r[0],r[1],r[2]);n*=.5;var a=Math.sin(n),o=a*r[0]/i,s=a*r[1]/i,u=a*r[2]/i,c=Math.cos(n),f=t[0],d=t[1],_=t[2],h=t[3];e[0]=f*c+h*o+d*u-_*s,e[1]=d*c+h*s+_*o-f*u,e[2]=_*c+h*u+f*s-d*o,e[3]=h*c-f*o-d*s-_*u;var m=t[4],p=t[5],b=t[6],v=t[7];return e[4]=m*c+v*o+p*u-b*s,e[5]=p*c+v*s+b*o-m*u,e[6]=b*c+v*u+m*s-p*o,e[7]=v*c-m*o-p*s-b*u,e}function Bi(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e}function Vi(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[4],u=r[5],c=r[6],f=r[7],d=t[4],_=t[5],l=t[6],h=t[7],m=r[0],p=r[1],b=r[2],v=r[3];return e[0]=n*v+o*m+i*b-a*p,e[1]=i*v+o*p+a*m-n*b,e[2]=a*v+o*b+n*p-i*m,e[3]=o*v-n*m-i*p-a*b,e[4]=n*f+o*s+i*c-a*u+d*v+h*m+_*b-l*p,e[5]=i*f+o*u+a*s-n*c+_*v+h*p+l*m-d*b,e[6]=a*f+o*c+n*u-i*s+l*v+h*b+d*p-_*m,e[7]=o*f-n*s-i*u-a*c+h*v-d*m-_*p-l*b,e}var qi=Vi;function Ni(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e}var ji=ii;function Hi(e,t,r,n){var i=1-n;return ji(t,r)<0&&(n=-n),e[0]=t[0]*i+r[0]*n,e[1]=t[1]*i+r[1]*n,e[2]=t[2]*i+r[2]*n,e[3]=t[3]*i+r[3]*n,e[4]=t[4]*i+r[4]*n,e[5]=t[5]*i+r[5]*n,e[6]=t[6]*i+r[6]*n,e[7]=t[7]*i+r[7]*n,e}function Gi(e,t){var r=Zi(t);return e[0]=-t[0]/r,e[1]=-t[1]/r,e[2]=-t[2]/r,e[3]=t[3]/r,e[4]=-t[4]/r,e[5]=-t[5]/r,e[6]=-t[6]/r,e[7]=t[7]/r,e}function Wi(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=t[7],e}var Xi=oi,Yi=Xi,Zi=ui,Ki=Zi;function $i(e,t){var r=Zi(t);if(r>0){r=Math.sqrt(r);var n=t[0]/r,i=t[1]/r,a=t[2]/r,o=t[3]/r,s=t[4],u=t[5],c=t[6],f=t[7],d=n*s+i*u+a*c+o*f;e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=(s-n*d)/r,e[5]=(u-i*d)/r,e[6]=(c-a*d)/r,e[7]=(f-o*d)/r}return e}function Qi(e){return"quat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+")"}function Ji(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]}function ea(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],f=t[0],d=t[1],_=t[2],h=t[3],m=t[4],p=t[5],b=t[6],v=t[7];return Math.abs(r-f)<=l*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(n-d)<=l*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-_)<=l*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(a-h)<=l*Math.max(1,Math.abs(a),Math.abs(h))&&Math.abs(o-m)<=l*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(s-p)<=l*Math.max(1,Math.abs(s),Math.abs(p))&&Math.abs(u-b)<=l*Math.max(1,Math.abs(u),Math.abs(b))&&Math.abs(c-v)<=l*Math.max(1,Math.abs(c),Math.abs(v))}function ta(){var e=new h(2);return h!=Float32Array&&(e[0]=0,e[1]=0),e}function ra(e){var t=new h(2);return t[0]=e[0],t[1]=e[1],t}function na(e,t){var r=new h(2);return r[0]=e,r[1]=t,r}function ia(e,t){return e[0]=t[0],e[1]=t[1],e}function aa(e,t,r){return e[0]=t,e[1]=r,e}function oa(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function sa(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function ua(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function ca(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function fa(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function da(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function _a(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function la(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function ha(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function ma(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function pa(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e}function ba(e,t){var r=t[0]-e[0],n=t[1]-e[1];return Math.hypot(r,n)}function va(e,t){var r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n}function ga(e){var t=e[0],r=e[1];return Math.hypot(t,r)}function wa(e){var t=e[0],r=e[1];return t*t+r*r}function ya(e,t){return e[0]=-t[0],e[1]=-t[1],e}function Ma(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function xa(e,t){var r=t[0],n=t[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e}function Ea(e,t){return e[0]*t[0]+e[1]*t[1]}function Aa(e,t,r){var n=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=n,e}function Ta(e,t,r,n){var i=t[0],a=t[1];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e}function ka(e,t){t=t||1;var r=2*m()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function Ra(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i,e[1]=r[1]*n+r[3]*i,e}function Fa(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e}function Sa(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[3]*i+r[6],e[1]=r[1]*n+r[4]*i+r[7],e}function La(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[4]*i+r[12],e[1]=r[1]*n+r[5]*i+r[13],e}function Pa(e,t,r,n){var i=t[0]-r[0],a=t[1]-r[1],o=Math.sin(n),s=Math.cos(n);return e[0]=i*s-a*o+r[0],e[1]=i*o+a*s+r[1],e}function Oa(e,t){var r=e[0],n=e[1],i=t[0],a=t[1],o=r*r+n*n;o>0&&(o=1/Math.sqrt(o));var s=i*i+a*a;s>0&&(s=1/Math.sqrt(s));var u=(r*i+n*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)}function Ia(e){return e[0]=0,e[1]=0,e}function za(e){return"vec2("+e[0]+", "+e[1]+")"}function Ua(e,t){return e[0]===t[0]&&e[1]===t[1]}function Ca(e,t){var r=e[0],n=e[1],i=t[0],a=t[1];return Math.abs(r-i)<=l*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(n-a)<=l*Math.max(1,Math.abs(n),Math.abs(a))}var Da=ga,Ba=sa,Va=ua,qa=ca,Na=ba,ja=va,Ha=wa,Ga=function(){var e=ta();return function(t,r,n,i,a,o){var s,u;for(r||(r=2),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;s<u;s+=r)e[0]=t[s],e[1]=t[s+1],a(e,e,o),t[s]=e[0],t[s+1]=e[1];return t}}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyScreenCounterRotation=t.Pipeline=void 0;const n=r(30),i=r(1),a=r(5),o=r(31),s=r(32),u=r(9),c=r(10),f=r(0),d=r(13),_=r(7);let l=new Map,h=i.mat4.create();class m{constructor(e,t,r){this._client=e,this._impl=t,this._mgr=r,this.pendingMessages=[],this.cameraTokens=new Map,this.nextCameraToken=1,this.tokensInFlight=0,this.videoTextures=[],this.cameraPixelArrays=[],this._sequenceRecordDeviceAttitudeMatrices=!0,this._sequenceRecorderFirstCameraToken=0,this.onGLContextReset=new c.Event}static create(e,t){let r=e.pipeline_create();return l.set(r,new m(e,r,t)),r}static get(e){return l.get(e)}frameUpdate(e){for(let t of this.pendingMessages)e.processMessages(t),this._mgr.postOutgoingMessage({t:"buf",p:this._impl,d:t},[t]);this.pendingMessages=[],this.cleanOldFrames()}cleanOldFrames(){var e,t;let r=this._client.pipeline_camera_frame_user_data(this._impl);if(r)for(let n of this.cameraTokens)n[0]<r&&(n[1].texture&&this.videoTextures.push(n[1].texture),null===(t=null===(e=n[1].frame)||void 0===e?void 0:e.close)||void 0===t||t.call(e),this.cameraTokens.delete(n[0]))}cameraTokenReturn(e){if(this._sequenceRecorder&&this._sequenceRecordDeviceAttitudeMatrices&&e.token>=this._sequenceRecorderFirstCameraToken){let t=this.cameraTokens.get(e.token);t&&(e.att&&this._sequenceRecorder.appendAttitudeMatrix(e.att),t.data=e.d,this._sequenceRecorder.appendCameraFrame(t))}this.cameraPixelArrays.push(e.d),this.tokensInFlight--}sequenceRecordStart(e){this._sequenceRecorder||(this._sequenceRecorder=new d.SequenceRecorder(e)),this._sequenceRecorder.start(),this._sequenceRecorderFirstCameraToken=this.nextCameraToken}sequenceRecordStop(){var e;null===(e=this._sequenceRecorder)||void 0===e||e.stop()}sequenceRecordData(){var e;return(null===(e=this._sequenceRecorder)||void 0===e?void 0:e.data())||new Uint8Array(0)}sequenceRecordClear(){delete this._sequenceRecorder}sequenceRecordDeviceAttitudeMatrices(e){this._sequenceRecordDeviceAttitudeMatrices=e}getVideoTexture(){return this.videoTextures.pop()}destroy(){this._client.pipeline_destroy(this._impl),l.delete(this._impl)}getCurrentCameraInfo(){let e=this._client.pipeline_camera_frame_user_data(this._impl);if(e)return this.cameraTokens.get(e)}cameraFrameDrawGL(e,t,r){if(!this.glContext)return;let i=this.getCurrentCameraInfo();i&&(this._cameraDraw||(this._cameraDraw=new n.CameraDraw(this.glContext)),this._cameraDraw.drawCameraFrame(e,t,i,!0===r))}glContextLost(){this._cameraDraw&&this._cameraDraw.dispose(),this._faceDraw&&this._faceDraw.dispose(),this._faceProjectDraw&&this._faceProjectDraw.dispose(),delete this._cameraDraw,delete this._faceDraw,delete this._faceProjectDraw,u.disposeDrawPlane(),this.onGLContextReset.emit();for(let e of this.videoTextures)this.glContext&&this.glContext.deleteTexture(e);this.videoTextures=[];for(let e of this.cameraTokens)this.glContext&&e[1].texture&&this.glContext.deleteTexture(e[1].texture),e[1].texture=void 0;this.glContext=void 0}glContextSet(e,t){this.glContextLost(),this.glContext=e,t=t||[];for(let r=0;r<4;r++){let n=t[r]||e.createTexture();n&&(e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),this.videoTextures.push(n))}e.bindTexture(e.TEXTURE_2D,null)}drawFace(e,t,r,n){if(!this.glContext)return;this._faceDraw||(this._faceDraw=new o.FaceDraw(this.glContext));let a=i.mat4.create();i.mat4.multiply(a,e,t),i.mat4.multiply(a,a,r),this._faceDraw.drawFace(a,n)}drawFaceProject(e,t,r,n,i,a){this.glContext&&(this._faceProjectDraw||(this._faceProjectDraw=new s.FaceDrawProject(this.glContext)),this._faceProjectDraw.drawFace(e,t,r,n,i,a))}cameraFrameTexture(){var e;return null===(e=this.getCurrentCameraInfo())||void 0===e?void 0:e.texture}cameraFrameTextureMatrix(e,t,r){let a=this.getCurrentCameraInfo();return a?n.cameraFrameTextureMatrix(a.dataWidth,a.dataHeight,e,t,a.uvTransform||h,r):i.mat4.create()}cameraFrameUserFacing(){var e;return(null===(e=this.getCurrentCameraInfo())||void 0===e?void 0:e.userFacing)||!1}cameraPoseWithAttitude(e){let t=p(this.getCurrentCameraInfo(),this._client.pipeline_camera_frame_camera_attitude(this._impl));if(e){let e=i.mat4.create();i.mat4.fromScaling(e,[-1,1,1]),i.mat4.multiply(t,e,t),i.mat4.multiply(t,t,e)}return i.mat4.invert(t,t),t}videoFrameFromWorker(e){let t=this.nextCameraToken++;const r=_.getCameraSource(e.source);r&&(this.cameraTokens.set(t,{dataWidth:e.w,dataHeight:e.h,texture:void 0,frame:e.d,userFacing:e.userFacing,uvTransform:e.uvTransform,cameraModel:e.cameraModel,cameraToDevice:e.cameraToDevice,cameraSource:r}),this.cleanOldFrames())}imageBitmapFromWorker(e){let t=this.cameraTokens.get(e.tokenId);t&&(t.dataWidth=e.dataWidth,t.dataHeight=e.dataHeight,t.frame=e.frame,t.userFacing=e.userFacing,t.uvTransform=e.uvTransform,this.tokensInFlight--,this.cleanOldFrames())}uploadGL(){var e,t;let r=this.getCurrentCameraInfo();null===(t=null===(e=null==r?void 0:r.cameraSource)||void 0===e?void 0:e.uploadGL)||void 0===t||t.call(e,r)}registerToken(e){let t=this.nextCameraToken++;return this.cameraTokens.set(t,e),this.tokensInFlight++,t}processGL(){this.glContext?this.currentCameraSource&&(this.tokensInFlight>0?this.currentCameraSource.getFrame(!0):this.currentCameraSource.getFrame(!1)):f.zcerr("no GL context for camera frames - please call pipeline_gl_context_set")}motionAccelerometerSubmit(e,t,r,n){var i;this._sequenceRecordDeviceAttitudeMatrices||null===(i=this._sequenceRecorder)||void 0===i||i.appendAccelerometer(e,t,r,n),this._client.pipeline_motion_accelerometer_submit(this._impl,e,t,r,n)}motionRotationRateSubmit(e,t,r,n){var i;this._sequenceRecordDeviceAttitudeMatrices||null===(i=this._sequenceRecorder)||void 0===i||i.appendRotationRate(e,t,r,n),this._client.pipeline_motion_rotation_rate_submit(this._impl,e,t,r,n)}motionAttitudeSubmit(e,t,r,n){var i;this._sequenceRecordDeviceAttitudeMatrices||null===(i=this._sequenceRecorder)||void 0===i||i.appendAttitude(e,t,r,n),this._client.pipeline_motion_attitude_submit(this._impl,e,t,r,n)}motionAttitudeMatrix(e){this._client.pipeline_motion_attitude_matrix_submit(this._impl,e)}sendCameraStreamToWorker(e,t,r){let n={t:"streamC2S",p:this._impl,s:t,userFacing:r,source:e};this._mgr.postOutgoingMessage(n,[n.s])}sendCameraToScreenRotationToWorker(e){let t={p:this._impl,t:"cameraToScreenC2S",r:e};this._mgr.postOutgoingMessage(t,[])}sendImageBitmapToWorker(e,t,r,n,i,a){let o={p:this._impl,t:"imageBitmapC2S",i:e,r:t,tokenId:n,userFacing:r,cameraModel:i,cameraToDevice:a};this._mgr.postOutgoingMessage(o,[e])}sendDataToWorker(e,t,r,n,i,a,o){let s={d:e,p:this._impl,width:r,height:n,token:t,userFacing:i,c2d:a,cm:o,t:"cameraFrameC2S"};this._mgr.postOutgoingMessage(s,[e])}}function p(e,t){let r=!1;r=!!e&&e.userFacing;let n=i.mat4.create();return i.mat4.fromRotation(n,a.cameraRotationForScreenOrientation(r)*Math.PI/180,[0,0,1]),i.mat4.multiply(n,n,t),n}t.Pipeline=m,t.applyScreenCounterRotation=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.profile=t.EmbeddedVideoImplementation=void 0;const n=r(11);!function(e){e[e.OBJECT_URL=0]="OBJECT_URL",e[e.SRC_OBJECT=1]="SRC_OBJECT"}(t.EmbeddedVideoImplementation||(t.EmbeddedVideoImplementation={})),t.profile={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=t.profile,window.location.href.indexOf("_mstppipeline")>=0&&(console.log("Configuring for MSTP camera pipeline (if supported)"),t.profile.preferMediaStreamTrackProcessorCamera=!0),window.location.href.indexOf("_imagebitmappipeline")>=0&&(console.log("Configuring for ImageBitmap camera pipeline (if supported)"),t.profile.preferImageBitmapCamera=!0));let i=new n.UAParser,a=(i.getOS().name||"unknown").toLowerCase(),o=(i.getEngine().name||"unknown").toLowerCase();function s(){let e=i.getOS().version;if(e){let r=e.split(".");if(r.length>=2){const e=parseInt(r[0]),n=parseInt(r[1]);(e<11||11===e&&n<3)&&(t.profile.blacklisted=!0),(e<12||12===e&&n<2)&&(t.profile.videoElementInDOM=!0),(12===e&&n>=2||e>=13)&&(t.profile.showGyroPermissionsWarningIfNecessary=!0),e>=13&&(t.profile.showSafariPermissionsResetIfNecessary=!0),(e>=12&&n>1||e>=13)&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&navigator.mediaDevices.getSupportedConstraints().frameRate&&(t.profile.requestHighFrameRate=!0,e<14&&(t.profile.videoHeight=360,t.profile.dataHeight=180))}}}"webkit"===o&&"ios"!==a&&(t.profile.deviceMotionMutliplier=1,"undefined"!=typeof window&&void 0!==window.orientation&&s()),"webkit"===o&&"ios"===a&&(t.profile.deviceMotionMutliplier=1,s())},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.linkProgram=t.compileShader=void 0,t.compileShader=function(e,t,r){let n=e.createShader(t);if(!n)throw new Error("Unable to create shader");e.shaderSource(n,r),e.compileShader(n);let i=e.getShaderInfoLog(n);if(i&&i.trim().length>0)throw new Error("Shader compile error: "+i);return n},t.linkProgram=function(e,t){e.linkProgram(t);let r=e.getProgramInfoLog(t);if(r&&r.trim().length>0)throw new Error("Unable to link: "+r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cameraRotationForScreenOrientation=t.projectionMatrix=void 0;const n=r(1);function i(e){if(window.screen.orientation)switch(window.screen.orientation.type){case"portrait-primary":return e?90:270;case"landscape-secondary":return 180;case"portrait-secondary":return e?270:90;default:return 0}else if(void 0!==window.orientation)switch(window.orientation){case 0:return e?90:270;case 90:return 0;case 180:return e?270:90;case-90:return 180}return 0}t.projectionMatrix=function(e,t,r,a=.01,o=100){let s=2*e[2],u=2*e[3],c=n.mat4.create();n.mat4.frustum(c,a*(-.5-e[2])/e[0],a*(s-.5-e[2])/e[0],a*(u-.5-e[3])/e[1],a*(-.5-e[3])/e[1],a,o),c[4]*=-1,c[5]*=-1,c[6]*=-1,c[7]*=-1;let f=n.mat4.create();n.mat4.fromScaling(f,[.5*s,.5*u,1]),n.mat4.multiply(c,f,c),n.mat4.fromRotation(f,i(!1)*Math.PI/180,[0,0,1]),n.mat4.multiply(c,f,c);let d=n.vec3.create();d[0]=s,d[1]=u,d[2]=0,n.vec3.transformMat4(d,d,f);let _=Math.abs(d[0]),l=Math.abs(d[1]),h=1;return h=_/t>l/r?r/l:t/_,n.mat4.fromScaling(f,[h,h,1]),n.mat4.multiply(c,f,c),n.mat4.fromScaling(f,[2/t,2/r,1]),n.mat4.multiply(c,f,c),n.mat4.fromRotation(f,i(!1)*Math.PI/-180,[0,0,1]),n.mat4.multiply(c,c,f),c},t.cameraRotationForScreenOrientation=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.frame_pixel_format_t=t.log_level_t=t.instant_world_tracker_transform_orientation_t=t.face_landmark_name_t=t.barcode_format_t=void 0,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"}(t.barcode_format_t||(t.barcode_format_t={})),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"}(t.face_landmark_name_t||(t.face_landmark_name_t={})),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"}(t.instant_world_tracker_transform_orientation_t||(t.instant_world_tracker_transform_orientation_t={})),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"}(t.log_level_t||(t.log_level_t={})),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"}(t.frame_pixel_format_t||(t.frame_pixel_format_t={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCameraSource=t.deleteCameraSource=t.getCameraSource=t.setCameraSourceId=t.getNextCameraSourceId=void 0;const n=r(14),i=r(34),a=r(0),o=r(35),s=r(3);let u=1,c=new Map;function f(){return u++}function d(e,t){c.set(e,t)}t.getNextCameraSourceId=f,t.setCameraSourceId=d,t.getCameraSource=function(e){return c.get(e)},t.deleteCameraSource=function(e){c.delete(e)},t.createCameraSource=function(e,t){let r=f();return s.profile.preferMediaStreamTrackProcessorCamera&&"MediaStreamTrackProcessor"in window&&"MediaStreamTrackGenerator"in window?d(r,new o.MSTPCameraSource(r,e,t)):s.profile.preferImageBitmapCamera&&"undefined"!=typeof OffscreenCanvas?d(r,new i.ImageBitmapCameraSource(r,e,t)):d(r,new n.CameraSource(r,e,t)),a.zcout("camera_source_t initialized"),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Source=void 0;t.Source=class{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.drawPlane=t.disposeDrawPlane=void 0;const n=r(4);let i,a,o,s={};function u(e){if(o)return o;if(o=e.createBuffer(),!o)throw new Error("Unable to create buffer object");return e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,1,0,0,1,1,1,0]),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,null),o}t.disposeDrawPlane=function(){i=void 0,a=void 0,o=void 0,s={}},t.drawPlane=function(e,t,r,n,i){let o=c(e),f=function(e){if(a)return a;if(a=e.createBuffer(),!a)throw new Error("Unable to create buffer object");return e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-.5,.125,0,-.5,-.125,0,.5,.125,0,.5,-.125,0]),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,null),a}(e),d=u(e);e.disable(e.DEPTH_TEST),e.useProgram(o.prog),e.uniformMatrix4fv(o.unif_proj,!1,t),e.uniformMatrix4fv(o.unif_camera,!1,r),e.uniformMatrix4fv(o.unif_matrix,!1,n),e.bindBuffer(e.ARRAY_BUFFER,f),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,function(e,t){if(s[t])return s[t];let r=e.createTexture();if(!r)throw new Error("Unable to create texture");s[t]=r,e.bindTexture(e.TEXTURE_2D,r);const n=e.RGBA,i=e.RGBA,a=e.UNSIGNED_BYTE,o=new Uint8Array([0,0,255,255]);e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,n,1,1,0,i,a,o);const u=new Image;return u.onload=function(){e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,n,i,a,u),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)},u.src=t,r}(e,i)),e.uniform1i(o.unif_skinSampler,0),e.vertexAttribPointer(o.attr_position,3,e.FLOAT,!1,12,0),e.enableVertexAttribArray(o.attr_position),e.bindBuffer(e.ARRAY_BUFFER,d),e.vertexAttribPointer(o.attr_textureCoord,2,e.FLOAT,!1,8,0),e.enableVertexAttribArray(o.attr_textureCoord),e.drawArrays(e.TRIANGLE_STRIP,0,4),e.disableVertexAttribArray(o.attr_position),e.bindBuffer(e.ARRAY_BUFFER,null)};function c(e){if(i)return i;let t=e.createProgram();if(!t)throw new Error("Unable to create program");let r=n.compileShader(e,e.VERTEX_SHADER,"\n#ifndef GL_ES\n#define highp\n#define mediump\n#define lowp\n#endif\n\nuniform mat4 projMatrix;\nuniform mat4 cameraMatrix;\nuniform mat4 modelViewMatrix;\nattribute vec4 position;\nattribute vec2 textureCoord;\n\nvarying highp vec2 vTextureCoord;\n\nvoid main()\n{\n gl_Position = projMatrix * cameraMatrix * modelViewMatrix * position;\n vTextureCoord = textureCoord;\n}"),a=n.compileShader(e,e.FRAGMENT_SHADER,"\n#define highp mediump\n#ifdef GL_ES\n // define default precision for float, vec, mat.\n precision highp float;\n#else\n#define highp\n#define mediump\n#define lowp\n#endif\n\nvarying highp vec2 vTextureCoord;\nuniform sampler2D skinSampler;\n\nvoid main()\n{\n gl_FragColor = texture2D(skinSampler, vTextureCoord);\n}");e.attachShader(t,r),e.attachShader(t,a),n.linkProgram(e,t);let o=e.getUniformLocation(t,"projMatrix");if(!o)throw new Error("Unable to get uniform location projMatrix");let s=e.getUniformLocation(t,"modelViewMatrix");if(!s)throw new Error("Unable to get uniform location modelViewMatrix");let u=e.getUniformLocation(t,"cameraMatrix");if(!u)throw new Error("Unable to get uniform location cameraMatrix");let c=e.getUniformLocation(t,"skinSampler");if(!c)throw new Error("Unable to get uniform location skinSampler");return i={prog:t,unif_matrix:s,unif_proj:o,unif_camera:u,unif_skinSampler:c,attr_position:e.getAttribLocation(t,"position"),attr_textureCoord:e.getAttribLocation(t,"textureCoord")},i}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event5=t.Event3=t.Event2=t.Event1=t.Event=void 0;t.Event=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(){for(var e=0,t=this._funcs.length;e<t;e++)this._funcs[e]()}};t.Event1=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e){for(var t=0,r=this._funcs.length;t<r;t++)this._funcs[t](e)}};t.Event2=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t){for(var r=0,n=this._funcs.length;r<n;r++)this._funcs[r](e,t)}};t.Event3=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t,r){for(var n=0,i=this._funcs.length;n<i;n++)this._funcs[n](e,t,r)}};t.Event5=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t,r,n,i){for(var a=0,o=this._funcs.length;a<o;a++)this._funcs[a](e,t,r,n,i)}}},function(e,t,r){var n;!function(i,a){"use strict";var o="model",s="name",u="type",c="vendor",f="version",d="mobile",_="tablet",l="smarttv",h=function(e){var t={};for(var r in e)t[e[r].toUpperCase()]=e[r];return t},m=function(e,t){return"string"==typeof e&&-1!==p(t).indexOf(p(e))},p=function(e){return e.toLowerCase()},b=function(e,t){if("string"==typeof e)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),void 0===t?e:e.substring(0,255)},v=function(e,t){for(var r,n,i,a,o,s,u=0;u<t.length&&!o;){var c=t[u],f=t[u+1];for(r=n=0;r<c.length&&!o;)if(o=c[r++].exec(e))for(i=0;i<f.length;i++)s=o[++n],"object"==typeof(a=f[i])&&a.length>0?2==a.length?"function"==typeof a[1]?this[a[0]]=a[1].call(this,s):this[a[0]]=a[1]:3==a.length?"function"!=typeof a[1]||a[1].exec&&a[1].test?this[a[0]]=s?s.replace(a[1],a[2]):void 0:this[a[0]]=s?a[1].call(this,s,a[2]):void 0:4==a.length&&(this[a[0]]=s?a[3].call(this,s.replace(a[1],a[2])):void 0):this[a]=s||void 0;u+=2}},g=function(e,t){for(var r in t)if("object"==typeof t[r]&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(m(t[r][n],e))return"?"===r?void 0:r}else if(m(t[r],e))return"?"===r?void 0:r;return e},w={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,f],[/opios[\/ ]+([\w\.]+)/i],[f,[s,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[f,[s,"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],[s,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[s,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[f,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[f,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],f],[/\bfocus\/([\w\.]+)/i],[f,[s,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[f,[s,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[s,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[s,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[f,[s,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],f],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,"Facebook"],f],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[s,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,f],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[f,[s,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[f,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[f,g,{"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],[s,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[s,"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],[s,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",p]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",p]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",p]]],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],[o,[c,"Samsung"],[u,_]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[o,[c,"Samsung"],[u,d]],[/\((ip(?:hone|od)[\w ]*);/i],[o,[c,"Apple"],[u,d]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[c,"Apple"],[u,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[o,[c,"Huawei"],[u,_]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[o,[c,"Huawei"],[u,d]],[/\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],[[o,/_/g," "],[c,"Xiaomi"],[u,d]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[o,/_/g," "],[c,"Xiaomi"],[u,_]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[o,[c,"OPPO"],[u,d]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[c,"Vivo"],[u,d]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[o,[c,"Realme"],[u,d]],[/\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],[o,[c,"Motorola"],[u,d]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[c,"Motorola"],[u,_]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[c,"LG"],[u,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[c,"LG"],[u,d]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[o,[c,"Lenovo"],[u,_]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[o,/_/g," "],[c,"Nokia"],[u,d]],[/(pixel c)\b/i],[o,[c,"Google"],[u,_]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[c,"Google"],[u,d]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[c,"Sony"],[u,d]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[c,"Sony"],[u,_]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[c,"OnePlus"],[u,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[c,"Amazon"],[u,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[c,"Amazon"],[u,d]],[/(playbook);[-\w\),; ]+(rim)/i],[o,c,[u,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[c,"BlackBerry"],[u,d]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[c,"ASUS"],[u,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[c,"ASUS"],[u,d]],[/(nexus 9)/i],[o,[c,"HTC"],[u,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[c,[o,/_/g," "],[u,d]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[c,"Acer"],[u,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[c,"Meizu"],[u,d]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[c,"Sharp"],[u,d]],[/(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],[c,o,[u,d]],[/(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],[c,o,[u,_]],[/(surface duo)/i],[o,[c,"Microsoft"],[u,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[c,"Fairphone"],[u,d]],[/(u304aa)/i],[o,[c,"AT&T"],[u,d]],[/\bsie-(\w*)/i],[o,[c,"Siemens"],[u,d]],[/\b(rct\w+) b/i],[o,[c,"RCA"],[u,_]],[/\b(venue[\d ]{2,7}) b/i],[o,[c,"Dell"],[u,_]],[/\b(q(?:mv|ta)\w+) b/i],[o,[c,"Verizon"],[u,_]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[c,"Barnes & Noble"],[u,_]],[/\b(tm\d{3}\w+) b/i],[o,[c,"NuVision"],[u,_]],[/\b(k88) b/i],[o,[c,"ZTE"],[u,_]],[/\b(nx\d{3}j) b/i],[o,[c,"ZTE"],[u,d]],[/\b(gen\d{3}) b.+49h/i],[o,[c,"Swiss"],[u,d]],[/\b(zur\d{3}) b/i],[o,[c,"Swiss"],[u,_]],[/\b((zeki)?tb.*\b) b/i],[o,[c,"Zeki"],[u,_]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],o,[u,_]],[/\b(ns-?\w{0,9}) b/i],[o,[c,"Insignia"],[u,_]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[c,"NextBook"],[u,_]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],o,[u,d]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],o,[u,d]],[/\b(ph-1) /i],[o,[c,"Essential"],[u,d]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[c,"Envizen"],[u,_]],[/\b(trio[-\w\. ]+) b/i],[o,[c,"MachSpeed"],[u,_]],[/\btu_(1491) b/i],[o,[c,"Rotor"],[u,_]],[/(shield[\w ]+) b/i],[o,[c,"Nvidia"],[u,_]],[/(sprint) (\w+)/i],[c,o,[u,d]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[c,"Microsoft"],[u,d]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[c,"Zebra"],[u,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[c,"Zebra"],[u,d]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,o,[u,"console"]],[/droid.+; (shield) bui/i],[o,[c,"Nvidia"],[u,"console"]],[/(playstation [345portablevi]+)/i],[o,[c,"Sony"],[u,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[c,"Microsoft"],[u,"console"]],[/smart-tv.+(samsung)/i],[c,[u,l]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[c,"Samsung"],[u,l]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,"LG"],[u,l]],[/(apple) ?tv/i],[c,[o,"Apple TV"],[u,l]],[/crkey/i],[[o,"Chromecast"],[c,"Google"],[u,l]],[/droid.+aft(\w)( bui|\))/i],[o,[c,"Amazon"],[u,l]],[/\(dtv[\);].+(aquos)/i],[o,[c,"Sharp"],[u,l]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[c,b],[o,b],[u,l]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,l]],[/((pebble))app/i],[c,o,[u,"wearable"]],[/droid.+; (glass) \d/i],[o,[c,"Google"],[u,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[o,[c,"Zebra"],[u,"wearable"]],[/(quest( 2)?)/i],[o,[c,"Facebook"],[u,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[u,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[o,[u,d]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[u,_]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,_]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[u,d]],[/(android[-\w\. ]{0,9});.+buil/i],[o,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[s,"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],[s,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[f,g,w]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[f,g,w]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[f,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,f],[/\(bb(10);/i],[f,[s,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[f,[s,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[s,"Chromium OS"],f],[/(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],[s,f],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[s,f]]},M=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof M))return new M(e,t).getResult();var r=e||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),n=t?function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}(y,t):y;return this.getBrowser=function(){var e,t={};return t[s]=void 0,t[f]=void 0,v.call(t,r,n.browser),t.major="string"==typeof(e=t.version)?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0,t},this.getCPU=function(){var e={architecture:void 0};return v.call(e,r,n.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return v.call(e,r,n.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return v.call(e,r,n.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return v.call(e,r,n.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="string"==typeof e&&e.length>255?b(e,255):e,this},this.setUA(r),this};M.VERSION="0.7.30",M.BROWSER=h([s,f,"major"]),M.CPU=h(["architecture"]),M.DEVICE=h([o,c,u,"console",d,l,_,"wearable","embedded"]),M.ENGINE=M.OS=h([s,f]),void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=M),t.UAParser=M):r(28)?void 0===(n=function(){return M}.call(t,r,t,e))||(e.exports=n):void 0!==i&&(i.UAParser=M);var x=void 0!==i&&(i.jQuery||i.Zepto);if(x&&!x.ua){var E=new M;x.ua=E.getResult(),x.ua.get=function(){return E.getUA()},x.ua.set=function(e){E.setUA(e);var t=E.getResult();for(var r in t)x.ua[r]=t[r]}}}("object"==typeof window?window:this)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log_level_t=t.instant_world_tracker_transform_orientation_t=t.frame_pixel_format_t=t.face_landmark_name_t=t.barcode_format_t=void 0;var n=r(6);Object.defineProperty(t,"barcode_format_t",{enumerable:!0,get:function(){return n.barcode_format_t}});var i=r(6);Object.defineProperty(t,"face_landmark_name_t",{enumerable:!0,get:function(){return i.face_landmark_name_t}});var a=r(6);Object.defineProperty(t,"frame_pixel_format_t",{enumerable:!0,get:function(){return a.frame_pixel_format_t}});var o=r(6);Object.defineProperty(t,"instant_world_tracker_transform_orientation_t",{enumerable:!0,get:function(){return o.instant_world_tracker_transform_orientation_t}});var s=r(6);Object.defineProperty(t,"log_level_t",{enumerable:!0,get:function(){return s.log_level_t}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceDecoder=t.SequenceRecorder=t.SequenceRecorderPacketType=void 0;const n=r(0);var i;!function(e){e[e.CAMERA_FRAME=0]="CAMERA_FRAME",e[e.ACCELEROMETER=1]="ACCELEROMETER",e[e.ROTATION_RATE=2]="ROTATION_RATE",e[e.ATTITUDE=3]="ATTITUDE",e[e.ATTITUDE_MATRIX=4]="ATTITUDE_MATRIX"}(i=t.SequenceRecorderPacketType||(t.SequenceRecorderPacketType={}));class a{constructor(e){this._insertionByte=0,this._numberPackets=0,this._started=!1,this._hasLoggedUnsuppored=!1,this._data=new ArrayBuffer(this._estimatedSize(e,320,240)),this._dataView=new DataView(this._data),this._dataUint8=new Uint8Array(this._data),this._dataFloat32=new Float32Array(this._data)}_estimatedSize(e,t,r){return a.headerSizeBytes+(a.psbPacketType+a.cameraPacketSizeBytes+t*r)*e}start(){this._started=!0,this._insertionByte=0,this._numberPackets=0,this._growArrayBuffer(a.headerSizeBytes);let e=(new TextEncoder).encode("UAR1");this._dataUint8.set(e),this._dataView.setUint32(4,0,!0),this._insertionByte+=8}stop(){this._started=!1;let e=this._data.slice(0,this._insertionByte);this._data=e,this._dataUint8=new Uint8Array(this._data),this._dataFloat32=new Float32Array(this._data),this._dataView=new DataView(this._data)}data(){return this._dataUint8}appendCameraFrame(e){if(!this._started)return;if(!e.data){if(this._hasLoggedUnsuppored)return;return this._hasLoggedUnsuppored=!0,void n.zcerr("Unable to record frames from this camera source")}if(e.data.byteLength!==e.dataWidth*e.dataHeight)return void n.zcerr("Unable to record frame to sequence: greyscale array doesn't match dimensions");let t=a.psbPacketType+a.cameraPacketSizeBytes+e.dataWidth*e.dataHeight;this._growArrayBuffer(t),this._dataView.setUint32(this._insertionByte,i.CAMERA_FRAME,!0),this._insertionByte+=a.psbPacketType,this._dataView.setUint32(this._insertionByte,e.dataWidth,!0),this._insertionByte+=a.psbCameraFrameWidth,this._dataView.setUint32(this._insertionByte,e.dataHeight,!0),this._insertionByte+=a.psbCameraFrameHeight,this._dataFloat32.set(e.cameraToDevice,this._insertionByte/4),this._insertionByte+=a.psbCameraToDeviceTransform,this._dataFloat32.set(e.cameraModel,this._insertionByte/4),this._insertionByte+=a.psbCameraModel,this._dataView.setUint32(this._insertionByte,e.userFacing?1:0,!0),this._insertionByte+=a.psbFlags,this._dataUint8.set(new Uint8Array(e.data),this._insertionByte),this._insertionByte+=e.data.byteLength,this._numberPackets++,this._dataView.setUint32(4,this._numberPackets,!0)}appendAccelerometer(e,t,r,n){this._appendTimestampedVec3(i.ACCELEROMETER,e,t,r,n)}appendRotationRate(e,t,r,n){this._appendTimestampedVec3(i.ROTATION_RATE,e,t,r,n)}appendAttitude(e,t,r,n){this._appendTimestampedVec3(i.ATTITUDE,e,t,r,n)}_appendTimestampedVec3(e,t,r,n,i){if(!this._started)return;let o=a.psbPacketType+a.accelerometerPacketSizeBytes;this._growArrayBuffer(o),this._dataView.setUint32(this._insertionByte,e,!0),this._insertionByte+=a.psbPacketType,this._dataView.setUint32(this._insertionByte,t,!0),this._insertionByte+=4,this._dataView.setFloat32(this._insertionByte,r,!0),this._insertionByte+=4,this._dataView.setFloat32(this._insertionByte,n,!0),this._insertionByte+=4,this._dataView.setFloat32(this._insertionByte,i,!0),this._insertionByte+=4,this._numberPackets++,this._dataView.setUint32(4,this._numberPackets,!0)}appendAttitudeMatrix(e){if(!this._started)return;let t=a.psbPacketType+a.attitudeMatrixPacketSizeBytes;this._growArrayBuffer(t),this._dataView.setUint32(this._insertionByte,i.ATTITUDE_MATRIX,!0),this._insertionByte+=a.psbPacketType,this._dataFloat32.set(e,this._insertionByte/4),this._insertionByte+=a.attitudeMatrixPacketSizeBytes,this._numberPackets++,this._dataView.setUint32(4,this._numberPackets,!0)}_growArrayBuffer(e){for(;this._insertionByte+e>this._data.byteLength;){let e=Math.max(2*this._data.byteLength,this._estimatedSize(50,320,240)),t=new ArrayBuffer(e),r=new Uint8Array(t);r.set(this._dataUint8),this._data=t,this._dataUint8=r,this._dataFloat32=new Float32Array(this._data),this._dataView=new DataView(this._data)}}}t.SequenceRecorder=a,a.headerSizeBytes=8,a.psbPacketType=4,a.psbCameraFrameWidth=4,a.psbCameraFrameHeight=4,a.psbFlags=4,a.psbCameraToDeviceTransform=64,a.psbCameraModel=24,a.cameraPacketSizeBytes=a.psbCameraFrameWidth+a.psbCameraFrameHeight+a.psbCameraToDeviceTransform+a.psbCameraModel+a.psbFlags,a.accelerometerPacketSizeBytes=16,a.rotationRatePacketSizeBytes=16,a.attitudePacketSizeBytes=16,a.attitudeMatrixPacketSizeBytes=64;t.SequenceDecoder=class{constructor(e){this._data=e,this.dataByPacket=new Map,this.dataByCameraFrame=new Map,this.numberPackets=0,this.numberCameraFrames=0,this.numberAccelerometerPackets=0,this.numberRotationRatePackets=0,this.numberAttitudePackets=0,this.numberAttitudeMatrixPackets=0;let t=new TextDecoder,r="";try{r=t.decode(this._data.slice(0,4))}catch(e){throw new Error("Unable to decode header - perhaps this isn't a sequence file?")}if("UAR1"!==r)throw new Error("Invalid - perhaps this isn't a sequence file: "+r);let n=0,o=new DataView(this._data);this.numberPackets=o.getUint32(4,!0),n+=a.headerSizeBytes;for(let e=0;e<this.numberPackets;e++){let t=o.getUint32(n,!0);switch(n+=a.psbPacketType,t){case i.CAMERA_FRAME:{let t=o.getUint32(n,!0);n+=a.psbCameraFrameWidth;let r=o.getUint32(n,!0);n+=a.psbCameraFrameHeight;let s=new Float32Array(this._data,n,a.psbCameraToDeviceTransform/4);n+=a.psbCameraToDeviceTransform;let u=new Float32Array(this._data,n,a.psbCameraModel/4);n+=a.psbCameraModel;let c=o.getUint32(n,!0);n+=a.psbFlags;let f=1===c,d=new Uint8Array(this._data,n,t*r);n+=t*r;let _={type:i.CAMERA_FRAME,width:t,height:r,cameraToDevice:s,cameraModel:u,userFacing:f,greyscale:d};this.dataByPacket.set(e,_),this.dataByCameraFrame.set(this.numberCameraFrames,_),this.numberCameraFrames++;break}case i.ACCELEROMETER:{let t=o.getUint32(n,!0);n+=4;let r=o.getFloat32(n,!0);n+=4;let a=o.getFloat32(n,!0);n+=4;let s=o.getFloat32(n,!0);n+=4,this.dataByPacket.set(e,{type:i.ACCELEROMETER,t:t,x:r,y:a,z:s}),this.numberAccelerometerPackets++;break}case i.ROTATION_RATE:{let t=o.getUint32(n,!0);n+=4;let r=o.getFloat32(n,!0);n+=4;let a=o.getFloat32(n,!0);n+=4;let s=o.getFloat32(n,!0);n+=4,this.dataByPacket.set(e,{type:i.ROTATION_RATE,t:t,x:r,y:a,z:s}),this.numberRotationRatePackets++;break}case i.ATTITUDE:{let t=o.getUint32(n,!0);n+=4;let r=o.getFloat32(n,!0);n+=4;let a=o.getFloat32(n,!0);n+=4;let s=o.getFloat32(n,!0);n+=4,this.dataByPacket.set(e,{type:i.ATTITUDE,t:t,x:r,y:a,z:s}),this.numberAttitudePackets++;break}case i.ATTITUDE_MATRIX:{let t=new Float32Array(this._data,n,a.attitudeMatrixPacketSizeBytes/4);n+=a.attitudeMatrixPacketSizeBytes,this.dataByPacket.set(e,{type:i.ATTITUDE_MATRIX,attitude:t}),this.numberAttitudeMatrixPackets++;break}}}}}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CameraSource=void 0;const i=r(15),a=r(3),o=r(2),s=r(5),u=r(0),c=r(7);let f=document.createElement("video");f.setAttribute("playsinline",""),f.setAttribute("webkit-playsinline",""),a.profile.videoElementInDOM&&(f.style.width="0px",f.style.height="0px",document.body.appendChild(f));class d extends i.HTMLElementSource{constructor(e,t,r){super(f,t),this._impl=e,this._deviceId=r,this._currentStream=null,this._activeDeviceId=null,this._hasStartedOrientation=!1,this._deviceMotionListener=e=>{let t=o.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.accelerationIncludingGravity&&null!==e.accelerationIncludingGravity.x&&null!==e.accelerationIncludingGravity.y&&null!==e.accelerationIncludingGravity.z&&t.motionAccelerometerSubmit(r,e.accelerationIncludingGravity.x*a.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.y*a.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.z*a.profile.deviceMotionMutliplier),null===e.rotationRate||null===e.rotationRate.alpha||null===e.rotationRate.beta||null===e.rotationRate.gamma||this._hasStartedOrientation?this._hasStartedOrientation||this._startDeviceOrientation():(e.timeStamp,t.motionRotationRateSubmit(r,e.rotationRate.alpha*Math.PI/-180,e.rotationRate.beta*Math.PI/-180,e.rotationRate.gamma*Math.PI/-180))}}destroy(){c.deleteCameraSource(this._impl),super.destroy()}_stop(){if(!this._currentStream)return;this._currentStream.getTracks().forEach(e=>e.stop()),this._currentStream=null}pause(){super.pause(),this._stopDeviceMotion(),this._syncCamera()}start(){super.start(),this._startDeviceMotion(),this._syncCamera()}_getConstraints(){return n(this,void 0,void 0,(function*(){let e,t;this._deviceId!==d.DEFAULT_DEVICE_ID&&this._deviceId!==d.USER_DEFAULT_DEVICE_ID?e=this._deviceId:t=this._deviceId===d.DEFAULT_DEVICE_ID?"environment":"user";let r={audio:!1,video:{facingMode:t,width:a.profile.videoWidth,height:a.profile.videoHeight,frameRate:a.profile.requestHighFrameRate?60:void 0,deviceId:e}};if(e)return r;if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return r;let n=yield navigator.mediaDevices.enumerateDevices(),i=!1;return n=n.filter(e=>{if("videoinput"!==e.kind)return!1;if(e.getCapabilities){i=!0;let r=e.getCapabilities();if(r&&r.facingMode&&r.facingMode.indexOf("user"===t?"user":"environment")<0)return!1}return!0}),i&&0!==n.length?("object"==typeof r.video&&(u.zcout("choosing device ID",n[n.length-1].deviceId),r.video.deviceId=n[n.length-1].deviceId),r):r}))}getFrame(e){this._cameraToScreenRotation=s.cameraRotationForScreenOrientation(!1),super.getFrame(e)}_getUserMedia(){return n(this,void 0,void 0,(function*(){let e=yield this._getConstraints();return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?yield navigator.mediaDevices.getUserMedia(e):yield new Promise((t,r)=>{navigator.getUserMedia(e,t,r)})}))}_syncCamera(){return n(this,void 0,void 0,(function*(){if(this._currentStream&&this._isPaused)this._stop();else if(this._currentStream&&this._activeDeviceId!==this._deviceId&&this._stop(),!this._isPaused){if(this._activeDeviceId=this._deviceId,this._currentStream=yield this._getUserMedia(),this._isPaused)return void(yield this._syncCamera());if(this._isUserFacing=!1,this._currentStream){let e=this._currentStream.getVideoTracks();e.length>0&&(this._isUserFacing="user"===e[0].getSettings().facingMode)}if(!(this._video instanceof HTMLVideoElement))return;this._video.src="",this._video.loop=!1,this._video.muted=!0,this._video.srcObject=this._currentStream,this._video.play()}}))}_startDeviceOrientation(){this._hasStartedOrientation||(this._hasStartedOrientation=!0,this._deviceOrientationListener=e=>{let t=o.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.alpha&&null!==e.beta&&null!==e.gamma&&t.motionAttitudeSubmit(r,e.alpha,e.beta,e.gamma)},window.addEventListener("deviceorientation",this._deviceOrientationListener))}_startDeviceMotion(){window.addEventListener("devicemotion",this._deviceMotionListener,!1)}_stopDeviceMotion(){window.removeEventListener("devicemotion",this._deviceMotionListener),this._deviceOrientationListener&&window.removeEventListener("deviceorientation",this._deviceOrientationListener)}}t.CameraSource=d,d.USER_DEFAULT_DEVICE_ID="Simulated User Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b",d.DEFAULT_DEVICE_ID="Simulated Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLElementSource=void 0;const n=r(2),i=r(8),a=r(3),o=r(1),s=r(0),u=r(33);let c=1,f=new Map;class d extends i.Source{constructor(e,t){super(),this._video=e,this._pipeline=t,this._isPaused=!0,this._hadFrames=!1,this._isUserFacing=!1,this._cameraToScreenRotation=0,this._isUploadFrame=!0,this._cameraToDeviceTransform=o.mat4.create(),this._cameraToDeviceTransformUserFacing=o.mat4.create(),this._cameraModel=new Float32Array([300,300,160,120,0,0]),o.mat4.fromScaling(this._cameraToDeviceTransformUserFacing,[-1,1,-1]);let r=this._video;this._video instanceof HTMLVideoElement?r.addEventListener("loadedmetadata",()=>{this._hadFrames=!0}):this._hadFrames=!0,this._resetGLContext=this._resetGLContext.bind(this);let i=n.Pipeline.get(this._pipeline);i&&i.onGLContextReset.bind(this._resetGLContext)}static createVideoElementSource(e,t){let r=c++;return f.set(r,new d(t,e)),s.zcout("html_element_source_t initialized"),r}static getVideoElementSource(e){return f.get(e)}_resetGLContext(){var e,t;this._currentVideoTexture=void 0,null===(t=null===(e=this._imageProcessor)||void 0===e?void 0:e.resetGLContext)||void 0===t||t.call(e)}destroy(){let e=n.Pipeline.get(this._pipeline);e&&e.onGLContextReset.unbind(this._resetGLContext),this.pause(),this._resetGLContext()}pause(){this._isPaused=!0;let e=n.Pipeline.get(this._pipeline);e&&e.currentCameraSource===this&&(e.currentCameraSource=void 0)}start(){var e;this._isPaused&&(this._isUploadFrame=!0,this._video instanceof HTMLVideoElement&&(this._hadFrames=!1)),this._isPaused=!1;let t=n.Pipeline.get(this._pipeline);t&&t.currentCameraSource!==this&&(null===(e=t.currentCameraSource)||void 0===e||e.pause(),t.currentCameraSource=this)}getFrame(e){let t=n.Pipeline.get(this._pipeline);if(!t)return;let r=t.glContext;if(r&&!this._isPaused&&this._hadFrames)try{let n=this._processFrame(r,this._cameraToScreenRotation,e);if(n){let e=t.registerToken(n);t.sendDataToWorker(n.data||new ArrayBuffer(0),e,n.dataWidth,n.dataHeight,n.userFacing,n.cameraToDevice,n.cameraModel)}}catch(e){console.log("Unable to process frame")}}_processFrame(e,t,r){let i=n.Pipeline.get(this._pipeline);if(!i)return;if(this._imageProcessor||(this._imageProcessor=new u.ImageProcessGL(e)),this._isUploadFrame){if(this._currentVideoTexture||(this._currentVideoTexture=i.getVideoTexture()),!this._currentVideoTexture)return;return this._imageProcessor.uploadFrame(this._currentVideoTexture,this._video,t,this._isUserFacing),void(this._isUploadFrame=!this._isUploadFrame)}if(r||!this._currentVideoTexture)return;this._isUploadFrame=!this._isUploadFrame;let o=a.profile.dataWidth*a.profile.dataHeight,s=i.cameraPixelArrays.pop();for(;s&&s.byteLength!==o;)s=i.cameraPixelArrays.pop();s||(s=new ArrayBuffer(o));let c=this._currentVideoTexture;this._currentVideoTexture=void 0;let f=300*a.profile.dataWidth/320;return this._cameraModel[0]=f,this._cameraModel[1]=f,this._cameraModel[2]=.5*a.profile.dataWidth,this._cameraModel[3]=.5*a.profile.dataHeight,Object.assign(Object.assign({},this._imageProcessor.readFrame(c,s)),{cameraModel:this._cameraModel,cameraSource:this,cameraToDevice:this._isUserFacing?this._cameraToDeviceTransformUserFacing:this._cameraToDeviceTransform})}uploadGL(){}}t.HTMLElementSource=d},function(e,t,r){"use strict";r.r(t),t.default=r.p+"b4f46e148a3b3b5aef90717d8d60e3fc.zbin"},function(e,t,r){"use strict";e.exports=function(e,t,r,n){try{try{var i;try{i=new window.Blob([e])}catch(t){(i=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(e),i=i.getBlob()}var a=window.URL||window.webkitURL,o=a.createObjectURL(i),s=new window[t](o,r);return a.revokeObjectURL(o),s}catch(n){return new window[t]("data:application/javascript,".concat(encodeURIComponent(e)),r)}}catch(e){if(!n)throw Error("Inline worker is not supported");return new window[t](n,r)}}},function(e,t,r){"use strict";if(Object.defineProperty(t,"__esModule",{value:!0}),t.log_level_t=t.instant_world_tracker_transform_orientation_t=t.face_landmark_name_t=t.barcode_format_t=t.initialize=void 0,document.currentScript){const e=new URL(document.currentScript.src);let t=e.toString();if(e.pathname){let e=t.split("/");e.pop(),t=e.join("/")+"/"}r.p=t}const n=r(19),i=r(43);t.initialize=function(){return console.log("Zappar CV v"+i.VERSION),n.initialize()};var a=r(12);Object.defineProperty(t,"barcode_format_t",{enumerable:!0,get:function(){return a.barcode_format_t}}),Object.defineProperty(t,"face_landmark_name_t",{enumerable:!0,get:function(){return a.face_landmark_name_t}}),Object.defineProperty(t,"instant_world_tracker_transform_orientation_t",{enumerable:!0,get:function(){return a.instant_world_tracker_transform_orientation_t}}),Object.defineProperty(t,"log_level_t",{enumerable:!0,get:function(){return a.log_level_t}})},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.initialize=void 0;const i=r(20),a=r(9),o=r(5),s=r(1),u=r(23),c=r(27),f=r(29),d=r(2),_=r(14),l=r(15),h=r(36),m=r(38),p=r(0),b=r(39),v=r(7),g=r(40);let w;t.initialize=function(){if(w)return w;let e=!1;u.launchWorker().then(()=>{p.zcout("Fully loaded"),e=!0});let t=new i.zappar_client(e=>{u.messageManager.postOutgoingMessage({t:"zappar",d:e},[e])});if(window.location.hostname.toLowerCase().indexOf(".zappar.io")>0){let e=window.location.pathname.split("/");e.length>1&&e[1].length>0&&t.impl.analytics_project_id_set(".wiz"+e[1])}return u.messageManager.onIncomingMessage.bind(e=>{var r,n,i,a,o,s,u;switch(e.t){case"zappar":null===(r=d.Pipeline.get(e.p))||void 0===r||r.pendingMessages.push(e.d);break;case"buf":t.serializer.bufferReturn(e.d);break;case"cameraFrameRecycleS2C":{let t=e;null===(i=null===(n=d.Pipeline.get(t.p))||void 0===n?void 0:n.cameraTokenReturn)||void 0===i||i.call(n,e);break}case"videoFrameS2C":{let t=e;null===(o=null===(a=d.Pipeline.get(t.p))||void 0===a?void 0:a.videoFrameFromWorker)||void 0===o||o.call(a,t);break}case"imageBitmapS2C":{let t=e;null===(u=null===(s=d.Pipeline.get(t.p))||void 0===s?void 0:s.imageBitmapFromWorker)||void 0===u||u.call(s,t);break}case"licerr":{let e=document.createElement("div");e.innerHTML="Visit <a href='https://docs.zap.works/universal-ar/licensing/' style='color: white;'>our licensing page</a> to find out about hosting on your own domain.",e.style.position="absolute",e.style.bottom="20px",e.style.width="80%",e.style.backgroundColor="black",e.style.color="white",e.style.borderRadius="10px",e.style.padding="10px",e.style.fontFamily="sans-serif",e.style.textAlign="center",e.style.left="10%",e.style.zIndex=Number.MAX_SAFE_INTEGER.toString();let t=document.createElement("span");t.innerText=" (30)",e.append(t);let r=30;setInterval((function(){r--,r>=0&&(t.innerText=" ("+r.toString()+")")}),1e3),document.body.append(e)}case"gfx":{let e=document.createElement("div");e.innerHTML=g.gfx,e.style.position="absolute",e.style.bottom="20px",e.style.width="250px",e.style.left="50%",e.style.marginLeft="-125px",e.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),e.style.opacity="0",e.style.transition="opacity 0.5s",document.body.append(e),setTimeout((function(){e.style.opacity="1"}),500),setTimeout((function(){e.style.opacity="0"}),3e3),setTimeout((function(){e.remove()}),4e3)}}}),w=Object.assign(Object.assign({},t.impl),{loaded:()=>e,camera_default_device_id:e=>e?_.CameraSource.USER_DEFAULT_DEVICE_ID:_.CameraSource.DEFAULT_DEVICE_ID,camera_source_create:(e,t)=>v.createCameraSource(e,t),camera_source_destroy:e=>{var t;return null===(t=v.getCameraSource(e))||void 0===t?void 0:t.destroy()},camera_source_pause:e=>{var t;return null===(t=v.getCameraSource(e))||void 0===t?void 0:t.pause()},camera_source_start:e=>{var t;return null===(t=v.getCameraSource(e))||void 0===t?void 0:t.start()},pipeline_create:()=>d.Pipeline.create(t.impl,u.messageManager),pipeline_frame_update:e=>{var r;return null===(r=d.Pipeline.get(e))||void 0===r?void 0:r.frameUpdate(t)},pipeline_camera_frame_draw_gl:(e,t,r,n)=>{var i;null===(i=d.Pipeline.get(e))||void 0===i||i.cameraFrameDrawGL(t,r,n)},draw_plane:(e,t,r,n,i)=>{a.drawPlane(e,t,r,n,i)},pipeline_draw_face:(e,t,r,n,i)=>{var a;let o=f.getFaceMesh(i);if(!o)return p.zcwarn("attempting to call draw_face on a destroyed zappar_face_mesh_t"),new Uint16Array;null===(a=d.Pipeline.get(e))||void 0===a||a.drawFace(t,r,n,o)},pipeline_draw_face_project:(e,t,r,n,i,a,o)=>{var s;null===(s=d.Pipeline.get(e))||void 0===s||s.drawFaceProject(t,r,n,i,a,o)},projection_matrix_from_camera_model:o.projectionMatrix,projection_matrix_from_camera_model_ext:o.projectionMatrix,pipeline_process_gl:e=>{var t;return null===(t=d.Pipeline.get(e))||void 0===t?void 0:t.processGL()},pipeline_gl_context_set:(e,t,r)=>{var n;return null===(n=d.Pipeline.get(e))||void 0===n?void 0:n.glContextSet(t,r)},pipeline_gl_context_lost:e=>{var t;return null===(t=d.Pipeline.get(e))||void 0===t?void 0:t.glContextLost()},pipeline_camera_frame_upload_gl:e=>{var t;return null===(t=d.Pipeline.get(e))||void 0===t?void 0:t.uploadGL()},pipeline_camera_frame_texture_gl:e=>{var t;return null===(t=d.Pipeline.get(e))||void 0===t?void 0:t.cameraFrameTexture()},pipeline_camera_frame_texture_matrix:(e,t,r,n)=>{var i;return(null===(i=d.Pipeline.get(e))||void 0===i?void 0:i.cameraFrameTextureMatrix(t,r,n))||s.mat4.create()},pipeline_camera_frame_user_facing:e=>{var t;return(null===(t=d.Pipeline.get(e))||void 0===t?void 0:t.cameraFrameUserFacing())||!1},pipeline_camera_pose_default:()=>s.mat4.create(),pipeline_camera_pose_with_attitude:(e,t)=>{var r;return(null===(r=d.Pipeline.get(e))||void 0===r?void 0:r.cameraPoseWithAttitude(t))||s.mat4.create()},pipeline_camera_pose_with_origin:(e,t)=>{let r=s.mat4.create();return s.mat4.invert(r,t),r},pipeline_sequence_record_clear:e=>{var t;return null===(t=d.Pipeline.get(e))||void 0===t?void 0:t.sequenceRecordClear()},pipeline_sequence_record_start:(e,t)=>{var r;return null===(r=d.Pipeline.get(e))||void 0===r?void 0:r.sequenceRecordStart(t)},pipeline_sequence_record_stop:e=>{var t;return null===(t=d.Pipeline.get(e))||void 0===t?void 0:t.sequenceRecordStop()},pipeline_sequence_record_device_attitude_matrices_set:(e,t)=>{var r;return null===(r=d.Pipeline.get(e))||void 0===r?void 0:r.sequenceRecordDeviceAttitudeMatrices(t)},pipeline_sequence_record_data:e=>{var t;return(null===(t=d.Pipeline.get(e))||void 0===t?void 0:t.sequenceRecordData())||new Uint8Array(0)},pipeline_sequence_record_data_size:e=>{var t;return(null===(t=d.Pipeline.get(e))||void 0===t?void 0:t.sequenceRecordData().byteLength)||0},instant_world_tracker_anchor_pose_camera_relative:(e,r)=>{let n=d.applyScreenCounterRotation(void 0,t.impl.instant_world_tracker_anchor_pose_raw(e));if(r){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(n,e,n),s.mat4.multiply(n,n,e)}return n},instant_world_tracker_anchor_pose:(e,r,n)=>{let i=d.applyScreenCounterRotation(void 0,t.impl.instant_world_tracker_anchor_pose_raw(e));if(n){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(i,e,i),s.mat4.multiply(i,i,e)}return s.mat4.multiply(i,r,i),i},instant_world_tracker_anchor_pose_set_from_camera_offset:(e,r,n,i,a)=>{let u=o.cameraRotationForScreenOrientation(!1)*Math.PI/180,c=s.mat4.create();s.mat4.fromRotation(c,-u,[0,0,1]);let f=s.vec3.create();s.vec3.transformMat4(f,[r,n,i],c),t.impl.instant_world_tracker_anchor_pose_set_from_camera_offset_raw(e,f[0],f[1],f[2],a)},image_tracker_anchor_pose_camera_relative:(e,r,n)=>{let i=d.applyScreenCounterRotation(void 0,t.impl.image_tracker_anchor_pose_raw(e,r));if(n){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(i,e,i),s.mat4.multiply(i,i,e)}return i},image_tracker_anchor_pose:(e,r,n,i)=>{let a=d.applyScreenCounterRotation(void 0,t.impl.image_tracker_anchor_pose_raw(e,r));if(i){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(a,e,a),s.mat4.multiply(a,a,e)}return s.mat4.multiply(a,n,a),a},face_tracker_anchor_pose_camera_relative:(e,r,n)=>{let i=d.applyScreenCounterRotation(void 0,t.impl.face_tracker_anchor_pose_raw(e,r));if(n){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(i,e,i),s.mat4.multiply(i,i,e)}return i},face_tracker_anchor_pose:(e,r,n,i)=>{let a=d.applyScreenCounterRotation(void 0,t.impl.face_tracker_anchor_pose_raw(e,r));if(i){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(a,e,a),s.mat4.multiply(a,a,e)}return s.mat4.multiply(a,n,a),a},face_tracker_model_load_default:e=>n(this,void 0,void 0,(function*(){yield function(e){return n(this,void 0,void 0,(function*(){let t=r(42);void 0!==t.default&&(t=t.default);let n=yield fetch(t),i=yield n.arrayBuffer();null==w||w.face_tracker_model_load_from_memory(e,i)}))}(e)})),face_mesh_create:()=>f.createFaceMesh(),face_mesh_destroy:e=>{f.destroyFaceMesh(e)},face_mesh_indices:e=>{let t=f.getFaceMesh(e);return t?t.getIndices():(p.zcwarn("attempting to call face_mesh_indices on a destroyed zappar_face_mesh_t"),new Uint16Array)},face_mesh_indices_size:e=>{let t=f.getFaceMesh(e);return t?t.getIndices().length:(p.zcwarn("attempting to call face_mesh_indices_size on a destroyed zappar_face_mesh_t"),0)},face_mesh_uvs:e=>{let t=f.getFaceMesh(e);return t?t.getUVs():(p.zcwarn("attempting to call face_mesh_uvs on a destroyed zappar_face_mesh_t"),new Float32Array)},face_mesh_uvs_size:e=>{let t=f.getFaceMesh(e);return t?t.getUVs().length:(p.zcwarn("attempting to call face_mesh_uvs_size on a destroyed zappar_face_mesh_t"),0)},face_mesh_vertices:e=>{let t=f.getFaceMesh(e);return t?t.getVertices():(p.zcwarn("attempting to call face_mesh_vertices on a destroyed zappar_face_mesh_t"),new Float32Array)},face_mesh_vertices_size:e=>{let t=f.getFaceMesh(e);return t?t.getVertices().length:(p.zcwarn("attempting to call face_mesh_vertices_size on a destroyed zappar_face_mesh_t"),0)},face_mesh_normals:e=>{let t=f.getFaceMesh(e);return t?t.getNormals():(p.zcwarn("attempting to call face_mesh_normals on a destroyed zappar_face_mesh_t"),new Float32Array)},face_mesh_normals_size:e=>{let t=f.getFaceMesh(e);return t?t.getNormals().length:(p.zcwarn("attempting to call face_mesh_normals_size on a destroyed zappar_face_mesh_t"),0)},face_mesh_load_from_memory:(e,t,r,n,i,a)=>{let o=f.getFaceMesh(e);o?o.loadFromMemory(t,r,n,i,a):p.zcwarn("attempting to call face_mesh_load_from_memory on a destroyed zappar_face_mesh_t")},face_mesh_update:(e,t,r,n)=>{let i=f.getFaceMesh(e);i?i.update(t,r,n):p.zcwarn("attempting to call face_mesh_update on a destroyed zappar_face_mesh_t")},face_mesh_load_default:e=>n(this,void 0,void 0,(function*(){let t=f.getFaceMesh(e);if(!t)return void p.zcwarn("attempting to call face_mesh_load_default on a destroyed zappar_face_mesh_t");let n=r(16);void 0!==n.default&&(n=n.default);let i=yield fetch(n);t.loadFromMemory(yield i.arrayBuffer(),!1,!1,!1,!1)})),face_mesh_load_default_face:(e,t,i,a)=>n(this,void 0,void 0,(function*(){let n=f.getFaceMesh(e);if(!n)return void p.zcwarn("attempting to call face_mesh_load_default_face on a destroyed zappar_face_mesh_t");let o=r(16);void 0!==o.default&&(o=o.default);let s=yield fetch(o);n.loadFromMemory(yield s.arrayBuffer(),t,i,a,!1)})),face_mesh_load_default_full_head_simplified:(e,t,i,a,o)=>n(this,void 0,void 0,(function*(){let n=f.getFaceMesh(e);if(!n)return void p.zcwarn("attempting to call face_mesh_load_default_full_head_simplified on a destroyed zappar_face_mesh_t");let s=r(41);void 0!==s.default&&(s=s.default);let u=yield fetch(s);n.loadFromMemory(yield u.arrayBuffer(),t,i,a,o)})),face_mesh_loaded_version:e=>{let t=f.getFaceMesh(e);return t?t.getModelVersion():(p.zcwarn("attempting to call face_mesh_load_default on a destroyed zappar_face_mesh_t"),-1)},face_landmark_create:e=>h.createFaceLandmark(e),face_landmark_destroy:e=>{h.destroyFaceLandmark(e)},face_landmark_update:(e,t,r,n)=>{let i=h.getFaceLandmark(e);i?i.update(t,r,n):p.zcwarn("attempting to call face_landmark_update on a destroyed zappar_face_landmark_t")},face_landmark_anchor_pose:e=>{let t=h.getFaceLandmark(e);return t?t.anchor_pose:(p.zcwarn("attempting to call face_landmark_anchor_pose on a destroyed zappar_face_landmark_t"),s.mat4.create())},html_element_source_create:(e,t)=>l.HTMLElementSource.createVideoElementSource(e,t),html_element_source_start:e=>{var t;return null===(t=l.HTMLElementSource.getVideoElementSource(e))||void 0===t?void 0:t.start()},html_element_source_pause:e=>{var t;return null===(t=l.HTMLElementSource.getVideoElementSource(e))||void 0===t?void 0:t.pause()},html_element_source_destroy:e=>{var t;return null===(t=l.HTMLElementSource.getVideoElementSource(e))||void 0===t?void 0:t.destroy()},sequence_source_create:e=>b.SequenceSource.create(e),sequence_source_load_from_memory:(e,t)=>{var r;return null===(r=b.SequenceSource.get(e))||void 0===r?void 0:r.loadFromMemory(t)},sequence_source_pause:e=>{var t;return null===(t=b.SequenceSource.get(e))||void 0===t?void 0:t.pause()},sequence_source_start:e=>{var t;return null===(t=b.SequenceSource.get(e))||void 0===t?void 0:t.start()},sequence_source_max_playback_fps_set:(e,t)=>{var r;return null===(r=b.SequenceSource.get(e))||void 0===r?void 0:r.maxPlaybackFpsSet(t)},sequence_source_destroy:e=>{var t;return null===(t=b.SequenceSource.get(e))||void 0===t?void 0:t.destroy()},permission_granted_all:c.permissionGrantedAll,permission_granted_camera:c.permissionGrantedCamera,permission_granted_motion:c.permissionGrantedMotion,permission_denied_any:c.permissionDeniedAny,permission_denied_camera:c.permissionDeniedCamera,permission_denied_motion:c.permissionDeniedMotion,permission_request_motion:c.permissionRequestMotion,permission_request_camera:c.permissionRequestCamera,permission_request_all:c.permissionRequestAll,permission_request_ui:c.permissionRequestUI,permission_request_ui_promise:c.permissionRequestUI,permission_denied_ui:c.permissionDeniedUI,browser_incompatible:m.default.incompatible,browser_incompatible_ui:m.default.incompatible_ui,log_level_set:e=>{p.setLogLevel(e),t.impl.log_level_set(e)}}),w}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zappar_client=void 0;const n=r(21),i=r(22);t.zappar_client=class{constructor(e){this._messageSender=e,this._globalState={log_level:1},this.serializer=new n.MessageSerializer(e=>{this._messageSender(e)}),this.deserializer=new i.MessageDeserializer,this._latestId=1,this._pipeline_state_by_instance=new Map,this._camera_source_state_by_instance=new Map,this._sequence_source_state_by_instance=new Map,this._image_tracker_state_by_instance=new Map,this._face_tracker_state_by_instance=new Map,this._face_mesh_state_by_instance=new Map,this._face_landmark_state_by_instance=new Map,this._barcode_finder_state_by_instance=new Map,this._instant_world_tracker_state_by_instance=new Map,this.impl={log_level:()=>this._globalState.log_level,log_level_set:e=>{this.serializer.sendMessage(34,t=>{t.logLevel(e)})},analytics_project_id_set:e=>{this.serializer.sendMessage(31,t=>{t.string(e)})},pipeline_create:()=>{let e=this._latestId++,t={current_frame_user_data:0,camera_model:new Float32Array([300,300,160,120,0,0]),camera_pose:new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),camera_frame_camera_attitude:new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),camera_frame_device_attitude:new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),frame_number:0};return this._pipeline_state_by_instance.set(e,t),this.serializer.sendMessage(27,t=>{t.type(e)}),e},pipeline_destroy:e=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this._pipeline_state_by_instance.delete(e),this.serializer.sendMessage(28,t=>{t.type(e)})},pipeline_frame_update:e=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(9,t=>{t.type(e)})},pipeline_frame_number:e=>{let t=this._pipeline_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.frame_number},pipeline_camera_model:e=>{let t=this._pipeline_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.camera_model},pipeline_camera_frame_user_data:e=>{let t=this._pipeline_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.current_frame_user_data},pipeline_camera_frame_submit:(e,t,r,n,i,a,o,s)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(8,u=>{u.type(e),u.dataWithLength(t),u.int(r),u.int(n),u.int(i),u.matrix4x4(a),u.cameraModel(o),u.bool(s)})},pipeline_camera_frame_submit_raw_pointer:(e,t,r,n,i,a,o,s,u,c,f)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed")},pipeline_camera_frame_camera_attitude:e=>{let t=this._pipeline_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.camera_frame_camera_attitude},pipeline_camera_frame_device_attitude:e=>{let t=this._pipeline_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.camera_frame_device_attitude},pipeline_motion_accelerometer_submit:(e,t,r,n,i)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(10,a=>{a.type(e),a.timestamp(t),a.float(r),a.float(n),a.float(i)})},pipeline_motion_rotation_rate_submit:(e,t,r,n,i)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(11,a=>{a.type(e),a.timestamp(t),a.float(r),a.float(n),a.float(i)})},pipeline_motion_attitude_submit:(e,t,r,n,i)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(12,a=>{a.type(e),a.timestamp(t),a.float(r),a.float(n),a.float(i)})},pipeline_motion_attitude_matrix_submit:(e,t)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(13,r=>{r.type(e),r.matrix4x4(t)})},camera_source_create:(e,t)=>{let r=this._latestId++;return this._camera_source_state_by_instance.set(r,{}),this.serializer.sendMessage(29,n=>{n.type(r),n.type(e),n.string(t)}),r},camera_source_destroy:e=>{if(!this._camera_source_state_by_instance.get(e))throw new Error("This object has been destroyed");this._camera_source_state_by_instance.delete(e),this.serializer.sendMessage(30,t=>{t.type(e)})},sequence_source_create:e=>{let t=this._latestId++;return this._sequence_source_state_by_instance.set(t,{}),this.serializer.sendMessage(35,r=>{r.type(t),r.type(e)}),t},sequence_source_destroy:e=>{if(!this._sequence_source_state_by_instance.get(e))throw new Error("This object has been destroyed");this._sequence_source_state_by_instance.delete(e),this.serializer.sendMessage(36,t=>{t.type(e)})},image_tracker_create:e=>{let t=this._latestId++;return this._image_tracker_state_by_instance.set(t,{enabled:!0,target_loaded_version:-1,target_count:0,anchor_count:0,anchor_id:[],anchor_pose:[]}),this.serializer.sendMessage(2,r=>{r.type(t),r.type(e)}),t},image_tracker_destroy:e=>{if(!this._image_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this._image_tracker_state_by_instance.delete(e),this.serializer.sendMessage(14,t=>{t.type(e)})},image_tracker_target_load_from_memory:(e,t)=>{if(!this._image_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(4,r=>{r.type(e),r.dataWithLength(t)})},image_tracker_target_loaded_version:e=>{let t=this._image_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.target_loaded_version},image_tracker_target_count:e=>{let t=this._image_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.target_count},image_tracker_enabled:e=>{let t=this._image_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.enabled},image_tracker_enabled_set:(e,t)=>{if(!this._image_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(3,r=>{r.type(e),r.bool(t)})},image_tracker_anchor_count:e=>{let t=this._image_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.anchor_count},image_tracker_anchor_id:(e,t)=>{let r=this._image_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_id[t]},image_tracker_anchor_pose_raw:(e,t)=>{let r=this._image_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_pose[t]},face_tracker_create:e=>{let t=this._latestId++;return this._face_tracker_state_by_instance.set(t,{enabled:!0,model_loaded:-1,max_faces:1,anchor_count:0,anchor_id:[],anchor_pose:[],anchor_identity_coefficients:[],anchor_expression_coefficients:[]}),this.serializer.sendMessage(20,r=>{r.type(t),r.type(e)}),t},face_tracker_destroy:e=>{if(!this._face_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this._face_tracker_state_by_instance.delete(e),this.serializer.sendMessage(21,t=>{t.type(e)})},face_tracker_model_load_from_memory:(e,t)=>{if(!this._face_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(22,r=>{r.type(e),r.dataWithLength(t)})},face_tracker_model_loaded_version:e=>{let t=this._face_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.model_loaded},face_tracker_enabled_set:(e,t)=>{if(!this._face_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(23,r=>{r.type(e),r.bool(t)})},face_tracker_enabled:e=>{let t=this._face_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.enabled},face_tracker_max_faces_set:(e,t)=>{if(!this._face_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(24,r=>{r.type(e),r.int(t)})},face_tracker_max_faces:e=>{let t=this._face_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.max_faces},face_tracker_anchor_count:e=>{let t=this._face_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.anchor_count},face_tracker_anchor_id:(e,t)=>{let r=this._face_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_id[t]},face_tracker_anchor_pose_raw:(e,t)=>{let r=this._face_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_pose[t]},face_tracker_anchor_identity_coefficients:(e,t)=>{let r=this._face_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_identity_coefficients[t]},face_tracker_anchor_expression_coefficients:(e,t)=>{let r=this._face_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_expression_coefficients[t]},face_mesh_create:()=>{let e=this._latestId++;return this._face_mesh_state_by_instance.set(e,{}),this.serializer.sendMessage(25,t=>{t.type(e)}),e},face_mesh_destroy:e=>{if(!this._face_mesh_state_by_instance.get(e))throw new Error("This object has been destroyed");this._face_mesh_state_by_instance.delete(e),this.serializer.sendMessage(26,t=>{t.type(e)})},face_landmark_create:e=>{let t=this._latestId++;return this._face_landmark_state_by_instance.set(t,{}),this.serializer.sendMessage(32,r=>{r.type(t),r.faceLandmarkName(e)}),t},face_landmark_destroy:e=>{if(!this._face_landmark_state_by_instance.get(e))throw new Error("This object has been destroyed");this._face_landmark_state_by_instance.delete(e),this.serializer.sendMessage(33,t=>{t.type(e)})},barcode_finder_create:e=>{let t=this._latestId++;return this._barcode_finder_state_by_instance.set(t,{enabled:!0,number_found:0,found_text:[],found_format:[],formats:131071}),this.serializer.sendMessage(16,r=>{r.type(t),r.type(e)}),t},barcode_finder_destroy:e=>{if(!this._barcode_finder_state_by_instance.get(e))throw new Error("This object has been destroyed");this._barcode_finder_state_by_instance.delete(e),this.serializer.sendMessage(17,t=>{t.type(e)})},barcode_finder_enabled_set:(e,t)=>{if(!this._barcode_finder_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(18,r=>{r.type(e),r.bool(t)})},barcode_finder_enabled:e=>{let t=this._barcode_finder_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.enabled},barcode_finder_found_number:e=>{let t=this._barcode_finder_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.number_found},barcode_finder_found_text:(e,t)=>{let r=this._barcode_finder_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.found_text[t]},barcode_finder_found_format:(e,t)=>{let r=this._barcode_finder_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.found_format[t]},barcode_finder_formats:e=>{let t=this._barcode_finder_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.formats},barcode_finder_formats_set:(e,t)=>{if(!this._barcode_finder_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(19,r=>{r.type(e),r.barcodeFormat(t)})},instant_world_tracker_create:e=>{let t=this._latestId++,r={enabled:!0,pose:new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};return this._instant_world_tracker_state_by_instance.set(t,r),this.serializer.sendMessage(5,r=>{r.type(t),r.type(e)}),t},instant_world_tracker_destroy:e=>{if(!this._instant_world_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this._instant_world_tracker_state_by_instance.delete(e),this.serializer.sendMessage(15,t=>{t.type(e)})},instant_world_tracker_enabled_set:(e,t)=>{if(!this._instant_world_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(6,r=>{r.type(e),r.bool(t)})},instant_world_tracker_enabled:e=>{let t=this._instant_world_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.enabled},instant_world_tracker_anchor_pose_raw:e=>{let t=this._instant_world_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.pose},instant_world_tracker_anchor_pose_set_from_camera_offset_raw:(e,t,r,n,i)=>{if(!this._instant_world_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(7,a=>{a.type(e),a.float(t),a.float(r),a.float(n),a.instantTrackerTransformOrientation(i)})}}}processMessages(e){this.deserializer.setData(e),this.deserializer.forMessages((e,t)=>{switch(e){case 7:{let e=t.type(),r=this._pipeline_state_by_instance.get(e);if(!r)return;r.frame_number=t.int();break}case 6:{let e=t.type(),r=this._pipeline_state_by_instance.get(e);if(!r)return;r.camera_model=t.cameraModel();break}case 5:{let e=t.type(),r=this._pipeline_state_by_instance.get(e);if(!r)return;r.current_frame_user_data=t.int();break}case 11:{let e=t.type(),r=this._pipeline_state_by_instance.get(e);if(!r)return;r.camera_frame_camera_attitude=t.matrix4x4();break}case 12:{let e=t.type(),r=this._pipeline_state_by_instance.get(e);if(!r)return;r.camera_frame_device_attitude=t.matrix4x4();break}case 19:{let e=t.type(),r=this._image_tracker_state_by_instance.get(e);if(!r)return;r.target_loaded_version=t.int();break}case 21:{let e=t.type(),r=this._image_tracker_state_by_instance.get(e);if(!r)return;r.target_count=t.int();break}case 1:{let e=t.type(),r=this._image_tracker_state_by_instance.get(e);if(!r)return;r.anchor_count=t.int();break}case 2:{let e=t.type(),r=this._image_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_id[n]=t.string();break}case 3:{let e=t.type(),r=this._image_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_pose[n]=t.matrix4x4();break}case 18:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;r.model_loaded=t.int();break}case 13:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;r.anchor_count=t.int();break}case 14:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_id[n]=t.string();break}case 15:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_pose[n]=t.matrix4x4();break}case 16:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_identity_coefficients[n]=t.identityCoefficients();break}case 17:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_expression_coefficients[n]=t.expressionCoefficients();break}case 8:{let e=t.type(),r=this._barcode_finder_state_by_instance.get(e);if(!r)return;r.number_found=t.int();break}case 9:{let e=t.type(),r=this._barcode_finder_state_by_instance.get(e);if(!r)return;let n=t.int();r.found_text[n]=t.string();break}case 10:{let e=t.type(),r=this._barcode_finder_state_by_instance.get(e);if(!r)return;let n=t.int();r.found_format[n]=t.barcodeFormat();break}case 4:{let e=t.type(),r=this._instant_world_tracker_state_by_instance.get(e);if(!r)return;r.pose=t.matrix4x4();break}}})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageSerializer=void 0;t.MessageSerializer=class{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=4*(this._offset+e+8);if(this._buffer&&this._buffer.byteLength>=t)return;let r=void 0;if(!r){let e=t;e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,r=new ArrayBuffer(e)}let n=this._buffer?this._i32View:void 0;this._buffer=r,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),n&&this._i32View.set(n.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++}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDeserializer=void 0;t.MessageDeserializer=class{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)}}}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.launchWorker=t.messageManager=void 0;const i=r(24);let a;t.messageManager=new i.MsgManager,a=r(25),a.default&&(a=a.default),t.launchWorker=function(){return n(this,void 0,void 0,(function*(){let e=new a;var n;function i(){let r=t.messageManager.getOutgoingMessages();for(let t of r)e.postMessage(t.msg,t.transferables)}e.postMessage({t:"wasm",url:r(26).default}),yield(n=e,new Promise(e=>{let t=r=>{"loaded"===r.data&&(n.removeEventListener("message",t),e())};n.addEventListener("message",t)})),t.messageManager.onOutgoingMessage.bind(i),i(),e.addEventListener("message",e=>{t.messageManager.postIncomingMessage(e.data)})}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgManager=void 0;const n=r(10);t.MsgManager=class{constructor(){this.onOutgoingMessage=new n.Event,this.onIncomingMessage=new n.Event1,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}}},function(e,t,r){"use strict";r.r(t);var n=r(17),i=r.n(n);t.default=function(){return i()('!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.profile=t.EmbeddedVideoImplementation=void 0;const n=r(18);!function(e){e[e.OBJECT_URL=0]="OBJECT_URL",e[e.SRC_OBJECT=1]="SRC_OBJECT"}(t.EmbeddedVideoImplementation||(t.EmbeddedVideoImplementation={})),t.profile={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=t.profile,window.location.href.indexOf("_mstppipeline")>=0&&(console.log("Configuring for MSTP camera pipeline (if supported)"),t.profile.preferMediaStreamTrackProcessorCamera=!0),window.location.href.indexOf("_imagebitmappipeline")>=0&&(console.log("Configuring for ImageBitmap camera pipeline (if supported)"),t.profile.preferImageBitmapCamera=!0));let a=new n.UAParser,i=(a.getOS().name||"unknown").toLowerCase(),o=(a.getEngine().name||"unknown").toLowerCase();function u(){let e=a.getOS().version;if(e){let r=e.split(".");if(r.length>=2){const e=parseInt(r[0]),n=parseInt(r[1]);(e<11||11===e&&n<3)&&(t.profile.blacklisted=!0),(e<12||12===e&&n<2)&&(t.profile.videoElementInDOM=!0),(12===e&&n>=2||e>=13)&&(t.profile.showGyroPermissionsWarningIfNecessary=!0),e>=13&&(t.profile.showSafariPermissionsResetIfNecessary=!0),(e>=12&&n>1||e>=13)&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&navigator.mediaDevices.getSupportedConstraints().frameRate&&(t.profile.requestHighFrameRate=!0,e<14&&(t.profile.videoHeight=360,t.profile.dataHeight=180))}}}"webkit"===o&&"ios"!==i&&(t.profile.deviceMotionMutliplier=1,"undefined"!=typeof window&&void 0!==window.orientation&&u()),"webkit"===o&&"ios"===i&&(t.profile.deviceMotionMutliplier=1,u())},function(e,t,r){"use strict";r.r(t),r.d(t,"glMatrix",(function(){return n})),r.d(t,"mat2",(function(){return a})),r.d(t,"mat2d",(function(){return i})),r.d(t,"mat3",(function(){return o})),r.d(t,"mat4",(function(){return u})),r.d(t,"quat",(function(){return f})),r.d(t,"quat2",(function(){return _})),r.d(t,"vec2",(function(){return d})),r.d(t,"vec3",(function(){return s})),r.d(t,"vec4",(function(){return c}));var n={};r.r(n),r.d(n,"EPSILON",(function(){return l})),r.d(n,"ARRAY_TYPE",(function(){return h})),r.d(n,"RANDOM",(function(){return p})),r.d(n,"setMatrixArrayType",(function(){return m})),r.d(n,"toRadian",(function(){return w})),r.d(n,"equals",(function(){return g}));var a={};r.r(a),r.d(a,"create",(function(){return v})),r.d(a,"clone",(function(){return y})),r.d(a,"copy",(function(){return M})),r.d(a,"identity",(function(){return E})),r.d(a,"fromValues",(function(){return x})),r.d(a,"set",(function(){return A})),r.d(a,"transpose",(function(){return k})),r.d(a,"invert",(function(){return T})),r.d(a,"adjoint",(function(){return R})),r.d(a,"determinant",(function(){return F})),r.d(a,"multiply",(function(){return z})),r.d(a,"rotate",(function(){return L})),r.d(a,"scale",(function(){return O})),r.d(a,"fromRotation",(function(){return S})),r.d(a,"fromScaling",(function(){return I})),r.d(a,"str",(function(){return P})),r.d(a,"frob",(function(){return B})),r.d(a,"LDU",(function(){return D})),r.d(a,"add",(function(){return U})),r.d(a,"subtract",(function(){return C})),r.d(a,"exactEquals",(function(){return V})),r.d(a,"equals",(function(){return q})),r.d(a,"multiplyScalar",(function(){return N})),r.d(a,"multiplyScalarAndAdd",(function(){return X})),r.d(a,"mul",(function(){return Y})),r.d(a,"sub",(function(){return H}));var i={};r.r(i),r.d(i,"create",(function(){return W})),r.d(i,"clone",(function(){return j})),r.d(i,"copy",(function(){return G})),r.d(i,"identity",(function(){return Z})),r.d(i,"fromValues",(function(){return $})),r.d(i,"set",(function(){return K})),r.d(i,"invert",(function(){return Q})),r.d(i,"determinant",(function(){return J})),r.d(i,"multiply",(function(){return ee})),r.d(i,"rotate",(function(){return te})),r.d(i,"scale",(function(){return re})),r.d(i,"translate",(function(){return ne})),r.d(i,"fromRotation",(function(){return ae})),r.d(i,"fromScaling",(function(){return ie})),r.d(i,"fromTranslation",(function(){return oe})),r.d(i,"str",(function(){return ue})),r.d(i,"frob",(function(){return se})),r.d(i,"add",(function(){return ce})),r.d(i,"subtract",(function(){return fe})),r.d(i,"multiplyScalar",(function(){return _e})),r.d(i,"multiplyScalarAndAdd",(function(){return de})),r.d(i,"exactEquals",(function(){return le})),r.d(i,"equals",(function(){return he})),r.d(i,"mul",(function(){return pe})),r.d(i,"sub",(function(){return me}));var o={};r.r(o),r.d(o,"create",(function(){return be})),r.d(o,"fromMat4",(function(){return we})),r.d(o,"clone",(function(){return ge})),r.d(o,"copy",(function(){return ve})),r.d(o,"fromValues",(function(){return ye})),r.d(o,"set",(function(){return Me})),r.d(o,"identity",(function(){return Ee})),r.d(o,"transpose",(function(){return xe})),r.d(o,"invert",(function(){return Ae})),r.d(o,"adjoint",(function(){return ke})),r.d(o,"determinant",(function(){return Te})),r.d(o,"multiply",(function(){return Re})),r.d(o,"translate",(function(){return Fe})),r.d(o,"rotate",(function(){return ze})),r.d(o,"scale",(function(){return Le})),r.d(o,"fromTranslation",(function(){return Oe})),r.d(o,"fromRotation",(function(){return Se})),r.d(o,"fromScaling",(function(){return Ie})),r.d(o,"fromMat2d",(function(){return Pe})),r.d(o,"fromQuat",(function(){return Be})),r.d(o,"normalFromMat4",(function(){return De})),r.d(o,"projection",(function(){return Ue})),r.d(o,"str",(function(){return Ce})),r.d(o,"frob",(function(){return Ve})),r.d(o,"add",(function(){return qe})),r.d(o,"subtract",(function(){return Ne})),r.d(o,"multiplyScalar",(function(){return Xe})),r.d(o,"multiplyScalarAndAdd",(function(){return Ye})),r.d(o,"exactEquals",(function(){return He})),r.d(o,"equals",(function(){return We})),r.d(o,"mul",(function(){return je})),r.d(o,"sub",(function(){return Ge}));var u={};r.r(u),r.d(u,"create",(function(){return Ze})),r.d(u,"clone",(function(){return $e})),r.d(u,"copy",(function(){return Ke})),r.d(u,"fromValues",(function(){return Qe})),r.d(u,"set",(function(){return Je})),r.d(u,"identity",(function(){return et})),r.d(u,"transpose",(function(){return tt})),r.d(u,"invert",(function(){return rt})),r.d(u,"adjoint",(function(){return nt})),r.d(u,"determinant",(function(){return at})),r.d(u,"multiply",(function(){return it})),r.d(u,"translate",(function(){return ot})),r.d(u,"scale",(function(){return ut})),r.d(u,"rotate",(function(){return st})),r.d(u,"rotateX",(function(){return ct})),r.d(u,"rotateY",(function(){return ft})),r.d(u,"rotateZ",(function(){return _t})),r.d(u,"fromTranslation",(function(){return dt})),r.d(u,"fromScaling",(function(){return lt})),r.d(u,"fromRotation",(function(){return ht})),r.d(u,"fromXRotation",(function(){return pt})),r.d(u,"fromYRotation",(function(){return mt})),r.d(u,"fromZRotation",(function(){return bt})),r.d(u,"fromRotationTranslation",(function(){return wt})),r.d(u,"fromQuat2",(function(){return gt})),r.d(u,"getTranslation",(function(){return vt})),r.d(u,"getScaling",(function(){return yt})),r.d(u,"getRotation",(function(){return Mt})),r.d(u,"fromRotationTranslationScale",(function(){return Et})),r.d(u,"fromRotationTranslationScaleOrigin",(function(){return xt})),r.d(u,"fromQuat",(function(){return At})),r.d(u,"frustum",(function(){return kt})),r.d(u,"perspective",(function(){return Tt})),r.d(u,"perspectiveFromFieldOfView",(function(){return Rt})),r.d(u,"ortho",(function(){return Ft})),r.d(u,"lookAt",(function(){return zt})),r.d(u,"targetTo",(function(){return Lt})),r.d(u,"str",(function(){return Ot})),r.d(u,"frob",(function(){return St})),r.d(u,"add",(function(){return It})),r.d(u,"subtract",(function(){return Pt})),r.d(u,"multiplyScalar",(function(){return Bt})),r.d(u,"multiplyScalarAndAdd",(function(){return Dt})),r.d(u,"exactEquals",(function(){return Ut})),r.d(u,"equals",(function(){return Ct})),r.d(u,"mul",(function(){return Vt})),r.d(u,"sub",(function(){return qt}));var s={};r.r(s),r.d(s,"create",(function(){return Nt})),r.d(s,"clone",(function(){return Xt})),r.d(s,"length",(function(){return Yt})),r.d(s,"fromValues",(function(){return Ht})),r.d(s,"copy",(function(){return Wt})),r.d(s,"set",(function(){return jt})),r.d(s,"add",(function(){return Gt})),r.d(s,"subtract",(function(){return Zt})),r.d(s,"multiply",(function(){return $t})),r.d(s,"divide",(function(){return Kt})),r.d(s,"ceil",(function(){return Qt})),r.d(s,"floor",(function(){return Jt})),r.d(s,"min",(function(){return er})),r.d(s,"max",(function(){return tr})),r.d(s,"round",(function(){return rr})),r.d(s,"scale",(function(){return nr})),r.d(s,"scaleAndAdd",(function(){return ar})),r.d(s,"distance",(function(){return ir})),r.d(s,"squaredDistance",(function(){return or})),r.d(s,"squaredLength",(function(){return ur})),r.d(s,"negate",(function(){return sr})),r.d(s,"inverse",(function(){return cr})),r.d(s,"normalize",(function(){return fr})),r.d(s,"dot",(function(){return _r})),r.d(s,"cross",(function(){return dr})),r.d(s,"lerp",(function(){return lr})),r.d(s,"hermite",(function(){return hr})),r.d(s,"bezier",(function(){return pr})),r.d(s,"random",(function(){return mr})),r.d(s,"transformMat4",(function(){return br})),r.d(s,"transformMat3",(function(){return wr})),r.d(s,"transformQuat",(function(){return gr})),r.d(s,"rotateX",(function(){return vr})),r.d(s,"rotateY",(function(){return yr})),r.d(s,"rotateZ",(function(){return Mr})),r.d(s,"angle",(function(){return Er})),r.d(s,"zero",(function(){return xr})),r.d(s,"str",(function(){return Ar})),r.d(s,"exactEquals",(function(){return kr})),r.d(s,"equals",(function(){return Tr})),r.d(s,"sub",(function(){return Fr})),r.d(s,"mul",(function(){return zr})),r.d(s,"div",(function(){return Lr})),r.d(s,"dist",(function(){return Or})),r.d(s,"sqrDist",(function(){return Sr})),r.d(s,"len",(function(){return Ir})),r.d(s,"sqrLen",(function(){return Pr})),r.d(s,"forEach",(function(){return Br}));var c={};r.r(c),r.d(c,"create",(function(){return Dr})),r.d(c,"clone",(function(){return Ur})),r.d(c,"fromValues",(function(){return Cr})),r.d(c,"copy",(function(){return Vr})),r.d(c,"set",(function(){return qr})),r.d(c,"add",(function(){return Nr})),r.d(c,"subtract",(function(){return Xr})),r.d(c,"multiply",(function(){return Yr})),r.d(c,"divide",(function(){return Hr})),r.d(c,"ceil",(function(){return Wr})),r.d(c,"floor",(function(){return jr})),r.d(c,"min",(function(){return Gr})),r.d(c,"max",(function(){return Zr})),r.d(c,"round",(function(){return $r})),r.d(c,"scale",(function(){return Kr})),r.d(c,"scaleAndAdd",(function(){return Qr})),r.d(c,"distance",(function(){return Jr})),r.d(c,"squaredDistance",(function(){return en})),r.d(c,"length",(function(){return tn})),r.d(c,"squaredLength",(function(){return rn})),r.d(c,"negate",(function(){return nn})),r.d(c,"inverse",(function(){return an})),r.d(c,"normalize",(function(){return on})),r.d(c,"dot",(function(){return un})),r.d(c,"cross",(function(){return sn})),r.d(c,"lerp",(function(){return cn})),r.d(c,"random",(function(){return fn})),r.d(c,"transformMat4",(function(){return _n})),r.d(c,"transformQuat",(function(){return dn})),r.d(c,"zero",(function(){return ln})),r.d(c,"str",(function(){return hn})),r.d(c,"exactEquals",(function(){return pn})),r.d(c,"equals",(function(){return mn})),r.d(c,"sub",(function(){return bn})),r.d(c,"mul",(function(){return wn})),r.d(c,"div",(function(){return gn})),r.d(c,"dist",(function(){return vn})),r.d(c,"sqrDist",(function(){return yn})),r.d(c,"len",(function(){return Mn})),r.d(c,"sqrLen",(function(){return En})),r.d(c,"forEach",(function(){return xn}));var f={};r.r(f),r.d(f,"create",(function(){return An})),r.d(f,"identity",(function(){return kn})),r.d(f,"setAxisAngle",(function(){return Tn})),r.d(f,"getAxisAngle",(function(){return Rn})),r.d(f,"getAngle",(function(){return Fn})),r.d(f,"multiply",(function(){return zn})),r.d(f,"rotateX",(function(){return Ln})),r.d(f,"rotateY",(function(){return On})),r.d(f,"rotateZ",(function(){return Sn})),r.d(f,"calculateW",(function(){return In})),r.d(f,"exp",(function(){return Pn})),r.d(f,"ln",(function(){return Bn})),r.d(f,"pow",(function(){return Dn})),r.d(f,"slerp",(function(){return Un})),r.d(f,"random",(function(){return Cn})),r.d(f,"invert",(function(){return Vn})),r.d(f,"conjugate",(function(){return qn})),r.d(f,"fromMat3",(function(){return Nn})),r.d(f,"fromEuler",(function(){return Xn})),r.d(f,"str",(function(){return Yn})),r.d(f,"clone",(function(){return Kn})),r.d(f,"fromValues",(function(){return Qn})),r.d(f,"copy",(function(){return Jn})),r.d(f,"set",(function(){return ea})),r.d(f,"add",(function(){return ta})),r.d(f,"mul",(function(){return ra})),r.d(f,"scale",(function(){return na})),r.d(f,"dot",(function(){return aa})),r.d(f,"lerp",(function(){return ia})),r.d(f,"length",(function(){return oa})),r.d(f,"len",(function(){return ua})),r.d(f,"squaredLength",(function(){return sa})),r.d(f,"sqrLen",(function(){return ca})),r.d(f,"normalize",(function(){return fa})),r.d(f,"exactEquals",(function(){return _a})),r.d(f,"equals",(function(){return da})),r.d(f,"rotationTo",(function(){return la})),r.d(f,"sqlerp",(function(){return ha})),r.d(f,"setAxes",(function(){return pa}));var _={};r.r(_),r.d(_,"create",(function(){return ma})),r.d(_,"clone",(function(){return ba})),r.d(_,"fromValues",(function(){return wa})),r.d(_,"fromRotationTranslationValues",(function(){return ga})),r.d(_,"fromRotationTranslation",(function(){return va})),r.d(_,"fromTranslation",(function(){return ya})),r.d(_,"fromRotation",(function(){return Ma})),r.d(_,"fromMat4",(function(){return Ea})),r.d(_,"copy",(function(){return xa})),r.d(_,"identity",(function(){return Aa})),r.d(_,"set",(function(){return ka})),r.d(_,"getReal",(function(){return Ta})),r.d(_,"getDual",(function(){return Ra})),r.d(_,"setReal",(function(){return Fa})),r.d(_,"setDual",(function(){return za})),r.d(_,"getTranslation",(function(){return La})),r.d(_,"translate",(function(){return Oa})),r.d(_,"rotateX",(function(){return Sa})),r.d(_,"rotateY",(function(){return Ia})),r.d(_,"rotateZ",(function(){return Pa})),r.d(_,"rotateByQuatAppend",(function(){return Ba})),r.d(_,"rotateByQuatPrepend",(function(){return Da})),r.d(_,"rotateAroundAxis",(function(){return Ua})),r.d(_,"add",(function(){return Ca})),r.d(_,"multiply",(function(){return Va})),r.d(_,"mul",(function(){return qa})),r.d(_,"scale",(function(){return Na})),r.d(_,"dot",(function(){return Xa})),r.d(_,"lerp",(function(){return Ya})),r.d(_,"invert",(function(){return Ha})),r.d(_,"conjugate",(function(){return Wa})),r.d(_,"length",(function(){return ja})),r.d(_,"len",(function(){return Ga})),r.d(_,"squaredLength",(function(){return Za})),r.d(_,"sqrLen",(function(){return $a})),r.d(_,"normalize",(function(){return Ka})),r.d(_,"str",(function(){return Qa})),r.d(_,"exactEquals",(function(){return Ja})),r.d(_,"equals",(function(){return ei}));var d={};r.r(d),r.d(d,"create",(function(){return ti})),r.d(d,"clone",(function(){return ri})),r.d(d,"fromValues",(function(){return ni})),r.d(d,"copy",(function(){return ai})),r.d(d,"set",(function(){return ii})),r.d(d,"add",(function(){return oi})),r.d(d,"subtract",(function(){return ui})),r.d(d,"multiply",(function(){return si})),r.d(d,"divide",(function(){return ci})),r.d(d,"ceil",(function(){return fi})),r.d(d,"floor",(function(){return _i})),r.d(d,"min",(function(){return di})),r.d(d,"max",(function(){return li})),r.d(d,"round",(function(){return hi})),r.d(d,"scale",(function(){return pi})),r.d(d,"scaleAndAdd",(function(){return mi})),r.d(d,"distance",(function(){return bi})),r.d(d,"squaredDistance",(function(){return wi})),r.d(d,"length",(function(){return gi})),r.d(d,"squaredLength",(function(){return vi})),r.d(d,"negate",(function(){return yi})),r.d(d,"inverse",(function(){return Mi})),r.d(d,"normalize",(function(){return Ei})),r.d(d,"dot",(function(){return xi})),r.d(d,"cross",(function(){return Ai})),r.d(d,"lerp",(function(){return ki})),r.d(d,"random",(function(){return Ti})),r.d(d,"transformMat2",(function(){return Ri})),r.d(d,"transformMat2d",(function(){return Fi})),r.d(d,"transformMat3",(function(){return zi})),r.d(d,"transformMat4",(function(){return Li})),r.d(d,"rotate",(function(){return Oi})),r.d(d,"angle",(function(){return Si})),r.d(d,"zero",(function(){return Ii})),r.d(d,"str",(function(){return Pi})),r.d(d,"exactEquals",(function(){return Bi})),r.d(d,"equals",(function(){return Di})),r.d(d,"len",(function(){return Ui})),r.d(d,"sub",(function(){return Ci})),r.d(d,"mul",(function(){return Vi})),r.d(d,"div",(function(){return qi})),r.d(d,"dist",(function(){return Ni})),r.d(d,"sqrDist",(function(){return Xi})),r.d(d,"sqrLen",(function(){return Yi})),r.d(d,"forEach",(function(){return Hi}));var l=1e-6,h="undefined"!=typeof Float32Array?Float32Array:Array,p=Math.random;function m(e){h=e}var b=Math.PI/180;function w(e){return e*b}function g(e,t){return Math.abs(e-t)<=l*Math.max(1,Math.abs(e),Math.abs(t))}function v(){var e=new h(4);return h!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function y(e){var t=new h(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function M(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function E(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function x(e,t,r,n){var a=new h(4);return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a}function A(e,t,r,n,a){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e}function k(e,t){if(e===t){var r=t[1];e[1]=t[2],e[2]=r}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function T(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r*i-a*n;return o?(o=1/o,e[0]=i*o,e[1]=-n*o,e[2]=-a*o,e[3]=r*o,e):null}function R(e,t){var r=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=r,e}function F(e){return e[0]*e[3]-e[2]*e[1]}function z(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=r[0],s=r[1],c=r[2],f=r[3];return e[0]=n*u+i*s,e[1]=a*u+o*s,e[2]=n*c+i*f,e[3]=a*c+o*f,e}function L(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=Math.sin(r),s=Math.cos(r);return e[0]=n*s+i*u,e[1]=a*s+o*u,e[2]=n*-u+i*s,e[3]=a*-u+o*s,e}function O(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=r[0],s=r[1];return e[0]=n*u,e[1]=a*u,e[2]=i*s,e[3]=o*s,e}function S(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=-r,e[3]=n,e}function I(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e}function P(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function B(e){return Math.hypot(e[0],e[1],e[2],e[3])}function D(e,t,r,n){return e[2]=n[2]/n[0],r[0]=n[0],r[1]=n[1],r[3]=n[3]-e[2]*r[1],[e,t,r]}function U(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function C(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function V(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function q(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=t[0],u=t[1],s=t[2],c=t[3];return Math.abs(r-o)<=l*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-u)<=l*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(a-s)<=l*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(i-c)<=l*Math.max(1,Math.abs(i),Math.abs(c))}function N(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function X(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var Y=z,H=C;function W(){var e=new h(6);return h!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function j(e){var t=new h(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function G(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Z(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function $(e,t,r,n,a,i){var o=new h(6);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o[4]=a,o[5]=i,o}function K(e,t,r,n,a,i,o){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=i,e[5]=o,e}function Q(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=r*i-n*a;return s?(s=1/s,e[0]=i*s,e[1]=-n*s,e[2]=-a*s,e[3]=r*s,e[4]=(a*u-i*o)*s,e[5]=(n*o-r*u)*s,e):null}function J(e){return e[0]*e[3]-e[1]*e[2]}function ee(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=r[0],f=r[1],_=r[2],d=r[3],l=r[4],h=r[5];return e[0]=n*c+i*f,e[1]=a*c+o*f,e[2]=n*_+i*d,e[3]=a*_+o*d,e[4]=n*l+i*h+u,e[5]=a*l+o*h+s,e}function te(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=Math.sin(r),f=Math.cos(r);return e[0]=n*f+i*c,e[1]=a*f+o*c,e[2]=n*-c+i*f,e[3]=a*-c+o*f,e[4]=u,e[5]=s,e}function re(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=r[0],f=r[1];return e[0]=n*c,e[1]=a*c,e[2]=i*f,e[3]=o*f,e[4]=u,e[5]=s,e}function ne(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=r[0],f=r[1];return e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=n*c+i*f+u,e[5]=a*c+o*f+s,e}function ae(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=-r,e[3]=n,e[4]=0,e[5]=0,e}function ie(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function oe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function ue(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function se(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],1)}function ce(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e}function fe(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e}function _e(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e}function de(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e}function le(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function he(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=e[4],u=e[5],s=t[0],c=t[1],f=t[2],_=t[3],d=t[4],h=t[5];return Math.abs(r-s)<=l*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-c)<=l*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(a-f)<=l*Math.max(1,Math.abs(a),Math.abs(f))&&Math.abs(i-_)<=l*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(o-d)<=l*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(u-h)<=l*Math.max(1,Math.abs(u),Math.abs(h))}var pe=ee,me=fe;function be(){var e=new h(9);return h!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function we(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function ge(e){var t=new h(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function ve(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function ye(e,t,r,n,a,i,o,u,s){var c=new h(9);return c[0]=e,c[1]=t,c[2]=r,c[3]=n,c[4]=a,c[5]=i,c[6]=o,c[7]=u,c[8]=s,c}function Me(e,t,r,n,a,i,o,u,s,c){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=i,e[5]=o,e[6]=u,e[7]=s,e[8]=c,e}function Ee(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function xe(e,t){if(e===t){var r=t[1],n=t[2],a=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=n,e[7]=a}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function Ae(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=t[6],c=t[7],f=t[8],_=f*o-u*c,d=-f*i+u*s,l=c*i-o*s,h=r*_+n*d+a*l;return h?(h=1/h,e[0]=_*h,e[1]=(-f*n+a*c)*h,e[2]=(u*n-a*o)*h,e[3]=d*h,e[4]=(f*r-a*s)*h,e[5]=(-u*r+a*i)*h,e[6]=l*h,e[7]=(-c*r+n*s)*h,e[8]=(o*r-n*i)*h,e):null}function ke(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=t[6],c=t[7],f=t[8];return e[0]=o*f-u*c,e[1]=a*c-n*f,e[2]=n*u-a*o,e[3]=u*s-i*f,e[4]=r*f-a*s,e[5]=a*i-r*u,e[6]=i*c-o*s,e[7]=n*s-r*c,e[8]=r*o-n*i,e}function Te(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],u=e[6],s=e[7],c=e[8];return t*(c*i-o*s)+r*(-c*a+o*u)+n*(s*a-i*u)}function Re(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=t[8],d=r[0],l=r[1],h=r[2],p=r[3],m=r[4],b=r[5],w=r[6],g=r[7],v=r[8];return e[0]=d*n+l*o+h*c,e[1]=d*a+l*u+h*f,e[2]=d*i+l*s+h*_,e[3]=p*n+m*o+b*c,e[4]=p*a+m*u+b*f,e[5]=p*i+m*s+b*_,e[6]=w*n+g*o+v*c,e[7]=w*a+g*u+v*f,e[8]=w*i+g*s+v*_,e}function Fe(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=t[8],d=r[0],l=r[1];return e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=u,e[5]=s,e[6]=d*n+l*o+c,e[7]=d*a+l*u+f,e[8]=d*i+l*s+_,e}function ze(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=t[8],d=Math.sin(r),l=Math.cos(r);return e[0]=l*n+d*o,e[1]=l*a+d*u,e[2]=l*i+d*s,e[3]=l*o-d*n,e[4]=l*u-d*a,e[5]=l*s-d*i,e[6]=c,e[7]=f,e[8]=_,e}function Le(e,t,r){var n=r[0],a=r[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=a*t[3],e[4]=a*t[4],e[5]=a*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Oe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function Se(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ie(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Pe(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function Be(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,u=n+n,s=a+a,c=r*o,f=n*o,_=n*u,d=a*o,l=a*u,h=a*s,p=i*o,m=i*u,b=i*s;return e[0]=1-_-h,e[3]=f-b,e[6]=d+m,e[1]=f+b,e[4]=1-c-h,e[7]=l-p,e[2]=d-m,e[5]=l+p,e[8]=1-c-_,e}function De(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=t[6],c=t[7],f=t[8],_=t[9],d=t[10],l=t[11],h=t[12],p=t[13],m=t[14],b=t[15],w=r*u-n*o,g=r*s-a*o,v=r*c-i*o,y=n*s-a*u,M=n*c-i*u,E=a*c-i*s,x=f*p-_*h,A=f*m-d*h,k=f*b-l*h,T=_*m-d*p,R=_*b-l*p,F=d*b-l*m,z=w*F-g*R+v*T+y*k-M*A+E*x;return z?(z=1/z,e[0]=(u*F-s*R+c*T)*z,e[1]=(s*k-o*F-c*A)*z,e[2]=(o*R-u*k+c*x)*z,e[3]=(a*R-n*F-i*T)*z,e[4]=(r*F-a*k+i*A)*z,e[5]=(n*k-r*R-i*x)*z,e[6]=(p*E-m*M+b*y)*z,e[7]=(m*v-h*E-b*g)*z,e[8]=(h*M-p*v+b*w)*z,e):null}function Ue(e,t,r){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/r,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function Ce(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function Ve(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function qe(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e}function Ne(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e}function Xe(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e}function Ye(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e}function He(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function We(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=e[4],u=e[5],s=e[6],c=e[7],f=e[8],_=t[0],d=t[1],h=t[2],p=t[3],m=t[4],b=t[5],w=t[6],g=t[7],v=t[8];return Math.abs(r-_)<=l*Math.max(1,Math.abs(r),Math.abs(_))&&Math.abs(n-d)<=l*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(a-h)<=l*Math.max(1,Math.abs(a),Math.abs(h))&&Math.abs(i-p)<=l*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-m)<=l*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(u-b)<=l*Math.max(1,Math.abs(u),Math.abs(b))&&Math.abs(s-w)<=l*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(c-g)<=l*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(f-v)<=l*Math.max(1,Math.abs(f),Math.abs(v))}var je=Re,Ge=Ne;function Ze(){var e=new h(16);return h!=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 $e(e){var t=new h(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Ke(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Qe(e,t,r,n,a,i,o,u,s,c,f,_,d,l,p,m){var b=new h(16);return b[0]=e,b[1]=t,b[2]=r,b[3]=n,b[4]=a,b[5]=i,b[6]=o,b[7]=u,b[8]=s,b[9]=c,b[10]=f,b[11]=_,b[12]=d,b[13]=l,b[14]=p,b[15]=m,b}function Je(e,t,r,n,a,i,o,u,s,c,f,_,d,l,h,p,m){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=i,e[5]=o,e[6]=u,e[7]=s,e[8]=c,e[9]=f,e[10]=_,e[11]=d,e[12]=l,e[13]=h,e[14]=p,e[15]=m,e}function et(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}function tt(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],u=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=u}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function rt(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=t[6],c=t[7],f=t[8],_=t[9],d=t[10],l=t[11],h=t[12],p=t[13],m=t[14],b=t[15],w=r*u-n*o,g=r*s-a*o,v=r*c-i*o,y=n*s-a*u,M=n*c-i*u,E=a*c-i*s,x=f*p-_*h,A=f*m-d*h,k=f*b-l*h,T=_*m-d*p,R=_*b-l*p,F=d*b-l*m,z=w*F-g*R+v*T+y*k-M*A+E*x;return z?(z=1/z,e[0]=(u*F-s*R+c*T)*z,e[1]=(a*R-n*F-i*T)*z,e[2]=(p*E-m*M+b*y)*z,e[3]=(d*M-_*E-l*y)*z,e[4]=(s*k-o*F-c*A)*z,e[5]=(r*F-a*k+i*A)*z,e[6]=(m*v-h*E-b*g)*z,e[7]=(f*E-d*v+l*g)*z,e[8]=(o*R-u*k+c*x)*z,e[9]=(n*k-r*R-i*x)*z,e[10]=(h*M-p*v+b*w)*z,e[11]=(_*v-f*M-l*w)*z,e[12]=(u*A-o*T-s*x)*z,e[13]=(r*T-n*A+a*x)*z,e[14]=(p*g-h*y-m*w)*z,e[15]=(f*y-_*g+d*w)*z,e):null}function nt(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=t[6],c=t[7],f=t[8],_=t[9],d=t[10],l=t[11],h=t[12],p=t[13],m=t[14],b=t[15];return e[0]=u*(d*b-l*m)-_*(s*b-c*m)+p*(s*l-c*d),e[1]=-(n*(d*b-l*m)-_*(a*b-i*m)+p*(a*l-i*d)),e[2]=n*(s*b-c*m)-u*(a*b-i*m)+p*(a*c-i*s),e[3]=-(n*(s*l-c*d)-u*(a*l-i*d)+_*(a*c-i*s)),e[4]=-(o*(d*b-l*m)-f*(s*b-c*m)+h*(s*l-c*d)),e[5]=r*(d*b-l*m)-f*(a*b-i*m)+h*(a*l-i*d),e[6]=-(r*(s*b-c*m)-o*(a*b-i*m)+h*(a*c-i*s)),e[7]=r*(s*l-c*d)-o*(a*l-i*d)+f*(a*c-i*s),e[8]=o*(_*b-l*p)-f*(u*b-c*p)+h*(u*l-c*_),e[9]=-(r*(_*b-l*p)-f*(n*b-i*p)+h*(n*l-i*_)),e[10]=r*(u*b-c*p)-o*(n*b-i*p)+h*(n*c-i*u),e[11]=-(r*(u*l-c*_)-o*(n*l-i*_)+f*(n*c-i*u)),e[12]=-(o*(_*m-d*p)-f*(u*m-s*p)+h*(u*d-s*_)),e[13]=r*(_*m-d*p)-f*(n*m-a*p)+h*(n*d-a*_),e[14]=-(r*(u*m-s*p)-o*(n*m-a*p)+h*(n*s-a*u)),e[15]=r*(u*d-s*_)-o*(n*d-a*_)+f*(n*s-a*u),e}function at(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],u=e[6],s=e[7],c=e[8],f=e[9],_=e[10],d=e[11],l=e[12],h=e[13],p=e[14],m=e[15];return(t*o-r*i)*(_*m-d*p)-(t*u-n*i)*(f*m-d*h)+(t*s-a*i)*(f*p-_*h)+(r*u-n*o)*(c*m-d*l)-(r*s-a*o)*(c*p-_*l)+(n*s-a*u)*(c*h-f*l)}function it(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=t[8],d=t[9],l=t[10],h=t[11],p=t[12],m=t[13],b=t[14],w=t[15],g=r[0],v=r[1],y=r[2],M=r[3];return e[0]=g*n+v*u+y*_+M*p,e[1]=g*a+v*s+y*d+M*m,e[2]=g*i+v*c+y*l+M*b,e[3]=g*o+v*f+y*h+M*w,g=r[4],v=r[5],y=r[6],M=r[7],e[4]=g*n+v*u+y*_+M*p,e[5]=g*a+v*s+y*d+M*m,e[6]=g*i+v*c+y*l+M*b,e[7]=g*o+v*f+y*h+M*w,g=r[8],v=r[9],y=r[10],M=r[11],e[8]=g*n+v*u+y*_+M*p,e[9]=g*a+v*s+y*d+M*m,e[10]=g*i+v*c+y*l+M*b,e[11]=g*o+v*f+y*h+M*w,g=r[12],v=r[13],y=r[14],M=r[15],e[12]=g*n+v*u+y*_+M*p,e[13]=g*a+v*s+y*d+M*m,e[14]=g*i+v*c+y*l+M*b,e[15]=g*o+v*f+y*h+M*w,e}function ot(e,t,r){var n,a,i,o,u,s,c,f,_,d,l,h,p=r[0],m=r[1],b=r[2];return t===e?(e[12]=t[0]*p+t[4]*m+t[8]*b+t[12],e[13]=t[1]*p+t[5]*m+t[9]*b+t[13],e[14]=t[2]*p+t[6]*m+t[10]*b+t[14],e[15]=t[3]*p+t[7]*m+t[11]*b+t[15]):(n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=t[8],d=t[9],l=t[10],h=t[11],e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=u,e[5]=s,e[6]=c,e[7]=f,e[8]=_,e[9]=d,e[10]=l,e[11]=h,e[12]=n*p+u*m+_*b+t[12],e[13]=a*p+s*m+d*b+t[13],e[14]=i*p+c*m+l*b+t[14],e[15]=o*p+f*m+h*b+t[15]),e}function ut(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function st(e,t,r,n){var a,i,o,u,s,c,f,_,d,h,p,m,b,w,g,v,y,M,E,x,A,k,T,R,F=n[0],z=n[1],L=n[2],O=Math.hypot(F,z,L);return O<l?null:(F*=O=1/O,z*=O,L*=O,a=Math.sin(r),o=1-(i=Math.cos(r)),u=t[0],s=t[1],c=t[2],f=t[3],_=t[4],d=t[5],h=t[6],p=t[7],m=t[8],b=t[9],w=t[10],g=t[11],v=F*F*o+i,y=z*F*o+L*a,M=L*F*o-z*a,E=F*z*o-L*a,x=z*z*o+i,A=L*z*o+F*a,k=F*L*o+z*a,T=z*L*o-F*a,R=L*L*o+i,e[0]=u*v+_*y+m*M,e[1]=s*v+d*y+b*M,e[2]=c*v+h*y+w*M,e[3]=f*v+p*y+g*M,e[4]=u*E+_*x+m*A,e[5]=s*E+d*x+b*A,e[6]=c*E+h*x+w*A,e[7]=f*E+p*x+g*A,e[8]=u*k+_*T+m*R,e[9]=s*k+d*T+b*R,e[10]=c*k+h*T+w*R,e[11]=f*k+p*T+g*R,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function ct(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],u=t[6],s=t[7],c=t[8],f=t[9],_=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+c*n,e[5]=o*a+f*n,e[6]=u*a+_*n,e[7]=s*a+d*n,e[8]=c*a-i*n,e[9]=f*a-o*n,e[10]=_*a-u*n,e[11]=d*a-s*n,e}function ft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],u=t[2],s=t[3],c=t[8],f=t[9],_=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-c*n,e[1]=o*a-f*n,e[2]=u*a-_*n,e[3]=s*a-d*n,e[8]=i*n+c*a,e[9]=o*n+f*a,e[10]=u*n+_*a,e[11]=s*n+d*a,e}function _t(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],u=t[2],s=t[3],c=t[4],f=t[5],_=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a+c*n,e[1]=o*a+f*n,e[2]=u*a+_*n,e[3]=s*a+d*n,e[4]=c*a-i*n,e[5]=f*a-o*n,e[6]=_*a-u*n,e[7]=d*a-s*n,e}function dt(e,t){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]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function lt(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ht(e,t,r){var n,a,i,o=r[0],u=r[1],s=r[2],c=Math.hypot(o,u,s);return c<l?null:(o*=c=1/c,u*=c,s*=c,n=Math.sin(t),i=1-(a=Math.cos(t)),e[0]=o*o*i+a,e[1]=u*o*i+s*n,e[2]=s*o*i-u*n,e[3]=0,e[4]=o*u*i-s*n,e[5]=u*u*i+a,e[6]=s*u*i+o*n,e[7]=0,e[8]=o*s*i+u*n,e[9]=u*s*i-o*n,e[10]=s*s*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function pt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function mt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function bt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,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}function wt(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=n+n,s=a+a,c=i+i,f=n*u,_=n*s,d=n*c,l=a*s,h=a*c,p=i*c,m=o*u,b=o*s,w=o*c;return e[0]=1-(l+p),e[1]=_+w,e[2]=d-b,e[3]=0,e[4]=_-w,e[5]=1-(f+p),e[6]=h+m,e[7]=0,e[8]=d+b,e[9]=h-m,e[10]=1-(f+l),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function gt(e,t){var r=new h(3),n=-t[0],a=-t[1],i=-t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=n*n+a*a+i*i+o*o;return _>0?(r[0]=2*(u*o+f*n+s*i-c*a)/_,r[1]=2*(s*o+f*a+c*n-u*i)/_,r[2]=2*(c*o+f*i+u*a-s*n)/_):(r[0]=2*(u*o+f*n+s*i-c*a),r[1]=2*(s*o+f*a+c*n-u*i),r[2]=2*(c*o+f*i+u*a-s*n)),wt(e,t,r),e}function vt(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function yt(e,t){var r=t[0],n=t[1],a=t[2],i=t[4],o=t[5],u=t[6],s=t[8],c=t[9],f=t[10];return e[0]=Math.hypot(r,n,a),e[1]=Math.hypot(i,o,u),e[2]=Math.hypot(s,c,f),e}function Mt(e,t){var r=new h(3);yt(r,t);var n=1/r[0],a=1/r[1],i=1/r[2],o=t[0]*n,u=t[1]*a,s=t[2]*i,c=t[4]*n,f=t[5]*a,_=t[6]*i,d=t[8]*n,l=t[9]*a,p=t[10]*i,m=o+f+p,b=0;return m>0?(b=2*Math.sqrt(m+1),e[3]=.25*b,e[0]=(_-l)/b,e[1]=(d-s)/b,e[2]=(u-c)/b):o>f&&o>p?(b=2*Math.sqrt(1+o-f-p),e[3]=(_-l)/b,e[0]=.25*b,e[1]=(u+c)/b,e[2]=(d+s)/b):f>p?(b=2*Math.sqrt(1+f-o-p),e[3]=(d-s)/b,e[0]=(u+c)/b,e[1]=.25*b,e[2]=(_+l)/b):(b=2*Math.sqrt(1+p-o-f),e[3]=(u-c)/b,e[0]=(d+s)/b,e[1]=(_+l)/b,e[2]=.25*b),e}function Et(e,t,r,n){var a=t[0],i=t[1],o=t[2],u=t[3],s=a+a,c=i+i,f=o+o,_=a*s,d=a*c,l=a*f,h=i*c,p=i*f,m=o*f,b=u*s,w=u*c,g=u*f,v=n[0],y=n[1],M=n[2];return e[0]=(1-(h+m))*v,e[1]=(d+g)*v,e[2]=(l-w)*v,e[3]=0,e[4]=(d-g)*y,e[5]=(1-(_+m))*y,e[6]=(p+b)*y,e[7]=0,e[8]=(l+w)*M,e[9]=(p-b)*M,e[10]=(1-(_+h))*M,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function xt(e,t,r,n,a){var i=t[0],o=t[1],u=t[2],s=t[3],c=i+i,f=o+o,_=u+u,d=i*c,l=i*f,h=i*_,p=o*f,m=o*_,b=u*_,w=s*c,g=s*f,v=s*_,y=n[0],M=n[1],E=n[2],x=a[0],A=a[1],k=a[2],T=(1-(p+b))*y,R=(l+v)*y,F=(h-g)*y,z=(l-v)*M,L=(1-(d+b))*M,O=(m+w)*M,S=(h+g)*E,I=(m-w)*E,P=(1-(d+p))*E;return e[0]=T,e[1]=R,e[2]=F,e[3]=0,e[4]=z,e[5]=L,e[6]=O,e[7]=0,e[8]=S,e[9]=I,e[10]=P,e[11]=0,e[12]=r[0]+x-(T*x+z*A+S*k),e[13]=r[1]+A-(R*x+L*A+I*k),e[14]=r[2]+k-(F*x+O*A+P*k),e[15]=1,e}function At(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,u=n+n,s=a+a,c=r*o,f=n*o,_=n*u,d=a*o,l=a*u,h=a*s,p=i*o,m=i*u,b=i*s;return e[0]=1-_-h,e[1]=f+b,e[2]=d-m,e[3]=0,e[4]=f-b,e[5]=1-c-h,e[6]=l+p,e[7]=0,e[8]=d+m,e[9]=l-p,e[10]=1-c-_,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function kt(e,t,r,n,a,i,o){var u=1/(r-t),s=1/(a-n),c=1/(i-o);return e[0]=2*i*u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*i*s,e[6]=0,e[7]=0,e[8]=(r+t)*u,e[9]=(a+n)*s,e[10]=(o+i)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*c,e[15]=0,e}function Tt(e,t,r,n,a){var i,o=1/Math.tan(t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=a&&a!==1/0?(i=1/(n-a),e[10]=(a+n)*i,e[14]=2*a*n*i):(e[10]=-1,e[14]=-2*n),e}function Rt(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),u=Math.tan(t.rightDegrees*Math.PI/180),s=2/(o+u),c=2/(a+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-u)*s*.5,e[9]=(a-i)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}function Ft(e,t,r,n,a,i,o){var u=1/(t-r),s=1/(n-a),c=1/(i-o);return e[0]=-2*u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*u,e[13]=(a+n)*s,e[14]=(o+i)*c,e[15]=1,e}function zt(e,t,r,n){var a,i,o,u,s,c,f,_,d,h,p=t[0],m=t[1],b=t[2],w=n[0],g=n[1],v=n[2],y=r[0],M=r[1],E=r[2];return Math.abs(p-y)<l&&Math.abs(m-M)<l&&Math.abs(b-E)<l?et(e):(f=p-y,_=m-M,d=b-E,a=g*(d*=h=1/Math.hypot(f,_,d))-v*(_*=h),i=v*(f*=h)-w*d,o=w*_-g*f,(h=Math.hypot(a,i,o))?(a*=h=1/h,i*=h,o*=h):(a=0,i=0,o=0),u=_*o-d*i,s=d*a-f*o,c=f*i-_*a,(h=Math.hypot(u,s,c))?(u*=h=1/h,s*=h,c*=h):(u=0,s=0,c=0),e[0]=a,e[1]=u,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=_,e[7]=0,e[8]=o,e[9]=c,e[10]=d,e[11]=0,e[12]=-(a*p+i*m+o*b),e[13]=-(u*p+s*m+c*b),e[14]=-(f*p+_*m+d*b),e[15]=1,e)}function Lt(e,t,r,n){var a=t[0],i=t[1],o=t[2],u=n[0],s=n[1],c=n[2],f=a-r[0],_=i-r[1],d=o-r[2],l=f*f+_*_+d*d;l>0&&(f*=l=1/Math.sqrt(l),_*=l,d*=l);var h=s*d-c*_,p=c*f-u*d,m=u*_-s*f;return(l=h*h+p*p+m*m)>0&&(h*=l=1/Math.sqrt(l),p*=l,m*=l),e[0]=h,e[1]=p,e[2]=m,e[3]=0,e[4]=_*m-d*p,e[5]=d*h-f*m,e[6]=f*p-_*h,e[7]=0,e[8]=f,e[9]=_,e[10]=d,e[11]=0,e[12]=a,e[13]=i,e[14]=o,e[15]=1,e}function Ot(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function St(e){return Math.hypot(e[0],e[1],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function It(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e}function Pt(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function Bt(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e}function Dt(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e}function Ut(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function Ct(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=e[4],u=e[5],s=e[6],c=e[7],f=e[8],_=e[9],d=e[10],h=e[11],p=e[12],m=e[13],b=e[14],w=e[15],g=t[0],v=t[1],y=t[2],M=t[3],E=t[4],x=t[5],A=t[6],k=t[7],T=t[8],R=t[9],F=t[10],z=t[11],L=t[12],O=t[13],S=t[14],I=t[15];return Math.abs(r-g)<=l*Math.max(1,Math.abs(r),Math.abs(g))&&Math.abs(n-v)<=l*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(a-y)<=l*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(i-M)<=l*Math.max(1,Math.abs(i),Math.abs(M))&&Math.abs(o-E)<=l*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(u-x)<=l*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(s-A)<=l*Math.max(1,Math.abs(s),Math.abs(A))&&Math.abs(c-k)<=l*Math.max(1,Math.abs(c),Math.abs(k))&&Math.abs(f-T)<=l*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(_-R)<=l*Math.max(1,Math.abs(_),Math.abs(R))&&Math.abs(d-F)<=l*Math.max(1,Math.abs(d),Math.abs(F))&&Math.abs(h-z)<=l*Math.max(1,Math.abs(h),Math.abs(z))&&Math.abs(p-L)<=l*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(m-O)<=l*Math.max(1,Math.abs(m),Math.abs(O))&&Math.abs(b-S)<=l*Math.max(1,Math.abs(b),Math.abs(S))&&Math.abs(w-I)<=l*Math.max(1,Math.abs(w),Math.abs(I))}var Vt=it,qt=Pt;function Nt(){var e=new h(3);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Xt(e){var t=new h(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Yt(e){var t=e[0],r=e[1],n=e[2];return Math.hypot(t,r,n)}function Ht(e,t,r){var n=new h(3);return n[0]=e,n[1]=t,n[2]=r,n}function Wt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function jt(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function Gt(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function Zt(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function $t(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function Kt(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function Qt(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function Jt(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function er(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function tr(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function rr(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function nr(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function ar(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function ir(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2];return Math.hypot(r,n,a)}function or(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2];return r*r+n*n+a*a}function ur(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function sr(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function cr(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function fr(e,t){var r=t[0],n=t[1],a=t[2],i=r*r+n*n+a*a;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function _r(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function dr(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],u=r[1],s=r[2];return e[0]=a*s-i*u,e[1]=i*o-n*s,e[2]=n*u-a*o,e}function lr(e,t,r,n){var a=t[0],i=t[1],o=t[2];return e[0]=a+n*(r[0]-a),e[1]=i+n*(r[1]-i),e[2]=o+n*(r[2]-o),e}function hr(e,t,r,n,a,i){var o=i*i,u=o*(2*i-3)+1,s=o*(i-2)+i,c=o*(i-1),f=o*(3-2*i);return e[0]=t[0]*u+r[0]*s+n[0]*c+a[0]*f,e[1]=t[1]*u+r[1]*s+n[1]*c+a[1]*f,e[2]=t[2]*u+r[2]*s+n[2]*c+a[2]*f,e}function pr(e,t,r,n,a,i){var o=1-i,u=o*o,s=i*i,c=u*o,f=3*i*u,_=3*s*o,d=s*i;return e[0]=t[0]*c+r[0]*f+n[0]*_+a[0]*d,e[1]=t[1]*c+r[1]*f+n[1]*_+a[1]*d,e[2]=t[2]*c+r[2]*f+n[2]*_+a[2]*d,e}function mr(e,t){t=t||1;var r=2*p()*Math.PI,n=2*p()-1,a=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*a,e[1]=Math.sin(r)*a,e[2]=n*t,e}function br(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[3]*n+r[7]*a+r[11]*i+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*a+r[8]*i+r[12])/o,e[1]=(r[1]*n+r[5]*a+r[9]*i+r[13])/o,e[2]=(r[2]*n+r[6]*a+r[10]*i+r[14])/o,e}function wr(e,t,r){var n=t[0],a=t[1],i=t[2];return e[0]=n*r[0]+a*r[3]+i*r[6],e[1]=n*r[1]+a*r[4]+i*r[7],e[2]=n*r[2]+a*r[5]+i*r[8],e}function gr(e,t,r){var n=r[0],a=r[1],i=r[2],o=r[3],u=t[0],s=t[1],c=t[2],f=a*c-i*s,_=i*u-n*c,d=n*s-a*u,l=a*d-i*_,h=i*f-n*d,p=n*_-a*f,m=2*o;return f*=m,_*=m,d*=m,l*=2,h*=2,p*=2,e[0]=u+f+l,e[1]=s+_+h,e[2]=c+d+p,e}function vr(e,t,r,n){var a=[],i=[];return a[0]=t[0]-r[0],a[1]=t[1]-r[1],a[2]=t[2]-r[2],i[0]=a[0],i[1]=a[1]*Math.cos(n)-a[2]*Math.sin(n),i[2]=a[1]*Math.sin(n)+a[2]*Math.cos(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e}function yr(e,t,r,n){var a=[],i=[];return a[0]=t[0]-r[0],a[1]=t[1]-r[1],a[2]=t[2]-r[2],i[0]=a[2]*Math.sin(n)+a[0]*Math.cos(n),i[1]=a[1],i[2]=a[2]*Math.cos(n)-a[0]*Math.sin(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e}function Mr(e,t,r,n){var a=[],i=[];return a[0]=t[0]-r[0],a[1]=t[1]-r[1],a[2]=t[2]-r[2],i[0]=a[0]*Math.cos(n)-a[1]*Math.sin(n),i[1]=a[0]*Math.sin(n)+a[1]*Math.cos(n),i[2]=a[2],e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e}function Er(e,t){var r=Ht(e[0],e[1],e[2]),n=Ht(t[0],t[1],t[2]);fr(r,r),fr(n,n);var a=_r(r,n);return a>1?0:a<-1?Math.PI:Math.acos(a)}function xr(e){return e[0]=0,e[1]=0,e[2]=0,e}function Ar(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function kr(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Tr(e,t){var r=e[0],n=e[1],a=e[2],i=t[0],o=t[1],u=t[2];return Math.abs(r-i)<=l*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(n-o)<=l*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(a-u)<=l*Math.max(1,Math.abs(a),Math.abs(u))}var Rr,Fr=Zt,zr=$t,Lr=Kt,Or=ir,Sr=or,Ir=Yt,Pr=ur,Br=(Rr=Nt(),function(e,t,r,n,a,i){var o,u;for(t||(t=3),r||(r=0),u=n?Math.min(n*t+r,e.length):e.length,o=r;o<u;o+=t)Rr[0]=e[o],Rr[1]=e[o+1],Rr[2]=e[o+2],a(Rr,Rr,i),e[o]=Rr[0],e[o+1]=Rr[1],e[o+2]=Rr[2];return e});function Dr(){var e=new h(4);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function Ur(e){var t=new h(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Cr(e,t,r,n){var a=new h(4);return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a}function Vr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function qr(e,t,r,n,a){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e}function Nr(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function Xr(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function Yr(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function Hr(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function Wr(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function jr(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function Gr(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function Zr(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function $r(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function Kr(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function Qr(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}function Jr(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2],i=t[3]-e[3];return Math.hypot(r,n,a,i)}function en(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2],i=t[3]-e[3];return r*r+n*n+a*a+i*i}function tn(e){var t=e[0],r=e[1],n=e[2],a=e[3];return Math.hypot(t,r,n,a)}function rn(e){var t=e[0],r=e[1],n=e[2],a=e[3];return t*t+r*r+n*n+a*a}function nn(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function an(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function on(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r*r+n*n+a*a+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=r*o,e[1]=n*o,e[2]=a*o,e[3]=i*o,e}function un(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function sn(e,t,r,n){var a=r[0]*n[1]-r[1]*n[0],i=r[0]*n[2]-r[2]*n[0],o=r[0]*n[3]-r[3]*n[0],u=r[1]*n[2]-r[2]*n[1],s=r[1]*n[3]-r[3]*n[1],c=r[2]*n[3]-r[3]*n[2],f=t[0],_=t[1],d=t[2],l=t[3];return e[0]=_*c-d*s+l*u,e[1]=-f*c+d*o-l*i,e[2]=f*s-_*o+l*a,e[3]=-f*u+_*i-d*a,e}function cn(e,t,r,n){var a=t[0],i=t[1],o=t[2],u=t[3];return e[0]=a+n*(r[0]-a),e[1]=i+n*(r[1]-i),e[2]=o+n*(r[2]-o),e[3]=u+n*(r[3]-u),e}function fn(e,t){var r,n,a,i,o,u;t=t||1;do{o=(r=2*p()-1)*r+(n=2*p()-1)*n}while(o>=1);do{u=(a=2*p()-1)*a+(i=2*p()-1)*i}while(u>=1);var s=Math.sqrt((1-o)/u);return e[0]=t*r,e[1]=t*n,e[2]=t*a*s,e[3]=t*i*s,e}function _n(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3];return e[0]=r[0]*n+r[4]*a+r[8]*i+r[12]*o,e[1]=r[1]*n+r[5]*a+r[9]*i+r[13]*o,e[2]=r[2]*n+r[6]*a+r[10]*i+r[14]*o,e[3]=r[3]*n+r[7]*a+r[11]*i+r[15]*o,e}function dn(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],u=r[1],s=r[2],c=r[3],f=c*n+u*i-s*a,_=c*a+s*n-o*i,d=c*i+o*a-u*n,l=-o*n-u*a-s*i;return e[0]=f*c+l*-o+_*-s-d*-u,e[1]=_*c+l*-u+d*-o-f*-s,e[2]=d*c+l*-s+f*-u-_*-o,e[3]=t[3],e}function ln(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function hn(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function pn(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function mn(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=t[0],u=t[1],s=t[2],c=t[3];return Math.abs(r-o)<=l*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-u)<=l*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(a-s)<=l*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(i-c)<=l*Math.max(1,Math.abs(i),Math.abs(c))}var bn=Xr,wn=Yr,gn=Hr,vn=Jr,yn=en,Mn=tn,En=rn,xn=function(){var e=Dr();return function(t,r,n,a,i,o){var u,s;for(r||(r=4),n||(n=0),s=a?Math.min(a*r+n,t.length):t.length,u=n;u<s;u+=r)e[0]=t[u],e[1]=t[u+1],e[2]=t[u+2],e[3]=t[u+3],i(e,e,o),t[u]=e[0],t[u+1]=e[1],t[u+2]=e[2],t[u+3]=e[3];return t}}();function An(){var e=new h(4);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function kn(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function Tn(e,t,r){r*=.5;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e}function Rn(e,t){var r=2*Math.acos(t[3]),n=Math.sin(r/2);return n>l?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r}function Fn(e,t){var r=aa(e,t);return Math.acos(2*r*r-1)}function zn(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=r[0],s=r[1],c=r[2],f=r[3];return e[0]=n*f+o*u+a*c-i*s,e[1]=a*f+o*s+i*u-n*c,e[2]=i*f+o*c+n*s-a*u,e[3]=o*f-n*u-a*s-i*c,e}function Ln(e,t,r){r*=.5;var n=t[0],a=t[1],i=t[2],o=t[3],u=Math.sin(r),s=Math.cos(r);return e[0]=n*s+o*u,e[1]=a*s+i*u,e[2]=i*s-a*u,e[3]=o*s-n*u,e}function On(e,t,r){r*=.5;var n=t[0],a=t[1],i=t[2],o=t[3],u=Math.sin(r),s=Math.cos(r);return e[0]=n*s-i*u,e[1]=a*s+o*u,e[2]=i*s+n*u,e[3]=o*s-a*u,e}function Sn(e,t,r){r*=.5;var n=t[0],a=t[1],i=t[2],o=t[3],u=Math.sin(r),s=Math.cos(r);return e[0]=n*s+a*u,e[1]=a*s-n*u,e[2]=i*s+o*u,e[3]=o*s-i*u,e}function In(e,t){var r=t[0],n=t[1],a=t[2];return e[0]=r,e[1]=n,e[2]=a,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-a*a)),e}function Pn(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=Math.sqrt(r*r+n*n+a*a),u=Math.exp(i),s=o>0?u*Math.sin(o)/o:0;return e[0]=r*s,e[1]=n*s,e[2]=a*s,e[3]=u*Math.cos(o),e}function Bn(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=Math.sqrt(r*r+n*n+a*a),u=o>0?Math.atan2(o,i)/o:0;return e[0]=r*u,e[1]=n*u,e[2]=a*u,e[3]=.5*Math.log(r*r+n*n+a*a+i*i),e}function Dn(e,t,r){return Bn(e,t),na(e,e,r),Pn(e,e),e}function Un(e,t,r,n){var a,i,o,u,s,c=t[0],f=t[1],_=t[2],d=t[3],h=r[0],p=r[1],m=r[2],b=r[3];return(i=c*h+f*p+_*m+d*b)<0&&(i=-i,h=-h,p=-p,m=-m,b=-b),1-i>l?(a=Math.acos(i),o=Math.sin(a),u=Math.sin((1-n)*a)/o,s=Math.sin(n*a)/o):(u=1-n,s=n),e[0]=u*c+s*h,e[1]=u*f+s*p,e[2]=u*_+s*m,e[3]=u*d+s*b,e}function Cn(e){var t=p(),r=p(),n=p(),a=Math.sqrt(1-t),i=Math.sqrt(t);return e[0]=a*Math.sin(2*Math.PI*r),e[1]=a*Math.cos(2*Math.PI*r),e[2]=i*Math.sin(2*Math.PI*n),e[3]=i*Math.cos(2*Math.PI*n),e}function Vn(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r*r+n*n+a*a+i*i,u=o?1/o:0;return e[0]=-r*u,e[1]=-n*u,e[2]=-a*u,e[3]=i*u,e}function qn(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function Nn(e,t){var r,n=t[0]+t[4]+t[8];if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{var a=0;t[4]>t[0]&&(a=1),t[8]>t[3*a+a]&&(a=2);var i=(a+1)%3,o=(a+2)%3;r=Math.sqrt(t[3*a+a]-t[3*i+i]-t[3*o+o]+1),e[a]=.5*r,r=.5/r,e[3]=(t[3*i+o]-t[3*o+i])*r,e[i]=(t[3*i+a]+t[3*a+i])*r,e[o]=(t[3*o+a]+t[3*a+o])*r}return e}function Xn(e,t,r,n){var a=.5*Math.PI/180;t*=a,r*=a,n*=a;var i=Math.sin(t),o=Math.cos(t),u=Math.sin(r),s=Math.cos(r),c=Math.sin(n),f=Math.cos(n);return e[0]=i*s*f-o*u*c,e[1]=o*u*f+i*s*c,e[2]=o*s*c-i*u*f,e[3]=o*s*f+i*u*c,e}function Yn(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var Hn,Wn,jn,Gn,Zn,$n,Kn=Ur,Qn=Cr,Jn=Vr,ea=qr,ta=Nr,ra=zn,na=Kr,aa=un,ia=cn,oa=tn,ua=oa,sa=rn,ca=sa,fa=on,_a=pn,da=mn,la=(Hn=Nt(),Wn=Ht(1,0,0),jn=Ht(0,1,0),function(e,t,r){var n=_r(t,r);return n<-.999999?(dr(Hn,Wn,t),Ir(Hn)<1e-6&&dr(Hn,jn,t),fr(Hn,Hn),Tn(e,Hn,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(dr(Hn,t,r),e[0]=Hn[0],e[1]=Hn[1],e[2]=Hn[2],e[3]=1+n,fa(e,e))}),ha=(Gn=An(),Zn=An(),function(e,t,r,n,a,i){return Un(Gn,t,a,i),Un(Zn,r,n,i),Un(e,Gn,Zn,2*i*(1-i)),e}),pa=($n=be(),function(e,t,r,n){return $n[0]=r[0],$n[3]=r[1],$n[6]=r[2],$n[1]=n[0],$n[4]=n[1],$n[7]=n[2],$n[2]=-t[0],$n[5]=-t[1],$n[8]=-t[2],fa(e,Nn(e,$n))});function ma(){var e=new h(8);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0),e[3]=1,e}function ba(e){var t=new h(8);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function wa(e,t,r,n,a,i,o,u){var s=new h(8);return s[0]=e,s[1]=t,s[2]=r,s[3]=n,s[4]=a,s[5]=i,s[6]=o,s[7]=u,s}function ga(e,t,r,n,a,i,o){var u=new h(8);u[0]=e,u[1]=t,u[2]=r,u[3]=n;var s=.5*a,c=.5*i,f=.5*o;return u[4]=s*n+c*r-f*t,u[5]=c*n+f*e-s*r,u[6]=f*n+s*t-c*e,u[7]=-s*e-c*t-f*r,u}function va(e,t,r){var n=.5*r[0],a=.5*r[1],i=.5*r[2],o=t[0],u=t[1],s=t[2],c=t[3];return e[0]=o,e[1]=u,e[2]=s,e[3]=c,e[4]=n*c+a*s-i*u,e[5]=a*c+i*o-n*s,e[6]=i*c+n*u-a*o,e[7]=-n*o-a*u-i*s,e}function ya(e,t){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=.5*t[0],e[5]=.5*t[1],e[6]=.5*t[2],e[7]=0,e}function Ma(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function Ea(e,t){var r=An();Mt(r,t);var n=new h(3);return vt(n,t),va(e,r,n),e}function xa(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function Aa(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function ka(e,t,r,n,a,i,o,u,s){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=i,e[5]=o,e[6]=u,e[7]=s,e}var Ta=Jn;function Ra(e,t){return e[0]=t[4],e[1]=t[5],e[2]=t[6],e[3]=t[7],e}var Fa=Jn;function za(e,t){return e[4]=t[0],e[5]=t[1],e[6]=t[2],e[7]=t[3],e}function La(e,t){var r=t[4],n=t[5],a=t[6],i=t[7],o=-t[0],u=-t[1],s=-t[2],c=t[3];return e[0]=2*(r*c+i*o+n*s-a*u),e[1]=2*(n*c+i*u+a*o-r*s),e[2]=2*(a*c+i*s+r*u-n*o),e}function Oa(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=.5*r[0],s=.5*r[1],c=.5*r[2],f=t[4],_=t[5],d=t[6],l=t[7];return e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=o*u+a*c-i*s+f,e[5]=o*s+i*u-n*c+_,e[6]=o*c+n*s-a*u+d,e[7]=-n*u-a*s-i*c+l,e}function Sa(e,t,r){var n=-t[0],a=-t[1],i=-t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=u*o+f*n+s*i-c*a,d=s*o+f*a+c*n-u*i,l=c*o+f*i+u*a-s*n,h=f*o-u*n-s*a-c*i;return Ln(e,t,r),n=e[0],a=e[1],i=e[2],o=e[3],e[4]=_*o+h*n+d*i-l*a,e[5]=d*o+h*a+l*n-_*i,e[6]=l*o+h*i+_*a-d*n,e[7]=h*o-_*n-d*a-l*i,e}function Ia(e,t,r){var n=-t[0],a=-t[1],i=-t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=u*o+f*n+s*i-c*a,d=s*o+f*a+c*n-u*i,l=c*o+f*i+u*a-s*n,h=f*o-u*n-s*a-c*i;return On(e,t,r),n=e[0],a=e[1],i=e[2],o=e[3],e[4]=_*o+h*n+d*i-l*a,e[5]=d*o+h*a+l*n-_*i,e[6]=l*o+h*i+_*a-d*n,e[7]=h*o-_*n-d*a-l*i,e}function Pa(e,t,r){var n=-t[0],a=-t[1],i=-t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=u*o+f*n+s*i-c*a,d=s*o+f*a+c*n-u*i,l=c*o+f*i+u*a-s*n,h=f*o-u*n-s*a-c*i;return Sn(e,t,r),n=e[0],a=e[1],i=e[2],o=e[3],e[4]=_*o+h*n+d*i-l*a,e[5]=d*o+h*a+l*n-_*i,e[6]=l*o+h*i+_*a-d*n,e[7]=h*o-_*n-d*a-l*i,e}function Ba(e,t,r){var n=r[0],a=r[1],i=r[2],o=r[3],u=t[0],s=t[1],c=t[2],f=t[3];return e[0]=u*o+f*n+s*i-c*a,e[1]=s*o+f*a+c*n-u*i,e[2]=c*o+f*i+u*a-s*n,e[3]=f*o-u*n-s*a-c*i,u=t[4],s=t[5],c=t[6],f=t[7],e[4]=u*o+f*n+s*i-c*a,e[5]=s*o+f*a+c*n-u*i,e[6]=c*o+f*i+u*a-s*n,e[7]=f*o-u*n-s*a-c*i,e}function Da(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=r[0],s=r[1],c=r[2],f=r[3];return e[0]=n*f+o*u+a*c-i*s,e[1]=a*f+o*s+i*u-n*c,e[2]=i*f+o*c+n*s-a*u,e[3]=o*f-n*u-a*s-i*c,u=r[4],s=r[5],c=r[6],f=r[7],e[4]=n*f+o*u+a*c-i*s,e[5]=a*f+o*s+i*u-n*c,e[6]=i*f+o*c+n*s-a*u,e[7]=o*f-n*u-a*s-i*c,e}function Ua(e,t,r,n){if(Math.abs(n)<l)return xa(e,t);var a=Math.hypot(r[0],r[1],r[2]);n*=.5;var i=Math.sin(n),o=i*r[0]/a,u=i*r[1]/a,s=i*r[2]/a,c=Math.cos(n),f=t[0],_=t[1],d=t[2],h=t[3];e[0]=f*c+h*o+_*s-d*u,e[1]=_*c+h*u+d*o-f*s,e[2]=d*c+h*s+f*u-_*o,e[3]=h*c-f*o-_*u-d*s;var p=t[4],m=t[5],b=t[6],w=t[7];return e[4]=p*c+w*o+m*s-b*u,e[5]=m*c+w*u+b*o-p*s,e[6]=b*c+w*s+p*u-m*o,e[7]=w*c-p*o-m*u-b*s,e}function Ca(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e}function Va(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=r[4],s=r[5],c=r[6],f=r[7],_=t[4],d=t[5],l=t[6],h=t[7],p=r[0],m=r[1],b=r[2],w=r[3];return e[0]=n*w+o*p+a*b-i*m,e[1]=a*w+o*m+i*p-n*b,e[2]=i*w+o*b+n*m-a*p,e[3]=o*w-n*p-a*m-i*b,e[4]=n*f+o*u+a*c-i*s+_*w+h*p+d*b-l*m,e[5]=a*f+o*s+i*u-n*c+d*w+h*m+l*p-_*b,e[6]=i*f+o*c+n*s-a*u+l*w+h*b+_*m-d*p,e[7]=o*f-n*u-a*s-i*c+h*w-_*p-d*m-l*b,e}var qa=Va;function Na(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e}var Xa=aa;function Ya(e,t,r,n){var a=1-n;return Xa(t,r)<0&&(n=-n),e[0]=t[0]*a+r[0]*n,e[1]=t[1]*a+r[1]*n,e[2]=t[2]*a+r[2]*n,e[3]=t[3]*a+r[3]*n,e[4]=t[4]*a+r[4]*n,e[5]=t[5]*a+r[5]*n,e[6]=t[6]*a+r[6]*n,e[7]=t[7]*a+r[7]*n,e}function Ha(e,t){var r=Za(t);return e[0]=-t[0]/r,e[1]=-t[1]/r,e[2]=-t[2]/r,e[3]=t[3]/r,e[4]=-t[4]/r,e[5]=-t[5]/r,e[6]=-t[6]/r,e[7]=t[7]/r,e}function Wa(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=t[7],e}var ja=oa,Ga=ja,Za=sa,$a=Za;function Ka(e,t){var r=Za(t);if(r>0){r=Math.sqrt(r);var n=t[0]/r,a=t[1]/r,i=t[2]/r,o=t[3]/r,u=t[4],s=t[5],c=t[6],f=t[7],_=n*u+a*s+i*c+o*f;e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=(u-n*_)/r,e[5]=(s-a*_)/r,e[6]=(c-i*_)/r,e[7]=(f-o*_)/r}return e}function Qa(e){return"quat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+")"}function Ja(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]}function ei(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=e[4],u=e[5],s=e[6],c=e[7],f=t[0],_=t[1],d=t[2],h=t[3],p=t[4],m=t[5],b=t[6],w=t[7];return Math.abs(r-f)<=l*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(n-_)<=l*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(a-d)<=l*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(i-h)<=l*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(o-p)<=l*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(u-m)<=l*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(s-b)<=l*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(c-w)<=l*Math.max(1,Math.abs(c),Math.abs(w))}function ti(){var e=new h(2);return h!=Float32Array&&(e[0]=0,e[1]=0),e}function ri(e){var t=new h(2);return t[0]=e[0],t[1]=e[1],t}function ni(e,t){var r=new h(2);return r[0]=e,r[1]=t,r}function ai(e,t){return e[0]=t[0],e[1]=t[1],e}function ii(e,t,r){return e[0]=t,e[1]=r,e}function oi(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function ui(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function si(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function ci(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function fi(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function _i(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function di(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function li(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function hi(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function pi(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function mi(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e}function bi(e,t){var r=t[0]-e[0],n=t[1]-e[1];return Math.hypot(r,n)}function wi(e,t){var r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n}function gi(e){var t=e[0],r=e[1];return Math.hypot(t,r)}function vi(e){var t=e[0],r=e[1];return t*t+r*r}function yi(e,t){return e[0]=-t[0],e[1]=-t[1],e}function Mi(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function Ei(e,t){var r=t[0],n=t[1],a=r*r+n*n;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e}function xi(e,t){return e[0]*t[0]+e[1]*t[1]}function Ai(e,t,r){var n=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=n,e}function ki(e,t,r,n){var a=t[0],i=t[1];return e[0]=a+n*(r[0]-a),e[1]=i+n*(r[1]-i),e}function Ti(e,t){t=t||1;var r=2*p()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function Ri(e,t,r){var n=t[0],a=t[1];return e[0]=r[0]*n+r[2]*a,e[1]=r[1]*n+r[3]*a,e}function Fi(e,t,r){var n=t[0],a=t[1];return e[0]=r[0]*n+r[2]*a+r[4],e[1]=r[1]*n+r[3]*a+r[5],e}function zi(e,t,r){var n=t[0],a=t[1];return e[0]=r[0]*n+r[3]*a+r[6],e[1]=r[1]*n+r[4]*a+r[7],e}function Li(e,t,r){var n=t[0],a=t[1];return e[0]=r[0]*n+r[4]*a+r[12],e[1]=r[1]*n+r[5]*a+r[13],e}function Oi(e,t,r,n){var a=t[0]-r[0],i=t[1]-r[1],o=Math.sin(n),u=Math.cos(n);return e[0]=a*u-i*o+r[0],e[1]=a*o+i*u+r[1],e}function Si(e,t){var r=e[0],n=e[1],a=t[0],i=t[1],o=r*r+n*n;o>0&&(o=1/Math.sqrt(o));var u=a*a+i*i;u>0&&(u=1/Math.sqrt(u));var s=(r*a+n*i)*o*u;return s>1?0:s<-1?Math.PI:Math.acos(s)}function Ii(e){return e[0]=0,e[1]=0,e}function Pi(e){return"vec2("+e[0]+", "+e[1]+")"}function Bi(e,t){return e[0]===t[0]&&e[1]===t[1]}function Di(e,t){var r=e[0],n=e[1],a=t[0],i=t[1];return Math.abs(r-a)<=l*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-i)<=l*Math.max(1,Math.abs(n),Math.abs(i))}var Ui=gi,Ci=ui,Vi=si,qi=ci,Ni=bi,Xi=wi,Yi=vi,Hi=function(){var e=ti();return function(t,r,n,a,i,o){var u,s;for(r||(r=2),n||(n=0),s=a?Math.min(a*r+n,t.length):t.length,u=n;u<s;u+=r)e[0]=t[u],e[1]=t[u+1],i(e,e,o),t[u]=e[0],t[u+1]=e[1];return t}}()},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4),a=self;n.messageManager.onOutgoingMessage.bind(()=>{let e=n.messageManager.getOutgoingMessages();for(let t of e)a.postMessage(t.msg,t.transferables)});let i=e=>{if(e&&e.data&&"wasm"===e.data.t){let t=location.href.startsWith("blob")?e.data.url:r(21);t.default&&(t=t.default),n.launchWorkerServer(t),a.removeEventListener("message",i)}};a.addEventListener("message",i),a.addEventListener("message",e=>{n.messageManager.postIncomingMessage(e.data)})},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,u)}s((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.launchWorkerServer=t.messageManager=void 0;const a=r(5),i=r(9),o=r(10),u=r(13),s=r(1),c=r(15),f=r(16),_=r(0);t.messageManager=new u.MsgManager;let d=0;t.launchWorkerServer=function(e){return n(this,void 0,void 0,(function*(){let r=a.default({locateFile:(t,r)=>t.endsWith("zcv.wasm")?e:r+t,onRuntimeInitialized:()=>{let e=i.getRuntimeObject(r),a=new o.zappar_server(e,(e,r)=>{t.messageManager.postOutgoingMessage({p:e,t:"zappar",d:r},[r])});t.messageManager.postOutgoingMessage("loaded",[]),t.messageManager.onIncomingMessage.bind(i=>{var o;switch(i.t){case"zappar":a.processBuffer(i.d),t.messageManager.postOutgoingMessage({t:"buf",d:i.d},[i.d]);break;case"buf":null===(o=a.serializersByPipelineId.get(i.p))||void 0===o||o.bufferReturn(i.d);break;case"cameraFrameC2S":{let r,n=i,o=a._pipeline_by_instance.get(n.p);o&&(e.pipeline_camera_frame_submit(o,n.d,n.width,n.height,n.token,n.c2d,n.cm,n.userFacing),e.pipeline_frame_update(o),r=e.pipeline_camera_frame_device_attitude(o),a.exploreState());let u={token:n.token,d:n.d,p:n.p,t:"cameraFrameRecycleS2C",att:r};t.messageManager.postOutgoingMessage(u,[n.d]);break}case"streamC2S":{let o=i;!function(e,r,a,i,o,u,c){n(this,void 0,void 0,(function*(){const n=yield a.getReader();for(;;){let a=yield n.read();if(a.done)return void console.log("Stream done");let f=a.value,g=f.allocationSize();g>h&&(l>0&&e._free(l),l=e._malloc(g),h=g),yield f.copyTo(e.HEAPU8.subarray(l,l+h));let v=p;p++;const y=f.visibleRect.width,M=f.visibleRect.height;let E,x=y,A=M;switch(d){case 270:E=new Float32Array([0,1,0,0,-1,0,0,0,0,0,1,0,1,0,0,1]),x=M,A=y;break;case 180:E=new Float32Array([-1,0,0,0,0,-1,0,0,0,0,1,0,1,1,0,1]);break;case 90:E=new Float32Array([0,-1,0,0,1,0,0,0,0,0,1,0,0,1,0,1]),x=M,A=y;break;default:E=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}let k=f.clone();o?s.mat4.fromScaling(m,[-1,1,-1]):s.mat4.identity(m);let T=300*_.profile.dataWidth/320;b[0]=T,b[1]=T,b[2]=.5*_.profile.dataWidth,b[3]=.5*_.profile.dataHeight;const R={token:v,d:k,p:i,t:"videoFrameS2C",userFacing:o,uvTransform:E,w:x,h:A,cameraToDevice:m,cameraModel:b,source:c};t.messageManager.postOutgoingMessage(R,[R.d,R.uvTransform.buffer]);const F=u._pipeline_by_instance.get(i);F&&(r.pipeline_camera_frame_submit_raw_pointer(F,l,g,w(f.format),y,M,v,m,d,b,o),r.pipeline_frame_update(F),u.exploreState()),f.close()}}))}(r,e,o.s,o.p,o.userFacing,a,o.source);break}case"cameraToScreenC2S":d=i.r;break;case"imageBitmapC2S":{let r=i;f.handleImageBitmap(r,e,a,t.messageManager);break}}})}})}))};let l=0,h=0,p=1;const m=s.mat4.create(),b=new Float32Array([300,300,160,120,0,0]);function w(e){switch(e){case"I420":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_I420;case"I420A":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_I420A;case"I422":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_I422;case"I444":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_I444;case"NV12":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_NV12;case"RGBA":case"RGBX":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_RGBA;case"BGRA":case"BGRX":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_BGRA}return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_Y}},function(e,t,r){"use strict";r.r(t),function(e){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t){var n;t=t||{},n||(n=void 0!==t?t:{});var a,i,o=Object.assign;n.ready=new Promise((function(e,t){a=e,i=t}));var u,s=o({},n),c="./this.program",f=(e,t)=>{throw t},_="";_=self.location.href,r&&(_=r),_=0!==_.indexOf("blob:")?_.substr(0,_.replace(/[?#].*/,"").lastIndexOf("/")+1):"",u=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)};var d,l,h=n.print||console.log.bind(console),p=n.printErr||console.warn.bind(console);o(n,s),s=null,n.thisProgram&&(c=n.thisProgram),n.quit&&(f=n.quit),n.wasmBinary&&(l=n.wasmBinary);var m=n.noExitRuntime||!0;"object"!=typeof WebAssembly&&Z("no native wasm support detected");var b,w,g=!1;function v(e,t,r,a){var i={string:function(e){var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);t=vr(r),S(e,E,t,r)}return t},array:function(e){var t=vr(e.length);return M.set(e,t),t}};e=n["_"+e];var o,u=[],s=0;if(a)for(var c=0;c<a.length;c++){var f=i[r[c]];f?(0===s&&(s=wr()),u[c]=f(a[c])):u[c]=a[c]}return r=e.apply(null,u),o=r,0!==s&&gr(s),"string"===t?O(o):"boolean"===t?!!o:o}var y,M,E,x,A,k,T,R,F,z="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function L(e,t,r){var n=t+r;for(r=t;e[r]&&!(r>=n);)++r;if(16<r-t&&e.subarray&&z)return z.decode(e.subarray(t,r));for(n="";t<r;){var a=e[t++];if(128&a){var i=63&e[t++];if(192==(224&a))n+=String.fromCharCode((31&a)<<6|i);else{var o=63&e[t++];65536>(a=224==(240&a)?(15&a)<<12|i<<6|o:(7&a)<<18|i<<12|o<<6|63&e[t++])?n+=String.fromCharCode(a):(a-=65536,n+=String.fromCharCode(55296|a>>10,56320|1023&a))}}else n+=String.fromCharCode(a)}return n}function O(e,t){return e?L(E,e,t):""}function S(e,t,r,n){if(!(0<n))return 0;var a=r;n=r+n-1;for(var i=0;i<e.length;++i){var o=e.charCodeAt(i);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++i)),127>=o){if(r>=n)break;t[r++]=o}else{if(2047>=o){if(r+1>=n)break;t[r++]=192|o>>6}else{if(65535>=o){if(r+2>=n)break;t[r++]=224|o>>12}else{if(r+3>=n)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 I(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);55296<=n&&57343>=n&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),127>=n?++t:t=2047>=n?t+2:65535>=n?t+3:t+4}return t}function P(e){var t=I(e)+1,r=dr(t);return r&&S(e,M,r,t),r}function B(){var e=b.buffer;y=e,n.HEAP8=M=new Int8Array(e),n.HEAP16=x=new Int16Array(e),n.HEAP32=k=new Int32Array(e),n.HEAPU8=E=new Uint8Array(e),n.HEAPU16=A=new Uint16Array(e),n.HEAPU32=T=new Uint32Array(e),n.HEAPF32=R=new Float32Array(e),n.HEAPF64=F=new Float64Array(e)}var D,U=[],C=[],V=[],q=!1;function N(){var e=n.preRun.shift();U.unshift(e)}var X,Y=0,H=null,W=null;function j(){Y++,n.monitorRunDependencies&&n.monitorRunDependencies(Y)}function G(){if(Y--,n.monitorRunDependencies&&n.monitorRunDependencies(Y),0==Y&&(null!==H&&(clearInterval(H),H=null),W)){var e=W;W=null,e()}}function Z(e){throw n.onAbort&&n.onAbort(e),p(e="Aborted("+e+")"),g=!0,w=1,e=new WebAssembly.RuntimeError(e+". Build with -s ASSERTIONS=1 for more info."),i(e),e}if(n.preloadedImages={},n.preloadedAudios={},!(X="zcv.wasm").startsWith("data:application/octet-stream;base64,")){var $=X;X=n.locateFile?n.locateFile($,_):_+$}var K,Q,J={520664:function(){if(self.crypto&&self.crypto.getRandomValues){var e=new Uint32Array(1);return self.crypto.getRandomValues(e),e[0]}return 9007199254740991*Math.random()},520840:function(e,t){self.respond_ba_request(E.subarray(e,e+t))},520902:function(e,t){self.send_ba_request(E.subarray(e,e+t))}};function ee(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t(n);else{var r=t.ad;"number"==typeof r?void 0===t.uc?ne(r)():ne(r)(t.uc):r(void 0===t.uc?null:t.uc)}}}var te,re=[];function ne(e){var t=re[e];return t||(e>=re.length&&(re.length=e+1),re[e]=t=D.get(e)),t}function ae(e){e instanceof yr||"unwind"==e||f(1,e)}function ie(e,t){if(0===e)e=Date.now();else{if(1!==e&&4!==e)return k[hr()>>2]=28,-1;e=te()}return k[t>>2]=e/1e3|0,k[t+4>>2]=e%1e3*1e6|0,0}function oe(e){this.nc=e-16,this.sd=function(e){k[this.nc+4>>2]=e},this.pd=function(e){k[this.nc+8>>2]=e},this.qd=function(){k[this.nc>>2]=0},this.od=function(){M[this.nc+12>>0]=0},this.rd=function(){M[this.nc+13>>0]=0},this.dd=function(e,t){this.sd(e),this.pd(t),this.qd(),this.od(),this.rd()}}function ue(e,t){for(var r=0,n=e.length-1;0<=n;n--){var a=e[n];"."===a?e.splice(n,1):".."===a?(e.splice(n,1),r++):r&&(e.splice(n,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=ue(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function ce(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 fe(e){if("/"===e)return"/";var t=(e=(e=se(e)).replace(/\\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)}function _e(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){if("string"!=typeof(t=0<=r?arguments[r]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=ue(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."}te=()=>performance.now();var de=[];function le(e,t){de[e]={input:[],bc:[],mc:t},Ue(e,he)}var he={open:function(e){var t=de[e.node.rc];if(!t)throw new xe(43);e.ac=t,e.seekable=!1},close:function(e){e.ac.mc.flush(e.ac)},flush:function(e){e.ac.mc.flush(e.ac)},read:function(e,t,r,n){if(!e.ac||!e.ac.mc.Nc)throw new xe(60);for(var a=0,i=0;i<n;i++){try{var o=e.ac.mc.Nc(e.ac)}catch(e){throw new xe(29)}if(void 0===o&&0===a)throw new xe(6);if(null==o)break;a++,t[r+i]=o}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,n){if(!e.ac||!e.ac.mc.Gc)throw new xe(60);try{for(var a=0;a<n;a++)e.ac.mc.Gc(e.ac,t[r+a])}catch(e){throw new xe(29)}return n&&(e.node.timestamp=Date.now()),a}},pe={Nc: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()},Gc:function(e,t){null===t||10===t?(h(L(e.bc,0)),e.bc=[]):0!=t&&e.bc.push(t)},flush:function(e){e.bc&&0<e.bc.length&&(h(L(e.bc,0)),e.bc=[])}},me={Gc:function(e,t){null===t||10===t?(p(L(e.bc,0)),e.bc=[]):0!=t&&e.bc.push(t)},flush:function(e){e.bc&&0<e.bc.length&&(p(L(e.bc,0)),e.bc=[])}},be={fc:null,ic:function(){return be.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(24576==(61440&r)||4096==(61440&r))throw new xe(63);return be.fc||(be.fc={dir:{node:{ec:be.Xb.ec,hc:be.Xb.hc,pc:be.Xb.pc,vc:be.Xb.vc,Tc:be.Xb.Tc,Ac:be.Xb.Ac,Uc:be.Xb.Uc,Sc:be.Xb.Sc,wc:be.Xb.wc},stream:{kc:be.Zb.kc}},file:{node:{ec:be.Xb.ec,hc:be.Xb.hc},stream:{kc:be.Zb.kc,read:be.Zb.read,write:be.Zb.write,Ic:be.Zb.Ic,Oc:be.Zb.Oc,Qc:be.Zb.Qc}},link:{node:{ec:be.Xb.ec,hc:be.Xb.hc,sc:be.Xb.sc},stream:{}},Jc:{node:{ec:be.Xb.ec,hc:be.Xb.hc},stream:De}}),16384==(61440&(r=ze(e,t,r,n)).mode)?(r.Xb=be.fc.dir.node,r.Zb=be.fc.dir.stream,r.Yb={}):32768==(61440&r.mode)?(r.Xb=be.fc.file.node,r.Zb=be.fc.file.stream,r.$b=0,r.Yb=null):40960==(61440&r.mode)?(r.Xb=be.fc.link.node,r.Zb=be.fc.link.stream):8192==(61440&r.mode)&&(r.Xb=be.fc.Jc.node,r.Zb=be.fc.Jc.stream),r.timestamp=Date.now(),e&&(e.Yb[t]=r,e.timestamp=r.timestamp),r},Fd:function(e){return e.Yb?e.Yb.subarray?e.Yb.subarray(0,e.$b):new Uint8Array(e.Yb):new Uint8Array(0)},Kc:function(e,t){var r=e.Yb?e.Yb.length:0;r>=t||(t=Math.max(t,r*(1048576>r?2:1.125)>>>0),0!=r&&(t=Math.max(t,256)),r=e.Yb,e.Yb=new Uint8Array(t),0<e.$b&&e.Yb.set(r.subarray(0,e.$b),0))},md:function(e,t){if(e.$b!=t)if(0==t)e.Yb=null,e.$b=0;else{var r=e.Yb;e.Yb=new Uint8Array(t),r&&e.Yb.set(r.subarray(0,Math.min(t,e.$b))),e.$b=t}},Xb:{ec:function(e){var t={};return t.Zc=8192==(61440&e.mode)?e.id:1,t.Fc=e.id,t.mode=e.mode,t.kd=1,t.uid=0,t.bd=0,t.rc=e.rc,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.$b:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.Vc=new Date(e.timestamp),t.jd=new Date(e.timestamp),t.Yc=new Date(e.timestamp),t.Wc=4096,t.Xc=Math.ceil(t.size/t.Wc),t},hc:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&be.md(e,t.size)},pc:function(){throw Ae[44]},vc:function(e,t,r,n){return be.createNode(e,t,r,n)},Tc:function(e,t,r){if(16384==(61440&e.mode)){try{var n=Fe(t,r)}catch(e){}if(n)for(var a in n.Yb)throw new xe(55)}delete e.parent.Yb[e.name],e.parent.timestamp=Date.now(),e.name=r,t.Yb[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},Ac:function(e,t){delete e.Yb[t],e.timestamp=Date.now()},Uc:function(e,t){var r,n=Fe(e,t);for(r in n.Yb)throw new xe(55);delete e.Yb[t],e.timestamp=Date.now()},Sc:function(e){var t,r=[".",".."];for(t in e.Yb)e.Yb.hasOwnProperty(t)&&r.push(t);return r},wc:function(e,t,r){return(e=be.createNode(e,t,41471,0)).link=r,e},sc:function(e){if(40960!=(61440&e.mode))throw new xe(28);return e.link}},Zb:{read:function(e,t,r,n,a){var i=e.node.Yb;if(a>=e.node.$b)return 0;if(8<(e=Math.min(e.node.$b-a,n))&&i.subarray)t.set(i.subarray(a,a+e),r);else for(n=0;n<e;n++)t[r+n]=i[a+n];return e},write:function(e,t,r,n,a,i){if(t.buffer===M.buffer&&(i=!1),!n)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.Yb||e.Yb.subarray)){if(i)return e.Yb=t.subarray(r,r+n),e.$b=n;if(0===e.$b&&0===a)return e.Yb=t.slice(r,r+n),e.$b=n;if(a+n<=e.$b)return e.Yb.set(t.subarray(r,r+n),a),n}if(be.Kc(e,a+n),e.Yb.subarray&&t.subarray)e.Yb.set(t.subarray(r,r+n),a);else for(i=0;i<n;i++)e.Yb[a+i]=t[r+i];return e.$b=Math.max(e.$b,a+n),n},kc:function(e,t,r){if(1===r?t+=e.position:2===r&&32768==(61440&e.node.mode)&&(t+=e.node.$b),0>t)throw new xe(28);return t},Ic:function(e,t,r){be.Kc(e.node,t+r),e.node.$b=Math.max(e.node.$b,t+r)},Oc:function(e,t,r,n,a,i){if(0!==t)throw new xe(28);if(32768!=(61440&e.node.mode))throw new xe(43);if(e=e.node.Yb,2&i||e.buffer!==y){if((0<n||n+r<e.length)&&(e=e.subarray?e.subarray(n,n+r):Array.prototype.slice.call(e,n,n+r)),n=!0,Z(),!(r=void 0))throw new xe(48);M.set(e,r)}else n=!1,r=e.byteOffset;return{nc:r,Bd:n}},Qc:function(e,t,r,n,a){if(32768!=(61440&e.node.mode))throw new xe(43);return 2&a||be.Zb.write(e,t,0,n,r,!1),0}}},we=null,ge={},ve=[],ye=1,Me=null,Ee=!0,xe=null,Ae={};function ke(e,t){if(t=t||{},!(e=_e("/",e)))return{path:"",node:null};var r,n={Lc:!0,Hc:0};for(r in n)void 0===t[r]&&(t[r]=n[r]);if(8<t.Hc)throw new xe(32);e=ue(e.split("/").filter((function(e){return!!e})),!1);var a=we;for(n="/",r=0;r<e.length;r++){var i=r===e.length-1;if(i&&t.parent)break;if(a=Fe(a,e[r]),n=se(n+"/"+e[r]),a.qc&&(!i||i&&t.Lc)&&(a=a.qc.root),!i||t.Dc)for(i=0;40960==(61440&a.mode);)if(a=Ye(n),a=ke(n=_e(ce(n),a),{Hc:t.Hc}).node,40<i++)throw new xe(32)}return{path:n,node:a}}function Te(e){for(var t;;){if(e===e.parent)return e=e.ic.Pc,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}}function Re(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%Me.length}function Fe(e,t){var r;if(r=(r=Se(e,"x"))?r:e.Xb.pc?0:2)throw new xe(r,e);for(r=Me[Re(e.id,t)];r;r=r.lc){var n=r.name;if(r.parent.id===e.id&&n===t)return r}return e.Xb.pc(e,t)}function ze(e,t,r,n){return t=Re((e=new ur(e,t,r,n)).parent.id,e.name),e.lc=Me[t],Me[t]=e}var Le={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Oe(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function Se(e,t){return Ee?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2}function Ie(e,t){try{return Fe(e,t),20}catch(e){}return Se(e,"wx")}function Pe(e,t){Qe||((Qe=function(){}).prototype={});var r,n=new Qe;for(r in e)n[r]=e[r];return e=n,t=function(e){for(e=e||0;e<=4096;e++)if(!ve[e])return e;throw new xe(33)}(t),e.jc=t,ve[t]=e}var Be,De={open:function(e){e.Zb=ge[e.node.rc].Zb,e.Zb.open&&e.Zb.open(e)},kc:function(){throw new xe(70)}};function Ue(e,t){ge[e]={Zb:t}}function Ce(e,t){var r="/"===t,n=!t;if(r&&we)throw new xe(10);if(!r&&!n){var a=ke(t,{Lc:!1});if(t=a.path,(a=a.node).qc)throw new xe(10);if(16384!=(61440&a.mode))throw new xe(54)}t={type:e,Jd:{},Pc:t,hd:[]},(e=e.ic(t)).ic=t,t.root=e,r?we=e:a&&(a.qc=t,a.ic&&a.ic.hd.push(t))}function Ve(e,t,r){var n=ke(e,{parent:!0}).node;if(!(e=fe(e))||"."===e||".."===e)throw new xe(28);var a=Ie(n,e);if(a)throw new xe(a);if(!n.Xb.vc)throw new xe(63);return n.Xb.vc(n,e,t,r)}function qe(e){return Ve(e,16895,0)}function Ne(e,t,r){void 0===r&&(r=t,t=438),Ve(e,8192|t,r)}function Xe(e,t){if(!_e(e))throw new xe(44);var r=ke(t,{parent:!0}).node;if(!r)throw new xe(44);var n=Ie(r,t=fe(t));if(n)throw new xe(n);if(!r.Xb.wc)throw new xe(63);r.Xb.wc(r,t,e)}function Ye(e){if(!(e=ke(e).node))throw new xe(44);if(!e.Xb.sc)throw new xe(28);return _e(Te(e.parent),e.Xb.sc(e))}function He(e,t){if(!(e=ke(e,{Dc:!t}).node))throw new xe(44);if(!e.Xb.ec)throw new xe(63);return e.Xb.ec(e)}function We(e){return He(e,!0)}function je(e,t,r,a){if(""===e)throw new xe(44);if("string"==typeof t){var i=Le[t];if(void 0===i)throw Error("Unknown file open mode: "+t);t=i}if(r=64&t?4095&(void 0===r?438:r)|32768:0,"object"==typeof e)var o=e;else{e=se(e);try{o=ke(e,{Dc:!(131072&t)}).node}catch(e){}}if(i=!1,64&t)if(o){if(128&t)throw new xe(20)}else o=Ve(e,r,0),i=!0;if(!o)throw new xe(44);if(8192==(61440&o.mode)&&(t&=-513),65536&t&&16384!=(61440&o.mode))throw new xe(54);if(!i&&(r=o?40960==(61440&o.mode)?32:16384==(61440&o.mode)&&("r"!==Oe(t)||512&t)?31:Se(o,Oe(t)):44))throw new xe(r);if(512&t){if(!(r="string"==typeof(r=o)?ke(r,{Dc:!0}).node:r).Xb.hc)throw new xe(63);if(16384==(61440&r.mode))throw new xe(31);if(32768!=(61440&r.mode))throw new xe(28);if(i=Se(r,"w"))throw new xe(i);r.Xb.hc(r,{size:0,timestamp:Date.now()})}return t&=-131713,(a=Pe({node:o,path:Te(o),id:o.id,flags:t,mode:o.mode,seekable:!0,position:0,Zb:o.Zb,Xb:o.Xb,xd:[],error:!1},a)).Zb.open&&a.Zb.open(a),!n.logReadFiles||1&t||(Je||(Je={}),e in Je||(Je[e]=1)),a}function Ge(e,t,r){if(null===e.jc)throw new xe(8);if(!e.seekable||!e.Zb.kc)throw new xe(70);if(0!=r&&1!=r&&2!=r)throw new xe(28);e.position=e.Zb.kc(e,t,r),e.xd=[]}function Ze(){xe||((xe=function(e,t){this.node=t,this.nd=function(e){this.dc=e},this.nd(e),this.message="FS error"}).prototype=Error(),xe.prototype.constructor=xe,[44].forEach((function(e){Ae[e]=new xe(e),Ae[e].stack="<generic error, no stack>"})))}function $e(e,t,r){e=se("/dev/"+e);var n=function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r}(!!t,!!r);Ke||(Ke=64);var a=Ke++<<8|0;Ue(a,{open:function(e){e.seekable=!1},close:function(){r&&r.buffer&&r.buffer.length&&r(10)},read:function(e,r,n,a){for(var i=0,o=0;o<a;o++){try{var u=t()}catch(e){throw new xe(29)}if(void 0===u&&0===i)throw new xe(6);if(null==u)break;i++,r[n+o]=u}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,n,a){for(var i=0;i<a;i++)try{r(t[n+i])}catch(e){throw new xe(29)}return a&&(e.node.timestamp=Date.now()),i}}),Ne(e,n,a)}var Ke,Qe,Je,et={};function tt(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&se(t)!==se(Te(e.node)))return-54;throw e}return k[r>>2]=n.Zc,k[r+4>>2]=0,k[r+8>>2]=n.Fc,k[r+12>>2]=n.mode,k[r+16>>2]=n.kd,k[r+20>>2]=n.uid,k[r+24>>2]=n.bd,k[r+28>>2]=n.rc,k[r+32>>2]=0,Q=[n.size>>>0,(K=n.size,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[r+40>>2]=Q[0],k[r+44>>2]=Q[1],k[r+48>>2]=4096,k[r+52>>2]=n.Xc,k[r+56>>2]=n.Vc.getTime()/1e3|0,k[r+60>>2]=0,k[r+64>>2]=n.jd.getTime()/1e3|0,k[r+68>>2]=0,k[r+72>>2]=n.Yc.getTime()/1e3|0,k[r+76>>2]=0,Q=[n.Fc>>>0,(K=n.Fc,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[r+80>>2]=Q[0],k[r+84>>2]=Q[1],0}var rt=void 0;function nt(){return k[(rt+=4)-4>>2]}function at(e){if(!(e=ve[e]))throw new xe(8);return e}var it=[];function ot(e,t){if(!q&&!g)if(t)e();else try{e()}catch(e){ae(e)}}function ut(e,t){setTimeout((function(){ot(e)}),t)}var st,ct,ft,_t=!1,dt=null,lt=0,ht=null,pt=0,mt=0,bt=0,wt=[],gt={},vt=!1,yt=!1,Mt=[];function Et(){function e(){yt=document.pointerLockElement===n.canvas||document.mozPointerLockElement===n.canvas||document.webkitPointerLockElement===n.canvas||document.msPointerLockElement===n.canvas}if(n.preloadPlugins||(n.preloadPlugins=[]),!Pt){Pt=!0;try{Bt=!0}catch(e){Bt=!1,h("warning: no blob constructor, cannot create blobs with mimetypes")}Dt="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:Bt?null:h("warning: no BlobBuilder"),Ut="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,n.Rc||void 0!==Ut||(h("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),n.Rc=!0),n.preloadPlugins.push({canHandle:function(e){return!n.Rc&&/\\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,r,a){var i=null;if(Bt)try{(i=new Blob([e],{type:Lt(t)})).size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:Lt(t)}))}catch(e){!function(e){d||(d={}),d[e]||(d[e]=1,p(e))}("Blob constructor present but fails: "+e+"; falling back to blob builder")}i||((i=new Dt).append(new Uint8Array(e).buffer),i=i.getBlob());var o=Ut.createObjectURL(i),u=new Image;u.onload=()=>{u.complete||Z("Image "+t+" could not be decoded");var a=document.createElement("canvas");a.width=u.width,a.height=u.height,a.getContext("2d").drawImage(u,0,0),n.preloadedImages[t]=a,Ut.revokeObjectURL(o),r&&r(e)},u.onerror=()=>{h("Image "+o+" could not be decoded"),a&&a()},u.src=o}}),n.preloadPlugins.push({canHandle:function(e){return!n.Id&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,r,a){function i(a){u||(u=!0,n.preloadedAudios[t]=a,r&&r(e))}function o(){u||(u=!0,n.preloadedAudios[t]=new Audio,a&&a())}var u=!1;if(!Bt)return o();try{var s=new Blob([e],{type:Lt(t)})}catch(e){return o()}s=Ut.createObjectURL(s);var c=new Audio;c.addEventListener("canplaythrough",(function(){i(c)}),!1),c.onerror=function(){if(!u){h("warning: browser could not fully decode audio "+t+", trying slower base64 approach");for(var r="",n=0,a=0,o=0;o<e.length;o++)for(n=n<<8|e[o],a+=8;6<=a;){var s=n>>a-6&63;a-=6,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[s]}2==a?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&n)<<4],r+="=="):4==a&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&n)<<2],r+="="),c.src="data:audio/x-"+t.substr(-3)+";base64,"+r,i(c)}},c.src=s,ut((function(){i(c)}),1e4)}});var t=n.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),n.elementPointerLock&&t.addEventListener("click",(function(e){!yt&&n.canvas.requestPointerLock&&(n.canvas.requestPointerLock(),e.preventDefault())}),!1))}}function xt(e,t,r,a){if(t&&n.Cc&&e==n.canvas)return n.Cc;var i;if(t){var o={antialias:!1,alpha:!1,gd:1};if(a)for(var u in a)o[u]=a[u];if(void 0!==er&&(i=function(e,t){e.Mc||(e.Mc=e.getContext,e.getContext=function(t,r){return"webgl"==t==(r=e.Mc(t,r))instanceof WebGLRenderingContext?r:null});var r=e.getContext("webgl",t);return r?function(e,t){var r=$t(Zt),n={Gd:r,attributes:t,version:t.gd,Bc:e};return e.canvas&&(e.canvas.zd=n),Zt[r]=n,(void 0===t.$c||t.$c)&&function(e){if(e||(e=Qt),!e.ed){e.ed=!0;var t=e.Bc;!function(e){var t=e.getExtension("ANGLE_instanced_arrays");t&&(e.vertexAttribDivisor=function(e,r){t.vertexAttribDivisorANGLE(e,r)},e.drawArraysInstanced=function(e,r,n,a){t.drawArraysInstancedANGLE(e,r,n,a)},e.drawElementsInstanced=function(e,r,n,a,i){t.drawElementsInstancedANGLE(e,r,n,a,i)})}(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.Dd=t.getExtension("EXT_disjoint_timer_query"),t.Hd=t.getExtension("WEBGL_multi_draw"),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}(n),r}(r,t):0}(e,o)))var s=Zt[i].Bc}else s=e.getContext("2d");return s?(r&&(t||void 0===nr||Z("cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),n.Cc=s,t&&(Qt=Zt[i],n.Cc=nr=Qt&&Qt.Bc),n.Ld=t,Mt.forEach((function(e){e()})),Et()),s):null}var At=!1,kt=void 0,Tt=void 0;function Rt(){return!!vt&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)}var Ft=0;function zt(e){if("function"==typeof requestAnimationFrame)requestAnimationFrame(e);else{var t=Date.now();if(0===Ft)Ft=t+1e3/60;else for(;t+2>=Ft;)Ft+=1e3/60;setTimeout(e,Math.max(Ft-t,0))}}function Lt(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]}var Ot=[];function St(){var e=n.canvas;Ot.forEach((function(t){t(e.width,e.height)}))}function It(e,t,r){t&&r?(e.yd=t,e.cd=r):(t=e.yd,r=e.cd);var a=t,i=r;if(n.forcedAspectRatio&&0<n.forcedAspectRatio&&(a/i<n.forcedAspectRatio?a=Math.round(i*n.forcedAspectRatio):i=Math.round(a/n.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/i);a=Math.round(a*o),i=Math.round(i*o)}Tt?(e.width!=a&&(e.width=a),e.height!=i&&(e.height=i),void 0!==e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=t&&(e.width=t),e.height!=r&&(e.height=r),void 0!==e.style&&(a!=t||i!=r?(e.style.setProperty("width",a+"px","important"),e.style.setProperty("height",i+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))}var Pt,Bt,Dt,Ut,Ct,Vt=[];function qt(e,t){T[e>>2]=t,T[e+4>>2]=t/4294967296|0}function Nt(e,t,r,n,a){function i(t){var r=0,n=0;t&&(n=v.response?v.response.byteLength:0,r=dr(n),E.set(new Uint8Array(v.response),r)),T[e+12>>2]=r,qt(e+16,n)}var o=T[e+8>>2];if(o){var u=O(o),s=e+112,c=O(s);c||(c="GET");var f=T[s+52>>2],_=T[s+56>>2],d=!!T[s+60>>2],l=T[s+68>>2],h=T[s+72>>2];o=T[s+76>>2];var p=T[s+80>>2],m=T[s+84>>2];s=T[s+88>>2];var b=!!(1&f),w=!!(2&f);f=!!(64&f),l=l?O(l):void 0,h=h?O(h):void 0;var g=p?O(p):void 0,v=new XMLHttpRequest;if(v.withCredentials=d,v.open(c,u,!f,l,h),f||(v.timeout=_),v.Ad=u,v.responseType="arraybuffer",p&&v.overrideMimeType(g),o)for(;(c=T[o>>2])&&(u=T[o+4>>2]);)o+=8,c=O(c),u=O(u),v.setRequestHeader(c,u);Vt.push(v),T[e+0>>2]=Vt.length,o=m&&s?E.slice(m,m+s):null,v.onload=function(n){i(b&&!w);var a=v.response?v.response.byteLength:0;qt(e+24,0),a&&qt(e+32,a),A[e+40>>1]=v.readyState,A[e+42>>1]=v.status,v.statusText&&S(v.statusText,E,e+44,64),200<=v.status&&300>v.status?t&&t(e,v,n):r&&r(e,v,n)},v.onerror=function(t){i(b);var n=v.status;qt(e+24,0),qt(e+32,v.response?v.response.byteLength:0),A[e+40>>1]=v.readyState,A[e+42>>1]=n,r&&r(e,v,t)},v.ontimeout=function(t){r&&r(e,v,t)},v.onprogress=function(t){var r=b&&w&&v.response?v.response.byteLength:0,a=0;b&&w&&(a=dr(r),E.set(new Uint8Array(v.response),a)),T[e+12>>2]=a,qt(e+16,r),qt(e+24,t.loaded-r),qt(e+32,t.total),A[e+40>>1]=v.readyState,3<=v.readyState&&0===v.status&&0<t.loaded&&(v.status=200),A[e+42>>1]=v.status,v.statusText&&S(v.statusText,E,e+44,64),n&&n(e,v,t),a&&_r(a)},v.onreadystatechange=function(t){A[e+40>>1]=v.readyState,2<=v.readyState&&(A[e+42>>1]=v.status),a&&a(e,v,t)};try{v.send(o)}catch(t){r&&r(e,v,t)}}else r(e,0,"no url specified!")}function Xt(e,t,r,n){var a=Ct;if(a){var i=T[e+112+64>>2];i||(i=T[e+8>>2]);var o=O(i);try{var u=a.transaction(["FILES"],"readwrite").objectStore("FILES").put(t,o);u.onsuccess=function(){A[e+40>>1]=4,A[e+42>>1]=200,S("OK",E,e+44,64),r(e,0,o)},u.onerror=function(t){A[e+40>>1]=4,A[e+42>>1]=413,S("Payload Too Large",E,e+44,64),n(e,0,t)}}catch(t){n(e,0,t)}}else n(e,0,"IndexedDB not available!")}var Yt,Ht={};function Wt(){if(!Yt){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",_:c||"./this.program"};for(e in Ht)void 0===Ht[e]?delete t[e]:t[e]=Ht[e];var r=[];for(e in t)r.push(e+"="+t[e]);Yt=r}return Yt}var jt=1,Gt=[],Zt=[];function $t(e){for(var t=jt++,r=e.length;r<t;r++)e[r]=null;return t}var Kt,Qt,Jt,er={};function tr(e){return 0==e%4&&(0!=e%100||0==e%400)}function rr(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var nr,ar=[31,29,31,30,31,30,31,31,30,31,30,31],ir=[31,28,31,30,31,30,31,31,30,31,30,31];function or(e,t){for(e=new Date(e.getTime());0<t;){var r=e.getMonth(),n=(tr(e.getFullYear())?ar:ir)[r];if(!(t>n-e.getDate())){e.setDate(e.getDate()+t);break}t-=n-e.getDate()+1,e.setDate(1),11>r?e.setMonth(r+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function ur(e,t,r,n){e||(e=this),this.parent=e,this.ic=e.ic,this.qc=null,this.id=ye++,this.name=t,this.mode=r,this.Xb={},this.Zb={},this.rc=n}function sr(e,t){var r=Array(I(e)+1);return e=S(e,r,0,r.length),t&&(r.length=e),r}Object.defineProperties(ur.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(),Me=Array(4096),Ce(be,"/"),qe("/tmp"),qe("/home"),qe("/home/web_user"),function(){qe("/dev"),Ue(259,{read:function(){return 0},write:function(e,t,r,n){return n}}),Ne("/dev/null",259),le(1280,pe),le(1536,me),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(){Z("randomDevice")}}();$e("random",e),$e("urandom",e),qe("/dev/shm"),qe("/dev/shm/tmp")}(),function(){qe("/proc");var e=qe("/proc/self");qe("/proc/self/fd"),Ce({ic:function(){var t=ze(e,"fd",16895,73);return t.Xb={pc:function(e,t){var r=ve[+t];if(!r)throw new xe(8);return(e={parent:null,ic:{Pc:"fake"},Xb:{sc:function(){return r.path}}}).parent=e}},t}},"/proc/self/fd")}(),n.requestFullscreen=function(e,t){!function(e,t){function r(){vt=!1;var e=a.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(a.exitFullscreen=Rt,kt&&a.requestPointerLock(),vt=!0,Tt?("undefined"!=typeof SDL&&(k[SDL.screen>>2]=8388608|T[SDL.screen>>2]),It(n.canvas),St()):It(a)):(e.parentNode.insertBefore(a,e),e.parentNode.removeChild(e),Tt?("undefined"!=typeof SDL&&(k[SDL.screen>>2]=-8388609&T[SDL.screen>>2]),It(n.canvas),St()):It(a)),n.onFullScreen&&n.onFullScreen(vt),n.onFullscreen&&n.onFullscreen(vt)}void 0===(kt=e)&&(kt=!0),void 0===(Tt=t)&&(Tt=!1);var a=n.canvas;At||(At=!0,document.addEventListener("fullscreenchange",r,!1),document.addEventListener("mozfullscreenchange",r,!1),document.addEventListener("webkitfullscreenchange",r,!1),document.addEventListener("MSFullscreenChange",r,!1));var i=document.createElement("div");a.parentNode.insertBefore(i,a),i.appendChild(a),i.requestFullscreen=i.requestFullscreen||i.mozRequestFullScreen||i.msRequestFullscreen||(i.webkitRequestFullscreen?function(){i.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(i.webkitRequestFullScreen?function(){i.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),i.requestFullscreen()}(e,t)},n.requestAnimationFrame=function(e){zt(e)},n.setCanvasSize=function(e,t,r){It(n.canvas,e,t),r||St()},n.pauseMainLoop=function(){dt=null,lt++},n.resumeMainLoop=function(){lt++;var t=pt,r=mt,a=ht;ht=null,function(e){function t(){if(r<lt){if(!m)try{Er(w)}catch(e){ae(e)}return!1}return!0}!ht||Z("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."),ht=e;var r=lt;_t=!1,ct=function(){if(!g)if(0<wt.length){var r=Date.now(),a=wt.shift();if(a.ad(a.uc),ft){var i=ft,o=0==i%1?i-1:Math.floor(i);ft=a.Cd?o:(8*i+(o+.5))/9}h(\'main loop blocker "\'+a.name+\'" took \'+(Date.now()-r)+" ms"),n.setStatus&&(r=n.statusMessage||"Please wait...",a=ft,i=gt.Ed,a?a<i?n.setStatus(r+" ("+(i-a)+"/"+i+")"):n.setStatus(r):n.setStatus("")),t()&&setTimeout(ct,0)}else t()&&(bt=bt+1|0,1==pt&&1<mt&&0!=bt%mt?dt():(0==pt&&(st=te()),g||n.preMainLoop&&!1===n.preMainLoop()||(ot(e),n.postMainLoop&&n.postMainLoop()),t()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.ld&&SDL.audio.ld(),dt())))}}(a),function(t,r){if(pt=t,mt=r,ht)if(_t||(_t=!0),0==t)dt=function(){var e=0|Math.max(0,st+r-te());setTimeout(ct,e)};else if(1==t)dt=function(){zt(ct)};else if(2==t){if(void 0===e){var a=[];addEventListener("message",(function(e){"setimmediate"!==e.data&&"setimmediate"!==e.data.target||(e.stopPropagation(),a.shift()())}),!0),e=function(e){a.push(e),void 0===n.setImmediates&&(n.setImmediates=[]),n.setImmediates.push(e),postMessage({target:"setimmediate"})}}dt=function(){e(ct)}}}(t,r),dt()},n.getUserMedia=function(){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(void 0)},n.createContext=function(e,t,r,n){return xt(e,t,r,n)},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){Ct=e,G()}(e.target.result)},r.onerror=function(e){t()}}(0,(function(){Ct=!1,G()})),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||j();var cr={z:function(e,t){return ie(e,t)},a:function(e){return dr(e+16)+16},b:function(e,t,r){throw new oe(e).dd(t,r),e},k:function(e,t,r){rt=r;try{var n=at(e);switch(t){case 0:var a=nt();return 0>a?-28:je(n.path,n.flags,0,a).jc;case 1:case 2:return 0;case 3:return n.flags;case 4:return a=nt(),n.flags|=a,0;case 5:return a=nt(),x[a+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return k[hr()>>2]=28,-1;default:return-28}}catch(e){if(void 0===et||!(e instanceof xe))throw e;return-e.dc}},E:function(e,t,r){rt=r;try{var n=at(e);switch(t){case 21509:case 21505:return n.ac?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.ac?0:-59;case 21519:if(!n.ac)return-59;var a=nt();return k[a>>2]=0;case 21520:return n.ac?-28:-59;case 21531:if(e=a=nt(),!n.Zb.fd)throw new xe(59);return n.Zb.fd(n,t,e);case 21523:case 21524:return n.ac?0:-59;default:Z("bad ioctl syscall "+t)}}catch(e){if(void 0===et||!(e instanceof xe))throw e;return-e.dc}},C:function(e,t){try{return tt(We,e=O(e),t)}catch(e){if(void 0===et||!(e instanceof xe))throw e;return-e.dc}},o:function(e,t,r){rt=r;try{return je(O(e),t,r?nt():0).jc}catch(e){if(void 0===et||!(e instanceof xe))throw e;return-e.dc}},D:function(e,t){try{return tt(He,e=O(e),t)}catch(e){if(void 0===et||!(e instanceof xe))throw e;return-e.dc}},x:function(e,t){try{return Xe(e=O(e),t=O(t)),0}catch(e){if(void 0===et||!(e instanceof xe))throw e;return-e.dc}},y:function(e){try{var t=ke(e=O(e),{parent:!0}).node;if(!t)throw new xe(44);var r=fe(e),n=Fe(t,r);e:{try{var a=Fe(t,r)}catch(e){var i=e.dc;break e}var o=Se(t,"wx");i=o||(16384==(61440&a.mode)?31:0)}if(i)throw new xe(i);if(!t.Xb.Ac)throw new xe(63);if(n.qc)throw new xe(10);t.Xb.Ac(t,r);var u=Re(n.parent.id,n.name);if(Me[u]===n)Me[u]=n.lc;else for(var s=Me[u];s;){if(s.lc===n){s.lc=n.lc;break}s=s.lc}return 0}catch(e){if(void 0===et||!(e instanceof xe))throw e;return-e.dc}},F:function(e){delete Vt[e-1]},c:function(){Z("")},J:ie,K:function(){self.postMessage({t:"gfx"})},r: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=I(e)+1;var r=dr(t);return S(e,E,r,t+1),r},L:function(){self.postMessage({t:"licerr"})},f:function(e,t,r){var n;for(it.length=0,r>>=2;n=E[t++];)(n=105>n)&&1&r&&r++,it.push(n?F[r++>>1]:k[r]),++r;return J[e].apply(null,it)},l:function(e,t,r){function n(){ne(e)(t)}0<=r?ut(n,r):function(e){zt((function(){ot(e)}))}(n)},w:function(){return 2147483648},H:function(){return!1},t:function(e,t,r){E.copyWithin(e,t,t+r)},u:function(e){var t=E.length;if(2147483648<(e>>>=0))return!1;for(var r=1;4>=r;r*=2){var n=t*(1+.2/r);n=Math.min(n,e+100663296),0<(n=Math.max(e,n))%65536&&(n+=65536-n%65536);e:{try{b.grow(Math.min(2147483648,n)-y.byteLength+65535>>>16),B();var a=1;break e}catch(e){}a=void 0}if(a)return!0}return!1},G:function(e,t,r,n,a){function i(e,r){Xt(e,r.response,(function(e){ot((function(){d?ne(d)(e):t&&t(e)}),v)}),(function(e){ot((function(){d?ne(d)(e):t&&t(e)}),v)}))}function o(e){ot((function(){p?ne(p)(e):a&&a(e)}),v)}function u(e){ot((function(){l?ne(l)(e):r&&r(e)}),v)}function s(e){ot((function(){h?ne(h)(e):n&&n(e)}),v)}function c(e){ot((function(){d?ne(d)(e):t&&t(e)}),v)}var f=e+112,_=O(f),d=T[f+36>>2],l=T[f+40>>2],h=T[f+44>>2],p=T[f+48>>2],m=T[f+52>>2],b=!!(4&m),w=!!(32&m),g=!!(16&m),v=!!(64&m);if("EM_IDB_STORE"===_)_=T[f+84>>2],Xt(e,E.slice(_,_+T[f+88>>2]),c,u);else if("EM_IDB_DELETE"===_)!function(e,t,r){var n=Ct;if(n){var a=T[e+112+64>>2];a||(a=T[e+8>>2]),a=O(a);try{var i=n.transaction(["FILES"],"readwrite").objectStore("FILES").delete(a);i.onsuccess=function(r){r=r.target.result,T[e+12>>2]=0,qt(e+16,0),qt(e+24,0),qt(e+32,0),A[e+40>>1]=4,A[e+42>>1]=200,S("OK",E,e+44,64),t(e,0,r)},i.onerror=function(t){A[e+40>>1]=4,A[e+42>>1]=404,S("Not Found",E,e+44,64),r(e,0,t)}}catch(t){r(e,0,t)}}else r(e,0,"IndexedDB not available!")}(e,c,u);else if(g){if(w)return 0;Nt(e,b?i:c,u,s,o)}else!function(e,t,r){var n=Ct;if(n){var a=T[e+112+64>>2];a||(a=T[e+8>>2]),a=O(a);try{var i=n.transaction(["FILES"],"readonly").objectStore("FILES").get(a);i.onsuccess=function(n){if(n.target.result){var a=(n=n.target.result).byteLength||n.length,i=dr(a);E.set(new Uint8Array(n),i),T[e+12>>2]=i,qt(e+16,a),qt(e+24,0),qt(e+32,a),A[e+40>>1]=4,A[e+42>>1]=200,S("OK",E,e+44,64),t(e,0,n)}else A[e+40>>1]=4,A[e+42>>1]=404,S("Not Found",E,e+44,64),r(e,0,"no data")},i.onerror=function(t){A[e+40>>1]=4,A[e+42>>1]=404,S("Not Found",E,e+44,64),r(e,0,t)}}catch(t){r(e,0,t)}}else r(e,0,"IndexedDB not available!")}(e,c,w?u:b?function(e){Nt(e,i,u,s,o)}:function(e){Nt(e,c,u,s,o)});return e},A:function(e,t){var r=0;return Wt().forEach((function(n,a){var i=t+r;for(a=k[e+4*a>>2]=i,i=0;i<n.length;++i)M[a++>>0]=n.charCodeAt(i);M[a>>0]=0,r+=n.length+1})),0},B:function(e,t){var r=Wt();k[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),k[t>>2]=n,0},I:function(e){Er(e)},j:function(e){try{var t=at(e);if(null===t.jc)throw new xe(8);t.Ec&&(t.Ec=null);try{t.Zb.close&&t.Zb.close(t)}catch(e){throw e}finally{ve[t.jc]=null}return t.jc=null,0}catch(e){if(void 0===et||!(e instanceof xe))throw e;return e.dc}},p:function(e,t,r,n){try{e:{for(var a=at(e),i=e=0;i<r;i++){var o=k[t+(8*i+4)>>2],u=a,s=k[t+8*i>>2],c=o,f=void 0,_=M;if(0>c||0>f)throw new xe(28);if(null===u.jc)throw new xe(8);if(1==(2097155&u.flags))throw new xe(8);if(16384==(61440&u.node.mode))throw new xe(31);if(!u.Zb.read)throw new xe(28);var d=void 0!==f;if(d){if(!u.seekable)throw new xe(70)}else f=u.position;var l=u.Zb.read(u,_,s,c,f);d||(u.position+=l);var h=l;if(0>h){var p=-1;break e}if(e+=h,h<o)break}p=e}return k[n>>2]=p,0}catch(e){if(void 0===et||!(e instanceof xe))throw e;return e.dc}},s:function(e,t,r,n,a){try{var i=at(e);return-9007199254740992>=(e=4294967296*r+(t>>>0))||9007199254740992<=e?-61:(Ge(i,e,n),Q=[i.position>>>0,(K=i.position,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[a>>2]=Q[0],k[a+4>>2]=Q[1],i.Ec&&0===e&&0===n&&(i.Ec=null),0)}catch(e){if(void 0===et||!(e instanceof xe))throw e;return e.dc}},i:function(e,t,r,n){try{e:{for(var a=at(e),i=e=0;i<r;i++){var o=a,u=k[t+8*i>>2],s=k[t+(8*i+4)>>2],c=void 0,f=M;if(0>s||0>c)throw new xe(28);if(null===o.jc)throw new xe(8);if(0==(2097155&o.flags))throw new xe(8);if(16384==(61440&o.node.mode))throw new xe(31);if(!o.Zb.write)throw new xe(28);o.seekable&&1024&o.flags&&Ge(o,0,2);var _=void 0!==c;if(_){if(!o.seekable)throw new xe(70)}else c=o.position;var d=o.Zb.write(o,f,u,s,c,void 0);_||(o.position+=d);var l=d;if(0>l){var h=-1;break e}e+=l}h=e}return k[n>>2]=h,0}catch(e){if(void 0===et||!(e instanceof xe))throw e;return e.dc}},e:function(e){var t=Date.now();return k[e>>2]=t/1e3|0,k[e+4>>2]=t%1e3*1e3|0,0},m:function(e,t){nr.bindTexture(e,Gt[t])},n:function(e,t){for(var r=0;r<e;r++){var n=nr.createTexture(),a=n&&$t(Gt);n?(n.name=a,Gt[a]=n):Kt||(Kt=1282),k[t+4*r>>2]=a}},g:function(e,t,r,n,a,i,o,u,s){var c=nr,f=c.texImage2D;if(s){var _=u-5120;_=1==_?E:4==_?k:6==_?R:5==_||28922==_?T:A;var d=31-Math.clz32(_.BYTES_PER_ELEMENT);s=_.subarray(s>>d,s+a*(n*({5:3,6:4,8:2,29502:3,29504:4}[o-6402]||1)*(1<<d)+4-1&-4)>>d)}else s=null;f.call(c,e,t,r,n,a,i,o,u,s)},h:function(e,t,r){nr.texParameteri(e,t,r)},q:function(e,t){Jt||(Jt=!0,function(){function e(e){return(e=e.toTimeString().match(/\\(([A-Za-z ]+)\\)$/))?e[1]:"GMT"}var t=(new Date).getFullYear(),r=new Date(t,0,1),n=new Date(t,6,1);t=r.getTimezoneOffset();var a=n.getTimezoneOffset(),i=Math.max(t,a);k[br()>>2]=60*i,k[mr()>>2]=Number(t!=a),r=e(r),n=e(n),r=P(r),n=P(n),a<t?(k[pr()>>2]=r,k[pr()+4>>2]=n):(k[pr()>>2]=n,k[pr()+4>>2]=r)}()),e=new Date(1e3*k[e>>2]),k[t>>2]=e.getSeconds(),k[t+4>>2]=e.getMinutes(),k[t+8>>2]=e.getHours(),k[t+12>>2]=e.getDate(),k[t+16>>2]=e.getMonth(),k[t+20>>2]=e.getFullYear()-1900,k[t+24>>2]=e.getDay();var r=new Date(e.getFullYear(),0,1);k[t+28>>2]=(e.getTime()-r.getTime())/864e5|0,k[t+36>>2]=-60*e.getTimezoneOffset();var n=new Date(e.getFullYear(),6,1).getTimezoneOffset();return e=0|(n!=(r=r.getTimezoneOffset())&&e.getTimezoneOffset()==Math.min(r,n)),k[t+32>>2]=e,e=k[pr()+(e?4:0)>>2],k[t+40>>2]=e,t},v:function(e,t,r,n){return function(e,t,r,n){function a(e,t,r){for(e="number"==typeof e?e.toString():e||"";e.length<t;)e=r[0]+e;return e}function i(e,t){return a(e,t,"0")}function o(e,t){function r(e){return 0>e?-1:0<e?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function u(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function s(e){e=or(new Date(e.cc+1900,0,1),e.zc);var t=new Date(e.getFullYear()+1,0,4),r=u(new Date(e.getFullYear(),0,4));return t=u(t),0>=o(r,e)?0>=o(t,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var c=k[n+40>>2];for(var f in n={vd:k[n>>2],ud:k[n+4>>2],xc:k[n+8>>2],tc:k[n+12>>2],oc:k[n+16>>2],cc:k[n+20>>2],yc:k[n+24>>2],zc:k[n+28>>2],Kd:k[n+32>>2],td:k[n+36>>2],wd:c?O(c):""},r=O(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(f,"g"),c[f]);var _="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),d="January February March April May June July August September October November December".split(" ");for(f in c={"%a":function(e){return _[e.yc].substring(0,3)},"%A":function(e){return _[e.yc]},"%b":function(e){return d[e.oc].substring(0,3)},"%B":function(e){return d[e.oc]},"%C":function(e){return i((e.cc+1900)/100|0,2)},"%d":function(e){return i(e.tc,2)},"%e":function(e){return a(e.tc,2," ")},"%g":function(e){return s(e).toString().substring(2)},"%G":function(e){return s(e)},"%H":function(e){return i(e.xc,2)},"%I":function(e){return 0==(e=e.xc)?e=12:12<e&&(e-=12),i(e,2)},"%j":function(e){return i(e.tc+rr(tr(e.cc+1900)?ar:ir,e.oc-1),3)},"%m":function(e){return i(e.oc+1,2)},"%M":function(e){return i(e.ud,2)},"%n":function(){return"\\n"},"%p":function(e){return 0<=e.xc&&12>e.xc?"AM":"PM"},"%S":function(e){return i(e.vd,2)},"%t":function(){return"\\t"},"%u":function(e){return e.yc||7},"%U":function(e){var t=new Date(e.cc+1900,0,1),r=0===t.getDay()?t:or(t,7-t.getDay());return 0>o(r,e=new Date(e.cc+1900,e.oc,e.tc))?i(Math.ceil((31-r.getDate()+(rr(tr(e.getFullYear())?ar:ir,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(r,t)?"01":"00"},"%V":function(e){var t=new Date(e.cc+1901,0,4),r=u(new Date(e.cc+1900,0,4));t=u(t);var n=or(new Date(e.cc+1900,0,1),e.zc);return 0>o(n,r)?"53":0>=o(t,n)?"01":i(Math.ceil((r.getFullYear()<e.cc+1900?e.zc+32-r.getDate():e.zc+1-r.getDate())/7),2)},"%w":function(e){return e.yc},"%W":function(e){var t=new Date(e.cc,0,1),r=1===t.getDay()?t:or(t,0===t.getDay()?1:7-t.getDay()+1);return 0>o(r,e=new Date(e.cc+1900,e.oc,e.tc))?i(Math.ceil((31-r.getDate()+(rr(tr(e.getFullYear())?ar:ir,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(r,t)?"01":"00"},"%y":function(e){return(e.cc+1900).toString().substring(2)},"%Y":function(e){return e.cc+1900},"%z":function(e){var t=0<=(e=e.td);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":function(e){return e.wd},"%%":function(){return"%"}})r.includes(f)&&(r=r.replace(new RegExp(f,"g"),c[f](n)));return(f=sr(r,!1)).length>t?0:(M.set(f,e),f.length-1)}(e,t,r,n)},d:function(e){var t=Date.now()/1e3|0;return e&&(k[e>>2]=t),t}},fr=function(){function e(e){n.asm=e.exports,b=n.asm.M,B(),D=n.asm.R,C.unshift(n.asm.N),G()}var t={a:cr};if(j(),n.instantiateWasm)try{return n.instantiateWasm(t,e)}catch(e){return p("Module.instantiateWasm callback failed with error: "+e),!1}return t=function(e){var t=X;try{e:{try{if(t==X&&l){var r=new Uint8Array(l);break e}if(u){r=u(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){Z(e)}r=void 0}var n=new WebAssembly.Module(r),a=new WebAssembly.Instance(n,e)}catch(t){throw e=t.toString(),p("failed to compile wasm module: "+e),(e.includes("imported Memory")||e.includes("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,n]}(t),e(t[0]),n.asm}();n.___wasm_call_ctors=fr.N,n._zappar_has_initialized=fr.O,n._zappar_invert=fr.P,n._zappar_loaded=fr.Q,n._zappar_pipeline_create=fr.S,n._zappar_pipeline_destroy=fr.T,n._zappar_pipeline_camera_frame_submit=fr.U,n._zappar_pipeline_camera_frame_submit_raw_pointer=fr.V,n._zappar_pipeline_frame_update=fr.W,n._zappar_pipeline_camera_frame_user_data=fr.X,n._zappar_pipeline_camera_model=fr.Y,n._zappar_pipeline_frame_number=fr.Z,n._zappar_pipeline_motion_accelerometer_submit=fr._,n._zappar_pipeline_motion_rotation_rate_submit=fr.$,n._zappar_pipeline_motion_attitude_submit=fr.aa,n._zappar_pipeline_motion_attitude_matrix_submit=fr.ba,n._zappar_pipeline_camera_frame_user_facing=fr.ca,n._zappar_pipeline_camera_frame_texture_matrix=fr.da,n._zappar_pipeline_camera_pose_with_attitude=fr.ea,n._zappar_pipeline_camera_pose_with_origin=fr.fa,n._zappar_pipeline_camera_frame_camera_attitude=fr.ga,n._zappar_pipeline_camera_frame_device_attitude=fr.ha,n._zappar_pipeline_camera_frame_texture_gl=fr.ia,n._zappar_pipeline_camera_frame_upload_gl=fr.ja,n._zappar_pipeline_sequence_record_start=fr.ka,n._zappar_pipeline_sequence_record_stop=fr.la,n._zappar_pipeline_sequence_record_clear=fr.ma,n._zappar_pipeline_sequence_record_device_attitude_matrices_set=fr.na,n._zappar_pipeline_sequence_record_data_size=fr.oa,n._zappar_pipeline_sequence_record_data=fr.pa,n._zappar_pipeline_process_gl=fr.qa,n._zappar_pipeline_camera_pose_default=fr.ra,n._zappar_instant_world_tracker_create=fr.sa,n._zappar_instant_world_tracker_destroy=fr.ta,n._zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw=fr.ua,n._zappar_instant_world_tracker_anchor_pose_raw=fr.va,n._zappar_instant_world_tracker_enabled_set=fr.wa,n._zappar_instant_world_tracker_enabled=fr.xa,n._zappar_image_tracker_create=fr.ya,n._zappar_image_tracker_destroy=fr.za,n._zappar_image_tracker_target_load_from_memory=fr.Aa,n.__Z42zappar_image_tracker_target_load_from_fileP23zappar_image_tracker_tiPKc=fr.Ba;var _r=n._free=fr.Ca;n._zappar_image_tracker_anchor_count=fr.Da,n._zappar_image_tracker_anchor_id=fr.Ea,n._zappar_image_tracker_anchor_pose_raw=fr.Fa,n._zappar_image_tracker_enabled_set=fr.Ga,n._zappar_image_tracker_enabled=fr.Ha,n._zappar_image_tracker_target_loaded_version=fr.Ia,n._zappar_image_tracker_target_count=fr.Ja,n.__Z46zappar_image_tracker_target_preview_compressedP23zappar_image_tracker_tii=fr.Ka,n.__Z51zappar_image_tracker_target_preview_compressed_sizeP23zappar_image_tracker_tii=fr.La,n.__Z55zappar_image_tracker_target_preview_compressed_mimetypeP23zappar_image_tracker_tii=fr.Ma,n.__Z40zappar_image_tracker_target_preview_rgbaP23zappar_image_tracker_tii=fr.Na,n.__Z45zappar_image_tracker_target_preview_rgba_sizeP23zappar_image_tracker_tii=fr.Oa,n.__Z46zappar_image_tracker_target_preview_rgba_widthP23zappar_image_tracker_tii=fr.Pa,n.__Z47zappar_image_tracker_target_preview_rgba_heightP23zappar_image_tracker_tii=fr.Qa,n._zappar_face_tracker_create=fr.Ra,n._zappar_face_tracker_destroy=fr.Sa,n._zappar_face_tracker_model_load_from_memory=fr.Ta,n._zappar_face_tracker_anchor_count=fr.Ua,n._zappar_face_tracker_anchor_id=fr.Va,n._zappar_face_tracker_anchor_pose_raw=fr.Wa,n._zappar_face_tracker_anchor_identity_coefficients=fr.Xa,n._zappar_face_tracker_anchor_expression_coefficients=fr.Ya,n._zappar_face_tracker_enabled_set=fr.Za,n._zappar_face_tracker_enabled=fr._a,n._zappar_face_tracker_max_faces_set=fr.$a,n._zappar_face_tracker_max_faces=fr.ab,n._zappar_face_tracker_model_loaded_version=fr.bb,n._zappar_face_landmark_create=fr.cb,n._zappar_face_landmark_destroy=fr.db,n.__Z27zappar_face_landmark_updateP23zappar_face_landmark_tiPKfS2_i=fr.eb,n._zappar_face_landmark_anchor_pose=fr.fb,n._zappar_barcode_finder_create=fr.gb,n._zappar_barcode_finder_destroy=fr.hb,n._zappar_barcode_finder_found_number=fr.ib,n._zappar_barcode_finder_found_text=fr.jb,n._zappar_barcode_finder_enabled_set=fr.kb,n._zappar_barcode_finder_enabled=fr.lb,n._zappar_barcode_finder_found_format=fr.mb,n._zappar_barcode_finder_formats=fr.nb,n._zappar_barcode_finder_formats_set=fr.ob;var dr=n._malloc=fr.pb;n._zappar_face_mesh_create=fr.qb,n._zappar_face_mesh_destroy=fr.rb,n.__Z33zappar_face_mesh_load_from_memoryP19zappar_face_mesh_tiPKciiiii=fr.sb,n.__Z29zappar_face_mesh_indices_sizeP19zappar_face_mesh_ti=fr.tb,n.__Z25zappar_face_mesh_uvs_sizeP19zappar_face_mesh_ti=fr.ub,n.__Z30zappar_face_mesh_vertices_sizeP19zappar_face_mesh_ti=fr.vb,n.__Z31zappar_face_mesh_loaded_versionP19zappar_face_mesh_ti=fr.wb,n.__Z25zappar_face_mesh_verticesP19zappar_face_mesh_ti=fr.xb,n.__Z20zappar_face_mesh_uvsP19zappar_face_mesh_ti=fr.yb,n.__Z24zappar_face_mesh_indicesP19zappar_face_mesh_ti=fr.zb,n.__Z23zappar_face_mesh_updateP19zappar_face_mesh_tiPKfS2_i=fr.Ab,n.__Z29zappar_face_mesh_normals_sizeP19zappar_face_mesh_ti=fr.Bb,n.__Z24zappar_face_mesh_normalsP19zappar_face_mesh_ti=fr.Cb,n._zappar_camera_source_create=fr.Db,n._zappar_camera_source_destroy=fr.Eb,n._zappar_camera_source_start=fr.Fb,n._zappar_camera_source_pause=fr.Gb,n._zappar_camera_default_device_id=fr.Hb,n._zappar_sequence_source_create=fr.Ib,n.__Z28zappar_sequence_source_startP25zappar_sequence_source_ti=fr.Jb,n.__Z39zappar_sequence_source_load_from_memoryP25zappar_sequence_source_tiPKci=fr.Kb,n.__Z28zappar_sequence_source_pauseP25zappar_sequence_source_ti=fr.Lb,n._zappar_sequence_source_destroy=fr.Mb,n._zappar_log_level_set=fr.Nb,n._zappar_log_level=fr.Ob,n._zappar_analytics_project_id_set=fr.Pb;var lr,hr=n.___errno_location=fr.Qb,pr=n.__get_tzname=fr.Rb,mr=n.__get_daylight=fr.Sb,br=n.__get_timezone=fr.Tb,wr=n.stackSave=fr.Ub,gr=n.stackRestore=fr.Vb,vr=n.stackAlloc=fr.Wb;function yr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Mr(){function e(){if(!lr&&(lr=!0,n.calledRun=!0,!g)){if(n.noFSInit||Be||(Be=!0,Ze(),n.stdin=n.stdin,n.stdout=n.stdout,n.stderr=n.stderr,n.stdin?$e("stdin",n.stdin):Xe("/dev/tty","/dev/stdin"),n.stdout?$e("stdout",null,n.stdout):Xe("/dev/tty","/dev/stdout"),n.stderr?$e("stderr",null,n.stderr):Xe("/dev/tty1","/dev/stderr"),je("/dev/stdin",0),je("/dev/stdout",1),je("/dev/stderr",1)),Ee=!1,ee(C),a(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;){var e=n.postRun.shift();V.unshift(e)}ee(V)}}if(!(0<Y)){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)N();ee(U),0<Y||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e())}}function Er(e){w=e,m||(q=!0),w=e,m||(n.onExit&&n.onExit(e),g=!0),f(e,new yr(e))}if(n.cwrap=function(e,t,r,a){var i=(r=r||[]).every((function(e){return"number"===e}));return"string"!==t&&i&&!a?n["_"+e]:function(){return v(e,t,r,arguments)}},n.setValue=function(e,t,r){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":M[e>>0]=t;break;case"i16":x[e>>1]=t;break;case"i32":k[e>>2]=t;break;case"i64":Q=[t>>>0,(K=t,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[e>>2]=Q[0],k[e+4>>2]=Q[1];break;case"float":R[e>>2]=t;break;case"double":F[e>>3]=t;break;default:Z("invalid type for setValue: "+r)}},n.getValue=function(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return M[e>>0];case"i16":return x[e>>1];case"i32":case"i64":return k[e>>2];case"float":return R[e>>2];case"double":return Number(F[e>>3]);default:Z("invalid type for getValue: "+t)}return null},n.UTF8ToString=O,W=function e(){lr||Mr(),lr||(W=e)},n.run=Mr,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);0<n.preInit.length;)n.preInit.pop()();return Mr(),t});t.default=n}.call(this,r(6).setImmediate)},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(a.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new i(a.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(7),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(2))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,a,i,o,u,s=1,c={},f=!1,_=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},n=function(e){i.port2.postMessage(e)}):_&&"onreadystatechange"in _.createElement("script")?(a=_.documentElement,n=function(e){var t=_.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):n=function(e){setTimeout(h,0,e)}:(o="setImmediate$"+Math.random()+"$",u=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),n=function(t){e.postMessage(o+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var a={callback:e,args:t};return c[s]=a,n(s),s++},d.clearImmediate=l}function l(e){delete c[e]}function h(e){if(f)setTimeout(h,0,e);else{var t=c[e];if(t){f=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{l(e),f=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(2),r(8))},function(e,t){var r,n,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var s,c=[],f=!1,_=-1;function d(){f&&s&&(f=!1,s.length?c=s.concat(c):_=-1,c.length&&l())}function l(){if(!f){var e=u(d);f=!0;for(var t=c.length;t;){for(s=c,c=[];++_<t;)s&&s[_].run();_=-1,t=c.length}s=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||f||u(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=p,a.addListener=p,a.once=p,a.off=p,a.removeListener=p,a.removeAllListeners=p,a.emit=p,a.prependListener=p,a.prependOnceListener=p,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRuntimeObject=void 0,t.getRuntimeObject=function(e){let t=e.cwrap("zappar_log_level","number",[]),r=e.cwrap("zappar_log_level_set",null,["number"]),n=e.cwrap("zappar_analytics_project_id_set",null,["string"]),a=e.cwrap("zappar_pipeline_create","number",[]),i=e.cwrap("zappar_pipeline_destroy",null,["number"]),o=e.cwrap("zappar_pipeline_frame_update",null,["number"]),u=e.cwrap("zappar_pipeline_frame_number","number",["number"]),s=e.cwrap("zappar_pipeline_camera_model","number",["number"]),c=e.cwrap("zappar_pipeline_camera_frame_user_data","number",["number"]),f=e.cwrap("zappar_pipeline_camera_frame_submit",null,["number","number","number","number","number","number","number","number","number"]),_=e.cwrap("zappar_pipeline_camera_frame_submit_raw_pointer",null,["number","number","number","number","number","number","number","number","number","number","number"]),d=e.cwrap("zappar_pipeline_camera_frame_camera_attitude","number",["number"]),l=e.cwrap("zappar_pipeline_camera_frame_device_attitude","number",["number"]),h=e.cwrap("zappar_pipeline_motion_accelerometer_submit",null,["number","number","number","number","number"]),p=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"]),v=e.cwrap("zappar_sequence_source_create","number",["number"]),y=e.cwrap("zappar_sequence_source_destroy",null,["number"]),M=e.cwrap("zappar_image_tracker_create","number",["number"]),E=e.cwrap("zappar_image_tracker_destroy",null,["number"]),x=e.cwrap("zappar_image_tracker_target_load_from_memory",null,["number","number","number"]),A=e.cwrap("zappar_image_tracker_target_loaded_version","number",["number"]),k=e.cwrap("zappar_image_tracker_target_count","number",["number"]),T=e.cwrap("zappar_image_tracker_enabled","number",["number"]),R=e.cwrap("zappar_image_tracker_enabled_set",null,["number","number"]),F=e.cwrap("zappar_image_tracker_anchor_count","number",["number"]),z=e.cwrap("zappar_image_tracker_anchor_id","string",["number","number"]),L=e.cwrap("zappar_image_tracker_anchor_pose_raw","number",["number","number"]),O=e.cwrap("zappar_face_tracker_create","number",["number"]),S=e.cwrap("zappar_face_tracker_destroy",null,["number"]),I=e.cwrap("zappar_face_tracker_model_load_from_memory",null,["number","number","number"]),P=e.cwrap("zappar_face_tracker_model_loaded_version","number",["number"]),B=e.cwrap("zappar_face_tracker_enabled_set",null,["number","number"]),D=e.cwrap("zappar_face_tracker_enabled","number",["number"]),U=e.cwrap("zappar_face_tracker_max_faces_set",null,["number","number"]),C=e.cwrap("zappar_face_tracker_max_faces","number",["number"]),V=e.cwrap("zappar_face_tracker_anchor_count","number",["number"]),q=e.cwrap("zappar_face_tracker_anchor_id","string",["number","number"]),N=e.cwrap("zappar_face_tracker_anchor_pose_raw","number",["number","number"]),X=e.cwrap("zappar_face_tracker_anchor_identity_coefficients","number",["number","number"]),Y=e.cwrap("zappar_face_tracker_anchor_expression_coefficients","number",["number","number"]),H=e.cwrap("zappar_face_mesh_create","number",[]),W=e.cwrap("zappar_face_mesh_destroy",null,["number"]),j=e.cwrap("zappar_face_landmark_create","number",["number"]),G=e.cwrap("zappar_face_landmark_destroy",null,["number"]),Z=e.cwrap("zappar_barcode_finder_create","number",["number"]),$=e.cwrap("zappar_barcode_finder_destroy",null,["number"]),K=e.cwrap("zappar_barcode_finder_enabled_set",null,["number","number"]),Q=e.cwrap("zappar_barcode_finder_enabled","number",["number"]),J=e.cwrap("zappar_barcode_finder_found_number","number",["number"]),ee=e.cwrap("zappar_barcode_finder_found_text","string",["number","number"]),te=e.cwrap("zappar_barcode_finder_found_format","number",["number","number"]),re=e.cwrap("zappar_barcode_finder_formats","number",["number"]),ne=e.cwrap("zappar_barcode_finder_formats_set",null,["number","number"]),ae=e.cwrap("zappar_instant_world_tracker_create","number",["number"]),ie=e.cwrap("zappar_instant_world_tracker_destroy",null,["number"]),oe=e.cwrap("zappar_instant_world_tracker_enabled_set",null,["number","number"]),ue=e.cwrap("zappar_instant_world_tracker_enabled","number",["number"]),se=e.cwrap("zappar_instant_world_tracker_anchor_pose_raw","number",["number"]),ce=e.cwrap("zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw",null,["number","number","number","number","number"]),fe=32,_e=e._malloc(fe),de=(e._malloc(64),new Map),le=(t,r)=>{let n=de.get(t);return(!n||n[0]<r)&&(n&&e._free(n[1]),n=[r,e._malloc(r)],de.set(t,n)),n[1]};return{log_level:()=>t(),log_level_set:e=>r(e),analytics_project_id_set:e=>n(e),pipeline_create:()=>a(),pipeline_destroy:()=>{i()},pipeline_frame_update:e=>o(e),pipeline_frame_number:e=>u(e),pipeline_camera_model:t=>{let r=s(t),n=new Float32Array(6);return n.set(e.HEAPF32.subarray(r/4,6+r/4)),r=n,r},pipeline_camera_frame_user_data:e=>c(e),pipeline_camera_frame_submit:(t,r,n,a,i,o,u,s)=>{fe<r.byteLength&&(e._free(_e),fe=r.byteLength,_e=e._malloc(fe));let c=_e,_=r.byteLength;e.HEAPU8.set(new Uint8Array(r),_e);let d=n,l=a,h=i,p=le(4,o.byteLength);e.HEAPF32.set(o,p/4);let m=le(5,u.byteLength);return e.HEAPF32.set(u,m/4),f(t,c,_,d,l,h,p,m,s?1:0)},pipeline_camera_frame_submit_raw_pointer:(t,r,n,a,i,o,u,s,c,f,d)=>{let l=r,h=n,p=a,m=i,b=o,w=u,g=le(6,s.byteLength);e.HEAPF32.set(s,g/4);let v=c,y=le(8,f.byteLength);return e.HEAPF32.set(f,y/4),_(t,l,h,p,m,b,w,g,v,y,d?1:0)},pipeline_camera_frame_camera_attitude:t=>{let r=d(t),n=new Float32Array(16);return n.set(e.HEAPF32.subarray(r/4,16+r/4)),r=n,r},pipeline_camera_frame_device_attitude:t=>{let r=l(t),n=new Float32Array(16);return n.set(e.HEAPF32.subarray(r/4,16+r/4)),r=n,r},pipeline_motion_accelerometer_submit:(e,t,r,n,a)=>h(e,t,r,n,a),pipeline_motion_rotation_rate_submit:(e,t,r,n,a)=>p(e,t,r,n,a),pipeline_motion_attitude_submit:(e,t,r,n,a)=>m(e,t,r,n,a),pipeline_motion_attitude_matrix_submit:(t,r)=>{let n=le(0,r.byteLength);return e.HEAPF32.set(r,n/4),b(t,n)},camera_source_create:(e,t)=>w(e,t),camera_source_destroy:()=>{g()},sequence_source_create:e=>v(e),sequence_source_destroy:()=>{y()},image_tracker_create:e=>M(e),image_tracker_destroy:()=>{E()},image_tracker_target_load_from_memory:(t,r)=>{fe<r.byteLength&&(e._free(_e),fe=r.byteLength,_e=e._malloc(fe));let n=_e,a=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),_e),x(t,n,a)},image_tracker_target_loaded_version:e=>A(e),image_tracker_target_count:e=>k(e),image_tracker_enabled:e=>{let t=T(e);return t=1===t,t},image_tracker_enabled_set:(e,t)=>R(e,t?1:0),image_tracker_anchor_count:e=>F(e),image_tracker_anchor_id:(e,t)=>z(e,t),image_tracker_anchor_pose_raw:(t,r)=>{let n=L(t,r),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(n/4,16+n/4)),n=a,n},face_tracker_create:e=>O(e),face_tracker_destroy:()=>{S()},face_tracker_model_load_from_memory:(t,r)=>{fe<r.byteLength&&(e._free(_e),fe=r.byteLength,_e=e._malloc(fe));let n=_e,a=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),_e),I(t,n,a)},face_tracker_model_loaded_version:e=>P(e),face_tracker_enabled_set:(e,t)=>B(e,t?1:0),face_tracker_enabled:e=>{let t=D(e);return t=1===t,t},face_tracker_max_faces_set:(e,t)=>U(e,t),face_tracker_max_faces:e=>C(e),face_tracker_anchor_count:e=>V(e),face_tracker_anchor_id:(e,t)=>q(e,t),face_tracker_anchor_pose_raw:(t,r)=>{let n=N(t,r),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(n/4,16+n/4)),n=a,n},face_tracker_anchor_identity_coefficients:(t,r)=>{let n=X(t,r),a=new Float32Array(50);return a.set(e.HEAPF32.subarray(n/4,50+n/4)),n=a,n},face_tracker_anchor_expression_coefficients:(t,r)=>{let n=Y(t,r),a=new Float32Array(29);return a.set(e.HEAPF32.subarray(n/4,29+n/4)),n=a,n},face_mesh_create:()=>H(),face_mesh_destroy:()=>{W()},face_landmark_create:e=>j(e),face_landmark_destroy:()=>{G()},barcode_finder_create:e=>Z(e),barcode_finder_destroy:()=>{$()},barcode_finder_enabled_set:(e,t)=>K(e,t?1:0),barcode_finder_enabled:e=>{let t=Q(e);return t=1===t,t},barcode_finder_found_number:e=>J(e),barcode_finder_found_text:(e,t)=>ee(e,t),barcode_finder_found_format:(e,t)=>te(e,t),barcode_finder_formats:e=>re(e),barcode_finder_formats_set:(e,t)=>ne(e,t),instant_world_tracker_create:e=>ae(e),instant_world_tracker_destroy:()=>{ie()},instant_world_tracker_enabled_set:(e,t)=>oe(e,t?1:0),instant_world_tracker_enabled:e=>{let t=ue(e);return t=1===t,t},instant_world_tracker_anchor_pose_raw:t=>{let r=se(t),n=new Float32Array(16);return n.set(e.HEAPF32.subarray(r/4,16+r/4)),r=n,r},instant_world_tracker_anchor_pose_set_from_camera_offset_raw:(e,t,r,n,a)=>ce(e,t,r,n,a)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zappar_server=void 0;const n=r(11),a=r(12);t.zappar_server=class{constructor(e,t){this._impl=e,this._sender=t,this._deserializer=new a.MessageDeserializer,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 n.MessageSerializer(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(),n=this._pipeline_by_instance.get(r),a=t.string(),i=this._impl.camera_source_create(n,a);this._camera_source_by_instance.set(e,i),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(),n=this._pipeline_by_instance.get(r),a=this._impl.sequence_source_create(n);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(),n=this._pipeline_by_instance.get(r),a=this._impl.image_tracker_create(n);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(),n=this._pipeline_by_instance.get(r),a=this._impl.face_tracker_create(n);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(),n=this._impl.face_landmark_create(r);this._face_landmark_by_instance.set(e,n);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(),n=this._pipeline_by_instance.get(r),a=this._impl.barcode_finder_create(n);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(),n=this._pipeline_by_instance.get(r),a=this._impl.instant_world_tracker_create(n);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 n=this.serializersByPipelineId.get(r);n&&(n.sendMessage(7,r=>{r.type(e),r.int(this._impl.pipeline_frame_number(t))}),n.sendMessage(6,r=>{r.type(e),r.cameraModel(this._impl.pipeline_camera_model(t))}),n.sendMessage(5,r=>{r.type(e),r.int(this._impl.pipeline_camera_frame_user_data(t))}),n.sendMessage(11,r=>{r.type(e),r.matrix4x4(this._impl.pipeline_camera_frame_camera_attitude(t))}),n.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);if(!t)continue;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);if(!t)continue;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 n=this.serializersByPipelineId.get(r);if(n){n.sendMessage(19,r=>{r.type(e),r.int(this._impl.image_tracker_target_loaded_version(t))}),n.sendMessage(21,r=>{r.type(e),r.int(this._impl.image_tracker_target_count(t))}),n.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++)n.sendMessage(2,n=>{n.type(e),n.int(r),n.string(this._impl.image_tracker_anchor_id(t,r))});for(let r=0;r<this._impl.image_tracker_anchor_count(t);r++)n.sendMessage(3,n=>{n.type(e),n.int(r),n.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 n=this.serializersByPipelineId.get(r);if(n){n.sendMessage(18,r=>{r.type(e),r.int(this._impl.face_tracker_model_loaded_version(t))}),n.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++)n.sendMessage(14,n=>{n.type(e),n.int(r),n.string(this._impl.face_tracker_anchor_id(t,r))});for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)n.sendMessage(15,n=>{n.type(e),n.int(r),n.matrix4x4(this._impl.face_tracker_anchor_pose_raw(t,r))});for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)n.sendMessage(16,n=>{n.type(e),n.int(r),n.identityCoefficients(this._impl.face_tracker_anchor_identity_coefficients(t,r))});for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)n.sendMessage(17,n=>{n.type(e),n.int(r),n.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);if(!t)continue;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);if(!t)continue;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 n=this.serializersByPipelineId.get(r);if(n){n.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++)n.sendMessage(9,n=>{n.type(e),n.int(r),n.string(this._impl.barcode_finder_found_text(t,r))});for(let r=0;r<this._impl.barcode_finder_found_number(t);r++)n.sendMessage(10,n=>{n.type(e),n.int(r),n.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 n=this.serializersByPipelineId.get(r);n&&n.sendMessage(4,r=>{r.type(e),r.matrix4x4(this._impl.instant_world_tracker_anchor_pose_raw(t))})}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageSerializer=void 0;t.MessageSerializer=class{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=4*(this._offset+e+8);if(this._buffer&&this._buffer.byteLength>=t)return;let r=void 0;if(!r){let e=t;e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,r=new ArrayBuffer(e)}let n=this._buffer?this._i32View:void 0;this._buffer=r,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),n&&this._i32View.set(n.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++}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDeserializer=void 0;t.MessageDeserializer=class{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)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgManager=void 0;const n=r(14);t.MsgManager=class{constructor(){this.onOutgoingMessage=new n.Event,this.onIncomingMessage=new n.Event1,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}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event5=t.Event3=t.Event2=t.Event1=t.Event=void 0;t.Event=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(){for(var e=0,t=this._funcs.length;e<t;e++)this._funcs[e]()}};t.Event1=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e){for(var t=0,r=this._funcs.length;t<r;t++)this._funcs[t](e)}};t.Event2=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t){for(var r=0,n=this._funcs.length;r<n;r++)this._funcs[r](e,t)}};t.Event3=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t,r){for(var n=0,a=this._funcs.length;n<a;n++)this._funcs[n](e,t,r)}};t.Event5=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t,r,n,a){for(var i=0,o=this._funcs.length;i<o;i++)this._funcs[i](e,t,r,n,a)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.frame_pixel_format_t=t.log_level_t=t.instant_world_tracker_transform_orientation_t=t.face_landmark_name_t=t.barcode_format_t=void 0,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"}(t.barcode_format_t||(t.barcode_format_t={})),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"}(t.face_landmark_name_t||(t.face_landmark_name_t={})),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"}(t.instant_world_tracker_transform_orientation_t||(t.instant_world_tracker_transform_orientation_t={})),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"}(t.log_level_t||(t.log_level_t={})),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"}(t.frame_pixel_format_t||(t.frame_pixel_format_t={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleImageBitmap=void 0;const n=r(17),a=r(0),i=r(1);let o,u,s,c;t.handleImageBitmap=function(e,t,r,f){const[_,d]=function(){if(!s||!c){const e=new OffscreenCanvas(1,1);if(c=e.getContext("webgl"),!c)throw new Error("Unable to get offscreen GL context");s=new n.ImageProcessGL(c)}return[s,c]}();if(u||(u=d.createTexture(),d.bindTexture(d.TEXTURE_2D,u),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR)),!u)return;(!o||o.byteLength<a.profile.dataWidth*a.profile.dataHeight)&&(console.log("Generating pixel buffer",a.profile.dataWidth*a.profile.dataHeight),o=new ArrayBuffer(a.profile.dataWidth*a.profile.dataHeight)),_.uploadFrame(u,e.i,e.r,e.userFacing);let l=_.readFrame(u,o),h={t:"imageBitmapS2C",dataWidth:l.dataWidth,dataHeight:l.dataHeight,frame:e.i,userFacing:l.userFacing,uvTransform:l.uvTransform||i.mat4.create(),tokenId:e.tokenId,p:e.p};f.postOutgoingMessage(h,[e.i]);let p=r._pipeline_by_instance.get(e.p);p&&(t.pipeline_camera_frame_submit(p,o,l.dataWidth,l.dataHeight,e.tokenId,e.cameraToDevice,e.cameraModel,l.userFacing),t.pipeline_frame_update(p),r.exploreState())}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageProcessGL=void 0;const n=r(1),a=r(0),i=r(20);t.ImageProcessGL=class{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=n.mat4.create(),this._framebufferWidth=0,this._framebufferHeight=0,this._framebufferId=null,this._renderTexture=null}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,n){let i=this._gl;i.disable(i.SCISSOR_TEST),i.disable(i.DEPTH_TEST),i.disable(i.BLEND),i.disable(i.CULL_FACE),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e);const o=i.RGBA,u=i.RGBA,s=i.UNSIGNED_BYTE;i.texImage2D(i.TEXTURE_2D,0,o,u,s,t);let c=0,f=0;"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?(c=t.videoWidth,f=t.videoHeight):(c=t.width,f=t.height),f>c&&(f=[c,c=f][0]),this._updateTransforms(r,n);let _=this._getFramebuffer(i,a.profile.dataWidth/4,a.profile.dataHeight),d=this._getVertexBuffer(i),l=this._getIndexBuffer(i),h=this._getGreyscaleShader(i);i.bindFramebuffer(i.FRAMEBUFFER,_),i.viewport(0,0,this._framebufferWidth,this._framebufferHeight),i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT),i.bindBuffer(i.ARRAY_BUFFER,d),i.vertexAttribPointer(h.aVertexPositionLoc,2,i.FLOAT,!1,16,0),i.enableVertexAttribArray(h.aVertexPositionLoc),i.vertexAttribPointer(h.aTextureCoordLoc,2,i.FLOAT,!1,16,8),i.enableVertexAttribArray(h.aTextureCoordLoc),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,l),i.useProgram(h.program),i.uniform1f(h.uTexWidthLoc,a.profile.dataWidth),i.uniformMatrix4fv(h.uUvTransformLoc,!1,this._cameraUvTransform),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e),i.uniform1i(h.uSamplerLoc,0),i.drawElements(i.TRIANGLES,6,i.UNSIGNED_SHORT,0),i.disableVertexAttribArray(h.aVertexPositionLoc),i.disableVertexAttribArray(h.aTextureCoordLoc),i.bindFramebuffer(i.FRAMEBUFFER,null),i.bindBuffer(i.ARRAY_BUFFER,null),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,null),i.useProgram(null),i.bindTexture(i.TEXTURE_2D,null)}readFrame(e,t){let r=this._gl,n=new Uint8Array(t),i=this._getFramebuffer(r,a.profile.dataWidth/4,a.profile.dataHeight);return r.bindFramebuffer(r.FRAMEBUFFER,i),r.readPixels(0,0,this._framebufferWidth,this._framebufferHeight,r.RGBA,r.UNSIGNED_BYTE,n),r.bindFramebuffer(r.FRAMEBUFFER,null),{uvTransform:this._cameraUvTransform,data:t,texture:e,dataWidth:a.profile.dataWidth,dataHeight:a.profile.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),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 n=e.checkFramebufferStatus(e.FRAMEBUFFER);if(n!==e.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer not complete: "+n.toString());return this._framebufferWidth=t,this._framebufferHeight=r,e.bindTexture(e.TEXTURE_2D,null),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=i.compileShader(e,e.VERTEX_SHADER,o),n=i.compileShader(e,e.FRAGMENT_SHADER,u);e.attachShader(t,r),e.attachShader(t,n),i.linkProgram(e,t);let a=e.getUniformLocation(t,"uTexWidth");if(!a)throw new Error("Unable to get uniform location uTexWidth");let s=e.getUniformLocation(t,"uUvTransform");if(!s)throw new Error("Unable to get uniform location uUvTransform");let c=e.getUniformLocation(t,"uSampler");if(!c)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:s,uSamplerLoc:c},this._greyscaleShader}};let o="\\n attribute vec4 aVertexPosition;\\n attribute vec2 aTextureCoord;\\n\\n varying highp vec2 vTextureCoord1;\\n varying highp vec2 vTextureCoord2;\\n varying highp vec2 vTextureCoord3;\\n varying highp vec2 vTextureCoord4;\\n\\n uniform float uTexWidth;\\n\\tuniform mat4 uUvTransform;\\n\\n void main(void) {\\n highp vec2 offset1 = vec2(1.5 / uTexWidth, 0);\\n highp vec2 offset2 = vec2(0.5 / uTexWidth, 0);\\n\\n gl_Position = aVertexPosition;\\n vTextureCoord1 = (uUvTransform * vec4(aTextureCoord - offset1, 0, 1)).xy;\\n vTextureCoord2 = (uUvTransform * vec4(aTextureCoord - offset2, 0, 1)).xy;\\n vTextureCoord3 = (uUvTransform * vec4(aTextureCoord + offset2, 0, 1)).xy;\\n vTextureCoord4 = (uUvTransform * vec4(aTextureCoord + offset1, 0, 1)).xy;\\n }\\n",u="\\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"},function(e,t,r){var n;!function(a,i){"use strict";var o="model",u="name",s="type",c="vendor",f="version",_="mobile",d="tablet",l="smarttv",h=function(e){var t={};for(var r in e)t[e[r].toUpperCase()]=e[r];return t},p=function(e,t){return"string"==typeof e&&-1!==m(t).indexOf(m(e))},m=function(e){return e.toLowerCase()},b=function(e,t){if("string"==typeof e)return e=e.replace(/^\\s\\s*/,"").replace(/\\s\\s*$/,""),void 0===t?e:e.substring(0,255)},w=function(e,t){for(var r,n,a,i,o,u,s=0;s<t.length&&!o;){var c=t[s],f=t[s+1];for(r=n=0;r<c.length&&!o;)if(o=c[r++].exec(e))for(a=0;a<f.length;a++)u=o[++n],"object"==typeof(i=f[a])&&i.length>0?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,u):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=u?u.replace(i[1],i[2]):void 0:this[i[0]]=u?i[1].call(this,u,i[2]):void 0:4==i.length&&(this[i[0]]=u?i[3].call(this,u.replace(i[1],i[2])):void 0):this[i]=u||void 0;s+=2}},g=function(e,t){for(var r in t)if("object"==typeof t[r]&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(p(t[r][n],e))return"?"===r?void 0:r}else if(p(t[r],e))return"?"===r?void 0:r;return e},v={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},y={browser:[[/\\b(?:crmo|crios)\\/([\\w\\.]+)/i],[f,[u,"Chrome"]],[/edg(?:e|ios|a)?\\/([\\w\\.]+)/i],[f,[u,"Edge"]],[/(opera mini)\\/([-\\w\\.]+)/i,/(opera [mobiletab]{3,6})\\b.+version\\/([-\\w\\.]+)/i,/(opera)(?:.+version\\/|[\\/ ]+)([\\w\\.]+)/i],[u,f],[/opios[\\/ ]+([\\w\\.]+)/i],[f,[u,"Opera Mini"]],[/\\bopr\\/([\\w\\.]+)/i],[f,[u,"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],[u,f],[/(?:\\buc? ?browser|(?:juc.+)ucweb)[\\/ ]?([\\w\\.]+)/i],[f,[u,"UCBrowser"]],[/\\bqbcore\\/([\\w\\.]+)/i],[f,[u,"WeChat(Win) Desktop"]],[/micromessenger\\/([\\w\\.]+)/i],[f,[u,"WeChat"]],[/konqueror\\/([\\w\\.]+)/i],[f,[u,"Konqueror"]],[/trident.+rv[: ]([\\w\\.]{1,9})\\b.+like gecko/i],[f,[u,"IE"]],[/yabrowser\\/([\\w\\.]+)/i],[f,[u,"Yandex"]],[/(avast|avg)\\/([\\w\\.]+)/i],[[u,/(.+)/,"$1 Secure Browser"],f],[/\\bfocus\\/([\\w\\.]+)/i],[f,[u,"Firefox Focus"]],[/\\bopt\\/([\\w\\.]+)/i],[f,[u,"Opera Touch"]],[/coc_coc\\w+\\/([\\w\\.]+)/i],[f,[u,"Coc Coc"]],[/dolfin\\/([\\w\\.]+)/i],[f,[u,"Dolphin"]],[/coast\\/([\\w\\.]+)/i],[f,[u,"Opera Coast"]],[/miuibrowser\\/([\\w\\.]+)/i],[f,[u,"MIUI Browser"]],[/fxios\\/([-\\w\\.]+)/i],[f,[u,"Firefox"]],[/\\bqihu|(qi?ho?o?|360)browser/i],[[u,"360 Browser"]],[/(oculus|samsung|sailfish)browser\\/([\\w\\.]+)/i],[[u,/(.+)/,"$1 Browser"],f],[/(comodo_dragon)\\/([\\w\\.]+)/i],[[u,/_/g," "],f],[/(electron)\\/([\\w\\.]+) safari/i,/(tesla)(?: qtcarbrowser|\\/(20\\d\\d\\.[-\\w\\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\\/ ]?([\\w\\.]+)/i],[u,f],[/(metasr)[\\/ ]?([\\w\\.]+)/i,/(lbbrowser)/i],[u],[/((?:fban\\/fbios|fb_iab\\/fb4a)(?!.+fbav)|;fbav\\/([\\w\\.]+);)/i],[[u,"Facebook"],f],[/safari (line)\\/([\\w\\.]+)/i,/\\b(line)\\/([\\w\\.]+)\\/iab/i,/(chromium|instagram)[\\/ ]([-\\w\\.]+)/i],[u,f],[/\\bgsa\\/([\\w\\.]+) .*safari\\//i],[f,[u,"GSA"]],[/headlesschrome(?:\\/([\\w\\.]+)| )/i],[f,[u,"Chrome Headless"]],[/ wv\\).+(chrome)\\/([\\w\\.]+)/i],[[u,"Chrome WebView"],f],[/droid.+ version\\/([\\w\\.]+)\\b.+(?:mobile safari|safari)/i],[f,[u,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\/v?([\\w\\.]+)/i],[u,f],[/version\\/([\\w\\.]+) .*mobile\\/\\w+ (safari)/i],[f,[u,"Mobile Safari"]],[/version\\/([\\w\\.]+) .*(mobile ?safari|safari)/i],[f,u],[/webkit.+?(mobile ?safari|safari)(\\/[\\w\\.]+)/i],[u,[f,g,{"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],[u,f],[/(navigator|netscape\\d?)\\/([-\\w\\.]+)/i],[[u,"Netscape"],f],[/mobile vr; rv:([\\w\\.]+)\\).+firefox/i],[f,[u,"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],[u,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",m]],[/((?:i[346]|x)86)[;\\)]/i],[["architecture","ia32"]],[/\\b(aarch64|arm(v?8e?l?|_?64))\\b/i],[["architecture","arm64"]],[/\\b(arm(?:v[67])?ht?n?[fl]p?)\\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\\))/i],[["architecture",/ower/,"",m]],[/(sun4\\w)[;\\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\\))|\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\b|pa-risc)/i],[["architecture",m]]],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],[o,[c,"Samsung"],[s,d]],[/\\b((?:s[cgp]h|gt|sm)-\\w+|galaxy nexus)/i,/samsung[- ]([-\\w]+)/i,/sec-(sgh\\w+)/i],[o,[c,"Samsung"],[s,_]],[/\\((ip(?:hone|od)[\\w ]*);/i],[o,[c,"Apple"],[s,_]],[/\\((ipad);[-\\w\\),; ]+apple/i,/applecoremedia\\/[\\w\\.]+ \\((ipad)/i,/\\b(ipad)\\d\\d?,\\d\\d?[;\\]].+ios/i],[o,[c,"Apple"],[s,d]],[/\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\d{2})\\b(?!.+d\\/s)/i],[o,[c,"Huawei"],[s,d]],[/(?:huawei|honor)([-\\w ]+)[;\\)]/i,/\\b(nexus 6p|\\w{2,4}-[atu]?[ln][01259x][012359][an]?)\\b(?!.+d\\/s)/i],[o,[c,"Huawei"],[s,_]],[/\\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],[[o,/_/g," "],[c,"Xiaomi"],[s,_]],[/\\b(mi[-_ ]?(?:pad)(?:[\\w_ ]+))(?: bui|\\))/i],[[o,/_/g," "],[c,"Xiaomi"],[s,d]],[/; (\\w+) bui.+ oppo/i,/\\b(cph[12]\\d{3}|p(?:af|c[al]|d\\w|e[ar])[mt]\\d0|x9007)\\b/i],[o,[c,"OPPO"],[s,_]],[/vivo (\\w+)(?: bui|\\))/i,/\\b(v[12]\\d{3}\\w?[at])(?: bui|;)/i],[o,[c,"Vivo"],[s,_]],[/\\b(rmx[12]\\d{3})(?: bui|;|\\))/i],[o,[c,"Realme"],[s,_]],[/\\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],[o,[c,"Motorola"],[s,_]],[/\\b(mz60\\d|xoom[2 ]{0,2}) build\\//i],[o,[c,"Motorola"],[s,d]],[/((?=lg)?[vl]k\\-?\\d{3}) bui| 3\\.[-\\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[c,"LG"],[s,d]],[/(lm(?:-?f100[nv]?|-[\\w\\.]+)(?= bui|\\))|nexus [45])/i,/\\blg[-e;\\/ ]+((?!browser|netcast|android tv)\\w+)/i,/\\blg-?([\\d\\w]+) bui/i],[o,[c,"LG"],[s,_]],[/(ideatab[-\\w ]+)/i,/lenovo ?(s[56]000[-\\w]+|tab(?:[\\w ]+)|yt[-\\d\\w]{6}|tb[-\\d\\w]{6})/i],[o,[c,"Lenovo"],[s,d]],[/(?:maemo|nokia).*(n900|lumia \\d+)/i,/nokia[-_ ]?([-\\w\\.]*)/i],[[o,/_/g," "],[c,"Nokia"],[s,_]],[/(pixel c)\\b/i],[o,[c,"Google"],[s,d]],[/droid.+; (pixel[\\daxl ]{0,6})(?: bui|\\))/i],[o,[c,"Google"],[s,_]],[/droid.+ ([c-g]\\d{4}|so[-gl]\\w+|xq-a\\w[4-7][12])(?= bui|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i],[o,[c,"Sony"],[s,_]],[/sony tablet [ps]/i,/\\b(?:sony)?sgp\\w+(?: bui|\\))/i],[[o,"Xperia Tablet"],[c,"Sony"],[s,d]],[/ (kb2005|in20[12]5|be20[12][59])\\b/i,/(?:one)?(?:plus)? (a\\d0\\d\\d)(?: b|\\))/i],[o,[c,"OnePlus"],[s,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\\))/i,/(kf[a-z]+)( bui|\\)).+silk\\//i],[o,[c,"Amazon"],[s,d]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\\)).+silk\\//i],[[o,/(.+)/g,"Fire Phone $1"],[c,"Amazon"],[s,_]],[/(playbook);[-\\w\\),; ]+(rim)/i],[o,c,[s,d]],[/\\b((?:bb[a-f]|st[hv])100-\\d)/i,/\\(bb10; (\\w+)/i],[o,[c,"BlackBerry"],[s,_]],[/(?:\\b|asus_)(transfo[prime ]{4,10} \\w+|eeepc|slider \\w+|nexus 7|padfone|p00[cj])/i],[o,[c,"ASUS"],[s,d]],[/ (z[bes]6[027][012][km][ls]|zenfone \\d\\w?)\\b/i],[o,[c,"ASUS"],[s,_]],[/(nexus 9)/i],[o,[c,"HTC"],[s,d]],[/(htc)[-;_ ]{1,2}([\\w ]+(?=\\)| bui)|\\w+)/i,/(zte)[- ]([\\w ]+?)(?: bui|\\/|\\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\\w]*)/i],[c,[o,/_/g," "],[s,_]],[/droid.+; ([ab][1-7]-?[0178a]\\d\\d?)/i],[o,[c,"Acer"],[s,d]],[/droid.+; (m[1-5] note) bui/i,/\\bmz-([-\\w]{2,})/i],[o,[c,"Meizu"],[s,_]],[/\\b(sh-?[altvz]?\\d\\d[a-ekm]?)/i],[o,[c,"Sharp"],[s,_]],[/(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],[c,o,[s,_]],[/(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],[c,o,[s,d]],[/(surface duo)/i],[o,[c,"Microsoft"],[s,d]],[/droid [\\d\\.]+; (fp\\du?)(?: b|\\))/i],[o,[c,"Fairphone"],[s,_]],[/(u304aa)/i],[o,[c,"AT&T"],[s,_]],[/\\bsie-(\\w*)/i],[o,[c,"Siemens"],[s,_]],[/\\b(rct\\w+) b/i],[o,[c,"RCA"],[s,d]],[/\\b(venue[\\d ]{2,7}) b/i],[o,[c,"Dell"],[s,d]],[/\\b(q(?:mv|ta)\\w+) b/i],[o,[c,"Verizon"],[s,d]],[/\\b(?:barnes[& ]+noble |bn[rt])([\\w\\+ ]*) b/i],[o,[c,"Barnes & Noble"],[s,d]],[/\\b(tm\\d{3}\\w+) b/i],[o,[c,"NuVision"],[s,d]],[/\\b(k88) b/i],[o,[c,"ZTE"],[s,d]],[/\\b(nx\\d{3}j) b/i],[o,[c,"ZTE"],[s,_]],[/\\b(gen\\d{3}) b.+49h/i],[o,[c,"Swiss"],[s,_]],[/\\b(zur\\d{3}) b/i],[o,[c,"Swiss"],[s,d]],[/\\b((zeki)?tb.*\\b) b/i],[o,[c,"Zeki"],[s,d]],[/\\b([yr]\\d{2}) b/i,/\\b(dragon[- ]+touch |dt)(\\w{5}) b/i],[[c,"Dragon Touch"],o,[s,d]],[/\\b(ns-?\\w{0,9}) b/i],[o,[c,"Insignia"],[s,d]],[/\\b((nxa|next)-?\\w{0,9}) b/i],[o,[c,"NextBook"],[s,d]],[/\\b(xtreme\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],o,[s,_]],[/\\b(lvtel\\-)?(v1[12]) b/i],[[c,"LvTel"],o,[s,_]],[/\\b(ph-1) /i],[o,[c,"Essential"],[s,_]],[/\\b(v(100md|700na|7011|917g).*\\b) b/i],[o,[c,"Envizen"],[s,d]],[/\\b(trio[-\\w\\. ]+) b/i],[o,[c,"MachSpeed"],[s,d]],[/\\btu_(1491) b/i],[o,[c,"Rotor"],[s,d]],[/(shield[\\w ]+) b/i],[o,[c,"Nvidia"],[s,d]],[/(sprint) (\\w+)/i],[c,o,[s,_]],[/(kin\\.[onetw]{3})/i],[[o,/\\./g," "],[c,"Microsoft"],[s,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\)/i],[o,[c,"Zebra"],[s,d]],[/droid.+; (ec30|ps20|tc[2-8]\\d[kx])\\)/i],[o,[c,"Zebra"],[s,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,o,[s,"console"]],[/droid.+; (shield) bui/i],[o,[c,"Nvidia"],[s,"console"]],[/(playstation [345portablevi]+)/i],[o,[c,"Sony"],[s,"console"]],[/\\b(xbox(?: one)?(?!; xbox))[\\); ]/i],[o,[c,"Microsoft"],[s,"console"]],[/smart-tv.+(samsung)/i],[c,[s,l]],[/hbbtv.+maple;(\\d+)/i],[[o,/^/,"SmartTV"],[c,"Samsung"],[s,l]],[/(nux; netcast.+smarttv|lg (netcast\\.tv-201\\d|android tv))/i],[[c,"LG"],[s,l]],[/(apple) ?tv/i],[c,[o,"Apple TV"],[s,l]],[/crkey/i],[[o,"Chromecast"],[c,"Google"],[s,l]],[/droid.+aft(\\w)( bui|\\))/i],[o,[c,"Amazon"],[s,l]],[/\\(dtv[\\);].+(aquos)/i],[o,[c,"Sharp"],[s,l]],[/\\b(roku)[\\dx]*[\\)\\/]((?:dvp-)?[\\d\\.]*)/i,/hbbtv\\/\\d+\\.\\d+\\.\\d+ +\\([\\w ]*; *(\\w[^;]*);([^;]*)/i],[[c,b],[o,b],[s,l]],[/\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\b/i],[[s,l]],[/((pebble))app/i],[c,o,[s,"wearable"]],[/droid.+; (glass) \\d/i],[o,[c,"Google"],[s,"wearable"]],[/droid.+; (wt63?0{2,3})\\)/i],[o,[c,"Zebra"],[s,"wearable"]],[/(quest( 2)?)/i],[o,[c,"Facebook"],[s,"wearable"]],[/(tesla)(?: qtcarbrowser|\\/[-\\w\\.]+)/i],[c,[s,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+? mobile safari/i],[o,[s,_]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+?(?! mobile) safari/i],[o,[s,d]],[/\\b((tablet|tab)[;\\/]|focus\\/\\d(?!.+mobile))/i],[[s,d]],[/(phone|mobile(?:[;\\/]| safari)|pda(?=.+windows ce))/i],[[s,_]],[/(android[-\\w\\. ]{0,9});.+buil/i],[o,[c,"Generic"]]],engine:[[/windows.+ edge\\/([\\w\\.]+)/i],[f,[u,"EdgeHTML"]],[/webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i],[f,[u,"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],[u,f],[/rv\\:([\\w\\.]{1,9})\\b.+(gecko)/i],[f,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,f],[/(windows) nt 6\\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\\/ ]?([\\d\\.\\w ]*)/i,/(windows)[\\/ ]?([ntce\\d\\. ]+\\w)(?!.+xbox)/i],[u,[f,g,v]],[/(win(?=3|9|n)|win 9x )([nt\\d\\.]+)/i],[[u,"Windows"],[f,g,v]],[/ip[honead]{2,4}\\b(?:.*os ([\\w]+) like mac|; opera)/i,/cfnetwork\\/.+darwin/i],[[f,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\\w\\. ]*)/i,/(macintosh|mac_powerpc\\b)(?!.+haiku)/i],[[u,"Mac OS"],[f,/_/g,"."]],[/droid ([\\w\\.]+)\\b.+(android[- ]x86)/i],[f,u],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\/ ]?([\\w\\.]*)/i,/(blackberry)\\w*\\/([\\w\\.]*)/i,/(tizen|kaios)[\\/ ]([\\w\\.]+)/i,/\\((series40);/i],[u,f],[/\\(bb(10);/i],[f,[u,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\\/ ]?([\\w\\.]*)/i],[f,[u,"Symbian"]],[/mozilla\\/[\\d\\.]+ \\((?:mobile|tablet|tv|mobile; [\\w ]+); rv:.+ gecko\\/([\\w\\.]+)/i],[f,[u,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\\b(?:hp)?wos(?:browser)?\\/([\\w\\.]+)/i],[f,[u,"webOS"]],[/crkey\\/([\\d\\.]+)/i],[f,[u,"Chromecast"]],[/(cros) [\\w]+ ([\\w\\.]+\\w)/i],[[u,"Chromium OS"],f],[/(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],[u,f],[/(sunos) ?([\\w\\.\\d]*)/i],[[u,"Solaris"],f],[/((?:open)?solaris)[-\\/ ]?([\\w\\.]*)/i,/(aix) ((\\d)(?=\\.|\\)| )[\\w\\.])*/i,/\\b(beos|os\\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\\w\\.]*)/i],[u,f]]},M=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof M))return new M(e,t).getResult();var r=e||(void 0!==a&&a.navigator&&a.navigator.userAgent?a.navigator.userAgent:""),n=t?function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}(y,t):y;return this.getBrowser=function(){var e,t={};return t[u]=void 0,t[f]=void 0,w.call(t,r,n.browser),t.major="string"==typeof(e=t.version)?e.replace(/[^\\d\\.]/g,"").split(".")[0]:void 0,t},this.getCPU=function(){var e={architecture:void 0};return w.call(e,r,n.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return w.call(e,r,n.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return w.call(e,r,n.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return w.call(e,r,n.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="string"==typeof e&&e.length>255?b(e,255):e,this},this.setUA(r),this};M.VERSION="0.7.30",M.BROWSER=h([u,f,"major"]),M.CPU=h(["architecture"]),M.DEVICE=h([o,c,s,"console",_,l,d,"wearable","embedded"]),M.ENGINE=M.OS=h([u,f]),void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=M),t.UAParser=M):r(19)?void 0===(n=function(){return M}.call(t,r,t,e))||(e.exports=n):void 0!==a&&(a.UAParser=M);var E=void 0!==a&&(a.jQuery||a.Zepto);if(E&&!E.ua){var x=new M;E.ua=x.getResult(),E.ua.get=function(){return x.getUA()},E.ua.set=function(e){x.setUA(e);var t=x.getResult();for(var r in t)E.ua[r]=t[r]}}}("object"==typeof window?window:this)},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.linkProgram=t.compileShader=void 0,t.compileShader=function(e,t,r){let n=e.createShader(t);if(!n)throw new Error("Unable to create shader");e.shaderSource(n,r),e.compileShader(n);let a=e.getShaderInfoLog(n);if(a&&a.trim().length>0)throw new Error("Shader compile error: "+a);return n},t.linkProgram=function(e,t){e.linkProgram(t);let r=e.getProgramInfoLog(t);if(r&&r.trim().length>0)throw new Error("Unable to link: "+r)}},function(e,t,r){"use strict";r.r(t),t.default=r.p+"fbf9061bc2d2826ecf97c8ba2b51e7a5.wasm"}]);',"Worker",void 0,r.p+"zappar-cv.worker.js")}},function(e,t,r){"use strict";r.r(t),t.default=r.p+"fbf9061bc2d2826ecf97c8ba2b51e7a5.wasm"},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.permissionDeniedUI=t.permissionRequestUI=t.permissionRequestMotion=t.permissionRequestCamera=t.permissionRequestAll=t.permissionGrantedAll=t.permissionDeniedAny=t.permissionDeniedMotion=t.permissionDeniedCamera=t.permissionGrantedMotion=t.permissionGrantedCamera=void 0;let i=new(r(11).UAParser),a=!1,o=!1,s=!1,u=!1;function c(){return n(this,void 0,void 0,(function*(){if(navigator.permissions&&navigator.permissions.query)try{let e=yield navigator.permissions.query({name:"camera"});s="denied"===e.state,a="granted"===e.state}catch(e){}}))}function f(){return s||u}function d(){return a&&o}function _(){return n(this,void 0,void 0,(function*(){yield h(),yield l()}))}function l(){return n(this,void 0,void 0,(function*(){try{(yield navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(e=>e.stop()),a=!0,s=!1}catch(e){a=!1,s=!0}}))}function h(){return n(this,void 0,void 0,(function*(){if(window.DeviceOrientationEvent&&window.DeviceOrientationEvent.requestPermission){if("granted"!==(yield window.DeviceOrientationEvent.requestPermission()))return o=!1,u=!0,!1}o=!0,u=!1}))}window.DeviceOrientationEvent&&window.DeviceOrientationEvent.requestPermission||(o=!0),c(),t.permissionGrantedCamera=function(){return a},t.permissionGrantedMotion=function(){return o},t.permissionDeniedCamera=function(){return s},t.permissionDeniedMotion=function(){return u},t.permissionDeniedAny=f,t.permissionGrantedAll=d,t.permissionRequestAll=_,t.permissionRequestCamera=l,t.permissionRequestMotion=h,t.permissionRequestUI=function(){return n(this,void 0,void 0,(function*(){if(yield c(),d())return!0;let e=document.createElement("div");e.classList.add("zappar-permission-request"),e.innerHTML='\n <style>\n .zappar-permission-request {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n z-index: 1000;\n background-color: rgba(0, 0, 0, 0.9);\n font-family: sans-serif;\n color: white;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .zappar-inner {\n max-width: 400px;\n text-align: center;\n }\n .zappar-title {\n font-size: 20px;\n }\n .zappar-text {\n font-size: 14px;\n padding: 15px;\n }\n .zappar-inner > button {\n background: none;\n outline: none;\n border: 2px solid white;\n border-radius: 10px;\n color: white;\n padding: 10px 40px;\n text-transform: uppercase;\n }\n </style>\n <div class="zappar-inner">\n <div class="zappar-title">Almost there...</div>\n <div class="zappar-text">In order to provide this augmented reality experience, we need access to your device\'s camera and motion sensors.</div>\n <button id="zappar-permission-request-button">Grant Access</button>\n </div>\n',document.body.append(e);let t=e.querySelector("#zappar-permission-request-button");return yield new Promise(r=>{null==t||t.addEventListener("click",()=>n(this,void 0,void 0,(function*(){for(yield _(),e.remove();;){if(yield new Promise(e=>requestAnimationFrame(()=>e())),f())return void r(!1);if(d())return void r(!0)}})))})}))},t.permissionDeniedUI=function(){switch(i.getBrowser().name){case"Chrome":!function(){let e=document.createElement("div");e.classList.add("zappar-permission-request"),e.innerHTML='\n <style>\n .zappar-permission-request {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n z-index: 1000;\n background-color: rgba(0, 0, 0, 0.9);\n font-family: sans-serif;\n color: white;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .zappar-inner {\n width: 400px;\n text-align: center;\n }\n .zappar-title {\n font-size: 20px;\n }\n .zappar-text {\n font-size: 14px;\n padding: 15px;\n }\n .zappar-inner > button {\n background: none;\n outline: none;\n border: 2px solid white;\n border-radius: 10px;\n color: white;\n padding: 10px 40px;\n text-transform: uppercase;\n }\n </style>\n <div class="zappar-inner">\n <div class="zappar-title">Permission is Needed</div>\n <div class="zappar-text">Permission to access your device\'s camera and motion sensors is necessary for this experience.<br/><br/>To grant access, please tap the ! button in the address bar of your browser, then "Site settings", and finally "Clear and reset". You can then reload the page to try again.</div>\n <button id="zappar-permission-reload-button">Reload</button>\n </div>\n',document.body.append(e);let t=e.querySelector("#zappar-permission-reload-button");null==t||t.addEventListener("click",()=>window.location.reload())}();break;default:!function(){let e=document.createElement("div");e.classList.add("zappar-permission-request"),e.innerHTML='\n <style>\n .zappar-permission-request {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n z-index: 1000;\n background-color: rgba(0, 0, 0, 0.9);\n font-family: sans-serif;\n color: white;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .zappar-inner {\n max-width: 400px;\n text-align: center;\n }\n .zappar-title {\n font-size: 20px;\n }\n .zappar-text {\n font-size: 14px;\n padding: 15px;\n }\n .zappar-inner > button {\n background: none;\n outline: none;\n border: 2px solid white;\n border-radius: 10px;\n color: white;\n padding: 10px 40px;\n text-transform: uppercase;\n }\n </style>\n <div class="zappar-inner">\n <div class="zappar-title">Permission is Needed</div>\n <div class="zappar-text">Permission to access your device\'s camera and motion sensors is necessary for this experience. Please reload the page to try again.</div>\n <button id="zappar-permission-reload-button">Reload</button>\n </div>\n',document.body.append(e);let t=e.querySelector("#zappar-permission-reload-button");null==t||t.addEventListener("click",()=>window.location.reload())}()}}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FaceMesh=t.getFaceMesh=t.destroyFaceMesh=t.createFaceMesh=void 0;const n=r(1),i=r(0);let a=1,o=new Map;t.createFaceMesh=function(){let e=a++;return o.set(e,new s),i.zcout("face_mesh_t initialized"),e},t.destroyFaceMesh=function(e){o.delete(e)},t.getFaceMesh=function(e){return o.get(e)};class s{constructor(){this.render_mean_=new Float32Array,this.render_identity_=new Float32Array(50),this.render_expression_=new Float32Array(29),this.render_uvs_=new Float32Array,this.render_indices_=new Uint16Array,this.vertices_=new Float32Array,this.normals_=new Float32Array,this.normalsCalculated_=!1,this.modelVersion_=-1,this.mirrored_=!1}loadFromMemory(e,t,r,n,i){let a=0,o=new Uint16Array(e),s=new Int32Array(e),u=new Float32Array(e),c=()=>{let e=s[a++]*s[a++],t=u.subarray(a,a+e);return a+=e,t},f=()=>{let e=s[a++],t=o.subarray(2*a,2*a+e);return a+=e/2,t};this.render_mean_=c(),this.render_identity_=c(),this.render_expression_=c(),this.render_uvs_=c();let d=f(),_=a<s.length?f():new Uint16Array,l=a<s.length?f():new Uint16Array,h=a<s.length?f():new Uint16Array,m=a<s.length?f():new Uint16Array;if(t||r||n||i){let e=d.length;t&&(e+=_.length),r&&(e+=l.length),n&&(e+=h.length),i&&(e+=m.length),this.render_indices_=new Uint16Array(e),this.render_indices_.set(d,0);let a=d.length;t&&(this.render_indices_.set(_,a),a+=_.length),r&&(this.render_indices_.set(l,a),a+=l.length),n&&(this.render_indices_.set(h,a),a+=h.length),i&&(this.render_indices_.set(m,a),a+=m.length)}else this.render_indices_=d;this.vertices_=new Float32Array(this.render_mean_),this.normals_=new Float32Array(this.vertices_.length),this.modelVersion_++}getVertices(){return this.vertices_}getUVs(){return this.render_uvs_}getIndices(){if(this.mirrored_){if(!this.render_indices_reversed){this.render_indices_reversed=new Uint16Array(this.render_indices_.length);for(let e=0;e<this.render_indices_.length;e+=3)this.render_indices_reversed[e]=this.render_indices_[e+2],this.render_indices_reversed[e+1]=this.render_indices_[e+1],this.render_indices_reversed[e+2]=this.render_indices_[e]}return this.render_indices_reversed}return this.render_indices_}getNormals(){return this.normalsCalculated_||this.calculateNormals(),this.normals_}getModelVersion(){return this.modelVersion_}getLandmarkDataForVertex(e){let t=[this.render_mean_[3*e],this.render_mean_[3*e+1],this.render_mean_[3*e+2]],r=[];for(let t=0;t<50;t++)r.push(this.render_identity_[3*e*50+t]),r.push(this.render_identity_[50*(3*e+1)+t]),r.push(this.render_identity_[50*(3*e+2)+t]);let n=[];for(let t=0;t<29;t++)n.push(this.render_expression_[3*e*29+t]),n.push(this.render_expression_[29*(3*e+1)+t]),n.push(this.render_expression_[29*(3*e+2)+t]);return{mean:t,identity:r,expression:n}}update(e,t,r){if(0!==this.render_mean_.length&&0!==this.render_identity_.length&&0!==this.render_expression_.length){this.mirrored_=r,this.vertices_.set(this.render_mean_);for(let t=0;t<e.length;t++)for(let r=0;r<this.vertices_.length;r++)this.vertices_[r]+=e[t]*this.render_identity_[r*e.length+t];for(let e=0;e<t.length;e++)for(let r=0;r<this.vertices_.length;r++)this.vertices_[r]+=t[e]*this.render_expression_[r*t.length+e];if(r)for(let e=0;e<this.vertices_.length;e+=3)this.vertices_[e]*=-1;this.normalsCalculated_=!1}}calculateNormals(){let e=this.getIndices(),t=this.vertices_,r=new Float32Array(e.length);if(!t)return;let i=e.length,a=this.normals_,o=new Float32Array([0,0,0]),s=new Float32Array([0,0,0]),u=new Float32Array([0,0,0]);for(let a=0;a<i;a+=3){let i=3*e[a],c=3*e[a+1],f=3*e[a+2];o[0]=t[c]-t[i],o[1]=t[c+1]-t[i+1],o[2]=t[c+2]-t[i+2],s[0]=t[f]-t[i],s[1]=t[f+1]-t[i+1],s[2]=t[f+2]-t[i+2],n.vec3.cross(u,o,s);let d=n.vec3.length(u);r[a]=u[0]/d,r[a+1]=u[1]/d,r[a+2]=u[2]/d}a.fill(0);for(let t=0;t<i;t+=3){let n=3*e[t],i=3*e[t+1],o=3*e[t+2];a[n]+=r[t],a[n+1]+=r[t+1],a[n+2]+=r[t+2],a[i]+=r[t],a[i+1]+=r[t+1],a[i+2]+=r[t+2],a[o]+=r[t],a[o+1]+=r[t+1],a[o+2]+=r[t+2]}let c=a.length/3;for(let e=0;e<c;e++){let t=3*e;o[0]=a[t],o[1]=a[t+1],o[2]=a[t+2],n.vec3.normalize(s,o),a[t]=s[0],a[t+1]=s[1],a[t+2]=s[2]}this.normalsCalculated_=!0}}t.FaceMesh=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cameraFrameTextureMatrix=t.CameraDraw=void 0;const n=r(4),i=r(1);let a=i.mat4.create();t.CameraDraw=class{constructor(e){this._gl=e}dispose(){this._vbo&&this._gl.deleteBuffer(this._vbo),this._vbo=void 0,this._shader&&this._gl.deleteProgram(this._shader.prog),this._shader=void 0}_generate(e,t){if(this._vbo)return this._vbo;if(this._vbo||(this._vbo=e.createBuffer()),!this._vbo)throw new Error("Unable to create buffer object");let r=new Float32Array([-1,-1,0,0,0,-1,1,0,0,1,1,-1,0,1,0,1,-1,0,1,0,-1,1,0,0,1,1,1,0,1,1]);return e.bindBuffer(e.ARRAY_BUFFER,this._vbo),e.bufferData(e.ARRAY_BUFFER,new Float32Array(r),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,null),this._vbo}drawCameraFrame(e,t,r,n){if(!r.texture)return;let i=this._gl;i.disable(i.DEPTH_TEST),i.disable(i.SCISSOR_TEST),i.disable(i.CULL_FACE),i.disable(i.BLEND);let o=this._getCameraShader(i),s=this._generate(i,r);i.activeTexture(i.TEXTURE0),i.useProgram(o.prog),i.uniformMatrix4fv(o.unif_skinTexTransform,!1,u(r.dataWidth,r.dataHeight,e,t,r.uvTransform||a,n)),i.uniform1i(o.unif_skinSampler,0),i.bindTexture(i.TEXTURE_2D,r.texture),i.bindBuffer(i.ARRAY_BUFFER,s),i.vertexAttribPointer(o.attr_position,3,i.FLOAT,!1,20,0),i.enableVertexAttribArray(o.attr_position),i.vertexAttribPointer(o.attr_texCoord,2,i.FLOAT,!1,20,12),i.enableVertexAttribArray(o.attr_texCoord),i.drawArrays(i.TRIANGLES,0,6),i.disableVertexAttribArray(o.attr_position),i.disableVertexAttribArray(o.attr_texCoord),i.bindTexture(i.TEXTURE_2D,null),i.bindBuffer(i.ARRAY_BUFFER,null),i.useProgram(null)}_getCameraShader(e){if(this._shader)return this._shader;let t=e.createProgram();if(!t)throw new Error("Unable to create program");let r=n.compileShader(e,e.VERTEX_SHADER,o),i=n.compileShader(e,e.FRAGMENT_SHADER,s);e.attachShader(t,r),e.attachShader(t,i),n.linkProgram(e,t);let a=e.getUniformLocation(t,"skinTexTransform");if(!a)throw new Error("Unable to get uniform location skinTexTransform");let u=e.getUniformLocation(t,"skinSampler");if(!u)throw new Error("Unable to get uniform location skinSampler");return this._shader={prog:t,unif_skinTexTransform:a,unif_skinSampler:u,attr_position:e.getAttribLocation(t,"position"),attr_texCoord:e.getAttribLocation(t,"texCoord")},this._shader}};let o="\n#ifndef GL_ES\n#define highp\n#define mediump\n#define lowp\n#endif\n\nattribute vec4 position;\nattribute vec4 texCoord;\nvarying vec4 skinTexVarying;\nuniform mat4 skinTexTransform;\n\nvoid main()\n{\n gl_Position = position;\n skinTexVarying = skinTexTransform * texCoord;\n}",s="\n#define highp mediump\n#ifdef GL_ES\n // define default precision for float, vec, mat.\n precision highp float;\n#else\n#define highp\n#define mediump\n#define lowp\n#endif\n\nvarying vec4 skinTexVarying;\nuniform lowp sampler2D skinSampler;\n\nvoid main()\n{\n gl_FragColor = texture2DProj(skinSampler, skinTexVarying);\n}";function u(e,t,r,n,a,o){let s=i.mat4.create(),u=i.mat4.create();i.mat4.fromTranslation(u,[-.5,-.5,0]),i.mat4.multiply(s,u,s),o&&(i.mat4.fromScaling(u,[-1,1,1]),i.mat4.multiply(s,u,s)),i.mat4.fromRotation(u,-1*function(){if(window.screen.orientation)switch(window.screen.orientation.type){case"portrait-primary":return 270;case"landscape-secondary":return 180;case"portrait-secondary":return 90;default:return 0}else if(void 0!==window.orientation)switch(window.orientation){case 0:return 270;case 90:return 0;case 180:return 90;case-90:return 180}return 0}()*Math.PI/180,[0,0,1]),i.mat4.multiply(s,u,s);let c=i.vec3.create();c[0]=r,c[1]=n,c[2]=0,i.vec3.transformMat4(c,c,u);let f=Math.abs(c[0]),d=Math.abs(c[1]);i.mat4.fromScaling(u,[1,-1,1]),i.mat4.multiply(s,u,s);let _=f/d,l=e/t;return _>l?i.mat4.fromScaling(u,[1,l/_,1]):i.mat4.fromScaling(u,[_/l,1,1]),i.mat4.multiply(s,u,s),i.mat4.fromTranslation(u,[.5,.5,0]),i.mat4.multiply(s,u,s),i.mat4.multiply(s,a,s),s}t.cameraFrameTextureMatrix=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FaceDraw=void 0;const n=r(4);t.FaceDraw=class{constructor(e){this._gl=e}dispose(){this._vbo&&this._gl.deleteBuffer(this._vbo),this._normalbo&&this._gl.deleteBuffer(this._normalbo),this._ibo&&this._gl.deleteBuffer(this._ibo),this._shader&&this._gl.deleteProgram(this._shader.prog),this._vbo=void 0,this._normalbo=void 0,this._ibo=void 0,this._shader=void 0}_generateIBO(e,t){if(this._ibo&&this._lastIndices===e)return this._ibo;if(this._lastIndices=e,this._ibo||(this._ibo=t.createBuffer()),!this._ibo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._ibo),t.bufferData(t.ELEMENT_ARRAY_BUFFER,e,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null),this._ibo}_generateVBO(e,t){if(this._vbo||(this._vbo=t.createBuffer()),!this._vbo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ARRAY_BUFFER,this._vbo),t.bufferData(t.ARRAY_BUFFER,e,t.STREAM_DRAW),t.bindBuffer(t.ARRAY_BUFFER,null),this._vbo}_generateNormalBO(e,t){if(this._normalbo||(this._normalbo=t.createBuffer()),!this._normalbo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ARRAY_BUFFER,this._normalbo),t.bufferData(t.ARRAY_BUFFER,e,t.STREAM_DRAW),t.bindBuffer(t.ARRAY_BUFFER,null),this._normalbo}drawFace(e,t){let r=this._gl,n=this._getShader(r),i=this._generateVBO(t.getVertices(),r),a=this._generateNormalBO(t.getNormals(),r),o=this._generateIBO(t.getIndices(),r);r.enable(r.DEPTH_TEST),r.enable(r.CULL_FACE),r.useProgram(n.prog),r.uniformMatrix4fv(n.unif_matrix,!1,e),r.bindBuffer(r.ARRAY_BUFFER,i),r.vertexAttribPointer(n.attr_position,3,r.FLOAT,!1,12,0),r.enableVertexAttribArray(n.attr_position),r.bindBuffer(r.ARRAY_BUFFER,a),r.vertexAttribPointer(n.attr_normal,3,r.FLOAT,!1,12,0),r.enableVertexAttribArray(n.attr_normal),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,o),r.drawElements(r.TRIANGLES,t.getIndices().length,r.UNSIGNED_SHORT,0),r.disableVertexAttribArray(n.attr_position),r.disableVertexAttribArray(n.attr_normal),r.bindBuffer(r.ARRAY_BUFFER,null),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null)}_getShader(e){if(this._shader)return this._shader;let t=e.createProgram();if(!t)throw new Error("Unable to create program");let r=n.compileShader(e,e.VERTEX_SHADER,i),o=n.compileShader(e,e.FRAGMENT_SHADER,a);e.attachShader(t,r),e.attachShader(t,o),n.linkProgram(e,t);let s=e.getUniformLocation(t,"matrix");if(!s)throw new Error("Unable to get uniform location mattrix");return this._shader={prog:t,unif_matrix:s,attr_position:e.getAttribLocation(t,"position"),attr_normal:e.getAttribLocation(t,"normal")},this._shader}};let i="\n#ifndef GL_ES\n#define highp\n#define mediump\n#define lowp\n#endif\n\nuniform mat4 matrix;\nattribute vec4 position;\nattribute vec3 normal;\nvarying highp vec3 vnormal;\n\nvoid main()\n{\n gl_Position = matrix * position;\n vnormal = normal;\n}",a="\n#define highp mediump\n#ifdef GL_ES\n // define default precision for float, vec, mat.\n precision highp float;\n#else\n#define highp\n#define mediump\n#define lowp\n#endif\n\nvarying vec4 skinTexVarying;\nvarying highp vec3 vnormal;\nuniform lowp sampler2D skinSampler;\n\nvoid main()\n{\n vec3 normal2 = 0.5 * vnormal + 0.5;\n gl_FragColor = vec4(normal2.x , normal2.y, normal2.z, 1.0);\n}"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FaceDrawProject=void 0;const n=r(4);t.FaceDrawProject=class{constructor(e){this._gl=e}dispose(){this._vbo&&this._gl.deleteBuffer(this._vbo),this._uvbo&&this._gl.deleteBuffer(this._uvbo),this._ibo&&this._gl.deleteBuffer(this._ibo),this._shader&&this._gl.deleteProgram(this._shader.prog),this._vbo=void 0,this._uvbo=void 0,this._ibo=void 0,this._shader=void 0}_generateIBO(e,t){if(this._ibo&&this._lastIndices===e)return this._ibo;if(this._lastIndices=e,this._ibo||(this._ibo=t.createBuffer()),!this._ibo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._ibo),t.bufferData(t.ELEMENT_ARRAY_BUFFER,e,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null),this._ibo}_generateVBO(e,t){if(this._vbo||(this._vbo=t.createBuffer()),!this._vbo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ARRAY_BUFFER,this._vbo),t.bufferData(t.ARRAY_BUFFER,e,t.STREAM_DRAW),t.bindBuffer(t.ARRAY_BUFFER,null),this._vbo}_generateUVBO(e,t){if(this._uvbo||(this._uvbo=t.createBuffer()),!this._uvbo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ARRAY_BUFFER,this._uvbo),t.bufferData(t.ARRAY_BUFFER,e,t.STREAM_DRAW),t.bindBuffer(t.ARRAY_BUFFER,null),this._uvbo}drawFace(e,t,r,n,i,a){let o=this._gl,s=this._getShader(o),u=this._generateVBO(t,o),c=this._generateUVBO(n,o),f=this._generateIBO(i,o);o.enable(o.DEPTH_TEST),o.enable(o.CULL_FACE),o.useProgram(s.prog),o.uniformMatrix4fv(s.unif_matrix,!1,e),o.uniformMatrix4fv(s.unif_uvmatrix,!1,r),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,a),o.uniform1i(s.unif_sampler,0),o.bindBuffer(o.ARRAY_BUFFER,u),o.vertexAttribPointer(s.attr_position,3,o.FLOAT,!1,12,0),o.enableVertexAttribArray(s.attr_position),o.bindBuffer(o.ARRAY_BUFFER,c),o.vertexAttribPointer(s.attr_uv,3,o.FLOAT,!1,12,0),o.enableVertexAttribArray(s.attr_uv),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,f),o.drawElements(o.TRIANGLES,6912,o.UNSIGNED_SHORT,0),o.disableVertexAttribArray(s.attr_position),o.disableVertexAttribArray(s.attr_uv),o.bindBuffer(o.ARRAY_BUFFER,null),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null)}_getShader(e){if(this._shader)return this._shader;let t=e.createProgram();if(!t)throw new Error("Unable to create program");let r=n.compileShader(e,e.VERTEX_SHADER,i),o=n.compileShader(e,e.FRAGMENT_SHADER,a);e.attachShader(t,r),e.attachShader(t,o),n.linkProgram(e,t);let s=e.getUniformLocation(t,"matrix");if(!s)throw new Error("Unable to get uniform location matrix");let u=e.getUniformLocation(t,"uvmatrix");if(!u)throw new Error("Unable to get uniform location matrix");let c=e.getUniformLocation(t,"uSampler");if(!c)throw new Error("Unable to get uniform location sampler");return this._shader={prog:t,unif_matrix:s,unif_sampler:c,unif_uvmatrix:u,attr_position:e.getAttribLocation(t,"position"),attr_uv:e.getAttribLocation(t,"uv"),attr_texturecoord:e.getAttribLocation(t,"aTextureCoord")},this._shader}};let i="\n#ifndef GL_ES\n#define highp\n#define mediump\n#define lowp\n#endif\n\nuniform mat4 matrix;\nuniform mat4 uvmatrix;\nattribute vec4 position;\nattribute vec3 normal;\nattribute vec3 uv;\n\n// varying highp vec3 vnormal;\n\nvarying highp vec2 vTextureCoord;\nvarying highp float vAlpha;\n\nvoid main()\n{\n gl_Position = matrix * position;\n vec4 ret = uvmatrix * vec4(uv.x, uv.y, uv.z, 1.0);\n ret.x /= ret.w * 2.0;\n ret.y /= ret.w * 2.0;\n ret.x += 0.5;\n ret.y += 0.0;\n vAlpha = 1.0;\n vTextureCoord = ret.xy;\n}",a="\n#define highp mediump\n#ifdef GL_ES\n // define default precision for float, vec, mat.\n precision highp float;\n#else\n#define highp\n#define mediump\n#define lowp\n#endif\n\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vnormal;\nvarying highp float vAlpha;\nuniform lowp sampler2D uSampler;\n\nvoid main()\n{\n // vec3 normal2 = 0.5 * vnormal + 0.5;\n vec4 p = texture2D(uSampler, vTextureCoord);\n p.a = vAlpha;\n gl_FragColor = p; // vec4(normal2.x , normal2.y, normal2.z, 1.0);\n}"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageProcessGL=void 0;const n=r(1),i=r(3),a=r(4);t.ImageProcessGL=class{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=n.mat4.create(),this._framebufferWidth=0,this._framebufferHeight=0,this._framebufferId=null,this._renderTexture=null}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,n){let a=this._gl;a.disable(a.SCISSOR_TEST),a.disable(a.DEPTH_TEST),a.disable(a.BLEND),a.disable(a.CULL_FACE),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,e);const o=a.RGBA,s=a.RGBA,u=a.UNSIGNED_BYTE;a.texImage2D(a.TEXTURE_2D,0,o,s,u,t);let c=0,f=0;"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?(c=t.videoWidth,f=t.videoHeight):(c=t.width,f=t.height),f>c&&(f=[c,c=f][0]),this._updateTransforms(r,n);let d=this._getFramebuffer(a,i.profile.dataWidth/4,i.profile.dataHeight),_=this._getVertexBuffer(a),l=this._getIndexBuffer(a),h=this._getGreyscaleShader(a);a.bindFramebuffer(a.FRAMEBUFFER,d),a.viewport(0,0,this._framebufferWidth,this._framebufferHeight),a.clearColor(0,0,0,1),a.clear(a.COLOR_BUFFER_BIT),a.bindBuffer(a.ARRAY_BUFFER,_),a.vertexAttribPointer(h.aVertexPositionLoc,2,a.FLOAT,!1,16,0),a.enableVertexAttribArray(h.aVertexPositionLoc),a.vertexAttribPointer(h.aTextureCoordLoc,2,a.FLOAT,!1,16,8),a.enableVertexAttribArray(h.aTextureCoordLoc),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,l),a.useProgram(h.program),a.uniform1f(h.uTexWidthLoc,i.profile.dataWidth),a.uniformMatrix4fv(h.uUvTransformLoc,!1,this._cameraUvTransform),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,e),a.uniform1i(h.uSamplerLoc,0),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0),a.disableVertexAttribArray(h.aVertexPositionLoc),a.disableVertexAttribArray(h.aTextureCoordLoc),a.bindFramebuffer(a.FRAMEBUFFER,null),a.bindBuffer(a.ARRAY_BUFFER,null),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,null),a.useProgram(null),a.bindTexture(a.TEXTURE_2D,null)}readFrame(e,t){let r=this._gl,n=new Uint8Array(t),a=this._getFramebuffer(r,i.profile.dataWidth/4,i.profile.dataHeight);return r.bindFramebuffer(r.FRAMEBUFFER,a),r.readPixels(0,0,this._framebufferWidth,this._framebufferHeight,r.RGBA,r.UNSIGNED_BYTE,n),r.bindFramebuffer(r.FRAMEBUFFER,null),{uvTransform:this._cameraUvTransform,data:t,texture:e,dataWidth:i.profile.dataWidth,dataHeight:i.profile.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),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 n=e.checkFramebufferStatus(e.FRAMEBUFFER);if(n!==e.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer not complete: "+n.toString());return this._framebufferWidth=t,this._framebufferHeight=r,e.bindTexture(e.TEXTURE_2D,null),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=a.compileShader(e,e.VERTEX_SHADER,o),n=a.compileShader(e,e.FRAGMENT_SHADER,s);e.attachShader(t,r),e.attachShader(t,n),a.linkProgram(e,t);let i=e.getUniformLocation(t,"uTexWidth");if(!i)throw new Error("Unable to get uniform location uTexWidth");let u=e.getUniformLocation(t,"uUvTransform");if(!u)throw new Error("Unable to get uniform location uUvTransform");let c=e.getUniformLocation(t,"uSampler");if(!c)throw new Error("Unable to get uniform location uSampler");return this._greyscaleShader={program:t,aVertexPositionLoc:e.getAttribLocation(t,"aVertexPosition"),aTextureCoordLoc:e.getAttribLocation(t,"aTextureCoord"),uTexWidthLoc:i,uUvTransformLoc:u,uSamplerLoc:c},this._greyscaleShader}};let o="\n attribute vec4 aVertexPosition;\n attribute vec2 aTextureCoord;\n\n varying highp vec2 vTextureCoord1;\n varying highp vec2 vTextureCoord2;\n varying highp vec2 vTextureCoord3;\n varying highp vec2 vTextureCoord4;\n\n uniform float uTexWidth;\n\tuniform mat4 uUvTransform;\n\n void main(void) {\n highp vec2 offset1 = vec2(1.5 / uTexWidth, 0);\n highp vec2 offset2 = vec2(0.5 / uTexWidth, 0);\n\n gl_Position = aVertexPosition;\n vTextureCoord1 = (uUvTransform * vec4(aTextureCoord - offset1, 0, 1)).xy;\n vTextureCoord2 = (uUvTransform * vec4(aTextureCoord - offset2, 0, 1)).xy;\n vTextureCoord3 = (uUvTransform * vec4(aTextureCoord + offset2, 0, 1)).xy;\n vTextureCoord4 = (uUvTransform * vec4(aTextureCoord + offset1, 0, 1)).xy;\n }\n",s="\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"},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageBitmapCameraSource=void 0;const i=r(3),a=r(2),o=r(8),s=r(5),u=r(0),c=r(7),f=r(1);class d extends o.Source{constructor(e,t,r){super(),this._impl=e,this._pipeline=t,this._deviceId=r,this._currentStream=null,this._activeDeviceId=null,this._isPaused=!0,this._isUserFacing=!1,this._hadFrames=!1,this._canvas=new OffscreenCanvas(640,480),this._context=this._canvas.getContext("2d"),this._lastFrameTime=-1,this._video=document.createElement("video"),this._cameraToDeviceTransform=f.mat4.create(),this._cameraToDeviceTransformUserFacing=f.mat4.create(),this._cameraModel=new Float32Array([300,300,160,120,0,0]),this._hasStartedOrientation=!1,this._deviceMotionListener=e=>{let t=a.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.accelerationIncludingGravity&&null!==e.accelerationIncludingGravity.x&&null!==e.accelerationIncludingGravity.y&&null!==e.accelerationIncludingGravity.z&&t.motionAccelerometerSubmit(r,e.accelerationIncludingGravity.x*i.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.y*i.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.z*i.profile.deviceMotionMutliplier),null===e.rotationRate||null===e.rotationRate.alpha||null===e.rotationRate.beta||null===e.rotationRate.gamma||this._hasStartedOrientation?this._hasStartedOrientation||this._startDeviceOrientation():(e.timeStamp,t.motionRotationRateSubmit(r,e.rotationRate.alpha*Math.PI/-180,e.rotationRate.beta*Math.PI/-180,e.rotationRate.gamma*Math.PI/-180))},u.zcout("Using ImageBitmap camera source"),f.mat4.fromScaling(this._cameraToDeviceTransformUserFacing,[-1,1,-1]),this._video.muted=!0,this._video.setAttribute("playsinline",""),this._video.setAttribute("webkit-playsinline",""),i.profile.videoElementInDOM&&(this._video.style.width="0px",this._video.style.height="0px",document.body.appendChild(this._video)),this._video.addEventListener("loadedmetadata",()=>{this._hadFrames=!0})}destroy(){this.pause(),c.deleteCameraSource(this._impl)}_stop(){if(!this._currentStream)return;this._currentStream.getTracks().forEach(e=>e.stop()),this._currentStream=null}pause(){this._isPaused=!0;let e=a.Pipeline.get(this._pipeline);e&&e.currentCameraSource===this&&(e.currentCameraSource=void 0),this._stopDeviceMotion(),this._syncCamera()}start(){var e;let t=a.Pipeline.get(this._pipeline);t&&t.currentCameraSource!==this&&(null===(e=t.currentCameraSource)||void 0===e||e.pause(),t.currentCameraSource=this),this._isPaused=!1,this._startDeviceMotion(),this._syncCamera()}_getConstraints(){return n(this,void 0,void 0,(function*(){let e,t;this._deviceId!==d.DEFAULT_DEVICE_ID&&this._deviceId!==d.USER_DEFAULT_DEVICE_ID?e=this._deviceId:t=this._deviceId===d.DEFAULT_DEVICE_ID?"environment":"user";let r={audio:!1,video:{facingMode:t,width:i.profile.videoWidth,height:i.profile.videoHeight,frameRate:i.profile.requestHighFrameRate?60:void 0,deviceId:e}};if(e)return r;if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return r;let n=yield navigator.mediaDevices.enumerateDevices(),a=!1;return n=n.filter(e=>{if("videoinput"!==e.kind)return!1;if(e.getCapabilities){a=!0;let r=e.getCapabilities();if(r&&r.facingMode&&r.facingMode.indexOf("user"===t?"user":"environment")<0)return!1}return!0}),a&&0!==n.length?("object"==typeof r.video&&(u.zcout("choosing device ID",n[n.length-1].deviceId),r.video.deviceId=n[n.length-1].deviceId),r):r}))}getFrame(e){var t,r;if(!this._context)return;if(!this._hadFrames)return;if(e)return;let n=performance.now();if(n<this._lastFrameTime+25)return;this._lastFrameTime=n,this._canvas.width!==this._video.videoWidth&&(this._canvas.width=this._video.videoWidth),this._canvas.height!==this._video.videoHeight&&(this._canvas.height=this._video.videoHeight),this._context.drawImage(this._video,0,0);const o=this._canvas.transferToImageBitmap();let u=s.cameraRotationForScreenOrientation(!1),c=a.Pipeline.get(this._pipeline);if(!c)return;let f=300*i.profile.dataWidth/320;this._cameraModel[0]=f,this._cameraModel[1]=f,this._cameraModel[2]=.5*i.profile.dataWidth,this._cameraModel[3]=.5*i.profile.dataHeight;let d=c.registerToken({dataWidth:this._canvas.width,dataHeight:this._canvas.height,texture:void 0,userFacing:this._isUserFacing,cameraSource:this,cameraModel:this._cameraModel.slice(),cameraToDevice:this._isUserFacing?this._cameraToDeviceTransformUserFacing:this._cameraToDeviceTransform});null===(r=null===(t=a.Pipeline.get(this._pipeline))||void 0===t?void 0:t.sendImageBitmapToWorker)||void 0===r||r.call(t,o,u,this._isUserFacing,d,this._cameraModel,this._isUserFacing?this._cameraToDeviceTransformUserFacing:this._cameraToDeviceTransform)}_getUserMedia(){return n(this,void 0,void 0,(function*(){let e=yield this._getConstraints();return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?yield navigator.mediaDevices.getUserMedia(e):yield new Promise((t,r)=>{navigator.getUserMedia(e,t,r)})}))}_syncCamera(){return n(this,void 0,void 0,(function*(){if(this._currentStream&&this._isPaused)this._stop();else if(this._currentStream&&this._activeDeviceId!==this._deviceId&&this._stop(),!this._isPaused){if(this._activeDeviceId=this._deviceId,this._currentStream=yield this._getUserMedia(),this._isPaused)return void(yield this._syncCamera());if(this._isUserFacing=!1,this._currentStream){let e=this._currentStream.getVideoTracks();e.length>0&&(this._isUserFacing="user"===e[0].getSettings().facingMode)}this._video.src="",this._video.loop=!1,this._video.muted=!0,this._video.srcObject=this._currentStream,this._video.play()}}))}_startDeviceOrientation(){this._hasStartedOrientation||(this._hasStartedOrientation=!0,window.addEventListener("deviceorientation",e=>{let t=a.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.alpha&&null!==e.beta&&null!==e.gamma&&t.motionAttitudeSubmit(r,e.alpha,e.beta,e.gamma)}))}_startDeviceMotion(){window.addEventListener("devicemotion",this._deviceMotionListener,!1)}_stopDeviceMotion(){window.removeEventListener("devicemotion",this._deviceMotionListener)}uploadGL(e){const t=a.Pipeline.get(this._pipeline),r=null==t?void 0:t.glContext;if(!e||e.texture||!e.frame||!t||!r)return;let n=t.getVideoTexture();n&&(r.bindTexture(r.TEXTURE_2D,n),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e.frame),r.bindTexture(r.TEXTURE_2D,null),e.texture=n,e.frame.close(),delete e.frame)}}t.ImageBitmapCameraSource=d,d.USER_DEFAULT_DEVICE_ID="Simulated User Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b",d.DEFAULT_DEVICE_ID="Simulated Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b"},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MSTPCameraSource=void 0;const i=r(3),a=r(2),o=r(8),s=r(5),u=r(0),c=r(7);class f extends o.Source{constructor(e,t,r){super(),this._impl=e,this._pipeline=t,this._deviceId=r,this._currentStream=null,this._activeDeviceId=null,this._isPaused=!0,this._isUserFacing=!1,this._cameraToScreenRotation=0,this._hasStartedOrientation=!1,this._deviceMotionListener=e=>{let t=a.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.accelerationIncludingGravity&&null!==e.accelerationIncludingGravity.x&&null!==e.accelerationIncludingGravity.y&&null!==e.accelerationIncludingGravity.z&&t.motionAccelerometerSubmit(r,e.accelerationIncludingGravity.x*i.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.y*i.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.z*i.profile.deviceMotionMutliplier),null===e.rotationRate||null===e.rotationRate.alpha||null===e.rotationRate.beta||null===e.rotationRate.gamma||this._hasStartedOrientation?this._hasStartedOrientation||this._startDeviceOrientation():(e.timeStamp,t.motionRotationRateSubmit(r,e.rotationRate.alpha*Math.PI/-180,e.rotationRate.beta*Math.PI/-180,e.rotationRate.gamma*Math.PI/-180))},u.zcout("Using MSTP camera source")}destroy(){this.pause(),c.deleteCameraSource(this._impl)}_stop(){if(!this._currentStream)return;this._currentStream.getTracks().forEach(e=>e.stop()),this._currentStream=null}pause(){this._isPaused=!0;let e=a.Pipeline.get(this._pipeline);e&&e.currentCameraSource===this&&(e.currentCameraSource=void 0),this._stopDeviceMotion(),this._syncCamera()}start(){var e;let t=a.Pipeline.get(this._pipeline);t&&t.currentCameraSource!==this&&(null===(e=t.currentCameraSource)||void 0===e||e.pause(),t.currentCameraSource=this),this._isPaused=!1,this._startDeviceMotion(),this._syncCamera()}_getConstraints(){return n(this,void 0,void 0,(function*(){let e,t;this._deviceId!==f.DEFAULT_DEVICE_ID&&this._deviceId!==f.USER_DEFAULT_DEVICE_ID?e=this._deviceId:t=this._deviceId===f.DEFAULT_DEVICE_ID?"environment":"user";let r={audio:!1,video:{facingMode:t,width:i.profile.videoWidth,height:i.profile.videoHeight,frameRate:i.profile.requestHighFrameRate?60:30,deviceId:e}};if(e)return r;if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return r;let n=yield navigator.mediaDevices.enumerateDevices(),a=!1;return n=n.filter(e=>{if("videoinput"!==e.kind)return!1;if(e.getCapabilities){a=!0;let r=e.getCapabilities();if(r&&r.facingMode&&r.facingMode.indexOf("user"===t?"user":"environment")<0)return!1}return!0}),a&&0!==n.length?("object"==typeof r.video&&(u.zcout("choosing device ID",n[n.length-1].deviceId),r.video.deviceId=n[n.length-1].deviceId),r):r}))}getFrame(e){var t,r;let n=s.cameraRotationForScreenOrientation(!1);n!=this._cameraToScreenRotation&&(null===(r=null===(t=a.Pipeline.get(this._pipeline))||void 0===t?void 0:t.sendCameraToScreenRotationToWorker)||void 0===r||r.call(t,n),this._cameraToScreenRotation=n)}_getUserMedia(){return n(this,void 0,void 0,(function*(){let e=yield this._getConstraints();return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?yield navigator.mediaDevices.getUserMedia(e):yield new Promise((t,r)=>{navigator.getUserMedia(e,t,r)})}))}_syncCamera(){return n(this,void 0,void 0,(function*(){if(this._currentStream&&this._isPaused)this._stop();else if(this._currentStream&&this._activeDeviceId!==this._deviceId&&this._stop(),!this._isPaused){if(this._activeDeviceId=this._deviceId,this._currentStream=yield this._getUserMedia(),this._isPaused)return void(yield this._syncCamera());if(this._isUserFacing=!1,this._currentStream){let e=this._currentStream.getVideoTracks();if(e.length>0){this._isUserFacing="user"===e[0].getSettings().facingMode;let t=new MediaStreamTrackProcessor({track:e[0]}),r=a.Pipeline.get(this._pipeline);r&&r.sendCameraStreamToWorker(this._impl,t.readable,this._isUserFacing)}}}}))}_startDeviceOrientation(){this._hasStartedOrientation||(this._hasStartedOrientation=!0,window.addEventListener("deviceorientation",e=>{let t=a.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.alpha&&null!==e.beta&&null!==e.gamma&&t.motionAttitudeSubmit(r,e.alpha,e.beta,e.gamma)}))}_startDeviceMotion(){window.addEventListener("devicemotion",this._deviceMotionListener,!1)}_stopDeviceMotion(){window.removeEventListener("devicemotion",this._deviceMotionListener)}uploadGL(e){const t=a.Pipeline.get(this._pipeline),r=null==t?void 0:t.glContext;if(!e||e.texture||!e.frame||!t||!r)return;let n=t.getVideoTexture();n&&(r.bindTexture(r.TEXTURE_2D,n),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e.frame),r.bindTexture(r.TEXTURE_2D,null),e.texture=n,e.frame.close(),delete e.frame)}}t.MSTPCameraSource=f,f.USER_DEFAULT_DEVICE_ID="Simulated User Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b",f.DEFAULT_DEVICE_ID="Simulated Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FaceLandmark=t.getFaceLandmark=t.destroyFaceLandmark=t.createFaceLandmark=void 0;const n=r(1),i=r(37),a=r(0);let o=1,s=new Map;t.createFaceLandmark=function(e){let t=o++;return s.set(t,new u(e)),a.zcout("face_landmark_t initialized"),t},t.destroyFaceLandmark=function(e){s.delete(e)},t.getFaceLandmark=function(e){return s.get(e)};class u{constructor(e){this._name=e,this.anchor_pose=n.mat4.create()}_getVertex(e,t,r){let n=r.mean.slice();for(let t=0;t<50;t++)n[0]+=e[t]*r.identity[3*t+0],n[1]+=e[t]*r.identity[3*t+1],n[2]+=e[t]*r.identity[3*t+2];for(let e=0;e<29;e++)n[0]+=t[e]*r.expression[3*e+0],n[1]+=t[e]*r.expression[3*e+1],n[2]+=t[e]*r.expression[3*e+2];return n}update(e,t,r){let a,o=i.landmarkData[this._name.toString()];if(o){if(Array.isArray(o)){a=this._getVertex(e,t,o[0]);let r=this._getVertex(e,t,o[1]);a[0]=.5*(a[0]+r[0]),a[1]=.5*(a[1]+r[1]),a[2]=.5*(a[2]+r[2])}else a=this._getVertex(e,t,o);r&&(a[0]*=-1),n.mat4.fromTranslation(this.anchor_pose,a)}}}t.FaceLandmark=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.landmarkData=void 0,t.landmarkData={0:[{mean:[.235,.2344,.7305],identity:[.008,.0087,.0024,-.0026,6e-4,-.0022,5e-4,.0033,.0026,.0017,-.0055,-8e-4,.0011,.0059,0,2e-4,.001,-.001,-.0044,-.0011,-1e-4,.0024,.0019,-9e-4,4e-4,-.0015,0,.0038,.0013,3e-4,.002,-.0021,.0018,.0023,.0011,.0012,-.0011,-.0017,9e-4,-.0012,-8e-4,7e-4,-.0017,.0029,-.0029,8e-4,-.0027,8e-4,-.0017,4e-4,9e-4,-.001,-3e-4,8e-4,-.0016,-3e-4,-7e-4,.0016,-9e-4,.0021,-5e-4,.0011,-.0024,-1e-4,6e-4,1e-4,-.0026,-4e-4,-3e-4,-9e-4,5e-4,3e-4,-8e-4,-.001,-4e-4,-8e-4,.0022,-.0014,-1e-4,-.0023,0,-.0018,7e-4,-.0036,.0017,.0017,-.0018,-2e-4,-4e-4,-9e-4,-8e-4,3e-4,.0012,9e-4,-4e-4,-.0016,5e-4,-.0013,.0011,.0023,.0029,.0024,.0017,-.0027,-4e-4,-.001,-.0018,-.0015,-.001,.001,-.0013,-1e-4,-2e-4,7e-4,3e-4,3e-4,-.0016,9e-4,-.0021,4e-4,.0014,.002,-7e-4,-4e-4,2e-4,-4e-4,-6e-4,-9e-4,.0015,4e-4,-4e-4,5e-4,-.0015,9e-4,3e-4,3e-4,-2e-4,-8e-4,-9e-4,.0023,4e-4,1e-4,-4e-4,-1e-4,7e-4,2e-4,.001,1e-4,-.0029,-5e-4],expression:[0,3e-4,.0052,-7e-4,-.0051,-.0103,0,.0019,.0027,-.0054,.0135,.035,-5e-4,-6e-4,.0025,-.0045,-.0557,-.003,-.0191,-.1199,.0548,-.0036,-.0682,-.0167,2e-4,-.0085,-.0085,.0044,.0041,-.0568,.0044,.179,.0065,-.0017,-.1006,.0036,-.0267,-.3279,.0301,-.0011,-.0173,-.001,.0046,.2808,.0207,.0162,.238,-.0225,.0017,.1041,.0203,5e-4,.0161,.0031,-.0436,.6504,.0873,-.0099,.1039,.0048,-.0254,.2534,-.0042,.003,-.0106,-.0153,-.0118,.0252,9e-4,-.0071,.0099,.007,-.0724,.0461,-.0235,.0833,.004,.0141,-.0219,.0132,-.0042,-.0179,.0045,-.0215,.3638,.0054,-.0445]},{mean:[.2358,.1466,.7183],identity:[.0077,.0093,1e-4,-.0022,0,-.0041,5e-4,.0022,.0028,.0018,-.0038,-.0013,.001,.0044,-2e-4,0,.0017,-.0016,-.0043,-2e-4,-1e-4,.0023,9e-4,5e-4,-7e-4,-4e-4,-.0017,.003,7e-4,6e-4,.0011,-.0018,5e-4,.0018,-8e-4,4e-4,-.0023,-6e-4,-3e-4,-.0015,-.0014,-1e-4,-.0018,.0027,-.0026,3e-4,-.0031,.0011,-.0026,-.0011,.0012,-.0013,-2e-4,7e-4,-.0021,.0021,4e-4,.0012,-.001,.002,-3e-4,2e-4,-.0026,-3e-4,.001,1e-4,-.0018,-.001,9e-4,-.0011,.001,4e-4,-8e-4,-7e-4,-.001,-3e-4,7e-4,-5e-4,-6e-4,-.0019,-5e-4,-.002,7e-4,-.0027,.0014,.0013,6e-4,-5e-4,-3e-4,-3e-4,-.001,0,.0019,1e-4,6e-4,-.0012,4e-4,-9e-4,4e-4,.0025,3e-4,.0024,.0017,-9e-4,-.0015,-.0015,-.001,-.0023,-.001,-5e-4,-4e-4,8e-4,9e-4,7e-4,2e-4,7e-4,-9e-4,9e-4,-.0013,1e-4,9e-4,2e-4,6e-4,-6e-4,-8e-4,-4e-4,-7e-4,8e-4,.0019,3e-4,.0015,2e-4,-.0015,-3e-4,0,6e-4,3e-4,6e-4,-6e-4,2e-4,5e-4,-4e-4,.0012,-4e-4,2e-4,-8e-4,6e-4,-4e-4,2e-4,-.0021],expression:[-.0034,.0054,.0069,.004,6e-4,-.0104,-3e-4,.0036,.0025,.0065,.0296,.0208,-9e-4,.0154,.0029,-.0167,.0124,.004,-.0102,.0351,.028,-.019,.0146,-.0035,-.0023,-.0069,-.0051,-.01,.0262,-.028,.0112,.082,.023,-.0019,-.066,-.0104,-.0408,.0164,.0075,-.0074,.0367,.0041,.0517,-.0207,.0045,.0291,-.0672,-.0129,.0345,-.1558,-.0106,.0037,-.0437,-.0021,.0854,-.1121,.0187,.0041,.0072,.0011,.0193,-.0143,-.0119,.005,-.02,-.0122,-.008,.0527,.0036,-.006,.0222,.007,-.0429,.046,-.0046,.0226,-.0059,.0202,-.0173,.0087,0,-.0067,-.0095,-.0153,.1506,-.0017,.0021]}],1:[{mean:[-.2271,.2323,.7319],identity:[-.0084,.0097,.0018,.0041,2e-4,-.002,-.0012,.0036,.0019,-9e-4,-.0063,-.001,-3e-4,.0053,6e-4,1e-4,5e-4,-.0015,.0044,-.0025,-.0015,-.002,.0016,-6e-4,2e-4,-.0013,0,-.0022,2e-4,2e-4,-.0025,-.0014,.0015,8e-4,2e-4,.0012,6e-4,-6e-4,.0017,0,3e-4,-1e-4,.0024,.0025,-.0029,-.0015,-.0015,1e-4,.0031,-.0016,7e-4,.0019,6e-4,.002,9e-4,.001,-.0014,-.002,-.0015,.0029,1e-4,5e-4,-.0023,8e-4,-.0011,.0019,.0017,-3e-4,-.0011,-3e-4,.0011,-8e-4,.0019,-.0022,1e-4,.0015,.0017,-8e-4,-.0011,-.0022,3e-4,.0022,6e-4,-.003,-2e-4,0,-.0017,-2e-4,0,1e-4,4e-4,.0012,.0019,-.0014,4e-4,-.0017,-.0012,-.0011,.0021,-.0029,.0026,.0018,-.0023,-.0029,1e-4,.0014,-.0019,-4e-4,-4e-4,.0023,-.0016,0,-9e-4,.0014,-.0015,.0015,-.0016,-.0011,-.0022,1e-4,-.0018,.0027,-.0013,4e-4,-1e-4,-5e-4,.0011,-2e-4,.0015,5e-4,-9e-4,-1e-4,.0029,6e-4,0,-3e-4,7e-4,-8e-4,-5e-4,.0025,3e-4,2e-4,-8e-4,-1e-4,3e-4,0,.0014,2e-4,-.0024,1e-4],expression:[-.0025,-9e-4,.006,.004,-.0027,-.0113,-8e-4,.001,.0031,-.0016,.0144,.0382,-3e-4,-5e-4,.0035,-.0044,-.0511,-.0014,-7e-4,-.1007,.0582,-6e-4,-.0606,-.0165,5e-4,-.0087,-.0093,.0036,.0057,-.0576,-.0039,.1488,.0127,.0016,-.0666,-9e-4,-.0153,.3162,-.0445,-.0021,.0023,.0043,-.0033,.2382,.0063,-.0217,.167,-.039,.0097,-.1144,-.0189,-.0145,.6831,.0632,-.0012,-.1959,-.0133,4e-4,.1108,-3e-4,.0062,.2593,-.0161,-.0018,-.0051,-.012,.0162,.016,-.0022,-.0052,-.0201,.0101,.0115,.0365,-.024,-.0059,.0188,-.0336,.0352,.0224,-.0229,.0146,.0086,-.0273,-.0032,.0103,-.0112]},{mean:[-.2288,.1541,.7202],identity:[-.0082,.0101,2e-4,.0036,-7e-4,-.0037,-8e-4,.0024,.0022,-.0013,-.0045,-.0013,-6e-4,.0045,-4e-4,4e-4,.0012,-.0014,.0042,-.001,-7e-4,-.0019,3e-4,-2e-4,.0012,-4e-4,-.0012,-.0018,-4e-4,-1e-4,-.0014,-.0012,1e-4,1e-4,-.0017,.001,.0015,-1e-4,6e-4,1e-4,0,-6e-4,.0028,.0021,-.0025,-.002,-.0015,7e-4,.0028,-.0023,9e-4,.0013,1e-4,.0016,.0012,.0032,-6e-4,-.0013,-.0011,.0021,3e-4,-5e-4,-.0024,4e-4,-4e-4,.0014,.0015,-8e-4,-3e-4,3e-4,.0017,-6e-4,.002,-.0018,-3e-4,9e-4,1e-4,2e-4,-6e-4,-.0015,-4e-4,.0022,7e-4,-.0023,0,-2e-4,-2e-4,-3e-4,-1e-4,6e-4,-2e-4,6e-4,.0022,-3e-4,.0013,-.0014,-5e-4,-3e-4,.0013,-.0027,6e-4,.0025,-.0023,-8e-4,-.0013,.0017,-9e-4,-.0019,1e-4,8e-4,-7e-4,-4e-4,0,.001,-.001,.0019,-8e-4,-.0015,-6e-4,-2e-4,-.0011,8e-4,1e-4,9e-4,-8e-4,-4e-4,6e-4,7e-4,.0021,-4e-4,7e-4,-5e-4,.0021,-7e-4,-4e-4,-9e-4,8e-4,3e-4,1e-4,3e-4,1e-4,9e-4,.001,-5e-4,5e-4,-.001,.001,4e-4,-5e-4,-.0012],expression:[8e-4,.0037,.0078,-4e-4,5e-4,-.012,-2e-4,-.0046,.0033,-.0089,.0295,.0221,-.0024,-.0084,.0013,.0057,.0125,.0049,-.0036,.0373,.0285,.0115,.0135,-.0035,.0048,.0108,-.0033,.0106,.0281,-.0301,-.0082,.0803,.0244,-7e-4,-.0725,-.0105,-.0247,-.0036,-.0143,-.0045,-.029,2e-4,-.0303,.0093,-.0021,-.0196,-.0754,-.0211,.0326,.1246,.006,-.0804,-.1499,.0109,.0182,-.0029,-.0014,-.0035,.0072,-8e-4,-.0152,-.0108,-.0166,-.0073,-.0144,-.0095,.0101,.047,-.0018,-.004,-.0189,.0027,.0104,.0298,-.0042,-.0096,.0191,-.0217,.0228,.0226,-.0105,.0047,-.0048,-.0172,.0061,-.0043,-.0016]}],2:{mean:[.5396,.2028,.2496],identity:[.0204,.0146,-.0182,-.0052,.0158,-.0038,-.0025,-.0108,-.006,.0085,-.0044,.0029,.0042,.001,.0095,.0015,-.0034,-.0064,-.0057,7e-4,.0026,7e-4,.0037,-6e-4,.0037,.0026,.0024,5e-4,-.0019,-.0013,.003,-.0028,.0018,-9e-4,.002,-.0047,.004,-.003,.0031,-.0027,-.0026,-.0017,.0016,.0014,-4e-4,.0021,-.002,0,.0017,7e-4,-4e-4,-7e-4,-.0018,-9e-4,2e-4,-.0012,1e-4,-5e-4,-.0011,4e-4,2e-4,.0011,1e-4,8e-4,.0017,-.0013,.0025,.0017,.001,2e-4,3e-4,5e-4,-4e-4,-1e-4,-5e-4,7e-4,-.0022,-.0029,6e-4,-8e-4,-6e-4,6e-4,-5e-4,5e-4,.0013,3e-4,-5e-4,-.003,7e-4,2e-4,.0016,-4e-4,0,0,4e-4,1e-4,.0014,.0012,1e-4,4e-4,-1e-4,8e-4,9e-4,4e-4,-4e-4,9e-4,-2e-4,.001,9e-4,4e-4,1e-4,7e-4,7e-4,.001,-.0017,-8e-4,2e-4,.0017,-3e-4,-1e-4,4e-4,5e-4,7e-4,5e-4,-1e-4,-6e-4,-1e-4,1e-4,-3e-4,-7e-4,-2e-4,-5e-4,0,-3e-4,3e-4,8e-4,-2e-4,-3e-4,5e-4,1e-4,-7e-4,-.001,-2e-4,3e-4,4e-4,-1e-4,7e-4,0,4e-4,4e-4],expression:[1e-4,-4e-4,1e-4,0,5e-4,2e-4,0,0,3e-4,-2e-4,3e-4,5e-4,-1e-4,2e-4,8e-4,1e-4,-2e-4,-5e-4,-3e-4,6e-4,5e-4,0,1e-4,2e-4,1e-4,-1e-4,-6e-4,-2e-4,5e-4,0,-4e-4,4e-4,.0016,4e-4,-4e-4,-.0015,0,1e-4,1e-4,-3e-4,3e-4,.0019,-2e-4,7e-4,4e-4,4e-4,-8e-4,-.0015,.0013,-.0016,-.0069,4e-4,-6e-4,-.0019,0,-1e-4,5e-4,-3e-4,2e-4,.0014,-3e-4,6e-4,.0011,4e-4,-3e-4,-.0032,-6e-4,8e-4,.0025,-3e-4,3e-4,.0015,-1e-4,1e-4,3e-4,-1e-4,0,0,-3e-4,4e-4,.0019,1e-4,0,-8e-4,-1e-4,1e-4,5e-4]},3:{mean:[-.5464,.2141,.26],identity:[-.0207,.0172,-.0176,.0068,.0148,-.0051,.0042,-.0101,-.0058,-.0087,-.0059,.0045,-.0056,.0017,.0097,-.0048,-.004,-.0044,.0019,2e-4,.0041,-.0052,.0041,2e-4,-.0027,6e-4,.002,-.0027,-.0033,-6e-4,-.004,9e-4,-.0012,-1e-4,-.0026,.0021,-.003,-.0025,.0052,.0025,.0022,-1e-4,-8e-4,.0013,.001,4e-4,.0018,.0014,6e-4,-5e-4,-.0015,-.0039,.0014,-1e-4,8e-4,-2e-4,6e-4,-5e-4,-.0038,-.0012,-.0018,-3e-4,.001,9e-4,.0012,.0024,-.0024,-7e-4,-.0016,-.0016,3e-4,-.001,-.0014,-.0014,.001,-3e-4,-7e-4,-.0012,3e-4,6e-4,3e-4,-5e-4,3e-4,.0012,6e-4,-8e-4,4e-4,4e-4,8e-4,-2e-4,-.0014,3e-4,0,.0023,-3e-4,-.0012,-.0013,.0011,-2e-4,-.0014,-1e-4,.0014,0,3e-4,3e-4,-8e-4,-5e-4,-7e-4,-7e-4,-2e-4,3e-4,5e-4,2e-4,-1e-4,.0011,-.0014,1e-4,-.0015,-1e-4,-3e-4,0,-.001,-1e-4,-8e-4,8e-4,-8e-4,-2e-4,-.0011,-3e-4,-4e-4,1e-4,-2e-4,3e-4,-7e-4,0,3e-4,1e-4,-8e-4,5e-4,1e-4,4e-4,.0014,-6e-4,-.001,-3e-4,-2e-4,1e-4,-1e-4,-1e-4,7e-4],expression:[-3e-4,-1e-4,6e-4,4e-4,0,-7e-4,0,-3e-4,-2e-4,-4e-4,.0012,8e-4,1e-4,-5e-4,-7e-4,-4e-4,0,1e-4,-4e-4,.0017,7e-4,0,1e-4,3e-4,0,4e-4,4e-4,5e-4,1e-4,-.001,-7e-4,.0022,.0026,5e-4,-.0024,-.0023,0,1e-4,3e-4,0,-.0013,-.0015,6e-4,.0014,8e-4,-2e-4,-.0025,-.0023,-3e-4,.0049,.006,-2e-4,-7e-4,-2e-4,0,-.0019,-.0018,-2e-4,.0017,.0017,3e-4,.0015,7e-4,1e-4,-.0023,-.0036,2e-4,.0023,.0017,0,-5e-4,-3e-4,-3e-4,4e-4,2e-4,-1e-4,-3e-4,-5e-4,1e-4,.0018,.0025,1e-4,-6e-4,-.0011,0,1e-4,1e-4]},4:{mean:[.0018,.1864,.853],identity:[-.0011,.0134,.0085,9e-4,-.0025,-7e-4,-3e-4,.0033,4e-4,-5e-4,-.0047,-.002,7e-4,.0026,-.0069,-1e-4,.0036,.0072,5e-4,-8e-4,-.0047,4e-4,-8e-4,-.001,0,2e-4,-.0036,-2e-4,-.001,-.0048,-1e-4,.0018,.0044,-7e-4,-2e-4,.0043,3e-4,.002,-.0031,0,-7e-4,.0013,0,.0037,.0033,-.0016,-.0012,.002,-1e-4,-.0027,.0051,5e-4,8e-4,7e-4,-.0017,.0054,.0023,-3e-4,.0032,1e-4,0,7e-4,-5e-4,-.0011,2e-4,8e-4,0,-.0033,-8e-4,-7e-4,7e-4,.0033,5e-4,-3e-4,.0029,-1e-4,-.0024,-.0011,-.002,-.0015,-.0019,2e-4,7e-4,.0031,6e-4,.0012,0,0,-.0021,0,-9e-4,-.0011,-.0011,-2e-4,.0015,.001,.0013,8e-4,.001,-3e-4,9e-4,.0027,-2e-4,-.0011,-.0011,6e-4,7e-4,2e-4,1e-4,-5e-4,-.0022,.0011,-.0014,9e-4,3e-4,2e-4,0,-6e-4,-4e-4,-.0011,-7e-4,.001,-.0012,6e-4,-.0012,-.0015,3e-4,-9e-4,-.0013,-.0013,7e-4,.001,-.0011,-.0013,.0015,4e-4,1e-4,4e-4,-1e-4,-.0016,-.0016,9e-4,-7e-4,-.0024,5e-4,-1e-4,-.0017,-2e-4,3e-4,-9e-4],expression:[-.0017,.0019,.0097,.003,-.0103,-.0093,9e-4,6e-4,.0023,-.0017,-.0204,.0376,.0033,-.0034,.0033,-.0026,-.0322,.0396,-.0032,-.0947,.0942,-7e-4,-.0175,.0266,-.001,-6e-4,.0016,.0025,.0157,-.0142,-.0022,.037,.015,.0021,-.0102,-.0107,.0036,.0055,-.0051,.0021,3e-4,-3e-4,4e-4,-.0177,.0074,-6e-4,-.0357,.0149,-.0066,9e-4,.0013,-.0031,.0016,.0095,.002,.0052,.0035,-3e-4,.0053,-.0082,.002,.0022,-.0071,-.0011,5e-4,.0055,.0011,3e-4,-.0126,-4e-4,3e-4,-.0023,-.0015,.0059,.0063,-.0042,-.0023,.0055,.0019,.0017,-.0075,6e-4,-8e-4,.0018,.0012,.0012,-5e-4]},5:{mean:[-.002,-.0469,1.0039],identity:[-.0017,.0018,.0156,6e-4,-.0038,5e-4,4e-4,.0013,.002,-4e-4,-.0015,-.0051,5e-4,-7e-4,-.0055,-1e-4,-9e-4,.008,-2e-4,.0036,-.0053,4e-4,-.0026,-.0016,7e-4,9e-4,-.009,-3e-4,7e-4,-.0084,.0015,.0021,.0032,-.0015,.0018,.0046,-3e-4,-4e-4,-1e-4,8e-4,-.0044,-7e-4,-8e-4,7e-4,.0048,-.0024,-3e-4,.0024,2e-4,-.0051,.0058,-6e-4,.0028,.0018,-.0021,.0035,.0057,.0011,.0065,0,-2e-4,.0011,.003,-.0027,8e-4,7e-4,3e-4,-.0039,-.002,-2e-4,-.0015,.0034,.0012,-.0025,.0024,-2e-4,4e-4,-.0042,-.0024,-.001,-.0023,.0016,-7e-4,.0039,1e-4,-5e-4,.0018,3e-4,-2e-4,-9e-4,-.0015,3e-4,-7e-4,-1e-4,-2e-4,.0023,.0032,.002,-.0013,.0013,-.0038,.0045,1e-4,-.0031,1e-4,.0019,-1e-4,.0016,.0013,0,-.002,.0023,2e-4,.0011,.0018,-.0024,6e-4,-.0017,.002,-8e-4,-.0021,7e-4,.0011,8e-4,4e-4,-.001,.0012,2e-4,-6e-4,-.0027,-5e-4,.001,-9e-4,1e-4,-1e-4,8e-4,-.0011,.0022,-.001,-5e-4,-.0011,.0016,-.0015,8e-4,-3e-4,9e-4,.0013,-7e-4,-7e-4,-2e-4],expression:[-.0018,-.0168,.0088,.0389,.1026,.0414,.2201,-.0262,-.0016,-.0017,.0612,-.0298,-.0323,.0093,.0013,-.005,.2207,.1315,-4e-4,.0858,-.0303,-.0133,.015,-.008,.1454,.0114,.0177,-.0077,.1022,.0356,-.0023,.1088,.0232,.003,-.0706,.0347,-1e-4,.004,-.0011,.0397,-.0096,-.0033,.0029,-.01,-.0083,-6e-4,-.0135,.0016,-.0087,-.0019,.0022,-.004,-.0087,.0105,8e-4,-.005,.0069,.0028,.0409,-.0391,.003,.0103,.0051,.0026,.0776,-.0083,-.0062,-.0567,.0268,.0175,.0017,.0156,-.0043,.0299,-.0395,-.0015,.0051,-.0148,.0125,.0035,.0603,.0109,-.0645,-.0257,.002,6e-4,-8e-4]},6:{mean:[-6e-4,-.1542,.8789],identity:[-7e-4,-.0032,.01,0,-.0027,.0031,6e-4,5e-4,-6e-4,-3e-4,.0013,-.0049,-2e-4,-.002,-.0046,8e-4,-.0011,.0054,2e-4,.0043,-.0027,3e-4,-.0022,-.0019,8e-4,.0032,-.0069,0,4e-4,-.0071,.0016,.0027,.0039,-.0017,9e-4,.0031,-1e-4,-5e-4,-4e-4,7e-4,-.0026,-.0012,-5e-4,6e-4,2e-4,-.0014,-.0013,.0019,-2e-4,-.0053,.0031,-6e-4,.0016,.0023,-.0013,.0021,.0029,8e-4,.0052,0,4e-4,0,.0037,-.0026,3e-4,.002,-2e-4,-.0024,4e-4,-4e-4,-.0012,8e-4,7e-4,-.0023,5e-4,0,.0014,-.0022,-.0016,0,-.0012,8e-4,-7e-4,.0014,-6e-4,-.0012,-3e-4,2e-4,.0012,-3e-4,-.002,-1e-4,1e-4,-2e-4,-.0016,9e-4,.002,.0019,0,6e-4,-.0022,.0016,1e-4,-.0017,-.0013,.001,9e-4,-1e-4,.0011,3e-4,-7e-4,.0014,8e-4,.0013,.0011,-.002,0,-.0015,.0014,.001,-.0015,7e-4,3e-4,.001,-1e-4,.0012,7e-4,6e-4,-4e-4,-.0013,-.0012,-9e-4,-.0011,2e-4,-5e-4,5e-4,4e-4,2e-4,1e-4,0,5e-4,5e-4,-.0014,.0015,-9e-4,5e-4,.0014,-8e-4,-8e-4,.0012],expression:[8e-4,.0481,.1653,.0784,.1008,-.3992,.5088,-.02,.0542,.001,.3723,-.0151,-.0986,.0283,-.0033,-.0121,.2634,.1202,.0036,-.0529,-.0245,-.0297,-.1085,.0495,.3264,.0083,4e-4,-.0314,.1459,-.1142,-.003,1e-4,.1154,-.0035,-.0285,-.0184,-1e-4,.0012,.0035,.079,-.0103,.0043,.011,-.004,-.0774,-.0047,-.023,.0284,-.0048,-.001,.0149,-.0039,.0046,.0528,-6e-4,.0063,.0376,.0096,.0558,-.0295,0,-.0311,-.0634,.0062,.0176,-.0154,-.0109,-.1149,.0192,.0326,.0121,.0237,.0034,.0262,-.0778,.0014,-.0045,-.0203,.0077,.0588,.0575,.008,-.0557,-.0095,.0032,.0054,-.0042]},7:{mean:[.0038,-.2927,.833],identity:[6e-4,-.0109,.0073,-6e-4,-.0044,.0017,-1e-4,-.0022,-6e-4,-3e-4,.0065,-.0014,-6e-4,-.0051,-.0046,3e-4,-.0029,.003,2e-4,.0038,-6e-4,0,-.0012,6e-4,-4e-4,.0053,-.0075,-2e-4,-7e-4,-.0063,.0014,.0026,.0019,-.0022,.0018,.0028,-1e-4,-.0012,.0011,9e-4,.0019,-.0019,-1e-4,.0012,-.0022,-3e-4,-.0012,4e-4,-8e-4,3e-4,-3e-4,0,.0017,.0021,-4e-4,.0012,.0022,-3e-4,.0026,-3e-4,4e-4,-.0026,.0032,-.0019,3e-4,.0015,1e-4,-.0015,.0013,-1e-4,1e-4,-.0029,0,-2e-4,-.0028,-7e-4,.0019,-3e-4,-2e-4,.0012,9e-4,4e-4,-.001,-.002,-.0016,.0011,-1e-4,3e-4,.0021,2e-4,-.0014,-9e-4,-1e-4,0,-2e-4,-.001,.0015,.0018,1e-4,7e-4,8e-4,.0017,.001,-9e-4,1e-4,4e-4,.0023,-1e-4,.0012,1e-4,-8e-4,2e-4,.0018,6e-4,3e-4,1e-4,.0012,-3e-4,.002,-6e-4,0,-1e-4,-.0022,4e-4,5e-4,.0011,2e-4,-.0013,-.0023,6e-4,6e-4,-5e-4,-5e-4,9e-4,2e-4,2e-4,.0011,-3e-4,.0011,.0015,.0011,3e-4,2e-4,8e-4,-4e-4,-8e-4,3e-4,0,.0012,-1e-4],expression:[.026,.1107,.3257,.1917,.3206,-1.1348,1.0791,-.035,.1549,-.0103,.6953,1e-4,-.3262,.068,.0219,-.0044,.3643,.2178,.0168,-.2478,-.1321,-.0414,-.3782,-.0617,.5088,-.0031,-.0311,-.0497,.0948,-.385,.0148,-.2224,-.1415,-.0074,.0863,-.203,3e-4,-.0081,.0057,.1164,-.0039,.0015,-.0024,.0505,.1532,.0039,-.0148,-.0753,.0163,.0058,-.0339,.0036,.0252,-.0569,-.0041,.0163,-.0361,.0035,-.018,.1266,0,-.0163,-.0046,.0133,-.1656,.2134,.0191,.0057,.0734,.0681,.0039,-.0144,.029,-.074,-.046,.0122,.0072,-.0162,-.0349,-.1234,.0212,-.0355,.0535,.1218,.0043,-.024,.0016]},8:{mean:[-.0018,-.3037,.8491],identity:[2e-4,-.0112,.0077,-4e-4,-.0044,.0024,1e-4,-.0021,-4e-4,-4e-4,.0066,-.002,-4e-4,-.0052,-.0044,3e-4,-.0032,.0039,4e-4,.0042,-3e-4,2e-4,-.0012,-2e-4,-2e-4,.0052,-.0083,-1e-4,-8e-4,-.0056,.0017,.0024,.0019,-.0023,.002,.0027,-2e-4,-.0013,.002,9e-4,.0017,-.0028,-2e-4,.0012,-.0026,0,-.0016,2e-4,-5e-4,3e-4,-.001,-1e-4,.0016,.0016,-3e-4,.0012,.0012,-3e-4,.0027,-3e-4,3e-4,-.0026,.0037,-.0017,1e-4,.0016,1e-4,-.0015,.0024,1e-4,2e-4,-.0039,0,-3e-4,-.0033,-6e-4,.0017,-4e-4,-4e-4,.0012,.0018,2e-4,-.0012,-.002,-.0017,.0013,-.001,3e-4,.0021,4e-4,-.0012,-6e-4,-2e-4,0,-4e-4,-9e-4,.0016,.0017,4e-4,7e-4,7e-4,.001,9e-4,-8e-4,5e-4,5e-4,.0023,.001,.0013,2e-4,-4e-4,2e-4,.0017,8e-4,3e-4,-1e-4,9e-4,-4e-4,.0019,-5e-4,3e-4,0,-.0025,3e-4,3e-4,.0011,1e-4,-.0015,-.001,7e-4,7e-4,-7e-4,-7e-4,8e-4,0,1e-4,.0013,-4e-4,.0012,.0014,.0017,4e-4,2e-4,3e-4,-3e-4,-9e-4,1e-4,0,.001,-4e-4],expression:[-.0092,2.8809,1.416,.2018,1.1982,-.9351,1.4492,-.1902,.1749,.0305,-.167,-.1572,-.7354,-.0492,.0115,.0608,.2971,.1179,.0046,-.0997,-.0041,-.0104,.3379,-.1854,.009,.0366,-.0583,.0269,-.0029,-.4175,-8e-4,.1794,.0752,-.0135,.1158,.1234,5e-4,.003,-.0032,.1034,-.0504,-.0055,-.0076,-.0772,.224,.0047,.0229,-.1044,.0162,-.0161,-.0241,-.0083,-.1388,-.0434,-.0125,-.0997,-.0327,-.0111,.1576,-.3911,.0199,.2522,.142,.0059,-.0721,-.0045,.031,-.1136,-.1685,.0641,.0142,.0312,.0426,-.1366,.1011,.0101,-.0157,.0018,-.0103,-.0344,.0907,.0016,.1168,-.0806,.0104,-.0057,.0111]},9:[{mean:[.0038,-.2927,.833],identity:[6e-4,-.0109,.0073,-6e-4,-.0044,.0017,-1e-4,-.0022,-6e-4,-3e-4,.0065,-.0014,-6e-4,-.0051,-.0046,3e-4,-.0029,.003,2e-4,.0038,-6e-4,0,-.0012,6e-4,-4e-4,.0053,-.0075,-2e-4,-7e-4,-.0063,.0014,.0026,.0019,-.0022,.0018,.0028,-1e-4,-.0012,.0011,9e-4,.0019,-.0019,-1e-4,.0012,-.0022,-3e-4,-.0012,4e-4,-8e-4,3e-4,-3e-4,0,.0017,.0021,-4e-4,.0012,.0022,-3e-4,.0026,-3e-4,4e-4,-.0026,.0032,-.0019,3e-4,.0015,1e-4,-.0015,.0013,-1e-4,1e-4,-.0029,0,-2e-4,-.0028,-7e-4,.0019,-3e-4,-2e-4,.0012,9e-4,4e-4,-.001,-.002,-.0016,.0011,-1e-4,3e-4,.0021,2e-4,-.0014,-9e-4,-1e-4,0,-2e-4,-.001,.0015,.0018,1e-4,7e-4,8e-4,.0017,.001,-9e-4,1e-4,4e-4,.0023,-1e-4,.0012,1e-4,-8e-4,2e-4,.0018,6e-4,3e-4,1e-4,.0012,-3e-4,.002,-6e-4,0,-1e-4,-.0022,4e-4,5e-4,.0011,2e-4,-.0013,-.0023,6e-4,6e-4,-5e-4,-5e-4,9e-4,2e-4,2e-4,.0011,-3e-4,.0011,.0015,.0011,3e-4,2e-4,8e-4,-4e-4,-8e-4,3e-4,0,.0012,-1e-4],expression:[.026,.1107,.3257,.1917,.3206,-1.1348,1.0791,-.035,.1549,-.0103,.6953,1e-4,-.3262,.068,.0219,-.0044,.3643,.2178,.0168,-.2478,-.1321,-.0414,-.3782,-.0617,.5088,-.0031,-.0311,-.0497,.0948,-.385,.0148,-.2224,-.1415,-.0074,.0863,-.203,3e-4,-.0081,.0057,.1164,-.0039,.0015,-.0024,.0505,.1532,.0039,-.0148,-.0753,.0163,.0058,-.0339,.0036,.0252,-.0569,-.0041,.0163,-.0361,.0035,-.018,.1266,0,-.0163,-.0046,.0133,-.1656,.2134,.0191,.0057,.0734,.0681,.0039,-.0144,.029,-.074,-.046,.0122,.0072,-.0162,-.0349,-.1234,.0212,-.0355,.0535,.1218,.0043,-.024,.0016]},{mean:[-.0018,-.3037,.8491],identity:[2e-4,-.0112,.0077,-4e-4,-.0044,.0024,1e-4,-.0021,-4e-4,-4e-4,.0066,-.002,-4e-4,-.0052,-.0044,3e-4,-.0032,.0039,4e-4,.0042,-3e-4,2e-4,-.0012,-2e-4,-2e-4,.0052,-.0083,-1e-4,-8e-4,-.0056,.0017,.0024,.0019,-.0023,.002,.0027,-2e-4,-.0013,.002,9e-4,.0017,-.0028,-2e-4,.0012,-.0026,0,-.0016,2e-4,-5e-4,3e-4,-.001,-1e-4,.0016,.0016,-3e-4,.0012,.0012,-3e-4,.0027,-3e-4,3e-4,-.0026,.0037,-.0017,1e-4,.0016,1e-4,-.0015,.0024,1e-4,2e-4,-.0039,0,-3e-4,-.0033,-6e-4,.0017,-4e-4,-4e-4,.0012,.0018,2e-4,-.0012,-.002,-.0017,.0013,-.001,3e-4,.0021,4e-4,-.0012,-6e-4,-2e-4,0,-4e-4,-9e-4,.0016,.0017,4e-4,7e-4,7e-4,.001,9e-4,-8e-4,5e-4,5e-4,.0023,.001,.0013,2e-4,-4e-4,2e-4,.0017,8e-4,3e-4,-1e-4,9e-4,-4e-4,.0019,-5e-4,3e-4,0,-.0025,3e-4,3e-4,.0011,1e-4,-.0015,-.001,7e-4,7e-4,-7e-4,-7e-4,8e-4,0,1e-4,.0013,-4e-4,.0012,.0014,.0017,4e-4,2e-4,3e-4,-3e-4,-9e-4,1e-4,0,.001,-4e-4],expression:[-.0092,2.8809,1.416,.2018,1.1982,-.9351,1.4492,-.1902,.1749,.0305,-.167,-.1572,-.7354,-.0492,.0115,.0608,.2971,.1179,.0046,-.0997,-.0041,-.0104,.3379,-.1854,.009,.0366,-.0583,.0269,-.0029,-.4175,-8e-4,.1794,.0752,-.0135,.1158,.1234,5e-4,.003,-.0032,.1034,-.0504,-.0055,-.0076,-.0772,.224,.0047,.0229,-.1044,.0162,-.0161,-.0241,-.0083,-.1388,-.0434,-.0125,-.0997,-.0327,-.0111,.1576,-.3911,.0199,.2522,.142,.0059,-.0721,-.0045,.031,-.1136,-.1685,.0641,.0142,.0312,.0426,-.1366,.1011,.0101,-.0157,.0018,-.0103,-.0344,.0907,.0016,.1168,-.0806,.0104,-.0057,.0111]}],10:{mean:[-.007,-.6338,.7695],identity:[1e-4,-.0296,.0089,-6e-4,-.0073,-.0065,-1e-4,-.0029,-.0031,-2e-4,.0128,.0065,0,-.0116,-.014,-1e-4,-.0037,-.0052,-5e-4,.0028,.003,-4e-4,.0041,.0015,6e-4,.0088,-.0076,-.0011,-.0015,-.0073,7e-4,-.0011,.0019,-.0011,-5e-4,.0031,-1e-4,-.0018,9e-4,.0018,.0038,.0068,-4e-4,-1e-4,.0061,.0024,.0024,-.0066,-6e-4,.0051,.0014,.002,.005,-.0035,1e-4,-.0034,-.004,-7e-4,.001,-8e-4,1e-4,-5e-4,-.0021,2e-4,.0045,-.0043,-.0012,-.0024,-.0014,6e-4,.0034,.0027,-8e-4,-.0053,.0014,1e-4,.0013,-.0018,6e-4,-.0015,.0029,-2e-4,-.0035,1e-4,-.002,.0012,.0048,.0011,1e-4,-2e-4,-3e-4,-.0012,.0033,6e-4,.002,-.0033,4e-4,.0028,2e-4,8e-4,-1e-4,-.0018,8e-4,.0017,1e-4,9e-4,8e-4,3e-4,.0019,-.001,.001,-7e-4,-.0013,0,1e-4,.0032,-1e-4,1e-4,.0011,-4e-4,5e-4,-7e-4,.0018,-3e-4,2e-4,7e-4,8e-4,-.0014,7e-4,.0015,-6e-4,-1e-4,-4e-4,.0019,-9e-4,-6e-4,-6e-4,-.0012,2e-4,-.0012,-8e-4,4e-4,6e-4,-.0011,3e-4,9e-4,-4e-4,6e-4,-7e-4,-4e-4],expression:[-.0603,2.0527,1.9014,.1025,.6143,.3804,.7881,-.1023,-.0764,.0454,-.2487,-.5073,-.6704,-.031,-.0181,.0466,.0651,-.0726,-.0033,-.0022,.2944,.0101,.1669,-.5225,-.4685,.0236,.0079,.011,.2173,.4529,.0121,-.2104,-.0673,.0225,-.4023,.0317,-9e-4,.0076,-.0032,.0333,.0523,.0129,-.001,-.0319,-.0139,.0015,-.0044,.0247,-5e-4,.0161,.0061,.0074,.0776,-.0176,.007,.055,-.017,.0052,-.1819,.0294,-.0161,-.0337,.0226,-.008,-.0297,.1967,-.0095,.0383,.2039,.0434,.0271,-.0064,-.0037,-.0294,-.024,.0024,-.0137,-.0209,-.0031,.0628,.1003,-.0126,-.056,-.0097,-.0012,-.0041,.0162]},11:{mean:[.2505,.3833,.7793],identity:[.0098,.012,.0077,-6e-4,-3e-4,0,1e-4,.0082,-7e-4,.0019,-.0036,-.0012,2e-4,.0119,-.0039,.001,1e-4,.0031,-.0036,-.0059,-7e-4,.0026,.0028,-.0011,9e-4,-.0032,8e-4,.0029,.0043,3e-4,.0025,-9e-4,.0047,.0016,.0022,.0018,-.001,.0025,-.003,-.001,.0033,.0034,4e-4,-.0052,.0024,-2e-4,.001,-.0014,-6e-4,.0038,-.0015,-6e-4,-.001,-.0011,-4e-4,-.001,4e-4,-7e-4,.0036,-8e-4,-2e-4,-.0019,5e-4,3e-4,-6e-4,-.0024,-.0017,-.0014,6e-4,-4e-4,-.0031,-.0013,-6e-4,.0042,2e-4,-2e-4,-.002,-3e-4,8e-4,.0018,-5e-4,-6e-4,-2e-4,-6e-4,.0025,.0019,.001,8e-4,-.0015,-.0012,-1e-4,-6e-4,-4e-4,.0023,-.001,6e-4,-2e-4,-.001,0,-9e-4,-.002,-.0011,1e-4,0,-1e-4,5e-4,6e-4,9e-4,-6e-4,5e-4,8e-4,-1e-4,-2e-4,-.0017,-6e-4,-4e-4,4e-4,-6e-4,.0012,4e-4,3e-4,-7e-4,3e-4,-2e-4,6e-4,1e-4,5e-4,-.0019,-6e-4,4e-4,7e-4,-1e-4,1e-4,5e-4,.001,-6e-4,-.002,-7e-4,-5e-4,5e-4,3e-4,7e-4,.0014,0,5e-4,-5e-4,-2e-4,3e-4,-6e-4,-1e-4],expression:[-9e-4,-3e-4,.0032,-.003,-.0034,-.0031,.0014,0,4e-4,-.0139,-.0764,.0275,-.002,-.0089,.0031,-.0503,-.0771,.038,-.1323,-.3523,.1368,-.0474,-.0564,.0296,-.0045,.007,-.0013,.0153,.1259,-.0464,.0866,.2175,-.0786,-.0413,-.1248,.0448,-.1777,-.4607,.1782,-5e-4,-.005,.0016,.0629,.1506,-.0624,.0545,.2576,-.0864,-.0231,-.0552,.0244,-.0136,-.0359,.0169,-.1158,-.2996,.1214,-.0235,-.0354,.0165,-.0745,-.1079,.0475,-.0116,-.0039,.0012,.0013,-.0108,-8e-4,.0044,-.0027,-1e-4,-.0694,.0363,.0071,.1462,-.136,.0047,.009,-.0177,.0038,-.0271,.0118,.0011,-.0399,-.0111,.0123]},12:{mean:[-.2981,.3828,.7563],identity:[-.0116,.014,.0054,.0018,5e-4,0,-4e-4,.0068,-.0013,-.0019,-.0048,-5e-4,5e-4,.0108,-.0036,-.0029,-.0018,.0029,.0043,-.0077,6e-4,-.0017,.002,-.0011,-.0014,-.0035,.0015,-.0024,.0011,4e-4,-.0048,2e-4,.0029,-1e-4,-1e-4,.003,.0019,.0035,-.0016,-4e-4,.0039,.0019,1e-4,-.0064,.004,3e-4,.002,-.0021,.0017,.0011,-.001,.0026,.0025,-5e-4,2e-4,-3e-4,-5e-4,-7e-4,9e-4,-4e-4,-.001,-.0022,.001,9e-4,-.0014,7e-4,.0011,-.001,-5e-4,-8e-4,-.0017,-.0021,9e-4,.0036,5e-4,4e-4,-.0031,6e-4,-.0015,.0027,2e-4,1e-4,-.0011,2e-4,-.0011,-.0018,4e-4,-.0013,-2e-4,7e-4,9e-4,-3e-4,.001,-.0021,8e-4,6e-4,-9e-4,4e-4,-7e-4,8e-4,-.002,-.0013,0,7e-4,-.0012,-1e-4,.0014,.0014,-1e-4,.0013,6e-4,6e-4,-.0014,-.0015,-9e-4,1e-4,1e-4,9e-4,7e-4,0,1e-4,-.001,-4e-4,0,-5e-4,1e-4,-3e-4,4e-4,-5e-4,-1e-4,-.0011,2e-4,0,1e-4,8e-4,8e-4,0,-7e-4,-8e-4,0,2e-4,-1e-4,.001,3e-4,4e-4,-2e-4,0,5e-4,.0018,-1e-4],expression:[0,-4e-4,.0028,.0036,-8e-4,-.0026,-.0015,-8e-4,3e-4,.0075,-.0608,.025,.0019,-.0076,.0033,.0379,-.0437,.0335,.0964,-.2452,.1233,.0368,-.0251,.0253,.0033,.0097,-.0021,-.0095,.1171,-.0475,-.064,.1548,-.0718,.0228,-.0831,.0343,-.1924,.6206,-.2771,.0021,-.0143,.0056,-.0705,.2522,-.1116,-.0692,.4229,-.1592,-.0093,.05,-.0185,.0948,-.3196,.1437,-.0184,.0194,-.0131,.0205,-.0353,.0201,.0676,-.135,.0672,.0137,-.0311,.0118,3e-4,-.0077,-2e-4,-.0151,4e-4,-.0058,.029,-.0139,.0163,.1324,.1819,-.0039,.0406,.0501,.0017,.0331,.0161,.0062,-.0235,-.0446,.0047]}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={incompatible:()=>!("function"==typeof Promise&&"object"==typeof WebAssembly&&!!(navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices&&navigator.mediaDevices.getUserMedia)),incompatible_ui:()=>{const e=document.createElement("div");e.append(function(){let e=document.createElement("div"),t="a recent web browser";navigator.userAgent.match(/Android/i)?(t="Chrome for Android",window.location.href="googlechrome://navigate?url="+encodeURI(window.location.href),setTimeout(()=>{window.location.href="samsunginternet://open?url="+encodeURI(window.location.href)},2e3)):navigator.userAgent.match(/iPhone|iPod|iPad/i)&&(t="Safari",e.classList.add("zee-launcher-browser-safari")),e.classList.add("zee-launcher-unsupported"),e.innerHTML=`\n <style>.zee-launcher-unsupported {\n display: flex;\n flex-direction: column;\n height: 100%;\n justify-content: center;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n align-items: center;\n }\n .zee-launcher-browser-logo {\n background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg version='1.1' viewBox='0 0 210 211' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg transform='translate(-82 -146)' fill-rule='nonzero' stroke='%23ffffff' stroke-width='2'%3E%3Cg transform='translate(83 146.5)'%3E%3Cpath d='m55.146 88.785l-32.039-49.472c19.962-24.947 49.904-38.684 80.517-38.81 17.739-0.12642 35.855 4.4246 52.336 13.99 18.2 10.619 32.039 25.874 40.846 43.404l-86.095-4.5511c-24.365-1.4327-47.556 12.347-55.565 35.439zm13.797 16.224c0 19.468 15.684 35.229 35.059 35.229 19.374 0 35.059-15.76 35.059-35.229 0-19.468-15.684-35.229-35.059-35.229-19.374 0-35.059 15.718-35.059 35.229zm132.06-37.588l-58.585 3.034c15.894 18.668 16.145 45.595 2.7678 66.243l-47.01 72.648c19.5 1.0535 39.588-3.2447 57.788-13.864 45.039-26.126 63.282-80.908 45.039-128.06zm-144.93 57.647l-39.126-77.326c-10.694 16.434-16.942 36.156-16.942 57.267 0 52.253 38.078 95.53 87.856 103.2l26.713-52.59c-24.155 4.5511-47.472-8.765-58.501-30.551z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A");\n width: 211px;\n height: 211px;\n margin-bottom: 25%;\n margin-top: -60px;\n background-repeat: no-repeat;\n }\n .zee-launcher-browser-safari .zee-launcher-browser-logo {\n background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg version='1.1' viewBox='0 0 211 211' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg transform='translate(-82 -146)' fill-rule='nonzero' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='m180 251.86c0-4.0385 2.9377-7.855 7.2552-7.855 3.9614 0 7.7448 2.8402 7.7448 7.145 0 4.0385-2.8487 7.855-7.1662 7.855-4.0059 0-7.8338-2.9734-7.8338-7.145zm112-0.35503c0 57.728-46.772 104.5-104.5 104.5s-104.5-46.772-104.5-104.5 46.772-104.5 104.5-104.5 104.5 46.772 104.5 104.5zm-12-1c0-51.649-41.851-93.5-93.5-93.5s-93.5 41.851-93.5 93.5 41.851 93.5 93.5 93.5 93.5-41.851 93.5-93.5zm-30.624 40.983c0 1.5095 5.4495 4.2768 6.8328 5.1154-11.486 17.401-29.26 29.938-49.423 34.928l-1.8444-7.757c-0.12576-1.0482-0.79646-1.174-1.7606-1.174-0.79646 0-1.2576 1.174-1.1737 1.7611l1.8444 7.8828c-5.5753 1.174-11.234 1.7611-16.935 1.7611-15.217 0-30.182-4.2768-43.177-12.202 0.71263-1.174 5.1141-7.5474 5.1141-8.4698 0-0.79666-0.71263-1.5095-1.5091-1.5095-1.6348 0-5.1141 6.9603-6.1621 8.344-17.522-11.615-30.182-29.602-35.044-50.148l8.0066-1.761c0.92222-0.25158 1.1737-0.92246 1.1737-1.7611 0-0.79667-1.1737-1.2579-1.8444-1.174l-7.8389 1.803c-1.048-5.3251-1.6348-10.692-1.6348-16.143 0-15.556 4.4015-30.86 12.66-43.984 1.1737 0.71281 6.749 4.5284 7.6712 4.5284 0.79646 0 1.5091-0.58702 1.5091-1.3837 0-1.6353-6.1621-4.7381-7.5455-5.7024 11.821-17.275 29.805-29.728 50.219-34.34l1.7606 7.757c0.25152 0.92246 0.92222 1.174 1.7606 1.174 0.83838 0 1.2576-1.174 1.1737-1.8449l-1.7606-7.6732c5.1141-0.92246 10.312-1.5095 15.552-1.5095 15.552 0 30.727 4.4026 43.973 12.663-0.79646 1.174-4.5273 6.6249-4.5273 7.5474 0 0.79667 0.58687 1.5095 1.3833 1.5095 1.6348 0 4.7369-6.0379 5.5753-7.4216 17.187 11.615 29.469 29.351 34.248 49.561l-6.4975 1.3837c-1.048 0.25158-1.1737 0.92246-1.1737 1.8449 0 0.79667 1.1737 1.2579 1.7606 1.174l6.6232-1.5095c1.048 5.3251 1.6348 10.776 1.6348 16.227 0 15.221-4.1919 30.189-12.073 43.062-1.1737-0.58702-6.0364-4.0672-6.9586-4.0672-0.8803 0-1.5929 0.71281-1.5929 1.5095zm-14.876-98.483c-5.2178 4.88-53.863 49.48-55.228 51.8l-38.772 64.2c5.0974-4.76 53.863-49.6 55.108-51.72l38.892-64.28z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");\n }\n .zee-launcher-unsupported-message {\n text-align: center;\n width: 250px;\n font-family: sans-serif;\n color: #ffffff;\n }\n .zee-launcher-unsupported-message-copy {\n border: 1px solid #ffffff;\n border-radius: 5px;\n margin-top: 10px;\n }\n #zee-launcher-unsupported-message-input {\n border: none;\n padding: 10px;\n border-radius: 0px;\n border-right: 1px solid #344B60;\n height: 40px;\n color: #ffffff;\n background-color: black;\n box-sizing: border-box;\n width: calc(100% - 65px);\n margin-left: 5px;\n }\n #zee-launcher-unsupported-message-button {\n background: none;\n border: none;\n outline: none;\n text-transform: uppercase;\n color: #ffffff;\n height: 40px;\n display: inline-block;\n width: 59px;\n }\n .zee-launcher-unsupported-message-before-copy {\n height: 100px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-top: 20px;\n }\n .zee-launcher-unsupported-message-copied .zee-launcher-unsupported-message-before-copy {\n display: none;\n }\n .zee-launcher-unsupported-message-after-copy {\n display: none;\n }\n .zee-launcher-unsupported-message-copied .zee-launcher-unsupported-message-after-copy {\n height: 100px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-top: 20px;\n }\n </style>\n <div class="zee-launcher-browser-logo"></div>\n <div class="zee-launcher-unsupported-message">Open with ${t} to access this content.</div>\n <div class="zee-launcher-unsupported-message-before-copy">\n <div class="zee-launcher-unsupported-message ">Tap below to copy the address for easy pasting into ${t}.</div>\n <div class="zee-launcher-unsupported-message-copy"><input id="zee-launcher-unsupported-message-input" type="text/"><button id="zee-launcher-unsupported-message-button">Copy</button></div>\n </div>\n <div class="zee-launcher-unsupported-message zee-launcher-unsupported-message-after-copy">COPIED! Now paste into ${t}'s address bar to experience the content.</div>\n `;let r=e.querySelector("#zee-launcher-unsupported-message-input")||document.createElement("input");r.value=window.location.href;let n=()=>{if(navigator.userAgent.match(/iPhone|iPod|iPad/i)){let e=document.createRange();e.selectNodeContents(r);let t=window.getSelection();if(!t)return;t.removeAllRanges(),t.addRange(e),r.setSelectionRange(0,999999999)}else r.select();document.execCommand("copy"),r.blur(),e.classList.toggle("zee-launcher-unsupported-message-copied",!0)};return(e.querySelector("#zee-launcher-unsupported-message-button")||document.createElement("button")).addEventListener("click",n),r.addEventListener("click",n),e}()),Object.assign(e.style,{position:"fixed",width:"100%",height:"100%",top:"0px",left:"0px",zIndex:1001,backgroundColor:"rgba(0, 0, 0, 0.9)",fontFamily:"sans-serif",color:"white",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}),e.classList.add("zee_launcher_compatibility"),document.body.append(e)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceSource=void 0;const n=r(0),i=r(13),a=r(8),o=r(2),s=r(1);let u=1,c=new Map;class f extends a.Source{constructor(e,t){super(),this._impl=e,this._pipeline=t,this._packetNumber=0,this._motionUpdatesQueued=0,this._motionUpdatesSent=0,this._minFrameGapMs=0,this._lastUpdateTime=0}static create(e){let t=u++;return c.set(t,new f(t,e)),n.zcout("sequence_source_source_t initialized"),t}static get(e){return c.get(e)}loadFromMemory(e){try{this._decoder=new i.SequenceDecoder(e),this._packetNumber=0,this._lastUpdateTime=0}catch(e){n.zcerr("Unable to decode sequence:",e)}}maxPlaybackFpsSet(e){this._minFrameGapMs=e<=0?0:1e3/e}getFrame(e){let t=o.Pipeline.get(this._pipeline);if(!t)return;if(!this._decoder)return;if(this._submitMotionUpdates(t),this._motionUpdatesQueued>this._motionUpdatesSent)return;if(e)return;let r=performance.now();if(r<this._lastUpdateTime+this._minFrameGapMs)return;if(this._packetNumber>=this._decoder.numberPackets)return;let n=this._decoder.dataByPacket.get(this._packetNumber);if(n.type!=i.SequenceRecorderPacketType.CAMERA_FRAME)return;this._packetNumber++;let a=t.cameraPixelArrays.pop();for(;a&&a.byteLength!==n.greyscale.byteLength;)a=t.cameraPixelArrays.pop();a||(a=new ArrayBuffer(n.greyscale.byteLength)),new Uint8Array(a).set(n.greyscale),this._lastUpdateTime=r;let u={data:a,cameraSourceData:n.greyscale,cameraModel:n.cameraModel,cameraToDevice:n.cameraToDevice,dataWidth:n.width,dataHeight:n.height,texture:void 0,userFacing:n.userFacing,uvTransform:s.mat4.create(),cameraSource:this};this._submitMotionUpdates(t);const c=t.registerToken(u);t.sendDataToWorker(u.data||new ArrayBuffer(0),c,u.dataWidth,u.dataHeight,u.userFacing,u.cameraToDevice,u.cameraModel)}destroy(){c.delete(this._impl),this.pause()}start(){var e;let t=o.Pipeline.get(this._pipeline);t&&t.currentCameraSource!==this&&(null===(e=t.currentCameraSource)||void 0===e||e.pause(),t.currentCameraSource=this)}pause(){let e=o.Pipeline.get(this._pipeline);e&&e.currentCameraSource===this&&(e.currentCameraSource=void 0)}uploadGL(e){let t=o.Pipeline.get(this._pipeline);if(!t)return;let r=null==t?void 0:t.glContext;r&&(e.texture||(e.texture=t.getVideoTexture()),e.texture&&e.cameraSourceData&&(r.bindTexture(r.TEXTURE_2D,e.texture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),r.texImage2D(r.TEXTURE_2D,0,r.LUMINANCE,e.dataWidth,e.dataHeight,0,r.LUMINANCE,r.UNSIGNED_BYTE,new Uint8Array(e.cameraSourceData)),r.bindTexture(r.TEXTURE_2D,null)))}_submitMotionUpdates(e){let t=!1;for(;this._packetNumber<this._decoder.numberPackets;){let r=this._decoder.dataByPacket.get(this._packetNumber);if(r.type==i.SequenceRecorderPacketType.CAMERA_FRAME)break;switch(r.type){case i.SequenceRecorderPacketType.ACCELEROMETER:e.motionAccelerometerSubmit(r.t,r.x,r.y,r.z),t=!0;break;case i.SequenceRecorderPacketType.ROTATION_RATE:e.motionRotationRateSubmit(r.t,r.x,r.y,r.z),t=!0;break;case i.SequenceRecorderPacketType.ATTITUDE:e.motionAttitudeSubmit(r.t,r.x,r.y,r.z),t=!0;break;case i.SequenceRecorderPacketType.ATTITUDE_MATRIX:e.motionAttitudeMatrix(r.attitude),t=!0}this._packetNumber++}t&&(this._motionUpdatesQueued++,setTimeout(()=>{this._motionUpdatesSent++},0))}}t.SequenceSource=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gfx=void 0,t.gfx='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="250" height="80.408" viewBox="0 0 250 80.408"><defs><filter id="a" x="0" y="1.182" width="250" height="79.226" filterUnits="userSpaceOnUse"><feOffset dy="3" input="SourceAlpha"/><feGaussianBlur stdDeviation="3" result="b"/><feFlood flood-opacity="0.161"/><feComposite operator="in" in2="b"/><feComposite in="SourceGraphic"/></filter><filter id="c" x="6.929" y="0" width="111.975" height="40.988" filterUnits="userSpaceOnUse"><feOffset dy="3" input="SourceAlpha"/><feGaussianBlur stdDeviation="3" result="d"/><feFlood flood-opacity="0.161"/><feComposite operator="in" in2="d"/><feComposite in="SourceGraphic"/></filter></defs><g transform="translate(-26.873 -414.029)"><g transform="translate(44 423.332)"><g transform="translate(0 0.635)" style="isolation:isolate"><g transform="translate(0 0)"><g transform="matrix(1, 0, 0, 1, -17.13, -9.94)" filter="url(#a)"><path d="M55.766,44.97V11.8h8.272v2.6h.089a8.258,8.258,0,0,1,7.046-3.357,11.4,11.4,0,0,1,8.5,3.686,12.667,12.667,0,0,1,3.278,8.622,12.509,12.509,0,0,1-3.25,8.57,11.353,11.353,0,0,1-8.429,3.6,9.533,9.533,0,0,1-7.229-2.95V43.378l-8.269,1.594h0Zm8-21.671a4.958,4.958,0,0,0,5.319,5.15A4.957,4.957,0,0,0,74.4,23.3a5.321,5.321,0,0,0-10.638,0ZM16.105,18.412H2.752V11.038H30.9L14.887,37.16H38.22L0,44.534ZM131.469,38.45a.761.761,0,0,1-.484-.166.582.582,0,0,1-.228-.419l-.553-3.586a12.243,12.243,0,0,1-1.782-.721l-2.789,2.084a.718.718,0,0,1-.5.176.688.688,0,0,1-.495-.214,25.864,25.864,0,0,1-3.264-3.274.754.754,0,0,1,.018-.9c.2-.277.543-.713,1.01-1.3.483-.6.832-1.05,1.068-1.374a9.614,9.614,0,0,1-.811-1.929l-3.62-.527a.631.631,0,0,1-.416-.243.728.728,0,0,1-.159-.458V21.283a.743.743,0,0,1,.159-.448.6.6,0,0,1,.376-.253l3.68-.546a9.511,9.511,0,0,1,.772-1.792c-.523-.733-1.235-1.638-2.117-2.69a.731.731,0,0,1-.2-.467.82.82,0,0,1,.178-.449,19.577,19.577,0,0,1,1.949-2.095c.953-.924,1.582-1.393,1.87-1.393a.861.861,0,0,1,.515.195l2.729,2.084a11.551,11.551,0,0,1,1.8-.741,31.446,31.446,0,0,1,.573-3.623.666.666,0,0,1,.712-.546h4.392a.757.757,0,0,1,.485.166.58.58,0,0,1,.228.419l.553,3.584a12.576,12.576,0,0,1,1.782.722l2.809-2.085a.641.641,0,0,1,.475-.176.776.776,0,0,1,.5.195,27.035,27.035,0,0,1,3.264,3.313.625.625,0,0,1,.139.429.742.742,0,0,1-.159.447c-.2.271-.525.7-1.008,1.3-.467.581-.827,1.043-1.069,1.373a11.8,11.8,0,0,1,.812,1.91l3.62.545a.626.626,0,0,1,.416.244.736.736,0,0,1,.158.457v4.325a.755.755,0,0,1-.158.449.6.6,0,0,1-.4.253l-3.66.545a12.692,12.692,0,0,1-.772,1.774c.465.653,1.177,1.559,2.117,2.688a.751.751,0,0,1,.2.488.648.648,0,0,1-.178.448,19.638,19.638,0,0,1-1.958,2.1c-.947.918-1.573,1.384-1.861,1.384a.976.976,0,0,1-.515-.176l-2.731-2.1a11.361,11.361,0,0,1-1.8.741,31.849,31.849,0,0,1-.573,3.625.668.668,0,0,1-.713.546Zm-1.385-18.491a4.935,4.935,0,0,0,0,7.053,5.12,5.12,0,0,0,7.163,0,4.931,4.931,0,0,0,0-7.053,5.117,5.117,0,0,0-7.163,0Zm69.969,14.868a18.523,18.523,0,0,1-4.932-2.073l1.705-6.1A13.441,13.441,0,0,0,200.779,29a12.14,12.14,0,0,0,4.344.818,4.644,4.644,0,0,0,2.351-.482,1.538,1.538,0,0,0,.806-1.4q0-1.5-3.25-2.242-1.061-.246-1.705-.425a12.335,12.335,0,0,1-5.358-2.589,5.5,5.5,0,0,1-1.671-4.157,6.323,6.323,0,0,1,2.547-5.267,10.993,10.993,0,0,1,6.9-1.972,21.351,21.351,0,0,1,4.552.5,25.439,25.439,0,0,1,4.736,1.557l-1.705,5.491a14.244,14.244,0,0,0-3.319-1.636,10.6,10.6,0,0,0-3.364-.561,4.227,4.227,0,0,0-2.121.426,1.357,1.357,0,0,0-.714,1.232q0,1.211,3.227,2.04.737.2,1.106.291,4.264,1.187,5.935,2.79a5.728,5.728,0,0,1,1.67,4.337A6.781,6.781,0,0,1,213,33.37a11.48,11.48,0,0,1-7.259,2.14A22.577,22.577,0,0,1,200.053,34.827ZM30.568,31.834a12.566,12.566,0,0,1-3.292-8.59,12.567,12.567,0,0,1,3.247-8.568,11.3,11.3,0,0,1,8.423-3.638,9.519,9.519,0,0,1,7.217,3V11.8h8.264V34.735H46.163V32.186h-.09c-1.32,2.071-3.951,3.308-7.038,3.308A11.412,11.412,0,0,1,30.568,31.834Zm5.245-8.545a4.95,4.95,0,0,0,5.312,5.141,4.95,4.95,0,0,0,5.312-5.141A5.023,5.023,0,0,0,41.125,18.1,5.023,5.023,0,0,0,35.813,23.289Zm69.2,11.554-3.527-10.452q-.282-.892-.505-1.8t-.412-1.8a30.821,30.821,0,0,1-.917,3.454l-.047.16L96.1,34.842H90.176l-9.925-23.1h8.632l3.552,10.223q.4,1.12.634,1.955t.377,1.635a23.558,23.558,0,0,1,.917-3.179q.093-.274.141-.411l3.528-10.223h5.056l3.5,10.2.07.183a20.724,20.724,0,0,1,.988,3.43q.141-.732.364-1.532t.647-2.058l3.574-10.223h8.678l-9.971,23.1Zm80.154-.092-8.587-9.841v9.841h-7.888V1.5L176.583,0V22.28l8.272-9.665h9.96L184.584,23.266l11.156,11.485Zm-35.09,0V11.782h8.272v3.761h.091a8.131,8.131,0,0,1,7.546-4.074h1.593V19.3a6.8,6.8,0,0,0-3.5-.761c-4.593,0-5.728,3-5.728,6.941v9.268Z" transform="translate(17.13 15.31)"/></g><g transform="matrix(1, 0, 0, 1, -17.13, -9.94)" filter="url(#c)"><path d="M3.576-12.852v-4.3H6.628a2.867,2.867,0,0,1,1.945.55A2.034,2.034,0,0,1,9.188-15a2.06,2.06,0,0,1-.615,1.608,2.784,2.784,0,0,1-1.945.542ZM2.017-18.464V-6.748H3.576v-4.792H7.153a3.569,3.569,0,0,0,2.683-.9A3.478,3.478,0,0,0,10.747-15a3.45,3.45,0,0,0-.911-2.552,3.638,3.638,0,0,0-2.683-.911Zm11.421,7.483a4.221,4.221,0,0,1,.205-1.37,2.957,2.957,0,0,1,.566-1.009,2.411,2.411,0,0,1,.845-.624A2.515,2.515,0,0,1,16.08-14.2a2.515,2.515,0,0,1,1.026.213,2.411,2.411,0,0,1,.845.624,2.957,2.957,0,0,1,.566,1.009,4.221,4.221,0,0,1,.205,1.37,4.221,4.221,0,0,1-.205,1.37,2.867,2.867,0,0,1-.566,1,2.457,2.457,0,0,1-.845.615,2.515,2.515,0,0,1-1.026.213,2.515,2.515,0,0,1-1.026-.213,2.457,2.457,0,0,1-.845-.615,2.867,2.867,0,0,1-.566-1A4.221,4.221,0,0,1,13.438-10.981Zm-1.477,0a5.573,5.573,0,0,0,.263,1.739,3.97,3.97,0,0,0,.788,1.4,3.623,3.623,0,0,0,1.3.935,4.4,4.4,0,0,0,1.772.336A4.381,4.381,0,0,0,17.86-6.9a3.641,3.641,0,0,0,1.288-.935,3.97,3.97,0,0,0,.788-1.4,5.573,5.573,0,0,0,.263-1.739,5.65,5.65,0,0,0-.263-1.748,3.96,3.96,0,0,0-.788-1.411,3.729,3.729,0,0,0-1.288-.944,4.29,4.29,0,0,0-1.78-.345,4.3,4.3,0,0,0-1.772.345,3.71,3.71,0,0,0-1.3.944,3.96,3.96,0,0,0-.788,1.411A5.65,5.65,0,0,0,11.961-10.981Zm18.28,4.234,2.708-8.484H31.5L29.6-8.29h-.033L27.8-15.231H26.27L24.564-8.29h-.033l-1.92-6.941H21.068l2.724,8.484H25.3l1.707-6.744h.033l1.723,6.744ZM40.169-11.8H35.3a2.905,2.905,0,0,1,.213-.927A2.473,2.473,0,0,1,36-13.492a2.255,2.255,0,0,1,.747-.517,2.429,2.429,0,0,1,.976-.189,2.386,2.386,0,0,1,.96.189,2.415,2.415,0,0,1,.755.509,2.391,2.391,0,0,1,.509.763A2.854,2.854,0,0,1,40.169-11.8Zm1.346,2.363H40.136a1.983,1.983,0,0,1-.747,1.247,2.414,2.414,0,0,1-1.452.41,2.889,2.889,0,0,1-1.2-.23,2.348,2.348,0,0,1-.837-.615,2.4,2.4,0,0,1-.476-.886,3.367,3.367,0,0,1-.131-1.058h6.35a6.754,6.754,0,0,0-.139-1.625,4.7,4.7,0,0,0-.624-1.575,3.716,3.716,0,0,0-1.2-1.19,3.48,3.48,0,0,0-1.879-.468,3.858,3.858,0,0,0-1.6.328,3.76,3.76,0,0,0-1.264.919,4.236,4.236,0,0,0-.829,1.395,5.105,5.105,0,0,0-.3,1.772,6.8,6.8,0,0,0,.287,1.789,3.9,3.9,0,0,0,.763,1.411,3.478,3.478,0,0,0,1.255.919,4.358,4.358,0,0,0,1.764.328,3.851,3.851,0,0,0,2.4-.722A3.39,3.39,0,0,0,41.515-9.439Zm1.526-5.793v8.484h1.395v-3.774a5.8,5.8,0,0,1,.164-1.452,2.784,2.784,0,0,1,.525-1.075,2.251,2.251,0,0,1,.952-.673,3.945,3.945,0,0,1,1.428-.23v-1.477a3.135,3.135,0,0,0-1.871.459,3.779,3.779,0,0,0-1.247,1.526h-.033v-1.789ZM54.15-11.8H49.276a2.905,2.905,0,0,1,.213-.927,2.473,2.473,0,0,1,.492-.763,2.255,2.255,0,0,1,.747-.517A2.429,2.429,0,0,1,51.7-14.2a2.386,2.386,0,0,1,.96.189,2.415,2.415,0,0,1,.755.509,2.391,2.391,0,0,1,.509.763A2.854,2.854,0,0,1,54.15-11.8ZM55.5-9.439H54.117a1.983,1.983,0,0,1-.747,1.247,2.414,2.414,0,0,1-1.452.41,2.889,2.889,0,0,1-1.2-.23,2.348,2.348,0,0,1-.837-.615,2.4,2.4,0,0,1-.476-.886,3.367,3.367,0,0,1-.131-1.058h6.35a6.754,6.754,0,0,0-.139-1.625,4.7,4.7,0,0,0-.624-1.575,3.716,3.716,0,0,0-1.2-1.19,3.48,3.48,0,0,0-1.879-.468,3.858,3.858,0,0,0-1.6.328,3.76,3.76,0,0,0-1.264.919,4.236,4.236,0,0,0-.829,1.395,5.1,5.1,0,0,0-.3,1.772,6.8,6.8,0,0,0,.287,1.789,3.9,3.9,0,0,0,.763,1.411,3.478,3.478,0,0,0,1.255.919,4.358,4.358,0,0,0,1.764.328,3.851,3.851,0,0,0,2.4-.722A3.39,3.39,0,0,0,55.5-9.439Zm2.593-1.477a5.581,5.581,0,0,1,.131-1.214,3.212,3.212,0,0,1,.427-1.05,2.221,2.221,0,0,1,.788-.738,2.4,2.4,0,0,1,1.2-.279,2.589,2.589,0,0,1,1.231.271,2.389,2.389,0,0,1,.829.714,2.985,2.985,0,0,1,.468,1.026,4.889,4.889,0,0,1,.148,1.206,4.919,4.919,0,0,1-.139,1.165,3.053,3.053,0,0,1-.451,1.026,2.4,2.4,0,0,1-.8.73,2.4,2.4,0,0,1-1.2.279,2.491,2.491,0,0,1-1.173-.263,2.332,2.332,0,0,1-.82-.706,3.122,3.122,0,0,1-.476-1.009A4.338,4.338,0,0,1,58.088-10.916Zm6.564,4.168V-18.464H63.257V-14.1h-.033a2.247,2.247,0,0,0-.566-.632,3.216,3.216,0,0,0-.714-.41,3.583,3.583,0,0,0-.755-.222,4.132,4.132,0,0,0-.706-.066,3.861,3.861,0,0,0-1.7.353,3.487,3.487,0,0,0-1.214.952,4.018,4.018,0,0,0-.722,1.4,5.985,5.985,0,0,0-.238,1.707,5.8,5.8,0,0,0,.246,1.707,4.218,4.218,0,0,0,.73,1.411,3.529,3.529,0,0,0,1.214.968,3.827,3.827,0,0,0,1.715.361,4.135,4.135,0,0,0,1.625-.312A2.053,2.053,0,0,0,63.224-7.9h.033v1.149Zm6.761-11.716V-6.748h1.395V-7.88h.033a2.247,2.247,0,0,0,.566.632,2.982,2.982,0,0,0,.714.4,3.874,3.874,0,0,0,.763.213,4.193,4.193,0,0,0,.7.066,3.94,3.94,0,0,0,1.7-.345,3.4,3.4,0,0,0,1.214-.944,4.018,4.018,0,0,0,.722-1.4,5.985,5.985,0,0,0,.238-1.707,5.8,5.8,0,0,0-.246-1.707,4.312,4.312,0,0,0-.73-1.419,3.488,3.488,0,0,0-1.214-.976,3.827,3.827,0,0,0-1.715-.361,4.043,4.043,0,0,0-1.625.32,2.088,2.088,0,0,0-1.083,1.026h-.033v-4.381Zm6.564,7.4a5.581,5.581,0,0,1-.131,1.214,3.212,3.212,0,0,1-.427,1.05,2.243,2.243,0,0,1-.779.738,2.385,2.385,0,0,1-1.206.279A2.589,2.589,0,0,1,74.2-8.052a2.389,2.389,0,0,1-.829-.714,2.985,2.985,0,0,1-.468-1.026A4.889,4.889,0,0,1,72.758-11a4.919,4.919,0,0,1,.139-1.165,3.053,3.053,0,0,1,.451-1.026,2.4,2.4,0,0,1,.8-.73,2.4,2.4,0,0,1,1.2-.279,2.491,2.491,0,0,1,1.173.263,2.332,2.332,0,0,1,.82.706,3.122,3.122,0,0,1,.476,1.009A4.338,4.338,0,0,1,77.976-11.063Zm6.449,5.448a8.871,8.871,0,0,1-.484,1.05,2.871,2.871,0,0,1-.525.7,1.782,1.782,0,0,1-.64.394,2.462,2.462,0,0,1-.812.123,3.721,3.721,0,0,1-.492-.033A2.324,2.324,0,0,1,81-3.5v-1.28a2.342,2.342,0,0,0,.418.139,1.765,1.765,0,0,0,.4.057,1.2,1.2,0,0,0,.714-.205,1.255,1.255,0,0,0,.435-.583L83.539-6.8l-3.364-8.434h1.575L84.228-8.29h.033l2.379-6.941h1.477Z" transform="translate(17.85 28.4)"/></g></g></g><g transform="translate(0 0)"><g transform="translate(0 5.371)"><path d="M11.76,24.456A11.41,11.41,0,0,1,3.292,20.8,12.564,12.564,0,0,1,0,12.206,12.569,12.569,0,0,1,3.246,3.638,11.307,11.307,0,0,1,11.67,0a9.519,9.519,0,0,1,7.217,3V.759h8.264V23.7H18.887V21.148H18.8C17.478,23.219,14.846,24.456,11.76,24.456ZM13.849,7.064A5.023,5.023,0,0,0,8.537,12.25a4.95,4.95,0,0,0,5.312,5.141A4.95,4.95,0,0,0,19.16,12.25,5.023,5.023,0,0,0,13.849,7.064Z" transform="translate(27.277 11.038)" fill="#fff"/><path d="M0,33.931V.758H8.271v2.6H8.36A8.258,8.258,0,0,1,15.406,0,11.4,11.4,0,0,1,23.9,3.686a12.665,12.665,0,0,1,3.278,8.622,12.508,12.508,0,0,1-3.25,8.57,11.351,11.351,0,0,1-8.429,3.6,9.535,9.535,0,0,1-7.229-2.95V32.337L0,33.931ZM13.317,7.07A5.028,5.028,0,0,0,8,12.259a4.957,4.957,0,0,0,5.319,5.15,4.957,4.957,0,0,0,5.319-5.15A5.028,5.028,0,0,0,13.317,7.07Z" transform="translate(55.766 11.041)" fill="#fff"/><path d="M22.836,0l3.5,10.2.07.183a20.748,20.748,0,0,1,.988,3.43q.141-.731.364-1.532t.647-2.058L31.985,0h8.678L30.691,23.1H24.764L21.237,12.647q-.282-.891-.505-1.8t-.412-1.8A30.927,30.927,0,0,1,19.4,12.51l-.047.16L15.851,23.1H9.925L0,0H8.631l3.552,10.223q.4,1.121.635,1.955t.377,1.635a23.522,23.522,0,0,1,.917-3.179q.093-.274.141-.411L17.78,0h5.056" transform="translate(80.251 11.743)" fill="#fff"/><path d="M0,34.75V1.5L7.888,0V22.28l8.272-9.665H26.12L15.889,23.266,27.045,34.75H16.475L7.888,24.91v9.84H0" transform="translate(168.695 0)" fill="#fff"/><path d="M0,21.47l1.705-6.1a13.453,13.453,0,0,0,3.952,2.342A12.145,12.145,0,0,0,10,18.534a4.643,4.643,0,0,0,2.351-.482,1.539,1.539,0,0,0,.807-1.4q0-1.5-3.25-2.241-1.06-.246-1.705-.426A12.325,12.325,0,0,1,2.846,11.4,5.5,5.5,0,0,1,1.176,7.239,6.324,6.324,0,0,1,3.722,1.972,11,11,0,0,1,10.624,0a21.365,21.365,0,0,1,4.551.5,25.45,25.45,0,0,1,4.736,1.558l-1.706,5.49a14.24,14.24,0,0,0-3.319-1.636,10.6,10.6,0,0,0-3.364-.56A4.22,4.22,0,0,0,9.4,5.782a1.356,1.356,0,0,0-.714,1.233q0,1.211,3.227,2.04.737.2,1.106.291,4.264,1.188,5.935,2.79a5.728,5.728,0,0,1,1.671,4.337,6.782,6.782,0,0,1-2.743,5.614,11.478,11.478,0,0,1-7.259,2.14,22.565,22.565,0,0,1-5.693-.683A18.517,18.517,0,0,1,0,21.47" transform="translate(195.121 11.284)" fill="#fff"/><path d="M8.273,4.075h.091A8.13,8.13,0,0,1,15.909,0H17.5V7.834A6.8,6.8,0,0,0,14,7.074c-4.593,0-5.728,3-5.728,6.941v9.268H0V.313H8.273V4.075" transform="translate(150.08 11.469)" fill="#fff"/><path d="M17.392,29.929H13a.76.76,0,0,1-.485-.166.579.579,0,0,1-.227-.419l-.553-3.586a12.3,12.3,0,0,1-1.781-.721L7.163,27.123a.719.719,0,0,1-.495.176.687.687,0,0,1-.495-.214A25.873,25.873,0,0,1,2.91,23.81a.753.753,0,0,1,.019-.9c.2-.277.542-.713,1.009-1.3.483-.6.832-1.05,1.068-1.374a9.591,9.591,0,0,1-.811-1.929l-3.62-.526a.63.63,0,0,1-.416-.243A.729.729,0,0,1,0,17.089V12.762a.746.746,0,0,1,.159-.448.6.6,0,0,1,.376-.253l3.68-.546a9.5,9.5,0,0,1,.772-1.792C4.464,8.991,3.752,8.085,2.87,7.034a.732.732,0,0,1-.2-.468.82.82,0,0,1,.179-.449A19.622,19.622,0,0,1,4.8,4.023C5.751,3.1,6.38,2.631,6.668,2.631a.859.859,0,0,1,.515.194L9.913,4.91a11.536,11.536,0,0,1,1.8-.741A31.372,31.372,0,0,1,12.287.546.665.665,0,0,1,13,0h4.392a.755.755,0,0,1,.485.166.581.581,0,0,1,.229.419l.553,3.584a12.543,12.543,0,0,1,1.781.722L23.25,2.807a.641.641,0,0,1,.475-.176.775.775,0,0,1,.495.194,27.092,27.092,0,0,1,3.264,3.313.625.625,0,0,1,.139.429.745.745,0,0,1-.159.448c-.2.271-.525.695-1.008,1.3-.467.581-.827,1.043-1.069,1.373a11.784,11.784,0,0,1,.812,1.91l3.62.545a.625.625,0,0,1,.416.244.736.736,0,0,1,.157.458v4.325a.754.754,0,0,1-.157.449.606.606,0,0,1-.4.253l-3.66.545a12.628,12.628,0,0,1-.772,1.774c.465.654,1.177,1.559,2.117,2.688a.752.752,0,0,1,.2.488.648.648,0,0,1-.177.448,19.641,19.641,0,0,1-1.959,2.1c-.947.918-1.573,1.384-1.86,1.384a.978.978,0,0,1-.515-.176l-2.731-2.1a11.429,11.429,0,0,1-1.8.741,32.016,32.016,0,0,1-.573,3.624A.668.668,0,0,1,17.392,29.929ZM15.2,9.976a4.938,4.938,0,0,0-3.582,1.463,4.935,4.935,0,0,0,0,7.053,5.12,5.12,0,0,0,7.163,0,4.932,4.932,0,0,0,0-7.053A4.938,4.938,0,0,0,15.2,9.976Z" transform="translate(118.47 8.521)" fill="#fff"/><path d="M0,33.5,16.106,7.374H2.752V0H30.9L14.887,26.122H38.22L0,33.5" transform="translate(0 11.038)" fill="#fff"/></g><path d="M3.576-12.852v-4.3H6.628a2.867,2.867,0,0,1,1.945.55A2.034,2.034,0,0,1,9.188-15a2.06,2.06,0,0,1-.615,1.608,2.784,2.784,0,0,1-1.945.542ZM2.017-18.464V-6.748H3.576v-4.792H7.153a3.569,3.569,0,0,0,2.683-.9A3.478,3.478,0,0,0,10.747-15a3.45,3.45,0,0,0-.911-2.552,3.638,3.638,0,0,0-2.683-.911Zm11.421,7.483a4.221,4.221,0,0,1,.205-1.37,2.957,2.957,0,0,1,.566-1.009,2.411,2.411,0,0,1,.845-.624A2.515,2.515,0,0,1,16.08-14.2a2.515,2.515,0,0,1,1.026.213,2.411,2.411,0,0,1,.845.624,2.957,2.957,0,0,1,.566,1.009,4.221,4.221,0,0,1,.205,1.37,4.221,4.221,0,0,1-.205,1.37,2.867,2.867,0,0,1-.566,1,2.457,2.457,0,0,1-.845.615,2.515,2.515,0,0,1-1.026.213,2.515,2.515,0,0,1-1.026-.213,2.457,2.457,0,0,1-.845-.615,2.867,2.867,0,0,1-.566-1A4.221,4.221,0,0,1,13.438-10.981Zm-1.477,0a5.573,5.573,0,0,0,.263,1.739,3.97,3.97,0,0,0,.788,1.4,3.623,3.623,0,0,0,1.3.935,4.4,4.4,0,0,0,1.772.336A4.381,4.381,0,0,0,17.86-6.9a3.641,3.641,0,0,0,1.288-.935,3.97,3.97,0,0,0,.788-1.4,5.573,5.573,0,0,0,.263-1.739,5.65,5.65,0,0,0-.263-1.748,3.96,3.96,0,0,0-.788-1.411,3.729,3.729,0,0,0-1.288-.944,4.29,4.29,0,0,0-1.78-.345,4.3,4.3,0,0,0-1.772.345,3.71,3.71,0,0,0-1.3.944,3.96,3.96,0,0,0-.788,1.411A5.65,5.65,0,0,0,11.961-10.981Zm18.28,4.234,2.708-8.484H31.5L29.6-8.29h-.033L27.8-15.231H26.27L24.564-8.29h-.033l-1.92-6.941H21.068l2.724,8.484H25.3l1.707-6.744h.033l1.723,6.744ZM40.169-11.8H35.3a2.905,2.905,0,0,1,.213-.927A2.473,2.473,0,0,1,36-13.492a2.255,2.255,0,0,1,.747-.517,2.429,2.429,0,0,1,.976-.189,2.386,2.386,0,0,1,.96.189,2.415,2.415,0,0,1,.755.509,2.391,2.391,0,0,1,.509.763A2.854,2.854,0,0,1,40.169-11.8Zm1.346,2.363H40.136a1.983,1.983,0,0,1-.747,1.247,2.414,2.414,0,0,1-1.452.41,2.889,2.889,0,0,1-1.2-.23,2.348,2.348,0,0,1-.837-.615,2.4,2.4,0,0,1-.476-.886,3.367,3.367,0,0,1-.131-1.058h6.35a6.754,6.754,0,0,0-.139-1.625,4.7,4.7,0,0,0-.624-1.575,3.716,3.716,0,0,0-1.2-1.19,3.48,3.48,0,0,0-1.879-.468,3.858,3.858,0,0,0-1.6.328,3.76,3.76,0,0,0-1.264.919,4.236,4.236,0,0,0-.829,1.395,5.105,5.105,0,0,0-.3,1.772,6.8,6.8,0,0,0,.287,1.789,3.9,3.9,0,0,0,.763,1.411,3.478,3.478,0,0,0,1.255.919,4.358,4.358,0,0,0,1.764.328,3.851,3.851,0,0,0,2.4-.722A3.39,3.39,0,0,0,41.515-9.439Zm1.526-5.793v8.484h1.395v-3.774a5.8,5.8,0,0,1,.164-1.452,2.784,2.784,0,0,1,.525-1.075,2.251,2.251,0,0,1,.952-.673,3.945,3.945,0,0,1,1.428-.23v-1.477a3.135,3.135,0,0,0-1.871.459,3.779,3.779,0,0,0-1.247,1.526h-.033v-1.789ZM54.15-11.8H49.276a2.905,2.905,0,0,1,.213-.927,2.473,2.473,0,0,1,.492-.763,2.255,2.255,0,0,1,.747-.517A2.429,2.429,0,0,1,51.7-14.2a2.386,2.386,0,0,1,.96.189,2.415,2.415,0,0,1,.755.509,2.391,2.391,0,0,1,.509.763A2.854,2.854,0,0,1,54.15-11.8ZM55.5-9.439H54.117a1.983,1.983,0,0,1-.747,1.247,2.414,2.414,0,0,1-1.452.41,2.889,2.889,0,0,1-1.2-.23,2.348,2.348,0,0,1-.837-.615,2.4,2.4,0,0,1-.476-.886,3.367,3.367,0,0,1-.131-1.058h6.35a6.754,6.754,0,0,0-.139-1.625,4.7,4.7,0,0,0-.624-1.575,3.716,3.716,0,0,0-1.2-1.19,3.48,3.48,0,0,0-1.879-.468,3.858,3.858,0,0,0-1.6.328,3.76,3.76,0,0,0-1.264.919,4.236,4.236,0,0,0-.829,1.395,5.1,5.1,0,0,0-.3,1.772,6.8,6.8,0,0,0,.287,1.789,3.9,3.9,0,0,0,.763,1.411,3.478,3.478,0,0,0,1.255.919,4.358,4.358,0,0,0,1.764.328,3.851,3.851,0,0,0,2.4-.722A3.39,3.39,0,0,0,55.5-9.439Zm2.593-1.477a5.581,5.581,0,0,1,.131-1.214,3.212,3.212,0,0,1,.427-1.05,2.221,2.221,0,0,1,.788-.738,2.4,2.4,0,0,1,1.2-.279,2.589,2.589,0,0,1,1.231.271,2.389,2.389,0,0,1,.829.714,2.985,2.985,0,0,1,.468,1.026,4.889,4.889,0,0,1,.148,1.206,4.919,4.919,0,0,1-.139,1.165,3.053,3.053,0,0,1-.451,1.026,2.4,2.4,0,0,1-.8.73,2.4,2.4,0,0,1-1.2.279,2.491,2.491,0,0,1-1.173-.263,2.332,2.332,0,0,1-.82-.706,3.122,3.122,0,0,1-.476-1.009A4.338,4.338,0,0,1,58.088-10.916Zm6.564,4.168V-18.464H63.257V-14.1h-.033a2.247,2.247,0,0,0-.566-.632,3.216,3.216,0,0,0-.714-.41,3.583,3.583,0,0,0-.755-.222,4.132,4.132,0,0,0-.706-.066,3.861,3.861,0,0,0-1.7.353,3.487,3.487,0,0,0-1.214.952,4.018,4.018,0,0,0-.722,1.4,5.985,5.985,0,0,0-.238,1.707,5.8,5.8,0,0,0,.246,1.707,4.218,4.218,0,0,0,.73,1.411,3.529,3.529,0,0,0,1.214.968,3.827,3.827,0,0,0,1.715.361,4.135,4.135,0,0,0,1.625-.312A2.053,2.053,0,0,0,63.224-7.9h.033v1.149Zm6.761-11.716V-6.748h1.395V-7.88h.033a2.247,2.247,0,0,0,.566.632,2.982,2.982,0,0,0,.714.4,3.874,3.874,0,0,0,.763.213,4.193,4.193,0,0,0,.7.066,3.94,3.94,0,0,0,1.7-.345,3.4,3.4,0,0,0,1.214-.944,4.018,4.018,0,0,0,.722-1.4,5.985,5.985,0,0,0,.238-1.707,5.8,5.8,0,0,0-.246-1.707,4.312,4.312,0,0,0-.73-1.419,3.488,3.488,0,0,0-1.214-.976,3.827,3.827,0,0,0-1.715-.361,4.043,4.043,0,0,0-1.625.32,2.088,2.088,0,0,0-1.083,1.026h-.033v-4.381Zm6.564,7.4a5.581,5.581,0,0,1-.131,1.214,3.212,3.212,0,0,1-.427,1.05,2.243,2.243,0,0,1-.779.738,2.385,2.385,0,0,1-1.206.279A2.589,2.589,0,0,1,74.2-8.052a2.389,2.389,0,0,1-.829-.714,2.985,2.985,0,0,1-.468-1.026A4.889,4.889,0,0,1,72.758-11a4.919,4.919,0,0,1,.139-1.165,3.053,3.053,0,0,1,.451-1.026,2.4,2.4,0,0,1,.8-.73,2.4,2.4,0,0,1,1.2-.279,2.491,2.491,0,0,1,1.173.263,2.332,2.332,0,0,1,.82.706,3.122,3.122,0,0,1,.476,1.009A4.338,4.338,0,0,1,77.976-11.063Zm6.449,5.448a8.871,8.871,0,0,1-.484,1.05,2.871,2.871,0,0,1-.525.7,1.782,1.782,0,0,1-.64.394,2.462,2.462,0,0,1-.812.123,3.721,3.721,0,0,1-.492-.033A2.324,2.324,0,0,1,81-3.5v-1.28a2.342,2.342,0,0,0,.418.139,1.765,1.765,0,0,0,.4.057,1.2,1.2,0,0,0,.714-.205,1.255,1.255,0,0,0,.435-.583L83.539-6.8l-3.364-8.434h1.575L84.228-8.29h.033l2.379-6.941h1.477Z" transform="translate(0.722 18.464)" fill="#fff"/></g></g></g></svg>'},function(e,t,r){"use strict";r.r(t),t.default=r.p+"f7b62a3a53b5c9b3222ba8dc53cb8b11.zbin"},function(e,t,r){"use strict";r.r(t),t.default=r.p+"482727c0e7dd40d73f5aae47f238ad61.zbin"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="0.4.0-beta.8"}])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ZCV=t():e.ZCV=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=18)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zcwarn=t.zcerr=t.zcout=t.setLogLevel=void 0;const n=r(12);let i=n.log_level_t.LOG_LEVEL_ERROR;t.setLogLevel=function(e){i=e},t.zcout=function(...e){i>=n.log_level_t.LOG_LEVEL_VERBOSE&&console.log("[Zappar] INFO",...e)},t.zcerr=function(...e){i>=n.log_level_t.LOG_LEVEL_ERROR&&console.error("[Zappar] ERROR",...e)},t.zcwarn=function(...e){i>=n.log_level_t.LOG_LEVEL_VERBOSE&&console.log("[Zappar] WARN",...e)}},function(e,t,r){"use strict";r.r(t),r.d(t,"glMatrix",(function(){return n})),r.d(t,"mat2",(function(){return i})),r.d(t,"mat2d",(function(){return a})),r.d(t,"mat3",(function(){return o})),r.d(t,"mat4",(function(){return s})),r.d(t,"quat",(function(){return f})),r.d(t,"quat2",(function(){return _})),r.d(t,"vec2",(function(){return d})),r.d(t,"vec3",(function(){return u})),r.d(t,"vec4",(function(){return c}));var n={};r.r(n),r.d(n,"EPSILON",(function(){return l})),r.d(n,"ARRAY_TYPE",(function(){return h})),r.d(n,"RANDOM",(function(){return m})),r.d(n,"setMatrixArrayType",(function(){return p})),r.d(n,"toRadian",(function(){return g})),r.d(n,"equals",(function(){return v}));var i={};r.r(i),r.d(i,"create",(function(){return w})),r.d(i,"clone",(function(){return y})),r.d(i,"copy",(function(){return M})),r.d(i,"identity",(function(){return E})),r.d(i,"fromValues",(function(){return A})),r.d(i,"set",(function(){return x})),r.d(i,"transpose",(function(){return T})),r.d(i,"invert",(function(){return R})),r.d(i,"adjoint",(function(){return k})),r.d(i,"determinant",(function(){return F})),r.d(i,"multiply",(function(){return S})),r.d(i,"rotate",(function(){return L})),r.d(i,"scale",(function(){return P})),r.d(i,"fromRotation",(function(){return I})),r.d(i,"fromScaling",(function(){return O})),r.d(i,"str",(function(){return U})),r.d(i,"frob",(function(){return C})),r.d(i,"LDU",(function(){return D})),r.d(i,"add",(function(){return z})),r.d(i,"subtract",(function(){return B})),r.d(i,"exactEquals",(function(){return V})),r.d(i,"equals",(function(){return N})),r.d(i,"multiplyScalar",(function(){return q})),r.d(i,"multiplyScalarAndAdd",(function(){return G})),r.d(i,"mul",(function(){return j})),r.d(i,"sub",(function(){return H}));var a={};r.r(a),r.d(a,"create",(function(){return X})),r.d(a,"clone",(function(){return W})),r.d(a,"copy",(function(){return Y})),r.d(a,"identity",(function(){return Z})),r.d(a,"fromValues",(function(){return K})),r.d(a,"set",(function(){return $})),r.d(a,"invert",(function(){return Q})),r.d(a,"determinant",(function(){return J})),r.d(a,"multiply",(function(){return ee})),r.d(a,"rotate",(function(){return te})),r.d(a,"scale",(function(){return re})),r.d(a,"translate",(function(){return ne})),r.d(a,"fromRotation",(function(){return ie})),r.d(a,"fromScaling",(function(){return ae})),r.d(a,"fromTranslation",(function(){return oe})),r.d(a,"str",(function(){return se})),r.d(a,"frob",(function(){return ue})),r.d(a,"add",(function(){return ce})),r.d(a,"subtract",(function(){return fe})),r.d(a,"multiplyScalar",(function(){return _e})),r.d(a,"multiplyScalarAndAdd",(function(){return de})),r.d(a,"exactEquals",(function(){return le})),r.d(a,"equals",(function(){return he})),r.d(a,"mul",(function(){return me})),r.d(a,"sub",(function(){return pe}));var o={};r.r(o),r.d(o,"create",(function(){return be})),r.d(o,"fromMat4",(function(){return ge})),r.d(o,"clone",(function(){return ve})),r.d(o,"copy",(function(){return we})),r.d(o,"fromValues",(function(){return ye})),r.d(o,"set",(function(){return Me})),r.d(o,"identity",(function(){return Ee})),r.d(o,"transpose",(function(){return Ae})),r.d(o,"invert",(function(){return xe})),r.d(o,"adjoint",(function(){return Te})),r.d(o,"determinant",(function(){return Re})),r.d(o,"multiply",(function(){return ke})),r.d(o,"translate",(function(){return Fe})),r.d(o,"rotate",(function(){return Se})),r.d(o,"scale",(function(){return Le})),r.d(o,"fromTranslation",(function(){return Pe})),r.d(o,"fromRotation",(function(){return Ie})),r.d(o,"fromScaling",(function(){return Oe})),r.d(o,"fromMat2d",(function(){return Ue})),r.d(o,"fromQuat",(function(){return Ce})),r.d(o,"normalFromMat4",(function(){return De})),r.d(o,"projection",(function(){return ze})),r.d(o,"str",(function(){return Be})),r.d(o,"frob",(function(){return Ve})),r.d(o,"add",(function(){return Ne})),r.d(o,"subtract",(function(){return qe})),r.d(o,"multiplyScalar",(function(){return Ge})),r.d(o,"multiplyScalarAndAdd",(function(){return je})),r.d(o,"exactEquals",(function(){return He})),r.d(o,"equals",(function(){return Xe})),r.d(o,"mul",(function(){return We})),r.d(o,"sub",(function(){return Ye}));var s={};r.r(s),r.d(s,"create",(function(){return Ze})),r.d(s,"clone",(function(){return Ke})),r.d(s,"copy",(function(){return $e})),r.d(s,"fromValues",(function(){return Qe})),r.d(s,"set",(function(){return Je})),r.d(s,"identity",(function(){return et})),r.d(s,"transpose",(function(){return tt})),r.d(s,"invert",(function(){return rt})),r.d(s,"adjoint",(function(){return nt})),r.d(s,"determinant",(function(){return it})),r.d(s,"multiply",(function(){return at})),r.d(s,"translate",(function(){return ot})),r.d(s,"scale",(function(){return st})),r.d(s,"rotate",(function(){return ut})),r.d(s,"rotateX",(function(){return ct})),r.d(s,"rotateY",(function(){return ft})),r.d(s,"rotateZ",(function(){return _t})),r.d(s,"fromTranslation",(function(){return dt})),r.d(s,"fromScaling",(function(){return lt})),r.d(s,"fromRotation",(function(){return ht})),r.d(s,"fromXRotation",(function(){return mt})),r.d(s,"fromYRotation",(function(){return pt})),r.d(s,"fromZRotation",(function(){return bt})),r.d(s,"fromRotationTranslation",(function(){return gt})),r.d(s,"fromQuat2",(function(){return vt})),r.d(s,"getTranslation",(function(){return wt})),r.d(s,"getScaling",(function(){return yt})),r.d(s,"getRotation",(function(){return Mt})),r.d(s,"fromRotationTranslationScale",(function(){return Et})),r.d(s,"fromRotationTranslationScaleOrigin",(function(){return At})),r.d(s,"fromQuat",(function(){return xt})),r.d(s,"frustum",(function(){return Tt})),r.d(s,"perspective",(function(){return Rt})),r.d(s,"perspectiveFromFieldOfView",(function(){return kt})),r.d(s,"ortho",(function(){return Ft})),r.d(s,"lookAt",(function(){return St})),r.d(s,"targetTo",(function(){return Lt})),r.d(s,"str",(function(){return Pt})),r.d(s,"frob",(function(){return It})),r.d(s,"add",(function(){return Ot})),r.d(s,"subtract",(function(){return Ut})),r.d(s,"multiplyScalar",(function(){return Ct})),r.d(s,"multiplyScalarAndAdd",(function(){return Dt})),r.d(s,"exactEquals",(function(){return zt})),r.d(s,"equals",(function(){return Bt})),r.d(s,"mul",(function(){return Vt})),r.d(s,"sub",(function(){return Nt}));var u={};r.r(u),r.d(u,"create",(function(){return qt})),r.d(u,"clone",(function(){return Gt})),r.d(u,"length",(function(){return jt})),r.d(u,"fromValues",(function(){return Ht})),r.d(u,"copy",(function(){return Xt})),r.d(u,"set",(function(){return Wt})),r.d(u,"add",(function(){return Yt})),r.d(u,"subtract",(function(){return Zt})),r.d(u,"multiply",(function(){return Kt})),r.d(u,"divide",(function(){return $t})),r.d(u,"ceil",(function(){return Qt})),r.d(u,"floor",(function(){return Jt})),r.d(u,"min",(function(){return er})),r.d(u,"max",(function(){return tr})),r.d(u,"round",(function(){return rr})),r.d(u,"scale",(function(){return nr})),r.d(u,"scaleAndAdd",(function(){return ir})),r.d(u,"distance",(function(){return ar})),r.d(u,"squaredDistance",(function(){return or})),r.d(u,"squaredLength",(function(){return sr})),r.d(u,"negate",(function(){return ur})),r.d(u,"inverse",(function(){return cr})),r.d(u,"normalize",(function(){return fr})),r.d(u,"dot",(function(){return _r})),r.d(u,"cross",(function(){return dr})),r.d(u,"lerp",(function(){return lr})),r.d(u,"hermite",(function(){return hr})),r.d(u,"bezier",(function(){return mr})),r.d(u,"random",(function(){return pr})),r.d(u,"transformMat4",(function(){return br})),r.d(u,"transformMat3",(function(){return gr})),r.d(u,"transformQuat",(function(){return vr})),r.d(u,"rotateX",(function(){return wr})),r.d(u,"rotateY",(function(){return yr})),r.d(u,"rotateZ",(function(){return Mr})),r.d(u,"angle",(function(){return Er})),r.d(u,"zero",(function(){return Ar})),r.d(u,"str",(function(){return xr})),r.d(u,"exactEquals",(function(){return Tr})),r.d(u,"equals",(function(){return Rr})),r.d(u,"sub",(function(){return Fr})),r.d(u,"mul",(function(){return Sr})),r.d(u,"div",(function(){return Lr})),r.d(u,"dist",(function(){return Pr})),r.d(u,"sqrDist",(function(){return Ir})),r.d(u,"len",(function(){return Or})),r.d(u,"sqrLen",(function(){return Ur})),r.d(u,"forEach",(function(){return Cr}));var c={};r.r(c),r.d(c,"create",(function(){return Dr})),r.d(c,"clone",(function(){return zr})),r.d(c,"fromValues",(function(){return Br})),r.d(c,"copy",(function(){return Vr})),r.d(c,"set",(function(){return Nr})),r.d(c,"add",(function(){return qr})),r.d(c,"subtract",(function(){return Gr})),r.d(c,"multiply",(function(){return jr})),r.d(c,"divide",(function(){return Hr})),r.d(c,"ceil",(function(){return Xr})),r.d(c,"floor",(function(){return Wr})),r.d(c,"min",(function(){return Yr})),r.d(c,"max",(function(){return Zr})),r.d(c,"round",(function(){return Kr})),r.d(c,"scale",(function(){return $r})),r.d(c,"scaleAndAdd",(function(){return Qr})),r.d(c,"distance",(function(){return Jr})),r.d(c,"squaredDistance",(function(){return en})),r.d(c,"length",(function(){return tn})),r.d(c,"squaredLength",(function(){return rn})),r.d(c,"negate",(function(){return nn})),r.d(c,"inverse",(function(){return an})),r.d(c,"normalize",(function(){return on})),r.d(c,"dot",(function(){return sn})),r.d(c,"cross",(function(){return un})),r.d(c,"lerp",(function(){return cn})),r.d(c,"random",(function(){return fn})),r.d(c,"transformMat4",(function(){return _n})),r.d(c,"transformQuat",(function(){return dn})),r.d(c,"zero",(function(){return ln})),r.d(c,"str",(function(){return hn})),r.d(c,"exactEquals",(function(){return mn})),r.d(c,"equals",(function(){return pn})),r.d(c,"sub",(function(){return bn})),r.d(c,"mul",(function(){return gn})),r.d(c,"div",(function(){return vn})),r.d(c,"dist",(function(){return wn})),r.d(c,"sqrDist",(function(){return yn})),r.d(c,"len",(function(){return Mn})),r.d(c,"sqrLen",(function(){return En})),r.d(c,"forEach",(function(){return An}));var f={};r.r(f),r.d(f,"create",(function(){return xn})),r.d(f,"identity",(function(){return Tn})),r.d(f,"setAxisAngle",(function(){return Rn})),r.d(f,"getAxisAngle",(function(){return kn})),r.d(f,"getAngle",(function(){return Fn})),r.d(f,"multiply",(function(){return Sn})),r.d(f,"rotateX",(function(){return Ln})),r.d(f,"rotateY",(function(){return Pn})),r.d(f,"rotateZ",(function(){return In})),r.d(f,"calculateW",(function(){return On})),r.d(f,"exp",(function(){return Un})),r.d(f,"ln",(function(){return Cn})),r.d(f,"pow",(function(){return Dn})),r.d(f,"slerp",(function(){return zn})),r.d(f,"random",(function(){return Bn})),r.d(f,"invert",(function(){return Vn})),r.d(f,"conjugate",(function(){return Nn})),r.d(f,"fromMat3",(function(){return qn})),r.d(f,"fromEuler",(function(){return Gn})),r.d(f,"str",(function(){return jn})),r.d(f,"clone",(function(){return $n})),r.d(f,"fromValues",(function(){return Qn})),r.d(f,"copy",(function(){return Jn})),r.d(f,"set",(function(){return ei})),r.d(f,"add",(function(){return ti})),r.d(f,"mul",(function(){return ri})),r.d(f,"scale",(function(){return ni})),r.d(f,"dot",(function(){return ii})),r.d(f,"lerp",(function(){return ai})),r.d(f,"length",(function(){return oi})),r.d(f,"len",(function(){return si})),r.d(f,"squaredLength",(function(){return ui})),r.d(f,"sqrLen",(function(){return ci})),r.d(f,"normalize",(function(){return fi})),r.d(f,"exactEquals",(function(){return _i})),r.d(f,"equals",(function(){return di})),r.d(f,"rotationTo",(function(){return li})),r.d(f,"sqlerp",(function(){return hi})),r.d(f,"setAxes",(function(){return mi}));var _={};r.r(_),r.d(_,"create",(function(){return pi})),r.d(_,"clone",(function(){return bi})),r.d(_,"fromValues",(function(){return gi})),r.d(_,"fromRotationTranslationValues",(function(){return vi})),r.d(_,"fromRotationTranslation",(function(){return wi})),r.d(_,"fromTranslation",(function(){return yi})),r.d(_,"fromRotation",(function(){return Mi})),r.d(_,"fromMat4",(function(){return Ei})),r.d(_,"copy",(function(){return Ai})),r.d(_,"identity",(function(){return xi})),r.d(_,"set",(function(){return Ti})),r.d(_,"getReal",(function(){return Ri})),r.d(_,"getDual",(function(){return ki})),r.d(_,"setReal",(function(){return Fi})),r.d(_,"setDual",(function(){return Si})),r.d(_,"getTranslation",(function(){return Li})),r.d(_,"translate",(function(){return Pi})),r.d(_,"rotateX",(function(){return Ii})),r.d(_,"rotateY",(function(){return Oi})),r.d(_,"rotateZ",(function(){return Ui})),r.d(_,"rotateByQuatAppend",(function(){return Ci})),r.d(_,"rotateByQuatPrepend",(function(){return Di})),r.d(_,"rotateAroundAxis",(function(){return zi})),r.d(_,"add",(function(){return Bi})),r.d(_,"multiply",(function(){return Vi})),r.d(_,"mul",(function(){return Ni})),r.d(_,"scale",(function(){return qi})),r.d(_,"dot",(function(){return Gi})),r.d(_,"lerp",(function(){return ji})),r.d(_,"invert",(function(){return Hi})),r.d(_,"conjugate",(function(){return Xi})),r.d(_,"length",(function(){return Wi})),r.d(_,"len",(function(){return Yi})),r.d(_,"squaredLength",(function(){return Zi})),r.d(_,"sqrLen",(function(){return Ki})),r.d(_,"normalize",(function(){return $i})),r.d(_,"str",(function(){return Qi})),r.d(_,"exactEquals",(function(){return Ji})),r.d(_,"equals",(function(){return ea}));var d={};r.r(d),r.d(d,"create",(function(){return ta})),r.d(d,"clone",(function(){return ra})),r.d(d,"fromValues",(function(){return na})),r.d(d,"copy",(function(){return ia})),r.d(d,"set",(function(){return aa})),r.d(d,"add",(function(){return oa})),r.d(d,"subtract",(function(){return sa})),r.d(d,"multiply",(function(){return ua})),r.d(d,"divide",(function(){return ca})),r.d(d,"ceil",(function(){return fa})),r.d(d,"floor",(function(){return _a})),r.d(d,"min",(function(){return da})),r.d(d,"max",(function(){return la})),r.d(d,"round",(function(){return ha})),r.d(d,"scale",(function(){return ma})),r.d(d,"scaleAndAdd",(function(){return pa})),r.d(d,"distance",(function(){return ba})),r.d(d,"squaredDistance",(function(){return ga})),r.d(d,"length",(function(){return va})),r.d(d,"squaredLength",(function(){return wa})),r.d(d,"negate",(function(){return ya})),r.d(d,"inverse",(function(){return Ma})),r.d(d,"normalize",(function(){return Ea})),r.d(d,"dot",(function(){return Aa})),r.d(d,"cross",(function(){return xa})),r.d(d,"lerp",(function(){return Ta})),r.d(d,"random",(function(){return Ra})),r.d(d,"transformMat2",(function(){return ka})),r.d(d,"transformMat2d",(function(){return Fa})),r.d(d,"transformMat3",(function(){return Sa})),r.d(d,"transformMat4",(function(){return La})),r.d(d,"rotate",(function(){return Pa})),r.d(d,"angle",(function(){return Ia})),r.d(d,"zero",(function(){return Oa})),r.d(d,"str",(function(){return Ua})),r.d(d,"exactEquals",(function(){return Ca})),r.d(d,"equals",(function(){return Da})),r.d(d,"len",(function(){return za})),r.d(d,"sub",(function(){return Ba})),r.d(d,"mul",(function(){return Va})),r.d(d,"div",(function(){return Na})),r.d(d,"dist",(function(){return qa})),r.d(d,"sqrDist",(function(){return Ga})),r.d(d,"sqrLen",(function(){return ja})),r.d(d,"forEach",(function(){return Ha}));var l=1e-6,h="undefined"!=typeof Float32Array?Float32Array:Array,m=Math.random;function p(e){h=e}var b=Math.PI/180;function g(e){return e*b}function v(e,t){return Math.abs(e-t)<=l*Math.max(1,Math.abs(e),Math.abs(t))}function w(){var e=new h(4);return h!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function y(e){var t=new h(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function M(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function E(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function A(e,t,r,n){var i=new h(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}function x(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function T(e,t){if(e===t){var r=t[1];e[1]=t[2],e[2]=r}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function R(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*a-i*n;return o?(o=1/o,e[0]=a*o,e[1]=-n*o,e[2]=-i*o,e[3]=r*o,e):null}function k(e,t){var r=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=r,e}function F(e){return e[0]*e[3]-e[2]*e[1]}function S(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1],c=r[2],f=r[3];return e[0]=n*s+a*u,e[1]=i*s+o*u,e[2]=n*c+a*f,e[3]=i*c+o*f,e}function L(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+a*s,e[1]=i*u+o*s,e[2]=n*-s+a*u,e[3]=i*-s+o*u,e}function P(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1];return e[0]=n*s,e[1]=i*s,e[2]=a*u,e[3]=o*u,e}function I(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=-r,e[3]=n,e}function O(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e}function U(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function C(e){return Math.hypot(e[0],e[1],e[2],e[3])}function D(e,t,r,n){return e[2]=n[2]/n[0],r[0]=n[0],r[1]=n[1],r[3]=n[3]-e[2]*r[1],[e,t,r]}function z(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function B(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function V(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function N(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],u=t[2],c=t[3];return Math.abs(r-o)<=l*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=l*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-u)<=l*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-c)<=l*Math.max(1,Math.abs(a),Math.abs(c))}function q(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function G(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var j=S,H=B;function X(){var e=new h(6);return h!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function W(e){var t=new h(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Z(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function K(e,t,r,n,i,a){var o=new h(6);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o[4]=i,o[5]=a,o}function $(e,t,r,n,i,a,o){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a,e[5]=o,e}function Q(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=r*a-n*i;return u?(u=1/u,e[0]=a*u,e[1]=-n*u,e[2]=-i*u,e[3]=r*u,e[4]=(i*s-a*o)*u,e[5]=(n*o-r*s)*u,e):null}function J(e){return e[0]*e[3]-e[1]*e[2]}function ee(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=r[0],f=r[1],_=r[2],d=r[3],l=r[4],h=r[5];return e[0]=n*c+a*f,e[1]=i*c+o*f,e[2]=n*_+a*d,e[3]=i*_+o*d,e[4]=n*l+a*h+s,e[5]=i*l+o*h+u,e}function te(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=Math.sin(r),f=Math.cos(r);return e[0]=n*f+a*c,e[1]=i*f+o*c,e[2]=n*-c+a*f,e[3]=i*-c+o*f,e[4]=s,e[5]=u,e}function re(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=r[0],f=r[1];return e[0]=n*c,e[1]=i*c,e[2]=a*f,e[3]=o*f,e[4]=s,e[5]=u,e}function ne(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=r[0],f=r[1];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=n*c+a*f+s,e[5]=i*c+o*f+u,e}function ie(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=-r,e[3]=n,e[4]=0,e[5]=0,e}function ae(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function oe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function se(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function ue(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],1)}function ce(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e}function fe(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e}function _e(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e}function de(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e}function le(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function he(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=t[0],c=t[1],f=t[2],_=t[3],d=t[4],h=t[5];return Math.abs(r-u)<=l*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-c)<=l*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-f)<=l*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(a-_)<=l*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(o-d)<=l*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(s-h)<=l*Math.max(1,Math.abs(s),Math.abs(h))}var me=ee,pe=fe;function be(){var e=new h(9);return h!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ge(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function ve(e){var t=new h(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function we(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function ye(e,t,r,n,i,a,o,s,u){var c=new h(9);return c[0]=e,c[1]=t,c[2]=r,c[3]=n,c[4]=i,c[5]=a,c[6]=o,c[7]=s,c[8]=u,c}function Me(e,t,r,n,i,a,o,s,u,c){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=u,e[8]=c,e}function Ee(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ae(e,t){if(e===t){var r=t[1],n=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=n,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function xe(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8],_=f*o-s*c,d=-f*a+s*u,l=c*a-o*u,h=r*_+n*d+i*l;return h?(h=1/h,e[0]=_*h,e[1]=(-f*n+i*c)*h,e[2]=(s*n-i*o)*h,e[3]=d*h,e[4]=(f*r-i*u)*h,e[5]=(-s*r+i*a)*h,e[6]=l*h,e[7]=(-c*r+n*u)*h,e[8]=(o*r-n*a)*h,e):null}function Te(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8];return e[0]=o*f-s*c,e[1]=i*c-n*f,e[2]=n*s-i*o,e[3]=s*u-a*f,e[4]=r*f-i*u,e[5]=i*a-r*s,e[6]=a*c-o*u,e[7]=n*u-r*c,e[8]=r*o-n*a,e}function Re(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],c=e[8];return t*(c*a-o*u)+r*(-c*i+o*s)+n*(u*i-a*s)}function ke(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],_=t[8],d=r[0],l=r[1],h=r[2],m=r[3],p=r[4],b=r[5],g=r[6],v=r[7],w=r[8];return e[0]=d*n+l*o+h*c,e[1]=d*i+l*s+h*f,e[2]=d*a+l*u+h*_,e[3]=m*n+p*o+b*c,e[4]=m*i+p*s+b*f,e[5]=m*a+p*u+b*_,e[6]=g*n+v*o+w*c,e[7]=g*i+v*s+w*f,e[8]=g*a+v*u+w*_,e}function Fe(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],_=t[8],d=r[0],l=r[1];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=d*n+l*o+c,e[7]=d*i+l*s+f,e[8]=d*a+l*u+_,e}function Se(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],_=t[8],d=Math.sin(r),l=Math.cos(r);return e[0]=l*n+d*o,e[1]=l*i+d*s,e[2]=l*a+d*u,e[3]=l*o-d*n,e[4]=l*s-d*i,e[5]=l*u-d*a,e[6]=c,e[7]=f,e[8]=_,e}function Le(e,t,r){var n=r[0],i=r[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Pe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function Ie(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Oe(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ue(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function Ce(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,c=r*o,f=n*o,_=n*s,d=i*o,l=i*s,h=i*u,m=a*o,p=a*s,b=a*u;return e[0]=1-_-h,e[3]=f-b,e[6]=d+p,e[1]=f+b,e[4]=1-c-h,e[7]=l-m,e[2]=d-p,e[5]=l+m,e[8]=1-c-_,e}function De(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8],_=t[9],d=t[10],l=t[11],h=t[12],m=t[13],p=t[14],b=t[15],g=r*s-n*o,v=r*u-i*o,w=r*c-a*o,y=n*u-i*s,M=n*c-a*s,E=i*c-a*u,A=f*m-_*h,x=f*p-d*h,T=f*b-l*h,R=_*p-d*m,k=_*b-l*m,F=d*b-l*p,S=g*F-v*k+w*R+y*T-M*x+E*A;return S?(S=1/S,e[0]=(s*F-u*k+c*R)*S,e[1]=(u*T-o*F-c*x)*S,e[2]=(o*k-s*T+c*A)*S,e[3]=(i*k-n*F-a*R)*S,e[4]=(r*F-i*T+a*x)*S,e[5]=(n*T-r*k-a*A)*S,e[6]=(m*E-p*M+b*y)*S,e[7]=(p*w-h*E-b*v)*S,e[8]=(h*M-m*w+b*g)*S,e):null}function ze(e,t,r){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/r,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function Be(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function Ve(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function Ne(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e}function qe(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e}function Ge(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e}function je(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e}function He(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function Xe(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],f=e[8],_=t[0],d=t[1],h=t[2],m=t[3],p=t[4],b=t[5],g=t[6],v=t[7],w=t[8];return Math.abs(r-_)<=l*Math.max(1,Math.abs(r),Math.abs(_))&&Math.abs(n-d)<=l*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-h)<=l*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(a-m)<=l*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(o-p)<=l*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(s-b)<=l*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(u-g)<=l*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(c-v)<=l*Math.max(1,Math.abs(c),Math.abs(v))&&Math.abs(f-w)<=l*Math.max(1,Math.abs(f),Math.abs(w))}var We=ke,Ye=qe;function Ze(){var e=new h(16);return h!=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 Ke(e){var t=new h(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function $e(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Qe(e,t,r,n,i,a,o,s,u,c,f,_,d,l,m,p){var b=new h(16);return b[0]=e,b[1]=t,b[2]=r,b[3]=n,b[4]=i,b[5]=a,b[6]=o,b[7]=s,b[8]=u,b[9]=c,b[10]=f,b[11]=_,b[12]=d,b[13]=l,b[14]=m,b[15]=p,b}function Je(e,t,r,n,i,a,o,s,u,c,f,_,d,l,h,m,p){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=u,e[8]=c,e[9]=f,e[10]=_,e[11]=d,e[12]=l,e[13]=h,e[14]=m,e[15]=p,e}function et(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}function tt(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function rt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8],_=t[9],d=t[10],l=t[11],h=t[12],m=t[13],p=t[14],b=t[15],g=r*s-n*o,v=r*u-i*o,w=r*c-a*o,y=n*u-i*s,M=n*c-a*s,E=i*c-a*u,A=f*m-_*h,x=f*p-d*h,T=f*b-l*h,R=_*p-d*m,k=_*b-l*m,F=d*b-l*p,S=g*F-v*k+w*R+y*T-M*x+E*A;return S?(S=1/S,e[0]=(s*F-u*k+c*R)*S,e[1]=(i*k-n*F-a*R)*S,e[2]=(m*E-p*M+b*y)*S,e[3]=(d*M-_*E-l*y)*S,e[4]=(u*T-o*F-c*x)*S,e[5]=(r*F-i*T+a*x)*S,e[6]=(p*w-h*E-b*v)*S,e[7]=(f*E-d*w+l*v)*S,e[8]=(o*k-s*T+c*A)*S,e[9]=(n*T-r*k-a*A)*S,e[10]=(h*M-m*w+b*g)*S,e[11]=(_*w-f*M-l*g)*S,e[12]=(s*x-o*R-u*A)*S,e[13]=(r*R-n*x+i*A)*S,e[14]=(m*v-h*y-p*g)*S,e[15]=(f*y-_*v+d*g)*S,e):null}function nt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8],_=t[9],d=t[10],l=t[11],h=t[12],m=t[13],p=t[14],b=t[15];return e[0]=s*(d*b-l*p)-_*(u*b-c*p)+m*(u*l-c*d),e[1]=-(n*(d*b-l*p)-_*(i*b-a*p)+m*(i*l-a*d)),e[2]=n*(u*b-c*p)-s*(i*b-a*p)+m*(i*c-a*u),e[3]=-(n*(u*l-c*d)-s*(i*l-a*d)+_*(i*c-a*u)),e[4]=-(o*(d*b-l*p)-f*(u*b-c*p)+h*(u*l-c*d)),e[5]=r*(d*b-l*p)-f*(i*b-a*p)+h*(i*l-a*d),e[6]=-(r*(u*b-c*p)-o*(i*b-a*p)+h*(i*c-a*u)),e[7]=r*(u*l-c*d)-o*(i*l-a*d)+f*(i*c-a*u),e[8]=o*(_*b-l*m)-f*(s*b-c*m)+h*(s*l-c*_),e[9]=-(r*(_*b-l*m)-f*(n*b-a*m)+h*(n*l-a*_)),e[10]=r*(s*b-c*m)-o*(n*b-a*m)+h*(n*c-a*s),e[11]=-(r*(s*l-c*_)-o*(n*l-a*_)+f*(n*c-a*s)),e[12]=-(o*(_*p-d*m)-f*(s*p-u*m)+h*(s*d-u*_)),e[13]=r*(_*p-d*m)-f*(n*p-i*m)+h*(n*d-i*_),e[14]=-(r*(s*p-u*m)-o*(n*p-i*m)+h*(n*u-i*s)),e[15]=r*(s*d-u*_)-o*(n*d-i*_)+f*(n*u-i*s),e}function it(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],c=e[8],f=e[9],_=e[10],d=e[11],l=e[12],h=e[13],m=e[14],p=e[15];return(t*o-r*a)*(_*p-d*m)-(t*s-n*a)*(f*p-d*h)+(t*u-i*a)*(f*m-_*h)+(r*s-n*o)*(c*p-d*l)-(r*u-i*o)*(c*m-_*l)+(n*u-i*s)*(c*h-f*l)}function at(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],_=t[8],d=t[9],l=t[10],h=t[11],m=t[12],p=t[13],b=t[14],g=t[15],v=r[0],w=r[1],y=r[2],M=r[3];return e[0]=v*n+w*s+y*_+M*m,e[1]=v*i+w*u+y*d+M*p,e[2]=v*a+w*c+y*l+M*b,e[3]=v*o+w*f+y*h+M*g,v=r[4],w=r[5],y=r[6],M=r[7],e[4]=v*n+w*s+y*_+M*m,e[5]=v*i+w*u+y*d+M*p,e[6]=v*a+w*c+y*l+M*b,e[7]=v*o+w*f+y*h+M*g,v=r[8],w=r[9],y=r[10],M=r[11],e[8]=v*n+w*s+y*_+M*m,e[9]=v*i+w*u+y*d+M*p,e[10]=v*a+w*c+y*l+M*b,e[11]=v*o+w*f+y*h+M*g,v=r[12],w=r[13],y=r[14],M=r[15],e[12]=v*n+w*s+y*_+M*m,e[13]=v*i+w*u+y*d+M*p,e[14]=v*a+w*c+y*l+M*b,e[15]=v*o+w*f+y*h+M*g,e}function ot(e,t,r){var n,i,a,o,s,u,c,f,_,d,l,h,m=r[0],p=r[1],b=r[2];return t===e?(e[12]=t[0]*m+t[4]*p+t[8]*b+t[12],e[13]=t[1]*m+t[5]*p+t[9]*b+t[13],e[14]=t[2]*m+t[6]*p+t[10]*b+t[14],e[15]=t[3]*m+t[7]*p+t[11]*b+t[15]):(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],_=t[8],d=t[9],l=t[10],h=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=c,e[7]=f,e[8]=_,e[9]=d,e[10]=l,e[11]=h,e[12]=n*m+s*p+_*b+t[12],e[13]=i*m+u*p+d*b+t[13],e[14]=a*m+c*p+l*b+t[14],e[15]=o*m+f*p+h*b+t[15]),e}function st(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function ut(e,t,r,n){var i,a,o,s,u,c,f,_,d,h,m,p,b,g,v,w,y,M,E,A,x,T,R,k,F=n[0],S=n[1],L=n[2],P=Math.hypot(F,S,L);return P<l?null:(F*=P=1/P,S*=P,L*=P,i=Math.sin(r),o=1-(a=Math.cos(r)),s=t[0],u=t[1],c=t[2],f=t[3],_=t[4],d=t[5],h=t[6],m=t[7],p=t[8],b=t[9],g=t[10],v=t[11],w=F*F*o+a,y=S*F*o+L*i,M=L*F*o-S*i,E=F*S*o-L*i,A=S*S*o+a,x=L*S*o+F*i,T=F*L*o+S*i,R=S*L*o-F*i,k=L*L*o+a,e[0]=s*w+_*y+p*M,e[1]=u*w+d*y+b*M,e[2]=c*w+h*y+g*M,e[3]=f*w+m*y+v*M,e[4]=s*E+_*A+p*x,e[5]=u*E+d*A+b*x,e[6]=c*E+h*A+g*x,e[7]=f*E+m*A+v*x,e[8]=s*T+_*R+p*k,e[9]=u*T+d*R+b*k,e[10]=c*T+h*R+g*k,e[11]=f*T+m*R+v*k,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function ct(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],u=t[7],c=t[8],f=t[9],_=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+c*n,e[5]=o*i+f*n,e[6]=s*i+_*n,e[7]=u*i+d*n,e[8]=c*i-a*n,e[9]=f*i-o*n,e[10]=_*i-s*n,e[11]=d*i-u*n,e}function ft(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],c=t[8],f=t[9],_=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-c*n,e[1]=o*i-f*n,e[2]=s*i-_*n,e[3]=u*i-d*n,e[8]=a*n+c*i,e[9]=o*n+f*i,e[10]=s*n+_*i,e[11]=u*n+d*i,e}function _t(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],c=t[4],f=t[5],_=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+c*n,e[1]=o*i+f*n,e[2]=s*i+_*n,e[3]=u*i+d*n,e[4]=c*i-a*n,e[5]=f*i-o*n,e[6]=_*i-s*n,e[7]=d*i-u*n,e}function dt(e,t){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]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function lt(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ht(e,t,r){var n,i,a,o=r[0],s=r[1],u=r[2],c=Math.hypot(o,s,u);return c<l?null:(o*=c=1/c,s*=c,u*=c,n=Math.sin(t),a=1-(i=Math.cos(t)),e[0]=o*o*a+i,e[1]=s*o*a+u*n,e[2]=u*o*a-s*n,e[3]=0,e[4]=o*s*a-u*n,e[5]=s*s*a+i,e[6]=u*s*a+o*n,e[7]=0,e[8]=o*u*a+s*n,e[9]=s*u*a-o*n,e[10]=u*u*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function mt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function pt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function bt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,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}function gt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,u=i+i,c=a+a,f=n*s,_=n*u,d=n*c,l=i*u,h=i*c,m=a*c,p=o*s,b=o*u,g=o*c;return e[0]=1-(l+m),e[1]=_+g,e[2]=d-b,e[3]=0,e[4]=_-g,e[5]=1-(f+m),e[6]=h+p,e[7]=0,e[8]=d+b,e[9]=h-p,e[10]=1-(f+l),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function vt(e,t){var r=new h(3),n=-t[0],i=-t[1],a=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],_=n*n+i*i+a*a+o*o;return _>0?(r[0]=2*(s*o+f*n+u*a-c*i)/_,r[1]=2*(u*o+f*i+c*n-s*a)/_,r[2]=2*(c*o+f*a+s*i-u*n)/_):(r[0]=2*(s*o+f*n+u*a-c*i),r[1]=2*(u*o+f*i+c*n-s*a),r[2]=2*(c*o+f*a+s*i-u*n)),gt(e,t,r),e}function wt(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function yt(e,t){var r=t[0],n=t[1],i=t[2],a=t[4],o=t[5],s=t[6],u=t[8],c=t[9],f=t[10];return e[0]=Math.hypot(r,n,i),e[1]=Math.hypot(a,o,s),e[2]=Math.hypot(u,c,f),e}function Mt(e,t){var r=new h(3);yt(r,t);var n=1/r[0],i=1/r[1],a=1/r[2],o=t[0]*n,s=t[1]*i,u=t[2]*a,c=t[4]*n,f=t[5]*i,_=t[6]*a,d=t[8]*n,l=t[9]*i,m=t[10]*a,p=o+f+m,b=0;return p>0?(b=2*Math.sqrt(p+1),e[3]=.25*b,e[0]=(_-l)/b,e[1]=(d-u)/b,e[2]=(s-c)/b):o>f&&o>m?(b=2*Math.sqrt(1+o-f-m),e[3]=(_-l)/b,e[0]=.25*b,e[1]=(s+c)/b,e[2]=(d+u)/b):f>m?(b=2*Math.sqrt(1+f-o-m),e[3]=(d-u)/b,e[0]=(s+c)/b,e[1]=.25*b,e[2]=(_+l)/b):(b=2*Math.sqrt(1+m-o-f),e[3]=(s-c)/b,e[0]=(d+u)/b,e[1]=(_+l)/b,e[2]=.25*b),e}function Et(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=t[3],u=i+i,c=a+a,f=o+o,_=i*u,d=i*c,l=i*f,h=a*c,m=a*f,p=o*f,b=s*u,g=s*c,v=s*f,w=n[0],y=n[1],M=n[2];return e[0]=(1-(h+p))*w,e[1]=(d+v)*w,e[2]=(l-g)*w,e[3]=0,e[4]=(d-v)*y,e[5]=(1-(_+p))*y,e[6]=(m+b)*y,e[7]=0,e[8]=(l+g)*M,e[9]=(m-b)*M,e[10]=(1-(_+h))*M,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function At(e,t,r,n,i){var a=t[0],o=t[1],s=t[2],u=t[3],c=a+a,f=o+o,_=s+s,d=a*c,l=a*f,h=a*_,m=o*f,p=o*_,b=s*_,g=u*c,v=u*f,w=u*_,y=n[0],M=n[1],E=n[2],A=i[0],x=i[1],T=i[2],R=(1-(m+b))*y,k=(l+w)*y,F=(h-v)*y,S=(l-w)*M,L=(1-(d+b))*M,P=(p+g)*M,I=(h+v)*E,O=(p-g)*E,U=(1-(d+m))*E;return e[0]=R,e[1]=k,e[2]=F,e[3]=0,e[4]=S,e[5]=L,e[6]=P,e[7]=0,e[8]=I,e[9]=O,e[10]=U,e[11]=0,e[12]=r[0]+A-(R*A+S*x+I*T),e[13]=r[1]+x-(k*A+L*x+O*T),e[14]=r[2]+T-(F*A+P*x+U*T),e[15]=1,e}function xt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,c=r*o,f=n*o,_=n*s,d=i*o,l=i*s,h=i*u,m=a*o,p=a*s,b=a*u;return e[0]=1-_-h,e[1]=f+b,e[2]=d-p,e[3]=0,e[4]=f-b,e[5]=1-c-h,e[6]=l+m,e[7]=0,e[8]=d+p,e[9]=l-m,e[10]=1-c-_,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Tt(e,t,r,n,i,a,o){var s=1/(r-t),u=1/(i-n),c=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*u,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*u,e[10]=(o+a)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*c,e[15]=0,e}function Rt(e,t,r,n,i){var a,o=1/Math.tan(t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(a=1/(n-i),e[10]=(i+n)*a,e[14]=2*i*n*a):(e[10]=-1,e[14]=-2*n),e}function kt(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),u=2/(o+s),c=2/(i+a);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-s)*u*.5,e[9]=(i-a)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}function Ft(e,t,r,n,i,a,o){var s=1/(t-r),u=1/(n-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*u,e[14]=(o+a)*c,e[15]=1,e}function St(e,t,r,n){var i,a,o,s,u,c,f,_,d,h,m=t[0],p=t[1],b=t[2],g=n[0],v=n[1],w=n[2],y=r[0],M=r[1],E=r[2];return Math.abs(m-y)<l&&Math.abs(p-M)<l&&Math.abs(b-E)<l?et(e):(f=m-y,_=p-M,d=b-E,i=v*(d*=h=1/Math.hypot(f,_,d))-w*(_*=h),a=w*(f*=h)-g*d,o=g*_-v*f,(h=Math.hypot(i,a,o))?(i*=h=1/h,a*=h,o*=h):(i=0,a=0,o=0),s=_*o-d*a,u=d*i-f*o,c=f*a-_*i,(h=Math.hypot(s,u,c))?(s*=h=1/h,u*=h,c*=h):(s=0,u=0,c=0),e[0]=i,e[1]=s,e[2]=f,e[3]=0,e[4]=a,e[5]=u,e[6]=_,e[7]=0,e[8]=o,e[9]=c,e[10]=d,e[11]=0,e[12]=-(i*m+a*p+o*b),e[13]=-(s*m+u*p+c*b),e[14]=-(f*m+_*p+d*b),e[15]=1,e)}function Lt(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=n[0],u=n[1],c=n[2],f=i-r[0],_=a-r[1],d=o-r[2],l=f*f+_*_+d*d;l>0&&(f*=l=1/Math.sqrt(l),_*=l,d*=l);var h=u*d-c*_,m=c*f-s*d,p=s*_-u*f;return(l=h*h+m*m+p*p)>0&&(h*=l=1/Math.sqrt(l),m*=l,p*=l),e[0]=h,e[1]=m,e[2]=p,e[3]=0,e[4]=_*p-d*m,e[5]=d*h-f*p,e[6]=f*m-_*h,e[7]=0,e[8]=f,e[9]=_,e[10]=d,e[11]=0,e[12]=i,e[13]=a,e[14]=o,e[15]=1,e}function Pt(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function It(e){return Math.hypot(e[0],e[1],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function Ot(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e}function Ut(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function Ct(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e}function Dt(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e}function zt(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function Bt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],f=e[8],_=e[9],d=e[10],h=e[11],m=e[12],p=e[13],b=e[14],g=e[15],v=t[0],w=t[1],y=t[2],M=t[3],E=t[4],A=t[5],x=t[6],T=t[7],R=t[8],k=t[9],F=t[10],S=t[11],L=t[12],P=t[13],I=t[14],O=t[15];return Math.abs(r-v)<=l*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(n-w)<=l*Math.max(1,Math.abs(n),Math.abs(w))&&Math.abs(i-y)<=l*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(a-M)<=l*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(o-E)<=l*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(s-A)<=l*Math.max(1,Math.abs(s),Math.abs(A))&&Math.abs(u-x)<=l*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(c-T)<=l*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(f-R)<=l*Math.max(1,Math.abs(f),Math.abs(R))&&Math.abs(_-k)<=l*Math.max(1,Math.abs(_),Math.abs(k))&&Math.abs(d-F)<=l*Math.max(1,Math.abs(d),Math.abs(F))&&Math.abs(h-S)<=l*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(m-L)<=l*Math.max(1,Math.abs(m),Math.abs(L))&&Math.abs(p-P)<=l*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(b-I)<=l*Math.max(1,Math.abs(b),Math.abs(I))&&Math.abs(g-O)<=l*Math.max(1,Math.abs(g),Math.abs(O))}var Vt=at,Nt=Ut;function qt(){var e=new h(3);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Gt(e){var t=new h(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function jt(e){var t=e[0],r=e[1],n=e[2];return Math.hypot(t,r,n)}function Ht(e,t,r){var n=new h(3);return n[0]=e,n[1]=t,n[2]=r,n}function Xt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Wt(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function Yt(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function Zt(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function Kt(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function $t(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function Qt(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function Jt(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function er(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function tr(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function rr(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function nr(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function ir(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function ar(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.hypot(r,n,i)}function or(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function sr(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function ur(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function cr(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function fr(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function _r(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function dr(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2];return e[0]=i*u-a*s,e[1]=a*o-n*u,e[2]=n*s-i*o,e}function lr(e,t,r,n){var i=t[0],a=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e}function hr(e,t,r,n,i,a){var o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,c=o*(a-1),f=o*(3-2*a);return e[0]=t[0]*s+r[0]*u+n[0]*c+i[0]*f,e[1]=t[1]*s+r[1]*u+n[1]*c+i[1]*f,e[2]=t[2]*s+r[2]*u+n[2]*c+i[2]*f,e}function mr(e,t,r,n,i,a){var o=1-a,s=o*o,u=a*a,c=s*o,f=3*a*s,_=3*u*o,d=u*a;return e[0]=t[0]*c+r[0]*f+n[0]*_+i[0]*d,e[1]=t[1]*c+r[1]*f+n[1]*_+i[1]*d,e[2]=t[2]*c+r[2]*f+n[2]*_+i[2]*d,e}function pr(e,t){t=t||1;var r=2*m()*Math.PI,n=2*m()-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e}function br(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,e}function gr(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e}function vr(e,t,r){var n=r[0],i=r[1],a=r[2],o=r[3],s=t[0],u=t[1],c=t[2],f=i*c-a*u,_=a*s-n*c,d=n*u-i*s,l=i*d-a*_,h=a*f-n*d,m=n*_-i*f,p=2*o;return f*=p,_*=p,d*=p,l*=2,h*=2,m*=2,e[0]=s+f+l,e[1]=u+_+h,e[2]=c+d+m,e}function wr(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function yr(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function Mr(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function Er(e,t){var r=Ht(e[0],e[1],e[2]),n=Ht(t[0],t[1],t[2]);fr(r,r),fr(n,n);var i=_r(r,n);return i>1?0:i<-1?Math.PI:Math.acos(i)}function Ar(e){return e[0]=0,e[1]=0,e[2]=0,e}function xr(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function Tr(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Rr(e,t){var r=e[0],n=e[1],i=e[2],a=t[0],o=t[1],s=t[2];return Math.abs(r-a)<=l*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-o)<=l*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=l*Math.max(1,Math.abs(i),Math.abs(s))}var kr,Fr=Zt,Sr=Kt,Lr=$t,Pr=ar,Ir=or,Or=jt,Ur=sr,Cr=(kr=qt(),function(e,t,r,n,i,a){var o,s;for(t||(t=3),r||(r=0),s=n?Math.min(n*t+r,e.length):e.length,o=r;o<s;o+=t)kr[0]=e[o],kr[1]=e[o+1],kr[2]=e[o+2],i(kr,kr,a),e[o]=kr[0],e[o+1]=kr[1],e[o+2]=kr[2];return e});function Dr(){var e=new h(4);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function zr(e){var t=new h(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Br(e,t,r,n){var i=new h(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}function Vr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Nr(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function qr(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function Gr(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function jr(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function Hr(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function Xr(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function Wr(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function Yr(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function Zr(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function Kr(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function $r(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function Qr(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}function Jr(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.hypot(r,n,i,a)}function en(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+i*i+a*a}function tn(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.hypot(t,r,n,i)}function rn(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}function nn(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function an(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function on(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),e[0]=r*o,e[1]=n*o,e[2]=i*o,e[3]=a*o,e}function sn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function un(e,t,r,n){var i=r[0]*n[1]-r[1]*n[0],a=r[0]*n[2]-r[2]*n[0],o=r[0]*n[3]-r[3]*n[0],s=r[1]*n[2]-r[2]*n[1],u=r[1]*n[3]-r[3]*n[1],c=r[2]*n[3]-r[3]*n[2],f=t[0],_=t[1],d=t[2],l=t[3];return e[0]=_*c-d*u+l*s,e[1]=-f*c+d*o-l*a,e[2]=f*u-_*o+l*i,e[3]=-f*s+_*a-d*i,e}function cn(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e[3]=s+n*(r[3]-s),e}function fn(e,t){var r,n,i,a,o,s;t=t||1;do{o=(r=2*m()-1)*r+(n=2*m()-1)*n}while(o>=1);do{s=(i=2*m()-1)*i+(a=2*m()-1)*a}while(s>=1);var u=Math.sqrt((1-o)/s);return e[0]=t*r,e[1]=t*n,e[2]=t*i*u,e[3]=t*a*u,e}function _n(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e}function dn(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2],c=r[3],f=c*n+s*a-u*i,_=c*i+u*n-o*a,d=c*a+o*i-s*n,l=-o*n-s*i-u*a;return e[0]=f*c+l*-o+_*-u-d*-s,e[1]=_*c+l*-s+d*-o-f*-u,e[2]=d*c+l*-u+f*-s-_*-o,e[3]=t[3],e}function ln(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function hn(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function mn(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function pn(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],u=t[2],c=t[3];return Math.abs(r-o)<=l*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=l*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-u)<=l*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-c)<=l*Math.max(1,Math.abs(a),Math.abs(c))}var bn=Gr,gn=jr,vn=Hr,wn=Jr,yn=en,Mn=tn,En=rn,An=function(){var e=Dr();return function(t,r,n,i,a,o){var s,u;for(r||(r=4),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;s<u;s+=r)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}}();function xn(){var e=new h(4);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Tn(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function Rn(e,t,r){r*=.5;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e}function kn(e,t){var r=2*Math.acos(t[3]),n=Math.sin(r/2);return n>l?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r}function Fn(e,t){var r=ii(e,t);return Math.acos(2*r*r-1)}function Sn(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1],c=r[2],f=r[3];return e[0]=n*f+o*s+i*c-a*u,e[1]=i*f+o*u+a*s-n*c,e[2]=a*f+o*c+n*u-i*s,e[3]=o*f-n*s-i*u-a*c,e}function Ln(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+o*s,e[1]=i*u+a*s,e[2]=a*u-i*s,e[3]=o*u-n*s,e}function Pn(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u-a*s,e[1]=i*u+o*s,e[2]=a*u+n*s,e[3]=o*u-i*s,e}function In(e,t,r){r*=.5;var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+i*s,e[1]=i*u-n*s,e[2]=a*u+o*s,e[3]=o*u-a*s,e}function On(e,t){var r=t[0],n=t[1],i=t[2];return e[0]=r,e[1]=n,e[2]=i,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i)),e}function Un(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=Math.sqrt(r*r+n*n+i*i),s=Math.exp(a),u=o>0?s*Math.sin(o)/o:0;return e[0]=r*u,e[1]=n*u,e[2]=i*u,e[3]=s*Math.cos(o),e}function Cn(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=Math.sqrt(r*r+n*n+i*i),s=o>0?Math.atan2(o,a)/o:0;return e[0]=r*s,e[1]=n*s,e[2]=i*s,e[3]=.5*Math.log(r*r+n*n+i*i+a*a),e}function Dn(e,t,r){return Cn(e,t),ni(e,e,r),Un(e,e),e}function zn(e,t,r,n){var i,a,o,s,u,c=t[0],f=t[1],_=t[2],d=t[3],h=r[0],m=r[1],p=r[2],b=r[3];return(a=c*h+f*m+_*p+d*b)<0&&(a=-a,h=-h,m=-m,p=-p,b=-b),1-a>l?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,u=Math.sin(n*i)/o):(s=1-n,u=n),e[0]=s*c+u*h,e[1]=s*f+u*m,e[2]=s*_+u*p,e[3]=s*d+u*b,e}function Bn(e){var t=m(),r=m(),n=m(),i=Math.sqrt(1-t),a=Math.sqrt(t);return e[0]=i*Math.sin(2*Math.PI*r),e[1]=i*Math.cos(2*Math.PI*r),e[2]=a*Math.sin(2*Math.PI*n),e[3]=a*Math.cos(2*Math.PI*n),e}function Vn(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a,s=o?1/o:0;return e[0]=-r*s,e[1]=-n*s,e[2]=-i*s,e[3]=a*s,e}function Nn(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function qn(e,t){var r,n=t[0]+t[4]+t[8];if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(t[3*i+i]-t[3*a+a]-t[3*o+o]+1),e[i]=.5*r,r=.5/r,e[3]=(t[3*a+o]-t[3*o+a])*r,e[a]=(t[3*a+i]+t[3*i+a])*r,e[o]=(t[3*o+i]+t[3*i+o])*r}return e}function Gn(e,t,r,n){var i=.5*Math.PI/180;t*=i,r*=i,n*=i;var a=Math.sin(t),o=Math.cos(t),s=Math.sin(r),u=Math.cos(r),c=Math.sin(n),f=Math.cos(n);return e[0]=a*u*f-o*s*c,e[1]=o*s*f+a*u*c,e[2]=o*u*c-a*s*f,e[3]=o*u*f+a*s*c,e}function jn(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var Hn,Xn,Wn,Yn,Zn,Kn,$n=zr,Qn=Br,Jn=Vr,ei=Nr,ti=qr,ri=Sn,ni=$r,ii=sn,ai=cn,oi=tn,si=oi,ui=rn,ci=ui,fi=on,_i=mn,di=pn,li=(Hn=qt(),Xn=Ht(1,0,0),Wn=Ht(0,1,0),function(e,t,r){var n=_r(t,r);return n<-.999999?(dr(Hn,Xn,t),Or(Hn)<1e-6&&dr(Hn,Wn,t),fr(Hn,Hn),Rn(e,Hn,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(dr(Hn,t,r),e[0]=Hn[0],e[1]=Hn[1],e[2]=Hn[2],e[3]=1+n,fi(e,e))}),hi=(Yn=xn(),Zn=xn(),function(e,t,r,n,i,a){return zn(Yn,t,i,a),zn(Zn,r,n,a),zn(e,Yn,Zn,2*a*(1-a)),e}),mi=(Kn=be(),function(e,t,r,n){return Kn[0]=r[0],Kn[3]=r[1],Kn[6]=r[2],Kn[1]=n[0],Kn[4]=n[1],Kn[7]=n[2],Kn[2]=-t[0],Kn[5]=-t[1],Kn[8]=-t[2],fi(e,qn(e,Kn))});function pi(){var e=new h(8);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0),e[3]=1,e}function bi(e){var t=new h(8);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function gi(e,t,r,n,i,a,o,s){var u=new h(8);return u[0]=e,u[1]=t,u[2]=r,u[3]=n,u[4]=i,u[5]=a,u[6]=o,u[7]=s,u}function vi(e,t,r,n,i,a,o){var s=new h(8);s[0]=e,s[1]=t,s[2]=r,s[3]=n;var u=.5*i,c=.5*a,f=.5*o;return s[4]=u*n+c*r-f*t,s[5]=c*n+f*e-u*r,s[6]=f*n+u*t-c*e,s[7]=-u*e-c*t-f*r,s}function wi(e,t,r){var n=.5*r[0],i=.5*r[1],a=.5*r[2],o=t[0],s=t[1],u=t[2],c=t[3];return e[0]=o,e[1]=s,e[2]=u,e[3]=c,e[4]=n*c+i*u-a*s,e[5]=i*c+a*o-n*u,e[6]=a*c+n*s-i*o,e[7]=-n*o-i*s-a*u,e}function yi(e,t){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=.5*t[0],e[5]=.5*t[1],e[6]=.5*t[2],e[7]=0,e}function Mi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function Ei(e,t){var r=xn();Mt(r,t);var n=new h(3);return wt(n,t),wi(e,r,n),e}function Ai(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function xi(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function Ti(e,t,r,n,i,a,o,s,u){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=u,e}var Ri=Jn;function ki(e,t){return e[0]=t[4],e[1]=t[5],e[2]=t[6],e[3]=t[7],e}var Fi=Jn;function Si(e,t){return e[4]=t[0],e[5]=t[1],e[6]=t[2],e[7]=t[3],e}function Li(e,t){var r=t[4],n=t[5],i=t[6],a=t[7],o=-t[0],s=-t[1],u=-t[2],c=t[3];return e[0]=2*(r*c+a*o+n*u-i*s),e[1]=2*(n*c+a*s+i*o-r*u),e[2]=2*(i*c+a*u+r*s-n*o),e}function Pi(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=.5*r[0],u=.5*r[1],c=.5*r[2],f=t[4],_=t[5],d=t[6],l=t[7];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=o*s+i*c-a*u+f,e[5]=o*u+a*s-n*c+_,e[6]=o*c+n*u-i*s+d,e[7]=-n*s-i*u-a*c+l,e}function Ii(e,t,r){var n=-t[0],i=-t[1],a=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],_=s*o+f*n+u*a-c*i,d=u*o+f*i+c*n-s*a,l=c*o+f*a+s*i-u*n,h=f*o-s*n-u*i-c*a;return Ln(e,t,r),n=e[0],i=e[1],a=e[2],o=e[3],e[4]=_*o+h*n+d*a-l*i,e[5]=d*o+h*i+l*n-_*a,e[6]=l*o+h*a+_*i-d*n,e[7]=h*o-_*n-d*i-l*a,e}function Oi(e,t,r){var n=-t[0],i=-t[1],a=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],_=s*o+f*n+u*a-c*i,d=u*o+f*i+c*n-s*a,l=c*o+f*a+s*i-u*n,h=f*o-s*n-u*i-c*a;return Pn(e,t,r),n=e[0],i=e[1],a=e[2],o=e[3],e[4]=_*o+h*n+d*a-l*i,e[5]=d*o+h*i+l*n-_*a,e[6]=l*o+h*a+_*i-d*n,e[7]=h*o-_*n-d*i-l*a,e}function Ui(e,t,r){var n=-t[0],i=-t[1],a=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],f=t[7],_=s*o+f*n+u*a-c*i,d=u*o+f*i+c*n-s*a,l=c*o+f*a+s*i-u*n,h=f*o-s*n-u*i-c*a;return In(e,t,r),n=e[0],i=e[1],a=e[2],o=e[3],e[4]=_*o+h*n+d*a-l*i,e[5]=d*o+h*i+l*n-_*a,e[6]=l*o+h*a+_*i-d*n,e[7]=h*o-_*n-d*i-l*a,e}function Ci(e,t,r){var n=r[0],i=r[1],a=r[2],o=r[3],s=t[0],u=t[1],c=t[2],f=t[3];return e[0]=s*o+f*n+u*a-c*i,e[1]=u*o+f*i+c*n-s*a,e[2]=c*o+f*a+s*i-u*n,e[3]=f*o-s*n-u*i-c*a,s=t[4],u=t[5],c=t[6],f=t[7],e[4]=s*o+f*n+u*a-c*i,e[5]=u*o+f*i+c*n-s*a,e[6]=c*o+f*a+s*i-u*n,e[7]=f*o-s*n-u*i-c*a,e}function Di(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],u=r[1],c=r[2],f=r[3];return e[0]=n*f+o*s+i*c-a*u,e[1]=i*f+o*u+a*s-n*c,e[2]=a*f+o*c+n*u-i*s,e[3]=o*f-n*s-i*u-a*c,s=r[4],u=r[5],c=r[6],f=r[7],e[4]=n*f+o*s+i*c-a*u,e[5]=i*f+o*u+a*s-n*c,e[6]=a*f+o*c+n*u-i*s,e[7]=o*f-n*s-i*u-a*c,e}function zi(e,t,r,n){if(Math.abs(n)<l)return Ai(e,t);var i=Math.hypot(r[0],r[1],r[2]);n*=.5;var a=Math.sin(n),o=a*r[0]/i,s=a*r[1]/i,u=a*r[2]/i,c=Math.cos(n),f=t[0],_=t[1],d=t[2],h=t[3];e[0]=f*c+h*o+_*u-d*s,e[1]=_*c+h*s+d*o-f*u,e[2]=d*c+h*u+f*s-_*o,e[3]=h*c-f*o-_*s-d*u;var m=t[4],p=t[5],b=t[6],g=t[7];return e[4]=m*c+g*o+p*u-b*s,e[5]=p*c+g*s+b*o-m*u,e[6]=b*c+g*u+m*s-p*o,e[7]=g*c-m*o-p*s-b*u,e}function Bi(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e}function Vi(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[4],u=r[5],c=r[6],f=r[7],_=t[4],d=t[5],l=t[6],h=t[7],m=r[0],p=r[1],b=r[2],g=r[3];return e[0]=n*g+o*m+i*b-a*p,e[1]=i*g+o*p+a*m-n*b,e[2]=a*g+o*b+n*p-i*m,e[3]=o*g-n*m-i*p-a*b,e[4]=n*f+o*s+i*c-a*u+_*g+h*m+d*b-l*p,e[5]=i*f+o*u+a*s-n*c+d*g+h*p+l*m-_*b,e[6]=a*f+o*c+n*u-i*s+l*g+h*b+_*p-d*m,e[7]=o*f-n*s-i*u-a*c+h*g-_*m-d*p-l*b,e}var Ni=Vi;function qi(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e}var Gi=ii;function ji(e,t,r,n){var i=1-n;return Gi(t,r)<0&&(n=-n),e[0]=t[0]*i+r[0]*n,e[1]=t[1]*i+r[1]*n,e[2]=t[2]*i+r[2]*n,e[3]=t[3]*i+r[3]*n,e[4]=t[4]*i+r[4]*n,e[5]=t[5]*i+r[5]*n,e[6]=t[6]*i+r[6]*n,e[7]=t[7]*i+r[7]*n,e}function Hi(e,t){var r=Zi(t);return e[0]=-t[0]/r,e[1]=-t[1]/r,e[2]=-t[2]/r,e[3]=t[3]/r,e[4]=-t[4]/r,e[5]=-t[5]/r,e[6]=-t[6]/r,e[7]=t[7]/r,e}function Xi(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=t[7],e}var Wi=oi,Yi=Wi,Zi=ui,Ki=Zi;function $i(e,t){var r=Zi(t);if(r>0){r=Math.sqrt(r);var n=t[0]/r,i=t[1]/r,a=t[2]/r,o=t[3]/r,s=t[4],u=t[5],c=t[6],f=t[7],_=n*s+i*u+a*c+o*f;e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=(s-n*_)/r,e[5]=(u-i*_)/r,e[6]=(c-a*_)/r,e[7]=(f-o*_)/r}return e}function Qi(e){return"quat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+")"}function Ji(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]}function ea(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],f=t[0],_=t[1],d=t[2],h=t[3],m=t[4],p=t[5],b=t[6],g=t[7];return Math.abs(r-f)<=l*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(n-_)<=l*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(i-d)<=l*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(a-h)<=l*Math.max(1,Math.abs(a),Math.abs(h))&&Math.abs(o-m)<=l*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(s-p)<=l*Math.max(1,Math.abs(s),Math.abs(p))&&Math.abs(u-b)<=l*Math.max(1,Math.abs(u),Math.abs(b))&&Math.abs(c-g)<=l*Math.max(1,Math.abs(c),Math.abs(g))}function ta(){var e=new h(2);return h!=Float32Array&&(e[0]=0,e[1]=0),e}function ra(e){var t=new h(2);return t[0]=e[0],t[1]=e[1],t}function na(e,t){var r=new h(2);return r[0]=e,r[1]=t,r}function ia(e,t){return e[0]=t[0],e[1]=t[1],e}function aa(e,t,r){return e[0]=t,e[1]=r,e}function oa(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function sa(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function ua(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function ca(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function fa(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function _a(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function da(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function la(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function ha(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function ma(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function pa(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e}function ba(e,t){var r=t[0]-e[0],n=t[1]-e[1];return Math.hypot(r,n)}function ga(e,t){var r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n}function va(e){var t=e[0],r=e[1];return Math.hypot(t,r)}function wa(e){var t=e[0],r=e[1];return t*t+r*r}function ya(e,t){return e[0]=-t[0],e[1]=-t[1],e}function Ma(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function Ea(e,t){var r=t[0],n=t[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e}function Aa(e,t){return e[0]*t[0]+e[1]*t[1]}function xa(e,t,r){var n=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=n,e}function Ta(e,t,r,n){var i=t[0],a=t[1];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e}function Ra(e,t){t=t||1;var r=2*m()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function ka(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i,e[1]=r[1]*n+r[3]*i,e}function Fa(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e}function Sa(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[3]*i+r[6],e[1]=r[1]*n+r[4]*i+r[7],e}function La(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[4]*i+r[12],e[1]=r[1]*n+r[5]*i+r[13],e}function Pa(e,t,r,n){var i=t[0]-r[0],a=t[1]-r[1],o=Math.sin(n),s=Math.cos(n);return e[0]=i*s-a*o+r[0],e[1]=i*o+a*s+r[1],e}function Ia(e,t){var r=e[0],n=e[1],i=t[0],a=t[1],o=r*r+n*n;o>0&&(o=1/Math.sqrt(o));var s=i*i+a*a;s>0&&(s=1/Math.sqrt(s));var u=(r*i+n*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)}function Oa(e){return e[0]=0,e[1]=0,e}function Ua(e){return"vec2("+e[0]+", "+e[1]+")"}function Ca(e,t){return e[0]===t[0]&&e[1]===t[1]}function Da(e,t){var r=e[0],n=e[1],i=t[0],a=t[1];return Math.abs(r-i)<=l*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(n-a)<=l*Math.max(1,Math.abs(n),Math.abs(a))}var za=va,Ba=sa,Va=ua,Na=ca,qa=ba,Ga=ga,ja=wa,Ha=function(){var e=ta();return function(t,r,n,i,a,o){var s,u;for(r||(r=2),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;s<u;s+=r)e[0]=t[s],e[1]=t[s+1],a(e,e,o),t[s]=e[0],t[s+1]=e[1];return t}}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyScreenCounterRotation=t.Pipeline=void 0;const n=r(30),i=r(1),a=r(5),o=r(31),s=r(32),u=r(9),c=r(10),f=r(0),_=r(13),d=r(7);let l=new Map,h=i.mat4.create();class m{constructor(e,t,r){this._client=e,this._impl=t,this._mgr=r,this.pendingMessages=[],this.cameraTokens=new Map,this.nextCameraToken=1,this.tokensInFlight=0,this.videoTextures=[],this.cameraPixelArrays=[],this._sequenceRecordDeviceAttitudeMatrices=!0,this._sequenceRecorderFirstCameraToken=0,this.onGLContextReset=new c.Event}static create(e,t){let r=e.pipeline_create();return l.set(r,new m(e,r,t)),r}static get(e){return l.get(e)}frameUpdate(e){for(let t of this.pendingMessages)e.processMessages(t),this._mgr.postOutgoingMessage({t:"buf",p:this._impl,d:t},[t]);this.pendingMessages=[],this.cleanOldFrames()}cleanOldFrames(){var e,t;let r=this._client.pipeline_camera_frame_user_data(this._impl);if(r)for(let n of this.cameraTokens)n[0]<r&&(n[1].texture&&this.videoTextures.push(n[1].texture),null===(t=null===(e=n[1].frame)||void 0===e?void 0:e.close)||void 0===t||t.call(e),this.cameraTokens.delete(n[0]))}cameraTokenReturn(e){if(this._sequenceRecorder&&this._sequenceRecordDeviceAttitudeMatrices&&e.token>=this._sequenceRecorderFirstCameraToken){let t=this.cameraTokens.get(e.token);t&&(e.att&&this._sequenceRecorder.appendAttitudeMatrix(e.att),t.data=e.d,this._sequenceRecorder.appendCameraFrame(t))}this.cameraPixelArrays.push(e.d),this.tokensInFlight--}sequenceRecordStart(e){this._sequenceRecorder||(this._sequenceRecorder=new _.SequenceRecorder(e)),this._sequenceRecorder.start(),this._sequenceRecorderFirstCameraToken=this.nextCameraToken}sequenceRecordStop(){var e;null===(e=this._sequenceRecorder)||void 0===e||e.stop()}sequenceRecordData(){var e;return(null===(e=this._sequenceRecorder)||void 0===e?void 0:e.data())||new Uint8Array(0)}sequenceRecordClear(){delete this._sequenceRecorder}sequenceRecordDeviceAttitudeMatrices(e){this._sequenceRecordDeviceAttitudeMatrices=e}getVideoTexture(){return this.videoTextures.pop()}destroy(){this._client.pipeline_destroy(this._impl),l.delete(this._impl)}getCurrentCameraInfo(){let e=this._client.pipeline_camera_frame_user_data(this._impl);if(e)return this.cameraTokens.get(e)}cameraFrameDrawGL(e,t,r){if(!this.glContext)return;let i=this.getCurrentCameraInfo();i&&(this._cameraDraw||(this._cameraDraw=new n.CameraDraw(this.glContext)),this._cameraDraw.drawCameraFrame(e,t,i,!0===r))}glContextLost(){this._cameraDraw&&this._cameraDraw.dispose(),this._faceDraw&&this._faceDraw.dispose(),this._faceProjectDraw&&this._faceProjectDraw.dispose(),delete this._cameraDraw,delete this._faceDraw,delete this._faceProjectDraw,u.disposeDrawPlane(),this.onGLContextReset.emit();for(let e of this.videoTextures)this.glContext&&this.glContext.deleteTexture(e);this.videoTextures=[];for(let e of this.cameraTokens)this.glContext&&e[1].texture&&this.glContext.deleteTexture(e[1].texture),e[1].texture=void 0;this.glContext=void 0}glContextSet(e,t){this.glContextLost(),this.glContext=e,t=t||[];for(let r=0;r<4;r++){let n=t[r]||e.createTexture();n&&(e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),this.videoTextures.push(n))}e.bindTexture(e.TEXTURE_2D,null)}drawFace(e,t,r,n){if(!this.glContext)return;this._faceDraw||(this._faceDraw=new o.FaceDraw(this.glContext));let a=i.mat4.create();i.mat4.multiply(a,e,t),i.mat4.multiply(a,a,r),this._faceDraw.drawFace(a,n)}drawFaceProject(e,t,r,n,i,a){this.glContext&&(this._faceProjectDraw||(this._faceProjectDraw=new s.FaceDrawProject(this.glContext)),this._faceProjectDraw.drawFace(e,t,r,n,i,a))}cameraFrameTexture(){var e;return null===(e=this.getCurrentCameraInfo())||void 0===e?void 0:e.texture}cameraFrameTextureMatrix(e,t,r){let a=this.getCurrentCameraInfo();return a?n.cameraFrameTextureMatrix(a.dataWidth,a.dataHeight,e,t,a.uvTransform||h,r):i.mat4.create()}cameraFrameUserFacing(){var e;return(null===(e=this.getCurrentCameraInfo())||void 0===e?void 0:e.userFacing)||!1}cameraPoseWithAttitude(e){let t=p(this.getCurrentCameraInfo(),this._client.pipeline_camera_frame_camera_attitude(this._impl));if(e){let e=i.mat4.create();i.mat4.fromScaling(e,[-1,1,1]),i.mat4.multiply(t,e,t),i.mat4.multiply(t,t,e)}return i.mat4.invert(t,t),t}videoFrameFromWorker(e){let t=this.nextCameraToken++;const r=d.getCameraSource(e.source);r&&(this.cameraTokens.set(t,{dataWidth:e.w,dataHeight:e.h,texture:void 0,frame:e.d,userFacing:e.userFacing,uvTransform:e.uvTransform,cameraModel:e.cameraModel,cameraToDevice:e.cameraToDevice,cameraSource:r}),this.cleanOldFrames())}imageBitmapFromWorker(e){let t=this.cameraTokens.get(e.tokenId);t&&(t.dataWidth=e.dataWidth,t.dataHeight=e.dataHeight,t.frame=e.frame,t.userFacing=e.userFacing,t.uvTransform=e.uvTransform,this.tokensInFlight--,this.cleanOldFrames())}uploadGL(){var e,t;let r=this.getCurrentCameraInfo();null===(t=null===(e=null==r?void 0:r.cameraSource)||void 0===e?void 0:e.uploadGL)||void 0===t||t.call(e,r)}registerToken(e){let t=this.nextCameraToken++;return this.cameraTokens.set(t,e),this.tokensInFlight++,t}processGL(){this.glContext?this.currentCameraSource&&(this.tokensInFlight>0?this.currentCameraSource.getFrame(!0):this.currentCameraSource.getFrame(!1)):f.zcerr("no GL context for camera frames - please call pipeline_gl_context_set")}motionAccelerometerSubmit(e,t,r,n){var i;this._sequenceRecordDeviceAttitudeMatrices||null===(i=this._sequenceRecorder)||void 0===i||i.appendAccelerometer(e,t,r,n),this._client.pipeline_motion_accelerometer_submit(this._impl,e,t,r,n)}motionRotationRateSubmit(e,t,r,n){var i;this._sequenceRecordDeviceAttitudeMatrices||null===(i=this._sequenceRecorder)||void 0===i||i.appendRotationRate(e,t,r,n),this._client.pipeline_motion_rotation_rate_submit(this._impl,e,t,r,n)}motionAttitudeSubmit(e,t,r,n){var i;this._sequenceRecordDeviceAttitudeMatrices||null===(i=this._sequenceRecorder)||void 0===i||i.appendAttitude(e,t,r,n),this._client.pipeline_motion_attitude_submit(this._impl,e,t,r,n)}motionAttitudeMatrix(e){this._client.pipeline_motion_attitude_matrix_submit(this._impl,e)}sendCameraStreamToWorker(e,t,r){let n={t:"streamC2S",p:this._impl,s:t,userFacing:r,source:e};this._mgr.postOutgoingMessage(n,[n.s])}sendCameraToScreenRotationToWorker(e){let t={p:this._impl,t:"cameraToScreenC2S",r:e};this._mgr.postOutgoingMessage(t,[])}sendImageBitmapToWorker(e,t,r,n,i,a){let o={p:this._impl,t:"imageBitmapC2S",i:e,r:t,tokenId:n,userFacing:r,cameraModel:i,cameraToDevice:a};this._mgr.postOutgoingMessage(o,[e])}sendDataToWorker(e,t,r,n,i,a,o){let s={d:e,p:this._impl,width:r,height:n,token:t,userFacing:i,c2d:a,cm:o,t:"cameraFrameC2S"};this._mgr.postOutgoingMessage(s,[e])}}function p(e,t){let r=!1;r=!!e&&e.userFacing;let n=i.mat4.create();return i.mat4.fromRotation(n,a.cameraRotationForScreenOrientation(r)*Math.PI/180,[0,0,1]),i.mat4.multiply(n,n,t),n}t.Pipeline=m,t.applyScreenCounterRotation=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.profile=t.EmbeddedVideoImplementation=void 0;const n=r(11);!function(e){e[e.OBJECT_URL=0]="OBJECT_URL",e[e.SRC_OBJECT=1]="SRC_OBJECT"}(t.EmbeddedVideoImplementation||(t.EmbeddedVideoImplementation={})),t.profile={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=t.profile,window.location.href.indexOf("_mstppipeline")>=0&&(console.log("Configuring for MSTP camera pipeline (if supported)"),t.profile.preferMediaStreamTrackProcessorCamera=!0),window.location.href.indexOf("_imagebitmappipeline")>=0&&(console.log("Configuring for ImageBitmap camera pipeline (if supported)"),t.profile.preferImageBitmapCamera=!0));let i=new n.UAParser,a=(i.getOS().name||"unknown").toLowerCase(),o=(i.getEngine().name||"unknown").toLowerCase();function s(){let e=i.getOS().version;if(e){let r=e.split(".");if(r.length>=2){const e=parseInt(r[0]),n=parseInt(r[1]);(e<11||11===e&&n<3)&&(t.profile.blacklisted=!0),(e<12||12===e&&n<2)&&(t.profile.videoElementInDOM=!0),(12===e&&n>=2||e>=13)&&(t.profile.showGyroPermissionsWarningIfNecessary=!0),e>=13&&(t.profile.showSafariPermissionsResetIfNecessary=!0),(e>=12&&n>1||e>=13)&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&navigator.mediaDevices.getSupportedConstraints().frameRate&&(t.profile.requestHighFrameRate=!0,e<14&&(t.profile.videoHeight=360,t.profile.dataHeight=180))}}}"webkit"===o&&"ios"!==a&&(t.profile.deviceMotionMutliplier=1,"undefined"!=typeof window&&void 0!==window.orientation&&s()),"webkit"===o&&"ios"===a&&(t.profile.deviceMotionMutliplier=1,s())},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.linkProgram=t.compileShader=void 0,t.compileShader=function(e,t,r){let n=e.createShader(t);if(!n)throw new Error("Unable to create shader");e.shaderSource(n,r),e.compileShader(n);let i=e.getShaderInfoLog(n);if(i&&i.trim().length>0)throw new Error("Shader compile error: "+i);return n},t.linkProgram=function(e,t){e.linkProgram(t);let r=e.getProgramInfoLog(t);if(r&&r.trim().length>0)throw new Error("Unable to link: "+r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cameraRotationForScreenOrientation=t.projectionMatrix=void 0;const n=r(1);function i(e){if(window.screen.orientation)switch(window.screen.orientation.type){case"portrait-primary":return e?90:270;case"landscape-secondary":return 180;case"portrait-secondary":return e?270:90;default:return 0}else if(void 0!==window.orientation)switch(window.orientation){case 0:return e?90:270;case 90:return 0;case 180:return e?270:90;case-90:return 180}return 0}t.projectionMatrix=function(e,t,r,a=.01,o=100){let s=2*e[2],u=2*e[3],c=n.mat4.create();n.mat4.frustum(c,a*(-.5-e[2])/e[0],a*(s-.5-e[2])/e[0],a*(u-.5-e[3])/e[1],a*(-.5-e[3])/e[1],a,o),c[4]*=-1,c[5]*=-1,c[6]*=-1,c[7]*=-1;let f=n.mat4.create();n.mat4.fromScaling(f,[.5*s,.5*u,1]),n.mat4.multiply(c,f,c),n.mat4.fromRotation(f,i(!1)*Math.PI/180,[0,0,1]),n.mat4.multiply(c,f,c);let _=n.vec3.create();_[0]=s,_[1]=u,_[2]=0,n.vec3.transformMat4(_,_,f);let d=Math.abs(_[0]),l=Math.abs(_[1]),h=1;return h=d/t>l/r?r/l:t/d,n.mat4.fromScaling(f,[h,h,1]),n.mat4.multiply(c,f,c),n.mat4.fromScaling(f,[2/t,2/r,1]),n.mat4.multiply(c,f,c),n.mat4.fromRotation(f,i(!1)*Math.PI/-180,[0,0,1]),n.mat4.multiply(c,c,f),c},t.cameraRotationForScreenOrientation=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.frame_pixel_format_t=t.log_level_t=t.instant_world_tracker_transform_orientation_t=t.face_landmark_name_t=t.barcode_format_t=void 0,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"}(t.barcode_format_t||(t.barcode_format_t={})),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"}(t.face_landmark_name_t||(t.face_landmark_name_t={})),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"}(t.instant_world_tracker_transform_orientation_t||(t.instant_world_tracker_transform_orientation_t={})),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"}(t.log_level_t||(t.log_level_t={})),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"}(t.frame_pixel_format_t||(t.frame_pixel_format_t={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCameraSource=t.deleteCameraSource=t.getCameraSource=t.setCameraSourceId=t.getNextCameraSourceId=void 0;const n=r(14),i=r(35),a=r(0),o=r(36),s=r(3);let u=1,c=new Map;function f(){return u++}function _(e,t){c.set(e,t)}t.getNextCameraSourceId=f,t.setCameraSourceId=_,t.getCameraSource=function(e){return c.get(e)},t.deleteCameraSource=function(e){c.delete(e)},t.createCameraSource=function(e,t){let r=f();return s.profile.preferMediaStreamTrackProcessorCamera&&"MediaStreamTrackProcessor"in window&&"MediaStreamTrackGenerator"in window?_(r,new o.MSTPCameraSource(r,e,t)):s.profile.preferImageBitmapCamera&&"undefined"!=typeof OffscreenCanvas?_(r,new i.ImageBitmapCameraSource(r,e,t)):_(r,new n.CameraSource(r,e,t)),a.zcout("camera_source_t initialized"),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Source=void 0;t.Source=class{}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.drawPlane=t.disposeDrawPlane=void 0;const n=r(4);let i,a,o,s={};function u(e){if(o)return o;if(o=e.createBuffer(),!o)throw new Error("Unable to create buffer object");return e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,1,0,0,1,1,1,0]),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,null),o}t.disposeDrawPlane=function(){i=void 0,a=void 0,o=void 0,s={}},t.drawPlane=function(e,t,r,n,i){let o=c(e),f=function(e){if(a)return a;if(a=e.createBuffer(),!a)throw new Error("Unable to create buffer object");return e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-.5,.125,0,-.5,-.125,0,.5,.125,0,.5,-.125,0]),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,null),a}(e),_=u(e);e.disable(e.DEPTH_TEST),e.useProgram(o.prog),e.uniformMatrix4fv(o.unif_proj,!1,t),e.uniformMatrix4fv(o.unif_camera,!1,r),e.uniformMatrix4fv(o.unif_matrix,!1,n),e.bindBuffer(e.ARRAY_BUFFER,f),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,function(e,t){if(s[t])return s[t];let r=e.createTexture();if(!r)throw new Error("Unable to create texture");s[t]=r,e.bindTexture(e.TEXTURE_2D,r);const n=e.RGBA,i=e.RGBA,a=e.UNSIGNED_BYTE,o=new Uint8Array([0,0,255,255]);e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,n,1,1,0,i,a,o);const u=new Image;return u.onload=function(){e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,n,i,a,u),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)},u.src=t,r}(e,i)),e.uniform1i(o.unif_skinSampler,0),e.vertexAttribPointer(o.attr_position,3,e.FLOAT,!1,12,0),e.enableVertexAttribArray(o.attr_position),e.bindBuffer(e.ARRAY_BUFFER,_),e.vertexAttribPointer(o.attr_textureCoord,2,e.FLOAT,!1,8,0),e.enableVertexAttribArray(o.attr_textureCoord),e.drawArrays(e.TRIANGLE_STRIP,0,4),e.disableVertexAttribArray(o.attr_position),e.bindBuffer(e.ARRAY_BUFFER,null)};function c(e){if(i)return i;let t=e.createProgram();if(!t)throw new Error("Unable to create program");let r=n.compileShader(e,e.VERTEX_SHADER,"\n#ifndef GL_ES\n#define highp\n#define mediump\n#define lowp\n#endif\n\nuniform mat4 projMatrix;\nuniform mat4 cameraMatrix;\nuniform mat4 modelViewMatrix;\nattribute vec4 position;\nattribute vec2 textureCoord;\n\nvarying highp vec2 vTextureCoord;\n\nvoid main()\n{\n gl_Position = projMatrix * cameraMatrix * modelViewMatrix * position;\n vTextureCoord = textureCoord;\n}"),a=n.compileShader(e,e.FRAGMENT_SHADER,"\n#define highp mediump\n#ifdef GL_ES\n // define default precision for float, vec, mat.\n precision highp float;\n#else\n#define highp\n#define mediump\n#define lowp\n#endif\n\nvarying highp vec2 vTextureCoord;\nuniform sampler2D skinSampler;\n\nvoid main()\n{\n gl_FragColor = texture2D(skinSampler, vTextureCoord);\n}");e.attachShader(t,r),e.attachShader(t,a),n.linkProgram(e,t);let o=e.getUniformLocation(t,"projMatrix");if(!o)throw new Error("Unable to get uniform location projMatrix");let s=e.getUniformLocation(t,"modelViewMatrix");if(!s)throw new Error("Unable to get uniform location modelViewMatrix");let u=e.getUniformLocation(t,"cameraMatrix");if(!u)throw new Error("Unable to get uniform location cameraMatrix");let c=e.getUniformLocation(t,"skinSampler");if(!c)throw new Error("Unable to get uniform location skinSampler");return i={prog:t,unif_matrix:s,unif_proj:o,unif_camera:u,unif_skinSampler:c,attr_position:e.getAttribLocation(t,"position"),attr_textureCoord:e.getAttribLocation(t,"textureCoord")},i}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event5=t.Event3=t.Event2=t.Event1=t.Event=void 0;t.Event=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(){for(var e=0,t=this._funcs.length;e<t;e++)this._funcs[e]()}};t.Event1=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e){for(var t=0,r=this._funcs.length;t<r;t++)this._funcs[t](e)}};t.Event2=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t){for(var r=0,n=this._funcs.length;r<n;r++)this._funcs[r](e,t)}};t.Event3=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t,r){for(var n=0,i=this._funcs.length;n<i;n++)this._funcs[n](e,t,r)}};t.Event5=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t,r,n,i){for(var a=0,o=this._funcs.length;a<o;a++)this._funcs[a](e,t,r,n,i)}}},function(e,t,r){var n;!function(i,a){"use strict";var o="model",s="name",u="type",c="vendor",f="version",_="mobile",d="tablet",l="smarttv",h=function(e){var t={};for(var r in e)t[e[r].toUpperCase()]=e[r];return t},m=function(e,t){return"string"==typeof e&&-1!==p(t).indexOf(p(e))},p=function(e){return e.toLowerCase()},b=function(e,t){if("string"==typeof e)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),void 0===t?e:e.substring(0,255)},g=function(e,t){for(var r,n,i,a,o,s,u=0;u<t.length&&!o;){var c=t[u],f=t[u+1];for(r=n=0;r<c.length&&!o;)if(o=c[r++].exec(e))for(i=0;i<f.length;i++)s=o[++n],"object"==typeof(a=f[i])&&a.length>0?2==a.length?"function"==typeof a[1]?this[a[0]]=a[1].call(this,s):this[a[0]]=a[1]:3==a.length?"function"!=typeof a[1]||a[1].exec&&a[1].test?this[a[0]]=s?s.replace(a[1],a[2]):void 0:this[a[0]]=s?a[1].call(this,s,a[2]):void 0:4==a.length&&(this[a[0]]=s?a[3].call(this,s.replace(a[1],a[2])):void 0):this[a]=s||void 0;u+=2}},v=function(e,t){for(var r in t)if("object"==typeof t[r]&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(m(t[r][n],e))return"?"===r?void 0:r}else if(m(t[r],e))return"?"===r?void 0:r;return e},w={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,f],[/opios[\/ ]+([\w\.]+)/i],[f,[s,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[f,[s,"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],[s,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[s,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[f,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[f,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],f],[/\bfocus\/([\w\.]+)/i],[f,[s,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[f,[s,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[s,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[s,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[f,[s,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],f],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,"Facebook"],f],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[s,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,f],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[f,[s,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[f,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[f,v,{"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],[s,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[s,"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],[s,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",p]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",p]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",p]]],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],[o,[c,"Samsung"],[u,d]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[o,[c,"Samsung"],[u,_]],[/\((ip(?:hone|od)[\w ]*);/i],[o,[c,"Apple"],[u,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[c,"Apple"],[u,d]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[o,[c,"Huawei"],[u,d]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[o,[c,"Huawei"],[u,_]],[/\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],[[o,/_/g," "],[c,"Xiaomi"],[u,_]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[o,/_/g," "],[c,"Xiaomi"],[u,d]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[o,[c,"OPPO"],[u,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[c,"Vivo"],[u,_]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[o,[c,"Realme"],[u,_]],[/\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],[o,[c,"Motorola"],[u,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[c,"Motorola"],[u,d]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[c,"LG"],[u,d]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[c,"LG"],[u,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[o,[c,"Lenovo"],[u,d]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[o,/_/g," "],[c,"Nokia"],[u,_]],[/(pixel c)\b/i],[o,[c,"Google"],[u,d]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[c,"Google"],[u,_]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[c,"Sony"],[u,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[c,"Sony"],[u,d]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[c,"OnePlus"],[u,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[c,"Amazon"],[u,d]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[c,"Amazon"],[u,_]],[/(playbook);[-\w\),; ]+(rim)/i],[o,c,[u,d]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[c,"BlackBerry"],[u,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[c,"ASUS"],[u,d]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[c,"ASUS"],[u,_]],[/(nexus 9)/i],[o,[c,"HTC"],[u,d]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[c,[o,/_/g," "],[u,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[c,"Acer"],[u,d]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[c,"Meizu"],[u,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[c,"Sharp"],[u,_]],[/(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],[c,o,[u,_]],[/(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],[c,o,[u,d]],[/(surface duo)/i],[o,[c,"Microsoft"],[u,d]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[c,"Fairphone"],[u,_]],[/(u304aa)/i],[o,[c,"AT&T"],[u,_]],[/\bsie-(\w*)/i],[o,[c,"Siemens"],[u,_]],[/\b(rct\w+) b/i],[o,[c,"RCA"],[u,d]],[/\b(venue[\d ]{2,7}) b/i],[o,[c,"Dell"],[u,d]],[/\b(q(?:mv|ta)\w+) b/i],[o,[c,"Verizon"],[u,d]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[c,"Barnes & Noble"],[u,d]],[/\b(tm\d{3}\w+) b/i],[o,[c,"NuVision"],[u,d]],[/\b(k88) b/i],[o,[c,"ZTE"],[u,d]],[/\b(nx\d{3}j) b/i],[o,[c,"ZTE"],[u,_]],[/\b(gen\d{3}) b.+49h/i],[o,[c,"Swiss"],[u,_]],[/\b(zur\d{3}) b/i],[o,[c,"Swiss"],[u,d]],[/\b((zeki)?tb.*\b) b/i],[o,[c,"Zeki"],[u,d]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],o,[u,d]],[/\b(ns-?\w{0,9}) b/i],[o,[c,"Insignia"],[u,d]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[c,"NextBook"],[u,d]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],o,[u,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],o,[u,_]],[/\b(ph-1) /i],[o,[c,"Essential"],[u,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[c,"Envizen"],[u,d]],[/\b(trio[-\w\. ]+) b/i],[o,[c,"MachSpeed"],[u,d]],[/\btu_(1491) b/i],[o,[c,"Rotor"],[u,d]],[/(shield[\w ]+) b/i],[o,[c,"Nvidia"],[u,d]],[/(sprint) (\w+)/i],[c,o,[u,_]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[c,"Microsoft"],[u,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[c,"Zebra"],[u,d]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[c,"Zebra"],[u,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,o,[u,"console"]],[/droid.+; (shield) bui/i],[o,[c,"Nvidia"],[u,"console"]],[/(playstation [345portablevi]+)/i],[o,[c,"Sony"],[u,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[c,"Microsoft"],[u,"console"]],[/smart-tv.+(samsung)/i],[c,[u,l]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[c,"Samsung"],[u,l]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,"LG"],[u,l]],[/(apple) ?tv/i],[c,[o,"Apple TV"],[u,l]],[/crkey/i],[[o,"Chromecast"],[c,"Google"],[u,l]],[/droid.+aft(\w)( bui|\))/i],[o,[c,"Amazon"],[u,l]],[/\(dtv[\);].+(aquos)/i],[o,[c,"Sharp"],[u,l]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[c,b],[o,b],[u,l]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,l]],[/((pebble))app/i],[c,o,[u,"wearable"]],[/droid.+; (glass) \d/i],[o,[c,"Google"],[u,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[o,[c,"Zebra"],[u,"wearable"]],[/(quest( 2)?)/i],[o,[c,"Facebook"],[u,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[u,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[o,[u,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[u,d]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,d]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[u,_]],[/(android[-\w\. ]{0,9});.+buil/i],[o,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[s,"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],[s,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[f,v,w]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[f,v,w]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[f,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,f],[/\(bb(10);/i],[f,[s,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[f,[s,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[s,"Chromium OS"],f],[/(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],[s,f],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[s,f]]},M=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof M))return new M(e,t).getResult();var r=e||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),n=t?function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}(y,t):y;return this.getBrowser=function(){var e,t={};return t[s]=void 0,t[f]=void 0,g.call(t,r,n.browser),t.major="string"==typeof(e=t.version)?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0,t},this.getCPU=function(){var e={architecture:void 0};return g.call(e,r,n.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return g.call(e,r,n.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return g.call(e,r,n.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return g.call(e,r,n.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="string"==typeof e&&e.length>255?b(e,255):e,this},this.setUA(r),this};M.VERSION="0.7.30",M.BROWSER=h([s,f,"major"]),M.CPU=h(["architecture"]),M.DEVICE=h([o,c,u,"console",_,l,d,"wearable","embedded"]),M.ENGINE=M.OS=h([s,f]),void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=M),t.UAParser=M):r(28)?void 0===(n=function(){return M}.call(t,r,t,e))||(e.exports=n):void 0!==i&&(i.UAParser=M);var E=void 0!==i&&(i.jQuery||i.Zepto);if(E&&!E.ua){var A=new M;E.ua=A.getResult(),E.ua.get=function(){return A.getUA()},E.ua.set=function(e){A.setUA(e);var t=A.getResult();for(var r in t)E.ua[r]=t[r]}}}("object"==typeof window?window:this)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log_level_t=t.instant_world_tracker_transform_orientation_t=t.frame_pixel_format_t=t.face_landmark_name_t=t.barcode_format_t=void 0;var n=r(6);Object.defineProperty(t,"barcode_format_t",{enumerable:!0,get:function(){return n.barcode_format_t}});var i=r(6);Object.defineProperty(t,"face_landmark_name_t",{enumerable:!0,get:function(){return i.face_landmark_name_t}});var a=r(6);Object.defineProperty(t,"frame_pixel_format_t",{enumerable:!0,get:function(){return a.frame_pixel_format_t}});var o=r(6);Object.defineProperty(t,"instant_world_tracker_transform_orientation_t",{enumerable:!0,get:function(){return o.instant_world_tracker_transform_orientation_t}});var s=r(6);Object.defineProperty(t,"log_level_t",{enumerable:!0,get:function(){return s.log_level_t}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceDecoder=t.SequenceRecorder=t.SequenceRecorderPacketType=void 0;const n=r(0);var i;!function(e){e[e.CAMERA_FRAME=0]="CAMERA_FRAME",e[e.ACCELEROMETER=1]="ACCELEROMETER",e[e.ROTATION_RATE=2]="ROTATION_RATE",e[e.ATTITUDE=3]="ATTITUDE",e[e.ATTITUDE_MATRIX=4]="ATTITUDE_MATRIX"}(i=t.SequenceRecorderPacketType||(t.SequenceRecorderPacketType={}));class a{constructor(e){this._insertionByte=0,this._numberPackets=0,this._started=!1,this._hasLoggedUnsuppored=!1,this._data=new ArrayBuffer(this._estimatedSize(e,320,240)),this._dataView=new DataView(this._data),this._dataUint8=new Uint8Array(this._data),this._dataFloat32=new Float32Array(this._data)}_estimatedSize(e,t,r){return a.headerSizeBytes+(a.psbPacketType+a.cameraPacketSizeBytes+t*r)*e}start(){this._started=!0,this._insertionByte=0,this._numberPackets=0,this._growArrayBuffer(a.headerSizeBytes);let e=(new TextEncoder).encode("UAR1");this._dataUint8.set(e),this._dataView.setUint32(4,0,!0),this._insertionByte+=8}stop(){this._started=!1;let e=this._data.slice(0,this._insertionByte);this._data=e,this._dataUint8=new Uint8Array(this._data),this._dataFloat32=new Float32Array(this._data),this._dataView=new DataView(this._data)}data(){return this._dataUint8}appendCameraFrame(e){if(!this._started)return;if(!e.data){if(this._hasLoggedUnsuppored)return;return this._hasLoggedUnsuppored=!0,void n.zcerr("Unable to record frames from this camera source")}if(e.data.byteLength!==e.dataWidth*e.dataHeight)return void n.zcerr("Unable to record frame to sequence: greyscale array doesn't match dimensions");let t=a.psbPacketType+a.cameraPacketSizeBytes+e.dataWidth*e.dataHeight;this._growArrayBuffer(t),this._dataView.setUint32(this._insertionByte,i.CAMERA_FRAME,!0),this._insertionByte+=a.psbPacketType,this._dataView.setUint32(this._insertionByte,e.dataWidth,!0),this._insertionByte+=a.psbCameraFrameWidth,this._dataView.setUint32(this._insertionByte,e.dataHeight,!0),this._insertionByte+=a.psbCameraFrameHeight,this._dataFloat32.set(e.cameraToDevice,this._insertionByte/4),this._insertionByte+=a.psbCameraToDeviceTransform,this._dataFloat32.set(e.cameraModel,this._insertionByte/4),this._insertionByte+=a.psbCameraModel,this._dataView.setUint32(this._insertionByte,e.userFacing?1:0,!0),this._insertionByte+=a.psbFlags,this._dataUint8.set(new Uint8Array(e.data),this._insertionByte),this._insertionByte+=e.data.byteLength,this._numberPackets++,this._dataView.setUint32(4,this._numberPackets,!0)}appendAccelerometer(e,t,r,n){this._appendTimestampedVec3(i.ACCELEROMETER,e,t,r,n)}appendRotationRate(e,t,r,n){this._appendTimestampedVec3(i.ROTATION_RATE,e,t,r,n)}appendAttitude(e,t,r,n){this._appendTimestampedVec3(i.ATTITUDE,e,t,r,n)}_appendTimestampedVec3(e,t,r,n,i){if(!this._started)return;let o=a.psbPacketType+a.accelerometerPacketSizeBytes;this._growArrayBuffer(o),this._dataView.setUint32(this._insertionByte,e,!0),this._insertionByte+=a.psbPacketType,this._dataView.setUint32(this._insertionByte,t,!0),this._insertionByte+=4,this._dataView.setFloat32(this._insertionByte,r,!0),this._insertionByte+=4,this._dataView.setFloat32(this._insertionByte,n,!0),this._insertionByte+=4,this._dataView.setFloat32(this._insertionByte,i,!0),this._insertionByte+=4,this._numberPackets++,this._dataView.setUint32(4,this._numberPackets,!0)}appendAttitudeMatrix(e){if(!this._started)return;let t=a.psbPacketType+a.attitudeMatrixPacketSizeBytes;this._growArrayBuffer(t),this._dataView.setUint32(this._insertionByte,i.ATTITUDE_MATRIX,!0),this._insertionByte+=a.psbPacketType,this._dataFloat32.set(e,this._insertionByte/4),this._insertionByte+=a.attitudeMatrixPacketSizeBytes,this._numberPackets++,this._dataView.setUint32(4,this._numberPackets,!0)}_growArrayBuffer(e){for(;this._insertionByte+e>this._data.byteLength;){let e=Math.max(2*this._data.byteLength,this._estimatedSize(50,320,240)),t=new ArrayBuffer(e),r=new Uint8Array(t);r.set(this._dataUint8),this._data=t,this._dataUint8=r,this._dataFloat32=new Float32Array(this._data),this._dataView=new DataView(this._data)}}}t.SequenceRecorder=a,a.headerSizeBytes=8,a.psbPacketType=4,a.psbCameraFrameWidth=4,a.psbCameraFrameHeight=4,a.psbFlags=4,a.psbCameraToDeviceTransform=64,a.psbCameraModel=24,a.cameraPacketSizeBytes=a.psbCameraFrameWidth+a.psbCameraFrameHeight+a.psbCameraToDeviceTransform+a.psbCameraModel+a.psbFlags,a.accelerometerPacketSizeBytes=16,a.rotationRatePacketSizeBytes=16,a.attitudePacketSizeBytes=16,a.attitudeMatrixPacketSizeBytes=64;t.SequenceDecoder=class{constructor(e){this._data=e,this.dataByPacket=new Map,this.dataByCameraFrame=new Map,this.numberPackets=0,this.numberCameraFrames=0,this.numberAccelerometerPackets=0,this.numberRotationRatePackets=0,this.numberAttitudePackets=0,this.numberAttitudeMatrixPackets=0;let t=new TextDecoder,r="";try{r=t.decode(this._data.slice(0,4))}catch(e){throw new Error("Unable to decode header - perhaps this isn't a sequence file?")}if("UAR1"!==r)throw new Error("Invalid - perhaps this isn't a sequence file: "+r);let n=0,o=new DataView(this._data);this.numberPackets=o.getUint32(4,!0),n+=a.headerSizeBytes;for(let e=0;e<this.numberPackets;e++){let t=o.getUint32(n,!0);switch(n+=a.psbPacketType,t){case i.CAMERA_FRAME:{let t=o.getUint32(n,!0);n+=a.psbCameraFrameWidth;let r=o.getUint32(n,!0);n+=a.psbCameraFrameHeight;let s=new Float32Array(this._data,n,a.psbCameraToDeviceTransform/4);n+=a.psbCameraToDeviceTransform;let u=new Float32Array(this._data,n,a.psbCameraModel/4);n+=a.psbCameraModel;let c=o.getUint32(n,!0);n+=a.psbFlags;let f=1===c,_=new Uint8Array(this._data,n,t*r);n+=t*r;let d={type:i.CAMERA_FRAME,width:t,height:r,cameraToDevice:s,cameraModel:u,userFacing:f,greyscale:_};this.dataByPacket.set(e,d),this.dataByCameraFrame.set(this.numberCameraFrames,d),this.numberCameraFrames++;break}case i.ACCELEROMETER:{let t=o.getUint32(n,!0);n+=4;let r=o.getFloat32(n,!0);n+=4;let a=o.getFloat32(n,!0);n+=4;let s=o.getFloat32(n,!0);n+=4,this.dataByPacket.set(e,{type:i.ACCELEROMETER,t:t,x:r,y:a,z:s}),this.numberAccelerometerPackets++;break}case i.ROTATION_RATE:{let t=o.getUint32(n,!0);n+=4;let r=o.getFloat32(n,!0);n+=4;let a=o.getFloat32(n,!0);n+=4;let s=o.getFloat32(n,!0);n+=4,this.dataByPacket.set(e,{type:i.ROTATION_RATE,t:t,x:r,y:a,z:s}),this.numberRotationRatePackets++;break}case i.ATTITUDE:{let t=o.getUint32(n,!0);n+=4;let r=o.getFloat32(n,!0);n+=4;let a=o.getFloat32(n,!0);n+=4;let s=o.getFloat32(n,!0);n+=4,this.dataByPacket.set(e,{type:i.ATTITUDE,t:t,x:r,y:a,z:s}),this.numberAttitudePackets++;break}case i.ATTITUDE_MATRIX:{let t=new Float32Array(this._data,n,a.attitudeMatrixPacketSizeBytes/4);n+=a.attitudeMatrixPacketSizeBytes,this.dataByPacket.set(e,{type:i.ATTITUDE_MATRIX,attitude:t}),this.numberAttitudeMatrixPackets++;break}}}}}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CameraSource=void 0;const i=r(15),a=r(3),o=r(2),s=r(5),u=r(0),c=r(7);let f=document.createElement("video");f.setAttribute("playsinline",""),f.setAttribute("webkit-playsinline",""),a.profile.videoElementInDOM&&(f.style.width="0px",f.style.height="0px",document.body.appendChild(f));class _ extends i.HTMLElementSource{constructor(e,t,r){super(f,t),this._impl=e,this._deviceId=r,this._currentStream=null,this._activeDeviceId=null,this._hasStartedOrientation=!1,this._deviceMotionListener=e=>{let t=o.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.accelerationIncludingGravity&&null!==e.accelerationIncludingGravity.x&&null!==e.accelerationIncludingGravity.y&&null!==e.accelerationIncludingGravity.z&&t.motionAccelerometerSubmit(r,e.accelerationIncludingGravity.x*a.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.y*a.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.z*a.profile.deviceMotionMutliplier),null===e.rotationRate||null===e.rotationRate.alpha||null===e.rotationRate.beta||null===e.rotationRate.gamma||this._hasStartedOrientation?this._hasStartedOrientation||this._startDeviceOrientation():(e.timeStamp,t.motionRotationRateSubmit(r,e.rotationRate.alpha*Math.PI/-180,e.rotationRate.beta*Math.PI/-180,e.rotationRate.gamma*Math.PI/-180))}}destroy(){c.deleteCameraSource(this._impl),super.destroy()}_stop(){if(!this._currentStream)return;this._currentStream.getTracks().forEach(e=>e.stop()),this._currentStream=null}pause(){super.pause(),this._stopDeviceMotion(),this._syncCamera()}start(){super.start(),this._startDeviceMotion(),this._syncCamera()}_getConstraints(){return n(this,void 0,void 0,(function*(){let e,t;this._deviceId!==_.DEFAULT_DEVICE_ID&&this._deviceId!==_.USER_DEFAULT_DEVICE_ID?e=this._deviceId:t=this._deviceId===_.DEFAULT_DEVICE_ID?"environment":"user";let r={audio:!1,video:{facingMode:t,width:a.profile.videoWidth,height:a.profile.videoHeight,frameRate:a.profile.requestHighFrameRate?60:void 0,deviceId:e}};if(e)return r;if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return r;let n=yield navigator.mediaDevices.enumerateDevices(),i=!1;return n=n.filter(e=>{if("videoinput"!==e.kind)return!1;if(e.getCapabilities){i=!0;let r=e.getCapabilities();if(r&&r.facingMode&&r.facingMode.indexOf("user"===t?"user":"environment")<0)return!1}return!0}),i&&0!==n.length?("object"==typeof r.video&&(u.zcout("choosing device ID",n[n.length-1].deviceId),r.video.deviceId=n[n.length-1].deviceId),r):r}))}getFrame(e){this._cameraToScreenRotation=s.cameraRotationForScreenOrientation(!1),super.getFrame(e)}_getUserMedia(){return n(this,void 0,void 0,(function*(){let e=yield this._getConstraints();return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?yield navigator.mediaDevices.getUserMedia(e):yield new Promise((t,r)=>{navigator.getUserMedia(e,t,r)})}))}_syncCamera(){return n(this,void 0,void 0,(function*(){if(this._currentStream&&this._isPaused)this._stop();else if(this._currentStream&&this._activeDeviceId!==this._deviceId&&this._stop(),!this._isPaused){if(this._activeDeviceId=this._deviceId,this._currentStream=yield this._getUserMedia(),this._isPaused)return void(yield this._syncCamera());if(this._isUserFacing=!1,this._currentStream){let e=this._currentStream.getVideoTracks();e.length>0&&(this._isUserFacing="user"===e[0].getSettings().facingMode)}if(!(this._video instanceof HTMLVideoElement))return;this._video.src="",this._video.loop=!1,this._video.muted=!0,this._video.srcObject=this._currentStream,this._video.play()}}))}_startDeviceOrientation(){this._hasStartedOrientation||(this._hasStartedOrientation=!0,this._deviceOrientationListener=e=>{let t=o.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.alpha&&null!==e.beta&&null!==e.gamma&&t.motionAttitudeSubmit(r,e.alpha,e.beta,e.gamma)},window.addEventListener("deviceorientation",this._deviceOrientationListener))}_startDeviceMotion(){window.addEventListener("devicemotion",this._deviceMotionListener,!1)}_stopDeviceMotion(){window.removeEventListener("devicemotion",this._deviceMotionListener),this._deviceOrientationListener&&window.removeEventListener("deviceorientation",this._deviceOrientationListener)}}t.CameraSource=_,_.USER_DEFAULT_DEVICE_ID="Simulated User Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b",_.DEFAULT_DEVICE_ID="Simulated Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLElementSource=void 0;const n=r(2),i=r(8),a=r(3),o=r(1),s=r(0),u=r(33);let c=1,f=new Map;class _ extends i.Source{constructor(e,t){super(),this._video=e,this._pipeline=t,this._isPaused=!0,this._hadFrames=!1,this._isUserFacing=!1,this._cameraToScreenRotation=0,this._isUploadFrame=!0,this._cameraToDeviceTransform=o.mat4.create(),this._cameraToDeviceTransformUserFacing=o.mat4.create(),this._cameraModel=new Float32Array([300,300,160,120,0,0]),o.mat4.fromScaling(this._cameraToDeviceTransformUserFacing,[-1,1,-1]);let r=this._video;this._video instanceof HTMLVideoElement?r.addEventListener("loadedmetadata",()=>{this._hadFrames=!0}):this._hadFrames=!0,this._resetGLContext=this._resetGLContext.bind(this);let i=n.Pipeline.get(this._pipeline);i&&i.onGLContextReset.bind(this._resetGLContext)}static createVideoElementSource(e,t){let r=c++;return f.set(r,new _(t,e)),s.zcout("html_element_source_t initialized"),r}static getVideoElementSource(e){return f.get(e)}_resetGLContext(){var e,t;this._currentVideoTexture=void 0,null===(t=null===(e=this._imageProcessor)||void 0===e?void 0:e.resetGLContext)||void 0===t||t.call(e)}destroy(){let e=n.Pipeline.get(this._pipeline);e&&e.onGLContextReset.unbind(this._resetGLContext),this.pause(),this._resetGLContext()}pause(){this._isPaused=!0;let e=n.Pipeline.get(this._pipeline);e&&e.currentCameraSource===this&&(e.currentCameraSource=void 0)}start(){var e;this._isPaused&&(this._isUploadFrame=!0,this._video instanceof HTMLVideoElement&&(this._hadFrames=!1)),this._isPaused=!1;let t=n.Pipeline.get(this._pipeline);t&&t.currentCameraSource!==this&&(null===(e=t.currentCameraSource)||void 0===e||e.pause(),t.currentCameraSource=this)}getFrame(e){let t=n.Pipeline.get(this._pipeline);if(!t)return;let r=t.glContext;if(r&&!this._isPaused&&this._hadFrames)try{let n=this._processFrame(r,this._cameraToScreenRotation,e);if(n){let e=t.registerToken(n);t.sendDataToWorker(n.data||new ArrayBuffer(0),e,n.dataWidth,n.dataHeight,n.userFacing,n.cameraToDevice,n.cameraModel)}}catch(e){console.log("Unable to process frame")}}_processFrame(e,t,r){let i=n.Pipeline.get(this._pipeline);if(!i)return;if(this._imageProcessor||(this._imageProcessor=new u.ImageProcessGL(e)),this._isUploadFrame){if(this._currentVideoTexture||(this._currentVideoTexture=i.getVideoTexture()),!this._currentVideoTexture)return;return this._imageProcessor.uploadFrame(this._currentVideoTexture,this._video,t,this._isUserFacing),void(this._isUploadFrame=!this._isUploadFrame)}if(r||!this._currentVideoTexture)return;this._isUploadFrame=!this._isUploadFrame;let o=a.profile.dataWidth*a.profile.dataHeight,s=i.cameraPixelArrays.pop();for(;s&&s.byteLength!==o;)s=i.cameraPixelArrays.pop();s||(s=new ArrayBuffer(o));let c=this._currentVideoTexture;this._currentVideoTexture=void 0;let f=300*a.profile.dataWidth/320;return this._cameraModel[0]=f,this._cameraModel[1]=f,this._cameraModel[2]=.5*a.profile.dataWidth,this._cameraModel[3]=.5*a.profile.dataHeight,Object.assign(Object.assign({},this._imageProcessor.readFrame(c,s)),{cameraModel:this._cameraModel,cameraSource:this,cameraToDevice:this._isUserFacing?this._cameraToDeviceTransformUserFacing:this._cameraToDeviceTransform})}uploadGL(){}}t.HTMLElementSource=_},function(e,t,r){"use strict";r.r(t),t.default=r.p+"b4f46e148a3b3b5aef90717d8d60e3fc.zbin"},function(e,t,r){"use strict";e.exports=function(e,t,r,n){try{try{var i;try{i=new window.Blob([e])}catch(t){(i=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(e),i=i.getBlob()}var a=window.URL||window.webkitURL,o=a.createObjectURL(i),s=new window[t](o,r);return a.revokeObjectURL(o),s}catch(n){return new window[t]("data:application/javascript,".concat(encodeURIComponent(e)),r)}}catch(e){if(!n)throw Error("Inline worker is not supported");return new window[t](n,r)}}},function(e,t,r){"use strict";if(Object.defineProperty(t,"__esModule",{value:!0}),t.log_level_t=t.instant_world_tracker_transform_orientation_t=t.face_landmark_name_t=t.barcode_format_t=t.initialize=void 0,document.currentScript){const e=new URL(document.currentScript.src);let t=e.toString();if(e.pathname){let e=t.split("/");e.pop(),t=e.join("/")+"/"}r.p=t}const n=r(19),i=r(44);t.initialize=function(){return console.log("Zappar CV v"+i.VERSION),n.initialize()};var a=r(12);Object.defineProperty(t,"barcode_format_t",{enumerable:!0,get:function(){return a.barcode_format_t}}),Object.defineProperty(t,"face_landmark_name_t",{enumerable:!0,get:function(){return a.face_landmark_name_t}}),Object.defineProperty(t,"instant_world_tracker_transform_orientation_t",{enumerable:!0,get:function(){return a.instant_world_tracker_transform_orientation_t}}),Object.defineProperty(t,"log_level_t",{enumerable:!0,get:function(){return a.log_level_t}})},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.initialize=void 0;const i=r(20),a=r(9),o=r(5),s=r(1),u=r(23),c=r(27),f=r(29),_=r(2),d=r(14),l=r(15),h=r(37),m=r(39),p=r(0),b=r(40),g=r(7),v=r(41);let w;t.initialize=function(){if(w)return w;let e=!1;u.launchWorker().then(()=>{p.zcout("Fully loaded"),e=!0});let t=new i.zappar_client(e=>{u.messageManager.postOutgoingMessage({t:"zappar",d:e},[e])});if(window.location.hostname.toLowerCase().indexOf(".zappar.io")>0){let e=window.location.pathname.split("/");e.length>1&&e[1].length>0&&t.impl.analytics_project_id_set(".wiz"+e[1])}return u.messageManager.onIncomingMessage.bind(e=>{var r,n,i,a,o,s,u;switch(e.t){case"zappar":null===(r=_.Pipeline.get(e.p))||void 0===r||r.pendingMessages.push(e.d);break;case"buf":t.serializer.bufferReturn(e.d);break;case"cameraFrameRecycleS2C":{let t=e;null===(i=null===(n=_.Pipeline.get(t.p))||void 0===n?void 0:n.cameraTokenReturn)||void 0===i||i.call(n,e);break}case"videoFrameS2C":{let t=e;null===(o=null===(a=_.Pipeline.get(t.p))||void 0===a?void 0:a.videoFrameFromWorker)||void 0===o||o.call(a,t);break}case"imageBitmapS2C":{let t=e;null===(u=null===(s=_.Pipeline.get(t.p))||void 0===s?void 0:s.imageBitmapFromWorker)||void 0===u||u.call(s,t);break}case"licerr":{let e=document.createElement("div");e.innerHTML="Visit <a href='https://docs.zap.works/universal-ar/licensing/' style='color: white;'>our licensing page</a> to find out about hosting on your own domain.",e.style.position="absolute",e.style.bottom="20px",e.style.width="80%",e.style.backgroundColor="black",e.style.color="white",e.style.borderRadius="10px",e.style.padding="10px",e.style.fontFamily="sans-serif",e.style.textAlign="center",e.style.left="10%",e.style.zIndex=Number.MAX_SAFE_INTEGER.toString();let t=document.createElement("span");t.innerText=" (30)",e.append(t);let r=30;setInterval((function(){r--,r>=0&&(t.innerText=" ("+r.toString()+")")}),1e3),document.body.append(e)}case"gfx":{let e=document.createElement("div");e.innerHTML=v.gfx,e.style.position="absolute",e.style.bottom="20px",e.style.width="250px",e.style.left="50%",e.style.marginLeft="-125px",e.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),e.style.opacity="0",e.style.transition="opacity 0.5s",document.body.append(e),setTimeout((function(){e.style.opacity="1"}),500),setTimeout((function(){e.style.opacity="0"}),3e3),setTimeout((function(){e.remove()}),4e3)}}}),w=Object.assign(Object.assign({},t.impl),{loaded:()=>e,camera_default_device_id:e=>e?d.CameraSource.USER_DEFAULT_DEVICE_ID:d.CameraSource.DEFAULT_DEVICE_ID,camera_source_create:(e,t)=>g.createCameraSource(e,t),camera_source_destroy:e=>{var t;return null===(t=g.getCameraSource(e))||void 0===t?void 0:t.destroy()},camera_source_pause:e=>{var t;return null===(t=g.getCameraSource(e))||void 0===t?void 0:t.pause()},camera_source_start:e=>{var t;return null===(t=g.getCameraSource(e))||void 0===t?void 0:t.start()},pipeline_create:()=>_.Pipeline.create(t.impl,u.messageManager),pipeline_frame_update:e=>{var r;return null===(r=_.Pipeline.get(e))||void 0===r?void 0:r.frameUpdate(t)},pipeline_camera_frame_draw_gl:(e,t,r,n)=>{var i;null===(i=_.Pipeline.get(e))||void 0===i||i.cameraFrameDrawGL(t,r,n)},draw_plane:(e,t,r,n,i)=>{a.drawPlane(e,t,r,n,i)},pipeline_draw_face:(e,t,r,n,i)=>{var a;let o=f.getFaceMesh(i);if(!o)return p.zcwarn("attempting to call draw_face on a destroyed zappar_face_mesh_t"),new Uint16Array;null===(a=_.Pipeline.get(e))||void 0===a||a.drawFace(t,r,n,o)},pipeline_draw_face_project:(e,t,r,n,i,a,o)=>{var s;null===(s=_.Pipeline.get(e))||void 0===s||s.drawFaceProject(t,r,n,i,a,o)},projection_matrix_from_camera_model:o.projectionMatrix,projection_matrix_from_camera_model_ext:o.projectionMatrix,pipeline_process_gl:e=>{var t;return null===(t=_.Pipeline.get(e))||void 0===t?void 0:t.processGL()},pipeline_gl_context_set:(e,t,r)=>{var n;return null===(n=_.Pipeline.get(e))||void 0===n?void 0:n.glContextSet(t,r)},pipeline_gl_context_lost:e=>{var t;return null===(t=_.Pipeline.get(e))||void 0===t?void 0:t.glContextLost()},pipeline_camera_frame_upload_gl:e=>{var t;return null===(t=_.Pipeline.get(e))||void 0===t?void 0:t.uploadGL()},pipeline_camera_frame_texture_gl:e=>{var t;return null===(t=_.Pipeline.get(e))||void 0===t?void 0:t.cameraFrameTexture()},pipeline_camera_frame_texture_matrix:(e,t,r,n)=>{var i;return(null===(i=_.Pipeline.get(e))||void 0===i?void 0:i.cameraFrameTextureMatrix(t,r,n))||s.mat4.create()},pipeline_camera_frame_user_facing:e=>{var t;return(null===(t=_.Pipeline.get(e))||void 0===t?void 0:t.cameraFrameUserFacing())||!1},pipeline_camera_pose_default:()=>s.mat4.create(),pipeline_camera_pose_with_attitude:(e,t)=>{var r;return(null===(r=_.Pipeline.get(e))||void 0===r?void 0:r.cameraPoseWithAttitude(t))||s.mat4.create()},pipeline_camera_pose_with_origin:(e,t)=>{let r=s.mat4.create();return s.mat4.invert(r,t),r},pipeline_sequence_record_clear:e=>{var t;return null===(t=_.Pipeline.get(e))||void 0===t?void 0:t.sequenceRecordClear()},pipeline_sequence_record_start:(e,t)=>{var r;return null===(r=_.Pipeline.get(e))||void 0===r?void 0:r.sequenceRecordStart(t)},pipeline_sequence_record_stop:e=>{var t;return null===(t=_.Pipeline.get(e))||void 0===t?void 0:t.sequenceRecordStop()},pipeline_sequence_record_device_attitude_matrices_set:(e,t)=>{var r;return null===(r=_.Pipeline.get(e))||void 0===r?void 0:r.sequenceRecordDeviceAttitudeMatrices(t)},pipeline_sequence_record_data:e=>{var t;return(null===(t=_.Pipeline.get(e))||void 0===t?void 0:t.sequenceRecordData())||new Uint8Array(0)},pipeline_sequence_record_data_size:e=>{var t;return(null===(t=_.Pipeline.get(e))||void 0===t?void 0:t.sequenceRecordData().byteLength)||0},instant_world_tracker_anchor_pose_camera_relative:(e,r)=>{let n=_.applyScreenCounterRotation(void 0,t.impl.instant_world_tracker_anchor_pose_raw(e));if(r){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(n,e,n),s.mat4.multiply(n,n,e)}return n},instant_world_tracker_anchor_pose:(e,r,n)=>{let i=_.applyScreenCounterRotation(void 0,t.impl.instant_world_tracker_anchor_pose_raw(e));if(n){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(i,e,i),s.mat4.multiply(i,i,e)}return s.mat4.multiply(i,r,i),i},instant_world_tracker_anchor_pose_set_from_camera_offset:(e,r,n,i,a)=>{let u=o.cameraRotationForScreenOrientation(!1)*Math.PI/180,c=s.mat4.create();s.mat4.fromRotation(c,-u,[0,0,1]);let f=s.vec3.create();s.vec3.transformMat4(f,[r,n,i],c),t.impl.instant_world_tracker_anchor_pose_set_from_camera_offset_raw(e,f[0],f[1],f[2],a)},image_tracker_anchor_pose_camera_relative:(e,r,n)=>{let i=_.applyScreenCounterRotation(void 0,t.impl.image_tracker_anchor_pose_raw(e,r));if(n){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(i,e,i),s.mat4.multiply(i,i,e)}return i},image_tracker_anchor_pose:(e,r,n,i)=>{let a=_.applyScreenCounterRotation(void 0,t.impl.image_tracker_anchor_pose_raw(e,r));if(i){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(a,e,a),s.mat4.multiply(a,a,e)}return s.mat4.multiply(a,n,a),a},face_tracker_anchor_pose_camera_relative:(e,r,n)=>{let i=_.applyScreenCounterRotation(void 0,t.impl.face_tracker_anchor_pose_raw(e,r));if(n){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(i,e,i),s.mat4.multiply(i,i,e)}return i},face_tracker_anchor_pose:(e,r,n,i)=>{let a=_.applyScreenCounterRotation(void 0,t.impl.face_tracker_anchor_pose_raw(e,r));if(i){let e=s.mat4.create();s.mat4.fromScaling(e,[-1,1,1]),s.mat4.multiply(a,e,a),s.mat4.multiply(a,a,e)}return s.mat4.multiply(a,n,a),a},face_tracker_model_load_default:e=>n(this,void 0,void 0,(function*(){yield function(e){return n(this,void 0,void 0,(function*(){let t=r(43);void 0!==t.default&&(t=t.default);let n=yield fetch(t),i=yield n.arrayBuffer();null==w||w.face_tracker_model_load_from_memory(e,i)}))}(e)})),face_mesh_create:()=>f.createFaceMesh(),face_mesh_destroy:e=>{f.destroyFaceMesh(e)},face_mesh_indices:e=>{let t=f.getFaceMesh(e);return t?t.getIndices():(p.zcwarn("attempting to call face_mesh_indices on a destroyed zappar_face_mesh_t"),new Uint16Array)},face_mesh_indices_size:e=>{let t=f.getFaceMesh(e);return t?t.getIndices().length:(p.zcwarn("attempting to call face_mesh_indices_size on a destroyed zappar_face_mesh_t"),0)},face_mesh_uvs:e=>{let t=f.getFaceMesh(e);return t?t.getUVs():(p.zcwarn("attempting to call face_mesh_uvs on a destroyed zappar_face_mesh_t"),new Float32Array)},face_mesh_uvs_size:e=>{let t=f.getFaceMesh(e);return t?t.getUVs().length:(p.zcwarn("attempting to call face_mesh_uvs_size on a destroyed zappar_face_mesh_t"),0)},face_mesh_vertices:e=>{let t=f.getFaceMesh(e);return t?t.getVertices():(p.zcwarn("attempting to call face_mesh_vertices on a destroyed zappar_face_mesh_t"),new Float32Array)},face_mesh_vertices_size:e=>{let t=f.getFaceMesh(e);return t?t.getVertices().length:(p.zcwarn("attempting to call face_mesh_vertices_size on a destroyed zappar_face_mesh_t"),0)},face_mesh_normals:e=>{let t=f.getFaceMesh(e);return t?t.getNormals():(p.zcwarn("attempting to call face_mesh_normals on a destroyed zappar_face_mesh_t"),new Float32Array)},face_mesh_normals_size:e=>{let t=f.getFaceMesh(e);return t?t.getNormals().length:(p.zcwarn("attempting to call face_mesh_normals_size on a destroyed zappar_face_mesh_t"),0)},face_mesh_load_from_memory:(e,t,r,n,i,a)=>{let o=f.getFaceMesh(e);o?o.loadFromMemory(t,r,n,i,a):p.zcwarn("attempting to call face_mesh_load_from_memory on a destroyed zappar_face_mesh_t")},face_mesh_update:(e,t,r,n)=>{let i=f.getFaceMesh(e);i?i.update(t,r,n):p.zcwarn("attempting to call face_mesh_update on a destroyed zappar_face_mesh_t")},face_mesh_load_default:e=>n(this,void 0,void 0,(function*(){let t=f.getFaceMesh(e);if(!t)return void p.zcwarn("attempting to call face_mesh_load_default on a destroyed zappar_face_mesh_t");let n=r(16);void 0!==n.default&&(n=n.default);let i=yield fetch(n);t.loadFromMemory(yield i.arrayBuffer(),!1,!1,!1,!1)})),face_mesh_load_default_face:(e,t,i,a)=>n(this,void 0,void 0,(function*(){let n=f.getFaceMesh(e);if(!n)return void p.zcwarn("attempting to call face_mesh_load_default_face on a destroyed zappar_face_mesh_t");let o=r(16);void 0!==o.default&&(o=o.default);let s=yield fetch(o);n.loadFromMemory(yield s.arrayBuffer(),t,i,a,!1)})),face_mesh_load_default_full_head_simplified:(e,t,i,a,o)=>n(this,void 0,void 0,(function*(){let n=f.getFaceMesh(e);if(!n)return void p.zcwarn("attempting to call face_mesh_load_default_full_head_simplified on a destroyed zappar_face_mesh_t");let s=r(42);void 0!==s.default&&(s=s.default);let u=yield fetch(s);n.loadFromMemory(yield u.arrayBuffer(),t,i,a,o)})),face_mesh_loaded_version:e=>{let t=f.getFaceMesh(e);return t?t.getModelVersion():(p.zcwarn("attempting to call face_mesh_load_default on a destroyed zappar_face_mesh_t"),-1)},face_landmark_create:e=>h.createFaceLandmark(e),face_landmark_destroy:e=>{h.destroyFaceLandmark(e)},face_landmark_update:(e,t,r,n)=>{let i=h.getFaceLandmark(e);i?i.update(t,r,n):p.zcwarn("attempting to call face_landmark_update on a destroyed zappar_face_landmark_t")},face_landmark_anchor_pose:e=>{let t=h.getFaceLandmark(e);return t?t.anchor_pose:(p.zcwarn("attempting to call face_landmark_anchor_pose on a destroyed zappar_face_landmark_t"),s.mat4.create())},html_element_source_create:(e,t)=>l.HTMLElementSource.createVideoElementSource(e,t),html_element_source_start:e=>{var t;return null===(t=l.HTMLElementSource.getVideoElementSource(e))||void 0===t?void 0:t.start()},html_element_source_pause:e=>{var t;return null===(t=l.HTMLElementSource.getVideoElementSource(e))||void 0===t?void 0:t.pause()},html_element_source_destroy:e=>{var t;return null===(t=l.HTMLElementSource.getVideoElementSource(e))||void 0===t?void 0:t.destroy()},sequence_source_create:e=>b.SequenceSource.create(e),sequence_source_load_from_memory:(e,t)=>{var r;return null===(r=b.SequenceSource.get(e))||void 0===r?void 0:r.loadFromMemory(t)},sequence_source_pause:e=>{var t;return null===(t=b.SequenceSource.get(e))||void 0===t?void 0:t.pause()},sequence_source_start:e=>{var t;return null===(t=b.SequenceSource.get(e))||void 0===t?void 0:t.start()},sequence_source_max_playback_fps_set:(e,t)=>{var r;return null===(r=b.SequenceSource.get(e))||void 0===r?void 0:r.maxPlaybackFpsSet(t)},sequence_source_destroy:e=>{var t;return null===(t=b.SequenceSource.get(e))||void 0===t?void 0:t.destroy()},permission_granted_all:c.permissionGrantedAll,permission_granted_camera:c.permissionGrantedCamera,permission_granted_motion:c.permissionGrantedMotion,permission_denied_any:c.permissionDeniedAny,permission_denied_camera:c.permissionDeniedCamera,permission_denied_motion:c.permissionDeniedMotion,permission_request_motion:c.permissionRequestMotion,permission_request_camera:c.permissionRequestCamera,permission_request_all:c.permissionRequestAll,permission_request_ui:c.permissionRequestUI,permission_request_ui_promise:c.permissionRequestUI,permission_denied_ui:c.permissionDeniedUI,browser_incompatible:m.default.incompatible,browser_incompatible_ui:m.default.incompatible_ui,log_level_set:e=>{p.setLogLevel(e),t.impl.log_level_set(e)}}),w}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zappar_client=void 0;const n=r(21),i=r(22);t.zappar_client=class{constructor(e){this._messageSender=e,this._globalState={log_level:1},this.serializer=new n.MessageSerializer(e=>{this._messageSender(e)}),this.deserializer=new i.MessageDeserializer,this._latestId=1,this._pipeline_state_by_instance=new Map,this._camera_source_state_by_instance=new Map,this._sequence_source_state_by_instance=new Map,this._image_tracker_state_by_instance=new Map,this._face_tracker_state_by_instance=new Map,this._face_mesh_state_by_instance=new Map,this._face_landmark_state_by_instance=new Map,this._barcode_finder_state_by_instance=new Map,this._instant_world_tracker_state_by_instance=new Map,this.impl={log_level:()=>this._globalState.log_level,log_level_set:e=>{this.serializer.sendMessage(34,t=>{t.logLevel(e)})},analytics_project_id_set:e=>{this.serializer.sendMessage(31,t=>{t.string(e)})},pipeline_create:()=>{let e=this._latestId++,t={current_frame_user_data:0,camera_model:new Float32Array([300,300,160,120,0,0]),camera_pose:new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),camera_frame_camera_attitude:new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),camera_frame_device_attitude:new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),frame_number:0};return this._pipeline_state_by_instance.set(e,t),this.serializer.sendMessage(27,t=>{t.type(e)}),e},pipeline_destroy:e=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this._pipeline_state_by_instance.delete(e),this.serializer.sendMessage(28,t=>{t.type(e)})},pipeline_frame_update:e=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(9,t=>{t.type(e)})},pipeline_frame_number:e=>{let t=this._pipeline_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.frame_number},pipeline_camera_model:e=>{let t=this._pipeline_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.camera_model},pipeline_camera_frame_user_data:e=>{let t=this._pipeline_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.current_frame_user_data},pipeline_camera_frame_submit:(e,t,r,n,i,a,o,s)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(8,u=>{u.type(e),u.dataWithLength(t),u.int(r),u.int(n),u.int(i),u.matrix4x4(a),u.cameraModel(o),u.bool(s)})},pipeline_camera_frame_submit_raw_pointer:(e,t,r,n,i,a,o,s,u,c,f)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed")},pipeline_camera_frame_camera_attitude:e=>{let t=this._pipeline_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.camera_frame_camera_attitude},pipeline_camera_frame_device_attitude:e=>{let t=this._pipeline_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.camera_frame_device_attitude},pipeline_motion_accelerometer_submit:(e,t,r,n,i)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(10,a=>{a.type(e),a.timestamp(t),a.float(r),a.float(n),a.float(i)})},pipeline_motion_rotation_rate_submit:(e,t,r,n,i)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(11,a=>{a.type(e),a.timestamp(t),a.float(r),a.float(n),a.float(i)})},pipeline_motion_attitude_submit:(e,t,r,n,i)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(12,a=>{a.type(e),a.timestamp(t),a.float(r),a.float(n),a.float(i)})},pipeline_motion_attitude_matrix_submit:(e,t)=>{if(!this._pipeline_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(13,r=>{r.type(e),r.matrix4x4(t)})},camera_source_create:(e,t)=>{let r=this._latestId++;return this._camera_source_state_by_instance.set(r,{}),this.serializer.sendMessage(29,n=>{n.type(r),n.type(e),n.string(t)}),r},camera_source_destroy:e=>{if(!this._camera_source_state_by_instance.get(e))throw new Error("This object has been destroyed");this._camera_source_state_by_instance.delete(e),this.serializer.sendMessage(30,t=>{t.type(e)})},sequence_source_create:e=>{let t=this._latestId++;return this._sequence_source_state_by_instance.set(t,{}),this.serializer.sendMessage(35,r=>{r.type(t),r.type(e)}),t},sequence_source_destroy:e=>{if(!this._sequence_source_state_by_instance.get(e))throw new Error("This object has been destroyed");this._sequence_source_state_by_instance.delete(e),this.serializer.sendMessage(36,t=>{t.type(e)})},image_tracker_create:e=>{let t=this._latestId++;return this._image_tracker_state_by_instance.set(t,{enabled:!0,target_loaded_version:-1,target_count:0,anchor_count:0,anchor_id:[],anchor_pose:[]}),this.serializer.sendMessage(2,r=>{r.type(t),r.type(e)}),t},image_tracker_destroy:e=>{if(!this._image_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this._image_tracker_state_by_instance.delete(e),this.serializer.sendMessage(14,t=>{t.type(e)})},image_tracker_target_load_from_memory:(e,t)=>{if(!this._image_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(4,r=>{r.type(e),r.dataWithLength(t)})},image_tracker_target_loaded_version:e=>{let t=this._image_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.target_loaded_version},image_tracker_target_count:e=>{let t=this._image_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.target_count},image_tracker_enabled:e=>{let t=this._image_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.enabled},image_tracker_enabled_set:(e,t)=>{if(!this._image_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(3,r=>{r.type(e),r.bool(t)})},image_tracker_anchor_count:e=>{let t=this._image_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.anchor_count},image_tracker_anchor_id:(e,t)=>{let r=this._image_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_id[t]},image_tracker_anchor_pose_raw:(e,t)=>{let r=this._image_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_pose[t]},face_tracker_create:e=>{let t=this._latestId++;return this._face_tracker_state_by_instance.set(t,{enabled:!0,model_loaded:-1,max_faces:1,anchor_count:0,anchor_id:[],anchor_pose:[],anchor_identity_coefficients:[],anchor_expression_coefficients:[]}),this.serializer.sendMessage(20,r=>{r.type(t),r.type(e)}),t},face_tracker_destroy:e=>{if(!this._face_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this._face_tracker_state_by_instance.delete(e),this.serializer.sendMessage(21,t=>{t.type(e)})},face_tracker_model_load_from_memory:(e,t)=>{if(!this._face_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(22,r=>{r.type(e),r.dataWithLength(t)})},face_tracker_model_loaded_version:e=>{let t=this._face_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.model_loaded},face_tracker_enabled_set:(e,t)=>{if(!this._face_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(23,r=>{r.type(e),r.bool(t)})},face_tracker_enabled:e=>{let t=this._face_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.enabled},face_tracker_max_faces_set:(e,t)=>{if(!this._face_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(24,r=>{r.type(e),r.int(t)})},face_tracker_max_faces:e=>{let t=this._face_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.max_faces},face_tracker_anchor_count:e=>{let t=this._face_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.anchor_count},face_tracker_anchor_id:(e,t)=>{let r=this._face_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_id[t]},face_tracker_anchor_pose_raw:(e,t)=>{let r=this._face_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_pose[t]},face_tracker_anchor_identity_coefficients:(e,t)=>{let r=this._face_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_identity_coefficients[t]},face_tracker_anchor_expression_coefficients:(e,t)=>{let r=this._face_tracker_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.anchor_expression_coefficients[t]},face_mesh_create:()=>{let e=this._latestId++;return this._face_mesh_state_by_instance.set(e,{}),this.serializer.sendMessage(25,t=>{t.type(e)}),e},face_mesh_destroy:e=>{if(!this._face_mesh_state_by_instance.get(e))throw new Error("This object has been destroyed");this._face_mesh_state_by_instance.delete(e),this.serializer.sendMessage(26,t=>{t.type(e)})},face_landmark_create:e=>{let t=this._latestId++;return this._face_landmark_state_by_instance.set(t,{}),this.serializer.sendMessage(32,r=>{r.type(t),r.faceLandmarkName(e)}),t},face_landmark_destroy:e=>{if(!this._face_landmark_state_by_instance.get(e))throw new Error("This object has been destroyed");this._face_landmark_state_by_instance.delete(e),this.serializer.sendMessage(33,t=>{t.type(e)})},barcode_finder_create:e=>{let t=this._latestId++;return this._barcode_finder_state_by_instance.set(t,{enabled:!0,number_found:0,found_text:[],found_format:[],formats:131071}),this.serializer.sendMessage(16,r=>{r.type(t),r.type(e)}),t},barcode_finder_destroy:e=>{if(!this._barcode_finder_state_by_instance.get(e))throw new Error("This object has been destroyed");this._barcode_finder_state_by_instance.delete(e),this.serializer.sendMessage(17,t=>{t.type(e)})},barcode_finder_enabled_set:(e,t)=>{if(!this._barcode_finder_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(18,r=>{r.type(e),r.bool(t)})},barcode_finder_enabled:e=>{let t=this._barcode_finder_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.enabled},barcode_finder_found_number:e=>{let t=this._barcode_finder_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.number_found},barcode_finder_found_text:(e,t)=>{let r=this._barcode_finder_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.found_text[t]},barcode_finder_found_format:(e,t)=>{let r=this._barcode_finder_state_by_instance.get(e);if(!r)throw new Error("This object has been destroyed");return r.found_format[t]},barcode_finder_formats:e=>{let t=this._barcode_finder_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.formats},barcode_finder_formats_set:(e,t)=>{if(!this._barcode_finder_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(19,r=>{r.type(e),r.barcodeFormat(t)})},instant_world_tracker_create:e=>{let t=this._latestId++,r={enabled:!0,pose:new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};return this._instant_world_tracker_state_by_instance.set(t,r),this.serializer.sendMessage(5,r=>{r.type(t),r.type(e)}),t},instant_world_tracker_destroy:e=>{if(!this._instant_world_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this._instant_world_tracker_state_by_instance.delete(e),this.serializer.sendMessage(15,t=>{t.type(e)})},instant_world_tracker_enabled_set:(e,t)=>{if(!this._instant_world_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(6,r=>{r.type(e),r.bool(t)})},instant_world_tracker_enabled:e=>{let t=this._instant_world_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.enabled},instant_world_tracker_anchor_pose_raw:e=>{let t=this._instant_world_tracker_state_by_instance.get(e);if(!t)throw new Error("This object has been destroyed");return t.pose},instant_world_tracker_anchor_pose_set_from_camera_offset_raw:(e,t,r,n,i)=>{if(!this._instant_world_tracker_state_by_instance.get(e))throw new Error("This object has been destroyed");this.serializer.sendMessage(7,a=>{a.type(e),a.float(t),a.float(r),a.float(n),a.instantTrackerTransformOrientation(i)})}}}processMessages(e){this.deserializer.setData(e),this.deserializer.forMessages((e,t)=>{switch(e){case 7:{let e=t.type(),r=this._pipeline_state_by_instance.get(e);if(!r)return;r.frame_number=t.int();break}case 6:{let e=t.type(),r=this._pipeline_state_by_instance.get(e);if(!r)return;r.camera_model=t.cameraModel();break}case 5:{let e=t.type(),r=this._pipeline_state_by_instance.get(e);if(!r)return;r.current_frame_user_data=t.int();break}case 11:{let e=t.type(),r=this._pipeline_state_by_instance.get(e);if(!r)return;r.camera_frame_camera_attitude=t.matrix4x4();break}case 12:{let e=t.type(),r=this._pipeline_state_by_instance.get(e);if(!r)return;r.camera_frame_device_attitude=t.matrix4x4();break}case 19:{let e=t.type(),r=this._image_tracker_state_by_instance.get(e);if(!r)return;r.target_loaded_version=t.int();break}case 21:{let e=t.type(),r=this._image_tracker_state_by_instance.get(e);if(!r)return;r.target_count=t.int();break}case 1:{let e=t.type(),r=this._image_tracker_state_by_instance.get(e);if(!r)return;r.anchor_count=t.int();break}case 2:{let e=t.type(),r=this._image_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_id[n]=t.string();break}case 3:{let e=t.type(),r=this._image_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_pose[n]=t.matrix4x4();break}case 18:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;r.model_loaded=t.int();break}case 13:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;r.anchor_count=t.int();break}case 14:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_id[n]=t.string();break}case 15:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_pose[n]=t.matrix4x4();break}case 16:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_identity_coefficients[n]=t.identityCoefficients();break}case 17:{let e=t.type(),r=this._face_tracker_state_by_instance.get(e);if(!r)return;let n=t.int();r.anchor_expression_coefficients[n]=t.expressionCoefficients();break}case 8:{let e=t.type(),r=this._barcode_finder_state_by_instance.get(e);if(!r)return;r.number_found=t.int();break}case 9:{let e=t.type(),r=this._barcode_finder_state_by_instance.get(e);if(!r)return;let n=t.int();r.found_text[n]=t.string();break}case 10:{let e=t.type(),r=this._barcode_finder_state_by_instance.get(e);if(!r)return;let n=t.int();r.found_format[n]=t.barcodeFormat();break}case 4:{let e=t.type(),r=this._instant_world_tracker_state_by_instance.get(e);if(!r)return;r.pose=t.matrix4x4();break}}})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageSerializer=void 0;t.MessageSerializer=class{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=4*(this._offset+e+8);if(this._buffer&&this._buffer.byteLength>=t)return;let r=void 0;if(!r){let e=t;e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,r=new ArrayBuffer(e)}let n=this._buffer?this._i32View:void 0;this._buffer=r,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),n&&this._i32View.set(n.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++}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDeserializer=void 0;t.MessageDeserializer=class{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)}}}},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.launchWorker=t.messageManager=void 0;const i=r(24);let a;t.messageManager=new i.MsgManager,a=r(25),a.default&&(a=a.default),t.launchWorker=function(){return n(this,void 0,void 0,(function*(){let e=new a;var n;function i(){let r=t.messageManager.getOutgoingMessages();for(let t of r)e.postMessage(t.msg,t.transferables)}e.postMessage({t:"wasm",url:r(26).default}),yield(n=e,new Promise(e=>{let t=r=>{"loaded"===r.data&&(n.removeEventListener("message",t),e())};n.addEventListener("message",t)})),t.messageManager.onOutgoingMessage.bind(i),i(),e.addEventListener("message",e=>{t.messageManager.postIncomingMessage(e.data)})}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgManager=void 0;const n=r(10);t.MsgManager=class{constructor(){this.onOutgoingMessage=new n.Event,this.onIncomingMessage=new n.Event1,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}}},function(e,t,r){"use strict";r.r(t);var n=r(17),i=r.n(n);t.default=function(){return i()('!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.profile=t.EmbeddedVideoImplementation=void 0;const n=r(19);!function(e){e[e.OBJECT_URL=0]="OBJECT_URL",e[e.SRC_OBJECT=1]="SRC_OBJECT"}(t.EmbeddedVideoImplementation||(t.EmbeddedVideoImplementation={})),t.profile={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=t.profile,window.location.href.indexOf("_mstppipeline")>=0&&(console.log("Configuring for MSTP camera pipeline (if supported)"),t.profile.preferMediaStreamTrackProcessorCamera=!0),window.location.href.indexOf("_imagebitmappipeline")>=0&&(console.log("Configuring for ImageBitmap camera pipeline (if supported)"),t.profile.preferImageBitmapCamera=!0));let a=new n.UAParser,i=(a.getOS().name||"unknown").toLowerCase(),o=(a.getEngine().name||"unknown").toLowerCase();function u(){let e=a.getOS().version;if(e){let r=e.split(".");if(r.length>=2){const e=parseInt(r[0]),n=parseInt(r[1]);(e<11||11===e&&n<3)&&(t.profile.blacklisted=!0),(e<12||12===e&&n<2)&&(t.profile.videoElementInDOM=!0),(12===e&&n>=2||e>=13)&&(t.profile.showGyroPermissionsWarningIfNecessary=!0),e>=13&&(t.profile.showSafariPermissionsResetIfNecessary=!0),(e>=12&&n>1||e>=13)&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&navigator.mediaDevices.getSupportedConstraints().frameRate&&(t.profile.requestHighFrameRate=!0,e<14&&(t.profile.videoHeight=360,t.profile.dataHeight=180))}}}"webkit"===o&&"ios"!==i&&(t.profile.deviceMotionMutliplier=1,"undefined"!=typeof window&&void 0!==window.orientation&&u()),"webkit"===o&&"ios"===i&&(t.profile.deviceMotionMutliplier=1,u())},function(e,t,r){"use strict";r.r(t),r.d(t,"glMatrix",(function(){return n})),r.d(t,"mat2",(function(){return a})),r.d(t,"mat2d",(function(){return i})),r.d(t,"mat3",(function(){return o})),r.d(t,"mat4",(function(){return u})),r.d(t,"quat",(function(){return f})),r.d(t,"quat2",(function(){return _})),r.d(t,"vec2",(function(){return d})),r.d(t,"vec3",(function(){return s})),r.d(t,"vec4",(function(){return c}));var n={};r.r(n),r.d(n,"EPSILON",(function(){return l})),r.d(n,"ARRAY_TYPE",(function(){return h})),r.d(n,"RANDOM",(function(){return p})),r.d(n,"setMatrixArrayType",(function(){return m})),r.d(n,"toRadian",(function(){return w})),r.d(n,"equals",(function(){return g}));var a={};r.r(a),r.d(a,"create",(function(){return v})),r.d(a,"clone",(function(){return y})),r.d(a,"copy",(function(){return M})),r.d(a,"identity",(function(){return E})),r.d(a,"fromValues",(function(){return A})),r.d(a,"set",(function(){return x})),r.d(a,"transpose",(function(){return k})),r.d(a,"invert",(function(){return T})),r.d(a,"adjoint",(function(){return R})),r.d(a,"determinant",(function(){return F})),r.d(a,"multiply",(function(){return L})),r.d(a,"rotate",(function(){return z})),r.d(a,"scale",(function(){return O})),r.d(a,"fromRotation",(function(){return I})),r.d(a,"fromScaling",(function(){return S})),r.d(a,"str",(function(){return P})),r.d(a,"frob",(function(){return B})),r.d(a,"LDU",(function(){return D})),r.d(a,"add",(function(){return U})),r.d(a,"subtract",(function(){return C})),r.d(a,"exactEquals",(function(){return V})),r.d(a,"equals",(function(){return N})),r.d(a,"multiplyScalar",(function(){return q})),r.d(a,"multiplyScalarAndAdd",(function(){return X})),r.d(a,"mul",(function(){return Y})),r.d(a,"sub",(function(){return G}));var i={};r.r(i),r.d(i,"create",(function(){return W})),r.d(i,"clone",(function(){return H})),r.d(i,"copy",(function(){return j})),r.d(i,"identity",(function(){return Z})),r.d(i,"fromValues",(function(){return $})),r.d(i,"set",(function(){return K})),r.d(i,"invert",(function(){return Q})),r.d(i,"determinant",(function(){return J})),r.d(i,"multiply",(function(){return ee})),r.d(i,"rotate",(function(){return te})),r.d(i,"scale",(function(){return re})),r.d(i,"translate",(function(){return ne})),r.d(i,"fromRotation",(function(){return ae})),r.d(i,"fromScaling",(function(){return ie})),r.d(i,"fromTranslation",(function(){return oe})),r.d(i,"str",(function(){return ue})),r.d(i,"frob",(function(){return se})),r.d(i,"add",(function(){return ce})),r.d(i,"subtract",(function(){return fe})),r.d(i,"multiplyScalar",(function(){return _e})),r.d(i,"multiplyScalarAndAdd",(function(){return de})),r.d(i,"exactEquals",(function(){return le})),r.d(i,"equals",(function(){return he})),r.d(i,"mul",(function(){return pe})),r.d(i,"sub",(function(){return me}));var o={};r.r(o),r.d(o,"create",(function(){return be})),r.d(o,"fromMat4",(function(){return we})),r.d(o,"clone",(function(){return ge})),r.d(o,"copy",(function(){return ve})),r.d(o,"fromValues",(function(){return ye})),r.d(o,"set",(function(){return Me})),r.d(o,"identity",(function(){return Ee})),r.d(o,"transpose",(function(){return Ae})),r.d(o,"invert",(function(){return xe})),r.d(o,"adjoint",(function(){return ke})),r.d(o,"determinant",(function(){return Te})),r.d(o,"multiply",(function(){return Re})),r.d(o,"translate",(function(){return Fe})),r.d(o,"rotate",(function(){return Le})),r.d(o,"scale",(function(){return ze})),r.d(o,"fromTranslation",(function(){return Oe})),r.d(o,"fromRotation",(function(){return Ie})),r.d(o,"fromScaling",(function(){return Se})),r.d(o,"fromMat2d",(function(){return Pe})),r.d(o,"fromQuat",(function(){return Be})),r.d(o,"normalFromMat4",(function(){return De})),r.d(o,"projection",(function(){return Ue})),r.d(o,"str",(function(){return Ce})),r.d(o,"frob",(function(){return Ve})),r.d(o,"add",(function(){return Ne})),r.d(o,"subtract",(function(){return qe})),r.d(o,"multiplyScalar",(function(){return Xe})),r.d(o,"multiplyScalarAndAdd",(function(){return Ye})),r.d(o,"exactEquals",(function(){return Ge})),r.d(o,"equals",(function(){return We})),r.d(o,"mul",(function(){return He})),r.d(o,"sub",(function(){return je}));var u={};r.r(u),r.d(u,"create",(function(){return Ze})),r.d(u,"clone",(function(){return $e})),r.d(u,"copy",(function(){return Ke})),r.d(u,"fromValues",(function(){return Qe})),r.d(u,"set",(function(){return Je})),r.d(u,"identity",(function(){return et})),r.d(u,"transpose",(function(){return tt})),r.d(u,"invert",(function(){return rt})),r.d(u,"adjoint",(function(){return nt})),r.d(u,"determinant",(function(){return at})),r.d(u,"multiply",(function(){return it})),r.d(u,"translate",(function(){return ot})),r.d(u,"scale",(function(){return ut})),r.d(u,"rotate",(function(){return st})),r.d(u,"rotateX",(function(){return ct})),r.d(u,"rotateY",(function(){return ft})),r.d(u,"rotateZ",(function(){return _t})),r.d(u,"fromTranslation",(function(){return dt})),r.d(u,"fromScaling",(function(){return lt})),r.d(u,"fromRotation",(function(){return ht})),r.d(u,"fromXRotation",(function(){return pt})),r.d(u,"fromYRotation",(function(){return mt})),r.d(u,"fromZRotation",(function(){return bt})),r.d(u,"fromRotationTranslation",(function(){return wt})),r.d(u,"fromQuat2",(function(){return gt})),r.d(u,"getTranslation",(function(){return vt})),r.d(u,"getScaling",(function(){return yt})),r.d(u,"getRotation",(function(){return Mt})),r.d(u,"fromRotationTranslationScale",(function(){return Et})),r.d(u,"fromRotationTranslationScaleOrigin",(function(){return At})),r.d(u,"fromQuat",(function(){return xt})),r.d(u,"frustum",(function(){return kt})),r.d(u,"perspective",(function(){return Tt})),r.d(u,"perspectiveFromFieldOfView",(function(){return Rt})),r.d(u,"ortho",(function(){return Ft})),r.d(u,"lookAt",(function(){return Lt})),r.d(u,"targetTo",(function(){return zt})),r.d(u,"str",(function(){return Ot})),r.d(u,"frob",(function(){return It})),r.d(u,"add",(function(){return St})),r.d(u,"subtract",(function(){return Pt})),r.d(u,"multiplyScalar",(function(){return Bt})),r.d(u,"multiplyScalarAndAdd",(function(){return Dt})),r.d(u,"exactEquals",(function(){return Ut})),r.d(u,"equals",(function(){return Ct})),r.d(u,"mul",(function(){return Vt})),r.d(u,"sub",(function(){return Nt}));var s={};r.r(s),r.d(s,"create",(function(){return qt})),r.d(s,"clone",(function(){return Xt})),r.d(s,"length",(function(){return Yt})),r.d(s,"fromValues",(function(){return Gt})),r.d(s,"copy",(function(){return Wt})),r.d(s,"set",(function(){return Ht})),r.d(s,"add",(function(){return jt})),r.d(s,"subtract",(function(){return Zt})),r.d(s,"multiply",(function(){return $t})),r.d(s,"divide",(function(){return Kt})),r.d(s,"ceil",(function(){return Qt})),r.d(s,"floor",(function(){return Jt})),r.d(s,"min",(function(){return er})),r.d(s,"max",(function(){return tr})),r.d(s,"round",(function(){return rr})),r.d(s,"scale",(function(){return nr})),r.d(s,"scaleAndAdd",(function(){return ar})),r.d(s,"distance",(function(){return ir})),r.d(s,"squaredDistance",(function(){return or})),r.d(s,"squaredLength",(function(){return ur})),r.d(s,"negate",(function(){return sr})),r.d(s,"inverse",(function(){return cr})),r.d(s,"normalize",(function(){return fr})),r.d(s,"dot",(function(){return _r})),r.d(s,"cross",(function(){return dr})),r.d(s,"lerp",(function(){return lr})),r.d(s,"hermite",(function(){return hr})),r.d(s,"bezier",(function(){return pr})),r.d(s,"random",(function(){return mr})),r.d(s,"transformMat4",(function(){return br})),r.d(s,"transformMat3",(function(){return wr})),r.d(s,"transformQuat",(function(){return gr})),r.d(s,"rotateX",(function(){return vr})),r.d(s,"rotateY",(function(){return yr})),r.d(s,"rotateZ",(function(){return Mr})),r.d(s,"angle",(function(){return Er})),r.d(s,"zero",(function(){return Ar})),r.d(s,"str",(function(){return xr})),r.d(s,"exactEquals",(function(){return kr})),r.d(s,"equals",(function(){return Tr})),r.d(s,"sub",(function(){return Fr})),r.d(s,"mul",(function(){return Lr})),r.d(s,"div",(function(){return zr})),r.d(s,"dist",(function(){return Or})),r.d(s,"sqrDist",(function(){return Ir})),r.d(s,"len",(function(){return Sr})),r.d(s,"sqrLen",(function(){return Pr})),r.d(s,"forEach",(function(){return Br}));var c={};r.r(c),r.d(c,"create",(function(){return Dr})),r.d(c,"clone",(function(){return Ur})),r.d(c,"fromValues",(function(){return Cr})),r.d(c,"copy",(function(){return Vr})),r.d(c,"set",(function(){return Nr})),r.d(c,"add",(function(){return qr})),r.d(c,"subtract",(function(){return Xr})),r.d(c,"multiply",(function(){return Yr})),r.d(c,"divide",(function(){return Gr})),r.d(c,"ceil",(function(){return Wr})),r.d(c,"floor",(function(){return Hr})),r.d(c,"min",(function(){return jr})),r.d(c,"max",(function(){return Zr})),r.d(c,"round",(function(){return $r})),r.d(c,"scale",(function(){return Kr})),r.d(c,"scaleAndAdd",(function(){return Qr})),r.d(c,"distance",(function(){return Jr})),r.d(c,"squaredDistance",(function(){return en})),r.d(c,"length",(function(){return tn})),r.d(c,"squaredLength",(function(){return rn})),r.d(c,"negate",(function(){return nn})),r.d(c,"inverse",(function(){return an})),r.d(c,"normalize",(function(){return on})),r.d(c,"dot",(function(){return un})),r.d(c,"cross",(function(){return sn})),r.d(c,"lerp",(function(){return cn})),r.d(c,"random",(function(){return fn})),r.d(c,"transformMat4",(function(){return _n})),r.d(c,"transformQuat",(function(){return dn})),r.d(c,"zero",(function(){return ln})),r.d(c,"str",(function(){return hn})),r.d(c,"exactEquals",(function(){return pn})),r.d(c,"equals",(function(){return mn})),r.d(c,"sub",(function(){return bn})),r.d(c,"mul",(function(){return wn})),r.d(c,"div",(function(){return gn})),r.d(c,"dist",(function(){return vn})),r.d(c,"sqrDist",(function(){return yn})),r.d(c,"len",(function(){return Mn})),r.d(c,"sqrLen",(function(){return En})),r.d(c,"forEach",(function(){return An}));var f={};r.r(f),r.d(f,"create",(function(){return xn})),r.d(f,"identity",(function(){return kn})),r.d(f,"setAxisAngle",(function(){return Tn})),r.d(f,"getAxisAngle",(function(){return Rn})),r.d(f,"getAngle",(function(){return Fn})),r.d(f,"multiply",(function(){return Ln})),r.d(f,"rotateX",(function(){return zn})),r.d(f,"rotateY",(function(){return On})),r.d(f,"rotateZ",(function(){return In})),r.d(f,"calculateW",(function(){return Sn})),r.d(f,"exp",(function(){return Pn})),r.d(f,"ln",(function(){return Bn})),r.d(f,"pow",(function(){return Dn})),r.d(f,"slerp",(function(){return Un})),r.d(f,"random",(function(){return Cn})),r.d(f,"invert",(function(){return Vn})),r.d(f,"conjugate",(function(){return Nn})),r.d(f,"fromMat3",(function(){return qn})),r.d(f,"fromEuler",(function(){return Xn})),r.d(f,"str",(function(){return Yn})),r.d(f,"clone",(function(){return Kn})),r.d(f,"fromValues",(function(){return Qn})),r.d(f,"copy",(function(){return Jn})),r.d(f,"set",(function(){return ea})),r.d(f,"add",(function(){return ta})),r.d(f,"mul",(function(){return ra})),r.d(f,"scale",(function(){return na})),r.d(f,"dot",(function(){return aa})),r.d(f,"lerp",(function(){return ia})),r.d(f,"length",(function(){return oa})),r.d(f,"len",(function(){return ua})),r.d(f,"squaredLength",(function(){return sa})),r.d(f,"sqrLen",(function(){return ca})),r.d(f,"normalize",(function(){return fa})),r.d(f,"exactEquals",(function(){return _a})),r.d(f,"equals",(function(){return da})),r.d(f,"rotationTo",(function(){return la})),r.d(f,"sqlerp",(function(){return ha})),r.d(f,"setAxes",(function(){return pa}));var _={};r.r(_),r.d(_,"create",(function(){return ma})),r.d(_,"clone",(function(){return ba})),r.d(_,"fromValues",(function(){return wa})),r.d(_,"fromRotationTranslationValues",(function(){return ga})),r.d(_,"fromRotationTranslation",(function(){return va})),r.d(_,"fromTranslation",(function(){return ya})),r.d(_,"fromRotation",(function(){return Ma})),r.d(_,"fromMat4",(function(){return Ea})),r.d(_,"copy",(function(){return Aa})),r.d(_,"identity",(function(){return xa})),r.d(_,"set",(function(){return ka})),r.d(_,"getReal",(function(){return Ta})),r.d(_,"getDual",(function(){return Ra})),r.d(_,"setReal",(function(){return Fa})),r.d(_,"setDual",(function(){return La})),r.d(_,"getTranslation",(function(){return za})),r.d(_,"translate",(function(){return Oa})),r.d(_,"rotateX",(function(){return Ia})),r.d(_,"rotateY",(function(){return Sa})),r.d(_,"rotateZ",(function(){return Pa})),r.d(_,"rotateByQuatAppend",(function(){return Ba})),r.d(_,"rotateByQuatPrepend",(function(){return Da})),r.d(_,"rotateAroundAxis",(function(){return Ua})),r.d(_,"add",(function(){return Ca})),r.d(_,"multiply",(function(){return Va})),r.d(_,"mul",(function(){return Na})),r.d(_,"scale",(function(){return qa})),r.d(_,"dot",(function(){return Xa})),r.d(_,"lerp",(function(){return Ya})),r.d(_,"invert",(function(){return Ga})),r.d(_,"conjugate",(function(){return Wa})),r.d(_,"length",(function(){return Ha})),r.d(_,"len",(function(){return ja})),r.d(_,"squaredLength",(function(){return Za})),r.d(_,"sqrLen",(function(){return $a})),r.d(_,"normalize",(function(){return Ka})),r.d(_,"str",(function(){return Qa})),r.d(_,"exactEquals",(function(){return Ja})),r.d(_,"equals",(function(){return ei}));var d={};r.r(d),r.d(d,"create",(function(){return ti})),r.d(d,"clone",(function(){return ri})),r.d(d,"fromValues",(function(){return ni})),r.d(d,"copy",(function(){return ai})),r.d(d,"set",(function(){return ii})),r.d(d,"add",(function(){return oi})),r.d(d,"subtract",(function(){return ui})),r.d(d,"multiply",(function(){return si})),r.d(d,"divide",(function(){return ci})),r.d(d,"ceil",(function(){return fi})),r.d(d,"floor",(function(){return _i})),r.d(d,"min",(function(){return di})),r.d(d,"max",(function(){return li})),r.d(d,"round",(function(){return hi})),r.d(d,"scale",(function(){return pi})),r.d(d,"scaleAndAdd",(function(){return mi})),r.d(d,"distance",(function(){return bi})),r.d(d,"squaredDistance",(function(){return wi})),r.d(d,"length",(function(){return gi})),r.d(d,"squaredLength",(function(){return vi})),r.d(d,"negate",(function(){return yi})),r.d(d,"inverse",(function(){return Mi})),r.d(d,"normalize",(function(){return Ei})),r.d(d,"dot",(function(){return Ai})),r.d(d,"cross",(function(){return xi})),r.d(d,"lerp",(function(){return ki})),r.d(d,"random",(function(){return Ti})),r.d(d,"transformMat2",(function(){return Ri})),r.d(d,"transformMat2d",(function(){return Fi})),r.d(d,"transformMat3",(function(){return Li})),r.d(d,"transformMat4",(function(){return zi})),r.d(d,"rotate",(function(){return Oi})),r.d(d,"angle",(function(){return Ii})),r.d(d,"zero",(function(){return Si})),r.d(d,"str",(function(){return Pi})),r.d(d,"exactEquals",(function(){return Bi})),r.d(d,"equals",(function(){return Di})),r.d(d,"len",(function(){return Ui})),r.d(d,"sub",(function(){return Ci})),r.d(d,"mul",(function(){return Vi})),r.d(d,"div",(function(){return Ni})),r.d(d,"dist",(function(){return qi})),r.d(d,"sqrDist",(function(){return Xi})),r.d(d,"sqrLen",(function(){return Yi})),r.d(d,"forEach",(function(){return Gi}));var l=1e-6,h="undefined"!=typeof Float32Array?Float32Array:Array,p=Math.random;function m(e){h=e}var b=Math.PI/180;function w(e){return e*b}function g(e,t){return Math.abs(e-t)<=l*Math.max(1,Math.abs(e),Math.abs(t))}function v(){var e=new h(4);return h!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function y(e){var t=new h(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function M(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function E(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function A(e,t,r,n){var a=new h(4);return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a}function x(e,t,r,n,a){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e}function k(e,t){if(e===t){var r=t[1];e[1]=t[2],e[2]=r}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function T(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r*i-a*n;return o?(o=1/o,e[0]=i*o,e[1]=-n*o,e[2]=-a*o,e[3]=r*o,e):null}function R(e,t){var r=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=r,e}function F(e){return e[0]*e[3]-e[2]*e[1]}function L(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=r[0],s=r[1],c=r[2],f=r[3];return e[0]=n*u+i*s,e[1]=a*u+o*s,e[2]=n*c+i*f,e[3]=a*c+o*f,e}function z(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=Math.sin(r),s=Math.cos(r);return e[0]=n*s+i*u,e[1]=a*s+o*u,e[2]=n*-u+i*s,e[3]=a*-u+o*s,e}function O(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=r[0],s=r[1];return e[0]=n*u,e[1]=a*u,e[2]=i*s,e[3]=o*s,e}function I(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=-r,e[3]=n,e}function S(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e}function P(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function B(e){return Math.hypot(e[0],e[1],e[2],e[3])}function D(e,t,r,n){return e[2]=n[2]/n[0],r[0]=n[0],r[1]=n[1],r[3]=n[3]-e[2]*r[1],[e,t,r]}function U(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function C(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function V(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function N(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=t[0],u=t[1],s=t[2],c=t[3];return Math.abs(r-o)<=l*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-u)<=l*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(a-s)<=l*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(i-c)<=l*Math.max(1,Math.abs(i),Math.abs(c))}function q(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function X(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var Y=L,G=C;function W(){var e=new h(6);return h!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function H(e){var t=new h(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function j(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Z(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function $(e,t,r,n,a,i){var o=new h(6);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o[4]=a,o[5]=i,o}function K(e,t,r,n,a,i,o){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=i,e[5]=o,e}function Q(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=r*i-n*a;return s?(s=1/s,e[0]=i*s,e[1]=-n*s,e[2]=-a*s,e[3]=r*s,e[4]=(a*u-i*o)*s,e[5]=(n*o-r*u)*s,e):null}function J(e){return e[0]*e[3]-e[1]*e[2]}function ee(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=r[0],f=r[1],_=r[2],d=r[3],l=r[4],h=r[5];return e[0]=n*c+i*f,e[1]=a*c+o*f,e[2]=n*_+i*d,e[3]=a*_+o*d,e[4]=n*l+i*h+u,e[5]=a*l+o*h+s,e}function te(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=Math.sin(r),f=Math.cos(r);return e[0]=n*f+i*c,e[1]=a*f+o*c,e[2]=n*-c+i*f,e[3]=a*-c+o*f,e[4]=u,e[5]=s,e}function re(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=r[0],f=r[1];return e[0]=n*c,e[1]=a*c,e[2]=i*f,e[3]=o*f,e[4]=u,e[5]=s,e}function ne(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=r[0],f=r[1];return e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=n*c+i*f+u,e[5]=a*c+o*f+s,e}function ae(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=-r,e[3]=n,e[4]=0,e[5]=0,e}function ie(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function oe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function ue(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function se(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],1)}function ce(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e}function fe(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e}function _e(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e}function de(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e}function le(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function he(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=e[4],u=e[5],s=t[0],c=t[1],f=t[2],_=t[3],d=t[4],h=t[5];return Math.abs(r-s)<=l*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-c)<=l*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(a-f)<=l*Math.max(1,Math.abs(a),Math.abs(f))&&Math.abs(i-_)<=l*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(o-d)<=l*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(u-h)<=l*Math.max(1,Math.abs(u),Math.abs(h))}var pe=ee,me=fe;function be(){var e=new h(9);return h!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function we(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function ge(e){var t=new h(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function ve(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function ye(e,t,r,n,a,i,o,u,s){var c=new h(9);return c[0]=e,c[1]=t,c[2]=r,c[3]=n,c[4]=a,c[5]=i,c[6]=o,c[7]=u,c[8]=s,c}function Me(e,t,r,n,a,i,o,u,s,c){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=i,e[5]=o,e[6]=u,e[7]=s,e[8]=c,e}function Ee(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ae(e,t){if(e===t){var r=t[1],n=t[2],a=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=n,e[7]=a}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function xe(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=t[6],c=t[7],f=t[8],_=f*o-u*c,d=-f*i+u*s,l=c*i-o*s,h=r*_+n*d+a*l;return h?(h=1/h,e[0]=_*h,e[1]=(-f*n+a*c)*h,e[2]=(u*n-a*o)*h,e[3]=d*h,e[4]=(f*r-a*s)*h,e[5]=(-u*r+a*i)*h,e[6]=l*h,e[7]=(-c*r+n*s)*h,e[8]=(o*r-n*i)*h,e):null}function ke(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=t[6],c=t[7],f=t[8];return e[0]=o*f-u*c,e[1]=a*c-n*f,e[2]=n*u-a*o,e[3]=u*s-i*f,e[4]=r*f-a*s,e[5]=a*i-r*u,e[6]=i*c-o*s,e[7]=n*s-r*c,e[8]=r*o-n*i,e}function Te(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],u=e[6],s=e[7],c=e[8];return t*(c*i-o*s)+r*(-c*a+o*u)+n*(s*a-i*u)}function Re(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=t[8],d=r[0],l=r[1],h=r[2],p=r[3],m=r[4],b=r[5],w=r[6],g=r[7],v=r[8];return e[0]=d*n+l*o+h*c,e[1]=d*a+l*u+h*f,e[2]=d*i+l*s+h*_,e[3]=p*n+m*o+b*c,e[4]=p*a+m*u+b*f,e[5]=p*i+m*s+b*_,e[6]=w*n+g*o+v*c,e[7]=w*a+g*u+v*f,e[8]=w*i+g*s+v*_,e}function Fe(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=t[8],d=r[0],l=r[1];return e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=u,e[5]=s,e[6]=d*n+l*o+c,e[7]=d*a+l*u+f,e[8]=d*i+l*s+_,e}function Le(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=t[8],d=Math.sin(r),l=Math.cos(r);return e[0]=l*n+d*o,e[1]=l*a+d*u,e[2]=l*i+d*s,e[3]=l*o-d*n,e[4]=l*u-d*a,e[5]=l*s-d*i,e[6]=c,e[7]=f,e[8]=_,e}function ze(e,t,r){var n=r[0],a=r[1];return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=a*t[3],e[4]=a*t[4],e[5]=a*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Oe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function Ie(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Se(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Pe(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function Be(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,u=n+n,s=a+a,c=r*o,f=n*o,_=n*u,d=a*o,l=a*u,h=a*s,p=i*o,m=i*u,b=i*s;return e[0]=1-_-h,e[3]=f-b,e[6]=d+m,e[1]=f+b,e[4]=1-c-h,e[7]=l-p,e[2]=d-m,e[5]=l+p,e[8]=1-c-_,e}function De(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=t[6],c=t[7],f=t[8],_=t[9],d=t[10],l=t[11],h=t[12],p=t[13],m=t[14],b=t[15],w=r*u-n*o,g=r*s-a*o,v=r*c-i*o,y=n*s-a*u,M=n*c-i*u,E=a*c-i*s,A=f*p-_*h,x=f*m-d*h,k=f*b-l*h,T=_*m-d*p,R=_*b-l*p,F=d*b-l*m,L=w*F-g*R+v*T+y*k-M*x+E*A;return L?(L=1/L,e[0]=(u*F-s*R+c*T)*L,e[1]=(s*k-o*F-c*x)*L,e[2]=(o*R-u*k+c*A)*L,e[3]=(a*R-n*F-i*T)*L,e[4]=(r*F-a*k+i*x)*L,e[5]=(n*k-r*R-i*A)*L,e[6]=(p*E-m*M+b*y)*L,e[7]=(m*v-h*E-b*g)*L,e[8]=(h*M-p*v+b*w)*L,e):null}function Ue(e,t,r){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/r,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function Ce(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function Ve(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function Ne(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e}function qe(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e}function Xe(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e}function Ye(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e}function Ge(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function We(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=e[4],u=e[5],s=e[6],c=e[7],f=e[8],_=t[0],d=t[1],h=t[2],p=t[3],m=t[4],b=t[5],w=t[6],g=t[7],v=t[8];return Math.abs(r-_)<=l*Math.max(1,Math.abs(r),Math.abs(_))&&Math.abs(n-d)<=l*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(a-h)<=l*Math.max(1,Math.abs(a),Math.abs(h))&&Math.abs(i-p)<=l*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-m)<=l*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(u-b)<=l*Math.max(1,Math.abs(u),Math.abs(b))&&Math.abs(s-w)<=l*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(c-g)<=l*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(f-v)<=l*Math.max(1,Math.abs(f),Math.abs(v))}var He=Re,je=qe;function Ze(){var e=new h(16);return h!=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 $e(e){var t=new h(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Ke(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Qe(e,t,r,n,a,i,o,u,s,c,f,_,d,l,p,m){var b=new h(16);return b[0]=e,b[1]=t,b[2]=r,b[3]=n,b[4]=a,b[5]=i,b[6]=o,b[7]=u,b[8]=s,b[9]=c,b[10]=f,b[11]=_,b[12]=d,b[13]=l,b[14]=p,b[15]=m,b}function Je(e,t,r,n,a,i,o,u,s,c,f,_,d,l,h,p,m){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=i,e[5]=o,e[6]=u,e[7]=s,e[8]=c,e[9]=f,e[10]=_,e[11]=d,e[12]=l,e[13]=h,e[14]=p,e[15]=m,e}function et(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}function tt(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],u=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=u}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function rt(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=t[6],c=t[7],f=t[8],_=t[9],d=t[10],l=t[11],h=t[12],p=t[13],m=t[14],b=t[15],w=r*u-n*o,g=r*s-a*o,v=r*c-i*o,y=n*s-a*u,M=n*c-i*u,E=a*c-i*s,A=f*p-_*h,x=f*m-d*h,k=f*b-l*h,T=_*m-d*p,R=_*b-l*p,F=d*b-l*m,L=w*F-g*R+v*T+y*k-M*x+E*A;return L?(L=1/L,e[0]=(u*F-s*R+c*T)*L,e[1]=(a*R-n*F-i*T)*L,e[2]=(p*E-m*M+b*y)*L,e[3]=(d*M-_*E-l*y)*L,e[4]=(s*k-o*F-c*x)*L,e[5]=(r*F-a*k+i*x)*L,e[6]=(m*v-h*E-b*g)*L,e[7]=(f*E-d*v+l*g)*L,e[8]=(o*R-u*k+c*A)*L,e[9]=(n*k-r*R-i*A)*L,e[10]=(h*M-p*v+b*w)*L,e[11]=(_*v-f*M-l*w)*L,e[12]=(u*x-o*T-s*A)*L,e[13]=(r*T-n*x+a*A)*L,e[14]=(p*g-h*y-m*w)*L,e[15]=(f*y-_*g+d*w)*L,e):null}function nt(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],u=t[5],s=t[6],c=t[7],f=t[8],_=t[9],d=t[10],l=t[11],h=t[12],p=t[13],m=t[14],b=t[15];return e[0]=u*(d*b-l*m)-_*(s*b-c*m)+p*(s*l-c*d),e[1]=-(n*(d*b-l*m)-_*(a*b-i*m)+p*(a*l-i*d)),e[2]=n*(s*b-c*m)-u*(a*b-i*m)+p*(a*c-i*s),e[3]=-(n*(s*l-c*d)-u*(a*l-i*d)+_*(a*c-i*s)),e[4]=-(o*(d*b-l*m)-f*(s*b-c*m)+h*(s*l-c*d)),e[5]=r*(d*b-l*m)-f*(a*b-i*m)+h*(a*l-i*d),e[6]=-(r*(s*b-c*m)-o*(a*b-i*m)+h*(a*c-i*s)),e[7]=r*(s*l-c*d)-o*(a*l-i*d)+f*(a*c-i*s),e[8]=o*(_*b-l*p)-f*(u*b-c*p)+h*(u*l-c*_),e[9]=-(r*(_*b-l*p)-f*(n*b-i*p)+h*(n*l-i*_)),e[10]=r*(u*b-c*p)-o*(n*b-i*p)+h*(n*c-i*u),e[11]=-(r*(u*l-c*_)-o*(n*l-i*_)+f*(n*c-i*u)),e[12]=-(o*(_*m-d*p)-f*(u*m-s*p)+h*(u*d-s*_)),e[13]=r*(_*m-d*p)-f*(n*m-a*p)+h*(n*d-a*_),e[14]=-(r*(u*m-s*p)-o*(n*m-a*p)+h*(n*s-a*u)),e[15]=r*(u*d-s*_)-o*(n*d-a*_)+f*(n*s-a*u),e}function at(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],u=e[6],s=e[7],c=e[8],f=e[9],_=e[10],d=e[11],l=e[12],h=e[13],p=e[14],m=e[15];return(t*o-r*i)*(_*m-d*p)-(t*u-n*i)*(f*m-d*h)+(t*s-a*i)*(f*p-_*h)+(r*u-n*o)*(c*m-d*l)-(r*s-a*o)*(c*p-_*l)+(n*s-a*u)*(c*h-f*l)}function it(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=t[8],d=t[9],l=t[10],h=t[11],p=t[12],m=t[13],b=t[14],w=t[15],g=r[0],v=r[1],y=r[2],M=r[3];return e[0]=g*n+v*u+y*_+M*p,e[1]=g*a+v*s+y*d+M*m,e[2]=g*i+v*c+y*l+M*b,e[3]=g*o+v*f+y*h+M*w,g=r[4],v=r[5],y=r[6],M=r[7],e[4]=g*n+v*u+y*_+M*p,e[5]=g*a+v*s+y*d+M*m,e[6]=g*i+v*c+y*l+M*b,e[7]=g*o+v*f+y*h+M*w,g=r[8],v=r[9],y=r[10],M=r[11],e[8]=g*n+v*u+y*_+M*p,e[9]=g*a+v*s+y*d+M*m,e[10]=g*i+v*c+y*l+M*b,e[11]=g*o+v*f+y*h+M*w,g=r[12],v=r[13],y=r[14],M=r[15],e[12]=g*n+v*u+y*_+M*p,e[13]=g*a+v*s+y*d+M*m,e[14]=g*i+v*c+y*l+M*b,e[15]=g*o+v*f+y*h+M*w,e}function ot(e,t,r){var n,a,i,o,u,s,c,f,_,d,l,h,p=r[0],m=r[1],b=r[2];return t===e?(e[12]=t[0]*p+t[4]*m+t[8]*b+t[12],e[13]=t[1]*p+t[5]*m+t[9]*b+t[13],e[14]=t[2]*p+t[6]*m+t[10]*b+t[14],e[15]=t[3]*p+t[7]*m+t[11]*b+t[15]):(n=t[0],a=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=t[8],d=t[9],l=t[10],h=t[11],e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=u,e[5]=s,e[6]=c,e[7]=f,e[8]=_,e[9]=d,e[10]=l,e[11]=h,e[12]=n*p+u*m+_*b+t[12],e[13]=a*p+s*m+d*b+t[13],e[14]=i*p+c*m+l*b+t[14],e[15]=o*p+f*m+h*b+t[15]),e}function ut(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function st(e,t,r,n){var a,i,o,u,s,c,f,_,d,h,p,m,b,w,g,v,y,M,E,A,x,k,T,R,F=n[0],L=n[1],z=n[2],O=Math.hypot(F,L,z);return O<l?null:(F*=O=1/O,L*=O,z*=O,a=Math.sin(r),o=1-(i=Math.cos(r)),u=t[0],s=t[1],c=t[2],f=t[3],_=t[4],d=t[5],h=t[6],p=t[7],m=t[8],b=t[9],w=t[10],g=t[11],v=F*F*o+i,y=L*F*o+z*a,M=z*F*o-L*a,E=F*L*o-z*a,A=L*L*o+i,x=z*L*o+F*a,k=F*z*o+L*a,T=L*z*o-F*a,R=z*z*o+i,e[0]=u*v+_*y+m*M,e[1]=s*v+d*y+b*M,e[2]=c*v+h*y+w*M,e[3]=f*v+p*y+g*M,e[4]=u*E+_*A+m*x,e[5]=s*E+d*A+b*x,e[6]=c*E+h*A+w*x,e[7]=f*E+p*A+g*x,e[8]=u*k+_*T+m*R,e[9]=s*k+d*T+b*R,e[10]=c*k+h*T+w*R,e[11]=f*k+p*T+g*R,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function ct(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],u=t[6],s=t[7],c=t[8],f=t[9],_=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+c*n,e[5]=o*a+f*n,e[6]=u*a+_*n,e[7]=s*a+d*n,e[8]=c*a-i*n,e[9]=f*a-o*n,e[10]=_*a-u*n,e[11]=d*a-s*n,e}function ft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],u=t[2],s=t[3],c=t[8],f=t[9],_=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-c*n,e[1]=o*a-f*n,e[2]=u*a-_*n,e[3]=s*a-d*n,e[8]=i*n+c*a,e[9]=o*n+f*a,e[10]=u*n+_*a,e[11]=s*n+d*a,e}function _t(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],u=t[2],s=t[3],c=t[4],f=t[5],_=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a+c*n,e[1]=o*a+f*n,e[2]=u*a+_*n,e[3]=s*a+d*n,e[4]=c*a-i*n,e[5]=f*a-o*n,e[6]=_*a-u*n,e[7]=d*a-s*n,e}function dt(e,t){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]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function lt(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ht(e,t,r){var n,a,i,o=r[0],u=r[1],s=r[2],c=Math.hypot(o,u,s);return c<l?null:(o*=c=1/c,u*=c,s*=c,n=Math.sin(t),i=1-(a=Math.cos(t)),e[0]=o*o*i+a,e[1]=u*o*i+s*n,e[2]=s*o*i-u*n,e[3]=0,e[4]=o*u*i-s*n,e[5]=u*u*i+a,e[6]=s*u*i+o*n,e[7]=0,e[8]=o*s*i+u*n,e[9]=u*s*i-o*n,e[10]=s*s*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function pt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function mt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function bt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,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}function wt(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=n+n,s=a+a,c=i+i,f=n*u,_=n*s,d=n*c,l=a*s,h=a*c,p=i*c,m=o*u,b=o*s,w=o*c;return e[0]=1-(l+p),e[1]=_+w,e[2]=d-b,e[3]=0,e[4]=_-w,e[5]=1-(f+p),e[6]=h+m,e[7]=0,e[8]=d+b,e[9]=h-m,e[10]=1-(f+l),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function gt(e,t){var r=new h(3),n=-t[0],a=-t[1],i=-t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=n*n+a*a+i*i+o*o;return _>0?(r[0]=2*(u*o+f*n+s*i-c*a)/_,r[1]=2*(s*o+f*a+c*n-u*i)/_,r[2]=2*(c*o+f*i+u*a-s*n)/_):(r[0]=2*(u*o+f*n+s*i-c*a),r[1]=2*(s*o+f*a+c*n-u*i),r[2]=2*(c*o+f*i+u*a-s*n)),wt(e,t,r),e}function vt(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function yt(e,t){var r=t[0],n=t[1],a=t[2],i=t[4],o=t[5],u=t[6],s=t[8],c=t[9],f=t[10];return e[0]=Math.hypot(r,n,a),e[1]=Math.hypot(i,o,u),e[2]=Math.hypot(s,c,f),e}function Mt(e,t){var r=new h(3);yt(r,t);var n=1/r[0],a=1/r[1],i=1/r[2],o=t[0]*n,u=t[1]*a,s=t[2]*i,c=t[4]*n,f=t[5]*a,_=t[6]*i,d=t[8]*n,l=t[9]*a,p=t[10]*i,m=o+f+p,b=0;return m>0?(b=2*Math.sqrt(m+1),e[3]=.25*b,e[0]=(_-l)/b,e[1]=(d-s)/b,e[2]=(u-c)/b):o>f&&o>p?(b=2*Math.sqrt(1+o-f-p),e[3]=(_-l)/b,e[0]=.25*b,e[1]=(u+c)/b,e[2]=(d+s)/b):f>p?(b=2*Math.sqrt(1+f-o-p),e[3]=(d-s)/b,e[0]=(u+c)/b,e[1]=.25*b,e[2]=(_+l)/b):(b=2*Math.sqrt(1+p-o-f),e[3]=(u-c)/b,e[0]=(d+s)/b,e[1]=(_+l)/b,e[2]=.25*b),e}function Et(e,t,r,n){var a=t[0],i=t[1],o=t[2],u=t[3],s=a+a,c=i+i,f=o+o,_=a*s,d=a*c,l=a*f,h=i*c,p=i*f,m=o*f,b=u*s,w=u*c,g=u*f,v=n[0],y=n[1],M=n[2];return e[0]=(1-(h+m))*v,e[1]=(d+g)*v,e[2]=(l-w)*v,e[3]=0,e[4]=(d-g)*y,e[5]=(1-(_+m))*y,e[6]=(p+b)*y,e[7]=0,e[8]=(l+w)*M,e[9]=(p-b)*M,e[10]=(1-(_+h))*M,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function At(e,t,r,n,a){var i=t[0],o=t[1],u=t[2],s=t[3],c=i+i,f=o+o,_=u+u,d=i*c,l=i*f,h=i*_,p=o*f,m=o*_,b=u*_,w=s*c,g=s*f,v=s*_,y=n[0],M=n[1],E=n[2],A=a[0],x=a[1],k=a[2],T=(1-(p+b))*y,R=(l+v)*y,F=(h-g)*y,L=(l-v)*M,z=(1-(d+b))*M,O=(m+w)*M,I=(h+g)*E,S=(m-w)*E,P=(1-(d+p))*E;return e[0]=T,e[1]=R,e[2]=F,e[3]=0,e[4]=L,e[5]=z,e[6]=O,e[7]=0,e[8]=I,e[9]=S,e[10]=P,e[11]=0,e[12]=r[0]+A-(T*A+L*x+I*k),e[13]=r[1]+x-(R*A+z*x+S*k),e[14]=r[2]+k-(F*A+O*x+P*k),e[15]=1,e}function xt(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,u=n+n,s=a+a,c=r*o,f=n*o,_=n*u,d=a*o,l=a*u,h=a*s,p=i*o,m=i*u,b=i*s;return e[0]=1-_-h,e[1]=f+b,e[2]=d-m,e[3]=0,e[4]=f-b,e[5]=1-c-h,e[6]=l+p,e[7]=0,e[8]=d+m,e[9]=l-p,e[10]=1-c-_,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function kt(e,t,r,n,a,i,o){var u=1/(r-t),s=1/(a-n),c=1/(i-o);return e[0]=2*i*u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*i*s,e[6]=0,e[7]=0,e[8]=(r+t)*u,e[9]=(a+n)*s,e[10]=(o+i)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*c,e[15]=0,e}function Tt(e,t,r,n,a){var i,o=1/Math.tan(t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=a&&a!==1/0?(i=1/(n-a),e[10]=(a+n)*i,e[14]=2*a*n*i):(e[10]=-1,e[14]=-2*n),e}function Rt(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),u=Math.tan(t.rightDegrees*Math.PI/180),s=2/(o+u),c=2/(a+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-u)*s*.5,e[9]=(a-i)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}function Ft(e,t,r,n,a,i,o){var u=1/(t-r),s=1/(n-a),c=1/(i-o);return e[0]=-2*u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*u,e[13]=(a+n)*s,e[14]=(o+i)*c,e[15]=1,e}function Lt(e,t,r,n){var a,i,o,u,s,c,f,_,d,h,p=t[0],m=t[1],b=t[2],w=n[0],g=n[1],v=n[2],y=r[0],M=r[1],E=r[2];return Math.abs(p-y)<l&&Math.abs(m-M)<l&&Math.abs(b-E)<l?et(e):(f=p-y,_=m-M,d=b-E,a=g*(d*=h=1/Math.hypot(f,_,d))-v*(_*=h),i=v*(f*=h)-w*d,o=w*_-g*f,(h=Math.hypot(a,i,o))?(a*=h=1/h,i*=h,o*=h):(a=0,i=0,o=0),u=_*o-d*i,s=d*a-f*o,c=f*i-_*a,(h=Math.hypot(u,s,c))?(u*=h=1/h,s*=h,c*=h):(u=0,s=0,c=0),e[0]=a,e[1]=u,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=_,e[7]=0,e[8]=o,e[9]=c,e[10]=d,e[11]=0,e[12]=-(a*p+i*m+o*b),e[13]=-(u*p+s*m+c*b),e[14]=-(f*p+_*m+d*b),e[15]=1,e)}function zt(e,t,r,n){var a=t[0],i=t[1],o=t[2],u=n[0],s=n[1],c=n[2],f=a-r[0],_=i-r[1],d=o-r[2],l=f*f+_*_+d*d;l>0&&(f*=l=1/Math.sqrt(l),_*=l,d*=l);var h=s*d-c*_,p=c*f-u*d,m=u*_-s*f;return(l=h*h+p*p+m*m)>0&&(h*=l=1/Math.sqrt(l),p*=l,m*=l),e[0]=h,e[1]=p,e[2]=m,e[3]=0,e[4]=_*m-d*p,e[5]=d*h-f*m,e[6]=f*p-_*h,e[7]=0,e[8]=f,e[9]=_,e[10]=d,e[11]=0,e[12]=a,e[13]=i,e[14]=o,e[15]=1,e}function Ot(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function It(e){return Math.hypot(e[0],e[1],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function St(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e}function Pt(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function Bt(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e}function Dt(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e}function Ut(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function Ct(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=e[4],u=e[5],s=e[6],c=e[7],f=e[8],_=e[9],d=e[10],h=e[11],p=e[12],m=e[13],b=e[14],w=e[15],g=t[0],v=t[1],y=t[2],M=t[3],E=t[4],A=t[5],x=t[6],k=t[7],T=t[8],R=t[9],F=t[10],L=t[11],z=t[12],O=t[13],I=t[14],S=t[15];return Math.abs(r-g)<=l*Math.max(1,Math.abs(r),Math.abs(g))&&Math.abs(n-v)<=l*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(a-y)<=l*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(i-M)<=l*Math.max(1,Math.abs(i),Math.abs(M))&&Math.abs(o-E)<=l*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(u-A)<=l*Math.max(1,Math.abs(u),Math.abs(A))&&Math.abs(s-x)<=l*Math.max(1,Math.abs(s),Math.abs(x))&&Math.abs(c-k)<=l*Math.max(1,Math.abs(c),Math.abs(k))&&Math.abs(f-T)<=l*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(_-R)<=l*Math.max(1,Math.abs(_),Math.abs(R))&&Math.abs(d-F)<=l*Math.max(1,Math.abs(d),Math.abs(F))&&Math.abs(h-L)<=l*Math.max(1,Math.abs(h),Math.abs(L))&&Math.abs(p-z)<=l*Math.max(1,Math.abs(p),Math.abs(z))&&Math.abs(m-O)<=l*Math.max(1,Math.abs(m),Math.abs(O))&&Math.abs(b-I)<=l*Math.max(1,Math.abs(b),Math.abs(I))&&Math.abs(w-S)<=l*Math.max(1,Math.abs(w),Math.abs(S))}var Vt=it,Nt=Pt;function qt(){var e=new h(3);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Xt(e){var t=new h(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Yt(e){var t=e[0],r=e[1],n=e[2];return Math.hypot(t,r,n)}function Gt(e,t,r){var n=new h(3);return n[0]=e,n[1]=t,n[2]=r,n}function Wt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Ht(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function jt(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function Zt(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function $t(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function Kt(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function Qt(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function Jt(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function er(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function tr(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function rr(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function nr(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function ar(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function ir(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2];return Math.hypot(r,n,a)}function or(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2];return r*r+n*n+a*a}function ur(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function sr(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function cr(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function fr(e,t){var r=t[0],n=t[1],a=t[2],i=r*r+n*n+a*a;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function _r(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function dr(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],u=r[1],s=r[2];return e[0]=a*s-i*u,e[1]=i*o-n*s,e[2]=n*u-a*o,e}function lr(e,t,r,n){var a=t[0],i=t[1],o=t[2];return e[0]=a+n*(r[0]-a),e[1]=i+n*(r[1]-i),e[2]=o+n*(r[2]-o),e}function hr(e,t,r,n,a,i){var o=i*i,u=o*(2*i-3)+1,s=o*(i-2)+i,c=o*(i-1),f=o*(3-2*i);return e[0]=t[0]*u+r[0]*s+n[0]*c+a[0]*f,e[1]=t[1]*u+r[1]*s+n[1]*c+a[1]*f,e[2]=t[2]*u+r[2]*s+n[2]*c+a[2]*f,e}function pr(e,t,r,n,a,i){var o=1-i,u=o*o,s=i*i,c=u*o,f=3*i*u,_=3*s*o,d=s*i;return e[0]=t[0]*c+r[0]*f+n[0]*_+a[0]*d,e[1]=t[1]*c+r[1]*f+n[1]*_+a[1]*d,e[2]=t[2]*c+r[2]*f+n[2]*_+a[2]*d,e}function mr(e,t){t=t||1;var r=2*p()*Math.PI,n=2*p()-1,a=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*a,e[1]=Math.sin(r)*a,e[2]=n*t,e}function br(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[3]*n+r[7]*a+r[11]*i+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*a+r[8]*i+r[12])/o,e[1]=(r[1]*n+r[5]*a+r[9]*i+r[13])/o,e[2]=(r[2]*n+r[6]*a+r[10]*i+r[14])/o,e}function wr(e,t,r){var n=t[0],a=t[1],i=t[2];return e[0]=n*r[0]+a*r[3]+i*r[6],e[1]=n*r[1]+a*r[4]+i*r[7],e[2]=n*r[2]+a*r[5]+i*r[8],e}function gr(e,t,r){var n=r[0],a=r[1],i=r[2],o=r[3],u=t[0],s=t[1],c=t[2],f=a*c-i*s,_=i*u-n*c,d=n*s-a*u,l=a*d-i*_,h=i*f-n*d,p=n*_-a*f,m=2*o;return f*=m,_*=m,d*=m,l*=2,h*=2,p*=2,e[0]=u+f+l,e[1]=s+_+h,e[2]=c+d+p,e}function vr(e,t,r,n){var a=[],i=[];return a[0]=t[0]-r[0],a[1]=t[1]-r[1],a[2]=t[2]-r[2],i[0]=a[0],i[1]=a[1]*Math.cos(n)-a[2]*Math.sin(n),i[2]=a[1]*Math.sin(n)+a[2]*Math.cos(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e}function yr(e,t,r,n){var a=[],i=[];return a[0]=t[0]-r[0],a[1]=t[1]-r[1],a[2]=t[2]-r[2],i[0]=a[2]*Math.sin(n)+a[0]*Math.cos(n),i[1]=a[1],i[2]=a[2]*Math.cos(n)-a[0]*Math.sin(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e}function Mr(e,t,r,n){var a=[],i=[];return a[0]=t[0]-r[0],a[1]=t[1]-r[1],a[2]=t[2]-r[2],i[0]=a[0]*Math.cos(n)-a[1]*Math.sin(n),i[1]=a[0]*Math.sin(n)+a[1]*Math.cos(n),i[2]=a[2],e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e}function Er(e,t){var r=Gt(e[0],e[1],e[2]),n=Gt(t[0],t[1],t[2]);fr(r,r),fr(n,n);var a=_r(r,n);return a>1?0:a<-1?Math.PI:Math.acos(a)}function Ar(e){return e[0]=0,e[1]=0,e[2]=0,e}function xr(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function kr(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Tr(e,t){var r=e[0],n=e[1],a=e[2],i=t[0],o=t[1],u=t[2];return Math.abs(r-i)<=l*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(n-o)<=l*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(a-u)<=l*Math.max(1,Math.abs(a),Math.abs(u))}var Rr,Fr=Zt,Lr=$t,zr=Kt,Or=ir,Ir=or,Sr=Yt,Pr=ur,Br=(Rr=qt(),function(e,t,r,n,a,i){var o,u;for(t||(t=3),r||(r=0),u=n?Math.min(n*t+r,e.length):e.length,o=r;o<u;o+=t)Rr[0]=e[o],Rr[1]=e[o+1],Rr[2]=e[o+2],a(Rr,Rr,i),e[o]=Rr[0],e[o+1]=Rr[1],e[o+2]=Rr[2];return e});function Dr(){var e=new h(4);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function Ur(e){var t=new h(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Cr(e,t,r,n){var a=new h(4);return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a}function Vr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Nr(e,t,r,n,a){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e}function qr(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function Xr(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function Yr(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function Gr(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function Wr(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function Hr(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function jr(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function Zr(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function $r(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function Kr(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function Qr(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}function Jr(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2],i=t[3]-e[3];return Math.hypot(r,n,a,i)}function en(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2],i=t[3]-e[3];return r*r+n*n+a*a+i*i}function tn(e){var t=e[0],r=e[1],n=e[2],a=e[3];return Math.hypot(t,r,n,a)}function rn(e){var t=e[0],r=e[1],n=e[2],a=e[3];return t*t+r*r+n*n+a*a}function nn(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function an(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function on(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r*r+n*n+a*a+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=r*o,e[1]=n*o,e[2]=a*o,e[3]=i*o,e}function un(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function sn(e,t,r,n){var a=r[0]*n[1]-r[1]*n[0],i=r[0]*n[2]-r[2]*n[0],o=r[0]*n[3]-r[3]*n[0],u=r[1]*n[2]-r[2]*n[1],s=r[1]*n[3]-r[3]*n[1],c=r[2]*n[3]-r[3]*n[2],f=t[0],_=t[1],d=t[2],l=t[3];return e[0]=_*c-d*s+l*u,e[1]=-f*c+d*o-l*i,e[2]=f*s-_*o+l*a,e[3]=-f*u+_*i-d*a,e}function cn(e,t,r,n){var a=t[0],i=t[1],o=t[2],u=t[3];return e[0]=a+n*(r[0]-a),e[1]=i+n*(r[1]-i),e[2]=o+n*(r[2]-o),e[3]=u+n*(r[3]-u),e}function fn(e,t){var r,n,a,i,o,u;t=t||1;do{o=(r=2*p()-1)*r+(n=2*p()-1)*n}while(o>=1);do{u=(a=2*p()-1)*a+(i=2*p()-1)*i}while(u>=1);var s=Math.sqrt((1-o)/u);return e[0]=t*r,e[1]=t*n,e[2]=t*a*s,e[3]=t*i*s,e}function _n(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3];return e[0]=r[0]*n+r[4]*a+r[8]*i+r[12]*o,e[1]=r[1]*n+r[5]*a+r[9]*i+r[13]*o,e[2]=r[2]*n+r[6]*a+r[10]*i+r[14]*o,e[3]=r[3]*n+r[7]*a+r[11]*i+r[15]*o,e}function dn(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],u=r[1],s=r[2],c=r[3],f=c*n+u*i-s*a,_=c*a+s*n-o*i,d=c*i+o*a-u*n,l=-o*n-u*a-s*i;return e[0]=f*c+l*-o+_*-s-d*-u,e[1]=_*c+l*-u+d*-o-f*-s,e[2]=d*c+l*-s+f*-u-_*-o,e[3]=t[3],e}function ln(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}function hn(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function pn(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function mn(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=t[0],u=t[1],s=t[2],c=t[3];return Math.abs(r-o)<=l*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-u)<=l*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(a-s)<=l*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(i-c)<=l*Math.max(1,Math.abs(i),Math.abs(c))}var bn=Xr,wn=Yr,gn=Gr,vn=Jr,yn=en,Mn=tn,En=rn,An=function(){var e=Dr();return function(t,r,n,a,i,o){var u,s;for(r||(r=4),n||(n=0),s=a?Math.min(a*r+n,t.length):t.length,u=n;u<s;u+=r)e[0]=t[u],e[1]=t[u+1],e[2]=t[u+2],e[3]=t[u+3],i(e,e,o),t[u]=e[0],t[u+1]=e[1],t[u+2]=e[2],t[u+3]=e[3];return t}}();function xn(){var e=new h(4);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function kn(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function Tn(e,t,r){r*=.5;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e}function Rn(e,t){var r=2*Math.acos(t[3]),n=Math.sin(r/2);return n>l?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r}function Fn(e,t){var r=aa(e,t);return Math.acos(2*r*r-1)}function Ln(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=r[0],s=r[1],c=r[2],f=r[3];return e[0]=n*f+o*u+a*c-i*s,e[1]=a*f+o*s+i*u-n*c,e[2]=i*f+o*c+n*s-a*u,e[3]=o*f-n*u-a*s-i*c,e}function zn(e,t,r){r*=.5;var n=t[0],a=t[1],i=t[2],o=t[3],u=Math.sin(r),s=Math.cos(r);return e[0]=n*s+o*u,e[1]=a*s+i*u,e[2]=i*s-a*u,e[3]=o*s-n*u,e}function On(e,t,r){r*=.5;var n=t[0],a=t[1],i=t[2],o=t[3],u=Math.sin(r),s=Math.cos(r);return e[0]=n*s-i*u,e[1]=a*s+o*u,e[2]=i*s+n*u,e[3]=o*s-a*u,e}function In(e,t,r){r*=.5;var n=t[0],a=t[1],i=t[2],o=t[3],u=Math.sin(r),s=Math.cos(r);return e[0]=n*s+a*u,e[1]=a*s-n*u,e[2]=i*s+o*u,e[3]=o*s-i*u,e}function Sn(e,t){var r=t[0],n=t[1],a=t[2];return e[0]=r,e[1]=n,e[2]=a,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-a*a)),e}function Pn(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=Math.sqrt(r*r+n*n+a*a),u=Math.exp(i),s=o>0?u*Math.sin(o)/o:0;return e[0]=r*s,e[1]=n*s,e[2]=a*s,e[3]=u*Math.cos(o),e}function Bn(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=Math.sqrt(r*r+n*n+a*a),u=o>0?Math.atan2(o,i)/o:0;return e[0]=r*u,e[1]=n*u,e[2]=a*u,e[3]=.5*Math.log(r*r+n*n+a*a+i*i),e}function Dn(e,t,r){return Bn(e,t),na(e,e,r),Pn(e,e),e}function Un(e,t,r,n){var a,i,o,u,s,c=t[0],f=t[1],_=t[2],d=t[3],h=r[0],p=r[1],m=r[2],b=r[3];return(i=c*h+f*p+_*m+d*b)<0&&(i=-i,h=-h,p=-p,m=-m,b=-b),1-i>l?(a=Math.acos(i),o=Math.sin(a),u=Math.sin((1-n)*a)/o,s=Math.sin(n*a)/o):(u=1-n,s=n),e[0]=u*c+s*h,e[1]=u*f+s*p,e[2]=u*_+s*m,e[3]=u*d+s*b,e}function Cn(e){var t=p(),r=p(),n=p(),a=Math.sqrt(1-t),i=Math.sqrt(t);return e[0]=a*Math.sin(2*Math.PI*r),e[1]=a*Math.cos(2*Math.PI*r),e[2]=i*Math.sin(2*Math.PI*n),e[3]=i*Math.cos(2*Math.PI*n),e}function Vn(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r*r+n*n+a*a+i*i,u=o?1/o:0;return e[0]=-r*u,e[1]=-n*u,e[2]=-a*u,e[3]=i*u,e}function Nn(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function qn(e,t){var r,n=t[0]+t[4]+t[8];if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{var a=0;t[4]>t[0]&&(a=1),t[8]>t[3*a+a]&&(a=2);var i=(a+1)%3,o=(a+2)%3;r=Math.sqrt(t[3*a+a]-t[3*i+i]-t[3*o+o]+1),e[a]=.5*r,r=.5/r,e[3]=(t[3*i+o]-t[3*o+i])*r,e[i]=(t[3*i+a]+t[3*a+i])*r,e[o]=(t[3*o+a]+t[3*a+o])*r}return e}function Xn(e,t,r,n){var a=.5*Math.PI/180;t*=a,r*=a,n*=a;var i=Math.sin(t),o=Math.cos(t),u=Math.sin(r),s=Math.cos(r),c=Math.sin(n),f=Math.cos(n);return e[0]=i*s*f-o*u*c,e[1]=o*u*f+i*s*c,e[2]=o*s*c-i*u*f,e[3]=o*s*f+i*u*c,e}function Yn(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var Gn,Wn,Hn,jn,Zn,$n,Kn=Ur,Qn=Cr,Jn=Vr,ea=Nr,ta=qr,ra=Ln,na=Kr,aa=un,ia=cn,oa=tn,ua=oa,sa=rn,ca=sa,fa=on,_a=pn,da=mn,la=(Gn=qt(),Wn=Gt(1,0,0),Hn=Gt(0,1,0),function(e,t,r){var n=_r(t,r);return n<-.999999?(dr(Gn,Wn,t),Sr(Gn)<1e-6&&dr(Gn,Hn,t),fr(Gn,Gn),Tn(e,Gn,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(dr(Gn,t,r),e[0]=Gn[0],e[1]=Gn[1],e[2]=Gn[2],e[3]=1+n,fa(e,e))}),ha=(jn=xn(),Zn=xn(),function(e,t,r,n,a,i){return Un(jn,t,a,i),Un(Zn,r,n,i),Un(e,jn,Zn,2*i*(1-i)),e}),pa=($n=be(),function(e,t,r,n){return $n[0]=r[0],$n[3]=r[1],$n[6]=r[2],$n[1]=n[0],$n[4]=n[1],$n[7]=n[2],$n[2]=-t[0],$n[5]=-t[1],$n[8]=-t[2],fa(e,qn(e,$n))});function ma(){var e=new h(8);return h!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0),e[3]=1,e}function ba(e){var t=new h(8);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function wa(e,t,r,n,a,i,o,u){var s=new h(8);return s[0]=e,s[1]=t,s[2]=r,s[3]=n,s[4]=a,s[5]=i,s[6]=o,s[7]=u,s}function ga(e,t,r,n,a,i,o){var u=new h(8);u[0]=e,u[1]=t,u[2]=r,u[3]=n;var s=.5*a,c=.5*i,f=.5*o;return u[4]=s*n+c*r-f*t,u[5]=c*n+f*e-s*r,u[6]=f*n+s*t-c*e,u[7]=-s*e-c*t-f*r,u}function va(e,t,r){var n=.5*r[0],a=.5*r[1],i=.5*r[2],o=t[0],u=t[1],s=t[2],c=t[3];return e[0]=o,e[1]=u,e[2]=s,e[3]=c,e[4]=n*c+a*s-i*u,e[5]=a*c+i*o-n*s,e[6]=i*c+n*u-a*o,e[7]=-n*o-a*u-i*s,e}function ya(e,t){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=.5*t[0],e[5]=.5*t[1],e[6]=.5*t[2],e[7]=0,e}function Ma(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function Ea(e,t){var r=xn();Mt(r,t);var n=new h(3);return vt(n,t),va(e,r,n),e}function Aa(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function xa(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function ka(e,t,r,n,a,i,o,u,s){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=i,e[5]=o,e[6]=u,e[7]=s,e}var Ta=Jn;function Ra(e,t){return e[0]=t[4],e[1]=t[5],e[2]=t[6],e[3]=t[7],e}var Fa=Jn;function La(e,t){return e[4]=t[0],e[5]=t[1],e[6]=t[2],e[7]=t[3],e}function za(e,t){var r=t[4],n=t[5],a=t[6],i=t[7],o=-t[0],u=-t[1],s=-t[2],c=t[3];return e[0]=2*(r*c+i*o+n*s-a*u),e[1]=2*(n*c+i*u+a*o-r*s),e[2]=2*(a*c+i*s+r*u-n*o),e}function Oa(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=.5*r[0],s=.5*r[1],c=.5*r[2],f=t[4],_=t[5],d=t[6],l=t[7];return e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=o*u+a*c-i*s+f,e[5]=o*s+i*u-n*c+_,e[6]=o*c+n*s-a*u+d,e[7]=-n*u-a*s-i*c+l,e}function Ia(e,t,r){var n=-t[0],a=-t[1],i=-t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=u*o+f*n+s*i-c*a,d=s*o+f*a+c*n-u*i,l=c*o+f*i+u*a-s*n,h=f*o-u*n-s*a-c*i;return zn(e,t,r),n=e[0],a=e[1],i=e[2],o=e[3],e[4]=_*o+h*n+d*i-l*a,e[5]=d*o+h*a+l*n-_*i,e[6]=l*o+h*i+_*a-d*n,e[7]=h*o-_*n-d*a-l*i,e}function Sa(e,t,r){var n=-t[0],a=-t[1],i=-t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=u*o+f*n+s*i-c*a,d=s*o+f*a+c*n-u*i,l=c*o+f*i+u*a-s*n,h=f*o-u*n-s*a-c*i;return On(e,t,r),n=e[0],a=e[1],i=e[2],o=e[3],e[4]=_*o+h*n+d*i-l*a,e[5]=d*o+h*a+l*n-_*i,e[6]=l*o+h*i+_*a-d*n,e[7]=h*o-_*n-d*a-l*i,e}function Pa(e,t,r){var n=-t[0],a=-t[1],i=-t[2],o=t[3],u=t[4],s=t[5],c=t[6],f=t[7],_=u*o+f*n+s*i-c*a,d=s*o+f*a+c*n-u*i,l=c*o+f*i+u*a-s*n,h=f*o-u*n-s*a-c*i;return In(e,t,r),n=e[0],a=e[1],i=e[2],o=e[3],e[4]=_*o+h*n+d*i-l*a,e[5]=d*o+h*a+l*n-_*i,e[6]=l*o+h*i+_*a-d*n,e[7]=h*o-_*n-d*a-l*i,e}function Ba(e,t,r){var n=r[0],a=r[1],i=r[2],o=r[3],u=t[0],s=t[1],c=t[2],f=t[3];return e[0]=u*o+f*n+s*i-c*a,e[1]=s*o+f*a+c*n-u*i,e[2]=c*o+f*i+u*a-s*n,e[3]=f*o-u*n-s*a-c*i,u=t[4],s=t[5],c=t[6],f=t[7],e[4]=u*o+f*n+s*i-c*a,e[5]=s*o+f*a+c*n-u*i,e[6]=c*o+f*i+u*a-s*n,e[7]=f*o-u*n-s*a-c*i,e}function Da(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=r[0],s=r[1],c=r[2],f=r[3];return e[0]=n*f+o*u+a*c-i*s,e[1]=a*f+o*s+i*u-n*c,e[2]=i*f+o*c+n*s-a*u,e[3]=o*f-n*u-a*s-i*c,u=r[4],s=r[5],c=r[6],f=r[7],e[4]=n*f+o*u+a*c-i*s,e[5]=a*f+o*s+i*u-n*c,e[6]=i*f+o*c+n*s-a*u,e[7]=o*f-n*u-a*s-i*c,e}function Ua(e,t,r,n){if(Math.abs(n)<l)return Aa(e,t);var a=Math.hypot(r[0],r[1],r[2]);n*=.5;var i=Math.sin(n),o=i*r[0]/a,u=i*r[1]/a,s=i*r[2]/a,c=Math.cos(n),f=t[0],_=t[1],d=t[2],h=t[3];e[0]=f*c+h*o+_*s-d*u,e[1]=_*c+h*u+d*o-f*s,e[2]=d*c+h*s+f*u-_*o,e[3]=h*c-f*o-_*u-d*s;var p=t[4],m=t[5],b=t[6],w=t[7];return e[4]=p*c+w*o+m*s-b*u,e[5]=m*c+w*u+b*o-p*s,e[6]=b*c+w*s+p*u-m*o,e[7]=w*c-p*o-m*u-b*s,e}function Ca(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e}function Va(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],u=r[4],s=r[5],c=r[6],f=r[7],_=t[4],d=t[5],l=t[6],h=t[7],p=r[0],m=r[1],b=r[2],w=r[3];return e[0]=n*w+o*p+a*b-i*m,e[1]=a*w+o*m+i*p-n*b,e[2]=i*w+o*b+n*m-a*p,e[3]=o*w-n*p-a*m-i*b,e[4]=n*f+o*u+a*c-i*s+_*w+h*p+d*b-l*m,e[5]=a*f+o*s+i*u-n*c+d*w+h*m+l*p-_*b,e[6]=i*f+o*c+n*s-a*u+l*w+h*b+_*m-d*p,e[7]=o*f-n*u-a*s-i*c+h*w-_*p-d*m-l*b,e}var Na=Va;function qa(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e}var Xa=aa;function Ya(e,t,r,n){var a=1-n;return Xa(t,r)<0&&(n=-n),e[0]=t[0]*a+r[0]*n,e[1]=t[1]*a+r[1]*n,e[2]=t[2]*a+r[2]*n,e[3]=t[3]*a+r[3]*n,e[4]=t[4]*a+r[4]*n,e[5]=t[5]*a+r[5]*n,e[6]=t[6]*a+r[6]*n,e[7]=t[7]*a+r[7]*n,e}function Ga(e,t){var r=Za(t);return e[0]=-t[0]/r,e[1]=-t[1]/r,e[2]=-t[2]/r,e[3]=t[3]/r,e[4]=-t[4]/r,e[5]=-t[5]/r,e[6]=-t[6]/r,e[7]=t[7]/r,e}function Wa(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=t[7],e}var Ha=oa,ja=Ha,Za=sa,$a=Za;function Ka(e,t){var r=Za(t);if(r>0){r=Math.sqrt(r);var n=t[0]/r,a=t[1]/r,i=t[2]/r,o=t[3]/r,u=t[4],s=t[5],c=t[6],f=t[7],_=n*u+a*s+i*c+o*f;e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=(u-n*_)/r,e[5]=(s-a*_)/r,e[6]=(c-i*_)/r,e[7]=(f-o*_)/r}return e}function Qa(e){return"quat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+")"}function Ja(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]}function ei(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=e[4],u=e[5],s=e[6],c=e[7],f=t[0],_=t[1],d=t[2],h=t[3],p=t[4],m=t[5],b=t[6],w=t[7];return Math.abs(r-f)<=l*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(n-_)<=l*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(a-d)<=l*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(i-h)<=l*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(o-p)<=l*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(u-m)<=l*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(s-b)<=l*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(c-w)<=l*Math.max(1,Math.abs(c),Math.abs(w))}function ti(){var e=new h(2);return h!=Float32Array&&(e[0]=0,e[1]=0),e}function ri(e){var t=new h(2);return t[0]=e[0],t[1]=e[1],t}function ni(e,t){var r=new h(2);return r[0]=e,r[1]=t,r}function ai(e,t){return e[0]=t[0],e[1]=t[1],e}function ii(e,t,r){return e[0]=t,e[1]=r,e}function oi(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function ui(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function si(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function ci(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function fi(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function _i(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function di(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function li(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function hi(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function pi(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function mi(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e}function bi(e,t){var r=t[0]-e[0],n=t[1]-e[1];return Math.hypot(r,n)}function wi(e,t){var r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n}function gi(e){var t=e[0],r=e[1];return Math.hypot(t,r)}function vi(e){var t=e[0],r=e[1];return t*t+r*r}function yi(e,t){return e[0]=-t[0],e[1]=-t[1],e}function Mi(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function Ei(e,t){var r=t[0],n=t[1],a=r*r+n*n;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e}function Ai(e,t){return e[0]*t[0]+e[1]*t[1]}function xi(e,t,r){var n=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=n,e}function ki(e,t,r,n){var a=t[0],i=t[1];return e[0]=a+n*(r[0]-a),e[1]=i+n*(r[1]-i),e}function Ti(e,t){t=t||1;var r=2*p()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function Ri(e,t,r){var n=t[0],a=t[1];return e[0]=r[0]*n+r[2]*a,e[1]=r[1]*n+r[3]*a,e}function Fi(e,t,r){var n=t[0],a=t[1];return e[0]=r[0]*n+r[2]*a+r[4],e[1]=r[1]*n+r[3]*a+r[5],e}function Li(e,t,r){var n=t[0],a=t[1];return e[0]=r[0]*n+r[3]*a+r[6],e[1]=r[1]*n+r[4]*a+r[7],e}function zi(e,t,r){var n=t[0],a=t[1];return e[0]=r[0]*n+r[4]*a+r[12],e[1]=r[1]*n+r[5]*a+r[13],e}function Oi(e,t,r,n){var a=t[0]-r[0],i=t[1]-r[1],o=Math.sin(n),u=Math.cos(n);return e[0]=a*u-i*o+r[0],e[1]=a*o+i*u+r[1],e}function Ii(e,t){var r=e[0],n=e[1],a=t[0],i=t[1],o=r*r+n*n;o>0&&(o=1/Math.sqrt(o));var u=a*a+i*i;u>0&&(u=1/Math.sqrt(u));var s=(r*a+n*i)*o*u;return s>1?0:s<-1?Math.PI:Math.acos(s)}function Si(e){return e[0]=0,e[1]=0,e}function Pi(e){return"vec2("+e[0]+", "+e[1]+")"}function Bi(e,t){return e[0]===t[0]&&e[1]===t[1]}function Di(e,t){var r=e[0],n=e[1],a=t[0],i=t[1];return Math.abs(r-a)<=l*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-i)<=l*Math.max(1,Math.abs(n),Math.abs(i))}var Ui=gi,Ci=ui,Vi=si,Ni=ci,qi=bi,Xi=wi,Yi=vi,Gi=function(){var e=ti();return function(t,r,n,a,i,o){var u,s;for(r||(r=2),n||(n=0),s=a?Math.min(a*r+n,t.length):t.length,u=n;u<s;u+=r)e[0]=t[u],e[1]=t[u+1],i(e,e,o),t[u]=e[0],t[u+1]=e[1];return t}}()},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4),a=self;n.messageManager.onOutgoingMessage.bind(()=>{let e=n.messageManager.getOutgoingMessages();for(let t of e)a.postMessage(t.msg,t.transferables)});let i=e=>{if(e&&e.data&&"wasm"===e.data.t){let t=location.href.startsWith("blob")?e.data.url:r(22);t.default&&(t=t.default),n.launchWorkerServer(t),a.removeEventListener("message",i)}};a.addEventListener("message",i),a.addEventListener("message",e=>{n.messageManager.postIncomingMessage(e.data)})},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function u(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,u)}s((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.launchWorkerServer=t.messageManager=void 0;const a=r(5),i=r(9),o=r(10),u=r(13),s=r(1),c=r(15),f=r(16),_=r(0);t.messageManager=new u.MsgManager;let d=0;t.launchWorkerServer=function(e){return n(this,void 0,void 0,(function*(){let r=a.default({locateFile:(t,r)=>t.endsWith("zcv.wasm")?e:r+t,onRuntimeInitialized:()=>{let e=i.getRuntimeObject(r),a=new o.zappar_server(e,(e,r)=>{t.messageManager.postOutgoingMessage({p:e,t:"zappar",d:r},[r])});t.messageManager.postOutgoingMessage("loaded",[]),t.messageManager.onIncomingMessage.bind(i=>{var o;switch(i.t){case"zappar":a.processBuffer(i.d),t.messageManager.postOutgoingMessage({t:"buf",d:i.d},[i.d]);break;case"buf":null===(o=a.serializersByPipelineId.get(i.p))||void 0===o||o.bufferReturn(i.d);break;case"cameraFrameC2S":{let r,n=i,o=a._pipeline_by_instance.get(n.p);o&&(e.pipeline_camera_frame_submit(o,n.d,n.width,n.height,n.token,n.c2d,n.cm,n.userFacing),e.pipeline_frame_update(o),r=e.pipeline_camera_frame_device_attitude(o),a.exploreState());let u={token:n.token,d:n.d,p:n.p,t:"cameraFrameRecycleS2C",att:r};t.messageManager.postOutgoingMessage(u,[n.d]);break}case"streamC2S":{let o=i;!function(e,r,a,i,o,u,c){n(this,void 0,void 0,(function*(){const n=yield a.getReader();for(;;){let a=yield n.read();if(a.done)return void console.log("Stream done");let f=a.value,g=f.allocationSize();g>h&&(l>0&&e._free(l),l=e._malloc(g),h=g),yield f.copyTo(e.HEAPU8.subarray(l,l+h));let v=p;p++;const y=f.visibleRect.width,M=f.visibleRect.height;let E,A=y,x=M;switch(d){case 270:E=new Float32Array([0,1,0,0,-1,0,0,0,0,0,1,0,1,0,0,1]),A=M,x=y;break;case 180:E=new Float32Array([-1,0,0,0,0,-1,0,0,0,0,1,0,1,1,0,1]);break;case 90:E=new Float32Array([0,-1,0,0,1,0,0,0,0,0,1,0,0,1,0,1]),A=M,x=y;break;default:E=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}let k=f.clone();o?s.mat4.fromScaling(m,[-1,1,-1]):s.mat4.identity(m);let T=300*_.profile.dataWidth/320;b[0]=T,b[1]=T,b[2]=.5*_.profile.dataWidth,b[3]=.5*_.profile.dataHeight;const R={token:v,d:k,p:i,t:"videoFrameS2C",userFacing:o,uvTransform:E,w:A,h:x,cameraToDevice:m,cameraModel:b,source:c};t.messageManager.postOutgoingMessage(R,[R.d,R.uvTransform.buffer]);const F=u._pipeline_by_instance.get(i);F&&(r.pipeline_camera_frame_submit_raw_pointer(F,l,g,w(f.format),y,M,v,m,d,b,o),r.pipeline_frame_update(F),u.exploreState()),f.close()}}))}(r,e,o.s,o.p,o.userFacing,a,o.source);break}case"cameraToScreenC2S":d=i.r;break;case"imageBitmapC2S":{let r=i;f.handleImageBitmap(r,e,a,t.messageManager);break}}})}})}))};let l=0,h=0,p=1;const m=s.mat4.create(),b=new Float32Array([300,300,160,120,0,0]);function w(e){switch(e){case"I420":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_I420;case"I420A":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_I420A;case"I422":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_I422;case"I444":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_I444;case"NV12":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_NV12;case"RGBA":case"RGBX":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_RGBA;case"BGRA":case"BGRX":return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_BGRA}return c.frame_pixel_format_t.FRAME_PIXEL_FORMAT_Y}},function(e,t,r){"use strict";r.r(t),function(e){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t){var n;t=t||{},n||(n=void 0!==t?t:{});var a,i,o=Object.assign;n.ready=new Promise((function(e,t){a=e,i=t}));var u,s=o({},n),c="./this.program",f=(e,t)=>{throw t},_="";_=self.location.href,r&&(_=r),_=0!==_.indexOf("blob:")?_.substr(0,_.replace(/[?#].*/,"").lastIndexOf("/")+1):"",u=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)};var d,l,h=n.print||console.log.bind(console),p=n.printErr||console.warn.bind(console);o(n,s),s=null,n.thisProgram&&(c=n.thisProgram),n.quit&&(f=n.quit),n.wasmBinary&&(l=n.wasmBinary);var m=n.noExitRuntime||!0;"object"!=typeof WebAssembly&&Z("no native wasm support detected");var b,w,g=!1;function v(e,t,r,a){var i={string:function(e){var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);t=vr(r),I(e,E,t,r)}return t},array:function(e){var t=vr(e.length);return M.set(e,t),t}};e=n["_"+e];var o,u=[],s=0;if(a)for(var c=0;c<a.length;c++){var f=i[r[c]];f?(0===s&&(s=wr()),u[c]=f(a[c])):u[c]=a[c]}return r=e.apply(null,u),o=r,0!==s&&gr(s),"string"===t?O(o):"boolean"===t?!!o:o}var y,M,E,A,x,k,T,R,F,L="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function z(e,t,r){var n=t+r;for(r=t;e[r]&&!(r>=n);)++r;if(16<r-t&&e.subarray&&L)return L.decode(e.subarray(t,r));for(n="";t<r;){var a=e[t++];if(128&a){var i=63&e[t++];if(192==(224&a))n+=String.fromCharCode((31&a)<<6|i);else{var o=63&e[t++];65536>(a=224==(240&a)?(15&a)<<12|i<<6|o:(7&a)<<18|i<<12|o<<6|63&e[t++])?n+=String.fromCharCode(a):(a-=65536,n+=String.fromCharCode(55296|a>>10,56320|1023&a))}}else n+=String.fromCharCode(a)}return n}function O(e,t){return e?z(E,e,t):""}function I(e,t,r,n){if(!(0<n))return 0;var a=r;n=r+n-1;for(var i=0;i<e.length;++i){var o=e.charCodeAt(i);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++i)),127>=o){if(r>=n)break;t[r++]=o}else{if(2047>=o){if(r+1>=n)break;t[r++]=192|o>>6}else{if(65535>=o){if(r+2>=n)break;t[r++]=224|o>>12}else{if(r+3>=n)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 n=e.charCodeAt(r);55296<=n&&57343>=n&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),127>=n?++t:t=2047>=n?t+2:65535>=n?t+3:t+4}return t}function P(e){var t=S(e)+1,r=dr(t);return r&&I(e,M,r,t),r}function B(){var e=b.buffer;y=e,n.HEAP8=M=new Int8Array(e),n.HEAP16=A=new Int16Array(e),n.HEAP32=k=new Int32Array(e),n.HEAPU8=E=new Uint8Array(e),n.HEAPU16=x=new Uint16Array(e),n.HEAPU32=T=new Uint32Array(e),n.HEAPF32=R=new Float32Array(e),n.HEAPF64=F=new Float64Array(e)}var D,U=[],C=[],V=[],N=!1;function q(){var e=n.preRun.shift();U.unshift(e)}var X,Y=0,G=null,W=null;function H(){Y++,n.monitorRunDependencies&&n.monitorRunDependencies(Y)}function j(){if(Y--,n.monitorRunDependencies&&n.monitorRunDependencies(Y),0==Y&&(null!==G&&(clearInterval(G),G=null),W)){var e=W;W=null,e()}}function Z(e){throw n.onAbort&&n.onAbort(e),p(e="Aborted("+e+")"),g=!0,w=1,e=new WebAssembly.RuntimeError(e+". Build with -s ASSERTIONS=1 for more info."),i(e),e}if(n.preloadedImages={},n.preloadedAudios={},!(X="zcv.wasm").startsWith("data:application/octet-stream;base64,")){var $=X;X=n.locateFile?n.locateFile($,_):_+$}var K,Q,J={506728:function(){if(self.crypto&&self.crypto.getRandomValues){var e=new Uint32Array(1);return self.crypto.getRandomValues(e),e[0]}return 9007199254740991*Math.random()},506904:function(e,t){self.respond_ba_request(E.subarray(e,e+t))},506966:function(e,t){self.send_ba_request(E.subarray(e,e+t))}};function ee(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t(n);else{var r=t.ad;"number"==typeof r?void 0===t.uc?ne(r)():ne(r)(t.uc):r(void 0===t.uc?null:t.uc)}}}var te,re=[];function ne(e){var t=re[e];return t||(e>=re.length&&(re.length=e+1),re[e]=t=D.get(e)),t}function ae(e){e instanceof yr||"unwind"==e||f(1,e)}function ie(e,t){if(0===e)e=Date.now();else{if(1!==e&&4!==e)return k[hr()>>2]=28,-1;e=te()}return k[t>>2]=e/1e3|0,k[t+4>>2]=e%1e3*1e6|0,0}function oe(e){this.nc=e-16,this.sd=function(e){k[this.nc+4>>2]=e},this.pd=function(e){k[this.nc+8>>2]=e},this.qd=function(){k[this.nc>>2]=0},this.od=function(){M[this.nc+12>>0]=0},this.rd=function(){M[this.nc+13>>0]=0},this.dd=function(e,t){this.sd(e),this.pd(t),this.qd(),this.od(),this.rd()}}function ue(e,t){for(var r=0,n=e.length-1;0<=n;n--){var a=e[n];"."===a?e.splice(n,1):".."===a?(e.splice(n,1),r++):r&&(e.splice(n,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=ue(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function ce(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 fe(e){if("/"===e)return"/";var t=(e=(e=se(e)).replace(/\\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)}function _e(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){if("string"!=typeof(t=0<=r?arguments[r]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=ue(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."}te=()=>performance.now();var de=[];function le(e,t){de[e]={input:[],bc:[],mc:t},Ue(e,he)}var he={open:function(e){var t=de[e.node.rc];if(!t)throw new Ae(43);e.ac=t,e.seekable=!1},close:function(e){e.ac.mc.flush(e.ac)},flush:function(e){e.ac.mc.flush(e.ac)},read:function(e,t,r,n){if(!e.ac||!e.ac.mc.Nc)throw new Ae(60);for(var a=0,i=0;i<n;i++){try{var o=e.ac.mc.Nc(e.ac)}catch(e){throw new Ae(29)}if(void 0===o&&0===a)throw new Ae(6);if(null==o)break;a++,t[r+i]=o}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,n){if(!e.ac||!e.ac.mc.Gc)throw new Ae(60);try{for(var a=0;a<n;a++)e.ac.mc.Gc(e.ac,t[r+a])}catch(e){throw new Ae(29)}return n&&(e.node.timestamp=Date.now()),a}},pe={Nc: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()},Gc:function(e,t){null===t||10===t?(h(z(e.bc,0)),e.bc=[]):0!=t&&e.bc.push(t)},flush:function(e){e.bc&&0<e.bc.length&&(h(z(e.bc,0)),e.bc=[])}},me={Gc:function(e,t){null===t||10===t?(p(z(e.bc,0)),e.bc=[]):0!=t&&e.bc.push(t)},flush:function(e){e.bc&&0<e.bc.length&&(p(z(e.bc,0)),e.bc=[])}},be={fc:null,ic:function(){return be.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(24576==(61440&r)||4096==(61440&r))throw new Ae(63);return be.fc||(be.fc={dir:{node:{ec:be.Xb.ec,hc:be.Xb.hc,pc:be.Xb.pc,vc:be.Xb.vc,Tc:be.Xb.Tc,Ac:be.Xb.Ac,Uc:be.Xb.Uc,Sc:be.Xb.Sc,wc:be.Xb.wc},stream:{kc:be.Zb.kc}},file:{node:{ec:be.Xb.ec,hc:be.Xb.hc},stream:{kc:be.Zb.kc,read:be.Zb.read,write:be.Zb.write,Ic:be.Zb.Ic,Oc:be.Zb.Oc,Qc:be.Zb.Qc}},link:{node:{ec:be.Xb.ec,hc:be.Xb.hc,sc:be.Xb.sc},stream:{}},Jc:{node:{ec:be.Xb.ec,hc:be.Xb.hc},stream:De}}),16384==(61440&(r=Le(e,t,r,n)).mode)?(r.Xb=be.fc.dir.node,r.Zb=be.fc.dir.stream,r.Yb={}):32768==(61440&r.mode)?(r.Xb=be.fc.file.node,r.Zb=be.fc.file.stream,r.$b=0,r.Yb=null):40960==(61440&r.mode)?(r.Xb=be.fc.link.node,r.Zb=be.fc.link.stream):8192==(61440&r.mode)&&(r.Xb=be.fc.Jc.node,r.Zb=be.fc.Jc.stream),r.timestamp=Date.now(),e&&(e.Yb[t]=r,e.timestamp=r.timestamp),r},Fd:function(e){return e.Yb?e.Yb.subarray?e.Yb.subarray(0,e.$b):new Uint8Array(e.Yb):new Uint8Array(0)},Kc:function(e,t){var r=e.Yb?e.Yb.length:0;r>=t||(t=Math.max(t,r*(1048576>r?2:1.125)>>>0),0!=r&&(t=Math.max(t,256)),r=e.Yb,e.Yb=new Uint8Array(t),0<e.$b&&e.Yb.set(r.subarray(0,e.$b),0))},md:function(e,t){if(e.$b!=t)if(0==t)e.Yb=null,e.$b=0;else{var r=e.Yb;e.Yb=new Uint8Array(t),r&&e.Yb.set(r.subarray(0,Math.min(t,e.$b))),e.$b=t}},Xb:{ec:function(e){var t={};return t.Zc=8192==(61440&e.mode)?e.id:1,t.Fc=e.id,t.mode=e.mode,t.kd=1,t.uid=0,t.bd=0,t.rc=e.rc,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.$b:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.Vc=new Date(e.timestamp),t.jd=new Date(e.timestamp),t.Yc=new Date(e.timestamp),t.Wc=4096,t.Xc=Math.ceil(t.size/t.Wc),t},hc:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&be.md(e,t.size)},pc:function(){throw xe[44]},vc:function(e,t,r,n){return be.createNode(e,t,r,n)},Tc:function(e,t,r){if(16384==(61440&e.mode)){try{var n=Fe(t,r)}catch(e){}if(n)for(var a in n.Yb)throw new Ae(55)}delete e.parent.Yb[e.name],e.parent.timestamp=Date.now(),e.name=r,t.Yb[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},Ac:function(e,t){delete e.Yb[t],e.timestamp=Date.now()},Uc:function(e,t){var r,n=Fe(e,t);for(r in n.Yb)throw new Ae(55);delete e.Yb[t],e.timestamp=Date.now()},Sc:function(e){var t,r=[".",".."];for(t in e.Yb)e.Yb.hasOwnProperty(t)&&r.push(t);return r},wc:function(e,t,r){return(e=be.createNode(e,t,41471,0)).link=r,e},sc:function(e){if(40960!=(61440&e.mode))throw new Ae(28);return e.link}},Zb:{read:function(e,t,r,n,a){var i=e.node.Yb;if(a>=e.node.$b)return 0;if(8<(e=Math.min(e.node.$b-a,n))&&i.subarray)t.set(i.subarray(a,a+e),r);else for(n=0;n<e;n++)t[r+n]=i[a+n];return e},write:function(e,t,r,n,a,i){if(t.buffer===M.buffer&&(i=!1),!n)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.Yb||e.Yb.subarray)){if(i)return e.Yb=t.subarray(r,r+n),e.$b=n;if(0===e.$b&&0===a)return e.Yb=t.slice(r,r+n),e.$b=n;if(a+n<=e.$b)return e.Yb.set(t.subarray(r,r+n),a),n}if(be.Kc(e,a+n),e.Yb.subarray&&t.subarray)e.Yb.set(t.subarray(r,r+n),a);else for(i=0;i<n;i++)e.Yb[a+i]=t[r+i];return e.$b=Math.max(e.$b,a+n),n},kc:function(e,t,r){if(1===r?t+=e.position:2===r&&32768==(61440&e.node.mode)&&(t+=e.node.$b),0>t)throw new Ae(28);return t},Ic:function(e,t,r){be.Kc(e.node,t+r),e.node.$b=Math.max(e.node.$b,t+r)},Oc:function(e,t,r,n,a,i){if(0!==t)throw new Ae(28);if(32768!=(61440&e.node.mode))throw new Ae(43);if(e=e.node.Yb,2&i||e.buffer!==y){if((0<n||n+r<e.length)&&(e=e.subarray?e.subarray(n,n+r):Array.prototype.slice.call(e,n,n+r)),n=!0,Z(),!(r=void 0))throw new Ae(48);M.set(e,r)}else n=!1,r=e.byteOffset;return{nc:r,Bd:n}},Qc:function(e,t,r,n,a){if(32768!=(61440&e.node.mode))throw new Ae(43);return 2&a||be.Zb.write(e,t,0,n,r,!1),0}}},we=null,ge={},ve=[],ye=1,Me=null,Ee=!0,Ae=null,xe={};function ke(e,t){if(t=t||{},!(e=_e("/",e)))return{path:"",node:null};var r,n={Lc:!0,Hc:0};for(r in n)void 0===t[r]&&(t[r]=n[r]);if(8<t.Hc)throw new Ae(32);e=ue(e.split("/").filter((function(e){return!!e})),!1);var a=we;for(n="/",r=0;r<e.length;r++){var i=r===e.length-1;if(i&&t.parent)break;if(a=Fe(a,e[r]),n=se(n+"/"+e[r]),a.qc&&(!i||i&&t.Lc)&&(a=a.qc.root),!i||t.Dc)for(i=0;40960==(61440&a.mode);)if(a=Ye(n),a=ke(n=_e(ce(n),a),{Hc:t.Hc}).node,40<i++)throw new Ae(32)}return{path:n,node:a}}function Te(e){for(var t;;){if(e===e.parent)return e=e.ic.Pc,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}}function Re(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%Me.length}function Fe(e,t){var r;if(r=(r=Ie(e,"x"))?r:e.Xb.pc?0:2)throw new Ae(r,e);for(r=Me[Re(e.id,t)];r;r=r.lc){var n=r.name;if(r.parent.id===e.id&&n===t)return r}return e.Xb.pc(e,t)}function Le(e,t,r,n){return t=Re((e=new ur(e,t,r,n)).parent.id,e.name),e.lc=Me[t],Me[t]=e}var ze={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090};function Oe(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function Ie(e,t){return Ee?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2}function Se(e,t){try{return Fe(e,t),20}catch(e){}return Ie(e,"wx")}function Pe(e,t){Qe||((Qe=function(){}).prototype={});var r,n=new Qe;for(r in e)n[r]=e[r];return e=n,t=function(e){for(e=e||0;e<=4096;e++)if(!ve[e])return e;throw new Ae(33)}(t),e.jc=t,ve[t]=e}var Be,De={open:function(e){e.Zb=ge[e.node.rc].Zb,e.Zb.open&&e.Zb.open(e)},kc:function(){throw new Ae(70)}};function Ue(e,t){ge[e]={Zb:t}}function Ce(e,t){var r="/"===t,n=!t;if(r&&we)throw new Ae(10);if(!r&&!n){var a=ke(t,{Lc:!1});if(t=a.path,(a=a.node).qc)throw new Ae(10);if(16384!=(61440&a.mode))throw new Ae(54)}t={type:e,Jd:{},Pc:t,hd:[]},(e=e.ic(t)).ic=t,t.root=e,r?we=e:a&&(a.qc=t,a.ic&&a.ic.hd.push(t))}function Ve(e,t,r){var n=ke(e,{parent:!0}).node;if(!(e=fe(e))||"."===e||".."===e)throw new Ae(28);var a=Se(n,e);if(a)throw new Ae(a);if(!n.Xb.vc)throw new Ae(63);return n.Xb.vc(n,e,t,r)}function Ne(e){return Ve(e,16895,0)}function qe(e,t,r){void 0===r&&(r=t,t=438),Ve(e,8192|t,r)}function Xe(e,t){if(!_e(e))throw new Ae(44);var r=ke(t,{parent:!0}).node;if(!r)throw new Ae(44);var n=Se(r,t=fe(t));if(n)throw new Ae(n);if(!r.Xb.wc)throw new Ae(63);r.Xb.wc(r,t,e)}function Ye(e){if(!(e=ke(e).node))throw new Ae(44);if(!e.Xb.sc)throw new Ae(28);return _e(Te(e.parent),e.Xb.sc(e))}function Ge(e,t){if(!(e=ke(e,{Dc:!t}).node))throw new Ae(44);if(!e.Xb.ec)throw new Ae(63);return e.Xb.ec(e)}function We(e){return Ge(e,!0)}function He(e,t,r,a){if(""===e)throw new Ae(44);if("string"==typeof t){var i=ze[t];if(void 0===i)throw Error("Unknown file open mode: "+t);t=i}if(r=64&t?4095&(void 0===r?438:r)|32768:0,"object"==typeof e)var o=e;else{e=se(e);try{o=ke(e,{Dc:!(131072&t)}).node}catch(e){}}if(i=!1,64&t)if(o){if(128&t)throw new Ae(20)}else o=Ve(e,r,0),i=!0;if(!o)throw new Ae(44);if(8192==(61440&o.mode)&&(t&=-513),65536&t&&16384!=(61440&o.mode))throw new Ae(54);if(!i&&(r=o?40960==(61440&o.mode)?32:16384==(61440&o.mode)&&("r"!==Oe(t)||512&t)?31:Ie(o,Oe(t)):44))throw new Ae(r);if(512&t){if(!(r="string"==typeof(r=o)?ke(r,{Dc:!0}).node:r).Xb.hc)throw new Ae(63);if(16384==(61440&r.mode))throw new Ae(31);if(32768!=(61440&r.mode))throw new Ae(28);if(i=Ie(r,"w"))throw new Ae(i);r.Xb.hc(r,{size:0,timestamp:Date.now()})}return t&=-131713,(a=Pe({node:o,path:Te(o),id:o.id,flags:t,mode:o.mode,seekable:!0,position:0,Zb:o.Zb,Xb:o.Xb,xd:[],error:!1},a)).Zb.open&&a.Zb.open(a),!n.logReadFiles||1&t||(Je||(Je={}),e in Je||(Je[e]=1)),a}function je(e,t,r){if(null===e.jc)throw new Ae(8);if(!e.seekable||!e.Zb.kc)throw new Ae(70);if(0!=r&&1!=r&&2!=r)throw new Ae(28);e.position=e.Zb.kc(e,t,r),e.xd=[]}function Ze(){Ae||((Ae=function(e,t){this.node=t,this.nd=function(e){this.dc=e},this.nd(e),this.message="FS error"}).prototype=Error(),Ae.prototype.constructor=Ae,[44].forEach((function(e){xe[e]=new Ae(e),xe[e].stack="<generic error, no stack>"})))}function $e(e,t,r){e=se("/dev/"+e);var n=function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r}(!!t,!!r);Ke||(Ke=64);var a=Ke++<<8|0;Ue(a,{open:function(e){e.seekable=!1},close:function(){r&&r.buffer&&r.buffer.length&&r(10)},read:function(e,r,n,a){for(var i=0,o=0;o<a;o++){try{var u=t()}catch(e){throw new Ae(29)}if(void 0===u&&0===i)throw new Ae(6);if(null==u)break;i++,r[n+o]=u}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,n,a){for(var i=0;i<a;i++)try{r(t[n+i])}catch(e){throw new Ae(29)}return a&&(e.node.timestamp=Date.now()),i}}),qe(e,n,a)}var Ke,Qe,Je,et={};function tt(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&se(t)!==se(Te(e.node)))return-54;throw e}return k[r>>2]=n.Zc,k[r+4>>2]=0,k[r+8>>2]=n.Fc,k[r+12>>2]=n.mode,k[r+16>>2]=n.kd,k[r+20>>2]=n.uid,k[r+24>>2]=n.bd,k[r+28>>2]=n.rc,k[r+32>>2]=0,Q=[n.size>>>0,(K=n.size,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[r+40>>2]=Q[0],k[r+44>>2]=Q[1],k[r+48>>2]=4096,k[r+52>>2]=n.Xc,k[r+56>>2]=n.Vc.getTime()/1e3|0,k[r+60>>2]=0,k[r+64>>2]=n.jd.getTime()/1e3|0,k[r+68>>2]=0,k[r+72>>2]=n.Yc.getTime()/1e3|0,k[r+76>>2]=0,Q=[n.Fc>>>0,(K=n.Fc,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[r+80>>2]=Q[0],k[r+84>>2]=Q[1],0}var rt=void 0;function nt(){return k[(rt+=4)-4>>2]}function at(e){if(!(e=ve[e]))throw new Ae(8);return e}var it=[];function ot(e,t){if(!N&&!g)if(t)e();else try{e()}catch(e){ae(e)}}function ut(e,t){setTimeout((function(){ot(e)}),t)}var st,ct,ft,_t=!1,dt=null,lt=0,ht=null,pt=0,mt=0,bt=0,wt=[],gt={},vt=!1,yt=!1,Mt=[];function Et(){function e(){yt=document.pointerLockElement===n.canvas||document.mozPointerLockElement===n.canvas||document.webkitPointerLockElement===n.canvas||document.msPointerLockElement===n.canvas}if(n.preloadPlugins||(n.preloadPlugins=[]),!Pt){Pt=!0;try{Bt=!0}catch(e){Bt=!1,h("warning: no blob constructor, cannot create blobs with mimetypes")}Dt="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:Bt?null:h("warning: no BlobBuilder"),Ut="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,n.Rc||void 0!==Ut||(h("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),n.Rc=!0),n.preloadPlugins.push({canHandle:function(e){return!n.Rc&&/\\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,r,a){var i=null;if(Bt)try{(i=new Blob([e],{type:zt(t)})).size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:zt(t)}))}catch(e){!function(e){d||(d={}),d[e]||(d[e]=1,p(e))}("Blob constructor present but fails: "+e+"; falling back to blob builder")}i||((i=new Dt).append(new Uint8Array(e).buffer),i=i.getBlob());var o=Ut.createObjectURL(i),u=new Image;u.onload=()=>{u.complete||Z("Image "+t+" could not be decoded");var a=document.createElement("canvas");a.width=u.width,a.height=u.height,a.getContext("2d").drawImage(u,0,0),n.preloadedImages[t]=a,Ut.revokeObjectURL(o),r&&r(e)},u.onerror=()=>{h("Image "+o+" could not be decoded"),a&&a()},u.src=o}}),n.preloadPlugins.push({canHandle:function(e){return!n.Id&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,r,a){function i(a){u||(u=!0,n.preloadedAudios[t]=a,r&&r(e))}function o(){u||(u=!0,n.preloadedAudios[t]=new Audio,a&&a())}var u=!1;if(!Bt)return o();try{var s=new Blob([e],{type:zt(t)})}catch(e){return o()}s=Ut.createObjectURL(s);var c=new Audio;c.addEventListener("canplaythrough",(function(){i(c)}),!1),c.onerror=function(){if(!u){h("warning: browser could not fully decode audio "+t+", trying slower base64 approach");for(var r="",n=0,a=0,o=0;o<e.length;o++)for(n=n<<8|e[o],a+=8;6<=a;){var s=n>>a-6&63;a-=6,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[s]}2==a?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&n)<<4],r+="=="):4==a&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&n)<<2],r+="="),c.src="data:audio/x-"+t.substr(-3)+";base64,"+r,i(c)}},c.src=s,ut((function(){i(c)}),1e4)}});var t=n.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),n.elementPointerLock&&t.addEventListener("click",(function(e){!yt&&n.canvas.requestPointerLock&&(n.canvas.requestPointerLock(),e.preventDefault())}),!1))}}function At(e,t,r,a){if(t&&n.Cc&&e==n.canvas)return n.Cc;var i;if(t){var o={antialias:!1,alpha:!1,gd:1};if(a)for(var u in a)o[u]=a[u];if(void 0!==er&&(i=function(e,t){e.Mc||(e.Mc=e.getContext,e.getContext=function(t,r){return"webgl"==t==(r=e.Mc(t,r))instanceof WebGLRenderingContext?r:null});var r=e.getContext("webgl",t);return r?function(e,t){var r=$t(Zt),n={Gd:r,attributes:t,version:t.gd,Bc:e};return e.canvas&&(e.canvas.zd=n),Zt[r]=n,(void 0===t.$c||t.$c)&&function(e){if(e||(e=Qt),!e.ed){e.ed=!0;var t=e.Bc;!function(e){var t=e.getExtension("ANGLE_instanced_arrays");t&&(e.vertexAttribDivisor=function(e,r){t.vertexAttribDivisorANGLE(e,r)},e.drawArraysInstanced=function(e,r,n,a){t.drawArraysInstancedANGLE(e,r,n,a)},e.drawElementsInstanced=function(e,r,n,a,i){t.drawElementsInstancedANGLE(e,r,n,a,i)})}(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.Dd=t.getExtension("EXT_disjoint_timer_query"),t.Hd=t.getExtension("WEBGL_multi_draw"),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}(n),r}(r,t):0}(e,o)))var s=Zt[i].Bc}else s=e.getContext("2d");return s?(r&&(t||void 0===nr||Z("cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),n.Cc=s,t&&(Qt=Zt[i],n.Cc=nr=Qt&&Qt.Bc),n.Ld=t,Mt.forEach((function(e){e()})),Et()),s):null}var xt=!1,kt=void 0,Tt=void 0;function Rt(){return!!vt&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)}var Ft=0;function Lt(e){if("function"==typeof requestAnimationFrame)requestAnimationFrame(e);else{var t=Date.now();if(0===Ft)Ft=t+1e3/60;else for(;t+2>=Ft;)Ft+=1e3/60;setTimeout(e,Math.max(Ft-t,0))}}function zt(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 Ot=[];function It(){var e=n.canvas;Ot.forEach((function(t){t(e.width,e.height)}))}function St(e,t,r){t&&r?(e.yd=t,e.cd=r):(t=e.yd,r=e.cd);var a=t,i=r;if(n.forcedAspectRatio&&0<n.forcedAspectRatio&&(a/i<n.forcedAspectRatio?a=Math.round(i*n.forcedAspectRatio):i=Math.round(a/n.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/i);a=Math.round(a*o),i=Math.round(i*o)}Tt?(e.width!=a&&(e.width=a),e.height!=i&&(e.height=i),void 0!==e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=t&&(e.width=t),e.height!=r&&(e.height=r),void 0!==e.style&&(a!=t||i!=r?(e.style.setProperty("width",a+"px","important"),e.style.setProperty("height",i+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))}var Pt,Bt,Dt,Ut,Ct,Vt=[];function Nt(e,t){T[e>>2]=t,T[e+4>>2]=t/4294967296|0}function qt(e,t,r,n,a){function i(t){var r=0,n=0;t&&(n=v.response?v.response.byteLength:0,r=dr(n),E.set(new Uint8Array(v.response),r)),T[e+12>>2]=r,Nt(e+16,n)}var o=T[e+8>>2];if(o){var u=O(o),s=e+112,c=O(s);c||(c="GET");var f=T[s+52>>2],_=T[s+56>>2],d=!!T[s+60>>2],l=T[s+68>>2],h=T[s+72>>2];o=T[s+76>>2];var p=T[s+80>>2],m=T[s+84>>2];s=T[s+88>>2];var b=!!(1&f),w=!!(2&f);f=!!(64&f),l=l?O(l):void 0,h=h?O(h):void 0;var g=p?O(p):void 0,v=new XMLHttpRequest;if(v.withCredentials=d,v.open(c,u,!f,l,h),f||(v.timeout=_),v.Ad=u,v.responseType="arraybuffer",p&&v.overrideMimeType(g),o)for(;(c=T[o>>2])&&(u=T[o+4>>2]);)o+=8,c=O(c),u=O(u),v.setRequestHeader(c,u);Vt.push(v),T[e+0>>2]=Vt.length,o=m&&s?E.slice(m,m+s):null,v.onload=function(n){i(b&&!w);var a=v.response?v.response.byteLength:0;Nt(e+24,0),a&&Nt(e+32,a),x[e+40>>1]=v.readyState,x[e+42>>1]=v.status,v.statusText&&I(v.statusText,E,e+44,64),200<=v.status&&300>v.status?t&&t(e,v,n):r&&r(e,v,n)},v.onerror=function(t){i(b);var n=v.status;Nt(e+24,0),Nt(e+32,v.response?v.response.byteLength:0),x[e+40>>1]=v.readyState,x[e+42>>1]=n,r&&r(e,v,t)},v.ontimeout=function(t){r&&r(e,v,t)},v.onprogress=function(t){var r=b&&w&&v.response?v.response.byteLength:0,a=0;b&&w&&(a=dr(r),E.set(new Uint8Array(v.response),a)),T[e+12>>2]=a,Nt(e+16,r),Nt(e+24,t.loaded-r),Nt(e+32,t.total),x[e+40>>1]=v.readyState,3<=v.readyState&&0===v.status&&0<t.loaded&&(v.status=200),x[e+42>>1]=v.status,v.statusText&&I(v.statusText,E,e+44,64),n&&n(e,v,t),a&&_r(a)},v.onreadystatechange=function(t){x[e+40>>1]=v.readyState,2<=v.readyState&&(x[e+42>>1]=v.status),a&&a(e,v,t)};try{v.send(o)}catch(t){r&&r(e,v,t)}}else r(e,0,"no url specified!")}function Xt(e,t,r,n){var a=Ct;if(a){var i=T[e+112+64>>2];i||(i=T[e+8>>2]);var o=O(i);try{var u=a.transaction(["FILES"],"readwrite").objectStore("FILES").put(t,o);u.onsuccess=function(){x[e+40>>1]=4,x[e+42>>1]=200,I("OK",E,e+44,64),r(e,0,o)},u.onerror=function(t){x[e+40>>1]=4,x[e+42>>1]=413,I("Payload Too Large",E,e+44,64),n(e,0,t)}}catch(t){n(e,0,t)}}else n(e,0,"IndexedDB not available!")}var Yt,Gt={};function Wt(){if(!Yt){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",_:c||"./this.program"};for(e in Gt)void 0===Gt[e]?delete t[e]:t[e]=Gt[e];var r=[];for(e in t)r.push(e+"="+t[e]);Yt=r}return Yt}var Ht=1,jt=[],Zt=[];function $t(e){for(var t=Ht++,r=e.length;r<t;r++)e[r]=null;return t}var Kt,Qt,Jt,er={};function tr(e){return 0==e%4&&(0!=e%100||0==e%400)}function rr(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var nr,ar=[31,29,31,30,31,30,31,31,30,31,30,31],ir=[31,28,31,30,31,30,31,31,30,31,30,31];function or(e,t){for(e=new Date(e.getTime());0<t;){var r=e.getMonth(),n=(tr(e.getFullYear())?ar:ir)[r];if(!(t>n-e.getDate())){e.setDate(e.getDate()+t);break}t-=n-e.getDate()+1,e.setDate(1),11>r?e.setMonth(r+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function ur(e,t,r,n){e||(e=this),this.parent=e,this.ic=e.ic,this.qc=null,this.id=ye++,this.name=t,this.mode=r,this.Xb={},this.Zb={},this.rc=n}function sr(e,t){var r=Array(S(e)+1);return e=I(e,r,0,r.length),t&&(r.length=e),r}Object.defineProperties(ur.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(),Me=Array(4096),Ce(be,"/"),Ne("/tmp"),Ne("/home"),Ne("/home/web_user"),function(){Ne("/dev"),Ue(259,{read:function(){return 0},write:function(e,t,r,n){return n}}),qe("/dev/null",259),le(1280,pe),le(1536,me),qe("/dev/tty",1280),qe("/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(){Z("randomDevice")}}();$e("random",e),$e("urandom",e),Ne("/dev/shm"),Ne("/dev/shm/tmp")}(),function(){Ne("/proc");var e=Ne("/proc/self");Ne("/proc/self/fd"),Ce({ic:function(){var t=Le(e,"fd",16895,73);return t.Xb={pc:function(e,t){var r=ve[+t];if(!r)throw new Ae(8);return(e={parent:null,ic:{Pc:"fake"},Xb:{sc:function(){return r.path}}}).parent=e}},t}},"/proc/self/fd")}(),n.requestFullscreen=function(e,t){!function(e,t){function r(){vt=!1;var e=a.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(a.exitFullscreen=Rt,kt&&a.requestPointerLock(),vt=!0,Tt?("undefined"!=typeof SDL&&(k[SDL.screen>>2]=8388608|T[SDL.screen>>2]),St(n.canvas),It()):St(a)):(e.parentNode.insertBefore(a,e),e.parentNode.removeChild(e),Tt?("undefined"!=typeof SDL&&(k[SDL.screen>>2]=-8388609&T[SDL.screen>>2]),St(n.canvas),It()):St(a)),n.onFullScreen&&n.onFullScreen(vt),n.onFullscreen&&n.onFullscreen(vt)}void 0===(kt=e)&&(kt=!0),void 0===(Tt=t)&&(Tt=!1);var a=n.canvas;xt||(xt=!0,document.addEventListener("fullscreenchange",r,!1),document.addEventListener("mozfullscreenchange",r,!1),document.addEventListener("webkitfullscreenchange",r,!1),document.addEventListener("MSFullscreenChange",r,!1));var i=document.createElement("div");a.parentNode.insertBefore(i,a),i.appendChild(a),i.requestFullscreen=i.requestFullscreen||i.mozRequestFullScreen||i.msRequestFullscreen||(i.webkitRequestFullscreen?function(){i.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(i.webkitRequestFullScreen?function(){i.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),i.requestFullscreen()}(e,t)},n.requestAnimationFrame=function(e){Lt(e)},n.setCanvasSize=function(e,t,r){St(n.canvas,e,t),r||It()},n.pauseMainLoop=function(){dt=null,lt++},n.resumeMainLoop=function(){lt++;var t=pt,r=mt,a=ht;ht=null,function(e){function t(){if(r<lt){if(!m)try{Er(w)}catch(e){ae(e)}return!1}return!0}!ht||Z("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."),ht=e;var r=lt;_t=!1,ct=function(){if(!g)if(0<wt.length){var r=Date.now(),a=wt.shift();if(a.ad(a.uc),ft){var i=ft,o=0==i%1?i-1:Math.floor(i);ft=a.Cd?o:(8*i+(o+.5))/9}h(\'main loop blocker "\'+a.name+\'" took \'+(Date.now()-r)+" ms"),n.setStatus&&(r=n.statusMessage||"Please wait...",a=ft,i=gt.Ed,a?a<i?n.setStatus(r+" ("+(i-a)+"/"+i+")"):n.setStatus(r):n.setStatus("")),t()&&setTimeout(ct,0)}else t()&&(bt=bt+1|0,1==pt&&1<mt&&0!=bt%mt?dt():(0==pt&&(st=te()),g||n.preMainLoop&&!1===n.preMainLoop()||(ot(e),n.postMainLoop&&n.postMainLoop()),t()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.ld&&SDL.audio.ld(),dt())))}}(a),function(t,r){if(pt=t,mt=r,ht)if(_t||(_t=!0),0==t)dt=function(){var e=0|Math.max(0,st+r-te());setTimeout(ct,e)};else if(1==t)dt=function(){Lt(ct)};else if(2==t){if(void 0===e){var a=[];addEventListener("message",(function(e){"setimmediate"!==e.data&&"setimmediate"!==e.data.target||(e.stopPropagation(),a.shift()())}),!0),e=function(e){a.push(e),void 0===n.setImmediates&&(n.setImmediates=[]),n.setImmediates.push(e),postMessage({target:"setimmediate"})}}dt=function(){e(ct)}}}(t,r),dt()},n.getUserMedia=function(){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(void 0)},n.createContext=function(e,t,r,n){return At(e,t,r,n)},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){Ct=e,j()}(e.target.result)},r.onerror=function(e){t()}}(0,(function(){Ct=!1,j()})),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||H();var cr={y:function(e,t){return ie(e,t)},a:function(e){return dr(e+16)+16},b:function(e,t,r){throw new oe(e).dd(t,r),e},k:function(e,t,r){rt=r;try{var n=at(e);switch(t){case 0:var a=nt();return 0>a?-28:He(n.path,n.flags,0,a).jc;case 1:case 2:return 0;case 3:return n.flags;case 4:return a=nt(),n.flags|=a,0;case 5:return a=nt(),A[a+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return k[hr()>>2]=28,-1;default:return-28}}catch(e){if(void 0===et||!(e instanceof Ae))throw e;return-e.dc}},E:function(e,t,r){rt=r;try{var n=at(e);switch(t){case 21509:case 21505:return n.ac?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.ac?0:-59;case 21519:if(!n.ac)return-59;var a=nt();return k[a>>2]=0;case 21520:return n.ac?-28:-59;case 21531:if(e=a=nt(),!n.Zb.fd)throw new Ae(59);return n.Zb.fd(n,t,e);case 21523:case 21524:return n.ac?0:-59;default:Z("bad ioctl syscall "+t)}}catch(e){if(void 0===et||!(e instanceof Ae))throw e;return-e.dc}},B:function(e,t){try{return tt(We,e=O(e),t)}catch(e){if(void 0===et||!(e instanceof Ae))throw e;return-e.dc}},o:function(e,t,r){rt=r;try{return He(O(e),t,r?nt():0).jc}catch(e){if(void 0===et||!(e instanceof Ae))throw e;return-e.dc}},C:function(e,t){try{return tt(Ge,e=O(e),t)}catch(e){if(void 0===et||!(e instanceof Ae))throw e;return-e.dc}},w:function(e,t){try{return Xe(e=O(e),t=O(t)),0}catch(e){if(void 0===et||!(e instanceof Ae))throw e;return-e.dc}},x:function(e){try{var t=ke(e=O(e),{parent:!0}).node;if(!t)throw new Ae(44);var r=fe(e),n=Fe(t,r);e:{try{var a=Fe(t,r)}catch(e){var i=e.dc;break e}var o=Ie(t,"wx");i=o||(16384==(61440&a.mode)?31:0)}if(i)throw new Ae(i);if(!t.Xb.Ac)throw new Ae(63);if(n.qc)throw new Ae(10);t.Xb.Ac(t,r);var u=Re(n.parent.id,n.name);if(Me[u]===n)Me[u]=n.lc;else for(var s=Me[u];s;){if(s.lc===n){s.lc=n.lc;break}s=s.lc}return 0}catch(e){if(void 0===et||!(e instanceof Ae))throw e;return-e.dc}},F:function(e){delete Vt[e-1]},c:function(){Z("")},J:ie,K:function(){self.postMessage({t:"gfx"})},q: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=dr(t);return I(e,E,r,t+1),r},L:function(){self.postMessage({t:"licerr"})},f:function(e,t,r){var n;for(it.length=0,r>>=2;n=E[t++];)(n=105>n)&&1&r&&r++,it.push(n?F[r++>>1]:k[r]),++r;return J[e].apply(null,it)},l:function(e,t,r){function n(){ne(e)(t)}0<=r?ut(n,r):function(e){Lt((function(){ot(e)}))}(n)},v:function(){return 2147483648},H:function(){return!1},s:function(e,t,r){E.copyWithin(e,t,t+r)},t:function(e){var t=E.length;if(2147483648<(e>>>=0))return!1;for(var r=1;4>=r;r*=2){var n=t*(1+.2/r);n=Math.min(n,e+100663296),0<(n=Math.max(e,n))%65536&&(n+=65536-n%65536);e:{try{b.grow(Math.min(2147483648,n)-y.byteLength+65535>>>16),B();var a=1;break e}catch(e){}a=void 0}if(a)return!0}return!1},G:function(e,t,r,n,a){function i(e,r){Xt(e,r.response,(function(e){ot((function(){d?ne(d)(e):t&&t(e)}),v)}),(function(e){ot((function(){d?ne(d)(e):t&&t(e)}),v)}))}function o(e){ot((function(){p?ne(p)(e):a&&a(e)}),v)}function u(e){ot((function(){l?ne(l)(e):r&&r(e)}),v)}function s(e){ot((function(){h?ne(h)(e):n&&n(e)}),v)}function c(e){ot((function(){d?ne(d)(e):t&&t(e)}),v)}var f=e+112,_=O(f),d=T[f+36>>2],l=T[f+40>>2],h=T[f+44>>2],p=T[f+48>>2],m=T[f+52>>2],b=!!(4&m),w=!!(32&m),g=!!(16&m),v=!!(64&m);if("EM_IDB_STORE"===_)_=T[f+84>>2],Xt(e,E.slice(_,_+T[f+88>>2]),c,u);else if("EM_IDB_DELETE"===_)!function(e,t,r){var n=Ct;if(n){var a=T[e+112+64>>2];a||(a=T[e+8>>2]),a=O(a);try{var i=n.transaction(["FILES"],"readwrite").objectStore("FILES").delete(a);i.onsuccess=function(r){r=r.target.result,T[e+12>>2]=0,Nt(e+16,0),Nt(e+24,0),Nt(e+32,0),x[e+40>>1]=4,x[e+42>>1]=200,I("OK",E,e+44,64),t(e,0,r)},i.onerror=function(t){x[e+40>>1]=4,x[e+42>>1]=404,I("Not Found",E,e+44,64),r(e,0,t)}}catch(t){r(e,0,t)}}else r(e,0,"IndexedDB not available!")}(e,c,u);else if(g){if(w)return 0;qt(e,b?i:c,u,s,o)}else!function(e,t,r){var n=Ct;if(n){var a=T[e+112+64>>2];a||(a=T[e+8>>2]),a=O(a);try{var i=n.transaction(["FILES"],"readonly").objectStore("FILES").get(a);i.onsuccess=function(n){if(n.target.result){var a=(n=n.target.result).byteLength||n.length,i=dr(a);E.set(new Uint8Array(n),i),T[e+12>>2]=i,Nt(e+16,a),Nt(e+24,0),Nt(e+32,a),x[e+40>>1]=4,x[e+42>>1]=200,I("OK",E,e+44,64),t(e,0,n)}else x[e+40>>1]=4,x[e+42>>1]=404,I("Not Found",E,e+44,64),r(e,0,"no data")},i.onerror=function(t){x[e+40>>1]=4,x[e+42>>1]=404,I("Not Found",E,e+44,64),r(e,0,t)}}catch(t){r(e,0,t)}}else r(e,0,"IndexedDB not available!")}(e,c,w?u:b?function(e){qt(e,i,u,s,o)}:function(e){qt(e,c,u,s,o)});return e},z:function(e,t){var r=0;return Wt().forEach((function(n,a){var i=t+r;for(a=k[e+4*a>>2]=i,i=0;i<n.length;++i)M[a++>>0]=n.charCodeAt(i);M[a>>0]=0,r+=n.length+1})),0},A:function(e,t){var r=Wt();k[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),k[t>>2]=n,0},I:function(e){Er(e)},j:function(e){try{var t=at(e);if(null===t.jc)throw new Ae(8);t.Ec&&(t.Ec=null);try{t.Zb.close&&t.Zb.close(t)}catch(e){throw e}finally{ve[t.jc]=null}return t.jc=null,0}catch(e){if(void 0===et||!(e instanceof Ae))throw e;return e.dc}},D:function(e,t,r,n){try{e:{for(var a=at(e),i=e=0;i<r;i++){var o=k[t+(8*i+4)>>2],u=a,s=k[t+8*i>>2],c=o,f=void 0,_=M;if(0>c||0>f)throw new Ae(28);if(null===u.jc)throw new Ae(8);if(1==(2097155&u.flags))throw new Ae(8);if(16384==(61440&u.node.mode))throw new Ae(31);if(!u.Zb.read)throw new Ae(28);var d=void 0!==f;if(d){if(!u.seekable)throw new Ae(70)}else f=u.position;var l=u.Zb.read(u,_,s,c,f);d||(u.position+=l);var h=l;if(0>h){var p=-1;break e}if(e+=h,h<o)break}p=e}return k[n>>2]=p,0}catch(e){if(void 0===et||!(e instanceof Ae))throw e;return e.dc}},r:function(e,t,r,n,a){try{var i=at(e);return-9007199254740992>=(e=4294967296*r+(t>>>0))||9007199254740992<=e?-61:(je(i,e,n),Q=[i.position>>>0,(K=i.position,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[a>>2]=Q[0],k[a+4>>2]=Q[1],i.Ec&&0===e&&0===n&&(i.Ec=null),0)}catch(e){if(void 0===et||!(e instanceof Ae))throw e;return e.dc}},i:function(e,t,r,n){try{e:{for(var a=at(e),i=e=0;i<r;i++){var o=a,u=k[t+8*i>>2],s=k[t+(8*i+4)>>2],c=void 0,f=M;if(0>s||0>c)throw new Ae(28);if(null===o.jc)throw new Ae(8);if(0==(2097155&o.flags))throw new Ae(8);if(16384==(61440&o.node.mode))throw new Ae(31);if(!o.Zb.write)throw new Ae(28);o.seekable&&1024&o.flags&&je(o,0,2);var _=void 0!==c;if(_){if(!o.seekable)throw new Ae(70)}else c=o.position;var d=o.Zb.write(o,f,u,s,c,void 0);_||(o.position+=d);var l=d;if(0>l){var h=-1;break e}e+=l}h=e}return k[n>>2]=h,0}catch(e){if(void 0===et||!(e instanceof Ae))throw e;return e.dc}},e:function(e){var t=Date.now();return k[e>>2]=t/1e3|0,k[e+4>>2]=t%1e3*1e3|0,0},m:function(e,t){nr.bindTexture(e,jt[t])},n:function(e,t){for(var r=0;r<e;r++){var n=nr.createTexture(),a=n&&$t(jt);n?(n.name=a,jt[a]=n):Kt||(Kt=1282),k[t+4*r>>2]=a}},g:function(e,t,r,n,a,i,o,u,s){var c=nr,f=c.texImage2D;if(s){var _=u-5120;_=1==_?E:4==_?k:6==_?R:5==_||28922==_?T:x;var d=31-Math.clz32(_.BYTES_PER_ELEMENT);s=_.subarray(s>>d,s+a*(n*({5:3,6:4,8:2,29502:3,29504:4}[o-6402]||1)*(1<<d)+4-1&-4)>>d)}else s=null;f.call(c,e,t,r,n,a,i,o,u,s)},h:function(e,t,r){nr.texParameteri(e,t,r)},p:function(e,t){Jt||(Jt=!0,function(){function e(e){return(e=e.toTimeString().match(/\\(([A-Za-z ]+)\\)$/))?e[1]:"GMT"}var t=(new Date).getFullYear(),r=new Date(t,0,1),n=new Date(t,6,1);t=r.getTimezoneOffset();var a=n.getTimezoneOffset(),i=Math.max(t,a);k[br()>>2]=60*i,k[mr()>>2]=Number(t!=a),r=e(r),n=e(n),r=P(r),n=P(n),a<t?(k[pr()>>2]=r,k[pr()+4>>2]=n):(k[pr()>>2]=n,k[pr()+4>>2]=r)}()),e=new Date(1e3*k[e>>2]),k[t>>2]=e.getSeconds(),k[t+4>>2]=e.getMinutes(),k[t+8>>2]=e.getHours(),k[t+12>>2]=e.getDate(),k[t+16>>2]=e.getMonth(),k[t+20>>2]=e.getFullYear()-1900,k[t+24>>2]=e.getDay();var r=new Date(e.getFullYear(),0,1);k[t+28>>2]=(e.getTime()-r.getTime())/864e5|0,k[t+36>>2]=-60*e.getTimezoneOffset();var n=new Date(e.getFullYear(),6,1).getTimezoneOffset();return e=0|(n!=(r=r.getTimezoneOffset())&&e.getTimezoneOffset()==Math.min(r,n)),k[t+32>>2]=e,e=k[pr()+(e?4:0)>>2],k[t+40>>2]=e,t},u:function(e,t,r,n){return function(e,t,r,n){function a(e,t,r){for(e="number"==typeof e?e.toString():e||"";e.length<t;)e=r[0]+e;return e}function i(e,t){return a(e,t,"0")}function o(e,t){function r(e){return 0>e?-1:0<e?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function u(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function s(e){e=or(new Date(e.cc+1900,0,1),e.zc);var t=new Date(e.getFullYear()+1,0,4),r=u(new Date(e.getFullYear(),0,4));return t=u(t),0>=o(r,e)?0>=o(t,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var c=k[n+40>>2];for(var f in n={vd:k[n>>2],ud:k[n+4>>2],xc:k[n+8>>2],tc:k[n+12>>2],oc:k[n+16>>2],cc:k[n+20>>2],yc:k[n+24>>2],zc:k[n+28>>2],Kd:k[n+32>>2],td:k[n+36>>2],wd:c?O(c):""},r=O(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(f,"g"),c[f]);var _="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),d="January February March April May June July August September October November December".split(" ");for(f in c={"%a":function(e){return _[e.yc].substring(0,3)},"%A":function(e){return _[e.yc]},"%b":function(e){return d[e.oc].substring(0,3)},"%B":function(e){return d[e.oc]},"%C":function(e){return i((e.cc+1900)/100|0,2)},"%d":function(e){return i(e.tc,2)},"%e":function(e){return a(e.tc,2," ")},"%g":function(e){return s(e).toString().substring(2)},"%G":function(e){return s(e)},"%H":function(e){return i(e.xc,2)},"%I":function(e){return 0==(e=e.xc)?e=12:12<e&&(e-=12),i(e,2)},"%j":function(e){return i(e.tc+rr(tr(e.cc+1900)?ar:ir,e.oc-1),3)},"%m":function(e){return i(e.oc+1,2)},"%M":function(e){return i(e.ud,2)},"%n":function(){return"\\n"},"%p":function(e){return 0<=e.xc&&12>e.xc?"AM":"PM"},"%S":function(e){return i(e.vd,2)},"%t":function(){return"\\t"},"%u":function(e){return e.yc||7},"%U":function(e){var t=new Date(e.cc+1900,0,1),r=0===t.getDay()?t:or(t,7-t.getDay());return 0>o(r,e=new Date(e.cc+1900,e.oc,e.tc))?i(Math.ceil((31-r.getDate()+(rr(tr(e.getFullYear())?ar:ir,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(r,t)?"01":"00"},"%V":function(e){var t=new Date(e.cc+1901,0,4),r=u(new Date(e.cc+1900,0,4));t=u(t);var n=or(new Date(e.cc+1900,0,1),e.zc);return 0>o(n,r)?"53":0>=o(t,n)?"01":i(Math.ceil((r.getFullYear()<e.cc+1900?e.zc+32-r.getDate():e.zc+1-r.getDate())/7),2)},"%w":function(e){return e.yc},"%W":function(e){var t=new Date(e.cc,0,1),r=1===t.getDay()?t:or(t,0===t.getDay()?1:7-t.getDay()+1);return 0>o(r,e=new Date(e.cc+1900,e.oc,e.tc))?i(Math.ceil((31-r.getDate()+(rr(tr(e.getFullYear())?ar:ir,e.getMonth()-1)-31)+e.getDate())/7),2):0===o(r,t)?"01":"00"},"%y":function(e){return(e.cc+1900).toString().substring(2)},"%Y":function(e){return e.cc+1900},"%z":function(e){var t=0<=(e=e.td);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":function(e){return e.wd},"%%":function(){return"%"}})r.includes(f)&&(r=r.replace(new RegExp(f,"g"),c[f](n)));return(f=sr(r,!1)).length>t?0:(M.set(f,e),f.length-1)}(e,t,r,n)},d:function(e){var t=Date.now()/1e3|0;return e&&(k[e>>2]=t),t}},fr=function(){function e(e){n.asm=e.exports,b=n.asm.M,B(),D=n.asm.R,C.unshift(n.asm.N),j()}var t={a:cr};if(H(),n.instantiateWasm)try{return n.instantiateWasm(t,e)}catch(e){return p("Module.instantiateWasm callback failed with error: "+e),!1}return t=function(e){var t=X;try{e:{try{if(t==X&&l){var r=new Uint8Array(l);break e}if(u){r=u(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){Z(e)}r=void 0}var n=new WebAssembly.Module(r),a=new WebAssembly.Instance(n,e)}catch(t){throw e=t.toString(),p("failed to compile wasm module: "+e),(e.includes("imported Memory")||e.includes("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,n]}(t),e(t[0]),n.asm}();n.___wasm_call_ctors=fr.N,n._zappar_has_initialized=fr.O,n._zappar_invert=fr.P,n._zappar_loaded=fr.Q,n._zappar_pipeline_create=fr.S,n._zappar_pipeline_destroy=fr.T,n._zappar_pipeline_camera_frame_submit=fr.U,n._zappar_pipeline_camera_frame_submit_raw_pointer=fr.V,n._zappar_pipeline_frame_update=fr.W,n._zappar_pipeline_camera_frame_user_data=fr.X,n._zappar_pipeline_camera_model=fr.Y,n._zappar_pipeline_frame_number=fr.Z,n._zappar_pipeline_motion_accelerometer_submit=fr._,n._zappar_pipeline_motion_rotation_rate_submit=fr.$,n._zappar_pipeline_motion_attitude_submit=fr.aa,n._zappar_pipeline_motion_attitude_matrix_submit=fr.ba,n._zappar_pipeline_camera_frame_user_facing=fr.ca,n._zappar_pipeline_camera_frame_texture_matrix=fr.da,n._zappar_pipeline_camera_pose_with_attitude=fr.ea,n._zappar_pipeline_camera_pose_with_origin=fr.fa,n._zappar_pipeline_camera_frame_camera_attitude=fr.ga,n._zappar_pipeline_camera_frame_device_attitude=fr.ha,n._zappar_pipeline_camera_frame_texture_gl=fr.ia,n._zappar_pipeline_camera_frame_upload_gl=fr.ja,n._zappar_pipeline_sequence_record_start=fr.ka,n._zappar_pipeline_sequence_record_stop=fr.la,n._zappar_pipeline_sequence_record_clear=fr.ma,n._zappar_pipeline_sequence_record_device_attitude_matrices_set=fr.na,n._zappar_pipeline_sequence_record_data_size=fr.oa,n._zappar_pipeline_sequence_record_data=fr.pa,n._zappar_pipeline_process_gl=fr.qa,n._zappar_pipeline_camera_pose_default=fr.ra,n._zappar_instant_world_tracker_create=fr.sa,n._zappar_instant_world_tracker_destroy=fr.ta,n._zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw=fr.ua,n._zappar_instant_world_tracker_anchor_pose_raw=fr.va,n._zappar_instant_world_tracker_enabled_set=fr.wa,n._zappar_instant_world_tracker_enabled=fr.xa,n._zappar_image_tracker_create=fr.ya,n._zappar_image_tracker_destroy=fr.za,n._zappar_image_tracker_target_load_from_memory=fr.Aa,n.__Z42zappar_image_tracker_target_load_from_fileP23zappar_image_tracker_tiPKc=fr.Ba;var _r=n._free=fr.Ca;n._zappar_image_tracker_anchor_count=fr.Da,n._zappar_image_tracker_anchor_id=fr.Ea,n._zappar_image_tracker_anchor_pose_raw=fr.Fa,n._zappar_image_tracker_enabled_set=fr.Ga,n._zappar_image_tracker_enabled=fr.Ha,n._zappar_image_tracker_target_loaded_version=fr.Ia,n._zappar_image_tracker_target_count=fr.Ja,n.__Z46zappar_image_tracker_target_preview_compressedP23zappar_image_tracker_tii=fr.Ka,n.__Z51zappar_image_tracker_target_preview_compressed_sizeP23zappar_image_tracker_tii=fr.La,n.__Z55zappar_image_tracker_target_preview_compressed_mimetypeP23zappar_image_tracker_tii=fr.Ma,n.__Z40zappar_image_tracker_target_preview_rgbaP23zappar_image_tracker_tii=fr.Na,n.__Z45zappar_image_tracker_target_preview_rgba_sizeP23zappar_image_tracker_tii=fr.Oa,n.__Z46zappar_image_tracker_target_preview_rgba_widthP23zappar_image_tracker_tii=fr.Pa,n.__Z47zappar_image_tracker_target_preview_rgba_heightP23zappar_image_tracker_tii=fr.Qa,n._zappar_face_tracker_create=fr.Ra,n._zappar_face_tracker_destroy=fr.Sa,n._zappar_face_tracker_model_load_from_memory=fr.Ta,n._zappar_face_tracker_anchor_count=fr.Ua,n._zappar_face_tracker_anchor_id=fr.Va,n._zappar_face_tracker_anchor_pose_raw=fr.Wa,n._zappar_face_tracker_anchor_identity_coefficients=fr.Xa,n._zappar_face_tracker_anchor_expression_coefficients=fr.Ya,n._zappar_face_tracker_enabled_set=fr.Za,n._zappar_face_tracker_enabled=fr._a,n._zappar_face_tracker_max_faces_set=fr.$a,n._zappar_face_tracker_max_faces=fr.ab,n._zappar_face_tracker_model_loaded_version=fr.bb,n._zappar_face_landmark_create=fr.cb,n._zappar_face_landmark_destroy=fr.db,n.__Z27zappar_face_landmark_updateP23zappar_face_landmark_tiPKfS2_i=fr.eb,n._zappar_face_landmark_anchor_pose=fr.fb,n._zappar_barcode_finder_create=fr.gb,n._zappar_barcode_finder_destroy=fr.hb,n._zappar_barcode_finder_found_number=fr.ib,n._zappar_barcode_finder_found_text=fr.jb,n._zappar_barcode_finder_enabled_set=fr.kb,n._zappar_barcode_finder_enabled=fr.lb,n._zappar_barcode_finder_found_format=fr.mb,n._zappar_barcode_finder_formats=fr.nb,n._zappar_barcode_finder_formats_set=fr.ob;var dr=n._malloc=fr.pb;n._zappar_face_mesh_create=fr.qb,n._zappar_face_mesh_destroy=fr.rb,n.__Z33zappar_face_mesh_load_from_memoryP19zappar_face_mesh_tiPKciiiii=fr.sb,n.__Z29zappar_face_mesh_indices_sizeP19zappar_face_mesh_ti=fr.tb,n.__Z25zappar_face_mesh_uvs_sizeP19zappar_face_mesh_ti=fr.ub,n.__Z30zappar_face_mesh_vertices_sizeP19zappar_face_mesh_ti=fr.vb,n.__Z31zappar_face_mesh_loaded_versionP19zappar_face_mesh_ti=fr.wb,n.__Z25zappar_face_mesh_verticesP19zappar_face_mesh_ti=fr.xb,n.__Z20zappar_face_mesh_uvsP19zappar_face_mesh_ti=fr.yb,n.__Z24zappar_face_mesh_indicesP19zappar_face_mesh_ti=fr.zb,n.__Z23zappar_face_mesh_updateP19zappar_face_mesh_tiPKfS2_i=fr.Ab,n.__Z29zappar_face_mesh_normals_sizeP19zappar_face_mesh_ti=fr.Bb,n.__Z24zappar_face_mesh_normalsP19zappar_face_mesh_ti=fr.Cb,n._zappar_camera_source_create=fr.Db,n._zappar_camera_source_destroy=fr.Eb,n._zappar_camera_source_start=fr.Fb,n._zappar_camera_source_pause=fr.Gb,n._zappar_camera_default_device_id=fr.Hb,n._zappar_sequence_source_create=fr.Ib,n.__Z28zappar_sequence_source_startP25zappar_sequence_source_ti=fr.Jb,n.__Z39zappar_sequence_source_load_from_memoryP25zappar_sequence_source_tiPKci=fr.Kb,n.__Z28zappar_sequence_source_pauseP25zappar_sequence_source_ti=fr.Lb,n._zappar_sequence_source_destroy=fr.Mb,n._zappar_log_level_set=fr.Nb,n._zappar_log_level=fr.Ob,n._zappar_analytics_project_id_set=fr.Pb;var lr,hr=n.___errno_location=fr.Qb,pr=n.__get_tzname=fr.Rb,mr=n.__get_daylight=fr.Sb,br=n.__get_timezone=fr.Tb,wr=n.stackSave=fr.Ub,gr=n.stackRestore=fr.Vb,vr=n.stackAlloc=fr.Wb;function yr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Mr(){function e(){if(!lr&&(lr=!0,n.calledRun=!0,!g)){if(n.noFSInit||Be||(Be=!0,Ze(),n.stdin=n.stdin,n.stdout=n.stdout,n.stderr=n.stderr,n.stdin?$e("stdin",n.stdin):Xe("/dev/tty","/dev/stdin"),n.stdout?$e("stdout",null,n.stdout):Xe("/dev/tty","/dev/stdout"),n.stderr?$e("stderr",null,n.stderr):Xe("/dev/tty1","/dev/stderr"),He("/dev/stdin",0),He("/dev/stdout",1),He("/dev/stderr",1)),Ee=!1,ee(C),a(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;){var e=n.postRun.shift();V.unshift(e)}ee(V)}}if(!(0<Y)){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)q();ee(U),0<Y||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e())}}function Er(e){w=e,m||(N=!0),w=e,m||(n.onExit&&n.onExit(e),g=!0),f(e,new yr(e))}if(n.cwrap=function(e,t,r,a){var i=(r=r||[]).every((function(e){return"number"===e}));return"string"!==t&&i&&!a?n["_"+e]:function(){return v(e,t,r,arguments)}},n.setValue=function(e,t,r){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":M[e>>0]=t;break;case"i16":A[e>>1]=t;break;case"i32":k[e>>2]=t;break;case"i64":Q=[t>>>0,(K=t,1<=+Math.abs(K)?0<K?(0|Math.min(+Math.floor(K/4294967296),4294967295))>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[e>>2]=Q[0],k[e+4>>2]=Q[1];break;case"float":R[e>>2]=t;break;case"double":F[e>>3]=t;break;default:Z("invalid type for setValue: "+r)}},n.getValue=function(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return M[e>>0];case"i16":return A[e>>1];case"i32":case"i64":return k[e>>2];case"float":return R[e>>2];case"double":return Number(F[e>>3]);default:Z("invalid type for getValue: "+t)}return null},n.UTF8ToString=O,W=function e(){lr||Mr(),lr||(W=e)},n.run=Mr,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);0<n.preInit.length;)n.preInit.pop()();return Mr(),t});t.default=n}.call(this,r(6).setImmediate)},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(a.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new i(a.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(7),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(2))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,a,i,o,u,s=1,c={},f=!1,_=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},n=function(e){i.port2.postMessage(e)}):_&&"onreadystatechange"in _.createElement("script")?(a=_.documentElement,n=function(e){var t=_.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):n=function(e){setTimeout(h,0,e)}:(o="setImmediate$"+Math.random()+"$",u=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),n=function(t){e.postMessage(o+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var a={callback:e,args:t};return c[s]=a,n(s),s++},d.clearImmediate=l}function l(e){delete c[e]}function h(e){if(f)setTimeout(h,0,e);else{var t=c[e];if(t){f=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{l(e),f=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(2),r(8))},function(e,t){var r,n,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var s,c=[],f=!1,_=-1;function d(){f&&s&&(f=!1,s.length?c=s.concat(c):_=-1,c.length&&l())}function l(){if(!f){var e=u(d);f=!0;for(var t=c.length;t;){for(s=c,c=[];++_<t;)s&&s[_].run();_=-1,t=c.length}s=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||f||u(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=p,a.addListener=p,a.once=p,a.off=p,a.removeListener=p,a.removeAllListeners=p,a.emit=p,a.prependListener=p,a.prependOnceListener=p,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRuntimeObject=void 0,t.getRuntimeObject=function(e){let t=e.cwrap("zappar_log_level","number",[]),r=e.cwrap("zappar_log_level_set",null,["number"]),n=e.cwrap("zappar_analytics_project_id_set",null,["string"]),a=e.cwrap("zappar_pipeline_create","number",[]),i=e.cwrap("zappar_pipeline_destroy",null,["number"]),o=e.cwrap("zappar_pipeline_frame_update",null,["number"]),u=e.cwrap("zappar_pipeline_frame_number","number",["number"]),s=e.cwrap("zappar_pipeline_camera_model","number",["number"]),c=e.cwrap("zappar_pipeline_camera_frame_user_data","number",["number"]),f=e.cwrap("zappar_pipeline_camera_frame_submit",null,["number","number","number","number","number","number","number","number","number"]),_=e.cwrap("zappar_pipeline_camera_frame_submit_raw_pointer",null,["number","number","number","number","number","number","number","number","number","number","number"]),d=e.cwrap("zappar_pipeline_camera_frame_camera_attitude","number",["number"]),l=e.cwrap("zappar_pipeline_camera_frame_device_attitude","number",["number"]),h=e.cwrap("zappar_pipeline_motion_accelerometer_submit",null,["number","number","number","number","number"]),p=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"]),v=e.cwrap("zappar_sequence_source_create","number",["number"]),y=e.cwrap("zappar_sequence_source_destroy",null,["number"]),M=e.cwrap("zappar_image_tracker_create","number",["number"]),E=e.cwrap("zappar_image_tracker_destroy",null,["number"]),A=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_target_count","number",["number"]),T=e.cwrap("zappar_image_tracker_enabled","number",["number"]),R=e.cwrap("zappar_image_tracker_enabled_set",null,["number","number"]),F=e.cwrap("zappar_image_tracker_anchor_count","number",["number"]),L=e.cwrap("zappar_image_tracker_anchor_id","string",["number","number"]),z=e.cwrap("zappar_image_tracker_anchor_pose_raw","number",["number","number"]),O=e.cwrap("zappar_face_tracker_create","number",["number"]),I=e.cwrap("zappar_face_tracker_destroy",null,["number"]),S=e.cwrap("zappar_face_tracker_model_load_from_memory",null,["number","number","number"]),P=e.cwrap("zappar_face_tracker_model_loaded_version","number",["number"]),B=e.cwrap("zappar_face_tracker_enabled_set",null,["number","number"]),D=e.cwrap("zappar_face_tracker_enabled","number",["number"]),U=e.cwrap("zappar_face_tracker_max_faces_set",null,["number","number"]),C=e.cwrap("zappar_face_tracker_max_faces","number",["number"]),V=e.cwrap("zappar_face_tracker_anchor_count","number",["number"]),N=e.cwrap("zappar_face_tracker_anchor_id","string",["number","number"]),q=e.cwrap("zappar_face_tracker_anchor_pose_raw","number",["number","number"]),X=e.cwrap("zappar_face_tracker_anchor_identity_coefficients","number",["number","number"]),Y=e.cwrap("zappar_face_tracker_anchor_expression_coefficients","number",["number","number"]),G=e.cwrap("zappar_face_mesh_create","number",[]),W=e.cwrap("zappar_face_mesh_destroy",null,["number"]),H=e.cwrap("zappar_face_landmark_create","number",["number"]),j=e.cwrap("zappar_face_landmark_destroy",null,["number"]),Z=e.cwrap("zappar_barcode_finder_create","number",["number"]),$=e.cwrap("zappar_barcode_finder_destroy",null,["number"]),K=e.cwrap("zappar_barcode_finder_enabled_set",null,["number","number"]),Q=e.cwrap("zappar_barcode_finder_enabled","number",["number"]),J=e.cwrap("zappar_barcode_finder_found_number","number",["number"]),ee=e.cwrap("zappar_barcode_finder_found_text","string",["number","number"]),te=e.cwrap("zappar_barcode_finder_found_format","number",["number","number"]),re=e.cwrap("zappar_barcode_finder_formats","number",["number"]),ne=e.cwrap("zappar_barcode_finder_formats_set",null,["number","number"]),ae=e.cwrap("zappar_instant_world_tracker_create","number",["number"]),ie=e.cwrap("zappar_instant_world_tracker_destroy",null,["number"]),oe=e.cwrap("zappar_instant_world_tracker_enabled_set",null,["number","number"]),ue=e.cwrap("zappar_instant_world_tracker_enabled","number",["number"]),se=e.cwrap("zappar_instant_world_tracker_anchor_pose_raw","number",["number"]),ce=e.cwrap("zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw",null,["number","number","number","number","number"]),fe=32,_e=e._malloc(fe),de=(e._malloc(64),new Map),le=(t,r)=>{let n=de.get(t);return(!n||n[0]<r)&&(n&&e._free(n[1]),n=[r,e._malloc(r)],de.set(t,n)),n[1]};return{log_level:()=>t(),log_level_set:e=>r(e),analytics_project_id_set:e=>n(e),pipeline_create:()=>a(),pipeline_destroy:()=>{i()},pipeline_frame_update:e=>o(e),pipeline_frame_number:e=>u(e),pipeline_camera_model:t=>{let r=s(t),n=new Float32Array(6);return n.set(e.HEAPF32.subarray(r/4,6+r/4)),r=n,r},pipeline_camera_frame_user_data:e=>c(e),pipeline_camera_frame_submit:(t,r,n,a,i,o,u,s)=>{fe<r.byteLength&&(e._free(_e),fe=r.byteLength,_e=e._malloc(fe));let c=_e,_=r.byteLength;e.HEAPU8.set(new Uint8Array(r),_e);let d=n,l=a,h=i,p=le(4,o.byteLength);e.HEAPF32.set(o,p/4);let m=le(5,u.byteLength);return e.HEAPF32.set(u,m/4),f(t,c,_,d,l,h,p,m,s?1:0)},pipeline_camera_frame_submit_raw_pointer:(t,r,n,a,i,o,u,s,c,f,d)=>{let l=r,h=n,p=a,m=i,b=o,w=u,g=le(6,s.byteLength);e.HEAPF32.set(s,g/4);let v=c,y=le(8,f.byteLength);return e.HEAPF32.set(f,y/4),_(t,l,h,p,m,b,w,g,v,y,d?1:0)},pipeline_camera_frame_camera_attitude:t=>{let r=d(t),n=new Float32Array(16);return n.set(e.HEAPF32.subarray(r/4,16+r/4)),r=n,r},pipeline_camera_frame_device_attitude:t=>{let r=l(t),n=new Float32Array(16);return n.set(e.HEAPF32.subarray(r/4,16+r/4)),r=n,r},pipeline_motion_accelerometer_submit:(e,t,r,n,a)=>h(e,t,r,n,a),pipeline_motion_rotation_rate_submit:(e,t,r,n,a)=>p(e,t,r,n,a),pipeline_motion_attitude_submit:(e,t,r,n,a)=>m(e,t,r,n,a),pipeline_motion_attitude_matrix_submit:(t,r)=>{let n=le(0,r.byteLength);return e.HEAPF32.set(r,n/4),b(t,n)},camera_source_create:(e,t)=>w(e,t),camera_source_destroy:()=>{g()},sequence_source_create:e=>v(e),sequence_source_destroy:()=>{y()},image_tracker_create:e=>M(e),image_tracker_destroy:()=>{E()},image_tracker_target_load_from_memory:(t,r)=>{fe<r.byteLength&&(e._free(_e),fe=r.byteLength,_e=e._malloc(fe));let n=_e,a=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),_e),A(t,n,a)},image_tracker_target_loaded_version:e=>x(e),image_tracker_target_count:e=>k(e),image_tracker_enabled:e=>{let t=T(e);return t=1===t,t},image_tracker_enabled_set:(e,t)=>R(e,t?1:0),image_tracker_anchor_count:e=>F(e),image_tracker_anchor_id:(e,t)=>L(e,t),image_tracker_anchor_pose_raw:(t,r)=>{let n=z(t,r),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(n/4,16+n/4)),n=a,n},face_tracker_create:e=>O(e),face_tracker_destroy:()=>{I()},face_tracker_model_load_from_memory:(t,r)=>{fe<r.byteLength&&(e._free(_e),fe=r.byteLength,_e=e._malloc(fe));let n=_e,a=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),_e),S(t,n,a)},face_tracker_model_loaded_version:e=>P(e),face_tracker_enabled_set:(e,t)=>B(e,t?1:0),face_tracker_enabled:e=>{let t=D(e);return t=1===t,t},face_tracker_max_faces_set:(e,t)=>U(e,t),face_tracker_max_faces:e=>C(e),face_tracker_anchor_count:e=>V(e),face_tracker_anchor_id:(e,t)=>N(e,t),face_tracker_anchor_pose_raw:(t,r)=>{let n=q(t,r),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(n/4,16+n/4)),n=a,n},face_tracker_anchor_identity_coefficients:(t,r)=>{let n=X(t,r),a=new Float32Array(50);return a.set(e.HEAPF32.subarray(n/4,50+n/4)),n=a,n},face_tracker_anchor_expression_coefficients:(t,r)=>{let n=Y(t,r),a=new Float32Array(29);return a.set(e.HEAPF32.subarray(n/4,29+n/4)),n=a,n},face_mesh_create:()=>G(),face_mesh_destroy:()=>{W()},face_landmark_create:e=>H(e),face_landmark_destroy:()=>{j()},barcode_finder_create:e=>Z(e),barcode_finder_destroy:()=>{$()},barcode_finder_enabled_set:(e,t)=>K(e,t?1:0),barcode_finder_enabled:e=>{let t=Q(e);return t=1===t,t},barcode_finder_found_number:e=>J(e),barcode_finder_found_text:(e,t)=>ee(e,t),barcode_finder_found_format:(e,t)=>te(e,t),barcode_finder_formats:e=>re(e),barcode_finder_formats_set:(e,t)=>ne(e,t),instant_world_tracker_create:e=>ae(e),instant_world_tracker_destroy:()=>{ie()},instant_world_tracker_enabled_set:(e,t)=>oe(e,t?1:0),instant_world_tracker_enabled:e=>{let t=ue(e);return t=1===t,t},instant_world_tracker_anchor_pose_raw:t=>{let r=se(t),n=new Float32Array(16);return n.set(e.HEAPF32.subarray(r/4,16+r/4)),r=n,r},instant_world_tracker_anchor_pose_set_from_camera_offset_raw:(e,t,r,n,a)=>ce(e,t,r,n,a)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zappar_server=void 0;const n=r(11),a=r(12);t.zappar_server=class{constructor(e,t){this._impl=e,this._sender=t,this._deserializer=new a.MessageDeserializer,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 n.MessageSerializer(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(),n=this._pipeline_by_instance.get(r),a=t.string(),i=this._impl.camera_source_create(n,a);this._camera_source_by_instance.set(e,i),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(),n=this._pipeline_by_instance.get(r),a=this._impl.sequence_source_create(n);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(),n=this._pipeline_by_instance.get(r),a=this._impl.image_tracker_create(n);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(),n=this._pipeline_by_instance.get(r),a=this._impl.face_tracker_create(n);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(),n=this._impl.face_landmark_create(r);this._face_landmark_by_instance.set(e,n);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(),n=this._pipeline_by_instance.get(r),a=this._impl.barcode_finder_create(n);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(),n=this._pipeline_by_instance.get(r),a=this._impl.instant_world_tracker_create(n);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 n=this.serializersByPipelineId.get(r);n&&(n.sendMessage(7,r=>{r.type(e),r.int(this._impl.pipeline_frame_number(t))}),n.sendMessage(6,r=>{r.type(e),r.cameraModel(this._impl.pipeline_camera_model(t))}),n.sendMessage(5,r=>{r.type(e),r.int(this._impl.pipeline_camera_frame_user_data(t))}),n.sendMessage(11,r=>{r.type(e),r.matrix4x4(this._impl.pipeline_camera_frame_camera_attitude(t))}),n.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);if(!t)continue;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);if(!t)continue;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 n=this.serializersByPipelineId.get(r);if(n){n.sendMessage(19,r=>{r.type(e),r.int(this._impl.image_tracker_target_loaded_version(t))}),n.sendMessage(21,r=>{r.type(e),r.int(this._impl.image_tracker_target_count(t))}),n.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++)n.sendMessage(2,n=>{n.type(e),n.int(r),n.string(this._impl.image_tracker_anchor_id(t,r))});for(let r=0;r<this._impl.image_tracker_anchor_count(t);r++)n.sendMessage(3,n=>{n.type(e),n.int(r),n.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 n=this.serializersByPipelineId.get(r);if(n){n.sendMessage(18,r=>{r.type(e),r.int(this._impl.face_tracker_model_loaded_version(t))}),n.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++)n.sendMessage(14,n=>{n.type(e),n.int(r),n.string(this._impl.face_tracker_anchor_id(t,r))});for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)n.sendMessage(15,n=>{n.type(e),n.int(r),n.matrix4x4(this._impl.face_tracker_anchor_pose_raw(t,r))});for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)n.sendMessage(16,n=>{n.type(e),n.int(r),n.identityCoefficients(this._impl.face_tracker_anchor_identity_coefficients(t,r))});for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)n.sendMessage(17,n=>{n.type(e),n.int(r),n.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);if(!t)continue;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);if(!t)continue;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 n=this.serializersByPipelineId.get(r);if(n){n.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++)n.sendMessage(9,n=>{n.type(e),n.int(r),n.string(this._impl.barcode_finder_found_text(t,r))});for(let r=0;r<this._impl.barcode_finder_found_number(t);r++)n.sendMessage(10,n=>{n.type(e),n.int(r),n.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 n=this.serializersByPipelineId.get(r);n&&n.sendMessage(4,r=>{r.type(e),r.matrix4x4(this._impl.instant_world_tracker_anchor_pose_raw(t))})}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageSerializer=void 0;t.MessageSerializer=class{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=4*(this._offset+e+8);if(this._buffer&&this._buffer.byteLength>=t)return;let r=void 0;if(!r){let e=t;e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,r=new ArrayBuffer(e)}let n=this._buffer?this._i32View:void 0;this._buffer=r,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),n&&this._i32View.set(n.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++}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDeserializer=void 0;t.MessageDeserializer=class{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)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgManager=void 0;const n=r(14);t.MsgManager=class{constructor(){this.onOutgoingMessage=new n.Event,this.onIncomingMessage=new n.Event1,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}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event5=t.Event3=t.Event2=t.Event1=t.Event=void 0;t.Event=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(){for(var e=0,t=this._funcs.length;e<t;e++)this._funcs[e]()}};t.Event1=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e){for(var t=0,r=this._funcs.length;t<r;t++)this._funcs[t](e)}};t.Event2=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t){for(var r=0,n=this._funcs.length;r<n;r++)this._funcs[r](e,t)}};t.Event3=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t,r){for(var n=0,a=this._funcs.length;n<a;n++)this._funcs[n](e,t,r)}};t.Event5=class{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e,t,r,n,a){for(var i=0,o=this._funcs.length;i<o;i++)this._funcs[i](e,t,r,n,a)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.frame_pixel_format_t=t.log_level_t=t.instant_world_tracker_transform_orientation_t=t.face_landmark_name_t=t.barcode_format_t=void 0,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"}(t.barcode_format_t||(t.barcode_format_t={})),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"}(t.face_landmark_name_t||(t.face_landmark_name_t={})),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"}(t.instant_world_tracker_transform_orientation_t||(t.instant_world_tracker_transform_orientation_t={})),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"}(t.log_level_t||(t.log_level_t={})),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"}(t.frame_pixel_format_t||(t.frame_pixel_format_t={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleImageBitmap=void 0;const n=r(17),a=r(0),i=r(1);let o,u,s,c;t.handleImageBitmap=function(e,t,r,f){const[_,d]=function(){if(!s||!c){const e=new OffscreenCanvas(1,1);if(c=e.getContext("webgl"),!c)throw new Error("Unable to get offscreen GL context");s=new n.ImageProcessGL(c)}return[s,c]}();if(u||(u=d.createTexture(),d.bindTexture(d.TEXTURE_2D,u),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR)),!u)return;(!o||o.byteLength<a.profile.dataWidth*a.profile.dataHeight)&&(console.log("Generating pixel buffer",a.profile.dataWidth*a.profile.dataHeight),o=new ArrayBuffer(a.profile.dataWidth*a.profile.dataHeight)),_.uploadFrame(u,e.i,e.r,e.userFacing);let l=_.readFrame(u,o),h={t:"imageBitmapS2C",dataWidth:l.dataWidth,dataHeight:l.dataHeight,frame:e.i,userFacing:l.userFacing,uvTransform:l.uvTransform||i.mat4.create(),tokenId:e.tokenId,p:e.p};f.postOutgoingMessage(h,[e.i]);let p=r._pipeline_by_instance.get(e.p);p&&(t.pipeline_camera_frame_submit(p,o,l.dataWidth,l.dataHeight,e.tokenId,e.cameraToDevice,e.cameraModel,l.userFacing),t.pipeline_frame_update(p),r.exploreState())}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageProcessGL=void 0;const n=r(1),a=r(18),i=r(0),o=r(21);t.ImageProcessGL=class{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=n.mat4.create(),this._framebufferWidth=0,this._framebufferHeight=0,this._framebufferId=null,this._renderTexture=null}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,n){let o=this._gl;a.GLStateManager.get(o).push();const u=o.isEnabled(o.SCISSOR_TEST),s=o.isEnabled(o.DEPTH_TEST),c=o.isEnabled(o.BLEND),f=o.isEnabled(o.CULL_FACE),_=o.getParameter(o.ACTIVE_TEXTURE),d=o.getParameter(o.UNPACK_FLIP_Y_WEBGL),l=o.getParameter(o.CURRENT_PROGRAM);o.activeTexture(o.TEXTURE0);const h=o.getParameter(o.TEXTURE_BINDING_2D),p=o.getParameter(o.FRAMEBUFFER_BINDING),m=o.getParameter(o.ARRAY_BUFFER_BINDING),b=o.getParameter(o.ELEMENT_ARRAY_BUFFER_BINDING);o.disable(o.SCISSOR_TEST),o.disable(o.DEPTH_TEST),o.disable(o.BLEND),o.disable(o.CULL_FACE),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),o.bindTexture(o.TEXTURE_2D,e);const w=o.RGBA,g=o.RGBA,v=o.UNSIGNED_BYTE;o.texImage2D(o.TEXTURE_2D,0,w,g,v,t);let y=0,M=0;"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?(y=t.videoWidth,M=t.videoHeight):(y=t.width,M=t.height),M>y&&(M=[y,y=M][0]),this._updateTransforms(r,n);let E=this._getFramebuffer(o,i.profile.dataWidth/4,i.profile.dataHeight),A=this._getVertexBuffer(o),x=this._getIndexBuffer(o),k=this._getGreyscaleShader(o);const T=o.getVertexAttrib(k.aVertexPositionLoc,o.VERTEX_ATTRIB_ARRAY_SIZE),R=o.getVertexAttrib(k.aVertexPositionLoc,o.VERTEX_ATTRIB_ARRAY_TYPE),F=o.getVertexAttrib(k.aVertexPositionLoc,o.VERTEX_ATTRIB_ARRAY_NORMALIZED),L=o.getVertexAttrib(k.aVertexPositionLoc,o.VERTEX_ATTRIB_ARRAY_STRIDE),z=o.getVertexAttribOffset(k.aVertexPositionLoc,o.VERTEX_ATTRIB_ARRAY_POINTER),O=o.getVertexAttrib(k.aTextureCoordLoc,o.VERTEX_ATTRIB_ARRAY_SIZE),I=o.getVertexAttrib(k.aTextureCoordLoc,o.VERTEX_ATTRIB_ARRAY_TYPE),S=o.getVertexAttrib(k.aTextureCoordLoc,o.VERTEX_ATTRIB_ARRAY_NORMALIZED),P=o.getVertexAttrib(k.aTextureCoordLoc,o.VERTEX_ATTRIB_ARRAY_STRIDE),B=o.getVertexAttribOffset(k.aTextureCoordLoc,o.VERTEX_ATTRIB_ARRAY_POINTER);o.bindFramebuffer(o.FRAMEBUFFER,E),o.viewport(0,0,this._framebufferWidth,this._framebufferHeight),o.clear(o.COLOR_BUFFER_BIT),o.bindBuffer(o.ARRAY_BUFFER,A),o.vertexAttribPointer(k.aVertexPositionLoc,2,o.FLOAT,!1,16,0),o.enableVertexAttribArray(k.aVertexPositionLoc),o.vertexAttribPointer(k.aTextureCoordLoc,2,o.FLOAT,!1,16,8),o.enableVertexAttribArray(k.aTextureCoordLoc),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,x),o.useProgram(k.program),o.uniform1f(k.uTexWidthLoc,i.profile.dataWidth),o.uniformMatrix4fv(k.uUvTransformLoc,!1,this._cameraUvTransform),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,e),o.uniform1i(k.uSamplerLoc,0),o.drawElements(o.TRIANGLES,6,o.UNSIGNED_SHORT,0),o.vertexAttribPointer(k.aVertexPositionLoc,T,R,F,L,z),o.vertexAttribPointer(k.aTextureCoordLoc,O,I,S,P,B),o.bindFramebuffer(o.FRAMEBUFFER,p),o.bindBuffer(o.ARRAY_BUFFER,m),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,b),o.useProgram(l),o.bindTexture(o.TEXTURE_2D,h),o.activeTexture(_),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,d),c&&o.enable(o.BLEND),f&&o.enable(o.CULL_FACE),s&&o.enable(o.DEPTH_TEST),u&&o.enable(o.SCISSOR_TEST)}readFrame(e,t){let r=this._gl,n=new Uint8Array(t),a=this._getFramebuffer(r,i.profile.dataWidth/4,i.profile.dataHeight);const o=r.getParameter(r.FRAMEBUFFER_BINDING);return r.bindFramebuffer(r.FRAMEBUFFER,a),r.readPixels(0,0,this._framebufferWidth,this._framebufferHeight,r.RGBA,r.UNSIGNED_BYTE,n),r.bindFramebuffer(r.FRAMEBUFFER,o),{uvTransform:this._cameraUvTransform,data:t,texture:e,dataWidth:i.profile.dataWidth,dataHeight:i.profile.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),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 n=e.checkFramebufferStatus(e.FRAMEBUFFER);if(n!==e.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer not complete: "+n.toString());return this._framebufferWidth=t,this._framebufferHeight=r,e.bindTexture(e.TEXTURE_2D,null),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=o.compileShader(e,e.VERTEX_SHADER,u),n=o.compileShader(e,e.FRAGMENT_SHADER,s);e.attachShader(t,r),e.attachShader(t,n),o.linkProgram(e,t);let a=e.getUniformLocation(t,"uTexWidth");if(!a)throw new Error("Unable to get uniform location uTexWidth");let i=e.getUniformLocation(t,"uUvTransform");if(!i)throw new Error("Unable to get uniform location uUvTransform");let c=e.getUniformLocation(t,"uSampler");if(!c)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:i,uSamplerLoc:c},this._greyscaleShader}};let u="\\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",s="\\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"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GLStateManager=void 0;const n=new Map;class a{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,n)=>{this._viewports[this._viewports.length-1]=[e,t,r,n],this._underlyingViewport.call(this._gl,e,t,r,n)}}static get(e){let t=n.get(e);return t||(t=new a(e),n.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])}}t.GLStateManager=a},function(e,t,r){var n;!function(a,i){"use strict";var o="model",u="name",s="type",c="vendor",f="version",_="mobile",d="tablet",l="smarttv",h=function(e){var t={};for(var r in e)t[e[r].toUpperCase()]=e[r];return t},p=function(e,t){return"string"==typeof e&&-1!==m(t).indexOf(m(e))},m=function(e){return e.toLowerCase()},b=function(e,t){if("string"==typeof e)return e=e.replace(/^\\s\\s*/,"").replace(/\\s\\s*$/,""),void 0===t?e:e.substring(0,255)},w=function(e,t){for(var r,n,a,i,o,u,s=0;s<t.length&&!o;){var c=t[s],f=t[s+1];for(r=n=0;r<c.length&&!o;)if(o=c[r++].exec(e))for(a=0;a<f.length;a++)u=o[++n],"object"==typeof(i=f[a])&&i.length>0?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,u):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=u?u.replace(i[1],i[2]):void 0:this[i[0]]=u?i[1].call(this,u,i[2]):void 0:4==i.length&&(this[i[0]]=u?i[3].call(this,u.replace(i[1],i[2])):void 0):this[i]=u||void 0;s+=2}},g=function(e,t){for(var r in t)if("object"==typeof t[r]&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(p(t[r][n],e))return"?"===r?void 0:r}else if(p(t[r],e))return"?"===r?void 0:r;return e},v={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},y={browser:[[/\\b(?:crmo|crios)\\/([\\w\\.]+)/i],[f,[u,"Chrome"]],[/edg(?:e|ios|a)?\\/([\\w\\.]+)/i],[f,[u,"Edge"]],[/(opera mini)\\/([-\\w\\.]+)/i,/(opera [mobiletab]{3,6})\\b.+version\\/([-\\w\\.]+)/i,/(opera)(?:.+version\\/|[\\/ ]+)([\\w\\.]+)/i],[u,f],[/opios[\\/ ]+([\\w\\.]+)/i],[f,[u,"Opera Mini"]],[/\\bopr\\/([\\w\\.]+)/i],[f,[u,"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],[u,f],[/(?:\\buc? ?browser|(?:juc.+)ucweb)[\\/ ]?([\\w\\.]+)/i],[f,[u,"UCBrowser"]],[/\\bqbcore\\/([\\w\\.]+)/i],[f,[u,"WeChat(Win) Desktop"]],[/micromessenger\\/([\\w\\.]+)/i],[f,[u,"WeChat"]],[/konqueror\\/([\\w\\.]+)/i],[f,[u,"Konqueror"]],[/trident.+rv[: ]([\\w\\.]{1,9})\\b.+like gecko/i],[f,[u,"IE"]],[/yabrowser\\/([\\w\\.]+)/i],[f,[u,"Yandex"]],[/(avast|avg)\\/([\\w\\.]+)/i],[[u,/(.+)/,"$1 Secure Browser"],f],[/\\bfocus\\/([\\w\\.]+)/i],[f,[u,"Firefox Focus"]],[/\\bopt\\/([\\w\\.]+)/i],[f,[u,"Opera Touch"]],[/coc_coc\\w+\\/([\\w\\.]+)/i],[f,[u,"Coc Coc"]],[/dolfin\\/([\\w\\.]+)/i],[f,[u,"Dolphin"]],[/coast\\/([\\w\\.]+)/i],[f,[u,"Opera Coast"]],[/miuibrowser\\/([\\w\\.]+)/i],[f,[u,"MIUI Browser"]],[/fxios\\/([-\\w\\.]+)/i],[f,[u,"Firefox"]],[/\\bqihu|(qi?ho?o?|360)browser/i],[[u,"360 Browser"]],[/(oculus|samsung|sailfish)browser\\/([\\w\\.]+)/i],[[u,/(.+)/,"$1 Browser"],f],[/(comodo_dragon)\\/([\\w\\.]+)/i],[[u,/_/g," "],f],[/(electron)\\/([\\w\\.]+) safari/i,/(tesla)(?: qtcarbrowser|\\/(20\\d\\d\\.[-\\w\\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\\/ ]?([\\w\\.]+)/i],[u,f],[/(metasr)[\\/ ]?([\\w\\.]+)/i,/(lbbrowser)/i],[u],[/((?:fban\\/fbios|fb_iab\\/fb4a)(?!.+fbav)|;fbav\\/([\\w\\.]+);)/i],[[u,"Facebook"],f],[/safari (line)\\/([\\w\\.]+)/i,/\\b(line)\\/([\\w\\.]+)\\/iab/i,/(chromium|instagram)[\\/ ]([-\\w\\.]+)/i],[u,f],[/\\bgsa\\/([\\w\\.]+) .*safari\\//i],[f,[u,"GSA"]],[/headlesschrome(?:\\/([\\w\\.]+)| )/i],[f,[u,"Chrome Headless"]],[/ wv\\).+(chrome)\\/([\\w\\.]+)/i],[[u,"Chrome WebView"],f],[/droid.+ version\\/([\\w\\.]+)\\b.+(?:mobile safari|safari)/i],[f,[u,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\/v?([\\w\\.]+)/i],[u,f],[/version\\/([\\w\\.]+) .*mobile\\/\\w+ (safari)/i],[f,[u,"Mobile Safari"]],[/version\\/([\\w\\.]+) .*(mobile ?safari|safari)/i],[f,u],[/webkit.+?(mobile ?safari|safari)(\\/[\\w\\.]+)/i],[u,[f,g,{"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],[u,f],[/(navigator|netscape\\d?)\\/([-\\w\\.]+)/i],[[u,"Netscape"],f],[/mobile vr; rv:([\\w\\.]+)\\).+firefox/i],[f,[u,"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],[u,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",m]],[/((?:i[346]|x)86)[;\\)]/i],[["architecture","ia32"]],[/\\b(aarch64|arm(v?8e?l?|_?64))\\b/i],[["architecture","arm64"]],[/\\b(arm(?:v[67])?ht?n?[fl]p?)\\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\\))/i],[["architecture",/ower/,"",m]],[/(sun4\\w)[;\\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\\))|\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\b|pa-risc)/i],[["architecture",m]]],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],[o,[c,"Samsung"],[s,d]],[/\\b((?:s[cgp]h|gt|sm)-\\w+|galaxy nexus)/i,/samsung[- ]([-\\w]+)/i,/sec-(sgh\\w+)/i],[o,[c,"Samsung"],[s,_]],[/\\((ip(?:hone|od)[\\w ]*);/i],[o,[c,"Apple"],[s,_]],[/\\((ipad);[-\\w\\),; ]+apple/i,/applecoremedia\\/[\\w\\.]+ \\((ipad)/i,/\\b(ipad)\\d\\d?,\\d\\d?[;\\]].+ios/i],[o,[c,"Apple"],[s,d]],[/\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\d{2})\\b(?!.+d\\/s)/i],[o,[c,"Huawei"],[s,d]],[/(?:huawei|honor)([-\\w ]+)[;\\)]/i,/\\b(nexus 6p|\\w{2,4}-[atu]?[ln][01259x][012359][an]?)\\b(?!.+d\\/s)/i],[o,[c,"Huawei"],[s,_]],[/\\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],[[o,/_/g," "],[c,"Xiaomi"],[s,_]],[/\\b(mi[-_ ]?(?:pad)(?:[\\w_ ]+))(?: bui|\\))/i],[[o,/_/g," "],[c,"Xiaomi"],[s,d]],[/; (\\w+) bui.+ oppo/i,/\\b(cph[12]\\d{3}|p(?:af|c[al]|d\\w|e[ar])[mt]\\d0|x9007)\\b/i],[o,[c,"OPPO"],[s,_]],[/vivo (\\w+)(?: bui|\\))/i,/\\b(v[12]\\d{3}\\w?[at])(?: bui|;)/i],[o,[c,"Vivo"],[s,_]],[/\\b(rmx[12]\\d{3})(?: bui|;|\\))/i],[o,[c,"Realme"],[s,_]],[/\\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],[o,[c,"Motorola"],[s,_]],[/\\b(mz60\\d|xoom[2 ]{0,2}) build\\//i],[o,[c,"Motorola"],[s,d]],[/((?=lg)?[vl]k\\-?\\d{3}) bui| 3\\.[-\\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[c,"LG"],[s,d]],[/(lm(?:-?f100[nv]?|-[\\w\\.]+)(?= bui|\\))|nexus [45])/i,/\\blg[-e;\\/ ]+((?!browser|netcast|android tv)\\w+)/i,/\\blg-?([\\d\\w]+) bui/i],[o,[c,"LG"],[s,_]],[/(ideatab[-\\w ]+)/i,/lenovo ?(s[56]000[-\\w]+|tab(?:[\\w ]+)|yt[-\\d\\w]{6}|tb[-\\d\\w]{6})/i],[o,[c,"Lenovo"],[s,d]],[/(?:maemo|nokia).*(n900|lumia \\d+)/i,/nokia[-_ ]?([-\\w\\.]*)/i],[[o,/_/g," "],[c,"Nokia"],[s,_]],[/(pixel c)\\b/i],[o,[c,"Google"],[s,d]],[/droid.+; (pixel[\\daxl ]{0,6})(?: bui|\\))/i],[o,[c,"Google"],[s,_]],[/droid.+ ([c-g]\\d{4}|so[-gl]\\w+|xq-a\\w[4-7][12])(?= bui|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i],[o,[c,"Sony"],[s,_]],[/sony tablet [ps]/i,/\\b(?:sony)?sgp\\w+(?: bui|\\))/i],[[o,"Xperia Tablet"],[c,"Sony"],[s,d]],[/ (kb2005|in20[12]5|be20[12][59])\\b/i,/(?:one)?(?:plus)? (a\\d0\\d\\d)(?: b|\\))/i],[o,[c,"OnePlus"],[s,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\\))/i,/(kf[a-z]+)( bui|\\)).+silk\\//i],[o,[c,"Amazon"],[s,d]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\\)).+silk\\//i],[[o,/(.+)/g,"Fire Phone $1"],[c,"Amazon"],[s,_]],[/(playbook);[-\\w\\),; ]+(rim)/i],[o,c,[s,d]],[/\\b((?:bb[a-f]|st[hv])100-\\d)/i,/\\(bb10; (\\w+)/i],[o,[c,"BlackBerry"],[s,_]],[/(?:\\b|asus_)(transfo[prime ]{4,10} \\w+|eeepc|slider \\w+|nexus 7|padfone|p00[cj])/i],[o,[c,"ASUS"],[s,d]],[/ (z[bes]6[027][012][km][ls]|zenfone \\d\\w?)\\b/i],[o,[c,"ASUS"],[s,_]],[/(nexus 9)/i],[o,[c,"HTC"],[s,d]],[/(htc)[-;_ ]{1,2}([\\w ]+(?=\\)| bui)|\\w+)/i,/(zte)[- ]([\\w ]+?)(?: bui|\\/|\\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\\w]*)/i],[c,[o,/_/g," "],[s,_]],[/droid.+; ([ab][1-7]-?[0178a]\\d\\d?)/i],[o,[c,"Acer"],[s,d]],[/droid.+; (m[1-5] note) bui/i,/\\bmz-([-\\w]{2,})/i],[o,[c,"Meizu"],[s,_]],[/\\b(sh-?[altvz]?\\d\\d[a-ekm]?)/i],[o,[c,"Sharp"],[s,_]],[/(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],[c,o,[s,_]],[/(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],[c,o,[s,d]],[/(surface duo)/i],[o,[c,"Microsoft"],[s,d]],[/droid [\\d\\.]+; (fp\\du?)(?: b|\\))/i],[o,[c,"Fairphone"],[s,_]],[/(u304aa)/i],[o,[c,"AT&T"],[s,_]],[/\\bsie-(\\w*)/i],[o,[c,"Siemens"],[s,_]],[/\\b(rct\\w+) b/i],[o,[c,"RCA"],[s,d]],[/\\b(venue[\\d ]{2,7}) b/i],[o,[c,"Dell"],[s,d]],[/\\b(q(?:mv|ta)\\w+) b/i],[o,[c,"Verizon"],[s,d]],[/\\b(?:barnes[& ]+noble |bn[rt])([\\w\\+ ]*) b/i],[o,[c,"Barnes & Noble"],[s,d]],[/\\b(tm\\d{3}\\w+) b/i],[o,[c,"NuVision"],[s,d]],[/\\b(k88) b/i],[o,[c,"ZTE"],[s,d]],[/\\b(nx\\d{3}j) b/i],[o,[c,"ZTE"],[s,_]],[/\\b(gen\\d{3}) b.+49h/i],[o,[c,"Swiss"],[s,_]],[/\\b(zur\\d{3}) b/i],[o,[c,"Swiss"],[s,d]],[/\\b((zeki)?tb.*\\b) b/i],[o,[c,"Zeki"],[s,d]],[/\\b([yr]\\d{2}) b/i,/\\b(dragon[- ]+touch |dt)(\\w{5}) b/i],[[c,"Dragon Touch"],o,[s,d]],[/\\b(ns-?\\w{0,9}) b/i],[o,[c,"Insignia"],[s,d]],[/\\b((nxa|next)-?\\w{0,9}) b/i],[o,[c,"NextBook"],[s,d]],[/\\b(xtreme\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],o,[s,_]],[/\\b(lvtel\\-)?(v1[12]) b/i],[[c,"LvTel"],o,[s,_]],[/\\b(ph-1) /i],[o,[c,"Essential"],[s,_]],[/\\b(v(100md|700na|7011|917g).*\\b) b/i],[o,[c,"Envizen"],[s,d]],[/\\b(trio[-\\w\\. ]+) b/i],[o,[c,"MachSpeed"],[s,d]],[/\\btu_(1491) b/i],[o,[c,"Rotor"],[s,d]],[/(shield[\\w ]+) b/i],[o,[c,"Nvidia"],[s,d]],[/(sprint) (\\w+)/i],[c,o,[s,_]],[/(kin\\.[onetw]{3})/i],[[o,/\\./g," "],[c,"Microsoft"],[s,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\)/i],[o,[c,"Zebra"],[s,d]],[/droid.+; (ec30|ps20|tc[2-8]\\d[kx])\\)/i],[o,[c,"Zebra"],[s,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,o,[s,"console"]],[/droid.+; (shield) bui/i],[o,[c,"Nvidia"],[s,"console"]],[/(playstation [345portablevi]+)/i],[o,[c,"Sony"],[s,"console"]],[/\\b(xbox(?: one)?(?!; xbox))[\\); ]/i],[o,[c,"Microsoft"],[s,"console"]],[/smart-tv.+(samsung)/i],[c,[s,l]],[/hbbtv.+maple;(\\d+)/i],[[o,/^/,"SmartTV"],[c,"Samsung"],[s,l]],[/(nux; netcast.+smarttv|lg (netcast\\.tv-201\\d|android tv))/i],[[c,"LG"],[s,l]],[/(apple) ?tv/i],[c,[o,"Apple TV"],[s,l]],[/crkey/i],[[o,"Chromecast"],[c,"Google"],[s,l]],[/droid.+aft(\\w)( bui|\\))/i],[o,[c,"Amazon"],[s,l]],[/\\(dtv[\\);].+(aquos)/i],[o,[c,"Sharp"],[s,l]],[/\\b(roku)[\\dx]*[\\)\\/]((?:dvp-)?[\\d\\.]*)/i,/hbbtv\\/\\d+\\.\\d+\\.\\d+ +\\([\\w ]*; *(\\w[^;]*);([^;]*)/i],[[c,b],[o,b],[s,l]],[/\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\b/i],[[s,l]],[/((pebble))app/i],[c,o,[s,"wearable"]],[/droid.+; (glass) \\d/i],[o,[c,"Google"],[s,"wearable"]],[/droid.+; (wt63?0{2,3})\\)/i],[o,[c,"Zebra"],[s,"wearable"]],[/(quest( 2)?)/i],[o,[c,"Facebook"],[s,"wearable"]],[/(tesla)(?: qtcarbrowser|\\/[-\\w\\.]+)/i],[c,[s,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+? mobile safari/i],[o,[s,_]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+?(?! mobile) safari/i],[o,[s,d]],[/\\b((tablet|tab)[;\\/]|focus\\/\\d(?!.+mobile))/i],[[s,d]],[/(phone|mobile(?:[;\\/]| safari)|pda(?=.+windows ce))/i],[[s,_]],[/(android[-\\w\\. ]{0,9});.+buil/i],[o,[c,"Generic"]]],engine:[[/windows.+ edge\\/([\\w\\.]+)/i],[f,[u,"EdgeHTML"]],[/webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i],[f,[u,"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],[u,f],[/rv\\:([\\w\\.]{1,9})\\b.+(gecko)/i],[f,u]],os:[[/microsoft (windows) (vista|xp)/i],[u,f],[/(windows) nt 6\\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\\/ ]?([\\d\\.\\w ]*)/i,/(windows)[\\/ ]?([ntce\\d\\. ]+\\w)(?!.+xbox)/i],[u,[f,g,v]],[/(win(?=3|9|n)|win 9x )([nt\\d\\.]+)/i],[[u,"Windows"],[f,g,v]],[/ip[honead]{2,4}\\b(?:.*os ([\\w]+) like mac|; opera)/i,/cfnetwork\\/.+darwin/i],[[f,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\\w\\. ]*)/i,/(macintosh|mac_powerpc\\b)(?!.+haiku)/i],[[u,"Mac OS"],[f,/_/g,"."]],[/droid ([\\w\\.]+)\\b.+(android[- ]x86)/i],[f,u],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\/ ]?([\\w\\.]*)/i,/(blackberry)\\w*\\/([\\w\\.]*)/i,/(tizen|kaios)[\\/ ]([\\w\\.]+)/i,/\\((series40);/i],[u,f],[/\\(bb(10);/i],[f,[u,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\\/ ]?([\\w\\.]*)/i],[f,[u,"Symbian"]],[/mozilla\\/[\\d\\.]+ \\((?:mobile|tablet|tv|mobile; [\\w ]+); rv:.+ gecko\\/([\\w\\.]+)/i],[f,[u,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\\b(?:hp)?wos(?:browser)?\\/([\\w\\.]+)/i],[f,[u,"webOS"]],[/crkey\\/([\\d\\.]+)/i],[f,[u,"Chromecast"]],[/(cros) [\\w]+ ([\\w\\.]+\\w)/i],[[u,"Chromium OS"],f],[/(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],[u,f],[/(sunos) ?([\\w\\.\\d]*)/i],[[u,"Solaris"],f],[/((?:open)?solaris)[-\\/ ]?([\\w\\.]*)/i,/(aix) ((\\d)(?=\\.|\\)| )[\\w\\.])*/i,/\\b(beos|os\\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\\w\\.]*)/i],[u,f]]},M=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof M))return new M(e,t).getResult();var r=e||(void 0!==a&&a.navigator&&a.navigator.userAgent?a.navigator.userAgent:""),n=t?function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}(y,t):y;return this.getBrowser=function(){var e,t={};return t[u]=void 0,t[f]=void 0,w.call(t,r,n.browser),t.major="string"==typeof(e=t.version)?e.replace(/[^\\d\\.]/g,"").split(".")[0]:void 0,t},this.getCPU=function(){var e={architecture:void 0};return w.call(e,r,n.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return w.call(e,r,n.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return w.call(e,r,n.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return w.call(e,r,n.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="string"==typeof e&&e.length>255?b(e,255):e,this},this.setUA(r),this};M.VERSION="0.7.30",M.BROWSER=h([u,f,"major"]),M.CPU=h(["architecture"]),M.DEVICE=h([o,c,s,"console",_,l,d,"wearable","embedded"]),M.ENGINE=M.OS=h([u,f]),void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=M),t.UAParser=M):r(20)?void 0===(n=function(){return M}.call(t,r,t,e))||(e.exports=n):void 0!==a&&(a.UAParser=M);var E=void 0!==a&&(a.jQuery||a.Zepto);if(E&&!E.ua){var A=new M;E.ua=A.getResult(),E.ua.get=function(){return A.getUA()},E.ua.set=function(e){A.setUA(e);var t=A.getResult();for(var r in t)E.ua[r]=t[r]}}}("object"==typeof window?window:this)},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.linkProgram=t.compileShader=void 0,t.compileShader=function(e,t,r){let n=e.createShader(t);if(!n)throw new Error("Unable to create shader");e.shaderSource(n,r),e.compileShader(n);let a=e.getShaderInfoLog(n);if(a&&a.trim().length>0)throw new Error("Shader compile error: "+a);return n},t.linkProgram=function(e,t){e.linkProgram(t);let r=e.getProgramInfoLog(t);if(r&&r.trim().length>0)throw new Error("Unable to link: "+r)}},function(e,t,r){"use strict";r.r(t),t.default=r.p+"a78f5ad0a44def457ee50c8bcd5fd27c.wasm"}]);',"Worker",void 0,r.p+"zappar-cv.worker.js")}},function(e,t,r){"use strict";r.r(t),t.default=r.p+"a78f5ad0a44def457ee50c8bcd5fd27c.wasm"},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.permissionDeniedUI=t.permissionRequestUI=t.permissionRequestMotion=t.permissionRequestCamera=t.permissionRequestAll=t.permissionGrantedAll=t.permissionDeniedAny=t.permissionDeniedMotion=t.permissionDeniedCamera=t.permissionGrantedMotion=t.permissionGrantedCamera=void 0;let i=new(r(11).UAParser),a=!1,o=!1,s=!1,u=!1;function c(){return n(this,void 0,void 0,(function*(){if(navigator.permissions&&navigator.permissions.query)try{let e=yield navigator.permissions.query({name:"camera"});s="denied"===e.state,a="granted"===e.state}catch(e){}}))}function f(){return s||u}function _(){return a&&o}function d(){return n(this,void 0,void 0,(function*(){yield h(),yield l()}))}function l(){return n(this,void 0,void 0,(function*(){try{(yield navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(e=>e.stop()),a=!0,s=!1}catch(e){a=!1,s=!0}}))}function h(){return n(this,void 0,void 0,(function*(){if(window.DeviceOrientationEvent&&window.DeviceOrientationEvent.requestPermission){if("granted"!==(yield window.DeviceOrientationEvent.requestPermission()))return o=!1,u=!0,!1}o=!0,u=!1}))}window.DeviceOrientationEvent&&window.DeviceOrientationEvent.requestPermission||(o=!0),c(),t.permissionGrantedCamera=function(){return a},t.permissionGrantedMotion=function(){return o},t.permissionDeniedCamera=function(){return s},t.permissionDeniedMotion=function(){return u},t.permissionDeniedAny=f,t.permissionGrantedAll=_,t.permissionRequestAll=d,t.permissionRequestCamera=l,t.permissionRequestMotion=h,t.permissionRequestUI=function(){return n(this,void 0,void 0,(function*(){if(yield c(),_())return!0;let e=document.createElement("div");e.classList.add("zappar-permission-request"),e.innerHTML='\n <style>\n .zappar-permission-request {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n z-index: 1000;\n background-color: rgba(0, 0, 0, 0.9);\n font-family: sans-serif;\n color: white;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .zappar-inner {\n max-width: 400px;\n text-align: center;\n }\n .zappar-title {\n font-size: 20px;\n }\n .zappar-text {\n font-size: 14px;\n padding: 15px;\n }\n .zappar-inner > button {\n background: none;\n outline: none;\n border: 2px solid white;\n border-radius: 10px;\n color: white;\n padding: 10px 40px;\n text-transform: uppercase;\n }\n </style>\n <div class="zappar-inner">\n <div class="zappar-title">Almost there...</div>\n <div class="zappar-text">In order to provide this augmented reality experience, we need access to your device\'s camera and motion sensors.</div>\n <button id="zappar-permission-request-button">Grant Access</button>\n </div>\n',document.body.append(e);let t=e.querySelector("#zappar-permission-request-button");return yield new Promise(r=>{null==t||t.addEventListener("click",()=>n(this,void 0,void 0,(function*(){for(yield d(),e.remove();;){if(yield new Promise(e=>requestAnimationFrame(()=>e())),f())return void r(!1);if(_())return void r(!0)}})))})}))},t.permissionDeniedUI=function(){switch(i.getBrowser().name){case"Chrome":!function(){let e=document.createElement("div");e.classList.add("zappar-permission-request"),e.innerHTML='\n <style>\n .zappar-permission-request {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n z-index: 1000;\n background-color: rgba(0, 0, 0, 0.9);\n font-family: sans-serif;\n color: white;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .zappar-inner {\n width: 400px;\n text-align: center;\n }\n .zappar-title {\n font-size: 20px;\n }\n .zappar-text {\n font-size: 14px;\n padding: 15px;\n }\n .zappar-inner > button {\n background: none;\n outline: none;\n border: 2px solid white;\n border-radius: 10px;\n color: white;\n padding: 10px 40px;\n text-transform: uppercase;\n }\n </style>\n <div class="zappar-inner">\n <div class="zappar-title">Permission is Needed</div>\n <div class="zappar-text">Permission to access your device\'s camera and motion sensors is necessary for this experience.<br/><br/>To grant access, please tap the ! button in the address bar of your browser, then "Site settings", and finally "Clear and reset". You can then reload the page to try again.</div>\n <button id="zappar-permission-reload-button">Reload</button>\n </div>\n',document.body.append(e);let t=e.querySelector("#zappar-permission-reload-button");null==t||t.addEventListener("click",()=>window.location.reload())}();break;default:!function(){let e=document.createElement("div");e.classList.add("zappar-permission-request"),e.innerHTML='\n <style>\n .zappar-permission-request {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0px;\n left: 0px;\n z-index: 1000;\n background-color: rgba(0, 0, 0, 0.9);\n font-family: sans-serif;\n color: white;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .zappar-inner {\n max-width: 400px;\n text-align: center;\n }\n .zappar-title {\n font-size: 20px;\n }\n .zappar-text {\n font-size: 14px;\n padding: 15px;\n }\n .zappar-inner > button {\n background: none;\n outline: none;\n border: 2px solid white;\n border-radius: 10px;\n color: white;\n padding: 10px 40px;\n text-transform: uppercase;\n }\n </style>\n <div class="zappar-inner">\n <div class="zappar-title">Permission is Needed</div>\n <div class="zappar-text">Permission to access your device\'s camera and motion sensors is necessary for this experience. Please reload the page to try again.</div>\n <button id="zappar-permission-reload-button">Reload</button>\n </div>\n',document.body.append(e);let t=e.querySelector("#zappar-permission-reload-button");null==t||t.addEventListener("click",()=>window.location.reload())}()}}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FaceMesh=t.getFaceMesh=t.destroyFaceMesh=t.createFaceMesh=void 0;const n=r(1),i=r(0);let a=1,o=new Map;t.createFaceMesh=function(){let e=a++;return o.set(e,new s),i.zcout("face_mesh_t initialized"),e},t.destroyFaceMesh=function(e){o.delete(e)},t.getFaceMesh=function(e){return o.get(e)};class s{constructor(){this.render_mean_=new Float32Array,this.render_identity_=new Float32Array(50),this.render_expression_=new Float32Array(29),this.render_uvs_=new Float32Array,this.render_indices_=new Uint16Array,this.vertices_=new Float32Array,this.normals_=new Float32Array,this.normalsCalculated_=!1,this.modelVersion_=-1,this.mirrored_=!1}loadFromMemory(e,t,r,n,i){let a=0,o=new Uint16Array(e),s=new Int32Array(e),u=new Float32Array(e),c=()=>{let e=s[a++]*s[a++],t=u.subarray(a,a+e);return a+=e,t},f=()=>{let e=s[a++],t=o.subarray(2*a,2*a+e);return a+=e/2,t};this.render_mean_=c(),this.render_identity_=c(),this.render_expression_=c(),this.render_uvs_=c();let _=f(),d=a<s.length?f():new Uint16Array,l=a<s.length?f():new Uint16Array,h=a<s.length?f():new Uint16Array,m=a<s.length?f():new Uint16Array;if(t||r||n||i){let e=_.length;t&&(e+=d.length),r&&(e+=l.length),n&&(e+=h.length),i&&(e+=m.length),this.render_indices_=new Uint16Array(e),this.render_indices_.set(_,0);let a=_.length;t&&(this.render_indices_.set(d,a),a+=d.length),r&&(this.render_indices_.set(l,a),a+=l.length),n&&(this.render_indices_.set(h,a),a+=h.length),i&&(this.render_indices_.set(m,a),a+=m.length)}else this.render_indices_=_;this.vertices_=new Float32Array(this.render_mean_),this.normals_=new Float32Array(this.vertices_.length),this.modelVersion_++}getVertices(){return this.vertices_}getUVs(){return this.render_uvs_}getIndices(){if(this.mirrored_){if(!this.render_indices_reversed){this.render_indices_reversed=new Uint16Array(this.render_indices_.length);for(let e=0;e<this.render_indices_.length;e+=3)this.render_indices_reversed[e]=this.render_indices_[e+2],this.render_indices_reversed[e+1]=this.render_indices_[e+1],this.render_indices_reversed[e+2]=this.render_indices_[e]}return this.render_indices_reversed}return this.render_indices_}getNormals(){return this.normalsCalculated_||this.calculateNormals(),this.normals_}getModelVersion(){return this.modelVersion_}getLandmarkDataForVertex(e){let t=[this.render_mean_[3*e],this.render_mean_[3*e+1],this.render_mean_[3*e+2]],r=[];for(let t=0;t<50;t++)r.push(this.render_identity_[3*e*50+t]),r.push(this.render_identity_[50*(3*e+1)+t]),r.push(this.render_identity_[50*(3*e+2)+t]);let n=[];for(let t=0;t<29;t++)n.push(this.render_expression_[3*e*29+t]),n.push(this.render_expression_[29*(3*e+1)+t]),n.push(this.render_expression_[29*(3*e+2)+t]);return{mean:t,identity:r,expression:n}}update(e,t,r){if(0!==this.render_mean_.length&&0!==this.render_identity_.length&&0!==this.render_expression_.length){this.mirrored_=r,this.vertices_.set(this.render_mean_);for(let t=0;t<e.length;t++)for(let r=0;r<this.vertices_.length;r++)this.vertices_[r]+=e[t]*this.render_identity_[r*e.length+t];for(let e=0;e<t.length;e++)for(let r=0;r<this.vertices_.length;r++)this.vertices_[r]+=t[e]*this.render_expression_[r*t.length+e];if(r)for(let e=0;e<this.vertices_.length;e+=3)this.vertices_[e]*=-1;this.normalsCalculated_=!1}}calculateNormals(){let e=this.getIndices(),t=this.vertices_,r=new Float32Array(e.length);if(!t)return;let i=e.length,a=this.normals_,o=new Float32Array([0,0,0]),s=new Float32Array([0,0,0]),u=new Float32Array([0,0,0]);for(let a=0;a<i;a+=3){let i=3*e[a],c=3*e[a+1],f=3*e[a+2];o[0]=t[c]-t[i],o[1]=t[c+1]-t[i+1],o[2]=t[c+2]-t[i+2],s[0]=t[f]-t[i],s[1]=t[f+1]-t[i+1],s[2]=t[f+2]-t[i+2],n.vec3.cross(u,o,s);let _=n.vec3.length(u);r[a]=u[0]/_,r[a+1]=u[1]/_,r[a+2]=u[2]/_}a.fill(0);for(let t=0;t<i;t+=3){let n=3*e[t],i=3*e[t+1],o=3*e[t+2];a[n]+=r[t],a[n+1]+=r[t+1],a[n+2]+=r[t+2],a[i]+=r[t],a[i+1]+=r[t+1],a[i+2]+=r[t+2],a[o]+=r[t],a[o+1]+=r[t+1],a[o+2]+=r[t+2]}let c=a.length/3;for(let e=0;e<c;e++){let t=3*e;o[0]=a[t],o[1]=a[t+1],o[2]=a[t+2],n.vec3.normalize(s,o),a[t]=s[0],a[t+1]=s[1],a[t+2]=s[2]}this.normalsCalculated_=!0}}t.FaceMesh=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cameraFrameTextureMatrix=t.CameraDraw=void 0;const n=r(4),i=r(1);let a=i.mat4.create();t.CameraDraw=class{constructor(e){this._gl=e}dispose(){this._vbo&&this._gl.deleteBuffer(this._vbo),this._vbo=void 0,this._shader&&this._gl.deleteProgram(this._shader.prog),this._shader=void 0}_generate(e,t){if(this._vbo)return this._vbo;if(this._vbo||(this._vbo=e.createBuffer()),!this._vbo)throw new Error("Unable to create buffer object");let r=new Float32Array([-1,-1,0,0,0,-1,1,0,0,1,1,-1,0,1,0,1,-1,0,1,0,-1,1,0,0,1,1,1,0,1,1]);return e.bindBuffer(e.ARRAY_BUFFER,this._vbo),e.bufferData(e.ARRAY_BUFFER,new Float32Array(r),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,null),this._vbo}drawCameraFrame(e,t,r,n){if(!r.texture)return;let i=this._gl;i.disable(i.DEPTH_TEST),i.disable(i.SCISSOR_TEST),i.disable(i.CULL_FACE),i.disable(i.BLEND);let o=this._getCameraShader(i),s=this._generate(i,r);i.activeTexture(i.TEXTURE0),i.useProgram(o.prog),i.uniformMatrix4fv(o.unif_skinTexTransform,!1,u(r.dataWidth,r.dataHeight,e,t,r.uvTransform||a,n)),i.uniform1i(o.unif_skinSampler,0),i.bindTexture(i.TEXTURE_2D,r.texture),i.bindBuffer(i.ARRAY_BUFFER,s),i.vertexAttribPointer(o.attr_position,3,i.FLOAT,!1,20,0),i.enableVertexAttribArray(o.attr_position),i.vertexAttribPointer(o.attr_texCoord,2,i.FLOAT,!1,20,12),i.enableVertexAttribArray(o.attr_texCoord),i.drawArrays(i.TRIANGLES,0,6),i.disableVertexAttribArray(o.attr_position),i.disableVertexAttribArray(o.attr_texCoord),i.bindTexture(i.TEXTURE_2D,null),i.bindBuffer(i.ARRAY_BUFFER,null),i.useProgram(null)}_getCameraShader(e){if(this._shader)return this._shader;let t=e.createProgram();if(!t)throw new Error("Unable to create program");let r=n.compileShader(e,e.VERTEX_SHADER,o),i=n.compileShader(e,e.FRAGMENT_SHADER,s);e.attachShader(t,r),e.attachShader(t,i),n.linkProgram(e,t);let a=e.getUniformLocation(t,"skinTexTransform");if(!a)throw new Error("Unable to get uniform location skinTexTransform");let u=e.getUniformLocation(t,"skinSampler");if(!u)throw new Error("Unable to get uniform location skinSampler");return this._shader={prog:t,unif_skinTexTransform:a,unif_skinSampler:u,attr_position:e.getAttribLocation(t,"position"),attr_texCoord:e.getAttribLocation(t,"texCoord")},this._shader}};let o="\n#ifndef GL_ES\n#define highp\n#define mediump\n#define lowp\n#endif\n\nattribute vec4 position;\nattribute vec4 texCoord;\nvarying vec4 skinTexVarying;\nuniform mat4 skinTexTransform;\n\nvoid main()\n{\n gl_Position = position;\n skinTexVarying = skinTexTransform * texCoord;\n}",s="\n#define highp mediump\n#ifdef GL_ES\n // define default precision for float, vec, mat.\n precision highp float;\n#else\n#define highp\n#define mediump\n#define lowp\n#endif\n\nvarying vec4 skinTexVarying;\nuniform lowp sampler2D skinSampler;\n\nvoid main()\n{\n gl_FragColor = texture2DProj(skinSampler, skinTexVarying);\n}";function u(e,t,r,n,a,o){let s=i.mat4.create(),u=i.mat4.create();i.mat4.fromTranslation(u,[-.5,-.5,0]),i.mat4.multiply(s,u,s),o&&(i.mat4.fromScaling(u,[-1,1,1]),i.mat4.multiply(s,u,s)),i.mat4.fromRotation(u,-1*function(){if(window.screen.orientation)switch(window.screen.orientation.type){case"portrait-primary":return 270;case"landscape-secondary":return 180;case"portrait-secondary":return 90;default:return 0}else if(void 0!==window.orientation)switch(window.orientation){case 0:return 270;case 90:return 0;case 180:return 90;case-90:return 180}return 0}()*Math.PI/180,[0,0,1]),i.mat4.multiply(s,u,s);let c=i.vec3.create();c[0]=r,c[1]=n,c[2]=0,i.vec3.transformMat4(c,c,u);let f=Math.abs(c[0]),_=Math.abs(c[1]);i.mat4.fromScaling(u,[1,-1,1]),i.mat4.multiply(s,u,s);let d=f/_,l=e/t;return d>l?i.mat4.fromScaling(u,[1,l/d,1]):i.mat4.fromScaling(u,[d/l,1,1]),i.mat4.multiply(s,u,s),i.mat4.fromTranslation(u,[.5,.5,0]),i.mat4.multiply(s,u,s),i.mat4.multiply(s,a,s),s}t.cameraFrameTextureMatrix=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FaceDraw=void 0;const n=r(4);t.FaceDraw=class{constructor(e){this._gl=e}dispose(){this._vbo&&this._gl.deleteBuffer(this._vbo),this._normalbo&&this._gl.deleteBuffer(this._normalbo),this._ibo&&this._gl.deleteBuffer(this._ibo),this._shader&&this._gl.deleteProgram(this._shader.prog),this._vbo=void 0,this._normalbo=void 0,this._ibo=void 0,this._shader=void 0}_generateIBO(e,t){if(this._ibo&&this._lastIndices===e)return this._ibo;if(this._lastIndices=e,this._ibo||(this._ibo=t.createBuffer()),!this._ibo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._ibo),t.bufferData(t.ELEMENT_ARRAY_BUFFER,e,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null),this._ibo}_generateVBO(e,t){if(this._vbo||(this._vbo=t.createBuffer()),!this._vbo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ARRAY_BUFFER,this._vbo),t.bufferData(t.ARRAY_BUFFER,e,t.STREAM_DRAW),t.bindBuffer(t.ARRAY_BUFFER,null),this._vbo}_generateNormalBO(e,t){if(this._normalbo||(this._normalbo=t.createBuffer()),!this._normalbo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ARRAY_BUFFER,this._normalbo),t.bufferData(t.ARRAY_BUFFER,e,t.STREAM_DRAW),t.bindBuffer(t.ARRAY_BUFFER,null),this._normalbo}drawFace(e,t){let r=this._gl,n=this._getShader(r),i=this._generateVBO(t.getVertices(),r),a=this._generateNormalBO(t.getNormals(),r),o=this._generateIBO(t.getIndices(),r);r.enable(r.DEPTH_TEST),r.enable(r.CULL_FACE),r.useProgram(n.prog),r.uniformMatrix4fv(n.unif_matrix,!1,e),r.bindBuffer(r.ARRAY_BUFFER,i),r.vertexAttribPointer(n.attr_position,3,r.FLOAT,!1,12,0),r.enableVertexAttribArray(n.attr_position),r.bindBuffer(r.ARRAY_BUFFER,a),r.vertexAttribPointer(n.attr_normal,3,r.FLOAT,!1,12,0),r.enableVertexAttribArray(n.attr_normal),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,o),r.drawElements(r.TRIANGLES,t.getIndices().length,r.UNSIGNED_SHORT,0),r.disableVertexAttribArray(n.attr_position),r.disableVertexAttribArray(n.attr_normal),r.bindBuffer(r.ARRAY_BUFFER,null),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null)}_getShader(e){if(this._shader)return this._shader;let t=e.createProgram();if(!t)throw new Error("Unable to create program");let r=n.compileShader(e,e.VERTEX_SHADER,i),o=n.compileShader(e,e.FRAGMENT_SHADER,a);e.attachShader(t,r),e.attachShader(t,o),n.linkProgram(e,t);let s=e.getUniformLocation(t,"matrix");if(!s)throw new Error("Unable to get uniform location mattrix");return this._shader={prog:t,unif_matrix:s,attr_position:e.getAttribLocation(t,"position"),attr_normal:e.getAttribLocation(t,"normal")},this._shader}};let i="\n#ifndef GL_ES\n#define highp\n#define mediump\n#define lowp\n#endif\n\nuniform mat4 matrix;\nattribute vec4 position;\nattribute vec3 normal;\nvarying highp vec3 vnormal;\n\nvoid main()\n{\n gl_Position = matrix * position;\n vnormal = normal;\n}",a="\n#define highp mediump\n#ifdef GL_ES\n // define default precision for float, vec, mat.\n precision highp float;\n#else\n#define highp\n#define mediump\n#define lowp\n#endif\n\nvarying vec4 skinTexVarying;\nvarying highp vec3 vnormal;\nuniform lowp sampler2D skinSampler;\n\nvoid main()\n{\n vec3 normal2 = 0.5 * vnormal + 0.5;\n gl_FragColor = vec4(normal2.x , normal2.y, normal2.z, 1.0);\n}"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FaceDrawProject=void 0;const n=r(4);t.FaceDrawProject=class{constructor(e){this._gl=e}dispose(){this._vbo&&this._gl.deleteBuffer(this._vbo),this._uvbo&&this._gl.deleteBuffer(this._uvbo),this._ibo&&this._gl.deleteBuffer(this._ibo),this._shader&&this._gl.deleteProgram(this._shader.prog),this._vbo=void 0,this._uvbo=void 0,this._ibo=void 0,this._shader=void 0}_generateIBO(e,t){if(this._ibo&&this._lastIndices===e)return this._ibo;if(this._lastIndices=e,this._ibo||(this._ibo=t.createBuffer()),!this._ibo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._ibo),t.bufferData(t.ELEMENT_ARRAY_BUFFER,e,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null),this._ibo}_generateVBO(e,t){if(this._vbo||(this._vbo=t.createBuffer()),!this._vbo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ARRAY_BUFFER,this._vbo),t.bufferData(t.ARRAY_BUFFER,e,t.STREAM_DRAW),t.bindBuffer(t.ARRAY_BUFFER,null),this._vbo}_generateUVBO(e,t){if(this._uvbo||(this._uvbo=t.createBuffer()),!this._uvbo)throw new Error("Unable to create buffer object");return t.bindBuffer(t.ARRAY_BUFFER,this._uvbo),t.bufferData(t.ARRAY_BUFFER,e,t.STREAM_DRAW),t.bindBuffer(t.ARRAY_BUFFER,null),this._uvbo}drawFace(e,t,r,n,i,a){let o=this._gl,s=this._getShader(o),u=this._generateVBO(t,o),c=this._generateUVBO(n,o),f=this._generateIBO(i,o);o.enable(o.DEPTH_TEST),o.enable(o.CULL_FACE),o.useProgram(s.prog),o.uniformMatrix4fv(s.unif_matrix,!1,e),o.uniformMatrix4fv(s.unif_uvmatrix,!1,r),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,a),o.uniform1i(s.unif_sampler,0),o.bindBuffer(o.ARRAY_BUFFER,u),o.vertexAttribPointer(s.attr_position,3,o.FLOAT,!1,12,0),o.enableVertexAttribArray(s.attr_position),o.bindBuffer(o.ARRAY_BUFFER,c),o.vertexAttribPointer(s.attr_uv,3,o.FLOAT,!1,12,0),o.enableVertexAttribArray(s.attr_uv),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,f),o.drawElements(o.TRIANGLES,6912,o.UNSIGNED_SHORT,0),o.disableVertexAttribArray(s.attr_position),o.disableVertexAttribArray(s.attr_uv),o.bindBuffer(o.ARRAY_BUFFER,null),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null)}_getShader(e){if(this._shader)return this._shader;let t=e.createProgram();if(!t)throw new Error("Unable to create program");let r=n.compileShader(e,e.VERTEX_SHADER,i),o=n.compileShader(e,e.FRAGMENT_SHADER,a);e.attachShader(t,r),e.attachShader(t,o),n.linkProgram(e,t);let s=e.getUniformLocation(t,"matrix");if(!s)throw new Error("Unable to get uniform location matrix");let u=e.getUniformLocation(t,"uvmatrix");if(!u)throw new Error("Unable to get uniform location matrix");let c=e.getUniformLocation(t,"uSampler");if(!c)throw new Error("Unable to get uniform location sampler");return this._shader={prog:t,unif_matrix:s,unif_sampler:c,unif_uvmatrix:u,attr_position:e.getAttribLocation(t,"position"),attr_uv:e.getAttribLocation(t,"uv"),attr_texturecoord:e.getAttribLocation(t,"aTextureCoord")},this._shader}};let i="\n#ifndef GL_ES\n#define highp\n#define mediump\n#define lowp\n#endif\n\nuniform mat4 matrix;\nuniform mat4 uvmatrix;\nattribute vec4 position;\nattribute vec3 normal;\nattribute vec3 uv;\n\n// varying highp vec3 vnormal;\n\nvarying highp vec2 vTextureCoord;\nvarying highp float vAlpha;\n\nvoid main()\n{\n gl_Position = matrix * position;\n vec4 ret = uvmatrix * vec4(uv.x, uv.y, uv.z, 1.0);\n ret.x /= ret.w * 2.0;\n ret.y /= ret.w * 2.0;\n ret.x += 0.5;\n ret.y += 0.0;\n vAlpha = 1.0;\n vTextureCoord = ret.xy;\n}",a="\n#define highp mediump\n#ifdef GL_ES\n // define default precision for float, vec, mat.\n precision highp float;\n#else\n#define highp\n#define mediump\n#define lowp\n#endif\n\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vnormal;\nvarying highp float vAlpha;\nuniform lowp sampler2D uSampler;\n\nvoid main()\n{\n // vec3 normal2 = 0.5 * vnormal + 0.5;\n vec4 p = texture2D(uSampler, vTextureCoord);\n p.a = vAlpha;\n gl_FragColor = p; // vec4(normal2.x , normal2.y, normal2.z, 1.0);\n}"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageProcessGL=void 0;const n=r(1),i=r(34),a=r(3),o=r(4);t.ImageProcessGL=class{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=n.mat4.create(),this._framebufferWidth=0,this._framebufferHeight=0,this._framebufferId=null,this._renderTexture=null}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,n){let o=this._gl;i.GLStateManager.get(o).push();const s=o.isEnabled(o.SCISSOR_TEST),u=o.isEnabled(o.DEPTH_TEST),c=o.isEnabled(o.BLEND),f=o.isEnabled(o.CULL_FACE),_=o.getParameter(o.ACTIVE_TEXTURE),d=o.getParameter(o.UNPACK_FLIP_Y_WEBGL),l=o.getParameter(o.CURRENT_PROGRAM);o.activeTexture(o.TEXTURE0);const h=o.getParameter(o.TEXTURE_BINDING_2D),m=o.getParameter(o.FRAMEBUFFER_BINDING),p=o.getParameter(o.ARRAY_BUFFER_BINDING),b=o.getParameter(o.ELEMENT_ARRAY_BUFFER_BINDING);o.disable(o.SCISSOR_TEST),o.disable(o.DEPTH_TEST),o.disable(o.BLEND),o.disable(o.CULL_FACE),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!1),o.bindTexture(o.TEXTURE_2D,e);const g=o.RGBA,v=o.RGBA,w=o.UNSIGNED_BYTE;o.texImage2D(o.TEXTURE_2D,0,g,v,w,t);let y=0,M=0;"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?(y=t.videoWidth,M=t.videoHeight):(y=t.width,M=t.height),M>y&&(M=[y,y=M][0]),this._updateTransforms(r,n);let E=this._getFramebuffer(o,a.profile.dataWidth/4,a.profile.dataHeight),A=this._getVertexBuffer(o),x=this._getIndexBuffer(o),T=this._getGreyscaleShader(o);const R=o.getVertexAttrib(T.aVertexPositionLoc,o.VERTEX_ATTRIB_ARRAY_SIZE),k=o.getVertexAttrib(T.aVertexPositionLoc,o.VERTEX_ATTRIB_ARRAY_TYPE),F=o.getVertexAttrib(T.aVertexPositionLoc,o.VERTEX_ATTRIB_ARRAY_NORMALIZED),S=o.getVertexAttrib(T.aVertexPositionLoc,o.VERTEX_ATTRIB_ARRAY_STRIDE),L=o.getVertexAttribOffset(T.aVertexPositionLoc,o.VERTEX_ATTRIB_ARRAY_POINTER),P=o.getVertexAttrib(T.aTextureCoordLoc,o.VERTEX_ATTRIB_ARRAY_SIZE),I=o.getVertexAttrib(T.aTextureCoordLoc,o.VERTEX_ATTRIB_ARRAY_TYPE),O=o.getVertexAttrib(T.aTextureCoordLoc,o.VERTEX_ATTRIB_ARRAY_NORMALIZED),U=o.getVertexAttrib(T.aTextureCoordLoc,o.VERTEX_ATTRIB_ARRAY_STRIDE),C=o.getVertexAttribOffset(T.aTextureCoordLoc,o.VERTEX_ATTRIB_ARRAY_POINTER);o.bindFramebuffer(o.FRAMEBUFFER,E),o.viewport(0,0,this._framebufferWidth,this._framebufferHeight),o.clear(o.COLOR_BUFFER_BIT),o.bindBuffer(o.ARRAY_BUFFER,A),o.vertexAttribPointer(T.aVertexPositionLoc,2,o.FLOAT,!1,16,0),o.enableVertexAttribArray(T.aVertexPositionLoc),o.vertexAttribPointer(T.aTextureCoordLoc,2,o.FLOAT,!1,16,8),o.enableVertexAttribArray(T.aTextureCoordLoc),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,x),o.useProgram(T.program),o.uniform1f(T.uTexWidthLoc,a.profile.dataWidth),o.uniformMatrix4fv(T.uUvTransformLoc,!1,this._cameraUvTransform),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,e),o.uniform1i(T.uSamplerLoc,0),o.drawElements(o.TRIANGLES,6,o.UNSIGNED_SHORT,0),o.vertexAttribPointer(T.aVertexPositionLoc,R,k,F,S,L),o.vertexAttribPointer(T.aTextureCoordLoc,P,I,O,U,C),o.bindFramebuffer(o.FRAMEBUFFER,m),o.bindBuffer(o.ARRAY_BUFFER,p),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,b),o.useProgram(l),o.bindTexture(o.TEXTURE_2D,h),o.activeTexture(_),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,d),c&&o.enable(o.BLEND),f&&o.enable(o.CULL_FACE),u&&o.enable(o.DEPTH_TEST),s&&o.enable(o.SCISSOR_TEST)}readFrame(e,t){let r=this._gl,n=new Uint8Array(t),i=this._getFramebuffer(r,a.profile.dataWidth/4,a.profile.dataHeight);const o=r.getParameter(r.FRAMEBUFFER_BINDING);return r.bindFramebuffer(r.FRAMEBUFFER,i),r.readPixels(0,0,this._framebufferWidth,this._framebufferHeight,r.RGBA,r.UNSIGNED_BYTE,n),r.bindFramebuffer(r.FRAMEBUFFER,o),{uvTransform:this._cameraUvTransform,data:t,texture:e,dataWidth:a.profile.dataWidth,dataHeight:a.profile.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),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 n=e.checkFramebufferStatus(e.FRAMEBUFFER);if(n!==e.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer not complete: "+n.toString());return this._framebufferWidth=t,this._framebufferHeight=r,e.bindTexture(e.TEXTURE_2D,null),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=o.compileShader(e,e.VERTEX_SHADER,s),n=o.compileShader(e,e.FRAGMENT_SHADER,u);e.attachShader(t,r),e.attachShader(t,n),o.linkProgram(e,t);let i=e.getUniformLocation(t,"uTexWidth");if(!i)throw new Error("Unable to get uniform location uTexWidth");let a=e.getUniformLocation(t,"uUvTransform");if(!a)throw new Error("Unable to get uniform location uUvTransform");let c=e.getUniformLocation(t,"uSampler");if(!c)throw new Error("Unable to get uniform location uSampler");return this._greyscaleShader={program:t,aVertexPositionLoc:e.getAttribLocation(t,"aVertexPosition"),aTextureCoordLoc:e.getAttribLocation(t,"aTextureCoord"),uTexWidthLoc:i,uUvTransformLoc:a,uSamplerLoc:c},this._greyscaleShader}};let s="\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",u="\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"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GLStateManager=void 0;const n=new Map;class i{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,n)=>{this._viewports[this._viewports.length-1]=[e,t,r,n],this._underlyingViewport.call(this._gl,e,t,r,n)}}static get(e){let t=n.get(e);return t||(t=new i(e),n.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])}}t.GLStateManager=i},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageBitmapCameraSource=void 0;const i=r(3),a=r(2),o=r(8),s=r(5),u=r(0),c=r(7),f=r(1);class _ extends o.Source{constructor(e,t,r){super(),this._impl=e,this._pipeline=t,this._deviceId=r,this._currentStream=null,this._activeDeviceId=null,this._isPaused=!0,this._isUserFacing=!1,this._hadFrames=!1,this._canvas=new OffscreenCanvas(640,480),this._context=this._canvas.getContext("2d"),this._lastFrameTime=-1,this._video=document.createElement("video"),this._cameraToDeviceTransform=f.mat4.create(),this._cameraToDeviceTransformUserFacing=f.mat4.create(),this._cameraModel=new Float32Array([300,300,160,120,0,0]),this._hasStartedOrientation=!1,this._deviceMotionListener=e=>{let t=a.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.accelerationIncludingGravity&&null!==e.accelerationIncludingGravity.x&&null!==e.accelerationIncludingGravity.y&&null!==e.accelerationIncludingGravity.z&&t.motionAccelerometerSubmit(r,e.accelerationIncludingGravity.x*i.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.y*i.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.z*i.profile.deviceMotionMutliplier),null===e.rotationRate||null===e.rotationRate.alpha||null===e.rotationRate.beta||null===e.rotationRate.gamma||this._hasStartedOrientation?this._hasStartedOrientation||this._startDeviceOrientation():(e.timeStamp,t.motionRotationRateSubmit(r,e.rotationRate.alpha*Math.PI/-180,e.rotationRate.beta*Math.PI/-180,e.rotationRate.gamma*Math.PI/-180))},u.zcout("Using ImageBitmap camera source"),f.mat4.fromScaling(this._cameraToDeviceTransformUserFacing,[-1,1,-1]),this._video.muted=!0,this._video.setAttribute("playsinline",""),this._video.setAttribute("webkit-playsinline",""),i.profile.videoElementInDOM&&(this._video.style.width="0px",this._video.style.height="0px",document.body.appendChild(this._video)),this._video.addEventListener("loadedmetadata",()=>{this._hadFrames=!0})}destroy(){this.pause(),c.deleteCameraSource(this._impl)}_stop(){if(!this._currentStream)return;this._currentStream.getTracks().forEach(e=>e.stop()),this._currentStream=null}pause(){this._isPaused=!0;let e=a.Pipeline.get(this._pipeline);e&&e.currentCameraSource===this&&(e.currentCameraSource=void 0),this._stopDeviceMotion(),this._syncCamera()}start(){var e;let t=a.Pipeline.get(this._pipeline);t&&t.currentCameraSource!==this&&(null===(e=t.currentCameraSource)||void 0===e||e.pause(),t.currentCameraSource=this),this._isPaused=!1,this._startDeviceMotion(),this._syncCamera()}_getConstraints(){return n(this,void 0,void 0,(function*(){let e,t;this._deviceId!==_.DEFAULT_DEVICE_ID&&this._deviceId!==_.USER_DEFAULT_DEVICE_ID?e=this._deviceId:t=this._deviceId===_.DEFAULT_DEVICE_ID?"environment":"user";let r={audio:!1,video:{facingMode:t,width:i.profile.videoWidth,height:i.profile.videoHeight,frameRate:i.profile.requestHighFrameRate?60:void 0,deviceId:e}};if(e)return r;if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return r;let n=yield navigator.mediaDevices.enumerateDevices(),a=!1;return n=n.filter(e=>{if("videoinput"!==e.kind)return!1;if(e.getCapabilities){a=!0;let r=e.getCapabilities();if(r&&r.facingMode&&r.facingMode.indexOf("user"===t?"user":"environment")<0)return!1}return!0}),a&&0!==n.length?("object"==typeof r.video&&(u.zcout("choosing device ID",n[n.length-1].deviceId),r.video.deviceId=n[n.length-1].deviceId),r):r}))}getFrame(e){var t,r;if(!this._context)return;if(!this._hadFrames)return;if(e)return;let n=performance.now();if(n<this._lastFrameTime+25)return;this._lastFrameTime=n,this._canvas.width!==this._video.videoWidth&&(this._canvas.width=this._video.videoWidth),this._canvas.height!==this._video.videoHeight&&(this._canvas.height=this._video.videoHeight),this._context.drawImage(this._video,0,0);const o=this._canvas.transferToImageBitmap();let u=s.cameraRotationForScreenOrientation(!1),c=a.Pipeline.get(this._pipeline);if(!c)return;let f=300*i.profile.dataWidth/320;this._cameraModel[0]=f,this._cameraModel[1]=f,this._cameraModel[2]=.5*i.profile.dataWidth,this._cameraModel[3]=.5*i.profile.dataHeight;let _=c.registerToken({dataWidth:this._canvas.width,dataHeight:this._canvas.height,texture:void 0,userFacing:this._isUserFacing,cameraSource:this,cameraModel:this._cameraModel.slice(),cameraToDevice:this._isUserFacing?this._cameraToDeviceTransformUserFacing:this._cameraToDeviceTransform});null===(r=null===(t=a.Pipeline.get(this._pipeline))||void 0===t?void 0:t.sendImageBitmapToWorker)||void 0===r||r.call(t,o,u,this._isUserFacing,_,this._cameraModel,this._isUserFacing?this._cameraToDeviceTransformUserFacing:this._cameraToDeviceTransform)}_getUserMedia(){return n(this,void 0,void 0,(function*(){let e=yield this._getConstraints();return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?yield navigator.mediaDevices.getUserMedia(e):yield new Promise((t,r)=>{navigator.getUserMedia(e,t,r)})}))}_syncCamera(){return n(this,void 0,void 0,(function*(){if(this._currentStream&&this._isPaused)this._stop();else if(this._currentStream&&this._activeDeviceId!==this._deviceId&&this._stop(),!this._isPaused){if(this._activeDeviceId=this._deviceId,this._currentStream=yield this._getUserMedia(),this._isPaused)return void(yield this._syncCamera());if(this._isUserFacing=!1,this._currentStream){let e=this._currentStream.getVideoTracks();e.length>0&&(this._isUserFacing="user"===e[0].getSettings().facingMode)}this._video.src="",this._video.loop=!1,this._video.muted=!0,this._video.srcObject=this._currentStream,this._video.play()}}))}_startDeviceOrientation(){this._hasStartedOrientation||(this._hasStartedOrientation=!0,window.addEventListener("deviceorientation",e=>{let t=a.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.alpha&&null!==e.beta&&null!==e.gamma&&t.motionAttitudeSubmit(r,e.alpha,e.beta,e.gamma)}))}_startDeviceMotion(){window.addEventListener("devicemotion",this._deviceMotionListener,!1)}_stopDeviceMotion(){window.removeEventListener("devicemotion",this._deviceMotionListener)}uploadGL(e){const t=a.Pipeline.get(this._pipeline),r=null==t?void 0:t.glContext;if(!e||e.texture||!e.frame||!t||!r)return;let n=t.getVideoTexture();n&&(r.bindTexture(r.TEXTURE_2D,n),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e.frame),r.bindTexture(r.TEXTURE_2D,null),e.texture=n,e.frame.close(),delete e.frame)}}t.ImageBitmapCameraSource=_,_.USER_DEFAULT_DEVICE_ID="Simulated User Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b",_.DEFAULT_DEVICE_ID="Simulated Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b"},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MSTPCameraSource=void 0;const i=r(3),a=r(2),o=r(8),s=r(5),u=r(0),c=r(7);class f extends o.Source{constructor(e,t,r){super(),this._impl=e,this._pipeline=t,this._deviceId=r,this._currentStream=null,this._activeDeviceId=null,this._isPaused=!0,this._isUserFacing=!1,this._cameraToScreenRotation=0,this._hasStartedOrientation=!1,this._deviceMotionListener=e=>{let t=a.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.accelerationIncludingGravity&&null!==e.accelerationIncludingGravity.x&&null!==e.accelerationIncludingGravity.y&&null!==e.accelerationIncludingGravity.z&&t.motionAccelerometerSubmit(r,e.accelerationIncludingGravity.x*i.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.y*i.profile.deviceMotionMutliplier,e.accelerationIncludingGravity.z*i.profile.deviceMotionMutliplier),null===e.rotationRate||null===e.rotationRate.alpha||null===e.rotationRate.beta||null===e.rotationRate.gamma||this._hasStartedOrientation?this._hasStartedOrientation||this._startDeviceOrientation():(e.timeStamp,t.motionRotationRateSubmit(r,e.rotationRate.alpha*Math.PI/-180,e.rotationRate.beta*Math.PI/-180,e.rotationRate.gamma*Math.PI/-180))},u.zcout("Using MSTP camera source")}destroy(){this.pause(),c.deleteCameraSource(this._impl)}_stop(){if(!this._currentStream)return;this._currentStream.getTracks().forEach(e=>e.stop()),this._currentStream=null}pause(){this._isPaused=!0;let e=a.Pipeline.get(this._pipeline);e&&e.currentCameraSource===this&&(e.currentCameraSource=void 0),this._stopDeviceMotion(),this._syncCamera()}start(){var e;let t=a.Pipeline.get(this._pipeline);t&&t.currentCameraSource!==this&&(null===(e=t.currentCameraSource)||void 0===e||e.pause(),t.currentCameraSource=this),this._isPaused=!1,this._startDeviceMotion(),this._syncCamera()}_getConstraints(){return n(this,void 0,void 0,(function*(){let e,t;this._deviceId!==f.DEFAULT_DEVICE_ID&&this._deviceId!==f.USER_DEFAULT_DEVICE_ID?e=this._deviceId:t=this._deviceId===f.DEFAULT_DEVICE_ID?"environment":"user";let r={audio:!1,video:{facingMode:t,width:i.profile.videoWidth,height:i.profile.videoHeight,frameRate:i.profile.requestHighFrameRate?60:30,deviceId:e}};if(e)return r;if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return r;let n=yield navigator.mediaDevices.enumerateDevices(),a=!1;return n=n.filter(e=>{if("videoinput"!==e.kind)return!1;if(e.getCapabilities){a=!0;let r=e.getCapabilities();if(r&&r.facingMode&&r.facingMode.indexOf("user"===t?"user":"environment")<0)return!1}return!0}),a&&0!==n.length?("object"==typeof r.video&&(u.zcout("choosing device ID",n[n.length-1].deviceId),r.video.deviceId=n[n.length-1].deviceId),r):r}))}getFrame(e){var t,r;let n=s.cameraRotationForScreenOrientation(!1);n!=this._cameraToScreenRotation&&(null===(r=null===(t=a.Pipeline.get(this._pipeline))||void 0===t?void 0:t.sendCameraToScreenRotationToWorker)||void 0===r||r.call(t,n),this._cameraToScreenRotation=n)}_getUserMedia(){return n(this,void 0,void 0,(function*(){let e=yield this._getConstraints();return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?yield navigator.mediaDevices.getUserMedia(e):yield new Promise((t,r)=>{navigator.getUserMedia(e,t,r)})}))}_syncCamera(){return n(this,void 0,void 0,(function*(){if(this._currentStream&&this._isPaused)this._stop();else if(this._currentStream&&this._activeDeviceId!==this._deviceId&&this._stop(),!this._isPaused){if(this._activeDeviceId=this._deviceId,this._currentStream=yield this._getUserMedia(),this._isPaused)return void(yield this._syncCamera());if(this._isUserFacing=!1,this._currentStream){let e=this._currentStream.getVideoTracks();if(e.length>0){this._isUserFacing="user"===e[0].getSettings().facingMode;let t=new MediaStreamTrackProcessor({track:e[0]}),r=a.Pipeline.get(this._pipeline);r&&r.sendCameraStreamToWorker(this._impl,t.readable,this._isUserFacing)}}}}))}_startDeviceOrientation(){this._hasStartedOrientation||(this._hasStartedOrientation=!0,window.addEventListener("deviceorientation",e=>{let t=a.Pipeline.get(this._pipeline);if(!t)return;let r=void 0!==e.timeStamp&&null!==e.timeStamp?e.timeStamp:performance.now();null!==e.alpha&&null!==e.beta&&null!==e.gamma&&t.motionAttitudeSubmit(r,e.alpha,e.beta,e.gamma)}))}_startDeviceMotion(){window.addEventListener("devicemotion",this._deviceMotionListener,!1)}_stopDeviceMotion(){window.removeEventListener("devicemotion",this._deviceMotionListener)}uploadGL(e){const t=a.Pipeline.get(this._pipeline),r=null==t?void 0:t.glContext;if(!e||e.texture||!e.frame||!t||!r)return;let n=t.getVideoTexture();n&&(r.bindTexture(r.TEXTURE_2D,n),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e.frame),r.bindTexture(r.TEXTURE_2D,null),e.texture=n,e.frame.close(),delete e.frame)}}t.MSTPCameraSource=f,f.USER_DEFAULT_DEVICE_ID="Simulated User Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b",f.DEFAULT_DEVICE_ID="Simulated Default Device ID: a908df7f-5661-4d20-b227-a1c15d2fdb4b"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FaceLandmark=t.getFaceLandmark=t.destroyFaceLandmark=t.createFaceLandmark=void 0;const n=r(1),i=r(38),a=r(0);let o=1,s=new Map;t.createFaceLandmark=function(e){let t=o++;return s.set(t,new u(e)),a.zcout("face_landmark_t initialized"),t},t.destroyFaceLandmark=function(e){s.delete(e)},t.getFaceLandmark=function(e){return s.get(e)};class u{constructor(e){this._name=e,this.anchor_pose=n.mat4.create()}_getVertex(e,t,r){let n=r.mean.slice();for(let t=0;t<50;t++)n[0]+=e[t]*r.identity[3*t+0],n[1]+=e[t]*r.identity[3*t+1],n[2]+=e[t]*r.identity[3*t+2];for(let e=0;e<29;e++)n[0]+=t[e]*r.expression[3*e+0],n[1]+=t[e]*r.expression[3*e+1],n[2]+=t[e]*r.expression[3*e+2];return n}update(e,t,r){let a,o=i.landmarkData[this._name.toString()];if(o){if(Array.isArray(o)){a=this._getVertex(e,t,o[0]);let r=this._getVertex(e,t,o[1]);a[0]=.5*(a[0]+r[0]),a[1]=.5*(a[1]+r[1]),a[2]=.5*(a[2]+r[2])}else a=this._getVertex(e,t,o);r&&(a[0]*=-1),n.mat4.fromTranslation(this.anchor_pose,a)}}}t.FaceLandmark=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.landmarkData=void 0,t.landmarkData={0:[{mean:[.235,.2344,.7305],identity:[.008,.0087,.0024,-.0026,6e-4,-.0022,5e-4,.0033,.0026,.0017,-.0055,-8e-4,.0011,.0059,0,2e-4,.001,-.001,-.0044,-.0011,-1e-4,.0024,.0019,-9e-4,4e-4,-.0015,0,.0038,.0013,3e-4,.002,-.0021,.0018,.0023,.0011,.0012,-.0011,-.0017,9e-4,-.0012,-8e-4,7e-4,-.0017,.0029,-.0029,8e-4,-.0027,8e-4,-.0017,4e-4,9e-4,-.001,-3e-4,8e-4,-.0016,-3e-4,-7e-4,.0016,-9e-4,.0021,-5e-4,.0011,-.0024,-1e-4,6e-4,1e-4,-.0026,-4e-4,-3e-4,-9e-4,5e-4,3e-4,-8e-4,-.001,-4e-4,-8e-4,.0022,-.0014,-1e-4,-.0023,0,-.0018,7e-4,-.0036,.0017,.0017,-.0018,-2e-4,-4e-4,-9e-4,-8e-4,3e-4,.0012,9e-4,-4e-4,-.0016,5e-4,-.0013,.0011,.0023,.0029,.0024,.0017,-.0027,-4e-4,-.001,-.0018,-.0015,-.001,.001,-.0013,-1e-4,-2e-4,7e-4,3e-4,3e-4,-.0016,9e-4,-.0021,4e-4,.0014,.002,-7e-4,-4e-4,2e-4,-4e-4,-6e-4,-9e-4,.0015,4e-4,-4e-4,5e-4,-.0015,9e-4,3e-4,3e-4,-2e-4,-8e-4,-9e-4,.0023,4e-4,1e-4,-4e-4,-1e-4,7e-4,2e-4,.001,1e-4,-.0029,-5e-4],expression:[0,3e-4,.0052,-7e-4,-.0051,-.0103,0,.0019,.0027,-.0054,.0135,.035,-5e-4,-6e-4,.0025,-.0045,-.0557,-.003,-.0191,-.1199,.0548,-.0036,-.0682,-.0167,2e-4,-.0085,-.0085,.0044,.0041,-.0568,.0044,.179,.0065,-.0017,-.1006,.0036,-.0267,-.3279,.0301,-.0011,-.0173,-.001,.0046,.2808,.0207,.0162,.238,-.0225,.0017,.1041,.0203,5e-4,.0161,.0031,-.0436,.6504,.0873,-.0099,.1039,.0048,-.0254,.2534,-.0042,.003,-.0106,-.0153,-.0118,.0252,9e-4,-.0071,.0099,.007,-.0724,.0461,-.0235,.0833,.004,.0141,-.0219,.0132,-.0042,-.0179,.0045,-.0215,.3638,.0054,-.0445]},{mean:[.2358,.1466,.7183],identity:[.0077,.0093,1e-4,-.0022,0,-.0041,5e-4,.0022,.0028,.0018,-.0038,-.0013,.001,.0044,-2e-4,0,.0017,-.0016,-.0043,-2e-4,-1e-4,.0023,9e-4,5e-4,-7e-4,-4e-4,-.0017,.003,7e-4,6e-4,.0011,-.0018,5e-4,.0018,-8e-4,4e-4,-.0023,-6e-4,-3e-4,-.0015,-.0014,-1e-4,-.0018,.0027,-.0026,3e-4,-.0031,.0011,-.0026,-.0011,.0012,-.0013,-2e-4,7e-4,-.0021,.0021,4e-4,.0012,-.001,.002,-3e-4,2e-4,-.0026,-3e-4,.001,1e-4,-.0018,-.001,9e-4,-.0011,.001,4e-4,-8e-4,-7e-4,-.001,-3e-4,7e-4,-5e-4,-6e-4,-.0019,-5e-4,-.002,7e-4,-.0027,.0014,.0013,6e-4,-5e-4,-3e-4,-3e-4,-.001,0,.0019,1e-4,6e-4,-.0012,4e-4,-9e-4,4e-4,.0025,3e-4,.0024,.0017,-9e-4,-.0015,-.0015,-.001,-.0023,-.001,-5e-4,-4e-4,8e-4,9e-4,7e-4,2e-4,7e-4,-9e-4,9e-4,-.0013,1e-4,9e-4,2e-4,6e-4,-6e-4,-8e-4,-4e-4,-7e-4,8e-4,.0019,3e-4,.0015,2e-4,-.0015,-3e-4,0,6e-4,3e-4,6e-4,-6e-4,2e-4,5e-4,-4e-4,.0012,-4e-4,2e-4,-8e-4,6e-4,-4e-4,2e-4,-.0021],expression:[-.0034,.0054,.0069,.004,6e-4,-.0104,-3e-4,.0036,.0025,.0065,.0296,.0208,-9e-4,.0154,.0029,-.0167,.0124,.004,-.0102,.0351,.028,-.019,.0146,-.0035,-.0023,-.0069,-.0051,-.01,.0262,-.028,.0112,.082,.023,-.0019,-.066,-.0104,-.0408,.0164,.0075,-.0074,.0367,.0041,.0517,-.0207,.0045,.0291,-.0672,-.0129,.0345,-.1558,-.0106,.0037,-.0437,-.0021,.0854,-.1121,.0187,.0041,.0072,.0011,.0193,-.0143,-.0119,.005,-.02,-.0122,-.008,.0527,.0036,-.006,.0222,.007,-.0429,.046,-.0046,.0226,-.0059,.0202,-.0173,.0087,0,-.0067,-.0095,-.0153,.1506,-.0017,.0021]}],1:[{mean:[-.2271,.2323,.7319],identity:[-.0084,.0097,.0018,.0041,2e-4,-.002,-.0012,.0036,.0019,-9e-4,-.0063,-.001,-3e-4,.0053,6e-4,1e-4,5e-4,-.0015,.0044,-.0025,-.0015,-.002,.0016,-6e-4,2e-4,-.0013,0,-.0022,2e-4,2e-4,-.0025,-.0014,.0015,8e-4,2e-4,.0012,6e-4,-6e-4,.0017,0,3e-4,-1e-4,.0024,.0025,-.0029,-.0015,-.0015,1e-4,.0031,-.0016,7e-4,.0019,6e-4,.002,9e-4,.001,-.0014,-.002,-.0015,.0029,1e-4,5e-4,-.0023,8e-4,-.0011,.0019,.0017,-3e-4,-.0011,-3e-4,.0011,-8e-4,.0019,-.0022,1e-4,.0015,.0017,-8e-4,-.0011,-.0022,3e-4,.0022,6e-4,-.003,-2e-4,0,-.0017,-2e-4,0,1e-4,4e-4,.0012,.0019,-.0014,4e-4,-.0017,-.0012,-.0011,.0021,-.0029,.0026,.0018,-.0023,-.0029,1e-4,.0014,-.0019,-4e-4,-4e-4,.0023,-.0016,0,-9e-4,.0014,-.0015,.0015,-.0016,-.0011,-.0022,1e-4,-.0018,.0027,-.0013,4e-4,-1e-4,-5e-4,.0011,-2e-4,.0015,5e-4,-9e-4,-1e-4,.0029,6e-4,0,-3e-4,7e-4,-8e-4,-5e-4,.0025,3e-4,2e-4,-8e-4,-1e-4,3e-4,0,.0014,2e-4,-.0024,1e-4],expression:[-.0025,-9e-4,.006,.004,-.0027,-.0113,-8e-4,.001,.0031,-.0016,.0144,.0382,-3e-4,-5e-4,.0035,-.0044,-.0511,-.0014,-7e-4,-.1007,.0582,-6e-4,-.0606,-.0165,5e-4,-.0087,-.0093,.0036,.0057,-.0576,-.0039,.1488,.0127,.0016,-.0666,-9e-4,-.0153,.3162,-.0445,-.0021,.0023,.0043,-.0033,.2382,.0063,-.0217,.167,-.039,.0097,-.1144,-.0189,-.0145,.6831,.0632,-.0012,-.1959,-.0133,4e-4,.1108,-3e-4,.0062,.2593,-.0161,-.0018,-.0051,-.012,.0162,.016,-.0022,-.0052,-.0201,.0101,.0115,.0365,-.024,-.0059,.0188,-.0336,.0352,.0224,-.0229,.0146,.0086,-.0273,-.0032,.0103,-.0112]},{mean:[-.2288,.1541,.7202],identity:[-.0082,.0101,2e-4,.0036,-7e-4,-.0037,-8e-4,.0024,.0022,-.0013,-.0045,-.0013,-6e-4,.0045,-4e-4,4e-4,.0012,-.0014,.0042,-.001,-7e-4,-.0019,3e-4,-2e-4,.0012,-4e-4,-.0012,-.0018,-4e-4,-1e-4,-.0014,-.0012,1e-4,1e-4,-.0017,.001,.0015,-1e-4,6e-4,1e-4,0,-6e-4,.0028,.0021,-.0025,-.002,-.0015,7e-4,.0028,-.0023,9e-4,.0013,1e-4,.0016,.0012,.0032,-6e-4,-.0013,-.0011,.0021,3e-4,-5e-4,-.0024,4e-4,-4e-4,.0014,.0015,-8e-4,-3e-4,3e-4,.0017,-6e-4,.002,-.0018,-3e-4,9e-4,1e-4,2e-4,-6e-4,-.0015,-4e-4,.0022,7e-4,-.0023,0,-2e-4,-2e-4,-3e-4,-1e-4,6e-4,-2e-4,6e-4,.0022,-3e-4,.0013,-.0014,-5e-4,-3e-4,.0013,-.0027,6e-4,.0025,-.0023,-8e-4,-.0013,.0017,-9e-4,-.0019,1e-4,8e-4,-7e-4,-4e-4,0,.001,-.001,.0019,-8e-4,-.0015,-6e-4,-2e-4,-.0011,8e-4,1e-4,9e-4,-8e-4,-4e-4,6e-4,7e-4,.0021,-4e-4,7e-4,-5e-4,.0021,-7e-4,-4e-4,-9e-4,8e-4,3e-4,1e-4,3e-4,1e-4,9e-4,.001,-5e-4,5e-4,-.001,.001,4e-4,-5e-4,-.0012],expression:[8e-4,.0037,.0078,-4e-4,5e-4,-.012,-2e-4,-.0046,.0033,-.0089,.0295,.0221,-.0024,-.0084,.0013,.0057,.0125,.0049,-.0036,.0373,.0285,.0115,.0135,-.0035,.0048,.0108,-.0033,.0106,.0281,-.0301,-.0082,.0803,.0244,-7e-4,-.0725,-.0105,-.0247,-.0036,-.0143,-.0045,-.029,2e-4,-.0303,.0093,-.0021,-.0196,-.0754,-.0211,.0326,.1246,.006,-.0804,-.1499,.0109,.0182,-.0029,-.0014,-.0035,.0072,-8e-4,-.0152,-.0108,-.0166,-.0073,-.0144,-.0095,.0101,.047,-.0018,-.004,-.0189,.0027,.0104,.0298,-.0042,-.0096,.0191,-.0217,.0228,.0226,-.0105,.0047,-.0048,-.0172,.0061,-.0043,-.0016]}],2:{mean:[.5396,.2028,.2496],identity:[.0204,.0146,-.0182,-.0052,.0158,-.0038,-.0025,-.0108,-.006,.0085,-.0044,.0029,.0042,.001,.0095,.0015,-.0034,-.0064,-.0057,7e-4,.0026,7e-4,.0037,-6e-4,.0037,.0026,.0024,5e-4,-.0019,-.0013,.003,-.0028,.0018,-9e-4,.002,-.0047,.004,-.003,.0031,-.0027,-.0026,-.0017,.0016,.0014,-4e-4,.0021,-.002,0,.0017,7e-4,-4e-4,-7e-4,-.0018,-9e-4,2e-4,-.0012,1e-4,-5e-4,-.0011,4e-4,2e-4,.0011,1e-4,8e-4,.0017,-.0013,.0025,.0017,.001,2e-4,3e-4,5e-4,-4e-4,-1e-4,-5e-4,7e-4,-.0022,-.0029,6e-4,-8e-4,-6e-4,6e-4,-5e-4,5e-4,.0013,3e-4,-5e-4,-.003,7e-4,2e-4,.0016,-4e-4,0,0,4e-4,1e-4,.0014,.0012,1e-4,4e-4,-1e-4,8e-4,9e-4,4e-4,-4e-4,9e-4,-2e-4,.001,9e-4,4e-4,1e-4,7e-4,7e-4,.001,-.0017,-8e-4,2e-4,.0017,-3e-4,-1e-4,4e-4,5e-4,7e-4,5e-4,-1e-4,-6e-4,-1e-4,1e-4,-3e-4,-7e-4,-2e-4,-5e-4,0,-3e-4,3e-4,8e-4,-2e-4,-3e-4,5e-4,1e-4,-7e-4,-.001,-2e-4,3e-4,4e-4,-1e-4,7e-4,0,4e-4,4e-4],expression:[1e-4,-4e-4,1e-4,0,5e-4,2e-4,0,0,3e-4,-2e-4,3e-4,5e-4,-1e-4,2e-4,8e-4,1e-4,-2e-4,-5e-4,-3e-4,6e-4,5e-4,0,1e-4,2e-4,1e-4,-1e-4,-6e-4,-2e-4,5e-4,0,-4e-4,4e-4,.0016,4e-4,-4e-4,-.0015,0,1e-4,1e-4,-3e-4,3e-4,.0019,-2e-4,7e-4,4e-4,4e-4,-8e-4,-.0015,.0013,-.0016,-.0069,4e-4,-6e-4,-.0019,0,-1e-4,5e-4,-3e-4,2e-4,.0014,-3e-4,6e-4,.0011,4e-4,-3e-4,-.0032,-6e-4,8e-4,.0025,-3e-4,3e-4,.0015,-1e-4,1e-4,3e-4,-1e-4,0,0,-3e-4,4e-4,.0019,1e-4,0,-8e-4,-1e-4,1e-4,5e-4]},3:{mean:[-.5464,.2141,.26],identity:[-.0207,.0172,-.0176,.0068,.0148,-.0051,.0042,-.0101,-.0058,-.0087,-.0059,.0045,-.0056,.0017,.0097,-.0048,-.004,-.0044,.0019,2e-4,.0041,-.0052,.0041,2e-4,-.0027,6e-4,.002,-.0027,-.0033,-6e-4,-.004,9e-4,-.0012,-1e-4,-.0026,.0021,-.003,-.0025,.0052,.0025,.0022,-1e-4,-8e-4,.0013,.001,4e-4,.0018,.0014,6e-4,-5e-4,-.0015,-.0039,.0014,-1e-4,8e-4,-2e-4,6e-4,-5e-4,-.0038,-.0012,-.0018,-3e-4,.001,9e-4,.0012,.0024,-.0024,-7e-4,-.0016,-.0016,3e-4,-.001,-.0014,-.0014,.001,-3e-4,-7e-4,-.0012,3e-4,6e-4,3e-4,-5e-4,3e-4,.0012,6e-4,-8e-4,4e-4,4e-4,8e-4,-2e-4,-.0014,3e-4,0,.0023,-3e-4,-.0012,-.0013,.0011,-2e-4,-.0014,-1e-4,.0014,0,3e-4,3e-4,-8e-4,-5e-4,-7e-4,-7e-4,-2e-4,3e-4,5e-4,2e-4,-1e-4,.0011,-.0014,1e-4,-.0015,-1e-4,-3e-4,0,-.001,-1e-4,-8e-4,8e-4,-8e-4,-2e-4,-.0011,-3e-4,-4e-4,1e-4,-2e-4,3e-4,-7e-4,0,3e-4,1e-4,-8e-4,5e-4,1e-4,4e-4,.0014,-6e-4,-.001,-3e-4,-2e-4,1e-4,-1e-4,-1e-4,7e-4],expression:[-3e-4,-1e-4,6e-4,4e-4,0,-7e-4,0,-3e-4,-2e-4,-4e-4,.0012,8e-4,1e-4,-5e-4,-7e-4,-4e-4,0,1e-4,-4e-4,.0017,7e-4,0,1e-4,3e-4,0,4e-4,4e-4,5e-4,1e-4,-.001,-7e-4,.0022,.0026,5e-4,-.0024,-.0023,0,1e-4,3e-4,0,-.0013,-.0015,6e-4,.0014,8e-4,-2e-4,-.0025,-.0023,-3e-4,.0049,.006,-2e-4,-7e-4,-2e-4,0,-.0019,-.0018,-2e-4,.0017,.0017,3e-4,.0015,7e-4,1e-4,-.0023,-.0036,2e-4,.0023,.0017,0,-5e-4,-3e-4,-3e-4,4e-4,2e-4,-1e-4,-3e-4,-5e-4,1e-4,.0018,.0025,1e-4,-6e-4,-.0011,0,1e-4,1e-4]},4:{mean:[.0018,.1864,.853],identity:[-.0011,.0134,.0085,9e-4,-.0025,-7e-4,-3e-4,.0033,4e-4,-5e-4,-.0047,-.002,7e-4,.0026,-.0069,-1e-4,.0036,.0072,5e-4,-8e-4,-.0047,4e-4,-8e-4,-.001,0,2e-4,-.0036,-2e-4,-.001,-.0048,-1e-4,.0018,.0044,-7e-4,-2e-4,.0043,3e-4,.002,-.0031,0,-7e-4,.0013,0,.0037,.0033,-.0016,-.0012,.002,-1e-4,-.0027,.0051,5e-4,8e-4,7e-4,-.0017,.0054,.0023,-3e-4,.0032,1e-4,0,7e-4,-5e-4,-.0011,2e-4,8e-4,0,-.0033,-8e-4,-7e-4,7e-4,.0033,5e-4,-3e-4,.0029,-1e-4,-.0024,-.0011,-.002,-.0015,-.0019,2e-4,7e-4,.0031,6e-4,.0012,0,0,-.0021,0,-9e-4,-.0011,-.0011,-2e-4,.0015,.001,.0013,8e-4,.001,-3e-4,9e-4,.0027,-2e-4,-.0011,-.0011,6e-4,7e-4,2e-4,1e-4,-5e-4,-.0022,.0011,-.0014,9e-4,3e-4,2e-4,0,-6e-4,-4e-4,-.0011,-7e-4,.001,-.0012,6e-4,-.0012,-.0015,3e-4,-9e-4,-.0013,-.0013,7e-4,.001,-.0011,-.0013,.0015,4e-4,1e-4,4e-4,-1e-4,-.0016,-.0016,9e-4,-7e-4,-.0024,5e-4,-1e-4,-.0017,-2e-4,3e-4,-9e-4],expression:[-.0017,.0019,.0097,.003,-.0103,-.0093,9e-4,6e-4,.0023,-.0017,-.0204,.0376,.0033,-.0034,.0033,-.0026,-.0322,.0396,-.0032,-.0947,.0942,-7e-4,-.0175,.0266,-.001,-6e-4,.0016,.0025,.0157,-.0142,-.0022,.037,.015,.0021,-.0102,-.0107,.0036,.0055,-.0051,.0021,3e-4,-3e-4,4e-4,-.0177,.0074,-6e-4,-.0357,.0149,-.0066,9e-4,.0013,-.0031,.0016,.0095,.002,.0052,.0035,-3e-4,.0053,-.0082,.002,.0022,-.0071,-.0011,5e-4,.0055,.0011,3e-4,-.0126,-4e-4,3e-4,-.0023,-.0015,.0059,.0063,-.0042,-.0023,.0055,.0019,.0017,-.0075,6e-4,-8e-4,.0018,.0012,.0012,-5e-4]},5:{mean:[-.002,-.0469,1.0039],identity:[-.0017,.0018,.0156,6e-4,-.0038,5e-4,4e-4,.0013,.002,-4e-4,-.0015,-.0051,5e-4,-7e-4,-.0055,-1e-4,-9e-4,.008,-2e-4,.0036,-.0053,4e-4,-.0026,-.0016,7e-4,9e-4,-.009,-3e-4,7e-4,-.0084,.0015,.0021,.0032,-.0015,.0018,.0046,-3e-4,-4e-4,-1e-4,8e-4,-.0044,-7e-4,-8e-4,7e-4,.0048,-.0024,-3e-4,.0024,2e-4,-.0051,.0058,-6e-4,.0028,.0018,-.0021,.0035,.0057,.0011,.0065,0,-2e-4,.0011,.003,-.0027,8e-4,7e-4,3e-4,-.0039,-.002,-2e-4,-.0015,.0034,.0012,-.0025,.0024,-2e-4,4e-4,-.0042,-.0024,-.001,-.0023,.0016,-7e-4,.0039,1e-4,-5e-4,.0018,3e-4,-2e-4,-9e-4,-.0015,3e-4,-7e-4,-1e-4,-2e-4,.0023,.0032,.002,-.0013,.0013,-.0038,.0045,1e-4,-.0031,1e-4,.0019,-1e-4,.0016,.0013,0,-.002,.0023,2e-4,.0011,.0018,-.0024,6e-4,-.0017,.002,-8e-4,-.0021,7e-4,.0011,8e-4,4e-4,-.001,.0012,2e-4,-6e-4,-.0027,-5e-4,.001,-9e-4,1e-4,-1e-4,8e-4,-.0011,.0022,-.001,-5e-4,-.0011,.0016,-.0015,8e-4,-3e-4,9e-4,.0013,-7e-4,-7e-4,-2e-4],expression:[-.0018,-.0168,.0088,.0389,.1026,.0414,.2201,-.0262,-.0016,-.0017,.0612,-.0298,-.0323,.0093,.0013,-.005,.2207,.1315,-4e-4,.0858,-.0303,-.0133,.015,-.008,.1454,.0114,.0177,-.0077,.1022,.0356,-.0023,.1088,.0232,.003,-.0706,.0347,-1e-4,.004,-.0011,.0397,-.0096,-.0033,.0029,-.01,-.0083,-6e-4,-.0135,.0016,-.0087,-.0019,.0022,-.004,-.0087,.0105,8e-4,-.005,.0069,.0028,.0409,-.0391,.003,.0103,.0051,.0026,.0776,-.0083,-.0062,-.0567,.0268,.0175,.0017,.0156,-.0043,.0299,-.0395,-.0015,.0051,-.0148,.0125,.0035,.0603,.0109,-.0645,-.0257,.002,6e-4,-8e-4]},6:{mean:[-6e-4,-.1542,.8789],identity:[-7e-4,-.0032,.01,0,-.0027,.0031,6e-4,5e-4,-6e-4,-3e-4,.0013,-.0049,-2e-4,-.002,-.0046,8e-4,-.0011,.0054,2e-4,.0043,-.0027,3e-4,-.0022,-.0019,8e-4,.0032,-.0069,0,4e-4,-.0071,.0016,.0027,.0039,-.0017,9e-4,.0031,-1e-4,-5e-4,-4e-4,7e-4,-.0026,-.0012,-5e-4,6e-4,2e-4,-.0014,-.0013,.0019,-2e-4,-.0053,.0031,-6e-4,.0016,.0023,-.0013,.0021,.0029,8e-4,.0052,0,4e-4,0,.0037,-.0026,3e-4,.002,-2e-4,-.0024,4e-4,-4e-4,-.0012,8e-4,7e-4,-.0023,5e-4,0,.0014,-.0022,-.0016,0,-.0012,8e-4,-7e-4,.0014,-6e-4,-.0012,-3e-4,2e-4,.0012,-3e-4,-.002,-1e-4,1e-4,-2e-4,-.0016,9e-4,.002,.0019,0,6e-4,-.0022,.0016,1e-4,-.0017,-.0013,.001,9e-4,-1e-4,.0011,3e-4,-7e-4,.0014,8e-4,.0013,.0011,-.002,0,-.0015,.0014,.001,-.0015,7e-4,3e-4,.001,-1e-4,.0012,7e-4,6e-4,-4e-4,-.0013,-.0012,-9e-4,-.0011,2e-4,-5e-4,5e-4,4e-4,2e-4,1e-4,0,5e-4,5e-4,-.0014,.0015,-9e-4,5e-4,.0014,-8e-4,-8e-4,.0012],expression:[8e-4,.0481,.1653,.0784,.1008,-.3992,.5088,-.02,.0542,.001,.3723,-.0151,-.0986,.0283,-.0033,-.0121,.2634,.1202,.0036,-.0529,-.0245,-.0297,-.1085,.0495,.3264,.0083,4e-4,-.0314,.1459,-.1142,-.003,1e-4,.1154,-.0035,-.0285,-.0184,-1e-4,.0012,.0035,.079,-.0103,.0043,.011,-.004,-.0774,-.0047,-.023,.0284,-.0048,-.001,.0149,-.0039,.0046,.0528,-6e-4,.0063,.0376,.0096,.0558,-.0295,0,-.0311,-.0634,.0062,.0176,-.0154,-.0109,-.1149,.0192,.0326,.0121,.0237,.0034,.0262,-.0778,.0014,-.0045,-.0203,.0077,.0588,.0575,.008,-.0557,-.0095,.0032,.0054,-.0042]},7:{mean:[.0038,-.2927,.833],identity:[6e-4,-.0109,.0073,-6e-4,-.0044,.0017,-1e-4,-.0022,-6e-4,-3e-4,.0065,-.0014,-6e-4,-.0051,-.0046,3e-4,-.0029,.003,2e-4,.0038,-6e-4,0,-.0012,6e-4,-4e-4,.0053,-.0075,-2e-4,-7e-4,-.0063,.0014,.0026,.0019,-.0022,.0018,.0028,-1e-4,-.0012,.0011,9e-4,.0019,-.0019,-1e-4,.0012,-.0022,-3e-4,-.0012,4e-4,-8e-4,3e-4,-3e-4,0,.0017,.0021,-4e-4,.0012,.0022,-3e-4,.0026,-3e-4,4e-4,-.0026,.0032,-.0019,3e-4,.0015,1e-4,-.0015,.0013,-1e-4,1e-4,-.0029,0,-2e-4,-.0028,-7e-4,.0019,-3e-4,-2e-4,.0012,9e-4,4e-4,-.001,-.002,-.0016,.0011,-1e-4,3e-4,.0021,2e-4,-.0014,-9e-4,-1e-4,0,-2e-4,-.001,.0015,.0018,1e-4,7e-4,8e-4,.0017,.001,-9e-4,1e-4,4e-4,.0023,-1e-4,.0012,1e-4,-8e-4,2e-4,.0018,6e-4,3e-4,1e-4,.0012,-3e-4,.002,-6e-4,0,-1e-4,-.0022,4e-4,5e-4,.0011,2e-4,-.0013,-.0023,6e-4,6e-4,-5e-4,-5e-4,9e-4,2e-4,2e-4,.0011,-3e-4,.0011,.0015,.0011,3e-4,2e-4,8e-4,-4e-4,-8e-4,3e-4,0,.0012,-1e-4],expression:[.026,.1107,.3257,.1917,.3206,-1.1348,1.0791,-.035,.1549,-.0103,.6953,1e-4,-.3262,.068,.0219,-.0044,.3643,.2178,.0168,-.2478,-.1321,-.0414,-.3782,-.0617,.5088,-.0031,-.0311,-.0497,.0948,-.385,.0148,-.2224,-.1415,-.0074,.0863,-.203,3e-4,-.0081,.0057,.1164,-.0039,.0015,-.0024,.0505,.1532,.0039,-.0148,-.0753,.0163,.0058,-.0339,.0036,.0252,-.0569,-.0041,.0163,-.0361,.0035,-.018,.1266,0,-.0163,-.0046,.0133,-.1656,.2134,.0191,.0057,.0734,.0681,.0039,-.0144,.029,-.074,-.046,.0122,.0072,-.0162,-.0349,-.1234,.0212,-.0355,.0535,.1218,.0043,-.024,.0016]},8:{mean:[-.0018,-.3037,.8491],identity:[2e-4,-.0112,.0077,-4e-4,-.0044,.0024,1e-4,-.0021,-4e-4,-4e-4,.0066,-.002,-4e-4,-.0052,-.0044,3e-4,-.0032,.0039,4e-4,.0042,-3e-4,2e-4,-.0012,-2e-4,-2e-4,.0052,-.0083,-1e-4,-8e-4,-.0056,.0017,.0024,.0019,-.0023,.002,.0027,-2e-4,-.0013,.002,9e-4,.0017,-.0028,-2e-4,.0012,-.0026,0,-.0016,2e-4,-5e-4,3e-4,-.001,-1e-4,.0016,.0016,-3e-4,.0012,.0012,-3e-4,.0027,-3e-4,3e-4,-.0026,.0037,-.0017,1e-4,.0016,1e-4,-.0015,.0024,1e-4,2e-4,-.0039,0,-3e-4,-.0033,-6e-4,.0017,-4e-4,-4e-4,.0012,.0018,2e-4,-.0012,-.002,-.0017,.0013,-.001,3e-4,.0021,4e-4,-.0012,-6e-4,-2e-4,0,-4e-4,-9e-4,.0016,.0017,4e-4,7e-4,7e-4,.001,9e-4,-8e-4,5e-4,5e-4,.0023,.001,.0013,2e-4,-4e-4,2e-4,.0017,8e-4,3e-4,-1e-4,9e-4,-4e-4,.0019,-5e-4,3e-4,0,-.0025,3e-4,3e-4,.0011,1e-4,-.0015,-.001,7e-4,7e-4,-7e-4,-7e-4,8e-4,0,1e-4,.0013,-4e-4,.0012,.0014,.0017,4e-4,2e-4,3e-4,-3e-4,-9e-4,1e-4,0,.001,-4e-4],expression:[-.0092,2.8809,1.416,.2018,1.1982,-.9351,1.4492,-.1902,.1749,.0305,-.167,-.1572,-.7354,-.0492,.0115,.0608,.2971,.1179,.0046,-.0997,-.0041,-.0104,.3379,-.1854,.009,.0366,-.0583,.0269,-.0029,-.4175,-8e-4,.1794,.0752,-.0135,.1158,.1234,5e-4,.003,-.0032,.1034,-.0504,-.0055,-.0076,-.0772,.224,.0047,.0229,-.1044,.0162,-.0161,-.0241,-.0083,-.1388,-.0434,-.0125,-.0997,-.0327,-.0111,.1576,-.3911,.0199,.2522,.142,.0059,-.0721,-.0045,.031,-.1136,-.1685,.0641,.0142,.0312,.0426,-.1366,.1011,.0101,-.0157,.0018,-.0103,-.0344,.0907,.0016,.1168,-.0806,.0104,-.0057,.0111]},9:[{mean:[.0038,-.2927,.833],identity:[6e-4,-.0109,.0073,-6e-4,-.0044,.0017,-1e-4,-.0022,-6e-4,-3e-4,.0065,-.0014,-6e-4,-.0051,-.0046,3e-4,-.0029,.003,2e-4,.0038,-6e-4,0,-.0012,6e-4,-4e-4,.0053,-.0075,-2e-4,-7e-4,-.0063,.0014,.0026,.0019,-.0022,.0018,.0028,-1e-4,-.0012,.0011,9e-4,.0019,-.0019,-1e-4,.0012,-.0022,-3e-4,-.0012,4e-4,-8e-4,3e-4,-3e-4,0,.0017,.0021,-4e-4,.0012,.0022,-3e-4,.0026,-3e-4,4e-4,-.0026,.0032,-.0019,3e-4,.0015,1e-4,-.0015,.0013,-1e-4,1e-4,-.0029,0,-2e-4,-.0028,-7e-4,.0019,-3e-4,-2e-4,.0012,9e-4,4e-4,-.001,-.002,-.0016,.0011,-1e-4,3e-4,.0021,2e-4,-.0014,-9e-4,-1e-4,0,-2e-4,-.001,.0015,.0018,1e-4,7e-4,8e-4,.0017,.001,-9e-4,1e-4,4e-4,.0023,-1e-4,.0012,1e-4,-8e-4,2e-4,.0018,6e-4,3e-4,1e-4,.0012,-3e-4,.002,-6e-4,0,-1e-4,-.0022,4e-4,5e-4,.0011,2e-4,-.0013,-.0023,6e-4,6e-4,-5e-4,-5e-4,9e-4,2e-4,2e-4,.0011,-3e-4,.0011,.0015,.0011,3e-4,2e-4,8e-4,-4e-4,-8e-4,3e-4,0,.0012,-1e-4],expression:[.026,.1107,.3257,.1917,.3206,-1.1348,1.0791,-.035,.1549,-.0103,.6953,1e-4,-.3262,.068,.0219,-.0044,.3643,.2178,.0168,-.2478,-.1321,-.0414,-.3782,-.0617,.5088,-.0031,-.0311,-.0497,.0948,-.385,.0148,-.2224,-.1415,-.0074,.0863,-.203,3e-4,-.0081,.0057,.1164,-.0039,.0015,-.0024,.0505,.1532,.0039,-.0148,-.0753,.0163,.0058,-.0339,.0036,.0252,-.0569,-.0041,.0163,-.0361,.0035,-.018,.1266,0,-.0163,-.0046,.0133,-.1656,.2134,.0191,.0057,.0734,.0681,.0039,-.0144,.029,-.074,-.046,.0122,.0072,-.0162,-.0349,-.1234,.0212,-.0355,.0535,.1218,.0043,-.024,.0016]},{mean:[-.0018,-.3037,.8491],identity:[2e-4,-.0112,.0077,-4e-4,-.0044,.0024,1e-4,-.0021,-4e-4,-4e-4,.0066,-.002,-4e-4,-.0052,-.0044,3e-4,-.0032,.0039,4e-4,.0042,-3e-4,2e-4,-.0012,-2e-4,-2e-4,.0052,-.0083,-1e-4,-8e-4,-.0056,.0017,.0024,.0019,-.0023,.002,.0027,-2e-4,-.0013,.002,9e-4,.0017,-.0028,-2e-4,.0012,-.0026,0,-.0016,2e-4,-5e-4,3e-4,-.001,-1e-4,.0016,.0016,-3e-4,.0012,.0012,-3e-4,.0027,-3e-4,3e-4,-.0026,.0037,-.0017,1e-4,.0016,1e-4,-.0015,.0024,1e-4,2e-4,-.0039,0,-3e-4,-.0033,-6e-4,.0017,-4e-4,-4e-4,.0012,.0018,2e-4,-.0012,-.002,-.0017,.0013,-.001,3e-4,.0021,4e-4,-.0012,-6e-4,-2e-4,0,-4e-4,-9e-4,.0016,.0017,4e-4,7e-4,7e-4,.001,9e-4,-8e-4,5e-4,5e-4,.0023,.001,.0013,2e-4,-4e-4,2e-4,.0017,8e-4,3e-4,-1e-4,9e-4,-4e-4,.0019,-5e-4,3e-4,0,-.0025,3e-4,3e-4,.0011,1e-4,-.0015,-.001,7e-4,7e-4,-7e-4,-7e-4,8e-4,0,1e-4,.0013,-4e-4,.0012,.0014,.0017,4e-4,2e-4,3e-4,-3e-4,-9e-4,1e-4,0,.001,-4e-4],expression:[-.0092,2.8809,1.416,.2018,1.1982,-.9351,1.4492,-.1902,.1749,.0305,-.167,-.1572,-.7354,-.0492,.0115,.0608,.2971,.1179,.0046,-.0997,-.0041,-.0104,.3379,-.1854,.009,.0366,-.0583,.0269,-.0029,-.4175,-8e-4,.1794,.0752,-.0135,.1158,.1234,5e-4,.003,-.0032,.1034,-.0504,-.0055,-.0076,-.0772,.224,.0047,.0229,-.1044,.0162,-.0161,-.0241,-.0083,-.1388,-.0434,-.0125,-.0997,-.0327,-.0111,.1576,-.3911,.0199,.2522,.142,.0059,-.0721,-.0045,.031,-.1136,-.1685,.0641,.0142,.0312,.0426,-.1366,.1011,.0101,-.0157,.0018,-.0103,-.0344,.0907,.0016,.1168,-.0806,.0104,-.0057,.0111]}],10:{mean:[-.007,-.6338,.7695],identity:[1e-4,-.0296,.0089,-6e-4,-.0073,-.0065,-1e-4,-.0029,-.0031,-2e-4,.0128,.0065,0,-.0116,-.014,-1e-4,-.0037,-.0052,-5e-4,.0028,.003,-4e-4,.0041,.0015,6e-4,.0088,-.0076,-.0011,-.0015,-.0073,7e-4,-.0011,.0019,-.0011,-5e-4,.0031,-1e-4,-.0018,9e-4,.0018,.0038,.0068,-4e-4,-1e-4,.0061,.0024,.0024,-.0066,-6e-4,.0051,.0014,.002,.005,-.0035,1e-4,-.0034,-.004,-7e-4,.001,-8e-4,1e-4,-5e-4,-.0021,2e-4,.0045,-.0043,-.0012,-.0024,-.0014,6e-4,.0034,.0027,-8e-4,-.0053,.0014,1e-4,.0013,-.0018,6e-4,-.0015,.0029,-2e-4,-.0035,1e-4,-.002,.0012,.0048,.0011,1e-4,-2e-4,-3e-4,-.0012,.0033,6e-4,.002,-.0033,4e-4,.0028,2e-4,8e-4,-1e-4,-.0018,8e-4,.0017,1e-4,9e-4,8e-4,3e-4,.0019,-.001,.001,-7e-4,-.0013,0,1e-4,.0032,-1e-4,1e-4,.0011,-4e-4,5e-4,-7e-4,.0018,-3e-4,2e-4,7e-4,8e-4,-.0014,7e-4,.0015,-6e-4,-1e-4,-4e-4,.0019,-9e-4,-6e-4,-6e-4,-.0012,2e-4,-.0012,-8e-4,4e-4,6e-4,-.0011,3e-4,9e-4,-4e-4,6e-4,-7e-4,-4e-4],expression:[-.0603,2.0527,1.9014,.1025,.6143,.3804,.7881,-.1023,-.0764,.0454,-.2487,-.5073,-.6704,-.031,-.0181,.0466,.0651,-.0726,-.0033,-.0022,.2944,.0101,.1669,-.5225,-.4685,.0236,.0079,.011,.2173,.4529,.0121,-.2104,-.0673,.0225,-.4023,.0317,-9e-4,.0076,-.0032,.0333,.0523,.0129,-.001,-.0319,-.0139,.0015,-.0044,.0247,-5e-4,.0161,.0061,.0074,.0776,-.0176,.007,.055,-.017,.0052,-.1819,.0294,-.0161,-.0337,.0226,-.008,-.0297,.1967,-.0095,.0383,.2039,.0434,.0271,-.0064,-.0037,-.0294,-.024,.0024,-.0137,-.0209,-.0031,.0628,.1003,-.0126,-.056,-.0097,-.0012,-.0041,.0162]},11:{mean:[.2505,.3833,.7793],identity:[.0098,.012,.0077,-6e-4,-3e-4,0,1e-4,.0082,-7e-4,.0019,-.0036,-.0012,2e-4,.0119,-.0039,.001,1e-4,.0031,-.0036,-.0059,-7e-4,.0026,.0028,-.0011,9e-4,-.0032,8e-4,.0029,.0043,3e-4,.0025,-9e-4,.0047,.0016,.0022,.0018,-.001,.0025,-.003,-.001,.0033,.0034,4e-4,-.0052,.0024,-2e-4,.001,-.0014,-6e-4,.0038,-.0015,-6e-4,-.001,-.0011,-4e-4,-.001,4e-4,-7e-4,.0036,-8e-4,-2e-4,-.0019,5e-4,3e-4,-6e-4,-.0024,-.0017,-.0014,6e-4,-4e-4,-.0031,-.0013,-6e-4,.0042,2e-4,-2e-4,-.002,-3e-4,8e-4,.0018,-5e-4,-6e-4,-2e-4,-6e-4,.0025,.0019,.001,8e-4,-.0015,-.0012,-1e-4,-6e-4,-4e-4,.0023,-.001,6e-4,-2e-4,-.001,0,-9e-4,-.002,-.0011,1e-4,0,-1e-4,5e-4,6e-4,9e-4,-6e-4,5e-4,8e-4,-1e-4,-2e-4,-.0017,-6e-4,-4e-4,4e-4,-6e-4,.0012,4e-4,3e-4,-7e-4,3e-4,-2e-4,6e-4,1e-4,5e-4,-.0019,-6e-4,4e-4,7e-4,-1e-4,1e-4,5e-4,.001,-6e-4,-.002,-7e-4,-5e-4,5e-4,3e-4,7e-4,.0014,0,5e-4,-5e-4,-2e-4,3e-4,-6e-4,-1e-4],expression:[-9e-4,-3e-4,.0032,-.003,-.0034,-.0031,.0014,0,4e-4,-.0139,-.0764,.0275,-.002,-.0089,.0031,-.0503,-.0771,.038,-.1323,-.3523,.1368,-.0474,-.0564,.0296,-.0045,.007,-.0013,.0153,.1259,-.0464,.0866,.2175,-.0786,-.0413,-.1248,.0448,-.1777,-.4607,.1782,-5e-4,-.005,.0016,.0629,.1506,-.0624,.0545,.2576,-.0864,-.0231,-.0552,.0244,-.0136,-.0359,.0169,-.1158,-.2996,.1214,-.0235,-.0354,.0165,-.0745,-.1079,.0475,-.0116,-.0039,.0012,.0013,-.0108,-8e-4,.0044,-.0027,-1e-4,-.0694,.0363,.0071,.1462,-.136,.0047,.009,-.0177,.0038,-.0271,.0118,.0011,-.0399,-.0111,.0123]},12:{mean:[-.2981,.3828,.7563],identity:[-.0116,.014,.0054,.0018,5e-4,0,-4e-4,.0068,-.0013,-.0019,-.0048,-5e-4,5e-4,.0108,-.0036,-.0029,-.0018,.0029,.0043,-.0077,6e-4,-.0017,.002,-.0011,-.0014,-.0035,.0015,-.0024,.0011,4e-4,-.0048,2e-4,.0029,-1e-4,-1e-4,.003,.0019,.0035,-.0016,-4e-4,.0039,.0019,1e-4,-.0064,.004,3e-4,.002,-.0021,.0017,.0011,-.001,.0026,.0025,-5e-4,2e-4,-3e-4,-5e-4,-7e-4,9e-4,-4e-4,-.001,-.0022,.001,9e-4,-.0014,7e-4,.0011,-.001,-5e-4,-8e-4,-.0017,-.0021,9e-4,.0036,5e-4,4e-4,-.0031,6e-4,-.0015,.0027,2e-4,1e-4,-.0011,2e-4,-.0011,-.0018,4e-4,-.0013,-2e-4,7e-4,9e-4,-3e-4,.001,-.0021,8e-4,6e-4,-9e-4,4e-4,-7e-4,8e-4,-.002,-.0013,0,7e-4,-.0012,-1e-4,.0014,.0014,-1e-4,.0013,6e-4,6e-4,-.0014,-.0015,-9e-4,1e-4,1e-4,9e-4,7e-4,0,1e-4,-.001,-4e-4,0,-5e-4,1e-4,-3e-4,4e-4,-5e-4,-1e-4,-.0011,2e-4,0,1e-4,8e-4,8e-4,0,-7e-4,-8e-4,0,2e-4,-1e-4,.001,3e-4,4e-4,-2e-4,0,5e-4,.0018,-1e-4],expression:[0,-4e-4,.0028,.0036,-8e-4,-.0026,-.0015,-8e-4,3e-4,.0075,-.0608,.025,.0019,-.0076,.0033,.0379,-.0437,.0335,.0964,-.2452,.1233,.0368,-.0251,.0253,.0033,.0097,-.0021,-.0095,.1171,-.0475,-.064,.1548,-.0718,.0228,-.0831,.0343,-.1924,.6206,-.2771,.0021,-.0143,.0056,-.0705,.2522,-.1116,-.0692,.4229,-.1592,-.0093,.05,-.0185,.0948,-.3196,.1437,-.0184,.0194,-.0131,.0205,-.0353,.0201,.0676,-.135,.0672,.0137,-.0311,.0118,3e-4,-.0077,-2e-4,-.0151,4e-4,-.0058,.029,-.0139,.0163,.1324,.1819,-.0039,.0406,.0501,.0017,.0331,.0161,.0062,-.0235,-.0446,.0047]}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={incompatible:()=>!("function"==typeof Promise&&"object"==typeof WebAssembly&&!!(navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices&&navigator.mediaDevices.getUserMedia)),incompatible_ui:()=>{const e=document.createElement("div");e.append(function(){let e=document.createElement("div"),t="a recent web browser";navigator.userAgent.match(/Android/i)?(t="Chrome for Android",window.location.href="googlechrome://navigate?url="+encodeURI(window.location.href),setTimeout(()=>{window.location.href="samsunginternet://open?url="+encodeURI(window.location.href)},2e3)):navigator.userAgent.match(/iPhone|iPod|iPad/i)&&(t="Safari",e.classList.add("zee-launcher-browser-safari")),e.classList.add("zee-launcher-unsupported"),e.innerHTML=`\n <style>.zee-launcher-unsupported {\n display: flex;\n flex-direction: column;\n height: 100%;\n justify-content: center;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n align-items: center;\n }\n .zee-launcher-browser-logo {\n background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg version='1.1' viewBox='0 0 210 211' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg transform='translate(-82 -146)' fill-rule='nonzero' stroke='%23ffffff' stroke-width='2'%3E%3Cg transform='translate(83 146.5)'%3E%3Cpath d='m55.146 88.785l-32.039-49.472c19.962-24.947 49.904-38.684 80.517-38.81 17.739-0.12642 35.855 4.4246 52.336 13.99 18.2 10.619 32.039 25.874 40.846 43.404l-86.095-4.5511c-24.365-1.4327-47.556 12.347-55.565 35.439zm13.797 16.224c0 19.468 15.684 35.229 35.059 35.229 19.374 0 35.059-15.76 35.059-35.229 0-19.468-15.684-35.229-35.059-35.229-19.374 0-35.059 15.718-35.059 35.229zm132.06-37.588l-58.585 3.034c15.894 18.668 16.145 45.595 2.7678 66.243l-47.01 72.648c19.5 1.0535 39.588-3.2447 57.788-13.864 45.039-26.126 63.282-80.908 45.039-128.06zm-144.93 57.647l-39.126-77.326c-10.694 16.434-16.942 36.156-16.942 57.267 0 52.253 38.078 95.53 87.856 103.2l26.713-52.59c-24.155 4.5511-47.472-8.765-58.501-30.551z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A");\n width: 211px;\n height: 211px;\n margin-bottom: 25%;\n margin-top: -60px;\n background-repeat: no-repeat;\n }\n .zee-launcher-browser-safari .zee-launcher-browser-logo {\n background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg version='1.1' viewBox='0 0 211 211' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg transform='translate(-82 -146)' fill-rule='nonzero' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='m180 251.86c0-4.0385 2.9377-7.855 7.2552-7.855 3.9614 0 7.7448 2.8402 7.7448 7.145 0 4.0385-2.8487 7.855-7.1662 7.855-4.0059 0-7.8338-2.9734-7.8338-7.145zm112-0.35503c0 57.728-46.772 104.5-104.5 104.5s-104.5-46.772-104.5-104.5 46.772-104.5 104.5-104.5 104.5 46.772 104.5 104.5zm-12-1c0-51.649-41.851-93.5-93.5-93.5s-93.5 41.851-93.5 93.5 41.851 93.5 93.5 93.5 93.5-41.851 93.5-93.5zm-30.624 40.983c0 1.5095 5.4495 4.2768 6.8328 5.1154-11.486 17.401-29.26 29.938-49.423 34.928l-1.8444-7.757c-0.12576-1.0482-0.79646-1.174-1.7606-1.174-0.79646 0-1.2576 1.174-1.1737 1.7611l1.8444 7.8828c-5.5753 1.174-11.234 1.7611-16.935 1.7611-15.217 0-30.182-4.2768-43.177-12.202 0.71263-1.174 5.1141-7.5474 5.1141-8.4698 0-0.79666-0.71263-1.5095-1.5091-1.5095-1.6348 0-5.1141 6.9603-6.1621 8.344-17.522-11.615-30.182-29.602-35.044-50.148l8.0066-1.761c0.92222-0.25158 1.1737-0.92246 1.1737-1.7611 0-0.79667-1.1737-1.2579-1.8444-1.174l-7.8389 1.803c-1.048-5.3251-1.6348-10.692-1.6348-16.143 0-15.556 4.4015-30.86 12.66-43.984 1.1737 0.71281 6.749 4.5284 7.6712 4.5284 0.79646 0 1.5091-0.58702 1.5091-1.3837 0-1.6353-6.1621-4.7381-7.5455-5.7024 11.821-17.275 29.805-29.728 50.219-34.34l1.7606 7.757c0.25152 0.92246 0.92222 1.174 1.7606 1.174 0.83838 0 1.2576-1.174 1.1737-1.8449l-1.7606-7.6732c5.1141-0.92246 10.312-1.5095 15.552-1.5095 15.552 0 30.727 4.4026 43.973 12.663-0.79646 1.174-4.5273 6.6249-4.5273 7.5474 0 0.79667 0.58687 1.5095 1.3833 1.5095 1.6348 0 4.7369-6.0379 5.5753-7.4216 17.187 11.615 29.469 29.351 34.248 49.561l-6.4975 1.3837c-1.048 0.25158-1.1737 0.92246-1.1737 1.8449 0 0.79667 1.1737 1.2579 1.7606 1.174l6.6232-1.5095c1.048 5.3251 1.6348 10.776 1.6348 16.227 0 15.221-4.1919 30.189-12.073 43.062-1.1737-0.58702-6.0364-4.0672-6.9586-4.0672-0.8803 0-1.5929 0.71281-1.5929 1.5095zm-14.876-98.483c-5.2178 4.88-53.863 49.48-55.228 51.8l-38.772 64.2c5.0974-4.76 53.863-49.6 55.108-51.72l38.892-64.28z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");\n }\n .zee-launcher-unsupported-message {\n text-align: center;\n width: 250px;\n font-family: sans-serif;\n color: #ffffff;\n }\n .zee-launcher-unsupported-message-copy {\n border: 1px solid #ffffff;\n border-radius: 5px;\n margin-top: 10px;\n }\n #zee-launcher-unsupported-message-input {\n border: none;\n padding: 10px;\n border-radius: 0px;\n border-right: 1px solid #344B60;\n height: 40px;\n color: #ffffff;\n background-color: black;\n box-sizing: border-box;\n width: calc(100% - 65px);\n margin-left: 5px;\n }\n #zee-launcher-unsupported-message-button {\n background: none;\n border: none;\n outline: none;\n text-transform: uppercase;\n color: #ffffff;\n height: 40px;\n display: inline-block;\n width: 59px;\n }\n .zee-launcher-unsupported-message-before-copy {\n height: 100px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-top: 20px;\n }\n .zee-launcher-unsupported-message-copied .zee-launcher-unsupported-message-before-copy {\n display: none;\n }\n .zee-launcher-unsupported-message-after-copy {\n display: none;\n }\n .zee-launcher-unsupported-message-copied .zee-launcher-unsupported-message-after-copy {\n height: 100px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-top: 20px;\n }\n </style>\n <div class="zee-launcher-browser-logo"></div>\n <div class="zee-launcher-unsupported-message">Open with ${t} to access this content.</div>\n <div class="zee-launcher-unsupported-message-before-copy">\n <div class="zee-launcher-unsupported-message ">Tap below to copy the address for easy pasting into ${t}.</div>\n <div class="zee-launcher-unsupported-message-copy"><input id="zee-launcher-unsupported-message-input" type="text/"><button id="zee-launcher-unsupported-message-button">Copy</button></div>\n </div>\n <div class="zee-launcher-unsupported-message zee-launcher-unsupported-message-after-copy">COPIED! Now paste into ${t}'s address bar to experience the content.</div>\n `;let r=e.querySelector("#zee-launcher-unsupported-message-input")||document.createElement("input");r.value=window.location.href;let n=()=>{if(navigator.userAgent.match(/iPhone|iPod|iPad/i)){let e=document.createRange();e.selectNodeContents(r);let t=window.getSelection();if(!t)return;t.removeAllRanges(),t.addRange(e),r.setSelectionRange(0,999999999)}else r.select();document.execCommand("copy"),r.blur(),e.classList.toggle("zee-launcher-unsupported-message-copied",!0)};return(e.querySelector("#zee-launcher-unsupported-message-button")||document.createElement("button")).addEventListener("click",n),r.addEventListener("click",n),e}()),Object.assign(e.style,{position:"fixed",width:"100%",height:"100%",top:"0px",left:"0px",zIndex:1001,backgroundColor:"rgba(0, 0, 0, 0.9)",fontFamily:"sans-serif",color:"white",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}),e.classList.add("zee_launcher_compatibility"),document.body.append(e)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceSource=void 0;const n=r(0),i=r(13),a=r(8),o=r(2),s=r(1);let u=1,c=new Map;class f extends a.Source{constructor(e,t){super(),this._impl=e,this._pipeline=t,this._packetNumber=0,this._motionUpdatesQueued=0,this._motionUpdatesSent=0,this._minFrameGapMs=0,this._lastUpdateTime=0}static create(e){let t=u++;return c.set(t,new f(t,e)),n.zcout("sequence_source_source_t initialized"),t}static get(e){return c.get(e)}loadFromMemory(e){try{this._decoder=new i.SequenceDecoder(e),this._packetNumber=0,this._lastUpdateTime=0}catch(e){n.zcerr("Unable to decode sequence:",e)}}maxPlaybackFpsSet(e){this._minFrameGapMs=e<=0?0:1e3/e}getFrame(e){let t=o.Pipeline.get(this._pipeline);if(!t)return;if(!this._decoder)return;if(this._submitMotionUpdates(t),this._motionUpdatesQueued>this._motionUpdatesSent)return;if(e)return;let r=performance.now();if(r<this._lastUpdateTime+this._minFrameGapMs)return;if(this._packetNumber>=this._decoder.numberPackets)return;let n=this._decoder.dataByPacket.get(this._packetNumber);if(n.type!=i.SequenceRecorderPacketType.CAMERA_FRAME)return;this._packetNumber++;let a=t.cameraPixelArrays.pop();for(;a&&a.byteLength!==n.greyscale.byteLength;)a=t.cameraPixelArrays.pop();a||(a=new ArrayBuffer(n.greyscale.byteLength)),new Uint8Array(a).set(n.greyscale),this._lastUpdateTime=r;let u={data:a,cameraSourceData:n.greyscale,cameraModel:n.cameraModel,cameraToDevice:n.cameraToDevice,dataWidth:n.width,dataHeight:n.height,texture:void 0,userFacing:n.userFacing,uvTransform:s.mat4.create(),cameraSource:this};this._submitMotionUpdates(t);const c=t.registerToken(u);t.sendDataToWorker(u.data||new ArrayBuffer(0),c,u.dataWidth,u.dataHeight,u.userFacing,u.cameraToDevice,u.cameraModel)}destroy(){c.delete(this._impl),this.pause()}start(){var e;let t=o.Pipeline.get(this._pipeline);t&&t.currentCameraSource!==this&&(null===(e=t.currentCameraSource)||void 0===e||e.pause(),t.currentCameraSource=this)}pause(){let e=o.Pipeline.get(this._pipeline);e&&e.currentCameraSource===this&&(e.currentCameraSource=void 0)}uploadGL(e){let t=o.Pipeline.get(this._pipeline);if(!t)return;let r=null==t?void 0:t.glContext;r&&(e.texture||(e.texture=t.getVideoTexture()),e.texture&&e.cameraSourceData&&(r.bindTexture(r.TEXTURE_2D,e.texture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),r.texImage2D(r.TEXTURE_2D,0,r.LUMINANCE,e.dataWidth,e.dataHeight,0,r.LUMINANCE,r.UNSIGNED_BYTE,new Uint8Array(e.cameraSourceData)),r.bindTexture(r.TEXTURE_2D,null)))}_submitMotionUpdates(e){let t=!1;for(;this._packetNumber<this._decoder.numberPackets;){let r=this._decoder.dataByPacket.get(this._packetNumber);if(r.type==i.SequenceRecorderPacketType.CAMERA_FRAME)break;switch(r.type){case i.SequenceRecorderPacketType.ACCELEROMETER:e.motionAccelerometerSubmit(r.t,r.x,r.y,r.z),t=!0;break;case i.SequenceRecorderPacketType.ROTATION_RATE:e.motionRotationRateSubmit(r.t,r.x,r.y,r.z),t=!0;break;case i.SequenceRecorderPacketType.ATTITUDE:e.motionAttitudeSubmit(r.t,r.x,r.y,r.z),t=!0;break;case i.SequenceRecorderPacketType.ATTITUDE_MATRIX:e.motionAttitudeMatrix(r.attitude),t=!0}this._packetNumber++}t&&(this._motionUpdatesQueued++,setTimeout(()=>{this._motionUpdatesSent++},0))}}t.SequenceSource=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gfx=void 0,t.gfx='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="250" height="80.408" viewBox="0 0 250 80.408"><defs><filter id="a" x="0" y="1.182" width="250" height="79.226" filterUnits="userSpaceOnUse"><feOffset dy="3" input="SourceAlpha"/><feGaussianBlur stdDeviation="3" result="b"/><feFlood flood-opacity="0.161"/><feComposite operator="in" in2="b"/><feComposite in="SourceGraphic"/></filter><filter id="c" x="6.929" y="0" width="111.975" height="40.988" filterUnits="userSpaceOnUse"><feOffset dy="3" input="SourceAlpha"/><feGaussianBlur stdDeviation="3" result="d"/><feFlood flood-opacity="0.161"/><feComposite operator="in" in2="d"/><feComposite in="SourceGraphic"/></filter></defs><g transform="translate(-26.873 -414.029)"><g transform="translate(44 423.332)"><g transform="translate(0 0.635)" style="isolation:isolate"><g transform="translate(0 0)"><g transform="matrix(1, 0, 0, 1, -17.13, -9.94)" filter="url(#a)"><path d="M55.766,44.97V11.8h8.272v2.6h.089a8.258,8.258,0,0,1,7.046-3.357,11.4,11.4,0,0,1,8.5,3.686,12.667,12.667,0,0,1,3.278,8.622,12.509,12.509,0,0,1-3.25,8.57,11.353,11.353,0,0,1-8.429,3.6,9.533,9.533,0,0,1-7.229-2.95V43.378l-8.269,1.594h0Zm8-21.671a4.958,4.958,0,0,0,5.319,5.15A4.957,4.957,0,0,0,74.4,23.3a5.321,5.321,0,0,0-10.638,0ZM16.105,18.412H2.752V11.038H30.9L14.887,37.16H38.22L0,44.534ZM131.469,38.45a.761.761,0,0,1-.484-.166.582.582,0,0,1-.228-.419l-.553-3.586a12.243,12.243,0,0,1-1.782-.721l-2.789,2.084a.718.718,0,0,1-.5.176.688.688,0,0,1-.495-.214,25.864,25.864,0,0,1-3.264-3.274.754.754,0,0,1,.018-.9c.2-.277.543-.713,1.01-1.3.483-.6.832-1.05,1.068-1.374a9.614,9.614,0,0,1-.811-1.929l-3.62-.527a.631.631,0,0,1-.416-.243.728.728,0,0,1-.159-.458V21.283a.743.743,0,0,1,.159-.448.6.6,0,0,1,.376-.253l3.68-.546a9.511,9.511,0,0,1,.772-1.792c-.523-.733-1.235-1.638-2.117-2.69a.731.731,0,0,1-.2-.467.82.82,0,0,1,.178-.449,19.577,19.577,0,0,1,1.949-2.095c.953-.924,1.582-1.393,1.87-1.393a.861.861,0,0,1,.515.195l2.729,2.084a11.551,11.551,0,0,1,1.8-.741,31.446,31.446,0,0,1,.573-3.623.666.666,0,0,1,.712-.546h4.392a.757.757,0,0,1,.485.166.58.58,0,0,1,.228.419l.553,3.584a12.576,12.576,0,0,1,1.782.722l2.809-2.085a.641.641,0,0,1,.475-.176.776.776,0,0,1,.5.195,27.035,27.035,0,0,1,3.264,3.313.625.625,0,0,1,.139.429.742.742,0,0,1-.159.447c-.2.271-.525.7-1.008,1.3-.467.581-.827,1.043-1.069,1.373a11.8,11.8,0,0,1,.812,1.91l3.62.545a.626.626,0,0,1,.416.244.736.736,0,0,1,.158.457v4.325a.755.755,0,0,1-.158.449.6.6,0,0,1-.4.253l-3.66.545a12.692,12.692,0,0,1-.772,1.774c.465.653,1.177,1.559,2.117,2.688a.751.751,0,0,1,.2.488.648.648,0,0,1-.178.448,19.638,19.638,0,0,1-1.958,2.1c-.947.918-1.573,1.384-1.861,1.384a.976.976,0,0,1-.515-.176l-2.731-2.1a11.361,11.361,0,0,1-1.8.741,31.849,31.849,0,0,1-.573,3.625.668.668,0,0,1-.713.546Zm-1.385-18.491a4.935,4.935,0,0,0,0,7.053,5.12,5.12,0,0,0,7.163,0,4.931,4.931,0,0,0,0-7.053,5.117,5.117,0,0,0-7.163,0Zm69.969,14.868a18.523,18.523,0,0,1-4.932-2.073l1.705-6.1A13.441,13.441,0,0,0,200.779,29a12.14,12.14,0,0,0,4.344.818,4.644,4.644,0,0,0,2.351-.482,1.538,1.538,0,0,0,.806-1.4q0-1.5-3.25-2.242-1.061-.246-1.705-.425a12.335,12.335,0,0,1-5.358-2.589,5.5,5.5,0,0,1-1.671-4.157,6.323,6.323,0,0,1,2.547-5.267,10.993,10.993,0,0,1,6.9-1.972,21.351,21.351,0,0,1,4.552.5,25.439,25.439,0,0,1,4.736,1.557l-1.705,5.491a14.244,14.244,0,0,0-3.319-1.636,10.6,10.6,0,0,0-3.364-.561,4.227,4.227,0,0,0-2.121.426,1.357,1.357,0,0,0-.714,1.232q0,1.211,3.227,2.04.737.2,1.106.291,4.264,1.187,5.935,2.79a5.728,5.728,0,0,1,1.67,4.337A6.781,6.781,0,0,1,213,33.37a11.48,11.48,0,0,1-7.259,2.14A22.577,22.577,0,0,1,200.053,34.827ZM30.568,31.834a12.566,12.566,0,0,1-3.292-8.59,12.567,12.567,0,0,1,3.247-8.568,11.3,11.3,0,0,1,8.423-3.638,9.519,9.519,0,0,1,7.217,3V11.8h8.264V34.735H46.163V32.186h-.09c-1.32,2.071-3.951,3.308-7.038,3.308A11.412,11.412,0,0,1,30.568,31.834Zm5.245-8.545a4.95,4.95,0,0,0,5.312,5.141,4.95,4.95,0,0,0,5.312-5.141A5.023,5.023,0,0,0,41.125,18.1,5.023,5.023,0,0,0,35.813,23.289Zm69.2,11.554-3.527-10.452q-.282-.892-.505-1.8t-.412-1.8a30.821,30.821,0,0,1-.917,3.454l-.047.16L96.1,34.842H90.176l-9.925-23.1h8.632l3.552,10.223q.4,1.12.634,1.955t.377,1.635a23.558,23.558,0,0,1,.917-3.179q.093-.274.141-.411l3.528-10.223h5.056l3.5,10.2.07.183a20.724,20.724,0,0,1,.988,3.43q.141-.732.364-1.532t.647-2.058l3.574-10.223h8.678l-9.971,23.1Zm80.154-.092-8.587-9.841v9.841h-7.888V1.5L176.583,0V22.28l8.272-9.665h9.96L184.584,23.266l11.156,11.485Zm-35.09,0V11.782h8.272v3.761h.091a8.131,8.131,0,0,1,7.546-4.074h1.593V19.3a6.8,6.8,0,0,0-3.5-.761c-4.593,0-5.728,3-5.728,6.941v9.268Z" transform="translate(17.13 15.31)"/></g><g transform="matrix(1, 0, 0, 1, -17.13, -9.94)" filter="url(#c)"><path d="M3.576-12.852v-4.3H6.628a2.867,2.867,0,0,1,1.945.55A2.034,2.034,0,0,1,9.188-15a2.06,2.06,0,0,1-.615,1.608,2.784,2.784,0,0,1-1.945.542ZM2.017-18.464V-6.748H3.576v-4.792H7.153a3.569,3.569,0,0,0,2.683-.9A3.478,3.478,0,0,0,10.747-15a3.45,3.45,0,0,0-.911-2.552,3.638,3.638,0,0,0-2.683-.911Zm11.421,7.483a4.221,4.221,0,0,1,.205-1.37,2.957,2.957,0,0,1,.566-1.009,2.411,2.411,0,0,1,.845-.624A2.515,2.515,0,0,1,16.08-14.2a2.515,2.515,0,0,1,1.026.213,2.411,2.411,0,0,1,.845.624,2.957,2.957,0,0,1,.566,1.009,4.221,4.221,0,0,1,.205,1.37,4.221,4.221,0,0,1-.205,1.37,2.867,2.867,0,0,1-.566,1,2.457,2.457,0,0,1-.845.615,2.515,2.515,0,0,1-1.026.213,2.515,2.515,0,0,1-1.026-.213,2.457,2.457,0,0,1-.845-.615,2.867,2.867,0,0,1-.566-1A4.221,4.221,0,0,1,13.438-10.981Zm-1.477,0a5.573,5.573,0,0,0,.263,1.739,3.97,3.97,0,0,0,.788,1.4,3.623,3.623,0,0,0,1.3.935,4.4,4.4,0,0,0,1.772.336A4.381,4.381,0,0,0,17.86-6.9a3.641,3.641,0,0,0,1.288-.935,3.97,3.97,0,0,0,.788-1.4,5.573,5.573,0,0,0,.263-1.739,5.65,5.65,0,0,0-.263-1.748,3.96,3.96,0,0,0-.788-1.411,3.729,3.729,0,0,0-1.288-.944,4.29,4.29,0,0,0-1.78-.345,4.3,4.3,0,0,0-1.772.345,3.71,3.71,0,0,0-1.3.944,3.96,3.96,0,0,0-.788,1.411A5.65,5.65,0,0,0,11.961-10.981Zm18.28,4.234,2.708-8.484H31.5L29.6-8.29h-.033L27.8-15.231H26.27L24.564-8.29h-.033l-1.92-6.941H21.068l2.724,8.484H25.3l1.707-6.744h.033l1.723,6.744ZM40.169-11.8H35.3a2.905,2.905,0,0,1,.213-.927A2.473,2.473,0,0,1,36-13.492a2.255,2.255,0,0,1,.747-.517,2.429,2.429,0,0,1,.976-.189,2.386,2.386,0,0,1,.96.189,2.415,2.415,0,0,1,.755.509,2.391,2.391,0,0,1,.509.763A2.854,2.854,0,0,1,40.169-11.8Zm1.346,2.363H40.136a1.983,1.983,0,0,1-.747,1.247,2.414,2.414,0,0,1-1.452.41,2.889,2.889,0,0,1-1.2-.23,2.348,2.348,0,0,1-.837-.615,2.4,2.4,0,0,1-.476-.886,3.367,3.367,0,0,1-.131-1.058h6.35a6.754,6.754,0,0,0-.139-1.625,4.7,4.7,0,0,0-.624-1.575,3.716,3.716,0,0,0-1.2-1.19,3.48,3.48,0,0,0-1.879-.468,3.858,3.858,0,0,0-1.6.328,3.76,3.76,0,0,0-1.264.919,4.236,4.236,0,0,0-.829,1.395,5.105,5.105,0,0,0-.3,1.772,6.8,6.8,0,0,0,.287,1.789,3.9,3.9,0,0,0,.763,1.411,3.478,3.478,0,0,0,1.255.919,4.358,4.358,0,0,0,1.764.328,3.851,3.851,0,0,0,2.4-.722A3.39,3.39,0,0,0,41.515-9.439Zm1.526-5.793v8.484h1.395v-3.774a5.8,5.8,0,0,1,.164-1.452,2.784,2.784,0,0,1,.525-1.075,2.251,2.251,0,0,1,.952-.673,3.945,3.945,0,0,1,1.428-.23v-1.477a3.135,3.135,0,0,0-1.871.459,3.779,3.779,0,0,0-1.247,1.526h-.033v-1.789ZM54.15-11.8H49.276a2.905,2.905,0,0,1,.213-.927,2.473,2.473,0,0,1,.492-.763,2.255,2.255,0,0,1,.747-.517A2.429,2.429,0,0,1,51.7-14.2a2.386,2.386,0,0,1,.96.189,2.415,2.415,0,0,1,.755.509,2.391,2.391,0,0,1,.509.763A2.854,2.854,0,0,1,54.15-11.8ZM55.5-9.439H54.117a1.983,1.983,0,0,1-.747,1.247,2.414,2.414,0,0,1-1.452.41,2.889,2.889,0,0,1-1.2-.23,2.348,2.348,0,0,1-.837-.615,2.4,2.4,0,0,1-.476-.886,3.367,3.367,0,0,1-.131-1.058h6.35a6.754,6.754,0,0,0-.139-1.625,4.7,4.7,0,0,0-.624-1.575,3.716,3.716,0,0,0-1.2-1.19,3.48,3.48,0,0,0-1.879-.468,3.858,3.858,0,0,0-1.6.328,3.76,3.76,0,0,0-1.264.919,4.236,4.236,0,0,0-.829,1.395,5.1,5.1,0,0,0-.3,1.772,6.8,6.8,0,0,0,.287,1.789,3.9,3.9,0,0,0,.763,1.411,3.478,3.478,0,0,0,1.255.919,4.358,4.358,0,0,0,1.764.328,3.851,3.851,0,0,0,2.4-.722A3.39,3.39,0,0,0,55.5-9.439Zm2.593-1.477a5.581,5.581,0,0,1,.131-1.214,3.212,3.212,0,0,1,.427-1.05,2.221,2.221,0,0,1,.788-.738,2.4,2.4,0,0,1,1.2-.279,2.589,2.589,0,0,1,1.231.271,2.389,2.389,0,0,1,.829.714,2.985,2.985,0,0,1,.468,1.026,4.889,4.889,0,0,1,.148,1.206,4.919,4.919,0,0,1-.139,1.165,3.053,3.053,0,0,1-.451,1.026,2.4,2.4,0,0,1-.8.73,2.4,2.4,0,0,1-1.2.279,2.491,2.491,0,0,1-1.173-.263,2.332,2.332,0,0,1-.82-.706,3.122,3.122,0,0,1-.476-1.009A4.338,4.338,0,0,1,58.088-10.916Zm6.564,4.168V-18.464H63.257V-14.1h-.033a2.247,2.247,0,0,0-.566-.632,3.216,3.216,0,0,0-.714-.41,3.583,3.583,0,0,0-.755-.222,4.132,4.132,0,0,0-.706-.066,3.861,3.861,0,0,0-1.7.353,3.487,3.487,0,0,0-1.214.952,4.018,4.018,0,0,0-.722,1.4,5.985,5.985,0,0,0-.238,1.707,5.8,5.8,0,0,0,.246,1.707,4.218,4.218,0,0,0,.73,1.411,3.529,3.529,0,0,0,1.214.968,3.827,3.827,0,0,0,1.715.361,4.135,4.135,0,0,0,1.625-.312A2.053,2.053,0,0,0,63.224-7.9h.033v1.149Zm6.761-11.716V-6.748h1.395V-7.88h.033a2.247,2.247,0,0,0,.566.632,2.982,2.982,0,0,0,.714.4,3.874,3.874,0,0,0,.763.213,4.193,4.193,0,0,0,.7.066,3.94,3.94,0,0,0,1.7-.345,3.4,3.4,0,0,0,1.214-.944,4.018,4.018,0,0,0,.722-1.4,5.985,5.985,0,0,0,.238-1.707,5.8,5.8,0,0,0-.246-1.707,4.312,4.312,0,0,0-.73-1.419,3.488,3.488,0,0,0-1.214-.976,3.827,3.827,0,0,0-1.715-.361,4.043,4.043,0,0,0-1.625.32,2.088,2.088,0,0,0-1.083,1.026h-.033v-4.381Zm6.564,7.4a5.581,5.581,0,0,1-.131,1.214,3.212,3.212,0,0,1-.427,1.05,2.243,2.243,0,0,1-.779.738,2.385,2.385,0,0,1-1.206.279A2.589,2.589,0,0,1,74.2-8.052a2.389,2.389,0,0,1-.829-.714,2.985,2.985,0,0,1-.468-1.026A4.889,4.889,0,0,1,72.758-11a4.919,4.919,0,0,1,.139-1.165,3.053,3.053,0,0,1,.451-1.026,2.4,2.4,0,0,1,.8-.73,2.4,2.4,0,0,1,1.2-.279,2.491,2.491,0,0,1,1.173.263,2.332,2.332,0,0,1,.82.706,3.122,3.122,0,0,1,.476,1.009A4.338,4.338,0,0,1,77.976-11.063Zm6.449,5.448a8.871,8.871,0,0,1-.484,1.05,2.871,2.871,0,0,1-.525.7,1.782,1.782,0,0,1-.64.394,2.462,2.462,0,0,1-.812.123,3.721,3.721,0,0,1-.492-.033A2.324,2.324,0,0,1,81-3.5v-1.28a2.342,2.342,0,0,0,.418.139,1.765,1.765,0,0,0,.4.057,1.2,1.2,0,0,0,.714-.205,1.255,1.255,0,0,0,.435-.583L83.539-6.8l-3.364-8.434h1.575L84.228-8.29h.033l2.379-6.941h1.477Z" transform="translate(17.85 28.4)"/></g></g></g><g transform="translate(0 0)"><g transform="translate(0 5.371)"><path d="M11.76,24.456A11.41,11.41,0,0,1,3.292,20.8,12.564,12.564,0,0,1,0,12.206,12.569,12.569,0,0,1,3.246,3.638,11.307,11.307,0,0,1,11.67,0a9.519,9.519,0,0,1,7.217,3V.759h8.264V23.7H18.887V21.148H18.8C17.478,23.219,14.846,24.456,11.76,24.456ZM13.849,7.064A5.023,5.023,0,0,0,8.537,12.25a4.95,4.95,0,0,0,5.312,5.141A4.95,4.95,0,0,0,19.16,12.25,5.023,5.023,0,0,0,13.849,7.064Z" transform="translate(27.277 11.038)" fill="#fff"/><path d="M0,33.931V.758H8.271v2.6H8.36A8.258,8.258,0,0,1,15.406,0,11.4,11.4,0,0,1,23.9,3.686a12.665,12.665,0,0,1,3.278,8.622,12.508,12.508,0,0,1-3.25,8.57,11.351,11.351,0,0,1-8.429,3.6,9.535,9.535,0,0,1-7.229-2.95V32.337L0,33.931ZM13.317,7.07A5.028,5.028,0,0,0,8,12.259a4.957,4.957,0,0,0,5.319,5.15,4.957,4.957,0,0,0,5.319-5.15A5.028,5.028,0,0,0,13.317,7.07Z" transform="translate(55.766 11.041)" fill="#fff"/><path d="M22.836,0l3.5,10.2.07.183a20.748,20.748,0,0,1,.988,3.43q.141-.731.364-1.532t.647-2.058L31.985,0h8.678L30.691,23.1H24.764L21.237,12.647q-.282-.891-.505-1.8t-.412-1.8A30.927,30.927,0,0,1,19.4,12.51l-.047.16L15.851,23.1H9.925L0,0H8.631l3.552,10.223q.4,1.121.635,1.955t.377,1.635a23.522,23.522,0,0,1,.917-3.179q.093-.274.141-.411L17.78,0h5.056" transform="translate(80.251 11.743)" fill="#fff"/><path d="M0,34.75V1.5L7.888,0V22.28l8.272-9.665H26.12L15.889,23.266,27.045,34.75H16.475L7.888,24.91v9.84H0" transform="translate(168.695 0)" fill="#fff"/><path d="M0,21.47l1.705-6.1a13.453,13.453,0,0,0,3.952,2.342A12.145,12.145,0,0,0,10,18.534a4.643,4.643,0,0,0,2.351-.482,1.539,1.539,0,0,0,.807-1.4q0-1.5-3.25-2.241-1.06-.246-1.705-.426A12.325,12.325,0,0,1,2.846,11.4,5.5,5.5,0,0,1,1.176,7.239,6.324,6.324,0,0,1,3.722,1.972,11,11,0,0,1,10.624,0a21.365,21.365,0,0,1,4.551.5,25.45,25.45,0,0,1,4.736,1.558l-1.706,5.49a14.24,14.24,0,0,0-3.319-1.636,10.6,10.6,0,0,0-3.364-.56A4.22,4.22,0,0,0,9.4,5.782a1.356,1.356,0,0,0-.714,1.233q0,1.211,3.227,2.04.737.2,1.106.291,4.264,1.188,5.935,2.79a5.728,5.728,0,0,1,1.671,4.337,6.782,6.782,0,0,1-2.743,5.614,11.478,11.478,0,0,1-7.259,2.14,22.565,22.565,0,0,1-5.693-.683A18.517,18.517,0,0,1,0,21.47" transform="translate(195.121 11.284)" fill="#fff"/><path d="M8.273,4.075h.091A8.13,8.13,0,0,1,15.909,0H17.5V7.834A6.8,6.8,0,0,0,14,7.074c-4.593,0-5.728,3-5.728,6.941v9.268H0V.313H8.273V4.075" transform="translate(150.08 11.469)" fill="#fff"/><path d="M17.392,29.929H13a.76.76,0,0,1-.485-.166.579.579,0,0,1-.227-.419l-.553-3.586a12.3,12.3,0,0,1-1.781-.721L7.163,27.123a.719.719,0,0,1-.495.176.687.687,0,0,1-.495-.214A25.873,25.873,0,0,1,2.91,23.81a.753.753,0,0,1,.019-.9c.2-.277.542-.713,1.009-1.3.483-.6.832-1.05,1.068-1.374a9.591,9.591,0,0,1-.811-1.929l-3.62-.526a.63.63,0,0,1-.416-.243A.729.729,0,0,1,0,17.089V12.762a.746.746,0,0,1,.159-.448.6.6,0,0,1,.376-.253l3.68-.546a9.5,9.5,0,0,1,.772-1.792C4.464,8.991,3.752,8.085,2.87,7.034a.732.732,0,0,1-.2-.468.82.82,0,0,1,.179-.449A19.622,19.622,0,0,1,4.8,4.023C5.751,3.1,6.38,2.631,6.668,2.631a.859.859,0,0,1,.515.194L9.913,4.91a11.536,11.536,0,0,1,1.8-.741A31.372,31.372,0,0,1,12.287.546.665.665,0,0,1,13,0h4.392a.755.755,0,0,1,.485.166.581.581,0,0,1,.229.419l.553,3.584a12.543,12.543,0,0,1,1.781.722L23.25,2.807a.641.641,0,0,1,.475-.176.775.775,0,0,1,.495.194,27.092,27.092,0,0,1,3.264,3.313.625.625,0,0,1,.139.429.745.745,0,0,1-.159.448c-.2.271-.525.695-1.008,1.3-.467.581-.827,1.043-1.069,1.373a11.784,11.784,0,0,1,.812,1.91l3.62.545a.625.625,0,0,1,.416.244.736.736,0,0,1,.157.458v4.325a.754.754,0,0,1-.157.449.606.606,0,0,1-.4.253l-3.66.545a12.628,12.628,0,0,1-.772,1.774c.465.654,1.177,1.559,2.117,2.688a.752.752,0,0,1,.2.488.648.648,0,0,1-.177.448,19.641,19.641,0,0,1-1.959,2.1c-.947.918-1.573,1.384-1.86,1.384a.978.978,0,0,1-.515-.176l-2.731-2.1a11.429,11.429,0,0,1-1.8.741,32.016,32.016,0,0,1-.573,3.624A.668.668,0,0,1,17.392,29.929ZM15.2,9.976a4.938,4.938,0,0,0-3.582,1.463,4.935,4.935,0,0,0,0,7.053,5.12,5.12,0,0,0,7.163,0,4.932,4.932,0,0,0,0-7.053A4.938,4.938,0,0,0,15.2,9.976Z" transform="translate(118.47 8.521)" fill="#fff"/><path d="M0,33.5,16.106,7.374H2.752V0H30.9L14.887,26.122H38.22L0,33.5" transform="translate(0 11.038)" fill="#fff"/></g><path d="M3.576-12.852v-4.3H6.628a2.867,2.867,0,0,1,1.945.55A2.034,2.034,0,0,1,9.188-15a2.06,2.06,0,0,1-.615,1.608,2.784,2.784,0,0,1-1.945.542ZM2.017-18.464V-6.748H3.576v-4.792H7.153a3.569,3.569,0,0,0,2.683-.9A3.478,3.478,0,0,0,10.747-15a3.45,3.45,0,0,0-.911-2.552,3.638,3.638,0,0,0-2.683-.911Zm11.421,7.483a4.221,4.221,0,0,1,.205-1.37,2.957,2.957,0,0,1,.566-1.009,2.411,2.411,0,0,1,.845-.624A2.515,2.515,0,0,1,16.08-14.2a2.515,2.515,0,0,1,1.026.213,2.411,2.411,0,0,1,.845.624,2.957,2.957,0,0,1,.566,1.009,4.221,4.221,0,0,1,.205,1.37,4.221,4.221,0,0,1-.205,1.37,2.867,2.867,0,0,1-.566,1,2.457,2.457,0,0,1-.845.615,2.515,2.515,0,0,1-1.026.213,2.515,2.515,0,0,1-1.026-.213,2.457,2.457,0,0,1-.845-.615,2.867,2.867,0,0,1-.566-1A4.221,4.221,0,0,1,13.438-10.981Zm-1.477,0a5.573,5.573,0,0,0,.263,1.739,3.97,3.97,0,0,0,.788,1.4,3.623,3.623,0,0,0,1.3.935,4.4,4.4,0,0,0,1.772.336A4.381,4.381,0,0,0,17.86-6.9a3.641,3.641,0,0,0,1.288-.935,3.97,3.97,0,0,0,.788-1.4,5.573,5.573,0,0,0,.263-1.739,5.65,5.65,0,0,0-.263-1.748,3.96,3.96,0,0,0-.788-1.411,3.729,3.729,0,0,0-1.288-.944,4.29,4.29,0,0,0-1.78-.345,4.3,4.3,0,0,0-1.772.345,3.71,3.71,0,0,0-1.3.944,3.96,3.96,0,0,0-.788,1.411A5.65,5.65,0,0,0,11.961-10.981Zm18.28,4.234,2.708-8.484H31.5L29.6-8.29h-.033L27.8-15.231H26.27L24.564-8.29h-.033l-1.92-6.941H21.068l2.724,8.484H25.3l1.707-6.744h.033l1.723,6.744ZM40.169-11.8H35.3a2.905,2.905,0,0,1,.213-.927A2.473,2.473,0,0,1,36-13.492a2.255,2.255,0,0,1,.747-.517,2.429,2.429,0,0,1,.976-.189,2.386,2.386,0,0,1,.96.189,2.415,2.415,0,0,1,.755.509,2.391,2.391,0,0,1,.509.763A2.854,2.854,0,0,1,40.169-11.8Zm1.346,2.363H40.136a1.983,1.983,0,0,1-.747,1.247,2.414,2.414,0,0,1-1.452.41,2.889,2.889,0,0,1-1.2-.23,2.348,2.348,0,0,1-.837-.615,2.4,2.4,0,0,1-.476-.886,3.367,3.367,0,0,1-.131-1.058h6.35a6.754,6.754,0,0,0-.139-1.625,4.7,4.7,0,0,0-.624-1.575,3.716,3.716,0,0,0-1.2-1.19,3.48,3.48,0,0,0-1.879-.468,3.858,3.858,0,0,0-1.6.328,3.76,3.76,0,0,0-1.264.919,4.236,4.236,0,0,0-.829,1.395,5.105,5.105,0,0,0-.3,1.772,6.8,6.8,0,0,0,.287,1.789,3.9,3.9,0,0,0,.763,1.411,3.478,3.478,0,0,0,1.255.919,4.358,4.358,0,0,0,1.764.328,3.851,3.851,0,0,0,2.4-.722A3.39,3.39,0,0,0,41.515-9.439Zm1.526-5.793v8.484h1.395v-3.774a5.8,5.8,0,0,1,.164-1.452,2.784,2.784,0,0,1,.525-1.075,2.251,2.251,0,0,1,.952-.673,3.945,3.945,0,0,1,1.428-.23v-1.477a3.135,3.135,0,0,0-1.871.459,3.779,3.779,0,0,0-1.247,1.526h-.033v-1.789ZM54.15-11.8H49.276a2.905,2.905,0,0,1,.213-.927,2.473,2.473,0,0,1,.492-.763,2.255,2.255,0,0,1,.747-.517A2.429,2.429,0,0,1,51.7-14.2a2.386,2.386,0,0,1,.96.189,2.415,2.415,0,0,1,.755.509,2.391,2.391,0,0,1,.509.763A2.854,2.854,0,0,1,54.15-11.8ZM55.5-9.439H54.117a1.983,1.983,0,0,1-.747,1.247,2.414,2.414,0,0,1-1.452.41,2.889,2.889,0,0,1-1.2-.23,2.348,2.348,0,0,1-.837-.615,2.4,2.4,0,0,1-.476-.886,3.367,3.367,0,0,1-.131-1.058h6.35a6.754,6.754,0,0,0-.139-1.625,4.7,4.7,0,0,0-.624-1.575,3.716,3.716,0,0,0-1.2-1.19,3.48,3.48,0,0,0-1.879-.468,3.858,3.858,0,0,0-1.6.328,3.76,3.76,0,0,0-1.264.919,4.236,4.236,0,0,0-.829,1.395,5.1,5.1,0,0,0-.3,1.772,6.8,6.8,0,0,0,.287,1.789,3.9,3.9,0,0,0,.763,1.411,3.478,3.478,0,0,0,1.255.919,4.358,4.358,0,0,0,1.764.328,3.851,3.851,0,0,0,2.4-.722A3.39,3.39,0,0,0,55.5-9.439Zm2.593-1.477a5.581,5.581,0,0,1,.131-1.214,3.212,3.212,0,0,1,.427-1.05,2.221,2.221,0,0,1,.788-.738,2.4,2.4,0,0,1,1.2-.279,2.589,2.589,0,0,1,1.231.271,2.389,2.389,0,0,1,.829.714,2.985,2.985,0,0,1,.468,1.026,4.889,4.889,0,0,1,.148,1.206,4.919,4.919,0,0,1-.139,1.165,3.053,3.053,0,0,1-.451,1.026,2.4,2.4,0,0,1-.8.73,2.4,2.4,0,0,1-1.2.279,2.491,2.491,0,0,1-1.173-.263,2.332,2.332,0,0,1-.82-.706,3.122,3.122,0,0,1-.476-1.009A4.338,4.338,0,0,1,58.088-10.916Zm6.564,4.168V-18.464H63.257V-14.1h-.033a2.247,2.247,0,0,0-.566-.632,3.216,3.216,0,0,0-.714-.41,3.583,3.583,0,0,0-.755-.222,4.132,4.132,0,0,0-.706-.066,3.861,3.861,0,0,0-1.7.353,3.487,3.487,0,0,0-1.214.952,4.018,4.018,0,0,0-.722,1.4,5.985,5.985,0,0,0-.238,1.707,5.8,5.8,0,0,0,.246,1.707,4.218,4.218,0,0,0,.73,1.411,3.529,3.529,0,0,0,1.214.968,3.827,3.827,0,0,0,1.715.361,4.135,4.135,0,0,0,1.625-.312A2.053,2.053,0,0,0,63.224-7.9h.033v1.149Zm6.761-11.716V-6.748h1.395V-7.88h.033a2.247,2.247,0,0,0,.566.632,2.982,2.982,0,0,0,.714.4,3.874,3.874,0,0,0,.763.213,4.193,4.193,0,0,0,.7.066,3.94,3.94,0,0,0,1.7-.345,3.4,3.4,0,0,0,1.214-.944,4.018,4.018,0,0,0,.722-1.4,5.985,5.985,0,0,0,.238-1.707,5.8,5.8,0,0,0-.246-1.707,4.312,4.312,0,0,0-.73-1.419,3.488,3.488,0,0,0-1.214-.976,3.827,3.827,0,0,0-1.715-.361,4.043,4.043,0,0,0-1.625.32,2.088,2.088,0,0,0-1.083,1.026h-.033v-4.381Zm6.564,7.4a5.581,5.581,0,0,1-.131,1.214,3.212,3.212,0,0,1-.427,1.05,2.243,2.243,0,0,1-.779.738,2.385,2.385,0,0,1-1.206.279A2.589,2.589,0,0,1,74.2-8.052a2.389,2.389,0,0,1-.829-.714,2.985,2.985,0,0,1-.468-1.026A4.889,4.889,0,0,1,72.758-11a4.919,4.919,0,0,1,.139-1.165,3.053,3.053,0,0,1,.451-1.026,2.4,2.4,0,0,1,.8-.73,2.4,2.4,0,0,1,1.2-.279,2.491,2.491,0,0,1,1.173.263,2.332,2.332,0,0,1,.82.706,3.122,3.122,0,0,1,.476,1.009A4.338,4.338,0,0,1,77.976-11.063Zm6.449,5.448a8.871,8.871,0,0,1-.484,1.05,2.871,2.871,0,0,1-.525.7,1.782,1.782,0,0,1-.64.394,2.462,2.462,0,0,1-.812.123,3.721,3.721,0,0,1-.492-.033A2.324,2.324,0,0,1,81-3.5v-1.28a2.342,2.342,0,0,0,.418.139,1.765,1.765,0,0,0,.4.057,1.2,1.2,0,0,0,.714-.205,1.255,1.255,0,0,0,.435-.583L83.539-6.8l-3.364-8.434h1.575L84.228-8.29h.033l2.379-6.941h1.477Z" transform="translate(0.722 18.464)" fill="#fff"/></g></g></g></svg>'},function(e,t,r){"use strict";r.r(t),t.default=r.p+"f7b62a3a53b5c9b3222ba8dc53cb8b11.zbin"},function(e,t,r){"use strict";r.r(t),t.default=r.p+"482727c0e7dd40d73f5aae47f238ad61.zbin"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="0.4.0-beta.9"}])}));