diff --git "a/face-canvas.js" "b/face-canvas.js" --- "a/face-canvas.js" +++ "b/face-canvas.js" @@ -1,7 +1,7 @@ -(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const v of document.querySelectorAll('link[rel="modulepreload"]'))_(v);new MutationObserver(v=>{for(const O of v)if(O.type==="childList")for(const S of O.addedNodes)S.tagName==="LINK"&&S.rel==="modulepreload"&&_(S)}).observe(document,{childList:!0,subtree:!0});function d(v){const O={};return v.integrity&&(O.integrity=v.integrity),v.referrerPolicy&&(O.referrerPolicy=v.referrerPolicy),v.crossOrigin==="use-credentials"?O.credentials="include":v.crossOrigin==="anonymous"?O.credentials="omit":O.credentials="same-origin",O}function _(v){if(v.ep)return;v.ep=!0;const O=d(v);fetch(v.href,O)}})();const Bn=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.absolute{position:absolute}.relative{position:relative}.bottom-1{bottom:.25rem}.left-1{left:.25rem}.z-10{z-index:10}.inline{display:inline}.flex{display:flex}.hidden{display:none}.w-32{width:8rem}.w-full{width:100%}.items-end{align-items:flex-end}.rounded-lg{border-radius:.5rem}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.font-bold{font-weight:700}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb;--tw-content: ""}:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;margin:0;line-height:inherit} -`;function zt(){}function rn(i){return i()}function en(){return Object.create(null)}function ae(i){i.forEach(rn)}function on(i){return typeof i=="function"}function $n(i,u){return i!=i?u==u:i!==u||i&&typeof i=="object"||typeof i=="function"}function Vn(i){return Object.keys(i).length===0}function Et(i,u){i.appendChild(u)}function zn(i,u,d){const _=Wn(i);if(!_.getElementById(u)){const v=Mt("style");v.id=u,v.textContent=d,Yn(_,v)}}function Wn(i){if(!i)return document;const u=i.getRootNode?i.getRootNode():i.ownerDocument;return u&&u.host?u:i.ownerDocument}function Yn(i,u){return Et(i.head||i,u),u.sheet}function Xn(i,u,d){i.insertBefore(u,d||null)}function sn(i){i.parentNode&&i.parentNode.removeChild(i)}function Mt(i){return document.createElement(i)}function Hn(i){return document.createTextNode(i)}function ve(){return Hn(" ")}function Dn(i,u,d,_){return i.addEventListener(u,d,_),()=>i.removeEventListener(u,d,_)}function vt(i,u,d){d==null?i.removeAttribute(u):i.getAttribute(u)!==d&&i.setAttribute(u,d)}function Jn(i){return Array.from(i.childNodes)}let Qt;function Kt(i){Qt=i}function Kn(){if(!Qt)throw new Error("Function called outside component initialization");return Qt}function Zn(i){Kn().$$.on_mount.push(i)}const Vt=[],Zt=[];let Wt=[];const nn=[],Qn=Promise.resolve();let we=!1;function qn(){we||(we=!0,Qn.then(an))}function me(i){Wt.push(i)}const ye=new Set;let $t=0;function an(){if($t!==0)return;const i=Qt;do{try{for(;$ti.indexOf(_)===-1?u.push(_):d.push(_)),d.forEach(_=>_()),Wt=u}const n1=new Set;function r1(i,u){i&&i.i&&(n1.delete(i),i.i(u))}function i1(i,u,d,_){const{fragment:v,after_update:O}=i.$$;v&&v.m(u,d),_||me(()=>{const S=i.$$.on_mount.map(rn).filter(on);i.$$.on_destroy?i.$$.on_destroy.push(...S):ae(S),i.$$.on_mount=[]}),O.forEach(me)}function o1(i,u){const d=i.$$;d.fragment!==null&&(e1(d.after_update),ae(d.on_destroy),d.fragment&&d.fragment.d(u),d.on_destroy=d.fragment=null,d.ctx=[])}function s1(i,u){i.$$.dirty[0]===-1&&(Vt.push(i),qn(),i.$$.dirty.fill(0)),i.$$.dirty[u/31|0]|=1<{const at=q.length?q[0]:Q;return j.ctx&&v(j.ctx[K],j.ctx[K]=at)&&(!j.skip_bound&&j.bound[K]&&j.bound[K](at),U&&s1(i,K)),Q}):[],j.update(),U=!0,ae(j.before_update),j.fragment=_?_(j.ctx):!1,u.target){if(u.hydrate){const K=Jn(u.target);j.fragment&&j.fragment.l(K),K.forEach(sn)}else j.fragment&&j.fragment.c();u.intro&&r1(i.$$.fragment),i1(i,u.target,u.anchor,u.customElement),an()}Kt(L)}class u1{$destroy(){o1(this,1),this.$destroy=zt}$on(u,d){if(!on(d))return zt;const _=this.$$.callbacks[u]||(this.$$.callbacks[u]=[]);return _.push(d),()=>{const v=_.indexOf(d);v!==-1&&_.splice(v,1)}}$set(u){this.$$set&&!Vn(u)&&(this.$$.skip_bound=!0,this.$$set(u),this.$$.skip_bound=!1)}}var Yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l1={};(function(){var i;function u(t){var e=0;return function(){return e>>0)+"_",o=0;return e}),O("Symbol.iterator",function(t){if(t)return t;t=Symbol("Symbol.iterator");for(var e="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n"u"?!0:(typeof s=="function"?s=new s("unhandledrejection",{cancelable:!0}):typeof c=="function"?s=new c("unhandledrejection",{cancelable:!0}):(s=v.document.createEvent("CustomEvent"),s.initCustomEvent("unhandledrejection",!1,!0,s)),s.promise=this,s.reason=this.i,h(s))},e.prototype.A=function(){if(this.g!=null){for(var s=0;sn&&(n=Math.max(n+o,0));n"u"||n.execScript("var "+t[0]);for(var r;t.length&&(r=t.shift());)t.length||e===void 0?n[r]&&n[r]!==Object.prototype[r]?n=n[r]:n=n[r]={}:n[r]=e}function z(t,e){return e=String.fromCharCode.apply(null,e),t==null?e:t+e}var rt,g=typeof TextDecoder<"u",m,$=typeof TextEncoder<"u";function J(t){if($)t=(m||(m=new TextEncoder)).encode(t);else{var e=void 0;e=e===void 0?!1:e;for(var n=0,r=new Uint8Array(3*t.length),o=0;ol)r[n++]=l;else{if(2048>l)r[n++]=l>>6|192;else{if(55296<=l&&57343>=l){if(56319>=l&&o=s){l=1024*(l-55296)+s-56320+65536,r[n++]=l>>18|240,r[n++]=l>>12&63|128,r[n++]=l>>6&63|128,r[n++]=l&63|128;continue}else o--}if(e)throw Error("Found an unpaired surrogate");l=65533}r[n++]=l>>12|224,r[n++]=l>>6&63|128}r[n++]=l&63|128}}t=r.subarray(0,n)}return t}var st={},wt=null;function ht(t,e){e===void 0&&(e=0),Pt(),e=st[e];for(var n=Array(Math.floor(t.length/3)),r=e[64]||"",o=0,l=0;o>2];s=e[(s&3)<<4|c>>4],c=e[(c&15)<<2|h>>6],h=e[h&63],n[l++]=p+s+c+h}switch(p=0,h=r,t.length-o){case 2:p=t[o+1],h=e[(p&15)<<2]||r;case 1:t=t[o],n[l]=e[t>>2]+e[(t&3)<<4|p>>4]+h+r}return n.join("")}function mt(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):"=.".indexOf(t[e-1])!=-1&&(n="=.".indexOf(t[e-2])!=-1?n-2:n-1);var r=new Uint8Array(n),o=0;return Xt(t,function(l){r[o++]=l}),r.subarray(0,o)}function Xt(t,e){function n(h){for(;r>4),s!=64&&(e(l<<4&240|s>>2),c!=64&&e(s<<6&192|c))}}function Pt(){if(!wt){wt={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));st[n]=r;for(var o=0;oo&&128<=e;o++)e=t.h[t.g++],n|=(e&127)<<7*o;if(128<=e&&(e=t.h[t.g++],n|=(e&127)<<28,r|=(e&127)>>4),128<=e)for(o=0;5>o&&128<=e;o++)e=t.h[t.g++],r|=(e&127)<<7*o+3;if(128>e)return t=n>>>0,e=r>>>0,(r=e&2147483648)&&(t=~t+1>>>0,e=~e>>>0,t==0&&(e=e+1>>>0)),t=4294967296*e+(t>>>0),r?-t:t;t.m=!0}Nt.prototype.i=function(){var t=this.h,e=t[this.g],n=e&127;return 128>e?(this.g+=1,n):(e=t[this.g+1],n|=(e&127)<<7,128>e?(this.g+=2,n):(e=t[this.g+2],n|=(e&127)<<14,128>e?(this.g+=3,n):(e=t[this.g+3],n|=(e&127)<<21,128>e?(this.g+=4,n):(e=t[this.g+4],n|=(e&15)<<28,128>e?(this.g+=5,n>>>0):(this.g+=5,128<=t[this.g++]&&128<=t[this.g++]&&128<=t[this.g++]&&128<=t[this.g++]&&this.g++,n)))))},Nt.prototype.o=function(){var t=this.h[this.g],e=this.h[this.g+1],n=this.h[this.g+2],r=this.h[this.g+3];return this.g+=4,n=(t<<0|e<<8|n<<16|r<<24)>>>0,t=2*(n>>31)+1,e=n>>>23&255,n&=8388607,e==255?n?NaN:1/0*t:e==0?t*Math.pow(2,-149)*n:t*Math.pow(2,e-150)*(n+Math.pow(2,23))};var Te=[];function te(){this.g=new Uint8Array(64),this.h=0}te.prototype.push=function(t){if(!(this.h+1>>=7;t.push(e)}function Ht(t){var e={},n=e.N===void 0?!1:e.N;this.o={v:e.v===void 0?!1:e.v},this.N=n,e=this.o,Te.length?(n=Te.pop(),e&&(n.v=e.v),t&&Se(n,t),t=n):t=new Nt(t,e),this.g=t,this.m=this.g.g,this.h=this.i=this.l=-1,this.j=!1}Ht.prototype.reset=function(){this.g.reset(),this.h=this.l=-1};function _t(t){var e=t.g;if((e=e.g==e.j)||(e=t.j)||(e=t.g,e=e.m||0>e.g||e.g>e.j),e)return!1;t.m=t.g.g,e=t.g.i();var n=e&7;return n!=0&&n!=5&&n!=1&&n!=2&&n!=3&&n!=4?(t.j=!0,!1):(t.i=e,t.l=e>>>3,t.h=n,!0)}function It(t){switch(t.h){case 0:if(t.h!=0)It(t);else{for(t=t.g;t.h[t.g]&128;)t.g++;t.g++}break;case 1:t.h!=1?It(t):(t=t.g,t.g+=8);break;case 2:if(t.h!=2)It(t);else{var e=t.g.i();t=t.g,t.g+=e}break;case 5:t.h!=5?It(t):(t=t.g,t.g+=4);break;case 3:e=t.l;do{if(!_t(t)){t.j=!0;break}if(t.h==4){t.l!=e&&(t.j=!0);break}It(t)}while(1);break;default:t.j=!0}}function ee(t,e,n){var r=t.g.j,o=t.g.i(),l=t.g.g+o;if(t.g.j=l,n(e,t),n=l-t.g.g,n!==0)throw Error("Message parsing ended unexpectedly. Expected to read "+o+" bytes, instead read "+(o-n)+" bytes, either the data ended unexpectedly or the message misreported its own length");return t.g.g=l,t.g.j=r,e}function ct(t){return t.g.o()}function Re(t){var e=t.g.i();t=t.g;var n=t.g;t.g+=e,t=t.h;var r;if(g)(r=rt)||(r=rt=new TextDecoder("utf-8",{fatal:!1})),r=r.decode(t.subarray(n,n+e));else{e=n+e;for(var o=[],l=null,s,c,h;ns?o.push(s):224>s?n>=e?o.push(65533):(c=t[n++],194>s||(c&192)!==128?(n--,o.push(65533)):o.push((s&31)<<6|c&63)):240>s?n>=e-1?o.push(65533):(c=t[n++],(c&192)!==128||s===224&&160>c||s===237&&160<=c||((r=t[n++])&192)!==128?(n--,o.push(65533)):o.push((s&15)<<12|(c&63)<<6|r&63)):244>=s?n>=e-2?o.push(65533):(c=t[n++],(c&192)!==128||(s<<28)+(c-144)>>30||((r=t[n++])&192)!==128||((h=t[n++])&192)!==128?(n--,o.push(65533)):(s=(s&7)<<18|(c&63)<<12|(r&63)<<6|h&63,s-=65536,o.push((s>>10&1023)+55296,(s&1023)+56320))):o.push(65533),8192<=o.length&&(l=z(l,o),o.length=0);r=z(l,o)}return r}function Fe(t,e,n){var r=t.g.i();for(r=t.g.g+r;t.g.gr?1:0)?-r:r,r===0?0<1/r?bt=xt=0:(xt=0,bt=2147483648):isNaN(r)?(xt=0,bt=2147483647):34028234663852886e22>>0):11754943508222875e-54>r?(r=Math.round(r/Math.pow(2,-149)),xt=0,bt=(n<<31|r)>>>0):(e=Math.floor(Math.log(r)/Math.LN2),r*=Math.pow(2,-e),r=Math.round(8388608*r),16777216<=r&&++e,xt=0,bt=(n<<31|e+127<<23|r&8388607)>>>0),n=bt,t.push(n>>>0&255),t.push(n>>>8&255),t.push(n>>>16&255),t.push(n>>>24&255)}}var Me=typeof Uint8Array=="function";function Ce(t,e,n){if(t!=null)return typeof t=="object"?Me&&t instanceof Uint8Array?n(t):Pe(t,e,n):e(t)}function Pe(t,e,n){if(Array.isArray(t)){for(var r=Array(t.length),o=0;o=t.l?t.i?t.i[e]:void 0:t.h[e+t.j]}function re(t,e){var n=n===void 0?!1:n,r=X(t,e,n);return r==null&&(r=ne),r===ne&&(r=Dt([]),M(t,e,r,n)),r}function Ue(t){var e=re(t,3);if(t.m||(t.m={}),!t.m[3]){for(var n=0;n=t.l?(Ie(t),t.i[e]=n):t.h[e+t.j]=n}function Ge(t,e,n){if(n===-1)return null;if(t.g||(t.g={}),!t.g[n]){var r=X(t,n,!1);r&&(t.g[n]=new e(r))}return t.g[n]}function ie(t,e){t.g||(t.g={});var n=t.g[1];if(!n){var r=re(t,1);n=[];for(var o=0;o{for(const O of v)if(O.type==="childList")for(const S of O.addedNodes)S.tagName==="LINK"&&S.rel==="modulepreload"&&_(S)}).observe(document,{childList:!0,subtree:!0});function p(v){const O={};return v.integrity&&(O.integrity=v.integrity),v.referrerPolicy&&(O.referrerPolicy=v.referrerPolicy),v.crossOrigin==="use-credentials"?O.credentials="include":v.crossOrigin==="anonymous"?O.credentials="omit":O.credentials="same-origin",O}function _(v){if(v.ep)return;v.ep=!0;const O=p(v);fetch(v.href,O)}})();const Bn=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.absolute{position:absolute}.relative{position:relative}.bottom-1{bottom:.25rem}.left-1{left:.25rem}.z-10{z-index:10}.inline{display:inline}.flex{display:flex}.hidden{display:none}.w-32{width:8rem}.w-full{width:100%}.items-end{align-items:flex-end}.rounded-lg{border-radius:.5rem}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.font-bold{font-weight:700}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb;--tw-content: ""}:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;margin:0;line-height:inherit} +`;function zt(){}function rn(i){return i()}function en(){return Object.create(null)}function ae(i){i.forEach(rn)}function on(i){return typeof i=="function"}function $n(i,u){return i!=i?u==u:i!==u||i&&typeof i=="object"||typeof i=="function"}function Vn(i){return Object.keys(i).length===0}function Et(i,u){i.appendChild(u)}function zn(i,u,p){const _=Wn(i);if(!_.getElementById(u)){const v=Mt("style");v.id=u,v.textContent=p,Yn(_,v)}}function Wn(i){if(!i)return document;const u=i.getRootNode?i.getRootNode():i.ownerDocument;return u&&u.host?u:i.ownerDocument}function Yn(i,u){return Et(i.head||i,u),u.sheet}function Xn(i,u,p){i.insertBefore(u,p||null)}function sn(i){i.parentNode&&i.parentNode.removeChild(i)}function Mt(i){return document.createElement(i)}function Hn(i){return document.createTextNode(i)}function ve(){return Hn(" ")}function Dn(i,u,p,_){return i.addEventListener(u,p,_),()=>i.removeEventListener(u,p,_)}function vt(i,u,p){p==null?i.removeAttribute(u):i.getAttribute(u)!==p&&i.setAttribute(u,p)}function Jn(i){return Array.from(i.childNodes)}let Qt;function Kt(i){Qt=i}function Kn(){if(!Qt)throw new Error("Function called outside component initialization");return Qt}function Zn(i){Kn().$$.on_mount.push(i)}const Vt=[],Zt=[];let Wt=[];const nn=[],Qn=Promise.resolve();let we=!1;function qn(){we||(we=!0,Qn.then(an))}function me(i){Wt.push(i)}const ye=new Set;let $t=0;function an(){if($t!==0)return;const i=Qt;do{try{for(;$ti.indexOf(_)===-1?u.push(_):p.push(_)),p.forEach(_=>_()),Wt=u}const n1=new Set;function r1(i,u){i&&i.i&&(n1.delete(i),i.i(u))}function i1(i,u,p,_){const{fragment:v,after_update:O}=i.$$;v&&v.m(u,p),_||me(()=>{const S=i.$$.on_mount.map(rn).filter(on);i.$$.on_destroy?i.$$.on_destroy.push(...S):ae(S),i.$$.on_mount=[]}),O.forEach(me)}function o1(i,u){const p=i.$$;p.fragment!==null&&(e1(p.after_update),ae(p.on_destroy),p.fragment&&p.fragment.d(u),p.on_destroy=p.fragment=null,p.ctx=[])}function s1(i,u){i.$$.dirty[0]===-1&&(Vt.push(i),qn(),i.$$.dirty.fill(0)),i.$$.dirty[u/31|0]|=1<{const at=q.length?q[0]:Q;return j.ctx&&v(j.ctx[K],j.ctx[K]=at)&&(!j.skip_bound&&j.bound[K]&&j.bound[K](at),U&&s1(i,K)),Q}):[],j.update(),U=!0,ae(j.before_update),j.fragment=_?_(j.ctx):!1,u.target){if(u.hydrate){const K=Jn(u.target);j.fragment&&j.fragment.l(K),K.forEach(sn)}else j.fragment&&j.fragment.c();u.intro&&r1(i.$$.fragment),i1(i,u.target,u.anchor,u.customElement),an()}Kt(L)}class u1{$destroy(){o1(this,1),this.$destroy=zt}$on(u,p){if(!on(p))return zt;const _=this.$$.callbacks[u]||(this.$$.callbacks[u]=[]);return _.push(p),()=>{const v=_.indexOf(p);v!==-1&&_.splice(v,1)}}$set(u){this.$$set&&!Vn(u)&&(this.$$.skip_bound=!0,this.$$set(u),this.$$.skip_bound=!1)}}var Yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l1={};(function(){var i;function u(t){var e=0;return function(){return e>>0)+"_",o=0;return e}),O("Symbol.iterator",function(t){if(t)return t;t=Symbol("Symbol.iterator");for(var e="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n"u"?!0:(typeof s=="function"?s=new s("unhandledrejection",{cancelable:!0}):typeof c=="function"?s=new c("unhandledrejection",{cancelable:!0}):(s=v.document.createEvent("CustomEvent"),s.initCustomEvent("unhandledrejection",!1,!0,s)),s.promise=this,s.reason=this.i,h(s))},e.prototype.A=function(){if(this.g!=null){for(var s=0;sn&&(n=Math.max(n+o,0));n"u"||n.execScript("var "+t[0]);for(var r;t.length&&(r=t.shift());)t.length||e===void 0?n[r]&&n[r]!==Object.prototype[r]?n=n[r]:n=n[r]={}:n[r]=e}function z(t,e){return e=String.fromCharCode.apply(null,e),t==null?e:t+e}var rt,g=typeof TextDecoder<"u",m,$=typeof TextEncoder<"u";function J(t){if($)t=(m||(m=new TextEncoder)).encode(t);else{var e=void 0;e=e===void 0?!1:e;for(var n=0,r=new Uint8Array(3*t.length),o=0;ol)r[n++]=l;else{if(2048>l)r[n++]=l>>6|192;else{if(55296<=l&&57343>=l){if(56319>=l&&o=s){l=1024*(l-55296)+s-56320+65536,r[n++]=l>>18|240,r[n++]=l>>12&63|128,r[n++]=l>>6&63|128,r[n++]=l&63|128;continue}else o--}if(e)throw Error("Found an unpaired surrogate");l=65533}r[n++]=l>>12|224,r[n++]=l>>6&63|128}r[n++]=l&63|128}}t=r.subarray(0,n)}return t}var st={},wt=null;function ht(t,e){e===void 0&&(e=0),Pt(),e=st[e];for(var n=Array(Math.floor(t.length/3)),r=e[64]||"",o=0,l=0;o>2];s=e[(s&3)<<4|c>>4],c=e[(c&15)<<2|h>>6],h=e[h&63],n[l++]=d+s+c+h}switch(d=0,h=r,t.length-o){case 2:d=t[o+1],h=e[(d&15)<<2]||r;case 1:t=t[o],n[l]=e[t>>2]+e[(t&3)<<4|d>>4]+h+r}return n.join("")}function mt(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):"=.".indexOf(t[e-1])!=-1&&(n="=.".indexOf(t[e-2])!=-1?n-2:n-1);var r=new Uint8Array(n),o=0;return Xt(t,function(l){r[o++]=l}),r.subarray(0,o)}function Xt(t,e){function n(h){for(;r>4),s!=64&&(e(l<<4&240|s>>2),c!=64&&e(s<<6&192|c))}}function Pt(){if(!wt){wt={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));st[n]=r;for(var o=0;oo&&128<=e;o++)e=t.h[t.g++],n|=(e&127)<<7*o;if(128<=e&&(e=t.h[t.g++],n|=(e&127)<<28,r|=(e&127)>>4),128<=e)for(o=0;5>o&&128<=e;o++)e=t.h[t.g++],r|=(e&127)<<7*o+3;if(128>e)return t=n>>>0,e=r>>>0,(r=e&2147483648)&&(t=~t+1>>>0,e=~e>>>0,t==0&&(e=e+1>>>0)),t=4294967296*e+(t>>>0),r?-t:t;t.m=!0}Nt.prototype.i=function(){var t=this.h,e=t[this.g],n=e&127;return 128>e?(this.g+=1,n):(e=t[this.g+1],n|=(e&127)<<7,128>e?(this.g+=2,n):(e=t[this.g+2],n|=(e&127)<<14,128>e?(this.g+=3,n):(e=t[this.g+3],n|=(e&127)<<21,128>e?(this.g+=4,n):(e=t[this.g+4],n|=(e&15)<<28,128>e?(this.g+=5,n>>>0):(this.g+=5,128<=t[this.g++]&&128<=t[this.g++]&&128<=t[this.g++]&&128<=t[this.g++]&&this.g++,n)))))},Nt.prototype.o=function(){var t=this.h[this.g],e=this.h[this.g+1],n=this.h[this.g+2],r=this.h[this.g+3];return this.g+=4,n=(t<<0|e<<8|n<<16|r<<24)>>>0,t=2*(n>>31)+1,e=n>>>23&255,n&=8388607,e==255?n?NaN:1/0*t:e==0?t*Math.pow(2,-149)*n:t*Math.pow(2,e-150)*(n+Math.pow(2,23))};var Te=[];function te(){this.g=new Uint8Array(64),this.h=0}te.prototype.push=function(t){if(!(this.h+1>>=7;t.push(e)}function Ht(t){var e={},n=e.N===void 0?!1:e.N;this.o={v:e.v===void 0?!1:e.v},this.N=n,e=this.o,Te.length?(n=Te.pop(),e&&(n.v=e.v),t&&Se(n,t),t=n):t=new Nt(t,e),this.g=t,this.m=this.g.g,this.h=this.i=this.l=-1,this.j=!1}Ht.prototype.reset=function(){this.g.reset(),this.h=this.l=-1};function _t(t){var e=t.g;if((e=e.g==e.j)||(e=t.j)||(e=t.g,e=e.m||0>e.g||e.g>e.j),e)return!1;t.m=t.g.g,e=t.g.i();var n=e&7;return n!=0&&n!=5&&n!=1&&n!=2&&n!=3&&n!=4?(t.j=!0,!1):(t.i=e,t.l=e>>>3,t.h=n,!0)}function It(t){switch(t.h){case 0:if(t.h!=0)It(t);else{for(t=t.g;t.h[t.g]&128;)t.g++;t.g++}break;case 1:t.h!=1?It(t):(t=t.g,t.g+=8);break;case 2:if(t.h!=2)It(t);else{var e=t.g.i();t=t.g,t.g+=e}break;case 5:t.h!=5?It(t):(t=t.g,t.g+=4);break;case 3:e=t.l;do{if(!_t(t)){t.j=!0;break}if(t.h==4){t.l!=e&&(t.j=!0);break}It(t)}while(1);break;default:t.j=!0}}function ee(t,e,n){var r=t.g.j,o=t.g.i(),l=t.g.g+o;if(t.g.j=l,n(e,t),n=l-t.g.g,n!==0)throw Error("Message parsing ended unexpectedly. Expected to read "+o+" bytes, instead read "+(o-n)+" bytes, either the data ended unexpectedly or the message misreported its own length");return t.g.g=l,t.g.j=r,e}function ct(t){return t.g.o()}function Re(t){var e=t.g.i();t=t.g;var n=t.g;t.g+=e,t=t.h;var r;if(g)(r=rt)||(r=rt=new TextDecoder("utf-8",{fatal:!1})),r=r.decode(t.subarray(n,n+e));else{e=n+e;for(var o=[],l=null,s,c,h;ns?o.push(s):224>s?n>=e?o.push(65533):(c=t[n++],194>s||(c&192)!==128?(n--,o.push(65533)):o.push((s&31)<<6|c&63)):240>s?n>=e-1?o.push(65533):(c=t[n++],(c&192)!==128||s===224&&160>c||s===237&&160<=c||((r=t[n++])&192)!==128?(n--,o.push(65533)):o.push((s&15)<<12|(c&63)<<6|r&63)):244>=s?n>=e-2?o.push(65533):(c=t[n++],(c&192)!==128||(s<<28)+(c-144)>>30||((r=t[n++])&192)!==128||((h=t[n++])&192)!==128?(n--,o.push(65533)):(s=(s&7)<<18|(c&63)<<12|(r&63)<<6|h&63,s-=65536,o.push((s>>10&1023)+55296,(s&1023)+56320))):o.push(65533),8192<=o.length&&(l=z(l,o),o.length=0);r=z(l,o)}return r}function Fe(t,e,n){var r=t.g.i();for(r=t.g.g+r;t.g.gr?1:0)?-r:r,r===0?0<1/r?bt=xt=0:(xt=0,bt=2147483648):isNaN(r)?(xt=0,bt=2147483647):34028234663852886e22>>0):11754943508222875e-54>r?(r=Math.round(r/Math.pow(2,-149)),xt=0,bt=(n<<31|r)>>>0):(e=Math.floor(Math.log(r)/Math.LN2),r*=Math.pow(2,-e),r=Math.round(8388608*r),16777216<=r&&++e,xt=0,bt=(n<<31|e+127<<23|r&8388607)>>>0),n=bt,t.push(n>>>0&255),t.push(n>>>8&255),t.push(n>>>16&255),t.push(n>>>24&255)}}var Me=typeof Uint8Array=="function";function Ce(t,e,n){if(t!=null)return typeof t=="object"?Me&&t instanceof Uint8Array?n(t):Pe(t,e,n):e(t)}function Pe(t,e,n){if(Array.isArray(t)){for(var r=Array(t.length),o=0;o=t.l?t.i?t.i[e]:void 0:t.h[e+t.j]}function re(t,e){var n=n===void 0?!1:n,r=X(t,e,n);return r==null&&(r=ne),r===ne&&(r=Dt([]),M(t,e,r,n)),r}function Ue(t){var e=re(t,3);if(t.m||(t.m={}),!t.m[3]){for(var n=0;n=t.l?(Ie(t),t.i[e]=n):t.h[e+t.j]=n}function Ge(t,e,n){if(n===-1)return null;if(t.g||(t.g={}),!t.g[n]){var r=X(t,n,!1);r&&(t.g[n]=new e(r))}return t.g[n]}function ie(t,e){t.g||(t.g={});var n=t.g[1];if(!n){var r=re(t,1);n=[];for(var o=0;oI,I=Math.abs(I);var B=I>>>0;for(I=Math.floor((I-B)/4294967296),I>>>=0,G&&(I=~I>>>0,B=(~B>>>0)+1,4294967295>>7|B<<25)>>>0,B>>>=7;F.push(G)}if(ce(A,N),Z=le(Z),W.call(et,ot,Z),P.O)for(et=0;etI;I++)G.push(B&127|128),B>>=7;G.push(1)}gt(F,2,X(N,2)),G=X(N,3),G!=null&&(G=J(G),jt(F.g,26),jt(F.g,G.length),Ut(F,F.g.end()),Ut(F,G)),G=X(N,4),G!=null&&(G=J(G),jt(F.g,34),jt(F.g,G.length),Ut(F,F.g.end()),Ut(F,G)),ce(N,F),A=le(A),ot.call(W,Z,A)}}w=w.data;break t;default:w={}}}switch(E=w,V=p.stream,p.type){case"video":l.pushTexture2d(Object.assign(Object.assign({},E),{stream:V,timestamp:o}));break;case"detections":R=E,R.stream=V,R.timestamp=o,l.pushDetectionList(R);break;default:throw Error("Unknown input config type: '"+p.type+"'")}}return r.i.send(l),Y(k,r.C,4);case 4:l.delete(),k.g=0}})})};function Cn(t,e,n){return it(t,function r(){var o,l,s,c,h,p,E=this,V,R,k,w,x,T,P,et;return H(r,function(W){switch(W.g){case 1:if(!n)return W.return(e);for(o={},l=0,s=C(Object.keys(n)),c=s.next();!c.done;c=s.next())h=c.value,p=n[h],typeof p!="string"&&p.type==="texture"&&e[p.stream]!==void 0&&++l;1>>0)+"_",z=0;return f}),v("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var f="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),b=0;b"u"?!0:(typeof g=="function"?g=new g("unhandledrejection",{cancelable:!0}):typeof m=="function"?g=new m("unhandledrejection",{cancelable:!0}):(g=_.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g)),g.promise=this,g.reason=this.i,$(g))},f.prototype.H=function(){if(this.g!=null){for(var g=0;g"u"||lt.execScript("var "+ft[0]);for(var H;ft.length&&(H=ft.shift());)ft.length||Y===void 0?lt[H]&<[H]!==Object.prototype[H]?lt=lt[H]:lt=lt[H]={}:lt[H]=Y}).call(Yt);const be=[33,7,163,144,145,153,154,155,133,173,157,157,158,159,160,161,246],_e=[263,249,390,373,374,380,381,382,362,398,384,384,385,386,387,388,466],Ee=[70,63,105,66,107],f1=[46,53,52,65,55],xe=[300,293,334,296,336],h1=[276,283,282,295,285],je=[78,191,80,81,82,13,312,311,310,415,308,324,318,402,317,14,87,178,88,95,78],ke=[61,185,40,39,37,0,267,269,270,409,291,375,321,405,314,17,84,181,91,146],un=[6,197,195,5,4],ln=[98,97,2,328,327],cn=[454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234],g1=[468],p1=[473],d1=[10,338,297,332,284,251,389,356,454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234,127,162,21,54,103,67,109];var se=(i=>(i.LANDMARKS="landmarks",i.POINTS="points",i.CRUCIBLEAI="crucibleAI",i))(se||{});const v1={landmarks:w1,points:m1,crucibleAI:y1};function y1(i,u){nt(i,u,_e,"rgb(180, 200, 10)",4,!1,!0,!0),nt(i,u,be,"rgb(10, 200, 180)",4,!1,!0,!0),nt(i,u,Ee,"rgb(10, 200, 180)",4,!1,!0,!1),nt(i,u,f1,"rgb(10, 200, 180)",4,!1,!0,!1),nt(i,u,xe,"rgb(180, 200, 10)",4,!1,!0,!1),nt(i,u,h1,"rgb(180, 200, 10)",4,!1,!0,!1),nt(i,u,ke,"rgb(10, 180, 10)",4,!1,!0,!0),nt(i,u,je,"rgb(10, 180, 10)",4,!1,!0,!0),nt(i,u,d1,"rgb(10, 200, 10)",4,!1,!0,!0),pt(i,u,g1,"rgb(250, 200, 10)",2,"square"),pt(i,u,p1,"rgb(10, 200, 250)",2,"square")}function w1(i,u){nt(i,u,_e,"magenta",4,!0,!1,!0),nt(i,u,be,"magenta",4,!0,!1,!0),nt(i,u,Ee,"yellow",4,!1,!0,!1),nt(i,u,xe,"yellow",4,!1,!0,!1),nt(i,u,ke,"cyan",4,!0,!1,!0),nt(i,u,je,"blue",4,!0,!1,!0),nt(i,u,un,"orange",4,!1,!0,!1),nt(i,u,ln,"orange",4,!1,!0,!1),nt(i,u,cn,"lime",4,!1,!0,!1)}function m1(i,u){pt(i,u,_e,"black",2),pt(i,u,be,"black",2),pt(i,u,Ee,"black",2),pt(i,u,xe,"black",2),pt(i,u,ke,"black",2),pt(i,u,je,"black",2),pt(i,u,un,"black",2),pt(i,u,ln,"black",2),pt(i,u,cn,"black",2)}function nt(i,u,d,_="lime",v=4,O=!1,S=!0,C=!1){i.save(),i.beginPath(),i.strokeStyle=_,i.fillStyle=_,i.lineWidth=v;for(const[L,j]of d.entries()){const U=u[j];L===0?i.moveTo(U.x*i.canvas.width,U.y*i.canvas.height):i.lineTo(U.x*i.canvas.width,U.y*i.canvas.height)}C&&i.closePath(),O&&i.fill(),S&&i.stroke(),i.restore()}function pt(i,u,d,_="black",v=2.5,O="circle",S=!0,C=!1){i.save(),i.fillStyle=_,i.strokeStyle=_;for(const[L,j]of d.entries()){const U=u[j];i.beginPath(),O==="circle"?(i.ellipse(U.x*i.canvas.width,U.y*i.canvas.height,v,v,0,0,2*Math.PI),i.closePath()):O==="square"&&i.rect(U.x*i.canvas.width-v,U.y*i.canvas.height-v,v*2,v*2),C&&i.stroke(),S&&i.fill()}i.restore()}function b1(i){zn(i,"svelte-39b13y","canvas.svelte-39b13y{border-radius:0.5rem;--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.capture-btn.svelte-39b13y{z-index:10;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(248 250 252 / var(--tw-bg-opacity));padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(0 0 0 / var(--tw-text-opacity));--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.capture-btn.svelte-39b13y:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254 / var(--tw-bg-opacity))}.container.svelte-39b13y *{color:black !important}")}function _1(i){let u,d,_,v,O,S,C,L,j,U,K;return{c(){u=Mt("div"),d=Mt("video"),_=ve(),v=Mt("canvas"),O=ve(),S=Mt("div"),C=Mt("button"),C.textContent="Snap",L=ve(),j=Mt("canvas"),vt(d,"class","hidden"),d.muted=!0,d.playsInline=!0,vt(v,"width",`512 +`+n.getProgramInfoLog(l));r=t.m=l,n.useProgram(r),o=n.getUniformLocation(r,"sampler0"),t.j={I:n.getAttribLocation(r,"aVertex"),H:n.getAttribLocation(r,"aTex"),da:o},t.s=n.createBuffer(),n.bindBuffer(n.ARRAY_BUFFER,t.s),n.enableVertexAttribArray(t.j.I),n.vertexAttribPointer(t.j.I,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),t.o=n.createBuffer(),n.bindBuffer(n.ARRAY_BUFFER,t.o),n.enableVertexAttribArray(t.j.H),n.vertexAttribPointer(t.j.H,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([0,1,0,0,1,0,1,1]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.uniform1i(o,0)}r=t.j,n.useProgram(t.m),n.canvas.width=e.width,n.canvas.height=e.height,n.viewport(0,0,e.width,e.height),n.activeTexture(n.TEXTURE0),t.h.bindTexture2d(e.glName),n.enableVertexAttribArray(r.I),n.bindBuffer(n.ARRAY_BUFFER,t.s),n.vertexAttribPointer(r.I,2,n.FLOAT,!1,0,0),n.enableVertexAttribArray(r.H),n.bindBuffer(n.ARRAY_BUFFER,t.o),n.vertexAttribPointer(r.H,2,n.FLOAT,!1,0,0),n.bindFramebuffer(n.DRAW_FRAMEBUFFER?n.DRAW_FRAMEBUFFER:n.FRAMEBUFFER,null),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.colorMask(!0,!0,!0,!0),n.drawArrays(n.TRIANGLE_FAN,0,4),n.disableVertexAttribArray(r.I),n.disableVertexAttribArray(r.H),n.bindBuffer(n.ARRAY_BUFFER,null),t.h.bindTexture2d(0)}function kn(t){this.g=t}var An=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]);function On(t,e){return e+t}function He(t,e){window[t]=e}function Sn(t){var e=document.createElement("script");return e.setAttribute("src",t),e.setAttribute("crossorigin","anonymous"),new Promise(function(n){e.addEventListener("load",function(){n()},!1),e.addEventListener("error",function(){n()},!1),document.body.appendChild(e)})}function Tn(){return it(this,function t(){return H(t,function(e){switch(e.g){case 1:return e.m=2,Y(e,WebAssembly.instantiate(An),4);case 4:e.g=3,e.m=0;break;case 2:return e.m=0,e.j=null,e.return(!1);case 3:return e.return(!0)}})})}function de(t){if(this.g=t,this.listeners={},this.j={},this.F={},this.m={},this.s={},this.G=this.o=this.R=!0,this.C=Promise.resolve(),this.P="",this.B={},this.locateFile=t&&t.locateFile||On,typeof window=="object")var e=window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/";else if(typeof location<"u")e=location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/";else throw Error("solutions can only be loaded on a web page or in a web worker");if(this.S=e,t.options){e=C(Object.keys(t.options));for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=t.options[n].default;r!==void 0&&(this.j[n]=typeof r=="function"?r():r)}}}i=de.prototype,i.close=function(){return this.i&&this.i.delete(),Promise.resolve()};function Rn(t,e){return t.g.files===void 0?[]:typeof t.g.files=="function"?t.g.files(e):t.g.files}function Fn(t){return it(t,function e(){var n=this,r,o,l,s,c,h,d,E,V,R,k;return H(e,function(w){switch(w.g){case 1:return r=n,n.R?(o=Rn(n,n.j),Y(w,Tn(),2)):w.return();case 2:if(l=w.h,typeof window=="object")return He("createMediapipeSolutionsWasm",{locateFile:n.locateFile}),He("createMediapipeSolutionsPackedAssets",{locateFile:n.locateFile}),h=o.filter(function(x){return x.data!==void 0}),d=o.filter(function(x){return x.data===void 0}),E=Promise.all(h.map(function(x){var T=pe(r,x.url);if(x.path!==void 0){var P=x.path;T=T.then(function(et){return r.overrideFile(P,et),Promise.resolve(et)})}return T})),V=Promise.all(d.map(function(x){return x.simd===void 0||x.simd&&l||!x.simd&&!l?Sn(r.locateFile(x.url,r.S)):Promise.resolve()})).then(function(){return it(r,function x(){var T,P,et=this;return H(x,function(W){if(W.g==1)return T=window.createMediapipeSolutionsWasm,P=window.createMediapipeSolutionsPackedAssets,Y(W,T(P),2);et.h=W.h,W.g=0})})}),R=function(){return it(r,function x(){var T=this;return H(x,function(P){return T.g.graph&&T.g.graph.url?P=Y(P,pe(T,T.g.graph.url),0):(P.g=0,P=void 0),P})})}(),Y(w,Promise.all([V,E,R]),7);if(typeof importScripts!="function")throw Error("solutions can only be loaded on a web page or in a web worker");return s=o.filter(function(x){return x.simd===void 0||x.simd&&l||!x.simd&&!l}).map(function(x){return r.locateFile(x.url,r.S)}),importScripts.apply(null,L(s)),Y(w,createMediapipeSolutionsWasm(Module),6);case 6:n.h=w.h,n.l=new OffscreenCanvas(1,1),n.h.canvas=n.l,c=n.h.GL.createContext(n.l,{antialias:!1,alpha:!1,ba:typeof WebGL2RenderingContext<"u"?2:1}),n.h.GL.makeContextCurrent(c),w.g=4;break;case 7:if(n.l=document.createElement("canvas"),k=n.l.getContext("webgl2",{}),!k&&(k=n.l.getContext("webgl",{}),!k))return alert("Failed to create WebGL canvas context when passing video frame."),w.return();n.D=k,n.h.canvas=n.l,n.h.createContext(n.l,!0,!0,{});case 4:n.i=new n.h.SolutionWasm,n.R=!1,w.g=0}})})}function Ln(t){return it(t,function e(){var n=this,r,o,l,s,c,h,d,E;return H(e,function(V){if(V.g==1){if(n.g.graph&&n.g.graph.url&&n.P===n.g.graph.url)return V.return();if(n.o=!0,!n.g.graph||!n.g.graph.url){V.g=2;return}return n.P=n.g.graph.url,Y(V,pe(n,n.g.graph.url),3)}for(V.g!=2&&(r=V.h,n.i.loadGraph(r)),o=C(Object.keys(n.B)),l=o.next();!l.done;l=o.next())s=l.value,n.i.overrideFile(s,n.B[s]);if(n.B={},n.g.listeners)for(c=C(n.g.listeners),h=c.next();!h.done;h=c.next())d=h.value,Nn(n,d);E=n.j,n.j={},n.setOptions(E),V.g=0})})}i.reset=function(){return it(this,function t(){var e=this;return H(t,function(n){e.i&&(e.i.reset(),e.m={},e.s={}),n.g=0})})},i.setOptions=function(t,e){var n=this;if(e=e||this.g.options){for(var r=[],o=[],l={},s=C(Object.keys(t)),c=s.next();!c.done;l={K:l.K,L:l.L},c=s.next()){var h=c.value;h in this.j&&this.j[h]===t[h]||(this.j[h]=t[h],c=e[h],c!==void 0&&(c.onChange&&(l.K=c.onChange,l.L=t[h],r.push(function(d){return function(){return it(n,function E(){var V,R=this;return H(E,function(k){if(k.g==1)return Y(k,d.K(d.L),2);V=k.h,V===!0&&(R.o=!0),k.g=0})})}}(l))),c.graphOptionXref&&(h={valueNumber:c.type===1?t[h]:0,valueBoolean:c.type===0?t[h]:!1,valueString:c.type===2?t[h]:""},c=Object.assign(Object.assign(Object.assign({},{calculatorName:"",calculatorIndex:0}),c.graphOptionXref),h),o.push(c))))}(r.length!==0||o.length!==0)&&(this.o=!0,this.A=(this.A===void 0?[]:this.A).concat(o),this.u=(this.u===void 0?[]:this.u).concat(r))}};function Mn(t){return it(t,function e(){var n=this,r,o,l,s,c,h,d;return H(e,function(E){switch(E.g){case 1:if(!n.o)return E.return();if(!n.u){E.g=2;break}r=C(n.u),o=r.next();case 3:if(o.done){E.g=5;break}return l=o.value,Y(E,l(),4);case 4:o=r.next(),E.g=3;break;case 5:n.u=void 0;case 2:if(n.A){for(s=new n.h.GraphOptionChangeRequestList,c=C(n.A),h=c.next();!h.done;h=c.next())d=h.value,s.push_back(d);n.i.changeOptions(s),s.delete(),n.A=void 0}n.o=!1,E.g=0}})})}i.initialize=function(){return it(this,function t(){var e=this;return H(t,function(n){return n.g==1?Y(n,Fn(e),2):n.g!=3?Y(n,Ln(e),3):Y(n,Mn(e),0)})})};function pe(t,e){return it(t,function n(){var r=this,o,l;return H(n,function(s){return e in r.F?s.return(r.F[e]):(o=r.locateFile(e,""),l=fetch(o).then(function(c){return c.arrayBuffer()}),r.F[e]=l,s.return(l))})})}i.overrideFile=function(t,e){this.i?this.i.overrideFile(t,e):this.B[t]=e},i.clearOverriddenFiles=function(){this.B={},this.i&&this.i.clearOverriddenFiles()},i.send=function(t,e){return it(this,function n(){var r=this,o,l,s,c,h,d,E,V,R;return H(n,function(k){switch(k.g){case 1:return r.g.inputs?(o=1e3*(e??performance.now()),Y(k,r.C,2)):k.return();case 2:return Y(k,r.initialize(),3);case 3:for(l=new r.h.PacketDataList,s=C(Object.keys(t)),c=s.next();!c.done;c=s.next())if(h=c.value,d=r.g.inputs[h]){t:{var w=r,x=t[h];switch(d.type){case"video":var T=w.m[d.stream];if(T||(T=new ge(w.h,w.D),w.m[d.stream]=T),w=T,w.l===0&&(w.l=w.h.createTexture()),typeof HTMLVideoElement<"u"&&x instanceof HTMLVideoElement){var P=x.videoWidth;T=x.videoHeight}else typeof HTMLImageElement<"u"&&x instanceof HTMLImageElement?(P=x.naturalWidth,T=x.naturalHeight):(P=x.width,T=x.height);T={glName:w.l,width:P,height:T},P=w.g,P.canvas.width=T.width,P.canvas.height=T.height,P.activeTexture(P.TEXTURE0),w.h.bindTexture2d(w.l),P.texImage2D(P.TEXTURE_2D,0,P.RGBA,P.RGBA,P.UNSIGNED_BYTE,x),w.h.bindTexture2d(0),w=T;break t;case"detections":for(T=w.m[d.stream],T||(T=new kn(w.h),w.m[d.stream]=T),w=T,w.data||(w.data=new w.g.DetectionListData),w.data.reset(x.length),T=0;TI,I=Math.abs(I);var B=I>>>0;for(I=Math.floor((I-B)/4294967296),I>>>=0,G&&(I=~I>>>0,B=(~B>>>0)+1,4294967295>>7|B<<25)>>>0,B>>>=7;F.push(G)}if(ce(A,N),Z=le(Z),W.call(et,ot,Z),P.O)for(et=0;etI;I++)G.push(B&127|128),B>>=7;G.push(1)}gt(F,2,X(N,2)),G=X(N,3),G!=null&&(G=J(G),jt(F.g,26),jt(F.g,G.length),Ut(F,F.g.end()),Ut(F,G)),G=X(N,4),G!=null&&(G=J(G),jt(F.g,34),jt(F.g,G.length),Ut(F,F.g.end()),Ut(F,G)),ce(N,F),A=le(A),ot.call(W,Z,A)}}w=w.data;break t;default:w={}}}switch(E=w,V=d.stream,d.type){case"video":l.pushTexture2d(Object.assign(Object.assign({},E),{stream:V,timestamp:o}));break;case"detections":R=E,R.stream=V,R.timestamp=o,l.pushDetectionList(R);break;default:throw Error("Unknown input config type: '"+d.type+"'")}}return r.i.send(l),Y(k,r.C,4);case 4:l.delete(),k.g=0}})})};function Cn(t,e,n){return it(t,function r(){var o,l,s,c,h,d,E=this,V,R,k,w,x,T,P,et;return H(r,function(W){switch(W.g){case 1:if(!n)return W.return(e);for(o={},l=0,s=C(Object.keys(n)),c=s.next();!c.done;c=s.next())h=c.value,d=n[h],typeof d!="string"&&d.type==="texture"&&e[d.stream]!==void 0&&++l;1>>0)+"_",z=0;return f}),v("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var f="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),b=0;b"u"?!0:(typeof g=="function"?g=new g("unhandledrejection",{cancelable:!0}):typeof m=="function"?g=new m("unhandledrejection",{cancelable:!0}):(g=_.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g)),g.promise=this,g.reason=this.i,$(g))},f.prototype.H=function(){if(this.g!=null){for(var g=0;g"u"||lt.execScript("var "+ft[0]);for(var H;ft.length&&(H=ft.shift());)ft.length||Y===void 0?lt[H]&<[H]!==Object.prototype[H]?lt=lt[H]:lt=lt[H]={}:lt[H]=Y}).call(Yt);const be=[33,7,163,144,145,153,154,155,133,173,157,157,158,159,160,161,246],_e=[263,249,390,373,374,380,381,382,362,398,384,384,385,386,387,388,466],Ee=[70,63,105,66,107],f1=[46,53,52,65,55],xe=[300,293,334,296,336],h1=[276,283,282,295,285],je=[78,191,80,81,82,13,312,311,310,415,308,324,318,402,317,14,87,178,88,95],ke=[61,185,40,39,37,0,267,269,270,409,291,375,321,405,314,17,84,181,91,146],un=[6,197,195,5,4],ln=[98,97,2,328,327],cn=[454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234],g1=[468],d1=[473],p1=[10,338,297,332,284,251,389,356,454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234,127,162,21,54,103,67,109];var se=(i=>(i.LANDMARKS="landmarks",i.POINTS="points",i.CRUCIBLEAI="crucibleAI",i))(se||{});const v1={landmarks:w1,points:m1,crucibleAI:y1};function y1(i,u){nt(i,u,_e,"rgb(180, 200, 10)",4,!1,!0,!0),nt(i,u,be,"rgb(10, 200, 180)",4,!1,!0,!0),nt(i,u,Ee,"rgb(10, 200, 180)",4,!1,!0,!1),nt(i,u,f1,"rgb(10, 200, 180)",4,!1,!0,!1),nt(i,u,xe,"rgb(180, 200, 10)",4,!1,!0,!1),nt(i,u,h1,"rgb(180, 200, 10)",4,!1,!0,!1),nt(i,u,ke,"rgb(10, 180, 10)",4,!1,!0,!0),nt(i,u,je,"rgb(10, 180, 10)",4,!1,!0,!0),nt(i,u,p1,"rgb(10, 200, 10)",4,!1,!0,!0),dt(i,u,g1,"rgb(250, 200, 10)",2,"square"),dt(i,u,d1,"rgb(10, 200, 250)",2,"square")}function w1(i,u){nt(i,u,_e,"magenta",4,!0,!1,!0),nt(i,u,be,"magenta",4,!0,!1,!0),nt(i,u,Ee,"yellow",4,!1,!0,!1),nt(i,u,xe,"yellow",4,!1,!0,!1),nt(i,u,ke,"cyan",4,!0,!1,!0),nt(i,u,je,"blue",4,!0,!1,!0),nt(i,u,un,"orange",4,!1,!0,!1),nt(i,u,ln,"orange",4,!1,!0,!1),nt(i,u,cn,"lime",4,!1,!0,!1)}function m1(i,u){dt(i,u,_e,"black",2),dt(i,u,be,"black",2),dt(i,u,Ee,"black",2),dt(i,u,xe,"black",2),dt(i,u,ke,"black",2),dt(i,u,je,"black",2),dt(i,u,un,"black",2),dt(i,u,ln,"black",2),dt(i,u,cn,"black",2)}function nt(i,u,p,_="lime",v=4,O=!1,S=!0,C=!1){i.save(),i.beginPath(),i.strokeStyle=_,i.fillStyle=_,i.lineJoin="round",i.lineWidth=v;for(const[L,j]of p.entries()){const U=u[j];L===0?i.moveTo(U.x*i.canvas.width,U.y*i.canvas.height):i.lineTo(U.x*i.canvas.width,U.y*i.canvas.height)}C&&i.closePath(),O&&i.fill(),S&&i.stroke(),i.restore()}function dt(i,u,p,_="black",v=2.5,O="circle",S=!0,C=!1){i.save(),i.fillStyle=_,i.lineJoin="round",i.strokeStyle=_;for(const[L,j]of p.entries()){const U=u[j];i.beginPath(),O==="circle"?(i.ellipse(U.x*i.canvas.width,U.y*i.canvas.height,v,v,0,0,2*Math.PI),i.closePath()):O==="square"&&i.rect(U.x*i.canvas.width-v,U.y*i.canvas.height-v,v*2,v*2),C&&i.stroke(),S&&i.fill()}i.restore()}function b1(i){zn(i,"svelte-39b13y","canvas.svelte-39b13y{border-radius:0.5rem;--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.capture-btn.svelte-39b13y{z-index:10;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(248 250 252 / var(--tw-bg-opacity));padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(0 0 0 / var(--tw-text-opacity));--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.capture-btn.svelte-39b13y:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254 / var(--tw-bg-opacity))}.container.svelte-39b13y *{color:black !important}")}function _1(i){let u,p,_,v,O,S,C,L,j,U,K;return{c(){u=Mt("div"),p=Mt("video"),_=ve(),v=Mt("canvas"),O=ve(),S=Mt("div"),C=Mt("button"),C.textContent="Snap",L=ve(),j=Mt("canvas"),vt(p,"class","hidden"),p.muted=!0,p.playsInline=!0,vt(v,"width",`512 px`),vt(v,"height",`512 @@ -24,4 +24,4 @@ px`),vt(j,"height",`512 - px`),vt(j,"class","w-32 svelte-39b13y"),vt(S,"class","flex absolute bottom-1 left-1 items-end"),vt(u,"class","relative container svelte-39b13y")},m(Q,q){Xn(Q,u,q),Et(u,d),i[4](d),Et(u,_),Et(u,v),i[5](v),Et(u,O),Et(u,S),Et(S,C),Et(S,L),Et(S,j),i[6](j),U||(K=Dn(C,"click",i[3]),U=!0)},p:zt,i:zt,o:zt,d(Q){Q&&sn(u),i[4](null),i[5](null),i[6](null),U=!1,K()}}}function E1(i,u,d){const _=l1.FaceMesh||window.FaceMesh,v=c1.Camera||window.Camera;let O,S,C,L,j,U,K,Q,q=se.LANDMARKS,at=5;Zn(()=>{if(Q=document.getElementById("canvas-root"),Q._data||(Q._data={image:null}),Q.dataset.mode){const yt=Q.dataset.mode;q=se[yt.toUpperCase()],at=parseInt(Q.dataset.maxNumFaces)||5}C=S.getContext("2d"),U=document.createElement("canvas"),K=U.getContext("2d"),U.width=S.width,U.height=S.height;const D=new _({locateFile:yt=>`https://cdn.jsdelivr.net/npm/@mediapipe/face_mesh/${yt}`});D.setOptions({maxNumFaces:at,refineLandmarks:!0,minDetectionConfidence:.5,minTrackingConfidence:.5}),D.onResults(ut),new v(O,{onFrame:async()=>{await D.send({image:O})},width:512,height:512}).start()});function ut(D){if(C.save(),C.clearRect(0,0,S.width,S.height),C.drawImage(D.image,0,0,S.width,S.height),K.clearRect(0,0,U.width,U.height),D.multiFaceLandmarks)for(const Ct of D.multiFaceLandmarks)v1[q](K,Ct);C.drawImage(U,0,0,S.width,S.height)}function At(){j=L.getContext("2d"),j.save(),j.fillStyle=q===se.POINTS?"white":"black",j.fillRect(0,0,L.width,L.height),j.drawImage(U,0,0,L.width,L.height),q==="points"&&(j.globalCompositeOperation="difference",j.fillStyle="white",j.fillRect(0,0,L.width,L.height),j.drawImage(U,0,0,L.width,L.height)),j.restore(),Q._data.image=L.toDataURL()}function Ot(D){Zt[D?"unshift":"push"](()=>{O=D,d(0,O)})}function St(D){Zt[D?"unshift":"push"](()=>{S=D,d(1,S)})}function Y(D){Zt[D?"unshift":"push"](()=>{L=D,d(2,L)})}return[O,S,L,At,Ot,St,Y]}class x1 extends u1{constructor(u){super(),a1(this,u,E1,_1,$n,{},b1)}}class j1 extends HTMLElement{constructor(){super()}connectedCallback(){const u=this.attachShadow({mode:"open"}),d=document.createElement("style");d.appendChild(document.createTextNode(Bn)),u.appendChild(d),new x1({target:u})}}customElements.define("face-canvas",j1); + px`),vt(j,"class","w-32 svelte-39b13y"),vt(S,"class","flex absolute bottom-1 left-1 items-end"),vt(u,"class","relative container svelte-39b13y")},m(Q,q){Xn(Q,u,q),Et(u,p),i[4](p),Et(u,_),Et(u,v),i[5](v),Et(u,O),Et(u,S),Et(S,C),Et(S,L),Et(S,j),i[6](j),U||(K=Dn(C,"click",i[3]),U=!0)},p:zt,i:zt,o:zt,d(Q){Q&&sn(u),i[4](null),i[5](null),i[6](null),U=!1,K()}}}function E1(i,u,p){const _=l1.FaceMesh||window.FaceMesh,v=c1.Camera||window.Camera;let O,S,C,L,j,U,K,Q,q=se.LANDMARKS,at=5;Zn(()=>{if(Q=document.getElementById("canvas-root"),Q._data||(Q._data={image:null}),Q.dataset.mode){const yt=Q.dataset.mode;q=se[yt.toUpperCase()],at=parseInt(Q.dataset.maxNumFaces)||5}C=S.getContext("2d"),U=document.createElement("canvas"),K=U.getContext("2d"),U.width=S.width,U.height=S.height;const D=new _({locateFile:yt=>`https://cdn.jsdelivr.net/npm/@mediapipe/face_mesh/${yt}`});D.setOptions({maxNumFaces:at,refineLandmarks:!0,minDetectionConfidence:.5,minTrackingConfidence:.5}),D.onResults(ut),new v(O,{onFrame:async()=>{await D.send({image:O})},width:512,height:512}).start()});function ut(D){if(C.save(),C.clearRect(0,0,S.width,S.height),C.drawImage(D.image,0,0,S.width,S.height),K.clearRect(0,0,U.width,U.height),D.multiFaceLandmarks)for(const Ct of D.multiFaceLandmarks)v1[q](K,Ct);C.drawImage(U,0,0,S.width,S.height)}function At(){j=L.getContext("2d"),j.save(),j.fillStyle=q===se.POINTS?"white":"black",j.fillRect(0,0,L.width,L.height),j.drawImage(U,0,0,L.width,L.height),q==="points"&&(j.globalCompositeOperation="difference",j.fillStyle="white",j.fillRect(0,0,L.width,L.height),j.drawImage(U,0,0,L.width,L.height)),j.restore(),Q._data.image=L.toDataURL()}function Ot(D){Zt[D?"unshift":"push"](()=>{O=D,p(0,O)})}function St(D){Zt[D?"unshift":"push"](()=>{S=D,p(1,S)})}function Y(D){Zt[D?"unshift":"push"](()=>{L=D,p(2,L)})}return[O,S,L,At,Ot,St,Y]}class x1 extends u1{constructor(u){super(),a1(this,u,E1,_1,$n,{},b1)}}class j1 extends HTMLElement{constructor(){super()}connectedCallback(){const u=this.attachShadow({mode:"open"}),p=document.createElement("style");p.appendChild(document.createTextNode(Bn)),u.appendChild(p),new x1({target:u})}}customElements.define("face-canvas",j1);