(function(){const p=document.createElement("link").relList;if(p&&p.supports&&p.supports("modulepreload"))return;for(const _ of document.querySelectorAll('link[rel="modulepreload"]'))F(_);new MutationObserver(_=>{for(const R of _)if(R.type==="childList")for(const j of R.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&F(j)}).observe(document,{childList:!0,subtree:!0});function g(_){const R={};return _.integrity&&(R.integrity=_.integrity),_.referrerPolicy&&(R.referrerPolicy=_.referrerPolicy),_.crossOrigin==="use-credentials"?R.credentials="include":_.crossOrigin==="anonymous"?R.credentials="omit":R.credentials="same-origin",R}function F(_){if(_.ep)return;_.ep=!0;const R=g(_);fetch(_.href,R)}})();const Ur=`*,: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%}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.gap-2{gap:.5rem}.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 te(){}function zn(c){return c()}function Mn(){return Object.create(null)}function ne(c){c.forEach(zn)}function Kn(c){return typeof c=="function"}function Mr(c,p){return c!=c?p==p:c!==p||c&&typeof c=="object"||typeof c=="function"}function Dr(c){return Object.keys(c).length===0}function et(c,p){c.appendChild(p)}function Gr(c,p,g){const F=Br(c);if(!F.getElementById(p)){const _=gt("style");_.id=p,_.textContent=g,zr(F,_)}}function Br(c){if(!c)return document;const p=c.getRootNode?c.getRootNode():c.ownerDocument;return p&&p.host?p:c.ownerDocument}function zr(c,p){return et(c.head||c,p),p.sheet}function Dn(c,p,g){c.insertBefore(p,g||null)}function Ge(c){c.parentNode&&c.parentNode.removeChild(c)}function gt(c){return document.createElement(c)}function Qt(c){return document.createTextNode(c)}function Zt(){return Qt(" ")}function Me(c,p,g,F){return c.addEventListener(p,g,F),()=>c.removeEventListener(p,g,F)}function at(c,p,g){g==null?c.removeAttribute(p):c.getAttribute(p)!==g&&c.setAttribute(p,g)}function Kr(c){return Array.from(c.childNodes)}function Gn(c,p){p=""+p,c.wholeText!==p&&(c.data=p)}let ee;function Jt(c){ee=c}function Wr(){if(!ee)throw new Error("Function called outside component initialization");return ee}function Yr(c){Wr().$$.on_mount.push(c)}const Ct=[],qt=[];let Ut=[];const Bn=[],Xr=Promise.resolve();let Be=!1;function Vr(){Be||(Be=!0,Xr.then(Wn))}function ze(c){Ut.push(c)}const De=new Set;let Ht=0;function Wn(){if(Ht!==0)return;const c=ee;do{try{for(;Htc.indexOf(F)===-1?p.push(F):g.push(F)),g.forEach(F=>F()),Ut=p}const Qr=new Set;function Jr(c,p){c&&c.i&&(Qr.delete(c),c.i(p))}function qr(c,p,g,F){const{fragment:_,after_update:R}=c.$$;_&&_.m(p,g),F||ze(()=>{const j=c.$$.on_mount.map(zn).filter(Kn);c.$$.on_destroy?c.$$.on_destroy.push(...j):ne(j),c.$$.on_mount=[]}),R.forEach(ze)}function ti(c,p){const g=c.$$;g.fragment!==null&&(Zr(g.after_update),ne(g.on_destroy),g.fragment&&g.fragment.d(p),g.on_destroy=g.fragment=null,g.ctx=[])}function ei(c,p){c.$$.dirty[0]===-1&&(Ct.push(c),Vr(),c.$$.dirty.fill(0)),c.$$.dirty[p/31|0]|=1<{const W=q.length?q[0]:G;return k.ctx&&_(k.ctx[D],k.ctx[D]=W)&&(!k.skip_bound&&k.bound[D]&&k.bound[D](W),U&&ei(c,D)),G}):[],k.update(),U=!0,ne(k.before_update),k.fragment=F?F(k.ctx):!1,p.target){if(p.hydrate){const D=Kr(p.target);k.fragment&&k.fragment.l(D),D.forEach(Ge)}else k.fragment&&k.fragment.c();p.intro&&Jr(c.$$.fragment),qr(c,p.target,p.anchor,p.customElement),Wn()}Jt(Q)}class ri{$destroy(){ti(this,1),this.$destroy=te}$on(p,g){if(!Kn(g))return te;const F=this.$$.callbacks[p]||(this.$$.callbacks[p]=[]);return F.push(g),()=>{const _=F.indexOf(g);_!==-1&&F.splice(_,1)}}$set(p){this.$$set&&!Dr(p)&&(this.$$.skip_bound=!0,this.$$set(p),this.$$.skip_bound=!1)}}var Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ye={};(function(){var c;function p(t){var e=0;return function(){return e>>0)+"_",i=0;return e}),R("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 o=="function"?o=new o("unhandledrejection",{cancelable:!0}):typeof u=="function"?o=new u("unhandledrejection",{cancelable:!0}):(o=_.document.createEvent("CustomEvent"),o.initCustomEvent("unhandledrejection",!1,!0,o)),o.promise=this,o.reason=this.j,a(o))},e.prototype.H=function(){if(this.h!=null){for(var o=0;on&&(n=Math.max(0,i+n)),(r==null||r>i)&&(r=i),r=Number(r),0>r&&(r=Math.max(0,i+r)),n=Number(n||0);nn&&(n=Math.max(n+i,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 d(t){var e;t:{if((e=P.navigator)&&(e=e.userAgent))break t;e=""}return e.indexOf(t)!=-1}var b=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=Array(n),i=typeof t=="string"?t.split(""):t,s=0;s>4),o!=64&&(e(s<<4&240|o>>2),u!=64&&e(o<<6&192|u))}}function z(){if(!H){H={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));O[n]=r;for(var i=0;i>2];o=e[(o&3)<<4|u>>4],u=e[(u&15)<<2|a>>6],a=e[a&63],n[s++]=h+o+u+a}switch(h=0,a=r,t.length-i){case 2:h=t[i+1],a=e[(h&15)<<2]||r;case 1:t=t[i],n[s]=e[t>>2]+e[(t&3)<<4|h>>4]+a+r}return n.join("")}for(e="";10240t;t=Math.abs(t);var n=t>>>0;t=Math.floor((t-n)/4294967296),e&&(n=S(We(n,t)),e=n.next().value,t=n.next().value,n=e),K=n>>>0,tt=t>>>0}var Yn=typeof BigInt=="function";function We(t,e){return e=~e,t?t=~t+1:e+=1,[t,e]}function Ye(t,e){this.i=t>>>0,this.h=e>>>0}function Xe(t){if(!t)return Ve||(Ve=new Ye(0,0));if(!/^-?\d+$/.test(t))return null;if(16>t.length)Ke(Number(t));else if(Yn)t=BigInt(t),K=Number(t&BigInt(4294967295))>>>0,tt=Number(t>>BigInt(32)&BigInt(4294967295));else{var e=+(t[0]==="-");tt=K=0;for(var n=t.length,r=e,i=(n-e)%6+e;i<=n;r=i,i+=6)r=Number(t.slice(r,i)),tt*=1e6,K=1e6*K+r,4294967296<=K&&(tt+=K/4294967296|0,K%=4294967296);e&&(e=S(We(K,tt)),t=e.next().value,e=e.next().value,K=t,tt=e)}return new Ye(K,tt)}var Ve;function $e(t,e){return Error("Invalid wire type: "+t+" (at position "+e+")")}function ge(){return Error("Failed to read varint, encoding is invalid.")}function Ze(t,e){return Error("Tried to read past the end of the data "+e+" > "+t)}function Rt(){throw Error("Invalid UTF8")}function Qe(t,e){return e=String.fromCharCode.apply(null,e),t==null?e:t+e}var ie=void 0,me,Xn=typeof TextDecoder<"u",Je,Vn=typeof TextEncoder<"u",qe;function tn(t){if(t!==St)throw Error("illegal external caller")}function Bt(t,e){if(tn(e),this.V=t,t!=null&&t.length===0)throw Error("ByteString should be constructed with non-empty values")}function we(){return qe||(qe=new Bt(null,St))}function en(t){tn(St);var e=t.V;return e=e==null||Z&&e!=null&&e instanceof Uint8Array?e:typeof e=="string"?It(e):null,e==null?e:t.V=e}function $n(t){if(typeof t=="string")return{buffer:It(t),C:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),C:!1};if(t.constructor===Uint8Array)return{buffer:t,C:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),C:!1};if(t.constructor===Bt)return{buffer:en(t)||Gt(),C:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),C:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function nn(t,e){this.i=null,this.m=!1,this.h=this.j=this.l=0,be(this,t,e)}function be(t,e,n){n=n===void 0?{}:n,t.S=n.S===void 0?!1:n.S,e&&(e=$n(e),t.i=e.buffer,t.m=e.C,t.l=0,t.j=t.i.length,t.h=t.l)}nn.prototype.reset=function(){this.h=this.l};function jt(t,e){if(t.h=e,e>t.j)throw Ze(t.j,e)}function zt(t){var e=t.i,n=t.h,r=e[n++],i=r&127;if(r&128&&(r=e[n++],i|=(r&127)<<7,r&128&&(r=e[n++],i|=(r&127)<<14,r&128&&(r=e[n++],i|=(r&127)<<21,r&128&&(r=e[n++],i|=r<<28,r&128&&e[n++]&128&&e[n++]&128&&e[n++]&128&&e[n++]&128&&e[n++]&128)))))throw ge();return jt(t,n),i}function rn(t,e){if(0>e)throw Error("Tried to read a negative byte length: "+e);var n=t.h,r=n+e;if(r>t.j)throw Ze(e,t.j-n);return t.h=r,n}var on=[];function Ee(){this.h=[]}Ee.prototype.length=function(){return this.h.length},Ee.prototype.end=function(){var t=this.h;return this.h=[],t};function sn(t,e,n){for(;0>>7|n<<25)>>>0,n>>>=7;t.h.push(e)}function Ot(t,e){for(;127>>=7;t.h.push(e)}function _e(t,e){if(on.length){var n=on.pop();be(n,t,e),t=n}else t=new nn(t,e);this.h=t,this.j=this.h.h,this.i=this.l=-1,this.setOptions(e)}_e.prototype.setOptions=function(t){t=t===void 0?{}:t,this.ca=t.ca===void 0?!1:t.ca},_e.prototype.reset=function(){this.h.reset(),this.j=this.h.h,this.i=this.l=-1};function un(t){var e=t.h;if(e.h==e.j)return!1;t.j=t.h.h;var n=zt(t.h)>>>0;if(e=n>>>3,n&=7,!(0<=n&&5>=n))throw $e(n,t.j);if(1>e)throw Error("Invalid field number: "+e+" (at position "+t.j+")");return t.l=e,t.i=n,!0}function oe(t){switch(t.i){case 0:if(t.i!=0)oe(t);else t:{t=t.h;for(var e=t.h,n=e+10,r=t.i;e>>0,t=t.h,jt(t,t.h+e));break;case 5:t=t.h,jt(t,t.h+4);break;case 3:e=t.l;do{if(!un(t))throw Error("Unmatched start-group tag: stream EOF");if(t.i==4){if(t.l!=e)throw Error("Unmatched end-group tag");break}oe(t)}while(1);break;default:throw $e(t.i,t.j)}}var se=[];function Zn(){this.j=[],this.i=0,this.h=new Ee}function kt(t,e){e.length!==0&&(t.j.push(e),t.i+=e.length)}function Qn(t,e){if(e=e.R){kt(t,t.h.end());for(var n=0;n=t.i?t.B?t.B[e]:void 0:t.o[e+t.G]}function wt(t,e,n,r){Te(t),Wt(t,e,n,r)}function Wt(t,e,n,r){t.j&&(t.j=void 0),e>=t.i||r?cn(t)[e]=n:(t.o[e+t.G]=n,(t=t.B)&&e in t&&delete t[e])}function Re(t,e,n,r){var i=vt(t,e);Array.isArray(i)||(i=Kt);var s=V(i);if(s&1||Ae(i),r)s&2||Ft(i,2),n&1||Object.freeze(i);else{r=!(n&2);var o=s&2;n&1||!o?r&&s&16&&!o&&ln(i,16):(i=Ae(Array.prototype.slice.call(i)),Wt(t,e,i))}return i}function je(t,e){var n=vt(t,e),r=n==null?n:typeof n=="number"||n==="NaN"||n==="Infinity"||n==="-Infinity"?Number(n):void 0;return r!=null&&r!==n&&Wt(t,e,r),r}function fn(t,e,n,r,i){t.h||(t.h={});var s=t.h[n],o=Re(t,n,3,i);if(!s){var u=o;s=[];var a=!!(V(t.o)&16);o=!!(V(u)&2);var h=u;!i&&o&&(u=Array.prototype.slice.call(u));for(var v=o,x=0;xo&&typeof t[o]!="number"){var u=t[o++];n(e,u)}for(;o>>0,t=2*(o>>31)+1,s=o>>>23&255,o&=8388607,wt(e,n,s==255?o?NaN:1/0*t:s==0?t*Math.pow(2,-149)*o:t*Math.pow(2,s-150)*(o+Math.pow(2,23))),!0},function(t,e,n){if(e=je(e,n),e!=null){Ot(t.h,8*n+5),t=t.h;var r=+e;r===0?0<1/r?K=tt=0:(tt=0,K=2147483648):isNaN(r)?(tt=0,K=2147483647):(r=(n=0>r?-2147483648:0)?-r:r,34028234663852886e22>>0):11754943508222875e-54>r?(r=Math.round(r/Math.pow(2,-149)),tt=0,K=(n|r)>>>0):(e=Math.floor(Math.log(r)/Math.LN2),r*=Math.pow(2,-e),r=Math.round(8388608*r),16777216<=r&&++e,tt=0,K=(n|e+127<<23|r&8388607)>>>0)),n=K,t.h.push(n>>>0&255),t.h.push(n>>>8&255),t.h.push(n>>>16&255),t.h.push(n>>>24&255)}}),hr=Vt(function(t,e,n){if(t.i!==0)return!1;var r=t.h,i=0,s=t=0,o=r.i,u=r.h;do{var a=o[u++];i|=(a&127)<s&&a&128);for(32>4),s=3;32>s&&a&128;s+=7)a=o[u++],t|=(a&127)<a)r=i>>>0,a=t>>>0,(t=a&2147483648)&&(r=~r+1>>>0,a=~a>>>0,r==0&&(a=a+1>>>0)),r=4294967296*a+(r>>>0);else throw ge();return wt(e,n,t?-r:r),!0},function(t,e,n){e=vt(e,n),e!=null&&(typeof e=="string"&&Xe(e),e!=null&&(Ot(t.h,8*n),typeof e=="number"?(t=t.h,Ke(e),sn(t,K,tt)):(n=Xe(e),sn(t.h,n.i,n.h))))}),pr=Vt(function(t,e,n){return t.i!==0?!1:(wt(e,n,zt(t.h)),!0)},function(t,e,n){if(e=vt(e,n),e!=null&&e!=null)if(Ot(t.h,8*n),t=t.h,n=e,0<=n)Ot(t,n);else{for(e=0;9>e;e++)t.h.push(n&127|128),n>>=7;t.h.push(1)}}),jn=Vt(function(t,e,n){if(t.i!==2)return!1;var r=zt(t.h)>>>0;t=t.h;var i=rn(t,r);if(t=t.i,Xn){var s=t,o;(o=me)||(o=me=new TextDecoder("utf-8",{fatal:!0})),t=i+r,s=i===0&&t===s.length?s:s.subarray(i,t);try{var u=o.decode(s)}catch(x){if(ie===void 0){try{o.decode(new Uint8Array([128]))}catch{}try{o.decode(new Uint8Array([97])),ie=!0}catch{ie=!1}}throw!ie&&(me=void 0),x}}else{u=i,r=u+r,i=[];for(var a=null,h,v;uh?i.push(h):224>h?u>=r?Rt():(v=t[u++],194>h||(v&192)!==128?(u--,Rt()):i.push((h&31)<<6|v&63)):240>h?u>=r-1?Rt():(v=t[u++],(v&192)!==128||h===224&&160>v||h===237&&160<=v||((s=t[u++])&192)!==128?(u--,Rt()):i.push((h&15)<<12|(v&63)<<6|s&63)):244>=h?u>=r-2?Rt():(v=t[u++],(v&192)!==128||(h<<28)+(v-144)>>30||((s=t[u++])&192)!==128||((o=t[u++])&192)!==128?(u--,Rt()):(h=(h&7)<<18|(v&63)<<12|(s&63)<<6|o&63,h-=65536,i.push((h>>10&1023)+55296,(h&1023)+56320))):Rt(),8192<=i.length&&(a=Qe(a,i),i.length=0);u=Qe(a,i)}return wt(e,n,u),!0},function(t,e,n){if(e=vt(e,n),e!=null){var r=!1;if(r=r===void 0?!1:r,Vn){if(r&&/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/.test(e))throw Error("Found an unpaired surrogate");e=(Je||(Je=new TextEncoder)).encode(e)}else{for(var i=0,s=new Uint8Array(3*e.length),o=0;ou)s[i++]=u;else{if(2048>u)s[i++]=u>>6|192;else{if(55296<=u&&57343>=u){if(56319>=u&&o=a){u=1024*(u-55296)+a-56320+65536,s[i++]=u>>18|240,s[i++]=u>>12&63|128,s[i++]=u>>6&63|128,s[i++]=u&63|128;continue}else o--}if(r)throw Error("Found an unpaired surrogate");u=65533}s[i++]=u>>12|224,s[i++]=u>>6&63|128}s[i++]=u&63|128}}e=i===s.length?s:s.subarray(0,i)}Ot(t.h,8*n+2),Ot(t.h,e.length),kt(t,t.h.end()),kt(t,e)}}),On=Vt(function(t,e,n,r,i){if(t.i!==2)return!1;e=hn(e,n,r),n=t.h.j,r=zt(t.h)>>>0;var s=t.h.h+r,o=s-n;if(0>=o&&(t.h.j=s,i(e,t,void 0,void 0,void 0),o=s-t.h.h),o)throw Error("Message parsing ended unexpectedly. Expected to read "+(r+" bytes, instead read "+(r-o)+" bytes, either the data ended unexpectedly or the message misreported its own length"));return t.h.h=s,t.h.j=n,!0},function(t,e,n,r,i){if(e=Oe(e,r,n),e!=null)for(r=0;r>>=7,o.i++;s.push(u),o.i++}});function Ne(t){return function(e,n){t:{if(se.length){var r=se.pop();r.setOptions(n),be(r.h,e,n),e=r}else e=new _e(e,n);try{var i=Ie(t),s=Sn(new i.P,e,i);break t}finally{i=e.h,i.i=null,i.m=!1,i.l=0,i.j=0,i.h=0,i.S=!1,e.l=-1,e.i=-1,100>se.length&&se.push(e)}s=void 0}return s}}function ke(t){return function(){var e=new Zn;Rn(this,e,Le(t)),kt(e,e.h.end());for(var n=new Uint8Array(e.i),r=e.j,i=r.length,s=0,o=0;o>>0)+"_",P=0;return f}),_("Symbol.iterator",function(l){if(l)return l;l=Symbol("Symbol.iterator");for(var f="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),A=0;A"u"?!0:(typeof d=="function"?d=new d("unhandledrejection",{cancelable:!0}):typeof b=="function"?d=new b("unhandledrejection",{cancelable:!0}):(d=F.document.createEvent("CustomEvent"),d.initCustomEvent("unhandledrejection",!1,!0,d)),d.promise=this,d.reason=this.i,O(d))},f.prototype.H=function(){if(this.g!=null){for(var d=0;d"u"||X.execScript("var "+rt[0]);for(var B;rt.length&&(B=rt.shift());)rt.length||J===void 0?X[B]&&X[B]!==Object.prototype[B]?X=X[B]:X=X[B]={}:X[B]=J}).call(Mt);function oi(c){Gr(c,"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 si(c){let p,g,F,_,R,j,S,Q,k,U,D,G=c[3]?"🎤":"🎤❌",q,W,Y,nt=c[5][c[4]]+"",$,ct,J,I,ft,_t,rt,X;return{c(){p=gt("div"),g=gt("video"),F=Zt(),_=gt("canvas"),R=Zt(),j=gt("div"),S=gt("div"),Q=gt("button"),Q.textContent="Snap",k=Zt(),U=gt("div"),D=gt("button"),q=Qt(G),W=Zt(),Y=gt("button"),$=Qt(nt),ct=Qt("🕒"),I=Zt(),ft=gt("canvas"),_t=Qt(` ""`),at(g,"class","hidden"),g.muted=!0,g.playsInline=!0,at(_,"width","720px"),at(_,"height","720px"),at(_,"class","w-full svelte-39b13y"),at(Q,"class","capture-btn svelte-39b13y"),at(D,"class","capture-btn svelte-39b13y"),Y.disabled=J=c[4]>0,at(Y,"class","capture-btn svelte-39b13y"),at(U,"class","flex gap-2"),at(S,"class","flex flex-col gap-2"),at(ft,"width","720px"),at(ft,"height","720px"),at(ft,"class","w-32 svelte-39b13y"),at(j,"class","flex absolute bottom-1 left-1 items-end"),at(p,"class","relative container svelte-39b13y")},m(B,l){Dn(B,p,l),et(p,g),c[9](g),et(p,F),et(p,_),c[10](_),et(p,R),et(p,j),et(j,S),et(S,Q),et(S,k),et(S,U),et(U,D),et(D,q),et(U,W),et(U,Y),et(Y,$),et(Y,ct),et(j,I),et(j,ft),c[12](ft),Dn(B,_t,l),rt||(X=[Me(Q,"click",c[6]),Me(D,"click",c[8]),Me(Y,"click",c[11])],rt=!0)},p(B,[l]){l&8&&G!==(G=B[3]?"🎤":"🎤❌")&&Gn(q,G),l&16&&nt!==(nt=B[5][B[4]]+"")&&Gn($,nt),l&16&&J!==(J=B[4]>0)&&(Y.disabled=J)},i:te,o:te,d(B){B&&Ge(p),c[9](null),c[10](null),c[12](null),B&&Ge(_t),rt=!1,ne(X)}}}function ui(c,p,g){const F=ye.Pose||window.Pose,_=ii.Camera||window.Camera,R=ye.POSE_LANDMARKS||window.POSE_LANDMARKS,j=ye.POSE_LANDMARKS_LEFT||window.POSE_LANDMARKS_LEFT,S=ye.POSE_LANDMARKS_RIGHT||window.POSE_LANDMARKS_RIGHT,Q={0:"0️⃣",1:"1️⃣",2:"2️⃣",3:"3️⃣",4:"4️⃣",5:"5️⃣"};let k,U,D,G,q,W,Y,nt,$=null,ct=!1,J=null,I=0;const ft=[{start:[S.RIGHT_SHOULDER,j.LEFT_SHOULDER],end:S.RIGHT_SHOULDER,color:[255,0,0]},{start:S.RIGHT_SHOULDER,end:S.RIGHT_ELBOW,color:[255,85,0]},{start:S.RIGHT_ELBOW,end:S.RIGHT_WRIST,color:[255,170,0]},{start:[S.RIGHT_SHOULDER,j.LEFT_SHOULDER],end:j.LEFT_SHOULDER,color:[255,255,0]},{start:j.LEFT_SHOULDER,end:j.LEFT_ELBOW,color:[170,255,0]},{start:j.LEFT_ELBOW,end:j.LEFT_WRIST,color:[85,255,0]},{start:[S.RIGHT_SHOULDER,j.LEFT_SHOULDER],end:S.RIGHT_HIP,color:[0,255,0]},{start:S.RIGHT_HIP,end:S.RIGHT_KNEE,color:[0,255,85]},{start:S.RIGHT_KNEE,end:S.RIGHT_HEEL,color:[0,255,170]},{start:[S.RIGHT_SHOULDER,j.LEFT_SHOULDER],end:j.LEFT_HIP,color:[0,255,255]},{start:j.LEFT_HIP,end:j.LEFT_KNEE,color:[0,170,255]},{start:j.LEFT_KNEE,end:j.LEFT_HEEL,color:[0,85,255]},{start:[S.RIGHT_SHOULDER,j.LEFT_SHOULDER],end:R.NOSE,color:[0,0,255]},{start:R.NOSE,end:S.RIGHT_EYE,color:[85,0,255]},{start:S.RIGHT_EYE,end:S.RIGHT_EAR,color:[170,0,255]},{start:R.NOSE,end:j.LEFT_EYE,color:[255,0,255]},{start:j.LEFT_EYE,end:j.LEFT_EAR,color:[255,0,170]}];Yr(()=>{nt=document.getElementById("canvas-root"),nt._data||(nt._data={image:null}),D=U.getContext("2d"),G=document.createElement("canvas"),q=G.getContext("2d"),G.width=U.width,G.height=U.height;const m=new F({locateFile:b=>`https://cdn.jsdelivr.net/npm/@mediapipe/pose/${b}`});m.setOptions({modelComplexity:1,smoothLandmarks:!0,enableSegmentation:!1,smoothSegmentation:!1,minDetectionConfidence:.5,minTrackingConfidence:.5}),m.onResults(_t),new _(k,{onFrame:async()=>{await m.send({image:k})},width:720,height:720}).start()});function _t(m){m.poseLandmarks&&(D.drawImage(m.image,0,0,U.width,U.height),q.clearRect(0,0,G.width,G.height),X(q,m.poseLandmarks),D.drawImage(G,0,0,U.width,U.height))}function rt(){Y=W.getContext("2d"),Y.save(),Y.fillStyle="black",Y.fillRect(0,0,W.width,W.height),Y.drawImage(G,0,0,W.width,W.height),Y.restore(),nt._data.image=W.toDataURL()}function X(m,d,b){let O=4,H=Math.min(m.canvas.width,m.canvas.height);const it=m.canvas.width,At=m.canvas.height;O*=H/512,m.globalAlpha=.6;for(const z of ft){let Z={};if(Array.isArray(z.start)){const K=d[z.start[0]],tt=d[z.start[1]];Z.x=(K.x+tt.x)/2,Z.y=(K.y+tt.y)/2}else Z=d[z.start];const ht=Z,pt=d[z.end];if(ht==null||pt==null)continue;const[Lt,Dt]=[ht.x*it,ht.y*At],[It,Nt]=[pt.x*it,pt.y*At];let Gt=Math.atan2(Nt-Dt,It-Lt),St=((Lt-It)**2+(Dt-Nt)**2)**.5,re=new Path2D;re.ellipse((Lt+It)/2,(Dt+Nt)/2,St/2,O,Gt,0,2*Math.PI),m.fillStyle=`rgb(${z.color.join(",")})`,m.fill(re)}m.globalAlpha=1,m.font="12px serif";for(const z of ft){const Z=d[z.end];if(Z==null)continue;const[ht,pt]=[Z.x*it,Z.y*At];m.beginPath(),m.arc(ht,pt,O,0,2*Math.PI),m.fillStyle=`rgb(${z.color.join(",")})`,m.fill()}}function B(m=5){clearInterval(J),J=null,g(4,I=m),J=setInterval(()=>{g(4,I--,I),I<=0&&(clearInterval(J),J=null,g(4,I=0),rt())},1e3)}function l(){if(ct&&$){$.stop(),$=null,g(3,ct=!1),console.log("Voice snap disabled");return}try{const m=window.SpeechRecognition||window.webkitSpeechRecognition;$=new m,$.continuous=!0,$.interimResults=!0,$.lang="en-US",$.start(),g(3,ct=!0),console.log("Voice snap enabled"),$.onresult=d=>{for(let b=d.resultIndex;b{console.error(`Speech recognition error: ${d}`)}}catch(m){console.error(`Speech recognition not supported: ${m}`)}}function f(m){qt[m?"unshift":"push"](()=>{k=m,g(0,k)})}function A(m){qt[m?"unshift":"push"](()=>{U=m,g(1,U)})}const E=()=>B();function P(m){qt[m?"unshift":"push"](()=>{W=m,g(2,W)})}return[k,U,W,ct,I,Q,rt,B,l,f,A,E,P]}class li extends ri{constructor(p){super(),ni(this,p,ui,si,Mr,{},oi)}}class ai extends HTMLElement{constructor(){super()}connectedCallback(){const p=this.attachShadow({mode:"open"}),g=document.createElement("style");g.appendChild(document.createTextNode(Ur)),p.appendChild(g),new li({target:p})}}customElements.define("pose-canvas",ai);