skeletalmuscle-drawer
Version:
* all-body : 모든 몸 * spine1 : 1번 척추 * spine2 : 2번 척추 * spine3 : 3번 척추 * neck : 목뼈 * head : 머리뼈 * left/right-shoulder : 좌/위측 어깨 * left/right-top-arm : 좌/위측 상단 팔 * left/right-bottom-arm : 좌/위측 하단 팔 * left/right-wrist : 좌/우측 손목 * left/right-숫자1-숫자2 : 좌/우측 숫자1
2 lines • 877 kB
JavaScript
/*! For license information please see bundle.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("skeletalmuscledrawer",[],t):"object"==typeof exports?exports.skeletalmuscledrawer=t():e.skeletalmuscledrawer=t()}(self,(()=>(()=>{var e={264:function(e,t,n){(function(){"use strict";var e;function t(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var i="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},r=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof n.g&&n.g];for(var t=0;t<e.length;++t){var i=e[t];if(i&&i.Math==Math)return i}throw Error("Cannot find global object")}(this);function s(e,t){if(t)e:{var n=r;e=e.split(".");for(var s=0;s<e.length-1;s++){var a=e[s];if(!(a in n))break e;n=n[a]}(t=t(s=n[e=e[e.length-1]]))!=s&&null!=t&&i(n,e,{configurable:!0,writable:!0,value:t})}}function a(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function o(e){var n="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return n?n.call(e):{next:t(e)}}function l(e){if(!(e instanceof Array)){e=o(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}s("Symbol",(function(e){function t(e,t){this.g=e,i(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0;return function e(i){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(n+(i||"")+"_"+r++,i)}})),s("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var n="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),s=0;s<n.length;s++){var o=r[n[s]];"function"==typeof o&&"function"!=typeof o.prototype[e]&&i(o.prototype,e,{configurable:!0,writable:!0,value:function(){return a(t(this))}})}return e}));var c,u="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)c=Object.setPrototypeOf;else{var h;e:{var d={};try{d.__proto__={a:!0},h=d.a;break e}catch(e){}h=!1}c=h?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var p=c;function f(e,t){if(e.prototype=u(t.prototype),e.prototype.constructor=e,p)p(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}else e[n]=t[n];e.ea=t.prototype}function m(){this.l=!1,this.i=null,this.h=void 0,this.g=1,this.s=this.m=0,this.j=null}function g(e){if(e.l)throw new TypeError("Generator is already running");e.l=!0}function v(e,t){e.j={U:t,V:!0},e.g=e.m||e.s}function y(e,t,n){return e.g=n,{value:t}}function x(e){this.g=new m,this.h=e}function A(e,t,n,i){try{var r=t.call(e.g.i,n);if(!(r instanceof Object))throw new TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.l=!1,r;var s=r.value}catch(t){return e.g.i=null,v(e.g,t),b(e)}return e.g.i=null,i.call(e.g,s),b(e)}function b(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.l=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,v(e.g,t)}if(e.g.l=!1,e.g.j){if(t=e.g.j,e.g.j=null,t.V)throw t.U;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function w(e){this.next=function(t){return g(e.g),e.g.i?t=A(e,e.g.i.next,t,e.g.o):(e.g.o(t),t=b(e)),t},this.throw=function(t){return g(e.g),e.g.i?t=A(e,e.g.i.throw,t,e.g.o):(v(e.g,t),t=b(e)),t},this.return=function(t){return function(e,t){g(e.g);var n=e.g.i;return n?A(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),b(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function M(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise((function(i,r){!function e(s){s.done?i(s.value):Promise.resolve(s.value).then(t,n).then(e,r)}(e.next())}))}(new w(new x(e)))}m.prototype.o=function(e){this.h=e},m.prototype.return=function(e){this.j={return:e},this.g=this.s},s("Promise",(function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.g=null}function i(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i((function(){t.l()}))}this.g.push(e)};var s=r.setTimeout;n.prototype.i=function(e){s(e,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.j(e)}}}this.g=null},n.prototype.j=function(e){this.i((function(){throw e}))},t.prototype.j=function(){function e(e){return function(i){n||(n=!0,e.call(t,i))}}var t=this,n=!1;return{resolve:e(this.C),reject:e(this.l)}},t.prototype.C=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.F(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.v(e):this.m(e)}},t.prototype.v=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.G(t,e):this.m(e)},t.prototype.l=function(e){this.s(2,e)},t.prototype.m=function(e){this.s(1,e)},t.prototype.s=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.D(),this.A()},t.prototype.D=function(){var e=this;s((function(){if(e.B()){var t=r.console;void 0!==t&&t.error(e.i)}}),1)},t.prototype.B=function(){if(this.o)return!1;var e=r.CustomEvent,t=r.Event,n=r.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=r.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.A=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.F=function(e){var t=this.j();e.J(t.resolve,t.reject)},t.prototype.G=function(e,t){var n=this.j();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function i(e,t){return"function"==typeof e?function(t){try{r(e(t))}catch(e){s(e)}}:t}var r,s,a=new t((function(e,t){r=e,s=t}));return this.J(i(e,r),i(n,s)),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.J=function(e,t){function n(){switch(i.h){case 1:e(i.i);break;case 2:t(i.i);break;default:throw Error("Unexpected state: "+i.h)}}var i=this;null==this.g?a.h(n):this.g.push(n),this.o=!0},t.resolve=i,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var r=o(e),s=r.next();!s.done;s=r.next())i(s.value).J(t,n)}))},t.all=function(e){var n=o(e),r=n.next();return r.done?i([]):new t((function(e,t){function s(t){return function(n){a[t]=n,0==--o&&e(a)}}var a=[],o=0;do{a.push(void 0),o++,i(r.value).J(s(a.length-1),t),r=n.next()}while(!r.done)}))},t}));var _="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e};s("Object.assign",(function(e){return e||_})),s("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),s("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var i=n.length;for(0>(t=t||0)&&(t=Math.max(t+i,0));t<i;t++){var r=n[t];if(r===e||Object.is(r,e))return!0}return!1}})),s("String.prototype.includes",(function(e){return e||function(e,t){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(e instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return-1!==this.indexOf(e,t||0)}})),s("Array.prototype.keys",(function(e){return e||function(){return function(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var r=n++;return{value:t(r,e[r]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}(this,(function(e){return e}))}}));var S=this||self;function E(e,t){e=e.split(".");var n,i=S;e[0]in i||void 0===i.execScript||i.execScript("var "+e[0]);for(;e.length&&(n=e.shift());)e.length||void 0===t?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=t}function T(e){!function(e){S.setTimeout((function(){throw e}),0)}(e)}function C(e,t){T(Error("Invalid wire type: "+e+" (at position "+t+")"))}function L(){T(Error("Failed to read varint, encoding is invalid."))}function R(e,t){return t=String.fromCharCode.apply(null,t),null==e?t:e+t}var P,I,D="undefined"!=typeof TextDecoder,O="undefined"!=typeof TextEncoder;function B(e){if(O)e=(I||(I=new TextEncoder)).encode(e);else{var t=void 0;t=void 0!==t&&t;for(var n=0,i=new Uint8Array(3*e.length),r=0;r<e.length;r++){var s=e.charCodeAt(r);if(128>s)i[n++]=s;else{if(2048>s)i[n++]=s>>6|192;else{if(55296<=s&&57343>=s){if(56319>=s&&r<e.length){var a=e.charCodeAt(++r);if(56320<=a&&57343>=a){s=1024*(s-55296)+a-56320+65536,i[n++]=s>>18|240,i[n++]=s>>12&63|128,i[n++]=s>>6&63|128,i[n++]=63&s|128;continue}r--}if(t)throw Error("Found an unpaired surrogate");s=65533}i[n++]=s>>12|224,i[n++]=s>>6&63|128}i[n++]=63&s|128}}e=i.subarray(0,n)}return e}var N={},H=null;function F(e){var t;void 0===t&&(t=0),U(),t=N[t];for(var n=Array(Math.floor(e.length/3)),i=t[64]||"",r=0,s=0;r<e.length-2;r+=3){var a=e[r],o=e[r+1],l=e[r+2],c=t[a>>2];a=t[(3&a)<<4|o>>4],o=t[(15&o)<<2|l>>6],l=t[63&l],n[s++]=c+a+o+l}switch(c=0,l=i,e.length-r){case 2:l=t[(15&(c=e[r+1]))<<2]||i;case 1:e=e[r],n[s]=t[e>>2]+t[(3&e)<<4|c>>4]+l+i}return n.join("")}function z(e){var t=e.length,n=3*t/4;n%3?n=Math.floor(n):-1!="=.".indexOf(e[t-1])&&(n=-1!="=.".indexOf(e[t-2])?n-2:n-1);var i=new Uint8Array(n),r=0;return function(e,t){function n(t){for(;i<e.length;){var n=e.charAt(i++),r=H[n];if(null!=r)return r;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return t}U();for(var i=0;;){var r=n(-1),s=n(0),a=n(64),o=n(64);if(64===o&&-1===r)break;t(r<<2|s>>4),64!=a&&(t(s<<4&240|a>>2),64!=o&&t(a<<6&192|o))}}(e,(function(e){i[r++]=e})),i.subarray(0,r)}function U(){if(!H){H={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var i=e.concat(t[n].split(""));N[n]=i;for(var r=0;r<i.length;r++){var s=i[r];void 0===H[s]&&(H[s]=r)}}}}var k,G="function"==typeof Uint8Array;function j(e){if(this.g=e,null!==e&&0===e.length)throw Error("ByteString should be constructed with non-empty values")}j.prototype.toJSON=function(){if(null==this.g)var e="";else e=this.g,e=this.g=null==e||"string"==typeof e?e:G&&e instanceof Uint8Array?F(e):null;return e};var V="function"==typeof Uint8Array.prototype.slice;function W(e,t,n){return t===n?k||(k=new Uint8Array(0)):V?e.slice(t,n):new Uint8Array(e.subarray(t,n))}var Q=0;function X(e,t){t=void 0!==(t=void 0===t?{}:t).u&&t.u,this.h=null,this.g=this.i=this.l=0,this.j=!1,this.u=t,e&&q(this,e)}function q(e,t){e.h=function(e){if(e.constructor===Uint8Array)return e;if(e.constructor===ArrayBuffer)return new Uint8Array(e);if(e.constructor===Array)return new Uint8Array(e);if(e.constructor===String)return z(e);if(e.constructor===j){if(null==e.g)var t=k||(k=new Uint8Array(0));else{t=Uint8Array;var n=e.g;n=null==n||G&&null!=n&&n instanceof Uint8Array?n:"string"==typeof n?z(n):null,t=new t(e=e.g=n)}return t}if(e instanceof Uint8Array)return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, or Array of numbers")}(t),e.l=0,e.i=e.h.length,e.g=e.l}function Y(e){e.g>e.i&&(e.j=!0,T(Error("Tried to read past the end of the data "+e.g+" > "+e.i)))}function Z(e){var t=e.h,n=t[e.g],i=127&n;return 128>n?(e.g+=1,Y(e),i):(i|=(127&(n=t[e.g+1]))<<7,128>n?(e.g+=2,Y(e),i):(i|=(127&(n=t[e.g+2]))<<14,128>n?(e.g+=3,Y(e),i):(i|=(127&(n=t[e.g+3]))<<21,128>n?(e.g+=4,Y(e),i):(i|=(15&(n=t[e.g+4]))<<28,128>n?(e.g+=5,Y(e),i>>>0):(e.g+=5,128<=t[e.g++]&&128<=t[e.g++]&&128<=t[e.g++]&&128<=t[e.g++]&&128<=t[e.g++]?(e.j=!0,L(),i):(Y(e),i))))))}X.prototype.reset=function(){this.g=this.l};var K=[];function J(){this.g=new Uint8Array(64),this.h=0}function $(e,t){if(!(e.h+1<e.g.length)){var n=e.g;e.g=new Uint8Array(Math.ceil(1+2*e.g.length)),e.g.set(n)}e.g[e.h++]=t}function ee(e,t){for(;127<t;)$(e,127&t|128),t>>>=7;$(e,t)}function te(e){var t={},n=void 0!==t.N&&t.N;this.m={u:void 0!==t.u&&t.u},this.N=n,t=this.m,K.length?(n=K.pop(),t&&(n.u=t.u),e&&q(n,e),e=n):e=new X(e,t),this.g=e,this.l=this.g.g,this.h=this.i=-1,this.j=!1}function ne(e){var t=e.g;if((t=t.g==t.i)||(t=e.j)||(t=(t=e.g).j||0>t.g||t.g>t.i),t)return!1;e.l=e.g.g;var n=Z(e.g);return t=n>>>3,0<=(n&=7)&&5>=n?(e.i=t,e.h=n,!0):(e.j=!0,C(n,e.l),!1)}function ie(e){switch(e.h){case 0:if(0!=e.h)ie(e);else e:{for(var t=(e=e.g).g,n=0;10>n;n++){if(0==(128&e.h[t])){e.g=t+1,Y(e);break e}t++}e.j=!0,L()}break;case 1:(e=e.g).g+=8,Y(e);break;case 2:2!=e.h?ie(e):(t=Z(e.g),(e=e.g).g+=t,Y(e));break;case 5:(e=e.g).g+=4,Y(e);break;case 3:for(t=e.i;;){if(!ne(e)){e.j=!0,T(Error("Unmatched start-group tag: stream EOF"));break}if(4==e.h){e.i!=t&&(e.j=!0,T(Error("Unmatched end-group tag")));break}ie(e)}break;default:e.j=!0,C(e.h,e.l)}}function re(e,t,n){e.N||(e=W(e.g.h,n,e.g.g),(n=t.m)?n.push(e):t.m=[e])}J.prototype.length=function(){return this.h},J.prototype.end=function(){var e=this.g,t=this.h;return this.h=0,W(e,0,t)},te.prototype.reset=function(){this.g.reset(),this.h=this.i=-1};var se=[];function ae(){this.h=[],this.i=0,this.g=new J}function oe(e,t){0!==t.length&&(e.h.push(t),e.i+=t.length)}function le(e,t,n){ee(e.g,8*t+2),ee(e.g,n.length),oe(e,e.g.end()),oe(e,n)}var ce,ue="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol(void 0):void 0;function he(e,t){Object.isFrozen(e)||(ue?e[ue]|=t:void 0!==e.g?e.g|=t:Object.defineProperties(e,{g:{value:t,configurable:!0,writable:!0,enumerable:!1}}))}function de(e){return e?null==(t=ue?e[ue]:e.g)?0:t:0;var t}function pe(e){return Array.isArray(e)?(he(e,1),e):e}function fe(e){if(!Array.isArray(e))throw Error("cannot mark non-array as immutable");he(e,2)}function me(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function ge(e){switch(typeof e){case"number":return isFinite(e)?e:String(e);case"object":return G&&null!=e&&e instanceof Uint8Array?F(e):e;default:return e}}function ve(e,t){if(null!=e)return Array.isArray(e)||me(e)?ye(e,t):t(e)}function ye(e,t){if(Array.isArray(e)){for(var n=Array(e.length),i=0;i<e.length;i++)n[i]=ve(e[i],t);return 1&de(e)&&pe(n),n}for(i in n={},e)n[i]=ve(e[i],t);return n}function xe(e,t,n){var i=ce;if(ce=null,e||(e=i),i=this.constructor.ca,e||(e=i?[i]:[]),this.j=(i?0:-1)-(this.constructor.aa||0),this.i=null,this.g=e,e=(i=this.g.length)-1,i&&me(i=this.g[e])?(this.l=e-this.j,this.h=i):void 0!==t&&-1<t?(this.l=Math.max(t,e+1-this.j),this.h=null):this.l=Number.MAX_VALUE,n)for(t=0;t<n.length;t++)(e=n[t])<this.l?(e+=this.j,(i=this.g[e])?pe(i):this.g[e]=we):(Me(this),(i=this.h[e])?pe(i):this.h[e]=we)}var Ae,be,we=Object.freeze(pe([]));function Me(e){var t=e.l+e.j;e.g[t]||(e.h=e.g[t]={})}function _e(e,t,n){return-1===t?null:void 0!==n&&n||t>=e.l?e.h?e.h[t]:void 0:e.g[t+e.j]}function Se(e,t,n){n=void 0===n||n;var i=void 0!==i&&i,r=_e(e,t,i);return null==r&&(r=we),r===we?Te(e,t,r=pe([]),i):n&&Array.isArray(r)&&2&de(r)&&Te(e,t,r=r.slice(),i),r}function Ee(e,t,n){return null==(e=null==(e=_e(e,t))?e:+e)?void 0===n?0:n:e}function Te(e,t,n,i){void 0!==i&&i||t>=e.l?(Me(e),e.h[t]=n):e.g[t+e.j]=n}function Ce(e,t,n){e.i||(e.i={});var i=e.i[n];if(!i){var r=Se(e,n,!1);i=[];for(var s=!!Array.isArray(r)&&!!(2&de(r)),a=0;a<r.length;a++)i[a]=new t(r[a]),s&&fe(i[a].g);s&&(fe(i),Object.freeze(i)),e.i[n]=i}return i}function Le(e,t,n,i,r){var s=Ce(e,i,t);n=n||new i,e=Se(e,t),null!=r?(s.splice(r,0,n),e.splice(r,0,Re(n))):(s.push(n),e.push(Re(n)))}function Re(e){if(e.i)for(var t in e.i){var n=e.i[t];if(Array.isArray(n))for(var i=0;i<n.length;i++)n[i]&&Re(n[i]);else n&&Re(n)}return e.g}function Pe(e,t){return null==(e=_e(e,t))?0:e}function Ie(e,t){return null==(e=_e(e,t))?"":e}function De(e,t){if(e=e.m){oe(t,t.g.end());for(var n=0;n<e.length;n++)oe(t,e[n])}}function Oe(e){var t=e[0];switch(e.length){case 2:var n=e[1];return function(e,i,r){return t(e,i,r,n)};case 3:var i=e[1],r=e[2];return function(e,n,s){return t(e,n,s,i,r)};case 4:var s=e[1],a=e[2],o=e[3];return function(e,n,i){return t(e,n,i,s,a,o)};default:throw Error("unsupported number of parameters, expected [2-4], got "+e.length)}}function Be(e,t,n){for(;ne(t)&&4!=t.h;){var i=t.i,r=n[i];if(r){if(Array.isArray(r)&&(r=n[i]=Oe(r)),!r(t,e,i)){r=e;var s=(i=t).l;ie(i),re(i,r,s)}}else r=e,s=(i=t).l,ie(i),re(i,r,s)}return e}function Ne(e,t){var n=new ae;if(t(e,n),0===(e=n.i+n.g.length()))n=new Uint8Array(0);else{e=new Uint8Array(e);for(var i=n.h,r=i.length,s=t=0;s<r;s++){var a=i[s];0!==a.length&&(e.set(a,t),t+=a.length)}0!==(r=(i=n.g).h)&&(e.set(i.g.subarray(0,r),t),i.h=0),n.h=[e],n=e}return n}function He(e,t,n){if(se.length){var i=se.pop();e&&(q(i.g,e),i.i=-1,i.h=-1),e=i}else e=new te(e);try{return n(new t,e)}finally{(t=e.g).h=null,t.l=0,t.i=0,t.g=0,t.j=!1,t.u=!1,e.i=-1,e.h=-1,e.j=!1,100>se.length&&se.push(e)}}function Fe(e,t,n){if(null!=(t=_e(t,n))){ee(e.g,8*n+5),e=e.g;var i=t;0===(i=(n=0>i?1:0)?-i:i)?Q=0<1/i?0:2147483648:isNaN(i)?Q=2147483647:34028234663852886e22<i?Q=(n<<31|2139095040)>>>0:11754943508222875e-54>i?(i=Math.round(i/Math.pow(2,-149)),Q=(n<<31|i)>>>0):(t=Math.floor(Math.log(i)/Math.LN2),i*=Math.pow(2,-t),16777216<=(i=Math.round(8388608*i))&&++t,Q=(n<<31|t+127<<23|8388607&i)>>>0),$(e,(n=Q)>>>0&255),$(e,n>>>8&255),$(e,n>>>16&255),$(e,n>>>24&255)}}function ze(e,t,n){if(5!==e.h)return!1;var i=(e=e.g).h[e.g],r=e.h[e.g+1],s=e.h[e.g+2],a=e.h[e.g+3];return e.g+=4,Y(e),e=2*((r=(i<<0|r<<8|s<<16|a<<24)>>>0)>>31)+1,i=r>>>23&255,r&=8388607,Te(t,n,255==i?r?NaN:1/0*e:0==i?e*Math.pow(2,-149)*r:e*Math.pow(2,i-150)*(r+Math.pow(2,23))),!0}function Ue(e,t,n){if(0!==e.h)return!1;for(var i=e.g,r=128,s=0,a=e=0;4>a&&128<=r;a++)s|=(127&(r=i.h[i.g++]))<<7*a;if(128<=r&&(s|=(127&(r=i.h[i.g++]))<<28,e|=(127&r)>>4),128<=r)for(a=0;5>a&&128<=r;a++)e|=(127&(r=i.h[i.g++]))<<7*a+3;return 128>r?(i=s>>>0,(e=2147483648&(r=e>>>0))&&(r=~r>>>0,0==(i=1+~i>>>0)&&(r=r+1>>>0)),i=4294967296*r+(i>>>0),e=e?-i:i):(i.j=!0,L(),e=void 0),Te(t,n,e),!0}function ke(e,t,n){return 0===e.h&&(Te(t,n,Z(e.g)),!0)}function Ge(e,t,n){if(2!==e.h)return!1;var i,r=Z(e.g),s=(e=e.g).g;if(e.g+=r,Y(e),e=e.h,D)(i=P)||(i=P=new TextDecoder("utf-8",{fatal:!1})),i=i.decode(e.subarray(s,s+r));else{r=s+r;for(var a,o,l,c=[],u=null;s<r;)128>(a=e[s++])?c.push(a):224>a?s>=r?c.push(65533):(o=e[s++],194>a||128!=(192&o)?(s--,c.push(65533)):c.push((31&a)<<6|63&o)):240>a?s>=r-1?c.push(65533):128!=(192&(o=e[s++]))||224===a&&160>o||237===a&&160<=o||128!=(192&(i=e[s++]))?(s--,c.push(65533)):c.push((15&a)<<12|(63&o)<<6|63&i):244>=a?s>=r-2?c.push(65533):128!=(192&(o=e[s++]))||0!=o-144+(a<<28)>>30||128!=(192&(i=e[s++]))||128!=(192&(l=e[s++]))?(s--,c.push(65533)):(a=(7&a)<<18|(63&o)<<12|(63&i)<<6|63&l,a-=65536,c.push(55296+(a>>10&1023),56320+(1023&a))):c.push(65533),8192<=c.length&&(u=R(u,c),c.length=0);i=R(u,c)}return Te(t,n,i),!0}function je(e,t,n,i,r){if(2!==e.h)return!1;var s=new i,a=e.g.i,o=Z(e.g),l=e.g.g+o;if(e.g.i=l,r(s,e),0!=(r=l-e.g.g))throw Error("Message parsing ended unexpectedly. Expected to read "+o+" bytes, instead read "+(o-r)+" bytes, either the data ended unexpectedly or the message misreported its own length");return e.g.g=l,e.g.i=a,Le(t,n,s,i,void 0),!0}function Ve(e){xe.call(this,e)}function We(e,t){var n=_e(e,1);if(null!=n&&null!=n){ee(t.g,8);var i=t.g;if(0<=n)ee(i,n);else{for(var r=0;9>r;r++)$(i,127&n|128),n>>=7;$(i,1)}}Fe(t,e,2),null!=(i=_e(e,3))&&le(t,3,B(i)),null!=(i=_e(e,4))&&le(t,4,B(i)),De(e,t)}function Qe(e,t){return Be(e,t,Ae||(Ae={1:ke,2:ze,3:Ge,4:Ge}))}function Xe(e){xe.call(this,e,-1,Ke)}function qe(e,t){return Be(e,t,be||(be={1:[je,Ve,Qe]}))}xe.prototype.toJSON=function(){return ye(Re(this),ge)},xe.prototype.toString=function(){return Re(this).toString()},f(Ve,xe),f(Xe,xe),Xe.prototype.addClassification=function(e,t){return Le(this,1,e,Ve,t),this};var Ye,Ze,Ke=[1];function Je(e){xe.call(this,e)}function $e(e,t){Fe(t,e,1),Fe(t,e,2),Fe(t,e,3),Fe(t,e,4),Fe(t,e,5),De(e,t)}function et(e,t){return Be(e,t,Ye||(Ye={1:ze,2:ze,3:ze,4:ze,5:ze}))}function tt(e){xe.call(this,e,-1,rt)}function nt(e,t){return Be(e,t,Ze||(Ze={1:[je,Je,et]}))}f(Je,xe),f(tt,xe);var it,rt=[1];function st(e){xe.call(this,e)}function at(e,t){Fe(t,e,1),Fe(t,e,2),Fe(t,e,3),Fe(t,e,4),Fe(t,e,5);var n=_e(e,6);if(null!=n&&null!=n){ee(t.g,48);var i=t.g,r=n;n=0>r;var s=(r=Math.abs(r))>>>0;for(r=Math.floor((r-s)/4294967296),r>>>=0,n&&(r=~r>>>0,4294967295<(s=1+(~s>>>0))&&(s=0,4294967295<++r&&(r=0))),n=Q=s,s=r;0<s||127<n;)$(i,127&n|128),n=(n>>>7|s<<25)>>>0,s>>>=7;$(i,n)}De(e,t)}function ot(e,t){return Be(e,t,it||(it={1:ze,2:ze,3:ze,4:ze,5:ze,6:Ue}))}function lt(e,t,n){if(n=e.createShader(0===n?e.VERTEX_SHADER:e.FRAGMENT_SHADER),e.shaderSource(n,t),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS))throw Error("Could not compile WebGL shader.\n\n"+e.getShaderInfoLog(n));return n}function ct(e){return Ce(e,Ve,1).map((function(e){return{index:Pe(e,1),X:Ee(e,2),label:null!=_e(e,3)?Ie(e,3):void 0,displayName:null!=_e(e,4)?Ie(e,4):void 0}}))}function ut(e){return{x:Ee(e,1),y:Ee(e,2),z:Ee(e,3),visibility:null!=_e(e,4)?Ee(e,4):void 0}}function ht(e){return Ce(He(e,tt,nt),Je,1).map(ut)}function dt(e,t){this.h=e,this.g=t,this.l=0}function pt(e,t,n){return function(e,t){var n=e.g;if(void 0===e.m){var i=lt(n,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",0),r=lt(n,"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D sampler0;\n void main(){\n gl_FragColor = texture2D(sampler0, vTex);\n }",1),s=n.createProgram();if(n.attachShader(s,i),n.attachShader(s,r),n.linkProgram(s),!n.getProgramParameter(s,n.LINK_STATUS))throw Error("Could not compile WebGL program.\n\n"+n.getProgramInfoLog(s));i=e.m=s,n.useProgram(i),r=n.getUniformLocation(i,"sampler0"),e.j={I:n.getAttribLocation(i,"aVertex"),H:n.getAttribLocation(i,"aTex"),da:r},e.s=n.createBuffer(),n.bindBuffer(n.ARRAY_BUFFER,e.s),n.enableVertexAttribArray(e.j.I),n.vertexAttribPointer(e.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),e.o=n.createBuffer(),n.bindBuffer(n.ARRAY_BUFFER,e.o),n.enableVertexAttribArray(e.j.H),n.vertexAttribPointer(e.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(r,0)}i=e.j,n.useProgram(e.m),n.canvas.width=t.width,n.canvas.height=t.height,n.viewport(0,0,t.width,t.height),n.activeTexture(n.TEXTURE0),e.h.bindTexture2d(t.glName),n.enableVertexAttribArray(i.I),n.bindBuffer(n.ARRAY_BUFFER,e.s),n.vertexAttribPointer(i.I,2,n.FLOAT,!1,0,0),n.enableVertexAttribArray(i.H),n.bindBuffer(n.ARRAY_BUFFER,e.o),n.vertexAttribPointer(i.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(i.I),n.disableVertexAttribArray(i.H),n.bindBuffer(n.ARRAY_BUFFER,null),e.h.bindTexture2d(0)}(e,t),"function"==typeof e.g.canvas.transferToImageBitmap?Promise.resolve(e.g.canvas.transferToImageBitmap()):n?Promise.resolve(e.g.canvas):"function"==typeof createImageBitmap?createImageBitmap(e.g.canvas):(void 0===e.i&&(e.i=document.createElement("canvas")),new Promise((function(t){e.i.height=e.g.canvas.height,e.i.width=e.g.canvas.width,e.i.getContext("2d",{}).drawImage(e.g.canvas,0,0,e.g.canvas.width,e.g.canvas.height),t(e.i)})))}function ft(e){this.g=e}f(st,xe);var mt=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 gt(e,t){return t+e}function vt(e,t){window[e]=t}function yt(e){if(this.g=e,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=e&&e.locateFile||gt,"object"==typeof window)var t=window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/";else{if("undefined"==typeof location)throw Error("solutions can only be loaded on a web page or in a web worker");t=location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/"}if(this.S=t,e.options)for(var n=(t=o(Object.keys(e.options))).next();!n.done;n=t.next()){n=n.value;var i=e.options[n].default;void 0!==i&&(this.j[n]="function"==typeof i?i():i)}}function xt(e,t){var n,i;return M((function(r){return t in e.F?r.return(e.F[t]):(n=e.locateFile(t,""),i=fetch(n).then((function(e){return e.arrayBuffer()})),e.F[t]=i,r.return(i))}))}function At(e,t){for(var n=t.name||"$",i=[].concat(l(t.wants)),r=new e.h.StringList,s=o(t.wants),a=s.next();!a.done;a=s.next())r.push_back(a.value);s=e.h.PacketListener.implement({onResults:function(r){for(var s={},a=0;a<t.wants.length;++a)s[i[a]]=r.get(a);var l=e.listeners[n];l&&(e.C=function(e,t,n){var i,r,s,a,l,c,u,h,d,p,f,m,g,v;return M((function(x){switch(x.g){case 1:if(!n)return x.return(t);for(i={},r=0,s=o(Object.keys(n)),a=s.next();!a.done;a=s.next())l=a.value,"string"!=typeof(c=n[l])&&"texture"===c.type&&void 0!==t[c.stream]&&++r;1<r&&(e.G=!1),u=o(Object.keys(n)),a=u.next();case 2:if(a.done){x.g=4;break}if(h=a.value,"string"==typeof(d=n[h]))return g=i,v=h,y(x,function(e,t,n){var i;return M((function(r){return"number"==typeof n||n instanceof Uint8Array||n instanceof e.h.Uint8BlobList?r.return(n):n instanceof e.h.Texture2dDataOut?((i=e.s[t])||(i=new dt(e.h,e.D),e.s[t]=i),r.return(pt(i,n,e.G))):r.return(void 0)}))}(e,h,t[d]),14);if(p=t[d.stream],"detection_list"===d.type){if(p){for(var A=p.getRectList(),b=p.getLandmarksList(),w=p.getClassificationsList(),_=[],S=0;S<A.size();++S){var E=He(A.get(S),st,ot);E={T:{Y:Ee(E,1),Z:Ee(E,2),height:Ee(E,3),width:Ee(E,4),rotation:Ee(E,5,0),W:Pe(E,6)},O:ht(b.get(S)),M:ct(He(w.get(S),Xe,qe))},_.push(E)}A=_}else A=[];i[h]=A,x.g=7;break}if("proto_list"===d.type){if(p){for(A=Array(p.size()),b=0;b<p.size();b++)A[b]=p.get(b);p.delete()}else A=[];i[h]=A,x.g=7;break}if(void 0===p){x.g=3;break}if("float_list"===d.type){i[h]=p,x.g=7;break}if("proto"===d.type){i[h]=p,x.g=7;break}if("texture"!==d.type)throw Error("Unknown output config type: '"+d.type+"'");return(f=e.s[h])||(f=new dt(e.h,e.D),e.s[h]=f),y(x,pt(f,p,e.G),13);case 13:m=x.h,i[h]=m;case 7:d.transform&&i[h]&&(i[h]=d.transform(i[h])),x.g=3;break;case 14:g[v]=x.h;case 3:a=u.next(),x.g=2;break;case 4:return x.return(i)}}))}(e,s,t.outs).then((function(n){n=l(n);for(var r=0;r<t.wants.length;++r){var a=s[i[r]];"object"==typeof a&&a.hasOwnProperty&&a.hasOwnProperty("delete")&&a.delete()}n&&(e.C=n)})))}}),e.i.attachMultiListener(r,s),r.delete()}function bt(e){switch(void 0===e&&(e=0),e){case 1:return"pose_landmark_full.tflite";case 2:return"pose_landmark_heavy.tflite";default:return"pose_landmark_lite.tflite"}}function wt(e){var t=this;e=e||{},this.g=new yt({locateFile:e.locateFile,files:function(e){return[{url:"pose_solution_packed_assets_loader.js"},{simd:!1,url:"pose_solution_wasm_bin.js"},{simd:!0,url:"pose_solution_simd_wasm_bin.js"},{data:!0,url:bt(e.modelComplexity)}]},graph:{url:"pose_web.binarypb"},listeners:[{wants:["pose_landmarks","world_landmarks","segmentation_mask","image_transformed"],outs:{image:{type:"texture",stream:"image_transformed"},poseLandmarks:{type:"proto",stream:"pose_landmarks",transform:ht},poseWorldLandmarks:{type:"proto",stream:"world_landmarks",transform:ht},segmentationMask:{type:"texture",stream:"segmentation_mask"}}}],inputs:{image:{type:"video",stream:"input_frames_gpu"}},options:{useCpuInference:{type:0,graphOptionXref:{calculatorType:"InferenceCalculator",fieldName:"use_cpu_inference"},default:"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document},selfieMode:{type:0,graphOptionXref:{calculatorType:"GlScalerCalculator",calculatorIndex:1,fieldName:"flip_horizontal"}},modelComplexity:{type:1,graphOptionXref:{calculatorType:"ConstantSidePacketCalculator",calculatorName:"ConstantSidePacketCalculatorModelComplexity",fieldName:"int_value"},onChange:function(e){var n,i,r;return M((function(s){return 1==s.g?(n=bt(e),i="third_party/mediapipe/modules/pose_landmark/"+n,y(s,xt(t.g,n),2)):(r=s.h,t.g.overrideFile(i,r),s.return(!0))}))}},smoothLandmarks:{type:0,graphOptionXref:{calculatorType:"ConstantSidePacketCalculator",calculatorName:"ConstantSidePacketCalculatorSmoothLandmarks",fieldName:"bool_value"}},enableSegmentation:{type:0,graphOptionXref:{calculatorType:"ConstantSidePacketCalculator",calculatorName:"ConstantSidePacketCalculatorEnableSegmentation",fieldName:"bool_value"}},smoothSegmentation:{type:0,graphOptionXref:{calculatorType:"ConstantSidePacketCalculator",calculatorName:"ConstantSidePacketCalculatorSmoothSegmentation",fieldName:"bool_value"}},minDetectionConfidence:{type:1,graphOptionXref:{calculatorType:"TensorsToDetectionsCalculator",calculatorName:"poselandmarkgpu__posedetectiongpu__TensorsToDetectionsCalculator",fieldName:"min_score_thresh"}},minTrackingConfidence:{type:1,graphOptionXref:{calculatorType:"ThresholdingCalculator",calculatorName:"poselandmarkgpu__poselandmarkbyroigpu__tensorstoposelandmarksandsegmentation__ThresholdingCalculator",fieldName:"threshold"}}}})}(e=yt.prototype).close=function(){return this.i&&this.i.delete(),Promise.resolve()},e.reset=function(){var e=this;return M((function(t){e.i&&(e.i.reset(),e.m={},e.s={}),t.g=0}))},e.setOptions=function(e,t){var n=this;if(t=t||this.g.options){for(var i=[],r=[],s={},a=o(Object.keys(e)),l=a.next();!l.done;s={K:s.K,L:s.L},l=a.next()){var c=l.value;c in this.j&&this.j[c]===e[c]||(this.j[c]=e[c],void 0!==(l=t[c])&&(l.onChange&&(s.K=l.onChange,s.L=e[c],i.push(function(e){return function(){return M((function(t){if(1==t.g)return y(t,e.K(e.L),2);!0===t.h&&(n.o=!0),t.g=0}))}}(s))),l.graphOptionXref&&(c={valueNumber:1===l.type?e[c]:0,valueBoolean:0===l.type&&e[c],valueString:2===l.type?e[c]:""},l=Object.assign(Object.assign(Object.assign({},{calculatorName:"",calculatorIndex:0}),l.graphOptionXref),c),r.push(l))))}0===i.length&&0===r.length||(this.o=!0,this.A=(void 0===this.A?[]:this.A).concat(r),this.v=(void 0===this.v?[]:this.v).concat(i))}},e.initialize=function(){var e=this;return M((function(t){return 1==t.g?y(t,function(e){var t,n,i,r,s,a,o,c,u,h,d;return M((function(p){switch(p.g){case 1:return e.R?(t=void 0===e.g.files?[]:"function"==typeof e.g.files?e.g.files(e.j):e.g.files,y(p,M((function(e){switch(e.g){case 1:return e.m=2,y(e,WebAssembly.instantiate(mt),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)}})),2)):p.return();case 2:if(n=p.h,"object"==typeof window)return vt("createMediapipeSolutionsWasm",{locateFile:e.locateFile}),vt("createMediapipeSolutionsPackedAssets",{locateFile:e.locateFile}),a=t.filter((function(e){return void 0!==e.data})),o=t.filter((function(e){return void 0===e.data})),c=Promise.all(a.map((function(t){var n=xt(e,t.url);if(void 0!==t.path){var i=t.path;n=n.then((function(t){return e.overrideFile(i,t),Promise.resolve(t)}))}return n}))),u=Promise.all(o.map((function(t){return void 0===t.simd||t.simd&&n||!t.simd&&!n?function(e){var t=document.createElement("script");return t.setAttribute("src",e),t.setAttribute("crossorigin","anonymous"),new Promise((function(e){t.addEventListener("load",(function(){e()}),!1),t.addEventListener("error",(function(){e()}),!1),document.body.appendChild(t)}))}(e.locateFile(t.url,e.S)):Promise.resolve()}))).then((function(){var t,n,i;return M((function(r){if(1==r.g)return t=window.createMediapipeSolutionsWasm,n=window.createMediapipeSolutionsPackedAssets,i=e,y(r,t(n),2);i.h=r.h,r.g=0}))})),h=M((function(t){return e.g.graph&&e.g.graph.url?t=y(t,xt(e,e.g.graph.url),0):(t.g=0,t=void 0),t})),y(p,Promise.all([u,c,h]),7);if("function"!=typeof importScripts)throw Error("solutions can only be loaded on a web page or in a web worker");return i=t.filter((function(e){return void 0===e.simd||e.simd&&n||!e.simd&&!n})).map((function(t){return e.locateFile(t.url,e.S)})),importScripts.apply(null,l(i)),r=e,y(p,createMediapipeSolutionsWasm(Module),6);case 6:r.h=p.h,e.l=new OffscreenCanvas(1,1),e.h.canvas=e.l,s=e.h.GL.createContext(e.l,{antialias:!1,alpha:!1,ba:"undefined"!=typeof WebGL2RenderingContext?2:1}),e.h.GL.makeContextCurrent(s),p.g=4;break;case 7:if(e.l=document.createElement("canvas"),!(d=e.l.getContext("webgl2",{}))&&!(d=e.l.getContext("webgl",{})))return alert("Failed to create WebGL canvas context when passing video frame."),p.return();e.D=d,e.h.canvas=e.l,e.h.createContext(e.l,!0,!0,{});case 4:e.i=new e.h.SolutionWasm,e.R=!1,p.g=0}}))}(e),2):3!=t.g?y(t,function(e){var t,n,i,r,s,a,l,c;return M((function(u){if(1==u.g)return e.g.graph&&e.g.graph.url&&e.P===e.g.graph.url?u.return():(e.o=!0,e.g.graph&&e.g.graph.url?(e.P=e.g.graph.url,y(u,xt(e,e.g.graph.url),3)):void(u.g=2));for(2!=u.g&&(t=u.h,e.i.loadGraph(t)),n=o(Object.keys(e.B)),i=n.next();!i.done;i=n.next())r=i.value,e.i.overrideFile(r,e.B[r]);if(e.B={},e.g.listeners)for(s=o(e.g.listeners),a=s.next();!a.done;a=s.next())l=a.value,At(e,l);c=e.j,e.j={},e.setOptions(c),u.g=0}))}(e),3):y(t,function(e){var t,n,i,r,s,a;return M((function(l){switch(l.g){case 1:if(!e.o)return l.return();if(!e.v){l.g=2;break}t=o(e.v),n=t.next();case 3:if(n.done){l.g=5;break}return y(l,(0,n.value)(),4);case 4:n=t.next(),l.g=3;break;case 5:e.v=void 0;case 2:if(e.A){for(i=new e.h.GraphOptionChangeRequestList,r=o(e.A),s=r.next();!s.done;s=r.next())a=s.value,i.push_back(a);e.i.changeOptions(i),i.delete(),e.A=void 0}e.o=!1,l.g=0}}))}(e),0)}))},e.overrideFile=function(e,t){this.i?this.i.overrideFile(e,t):this.B[e]=t},e.clearOverriddenFiles=function(){this.B={},this.i&&this.i.clearOverriddenFiles()},e.send=function(e,t){var n,i,r,s,a,l,c,u,h,d=this;return M((function(p){switch(p.g){case 1:return d.g.inputs?(n=1e3*(null==t?performance.now():t),y(p,d.C,2)):p.return();case 2:return y(p,d.initialize(),3);case 3:for(i=new d.h.PacketDataList,r=o(Object.keys(e)),s=r.next();!s.done;s=r.next())if(a=s.value,l=d.g.inputs[a]){e:{var f=e[a];switch(l.type){case"video":var m=d.m[l.stream];if(m||(m=new dt(d.h,d.D),d.m[l.stream]=m),0===m.l&&(m.l=m.h.createTexture()),"undefined"!=typeof HTMLVideoElement&&f instanceof HTMLVideoElement)var g=f.videoWidth,v=f.videoHeight;else"undefined"!=typeof HTMLImageElement&&f instanceof HTMLImageElement?(g=f.naturalWidth,v=f.naturalHeight):(g=f.width,v=f.height);v={glName:m.l,width:g,height:v},(g=m.g).canvas.width=v.width,g.canvas.height=v.height,g.activeTexture(g.TEXTURE0),m.h.bindTexture2d(m.l),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,f),m.h.bindTexture2d(0),m=v;break e;case"detections":for((m=d.m[l.stream])||(m=new ft(d.h),d.m[l.stream]=m),m.data||(m.data=new m.g.DetectionListData),m.data.reset(f.length),v=0;v<f.length;++v){g=f[v];var x=m.data,A=x.setBoundingBox,b=v,w=g.T,M=new st;if(Te(M,1,w.Y),Te(M,2,w.Z),Te(M,3,w.height),Te(M,4,w.width),Te(M,5,w.rotation),Te(M,6,w.W),w=Ne(M,at),A.call(x,b,w),g.O)for(x=0;x<g.O.length;++x){var _=!!(M=g.O[x]).visibility;b=(A=m.data).addNormalizedLandmark,w=v,M=Object.assign(Object.assign({},M),{visibility:_?M.visibility:0}),Te(_=new Je,1,M.x),Te(_,2,M.y),Te(_,3,M.z),M.visibility&&Te(_,4,M.visibility),M=Ne(_,$e),b.call(A,w,M)}if(g.M)for(x=0;x<g.M.length;++x)b=(A=m.data).addClassification,w=v,M=g.M[x],Te(_=new Ve,2,M.X),M.index&&Te(_,1,M.index),M.label&&Te(_,3,M.label),M.displayName&&Te(_,4,M.displayName),M=Ne(_,We),b.call(A,w,M)}m=m.data;break e;default:m={}}}switch(c=m,u=l.stream,l.type){case"video":i.pushTexture2d(Object.assign(Object.assign({},c),{stream:u,timestamp:n}));break;case"detections":(h=c).stream=u,h.timestamp=n,i.pushDetectionList(h);break;default:throw Error("Unknown input config type: '"+l.type+"'")}}return d.i.send(i),y(p,d.C,4);case 4:i.delete(),p.g=0}}))},e.onResults=function(e,t){this.listeners[t||"$"]=e},E("Solution",yt),E("OptionType",{BOOL:0,NUMBER:1,$:2,0:"BOOL",1:"NUMBER",2:"STRING"}),(e=wt.prototype).reset=function(){this.g.reset()},e.close=function(){return this.g.close(),Promise.resolve()},e.onResults=function(e){this.g.onResults(e)},e.initialize=function(){var e=this;return M((function(t){return y(t,e.g.initialize(),0)}))},e.send=function(e,t){var n=this;return M((function(i){return y(i,n.g.send(e,t),0)}))},e.setOptions=function(e){this.g.setOptions(e)},E("Pose",wt),E("POSE_CONNECTIONS",[[0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]]),E("POSE_LANDMARKS",{NOSE:0,LEFT_EYE_INNER:1,LEFT_EYE:2,LEFT_EYE_OUTER:3,RIGHT_EYE_INNER:4,RIGHT_EYE:5,RIGHT_EYE_OUTER:6,LEFT_EAR:7,RIGHT_EAR:8,LEFT_RIGHT:9,RIGHT_LEFT:10,LEFT_SHOULDER:11,RIGHT_SHOULDER:12,LEFT_ELBOW:13,RIGHT_ELBOW:14,LEFT_WRIST:15,RIGHT_WRIST:16,LEFT_PINKY:17,RIGHT_PINKY:18,LEFT_INDEX:19,RIGHT_INDEX:20,LEFT_THUMB:21,RIGHT_THUMB:22,LEFT_HIP:23,RIGHT_HIP:24,LEFT_KNEE:25,RIGHT_KNEE:26,LEFT_ANKLE:27,RIGHT_ANKLE:28,LEFT_HEEL:29,RIGHT_HEEL:30,LEFT_FOOT_INDEX:31,RIGHT_FOOT_INDEX:32}),E("POSE_LANDMARKS_LEFT",{LEFT_EYE_INNER:1,LEFT_EYE:2,LEFT_EYE_OUTER:3,LEFT_EAR:7,LEFT_RIGHT:9,LEFT_SHOULDER:11,LEFT_ELBOW:13,LEFT_WRIST:15,LEFT_PINKY:17,LEFT_INDEX:19,LEFT_THUMB:21,LEFT_HIP:23,LEFT_KNEE:25,LEFT_ANKLE:27,LEFT_HEEL:29,LEFT_FOOT_INDEX:31}),E("POSE_LANDMARKS_RIGHT",{RIGHT_EYE_INNER:4,RIGHT_EYE:5,RIGHT_EYE_OUTER:6,RIGHT_EAR:8,RIGHT_LEFT:10,RIGHT_SHOULDER:12,RIGHT_ELBOW:14,RIGHT_WRIST:16,RIGHT_PINKY:18,RIGHT_INDEX:20,RIGHT_THUMB:22,RIGHT_HIP:24,RIGHT_KNEE:26,RIGHT_ANKLE:28,RIGHT_HEEL:30,RIGHT_FOOT_INDEX:32}),E("POSE_LANDMARKS_NEUTRAL",{NOSE:0}),E("VERSION","0.5.1635988162")}).call(this)},1784:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PoseAngles=void 0;const r=i(n(183)),s=i(n(1621)),a=n(9477),o=n(5558);class l extends r.default{static Joints=new Map([["leftLeg",[23,25,27]],["rightLeg",[24,26,28]],["leftHipY",[25,23,24]],["rightHipY",[26,24,23]],["leftHipX",[11,23,25]],["rightHipX",[12,24,26]],["leftShoulderX",[13,11,23]],["rightShoulderX",[14,12,24]],["leftShoulderY",[13,11,12]],["rightShoulderY",[14,12,11]]]);static ThreeDegree(e,t,n){const i=[t.x-e.x,t.y-e.y,t.z-e.z],r=[n.x-t.x,n.y-t.y,n.z-t.z],s=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]),a=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]),o=[i[0]/s,i[1]/s,i[2]/s],l=[r[0]/a,r[1]/a,r[2]/a],c=o[0]*l[0]+o[1]*l[1]+o[2]*l[2];return Math.PI-Math.acos(c)}motion;posture;constructor(e){super(e),this.app.analysisSetting.hang(this.onAnalysisChange.bind(this)),this.posture=new o.SquartPosture}onAnalysisChange(e){null==this.motion&&(this.motion=new s.default(e.videoElement,this.onMotionResult.bind(this))),e.isWorking?this.motion.enable=!0:this.motion.enable=!1}onMotionResult(e){const t=new c;l.Joints.forEach(((n,i)=>{if(null!=e.poseWorldLandmarks){const r=e.poseWorldLandmarks[n[0]],s=e.poseWorldLandmarks[n[1]],o=e.poseWorldLandmarks[n[2]];t.set(i,{name:i,accuracy:((r.visibility??0)+(s.visibility??0)+(o.visibility??0))/3,value:l.ThreeDegree(new a.Vector3(r.x,r.y,r.z),new a.Vector3(s.x,s.y,s.z),new a.Vector3(o.x,o.y,o.z))})}}));const n={...this.app.analysisData.get()};n.buffer={poseWorldLandmarks:e.poseWorldLandmarks,poseAngles:t,image:e.image};const i=this.posture.input(t);null!=i&&n.history.push({motion:n.buffer,exercise:i}),this.app.analysisData.set(n)}}t.default=l;class c extends Map{toHTML(e,t){let n="";return this.forEach((i=>{n+=`<${e} class="${t}">${i.name} : ${c.RadinToDegree(i.value)}</${e}>`})),n}toTable(){let e="";return this.forEach((t=>{const n=c.RadinToDegree(t.value),i=c.DegreeToColor(n);e+=`<tr>\n <td>${t.name}</td>\n <td style="background-color: ${i}">${n}</td>\n </tr>`})),e}static DegreeToColor(e){return`rgba(${-1.1*e+255}, ${-1.1*e+255}, 200)`}static RadinToDegree(e){return Math.round(180*e/Math.PI*10)/10}}t.PoseAngles=c},1995:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){}static maxScore=100;accuracyCheck(e){let t=0;return this.needInfo.forEach((n=>{const i=e.get(n);null!=i&&(t+=i.accuracy)})),t/this.needInfo.length>this.accuracy}input(e){if(this.accuracyCheck(e)){const t=new Map;return e.forEach(((e,n)=>{t.set(n,e.value)})),this.onInput(t)}}static RadianToDegree=e=>180*e/Math.PI;static DegreeToRadian=e=>e*Math.PI/180}},5558:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SquartPosture=t.Posture=void 0;const r=i(n(1995));t.Posture=r.default;var s=n(8751);Object.defineProperty(t,"SquartPosture",{enumerable:!0,get:function(){return i(s).default}})},3827:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{static leftArm="leftArm";static rightArm="rightArm";static leftLeg="leftLeg";static rightLeg="rightLeg";static leftHipY="leftHipY";static rightHipY="rightHipY";static leftHipX="leftHipX";static rightHipX="rightHipX";static leftShoulderX="leftShoulderX";static rightShoulderX="rightShoulderX";static leftShoulderY="leftShoulderY";static rightShoulderY="rightShoulderY"}},8751:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(3827)),s=i(n(1995));class a extends s.default{accuracy=.9;stand=new Array;sit=new Array;currentMode=!1;needInfo=[r.default.leftHipX,r.default.rightHipX,r.default.leftHipY,r.default.rightHipY,r.default.leftLeg,r.default.rightLeg];onInput=e=>{const t=this.currentMode;if(this.currentMode=s.default.RadianToDegree(e.get(r.default.leftLeg))<120&&s.default.RadianToDegree(e.get(r.default.rightLeg))<120,1==t&&0==this.currentMode&&this.sit.filter((e=>s.default.RadianToDegree(e.get(r.default.leftLeg))<110)).length>0&&this.sit.filter((e=>s.default.RadianToDegree(e.get(r.default.rightLeg))<110)).length>0){const e=this.sit;return this.stand=new Array,this.sit=new Array,{score:this.score(e),deductions:["SEX"]}}this.currentMode?this.sit.push(e):this.stand.push(e)};score(e){let t=4,n=4;e.forEach((e=>{const i=e.get(r.default.leftLeg),s=e.get(r.default.rightLeg);t>i&&(t=i),n>s&&(n=s)}));const i=Math.abs(1.1-t)+50*Math.abs(1.1-n);return s.default.maxScore-i}}t.default=a},1621:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(264),s=i(n(8745));t.default=class{pose;enable=!1;constructor(e,t){this.pose=new r.Pose({locateFile:e=>`/mediapipe/${e}`}),this.pose.setOptions({modelComplexity:1,smoothLandmarks:!0,smoothSegmentation:!0,minDetectionConfidence:.5,minTrackingConfidence:.5}),this.pose.onResults(t),new s.default(e,(async e=>{this.enable&&await this.pose.send({image:e})}))}}},8745:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{element;onFrame;currentTime=0;constructor(e,t){this.onFrame=t,this.element=e,this.update()}update(){4===this.element.readyState&&this.element.currentTime!=this.currentTime?this.onFrame(this.element).then((()=>{this.currentTime=this.element.currentTime,requestAnimationFrame(this.update.bind(this))})):requestAnimationFrame(this.update.bind(this))}}},9614:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(1721)),s=n(9477),a=i(n(4791));t.default=class{name;animations=new Map;subtitles=new Array;timeline;isLoading=new a.default(!0);duration=0;constructor(e){this.name=e.name,this.timeline=e.timeline,this.subtitles=e.subtitles,this.subtitles.sort(((e,t)=>e.start-t.start)),this.subtitles.forEach(((e,t)=>{void 0===e.end&&(this.subtitles[t].end=this.subtitles[t+1].start)})),this.getAnimations(e.animations).then(this.onAnimationLoaded.bind(this))}getAnimations(e){return Promise.all(e.map((e=>(async()=>({key:e.name,value:(await r.default.get(e.src)).data}))())))}animationInitor(e){return new s.AnimationClip(e.name,e.duration,e.tracks.map((e=>new s.KeyframeTrack(e.name,e.times,e.values))),e.blendMode)}onAnimationLoaded(e){e.forEach((e=>{this.animations.set(e.key,this.animationInitor(e.value))})),this.timeline.forEach((e=>{this.duration+=1e3*this.animations.get(e)?.duration})),this.isLoading.set(!1)}getAnimationClip(e){let t=0,n=this.timeline[0];return this.timeline.forEach((i=>{const r=this.animations.get(i);t<e&&(t+=1e3*r.duration,n=i)})),{clip:this.animations.get(n),time:e-t}}getSubtitle(e){let t="";return this.subtitles.forEach((n=>{e>=n.start&&e<n.end&&(t=n.content)})),t}}},4366:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(9614));t.default=r.default},8783:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=a(n(4791)),l=a(n(4366)),c=a(n(1721)),u=a(n(4094)),h=a(n(735)),d=s(n(1784)),p=a(n(6183));t.default=class{currentTime;updateClock;rootElement;controllerElement;isPaused;isLoading;animation;subtitle;analysisSetting;analysisData;modal;human;world;members=new Array;constructor(e,t,n){this.currentTime=new o.default(0),this.updateClock=new o.default(0),this.rootElement=new o.default(e),this.controllerElement=new o.default(e),this.isPaused=new o.default(!1),this.isLoading=new o.default(!0),this.animation=new o.default(new l.default(f)),this.subtitle=new o.default(""),this.analysisSetting=new o.default(m),this.analysisData=new o.default(g),this.modal=new o.default(v),this.human=new o.default(t),this.world=new o.default(n),this.members.push(new u.default(this)),this.members.push(new h.default(this)),this.members.push(new d.default(this)),this.members.push(new p.default(this))}animate(e){"string"==typeof e?c.default.get(e).then((e=>{this.animation.set(e.data)})):"object"==typeof e&&this.animation.set(new l.default(e))}};const f={name:"dummy",animations:[],timeline:[],subtitles:[]},m={isWorking:!1,videoSrc:"",videoElement:document.createElement("video")},g={buffer:{poseWorldLandmarks:new Array,poseAngles:new d.PoseAngles,image:document.createElement("canvas")},goal:0,history:new Array},v={component:void 0,modalElement:document.createElement("div")}},3478:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Member=t.default=void 0;var r=n(8783);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i(r).default}});var s=n(183);Object.defineProperty(t,"Member",{enumerable:!0,get:function(){return i(s).default}})},183:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{app;constructor(e){this.app=e}}},6183:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(183)),s=i(n(2751)),a=i(n(7810)),o=i(n(4362));class l extends r.default{members;constructor(e){super(e),this.members=new Array,this.members.push(new s.default(this.app)),this.members.push(new a.default(this.app)),this.members.push(new o.default(this.app))}}t.default=l},2751:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(183)),s=i(n(2103));class a extends r.default{constructor(e){super(e),this.app.isLoading.hang(this.onLoadChange.bind(this)),this.app.isLoading.set(this.app.isLoading.get())}onLoadChange(e){if(e){if(void 0===this.app.modal.get().component){const e={...this.app.modal.get()};e.component=new s.default(this.app),this.app.modal.set(e)}}else{const e={...this.app.modal.get()};e.component?.destructor(),e.component=void 0,this.app.modal.set(e)}}}t.default=a},7810:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(183));class s extends r.default{constructor(e){super(e),this.app.currentTime.hang(this.onTimeChange.bin