@betorigami/games 0.7.13 → 0.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +253 -253
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames:T5}=Object;var s5=Object.prototype.hasOwnProperty;var S5=(o,d,i)=>{i=o!=null?u5(R5(o)):{};let r=d||!o||!o.__esModule?M2(i,"default",{value:o,enumerable:!0}):i;for(let h of T5(o))if(!s5.call(r,h))M2(r,h,{get:()=>o[h],enumerable:!0});return r};var O5=(o,d)=>()=>(d||o((d={exports:{}}).exports,d),d.exports);var f=function(o,d,i,r){var h=arguments.length,a=h<3?d:r===null?r=Object.getOwnPropertyDescriptor(d,i):r,g;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(o,d,i,r);else for(var l=o.length-1;l>=0;l--)if(g=o[l])a=(h<3?g(a):h>3?g(d,i,a):g(d,i))||a;return h>3&&a&&Object.defineProperty(d,i,a),a};var jd=O5((W1,T1)=>{typeof document!=="undefined"&&typeof navigator!=="undefined"&&function(o,d){typeof W1==="object"&&typeof T1!=="undefined"?T1.exports=d():typeof define==="function"&&define.amd?define(d):(o=typeof globalThis!=="undefined"?globalThis:o||self,o.lottie=d())}(W1,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function o(d){_useWebWorker=!!d},getWebWorker=function o(){return _useWebWorker},setLocationHref=function o(d){locationHref=d},getLocationHref=function o(){return locationHref};function createTag(o){return document.createElement(o)}function extendPrototype(o,d){var i,r=o.length,h;for(i=0;i<r;i+=1){h=o[i].prototype;for(var a in h)if(Object.prototype.hasOwnProperty.call(h,a))d.prototype[a]=h[a]}}function getDescriptor(o,d){return Object.getOwnPropertyDescriptor(o,d)}function createProxyFunction(o){function d(){}return d.prototype=o,d}var audioControllerFactory=function(){function o(d){this.audios=[],this.audioFactory=d,this._volume=1,this._isMuted=!1}return o.prototype={addAudio:function d(i){this.audios.push(i)},pause:function d(){var i,r=this.audios.length;for(i=0;i<r;i+=1)this.audios[i].pause()},resume:function d(){var i,r=this.audios.length;for(i=0;i<r;i+=1)this.audios[i].resume()},setRate:function d(i){var r,h=this.audios.length;for(r=0;r<h;r+=1)this.audios[r].setRate(i)},createAudio:function d(i){if(this.audioFactory)return this.audioFactory(i);if(window.Howl)return new window.Howl({src:[i]});return{isPlaying:!1,play:function r(){this.isPlaying=!0},seek:function r(){this.isPlaying=!1},playing:function r(){},rate:function r(){},setVolume:function r(){}}},setAudioFactory:function d(i){this.audioFactory=i},setVolume:function d(i){this._volume=i,this._updateVolume()},mute:function d(){this._isMuted=!0,this._updateVolume()},unmute:function d(){this._isMuted=!1,this._updateVolume()},getVolume:function d(){return this._volume},_updateVolume:function d(){var i,r=this.audios.length;for(i=0;i<r;i+=1)this.audios[i].volume(this._volume*(this._isMuted?0:1))}},function(){return new o}}(),createTypedArray=function(){function o(i,r){var h=0,a=[],g;switch(i){case"int16":case"uint8c":g=1;break;default:g=1.1;break}for(h=0;h<r;h+=1)a.push(g);return a}function d(i,r){if(i==="float32")return new Float32Array(r);if(i==="int16")return new Int16Array(r);if(i==="uint8c")return new Uint8ClampedArray(r);return o(i,r)}if(typeof Uint8ClampedArray==="function"&&typeof Float32Array==="function")return d;return o}();function createSizedArray(o){return Array.apply(null,{length:o})}function _typeof$6(o){return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$6(o)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var o=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],d,i=o.length;for(d=0;d<i;d+=1)BMMath[o[d]]=Math[o[d]]})();function ProjectInterface$1(){return{}}BMMath.random=Math.random,BMMath.abs=function(o){var d=_typeof$6(o);if(d==="object"&&o.length){var i=createSizedArray(o.length),r,h=o.length;for(r=0;r<h;r+=1)i[r]=Math.abs(o[r]);return i}return Math.abs(o)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=0.5519;function roundValues(o){_shouldRoundValues=!!o}function bmRnd(o){if(_shouldRoundValues)return Math.round(o);return o}function styleDiv(o){o.style.position="absolute",o.style.top=0,o.style.left=0,o.style.display="block",o.style.transformOrigin="0 0",o.style.webkitTransformOrigin="0 0",o.style.backfaceVisibility="visible",o.style.webkitBackfaceVisibility="visible",o.style.transformStyle="preserve-3d",o.style.webkitTransformStyle="preserve-3d",o.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(o,d,i,r){this.type=o,this.currentTime=d,this.totalTime=i,this.direction=r<0?-1:1}function BMCompleteEvent(o,d){this.type=o,this.direction=d<0?-1:1}function BMCompleteLoopEvent(o,d,i,r){this.type=o,this.currentLoop=i,this.totalLoops=d,this.direction=r<0?-1:1}function BMSegmentStartEvent(o,d,i){this.type=o,this.firstFrame=d,this.totalFrames=i}function BMDestroyEvent(o,d){this.type=o,this.target=d}function BMRenderFrameErrorEvent(o,d){this.type="renderFrameError",this.nativeError=o,this.currentTime=d}function BMConfigErrorEvent(o){this.type="configError",this.nativeError=o}function BMAnimationConfigErrorEvent(o,d){this.type=o,this.nativeError=d}var createElementID=function(){var o=0;return function d(){return o+=1,idPrefix$1+"__lottie_element_"+o}}();function HSVtoRGB(o,d,i){var r,h,a,g,l,x,w,z;switch(g=Math.floor(o*6),l=o*6-g,x=i*(1-d),w=i*(1-l*d),z=i*(1-(1-l)*d),g%6){case 0:r=i,h=z,a=x;break;case 1:r=w,h=i,a=x;break;case 2:r=x,h=i,a=z;break;case 3:r=x,h=w,a=i;break;case 4:r=z,h=x,a=i;break;case 5:r=i,h=x,a=w;break;default:break}return[r,h,a]}function RGBtoHSV(o,d,i){var r=Math.max(o,d,i),h=Math.min(o,d,i),a=r-h,g,l=r===0?0:a/r,x=r/255;switch(r){case h:g=0;break;case o:g=d-i+a*(d<i?6:0),g/=6*a;break;case d:g=i-o+a*2,g/=6*a;break;case i:g=o-d+a*4,g/=6*a;break;default:break}return[g,l,x]}function addSaturationToRGB(o,d){var i=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);if(i[1]+=d,i[1]>1)i[1]=1;else if(i[1]<=0)i[1]=0;return HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(o,d){var i=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);if(i[2]+=d,i[2]>1)i[2]=1;else if(i[2]<0)i[2]=0;return HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(o,d){var i=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);if(i[0]+=d/360,i[0]>1)i[0]-=1;else if(i[0]<0)i[0]+=1;return HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var o=[],d,i;for(d=0;d<256;d+=1)i=d.toString(16),o[d]=i.length===1?"0"+i:i;return function(r,h,a){if(r<0)r=0;if(h<0)h=0;if(a<0)a=0;return"#"+o[r]+o[h]+o[a]}}(),setSubframeEnabled=function o(d){subframeEnabled=!!d},getSubframeEnabled=function o(){return subframeEnabled},setExpressionsPlugin=function o(d){expressionsPlugin=d},getExpressionsPlugin=function o(){return expressionsPlugin},setExpressionInterfaces=function o(d){expressionsInterfaces=d},getExpressionInterfaces=function o(){return expressionsInterfaces},setDefaultCurveSegments=function o(d){defaultCurveSegments=d},getDefaultCurveSegments=function o(){return defaultCurveSegments},setIdPrefix=function o(d){idPrefix$1=d},getIdPrefix=function o(){return idPrefix$1};function createNS(o){return document.createElementNS(svgNS,o)}function _typeof$5(o){return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$5(o)}var dataManager=function(){var o=1,d=[],i,r,h={onmessage:function n(){},postMessage:function n(Y){i({data:Y})}},a={postMessage:function n(Y){h.onmessage({data:Y})}};function g(n){if(window.Worker&&window.Blob&&getWebWorker()){var Y=new Blob(["var _workerSelf = self; self.onmessage = ",n.toString()],{type:"text/javascript"}),H=URL.createObjectURL(Y);return new Worker(H)}return i=n,h}function l(){if(!r)r=g(function n(Y){function H(){function I(K,Q){var W,b,J=K.length,R,G,D,t;for(b=0;b<J;b+=1)if(W=K[b],"ks"in W&&!W.completed){if(W.completed=!0,W.hasMask){var E=W.masksProperties;G=E.length;for(R=0;R<G;R+=1)if(E[R].pt.k.i)X(E[R].pt.k);else{t=E[R].pt.k.length;for(D=0;D<t;D+=1){if(E[R].pt.k[D].s)X(E[R].pt.k[D].s[0]);if(E[R].pt.k[D].e)X(E[R].pt.k[D].e[0])}}}if(W.ty===0)W.layers=v(W.refId,Q),I(W.layers,Q);else if(W.ty===4)k(W.shapes);else if(W.ty===5)C(W)}}function Z(K,Q){if(K){var W=0,b=K.length;for(W=0;W<b;W+=1)if(K[W].t===1)K[W].data.layers=v(K[W].data.refId,Q),I(K[W].data.layers,Q)}}function c(K,Q){var W=0,b=Q.length;while(W<b){if(Q[W].id===K)return Q[W];W+=1}return null}function v(K,Q){var W=c(K,Q);if(W){if(!W.layers.__used)return W.layers.__used=!0,W.layers;return JSON.parse(JSON.stringify(W.layers))}return null}function k(K){var Q,W=K.length,b,J;for(Q=W-1;Q>=0;Q-=1)if(K[Q].ty==="sh")if(K[Q].ks.k.i)X(K[Q].ks.k);else{J=K[Q].ks.k.length;for(b=0;b<J;b+=1){if(K[Q].ks.k[b].s)X(K[Q].ks.k[b].s[0]);if(K[Q].ks.k[b].e)X(K[Q].ks.k[b].e[0])}}else if(K[Q].ty==="gr")k(K[Q].it)}function X(K){var Q,W=K.i.length;for(Q=0;Q<W;Q+=1)K.i[Q][0]+=K.v[Q][0],K.i[Q][1]+=K.v[Q][1],K.o[Q][0]+=K.v[Q][0],K.o[Q][1]+=K.v[Q][1]}function V(K,Q){var W=Q?Q.split("."):[100,100,100];if(K[0]>W[0])return!0;if(W[0]>K[0])return!1;if(K[1]>W[1])return!0;if(W[1]>K[1])return!1;if(K[2]>W[2])return!0;if(W[2]>K[2])return!1;return null}var u=function(){var K=[4,4,14];function Q(b){var J=b.t.d;b.t.d={k:[{s:J,t:0}]}}function W(b){var J,R=b.length;for(J=0;J<R;J+=1)if(b[J].ty===5)Q(b[J])}return function(b){if(V(K,b.v)){if(W(b.layers),b.assets){var J,R=b.assets.length;for(J=0;J<R;J+=1)if(b.assets[J].layers)W(b.assets[J].layers)}}}}(),p=function(){var K=[4,7,99];return function(Q){if(Q.chars&&!V(K,Q.v)){var W,b=Q.chars.length;for(W=0;W<b;W+=1){var J=Q.chars[W];if(J.data&&J.data.shapes){if(k(J.data.shapes),J.data.ip=0,J.data.op=99999,J.data.st=0,J.data.sr=1,J.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},!Q.chars[W].t)J.data.shapes.push({ty:"no"}),J.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})}}}}}(),U=function(){var K=[5,7,15];function Q(b){var J=b.t.p;if(typeof J.a==="number")J.a={a:0,k:J.a};if(typeof J.p==="number")J.p={a:0,k:J.p};if(typeof J.r==="number")J.r={a:0,k:J.r}}function W(b){var J,R=b.length;for(J=0;J<R;J+=1)if(b[J].ty===5)Q(b[J])}return function(b){if(V(K,b.v)){if(W(b.layers),b.assets){var J,R=b.assets.length;for(J=0;J<R;J+=1)if(b.assets[J].layers)W(b.assets[J].layers)}}}}(),F=function(){var K=[4,1,9];function Q(b){var J,R=b.length,G,D;for(J=0;J<R;J+=1)if(b[J].ty==="gr")Q(b[J].it);else if(b[J].ty==="fl"||b[J].ty==="st")if(b[J].c.k&&b[J].c.k[0].i){D=b[J].c.k.length;for(G=0;G<D;G+=1){if(b[J].c.k[G].s)b[J].c.k[G].s[0]/=255,b[J].c.k[G].s[1]/=255,b[J].c.k[G].s[2]/=255,b[J].c.k[G].s[3]/=255;if(b[J].c.k[G].e)b[J].c.k[G].e[0]/=255,b[J].c.k[G].e[1]/=255,b[J].c.k[G].e[2]/=255,b[J].c.k[G].e[3]/=255}}else b[J].c.k[0]/=255,b[J].c.k[1]/=255,b[J].c.k[2]/=255,b[J].c.k[3]/=255}function W(b){var J,R=b.length;for(J=0;J<R;J+=1)if(b[J].ty===4)Q(b[J].shapes)}return function(b){if(V(K,b.v)){if(W(b.layers),b.assets){var J,R=b.assets.length;for(J=0;J<R;J+=1)if(b.assets[J].layers)W(b.assets[J].layers)}}}}(),L=function(){var K=[4,4,18];function Q(b){var J,R=b.length,G,D;for(J=R-1;J>=0;J-=1)if(b[J].ty==="sh")if(b[J].ks.k.i)b[J].ks.k.c=b[J].closed;else{D=b[J].ks.k.length;for(G=0;G<D;G+=1){if(b[J].ks.k[G].s)b[J].ks.k[G].s[0].c=b[J].closed;if(b[J].ks.k[G].e)b[J].ks.k[G].e[0].c=b[J].closed}}else if(b[J].ty==="gr")Q(b[J].it)}function W(b){var J,R,G=b.length,D,t,E,m;for(R=0;R<G;R+=1){if(J=b[R],J.hasMask){var d0=J.masksProperties;t=d0.length;for(D=0;D<t;D+=1)if(d0[D].pt.k.i)d0[D].pt.k.c=d0[D].cl;else{m=d0[D].pt.k.length;for(E=0;E<m;E+=1){if(d0[D].pt.k[E].s)d0[D].pt.k[E].s[0].c=d0[D].cl;if(d0[D].pt.k[E].e)d0[D].pt.k[E].e[0].c=d0[D].cl}}}if(J.ty===4)Q(J.shapes)}}return function(b){if(V(K,b.v)){if(W(b.layers),b.assets){var J,R=b.assets.length;for(J=0;J<R;J+=1)if(b.assets[J].layers)W(b.assets[J].layers)}}}}();function j(K){if(K.__complete)return;F(K),u(K),p(K),U(K),L(K),I(K.layers,K.assets),Z(K.chars,K.assets),K.__complete=!0}function C(K){if(K.t.a.length===0&&!("m"in K.t.p));}var T={};return T.completeData=j,T.checkColors=F,T.checkChars=p,T.checkPathProperties=U,T.checkShapes=L,T.completeLayers=I,T}if(!a.dataManager)a.dataManager=H();if(!a.assetLoader)a.assetLoader=function(){function I(c){var v=c.getResponseHeader("content-type");if(v&&c.responseType==="json"&&v.indexOf("json")!==-1)return c.response;if(c.response&&_typeof$5(c.response)==="object")return c.response;if(c.response&&typeof c.response==="string")return JSON.parse(c.response);if(c.responseText)return JSON.parse(c.responseText);return null}function Z(c,v,k,X){var V,u=new XMLHttpRequest;try{u.responseType="json"}catch(p){}u.onreadystatechange=function(){if(u.readyState===4)if(u.status===200)V=I(u),k(V);else try{V=I(u),k(V)}catch(p){if(X)X(p)}};try{u.open(["G","E","T"].join(""),c,!0)}catch(p){u.open(["G","E","T"].join(""),v+"/"+c,!0)}u.send()}return{load:Z}}();if(Y.data.type==="loadAnimation")a.assetLoader.load(Y.data.path,Y.data.fullPath,function(I){a.dataManager.completeData(I),a.postMessage({id:Y.data.id,payload:I,status:"success"})},function(){a.postMessage({id:Y.data.id,status:"error"})});else if(Y.data.type==="complete"){var $=Y.data.animation;a.dataManager.completeData($),a.postMessage({id:Y.data.id,payload:$,status:"success"})}else if(Y.data.type==="loadData")a.assetLoader.load(Y.data.path,Y.data.fullPath,function(I){a.postMessage({id:Y.data.id,payload:I,status:"success"})},function(){a.postMessage({id:Y.data.id,status:"error"})})}),r.onmessage=function(n){var Y=n.data,H=Y.id,$=d[H];if(d[H]=null,Y.status==="success")$.onComplete(Y.payload);else if($.onError)$.onError()}}function x(n,Y){o+=1;var H="processId_"+o;return d[H]={onComplete:n,onError:Y},H}function w(n,Y,H){l();var $=x(Y,H);r.postMessage({type:"loadAnimation",path:n,fullPath:window.location.origin+window.location.pathname,id:$})}function z(n,Y,H){l();var $=x(Y,H);r.postMessage({type:"loadData",path:n,fullPath:window.location.origin+window.location.pathname,id:$})}function _(n,Y,H){l();var $=x(Y,H);r.postMessage({type:"complete",animation:n,id:$})}return{loadAnimation:w,loadData:z,completeAnimation:_}}(),ImagePreloader=function(){var o=function(){var Z=createTag("canvas");Z.width=1,Z.height=1;var c=Z.getContext("2d");return c.fillStyle="rgba(0,0,0,0)",c.fillRect(0,0,1,1),Z}();function d(){if(this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages){if(this.imagesLoadedCb)this.imagesLoadedCb(null)}}function i(){if(this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages){if(this.imagesLoadedCb)this.imagesLoadedCb(null)}}function r(Z,c,v){var k="";if(Z.e)k=Z.p;else if(c){var X=Z.p;if(X.indexOf("images/")!==-1)X=X.split("/")[1];k=c+X}else k=v,k+=Z.u?Z.u:"",k+=Z.p;return k}function h(Z){var c=0,v=setInterval(function(){var k=Z.getBBox();if(k.width||c>500)this._imageLoaded(),clearInterval(v);c+=1}.bind(this),50)}function a(Z){var c=r(Z,this.assetsPath,this.path),v=createNS("image");if(isSafari)this.testImageLoaded(v);else v.addEventListener("load",this._imageLoaded,!1);if(v.addEventListener("error",function(){k.img=o,this._imageLoaded()}.bind(this),!1),v.setAttributeNS("http://www.w3.org/1999/xlink","href",c),this._elementHelper.append)this._elementHelper.append(v);else this._elementHelper.appendChild(v);var k={img:v,assetData:Z};return k}function g(Z){var c=r(Z,this.assetsPath,this.path),v=createTag("img");v.crossOrigin="anonymous",v.addEventListener("load",this._imageLoaded,!1),v.addEventListener("error",function(){k.img=o,this._imageLoaded()}.bind(this),!1),v.src=c;var k={img:v,assetData:Z};return k}function l(Z){var c={assetData:Z},v=r(Z,this.assetsPath,this.path);return dataManager.loadData(v,function(k){c.img=k,this._footageLoaded()}.bind(this),function(){c.img={},this._footageLoaded()}.bind(this)),c}function x(Z,c){this.imagesLoadedCb=c;var v,k=Z.length;for(v=0;v<k;v+=1)if(!Z[v].layers){if(!Z[v].t||Z[v].t==="seq")this.totalImages+=1,this.images.push(this._createImageData(Z[v]));else if(Z[v].t===3)this.totalFootages+=1,this.images.push(this.createFootageData(Z[v]))}}function w(Z){this.path=Z||""}function z(Z){this.assetsPath=Z||""}function _(Z){var c=0,v=this.images.length;while(c<v){if(this.images[c].assetData===Z)return this.images[c].img;c+=1}return null}function n(){this.imagesLoadedCb=null,this.images.length=0}function Y(){return this.totalImages===this.loadedAssets}function H(){return this.totalFootages===this.loadedFootagesCount}function $(Z,c){if(Z==="svg")this._elementHelper=c,this._createImageData=this.createImageData.bind(this);else this._createImageData=this.createImgData.bind(this)}function I(){this._imageLoaded=d.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=h.bind(this),this.createFootageData=l.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return I.prototype={loadAssets:x,setAssetsPath:z,setPath:w,loadedImages:Y,loadedFootages:H,destroy:n,getAsset:_,createImgData:g,createImageData:a,imageLoaded:d,footageLoaded:i,setCacheType:$},I}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function o(d,i){if(this._cbs[d]){var r=this._cbs[d];for(var h=0;h<r.length;h+=1)r[h](i)}},addEventListener:function o(d,i){if(!this._cbs[d])this._cbs[d]=[];return this._cbs[d].push(i),function(){this.removeEventListener(d,i)}.bind(this)},removeEventListener:function o(d,i){if(!i)this._cbs[d]=null;else if(this._cbs[d]){var r=0,h=this._cbs[d].length;while(r<h){if(this._cbs[d][r]===i)this._cbs[d].splice(r,1),r-=1,h-=1;r+=1}if(!this._cbs[d].length)this._cbs[d]=null}}};var markerParser=function(){function o(d){var i=d.split(`\r
|
|
2
|
-
`),r={},h,a=0;for(var g=0;g<i.length;g+=1)if(h=i[g].split(":"),h.length===2)r[h[0]]=h[1].trim(),a+=1;if(a===0)throw new Error;return r}return function(d){var i=[];for(var r=0;r<d.length;r+=1){var h=d[r],a={time:h.tm,duration:h.dr};try{a.payload=JSON.parse(d[r].cm)}catch(g){try{a.payload=o(d[r].cm)}catch(l){a.payload={name:d[r].cm}}}i.push(a)}return i}}(),ProjectInterface=function(){function o(d){this.compositions.push(d)}return function(){function d(i){var r=0,h=this.compositions.length;while(r<h){if(this.compositions[r].data&&this.compositions[r].data.nm===i){if(this.compositions[r].prepareFrame&&this.compositions[r].data.xt)this.compositions[r].prepareFrame(this.currentFrame);return this.compositions[r].compInterface}r+=1}return null}return d.compositions=[],d.currentFrame=0,d.registerComposition=o,d}}(),renderers={},registerRenderer=function o(d,i){renderers[d]=i};function getRenderer(o){return renderers[o]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var o in renderers)if(renderers[o])return o;return""}function _typeof$4(o){return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$4(o)}var AnimationItem=function o(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(o){if(o.wrapper||o.container)this.wrapper=o.wrapper||o.container;var d="svg";if(o.animType)d=o.animType;else if(o.renderer)d=o.renderer;var i=getRenderer(d);if(this.renderer=new i(this,o.rendererSettings),this.imagePreloader.setCacheType(d,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=d,o.loop===""||o.loop===null||o.loop===void 0||o.loop===!0)this.loop=!0;else if(o.loop===!1)this.loop=!1;else this.loop=parseInt(o.loop,10);if(this.autoplay="autoplay"in o?o.autoplay:!0,this.name=o.name?o.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(o,"autoloadSegments")?o.autoloadSegments:!0,this.assetsPath=o.assetsPath,this.initialSegment=o.initialSegment,o.audioFactory)this.audioController.setAudioFactory(o.audioFactory);if(o.animationData)this.setupAnimation(o.animationData);else if(o.path){if(o.path.lastIndexOf("\\")!==-1)this.path=o.path.substr(0,o.path.lastIndexOf("\\")+1);else this.path=o.path.substr(0,o.path.lastIndexOf("/")+1);this.fileName=o.path.substr(o.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(o.path,this.configAnimation,this.onSetupError)}},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(o){dataManager.completeAnimation(o,this.configAnimation)},AnimationItem.prototype.setData=function(o,d){if(d){if(_typeof$4(d)!=="object")d=JSON.parse(d)}var i={wrapper:o,animationData:d},r=o.attributes;i.path=r.getNamedItem("data-animation-path")?r.getNamedItem("data-animation-path").value:r.getNamedItem("data-bm-path")?r.getNamedItem("data-bm-path").value:r.getNamedItem("bm-path")?r.getNamedItem("bm-path").value:"",i.animType=r.getNamedItem("data-anim-type")?r.getNamedItem("data-anim-type").value:r.getNamedItem("data-bm-type")?r.getNamedItem("data-bm-type").value:r.getNamedItem("bm-type")?r.getNamedItem("bm-type").value:r.getNamedItem("data-bm-renderer")?r.getNamedItem("data-bm-renderer").value:r.getNamedItem("bm-renderer")?r.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var h=r.getNamedItem("data-anim-loop")?r.getNamedItem("data-anim-loop").value:r.getNamedItem("data-bm-loop")?r.getNamedItem("data-bm-loop").value:r.getNamedItem("bm-loop")?r.getNamedItem("bm-loop").value:"";if(h==="false")i.loop=!1;else if(h==="true")i.loop=!0;else if(h!=="")i.loop=parseInt(h,10);var a=r.getNamedItem("data-anim-autoplay")?r.getNamedItem("data-anim-autoplay").value:r.getNamedItem("data-bm-autoplay")?r.getNamedItem("data-bm-autoplay").value:r.getNamedItem("bm-autoplay")?r.getNamedItem("bm-autoplay").value:!0;i.autoplay=a!=="false",i.name=r.getNamedItem("data-name")?r.getNamedItem("data-name").value:r.getNamedItem("data-bm-name")?r.getNamedItem("data-bm-name").value:r.getNamedItem("bm-name")?r.getNamedItem("bm-name").value:"";var g=r.getNamedItem("data-anim-prerender")?r.getNamedItem("data-anim-prerender").value:r.getNamedItem("data-bm-prerender")?r.getNamedItem("data-bm-prerender").value:r.getNamedItem("bm-prerender")?r.getNamedItem("bm-prerender").value:"";if(g==="false")i.prerender=!1;if(!i.path)this.trigger("destroy");else this.setParams(i)},AnimationItem.prototype.includeLayers=function(o){if(o.op>this.animationData.op)this.animationData.op=o.op,this.totalFrames=Math.floor(o.op-this.animationData.ip);var d=this.animationData.layers,i,r=d.length,h=o.layers,a,g=h.length;for(a=0;a<g;a+=1){i=0;while(i<r){if(d[i].id===h[a].id){d[i]=h[a];break}i+=1}}if(o.chars||o.fonts)this.renderer.globalData.fontManager.addChars(o.chars),this.renderer.globalData.fontManager.addFonts(o.fonts,this.renderer.globalData.defs);if(o.assets){r=o.assets.length;for(i=0;i<r;i+=1)this.animationData.assets.push(o.assets[i])}this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(o){this.animationData=o;var d=getExpressionsPlugin();if(d)d.initExpressions(this);this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var o=this.animationData.segments;if(!o||o.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var d=o.shift();this.timeCompleted=d.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(i,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){var o=this.animationData.segments;if(!o)this.timeCompleted=this.totalFrames;this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(o){if(!this.renderer)return;try{if(this.animationData=o,this.initialSegment)this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0]);else this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip);if(this.renderer.configAnimation(o),!o.assets)o.assets=[];if(this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1000,this.renderer.searchExtraCompositions(o.assets),this.markers=markerParser(o.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused)this.audioController.pause()}catch(d){this.triggerConfigError(d)}},AnimationItem.prototype.waitForFontsLoaded=function(){if(!this.renderer)return;if(this.renderer.globalData.fontManager.isLoaded)this.checkLoaded();else setTimeout(this.waitForFontsLoaded.bind(this),20)},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var o=getExpressionsPlugin();if(o)o.initExpressions(this);if(this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay)this.play()}},AnimationItem.prototype.resize=function(o,d){var i=typeof o==="number"?o:void 0,r=typeof d==="number"?d:void 0;this.renderer.updateContainerSize(i,r)},AnimationItem.prototype.setSubframe=function(o){this.isSubframeEnabled=!!o},AnimationItem.prototype.gotoFrame=function(){if(this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted)this.currentFrame=this.timeCompleted;this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(this.isLoaded===!1||!this.renderer)return;try{if(this.expressionsPlugin)this.expressionsPlugin.resetFrame();this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(o){this.triggerRenderFrameError(o)}},AnimationItem.prototype.play=function(o){if(o&&this.name!==o)return;if(this.isPaused===!0){if(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle)this._idle=!1,this.trigger("_active")}},AnimationItem.prototype.pause=function(o){if(o&&this.name!==o)return;if(this.isPaused===!1)this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause()},AnimationItem.prototype.togglePause=function(o){if(o&&this.name!==o)return;if(this.isPaused===!0)this.play();else this.pause()},AnimationItem.prototype.stop=function(o){if(o&&this.name!==o)return;this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0)},AnimationItem.prototype.getMarkerData=function(o){var d;for(var i=0;i<this.markers.length;i+=1)if(d=this.markers[i],d.payload&&d.payload.name===o)return d;return null},AnimationItem.prototype.goToAndStop=function(o,d,i){if(i&&this.name!==i)return;var r=Number(o);if(isNaN(r)){var h=this.getMarkerData(o);if(h)this.goToAndStop(h.time,!0)}else if(d)this.setCurrentRawFrameValue(o);else this.setCurrentRawFrameValue(o*this.frameModifier);this.pause()},AnimationItem.prototype.goToAndPlay=function(o,d,i){if(i&&this.name!==i)return;var r=Number(o);if(isNaN(r)){var h=this.getMarkerData(o);if(h)if(!h.duration)this.goToAndStop(h.time,!0);else this.playSegments([h.time,h.time+h.duration],!0)}else this.goToAndStop(r,d,i);this.play()},AnimationItem.prototype.advanceTime=function(o){if(this.isPaused===!0||this.isLoaded===!1)return;var d=this.currentRawFrame+o*this.frameModifier,i=!1;if(d>=this.totalFrames-1&&this.frameModifier>0)if(!this.loop||this.playCount===this.loop){if(!this.checkSegments(d>this.totalFrames?d%this.totalFrames:0))i=!0,d=this.totalFrames-1}else if(d>=this.totalFrames){if(this.playCount+=1,!this.checkSegments(d%this.totalFrames))this.setCurrentRawFrameValue(d%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete")}else this.setCurrentRawFrameValue(d);else if(d<0){if(!this.checkSegments(d%this.totalFrames))if(this.loop&&!(this.playCount--<=0&&this.loop!==!0))if(this.setCurrentRawFrameValue(this.totalFrames+d%this.totalFrames),!this._completedLoop)this._completedLoop=!0;else this.trigger("loopComplete");else i=!0,d=0}else this.setCurrentRawFrameValue(d);if(i)this.setCurrentRawFrameValue(d),this.pause(),this.trigger("complete")},AnimationItem.prototype.adjustSegment=function(o,d){if(this.playCount=0,o[1]<o[0]){if(this.frameModifier>0)if(this.playSpeed<0)this.setSpeed(-this.playSpeed);else this.setDirection(-1);this.totalFrames=o[0]-o[1],this.timeCompleted=this.totalFrames,this.firstFrame=o[1],this.setCurrentRawFrameValue(this.totalFrames-0.001-d)}else if(o[1]>o[0]){if(this.frameModifier<0)if(this.playSpeed<0)this.setSpeed(-this.playSpeed);else this.setDirection(1);this.totalFrames=o[1]-o[0],this.timeCompleted=this.totalFrames,this.firstFrame=o[0],this.setCurrentRawFrameValue(0.001+d)}this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(o,d){var i=-1;if(this.isPaused){if(this.currentRawFrame+this.firstFrame<o)i=o;else if(this.currentRawFrame+this.firstFrame>d)i=d-o}if(this.firstFrame=o,this.totalFrames=d-o,this.timeCompleted=this.totalFrames,i!==-1)this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(o,d){if(d)this.segments.length=0;if(_typeof$4(o[0])==="object"){var i,r=o.length;for(i=0;i<r;i+=1)this.segments.push(o[i])}else this.segments.push(o);if(this.segments.length&&d)this.adjustSegment(this.segments.shift(),0);if(this.isPaused)this.play()},AnimationItem.prototype.resetSegments=function(o){if(this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),o)this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(o){if(this.segments.length)return this.adjustSegment(this.segments.shift(),o),!0;return!1},AnimationItem.prototype.destroy=function(o){if(o&&this.name!==o||!this.renderer)return;this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null},AnimationItem.prototype.setCurrentRawFrameValue=function(o){this.currentRawFrame=o,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(o){this.playSpeed=o,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(o){this.playDirection=o<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(o){this.loop=o},AnimationItem.prototype.setVolume=function(o,d){if(d&&this.name!==d)return;this.audioController.setVolume(o)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(o){if(o&&this.name!==o)return;this.audioController.mute()},AnimationItem.prototype.unmute=function(o){if(o&&this.name!==o)return;this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(o){var d="";if(o.e)d=o.p;else if(this.assetsPath){var i=o.p;if(i.indexOf("images/")!==-1)i=i.split("/")[1];d=this.assetsPath+i}else d=this.path,d+=o.u?o.u:"",d+=o.p;return d},AnimationItem.prototype.getAssetData=function(o){var d=0,i=this.assets.length;while(d<i){if(o===this.assets[d].id)return this.assets[d];d+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(o){return o?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(o,d,i){try{var r=this.renderer.getElementByPath(o);r.updateDocumentData(d,i)}catch(h){}},AnimationItem.prototype.trigger=function(o){if(this._cbs&&this._cbs[o])switch(o){case"enterFrame":this.triggerEvent(o,new BMEnterFrameEvent(o,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(o,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(o,new BMCompleteLoopEvent(o,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(o,new BMCompleteEvent(o,this.frameMult));break;case"segmentStart":this.triggerEvent(o,new BMSegmentStartEvent(o,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(o,new BMDestroyEvent(o,this));break;default:this.triggerEvent(o)}if(o==="enterFrame"&&this.onEnterFrame)this.onEnterFrame.call(this,new BMEnterFrameEvent(o,this.currentFrame,this.totalFrames,this.frameMult));if(o==="loopComplete"&&this.onLoopComplete)this.onLoopComplete.call(this,new BMCompleteLoopEvent(o,this.loop,this.playCount,this.frameMult));if(o==="complete"&&this.onComplete)this.onComplete.call(this,new BMCompleteEvent(o,this.frameMult));if(o==="segmentStart"&&this.onSegmentStart)this.onSegmentStart.call(this,new BMSegmentStartEvent(o,this.firstFrame,this.totalFrames));if(o==="destroy"&&this.onDestroy)this.onDestroy.call(this,new BMDestroyEvent(o,this))},AnimationItem.prototype.triggerRenderFrameError=function(o){var d=new BMRenderFrameErrorEvent(o,this.currentFrame);if(this.triggerEvent("error",d),this.onError)this.onError.call(this,d)},AnimationItem.prototype.triggerConfigError=function(o){var d=new BMConfigErrorEvent(o,this.currentFrame);if(this.triggerEvent("error",d),this.onError)this.onError.call(this,d)};var animationManager=function(){var o={},d=[],i=0,r=0,h=0,a=!0,g=!1;function l(Q){var W=0,b=Q.target;while(W<r){if(d[W].animation===b){if(d.splice(W,1),W-=1,r-=1,!b.isPaused)_()}W+=1}}function x(Q,W){if(!Q)return null;var b=0;while(b<r){if(d[b].elem===Q&&d[b].elem!==null)return d[b].animation;b+=1}var J=new AnimationItem;return n(J,Q),J.setData(Q,W),J}function w(){var Q,W=d.length,b=[];for(Q=0;Q<W;Q+=1)b.push(d[Q].animation);return b}function z(){h+=1,F()}function _(){h-=1}function n(Q,W){Q.addEventListener("destroy",l),Q.addEventListener("_active",z),Q.addEventListener("_idle",_),d.push({elem:W,animation:Q}),r+=1}function Y(Q){var W=new AnimationItem;return n(W,null),W.setParams(Q),W}function H(Q,W){var b;for(b=0;b<r;b+=1)d[b].animation.setSpeed(Q,W)}function $(Q,W){var b;for(b=0;b<r;b+=1)d[b].animation.setDirection(Q,W)}function I(Q){var W;for(W=0;W<r;W+=1)d[W].animation.play(Q)}function Z(Q){var W=Q-i,b;for(b=0;b<r;b+=1)d[b].animation.advanceTime(W);if(i=Q,h&&!g)window.requestAnimationFrame(Z);else a=!0}function c(Q){i=Q,window.requestAnimationFrame(Z)}function v(Q){var W;for(W=0;W<r;W+=1)d[W].animation.pause(Q)}function k(Q,W,b){var J;for(J=0;J<r;J+=1)d[J].animation.goToAndStop(Q,W,b)}function X(Q){var W;for(W=0;W<r;W+=1)d[W].animation.stop(Q)}function V(Q){var W;for(W=0;W<r;W+=1)d[W].animation.togglePause(Q)}function u(Q){var W;for(W=r-1;W>=0;W-=1)d[W].animation.destroy(Q)}function p(Q,W,b){var J=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),R,G=J.length;for(R=0;R<G;R+=1){if(b)J[R].setAttribute("data-bm-type",b);x(J[R],Q)}if(W&&G===0){if(!b)b="svg";var D=document.getElementsByTagName("body")[0];D.innerText="";var t=createTag("div");t.style.width="100%",t.style.height="100%",t.setAttribute("data-bm-type",b),D.appendChild(t),x(t,Q)}}function U(){var Q;for(Q=0;Q<r;Q+=1)d[Q].animation.resize()}function F(){if(!g&&h){if(a)window.requestAnimationFrame(c),a=!1}}function L(){g=!0}function j(){g=!1,F()}function C(Q,W){var b;for(b=0;b<r;b+=1)d[b].animation.setVolume(Q,W)}function T(Q){var W;for(W=0;W<r;W+=1)d[W].animation.mute(Q)}function K(Q){var W;for(W=0;W<r;W+=1)d[W].animation.unmute(Q)}return o.registerAnimation=x,o.loadAnimation=Y,o.setSpeed=H,o.setDirection=$,o.play=I,o.pause=v,o.stop=X,o.togglePause=V,o.searchAnimations=p,o.resize=U,o.goToAndStop=k,o.destroy=u,o.freeze=L,o.unfreeze=j,o.setVolume=C,o.mute=T,o.unmute=K,o.getRegisteredAnimations=w,o}(),BezierFactory=function(){var o={};o.getBezierEasing=i;var d={};function i(c,v,k,X,V){var u=V||("bez_"+c+"_"+v+"_"+k+"_"+X).replace(/\./g,"p");if(d[u])return d[u];var p=new Z([c,v,k,X]);return d[u]=p,p}var r=4,h=0.001,a=0.0000001,g=10,l=11,x=1/(l-1),w=typeof Float32Array==="function";function z(c,v){return 1-3*v+3*c}function _(c,v){return 3*v-6*c}function n(c){return 3*c}function Y(c,v,k){return((z(v,k)*c+_(v,k))*c+n(v))*c}function H(c,v,k){return 3*z(v,k)*c*c+2*_(v,k)*c+n(v)}function $(c,v,k,X,V){var u,p,U=0;do if(p=v+(k-v)/2,u=Y(p,X,V)-c,u>0)k=p;else v=p;while(Math.abs(u)>a&&++U<g);return p}function I(c,v,k,X){for(var V=0;V<r;++V){var u=H(v,k,X);if(u===0)return v;var p=Y(v,k,X)-c;v-=p/u}return v}function Z(c){this._p=c,this._mSampleValues=w?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return Z.prototype={get:function c(v){var k=this._p[0],X=this._p[1],V=this._p[2],u=this._p[3];if(!this._precomputed)this._precompute();if(k===X&&V===u)return v;if(v===0)return 0;if(v===1)return 1;return Y(this._getTForX(v),X,u)},_precompute:function c(){var v=this._p[0],k=this._p[1],X=this._p[2],V=this._p[3];if(this._precomputed=!0,v!==k||X!==V)this._calcSampleValues()},_calcSampleValues:function c(){var v=this._p[0],k=this._p[2];for(var X=0;X<l;++X)this._mSampleValues[X]=Y(X*x,v,k)},_getTForX:function c(v){var k=this._p[0],X=this._p[2],V=this._mSampleValues,u=0,p=1,U=l-1;for(;p!==U&&V[p]<=v;++p)u+=x;--p;var F=(v-V[p])/(V[p+1]-V[p]),L=u+F*x,j=H(L,k,X);if(j>=h)return I(v,L,k,X);if(j===0)return L;return $(v,u,u+x,k,X)}},o}(),pooling=function(){function o(d){return d.concat(createSizedArray(d.length))}return{double:o}}(),poolFactory=function(){return function(o,d,i){var r=0,h=o,a=createSizedArray(h),g={newElement:l,release:x};function l(){var w;if(r)r-=1,w=a[r];else w=d();return w}function x(w){if(r===h)a=pooling.double(a),h*=2;if(i)i(w);a[r]=w,r+=1}return g}}(),bezierLengthPool=function(){function o(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,o)}(),segmentsLengthPool=function(){function o(){return{lengths:[],totalLength:0}}function d(i){var r,h=i.lengths.length;for(r=0;r<h;r+=1)bezierLengthPool.release(i.lengths[r]);i.lengths.length=0}return poolFactory(8,o,d)}();function bezFunction(){var o=Math;function d(n,Y,H,$,I,Z){var c=n*$+Y*I+H*Z-I*$-Z*n-H*Y;return c>-0.001&&c<0.001}function i(n,Y,H,$,I,Z,c,v,k){if(H===0&&Z===0&&k===0)return d(n,Y,$,I,c,v);var X=o.sqrt(o.pow($-n,2)+o.pow(I-Y,2)+o.pow(Z-H,2)),V=o.sqrt(o.pow(c-n,2)+o.pow(v-Y,2)+o.pow(k-H,2)),u=o.sqrt(o.pow(c-$,2)+o.pow(v-I,2)+o.pow(k-Z,2)),p;if(X>V)if(X>u)p=X-V-u;else p=u-V-X;else if(u>V)p=u-V-X;else p=V-X-u;return p>-0.0001&&p<0.0001}var r=function(){return function(n,Y,H,$){var I=getDefaultCurveSegments(),Z,c,v,k,X,V=0,u,p=[],U=[],F=bezierLengthPool.newElement();v=H.length;for(Z=0;Z<I;Z+=1){X=Z/(I-1),u=0;for(c=0;c<v;c+=1){if(k=bmPow(1-X,3)*n[c]+3*bmPow(1-X,2)*X*H[c]+3*(1-X)*bmPow(X,2)*$[c]+bmPow(X,3)*Y[c],p[c]=k,U[c]!==null)u+=bmPow(p[c]-U[c],2);U[c]=p[c]}if(u)u=bmSqrt(u),V+=u;F.percents[Z]=X,F.lengths[Z]=V}return F.addedLength=V,F}}();function h(n){var Y=segmentsLengthPool.newElement(),H=n.c,$=n.v,I=n.o,Z=n.i,c,v=n._length,k=Y.lengths,X=0;for(c=0;c<v-1;c+=1)k[c]=r($[c],$[c+1],I[c],Z[c+1]),X+=k[c].addedLength;if(H&&v)k[c]=r($[c],$[0],I[c],Z[0]),X+=k[c].addedLength;return Y.totalLength=X,Y}function a(n){this.segmentLength=0,this.points=new Array(n)}function g(n,Y){this.partialLength=n,this.point=Y}var l=function(){var n={};return function(Y,H,$,I){var Z=(Y[0]+"_"+Y[1]+"_"+H[0]+"_"+H[1]+"_"+$[0]+"_"+$[1]+"_"+I[0]+"_"+I[1]).replace(/\./g,"p");if(!n[Z]){var c=getDefaultCurveSegments(),v,k,X,V,u,p=0,U,F,L=null;if(Y.length===2&&(Y[0]!==H[0]||Y[1]!==H[1])&&d(Y[0],Y[1],H[0],H[1],Y[0]+$[0],Y[1]+$[1])&&d(Y[0],Y[1],H[0],H[1],H[0]+I[0],H[1]+I[1]))c=2;var j=new a(c);X=$.length;for(v=0;v<c;v+=1){F=createSizedArray(X),u=v/(c-1),U=0;for(k=0;k<X;k+=1)if(V=bmPow(1-u,3)*Y[k]+3*bmPow(1-u,2)*u*(Y[k]+$[k])+3*(1-u)*bmPow(u,2)*(H[k]+I[k])+bmPow(u,3)*H[k],F[k]=V,L!==null)U+=bmPow(F[k]-L[k],2);U=bmSqrt(U),p+=U,j.points[v]=new g(U,F),L=F}j.segmentLength=p,n[Z]=j}return n[Z]}}();function x(n,Y){var{percents:H,lengths:$}=Y,I=H.length,Z=bmFloor((I-1)*n),c=n*Y.addedLength,v=0;if(Z===I-1||Z===0||c===$[Z])return H[Z];var k=$[Z]>c?-1:1,X=!0;while(X){if($[Z]<=c&&$[Z+1]>c)v=(c-$[Z])/($[Z+1]-$[Z]),X=!1;else Z+=k;if(Z<0||Z>=I-1){if(Z===I-1)return H[Z];X=!1}}return H[Z]+(H[Z+1]-H[Z])*v}function w(n,Y,H,$,I,Z){var c=x(I,Z),v=1-c,k=o.round((v*v*v*n[0]+(c*v*v+v*c*v+v*v*c)*H[0]+(c*c*v+v*c*c+c*v*c)*$[0]+c*c*c*Y[0])*1000)/1000,X=o.round((v*v*v*n[1]+(c*v*v+v*c*v+v*v*c)*H[1]+(c*c*v+v*c*c+c*v*c)*$[1]+c*c*c*Y[1])*1000)/1000;return[k,X]}var z=createTypedArray("float32",8);function _(n,Y,H,$,I,Z,c){if(I<0)I=0;else if(I>1)I=1;var v=x(I,c);Z=Z>1?1:Z;var k=x(Z,c),X,V=n.length,u=1-v,p=1-k,U=u*u*u,F=v*u*u*3,L=v*v*u*3,j=v*v*v,C=u*u*p,T=v*u*p+u*v*p+u*u*k,K=v*v*p+u*v*k+v*u*k,Q=v*v*k,W=u*p*p,b=v*p*p+u*k*p+u*p*k,J=v*k*p+u*k*k+v*p*k,R=v*k*k,G=p*p*p,D=k*p*p+p*k*p+p*p*k,t=k*k*p+p*k*k+k*p*k,E=k*k*k;for(X=0;X<V;X+=1)z[X*4]=o.round((U*n[X]+F*H[X]+L*$[X]+j*Y[X])*1000)/1000,z[X*4+1]=o.round((C*n[X]+T*H[X]+K*$[X]+Q*Y[X])*1000)/1000,z[X*4+2]=o.round((W*n[X]+b*H[X]+J*$[X]+R*Y[X])*1000)/1000,z[X*4+3]=o.round((G*n[X]+D*H[X]+t*$[X]+E*Y[X])*1000)/1000;return z}return{getSegmentsLength:h,getNewSegment:_,getPointInSegment:w,buildBezierData:l,pointOnLine2D:d,pointOnLine3D:i}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(o,d){var i=this.offsetTime,r;if(this.propType==="multidimensional")r=createTypedArray("float32",this.pv.length);var h=d.lastIndex,a=h,g=this.keyframes.length-1,l=!0,x,w,z;while(l){if(x=this.keyframes[a],w=this.keyframes[a+1],a===g-1&&o>=w.t-i){if(x.h)x=w;h=0;break}if(w.t-i>o){h=a;break}if(a<g-1)a+=1;else h=0,l=!1}z=this.keyframesMetadata[a]||{};var _,n,Y,H,$,I,Z=w.t-i,c=x.t-i,v;if(x.to){if(!z.bezierData)z.bezierData=bez.buildBezierData(x.s,w.s||x.e,x.to,x.ti);var k=z.bezierData;if(o>=Z||o<c){var X=o>=Z?k.points.length-1:0;n=k.points[X].point.length;for(_=0;_<n;_+=1)r[_]=k.points[X].point[_]}else{if(z.__fnct)I=z.__fnct;else I=BezierFactory.getBezierEasing(x.o.x,x.o.y,x.i.x,x.i.y,x.n).get,z.__fnct=I;Y=I((o-c)/(Z-c));var V=k.segmentLength*Y,u,p=d.lastFrame<o&&d._lastKeyframeIndex===a?d._lastAddedLength:0;$=d.lastFrame<o&&d._lastKeyframeIndex===a?d._lastPoint:0,l=!0,H=k.points.length;while(l){if(p+=k.points[$].partialLength,V===0||Y===0||$===k.points.length-1){n=k.points[$].point.length;for(_=0;_<n;_+=1)r[_]=k.points[$].point[_];break}else if(V>=p&&V<p+k.points[$+1].partialLength){u=(V-p)/k.points[$+1].partialLength,n=k.points[$].point.length;for(_=0;_<n;_+=1)r[_]=k.points[$].point[_]+(k.points[$+1].point[_]-k.points[$].point[_])*u;break}if($<H-1)$+=1;else l=!1}d._lastPoint=$,d._lastAddedLength=p-k.points[$].partialLength,d._lastKeyframeIndex=a}}else{var U,F,L,j,C;if(g=x.s.length,v=w.s||x.e,this.sh&&x.h!==1)if(o>=Z)r[0]=v[0],r[1]=v[1],r[2]=v[2];else if(o<=c)r[0]=x.s[0],r[1]=x.s[1],r[2]=x.s[2];else{var T=createQuaternion(x.s),K=createQuaternion(v),Q=(o-c)/(Z-c);quaternionToEuler(r,slerp(T,K,Q))}else for(a=0;a<g;a+=1){if(x.h!==1)if(o>=Z)Y=1;else if(o<c)Y=0;else{if(x.o.x.constructor===Array){if(!z.__fnct)z.__fnct=[];if(!z.__fnct[a])U=x.o.x[a]===void 0?x.o.x[0]:x.o.x[a],F=x.o.y[a]===void 0?x.o.y[0]:x.o.y[a],L=x.i.x[a]===void 0?x.i.x[0]:x.i.x[a],j=x.i.y[a]===void 0?x.i.y[0]:x.i.y[a],I=BezierFactory.getBezierEasing(U,F,L,j).get,z.__fnct[a]=I;else I=z.__fnct[a]}else if(!z.__fnct)U=x.o.x,F=x.o.y,L=x.i.x,j=x.i.y,I=BezierFactory.getBezierEasing(U,F,L,j).get,x.keyframeMetadata=I;else I=z.__fnct;Y=I((o-c)/(Z-c))}if(v=w.s||x.e,C=x.h===1?x.s[a]:x.s[a]+(v[a]-x.s[a])*Y,this.propType==="multidimensional")r[a]=C;else r=C}}return d.lastIndex=h,r}function slerp(o,d,i){var r=[],h=o[0],a=o[1],g=o[2],l=o[3],x=d[0],w=d[1],z=d[2],_=d[3],n,Y,H,$,I;if(Y=h*x+a*w+g*z+l*_,Y<0)Y=-Y,x=-x,w=-w,z=-z,_=-_;if(1-Y>0.000001)n=Math.acos(Y),H=Math.sin(n),$=Math.sin((1-i)*n)/H,I=Math.sin(i*n)/H;else $=1-i,I=i;return r[0]=$*h+I*x,r[1]=$*a+I*w,r[2]=$*g+I*z,r[3]=$*l+I*_,r}function quaternionToEuler(o,d){var i=d[0],r=d[1],h=d[2],a=d[3],g=Math.atan2(2*r*a-2*i*h,1-2*r*r-2*h*h),l=Math.asin(2*i*r+2*h*a),x=Math.atan2(2*i*a-2*r*h,1-2*i*i-2*h*h);o[0]=g/degToRads,o[1]=l/degToRads,o[2]=x/degToRads}function createQuaternion(o){var d=o[0]*degToRads,i=o[1]*degToRads,r=o[2]*degToRads,h=Math.cos(d/2),a=Math.cos(i/2),g=Math.cos(r/2),l=Math.sin(d/2),x=Math.sin(i/2),w=Math.sin(r/2),z=h*a*g-l*x*w,_=l*x*g+h*a*w,n=l*a*g+h*x*w,Y=h*x*g-l*a*w;return[_,n,Y,z]}function getValueAtCurrentTime(){var o=this.comp.renderedFrame-this.offsetTime,d=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(o===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=i&&o>=i||this._caching.lastFrame<d&&o<d))){if(this._caching.lastFrame>=o)this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0;var r=this.interpolateValue(o,this._caching);this.pv=r}return this._caching.lastFrame=o,this.pv}function setVValue(o){var d;if(this.propType==="unidimensional"){if(d=o*this.mult,mathAbs(this.v-d)>0.00001)this.v=d,this._mdf=!0}else{var i=0,r=this.v.length;while(i<r){if(d=o[i]*this.mult,mathAbs(this.v[i]-d)>0.00001)this.v[i]=d,this._mdf=!0;i+=1}}}function processEffectsSequence(){if(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)return;if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var o,d=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(o=0;o<d;o+=1)i=this.effectsSequence[o](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}function addEffect(o){this.effectsSequence.push(o),this.container.addDynamicProperty(this)}function ValueProperty(o,d,i,r){this.propType="unidimensional",this.mult=i||1,this.data=d,this.v=i?d.k*i:d.k,this.pv=d.k,this._mdf=!1,this.elem=o,this.container=r,this.comp=o.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(o,d,i,r){this.propType="multidimensional",this.mult=i||1,this.data=d,this._mdf=!1,this.elem=o,this.container=r,this.comp=o.comp,this.k=!1,this.kf=!1,this.frameId=-1;var h,a=d.k.length;this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a);for(h=0;h<a;h+=1)this.v[h]=d.k[h]*this.mult,this.pv[h]=d.k[h];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(o,d,i,r){this.propType="unidimensional",this.keyframes=d.k,this.keyframesMetadata=[],this.offsetTime=o.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=d,this.mult=i||1,this.elem=o,this.container=r,this.comp=o.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(o,d,i,r){this.propType="multidimensional";var h,a=d.k.length,g,l,x,w;for(h=0;h<a-1;h+=1)if(d.k[h].to&&d.k[h].s&&d.k[h+1]&&d.k[h+1].s){if(g=d.k[h].s,l=d.k[h+1].s,x=d.k[h].to,w=d.k[h].ti,g.length===2&&!(g[0]===l[0]&&g[1]===l[1])&&bez.pointOnLine2D(g[0],g[1],l[0],l[1],g[0]+x[0],g[1]+x[1])&&bez.pointOnLine2D(g[0],g[1],l[0],l[1],l[0]+w[0],l[1]+w[1])||g.length===3&&!(g[0]===l[0]&&g[1]===l[1]&&g[2]===l[2])&&bez.pointOnLine3D(g[0],g[1],g[2],l[0],l[1],l[2],g[0]+x[0],g[1]+x[1],g[2]+x[2])&&bez.pointOnLine3D(g[0],g[1],g[2],l[0],l[1],l[2],l[0]+w[0],l[1]+w[1],l[2]+w[2]))d.k[h].to=null,d.k[h].ti=null;if(g[0]===l[0]&&g[1]===l[1]&&x[0]===0&&x[1]===0&&w[0]===0&&w[1]===0){if(g.length===2||g[2]===l[2]&&x[2]===0&&w[2]===0)d.k[h].to=null,d.k[h].ti=null}}this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=d,this.keyframes=d.k,this.keyframesMetadata=[],this.offsetTime=o.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=i||1,this.elem=o,this.container=r,this.comp=o.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var z=d.k[0].s.length;this.v=createTypedArray("float32",z),this.pv=createTypedArray("float32",z);for(h=0;h<z;h+=1)this.v[h]=initFrame,this.pv[h]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",z)},this.addEffect=addEffect}var PropertyFactory=function(){function o(i,r,h,a,g){if(r.sid)r=i.globalData.slotManager.getProp(r);var l;if(!r.k.length)l=new ValueProperty(i,r,a,g);else if(typeof r.k[0]==="number")l=new MultiDimensionalProperty(i,r,a,g);else switch(h){case 0:l=new KeyframedValueProperty(i,r,a,g);break;case 1:l=new KeyframedMultidimensionalProperty(i,r,a,g);break;default:break}if(l.effectsSequence.length)g.addDynamicProperty(l);return l}var d={getProp:o};return d}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function o(d){if(this.dynamicProperties.indexOf(d)===-1)this.dynamicProperties.push(d),this.container.addDynamicProperty(this),this._isAnimated=!0},iterateDynamicProperties:function o(){this._mdf=!1;var d,i=this.dynamicProperties.length;for(d=0;d<i;d+=1)if(this.dynamicProperties[d].getValue(),this.dynamicProperties[d]._mdf)this._mdf=!0},initDynamicPropertyContainer:function o(d){this.container=d,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function o(){return createTypedArray("float32",2)}return poolFactory(8,o)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(o,d){this.c=o,this.setLength(d);var i=0;while(i<d)this.v[i]=pointPool.newElement(),this.o[i]=pointPool.newElement(),this.i[i]=pointPool.newElement(),i+=1},ShapePath.prototype.setLength=function(o){while(this._maxLength<o)this.doubleArrayLength();this._length=o},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(o,d,i,r,h){var a;if(this._length=Math.max(this._length,r+1),this._length>=this._maxLength)this.doubleArrayLength();switch(i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}if(!a[r]||a[r]&&!h)a[r]=pointPool.newElement();a[r][0]=o,a[r][1]=d},ShapePath.prototype.setTripleAt=function(o,d,i,r,h,a,g,l){this.setXYAt(o,d,"v",g,l),this.setXYAt(i,r,"o",g,l),this.setXYAt(h,a,"i",g,l)},ShapePath.prototype.reverse=function(){var o=new ShapePath;o.setPathData(this.c,this._length);var d=this.v,i=this.o,r=this.i,h=0;if(this.c)o.setTripleAt(d[0][0],d[0][1],r[0][0],r[0][1],i[0][0],i[0][1],0,!1),h=1;var a=this._length-1,g=this._length,l;for(l=h;l<g;l+=1)o.setTripleAt(d[a][0],d[a][1],r[a][0],r[a][1],i[a][0],i[a][1],l,!1),a-=1;return o},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function o(){return new ShapePath}function d(h){var a=h._length,g;for(g=0;g<a;g+=1)pointPool.release(h.v[g]),pointPool.release(h.i[g]),pointPool.release(h.o[g]),h.v[g]=null,h.i[g]=null,h.o[g]=null;h._length=0,h.c=!1}function i(h){var a=r.newElement(),g,l=h._length===void 0?h.v.length:h._length;a.setLength(l),a.c=h.c;for(g=0;g<l;g+=1)a.setTripleAt(h.v[g][0],h.v[g][1],h.o[g][0],h.o[g][1],h.i[g][0],h.i[g][1],g);return a}var r=poolFactory(4,o,d);return r.clone=i,r}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(o){if(this._length===this._maxLength)this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2;this.shapes[this._length]=o,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var o;for(o=0;o<this._length;o+=1)shapePool.release(this.shapes[o]);this._length=0};var shapeCollectionPool=function(){var o={newShapeCollection:h,release:a},d=0,i=4,r=createSizedArray(i);function h(){var g;if(d)d-=1,g=r[d];else g=new ShapeCollection;return g}function a(g){var l,x=g._length;for(l=0;l<x;l+=1)shapePool.release(g.shapes[l]);if(g._length=0,d===i)r=pooling.double(r),i*=2;r[d]=g,d+=1}return o}(),ShapePropertyFactory=function(){var o=-999999;function d(Z,c,v){var k=v.lastIndex,X,V,u,p,U,F,L,j,C,T=this.keyframes;if(Z<T[0].t-this.offsetTime)X=T[0].s[0],u=!0,k=0;else if(Z>=T[T.length-1].t-this.offsetTime)X=T[T.length-1].s?T[T.length-1].s[0]:T[T.length-2].e[0],u=!0;else{var K=k,Q=T.length-1,W=!0,b,J,R;while(W){if(b=T[K],J=T[K+1],J.t-this.offsetTime>Z)break;if(K<Q-1)K+=1;else W=!1}if(R=this.keyframesMetadata[K]||{},u=b.h===1,k=K,!u){if(Z>=J.t-this.offsetTime)j=1;else if(Z<b.t-this.offsetTime)j=0;else{var G;if(R.__fnct)G=R.__fnct;else G=BezierFactory.getBezierEasing(b.o.x,b.o.y,b.i.x,b.i.y).get,R.__fnct=G;j=G((Z-(b.t-this.offsetTime))/(J.t-this.offsetTime-(b.t-this.offsetTime)))}V=J.s?J.s[0]:b.e[0]}X=b.s[0]}F=c._length,L=X.i[0].length,v.lastIndex=k;for(p=0;p<F;p+=1)for(U=0;U<L;U+=1)C=u?X.i[p][U]:X.i[p][U]+(V.i[p][U]-X.i[p][U])*j,c.i[p][U]=C,C=u?X.o[p][U]:X.o[p][U]+(V.o[p][U]-X.o[p][U])*j,c.o[p][U]=C,C=u?X.v[p][U]:X.v[p][U]+(V.v[p][U]-X.v[p][U])*j,c.v[p][U]=C}function i(){var Z=this.comp.renderedFrame-this.offsetTime,c=this.keyframes[0].t-this.offsetTime,v=this.keyframes[this.keyframes.length-1].t-this.offsetTime,k=this._caching.lastFrame;if(!(k!==o&&(k<c&&Z<c||k>v&&Z>v)))this._caching.lastIndex=k<Z?this._caching.lastIndex:0,this.interpolateShape(Z,this.pv,this._caching);return this._caching.lastFrame=Z,this.pv}function r(){this.paths=this.localShapeCollection}function h(Z,c){if(Z._length!==c._length||Z.c!==c.c)return!1;var v,k=Z._length;for(v=0;v<k;v+=1)if(Z.v[v][0]!==c.v[v][0]||Z.v[v][1]!==c.v[v][1]||Z.o[v][0]!==c.o[v][0]||Z.o[v][1]!==c.o[v][1]||Z.i[v][0]!==c.i[v][0]||Z.i[v][1]!==c.i[v][1])return!1;return!0}function a(Z){if(!h(this.v,Z))this.v=shapePool.clone(Z),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection}function g(){if(this.elem.globalData.frameId===this.frameId)return;if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var Z;if(this.kf)Z=this.pv;else if(this.data.ks)Z=this.data.ks.k;else Z=this.data.pt.k;var c,v=this.effectsSequence.length;for(c=0;c<v;c+=1)Z=this.effectsSequence[c](Z);this.setVValue(Z),this.lock=!1,this.frameId=this.elem.globalData.frameId}function l(Z,c,v){this.propType="shape",this.comp=Z.comp,this.container=Z,this.elem=Z,this.data=c,this.k=!1,this.kf=!1,this._mdf=!1;var k=v===3?c.pt.k:c.ks.k;this.v=shapePool.clone(k),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r,this.effectsSequence=[]}function x(Z){this.effectsSequence.push(Z),this.container.addDynamicProperty(this)}l.prototype.interpolateShape=d,l.prototype.getValue=g,l.prototype.setVValue=a,l.prototype.addEffect=x;function w(Z,c,v){this.propType="shape",this.comp=Z.comp,this.elem=Z,this.container=Z,this.offsetTime=Z.data.st,this.keyframes=v===3?c.pt.k:c.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var k=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,k),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=o,this.reset=r,this._caching={lastFrame:o,lastIndex:0},this.effectsSequence=[i.bind(this)]}w.prototype.getValue=g,w.prototype.interpolateShape=d,w.prototype.setVValue=a,w.prototype.addEffect=x;var z=function(){var Z=roundCorner;function c(v,k){if(this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=k.d,this.elem=v,this.comp=v.comp,this.frameId=-1,this.initDynamicPropertyContainer(v),this.p=PropertyFactory.getProp(v,k.p,1,0,this),this.s=PropertyFactory.getProp(v,k.s,1,0,this),this.dynamicProperties.length)this.k=!0;else this.k=!1,this.convertEllToPath()}return c.prototype={reset:r,getValue:function v(){if(this.elem.globalData.frameId===this.frameId)return;if(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf)this.convertEllToPath()},convertEllToPath:function v(){var k=this.p.v[0],X=this.p.v[1],V=this.s.v[0]/2,u=this.s.v[1]/2,p=this.d!==3,U=this.v;U.v[0][0]=k,U.v[0][1]=X-u,U.v[1][0]=p?k+V:k-V,U.v[1][1]=X,U.v[2][0]=k,U.v[2][1]=X+u,U.v[3][0]=p?k-V:k+V,U.v[3][1]=X,U.i[0][0]=p?k-V*Z:k+V*Z,U.i[0][1]=X-u,U.i[1][0]=p?k+V:k-V,U.i[1][1]=X-u*Z,U.i[2][0]=p?k+V*Z:k-V*Z,U.i[2][1]=X+u,U.i[3][0]=p?k-V:k+V,U.i[3][1]=X+u*Z,U.o[0][0]=p?k+V*Z:k-V*Z,U.o[0][1]=X-u,U.o[1][0]=p?k+V:k-V,U.o[1][1]=X+u*Z,U.o[2][0]=p?k-V*Z:k+V*Z,U.o[2][1]=X+u,U.o[3][0]=p?k-V:k+V,U.o[3][1]=X-u*Z}},extendPrototype([DynamicPropertyContainer],c),c}(),_=function(){function Z(c,v){if(this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=c,this.comp=c.comp,this.data=v,this.frameId=-1,this.d=v.d,this.initDynamicPropertyContainer(c),v.sy===1)this.ir=PropertyFactory.getProp(c,v.ir,0,0,this),this.is=PropertyFactory.getProp(c,v.is,0,0.01,this),this.convertToPath=this.convertStarToPath;else this.convertToPath=this.convertPolygonToPath;if(this.pt=PropertyFactory.getProp(c,v.pt,0,0,this),this.p=PropertyFactory.getProp(c,v.p,1,0,this),this.r=PropertyFactory.getProp(c,v.r,0,degToRads,this),this.or=PropertyFactory.getProp(c,v.or,0,0,this),this.os=PropertyFactory.getProp(c,v.os,0,0.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length)this.k=!0;else this.k=!1,this.convertToPath()}return Z.prototype={reset:r,getValue:function c(){if(this.elem.globalData.frameId===this.frameId)return;if(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf)this.convertToPath()},convertStarToPath:function c(){var v=Math.floor(this.pt.v)*2,k=Math.PI*2/v,X=!0,V=this.or.v,u=this.ir.v,p=this.os.v,U=this.is.v,F=2*Math.PI*V/(v*2),L=2*Math.PI*u/(v*2),j,C,T,K,Q=-Math.PI/2;Q+=this.r.v;var W=this.data.d===3?-1:1;this.v._length=0;for(j=0;j<v;j+=1){C=X?V:u,T=X?p:U,K=X?F:L;var b=C*Math.cos(Q),J=C*Math.sin(Q),R=b===0&&J===0?0:J/Math.sqrt(b*b+J*J),G=b===0&&J===0?0:-b/Math.sqrt(b*b+J*J);b+=+this.p.v[0],J+=+this.p.v[1],this.v.setTripleAt(b,J,b-R*K*T*W,J-G*K*T*W,b+R*K*T*W,J+G*K*T*W,j,!0),X=!X,Q+=k*W}},convertPolygonToPath:function c(){var v=Math.floor(this.pt.v),k=Math.PI*2/v,X=this.or.v,V=this.os.v,u=2*Math.PI*X/(v*4),p,U=-Math.PI*0.5,F=this.data.d===3?-1:1;U+=this.r.v,this.v._length=0;for(p=0;p<v;p+=1){var L=X*Math.cos(U),j=X*Math.sin(U),C=L===0&&j===0?0:j/Math.sqrt(L*L+j*j),T=L===0&&j===0?0:-L/Math.sqrt(L*L+j*j);L+=+this.p.v[0],j+=+this.p.v[1],this.v.setTripleAt(L,j,L-C*u*V*F,j-T*u*V*F,L+C*u*V*F,j+T*u*V*F,p,!0),U+=k*F}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],Z),Z}(),n=function(){function Z(c,v){if(this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=c,this.comp=c.comp,this.frameId=-1,this.d=v.d,this.initDynamicPropertyContainer(c),this.p=PropertyFactory.getProp(c,v.p,1,0,this),this.s=PropertyFactory.getProp(c,v.s,1,0,this),this.r=PropertyFactory.getProp(c,v.r,0,0,this),this.dynamicProperties.length)this.k=!0;else this.k=!1,this.convertRectToPath()}return Z.prototype={convertRectToPath:function c(){var v=this.p.v[0],k=this.p.v[1],X=this.s.v[0]/2,V=this.s.v[1]/2,u=bmMin(X,V,this.r.v),p=u*(1-roundCorner);if(this.v._length=0,this.d===2||this.d===1)if(this.v.setTripleAt(v+X,k-V+u,v+X,k-V+u,v+X,k-V+p,0,!0),this.v.setTripleAt(v+X,k+V-u,v+X,k+V-p,v+X,k+V-u,1,!0),u!==0)this.v.setTripleAt(v+X-u,k+V,v+X-u,k+V,v+X-p,k+V,2,!0),this.v.setTripleAt(v-X+u,k+V,v-X+p,k+V,v-X+u,k+V,3,!0),this.v.setTripleAt(v-X,k+V-u,v-X,k+V-u,v-X,k+V-p,4,!0),this.v.setTripleAt(v-X,k-V+u,v-X,k-V+p,v-X,k-V+u,5,!0),this.v.setTripleAt(v-X+u,k-V,v-X+u,k-V,v-X+p,k-V,6,!0),this.v.setTripleAt(v+X-u,k-V,v+X-p,k-V,v+X-u,k-V,7,!0);else this.v.setTripleAt(v-X,k+V,v-X+p,k+V,v-X,k+V,2),this.v.setTripleAt(v-X,k-V,v-X,k-V+p,v-X,k-V,3);else if(this.v.setTripleAt(v+X,k-V+u,v+X,k-V+p,v+X,k-V+u,0,!0),u!==0)this.v.setTripleAt(v+X-u,k-V,v+X-u,k-V,v+X-p,k-V,1,!0),this.v.setTripleAt(v-X+u,k-V,v-X+p,k-V,v-X+u,k-V,2,!0),this.v.setTripleAt(v-X,k-V+u,v-X,k-V+u,v-X,k-V+p,3,!0),this.v.setTripleAt(v-X,k+V-u,v-X,k+V-p,v-X,k+V-u,4,!0),this.v.setTripleAt(v-X+u,k+V,v-X+u,k+V,v-X+p,k+V,5,!0),this.v.setTripleAt(v+X-u,k+V,v+X-p,k+V,v+X-u,k+V,6,!0),this.v.setTripleAt(v+X,k+V-u,v+X,k+V-u,v+X,k+V-p,7,!0);else this.v.setTripleAt(v-X,k-V,v-X+p,k-V,v-X,k-V,1,!0),this.v.setTripleAt(v-X,k+V,v-X,k+V-p,v-X,k+V,2,!0),this.v.setTripleAt(v+X,k+V,v+X-p,k+V,v+X,k+V,3,!0)},getValue:function c(){if(this.elem.globalData.frameId===this.frameId)return;if(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf)this.convertRectToPath()},reset:r},extendPrototype([DynamicPropertyContainer],Z),Z}();function Y(Z,c,v){var k;if(v===3||v===4){var X=v===3?c.pt:c.ks,V=X.k;if(V.length)k=new w(Z,c,v);else k=new l(Z,c,v)}else if(v===5)k=new n(Z,c);else if(v===6)k=new z(Z,c);else if(v===7)k=new _(Z,c);if(k.k)Z.addDynamicProperty(k);return k}function H(){return l}function $(){return w}var I={};return I.getShapeProp=Y,I.getConstructorFunction=H,I.getKeyframedConstructorFunction=$,I}();/*!
|
|
1
|
+
var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames:T5}=Object;var S5=Object.prototype.hasOwnProperty;var s5=(o,d,i)=>{i=o!=null?u5(R5(o)):{};let r=d||!o||!o.__esModule?M2(i,"default",{value:o,enumerable:!0}):i;for(let h of T5(o))if(!S5.call(r,h))M2(r,h,{get:()=>o[h],enumerable:!0});return r};var O5=(o,d)=>()=>(d||o((d={exports:{}}).exports,d),d.exports);var b=function(o,d,i,r){var h=arguments.length,a=h<3?d:r===null?r=Object.getOwnPropertyDescriptor(d,i):r,g;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(o,d,i,r);else for(var l=o.length-1;l>=0;l--)if(g=o[l])a=(h<3?g(a):h>3?g(d,i,a):g(d,i))||a;return h>3&&a&&Object.defineProperty(d,i,a),a};var jd=O5((W1,T1)=>{typeof document!=="undefined"&&typeof navigator!=="undefined"&&function(o,d){typeof W1==="object"&&typeof T1!=="undefined"?T1.exports=d():typeof define==="function"&&define.amd?define(d):(o=typeof globalThis!=="undefined"?globalThis:o||self,o.lottie=d())}(W1,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function o(d){_useWebWorker=!!d},getWebWorker=function o(){return _useWebWorker},setLocationHref=function o(d){locationHref=d},getLocationHref=function o(){return locationHref};function createTag(o){return document.createElement(o)}function extendPrototype(o,d){var i,r=o.length,h;for(i=0;i<r;i+=1){h=o[i].prototype;for(var a in h)if(Object.prototype.hasOwnProperty.call(h,a))d.prototype[a]=h[a]}}function getDescriptor(o,d){return Object.getOwnPropertyDescriptor(o,d)}function createProxyFunction(o){function d(){}return d.prototype=o,d}var audioControllerFactory=function(){function o(d){this.audios=[],this.audioFactory=d,this._volume=1,this._isMuted=!1}return o.prototype={addAudio:function d(i){this.audios.push(i)},pause:function d(){var i,r=this.audios.length;for(i=0;i<r;i+=1)this.audios[i].pause()},resume:function d(){var i,r=this.audios.length;for(i=0;i<r;i+=1)this.audios[i].resume()},setRate:function d(i){var r,h=this.audios.length;for(r=0;r<h;r+=1)this.audios[r].setRate(i)},createAudio:function d(i){if(this.audioFactory)return this.audioFactory(i);if(window.Howl)return new window.Howl({src:[i]});return{isPlaying:!1,play:function r(){this.isPlaying=!0},seek:function r(){this.isPlaying=!1},playing:function r(){},rate:function r(){},setVolume:function r(){}}},setAudioFactory:function d(i){this.audioFactory=i},setVolume:function d(i){this._volume=i,this._updateVolume()},mute:function d(){this._isMuted=!0,this._updateVolume()},unmute:function d(){this._isMuted=!1,this._updateVolume()},getVolume:function d(){return this._volume},_updateVolume:function d(){var i,r=this.audios.length;for(i=0;i<r;i+=1)this.audios[i].volume(this._volume*(this._isMuted?0:1))}},function(){return new o}}(),createTypedArray=function(){function o(i,r){var h=0,a=[],g;switch(i){case"int16":case"uint8c":g=1;break;default:g=1.1;break}for(h=0;h<r;h+=1)a.push(g);return a}function d(i,r){if(i==="float32")return new Float32Array(r);if(i==="int16")return new Int16Array(r);if(i==="uint8c")return new Uint8ClampedArray(r);return o(i,r)}if(typeof Uint8ClampedArray==="function"&&typeof Float32Array==="function")return d;return o}();function createSizedArray(o){return Array.apply(null,{length:o})}function _typeof$6(o){return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$6(o)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var o=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],d,i=o.length;for(d=0;d<i;d+=1)BMMath[o[d]]=Math[o[d]]})();function ProjectInterface$1(){return{}}BMMath.random=Math.random,BMMath.abs=function(o){var d=_typeof$6(o);if(d==="object"&&o.length){var i=createSizedArray(o.length),r,h=o.length;for(r=0;r<h;r+=1)i[r]=Math.abs(o[r]);return i}return Math.abs(o)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=0.5519;function roundValues(o){_shouldRoundValues=!!o}function bmRnd(o){if(_shouldRoundValues)return Math.round(o);return o}function styleDiv(o){o.style.position="absolute",o.style.top=0,o.style.left=0,o.style.display="block",o.style.transformOrigin="0 0",o.style.webkitTransformOrigin="0 0",o.style.backfaceVisibility="visible",o.style.webkitBackfaceVisibility="visible",o.style.transformStyle="preserve-3d",o.style.webkitTransformStyle="preserve-3d",o.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(o,d,i,r){this.type=o,this.currentTime=d,this.totalTime=i,this.direction=r<0?-1:1}function BMCompleteEvent(o,d){this.type=o,this.direction=d<0?-1:1}function BMCompleteLoopEvent(o,d,i,r){this.type=o,this.currentLoop=i,this.totalLoops=d,this.direction=r<0?-1:1}function BMSegmentStartEvent(o,d,i){this.type=o,this.firstFrame=d,this.totalFrames=i}function BMDestroyEvent(o,d){this.type=o,this.target=d}function BMRenderFrameErrorEvent(o,d){this.type="renderFrameError",this.nativeError=o,this.currentTime=d}function BMConfigErrorEvent(o){this.type="configError",this.nativeError=o}function BMAnimationConfigErrorEvent(o,d){this.type=o,this.nativeError=d}var createElementID=function(){var o=0;return function d(){return o+=1,idPrefix$1+"__lottie_element_"+o}}();function HSVtoRGB(o,d,i){var r,h,a,g,l,x,f,n;switch(g=Math.floor(o*6),l=o*6-g,x=i*(1-d),f=i*(1-l*d),n=i*(1-(1-l)*d),g%6){case 0:r=i,h=n,a=x;break;case 1:r=f,h=i,a=x;break;case 2:r=x,h=i,a=n;break;case 3:r=x,h=f,a=i;break;case 4:r=n,h=x,a=i;break;case 5:r=i,h=x,a=f;break;default:break}return[r,h,a]}function RGBtoHSV(o,d,i){var r=Math.max(o,d,i),h=Math.min(o,d,i),a=r-h,g,l=r===0?0:a/r,x=r/255;switch(r){case h:g=0;break;case o:g=d-i+a*(d<i?6:0),g/=6*a;break;case d:g=i-o+a*2,g/=6*a;break;case i:g=o-d+a*4,g/=6*a;break;default:break}return[g,l,x]}function addSaturationToRGB(o,d){var i=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);if(i[1]+=d,i[1]>1)i[1]=1;else if(i[1]<=0)i[1]=0;return HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(o,d){var i=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);if(i[2]+=d,i[2]>1)i[2]=1;else if(i[2]<0)i[2]=0;return HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(o,d){var i=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);if(i[0]+=d/360,i[0]>1)i[0]-=1;else if(i[0]<0)i[0]+=1;return HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var o=[],d,i;for(d=0;d<256;d+=1)i=d.toString(16),o[d]=i.length===1?"0"+i:i;return function(r,h,a){if(r<0)r=0;if(h<0)h=0;if(a<0)a=0;return"#"+o[r]+o[h]+o[a]}}(),setSubframeEnabled=function o(d){subframeEnabled=!!d},getSubframeEnabled=function o(){return subframeEnabled},setExpressionsPlugin=function o(d){expressionsPlugin=d},getExpressionsPlugin=function o(){return expressionsPlugin},setExpressionInterfaces=function o(d){expressionsInterfaces=d},getExpressionInterfaces=function o(){return expressionsInterfaces},setDefaultCurveSegments=function o(d){defaultCurveSegments=d},getDefaultCurveSegments=function o(){return defaultCurveSegments},setIdPrefix=function o(d){idPrefix$1=d},getIdPrefix=function o(){return idPrefix$1};function createNS(o){return document.createElementNS(svgNS,o)}function _typeof$5(o){return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$5(o)}var dataManager=function(){var o=1,d=[],i,r,h={onmessage:function v(){},postMessage:function v(Y){i({data:Y})}},a={postMessage:function v(Y){h.onmessage({data:Y})}};function g(v){if(window.Worker&&window.Blob&&getWebWorker()){var Y=new Blob(["var _workerSelf = self; self.onmessage = ",v.toString()],{type:"text/javascript"}),H=URL.createObjectURL(Y);return new Worker(H)}return i=v,h}function l(){if(!r)r=g(function v(Y){function H(){function I(K,Q){var W,w,J=K.length,R,G,D,E;for(w=0;w<J;w+=1)if(W=K[w],"ks"in W&&!W.completed){if(W.completed=!0,W.hasMask){var t=W.masksProperties;G=t.length;for(R=0;R<G;R+=1)if(t[R].pt.k.i)X(t[R].pt.k);else{E=t[R].pt.k.length;for(D=0;D<E;D+=1){if(t[R].pt.k[D].s)X(t[R].pt.k[D].s[0]);if(t[R].pt.k[D].e)X(t[R].pt.k[D].e[0])}}}if(W.ty===0)W.layers=z(W.refId,Q),I(W.layers,Q);else if(W.ty===4)k(W.shapes);else if(W.ty===5)C(W)}}function Z(K,Q){if(K){var W=0,w=K.length;for(W=0;W<w;W+=1)if(K[W].t===1)K[W].data.layers=z(K[W].data.refId,Q),I(K[W].data.layers,Q)}}function c(K,Q){var W=0,w=Q.length;while(W<w){if(Q[W].id===K)return Q[W];W+=1}return null}function z(K,Q){var W=c(K,Q);if(W){if(!W.layers.__used)return W.layers.__used=!0,W.layers;return JSON.parse(JSON.stringify(W.layers))}return null}function k(K){var Q,W=K.length,w,J;for(Q=W-1;Q>=0;Q-=1)if(K[Q].ty==="sh")if(K[Q].ks.k.i)X(K[Q].ks.k);else{J=K[Q].ks.k.length;for(w=0;w<J;w+=1){if(K[Q].ks.k[w].s)X(K[Q].ks.k[w].s[0]);if(K[Q].ks.k[w].e)X(K[Q].ks.k[w].e[0])}}else if(K[Q].ty==="gr")k(K[Q].it)}function X(K){var Q,W=K.i.length;for(Q=0;Q<W;Q+=1)K.i[Q][0]+=K.v[Q][0],K.i[Q][1]+=K.v[Q][1],K.o[Q][0]+=K.v[Q][0],K.o[Q][1]+=K.v[Q][1]}function V(K,Q){var W=Q?Q.split("."):[100,100,100];if(K[0]>W[0])return!0;if(W[0]>K[0])return!1;if(K[1]>W[1])return!0;if(W[1]>K[1])return!1;if(K[2]>W[2])return!0;if(W[2]>K[2])return!1;return null}var u=function(){var K=[4,4,14];function Q(w){var J=w.t.d;w.t.d={k:[{s:J,t:0}]}}function W(w){var J,R=w.length;for(J=0;J<R;J+=1)if(w[J].ty===5)Q(w[J])}return function(w){if(V(K,w.v)){if(W(w.layers),w.assets){var J,R=w.assets.length;for(J=0;J<R;J+=1)if(w.assets[J].layers)W(w.assets[J].layers)}}}}(),p=function(){var K=[4,7,99];return function(Q){if(Q.chars&&!V(K,Q.v)){var W,w=Q.chars.length;for(W=0;W<w;W+=1){var J=Q.chars[W];if(J.data&&J.data.shapes){if(k(J.data.shapes),J.data.ip=0,J.data.op=99999,J.data.st=0,J.data.sr=1,J.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},!Q.chars[W].t)J.data.shapes.push({ty:"no"}),J.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})}}}}}(),U=function(){var K=[5,7,15];function Q(w){var J=w.t.p;if(typeof J.a==="number")J.a={a:0,k:J.a};if(typeof J.p==="number")J.p={a:0,k:J.p};if(typeof J.r==="number")J.r={a:0,k:J.r}}function W(w){var J,R=w.length;for(J=0;J<R;J+=1)if(w[J].ty===5)Q(w[J])}return function(w){if(V(K,w.v)){if(W(w.layers),w.assets){var J,R=w.assets.length;for(J=0;J<R;J+=1)if(w.assets[J].layers)W(w.assets[J].layers)}}}}(),F=function(){var K=[4,1,9];function Q(w){var J,R=w.length,G,D;for(J=0;J<R;J+=1)if(w[J].ty==="gr")Q(w[J].it);else if(w[J].ty==="fl"||w[J].ty==="st")if(w[J].c.k&&w[J].c.k[0].i){D=w[J].c.k.length;for(G=0;G<D;G+=1){if(w[J].c.k[G].s)w[J].c.k[G].s[0]/=255,w[J].c.k[G].s[1]/=255,w[J].c.k[G].s[2]/=255,w[J].c.k[G].s[3]/=255;if(w[J].c.k[G].e)w[J].c.k[G].e[0]/=255,w[J].c.k[G].e[1]/=255,w[J].c.k[G].e[2]/=255,w[J].c.k[G].e[3]/=255}}else w[J].c.k[0]/=255,w[J].c.k[1]/=255,w[J].c.k[2]/=255,w[J].c.k[3]/=255}function W(w){var J,R=w.length;for(J=0;J<R;J+=1)if(w[J].ty===4)Q(w[J].shapes)}return function(w){if(V(K,w.v)){if(W(w.layers),w.assets){var J,R=w.assets.length;for(J=0;J<R;J+=1)if(w.assets[J].layers)W(w.assets[J].layers)}}}}(),L=function(){var K=[4,4,18];function Q(w){var J,R=w.length,G,D;for(J=R-1;J>=0;J-=1)if(w[J].ty==="sh")if(w[J].ks.k.i)w[J].ks.k.c=w[J].closed;else{D=w[J].ks.k.length;for(G=0;G<D;G+=1){if(w[J].ks.k[G].s)w[J].ks.k[G].s[0].c=w[J].closed;if(w[J].ks.k[G].e)w[J].ks.k[G].e[0].c=w[J].closed}}else if(w[J].ty==="gr")Q(w[J].it)}function W(w){var J,R,G=w.length,D,E,t,m;for(R=0;R<G;R+=1){if(J=w[R],J.hasMask){var d0=J.masksProperties;E=d0.length;for(D=0;D<E;D+=1)if(d0[D].pt.k.i)d0[D].pt.k.c=d0[D].cl;else{m=d0[D].pt.k.length;for(t=0;t<m;t+=1){if(d0[D].pt.k[t].s)d0[D].pt.k[t].s[0].c=d0[D].cl;if(d0[D].pt.k[t].e)d0[D].pt.k[t].e[0].c=d0[D].cl}}}if(J.ty===4)Q(J.shapes)}}return function(w){if(V(K,w.v)){if(W(w.layers),w.assets){var J,R=w.assets.length;for(J=0;J<R;J+=1)if(w.assets[J].layers)W(w.assets[J].layers)}}}}();function j(K){if(K.__complete)return;F(K),u(K),p(K),U(K),L(K),I(K.layers,K.assets),Z(K.chars,K.assets),K.__complete=!0}function C(K){if(K.t.a.length===0&&!("m"in K.t.p));}var T={};return T.completeData=j,T.checkColors=F,T.checkChars=p,T.checkPathProperties=U,T.checkShapes=L,T.completeLayers=I,T}if(!a.dataManager)a.dataManager=H();if(!a.assetLoader)a.assetLoader=function(){function I(c){var z=c.getResponseHeader("content-type");if(z&&c.responseType==="json"&&z.indexOf("json")!==-1)return c.response;if(c.response&&_typeof$5(c.response)==="object")return c.response;if(c.response&&typeof c.response==="string")return JSON.parse(c.response);if(c.responseText)return JSON.parse(c.responseText);return null}function Z(c,z,k,X){var V,u=new XMLHttpRequest;try{u.responseType="json"}catch(p){}u.onreadystatechange=function(){if(u.readyState===4)if(u.status===200)V=I(u),k(V);else try{V=I(u),k(V)}catch(p){if(X)X(p)}};try{u.open(["G","E","T"].join(""),c,!0)}catch(p){u.open(["G","E","T"].join(""),z+"/"+c,!0)}u.send()}return{load:Z}}();if(Y.data.type==="loadAnimation")a.assetLoader.load(Y.data.path,Y.data.fullPath,function(I){a.dataManager.completeData(I),a.postMessage({id:Y.data.id,payload:I,status:"success"})},function(){a.postMessage({id:Y.data.id,status:"error"})});else if(Y.data.type==="complete"){var $=Y.data.animation;a.dataManager.completeData($),a.postMessage({id:Y.data.id,payload:$,status:"success"})}else if(Y.data.type==="loadData")a.assetLoader.load(Y.data.path,Y.data.fullPath,function(I){a.postMessage({id:Y.data.id,payload:I,status:"success"})},function(){a.postMessage({id:Y.data.id,status:"error"})})}),r.onmessage=function(v){var Y=v.data,H=Y.id,$=d[H];if(d[H]=null,Y.status==="success")$.onComplete(Y.payload);else if($.onError)$.onError()}}function x(v,Y){o+=1;var H="processId_"+o;return d[H]={onComplete:v,onError:Y},H}function f(v,Y,H){l();var $=x(Y,H);r.postMessage({type:"loadAnimation",path:v,fullPath:window.location.origin+window.location.pathname,id:$})}function n(v,Y,H){l();var $=x(Y,H);r.postMessage({type:"loadData",path:v,fullPath:window.location.origin+window.location.pathname,id:$})}function _(v,Y,H){l();var $=x(Y,H);r.postMessage({type:"complete",animation:v,id:$})}return{loadAnimation:f,loadData:n,completeAnimation:_}}(),ImagePreloader=function(){var o=function(){var Z=createTag("canvas");Z.width=1,Z.height=1;var c=Z.getContext("2d");return c.fillStyle="rgba(0,0,0,0)",c.fillRect(0,0,1,1),Z}();function d(){if(this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages){if(this.imagesLoadedCb)this.imagesLoadedCb(null)}}function i(){if(this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages){if(this.imagesLoadedCb)this.imagesLoadedCb(null)}}function r(Z,c,z){var k="";if(Z.e)k=Z.p;else if(c){var X=Z.p;if(X.indexOf("images/")!==-1)X=X.split("/")[1];k=c+X}else k=z,k+=Z.u?Z.u:"",k+=Z.p;return k}function h(Z){var c=0,z=setInterval(function(){var k=Z.getBBox();if(k.width||c>500)this._imageLoaded(),clearInterval(z);c+=1}.bind(this),50)}function a(Z){var c=r(Z,this.assetsPath,this.path),z=createNS("image");if(isSafari)this.testImageLoaded(z);else z.addEventListener("load",this._imageLoaded,!1);if(z.addEventListener("error",function(){k.img=o,this._imageLoaded()}.bind(this),!1),z.setAttributeNS("http://www.w3.org/1999/xlink","href",c),this._elementHelper.append)this._elementHelper.append(z);else this._elementHelper.appendChild(z);var k={img:z,assetData:Z};return k}function g(Z){var c=r(Z,this.assetsPath,this.path),z=createTag("img");z.crossOrigin="anonymous",z.addEventListener("load",this._imageLoaded,!1),z.addEventListener("error",function(){k.img=o,this._imageLoaded()}.bind(this),!1),z.src=c;var k={img:z,assetData:Z};return k}function l(Z){var c={assetData:Z},z=r(Z,this.assetsPath,this.path);return dataManager.loadData(z,function(k){c.img=k,this._footageLoaded()}.bind(this),function(){c.img={},this._footageLoaded()}.bind(this)),c}function x(Z,c){this.imagesLoadedCb=c;var z,k=Z.length;for(z=0;z<k;z+=1)if(!Z[z].layers){if(!Z[z].t||Z[z].t==="seq")this.totalImages+=1,this.images.push(this._createImageData(Z[z]));else if(Z[z].t===3)this.totalFootages+=1,this.images.push(this.createFootageData(Z[z]))}}function f(Z){this.path=Z||""}function n(Z){this.assetsPath=Z||""}function _(Z){var c=0,z=this.images.length;while(c<z){if(this.images[c].assetData===Z)return this.images[c].img;c+=1}return null}function v(){this.imagesLoadedCb=null,this.images.length=0}function Y(){return this.totalImages===this.loadedAssets}function H(){return this.totalFootages===this.loadedFootagesCount}function $(Z,c){if(Z==="svg")this._elementHelper=c,this._createImageData=this.createImageData.bind(this);else this._createImageData=this.createImgData.bind(this)}function I(){this._imageLoaded=d.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=h.bind(this),this.createFootageData=l.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return I.prototype={loadAssets:x,setAssetsPath:n,setPath:f,loadedImages:Y,loadedFootages:H,destroy:v,getAsset:_,createImgData:g,createImageData:a,imageLoaded:d,footageLoaded:i,setCacheType:$},I}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function o(d,i){if(this._cbs[d]){var r=this._cbs[d];for(var h=0;h<r.length;h+=1)r[h](i)}},addEventListener:function o(d,i){if(!this._cbs[d])this._cbs[d]=[];return this._cbs[d].push(i),function(){this.removeEventListener(d,i)}.bind(this)},removeEventListener:function o(d,i){if(!i)this._cbs[d]=null;else if(this._cbs[d]){var r=0,h=this._cbs[d].length;while(r<h){if(this._cbs[d][r]===i)this._cbs[d].splice(r,1),r-=1,h-=1;r+=1}if(!this._cbs[d].length)this._cbs[d]=null}}};var markerParser=function(){function o(d){var i=d.split(`\r
|
|
2
|
+
`),r={},h,a=0;for(var g=0;g<i.length;g+=1)if(h=i[g].split(":"),h.length===2)r[h[0]]=h[1].trim(),a+=1;if(a===0)throw new Error;return r}return function(d){var i=[];for(var r=0;r<d.length;r+=1){var h=d[r],a={time:h.tm,duration:h.dr};try{a.payload=JSON.parse(d[r].cm)}catch(g){try{a.payload=o(d[r].cm)}catch(l){a.payload={name:d[r].cm}}}i.push(a)}return i}}(),ProjectInterface=function(){function o(d){this.compositions.push(d)}return function(){function d(i){var r=0,h=this.compositions.length;while(r<h){if(this.compositions[r].data&&this.compositions[r].data.nm===i){if(this.compositions[r].prepareFrame&&this.compositions[r].data.xt)this.compositions[r].prepareFrame(this.currentFrame);return this.compositions[r].compInterface}r+=1}return null}return d.compositions=[],d.currentFrame=0,d.registerComposition=o,d}}(),renderers={},registerRenderer=function o(d,i){renderers[d]=i};function getRenderer(o){return renderers[o]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var o in renderers)if(renderers[o])return o;return""}function _typeof$4(o){return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$4(o)}var AnimationItem=function o(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(o){if(o.wrapper||o.container)this.wrapper=o.wrapper||o.container;var d="svg";if(o.animType)d=o.animType;else if(o.renderer)d=o.renderer;var i=getRenderer(d);if(this.renderer=new i(this,o.rendererSettings),this.imagePreloader.setCacheType(d,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=d,o.loop===""||o.loop===null||o.loop===void 0||o.loop===!0)this.loop=!0;else if(o.loop===!1)this.loop=!1;else this.loop=parseInt(o.loop,10);if(this.autoplay="autoplay"in o?o.autoplay:!0,this.name=o.name?o.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(o,"autoloadSegments")?o.autoloadSegments:!0,this.assetsPath=o.assetsPath,this.initialSegment=o.initialSegment,o.audioFactory)this.audioController.setAudioFactory(o.audioFactory);if(o.animationData)this.setupAnimation(o.animationData);else if(o.path){if(o.path.lastIndexOf("\\")!==-1)this.path=o.path.substr(0,o.path.lastIndexOf("\\")+1);else this.path=o.path.substr(0,o.path.lastIndexOf("/")+1);this.fileName=o.path.substr(o.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(o.path,this.configAnimation,this.onSetupError)}},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(o){dataManager.completeAnimation(o,this.configAnimation)},AnimationItem.prototype.setData=function(o,d){if(d){if(_typeof$4(d)!=="object")d=JSON.parse(d)}var i={wrapper:o,animationData:d},r=o.attributes;i.path=r.getNamedItem("data-animation-path")?r.getNamedItem("data-animation-path").value:r.getNamedItem("data-bm-path")?r.getNamedItem("data-bm-path").value:r.getNamedItem("bm-path")?r.getNamedItem("bm-path").value:"",i.animType=r.getNamedItem("data-anim-type")?r.getNamedItem("data-anim-type").value:r.getNamedItem("data-bm-type")?r.getNamedItem("data-bm-type").value:r.getNamedItem("bm-type")?r.getNamedItem("bm-type").value:r.getNamedItem("data-bm-renderer")?r.getNamedItem("data-bm-renderer").value:r.getNamedItem("bm-renderer")?r.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var h=r.getNamedItem("data-anim-loop")?r.getNamedItem("data-anim-loop").value:r.getNamedItem("data-bm-loop")?r.getNamedItem("data-bm-loop").value:r.getNamedItem("bm-loop")?r.getNamedItem("bm-loop").value:"";if(h==="false")i.loop=!1;else if(h==="true")i.loop=!0;else if(h!=="")i.loop=parseInt(h,10);var a=r.getNamedItem("data-anim-autoplay")?r.getNamedItem("data-anim-autoplay").value:r.getNamedItem("data-bm-autoplay")?r.getNamedItem("data-bm-autoplay").value:r.getNamedItem("bm-autoplay")?r.getNamedItem("bm-autoplay").value:!0;i.autoplay=a!=="false",i.name=r.getNamedItem("data-name")?r.getNamedItem("data-name").value:r.getNamedItem("data-bm-name")?r.getNamedItem("data-bm-name").value:r.getNamedItem("bm-name")?r.getNamedItem("bm-name").value:"";var g=r.getNamedItem("data-anim-prerender")?r.getNamedItem("data-anim-prerender").value:r.getNamedItem("data-bm-prerender")?r.getNamedItem("data-bm-prerender").value:r.getNamedItem("bm-prerender")?r.getNamedItem("bm-prerender").value:"";if(g==="false")i.prerender=!1;if(!i.path)this.trigger("destroy");else this.setParams(i)},AnimationItem.prototype.includeLayers=function(o){if(o.op>this.animationData.op)this.animationData.op=o.op,this.totalFrames=Math.floor(o.op-this.animationData.ip);var d=this.animationData.layers,i,r=d.length,h=o.layers,a,g=h.length;for(a=0;a<g;a+=1){i=0;while(i<r){if(d[i].id===h[a].id){d[i]=h[a];break}i+=1}}if(o.chars||o.fonts)this.renderer.globalData.fontManager.addChars(o.chars),this.renderer.globalData.fontManager.addFonts(o.fonts,this.renderer.globalData.defs);if(o.assets){r=o.assets.length;for(i=0;i<r;i+=1)this.animationData.assets.push(o.assets[i])}this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(o){this.animationData=o;var d=getExpressionsPlugin();if(d)d.initExpressions(this);this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var o=this.animationData.segments;if(!o||o.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var d=o.shift();this.timeCompleted=d.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(i,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){var o=this.animationData.segments;if(!o)this.timeCompleted=this.totalFrames;this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(o){if(!this.renderer)return;try{if(this.animationData=o,this.initialSegment)this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0]);else this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip);if(this.renderer.configAnimation(o),!o.assets)o.assets=[];if(this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1000,this.renderer.searchExtraCompositions(o.assets),this.markers=markerParser(o.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused)this.audioController.pause()}catch(d){this.triggerConfigError(d)}},AnimationItem.prototype.waitForFontsLoaded=function(){if(!this.renderer)return;if(this.renderer.globalData.fontManager.isLoaded)this.checkLoaded();else setTimeout(this.waitForFontsLoaded.bind(this),20)},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var o=getExpressionsPlugin();if(o)o.initExpressions(this);if(this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay)this.play()}},AnimationItem.prototype.resize=function(o,d){var i=typeof o==="number"?o:void 0,r=typeof d==="number"?d:void 0;this.renderer.updateContainerSize(i,r)},AnimationItem.prototype.setSubframe=function(o){this.isSubframeEnabled=!!o},AnimationItem.prototype.gotoFrame=function(){if(this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted)this.currentFrame=this.timeCompleted;this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(this.isLoaded===!1||!this.renderer)return;try{if(this.expressionsPlugin)this.expressionsPlugin.resetFrame();this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(o){this.triggerRenderFrameError(o)}},AnimationItem.prototype.play=function(o){if(o&&this.name!==o)return;if(this.isPaused===!0){if(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle)this._idle=!1,this.trigger("_active")}},AnimationItem.prototype.pause=function(o){if(o&&this.name!==o)return;if(this.isPaused===!1)this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause()},AnimationItem.prototype.togglePause=function(o){if(o&&this.name!==o)return;if(this.isPaused===!0)this.play();else this.pause()},AnimationItem.prototype.stop=function(o){if(o&&this.name!==o)return;this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0)},AnimationItem.prototype.getMarkerData=function(o){var d;for(var i=0;i<this.markers.length;i+=1)if(d=this.markers[i],d.payload&&d.payload.name===o)return d;return null},AnimationItem.prototype.goToAndStop=function(o,d,i){if(i&&this.name!==i)return;var r=Number(o);if(isNaN(r)){var h=this.getMarkerData(o);if(h)this.goToAndStop(h.time,!0)}else if(d)this.setCurrentRawFrameValue(o);else this.setCurrentRawFrameValue(o*this.frameModifier);this.pause()},AnimationItem.prototype.goToAndPlay=function(o,d,i){if(i&&this.name!==i)return;var r=Number(o);if(isNaN(r)){var h=this.getMarkerData(o);if(h)if(!h.duration)this.goToAndStop(h.time,!0);else this.playSegments([h.time,h.time+h.duration],!0)}else this.goToAndStop(r,d,i);this.play()},AnimationItem.prototype.advanceTime=function(o){if(this.isPaused===!0||this.isLoaded===!1)return;var d=this.currentRawFrame+o*this.frameModifier,i=!1;if(d>=this.totalFrames-1&&this.frameModifier>0)if(!this.loop||this.playCount===this.loop){if(!this.checkSegments(d>this.totalFrames?d%this.totalFrames:0))i=!0,d=this.totalFrames-1}else if(d>=this.totalFrames){if(this.playCount+=1,!this.checkSegments(d%this.totalFrames))this.setCurrentRawFrameValue(d%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete")}else this.setCurrentRawFrameValue(d);else if(d<0){if(!this.checkSegments(d%this.totalFrames))if(this.loop&&!(this.playCount--<=0&&this.loop!==!0))if(this.setCurrentRawFrameValue(this.totalFrames+d%this.totalFrames),!this._completedLoop)this._completedLoop=!0;else this.trigger("loopComplete");else i=!0,d=0}else this.setCurrentRawFrameValue(d);if(i)this.setCurrentRawFrameValue(d),this.pause(),this.trigger("complete")},AnimationItem.prototype.adjustSegment=function(o,d){if(this.playCount=0,o[1]<o[0]){if(this.frameModifier>0)if(this.playSpeed<0)this.setSpeed(-this.playSpeed);else this.setDirection(-1);this.totalFrames=o[0]-o[1],this.timeCompleted=this.totalFrames,this.firstFrame=o[1],this.setCurrentRawFrameValue(this.totalFrames-0.001-d)}else if(o[1]>o[0]){if(this.frameModifier<0)if(this.playSpeed<0)this.setSpeed(-this.playSpeed);else this.setDirection(1);this.totalFrames=o[1]-o[0],this.timeCompleted=this.totalFrames,this.firstFrame=o[0],this.setCurrentRawFrameValue(0.001+d)}this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(o,d){var i=-1;if(this.isPaused){if(this.currentRawFrame+this.firstFrame<o)i=o;else if(this.currentRawFrame+this.firstFrame>d)i=d-o}if(this.firstFrame=o,this.totalFrames=d-o,this.timeCompleted=this.totalFrames,i!==-1)this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(o,d){if(d)this.segments.length=0;if(_typeof$4(o[0])==="object"){var i,r=o.length;for(i=0;i<r;i+=1)this.segments.push(o[i])}else this.segments.push(o);if(this.segments.length&&d)this.adjustSegment(this.segments.shift(),0);if(this.isPaused)this.play()},AnimationItem.prototype.resetSegments=function(o){if(this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),o)this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(o){if(this.segments.length)return this.adjustSegment(this.segments.shift(),o),!0;return!1},AnimationItem.prototype.destroy=function(o){if(o&&this.name!==o||!this.renderer)return;this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null},AnimationItem.prototype.setCurrentRawFrameValue=function(o){this.currentRawFrame=o,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(o){this.playSpeed=o,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(o){this.playDirection=o<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(o){this.loop=o},AnimationItem.prototype.setVolume=function(o,d){if(d&&this.name!==d)return;this.audioController.setVolume(o)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(o){if(o&&this.name!==o)return;this.audioController.mute()},AnimationItem.prototype.unmute=function(o){if(o&&this.name!==o)return;this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(o){var d="";if(o.e)d=o.p;else if(this.assetsPath){var i=o.p;if(i.indexOf("images/")!==-1)i=i.split("/")[1];d=this.assetsPath+i}else d=this.path,d+=o.u?o.u:"",d+=o.p;return d},AnimationItem.prototype.getAssetData=function(o){var d=0,i=this.assets.length;while(d<i){if(o===this.assets[d].id)return this.assets[d];d+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(o){return o?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(o,d,i){try{var r=this.renderer.getElementByPath(o);r.updateDocumentData(d,i)}catch(h){}},AnimationItem.prototype.trigger=function(o){if(this._cbs&&this._cbs[o])switch(o){case"enterFrame":this.triggerEvent(o,new BMEnterFrameEvent(o,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(o,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(o,new BMCompleteLoopEvent(o,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(o,new BMCompleteEvent(o,this.frameMult));break;case"segmentStart":this.triggerEvent(o,new BMSegmentStartEvent(o,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(o,new BMDestroyEvent(o,this));break;default:this.triggerEvent(o)}if(o==="enterFrame"&&this.onEnterFrame)this.onEnterFrame.call(this,new BMEnterFrameEvent(o,this.currentFrame,this.totalFrames,this.frameMult));if(o==="loopComplete"&&this.onLoopComplete)this.onLoopComplete.call(this,new BMCompleteLoopEvent(o,this.loop,this.playCount,this.frameMult));if(o==="complete"&&this.onComplete)this.onComplete.call(this,new BMCompleteEvent(o,this.frameMult));if(o==="segmentStart"&&this.onSegmentStart)this.onSegmentStart.call(this,new BMSegmentStartEvent(o,this.firstFrame,this.totalFrames));if(o==="destroy"&&this.onDestroy)this.onDestroy.call(this,new BMDestroyEvent(o,this))},AnimationItem.prototype.triggerRenderFrameError=function(o){var d=new BMRenderFrameErrorEvent(o,this.currentFrame);if(this.triggerEvent("error",d),this.onError)this.onError.call(this,d)},AnimationItem.prototype.triggerConfigError=function(o){var d=new BMConfigErrorEvent(o,this.currentFrame);if(this.triggerEvent("error",d),this.onError)this.onError.call(this,d)};var animationManager=function(){var o={},d=[],i=0,r=0,h=0,a=!0,g=!1;function l(Q){var W=0,w=Q.target;while(W<r){if(d[W].animation===w){if(d.splice(W,1),W-=1,r-=1,!w.isPaused)_()}W+=1}}function x(Q,W){if(!Q)return null;var w=0;while(w<r){if(d[w].elem===Q&&d[w].elem!==null)return d[w].animation;w+=1}var J=new AnimationItem;return v(J,Q),J.setData(Q,W),J}function f(){var Q,W=d.length,w=[];for(Q=0;Q<W;Q+=1)w.push(d[Q].animation);return w}function n(){h+=1,F()}function _(){h-=1}function v(Q,W){Q.addEventListener("destroy",l),Q.addEventListener("_active",n),Q.addEventListener("_idle",_),d.push({elem:W,animation:Q}),r+=1}function Y(Q){var W=new AnimationItem;return v(W,null),W.setParams(Q),W}function H(Q,W){var w;for(w=0;w<r;w+=1)d[w].animation.setSpeed(Q,W)}function $(Q,W){var w;for(w=0;w<r;w+=1)d[w].animation.setDirection(Q,W)}function I(Q){var W;for(W=0;W<r;W+=1)d[W].animation.play(Q)}function Z(Q){var W=Q-i,w;for(w=0;w<r;w+=1)d[w].animation.advanceTime(W);if(i=Q,h&&!g)window.requestAnimationFrame(Z);else a=!0}function c(Q){i=Q,window.requestAnimationFrame(Z)}function z(Q){var W;for(W=0;W<r;W+=1)d[W].animation.pause(Q)}function k(Q,W,w){var J;for(J=0;J<r;J+=1)d[J].animation.goToAndStop(Q,W,w)}function X(Q){var W;for(W=0;W<r;W+=1)d[W].animation.stop(Q)}function V(Q){var W;for(W=0;W<r;W+=1)d[W].animation.togglePause(Q)}function u(Q){var W;for(W=r-1;W>=0;W-=1)d[W].animation.destroy(Q)}function p(Q,W,w){var J=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),R,G=J.length;for(R=0;R<G;R+=1){if(w)J[R].setAttribute("data-bm-type",w);x(J[R],Q)}if(W&&G===0){if(!w)w="svg";var D=document.getElementsByTagName("body")[0];D.innerText="";var E=createTag("div");E.style.width="100%",E.style.height="100%",E.setAttribute("data-bm-type",w),D.appendChild(E),x(E,Q)}}function U(){var Q;for(Q=0;Q<r;Q+=1)d[Q].animation.resize()}function F(){if(!g&&h){if(a)window.requestAnimationFrame(c),a=!1}}function L(){g=!0}function j(){g=!1,F()}function C(Q,W){var w;for(w=0;w<r;w+=1)d[w].animation.setVolume(Q,W)}function T(Q){var W;for(W=0;W<r;W+=1)d[W].animation.mute(Q)}function K(Q){var W;for(W=0;W<r;W+=1)d[W].animation.unmute(Q)}return o.registerAnimation=x,o.loadAnimation=Y,o.setSpeed=H,o.setDirection=$,o.play=I,o.pause=z,o.stop=X,o.togglePause=V,o.searchAnimations=p,o.resize=U,o.goToAndStop=k,o.destroy=u,o.freeze=L,o.unfreeze=j,o.setVolume=C,o.mute=T,o.unmute=K,o.getRegisteredAnimations=f,o}(),BezierFactory=function(){var o={};o.getBezierEasing=i;var d={};function i(c,z,k,X,V){var u=V||("bez_"+c+"_"+z+"_"+k+"_"+X).replace(/\./g,"p");if(d[u])return d[u];var p=new Z([c,z,k,X]);return d[u]=p,p}var r=4,h=0.001,a=0.0000001,g=10,l=11,x=1/(l-1),f=typeof Float32Array==="function";function n(c,z){return 1-3*z+3*c}function _(c,z){return 3*z-6*c}function v(c){return 3*c}function Y(c,z,k){return((n(z,k)*c+_(z,k))*c+v(z))*c}function H(c,z,k){return 3*n(z,k)*c*c+2*_(z,k)*c+v(z)}function $(c,z,k,X,V){var u,p,U=0;do if(p=z+(k-z)/2,u=Y(p,X,V)-c,u>0)k=p;else z=p;while(Math.abs(u)>a&&++U<g);return p}function I(c,z,k,X){for(var V=0;V<r;++V){var u=H(z,k,X);if(u===0)return z;var p=Y(z,k,X)-c;z-=p/u}return z}function Z(c){this._p=c,this._mSampleValues=f?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return Z.prototype={get:function c(z){var k=this._p[0],X=this._p[1],V=this._p[2],u=this._p[3];if(!this._precomputed)this._precompute();if(k===X&&V===u)return z;if(z===0)return 0;if(z===1)return 1;return Y(this._getTForX(z),X,u)},_precompute:function c(){var z=this._p[0],k=this._p[1],X=this._p[2],V=this._p[3];if(this._precomputed=!0,z!==k||X!==V)this._calcSampleValues()},_calcSampleValues:function c(){var z=this._p[0],k=this._p[2];for(var X=0;X<l;++X)this._mSampleValues[X]=Y(X*x,z,k)},_getTForX:function c(z){var k=this._p[0],X=this._p[2],V=this._mSampleValues,u=0,p=1,U=l-1;for(;p!==U&&V[p]<=z;++p)u+=x;--p;var F=(z-V[p])/(V[p+1]-V[p]),L=u+F*x,j=H(L,k,X);if(j>=h)return I(z,L,k,X);if(j===0)return L;return $(z,u,u+x,k,X)}},o}(),pooling=function(){function o(d){return d.concat(createSizedArray(d.length))}return{double:o}}(),poolFactory=function(){return function(o,d,i){var r=0,h=o,a=createSizedArray(h),g={newElement:l,release:x};function l(){var f;if(r)r-=1,f=a[r];else f=d();return f}function x(f){if(r===h)a=pooling.double(a),h*=2;if(i)i(f);a[r]=f,r+=1}return g}}(),bezierLengthPool=function(){function o(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,o)}(),segmentsLengthPool=function(){function o(){return{lengths:[],totalLength:0}}function d(i){var r,h=i.lengths.length;for(r=0;r<h;r+=1)bezierLengthPool.release(i.lengths[r]);i.lengths.length=0}return poolFactory(8,o,d)}();function bezFunction(){var o=Math;function d(v,Y,H,$,I,Z){var c=v*$+Y*I+H*Z-I*$-Z*v-H*Y;return c>-0.001&&c<0.001}function i(v,Y,H,$,I,Z,c,z,k){if(H===0&&Z===0&&k===0)return d(v,Y,$,I,c,z);var X=o.sqrt(o.pow($-v,2)+o.pow(I-Y,2)+o.pow(Z-H,2)),V=o.sqrt(o.pow(c-v,2)+o.pow(z-Y,2)+o.pow(k-H,2)),u=o.sqrt(o.pow(c-$,2)+o.pow(z-I,2)+o.pow(k-Z,2)),p;if(X>V)if(X>u)p=X-V-u;else p=u-V-X;else if(u>V)p=u-V-X;else p=V-X-u;return p>-0.0001&&p<0.0001}var r=function(){return function(v,Y,H,$){var I=getDefaultCurveSegments(),Z,c,z,k,X,V=0,u,p=[],U=[],F=bezierLengthPool.newElement();z=H.length;for(Z=0;Z<I;Z+=1){X=Z/(I-1),u=0;for(c=0;c<z;c+=1){if(k=bmPow(1-X,3)*v[c]+3*bmPow(1-X,2)*X*H[c]+3*(1-X)*bmPow(X,2)*$[c]+bmPow(X,3)*Y[c],p[c]=k,U[c]!==null)u+=bmPow(p[c]-U[c],2);U[c]=p[c]}if(u)u=bmSqrt(u),V+=u;F.percents[Z]=X,F.lengths[Z]=V}return F.addedLength=V,F}}();function h(v){var Y=segmentsLengthPool.newElement(),H=v.c,$=v.v,I=v.o,Z=v.i,c,z=v._length,k=Y.lengths,X=0;for(c=0;c<z-1;c+=1)k[c]=r($[c],$[c+1],I[c],Z[c+1]),X+=k[c].addedLength;if(H&&z)k[c]=r($[c],$[0],I[c],Z[0]),X+=k[c].addedLength;return Y.totalLength=X,Y}function a(v){this.segmentLength=0,this.points=new Array(v)}function g(v,Y){this.partialLength=v,this.point=Y}var l=function(){var v={};return function(Y,H,$,I){var Z=(Y[0]+"_"+Y[1]+"_"+H[0]+"_"+H[1]+"_"+$[0]+"_"+$[1]+"_"+I[0]+"_"+I[1]).replace(/\./g,"p");if(!v[Z]){var c=getDefaultCurveSegments(),z,k,X,V,u,p=0,U,F,L=null;if(Y.length===2&&(Y[0]!==H[0]||Y[1]!==H[1])&&d(Y[0],Y[1],H[0],H[1],Y[0]+$[0],Y[1]+$[1])&&d(Y[0],Y[1],H[0],H[1],H[0]+I[0],H[1]+I[1]))c=2;var j=new a(c);X=$.length;for(z=0;z<c;z+=1){F=createSizedArray(X),u=z/(c-1),U=0;for(k=0;k<X;k+=1)if(V=bmPow(1-u,3)*Y[k]+3*bmPow(1-u,2)*u*(Y[k]+$[k])+3*(1-u)*bmPow(u,2)*(H[k]+I[k])+bmPow(u,3)*H[k],F[k]=V,L!==null)U+=bmPow(F[k]-L[k],2);U=bmSqrt(U),p+=U,j.points[z]=new g(U,F),L=F}j.segmentLength=p,v[Z]=j}return v[Z]}}();function x(v,Y){var{percents:H,lengths:$}=Y,I=H.length,Z=bmFloor((I-1)*v),c=v*Y.addedLength,z=0;if(Z===I-1||Z===0||c===$[Z])return H[Z];var k=$[Z]>c?-1:1,X=!0;while(X){if($[Z]<=c&&$[Z+1]>c)z=(c-$[Z])/($[Z+1]-$[Z]),X=!1;else Z+=k;if(Z<0||Z>=I-1){if(Z===I-1)return H[Z];X=!1}}return H[Z]+(H[Z+1]-H[Z])*z}function f(v,Y,H,$,I,Z){var c=x(I,Z),z=1-c,k=o.round((z*z*z*v[0]+(c*z*z+z*c*z+z*z*c)*H[0]+(c*c*z+z*c*c+c*z*c)*$[0]+c*c*c*Y[0])*1000)/1000,X=o.round((z*z*z*v[1]+(c*z*z+z*c*z+z*z*c)*H[1]+(c*c*z+z*c*c+c*z*c)*$[1]+c*c*c*Y[1])*1000)/1000;return[k,X]}var n=createTypedArray("float32",8);function _(v,Y,H,$,I,Z,c){if(I<0)I=0;else if(I>1)I=1;var z=x(I,c);Z=Z>1?1:Z;var k=x(Z,c),X,V=v.length,u=1-z,p=1-k,U=u*u*u,F=z*u*u*3,L=z*z*u*3,j=z*z*z,C=u*u*p,T=z*u*p+u*z*p+u*u*k,K=z*z*p+u*z*k+z*u*k,Q=z*z*k,W=u*p*p,w=z*p*p+u*k*p+u*p*k,J=z*k*p+u*k*k+z*p*k,R=z*k*k,G=p*p*p,D=k*p*p+p*k*p+p*p*k,E=k*k*p+p*k*k+k*p*k,t=k*k*k;for(X=0;X<V;X+=1)n[X*4]=o.round((U*v[X]+F*H[X]+L*$[X]+j*Y[X])*1000)/1000,n[X*4+1]=o.round((C*v[X]+T*H[X]+K*$[X]+Q*Y[X])*1000)/1000,n[X*4+2]=o.round((W*v[X]+w*H[X]+J*$[X]+R*Y[X])*1000)/1000,n[X*4+3]=o.round((G*v[X]+D*H[X]+E*$[X]+t*Y[X])*1000)/1000;return n}return{getSegmentsLength:h,getNewSegment:_,getPointInSegment:f,buildBezierData:l,pointOnLine2D:d,pointOnLine3D:i}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(o,d){var i=this.offsetTime,r;if(this.propType==="multidimensional")r=createTypedArray("float32",this.pv.length);var h=d.lastIndex,a=h,g=this.keyframes.length-1,l=!0,x,f,n;while(l){if(x=this.keyframes[a],f=this.keyframes[a+1],a===g-1&&o>=f.t-i){if(x.h)x=f;h=0;break}if(f.t-i>o){h=a;break}if(a<g-1)a+=1;else h=0,l=!1}n=this.keyframesMetadata[a]||{};var _,v,Y,H,$,I,Z=f.t-i,c=x.t-i,z;if(x.to){if(!n.bezierData)n.bezierData=bez.buildBezierData(x.s,f.s||x.e,x.to,x.ti);var k=n.bezierData;if(o>=Z||o<c){var X=o>=Z?k.points.length-1:0;v=k.points[X].point.length;for(_=0;_<v;_+=1)r[_]=k.points[X].point[_]}else{if(n.__fnct)I=n.__fnct;else I=BezierFactory.getBezierEasing(x.o.x,x.o.y,x.i.x,x.i.y,x.n).get,n.__fnct=I;Y=I((o-c)/(Z-c));var V=k.segmentLength*Y,u,p=d.lastFrame<o&&d._lastKeyframeIndex===a?d._lastAddedLength:0;$=d.lastFrame<o&&d._lastKeyframeIndex===a?d._lastPoint:0,l=!0,H=k.points.length;while(l){if(p+=k.points[$].partialLength,V===0||Y===0||$===k.points.length-1){v=k.points[$].point.length;for(_=0;_<v;_+=1)r[_]=k.points[$].point[_];break}else if(V>=p&&V<p+k.points[$+1].partialLength){u=(V-p)/k.points[$+1].partialLength,v=k.points[$].point.length;for(_=0;_<v;_+=1)r[_]=k.points[$].point[_]+(k.points[$+1].point[_]-k.points[$].point[_])*u;break}if($<H-1)$+=1;else l=!1}d._lastPoint=$,d._lastAddedLength=p-k.points[$].partialLength,d._lastKeyframeIndex=a}}else{var U,F,L,j,C;if(g=x.s.length,z=f.s||x.e,this.sh&&x.h!==1)if(o>=Z)r[0]=z[0],r[1]=z[1],r[2]=z[2];else if(o<=c)r[0]=x.s[0],r[1]=x.s[1],r[2]=x.s[2];else{var T=createQuaternion(x.s),K=createQuaternion(z),Q=(o-c)/(Z-c);quaternionToEuler(r,slerp(T,K,Q))}else for(a=0;a<g;a+=1){if(x.h!==1)if(o>=Z)Y=1;else if(o<c)Y=0;else{if(x.o.x.constructor===Array){if(!n.__fnct)n.__fnct=[];if(!n.__fnct[a])U=x.o.x[a]===void 0?x.o.x[0]:x.o.x[a],F=x.o.y[a]===void 0?x.o.y[0]:x.o.y[a],L=x.i.x[a]===void 0?x.i.x[0]:x.i.x[a],j=x.i.y[a]===void 0?x.i.y[0]:x.i.y[a],I=BezierFactory.getBezierEasing(U,F,L,j).get,n.__fnct[a]=I;else I=n.__fnct[a]}else if(!n.__fnct)U=x.o.x,F=x.o.y,L=x.i.x,j=x.i.y,I=BezierFactory.getBezierEasing(U,F,L,j).get,x.keyframeMetadata=I;else I=n.__fnct;Y=I((o-c)/(Z-c))}if(z=f.s||x.e,C=x.h===1?x.s[a]:x.s[a]+(z[a]-x.s[a])*Y,this.propType==="multidimensional")r[a]=C;else r=C}}return d.lastIndex=h,r}function slerp(o,d,i){var r=[],h=o[0],a=o[1],g=o[2],l=o[3],x=d[0],f=d[1],n=d[2],_=d[3],v,Y,H,$,I;if(Y=h*x+a*f+g*n+l*_,Y<0)Y=-Y,x=-x,f=-f,n=-n,_=-_;if(1-Y>0.000001)v=Math.acos(Y),H=Math.sin(v),$=Math.sin((1-i)*v)/H,I=Math.sin(i*v)/H;else $=1-i,I=i;return r[0]=$*h+I*x,r[1]=$*a+I*f,r[2]=$*g+I*n,r[3]=$*l+I*_,r}function quaternionToEuler(o,d){var i=d[0],r=d[1],h=d[2],a=d[3],g=Math.atan2(2*r*a-2*i*h,1-2*r*r-2*h*h),l=Math.asin(2*i*r+2*h*a),x=Math.atan2(2*i*a-2*r*h,1-2*i*i-2*h*h);o[0]=g/degToRads,o[1]=l/degToRads,o[2]=x/degToRads}function createQuaternion(o){var d=o[0]*degToRads,i=o[1]*degToRads,r=o[2]*degToRads,h=Math.cos(d/2),a=Math.cos(i/2),g=Math.cos(r/2),l=Math.sin(d/2),x=Math.sin(i/2),f=Math.sin(r/2),n=h*a*g-l*x*f,_=l*x*g+h*a*f,v=l*a*g+h*x*f,Y=h*x*g-l*a*f;return[_,v,Y,n]}function getValueAtCurrentTime(){var o=this.comp.renderedFrame-this.offsetTime,d=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(o===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=i&&o>=i||this._caching.lastFrame<d&&o<d))){if(this._caching.lastFrame>=o)this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0;var r=this.interpolateValue(o,this._caching);this.pv=r}return this._caching.lastFrame=o,this.pv}function setVValue(o){var d;if(this.propType==="unidimensional"){if(d=o*this.mult,mathAbs(this.v-d)>0.00001)this.v=d,this._mdf=!0}else{var i=0,r=this.v.length;while(i<r){if(d=o[i]*this.mult,mathAbs(this.v[i]-d)>0.00001)this.v[i]=d,this._mdf=!0;i+=1}}}function processEffectsSequence(){if(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)return;if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var o,d=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(o=0;o<d;o+=1)i=this.effectsSequence[o](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}function addEffect(o){this.effectsSequence.push(o),this.container.addDynamicProperty(this)}function ValueProperty(o,d,i,r){this.propType="unidimensional",this.mult=i||1,this.data=d,this.v=i?d.k*i:d.k,this.pv=d.k,this._mdf=!1,this.elem=o,this.container=r,this.comp=o.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(o,d,i,r){this.propType="multidimensional",this.mult=i||1,this.data=d,this._mdf=!1,this.elem=o,this.container=r,this.comp=o.comp,this.k=!1,this.kf=!1,this.frameId=-1;var h,a=d.k.length;this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a);for(h=0;h<a;h+=1)this.v[h]=d.k[h]*this.mult,this.pv[h]=d.k[h];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(o,d,i,r){this.propType="unidimensional",this.keyframes=d.k,this.keyframesMetadata=[],this.offsetTime=o.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=d,this.mult=i||1,this.elem=o,this.container=r,this.comp=o.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(o,d,i,r){this.propType="multidimensional";var h,a=d.k.length,g,l,x,f;for(h=0;h<a-1;h+=1)if(d.k[h].to&&d.k[h].s&&d.k[h+1]&&d.k[h+1].s){if(g=d.k[h].s,l=d.k[h+1].s,x=d.k[h].to,f=d.k[h].ti,g.length===2&&!(g[0]===l[0]&&g[1]===l[1])&&bez.pointOnLine2D(g[0],g[1],l[0],l[1],g[0]+x[0],g[1]+x[1])&&bez.pointOnLine2D(g[0],g[1],l[0],l[1],l[0]+f[0],l[1]+f[1])||g.length===3&&!(g[0]===l[0]&&g[1]===l[1]&&g[2]===l[2])&&bez.pointOnLine3D(g[0],g[1],g[2],l[0],l[1],l[2],g[0]+x[0],g[1]+x[1],g[2]+x[2])&&bez.pointOnLine3D(g[0],g[1],g[2],l[0],l[1],l[2],l[0]+f[0],l[1]+f[1],l[2]+f[2]))d.k[h].to=null,d.k[h].ti=null;if(g[0]===l[0]&&g[1]===l[1]&&x[0]===0&&x[1]===0&&f[0]===0&&f[1]===0){if(g.length===2||g[2]===l[2]&&x[2]===0&&f[2]===0)d.k[h].to=null,d.k[h].ti=null}}this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=d,this.keyframes=d.k,this.keyframesMetadata=[],this.offsetTime=o.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=i||1,this.elem=o,this.container=r,this.comp=o.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var n=d.k[0].s.length;this.v=createTypedArray("float32",n),this.pv=createTypedArray("float32",n);for(h=0;h<n;h+=1)this.v[h]=initFrame,this.pv[h]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",n)},this.addEffect=addEffect}var PropertyFactory=function(){function o(i,r,h,a,g){if(r.sid)r=i.globalData.slotManager.getProp(r);var l;if(!r.k.length)l=new ValueProperty(i,r,a,g);else if(typeof r.k[0]==="number")l=new MultiDimensionalProperty(i,r,a,g);else switch(h){case 0:l=new KeyframedValueProperty(i,r,a,g);break;case 1:l=new KeyframedMultidimensionalProperty(i,r,a,g);break;default:break}if(l.effectsSequence.length)g.addDynamicProperty(l);return l}var d={getProp:o};return d}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function o(d){if(this.dynamicProperties.indexOf(d)===-1)this.dynamicProperties.push(d),this.container.addDynamicProperty(this),this._isAnimated=!0},iterateDynamicProperties:function o(){this._mdf=!1;var d,i=this.dynamicProperties.length;for(d=0;d<i;d+=1)if(this.dynamicProperties[d].getValue(),this.dynamicProperties[d]._mdf)this._mdf=!0},initDynamicPropertyContainer:function o(d){this.container=d,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function o(){return createTypedArray("float32",2)}return poolFactory(8,o)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(o,d){this.c=o,this.setLength(d);var i=0;while(i<d)this.v[i]=pointPool.newElement(),this.o[i]=pointPool.newElement(),this.i[i]=pointPool.newElement(),i+=1},ShapePath.prototype.setLength=function(o){while(this._maxLength<o)this.doubleArrayLength();this._length=o},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(o,d,i,r,h){var a;if(this._length=Math.max(this._length,r+1),this._length>=this._maxLength)this.doubleArrayLength();switch(i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}if(!a[r]||a[r]&&!h)a[r]=pointPool.newElement();a[r][0]=o,a[r][1]=d},ShapePath.prototype.setTripleAt=function(o,d,i,r,h,a,g,l){this.setXYAt(o,d,"v",g,l),this.setXYAt(i,r,"o",g,l),this.setXYAt(h,a,"i",g,l)},ShapePath.prototype.reverse=function(){var o=new ShapePath;o.setPathData(this.c,this._length);var d=this.v,i=this.o,r=this.i,h=0;if(this.c)o.setTripleAt(d[0][0],d[0][1],r[0][0],r[0][1],i[0][0],i[0][1],0,!1),h=1;var a=this._length-1,g=this._length,l;for(l=h;l<g;l+=1)o.setTripleAt(d[a][0],d[a][1],r[a][0],r[a][1],i[a][0],i[a][1],l,!1),a-=1;return o},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function o(){return new ShapePath}function d(h){var a=h._length,g;for(g=0;g<a;g+=1)pointPool.release(h.v[g]),pointPool.release(h.i[g]),pointPool.release(h.o[g]),h.v[g]=null,h.i[g]=null,h.o[g]=null;h._length=0,h.c=!1}function i(h){var a=r.newElement(),g,l=h._length===void 0?h.v.length:h._length;a.setLength(l),a.c=h.c;for(g=0;g<l;g+=1)a.setTripleAt(h.v[g][0],h.v[g][1],h.o[g][0],h.o[g][1],h.i[g][0],h.i[g][1],g);return a}var r=poolFactory(4,o,d);return r.clone=i,r}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(o){if(this._length===this._maxLength)this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2;this.shapes[this._length]=o,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var o;for(o=0;o<this._length;o+=1)shapePool.release(this.shapes[o]);this._length=0};var shapeCollectionPool=function(){var o={newShapeCollection:h,release:a},d=0,i=4,r=createSizedArray(i);function h(){var g;if(d)d-=1,g=r[d];else g=new ShapeCollection;return g}function a(g){var l,x=g._length;for(l=0;l<x;l+=1)shapePool.release(g.shapes[l]);if(g._length=0,d===i)r=pooling.double(r),i*=2;r[d]=g,d+=1}return o}(),ShapePropertyFactory=function(){var o=-999999;function d(Z,c,z){var k=z.lastIndex,X,V,u,p,U,F,L,j,C,T=this.keyframes;if(Z<T[0].t-this.offsetTime)X=T[0].s[0],u=!0,k=0;else if(Z>=T[T.length-1].t-this.offsetTime)X=T[T.length-1].s?T[T.length-1].s[0]:T[T.length-2].e[0],u=!0;else{var K=k,Q=T.length-1,W=!0,w,J,R;while(W){if(w=T[K],J=T[K+1],J.t-this.offsetTime>Z)break;if(K<Q-1)K+=1;else W=!1}if(R=this.keyframesMetadata[K]||{},u=w.h===1,k=K,!u){if(Z>=J.t-this.offsetTime)j=1;else if(Z<w.t-this.offsetTime)j=0;else{var G;if(R.__fnct)G=R.__fnct;else G=BezierFactory.getBezierEasing(w.o.x,w.o.y,w.i.x,w.i.y).get,R.__fnct=G;j=G((Z-(w.t-this.offsetTime))/(J.t-this.offsetTime-(w.t-this.offsetTime)))}V=J.s?J.s[0]:w.e[0]}X=w.s[0]}F=c._length,L=X.i[0].length,z.lastIndex=k;for(p=0;p<F;p+=1)for(U=0;U<L;U+=1)C=u?X.i[p][U]:X.i[p][U]+(V.i[p][U]-X.i[p][U])*j,c.i[p][U]=C,C=u?X.o[p][U]:X.o[p][U]+(V.o[p][U]-X.o[p][U])*j,c.o[p][U]=C,C=u?X.v[p][U]:X.v[p][U]+(V.v[p][U]-X.v[p][U])*j,c.v[p][U]=C}function i(){var Z=this.comp.renderedFrame-this.offsetTime,c=this.keyframes[0].t-this.offsetTime,z=this.keyframes[this.keyframes.length-1].t-this.offsetTime,k=this._caching.lastFrame;if(!(k!==o&&(k<c&&Z<c||k>z&&Z>z)))this._caching.lastIndex=k<Z?this._caching.lastIndex:0,this.interpolateShape(Z,this.pv,this._caching);return this._caching.lastFrame=Z,this.pv}function r(){this.paths=this.localShapeCollection}function h(Z,c){if(Z._length!==c._length||Z.c!==c.c)return!1;var z,k=Z._length;for(z=0;z<k;z+=1)if(Z.v[z][0]!==c.v[z][0]||Z.v[z][1]!==c.v[z][1]||Z.o[z][0]!==c.o[z][0]||Z.o[z][1]!==c.o[z][1]||Z.i[z][0]!==c.i[z][0]||Z.i[z][1]!==c.i[z][1])return!1;return!0}function a(Z){if(!h(this.v,Z))this.v=shapePool.clone(Z),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection}function g(){if(this.elem.globalData.frameId===this.frameId)return;if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var Z;if(this.kf)Z=this.pv;else if(this.data.ks)Z=this.data.ks.k;else Z=this.data.pt.k;var c,z=this.effectsSequence.length;for(c=0;c<z;c+=1)Z=this.effectsSequence[c](Z);this.setVValue(Z),this.lock=!1,this.frameId=this.elem.globalData.frameId}function l(Z,c,z){this.propType="shape",this.comp=Z.comp,this.container=Z,this.elem=Z,this.data=c,this.k=!1,this.kf=!1,this._mdf=!1;var k=z===3?c.pt.k:c.ks.k;this.v=shapePool.clone(k),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r,this.effectsSequence=[]}function x(Z){this.effectsSequence.push(Z),this.container.addDynamicProperty(this)}l.prototype.interpolateShape=d,l.prototype.getValue=g,l.prototype.setVValue=a,l.prototype.addEffect=x;function f(Z,c,z){this.propType="shape",this.comp=Z.comp,this.elem=Z,this.container=Z,this.offsetTime=Z.data.st,this.keyframes=z===3?c.pt.k:c.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var k=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,k),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=o,this.reset=r,this._caching={lastFrame:o,lastIndex:0},this.effectsSequence=[i.bind(this)]}f.prototype.getValue=g,f.prototype.interpolateShape=d,f.prototype.setVValue=a,f.prototype.addEffect=x;var n=function(){var Z=roundCorner;function c(z,k){if(this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=k.d,this.elem=z,this.comp=z.comp,this.frameId=-1,this.initDynamicPropertyContainer(z),this.p=PropertyFactory.getProp(z,k.p,1,0,this),this.s=PropertyFactory.getProp(z,k.s,1,0,this),this.dynamicProperties.length)this.k=!0;else this.k=!1,this.convertEllToPath()}return c.prototype={reset:r,getValue:function z(){if(this.elem.globalData.frameId===this.frameId)return;if(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf)this.convertEllToPath()},convertEllToPath:function z(){var k=this.p.v[0],X=this.p.v[1],V=this.s.v[0]/2,u=this.s.v[1]/2,p=this.d!==3,U=this.v;U.v[0][0]=k,U.v[0][1]=X-u,U.v[1][0]=p?k+V:k-V,U.v[1][1]=X,U.v[2][0]=k,U.v[2][1]=X+u,U.v[3][0]=p?k-V:k+V,U.v[3][1]=X,U.i[0][0]=p?k-V*Z:k+V*Z,U.i[0][1]=X-u,U.i[1][0]=p?k+V:k-V,U.i[1][1]=X-u*Z,U.i[2][0]=p?k+V*Z:k-V*Z,U.i[2][1]=X+u,U.i[3][0]=p?k-V:k+V,U.i[3][1]=X+u*Z,U.o[0][0]=p?k+V*Z:k-V*Z,U.o[0][1]=X-u,U.o[1][0]=p?k+V:k-V,U.o[1][1]=X+u*Z,U.o[2][0]=p?k-V*Z:k+V*Z,U.o[2][1]=X+u,U.o[3][0]=p?k-V:k+V,U.o[3][1]=X-u*Z}},extendPrototype([DynamicPropertyContainer],c),c}(),_=function(){function Z(c,z){if(this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=c,this.comp=c.comp,this.data=z,this.frameId=-1,this.d=z.d,this.initDynamicPropertyContainer(c),z.sy===1)this.ir=PropertyFactory.getProp(c,z.ir,0,0,this),this.is=PropertyFactory.getProp(c,z.is,0,0.01,this),this.convertToPath=this.convertStarToPath;else this.convertToPath=this.convertPolygonToPath;if(this.pt=PropertyFactory.getProp(c,z.pt,0,0,this),this.p=PropertyFactory.getProp(c,z.p,1,0,this),this.r=PropertyFactory.getProp(c,z.r,0,degToRads,this),this.or=PropertyFactory.getProp(c,z.or,0,0,this),this.os=PropertyFactory.getProp(c,z.os,0,0.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length)this.k=!0;else this.k=!1,this.convertToPath()}return Z.prototype={reset:r,getValue:function c(){if(this.elem.globalData.frameId===this.frameId)return;if(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf)this.convertToPath()},convertStarToPath:function c(){var z=Math.floor(this.pt.v)*2,k=Math.PI*2/z,X=!0,V=this.or.v,u=this.ir.v,p=this.os.v,U=this.is.v,F=2*Math.PI*V/(z*2),L=2*Math.PI*u/(z*2),j,C,T,K,Q=-Math.PI/2;Q+=this.r.v;var W=this.data.d===3?-1:1;this.v._length=0;for(j=0;j<z;j+=1){C=X?V:u,T=X?p:U,K=X?F:L;var w=C*Math.cos(Q),J=C*Math.sin(Q),R=w===0&&J===0?0:J/Math.sqrt(w*w+J*J),G=w===0&&J===0?0:-w/Math.sqrt(w*w+J*J);w+=+this.p.v[0],J+=+this.p.v[1],this.v.setTripleAt(w,J,w-R*K*T*W,J-G*K*T*W,w+R*K*T*W,J+G*K*T*W,j,!0),X=!X,Q+=k*W}},convertPolygonToPath:function c(){var z=Math.floor(this.pt.v),k=Math.PI*2/z,X=this.or.v,V=this.os.v,u=2*Math.PI*X/(z*4),p,U=-Math.PI*0.5,F=this.data.d===3?-1:1;U+=this.r.v,this.v._length=0;for(p=0;p<z;p+=1){var L=X*Math.cos(U),j=X*Math.sin(U),C=L===0&&j===0?0:j/Math.sqrt(L*L+j*j),T=L===0&&j===0?0:-L/Math.sqrt(L*L+j*j);L+=+this.p.v[0],j+=+this.p.v[1],this.v.setTripleAt(L,j,L-C*u*V*F,j-T*u*V*F,L+C*u*V*F,j+T*u*V*F,p,!0),U+=k*F}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],Z),Z}(),v=function(){function Z(c,z){if(this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=c,this.comp=c.comp,this.frameId=-1,this.d=z.d,this.initDynamicPropertyContainer(c),this.p=PropertyFactory.getProp(c,z.p,1,0,this),this.s=PropertyFactory.getProp(c,z.s,1,0,this),this.r=PropertyFactory.getProp(c,z.r,0,0,this),this.dynamicProperties.length)this.k=!0;else this.k=!1,this.convertRectToPath()}return Z.prototype={convertRectToPath:function c(){var z=this.p.v[0],k=this.p.v[1],X=this.s.v[0]/2,V=this.s.v[1]/2,u=bmMin(X,V,this.r.v),p=u*(1-roundCorner);if(this.v._length=0,this.d===2||this.d===1)if(this.v.setTripleAt(z+X,k-V+u,z+X,k-V+u,z+X,k-V+p,0,!0),this.v.setTripleAt(z+X,k+V-u,z+X,k+V-p,z+X,k+V-u,1,!0),u!==0)this.v.setTripleAt(z+X-u,k+V,z+X-u,k+V,z+X-p,k+V,2,!0),this.v.setTripleAt(z-X+u,k+V,z-X+p,k+V,z-X+u,k+V,3,!0),this.v.setTripleAt(z-X,k+V-u,z-X,k+V-u,z-X,k+V-p,4,!0),this.v.setTripleAt(z-X,k-V+u,z-X,k-V+p,z-X,k-V+u,5,!0),this.v.setTripleAt(z-X+u,k-V,z-X+u,k-V,z-X+p,k-V,6,!0),this.v.setTripleAt(z+X-u,k-V,z+X-p,k-V,z+X-u,k-V,7,!0);else this.v.setTripleAt(z-X,k+V,z-X+p,k+V,z-X,k+V,2),this.v.setTripleAt(z-X,k-V,z-X,k-V+p,z-X,k-V,3);else if(this.v.setTripleAt(z+X,k-V+u,z+X,k-V+p,z+X,k-V+u,0,!0),u!==0)this.v.setTripleAt(z+X-u,k-V,z+X-u,k-V,z+X-p,k-V,1,!0),this.v.setTripleAt(z-X+u,k-V,z-X+p,k-V,z-X+u,k-V,2,!0),this.v.setTripleAt(z-X,k-V+u,z-X,k-V+u,z-X,k-V+p,3,!0),this.v.setTripleAt(z-X,k+V-u,z-X,k+V-p,z-X,k+V-u,4,!0),this.v.setTripleAt(z-X+u,k+V,z-X+u,k+V,z-X+p,k+V,5,!0),this.v.setTripleAt(z+X-u,k+V,z+X-p,k+V,z+X-u,k+V,6,!0),this.v.setTripleAt(z+X,k+V-u,z+X,k+V-u,z+X,k+V-p,7,!0);else this.v.setTripleAt(z-X,k-V,z-X+p,k-V,z-X,k-V,1,!0),this.v.setTripleAt(z-X,k+V,z-X,k+V-p,z-X,k+V,2,!0),this.v.setTripleAt(z+X,k+V,z+X-p,k+V,z+X,k+V,3,!0)},getValue:function c(){if(this.elem.globalData.frameId===this.frameId)return;if(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf)this.convertRectToPath()},reset:r},extendPrototype([DynamicPropertyContainer],Z),Z}();function Y(Z,c,z){var k;if(z===3||z===4){var X=z===3?c.pt:c.ks,V=X.k;if(V.length)k=new f(Z,c,z);else k=new l(Z,c,z)}else if(z===5)k=new v(Z,c);else if(z===6)k=new n(Z,c);else if(z===7)k=new _(Z,c);if(k.k)Z.addDynamicProperty(k);return k}function H(){return l}function $(){return f}var I={};return I.getShapeProp=Y,I.getConstructorFunction=H,I.getKeyframedConstructorFunction=$,I}();/*!
|
|
3
3
|
Transformation Matrix v2.0
|
|
4
4
|
(c) Epistemex 2014-2015
|
|
5
5
|
www.epistemex.com
|
|
6
6
|
By Ken Fyrstenberg
|
|
7
7
|
Contributions by leeoniya.
|
|
8
8
|
License: MIT, header required.
|
|
9
|
-
*/var Matrix=function(){var{cos:o,sin:d,tan:i,round:r}=Math;function h(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function a(b){if(b===0)return this;var J=o(b),R=d(b);return this._t(J,-R,0,0,R,J,0,0,0,0,1,0,0,0,0,1)}function g(b){if(b===0)return this;var J=o(b),R=d(b);return this._t(1,0,0,0,0,J,-R,0,0,R,J,0,0,0,0,1)}function l(b){if(b===0)return this;var J=o(b),R=d(b);return this._t(J,0,R,0,0,1,0,0,-R,0,J,0,0,0,0,1)}function x(b){if(b===0)return this;var J=o(b),R=d(b);return this._t(J,-R,0,0,R,J,0,0,0,0,1,0,0,0,0,1)}function w(b,J){return this._t(1,J,b,1,0,0)}function z(b,J){return this.shear(i(b),i(J))}function _(b,J){var R=o(J),G=d(J);return this._t(R,G,0,0,-G,R,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,i(b),1,0,0,0,0,1,0,0,0,0,1)._t(R,-G,0,0,G,R,0,0,0,0,1,0,0,0,0,1)}function n(b,J,R){if(!R&&R!==0)R=1;if(b===1&&J===1&&R===1)return this;return this._t(b,0,0,0,0,J,0,0,0,0,R,0,0,0,0,1)}function Y(b,J,R,G,D,t,E,m,d0,g0,Z0,W0,J0,f0,$0,h0){return this.props[0]=b,this.props[1]=J,this.props[2]=R,this.props[3]=G,this.props[4]=D,this.props[5]=t,this.props[6]=E,this.props[7]=m,this.props[8]=d0,this.props[9]=g0,this.props[10]=Z0,this.props[11]=W0,this.props[12]=J0,this.props[13]=f0,this.props[14]=$0,this.props[15]=h0,this}function H(b,J,R){if(R=R||0,b!==0||J!==0||R!==0)return this._t(1,0,0,0,0,1,0,0,0,0,1,0,b,J,R,1);return this}function $(b,J,R,G,D,t,E,m,d0,g0,Z0,W0,J0,f0,$0,h0){var M=this.props;if(b===1&&J===0&&R===0&&G===0&&D===0&&t===1&&E===0&&m===0&&d0===0&&g0===0&&Z0===1&&W0===0)return M[12]=M[12]*b+M[15]*J0,M[13]=M[13]*t+M[15]*f0,M[14]=M[14]*Z0+M[15]*$0,M[15]*=h0,this._identityCalculated=!1,this;var x0=M[0],o1=M[1],N0=M[2],O0=M[3],A0=M[4],y0=M[5],X0=M[6],d1=M[7],i1=M[8],L0=M[9],r1=M[10],u0=M[11],c1=M[12],B1=M[13],N1=M[14],A1=M[15];return M[0]=x0*b+o1*D+N0*d0+O0*J0,M[1]=x0*J+o1*t+N0*g0+O0*f0,M[2]=x0*R+o1*E+N0*Z0+O0*$0,M[3]=x0*G+o1*m+N0*W0+O0*h0,M[4]=A0*b+y0*D+X0*d0+d1*J0,M[5]=A0*J+y0*t+X0*g0+d1*f0,M[6]=A0*R+y0*E+X0*Z0+d1*$0,M[7]=A0*G+y0*m+X0*W0+d1*h0,M[8]=i1*b+L0*D+r1*d0+u0*J0,M[9]=i1*J+L0*t+r1*g0+u0*f0,M[10]=i1*R+L0*E+r1*Z0+u0*$0,M[11]=i1*G+L0*m+r1*W0+u0*h0,M[12]=c1*b+B1*D+N1*d0+A1*J0,M[13]=c1*J+B1*t+N1*g0+A1*f0,M[14]=c1*R+B1*E+N1*Z0+A1*$0,M[15]=c1*G+B1*m+N1*W0+A1*h0,this._identityCalculated=!1,this}function I(b){var J=b.props;return this.transform(J[0],J[1],J[2],J[3],J[4],J[5],J[6],J[7],J[8],J[9],J[10],J[11],J[12],J[13],J[14],J[15])}function Z(){if(!this._identityCalculated)this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0;return this._identity}function c(b){var J=0;while(J<16){if(b.props[J]!==this.props[J])return!1;J+=1}return!0}function v(b){var J;for(J=0;J<16;J+=1)b.props[J]=this.props[J];return b}function k(b){var J;for(J=0;J<16;J+=1)this.props[J]=b[J]}function X(b,J,R){return{x:b*this.props[0]+J*this.props[4]+R*this.props[8]+this.props[12],y:b*this.props[1]+J*this.props[5]+R*this.props[9]+this.props[13],z:b*this.props[2]+J*this.props[6]+R*this.props[10]+this.props[14]}}function V(b,J,R){return b*this.props[0]+J*this.props[4]+R*this.props[8]+this.props[12]}function u(b,J,R){return b*this.props[1]+J*this.props[5]+R*this.props[9]+this.props[13]}function p(b,J,R){return b*this.props[2]+J*this.props[6]+R*this.props[10]+this.props[14]}function U(){var b=this.props[0]*this.props[5]-this.props[1]*this.props[4],J=this.props[5]/b,R=-this.props[1]/b,G=-this.props[4]/b,D=this.props[0]/b,t=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/b,E=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/b,m=new Matrix;return m.props[0]=J,m.props[1]=R,m.props[4]=G,m.props[5]=D,m.props[12]=t,m.props[13]=E,m}function F(b){var J=this.getInverseMatrix();return J.applyToPointArray(b[0],b[1],b[2]||0)}function L(b){var J,R=b.length,G=[];for(J=0;J<R;J+=1)G[J]=F(b[J]);return G}function j(b,J,R){var G=createTypedArray("float32",6);if(this.isIdentity())G[0]=b[0],G[1]=b[1],G[2]=J[0],G[3]=J[1],G[4]=R[0],G[5]=R[1];else{var D=this.props[0],t=this.props[1],E=this.props[4],m=this.props[5],d0=this.props[12],g0=this.props[13];G[0]=b[0]*D+b[1]*E+d0,G[1]=b[0]*t+b[1]*m+g0,G[2]=J[0]*D+J[1]*E+d0,G[3]=J[0]*t+J[1]*m+g0,G[4]=R[0]*D+R[1]*E+d0,G[5]=R[0]*t+R[1]*m+g0}return G}function C(b,J,R){var G;if(this.isIdentity())G=[b,J,R];else G=[b*this.props[0]+J*this.props[4]+R*this.props[8]+this.props[12],b*this.props[1]+J*this.props[5]+R*this.props[9]+this.props[13],b*this.props[2]+J*this.props[6]+R*this.props[10]+this.props[14]];return G}function T(b,J){if(this.isIdentity())return b+","+J;var R=this.props;return Math.round((b*R[0]+J*R[4]+R[12])*100)/100+","+Math.round((b*R[1]+J*R[5]+R[13])*100)/100}function K(){var b=0,J=this.props,R="matrix3d(",G=1e4;while(b<16)R+=r(J[b]*G)/G,R+=b===15?")":",",b+=1;return R}function Q(b){var J=1e4;if(b<0.000001&&b>0||b>-0.000001&&b<0)return r(b*J)/J;return b}function W(){var b=this.props,J=Q(b[0]),R=Q(b[1]),G=Q(b[4]),D=Q(b[5]),t=Q(b[12]),E=Q(b[13]);return"matrix("+J+","+R+","+G+","+D+","+t+","+E+")"}return function(){this.reset=h,this.rotate=a,this.rotateX=g,this.rotateY=l,this.rotateZ=x,this.skew=z,this.skewFromAxis=_,this.shear=w,this.scale=n,this.setTransform=Y,this.translate=H,this.transform=$,this.multiply=I,this.applyToPoint=X,this.applyToX=V,this.applyToY=u,this.applyToZ=p,this.applyToPointArray=C,this.applyToTriplePoints=j,this.applyToPointStringified=T,this.toCSS=K,this.to2dCSS=W,this.clone=v,this.cloneFromProps=k,this.equals=c,this.inversePoints=L,this.inversePoint=F,this.getInverseMatrix=U,this._t=this.transform,this.isIdentity=Z,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(o){return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$3(o)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(o){setLocationHref(o)}function searchAnimations(){if(standalone===!0)animationManager.searchAnimations(animationData,standalone,renderer);else animationManager.searchAnimations()}function setSubframeRendering(o){setSubframeEnabled(o)}function setPrefix(o){setIdPrefix(o)}function loadAnimation(o){if(standalone===!0)o.animationData=JSON.parse(animationData);return animationManager.loadAnimation(o)}function setQuality(o){if(typeof o==="string")switch(o){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else if(!isNaN(o)&&o>1)setDefaultCurveSegments(o);if(getDefaultCurveSegments()>=50)roundValues(!1);else roundValues(!0)}function inBrowser(){return typeof navigator!=="undefined"}function installPlugin(o,d){if(o==="expressions")setExpressionsPlugin(d)}function getFactory(o){switch(o){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.13.0";function checkReady(){if(document.readyState==="complete")clearInterval(readyStateCheckInterval),searchAnimations()}function getQueryVariable(o){var d=queryString.split("&");for(var i=0;i<d.length;i+=1){var r=d[i].split("=");if(decodeURIComponent(r[0])==o)return decodeURIComponent(r[1])}return null}var queryString="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{if(!((typeof W1==="undefined"?"undefined":_typeof$3(W1))==="object"&&typeof T1!=="undefined")&&!(typeof define==="function"&&define.amd))window.bodymovin=lottie}catch(o){}var ShapeModifiers=function(){var o={},d={};o.registerModifier=i,o.getModifier=r;function i(h,a){if(!d[h])d[h]=a}function r(h,a,g){return new d[h](a,g)}return o}();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(o){if(!this.closed){o.sh.container.addDynamicProperty(o.sh);var d={shape:o.sh,data:o,localShapeCollection:shapeCollectionPool.newShapeCollection()};if(this.shapes.push(d),this.addShapeToModifier(d),this._isAnimated)o.setAsAnimated()}},ShapeModifier.prototype.init=function(o,d){if(this.shapes=[],this.elem=o,this.initDynamicPropertyContainer(o),this.initModifierProperties(o,d),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length)this.k=!0;else this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){if(this.elem.globalData.frameId===this.frameId)return;this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties()},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(o,d){this.s=PropertyFactory.getProp(o,d.s,0,0.01,this),this.e=PropertyFactory.getProp(o,d.e,0,0.01,this),this.o=PropertyFactory.getProp(o,d.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=d.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(o){o.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(o,d,i,r,h){var a=[];if(d<=1)a.push({s:o,e:d});else if(o>=1)a.push({s:o-1,e:d-1});else a.push({s:o,e:1}),a.push({s:0,e:d-1});var g=[],l,x=a.length,w;for(l=0;l<x;l+=1)if(w=a[l],!(w.e*h<r||w.s*h>r+i)){var z,_;if(w.s*h<=r)z=0;else z=(w.s*h-r)/i;if(w.e*h>=r+i)_=1;else _=(w.e*h-r)/i;g.push([z,_])}if(!g.length)g.push([0,0]);return g},TrimModifier.prototype.releasePathsData=function(o){var d,i=o.length;for(d=0;d<i;d+=1)segmentsLengthPool.release(o[d]);return o.length=0,o},TrimModifier.prototype.processShapes=function(o){var d,i;if(this._mdf||o){var r=this.o.v%360/360;if(r<0)r+=1;if(this.s.v>1)d=1+r;else if(this.s.v<0)d=0+r;else d=this.s.v+r;if(this.e.v>1)i=1+r;else if(this.e.v<0)i=0+r;else i=this.e.v+r;if(d>i){var h=d;d=i,i=h}d=Math.round(d*1e4)*0.0001,i=Math.round(i*1e4)*0.0001,this.sValue=d,this.eValue=i}else d=this.sValue,i=this.eValue;var a,g,l=this.shapes.length,x,w,z,_,n,Y=0;if(i===d){for(g=0;g<l;g+=1)if(this.shapes[g].localShapeCollection.releaseShapes(),this.shapes[g].shape._mdf=!0,this.shapes[g].shape.paths=this.shapes[g].localShapeCollection,this._mdf)this.shapes[g].pathsData.length=0}else if(!(i===1&&d===0||i===0&&d===1)){var H=[],$,I;for(g=0;g<l;g+=1)if($=this.shapes[g],!$.shape._mdf&&!this._mdf&&!o&&this.m!==2)$.shape.paths=$.localShapeCollection;else{if(a=$.shape.paths,w=a._length,n=0,!$.shape._mdf&&$.pathsData.length)n=$.totalShapeLength;else{z=this.releasePathsData($.pathsData);for(x=0;x<w;x+=1)_=bez.getSegmentsLength(a.shapes[x]),z.push(_),n+=_.totalLength;$.totalShapeLength=n,$.pathsData=z}Y+=n,$.shape._mdf=!0}var Z=d,c=i,v=0,k;for(g=l-1;g>=0;g-=1)if($=this.shapes[g],$.shape._mdf){if(I=$.localShapeCollection,I.releaseShapes(),this.m===2&&l>1)k=this.calculateShapeEdges(d,i,$.totalShapeLength,v,Y),v+=$.totalShapeLength;else k=[[Z,c]];w=k.length;for(x=0;x<w;x+=1){if(Z=k[x][0],c=k[x][1],H.length=0,c<=1)H.push({s:$.totalShapeLength*Z,e:$.totalShapeLength*c});else if(Z>=1)H.push({s:$.totalShapeLength*(Z-1),e:$.totalShapeLength*(c-1)});else H.push({s:$.totalShapeLength*Z,e:$.totalShapeLength}),H.push({s:0,e:$.totalShapeLength*(c-1)});var X=this.addShapes($,H[0]);if(H[0].s!==H[0].e){if(H.length>1){var V=$.shape.paths.shapes[$.shape.paths._length-1];if(V.c){var u=X.pop();this.addPaths(X,I),X=this.addShapes($,H[1],u)}else this.addPaths(X,I),X=this.addShapes($,H[1])}this.addPaths(X,I)}}$.shape.paths=I}}else if(this._mdf)for(g=0;g<l;g+=1)this.shapes[g].pathsData.length=0,this.shapes[g].shape._mdf=!0},TrimModifier.prototype.addPaths=function(o,d){var i,r=o.length;for(i=0;i<r;i+=1)d.addShape(o[i])},TrimModifier.prototype.addSegment=function(o,d,i,r,h,a,g){if(h.setXYAt(d[0],d[1],"o",a),h.setXYAt(i[0],i[1],"i",a+1),g)h.setXYAt(o[0],o[1],"v",a);h.setXYAt(r[0],r[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(o,d,i,r){if(d.setXYAt(o[1],o[5],"o",i),d.setXYAt(o[2],o[6],"i",i+1),r)d.setXYAt(o[0],o[4],"v",i);d.setXYAt(o[3],o[7],"v",i+1)},TrimModifier.prototype.addShapes=function(o,d,i){var r=o.pathsData,h=o.shape.paths.shapes,a,g=o.shape.paths._length,l,x,w=0,z,_,n,Y,H=[],$,I=!0;if(!i)i=shapePool.newElement(),_=0,$=0;else _=i._length,$=i._length;H.push(i);for(a=0;a<g;a+=1){n=r[a].lengths,i.c=h[a].c,x=h[a].c?n.length:n.length+1;for(l=1;l<x;l+=1)if(z=n[l-1],w+z.addedLength<d.s)w+=z.addedLength,i.c=!1;else if(w>d.e){i.c=!1;break}else{if(d.s<=w&&d.e>=w+z.addedLength)this.addSegment(h[a].v[l-1],h[a].o[l-1],h[a].i[l],h[a].v[l],i,_,I),I=!1;else Y=bez.getNewSegment(h[a].v[l-1],h[a].v[l],h[a].o[l-1],h[a].i[l],(d.s-w)/z.addedLength,(d.e-w)/z.addedLength,n[l-1]),this.addSegmentFromArray(Y,i,_,I),I=!1,i.c=!1;w+=z.addedLength,_+=1}if(h[a].c&&n.length){if(z=n[l-1],w<=d.e){var Z=n[l-1].addedLength;if(d.s<=w&&d.e>=w+Z)this.addSegment(h[a].v[l-1],h[a].o[l-1],h[a].i[0],h[a].v[0],i,_,I),I=!1;else Y=bez.getNewSegment(h[a].v[l-1],h[a].v[0],h[a].o[l-1],h[a].i[0],(d.s-w)/Z,(d.e-w)/Z,n[l-1]),this.addSegmentFromArray(Y,i,_,I),I=!1,i.c=!1}else i.c=!1;w+=z.addedLength,_+=1}if(i._length)i.setXYAt(i.v[$][0],i.v[$][1],"i",$),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1);if(w>d.e)break;if(a<g-1)i=shapePool.newElement(),I=!0,H.push(i),_=0}return H};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(o,d){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(o,d.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(o,d){var i=d/100,r=[0,0],h=o._length,a=0;for(a=0;a<h;a+=1)r[0]+=o.v[a][0],r[1]+=o.v[a][1];r[0]/=h,r[1]/=h;var g=shapePool.newElement();g.c=o.c;var l,x,w,z,_,n;for(a=0;a<h;a+=1)l=o.v[a][0]+(r[0]-o.v[a][0])*i,x=o.v[a][1]+(r[1]-o.v[a][1])*i,w=o.o[a][0]+(r[0]-o.o[a][0])*-i,z=o.o[a][1]+(r[1]-o.o[a][1])*-i,_=o.i[a][0]+(r[0]-o.i[a][0])*-i,n=o.i[a][1]+(r[1]-o.i[a][1])*-i,g.setTripleAt(l,x,w,z,_,n,a);return g},PuckerAndBloatModifier.prototype.processShapes=function(o){var d,i,r=this.shapes.length,h,a,g=this.amount.v;if(g!==0){var l,x;for(i=0;i<r;i+=1){if(l=this.shapes[i],x=l.localShapeCollection,!(!l.shape._mdf&&!this._mdf&&!o)){x.releaseShapes(),l.shape._mdf=!0,d=l.shape.paths.shapes,a=l.shape.paths._length;for(h=0;h<a;h+=1)x.addShape(this.processPath(d[h],g))}l.shape.paths=l.localShapeCollection}}if(!this.dynamicProperties.length)this._mdf=!1};var TransformPropertyFactory=function(){var o=[0,0];function d(x){var w=this._mdf;if(this.iterateDynamicProperties(),this._mdf=this._mdf||w,this.a)x.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]);if(this.s)x.scale(this.s.v[0],this.s.v[1],this.s.v[2]);if(this.sk)x.skewFromAxis(-this.sk.v,this.sa.v);if(this.r)x.rotate(-this.r.v);else x.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);if(this.data.p.s)if(this.data.p.z)x.translate(this.px.v,this.py.v,-this.pz.v);else x.translate(this.px.v,this.py.v,0);else x.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function i(x){if(this.elem.globalData.frameId===this.frameId)return;if(this._isDirty)this.precalculateMatrix(),this._isDirty=!1;if(this.iterateDynamicProperties(),this._mdf||x){var w;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1)this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]);if(this.appliedTransformations<2)this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]);if(this.sk&&this.appliedTransformations<3)this.v.skewFromAxis(-this.sk.v,this.sa.v);if(this.r&&this.appliedTransformations<4)this.v.rotate(-this.r.v);else if(!this.r&&this.appliedTransformations<4)this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);if(this.autoOriented){var z,_;if(w=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)if(this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t)z=this.p.getValueAtTime((this.p.keyframes[0].t+0.01)/w,0),_=this.p.getValueAtTime(this.p.keyframes[0].t/w,0);else if(this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t)z=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/w,0),_=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-0.05)/w,0);else z=this.p.pv,_=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-0.01)/w,this.p.offsetTime);else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){z=[],_=[];var n=this.px,Y=this.py;if(n._caching.lastFrame+n.offsetTime<=n.keyframes[0].t)z[0]=n.getValueAtTime((n.keyframes[0].t+0.01)/w,0),z[1]=Y.getValueAtTime((Y.keyframes[0].t+0.01)/w,0),_[0]=n.getValueAtTime(n.keyframes[0].t/w,0),_[1]=Y.getValueAtTime(Y.keyframes[0].t/w,0);else if(n._caching.lastFrame+n.offsetTime>=n.keyframes[n.keyframes.length-1].t)z[0]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/w,0),z[1]=Y.getValueAtTime(Y.keyframes[Y.keyframes.length-1].t/w,0),_[0]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-0.01)/w,0),_[1]=Y.getValueAtTime((Y.keyframes[Y.keyframes.length-1].t-0.01)/w,0);else z=[n.pv,Y.pv],_[0]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-0.01)/w,n.offsetTime),_[1]=Y.getValueAtTime((Y._caching.lastFrame+Y.offsetTime-0.01)/w,Y.offsetTime)}else _=o,z=_;this.v.rotate(-Math.atan2(z[1]-_[1],z[0]-_[0]))}if(this.data.p&&this.data.p.s)if(this.data.p.z)this.v.translate(this.px.v,this.py.v,-this.pz.v);else this.v.translate(this.px.v,this.py.v,0);else this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}function r(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;if(this.r){if(!this.r.effectsSequence.length)this.pre.rotate(-this.r.v),this.appliedTransformations=4}else if(!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length)this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4}function h(){}function a(x){this._addDynamicProperty(x),this.elem.addDynamicProperty(x),this._isDirty=!0}function g(x,w,z){if(this.elem=x,this.frameId=-1,this.propType="transform",this.data=w,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(z||x),w.p&&w.p.s){if(this.px=PropertyFactory.getProp(x,w.p.x,0,0,this),this.py=PropertyFactory.getProp(x,w.p.y,0,0,this),w.p.z)this.pz=PropertyFactory.getProp(x,w.p.z,0,0,this)}else this.p=PropertyFactory.getProp(x,w.p||{k:[0,0,0]},1,0,this);if(w.rx){if(this.rx=PropertyFactory.getProp(x,w.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(x,w.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(x,w.rz,0,degToRads,this),w.or.k[0].ti){var _,n=w.or.k.length;for(_=0;_<n;_+=1)w.or.k[_].to=null,w.or.k[_].ti=null}this.or=PropertyFactory.getProp(x,w.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(x,w.r||{k:0},0,degToRads,this);if(w.sk)this.sk=PropertyFactory.getProp(x,w.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(x,w.sa,0,degToRads,this);if(this.a=PropertyFactory.getProp(x,w.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(x,w.s||{k:[100,100,100]},1,0.01,this),w.o)this.o=PropertyFactory.getProp(x,w.o,0,0.01,x);else this.o={_mdf:!1,v:1};if(this._isDirty=!0,!this.dynamicProperties.length)this.getValue(!0)}g.prototype={applyToMatrix:d,getValue:i,precalculateMatrix:r,autoOrient:h},extendPrototype([DynamicPropertyContainer],g),g.prototype.addDynamicProperty=a,g.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function l(x,w,z){return new g(x,w,z)}return{getTransformProperty:l}}();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(o,d){if(this.getValue=this.processKeys,this.c=PropertyFactory.getProp(o,d.c,0,null,this),this.o=PropertyFactory.getProp(o,d.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(o,d.tr,this),this.so=PropertyFactory.getProp(o,d.tr.so,0,0.01,this),this.eo=PropertyFactory.getProp(o,d.tr.eo,0,0.01,this),this.data=d,!this.dynamicProperties.length)this.getValue(!0);this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(o,d,i,r,h,a){var g=a?-1:1,l=r.s.v[0]+(1-r.s.v[0])*(1-h),x=r.s.v[1]+(1-r.s.v[1])*(1-h);o.translate(r.p.v[0]*g*h,r.p.v[1]*g*h,r.p.v[2]),d.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),d.rotate(-r.r.v*g*h),d.translate(r.a.v[0],r.a.v[1],r.a.v[2]),i.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),i.scale(a?1/l:l,a?1/x:x),i.translate(r.a.v[0],r.a.v[1],r.a.v[2])},RepeaterModifier.prototype.init=function(o,d,i,r){this.elem=o,this.arr=d,this.pos=i,this.elemsData=r,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(o),this.initModifierProperties(o,d[i]);while(i>0)i-=1,this._elements.unshift(d[i]);if(this.dynamicProperties.length)this.k=!0;else this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(o){var d,i=o.length;for(d=0;d<i;d+=1)if(o[d]._processed=!1,o[d].ty==="gr")this.resetElements(o[d].it)},RepeaterModifier.prototype.cloneElements=function(o){var d=JSON.parse(JSON.stringify(o));return this.resetElements(d),d},RepeaterModifier.prototype.changeGroupRender=function(o,d){var i,r=o.length;for(i=0;i<r;i+=1)if(o[i]._render=d,o[i].ty==="gr")this.changeGroupRender(o[i].it,d)},RepeaterModifier.prototype.processShapes=function(o){var d,i,r,h,a,g=!1;if(this._mdf||o){var l=Math.ceil(this.c.v);if(this._groups.length<l){while(this._groups.length<l){var x={it:this.cloneElements(this._elements),ty:"gr"};x.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,x),this._groups.splice(0,0,x),this._currentCopies+=1}this.elem.reloadShapes(),g=!0}a=0;var w;for(r=0;r<=this._groups.length-1;r+=1){if(w=a<l,this._groups[r]._render=w,this.changeGroupRender(this._groups[r].it,w),!w){var z=this.elemsData[r].it,_=z[z.length-1];if(_.transform.op.v!==0)_.transform.op._mdf=!0,_.transform.op.v=0;else _.transform.op._mdf=!1}a+=1}this._currentCopies=l;var n=this.o.v,Y=n%1,H=n>0?Math.floor(n):Math.ceil(n),$=this.pMatrix.props,I=this.rMatrix.props,Z=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var c=0;if(n>0){while(c<H)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),c+=1;if(Y)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,Y,!1),c+=Y}else if(n<0){while(c>H)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),c-=1;if(Y)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-Y,!0),c-=Y}r=this.data.m===1?0:this._currentCopies-1,h=this.data.m===1?1:-1,a=this._currentCopies;var v,k;while(a){if(d=this.elemsData[r].it,i=d[d.length-1].transform.mProps.v.props,k=i.length,d[d.length-1].transform.mProps._mdf=!0,d[d.length-1].transform.op._mdf=!0,d[d.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(r/(this._currentCopies-1)),c!==0){if(r!==0&&h===1||r!==this._currentCopies-1&&h===-1)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1);this.matrix.transform(I[0],I[1],I[2],I[3],I[4],I[5],I[6],I[7],I[8],I[9],I[10],I[11],I[12],I[13],I[14],I[15]),this.matrix.transform(Z[0],Z[1],Z[2],Z[3],Z[4],Z[5],Z[6],Z[7],Z[8],Z[9],Z[10],Z[11],Z[12],Z[13],Z[14],Z[15]),this.matrix.transform($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15]);for(v=0;v<k;v+=1)i[v]=this.matrix.props[v];this.matrix.reset()}else{this.matrix.reset();for(v=0;v<k;v+=1)i[v]=this.matrix.props[v]}c+=1,a-=1,r+=h}}else{a=this._currentCopies,r=0,h=1;while(a)d=this.elemsData[r].it,i=d[d.length-1].transform.mProps.v.props,d[d.length-1].transform.mProps._mdf=!1,d[d.length-1].transform.op._mdf=!1,a-=1,r+=h}return g},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(o,d){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(o,d.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(o,d){var i=shapePool.newElement();i.c=o.c;var r,h=o._length,a,g,l,x,w,z,_=0,n,Y,H,$,I,Z;for(r=0;r<h;r+=1)if(a=o.v[r],l=o.o[r],g=o.i[r],a[0]===l[0]&&a[1]===l[1]&&a[0]===g[0]&&a[1]===g[1])if((r===0||r===h-1)&&!o.c)i.setTripleAt(a[0],a[1],l[0],l[1],g[0],g[1],_),_+=1;else{if(r===0)x=o.v[h-1];else x=o.v[r-1];if(w=Math.sqrt(Math.pow(a[0]-x[0],2)+Math.pow(a[1]-x[1],2)),z=w?Math.min(w/2,d)/w:0,I=a[0]+(x[0]-a[0])*z,n=I,Z=a[1]-(a[1]-x[1])*z,Y=Z,H=n-(n-a[0])*roundCorner,$=Y-(Y-a[1])*roundCorner,i.setTripleAt(n,Y,H,$,I,Z,_),_+=1,r===h-1)x=o.v[0];else x=o.v[r+1];w=Math.sqrt(Math.pow(a[0]-x[0],2)+Math.pow(a[1]-x[1],2)),z=w?Math.min(w/2,d)/w:0,H=a[0]+(x[0]-a[0])*z,n=H,$=a[1]+(x[1]-a[1])*z,Y=$,I=n-(n-a[0])*roundCorner,Z=Y-(Y-a[1])*roundCorner,i.setTripleAt(n,Y,H,$,I,Z,_),_+=1}else i.setTripleAt(o.v[r][0],o.v[r][1],o.o[r][0],o.o[r][1],o.i[r][0],o.i[r][1],_),_+=1;return i},RoundCornersModifier.prototype.processShapes=function(o){var d,i,r=this.shapes.length,h,a,g=this.rd.v;if(g!==0){var l,x;for(i=0;i<r;i+=1){if(l=this.shapes[i],x=l.localShapeCollection,!(!l.shape._mdf&&!this._mdf&&!o)){x.releaseShapes(),l.shape._mdf=!0,d=l.shape.paths.shapes,a=l.shape.paths._length;for(h=0;h<a;h+=1)x.addShape(this.processPath(d[h],g))}l.shape.paths=l.localShapeCollection}}if(!this.dynamicProperties.length)this._mdf=!1};function floatEqual(o,d){return Math.abs(o-d)*1e5<=Math.min(Math.abs(o),Math.abs(d))}function floatZero(o){return Math.abs(o)<=0.00001}function lerp(o,d,i){return o*(1-i)+d*i}function lerpPoint(o,d,i){return[lerp(o[0],d[0],i),lerp(o[1],d[1],i)]}function quadRoots(o,d,i){if(o===0)return[];var r=d*d-4*o*i;if(r<0)return[];var h=-d/(2*o);if(r===0)return[h];var a=Math.sqrt(r)/(2*o);return[h-a,h+a]}function polynomialCoefficients(o,d,i,r){return[-o+3*d-3*i+r,3*o-6*d+3*i,-3*o+3*d,o]}function singlePoint(o){return new PolynomialBezier(o,o,o,o,!1)}function PolynomialBezier(o,d,i,r,h){if(h&&pointEqual(o,d))d=lerpPoint(o,r,0.3333333333333333);if(h&&pointEqual(i,r))i=lerpPoint(o,r,0.6666666666666666);var a=polynomialCoefficients(o[0],d[0],i[0],r[0]),g=polynomialCoefficients(o[1],d[1],i[1],r[1]);this.a=[a[0],g[0]],this.b=[a[1],g[1]],this.c=[a[2],g[2]],this.d=[a[3],g[3]],this.points=[o,d,i,r]}PolynomialBezier.prototype.point=function(o){return[((this.a[0]*o+this.b[0])*o+this.c[0])*o+this.d[0],((this.a[1]*o+this.b[1])*o+this.c[1])*o+this.d[1]]},PolynomialBezier.prototype.derivative=function(o){return[(3*o*this.a[0]+2*this.b[0])*o+this.c[0],(3*o*this.a[1]+2*this.b[1])*o+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(o){var d=this.derivative(o);return Math.atan2(d[1],d[0])},PolynomialBezier.prototype.normalAngle=function(o){var d=this.derivative(o);return Math.atan2(d[0],d[1])},PolynomialBezier.prototype.inflectionPoints=function(){var o=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(o))return[];var d=-0.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/o,i=d*d-0.3333333333333333*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/o;if(i<0)return[];var r=Math.sqrt(i);if(floatZero(r)){if(r>0&&r<1)return[d];return[]}return[d-r,d+r].filter(function(h){return h>0&&h<1})},PolynomialBezier.prototype.split=function(o){if(o<=0)return[singlePoint(this.points[0]),this];if(o>=1)return[this,singlePoint(this.points[this.points.length-1])];var d=lerpPoint(this.points[0],this.points[1],o),i=lerpPoint(this.points[1],this.points[2],o),r=lerpPoint(this.points[2],this.points[3],o),h=lerpPoint(d,i,o),a=lerpPoint(i,r,o),g=lerpPoint(h,a,o);return[new PolynomialBezier(this.points[0],d,h,g,!0),new PolynomialBezier(g,a,r,this.points[3],!0)]};function extrema(o,d){var i=o.points[0][d],r=o.points[o.points.length-1][d];if(i>r){var h=r;r=i,i=h}var a=quadRoots(3*o.a[d],2*o.b[d],o.c[d]);for(var g=0;g<a.length;g+=1)if(a[g]>0&&a[g]<1){var l=o.point(a[g])[d];if(l<i)i=l;else if(l>r)r=l}return{min:i,max:r}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var o=this.bounds();return{left:o.x.min,right:o.x.max,top:o.y.min,bottom:o.y.max,width:o.x.max-o.x.min,height:o.y.max-o.y.min,cx:(o.x.max+o.x.min)/2,cy:(o.y.max+o.y.min)/2}};function intersectData(o,d,i){var r=o.boundingBox();return{cx:r.cx,cy:r.cy,width:r.width,height:r.height,bez:o,t:(d+i)/2,t1:d,t2:i}}function splitData(o){var d=o.bez.split(0.5);return[intersectData(d[0],o.t1,o.t),intersectData(d[1],o.t,o.t2)]}function boxIntersect(o,d){return Math.abs(o.cx-d.cx)*2<o.width+d.width&&Math.abs(o.cy-d.cy)*2<o.height+d.height}function intersectsImpl(o,d,i,r,h,a){if(!boxIntersect(o,d))return;if(i>=a||o.width<=r&&o.height<=r&&d.width<=r&&d.height<=r){h.push([o.t,d.t]);return}var g=splitData(o),l=splitData(d);intersectsImpl(g[0],l[0],i+1,r,h,a),intersectsImpl(g[0],l[1],i+1,r,h,a),intersectsImpl(g[1],l[0],i+1,r,h,a),intersectsImpl(g[1],l[1],i+1,r,h,a)}PolynomialBezier.prototype.intersections=function(o,d,i){if(d===void 0)d=2;if(i===void 0)i=7;var r=[];return intersectsImpl(intersectData(this,0,1),intersectData(o,0,1),0,d,r,i),r},PolynomialBezier.shapeSegment=function(o,d){var i=(d+1)%o.length();return new PolynomialBezier(o.v[d],o.o[d],o.i[i],o.v[i],!0)},PolynomialBezier.shapeSegmentInverted=function(o,d){var i=(d+1)%o.length();return new PolynomialBezier(o.v[i],o.i[i],o.o[d],o.v[d],!0)};function crossProduct(o,d){return[o[1]*d[2]-o[2]*d[1],o[2]*d[0]-o[0]*d[2],o[0]*d[1]-o[1]*d[0]]}function lineIntersection(o,d,i,r){var h=[o[0],o[1],1],a=[d[0],d[1],1],g=[i[0],i[1],1],l=[r[0],r[1],1],x=crossProduct(crossProduct(h,a),crossProduct(g,l));if(floatZero(x[2]))return null;return[x[0]/x[2],x[1]/x[2]]}function polarOffset(o,d,i){return[o[0]+Math.cos(d)*i,o[1]-Math.sin(d)*i]}function pointDistance(o,d){return Math.hypot(o[0]-d[0],o[1]-d[1])}function pointEqual(o,d){return floatEqual(o[0],d[0])&&floatEqual(o[1],d[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(o,d){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(o,d.s,0,null,this),this.frequency=PropertyFactory.getProp(o,d.r,0,null,this),this.pointsType=PropertyFactory.getProp(o,d.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(o,d,i,r,h,a,g){var l=i-Math.PI/2,x=i+Math.PI/2,w=d[0]+Math.cos(i)*r*h,z=d[1]-Math.sin(i)*r*h;o.setTripleAt(w,z,w+Math.cos(l)*a,z-Math.sin(l)*a,w+Math.cos(x)*g,z-Math.sin(x)*g,o.length())}function getPerpendicularVector(o,d){var i=[d[0]-o[0],d[1]-o[1]],r=-Math.PI*0.5,h=[Math.cos(r)*i[0]-Math.sin(r)*i[1],Math.sin(r)*i[0]+Math.cos(r)*i[1]];return h}function getProjectingAngle(o,d){var i=d===0?o.length()-1:d-1,r=(d+1)%o.length(),h=o.v[i],a=o.v[r],g=getPerpendicularVector(h,a);return Math.atan2(0,1)-Math.atan2(g[1],g[0])}function zigZagCorner(o,d,i,r,h,a,g){var l=getProjectingAngle(d,i),x=d.v[i%d._length],w=d.v[i===0?d._length-1:i-1],z=d.v[(i+1)%d._length],_=a===2?Math.sqrt(Math.pow(x[0]-w[0],2)+Math.pow(x[1]-w[1],2)):0,n=a===2?Math.sqrt(Math.pow(x[0]-z[0],2)+Math.pow(x[1]-z[1],2)):0;setPoint(o,d.v[i%d._length],l,g,r,n/((h+1)*2),_/((h+1)*2),a)}function zigZagSegment(o,d,i,r,h,a){for(var g=0;g<r;g+=1){var l=(g+1)/(r+1),x=h===2?Math.sqrt(Math.pow(d.points[3][0]-d.points[0][0],2)+Math.pow(d.points[3][1]-d.points[0][1],2)):0,w=d.normalAngle(l),z=d.point(l);setPoint(o,z,w,a,i,x/((r+1)*2),x/((r+1)*2),h),a=-a}return a}ZigZagModifier.prototype.processPath=function(o,d,i,r){var h=o._length,a=shapePool.newElement();if(a.c=o.c,!o.c)h-=1;if(h===0)return a;var g=-1,l=PolynomialBezier.shapeSegment(o,0);zigZagCorner(a,o,0,d,i,r,g);for(var x=0;x<h;x+=1){if(g=zigZagSegment(a,l,d,i,r,-g),x===h-1&&!o.c)l=null;else l=PolynomialBezier.shapeSegment(o,(x+1)%h);zigZagCorner(a,o,x+1,d,i,r,g)}return a},ZigZagModifier.prototype.processShapes=function(o){var d,i,r=this.shapes.length,h,a,g=this.amplitude.v,l=Math.max(0,Math.round(this.frequency.v)),x=this.pointsType.v;if(g!==0){var w,z;for(i=0;i<r;i+=1){if(w=this.shapes[i],z=w.localShapeCollection,!(!w.shape._mdf&&!this._mdf&&!o)){z.releaseShapes(),w.shape._mdf=!0,d=w.shape.paths.shapes,a=w.shape.paths._length;for(h=0;h<a;h+=1)z.addShape(this.processPath(d[h],g,l,x))}w.shape.paths=w.localShapeCollection}}if(!this.dynamicProperties.length)this._mdf=!1};function linearOffset(o,d,i){var r=Math.atan2(d[0]-o[0],d[1]-o[1]);return[polarOffset(o,r,i),polarOffset(d,r,i)]}function offsetSegment(o,d){var i,r,h,a,g,l,x;x=linearOffset(o.points[0],o.points[1],d),i=x[0],r=x[1],x=linearOffset(o.points[1],o.points[2],d),h=x[0],a=x[1],x=linearOffset(o.points[2],o.points[3],d),g=x[0],l=x[1];var w=lineIntersection(i,r,h,a);if(w===null)w=r;var z=lineIntersection(g,l,h,a);if(z===null)z=g;return new PolynomialBezier(i,w,z,l)}function joinLines(o,d,i,r,h){var a=d.points[3],g=i.points[0];if(r===3)return a;if(pointEqual(a,g))return a;if(r===2){var l=-d.tangentAngle(1),x=-i.tangentAngle(0)+Math.PI,w=lineIntersection(a,polarOffset(a,l+Math.PI/2,100),g,polarOffset(g,l+Math.PI/2,100)),z=w?pointDistance(w,a):pointDistance(a,g)/2,_=polarOffset(a,l,2*z*roundCorner);return o.setXYAt(_[0],_[1],"o",o.length()-1),_=polarOffset(g,x,2*z*roundCorner),o.setTripleAt(g[0],g[1],g[0],g[1],_[0],_[1],o.length()),g}var n=pointEqual(a,d.points[2])?d.points[0]:d.points[2],Y=pointEqual(g,i.points[1])?i.points[3]:i.points[1],H=lineIntersection(n,a,g,Y);if(H&&pointDistance(H,a)<h)return o.setTripleAt(H[0],H[1],H[0],H[1],H[0],H[1],o.length()),H;return a}function getIntersection(o,d){var i=o.intersections(d);if(i.length&&floatEqual(i[0][0],1))i.shift();if(i.length)return i[0];return null}function pruneSegmentIntersection(o,d){var i=o.slice(),r=d.slice(),h=getIntersection(o[o.length-1],d[0]);if(h)i[o.length-1]=o[o.length-1].split(h[0])[0],r[0]=d[0].split(h[1])[1];if(o.length>1&&d.length>1){if(h=getIntersection(o[0],d[d.length-1]),h)return[[o[0].split(h[0])[0]],[d[d.length-1].split(h[1])[1]]]}return[i,r]}function pruneIntersections(o){var d;for(var i=1;i<o.length;i+=1)d=pruneSegmentIntersection(o[i-1],o[i]),o[i-1]=d[0],o[i]=d[1];if(o.length>1)d=pruneSegmentIntersection(o[o.length-1],o[0]),o[o.length-1]=d[0],o[0]=d[1];return o}function offsetSegmentSplit(o,d){var i=o.inflectionPoints(),r,h,a,g;if(i.length===0)return[offsetSegment(o,d)];if(i.length===1||floatEqual(i[1],1))return a=o.split(i[0]),r=a[0],h=a[1],[offsetSegment(r,d),offsetSegment(h,d)];a=o.split(i[0]),r=a[0];var l=(i[1]-i[0])/(1-i[0]);return a=a[1].split(l),g=a[0],h=a[1],[offsetSegment(r,d),offsetSegment(g,d),offsetSegment(h,d)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(o,d){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(o,d.a,0,null,this),this.miterLimit=PropertyFactory.getProp(o,d.ml,0,null,this),this.lineJoin=d.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(o,d,i,r){var h=shapePool.newElement();h.c=o.c;var a=o.length();if(!o.c)a-=1;var g,l,x,w=[];for(g=0;g<a;g+=1)x=PolynomialBezier.shapeSegment(o,g),w.push(offsetSegmentSplit(x,d));if(!o.c)for(g=a-1;g>=0;g-=1)x=PolynomialBezier.shapeSegmentInverted(o,g),w.push(offsetSegmentSplit(x,d));w=pruneIntersections(w);var z=null,_=null;for(g=0;g<w.length;g+=1){var n=w[g];if(_)z=joinLines(h,_,n[0],i,r);_=n[n.length-1];for(l=0;l<n.length;l+=1){if(x=n[l],z&&pointEqual(x.points[0],z))h.setXYAt(x.points[1][0],x.points[1][1],"o",h.length()-1);else h.setTripleAt(x.points[0][0],x.points[0][1],x.points[1][0],x.points[1][1],x.points[0][0],x.points[0][1],h.length());h.setTripleAt(x.points[3][0],x.points[3][1],x.points[3][0],x.points[3][1],x.points[2][0],x.points[2][1],h.length()),z=x.points[3]}}if(w.length)joinLines(h,_,w[0][0],i,r);return h},OffsetPathModifier.prototype.processShapes=function(o){var d,i,r=this.shapes.length,h,a,g=this.amount.v,l=this.miterLimit.v,x=this.lineJoin;if(g!==0){var w,z;for(i=0;i<r;i+=1){if(w=this.shapes[i],z=w.localShapeCollection,!(!w.shape._mdf&&!this._mdf&&!o)){z.releaseShapes(),w.shape._mdf=!0,d=w.shape.paths.shapes,a=w.shape.paths._length;for(h=0;h<a;h+=1)z.addShape(this.processPath(d[h],g,x,l))}w.shape.paths=w.localShapeCollection}}if(!this.dynamicProperties.length)this._mdf=!1};function getFontProperties(o){var d=o.fStyle?o.fStyle.split(" "):[],i="normal",r="normal",h=d.length,a;for(var g=0;g<h;g+=1)switch(a=d[g].toLowerCase(),a){case"italic":r="italic";break;case"bold":i="700";break;case"black":i="900";break;case"medium":i="500";break;case"regular":case"normal":i="400";break;case"light":case"thin":i="200";break;default:break}return{style:r,weight:o.fWeight||i}}var FontManager=function(){var o=5000,d={w:0,size:0,shapes:[],data:{shapes:[]}},i=[];i=i.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=127988,h=917631,a=917601,g=917626,l=65039,x=8205,w=127462,z=127487,_=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function n(Q){var W=Q.split(","),b,J=W.length,R=[];for(b=0;b<J;b+=1)if(W[b]!=="sans-serif"&&W[b]!=="monospace")R.push(W[b]);return R.join(",")}function Y(Q,W){var b=createTag("span");b.setAttribute("aria-hidden",!0),b.style.fontFamily=W;var J=createTag("span");J.innerText="giItT1WQy@!-/#",b.style.position="absolute",b.style.left="-10000px",b.style.top="-10000px",b.style.fontSize="300px",b.style.fontVariant="normal",b.style.fontStyle="normal",b.style.fontWeight="normal",b.style.letterSpacing="0",b.appendChild(J),document.body.appendChild(b);var R=J.offsetWidth;return J.style.fontFamily=n(Q)+", "+W,{node:J,w:R,parent:b}}function H(){var Q,W=this.fonts.length,b,J,R=W;for(Q=0;Q<W;Q+=1)if(this.fonts[Q].loaded)R-=1;else if(this.fonts[Q].fOrigin==="n"||this.fonts[Q].origin===0)this.fonts[Q].loaded=!0;else{if(b=this.fonts[Q].monoCase.node,J=this.fonts[Q].monoCase.w,b.offsetWidth!==J)R-=1,this.fonts[Q].loaded=!0;else if(b=this.fonts[Q].sansCase.node,J=this.fonts[Q].sansCase.w,b.offsetWidth!==J)R-=1,this.fonts[Q].loaded=!0;if(this.fonts[Q].loaded)this.fonts[Q].sansCase.parent.parentNode.removeChild(this.fonts[Q].sansCase.parent),this.fonts[Q].monoCase.parent.parentNode.removeChild(this.fonts[Q].monoCase.parent)}if(R!==0&&Date.now()-this.initTime<o)setTimeout(this.checkLoadedFontsBinded,20);else setTimeout(this.setIsLoadedBinded,10)}function $(Q,W){var b=document.body&&W?"svg":"canvas",J,R=getFontProperties(Q);if(b==="svg"){var G=createNS("text");if(G.style.fontSize="100px",G.setAttribute("font-family",Q.fFamily),G.setAttribute("font-style",R.style),G.setAttribute("font-weight",R.weight),G.textContent="1",Q.fClass)G.style.fontFamily="inherit",G.setAttribute("class",Q.fClass);else G.style.fontFamily=Q.fFamily;W.appendChild(G),J=G}else{var D=new OffscreenCanvas(500,500).getContext("2d");D.font=R.style+" "+R.weight+" 100px "+Q.fFamily,J=D}function t(E){if(b==="svg")return J.textContent=E,J.getComputedTextLength();return J.measureText(E).width}return{measureText:t}}function I(Q,W){if(!Q){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=Q.list;return}if(!document.body){this.isLoaded=!0,Q.list.forEach(function(Z0){Z0.helper=$(Z0),Z0.cache={}}),this.fonts=Q.list;return}var b=Q.list,J,R=b.length,G=R;for(J=0;J<R;J+=1){var D=!0,t,E;if(b[J].loaded=!1,b[J].monoCase=Y(b[J].fFamily,"monospace"),b[J].sansCase=Y(b[J].fFamily,"sans-serif"),!b[J].fPath)b[J].loaded=!0,G-=1;else if(b[J].fOrigin==="p"||b[J].origin===3){if(t=document.querySelectorAll('style[f-forigin="p"][f-family="'+b[J].fFamily+'"], style[f-origin="3"][f-family="'+b[J].fFamily+'"]'),t.length>0)D=!1;if(D){var m=createTag("style");m.setAttribute("f-forigin",b[J].fOrigin),m.setAttribute("f-origin",b[J].origin),m.setAttribute("f-family",b[J].fFamily),m.type="text/css",m.innerText="@font-face {font-family: "+b[J].fFamily+"; font-style: normal; src: url('"+b[J].fPath+"');}",W.appendChild(m)}}else if(b[J].fOrigin==="g"||b[J].origin===1){t=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');for(E=0;E<t.length;E+=1)if(t[E].href.indexOf(b[J].fPath)!==-1)D=!1;if(D){var d0=createTag("link");d0.setAttribute("f-forigin",b[J].fOrigin),d0.setAttribute("f-origin",b[J].origin),d0.type="text/css",d0.rel="stylesheet",d0.href=b[J].fPath,document.body.appendChild(d0)}}else if(b[J].fOrigin==="t"||b[J].origin===2){t=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');for(E=0;E<t.length;E+=1)if(b[J].fPath===t[E].src)D=!1;if(D){var g0=createTag("link");g0.setAttribute("f-forigin",b[J].fOrigin),g0.setAttribute("f-origin",b[J].origin),g0.setAttribute("rel","stylesheet"),g0.setAttribute("href",b[J].fPath),W.appendChild(g0)}}b[J].helper=$(b[J],W),b[J].cache={},this.fonts.push(b[J])}if(G===0)this.isLoaded=!0;else setTimeout(this.checkLoadedFonts.bind(this),100)}function Z(Q){if(!Q)return;if(!this.chars)this.chars=[];var W,b=Q.length,J,R=this.chars.length,G;for(W=0;W<b;W+=1){J=0,G=!1;while(J<R){if(this.chars[J].style===Q[W].style&&this.chars[J].fFamily===Q[W].fFamily&&this.chars[J].ch===Q[W].ch)G=!0;J+=1}if(!G)this.chars.push(Q[W]),R+=1}}function c(Q,W,b){var J=0,R=this.chars.length;while(J<R){if(this.chars[J].ch===Q&&this.chars[J].style===W&&this.chars[J].fFamily===b)return this.chars[J];J+=1}if((typeof Q==="string"&&Q.charCodeAt(0)!==13||!Q)&&console&&console.warn&&!this._warned)this._warned=!0,console.warn("Missing character from exported characters list: ",Q,W,b);return d}function v(Q,W,b){var J=this.getFontByName(W),R=Q;if(!J.cache[R]){var G=J.helper;if(Q===" "){var D=G.measureText("|"+Q+"|"),t=G.measureText("||");J.cache[R]=(D-t)/100}else J.cache[R]=G.measureText(Q)/100}return J.cache[R]*b}function k(Q){var W=0,b=this.fonts.length;while(W<b){if(this.fonts[W].fName===Q)return this.fonts[W];W+=1}return this.fonts[0]}function X(Q){var W=0,b=Q.charCodeAt(0);if(b>=55296&&b<=56319){var J=Q.charCodeAt(1);if(J>=56320&&J<=57343)W=(b-55296)*1024+J-56320+65536}return W}function V(Q,W){var b=Q.toString(16)+W.toString(16);return _.indexOf(b)!==-1}function u(Q){return Q===x}function p(Q){return Q===l}function U(Q){var W=X(Q);if(W>=w&&W<=z)return!0;return!1}function F(Q){return U(Q.substr(0,2))&&U(Q.substr(2,2))}function L(Q){return i.indexOf(Q)!==-1}function j(Q,W){var b=X(Q.substr(W,2));if(b!==r)return!1;var J=0;W+=2;while(J<5){if(b=X(Q.substr(W,2)),b<a||b>g)return!1;J+=1,W+=2}return X(Q.substr(W,2))===h}function C(){this.isLoaded=!0}var T=function Q(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};T.isModifier=V,T.isZeroWidthJoiner=u,T.isFlagEmoji=F,T.isRegionalCode=U,T.isCombinedCharacter=L,T.isRegionalFlag=j,T.isVariationSelector=p,T.BLACK_FLAG_CODE_POINT=r;var K={addChars:Z,addFonts:I,getCharData:c,getFontByName:k,measureText:v,checkLoadedFonts:H,setIsLoaded:C};return T.prototype=K,T}();function SlotManager(o){this.animationData=o}SlotManager.prototype.getProp=function(o){if(this.animationData.slots&&this.animationData.slots[o.sid])return Object.assign(o,this.animationData.slots[o.sid].p);return o};function slotFactory(o){return new SlotManager(o)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function o(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function o(d){if(this.renderableComponents.indexOf(d)===-1)this.renderableComponents.push(d)},removeRenderableComponent:function o(d){if(this.renderableComponents.indexOf(d)!==-1)this.renderableComponents.splice(this.renderableComponents.indexOf(d),1)},prepareRenderableFrame:function o(d){this.checkLayerLimits(d)},checkTransparency:function o(){if(this.finalTransform.mProp.o.v<=0){if(!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent)this.isTransparent=!0,this.hide()}else if(this.isTransparent)this.isTransparent=!1,this.show()},checkLayerLimits:function o(d){if(this.data.ip-this.data.st<=d&&this.data.op-this.data.st>d){if(this.isInRange!==!0)this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()}else if(this.isInRange!==!1)this.globalData._mdf=!0,this.isInRange=!1,this.hide()},renderRenderable:function o(){var d,i=this.renderableComponents.length;for(d=0;d<i;d+=1)this.renderableComponents[d].renderFrame(this._isFirstFrame)},sourceRectAtTime:function o(){return{top:0,left:0,width:100,height:100}},getLayerSize:function o(){if(this.data.ty===5)return{w:this.data.textData.width,h:this.data.textData.height};return{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var o={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(d){return o[d]||""}}();function SliderEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,0,0,i)}function AngleEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,0,0,i)}function ColorEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,1,0,i)}function PointEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,1,0,i)}function LayerIndexEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,0,0,i)}function MaskIndexEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,0,0,i)}function CheckboxEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,0,0,i)}function NoValueEffect(){this.p={}}function EffectsManager(o,d){var i=o.ef||[];this.effectElements=[];var r,h=i.length,a;for(r=0;r<h;r+=1)a=new GroupEffect(i[r],d),this.effectElements.push(a)}function GroupEffect(o,d){this.init(o,d)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(o,d){this.data=o,this.effectElements=[],this.initDynamicPropertyContainer(d);var i,r=this.data.ef.length,h,a=this.data.ef;for(i=0;i<r;i+=1){switch(h=null,a[i].ty){case 0:h=new SliderEffect(a[i],d,this);break;case 1:h=new AngleEffect(a[i],d,this);break;case 2:h=new ColorEffect(a[i],d,this);break;case 3:h=new PointEffect(a[i],d,this);break;case 4:case 7:h=new CheckboxEffect(a[i],d,this);break;case 10:h=new LayerIndexEffect(a[i],d,this);break;case 11:h=new MaskIndexEffect(a[i],d,this);break;case 5:h=new EffectsManager(a[i],d,this);break;default:h=new NoValueEffect(a[i],d,this);break}if(h)this.effectElements.push(h)}};function BaseElement(){}BaseElement.prototype={checkMasks:function o(){if(!this.data.hasMask)return!1;var d=0,i=this.data.masksProperties.length;while(d<i){if(this.data.masksProperties[d].mode!=="n"&&this.data.masksProperties[d].cl!==!1)return!0;d+=1}return!1},initExpressions:function o(){var d=getExpressionInterfaces();if(!d)return;var i=d("layer"),r=d("effects"),h=d("shape"),a=d("text"),g=d("comp");if(this.layerInterface=i(this),this.data.hasMask&&this.maskManager)this.layerInterface.registerMaskInterface(this.maskManager);var l=r.createEffectsInterface(this,this.layerInterface);if(this.layerInterface.registerEffectsInterface(l),this.data.ty===0||this.data.xt)this.compInterface=g(this);else if(this.data.ty===4)this.layerInterface.shapeInterface=h(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface;else if(this.data.ty===5)this.layerInterface.textInterface=a(this),this.layerInterface.text=this.layerInterface.textInterface},setBlendMode:function o(){var d=getBlendMode(this.data.bm),i=this.baseElement||this.layerElement;i.style["mix-blend-mode"]=d},initBaseData:function o(d,i,r){if(this.globalData=i,this.comp=r,this.data=d,this.layerId=createElementID(),!this.data.sr)this.data.sr=1;this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function o(){return this.type},sourceRectAtTime:function o(){}};function FrameElement(){}FrameElement.prototype={initFrame:function o(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function o(d,i){var r,h=this.dynamicProperties.length;for(r=0;r<h;r+=1)if(i||this._isParent&&this.dynamicProperties[r].propType==="transform"){if(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf)this.globalData._mdf=!0,this._mdf=!0}},addDynamicProperty:function o(d){if(this.dynamicProperties.indexOf(d)===-1)this.dynamicProperties.push(d)}};function FootageElement(o,d,i){this.initFrame(),this.initRenderable(),this.assetData=d.getAssetData(o.refId),this.footageData=d.imageLoader.getAsset(this.assetData),this.initBaseData(o,d,i)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var o=getExpressionInterfaces();if(!o)return;var d=o("footage");this.layerInterface=d(this)},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(o,d,i){this.initFrame(),this.initRenderable(),this.assetData=d.getAssetData(o.refId),this.initBaseData(o,d,i),this._isPlaying=!1,this._canPlay=!1;var r=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(r),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,d.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,o.au&&o.au.lv?o.au.lv:{k:[100]},1,0.01,this)}AudioElement.prototype.prepareFrame=function(o){if(this.prepareRenderableFrame(o,!0),this.prepareProperties(o,!0),!this.tm._placeholder){var d=this.tm.v;this._currentTime=d}else this._currentTime=o/this.data.sr;this._volume=this.lv.v[0];var i=this._volume*this._volumeMultiplier;if(this._previousVolume!==i)this._previousVolume=i,this.audio.volume(i)},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){if(this.isInRange&&this._canPlay){if(!this._isPlaying)this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0;else if(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>0.1)this.audio.seek(this._currentTime/this.globalData.frameRate)}},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(o){this.audio.rate(o)},AudioElement.prototype.volume=function(o){this._volumeMultiplier=o,this._previousVolume=o*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(o){var d,i=this.layers.length,r;this.completeLayers=!0;for(d=i-1;d>=0;d-=1){if(!this.elements[d]){if(r=this.layers[d],r.ip-r.st<=o-this.layers[d].st&&r.op-r.st>o-this.layers[d].st)this.buildItem(d)}this.completeLayers=this.elements[d]?this.completeLayers:!1}this.checkPendingElements()},BaseRenderer.prototype.createItem=function(o){switch(o.ty){case 2:return this.createImage(o);case 0:return this.createComp(o);case 1:return this.createSolid(o);case 3:return this.createNull(o);case 4:return this.createShape(o);case 5:return this.createText(o);case 6:return this.createAudio(o);case 13:return this.createCamera(o);case 15:return this.createFootage(o);default:return this.createNull(o)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(o){return new AudioElement(o,this.globalData,this)},BaseRenderer.prototype.createFootage=function(o){return new FootageElement(o,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var o,d=this.layers.length;for(o=0;o<d;o+=1)this.buildItem(o);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(o){this.completeLayers=!1;var d,i=o.length,r,h=this.layers.length;for(d=0;d<i;d+=1){r=0;while(r<h){if(this.layers[r].id===o[d].id){this.layers[r]=o[d];break}r+=1}}},BaseRenderer.prototype.setProjectInterface=function(o){this.globalData.projectInterface=o},BaseRenderer.prototype.initItems=function(){if(!this.globalData.progressiveLoad)this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(o,d,i){var r=this.elements,h=this.layers,a=0,g=h.length;while(a<g){if(h[a].ind==d)if(!r[a]||r[a]===!0)this.buildItem(a),this.addPendingElement(o);else if(i.push(r[a]),r[a].setAsParent(),h[a].parent!==void 0)this.buildElementParenting(o,h[a].parent,i);else o.setHierarchy(i);a+=1}},BaseRenderer.prototype.addPendingElement=function(o){this.pendingElements.push(o)},BaseRenderer.prototype.searchExtraCompositions=function(o){var d,i=o.length;for(d=0;d<i;d+=1)if(o[d].xt){var r=this.createComp(o[d]);r.initExpressions(),this.globalData.projectInterface.registerComposition(r)}},BaseRenderer.prototype.getElementById=function(o){var d,i=this.elements.length;for(d=0;d<i;d+=1)if(this.elements[d].data.ind===o)return this.elements[d];return null},BaseRenderer.prototype.getElementByPath=function(o){var d=o.shift(),i;if(typeof d==="number")i=this.elements[d];else{var r,h=this.elements.length;for(r=0;r<h;r+=1)if(this.elements[r].data.nm===d){i=this.elements[r];break}}if(o.length===0)return i;return i.getElementByPath(o)},BaseRenderer.prototype.setupGlobalData=function(o,d){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(o),this.globalData.fontManager.addChars(o.chars),this.globalData.fontManager.addFonts(o.fonts,d),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=o.fr,this.globalData.nm=o.nm,this.globalData.compSize={w:o.w,h:o.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}TransformElement.prototype={initTransform:function o(){var d=new Matrix;if(this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:d,localMat:d,localOpacity:1},this.data.ao)this.finalTransform.mProp.autoOriented=!0;if(this.data.ty!==11);},renderTransform:function o(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var d,i=this.finalTransform.mat,r=0,h=this.hierarchy.length;if(!this.finalTransform._matMdf)while(r<h){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf){d=this.finalTransform.mProp.v.props,i.cloneFromProps(d);for(r=0;r<h;r+=1)i.multiply(this.hierarchy[r].finalTransform.mProp.v)}}if(!this.localTransforms||this.finalTransform._matMdf)this.finalTransform._localMatMdf=this.finalTransform._matMdf;if(this.finalTransform._opMdf)this.finalTransform.localOpacity=this.finalTransform.mProp.o.v},renderLocalTransform:function o(){if(this.localTransforms){var d=0,i=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)while(d<i){if(this.localTransforms[d]._mdf)this.finalTransform._localMatMdf=!0;if(this.localTransforms[d]._opMdf&&!this.finalTransform._opMdf)this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0;d+=1}if(this.finalTransform._localMatMdf){var r=this.finalTransform.localMat;this.localTransforms[0].matrix.clone(r);for(d=1;d<i;d+=1){var h=this.localTransforms[d].matrix;r.multiply(h)}r.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var a=this.finalTransform.localOpacity;for(d=0;d<i;d+=1)a*=this.localTransforms[d].opacity*0.01;this.finalTransform.localOpacity=a}}},searchEffectTransforms:function o(){if(this.renderableEffectsManager){var d=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(d.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var i=0,r=d.length;for(i=0;i<r;i+=1)this.localTransforms.push(d[i])}}},globalToLocal:function o(d){var i=[];i.push(this.finalTransform);var r=!0,h=this.comp;while(r)if(h.finalTransform){if(h.data.hasMask)i.splice(0,0,h.finalTransform);h=h.comp}else r=!1;var a,g=i.length,l;for(a=0;a<g;a+=1)l=i[a].mat.applyToPointArray(0,0,0),d=[d[0]-l[0],d[1]-l[1],0];return d},mHelper:new Matrix};function MaskElement(o,d,i){this.data=o,this.element=d,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var r=this.globalData.defs,h,a=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(a),this.solidPath="";var g,l=this.masksProperties,x=0,w=[],z,_,n=createElementID(),Y,H,$,I,Z="clipPath",c="clip-path";for(h=0;h<a;h+=1){if(l[h].mode!=="a"&&l[h].mode!=="n"||l[h].inv||l[h].o.k!==100||l[h].o.x)Z="mask",c="mask";if((l[h].mode==="s"||l[h].mode==="i")&&x===0)Y=createNS("rect"),Y.setAttribute("fill","#ffffff"),Y.setAttribute("width",this.element.comp.data.w||0),Y.setAttribute("height",this.element.comp.data.h||0),w.push(Y);else Y=null;if(g=createNS("path"),l[h].mode==="n")this.viewData[h]={op:PropertyFactory.getProp(this.element,l[h].o,0,0.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,l[h],3),elem:g,lastPath:""},r.appendChild(g);else{x+=1,g.setAttribute("fill",l[h].mode==="s"?"#000000":"#ffffff"),g.setAttribute("clip-rule","nonzero");var v;if(l[h].x.k!==0)Z="mask",c="mask",I=PropertyFactory.getProp(this.element,l[h].x,0,null,this.element),v=createElementID(),H=createNS("filter"),H.setAttribute("id",v),$=createNS("feMorphology"),$.setAttribute("operator","erode"),$.setAttribute("in","SourceGraphic"),$.setAttribute("radius","0"),H.appendChild($),r.appendChild(H),g.setAttribute("stroke",l[h].mode==="s"?"#000000":"#ffffff");else $=null,I=null;if(this.storedData[h]={elem:g,x:I,expan:$,lastPath:"",lastOperator:"",filterId:v,lastRadius:0},l[h].mode==="i"){_=w.length;var k=createNS("g");for(z=0;z<_;z+=1)k.appendChild(w[z]);var X=createNS("mask");X.setAttribute("mask-type","alpha"),X.setAttribute("id",n+"_"+x),X.appendChild(g),r.appendChild(X),k.setAttribute("mask","url("+getLocationHref()+"#"+n+"_"+x+")"),w.length=0,w.push(k)}else w.push(g);if(l[h].inv&&!this.solidPath)this.solidPath=this.createLayerSolidPath();if(this.viewData[h]={elem:g,lastPath:"",op:PropertyFactory.getProp(this.element,l[h].o,0,0.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,l[h],3),invRect:Y},!this.viewData[h].prop.k)this.drawPath(l[h],this.viewData[h].prop.v,this.viewData[h])}}this.maskElement=createNS(Z),a=w.length;for(h=0;h<a;h+=1)this.maskElement.appendChild(w[h]);if(x>0)this.maskElement.setAttribute("id",n),this.element.maskedElement.setAttribute(c,"url("+getLocationHref()+"#"+n+")"),r.appendChild(this.maskElement);if(this.viewData.length)this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(o){return this.viewData[o].prop},MaskElement.prototype.renderFrame=function(o){var d=this.element.finalTransform.mat,i,r=this.masksProperties.length;for(i=0;i<r;i+=1){if(this.viewData[i].prop._mdf||o)this.drawPath(this.masksProperties[i],this.viewData[i].prop.v,this.viewData[i]);if(this.viewData[i].op._mdf||o)this.viewData[i].elem.setAttribute("fill-opacity",this.viewData[i].op.v);if(this.masksProperties[i].mode!=="n"){if(this.viewData[i].invRect&&(this.element.finalTransform.mProp._mdf||o))this.viewData[i].invRect.setAttribute("transform",d.getInverseMatrix().to2dCSS());if(this.storedData[i].x&&(this.storedData[i].x._mdf||o)){var h=this.storedData[i].expan;if(this.storedData[i].x.v<0){if(this.storedData[i].lastOperator!=="erode")this.storedData[i].lastOperator="erode",this.storedData[i].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[i].filterId+")");h.setAttribute("radius",-this.storedData[i].x.v)}else{if(this.storedData[i].lastOperator!=="dilate")this.storedData[i].lastOperator="dilate",this.storedData[i].elem.setAttribute("filter",null);this.storedData[i].elem.setAttribute("stroke-width",this.storedData[i].x.v*2)}}}}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var o="M0,0 ";return o+=" h"+this.globalData.compSize.w,o+=" v"+this.globalData.compSize.h,o+=" h-"+this.globalData.compSize.w,o+=" v-"+this.globalData.compSize.h+" ",o},MaskElement.prototype.drawPath=function(o,d,i){var r=" M"+d.v[0][0]+","+d.v[0][1],h,a;a=d._length;for(h=1;h<a;h+=1)r+=" C"+d.o[h-1][0]+","+d.o[h-1][1]+" "+d.i[h][0]+","+d.i[h][1]+" "+d.v[h][0]+","+d.v[h][1];if(d.c&&a>1)r+=" C"+d.o[h-1][0]+","+d.o[h-1][1]+" "+d.i[0][0]+","+d.i[0][1]+" "+d.v[0][0]+","+d.v[0][1];if(i.lastPath!==r){var g="";if(i.elem){if(d.c)g=o.inv?this.solidPath+r:r;i.elem.setAttribute("d",g)}i.lastPath=r}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var o={};o.createFilter=d,o.createAlphaToLuminanceFilter=i;function d(r,h){var a=createNS("filter");if(a.setAttribute("id",r),h!==!0)a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%");return a}function i(){var r=createNS("feColorMatrix");return r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),r}return o}(),featureSupport=function(){var o={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas!=="undefined"};if(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))o.maskType=!1;if(/firefox/i.test(navigator.userAgent))o.svgLumaHidden=!1;return o}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(o){var d,i="SourceGraphic",r=o.data.ef?o.data.ef.length:0,h=createElementID(),a=filtersFactory.createFilter(h,!0),g=0;this.filters=[];var l;for(d=0;d<r;d+=1){l=null;var x=o.data.ef[d].ty;if(registeredEffects$1[x]){var w=registeredEffects$1[x].effect;if(l=new w(a,o.effectsManager.effectElements[d],o,idPrefix+g,i),i=idPrefix+g,registeredEffects$1[x].countsAsEffect)g+=1}if(l)this.filters.push(l)}if(g)o.globalData.defs.appendChild(a),o.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+h+")");if(this.filters.length)o.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(o){var d,i=this.filters.length;for(d=0;d<i;d+=1)this.filters[d].renderFrame(o)},SVGEffects.prototype.getEffects=function(o){var d,i=this.filters.length,r=[];for(d=0;d<i;d+=1)if(this.filters[d].type===o)r.push(this.filters[d]);return r};function registerEffect$1(o,d,i){registeredEffects$1[o]={effect:d,countsAsEffect:i}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function o(){this.layerElement=createNS("g")},createContainerElements:function o(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var d=null;if(this.data.td){this.matteMasks={};var i=createNS("g");i.setAttribute("id",this.layerId),i.appendChild(this.layerElement),d=i,this.globalData.defs.appendChild(i)}else if(this.data.tt)this.matteElement.appendChild(this.layerElement),d=this.matteElement,this.baseElement=this.matteElement;else this.baseElement=this.layerElement;if(this.data.ln)this.layerElement.setAttribute("id",this.data.ln);if(this.data.cl)this.layerElement.setAttribute("class",this.data.cl);if(this.data.ty===0&&!this.data.hd){var r=createNS("clipPath"),h=createNS("path");h.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var a=createElementID();if(r.setAttribute("id",a),r.appendChild(h),this.globalData.defs.appendChild(r),this.checkMasks()){var g=createNS("g");if(g.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")"),g.appendChild(this.layerElement),this.transformedElement=g,d)d.appendChild(this.transformedElement);else this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")")}if(this.data.bm!==0)this.setBlendMode()},renderElement:function o(){if(this.finalTransform._localMatMdf)this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS());if(this.finalTransform._opMdf)this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function o(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function o(){if(this.data.hd)return null;return this.baseElement},createRenderableComponents:function o(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function o(d){if(!this.matteMasks)this.matteMasks={};if(!this.matteMasks[d]){var i=this.layerId+"_"+d,r,h,a,g;if(d===1||d===3){var l=createNS("mask");if(l.setAttribute("id",i),l.setAttribute("mask-type",d===3?"luminance":"alpha"),a=createNS("use"),a.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(a),this.globalData.defs.appendChild(l),!featureSupport.maskType&&d===1)l.setAttribute("mask-type","luminance"),r=createElementID(),h=filtersFactory.createFilter(r),this.globalData.defs.appendChild(h),h.appendChild(filtersFactory.createAlphaToLuminanceFilter()),g=createNS("g"),g.appendChild(a),l.appendChild(g),g.setAttribute("filter","url("+getLocationHref()+"#"+r+")")}else if(d===2){var x=createNS("mask");x.setAttribute("id",i),x.setAttribute("mask-type","alpha");var w=createNS("g");x.appendChild(w),r=createElementID(),h=filtersFactory.createFilter(r);var z=createNS("feComponentTransfer");z.setAttribute("in","SourceGraphic"),h.appendChild(z);var _=createNS("feFuncA");_.setAttribute("type","table"),_.setAttribute("tableValues","1.0 0.0"),z.appendChild(_),this.globalData.defs.appendChild(h);var n=createNS("rect");if(n.setAttribute("width",this.comp.data.w),n.setAttribute("height",this.comp.data.h),n.setAttribute("x","0"),n.setAttribute("y","0"),n.setAttribute("fill","#ffffff"),n.setAttribute("opacity","0"),w.setAttribute("filter","url("+getLocationHref()+"#"+r+")"),w.appendChild(n),a=createNS("use"),a.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),w.appendChild(a),!featureSupport.maskType)x.setAttribute("mask-type","luminance"),h.appendChild(filtersFactory.createAlphaToLuminanceFilter()),g=createNS("g"),w.appendChild(n),g.appendChild(this.layerElement),w.appendChild(g);this.globalData.defs.appendChild(x)}this.matteMasks[d]=i}return this.matteMasks[d]},setMatte:function o(d){if(!this.matteElement)return;this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+d+")")}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function o(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function o(d){this.hierarchy=d},setAsParent:function o(){this._isParent=!0},checkParenting:function o(){if(this.data.parent!==void 0)this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){var o={initElement:function d(i,r,h){this.initFrame(),this.initBaseData(i,r,h),this.initTransform(i,r,h),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function d(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var i=this.baseElement||this.layerElement;i.style.display="none",this.hidden=!0}},show:function d(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var i=this.baseElement||this.layerElement;i.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function d(){if(this.data.hd||this.hidden)return;if(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame)this._isFirstFrame=!1},renderInnerContent:function d(){},prepareFrame:function d(i){this._mdf=!1,this.prepareRenderableFrame(i),this.prepareProperties(i,this.isInRange),this.checkTransparency()},destroy:function d(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(o)],RenderableDOMElement)})();function IImageElement(o,d,i){if(this.assetData=d.getAssetData(o.refId),this.assetData&&this.assetData.sid)this.assetData=d.slotManager.getProp(this.assetData);this.initElement(o,d,i),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var o=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",o),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(o,d){this.elem=o,this.pos=d}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function o(d){var i,r=this.shapeModifiers.length;for(i=0;i<r;i+=1)this.shapeModifiers[i].addShape(d)},isShapeInAnimatedModifiers:function o(d){var i=0,r=this.shapeModifiers.length;while(i<r)if(this.shapeModifiers[i].isAnimatedWithShape(d))return!0;return!1},renderModifiers:function o(){if(!this.shapeModifiers.length)return;var d,i=this.shapes.length;for(d=0;d<i;d+=1)this.shapes[d].sh.reset();i=this.shapeModifiers.length;var r;for(d=i-1;d>=0;d-=1)if(r=this.shapeModifiers[d].processShapes(this._isFirstFrame),r)break},searchProcessedElement:function o(d){var i=this.processedElements,r=0,h=i.length;while(r<h){if(i[r].elem===d)return i[r].pos;r+=1}return 0},addProcessedElement:function o(d,i){var r=this.processedElements,h=r.length;while(h)if(h-=1,r[h].elem===d){r[h].pos=i;return}r.push(new ProcessedElement(d,i))},prepareFrame:function o(d){this.prepareRenderableFrame(d),this.prepareProperties(d,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(o,d,i){this.caches=[],this.styles=[],this.transformers=o,this.lStr="",this.sh=i,this.lvl=d,this._isAnimated=!!i.k;var r=0,h=o.length;while(r<h){if(o[r].mProps.dynamicProperties.length){this._isAnimated=!0;break}r+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(o,d){this.data=o,this.type=o.ty,this.d="",this.lvl=d,this._mdf=!1,this.closed=o.hd===!0,this.pElem=createNS("path"),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1};function DashProperty(o,d,i,r){this.elem=o,this.frameId=-1,this.dataProps=createSizedArray(d.length),this.renderer=i,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",d.length?d.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(r);var h,a=d.length||0,g;for(h=0;h<a;h+=1)g=PropertyFactory.getProp(o,d[h].v,0,0,this),this.k=g.k||this.k,this.dataProps[h]={n:d[h].n,p:g};if(!this.k)this.getValue(!0);this._isAnimated=this.k}DashProperty.prototype.getValue=function(o){if(this.elem.globalData.frameId===this.frameId&&!o)return;if(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||o,this._mdf){var d=0,i=this.dataProps.length;if(this.renderer==="svg")this.dashStr="";for(d=0;d<i;d+=1)if(this.dataProps[d].n!=="o")if(this.renderer==="svg")this.dashStr+=" "+this.dataProps[d].p.v;else this.dashArray[d]=this.dataProps[d].p.v;else this.dashoffset[0]=this.dataProps[d].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(o,d,i){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(o,d.o,0,0.01,this),this.w=PropertyFactory.getProp(o,d.w,0,null,this),this.d=new DashProperty(o,d.d||{},"svg",this),this.c=PropertyFactory.getProp(o,d.c,1,255,this),this.style=i,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(o,d,i){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(o,d.o,0,0.01,this),this.c=PropertyFactory.getProp(o,d.c,1,255,this),this.style=i}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(o,d,i){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.style=i}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(o,d,i){this.data=d,this.c=createTypedArray("uint8c",d.p*4);var r=d.k.k[0].s?d.k.k[0].s.length-d.p*4:d.k.k.length-d.p*4;this.o=createTypedArray("float32",r),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=r,this.initDynamicPropertyContainer(i),this.prop=PropertyFactory.getProp(o,d.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(o,d){var i=0,r=this.o.length/2,h;while(i<r){if(h=Math.abs(o[i*4]-o[d*4+i*2]),h>0.01)return!1;i+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s){var o=0,d=this.data.k.k.length;while(o<d){if(!this.comparePoints(this.data.k.k[o].s,this.data.p))return!1;o+=1}}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(o){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||o){var d,i=this.data.p*4,r,h;for(d=0;d<i;d+=1)if(r=d%4===0?100:255,h=Math.round(this.prop.v[d]*r),this.c[d]!==h)this.c[d]=h,this._cmdf=!o;if(this.o.length){i=this.prop.v.length;for(d=this.data.p*4;d<i;d+=1)if(r=d%2===0?100:1,h=d%2===0?Math.round(this.prop.v[d]*100):this.prop.v[d],this.o[d-this.data.p*4]!==h)this.o[d-this.data.p*4]=h,this._omdf=!o}this._mdf=!o}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(o,d,i){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.initGradientData(o,d,i)}SVGGradientFillStyleData.prototype.initGradientData=function(o,d,i){this.o=PropertyFactory.getProp(o,d.o,0,0.01,this),this.s=PropertyFactory.getProp(o,d.s,1,null,this),this.e=PropertyFactory.getProp(o,d.e,1,null,this),this.h=PropertyFactory.getProp(o,d.h||{k:0},0,0.01,this),this.a=PropertyFactory.getProp(o,d.a||{k:0},0,degToRads,this),this.g=new GradientProperty(o,d.g,this),this.style=i,this.stops=[],this.setGradientData(i.pElem,d),this.setGradientOpacity(d,i),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(o,d){var i=createElementID(),r=createNS(d.t===1?"linearGradient":"radialGradient");r.setAttribute("id",i),r.setAttribute("spreadMethod","pad"),r.setAttribute("gradientUnits","userSpaceOnUse");var h=[],a,g,l;l=d.g.p*4;for(g=0;g<l;g+=4)a=createNS("stop"),r.appendChild(a),h.push(a);o.setAttribute(d.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+i+")"),this.gf=r,this.cst=h},SVGGradientFillStyleData.prototype.setGradientOpacity=function(o,d){if(this.g._hasOpacity&&!this.g._collapsable){var i,r,h,a=createNS("mask"),g=createNS("path");a.appendChild(g);var l=createElementID(),x=createElementID();a.setAttribute("id",x);var w=createNS(o.t===1?"linearGradient":"radialGradient");w.setAttribute("id",l),w.setAttribute("spreadMethod","pad"),w.setAttribute("gradientUnits","userSpaceOnUse"),h=o.g.k.k[0].s?o.g.k.k[0].s.length:o.g.k.k.length;var z=this.stops;for(r=o.g.p*4;r<h;r+=2)i=createNS("stop"),i.setAttribute("stop-color","rgb(255,255,255)"),w.appendChild(i),z.push(i);if(g.setAttribute(o.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+l+")"),o.ty==="gs"){if(g.setAttribute("stroke-linecap",lineCapEnum[o.lc||2]),g.setAttribute("stroke-linejoin",lineJoinEnum[o.lj||2]),o.lj===1)g.setAttribute("stroke-miterlimit",o.ml)}this.of=w,this.ms=a,this.ost=z,this.maskId=x,d.msElem=g}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(o,d,i){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(o,d.w,0,null,this),this.d=new DashProperty(o,d.d||{},"svg",this),this.initGradientData(o,d,i),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(o,d,i){this.transform={mProps:o,op:d,container:i},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function o(d,i,r,h){if(i===0)return"";var{o:a,i:g,v:l}=d,x,w=" M"+h.applyToPointStringified(l[0][0],l[0][1]);for(x=1;x<i;x+=1)w+=" C"+h.applyToPointStringified(a[x-1][0],a[x-1][1])+" "+h.applyToPointStringified(g[x][0],g[x][1])+" "+h.applyToPointStringified(l[x][0],l[x][1]);if(r&&i)w+=" C"+h.applyToPointStringified(a[x-1][0],a[x-1][1])+" "+h.applyToPointStringified(g[0][0],g[0][1])+" "+h.applyToPointStringified(l[0][0],l[0][1]),w+="z";return w},SVGElementsRenderer=function(){var o=new Matrix,d=new Matrix,i={createRenderFunction:r};function r(_){switch(_.ty){case"fl":return l;case"gf":return w;case"gs":return x;case"st":return z;case"sh":case"el":case"rc":case"sr":return g;case"tr":return h;case"no":return a;default:return null}}function h(_,n,Y){if(Y||n.transform.op._mdf)n.transform.container.setAttribute("opacity",n.transform.op.v);if(Y||n.transform.mProps._mdf)n.transform.container.setAttribute("transform",n.transform.mProps.v.to2dCSS())}function a(){}function g(_,n,Y){var H,$,I,Z,c,v,k=n.styles.length,X=n.lvl,V,u,p,U;for(v=0;v<k;v+=1){if(Z=n.sh._mdf||Y,n.styles[v].lvl<X){u=d.reset(),p=X-n.styles[v].lvl,U=n.transformers.length-1;while(!Z&&p>0)Z=n.transformers[U].mProps._mdf||Z,p-=1,U-=1;if(Z){p=X-n.styles[v].lvl,U=n.transformers.length-1;while(p>0)u.multiply(n.transformers[U].mProps.v),p-=1,U-=1}}else u=o;if(V=n.sh.paths,$=V._length,Z){I="";for(H=0;H<$;H+=1)if(c=V.shapes[H],c&&c._length)I+=buildShapeString(c,c._length,c.c,u);n.caches[v]=I}else I=n.caches[v];n.styles[v].d+=_.hd===!0?"":I,n.styles[v]._mdf=Z||n.styles[v]._mdf}}function l(_,n,Y){var H=n.style;if(n.c._mdf||Y)H.pElem.setAttribute("fill","rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")");if(n.o._mdf||Y)H.pElem.setAttribute("fill-opacity",n.o.v)}function x(_,n,Y){w(_,n,Y),z(_,n,Y)}function w(_,n,Y){var H=n.gf,$=n.g._hasOpacity,I=n.s.v,Z=n.e.v;if(n.o._mdf||Y){var c=_.ty==="gf"?"fill-opacity":"stroke-opacity";n.style.pElem.setAttribute(c,n.o.v)}if(n.s._mdf||Y){var v=_.t===1?"x1":"cx",k=v==="x1"?"y1":"cy";if(H.setAttribute(v,I[0]),H.setAttribute(k,I[1]),$&&!n.g._collapsable)n.of.setAttribute(v,I[0]),n.of.setAttribute(k,I[1])}var X,V,u,p;if(n.g._cmdf||Y){X=n.cst;var U=n.g.c;u=X.length;for(V=0;V<u;V+=1)p=X[V],p.setAttribute("offset",U[V*4]+"%"),p.setAttribute("stop-color","rgb("+U[V*4+1]+","+U[V*4+2]+","+U[V*4+3]+")")}if($&&(n.g._omdf||Y)){var F=n.g.o;if(n.g._collapsable)X=n.cst;else X=n.ost;u=X.length;for(V=0;V<u;V+=1){if(p=X[V],!n.g._collapsable)p.setAttribute("offset",F[V*2]+"%");p.setAttribute("stop-opacity",F[V*2+1])}}if(_.t===1){if(n.e._mdf||Y){if(H.setAttribute("x2",Z[0]),H.setAttribute("y2",Z[1]),$&&!n.g._collapsable)n.of.setAttribute("x2",Z[0]),n.of.setAttribute("y2",Z[1])}}else{var L;if(n.s._mdf||n.e._mdf||Y){if(L=Math.sqrt(Math.pow(I[0]-Z[0],2)+Math.pow(I[1]-Z[1],2)),H.setAttribute("r",L),$&&!n.g._collapsable)n.of.setAttribute("r",L)}if(n.s._mdf||n.e._mdf||n.h._mdf||n.a._mdf||Y){if(!L)L=Math.sqrt(Math.pow(I[0]-Z[0],2)+Math.pow(I[1]-Z[1],2));var j=Math.atan2(Z[1]-I[1],Z[0]-I[0]),C=n.h.v;if(C>=1)C=0.99;else if(C<=-1)C=-0.99;var T=L*C,K=Math.cos(j+n.a.v)*T+I[0],Q=Math.sin(j+n.a.v)*T+I[1];if(H.setAttribute("fx",K),H.setAttribute("fy",Q),$&&!n.g._collapsable)n.of.setAttribute("fx",K),n.of.setAttribute("fy",Q)}}}function z(_,n,Y){var{style:H,d:$}=n;if($&&($._mdf||Y)&&$.dashStr)H.pElem.setAttribute("stroke-dasharray",$.dashStr),H.pElem.setAttribute("stroke-dashoffset",$.dashoffset[0]);if(n.c&&(n.c._mdf||Y))H.pElem.setAttribute("stroke","rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")");if(n.o._mdf||Y)H.pElem.setAttribute("stroke-opacity",n.o.v);if(n.w._mdf||Y){if(H.pElem.setAttribute("stroke-width",n.w.v),H.msElem)H.msElem.setAttribute("stroke-width",n.w.v)}}return i}();function SVGShapeElement(o,d,i){this.shapes=[],this.shapesData=o.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(o,d,i),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var o,d=this.shapes.length,i,r,h=this.stylesList.length,a,g=[],l=!1;for(r=0;r<h;r+=1){a=this.stylesList[r],l=!1,g.length=0;for(o=0;o<d;o+=1)if(i=this.shapes[o],i.styles.indexOf(a)!==-1)g.push(i),l=i._isAnimated||l;if(g.length>1&&l)this.setShapesAsAnimated(g)}},SVGShapeElement.prototype.setShapesAsAnimated=function(o){var d,i=o.length;for(d=0;d<i;d+=1)o[d].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(o,d){var i,r=new SVGStyleData(o,d),h=r.pElem;if(o.ty==="st")i=new SVGStrokeStyleData(this,o,r);else if(o.ty==="fl")i=new SVGFillStyleData(this,o,r);else if(o.ty==="gf"||o.ty==="gs"){var a=o.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData;if(i=new a(this,o,r),this.globalData.defs.appendChild(i.gf),i.maskId)this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),h.setAttribute("mask","url("+getLocationHref()+"#"+i.maskId+")")}else if(o.ty==="no")i=new SVGNoStyleData(this,o,r);if(o.ty==="st"||o.ty==="gs"){if(h.setAttribute("stroke-linecap",lineCapEnum[o.lc||2]),h.setAttribute("stroke-linejoin",lineJoinEnum[o.lj||2]),h.setAttribute("fill-opacity","0"),o.lj===1)h.setAttribute("stroke-miterlimit",o.ml)}if(o.r===2)h.setAttribute("fill-rule","evenodd");if(o.ln)h.setAttribute("id",o.ln);if(o.cl)h.setAttribute("class",o.cl);if(o.bm)h.style["mix-blend-mode"]=getBlendMode(o.bm);return this.stylesList.push(r),this.addToAnimatedContents(o,i),i},SVGShapeElement.prototype.createGroupElement=function(o){var d=new ShapeGroupData;if(o.ln)d.gr.setAttribute("id",o.ln);if(o.cl)d.gr.setAttribute("class",o.cl);if(o.bm)d.gr.style["mix-blend-mode"]=getBlendMode(o.bm);return d},SVGShapeElement.prototype.createTransformElement=function(o,d){var i=TransformPropertyFactory.getTransformProperty(this,o,this),r=new SVGTransformData(i,i.o,d);return this.addToAnimatedContents(o,r),r},SVGShapeElement.prototype.createShapeElement=function(o,d,i){var r=4;if(o.ty==="rc")r=5;else if(o.ty==="el")r=6;else if(o.ty==="sr")r=7;var h=ShapePropertyFactory.getShapeProp(this,o,r,this),a=new SVGShapeData(d,i,h);return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(o,a),a},SVGShapeElement.prototype.addToAnimatedContents=function(o,d){var i=0,r=this.animatedContents.length;while(i<r){if(this.animatedContents[i].element===d)return;i+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(o),element:d,data:o})},SVGShapeElement.prototype.setElementStyles=function(o){var d=o.styles,i,r=this.stylesList.length;for(i=0;i<r;i+=1)if(d.indexOf(this.stylesList[i])===-1&&!this.stylesList[i].closed)d.push(this.stylesList[i])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var o,d=this.itemsData.length;for(o=0;o<d;o+=1)this.prevViewData[o]=this.itemsData[o];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),d=this.dynamicProperties.length;for(o=0;o<d;o+=1)this.dynamicProperties[o].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(o,d,i,r,h,a,g){var l=[].concat(a),x,w=o.length-1,z,_,n=[],Y=[],H,$,I;for(x=w;x>=0;x-=1){if(I=this.searchProcessedElement(o[x]),!I)o[x]._render=g;else d[x]=i[I-1];if(o[x].ty==="fl"||o[x].ty==="st"||o[x].ty==="gf"||o[x].ty==="gs"||o[x].ty==="no"){if(!I)d[x]=this.createStyleElement(o[x],h);else d[x].style.closed=o[x].hd;if(o[x]._render){if(d[x].style.pElem.parentNode!==r)r.appendChild(d[x].style.pElem)}n.push(d[x].style)}else if(o[x].ty==="gr"){if(!I)d[x]=this.createGroupElement(o[x]);else{_=d[x].it.length;for(z=0;z<_;z+=1)d[x].prevViewData[z]=d[x].it[z]}if(this.searchShapes(o[x].it,d[x].it,d[x].prevViewData,d[x].gr,h+1,l,g),o[x]._render){if(d[x].gr.parentNode!==r)r.appendChild(d[x].gr)}}else if(o[x].ty==="tr"){if(!I)d[x]=this.createTransformElement(o[x],r);H=d[x].transform,l.push(H)}else if(o[x].ty==="sh"||o[x].ty==="rc"||o[x].ty==="el"||o[x].ty==="sr"){if(!I)d[x]=this.createShapeElement(o[x],l,h);this.setElementStyles(d[x])}else if(o[x].ty==="tm"||o[x].ty==="rd"||o[x].ty==="ms"||o[x].ty==="pb"||o[x].ty==="zz"||o[x].ty==="op"){if(!I)$=ShapeModifiers.getModifier(o[x].ty),$.init(this,o[x]),d[x]=$,this.shapeModifiers.push($);else $=d[x],$.closed=!1;Y.push($)}else if(o[x].ty==="rp"){if(!I)$=ShapeModifiers.getModifier(o[x].ty),d[x]=$,$.init(this,o,x,d),this.shapeModifiers.push($),g=!1;else $=d[x],$.closed=!0;Y.push($)}this.addProcessedElement(o[x],x+1)}w=n.length;for(x=0;x<w;x+=1)n[x].closed=!0;w=Y.length;for(x=0;x<w;x+=1)Y[x].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var o,d=this.stylesList.length;for(o=0;o<d;o+=1)this.stylesList[o].reset();this.renderShape();for(o=0;o<d;o+=1)if(this.stylesList[o]._mdf||this._isFirstFrame){if(this.stylesList[o].msElem)this.stylesList[o].msElem.setAttribute("d",this.stylesList[o].d),this.stylesList[o].d="M0 0"+this.stylesList[o].d;this.stylesList[o].pElem.setAttribute("d",this.stylesList[o].d||"M0 0")}},SVGShapeElement.prototype.renderShape=function(){var o,d=this.animatedContents.length,i;for(o=0;o<d;o+=1)if(i=this.animatedContents[o],(this._isFirstFrame||i.element._isAnimated)&&i.data!==!0)i.fn(i.data,i.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(o,d,i,r,h,a){this.o=o,this.sw=d,this.sc=i,this.fc=r,this.m=h,this.p=a,this._mdf={o:!0,sw:!!d,sc:!!i,fc:!!r,m:!0,p:!0}}LetterProps.prototype.update=function(o,d,i,r,h,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var g=!1;if(this.o!==o)this.o=o,this._mdf.o=!0,g=!0;if(this.sw!==d)this.sw=d,this._mdf.sw=!0,g=!0;if(this.sc!==i)this.sc=i,this._mdf.sc=!0,g=!0;if(this.fc!==r)this.fc=r,this._mdf.fc=!0,g=!0;if(this.m!==h)this.m=h,this._mdf.m=!0,g=!0;if(a.length&&(this.p[0]!==a[0]||this.p[1]!==a[1]||this.p[4]!==a[4]||this.p[5]!==a[5]||this.p[12]!==a[12]||this.p[13]!==a[13]))this.p=a,this._mdf.p=!0,g=!0;return g};function TextProperty(o,d){if(this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,d.d&&d.d.sid)d.d=o.globalData.slotManager.getProp(d.d);if(this.data=d,this.elem=o,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),!this.searchProperty())this.completeTextData(this.currentData)}TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(o,d){for(var i in d)if(Object.prototype.hasOwnProperty.call(d,i))o[i]=d[i];return o},TextProperty.prototype.setCurrentData=function(o){if(!o.__complete)this.completeTextData(o);this.currentData=o,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){if(this.kf=this.data.d.k.length>1,this.kf)this.addEffect(this.getKeyframeValue.bind(this));return this.kf},TextProperty.prototype.addEffect=function(o){this.effectsSequence.push(o),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(o){if((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!o)return;this.currentData.t=this.data.d.k[this.keysIndex].s.t;var d=this.currentData,i=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var r,h=this.effectsSequence.length,a=o||this.data.d.k[this.keysIndex].s;for(r=0;r<h;r+=1)if(i!==this.keysIndex)a=this.effectsSequence[r](a,a.t);else a=this.effectsSequence[r](this.currentData,a.t);if(d!==a)this.setCurrentData(a);this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId},TextProperty.prototype.getKeyframeValue=function(){var o=this.data.d.k,d=this.elem.comp.renderedFrame,i=0,r=o.length;while(i<=r-1){if(i===r-1||o[i+1].t>d)break;i+=1}if(this.keysIndex!==i)this.keysIndex=i;return this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(o){var d=[],i=0,r=o.length,h,a,g=!1,l=!1,x="";while(i<r){if(g=l,l=!1,h=o.charCodeAt(i),x=o.charAt(i),FontManager.isCombinedCharacter(h))g=!0;else if(h>=55296&&h<=56319){if(FontManager.isRegionalFlag(o,i))x=o.substr(i,14);else if(a=o.charCodeAt(i+1),a>=56320&&a<=57343)if(FontManager.isModifier(h,a))x=o.substr(i,2),g=!0;else if(FontManager.isFlagEmoji(o.substr(i,4)))x=o.substr(i,4);else x=o.substr(i,2)}else if(h>56319){if(a=o.charCodeAt(i+1),FontManager.isVariationSelector(h))g=!0}else if(FontManager.isZeroWidthJoiner(h))g=!0,l=!0;if(g)d[d.length-1]+=x,g=!1;else d.push(x);i+=x.length}return d},TextProperty.prototype.completeTextData=function(o){o.__complete=!0;var d=this.elem.globalData.fontManager,i=this.data,r=[],h,a,g,l=0,x,w=i.m.g,z=0,_=0,n=0,Y=[],H=0,$=0,I,Z,c=d.getFontByName(o.f),v,k=0,X=getFontProperties(c);o.fWeight=X.weight,o.fStyle=X.style,o.finalSize=o.s,o.finalText=this.buildFinalText(o.t),a=o.finalText.length,o.finalLineHeight=o.lh;var V=o.tr/1000*o.finalSize,u;if(o.sz){var p=!0,U=o.sz[0],F=o.sz[1],L,j;while(p){j=this.buildFinalText(o.t),L=0,H=0,a=j.length,V=o.tr/1000*o.finalSize;var C=-1;for(h=0;h<a;h+=1){if(u=j[h].charCodeAt(0),g=!1,j[h]===" ")C=h;else if(u===13||u===3)H=0,g=!0,L+=o.finalLineHeight||o.finalSize*1.2;if(d.chars)v=d.getCharData(j[h],c.fStyle,c.fFamily),k=g?0:v.w*o.finalSize/100;else k=d.measureText(j[h],o.f,o.finalSize);if(H+k>U&&j[h]!==" "){if(C===-1)a+=1;else h=C;L+=o.finalLineHeight||o.finalSize*1.2,j.splice(h,C===h?1:0,"\r"),C=-1,H=0}else H+=k,H+=V}if(L+=c.ascent*o.finalSize/100,this.canResize&&o.finalSize>this.minimumFontSize&&F<L)o.finalSize-=1,o.finalLineHeight=o.finalSize*o.lh/o.s;else o.finalText=j,a=o.finalText.length,p=!1}}H=-V,k=0;var T=0,K;for(h=0;h<a;h+=1){if(g=!1,K=o.finalText[h],u=K.charCodeAt(0),u===13||u===3)T=0,Y.push(H),$=H>$?H:$,H=-2*V,x="",g=!0,n+=1;else x=K;if(d.chars)v=d.getCharData(K,c.fStyle,d.getFontByName(o.f).fFamily),k=g?0:v.w*o.finalSize/100;else k=d.measureText(x,o.f,o.finalSize);if(K===" ")T+=k+V;else H+=k+V+T,T=0;if(r.push({l:k,an:k,add:z,n:g,anIndexes:[],val:x,line:n,animatorJustifyOffset:0}),w==2){if(z+=k,x===""||x===" "||h===a-1){if(x===""||x===" ")z-=k;while(_<=h)r[_].an=z,r[_].ind=l,r[_].extra=k,_+=1;l+=1,z=0}}else if(w==3){if(z+=k,x===""||h===a-1){if(x==="")z-=k;while(_<=h)r[_].an=z,r[_].ind=l,r[_].extra=k,_+=1;z=0,l+=1}}else r[l].ind=l,r[l].extra=0,l+=1}if(o.l=r,$=H>$?H:$,Y.push(H),o.sz)o.boxWidth=o.sz[0],o.justifyOffset=0;else switch(o.boxWidth=$,o.j){case 1:o.justifyOffset=-o.boxWidth;break;case 2:o.justifyOffset=-o.boxWidth/2;break;default:o.justifyOffset=0}o.lineWidths=Y;var Q=i.a,W,b;Z=Q.length;var J,R,G=[];for(I=0;I<Z;I+=1){if(W=Q[I],W.a.sc)o.strokeColorAnim=!0;if(W.a.sw)o.strokeWidthAnim=!0;if(W.a.fc||W.a.fh||W.a.fs||W.a.fb)o.fillColorAnim=!0;R=0,J=W.s.b;for(h=0;h<a;h+=1)if(b=r[h],b.anIndexes[I]=R,J==1&&b.val!==""||J==2&&b.val!==""&&b.val!==" "||J==3&&(b.n||b.val==" "||h==a-1)||J==4&&(b.n||h==a-1)){if(W.s.rn===1)G.push(R);R+=1}i.a[I].s.totalChars=R;var D=-1,t;if(W.s.rn===1)for(h=0;h<a;h+=1){if(b=r[h],D!=b.anIndexes[I])D=b.anIndexes[I],t=G.splice(Math.floor(Math.random()*G.length),1)[0];b.anIndexes[I]=t}}o.yOffset=o.finalLineHeight||o.finalSize*1.2,o.ls=o.ls||0,o.ascent=c.ascent*o.finalSize/100},TextProperty.prototype.updateDocumentData=function(o,d){d=d===void 0?this.keysIndex:d;var i=this.copyData({},this.data.d.k[d].s);i=this.copyData(i,o),this.data.d.k[d].s=i,this.recalculate(d),this.setCurrentData(i),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(o){var d=this.data.d.k[o].s;d.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(d)},TextProperty.prototype.canResizeFont=function(o){this.canResize=o,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(o){this.minimumFontSize=Math.floor(o)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var{max:o,min:d,floor:i}=Math;function r(a,g){if(this._currentTextLength=-1,this.k=!1,this.data=g,this.elem=a,this.comp=a.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(a),this.s=PropertyFactory.getProp(a,g.s||{k:0},0,0,this),"e"in g)this.e=PropertyFactory.getProp(a,g.e,0,0,this);else this.e={v:100};if(this.o=PropertyFactory.getProp(a,g.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(a,g.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(a,g.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(a,g.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(a,g.a,0,0.01,this),!this.dynamicProperties.length)this.getValue()}r.prototype={getMult:function a(g){if(this._currentTextLength!==this.elem.textProperty.currentData.l.length)this.getValue();var l=0,x=0,w=1,z=1;if(this.ne.v>0)l=this.ne.v/100;else x=-this.ne.v/100;if(this.xe.v>0)w=1-this.xe.v/100;else z=1+this.xe.v/100;var _=BezierFactory.getBezierEasing(l,x,w,z).get,n=0,Y=this.finalS,H=this.finalE,$=this.data.sh;if($===2){if(H===Y)n=g>=H?1:0;else n=o(0,d(0.5/(H-Y)+(g-Y)/(H-Y),1));n=_(n)}else if($===3){if(H===Y)n=g>=H?0:1;else n=1-o(0,d(0.5/(H-Y)+(g-Y)/(H-Y),1));n=_(n)}else if($===4){if(H===Y)n=0;else if(n=o(0,d(0.5/(H-Y)+(g-Y)/(H-Y),1)),n<0.5)n*=2;else n=1-2*(n-0.5);n=_(n)}else if($===5){if(H===Y)n=0;else{var I=H-Y;g=d(o(0,g+0.5-Y),H-Y);var Z=-I/2+g,c=I/2;n=Math.sqrt(1-Z*Z/(c*c))}n=_(n)}else if($===6){if(H===Y)n=0;else g=d(o(0,g+0.5-Y),H-Y),n=(1+Math.cos(Math.PI+Math.PI*2*g/(H-Y)))/2;n=_(n)}else{if(g>=i(Y))if(g-Y<0)n=o(0,d(d(H,1)-(Y-g),1));else n=o(0,d(H-g,1));n=_(n)}if(this.sm.v!==100){var v=this.sm.v*0.01;if(v===0)v=0.00000001;var k=0.5-v*0.5;if(n<k)n=0;else if(n=(n-k)/v,n>1)n=1}return n*this.a.v},getValue:function a(g){if(this.iterateDynamicProperties(),this._mdf=g||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,g&&this.data.r===2)this.e.v=this._currentTextLength;var l=this.data.r===2?1:100/this.data.totalChars,x=this.o.v/l,w=this.s.v/l+x,z=this.e.v/l+x;if(w>z){var _=w;w=z,z=_}this.finalS=w,this.finalE=z}},extendPrototype([DynamicPropertyContainer],r);function h(a,g,l){return new r(a,g,l)}return{getTextSelectorProp:h}}();function TextAnimatorDataProperty(o,d,i){var r={propType:!1},h=PropertyFactory.getProp,a=d.a;this.a={r:a.r?h(o,a.r,0,degToRads,i):r,rx:a.rx?h(o,a.rx,0,degToRads,i):r,ry:a.ry?h(o,a.ry,0,degToRads,i):r,sk:a.sk?h(o,a.sk,0,degToRads,i):r,sa:a.sa?h(o,a.sa,0,degToRads,i):r,s:a.s?h(o,a.s,1,0.01,i):r,a:a.a?h(o,a.a,1,0,i):r,o:a.o?h(o,a.o,0,0.01,i):r,p:a.p?h(o,a.p,1,0,i):r,sw:a.sw?h(o,a.sw,0,0,i):r,sc:a.sc?h(o,a.sc,1,0,i):r,fc:a.fc?h(o,a.fc,1,0,i):r,fh:a.fh?h(o,a.fh,0,0,i):r,fs:a.fs?h(o,a.fs,0,0.01,i):r,fb:a.fb?h(o,a.fb,0,0.01,i):r,t:a.t?h(o,a.t,0,0,i):r},this.s=TextSelectorProp.getTextSelectorProp(o,d.s,i),this.s.t=d.s.t}function TextAnimatorProperty(o,d,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=o,this._renderType=d,this._elem=i,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}TextAnimatorProperty.prototype.searchProperties=function(){var o,d=this._textData.a.length,i,r=PropertyFactory.getProp;for(o=0;o<d;o+=1)i=this._textData.a[o],this._animatorsData[o]=new TextAnimatorDataProperty(this._elem,i,this);if(this._textData.p&&"m"in this._textData.p)this._pathData={a:r(this._elem,this._textData.p.a,0,0,this),f:r(this._elem,this._textData.p.f,0,0,this),l:r(this._elem,this._textData.p.l,0,0,this),r:r(this._elem,this._textData.p.r,0,0,this),p:r(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0;else this._hasMaskedPath=!1;this._moreOptions.alignment=r(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(o,d){if(this.lettersChangedFlag=d,!this._mdf&&!this._isFirstFrame&&!d&&(!this._hasMaskedPath||!this._pathData.m._mdf))return;this._isFirstFrame=!1;var i=this._moreOptions.alignment.v,r=this._animatorsData,h=this._textData,a=this.mHelper,g=this._renderType,l=this.renderedLetters.length,x,w,z,_,n=o.l,Y,H,$,I,Z,c,v,k,X,V,u,p,U,F,L;if(this._hasMaskedPath){if(L=this._pathData.m,!this._pathData.n||this._pathData._mdf){var j=L.v;if(this._pathData.r.v)j=j.reverse();Y={tLength:0,segments:[]},_=j._length-1;var C;p=0;for(z=0;z<_;z+=1)C=bez.buildBezierData(j.v[z],j.v[z+1],[j.o[z][0]-j.v[z][0],j.o[z][1]-j.v[z][1]],[j.i[z+1][0]-j.v[z+1][0],j.i[z+1][1]-j.v[z+1][1]]),Y.tLength+=C.segmentLength,Y.segments.push(C),p+=C.segmentLength;if(z=_,L.v.c)C=bez.buildBezierData(j.v[z],j.v[0],[j.o[z][0]-j.v[z][0],j.o[z][1]-j.v[z][1]],[j.i[0][0]-j.v[0][0],j.i[0][1]-j.v[0][1]]),Y.tLength+=C.segmentLength,Y.segments.push(C),p+=C.segmentLength;this._pathData.pi=Y}if(Y=this._pathData.pi,H=this._pathData.f.v,v=0,c=1,I=0,Z=!0,V=Y.segments,H<0&&L.v.c){if(Y.tLength<Math.abs(H))H=-Math.abs(H)%Y.tLength;v=V.length-1,X=V[v].points,c=X.length-1;while(H<0)if(H+=X[c].partialLength,c-=1,c<0)v-=1,X=V[v].points,c=X.length-1}X=V[v].points,k=X[c-1],$=X[c],u=$.partialLength}_=n.length,x=0,w=0;var T=o.finalSize*1.2*0.714,K=!0,Q,W,b,J,R;J=r.length;var G,D=-1,t,E,m,d0=H,g0=v,Z0=c,W0=-1,J0,f0,$0,h0,M,x0,o1,N0,O0="",A0=this.defaultPropsArray,y0;if(o.j===2||o.j===1){var X0=0,d1=0,i1=o.j===2?-0.5:-1,L0=0,r1=!0;for(z=0;z<_;z+=1)if(n[z].n){if(X0)X0+=d1;while(L0<z)n[L0].animatorJustifyOffset=X0,L0+=1;X0=0,r1=!0}else{for(b=0;b<J;b+=1)if(Q=r[b].a,Q.t.propType){if(r1&&o.j===2)d1+=Q.t.v*i1;if(W=r[b].s,G=W.getMult(n[z].anIndexes[b],h.a[b].s.totalChars),G.length)X0+=Q.t.v*G[0]*i1;else X0+=Q.t.v*G*i1}r1=!1}if(X0)X0+=d1;while(L0<z)n[L0].animatorJustifyOffset=X0,L0+=1}for(z=0;z<_;z+=1){if(a.reset(),J0=1,n[z].n){if(x=0,w+=o.yOffset,w+=K?1:0,H=d0,K=!1,this._hasMaskedPath)v=g0,c=Z0,X=V[v].points,k=X[c-1],$=X[c],u=$.partialLength,I=0;O0="",N0="",x0="",y0="",A0=this.defaultPropsArray}else{if(this._hasMaskedPath){if(W0!==n[z].line){switch(o.j){case 1:H+=p-o.lineWidths[n[z].line];break;case 2:H+=(p-o.lineWidths[n[z].line])/2;break;default:break}W0=n[z].line}if(D!==n[z].ind){if(n[D])H+=n[D].extra;H+=n[z].an/2,D=n[z].ind}H+=i[0]*n[z].an*0.005;var u0=0;for(b=0;b<J;b+=1){if(Q=r[b].a,Q.p.propType)if(W=r[b].s,G=W.getMult(n[z].anIndexes[b],h.a[b].s.totalChars),G.length)u0+=Q.p.v[0]*G[0];else u0+=Q.p.v[0]*G;if(Q.a.propType)if(W=r[b].s,G=W.getMult(n[z].anIndexes[b],h.a[b].s.totalChars),G.length)u0+=Q.a.v[0]*G[0];else u0+=Q.a.v[0]*G}if(Z=!0,this._pathData.a.v)H=n[0].an*0.5+(p-this._pathData.f.v-n[0].an*0.5-n[n.length-1].an*0.5)*D/(_-1),H+=this._pathData.f.v;while(Z)if(I+u>=H+u0||!X)U=(H+u0-I)/$.partialLength,E=k.point[0]+($.point[0]-k.point[0])*U,m=k.point[1]+($.point[1]-k.point[1])*U,a.translate(-i[0]*n[z].an*0.005,-(i[1]*T)*0.01),Z=!1;else if(X){if(I+=$.partialLength,c+=1,c>=X.length)if(c=0,v+=1,!V[v])if(L.v.c)c=0,v=0,X=V[v].points;else I-=$.partialLength,X=null;else X=V[v].points;if(X)k=$,$=X[c],u=$.partialLength}t=n[z].an/2-n[z].add,a.translate(-t,0,0)}else t=n[z].an/2-n[z].add,a.translate(-t,0,0),a.translate(-i[0]*n[z].an*0.005,-i[1]*T*0.01,0);for(b=0;b<J;b+=1)if(Q=r[b].a,Q.t.propType){if(W=r[b].s,G=W.getMult(n[z].anIndexes[b],h.a[b].s.totalChars),x!==0||o.j!==0)if(this._hasMaskedPath)if(G.length)H+=Q.t.v*G[0];else H+=Q.t.v*G;else if(G.length)x+=Q.t.v*G[0];else x+=Q.t.v*G}if(o.strokeWidthAnim)$0=o.sw||0;if(o.strokeColorAnim)if(o.sc)f0=[o.sc[0],o.sc[1],o.sc[2]];else f0=[0,0,0];if(o.fillColorAnim&&o.fc)h0=[o.fc[0],o.fc[1],o.fc[2]];for(b=0;b<J;b+=1)if(Q=r[b].a,Q.a.propType)if(W=r[b].s,G=W.getMult(n[z].anIndexes[b],h.a[b].s.totalChars),G.length)a.translate(-Q.a.v[0]*G[0],-Q.a.v[1]*G[1],Q.a.v[2]*G[2]);else a.translate(-Q.a.v[0]*G,-Q.a.v[1]*G,Q.a.v[2]*G);for(b=0;b<J;b+=1)if(Q=r[b].a,Q.s.propType)if(W=r[b].s,G=W.getMult(n[z].anIndexes[b],h.a[b].s.totalChars),G.length)a.scale(1+(Q.s.v[0]-1)*G[0],1+(Q.s.v[1]-1)*G[1],1);else a.scale(1+(Q.s.v[0]-1)*G,1+(Q.s.v[1]-1)*G,1);for(b=0;b<J;b+=1){if(Q=r[b].a,W=r[b].s,G=W.getMult(n[z].anIndexes[b],h.a[b].s.totalChars),Q.sk.propType)if(G.length)a.skewFromAxis(-Q.sk.v*G[0],Q.sa.v*G[1]);else a.skewFromAxis(-Q.sk.v*G,Q.sa.v*G);if(Q.r.propType)if(G.length)a.rotateZ(-Q.r.v*G[2]);else a.rotateZ(-Q.r.v*G);if(Q.ry.propType)if(G.length)a.rotateY(Q.ry.v*G[1]);else a.rotateY(Q.ry.v*G);if(Q.rx.propType)if(G.length)a.rotateX(Q.rx.v*G[0]);else a.rotateX(Q.rx.v*G);if(Q.o.propType)if(G.length)J0+=(Q.o.v*G[0]-J0)*G[0];else J0+=(Q.o.v*G-J0)*G;if(o.strokeWidthAnim&&Q.sw.propType)if(G.length)$0+=Q.sw.v*G[0];else $0+=Q.sw.v*G;if(o.strokeColorAnim&&Q.sc.propType)for(M=0;M<3;M+=1)if(G.length)f0[M]+=(Q.sc.v[M]-f0[M])*G[0];else f0[M]+=(Q.sc.v[M]-f0[M])*G;if(o.fillColorAnim&&o.fc){if(Q.fc.propType)for(M=0;M<3;M+=1)if(G.length)h0[M]+=(Q.fc.v[M]-h0[M])*G[0];else h0[M]+=(Q.fc.v[M]-h0[M])*G;if(Q.fh.propType)if(G.length)h0=addHueToRGB(h0,Q.fh.v*G[0]);else h0=addHueToRGB(h0,Q.fh.v*G);if(Q.fs.propType)if(G.length)h0=addSaturationToRGB(h0,Q.fs.v*G[0]);else h0=addSaturationToRGB(h0,Q.fs.v*G);if(Q.fb.propType)if(G.length)h0=addBrightnessToRGB(h0,Q.fb.v*G[0]);else h0=addBrightnessToRGB(h0,Q.fb.v*G)}}for(b=0;b<J;b+=1)if(Q=r[b].a,Q.p.propType)if(W=r[b].s,G=W.getMult(n[z].anIndexes[b],h.a[b].s.totalChars),this._hasMaskedPath)if(G.length)a.translate(0,Q.p.v[1]*G[0],-Q.p.v[2]*G[1]);else a.translate(0,Q.p.v[1]*G,-Q.p.v[2]*G);else if(G.length)a.translate(Q.p.v[0]*G[0],Q.p.v[1]*G[1],-Q.p.v[2]*G[2]);else a.translate(Q.p.v[0]*G,Q.p.v[1]*G,-Q.p.v[2]*G);if(o.strokeWidthAnim)x0=$0<0?0:$0;if(o.strokeColorAnim)o1="rgb("+Math.round(f0[0]*255)+","+Math.round(f0[1]*255)+","+Math.round(f0[2]*255)+")";if(o.fillColorAnim&&o.fc)N0="rgb("+Math.round(h0[0]*255)+","+Math.round(h0[1]*255)+","+Math.round(h0[2]*255)+")";if(this._hasMaskedPath){if(a.translate(0,-o.ls),a.translate(0,i[1]*T*0.01+w,0),this._pathData.p.v){F=($.point[1]-k.point[1])/($.point[0]-k.point[0]);var c1=Math.atan(F)*180/Math.PI;if($.point[0]<k.point[0])c1+=180;a.rotate(-c1*Math.PI/180)}if(a.translate(E,m,0),H-=i[0]*n[z].an*0.005,n[z+1]&&D!==n[z+1].ind)H+=n[z].an/2,H+=o.tr*0.001*o.finalSize}else{if(a.translate(x,w,0),o.ps)a.translate(o.ps[0],o.ps[1]+o.ascent,0);switch(o.j){case 1:a.translate(n[z].animatorJustifyOffset+o.justifyOffset+(o.boxWidth-o.lineWidths[n[z].line]),0,0);break;case 2:a.translate(n[z].animatorJustifyOffset+o.justifyOffset+(o.boxWidth-o.lineWidths[n[z].line])/2,0,0);break;default:break}a.translate(0,-o.ls),a.translate(t,0,0),a.translate(i[0]*n[z].an*0.005,i[1]*T*0.01,0),x+=n[z].l+o.tr*0.001*o.finalSize}if(g==="html")O0=a.toCSS();else if(g==="svg")O0=a.to2dCSS();else A0=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5],a.props[6],a.props[7],a.props[8],a.props[9],a.props[10],a.props[11],a.props[12],a.props[13],a.props[14],a.props[15]];y0=J0}if(l<=z)R=new LetterProps(y0,x0,o1,N0,O0,A0),this.renderedLetters.push(R),l+=1,this.lettersChangedFlag=!0;else R=this.renderedLetters[z],this.lettersChangedFlag=R.update(y0,x0,o1,N0,O0,A0)||this.lettersChangedFlag}},TextAnimatorProperty.prototype.getValue=function(){if(this._elem.globalData.frameId===this._frameId)return;this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties()},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty);function ITextElement(){}ITextElement.prototype.initElement=function(o,d,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(o,d,i),this.textProperty=new TextProperty(this,o.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(o.t,this.renderType,this),this.initTransform(o,d,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(o){this._mdf=!1,this.prepareRenderableFrame(o),this.prepareProperties(o,this.isInRange)},ITextElement.prototype.createPathShape=function(o,d){var i,r=d.length,h,a="";for(i=0;i<r;i+=1)if(d[i].ty==="sh")h=d[i].ks.k,a+=buildShapeString(h,h.i.length,!0,o);return a},ITextElement.prototype.updateDocumentData=function(o,d){this.textProperty.updateDocumentData(o,d)},ITextElement.prototype.canResizeFont=function(o){this.textProperty.canResizeFont(o)},ITextElement.prototype.setMinimumFontSize=function(o){this.textProperty.setMinimumFontSize(o)},ITextElement.prototype.applyTextPropertiesToMatrix=function(o,d,i,r,h){if(o.ps)d.translate(o.ps[0],o.ps[1]+o.ascent,0);switch(d.translate(0,-o.ls,0),o.j){case 1:d.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[i]),0,0);break;case 2:d.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[i])/2,0,0);break;default:break}d.translate(r,h,0)},ITextElement.prototype.buildColor=function(o){return"rgb("+Math.round(o[0]*255)+","+Math.round(o[1]*255)+","+Math.round(o[2]*255)+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){if(this.textProperty._mdf||this.textProperty._isFirstFrame)this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1};var emptyShapeData={shapes:[]};function SVGTextLottieElement(o,d,i){this.textSpans=[],this.renderType="svg",this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){if(this.data.singleShape&&!this.globalData.fontManager.chars)this.textContainer=createNS("text")},SVGTextLottieElement.prototype.buildTextContents=function(o){var d=0,i=o.length,r=[],h="";while(d<i){if(o[d]===String.fromCharCode(13)||o[d]===String.fromCharCode(3))r.push(h),h="";else h+=o[d];d+=1}return r.push(h),r},SVGTextLottieElement.prototype.buildShapeData=function(o,d){if(o.shapes&&o.shapes.length){var i=o.shapes[0];if(i.it){var r=i.it[i.it.length-1];if(r.s)r.s.k[0]=d,r.s.k[1]=d}}return o},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var o,d,i=this.textProperty.currentData;if(this.renderedLetters=createSizedArray(i?i.l.length:0),i.fc)this.layerElement.setAttribute("fill",this.buildColor(i.fc));else this.layerElement.setAttribute("fill","rgba(0,0,0,0)");if(i.sc)this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw);this.layerElement.setAttribute("font-size",i.finalSize);var r=this.globalData.fontManager.getFontByName(i.f);if(r.fClass)this.layerElement.setAttribute("class",r.fClass);else{this.layerElement.setAttribute("font-family",r.fFamily);var{fWeight:h,fStyle:a}=i;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",h)}this.layerElement.setAttribute("aria-label",i.t);var g=i.l||[],l=!!this.globalData.fontManager.chars;d=g.length;var x,w=this.mHelper,z="",_=this.data.singleShape,n=0,Y=0,H=!0,$=i.tr*0.001*i.finalSize;if(_&&!l&&!i.sz){var I=this.textContainer,Z="start";switch(i.j){case 1:Z="end";break;case 2:Z="middle";break;default:Z="start";break}I.setAttribute("text-anchor",Z),I.setAttribute("letter-spacing",$);var c=this.buildTextContents(i.finalText);d=c.length,Y=i.ps?i.ps[1]+i.ascent:0;for(o=0;o<d;o+=1){if(x=this.textSpans[o].span||createNS("tspan"),x.textContent=c[o],x.setAttribute("x",0),x.setAttribute("y",Y),x.style.display="inherit",I.appendChild(x),!this.textSpans[o])this.textSpans[o]={span:null,glyph:null};this.textSpans[o].span=x,Y+=i.finalLineHeight}this.layerElement.appendChild(I)}else{var v=this.textSpans.length,k;for(o=0;o<d;o+=1){if(!this.textSpans[o])this.textSpans[o]={span:null,childSpan:null,glyph:null};if(!l||!_||o===0){if(x=v>o?this.textSpans[o].span:createNS(l?"g":"text"),v<=o){if(x.setAttribute("stroke-linecap","butt"),x.setAttribute("stroke-linejoin","round"),x.setAttribute("stroke-miterlimit","4"),this.textSpans[o].span=x,l){var X=createNS("g");x.appendChild(X),this.textSpans[o].childSpan=X}this.textSpans[o].span=x,this.layerElement.appendChild(x)}x.style.display="inherit"}if(w.reset(),_){if(g[o].n)n=-$,Y+=i.yOffset,Y+=H?1:0,H=!1;this.applyTextPropertiesToMatrix(i,w,g[o].line,n,Y),n+=g[o].l||0,n+=$}if(l){k=this.globalData.fontManager.getCharData(i.finalText[o],r.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily);var V;if(k.t===1)V=new SVGCompElement(k.data,this.globalData,this);else{var u=emptyShapeData;if(k.data&&k.data.shapes)u=this.buildShapeData(k.data,i.finalSize);V=new SVGShapeElement(u,this.globalData,this)}if(this.textSpans[o].glyph){var p=this.textSpans[o].glyph;this.textSpans[o].childSpan.removeChild(p.layerElement),p.destroy()}if(this.textSpans[o].glyph=V,V._debug=!0,V.prepareFrame(0),V.renderFrame(),this.textSpans[o].childSpan.appendChild(V.layerElement),k.t===1)this.textSpans[o].childSpan.setAttribute("transform","scale("+i.finalSize/100+","+i.finalSize/100+")")}else{if(_)x.setAttribute("transform","translate("+w.props[12]+","+w.props[13]+")");x.textContent=g[o].val,x.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}}if(_&&x)x.setAttribute("d",z)}while(o<this.textSpans.length)this.textSpans[o].span.style.display="none",o+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var o=this.layerElement.getBBox();this.bbox={top:o.y,left:o.x,width:o.width,height:o.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var o,d=this.textSpans.length,i;this.renderedFrame=this.comp.renderedFrame;for(o=0;o<d;o+=1)if(i=this.textSpans[o].glyph,i){if(i.prepareFrame(this.comp.renderedFrame-this.data.st),i._mdf)this._mdf=!0}},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),!this.data.singleShape||this._mdf){if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){this._sizeChanged=!0;var o,d,i=this.textAnimator.renderedLetters,r=this.textProperty.currentData.l;d=r.length;var h,a,g;for(o=0;o<d;o+=1)if(!r[o].n){if(h=i[o],a=this.textSpans[o].span,g=this.textSpans[o].glyph,g)g.renderFrame();if(h._mdf.m)a.setAttribute("transform",h.m);if(h._mdf.o)a.setAttribute("opacity",h.o);if(h._mdf.sw)a.setAttribute("stroke-width",h.sw);if(h._mdf.sc)a.setAttribute("stroke",h.sc);if(h._mdf.fc)a.setAttribute("fill",h.fc)}}}};function ISolidElement(o,d,i){this.initElement(o,d,i)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var o=createNS("rect");o.setAttribute("width",this.data.sw),o.setAttribute("height",this.data.sh),o.setAttribute("fill",this.data.sc),this.layerElement.appendChild(o)};function NullElement(o,d,i){this.initFrame(),this.initBaseData(o,d,i),this.initFrame(),this.initTransform(o,d,i),this.initHierarchy()}NullElement.prototype.prepareFrame=function(o){this.prepareProperties(o,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement);function SVGRendererBase(){}extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(o){return new NullElement(o,this.globalData,this)},SVGRendererBase.prototype.createShape=function(o){return new SVGShapeElement(o,this.globalData,this)},SVGRendererBase.prototype.createText=function(o){return new SVGTextLottieElement(o,this.globalData,this)},SVGRendererBase.prototype.createImage=function(o){return new IImageElement(o,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(o){return new ISolidElement(o,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(o){if(this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize)this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize);else this.svgElement.setAttribute("viewBox","0 0 "+o.w+" "+o.h);if(!this.renderConfig.viewBoxOnly)this.svgElement.setAttribute("width",o.w),this.svgElement.setAttribute("height",o.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility;if(this.renderConfig.width)this.svgElement.setAttribute("width",this.renderConfig.width);if(this.renderConfig.height)this.svgElement.setAttribute("height",this.renderConfig.height);if(this.renderConfig.className)this.svgElement.setAttribute("class",this.renderConfig.className);if(this.renderConfig.id)this.svgElement.setAttribute("id",this.renderConfig.id);if(this.renderConfig.focusable!==void 0)this.svgElement.setAttribute("focusable",this.renderConfig.focusable);this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var d=this.globalData.defs;this.setupGlobalData(o,d),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=o;var i=createNS("clipPath"),r=createNS("rect");r.setAttribute("width",o.w),r.setAttribute("height",o.h),r.setAttribute("x",0),r.setAttribute("y",0);var h=createElementID();i.setAttribute("id",h),i.appendChild(r),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+h+")"),d.appendChild(i),this.layers=o.layers,this.elements=createSizedArray(o.layers.length)},SVGRendererBase.prototype.destroy=function(){if(this.animationItem.wrapper)this.animationItem.wrapper.innerText="";this.layerElement=null,this.globalData.defs=null;var o,d=this.layers?this.layers.length:0;for(o=0;o<d;o+=1)if(this.elements[o]&&this.elements[o].destroy)this.elements[o].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(o){var d=0,i=this.layers.length;for(d=0;d<i;d+=1)if(this.layers[d].ind===o)return d;return-1},SVGRendererBase.prototype.buildItem=function(o){var d=this.elements;if(d[o]||this.layers[o].ty===99)return;d[o]=!0;var i=this.createItem(this.layers[o]);if(d[o]=i,getExpressionsPlugin()){if(this.layers[o].ty===0)this.globalData.projectInterface.registerComposition(i);i.initExpressions()}if(this.appendElementInPos(i,o),this.layers[o].tt){var r="tp"in this.layers[o]?this.findIndexByInd(this.layers[o].tp):o-1;if(r===-1)return;if(!this.elements[r]||this.elements[r]===!0)this.buildItem(r),this.addPendingElement(i);else{var h=d[r],a=h.getMatte(this.layers[o].tt);i.setMatte(a)}}},SVGRendererBase.prototype.checkPendingElements=function(){while(this.pendingElements.length){var o=this.pendingElements.pop();if(o.checkParenting(),o.data.tt){var d=0,i=this.elements.length;while(d<i){if(this.elements[d]===o){var r="tp"in o.data?this.findIndexByInd(o.data.tp):d-1,h=this.elements[r],a=h.getMatte(this.layers[d].tt);o.setMatte(a);break}d+=1}}}},SVGRendererBase.prototype.renderFrame=function(o){if(this.renderedFrame===o||this.destroyed)return;if(o===null)o=this.renderedFrame;else this.renderedFrame=o;this.globalData.frameNum=o,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=o,this.globalData._mdf=!1;var d,i=this.layers.length;if(!this.completeLayers)this.checkLayers(o);for(d=i-1;d>=0;d-=1)if(this.completeLayers||this.elements[d])this.elements[d].prepareFrame(o-this.layers[d].st);if(this.globalData._mdf){for(d=0;d<i;d+=1)if(this.completeLayers||this.elements[d])this.elements[d].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(o,d){var i=o.getBaseElement();if(!i)return;var r=0,h;while(r<d){if(this.elements[r]&&this.elements[r]!==!0&&this.elements[r].getBaseElement())h=this.elements[r].getBaseElement();r+=1}if(h)this.layerElement.insertBefore(i,h);else this.layerElement.appendChild(i)},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"};function ICompElement(){}extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(o,d,i){if(this.initFrame(),this.initBaseData(o,d,i),this.initTransform(o,d,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.data.xt||!d.progressiveLoad)this.buildAllItems();this.hide()},ICompElement.prototype.prepareFrame=function(o){if(this._mdf=!1,this.prepareRenderableFrame(o),this.prepareProperties(o,this.isInRange),!this.isInRange&&!this.data.xt)return;if(!this.tm._placeholder){var d=this.tm.v;if(d===this.data.op)d=this.data.op-1;this.renderedFrame=d}else this.renderedFrame=o/this.data.sr;var i,r=this.elements.length;if(!this.completeLayers)this.checkLayers(this.renderedFrame);for(i=r-1;i>=0;i-=1)if(this.completeLayers||this.elements[i]){if(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf)this._mdf=!0}},ICompElement.prototype.renderInnerContent=function(){var o,d=this.layers.length;for(o=0;o<d;o+=1)if(this.completeLayers||this.elements[o])this.elements[o].renderFrame()},ICompElement.prototype.setElements=function(o){this.elements=o},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var o,d=this.layers.length;for(o=0;o<d;o+=1)if(this.elements[o])this.elements[o].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(o,d,i){this.layers=o.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(o,d,i),this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,d.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(o){return new SVGCompElement(o,this.globalData,this)};function SVGRenderer(o,d){this.animationItem=o,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var i="";if(d&&d.title){var r=createNS("title"),h=createElementID();r.setAttribute("id",h),r.textContent=d.title,this.svgElement.appendChild(r),i+=h}if(d&&d.description){var a=createNS("desc"),g=createElementID();a.setAttribute("id",g),a.textContent=d.description,this.svgElement.appendChild(a),i+=" "+g}if(i)this.svgElement.setAttribute("aria-labelledby",i);var l=createNS("defs");this.svgElement.appendChild(l);var x=createNS("g");this.svgElement.appendChild(x),this.layerElement=x,this.renderConfig={preserveAspectRatio:d&&d.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:d&&d.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:d&&d.contentVisibility||"visible",progressiveLoad:d&&d.progressiveLoad||!1,hideOnTransparent:!(d&&d.hideOnTransparent===!1),viewBoxOnly:d&&d.viewBoxOnly||!1,viewBoxSize:d&&d.viewBoxSize||!1,className:d&&d.className||"",id:d&&d.id||"",focusable:d&&d.focusable,filterSize:{width:d&&d.filterSize&&d.filterSize.width||"100%",height:d&&d.filterSize&&d.filterSize.height||"100%",x:d&&d.filterSize&&d.filterSize.x||"0%",y:d&&d.filterSize&&d.filterSize.y||"0%"},width:d&&d.width,height:d&&d.height,runExpressions:!d||d.runExpressions===void 0||d.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:l,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(o){return new SVGCompElement(o,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function o(d){var i,r=d.length,h="_";for(i=0;i<r;i+=1)h+=d[i].transform.key+"_";var a=this.sequences[h];if(!a)a={transforms:[].concat(d),finalTransform:new Matrix,_mdf:!1},this.sequences[h]=a,this.sequenceList.push(a);return a},processSequence:function o(d,i){var r=0,h=d.transforms.length,a=i;while(r<h&&!i){if(d.transforms[r].transform.mProps._mdf){a=!0;break}r+=1}if(a){d.finalTransform.reset();for(r=h-1;r>=0;r-=1)d.finalTransform.multiply(d.transforms[r].transform.mProps.v)}d._mdf=a},processSequences:function o(d){var i,r=this.sequenceList.length;for(i=0;i<r;i+=1)this.processSequence(this.sequenceList[i],d)},getNewKey:function o(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function o(){var d="__lottie_element_luma_buffer",i=null,r=null,h=null;function a(){var x=createNS("svg"),w=createNS("filter"),z=createNS("feColorMatrix");if(w.setAttribute("id",d),z.setAttribute("type","matrix"),z.setAttribute("color-interpolation-filters","sRGB"),z.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),w.appendChild(z),x.appendChild(w),x.setAttribute("id",d+"_svg"),featureSupport.svgLumaHidden)x.style.display="none";return x}function g(){if(!i)h=a(),document.body.appendChild(h),i=createTag("canvas"),r=i.getContext("2d"),r.filter="url(#"+d+")",r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1)}function l(x){if(!i)g();return i.width=x.width,i.height=x.height,r.filter="url(#"+d+")",i}return{load:g,get:l}};function createCanvas(o,d){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(o,d);var i=createTag("canvas");return i.width=o,i.height=d,i}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}}(),registeredEffects={};function CVEffects(o){var d,i=o.data.ef?o.data.ef.length:0;this.filters=[];var r;for(d=0;d<i;d+=1){r=null;var h=o.data.ef[d].ty;if(registeredEffects[h]){var a=registeredEffects[h].effect;r=new a(o.effectsManager.effectElements[d],o)}if(r)this.filters.push(r)}if(this.filters.length)o.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(o){var d,i=this.filters.length;for(d=0;d<i;d+=1)this.filters[d].renderFrame(o)},CVEffects.prototype.getEffects=function(o){var d,i=this.filters.length,r=[];for(d=0;d<i;d+=1)if(this.filters[d].type===o)r.push(this.filters[d]);return r};function registerEffect(o,d){registeredEffects[o]={effect:d}}function CVMaskElement(o,d){this.data=o,this.element=d,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i,r=this.masksProperties.length,h=!1;for(i=0;i<r;i+=1){if(this.masksProperties[i].mode!=="n")h=!0;this.viewData[i]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[i],3)}if(this.hasMasks=h,h)this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(!this.hasMasks)return;var o=this.element.finalTransform.mat,d=this.element.canvasContext,i,r=this.masksProperties.length,h,a,g;d.beginPath();for(i=0;i<r;i+=1)if(this.masksProperties[i].mode!=="n"){if(this.masksProperties[i].inv)d.moveTo(0,0),d.lineTo(this.element.globalData.compSize.w,0),d.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),d.lineTo(0,this.element.globalData.compSize.h),d.lineTo(0,0);g=this.viewData[i].v,h=o.applyToPointArray(g.v[0][0],g.v[0][1],0),d.moveTo(h[0],h[1]);var l,x=g._length;for(l=1;l<x;l+=1)a=o.applyToTriplePoints(g.o[l-1],g.i[l],g.v[l]),d.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);a=o.applyToTriplePoints(g.o[l-1],g.i[0],g.v[0]),d.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5])}this.element.globalData.renderer.save(!0),d.clip()},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};function CVBaseElement(){}var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};CVBaseElement.prototype={createElements:function o(){},initRendererElement:function o(){},createContainerElements:function o(){if(this.data.tt>=1){this.buffers=[];var d=this.globalData.canvasContext,i=assetLoader.createCanvas(d.canvas.width,d.canvas.height);this.buffers.push(i);var r=assetLoader.createCanvas(d.canvas.width,d.canvas.height);if(this.buffers.push(r),this.data.tt>=3&&!document._isProxy)assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function o(){},setBlendMode:function o(){var d=this.globalData;if(d.blendMode!==this.data.bm){d.blendMode=this.data.bm;var i=getBlendMode(this.data.bm);d.canvasContext.globalCompositeOperation=i}},createRenderableComponents:function o(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function o(){if(!this.hidden&&(!this.isInRange||this.isTransparent))this.hidden=!0},showElement:function o(){if(this.isInRange&&!this.isTransparent)this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0},clearCanvas:function o(d){d.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function o(){if(this.data.tt>=1){var d=this.buffers[0],i=d.getContext("2d");this.clearCanvas(i),i.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function o(){if(this.data.tt>=1){var d=this.buffers[1],i=d.getContext("2d");this.clearCanvas(i),i.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var r=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(r.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var h=assetLoader.getLumaCanvas(this.canvasContext.canvas),a=h.getContext("2d");a.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(h,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(d,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function o(d){if(this.hidden||this.data.hd)return;if(this.data.td===1&&!d)return;this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var i=this.data.ty===0;if(this.prepareLayer(),this.globalData.renderer.save(i),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(i),this.exitLayer(),this.maskManager.hasMasks)this.globalData.renderer.restore(!0);if(this._isFirstFrame)this._isFirstFrame=!1},destroy:function o(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(o,d,i,r){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var h=4;if(d.ty==="rc")h=5;else if(d.ty==="el")h=6;else if(d.ty==="sr")h=7;this.sh=ShapePropertyFactory.getShapeProp(o,d,h,o);var a,g=i.length,l;for(a=0;a<g;a+=1)if(!i[a].closed)l={transforms:r.addTransformSequence(i[a].transforms),trNodes:[]},this.styledShapes.push(l),i[a].elements.push(l)}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(o,d,i){this.shapes=[],this.shapesData=o.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(o,d){var i={data:o,type:o.ty,preTransforms:this.transformsManager.addTransformSequence(d),transforms:[],elements:[],closed:o.hd===!0},r={};if(o.ty==="fl"||o.ty==="st"){if(r.c=PropertyFactory.getProp(this,o.c,1,255,this),!r.c.k)i.co="rgb("+bmFloor(r.c.v[0])+","+bmFloor(r.c.v[1])+","+bmFloor(r.c.v[2])+")"}else if(o.ty==="gf"||o.ty==="gs")r.s=PropertyFactory.getProp(this,o.s,1,null,this),r.e=PropertyFactory.getProp(this,o.e,1,null,this),r.h=PropertyFactory.getProp(this,o.h||{k:0},0,0.01,this),r.a=PropertyFactory.getProp(this,o.a||{k:0},0,degToRads,this),r.g=new GradientProperty(this,o.g,this);if(r.o=PropertyFactory.getProp(this,o.o,0,0.01,this),o.ty==="st"||o.ty==="gs"){if(i.lc=lineCapEnum[o.lc||2],i.lj=lineJoinEnum[o.lj||2],o.lj==1)i.ml=o.ml;if(r.w=PropertyFactory.getProp(this,o.w,0,null,this),!r.w.k)i.wi=r.w.v;if(o.d){var h=new DashProperty(this,o.d,"canvas",this);if(r.d=h,!r.d.k)i.da=r.d.dashArray,i.do=r.d.dashoffset[0]}}else i.r=o.r===2?"evenodd":"nonzero";return this.stylesList.push(i),r.style=i,r},CVShapeElement.prototype.createGroupElement=function(){var o={it:[],prevViewData:[]};return o},CVShapeElement.prototype.createTransformElement=function(o){var d={transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,o.o,0,0.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,o,this)}};return d},CVShapeElement.prototype.createShapeElement=function(o){var d=new CVShapeData(this,o,this.stylesList,this.transformsManager);return this.shapes.push(d),this.addShapeToModifiers(d),d},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var o,d=this.itemsData.length;for(o=0;o<d;o+=1)this.prevViewData[o]=this.itemsData[o];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),d=this.dynamicProperties.length;for(o=0;o<d;o+=1)this.dynamicProperties[o].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(o){var d,i=this.stylesList.length;for(d=0;d<i;d+=1)if(!this.stylesList[d].closed)this.stylesList[d].transforms.push(o)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var o,d=this.stylesList.length;for(o=0;o<d;o+=1)if(!this.stylesList[o].closed)this.stylesList[o].transforms.pop()},CVShapeElement.prototype.closeStyles=function(o){var d,i=o.length;for(d=0;d<i;d+=1)o[d].closed=!0},CVShapeElement.prototype.searchShapes=function(o,d,i,r,h){var a,g=o.length-1,l,x,w=[],z=[],_,n,Y,H=[].concat(h);for(a=g;a>=0;a-=1){if(_=this.searchProcessedElement(o[a]),!_)o[a]._shouldRender=r;else d[a]=i[_-1];if(o[a].ty==="fl"||o[a].ty==="st"||o[a].ty==="gf"||o[a].ty==="gs"){if(!_)d[a]=this.createStyleElement(o[a],H);else d[a].style.closed=!1;w.push(d[a].style)}else if(o[a].ty==="gr"){if(!_)d[a]=this.createGroupElement(o[a]);else{x=d[a].it.length;for(l=0;l<x;l+=1)d[a].prevViewData[l]=d[a].it[l]}this.searchShapes(o[a].it,d[a].it,d[a].prevViewData,r,H)}else if(o[a].ty==="tr"){if(!_)Y=this.createTransformElement(o[a]),d[a]=Y;H.push(d[a]),this.addTransformToStyleList(d[a])}else if(o[a].ty==="sh"||o[a].ty==="rc"||o[a].ty==="el"||o[a].ty==="sr"){if(!_)d[a]=this.createShapeElement(o[a])}else if(o[a].ty==="tm"||o[a].ty==="rd"||o[a].ty==="pb"||o[a].ty==="zz"||o[a].ty==="op"){if(!_)n=ShapeModifiers.getModifier(o[a].ty),n.init(this,o[a]),d[a]=n,this.shapeModifiers.push(n);else n=d[a],n.closed=!1;z.push(n)}else if(o[a].ty==="rp"){if(!_)n=ShapeModifiers.getModifier(o[a].ty),d[a]=n,n.init(this,o,a,d),this.shapeModifiers.push(n),r=!1;else n=d[a],n.closed=!0;z.push(n)}this.addProcessedElement(o[a],a+1)}this.removeTransformFromStyleList(),this.closeStyles(w),g=z.length;for(a=0;a<g;a+=1)z[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(o,d){if(o._opMdf||d.op._mdf||this._isFirstFrame)d.opacity=o.opacity,d.opacity*=d.op.v,d._opMdf=!0},CVShapeElement.prototype.drawLayer=function(){var o,d=this.stylesList.length,i,r,h,a,g,l,x=this.globalData.renderer,w=this.globalData.canvasContext,z,_;for(o=0;o<d;o+=1)if(_=this.stylesList[o],z=_.type,!((z==="st"||z==="gs")&&_.wi===0||!_.data._shouldRender||_.coOp===0||this.globalData.currentGlobalAlpha===0)){if(x.save(),g=_.elements,z==="st"||z==="gs")x.ctxStrokeStyle(z==="st"?_.co:_.grd),x.ctxLineWidth(_.wi),x.ctxLineCap(_.lc),x.ctxLineJoin(_.lj),x.ctxMiterLimit(_.ml||0);else x.ctxFillStyle(z==="fl"?_.co:_.grd);if(x.ctxOpacity(_.coOp),z!=="st"&&z!=="gs")w.beginPath();x.ctxTransform(_.preTransforms.finalTransform.props),r=g.length;for(i=0;i<r;i+=1){if(z==="st"||z==="gs"){if(w.beginPath(),_.da)w.setLineDash(_.da),w.lineDashOffset=_.do}l=g[i].trNodes,a=l.length;for(h=0;h<a;h+=1)if(l[h].t==="m")w.moveTo(l[h].p[0],l[h].p[1]);else if(l[h].t==="c")w.bezierCurveTo(l[h].pts[0],l[h].pts[1],l[h].pts[2],l[h].pts[3],l[h].pts[4],l[h].pts[5]);else w.closePath();if(z==="st"||z==="gs"){if(x.ctxStroke(),_.da)w.setLineDash(this.dashResetter)}}if(z!=="st"&&z!=="gs")this.globalData.renderer.ctxFill(_.r);x.restore()}},CVShapeElement.prototype.renderShape=function(o,d,i,r){var h,a=d.length-1,g;g=o;for(h=a;h>=0;h-=1)if(d[h].ty==="tr")g=i[h].transform,this.renderShapeTransform(o,g);else if(d[h].ty==="sh"||d[h].ty==="el"||d[h].ty==="rc"||d[h].ty==="sr")this.renderPath(d[h],i[h]);else if(d[h].ty==="fl")this.renderFill(d[h],i[h],g);else if(d[h].ty==="st")this.renderStroke(d[h],i[h],g);else if(d[h].ty==="gf"||d[h].ty==="gs")this.renderGradientFill(d[h],i[h],g);else if(d[h].ty==="gr")this.renderShape(g,d[h].it,i[h].it);else if(d[h].ty==="tm");if(r)this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(o,d){if(this._isFirstFrame||d._mdf||o.transforms._mdf){var i=o.trNodes,r=d.paths,h,a,g,l=r._length;i.length=0;var x=o.transforms.finalTransform;for(g=0;g<l;g+=1){var w=r.shapes[g];if(w&&w.v){a=w._length;for(h=1;h<a;h+=1){if(h===1)i.push({t:"m",p:x.applyToPointArray(w.v[0][0],w.v[0][1],0)});i.push({t:"c",pts:x.applyToTriplePoints(w.o[h-1],w.i[h],w.v[h])})}if(a===1)i.push({t:"m",p:x.applyToPointArray(w.v[0][0],w.v[0][1],0)});if(w.c&&a)i.push({t:"c",pts:x.applyToTriplePoints(w.o[h-1],w.i[0],w.v[0])}),i.push({t:"z"})}}o.trNodes=i}},CVShapeElement.prototype.renderPath=function(o,d){if(o.hd!==!0&&o._shouldRender){var i,r=d.styledShapes.length;for(i=0;i<r;i+=1)this.renderStyledShape(d.styledShapes[i],d.sh)}},CVShapeElement.prototype.renderFill=function(o,d,i){var r=d.style;if(d.c._mdf||this._isFirstFrame)r.co="rgb("+bmFloor(d.c.v[0])+","+bmFloor(d.c.v[1])+","+bmFloor(d.c.v[2])+")";if(d.o._mdf||i._opMdf||this._isFirstFrame)r.coOp=d.o.v*i.opacity},CVShapeElement.prototype.renderGradientFill=function(o,d,i){var r=d.style,h;if(!r.grd||d.g._mdf||d.s._mdf||d.e._mdf||o.t!==1&&(d.h._mdf||d.a._mdf)){var a=this.globalData.canvasContext,g=d.s.v,l=d.e.v;if(o.t===1)h=a.createLinearGradient(g[0],g[1],l[0],l[1]);else{var x=Math.sqrt(Math.pow(g[0]-l[0],2)+Math.pow(g[1]-l[1],2)),w=Math.atan2(l[1]-g[1],l[0]-g[0]),z=d.h.v;if(z>=1)z=0.99;else if(z<=-1)z=-0.99;var _=x*z,n=Math.cos(w+d.a.v)*_+g[0],Y=Math.sin(w+d.a.v)*_+g[1];h=a.createRadialGradient(n,Y,0,g[0],g[1],x)}var H,$=o.g.p,I=d.g.c,Z=1;for(H=0;H<$;H+=1){if(d.g._hasOpacity&&d.g._collapsable)Z=d.g.o[H*2+1];h.addColorStop(I[H*4]/100,"rgba("+I[H*4+1]+","+I[H*4+2]+","+I[H*4+3]+","+Z+")")}r.grd=h}r.coOp=d.o.v*i.opacity},CVShapeElement.prototype.renderStroke=function(o,d,i){var{style:r,d:h}=d;if(h&&(h._mdf||this._isFirstFrame))r.da=h.dashArray,r.do=h.dashoffset[0];if(d.c._mdf||this._isFirstFrame)r.co="rgb("+bmFloor(d.c.v[0])+","+bmFloor(d.c.v[1])+","+bmFloor(d.c.v[2])+")";if(d.o._mdf||i._opMdf||this._isFirstFrame)r.coOp=d.o.v*i.opacity;if(d.w._mdf||this._isFirstFrame)r.wi=d.w.v},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function CVTextElement(o,d,i){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var o=this.textProperty.currentData;this.renderedLetters=createSizedArray(o.l?o.l.length:0);var d=!1;if(o.fc)d=!0,this.values.fill=this.buildColor(o.fc);else this.values.fill="rgba(0,0,0,0)";this.fill=d;var i=!1;if(o.sc)i=!0,this.values.stroke=this.buildColor(o.sc),this.values.sWidth=o.sw;var r=this.globalData.fontManager.getFontByName(o.f),h,a,g=o.l,l=this.mHelper;this.stroke=i,this.values.fValue=o.finalSize+"px "+this.globalData.fontManager.getFontByName(o.f).fFamily,a=o.finalText.length;var x,w,z,_,n,Y,H,$,I,Z,c=this.data.singleShape,v=o.tr*0.001*o.finalSize,k=0,X=0,V=!0,u=0;for(h=0;h<a;h+=1){if(x=this.globalData.fontManager.getCharData(o.finalText[h],r.fStyle,this.globalData.fontManager.getFontByName(o.f).fFamily),w=x&&x.data||{},l.reset(),c&&g[h].n)k=-v,X+=o.yOffset,X+=V?1:0,V=!1;if(n=w.shapes?w.shapes[0].it:[],H=n.length,l.scale(o.finalSize/100,o.finalSize/100),c)this.applyTextPropertiesToMatrix(o,l,g[h].line,k,X);I=createSizedArray(H-1);var p=0;for(Y=0;Y<H;Y+=1)if(n[Y].ty==="sh"){_=n[Y].ks.k.i.length,$=n[Y].ks.k,Z=[];for(z=1;z<_;z+=1){if(z===1)Z.push(l.applyToX($.v[0][0],$.v[0][1],0),l.applyToY($.v[0][0],$.v[0][1],0));Z.push(l.applyToX($.o[z-1][0],$.o[z-1][1],0),l.applyToY($.o[z-1][0],$.o[z-1][1],0),l.applyToX($.i[z][0],$.i[z][1],0),l.applyToY($.i[z][0],$.i[z][1],0),l.applyToX($.v[z][0],$.v[z][1],0),l.applyToY($.v[z][0],$.v[z][1],0))}Z.push(l.applyToX($.o[z-1][0],$.o[z-1][1],0),l.applyToY($.o[z-1][0],$.o[z-1][1],0),l.applyToX($.i[0][0],$.i[0][1],0),l.applyToY($.i[0][0],$.i[0][1],0),l.applyToX($.v[0][0],$.v[0][1],0),l.applyToY($.v[0][0],$.v[0][1],0)),I[p]=Z,p+=1}if(c)k+=g[h].l,k+=v;if(this.textSpans[u])this.textSpans[u].elem=I;else this.textSpans[u]={elem:I};u+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var o=this.canvasContext;if(o.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),!this.data.singleShape)this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var d,i,r,h,a,g,l=this.textAnimator.renderedLetters,x=this.textProperty.currentData.l;i=x.length;var w,z=null,_=null,n=null,Y,H,$=this.globalData.renderer;for(d=0;d<i;d+=1)if(!x[d].n){if(w=l[d],w)$.save(),$.ctxTransform(w.p),$.ctxOpacity(w.o);if(this.fill){if(w&&w.fc){if(z!==w.fc)$.ctxFillStyle(w.fc),z=w.fc}else if(z!==this.values.fill)z=this.values.fill,$.ctxFillStyle(this.values.fill);Y=this.textSpans[d].elem,h=Y.length,this.globalData.canvasContext.beginPath();for(r=0;r<h;r+=1){H=Y[r],g=H.length,this.globalData.canvasContext.moveTo(H[0],H[1]);for(a=2;a<g;a+=6)this.globalData.canvasContext.bezierCurveTo(H[a],H[a+1],H[a+2],H[a+3],H[a+4],H[a+5])}this.globalData.canvasContext.closePath(),$.ctxFill()}if(this.stroke){if(w&&w.sw){if(n!==w.sw)n=w.sw,$.ctxLineWidth(w.sw)}else if(n!==this.values.sWidth)n=this.values.sWidth,$.ctxLineWidth(this.values.sWidth);if(w&&w.sc){if(_!==w.sc)_=w.sc,$.ctxStrokeStyle(w.sc)}else if(_!==this.values.stroke)_=this.values.stroke,$.ctxStrokeStyle(this.values.stroke);Y=this.textSpans[d].elem,h=Y.length,this.globalData.canvasContext.beginPath();for(r=0;r<h;r+=1){H=Y[r],g=H.length,this.globalData.canvasContext.moveTo(H[0],H[1]);for(a=2;a<g;a+=6)this.globalData.canvasContext.bezierCurveTo(H[a],H[a+1],H[a+2],H[a+3],H[a+4],H[a+5])}this.globalData.canvasContext.closePath(),$.ctxStroke()}if(w)this.globalData.renderer.restore()}};function CVImageElement(o,d,i){this.assetData=d.getAssetData(o.refId),this.img=d.imageLoader.getAsset(this.assetData),this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var o=createTag("canvas");o.width=this.assetData.w,o.height=this.assetData.h;var d=o.getContext("2d"),i=this.img.width,r=this.img.height,h=i/r,a=this.assetData.w/this.assetData.h,g,l,x=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;if(h>a&&x==="xMidYMid slice"||h<a&&x!=="xMidYMid slice")l=r,g=l*a;else g=i,l=g/a;d.drawImage(this.img,(i-g)/2,(r-l)/2,g,l,0,0,this.assetData.w,this.assetData.h),this.img=o}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(o,d,i){this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function CanvasRendererBase(){}extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(o){return new CVShapeElement(o,this.globalData,this)},CanvasRendererBase.prototype.createText=function(o){return new CVTextElement(o,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(o){return new CVImageElement(o,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(o){return new CVSolidElement(o,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(o){if(o[0]===1&&o[1]===0&&o[4]===0&&o[5]===1&&o[12]===0&&o[13]===0)return;this.canvasContext.transform(o[0],o[1],o[4],o[5],o[12],o[13])},CanvasRendererBase.prototype.ctxOpacity=function(o){this.canvasContext.globalAlpha*=o<0?0:o},CanvasRendererBase.prototype.ctxFillStyle=function(o){this.canvasContext.fillStyle=o},CanvasRendererBase.prototype.ctxStrokeStyle=function(o){this.canvasContext.strokeStyle=o},CanvasRendererBase.prototype.ctxLineWidth=function(o){this.canvasContext.lineWidth=o},CanvasRendererBase.prototype.ctxLineCap=function(o){this.canvasContext.lineCap=o},CanvasRendererBase.prototype.ctxLineJoin=function(o){this.canvasContext.lineJoin=o},CanvasRendererBase.prototype.ctxMiterLimit=function(o){this.canvasContext.miterLimit=o},CanvasRendererBase.prototype.ctxFill=function(o){this.canvasContext.fill(o)},CanvasRendererBase.prototype.ctxFillRect=function(o,d,i,r){this.canvasContext.fillRect(o,d,i,r)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(o){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}if(o)this.globalData.blendMode="source-over";this.contextData.restore(o)},CanvasRendererBase.prototype.configAnimation=function(o){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var d=this.animationItem.container.style;d.width="100%",d.height="100%";var i="0px 0px 0px";if(d.transformOrigin=i,d.mozTransformOrigin=i,d.webkitTransformOrigin=i,d["-webkit-transform"]=i,d.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className)this.animationItem.container.setAttribute("class",this.renderConfig.className);if(this.renderConfig.id)this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=o,this.layers=o.layers,this.transformCanvas={w:o.w,h:o.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(o,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(o.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(o,d){this.reset();var i,r;if(o)i=o,r=d,this.canvasContext.canvas.width=i,this.canvasContext.canvas.height=r;else{if(this.animationItem.wrapper&&this.animationItem.container)i=this.animationItem.wrapper.offsetWidth,r=this.animationItem.wrapper.offsetHeight;else i=this.canvasContext.canvas.width,r=this.canvasContext.canvas.height;this.canvasContext.canvas.width=i*this.renderConfig.dpr,this.canvasContext.canvas.height=r*this.renderConfig.dpr}var h,a;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var g=this.renderConfig.preserveAspectRatio.split(" "),l=g[1]||"meet",x=g[0]||"xMidYMid",w=x.substr(0,4),z=x.substr(4);if(h=i/r,a=this.transformCanvas.w/this.transformCanvas.h,a>h&&l==="meet"||a<h&&l==="slice")this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.w/this.renderConfig.dpr);else this.transformCanvas.sx=r/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.h/this.renderConfig.dpr);if(w==="xMid"&&(a<h&&l==="meet"||a>h&&l==="slice"))this.transformCanvas.tx=(i-this.transformCanvas.w*(r/this.transformCanvas.h))/2*this.renderConfig.dpr;else if(w==="xMax"&&(a<h&&l==="meet"||a>h&&l==="slice"))this.transformCanvas.tx=(i-this.transformCanvas.w*(r/this.transformCanvas.h))*this.renderConfig.dpr;else this.transformCanvas.tx=0;if(z==="YMid"&&(a>h&&l==="meet"||a<h&&l==="slice"))this.transformCanvas.ty=(r-this.transformCanvas.h*(i/this.transformCanvas.w))/2*this.renderConfig.dpr;else if(z==="YMax"&&(a>h&&l==="meet"||a<h&&l==="slice"))this.transformCanvas.ty=(r-this.transformCanvas.h*(i/this.transformCanvas.w))*this.renderConfig.dpr;else this.transformCanvas.ty=0}else if(this.renderConfig.preserveAspectRatio==="none")this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;else this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0;this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){if(this.renderConfig.clearCanvas&&this.animationItem.wrapper)this.animationItem.wrapper.innerText="";var o,d=this.layers?this.layers.length:0;for(o=d-1;o>=0;o-=1)if(this.elements[o]&&this.elements[o].destroy)this.elements[o].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(o,d){if(this.renderedFrame===o&&this.renderConfig.clearCanvas===!0&&!d||this.destroyed||o===-1)return;this.renderedFrame=o,this.globalData.frameNum=o-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||d,this.globalData.projectInterface.currentFrame=o;var i,r=this.layers.length;if(!this.completeLayers)this.checkLayers(o);for(i=r-1;i>=0;i-=1)if(this.completeLayers||this.elements[i])this.elements[i].prepareFrame(o-this.layers[i].st);if(this.globalData._mdf){if(this.renderConfig.clearCanvas===!0)this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h);else this.save();for(i=r-1;i>=0;i-=1)if(this.completeLayers||this.elements[i])this.elements[i].renderFrame();if(this.renderConfig.clearCanvas!==!0)this.restore()}},CanvasRendererBase.prototype.buildItem=function(o){var d=this.elements;if(d[o]||this.layers[o].ty===99)return;var i=this.createItem(this.layers[o],this,this.globalData);d[o]=i,i.initExpressions()},CanvasRendererBase.prototype.checkPendingElements=function(){while(this.pendingElements.length){var o=this.pendingElements.pop();o.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var o,d=15;for(o=0;o<d;o+=1){var i=new CanvasContext;this.stack[o]=i}this._length=d,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}CVContextData.prototype.duplicate=function(){var o=this._length*2,d=0;for(d=this._length;d<o;d+=1)this.stack[d]=new CanvasContext;this._length=o},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(o){this.cArrPos-=1;var d=this.stack[this.cArrPos],i=d.transform,r,h=this.cTr.props;for(r=0;r<16;r+=1)h[r]=i[r];if(o){this.nativeContext.restore();var a=this.stack[this.cArrPos+1];this.appliedFillStyle=a.fillStyle,this.appliedStrokeStyle=a.strokeStyle,this.appliedLineWidth=a.lineWidth,this.appliedLineCap=a.lineCap,this.appliedLineJoin=a.lineJoin,this.appliedMiterLimit=a.miterLimit}if(this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13]),o||d.opacity!==-1&&this.currentOpacity!==d.opacity)this.nativeContext.globalAlpha=d.opacity,this.currentOpacity=d.opacity;this.currentFillStyle=d.fillStyle,this.currentStrokeStyle=d.strokeStyle,this.currentLineWidth=d.lineWidth,this.currentLineCap=d.lineCap,this.currentLineJoin=d.lineJoin,this.currentMiterLimit=d.miterLimit},CVContextData.prototype.save=function(o){if(o)this.nativeContext.save();var d=this.cTr.props;if(this._length<=this.cArrPos)this.duplicate();var i=this.stack[this.cArrPos],r;for(r=0;r<16;r+=1)i.transform[r]=d[r];this.cArrPos+=1;var h=this.stack[this.cArrPos];h.opacity=i.opacity,h.fillStyle=i.fillStyle,h.strokeStyle=i.strokeStyle,h.lineWidth=i.lineWidth,h.lineCap=i.lineCap,h.lineJoin=i.lineJoin,h.miterLimit=i.miterLimit},CVContextData.prototype.setOpacity=function(o){this.stack[this.cArrPos].opacity=o},CVContextData.prototype.setContext=function(o){this.nativeContext=o},CVContextData.prototype.fillStyle=function(o){if(this.stack[this.cArrPos].fillStyle!==o)this.currentFillStyle=o,this.stack[this.cArrPos].fillStyle=o},CVContextData.prototype.strokeStyle=function(o){if(this.stack[this.cArrPos].strokeStyle!==o)this.currentStrokeStyle=o,this.stack[this.cArrPos].strokeStyle=o},CVContextData.prototype.lineWidth=function(o){if(this.stack[this.cArrPos].lineWidth!==o)this.currentLineWidth=o,this.stack[this.cArrPos].lineWidth=o},CVContextData.prototype.lineCap=function(o){if(this.stack[this.cArrPos].lineCap!==o)this.currentLineCap=o,this.stack[this.cArrPos].lineCap=o},CVContextData.prototype.lineJoin=function(o){if(this.stack[this.cArrPos].lineJoin!==o)this.currentLineJoin=o,this.stack[this.cArrPos].lineJoin=o},CVContextData.prototype.miterLimit=function(o){if(this.stack[this.cArrPos].miterLimit!==o)this.currentMiterLimit=o,this.stack[this.cArrPos].miterLimit=o},CVContextData.prototype.transform=function(o){this.transformMat.cloneFromProps(o);var d=this.cTr;this.transformMat.multiply(d),d.cloneFromProps(this.transformMat.props);var i=d.props;this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13])},CVContextData.prototype.opacity=function(o){var d=this.stack[this.cArrPos].opacity;if(d*=o<0?0:o,this.stack[this.cArrPos].opacity!==d){if(this.currentOpacity!==o)this.nativeContext.globalAlpha=o,this.currentOpacity=o;this.stack[this.cArrPos].opacity=d}},CVContextData.prototype.fill=function(o){if(this.appliedFillStyle!==this.currentFillStyle)this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle;this.nativeContext.fill(o)},CVContextData.prototype.fillRect=function(o,d,i,r){if(this.appliedFillStyle!==this.currentFillStyle)this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle;this.nativeContext.fillRect(o,d,i,r)},CVContextData.prototype.stroke=function(){if(this.appliedStrokeStyle!==this.currentStrokeStyle)this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle;if(this.appliedLineWidth!==this.currentLineWidth)this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth;if(this.appliedLineCap!==this.currentLineCap)this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap;if(this.appliedLineJoin!==this.currentLineJoin)this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin;if(this.appliedMiterLimit!==this.currentMiterLimit)this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit;this.nativeContext.stroke()};function CVCompElement(o,d,i){this.completeLayers=!1,this.layers=o.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(o,d,i),this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,d.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var o=this.canvasContext;o.beginPath(),o.moveTo(0,0),o.lineTo(this.data.w,0),o.lineTo(this.data.w,this.data.h),o.lineTo(0,this.data.h),o.lineTo(0,0),o.clip();var d,i=this.layers.length;for(d=i-1;d>=0;d-=1)if(this.completeLayers||this.elements[d])this.elements[d].renderFrame()},CVCompElement.prototype.destroy=function(){var o,d=this.layers.length;for(o=d-1;o>=0;o-=1)if(this.elements[o])this.elements[o].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(o){return new CVCompElement(o,this.globalData,this)};function CanvasRenderer(o,d){if(this.animationItem=o,this.renderConfig={clearCanvas:d&&d.clearCanvas!==void 0?d.clearCanvas:!0,context:d&&d.context||null,progressiveLoad:d&&d.progressiveLoad||!1,preserveAspectRatio:d&&d.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:d&&d.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:d&&d.contentVisibility||"visible",className:d&&d.className||"",id:d&&d.id||"",runExpressions:!d||d.runExpressions===void 0||d.runExpressions},this.renderConfig.dpr=d&&d.dpr||1,this.animationItem.wrapper)this.renderConfig.dpr=d&&d.dpr||window.devicePixelRatio||1;if(this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas)this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData)}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(o){return new CVCompElement(o,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function o(){},initRendererElement:function o(){if(this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask)this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement);else this.layerElement=this.baseElement;styleDiv(this.baseElement)},createContainerElements:function o(){if(this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln)this.layerElement.setAttribute("id",this.data.ln);if(this.data.cl)this.layerElement.setAttribute("class",this.data.cl);if(this.data.bm!==0)this.setBlendMode()},renderElement:function o(){var d=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var i=this.finalTransform.mat.toCSS();d.transform=i,d.webkitTransform=i}if(this.finalTransform._opMdf)d.opacity=this.finalTransform.mProp.o.v},renderFrame:function o(){if(this.data.hd||this.hidden)return;if(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame)this._isFirstFrame=!1},destroy:function o(){if(this.layerElement=null,this.transformedElement=null,this.matteElement)this.matteElement=null;if(this.maskManager)this.maskManager.destroy(),this.maskManager=null},createRenderableComponents:function o(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function o(){},setMatte:function o(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(o,d,i){this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var o;if(this.data.hasMask)o=createNS("rect"),o.setAttribute("width",this.data.sw),o.setAttribute("height",this.data.sh),o.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh);else o=createTag("div"),o.style.width=this.data.sw+"px",o.style.height=this.data.sh+"px",o.style.backgroundColor=this.data.sc;this.layerElement.appendChild(o)};function HShapeElement(o,d,i){this.shapes=[],this.shapesData=o.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(o,d,i),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var o;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),o=this.svgElement;else{o=createNS("svg");var d=this.comp.data?this.comp.data:this.globalData.compSize;o.setAttribute("width",d.w),o.setAttribute("height",d.h),o.appendChild(this.shapesContainer),this.layerElement.appendChild(o)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=o},HShapeElement.prototype.getTransformedPoint=function(o,d){var i,r=o.length;for(i=0;i<r;i+=1)d=o[i].mProps.v.applyToPointArray(d[0],d[1],0);return d},HShapeElement.prototype.calculateShapeBoundingBox=function(o,d){var i=o.sh.v,r=o.transformers,h,a=i._length,g,l,x,w;if(a<=1)return;for(h=0;h<a-1;h+=1)g=this.getTransformedPoint(r,i.v[h]),l=this.getTransformedPoint(r,i.o[h]),x=this.getTransformedPoint(r,i.i[h+1]),w=this.getTransformedPoint(r,i.v[h+1]),this.checkBounds(g,l,x,w,d);if(i.c)g=this.getTransformedPoint(r,i.v[h]),l=this.getTransformedPoint(r,i.o[h]),x=this.getTransformedPoint(r,i.i[0]),w=this.getTransformedPoint(r,i.v[0]),this.checkBounds(g,l,x,w,d)},HShapeElement.prototype.checkBounds=function(o,d,i,r,h){this.getBoundsOfCurve(o,d,i,r);var a=this.shapeBoundingBox;h.x=bmMin(a.left,h.x),h.xMax=bmMax(a.right,h.xMax),h.y=bmMin(a.top,h.y),h.yMax=bmMax(a.bottom,h.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(o,d,i,r){var h=[[o[0],r[0]],[o[1],r[1]]];for(var a,g,l,x,w,z,_,n=0;n<2;++n)if(g=6*o[n]-12*d[n]+6*i[n],a=-3*o[n]+9*d[n]-9*i[n]+3*r[n],l=3*d[n]-3*o[n],g|=0,a|=0,l|=0,a===0&&g===0);else if(a===0){if(x=-l/g,x>0&&x<1)h[n].push(this.calculateF(x,o,d,i,r,n))}else if(w=g*g-4*l*a,w>=0){if(z=(-g+bmSqrt(w))/(2*a),z>0&&z<1)h[n].push(this.calculateF(z,o,d,i,r,n));if(_=(-g-bmSqrt(w))/(2*a),_>0&&_<1)h[n].push(this.calculateF(_,o,d,i,r,n))}this.shapeBoundingBox.left=bmMin.apply(null,h[0]),this.shapeBoundingBox.top=bmMin.apply(null,h[1]),this.shapeBoundingBox.right=bmMax.apply(null,h[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,h[1])},HShapeElement.prototype.calculateF=function(o,d,i,r,h,a){return bmPow(1-o,3)*d[a]+3*bmPow(1-o,2)*o*i[a]+3*(1-o)*bmPow(o,2)*r[a]+bmPow(o,3)*h[a]},HShapeElement.prototype.calculateBoundingBox=function(o,d){var i,r=o.length;for(i=0;i<r;i+=1)if(o[i]&&o[i].sh)this.calculateShapeBoundingBox(o[i],d);else if(o[i]&&o[i].it)this.calculateBoundingBox(o[i].it,d);else if(o[i]&&o[i].style&&o[i].w)this.expandStrokeBoundingBox(o[i].w,d)},HShapeElement.prototype.expandStrokeBoundingBox=function(o,d){var i=0;if(o.keyframes){for(var r=0;r<o.keyframes.length;r+=1){var h=o.keyframes[r].s;if(h>i)i=h}i*=o.mult}else i=o.v*o.mult;d.x-=i,d.xMax+=i,d.y-=i,d.yMax+=i},HShapeElement.prototype.currentBoxContains=function(o){return this.currentBBox.x<=o.x&&this.currentBBox.y<=o.y&&this.currentBBox.width+this.currentBBox.x>=o.x+o.width&&this.currentBBox.height+this.currentBBox.y>=o.y+o.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var o=this.tempBoundingBox,d=999999;if(o.x=d,o.xMax=-d,o.y=d,o.yMax=-d,this.calculateBoundingBox(this.itemsData,o),o.width=o.xMax<o.x?0:o.xMax-o.x,o.height=o.yMax<o.y?0:o.yMax-o.y,this.currentBoxContains(o))return;var i=!1;if(this.currentBBox.w!==o.width)this.currentBBox.w=o.width,this.shapeCont.setAttribute("width",o.width),i=!0;if(this.currentBBox.h!==o.height)this.currentBBox.h=o.height,this.shapeCont.setAttribute("height",o.height),i=!0;if(i||this.currentBBox.x!==o.x||this.currentBBox.y!==o.y){this.currentBBox.w=o.width,this.currentBBox.h=o.height,this.currentBBox.x=o.x,this.currentBBox.y=o.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var r=this.shapeCont.style,h="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";r.transform=h,r.webkitTransform=h}}};function HTextElement(o,d,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var o=createNS("g");this.maskedElement.appendChild(o),this.innerElem=o}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var o=this.textProperty.currentData;this.renderedLetters=createSizedArray(o.l?o.l.length:0);var d=this.innerElem.style,i=o.fc?this.buildColor(o.fc):"rgba(0,0,0,0)";if(d.fill=i,d.color=i,o.sc)d.stroke=this.buildColor(o.sc),d.strokeWidth=o.sw+"px";var r=this.globalData.fontManager.getFontByName(o.f);if(!this.globalData.fontManager.chars)if(d.fontSize=o.finalSize+"px",d.lineHeight=o.finalSize+"px",r.fClass)this.innerElem.className=r.fClass;else{d.fontFamily=r.fFamily;var{fWeight:h,fStyle:a}=o;d.fontStyle=a,d.fontWeight=h}var g,l,x=o.l;l=x.length;var w,z,_,n=this.mHelper,Y,H="",$=0;for(g=0;g<l;g+=1){if(this.globalData.fontManager.chars){if(!this.textPaths[$])w=createNS("path"),w.setAttribute("stroke-linecap",lineCapEnum[1]),w.setAttribute("stroke-linejoin",lineJoinEnum[2]),w.setAttribute("stroke-miterlimit","4");else w=this.textPaths[$];if(!this.isMasked)if(this.textSpans[$])z=this.textSpans[$],_=z.children[0];else z=createTag("div"),z.style.lineHeight=0,_=createNS("svg"),_.appendChild(w),styleDiv(z)}else if(!this.isMasked)if(this.textSpans[$])z=this.textSpans[$],w=this.textPaths[$];else z=createTag("span"),styleDiv(z),w=createTag("span"),styleDiv(w),z.appendChild(w);else w=this.textPaths[$]?this.textPaths[$]:createNS("text");if(this.globalData.fontManager.chars){var I=this.globalData.fontManager.getCharData(o.finalText[g],r.fStyle,this.globalData.fontManager.getFontByName(o.f).fFamily),Z;if(I)Z=I.data;else Z=null;if(n.reset(),Z&&Z.shapes&&Z.shapes.length)Y=Z.shapes[0].it,n.scale(o.finalSize/100,o.finalSize/100),H=this.createPathShape(n,Y),w.setAttribute("d",H);if(!this.isMasked){if(this.innerElem.appendChild(z),Z&&Z.shapes){document.body.appendChild(_);var c=_.getBBox();_.setAttribute("width",c.width+2),_.setAttribute("height",c.height+2),_.setAttribute("viewBox",c.x-1+" "+(c.y-1)+" "+(c.width+2)+" "+(c.height+2));var v=_.style,k="translate("+(c.x-1)+"px,"+(c.y-1)+"px)";v.transform=k,v.webkitTransform=k,x[g].yOffset=c.y-1}else _.setAttribute("width",1),_.setAttribute("height",1);z.appendChild(_)}else this.innerElem.appendChild(w)}else if(w.textContent=x[g].val,w.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),!this.isMasked){this.innerElem.appendChild(z);var X=w.style,V="translate3d(0,"+-o.finalSize/1.2+"px,0)";X.transform=V,X.webkitTransform=V}else this.innerElem.appendChild(w);if(!this.isMasked)this.textSpans[$]=z;else this.textSpans[$]=w;this.textSpans[$].style.display="block",this.textPaths[$]=w,$+=1}while($<this.textSpans.length)this.textSpans[$].style.display="none",$+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var o;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),o=this.svgElement.style;var d="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";o.transform=d,o.webkitTransform=d}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),!this.lettersChangedFlag&&!this.textAnimator.lettersChangedFlag)return;var i,r,h=0,a=this.textAnimator.renderedLetters,g=this.textProperty.currentData.l;r=g.length;var l,x,w;for(i=0;i<r;i+=1)if(g[i].n)h+=1;else{if(x=this.textSpans[i],w=this.textPaths[i],l=a[h],h+=1,l._mdf.m)if(!this.isMasked)x.style.webkitTransform=l.m,x.style.transform=l.m;else x.setAttribute("transform",l.m);if(x.style.opacity=l.o,l.sw&&l._mdf.sw)w.setAttribute("stroke-width",l.sw);if(l.sc&&l._mdf.sc)w.setAttribute("stroke",l.sc);if(l.fc&&l._mdf.fc)w.setAttribute("fill",l.fc),w.style.color=l.fc}if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var z=this.innerElem.getBBox();if(this.currentBBox.w!==z.width)this.currentBBox.w=z.width,this.svgElement.setAttribute("width",z.width);if(this.currentBBox.h!==z.height)this.currentBBox.h=z.height,this.svgElement.setAttribute("height",z.height);var _=1;if(this.currentBBox.w!==z.width+_*2||this.currentBBox.h!==z.height+_*2||this.currentBBox.x!==z.x-_||this.currentBBox.y!==z.y-_){this.currentBBox.w=z.width+_*2,this.currentBBox.h=z.height+_*2,this.currentBBox.x=z.x-_,this.currentBBox.y=z.y-_,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),o=this.svgElement.style;var n="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";o.transform=n,o.webkitTransform=n}}};function HCameraElement(o,d,i){this.initFrame(),this.initBaseData(o,d,i),this.initHierarchy();var r=PropertyFactory.getProp;if(this.pe=r(this,o.pe,0,0,this),o.ks.p.s)this.px=r(this,o.ks.p.x,1,0,this),this.py=r(this,o.ks.p.y,1,0,this),this.pz=r(this,o.ks.p.z,1,0,this);else this.p=r(this,o.ks.p,1,0,this);if(o.ks.a)this.a=r(this,o.ks.a,1,0,this);if(o.ks.or.k.length&&o.ks.or.k[0].to){var h,a=o.ks.or.k.length;for(h=0;h<a;h+=1)o.ks.or.k[h].to=null,o.ks.or.k[h].ti=null}this.or=r(this,o.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=r(this,o.ks.rx,0,degToRads,this),this.ry=r(this,o.ks.ry,0,degToRads,this),this.rz=r(this,o.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var o,d=this.comp.threeDElements.length,i,r,h;for(o=0;o<d;o+=1)if(i=this.comp.threeDElements[o],i.type==="3d"){r=i.perspectiveElem.style,h=i.container.style;var a=this.pe.v+"px",g="0px 0px 0px",l="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=a,r.webkitPerspective=a,h.transformOrigin=g,h.mozTransformOrigin=g,h.webkitTransformOrigin=g,r.transform=l,r.webkitTransform=l}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var o=this._isFirstFrame,d,i;if(this.hierarchy){i=this.hierarchy.length;for(d=0;d<i;d+=1)o=this.hierarchy[d].finalTransform.mProp._mdf||o}if(o||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy){i=this.hierarchy.length-1;for(d=i;d>=0;d-=1){var r=this.hierarchy[d].finalTransform.mProp;this.mat.translate(-r.p.v[0],-r.p.v[1],r.p.v[2]),this.mat.rotateX(-r.or.v[0]).rotateY(-r.or.v[1]).rotateZ(r.or.v[2]),this.mat.rotateX(-r.rx.v).rotateY(-r.ry.v).rotateZ(r.rz.v),this.mat.scale(1/r.s.v[0],1/r.s.v[1],1/r.s.v[2]),this.mat.translate(r.a.v[0],r.a.v[1],r.a.v[2])}}if(this.p)this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]);else this.mat.translate(-this.px.v,-this.py.v,this.pz.v);if(this.a){var h;if(this.p)h=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]];else h=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(h[0],2)+Math.pow(h[1],2)+Math.pow(h[2],2)),g=[h[0]/a,h[1]/a,h[2]/a],l=Math.sqrt(g[2]*g[2]+g[0]*g[0]),x=Math.atan2(g[1],l),w=Math.atan2(g[0],-g[2]);this.mat.rotateY(w).rotateX(-x)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var z=!this._prevMat.equals(this.mat);if((z||this.pe._mdf)&&this.comp.threeDElements){i=this.comp.threeDElements.length;var _,n,Y;for(d=0;d<i;d+=1)if(_=this.comp.threeDElements[d],_.type==="3d"){if(z){var H=this.mat.toCSS();Y=_.container.style,Y.transform=H,Y.webkitTransform=H}if(this.pe._mdf)n=_.perspectiveElem.style,n.perspective=this.pe.v+"px",n.webkitPerspective=this.pe.v+"px"}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(o){this.prepareProperties(o,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(o,d,i){this.assetData=d.getAssetData(o.refId),this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var o=this.globalData.getAssetsPath(this.assetData),d=new Image;if(this.data.hasMask)this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",o),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h);else this.layerElement.appendChild(d);if(d.crossOrigin="anonymous",d.src=o,this.data.ln)this.baseElement.setAttribute("id",this.data.ln)};function HybridRendererBase(o,d){this.animationItem=o,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:d&&d.className||"",imagePreserveAspectRatio:d&&d.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(d&&d.hideOnTransparent===!1),filterSize:{width:d&&d.filterSize&&d.filterSize.width||"400%",height:d&&d.filterSize&&d.filterSize.height||"400%",x:d&&d.filterSize&&d.filterSize.x||"-100%",y:d&&d.filterSize&&d.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){while(this.pendingElements.length){var o=this.pendingElements.pop();o.checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(o,d){var i=o.getBaseElement();if(!i)return;var r=this.layers[d];if(!r.ddd||!this.supports3d)if(this.threeDElements)this.addTo3dContainer(i,d);else{var h=0,a,g,l;while(h<d){if(this.elements[h]&&this.elements[h]!==!0&&this.elements[h].getBaseElement)g=this.elements[h],l=this.layers[h].ddd?this.getThreeDContainerByPos(h):g.getBaseElement(),a=l||a;h+=1}if(a){if(!r.ddd||!this.supports3d)this.layerElement.insertBefore(i,a)}else if(!r.ddd||!this.supports3d)this.layerElement.appendChild(i)}else this.addTo3dContainer(i,d)},HybridRendererBase.prototype.createShape=function(o){if(!this.supports3d)return new SVGShapeElement(o,this.globalData,this);return new HShapeElement(o,this.globalData,this)},HybridRendererBase.prototype.createText=function(o){if(!this.supports3d)return new SVGTextLottieElement(o,this.globalData,this);return new HTextElement(o,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(o){return this.camera=new HCameraElement(o,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(o){if(!this.supports3d)return new IImageElement(o,this.globalData,this);return new HImageElement(o,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(o){if(!this.supports3d)return new ISolidElement(o,this.globalData,this);return new HSolidElement(o,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(o){var d=0,i=this.threeDElements.length;while(d<i){if(this.threeDElements[d].startPos<=o&&this.threeDElements[d].endPos>=o)return this.threeDElements[d].perspectiveElem;d+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(o,d){var i=createTag("div"),r,h;styleDiv(i);var a=createTag("div");if(styleDiv(a),d==="3d"){r=i.style,r.width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var g="50% 50%";r.webkitTransformOrigin=g,r.mozTransformOrigin=g,r.transformOrigin=g,h=a.style;var l="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";h.transform=l,h.webkitTransform=l}i.appendChild(a);var x={container:a,perspectiveElem:i,startPos:o,endPos:o,type:d};return this.threeDElements.push(x),x},HybridRendererBase.prototype.build3dContainers=function(){var o,d=this.layers.length,i,r="";for(o=0;o<d;o+=1)if(this.layers[o].ddd&&this.layers[o].ty!==3){if(r!=="3d")r="3d",i=this.createThreeDContainer(o,"3d");i.endPos=Math.max(i.endPos,o)}else{if(r!=="2d")r="2d",i=this.createThreeDContainer(o,"2d");i.endPos=Math.max(i.endPos,o)}d=this.threeDElements.length;for(o=d-1;o>=0;o-=1)this.resizerElem.appendChild(this.threeDElements[o].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(o,d){var i=0,r=this.threeDElements.length;while(i<r){if(d<=this.threeDElements[i].endPos){var h=this.threeDElements[i].startPos,a;while(h<d){if(this.elements[h]&&this.elements[h].getBaseElement)a=this.elements[h].getBaseElement();h+=1}if(a)this.threeDElements[i].container.insertBefore(o,a);else this.threeDElements[i].container.appendChild(o);break}i+=1}},HybridRendererBase.prototype.configAnimation=function(o){var d=createTag("div"),i=this.animationItem.wrapper,r=d.style;if(r.width=o.w+"px",r.height=o.h+"px",this.resizerElem=d,styleDiv(d),r.transformStyle="flat",r.mozTransformStyle="flat",r.webkitTransformStyle="flat",this.renderConfig.className)d.setAttribute("class",this.renderConfig.className);i.appendChild(d),r.overflow="hidden";var h=createNS("svg");h.setAttribute("width","1"),h.setAttribute("height","1"),styleDiv(h),this.resizerElem.appendChild(h);var a=createNS("defs");h.appendChild(a),this.data=o,this.setupGlobalData(o,h),this.globalData.defs=a,this.layers=o.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){if(this.animationItem.wrapper)this.animationItem.wrapper.innerText="";this.animationItem.container=null,this.globalData.defs=null;var o,d=this.layers?this.layers.length:0;for(o=0;o<d;o+=1)if(this.elements[o]&&this.elements[o].destroy)this.elements[o].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var o=this.animationItem.wrapper.offsetWidth,d=this.animationItem.wrapper.offsetHeight,i=o/d,r=this.globalData.compSize.w/this.globalData.compSize.h,h,a,g,l;if(r>i)h=o/this.globalData.compSize.w,a=o/this.globalData.compSize.w,g=0,l=(d-this.globalData.compSize.h*(o/this.globalData.compSize.w))/2;else h=d/this.globalData.compSize.h,a=d/this.globalData.compSize.h,g=(o-this.globalData.compSize.w*(d/this.globalData.compSize.h))/2,l=0;var x=this.resizerElem.style;x.webkitTransform="matrix3d("+h+",0,0,0,0,"+a+",0,0,0,0,1,0,"+g+","+l+",0,1)",x.transform=x.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var o=this.globalData.compSize.w,d=this.globalData.compSize.h,i,r=this.threeDElements.length;for(i=0;i<r;i+=1){var h=this.threeDElements[i].perspectiveElem.style;h.webkitPerspective=Math.sqrt(Math.pow(o,2)+Math.pow(d,2))+"px",h.perspective=h.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(o){var d,i=o.length,r=createTag("div");for(d=0;d<i;d+=1)if(o[d].xt){var h=this.createComp(o[d],r,this.globalData.comp,null);h.initExpressions(),this.globalData.projectInterface.registerComposition(h)}};function HCompElement(o,d,i){this.layers=o.layers,this.supports3d=!o.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(o,d,i),this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,d.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){if(this._createBaseContainerElements(),this.data.hasMask)this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement;else this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(o,d){var i=0,r;while(i<d){if(this.elements[i]&&this.elements[i].getBaseElement)r=this.elements[i].getBaseElement();i+=1}if(r)this.layerElement.insertBefore(o,r);else this.layerElement.appendChild(o)},HCompElement.prototype.createComp=function(o){if(!this.supports3d)return new SVGCompElement(o,this.globalData,this);return new HCompElement(o,this.globalData,this)};function HybridRenderer(o,d){this.animationItem=o,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:d&&d.className||"",imagePreserveAspectRatio:d&&d.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(d&&d.hideOnTransparent===!1),filterSize:{width:d&&d.filterSize&&d.filterSize.width||"400%",height:d&&d.filterSize&&d.filterSize.height||"400%",x:d&&d.filterSize&&d.filterSize.x||"-100%",y:d&&d.filterSize&&d.filterSize.y||"-100%"},runExpressions:!d||d.runExpressions===void 0||d.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(o){if(!this.supports3d)return new SVGCompElement(o,this.globalData,this);return new HCompElement(o,this.globalData,this)};var CompExpressionInterface=function(){return function(o){function d(i){var r=0,h=o.layers.length;while(r<h){if(o.layers[r].nm===i||o.layers[r].ind===i)return o.elements[r].layerInterface;r+=1}return null}return Object.defineProperty(d,"_name",{value:o.data.nm}),d.layer=d,d.pixelAspect=1,d.height=o.data.h||o.globalData.compSize.h,d.width=o.data.w||o.globalData.compSize.w,d.pixelAspect=1,d.frameDuration=1/o.globalData.frameRate,d.displayStartTime=0,d.numLayers=o.layers.length,d}}();function _typeof$2(o){return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$2(o)}function seedRandom(o,d){var i=this,r=256,h=6,a=52,g="random",l=d.pow(r,h),x=d.pow(2,a),w=x*2,z=r-1,_;function n(v,k,X){var V=[];k=k===!0?{entropy:!0}:k||{};var u=I($(k.entropy?[v,c(o)]:v===null?Z():v,3),V),p=new Y(V),U=function F(){var L=p.g(h),j=l,C=0;while(L<x)L=(L+C)*r,j*=r,C=p.g(1);while(L>=w)L/=2,j/=2,C>>>=1;return(L+C)/j};return U.int32=function(){return p.g(4)|0},U.quick=function(){return p.g(4)/4294967296},U.double=U,I(c(p.S),o),(k.pass||X||function(F,L,j,C){if(C){if(C.S)H(C,p);F.state=function(){return H(p,{})}}if(j)return d[g]=F,L;else return F})(U,u,"global"in k?k.global:this==d,k.state)}d["seed"+g]=n;function Y(v){var k,X=v.length,V=this,u=0,p=V.i=V.j=0,U=V.S=[];if(!X)v=[X++];while(u<r)U[u]=u++;for(u=0;u<r;u++)U[u]=U[p=z&p+v[u%X]+(k=U[u])],U[p]=k;V.g=function(F){var L,j=0,C=V.i,T=V.j,K=V.S;while(F--)L=K[C=z&C+1],j=j*r+K[z&(K[C]=K[T=z&T+L])+(K[T]=L)];return V.i=C,V.j=T,j}}function H(v,k){return k.i=v.i,k.j=v.j,k.S=v.S.slice(),k}function $(v,k){var X=[],V=_typeof$2(v),u;if(k&&V=="object")for(u in v)try{X.push($(v[u],k-1))}catch(p){}return X.length?X:V=="string"?v:v+"\x00"}function I(v,k){var X=v+"",V,u=0;while(u<X.length)k[z&u]=z&(V^=k[z&u]*19)+X.charCodeAt(u++);return c(k)}function Z(){try{if(_)return c(_.randomBytes(r));var v=new Uint8Array(r);return(i.crypto||i.msCrypto).getRandomValues(v),c(v)}catch(V){var k=i.navigator,X=k&&k.plugins;return[+new Date,i,X,i.screen,c(o)]}}function c(v){return String.fromCharCode.apply(0,v)}I(d.random(),o)}function initialize$2(o){seedRandom([],o)}var propTypes={SHAPE:"shape"};function _typeof$1(o){return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$1(o)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(o){return o.constructor===Array||o.constructor===Float32Array}function isNumerable(o,d){return o==="number"||d instanceof Number||o==="boolean"||o==="string"}function $bm_neg(o){var d=_typeof$1(o);if(d==="number"||o instanceof Number||d==="boolean")return-o;if($bm_isInstanceOfArray(o)){var i,r=o.length,h=[];for(i=0;i<r;i+=1)h[i]=-o[i];return h}if(o.propType)return o.v;return-o}var easeInBez=BezierFactory.getBezierEasing(0.333,0,0.833,0.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(0.167,0.167,0.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(0.33,0,0.667,1,"easeInOut").get;function sum(o,d){var i=_typeof$1(o),r=_typeof$1(d);if(isNumerable(i,o)&&isNumerable(r,d)||i==="string"||r==="string")return o+d;if($bm_isInstanceOfArray(o)&&isNumerable(r,d))return o=o.slice(0),o[0]+=d,o;if(isNumerable(i,o)&&$bm_isInstanceOfArray(d))return d=d.slice(0),d[0]=o+d[0],d;if($bm_isInstanceOfArray(o)&&$bm_isInstanceOfArray(d)){var h=0,a=o.length,g=d.length,l=[];while(h<a||h<g){if((typeof o[h]==="number"||o[h]instanceof Number)&&(typeof d[h]==="number"||d[h]instanceof Number))l[h]=o[h]+d[h];else l[h]=d[h]===void 0?o[h]:o[h]||d[h];h+=1}return l}return 0}var add=sum;function sub(o,d){var i=_typeof$1(o),r=_typeof$1(d);if(isNumerable(i,o)&&isNumerable(r,d)){if(i==="string")o=parseInt(o,10);if(r==="string")d=parseInt(d,10);return o-d}if($bm_isInstanceOfArray(o)&&isNumerable(r,d))return o=o.slice(0),o[0]-=d,o;if(isNumerable(i,o)&&$bm_isInstanceOfArray(d))return d=d.slice(0),d[0]=o-d[0],d;if($bm_isInstanceOfArray(o)&&$bm_isInstanceOfArray(d)){var h=0,a=o.length,g=d.length,l=[];while(h<a||h<g){if((typeof o[h]==="number"||o[h]instanceof Number)&&(typeof d[h]==="number"||d[h]instanceof Number))l[h]=o[h]-d[h];else l[h]=d[h]===void 0?o[h]:o[h]||d[h];h+=1}return l}return 0}function mul(o,d){var i=_typeof$1(o),r=_typeof$1(d),h;if(isNumerable(i,o)&&isNumerable(r,d))return o*d;var a,g;if($bm_isInstanceOfArray(o)&&isNumerable(r,d)){g=o.length,h=createTypedArray("float32",g);for(a=0;a<g;a+=1)h[a]=o[a]*d;return h}if(isNumerable(i,o)&&$bm_isInstanceOfArray(d)){g=d.length,h=createTypedArray("float32",g);for(a=0;a<g;a+=1)h[a]=o*d[a];return h}return 0}function div(o,d){var i=_typeof$1(o),r=_typeof$1(d),h;if(isNumerable(i,o)&&isNumerable(r,d))return o/d;var a,g;if($bm_isInstanceOfArray(o)&&isNumerable(r,d)){g=o.length,h=createTypedArray("float32",g);for(a=0;a<g;a+=1)h[a]=o[a]/d;return h}if(isNumerable(i,o)&&$bm_isInstanceOfArray(d)){g=d.length,h=createTypedArray("float32",g);for(a=0;a<g;a+=1)h[a]=o/d[a];return h}return 0}function mod(o,d){if(typeof o==="string")o=parseInt(o,10);if(typeof d==="string")d=parseInt(d,10);return o%d}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(o,d,i){if(d>i){var r=i;i=d,d=r}return Math.min(Math.max(o,d),i)}function radiansToDegrees(o){return o/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(o){return o*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(o,d){if(typeof o==="number"||o instanceof Number)return d=d||0,Math.abs(o-d);if(!d)d=helperLengthArray;var i,r=Math.min(o.length,d.length),h=0;for(i=0;i<r;i+=1)h+=Math.pow(d[i]-o[i],2);return Math.sqrt(h)}function normalize(o){return div(o,length(o))}function rgbToHsl(o){var d=o[0],i=o[1],r=o[2],h=Math.max(d,i,r),a=Math.min(d,i,r),g,l,x=(h+a)/2;if(h===a)g=0,l=0;else{var w=h-a;switch(l=x>0.5?w/(2-h-a):w/(h+a),h){case d:g=(i-r)/w+(i<r?6:0);break;case i:g=(r-d)/w+2;break;case r:g=(d-i)/w+4;break;default:break}g/=6}return[g,l,x,o[3]]}function hue2rgb(o,d,i){if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return o+(d-o)*6*i;if(i<0.5)return d;if(i<0.6666666666666666)return o+(d-o)*(0.6666666666666666-i)*6;return o}function hslToRgb(o){var d=o[0],i=o[1],r=o[2],h,a,g;if(i===0)h=r,g=r,a=r;else{var l=r<0.5?r*(1+i):r+i-r*i,x=2*r-l;h=hue2rgb(x,l,d+0.3333333333333333),a=hue2rgb(x,l,d),g=hue2rgb(x,l,d-0.3333333333333333)}return[h,a,g,o[3]]}function linear(o,d,i,r,h){if(r===void 0||h===void 0)r=d,h=i,d=0,i=1;if(i<d){var a=i;i=d,d=a}if(o<=d)return r;if(o>=i)return h;var g=i===d?0:(o-d)/(i-d);if(!r.length)return r+(h-r)*g;var l,x=r.length,w=createTypedArray("float32",x);for(l=0;l<x;l+=1)w[l]=r[l]+(h[l]-r[l])*g;return w}function random(o,d){if(d===void 0)if(o===void 0)o=0,d=1;else d=o,o=void 0;if(d.length){var i,r=d.length;if(!o)o=createTypedArray("float32",r);var h=createTypedArray("float32",r),a=BMMath.random();for(i=0;i<r;i+=1)h[i]=o[i]+a*(d[i]-o[i]);return h}if(o===void 0)o=0;var g=BMMath.random();return o+g*(d-o)}function createPath(o,d,i,r){var h,a=o.length,g=shapePool.newElement();g.setPathData(!!r,a);var l=[0,0],x,w;for(h=0;h<a;h+=1)x=d&&d[h]?d[h]:l,w=i&&i[h]?i[h]:l,g.setTripleAt(o[h][0],o[h][1],w[0]+o[h][0],w[1]+o[h][1],x[0]+o[h][0],x[1]+o[h][1],h,!0);return g}function initiateExpression(elem,data,property){function noOp(o){return o}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty._name=elem.data.nm,thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function o(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=function o(d,i){var r,h,a=this.pv.length?this.pv.length:1,g=createTypedArray("float32",a);d=5;var l=Math.floor(time*d);r=0,h=0;while(r<l){for(h=0;h<a;h+=1)g[h]+=-i+i*2*BMMath.random();r+=1}var x=time*d,w=x-Math.floor(x),z=createTypedArray("float32",a);if(a>1){for(h=0;h<a;h+=1)z[h]=this.pv[h]+g[h]+(-i+i*2*BMMath.random())*w;return z}return this.pv+g[0]+(-i+i*2*BMMath.random())*w}.bind(this);if(thisProperty.loopIn)loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn;if(thisProperty.loopOut)loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut;if(thisProperty.smooth)smooth=thisProperty.smooth.bind(thisProperty);function loopInDuration(o,d){return loopIn(o,d,!0)}function loopOutDuration(o,d){return loopOut(o,d,!0)}if(this.getValueAtTime)valueAtTime=this.getValueAtTime.bind(this);if(this.getVelocityAtTime)velocityAtTime=this.getVelocityAtTime.bind(this);var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(o,d){var i=[d[0]-o[0],d[1]-o[1],d[2]-o[2]],r=Math.atan2(i[0],Math.sqrt(i[1]*i[1]+i[2]*i[2]))/degToRads,h=-Math.atan2(i[1],i[2])/degToRads;return[h,r,0]}function easeOut(o,d,i,r,h){return applyEase(easeOutBez,o,d,i,r,h)}function easeIn(o,d,i,r,h){return applyEase(easeInBez,o,d,i,r,h)}function ease(o,d,i,r,h){return applyEase(easeInOutBez,o,d,i,r,h)}function applyEase(o,d,i,r,h,a){if(h===void 0)h=i,a=r;else d=(d-i)/(r-i);if(d>1)d=1;else if(d<0)d=0;var g=o(d);if($bm_isInstanceOfArray(h)){var l,x=h.length,w=createTypedArray("float32",x);for(l=0;l<x;l+=1)w[l]=(a[l]-h[l])*g+h[l];return w}return(a-h)*g+h}function nearestKey(o){var d,i=data.k.length,r,h;if(!data.k.length||typeof data.k[0]==="number")r=0,h=0;else if(r=-1,o*=elem.comp.globalData.frameRate,o<data.k[0].t)r=1,h=data.k[0].t;else{for(d=0;d<i-1;d+=1)if(o===data.k[d].t){r=d+1,h=data.k[d].t;break}else if(o>data.k[d].t&&o<data.k[d+1].t){if(o-data.k[d].t>data.k[d+1].t-o)r=d+2,h=data.k[d+1].t;else r=d+1,h=data.k[d].t;break}if(r===-1)r=d+1,h=data.k[d].t}var a={};return a.index=r,a.time=h/elem.comp.globalData.frameRate,a}function key(o){var d,i,r;if(!data.k.length||typeof data.k[0]==="number")throw new Error("The property has no keyframe at index "+o);o-=1,d={time:data.k[o].t/elem.comp.globalData.frameRate,value:[]};var h=Object.prototype.hasOwnProperty.call(data.k[o],"s")?data.k[o].s:data.k[o-1].e;r=h.length;for(i=0;i<r;i+=1)d[i]=h[i],d.value[i]=h[i];return d}function framesToTime(o,d){if(!d)d=elem.comp.globalData.frameRate;return o/d}function timeToFrames(o,d){if(!o&&o!==0)o=time;if(!d)d=elem.comp.globalData.frameRate;return o*d}function seedRandom(o){BMMath.seedrandom(randSeed+o)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(o,d){if(typeof value==="string"){if(d===void 0)return value.substring(o);return value.substring(o,d)}return""}function substr(o,d){if(typeof value==="string"){if(d===void 0)return value.substr(o);return value.substr(o,d)}return""}function posterizeTime(o){time=o===0?0:Math.floor(time*o)/o,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),parent,randSeed=Math.floor(Math.random()*1e6),globalData=elem.globalData;function executeExpression(o){if(value=o,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector")return value;if(this.propType==="textSelector")textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue;if(!thisLayer)text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp;if(!transform){if(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform)anchorPoint=transform.anchorPoint}if(elemType===4&&!content)content=thisLayer("ADBE Root Vectors Group");if(!effect)effect=thisLayer(4);if(hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent)parent=elem.hierarchy[0].layerInterface;if(time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom)seedRandom(randSeed+time);if(needsVelocity)velocity=velocityAtTime(time);return expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt,scoped_bm_rt}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var o={};o.initExpressions=d,o.resetFrame=ExpressionManager.resetFrame;function d(i){var r=0,h=[];function a(){r+=1}function g(){if(r-=1,r===0)x()}function l(w){if(h.indexOf(w)===-1)h.push(w)}function x(){var w,z=h.length;for(w=0;w<z;w+=1)h[w].release();h.length=0}i.renderer.compInterface=CompExpressionInterface(i.renderer),i.renderer.globalData.projectInterface.registerComposition(i.renderer),i.renderer.globalData.pushExpression=a,i.renderer.globalData.popExpression=g,i.renderer.globalData.registerExpressionProperty=l}return o}(),MaskManagerInterface=function(){function o(i,r){this._mask=i,this._data=r}Object.defineProperty(o.prototype,"maskPath",{get:function i(){if(this._mask.prop.k)this._mask.prop.getValue();return this._mask.prop}}),Object.defineProperty(o.prototype,"maskOpacity",{get:function i(){if(this._mask.op.k)this._mask.op.getValue();return this._mask.op.v*100}});var d=function i(r){var h=createSizedArray(r.viewData.length),a,g=r.viewData.length;for(a=0;a<g;a+=1)h[a]=new o(r.viewData[a],r.masksProperties[a]);var l=function x(w){a=0;while(a<g){if(r.masksProperties[a].nm===w)return h[a];a+=1}return null};return l};return d}(),ExpressionPropertyInterface=function(){var o={pv:0,v:0,mult:1},d={pv:[0,0,0],v:[0,0,0],mult:1};function i(g,l,x){Object.defineProperty(g,"velocity",{get:function w(){return l.getVelocityAtTime(l.comp.currentFrame)}}),g.numKeys=l.keyframes?l.keyframes.length:0,g.key=function(w){if(!g.numKeys)return 0;var z="";if("s"in l.keyframes[w-1])z=l.keyframes[w-1].s;else if("e"in l.keyframes[w-2])z=l.keyframes[w-2].e;else z=l.keyframes[w-2].s;var _=x==="unidimensional"?new Number(z):Object.assign({},z);return _.time=l.keyframes[w-1].t/l.elem.comp.globalData.frameRate,_.value=x==="unidimensional"?z[0]:z,_},g.valueAtTime=l.getValueAtTime,g.speedAtTime=l.getSpeedAtTime,g.velocityAtTime=l.getVelocityAtTime,g.propertyGroup=l.propertyGroup}function r(g){if(!g||!("pv"in g))g=o;var l=1/g.mult,x=g.pv*l,w=new Number(x);return w.value=x,i(w,g,"unidimensional"),function(){if(g.k)g.getValue();if(x=g.v*l,w.value!==x)w=new Number(x),w.value=x,w[0]=x,i(w,g,"unidimensional");return w}}function h(g){if(!g||!("pv"in g))g=d;var l=1/g.mult,x=g.data&&g.data.l||g.pv.length,w=createTypedArray("float32",x),z=createTypedArray("float32",x);return w.value=z,i(w,g,"multidimensional"),function(){if(g.k)g.getValue();for(var _=0;_<x;_+=1)z[_]=g.v[_]*l,w[_]=z[_];return w}}function a(){return o}return function(g){if(!g)return a;if(g.propType==="unidimensional")return r(g);return h(g)}}(),TransformExpressionInterface=function(){return function(o){function d(g){switch(g){case"scale":case"Scale":case"ADBE Scale":case 6:return d.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return d.rotation;case"ADBE Rotate X":return d.xRotation;case"ADBE Rotate Y":return d.yRotation;case"position":case"Position":case"ADBE Position":case 2:return d.position;case"ADBE Position_0":return d.xPosition;case"ADBE Position_1":return d.yPosition;case"ADBE Position_2":return d.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return d.anchorPoint;case"opacity":case"Opacity":case 11:return d.opacity;default:return null}}Object.defineProperty(d,"rotation",{get:ExpressionPropertyInterface(o.r||o.rz)}),Object.defineProperty(d,"zRotation",{get:ExpressionPropertyInterface(o.rz||o.r)}),Object.defineProperty(d,"xRotation",{get:ExpressionPropertyInterface(o.rx)}),Object.defineProperty(d,"yRotation",{get:ExpressionPropertyInterface(o.ry)}),Object.defineProperty(d,"scale",{get:ExpressionPropertyInterface(o.s)});var i,r,h,a;if(o.p)a=ExpressionPropertyInterface(o.p);else if(i=ExpressionPropertyInterface(o.px),r=ExpressionPropertyInterface(o.py),o.pz)h=ExpressionPropertyInterface(o.pz);return Object.defineProperty(d,"position",{get:function g(){if(o.p)return a();return[i(),r(),h?h():0]}}),Object.defineProperty(d,"xPosition",{get:ExpressionPropertyInterface(o.px)}),Object.defineProperty(d,"yPosition",{get:ExpressionPropertyInterface(o.py)}),Object.defineProperty(d,"zPosition",{get:ExpressionPropertyInterface(o.pz)}),Object.defineProperty(d,"anchorPoint",{get:ExpressionPropertyInterface(o.a)}),Object.defineProperty(d,"opacity",{get:ExpressionPropertyInterface(o.o)}),Object.defineProperty(d,"skew",{get:ExpressionPropertyInterface(o.sk)}),Object.defineProperty(d,"skewAxis",{get:ExpressionPropertyInterface(o.sa)}),Object.defineProperty(d,"orientation",{get:ExpressionPropertyInterface(o.or)}),d}}(),LayerExpressionInterface=function(){function o(w){var z=new Matrix;if(w!==void 0){var _=this._elem.finalTransform.mProp.getValueAtTime(w);_.clone(z)}else{var n=this._elem.finalTransform.mProp;n.applyToMatrix(z)}return z}function d(w,z){var _=this.getMatrix(z);return _.props[12]=0,_.props[13]=0,_.props[14]=0,this.applyPoint(_,w)}function i(w,z){var _=this.getMatrix(z);return this.applyPoint(_,w)}function r(w,z){var _=this.getMatrix(z);return _.props[12]=0,_.props[13]=0,_.props[14]=0,this.invertPoint(_,w)}function h(w,z){var _=this.getMatrix(z);return this.invertPoint(_,w)}function a(w,z){if(this._elem.hierarchy&&this._elem.hierarchy.length){var _,n=this._elem.hierarchy.length;for(_=0;_<n;_+=1)this._elem.hierarchy[_].finalTransform.mProp.applyToMatrix(w)}return w.applyToPointArray(z[0],z[1],z[2]||0)}function g(w,z){if(this._elem.hierarchy&&this._elem.hierarchy.length){var _,n=this._elem.hierarchy.length;for(_=0;_<n;_+=1)this._elem.hierarchy[_].finalTransform.mProp.applyToMatrix(w)}return w.inversePoint(z)}function l(w){var z=new Matrix;if(z.reset(),this._elem.finalTransform.mProp.applyToMatrix(z),this._elem.hierarchy&&this._elem.hierarchy.length){var _,n=this._elem.hierarchy.length;for(_=0;_<n;_+=1)this._elem.hierarchy[_].finalTransform.mProp.applyToMatrix(z);return z.inversePoint(w)}return z.inversePoint(w)}function x(){return[1,1,1,1]}return function(w){var z;function _($){Y.mask=new MaskManagerInterface($,w)}function n($){Y.effect=$}function Y($){switch($){case"ADBE Root Vectors Group":case"Contents":case 2:return Y.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return z;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return Y.effect;case"ADBE Text Properties":return Y.textInterface;default:return null}}Y.getMatrix=o,Y.invertPoint=g,Y.applyPoint=a,Y.toWorld=i,Y.toWorldVec=d,Y.fromWorld=h,Y.fromWorldVec=r,Y.toComp=i,Y.fromComp=l,Y.sampleImage=x,Y.sourceRectAtTime=w.sourceRectAtTime.bind(w),Y._elem=w,z=TransformExpressionInterface(w.finalTransform.mProp);var H=getDescriptor(z,"anchorPoint");return Object.defineProperties(Y,{hasParent:{get:function $(){return w.hierarchy.length}},parent:{get:function $(){return w.hierarchy[0].layerInterface}},rotation:getDescriptor(z,"rotation"),scale:getDescriptor(z,"scale"),position:getDescriptor(z,"position"),opacity:getDescriptor(z,"opacity"),anchorPoint:H,anchor_point:H,transform:{get:function $(){return z}},active:{get:function $(){return w.isInRange}}}),Y.startTime=w.data.st,Y.index=w.data.ind,Y.source=w.data.refId,Y.height=w.data.ty===0?w.data.h:100,Y.width=w.data.ty===0?w.data.w:100,Y.inPoint=w.data.ip/w.comp.globalData.frameRate,Y.outPoint=w.data.op/w.comp.globalData.frameRate,Y._name=w.data.nm,Y.registerMaskInterface=_,Y.registerEffectsInterface=n,Y}}(),propertyGroupFactory=function(){return function(o,d){return function(i){if(i=i===void 0?1:i,i<=0)return o;return d(i-1)}}}(),PropertyInterface=function(){return function(o,d){var i={_name:o};function r(h){if(h=h===void 0?1:h,h<=0)return i;return d(h-1)}return r}}(),EffectsExpressionInterface=function(){var o={createEffectsInterface:d};function d(h,a){if(h.effectsManager){var g=[],l=h.data.ef,x,w=h.effectsManager.effectElements.length;for(x=0;x<w;x+=1)g.push(i(l[x],h.effectsManager.effectElements[x],a,h));var z=h.data.ef||[],_=function n(Y){x=0,w=z.length;while(x<w){if(Y===z[x].nm||Y===z[x].mn||Y===z[x].ix)return g[x];x+=1}return null};return Object.defineProperty(_,"numProperties",{get:function n(){return z.length}}),_}return null}function i(h,a,g,l){function x(Y){var H=h.ef,$=0,I=H.length;while($<I){if(Y===H[$].nm||Y===H[$].mn||Y===H[$].ix){if(H[$].ty===5)return z[$];return z[$]()}$+=1}throw new Error}var w=propertyGroupFactory(x,g),z=[],_,n=h.ef.length;for(_=0;_<n;_+=1)if(h.ef[_].ty===5)z.push(i(h.ef[_],a.effectElements[_],a.effectElements[_].propertyGroup,l));else z.push(r(a.effectElements[_],h.ef[_].ty,l,w));if(h.mn==="ADBE Color Control")Object.defineProperty(x,"color",{get:function Y(){return z[0]()}});return Object.defineProperties(x,{numProperties:{get:function Y(){return h.np}},_name:{value:h.nm},propertyGroup:{value:w}}),x.enabled=h.en!==0,x.active=x.enabled,x}function r(h,a,g,l){var x=ExpressionPropertyInterface(h.p);function w(){if(a===10)return g.comp.compInterface(h.p.v);return x()}if(h.p.setGroupProperty)h.p.setGroupProperty(PropertyInterface("",l));return w}return o}(),ShapePathInterface=function(){return function o(d,i,r){var h=i.sh;function a(l){if(l==="Shape"||l==="shape"||l==="Path"||l==="path"||l==="ADBE Vector Shape"||l===2)return a.path;return null}var g=propertyGroupFactory(a,r);return h.setGroupProperty(PropertyInterface("Path",g)),Object.defineProperties(a,{path:{get:function l(){if(h.k)h.getValue();return h}},shape:{get:function l(){if(h.k)h.getValue();return h}},_name:{value:d.nm},ix:{value:d.ix},propertyIndex:{value:d.ix},mn:{value:d.mn},propertyGroup:{value:r}}),a}}(),ShapeExpressionInterface=function(){function o(H,$,I){var Z=[],c,v=H?H.length:0;for(c=0;c<v;c+=1)if(H[c].ty==="gr")Z.push(i(H[c],$[c],I));else if(H[c].ty==="fl")Z.push(r(H[c],$[c],I));else if(H[c].ty==="st")Z.push(g(H[c],$[c],I));else if(H[c].ty==="tm")Z.push(l(H[c],$[c],I));else if(H[c].ty==="tr");else if(H[c].ty==="el")Z.push(w(H[c],$[c],I));else if(H[c].ty==="sr")Z.push(z(H[c],$[c],I));else if(H[c].ty==="sh")Z.push(ShapePathInterface(H[c],$[c],I));else if(H[c].ty==="rc")Z.push(_(H[c],$[c],I));else if(H[c].ty==="rd")Z.push(n(H[c],$[c],I));else if(H[c].ty==="rp")Z.push(Y(H[c],$[c],I));else if(H[c].ty==="gf")Z.push(h(H[c],$[c],I));else Z.push(a(H[c],$[c],I));return Z}function d(H,$,I){var Z,c=function k(X){var V=0,u=Z.length;while(V<u){if(Z[V]._name===X||Z[V].mn===X||Z[V].propertyIndex===X||Z[V].ix===X||Z[V].ind===X)return Z[V];V+=1}if(typeof X==="number")return Z[X-1];return null};c.propertyGroup=propertyGroupFactory(c,I),Z=o(H.it,$.it,c.propertyGroup),c.numProperties=Z.length;var v=x(H.it[H.it.length-1],$.it[$.it.length-1],c.propertyGroup);return c.transform=v,c.propertyIndex=H.cix,c._name=H.nm,c}function i(H,$,I){var Z=function k(X){switch(X){case"ADBE Vectors Group":case"Contents":case 2:return Z.content;default:return Z.transform}};Z.propertyGroup=propertyGroupFactory(Z,I);var c=d(H,$,Z.propertyGroup),v=x(H.it[H.it.length-1],$.it[$.it.length-1],Z.propertyGroup);return Z.content=c,Z.transform=v,Object.defineProperty(Z,"_name",{get:function k(){return H.nm}}),Z.numProperties=H.np,Z.propertyIndex=H.ix,Z.nm=H.nm,Z.mn=H.mn,Z}function r(H,$,I){function Z(c){if(c==="Color"||c==="color")return Z.color;if(c==="Opacity"||c==="opacity")return Z.opacity;return null}return Object.defineProperties(Z,{color:{get:ExpressionPropertyInterface($.c)},opacity:{get:ExpressionPropertyInterface($.o)},_name:{value:H.nm},mn:{value:H.mn}}),$.c.setGroupProperty(PropertyInterface("Color",I)),$.o.setGroupProperty(PropertyInterface("Opacity",I)),Z}function h(H,$,I){function Z(c){if(c==="Start Point"||c==="start point")return Z.startPoint;if(c==="End Point"||c==="end point")return Z.endPoint;if(c==="Opacity"||c==="opacity")return Z.opacity;return null}return Object.defineProperties(Z,{startPoint:{get:ExpressionPropertyInterface($.s)},endPoint:{get:ExpressionPropertyInterface($.e)},opacity:{get:ExpressionPropertyInterface($.o)},type:{get:function c(){return"a"}},_name:{value:H.nm},mn:{value:H.mn}}),$.s.setGroupProperty(PropertyInterface("Start Point",I)),$.e.setGroupProperty(PropertyInterface("End Point",I)),$.o.setGroupProperty(PropertyInterface("Opacity",I)),Z}function a(){function H(){return null}return H}function g(H,$,I){var Z=propertyGroupFactory(u,I),c=propertyGroupFactory(V,Z);function v(p){Object.defineProperty(V,H.d[p].nm,{get:ExpressionPropertyInterface($.d.dataProps[p].p)})}var k,X=H.d?H.d.length:0,V={};for(k=0;k<X;k+=1)v(k),$.d.dataProps[k].p.setGroupProperty(c);function u(p){if(p==="Color"||p==="color")return u.color;if(p==="Opacity"||p==="opacity")return u.opacity;if(p==="Stroke Width"||p==="stroke width")return u.strokeWidth;return null}return Object.defineProperties(u,{color:{get:ExpressionPropertyInterface($.c)},opacity:{get:ExpressionPropertyInterface($.o)},strokeWidth:{get:ExpressionPropertyInterface($.w)},dash:{get:function p(){return V}},_name:{value:H.nm},mn:{value:H.mn}}),$.c.setGroupProperty(PropertyInterface("Color",Z)),$.o.setGroupProperty(PropertyInterface("Opacity",Z)),$.w.setGroupProperty(PropertyInterface("Stroke Width",Z)),u}function l(H,$,I){function Z(v){if(v===H.e.ix||v==="End"||v==="end")return Z.end;if(v===H.s.ix)return Z.start;if(v===H.o.ix)return Z.offset;return null}var c=propertyGroupFactory(Z,I);return Z.propertyIndex=H.ix,$.s.setGroupProperty(PropertyInterface("Start",c)),$.e.setGroupProperty(PropertyInterface("End",c)),$.o.setGroupProperty(PropertyInterface("Offset",c)),Z.propertyIndex=H.ix,Z.propertyGroup=I,Object.defineProperties(Z,{start:{get:ExpressionPropertyInterface($.s)},end:{get:ExpressionPropertyInterface($.e)},offset:{get:ExpressionPropertyInterface($.o)},_name:{value:H.nm}}),Z.mn=H.mn,Z}function x(H,$,I){function Z(v){if(H.a.ix===v||v==="Anchor Point")return Z.anchorPoint;if(H.o.ix===v||v==="Opacity")return Z.opacity;if(H.p.ix===v||v==="Position")return Z.position;if(H.r.ix===v||v==="Rotation"||v==="ADBE Vector Rotation")return Z.rotation;if(H.s.ix===v||v==="Scale")return Z.scale;if(H.sk&&H.sk.ix===v||v==="Skew")return Z.skew;if(H.sa&&H.sa.ix===v||v==="Skew Axis")return Z.skewAxis;return null}var c=propertyGroupFactory(Z,I);if($.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",c)),$.transform.mProps.p.setGroupProperty(PropertyInterface("Position",c)),$.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",c)),$.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",c)),$.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",c)),$.transform.mProps.sk)$.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",c)),$.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",c));return $.transform.op.setGroupProperty(PropertyInterface("Opacity",c)),Object.defineProperties(Z,{opacity:{get:ExpressionPropertyInterface($.transform.mProps.o)},position:{get:ExpressionPropertyInterface($.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface($.transform.mProps.a)},scale:{get:ExpressionPropertyInterface($.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface($.transform.mProps.r)},skew:{get:ExpressionPropertyInterface($.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface($.transform.mProps.sa)},_name:{value:H.nm}}),Z.ty="tr",Z.mn=H.mn,Z.propertyGroup=I,Z}function w(H,$,I){function Z(k){if(H.p.ix===k)return Z.position;if(H.s.ix===k)return Z.size;return null}var c=propertyGroupFactory(Z,I);Z.propertyIndex=H.ix;var v=$.sh.ty==="tm"?$.sh.prop:$.sh;return v.s.setGroupProperty(PropertyInterface("Size",c)),v.p.setGroupProperty(PropertyInterface("Position",c)),Object.defineProperties(Z,{size:{get:ExpressionPropertyInterface(v.s)},position:{get:ExpressionPropertyInterface(v.p)},_name:{value:H.nm}}),Z.mn=H.mn,Z}function z(H,$,I){function Z(k){if(H.p.ix===k)return Z.position;if(H.r.ix===k)return Z.rotation;if(H.pt.ix===k)return Z.points;if(H.or.ix===k||k==="ADBE Vector Star Outer Radius")return Z.outerRadius;if(H.os.ix===k)return Z.outerRoundness;if(H.ir&&(H.ir.ix===k||k==="ADBE Vector Star Inner Radius"))return Z.innerRadius;if(H.is&&H.is.ix===k)return Z.innerRoundness;return null}var c=propertyGroupFactory(Z,I),v=$.sh.ty==="tm"?$.sh.prop:$.sh;if(Z.propertyIndex=H.ix,v.or.setGroupProperty(PropertyInterface("Outer Radius",c)),v.os.setGroupProperty(PropertyInterface("Outer Roundness",c)),v.pt.setGroupProperty(PropertyInterface("Points",c)),v.p.setGroupProperty(PropertyInterface("Position",c)),v.r.setGroupProperty(PropertyInterface("Rotation",c)),H.ir)v.ir.setGroupProperty(PropertyInterface("Inner Radius",c)),v.is.setGroupProperty(PropertyInterface("Inner Roundness",c));return Object.defineProperties(Z,{position:{get:ExpressionPropertyInterface(v.p)},rotation:{get:ExpressionPropertyInterface(v.r)},points:{get:ExpressionPropertyInterface(v.pt)},outerRadius:{get:ExpressionPropertyInterface(v.or)},outerRoundness:{get:ExpressionPropertyInterface(v.os)},innerRadius:{get:ExpressionPropertyInterface(v.ir)},innerRoundness:{get:ExpressionPropertyInterface(v.is)},_name:{value:H.nm}}),Z.mn=H.mn,Z}function _(H,$,I){function Z(k){if(H.p.ix===k)return Z.position;if(H.r.ix===k)return Z.roundness;if(H.s.ix===k||k==="Size"||k==="ADBE Vector Rect Size")return Z.size;return null}var c=propertyGroupFactory(Z,I),v=$.sh.ty==="tm"?$.sh.prop:$.sh;return Z.propertyIndex=H.ix,v.p.setGroupProperty(PropertyInterface("Position",c)),v.s.setGroupProperty(PropertyInterface("Size",c)),v.r.setGroupProperty(PropertyInterface("Rotation",c)),Object.defineProperties(Z,{position:{get:ExpressionPropertyInterface(v.p)},roundness:{get:ExpressionPropertyInterface(v.r)},size:{get:ExpressionPropertyInterface(v.s)},_name:{value:H.nm}}),Z.mn=H.mn,Z}function n(H,$,I){function Z(k){if(H.r.ix===k||k==="Round Corners 1")return Z.radius;return null}var c=propertyGroupFactory(Z,I),v=$;return Z.propertyIndex=H.ix,v.rd.setGroupProperty(PropertyInterface("Radius",c)),Object.defineProperties(Z,{radius:{get:ExpressionPropertyInterface(v.rd)},_name:{value:H.nm}}),Z.mn=H.mn,Z}function Y(H,$,I){function Z(k){if(H.c.ix===k||k==="Copies")return Z.copies;if(H.o.ix===k||k==="Offset")return Z.offset;return null}var c=propertyGroupFactory(Z,I),v=$;return Z.propertyIndex=H.ix,v.c.setGroupProperty(PropertyInterface("Copies",c)),v.o.setGroupProperty(PropertyInterface("Offset",c)),Object.defineProperties(Z,{copies:{get:ExpressionPropertyInterface(v.c)},offset:{get:ExpressionPropertyInterface(v.o)},_name:{value:H.nm}}),Z.mn=H.mn,Z}return function(H,$,I){var Z;function c(k){if(typeof k==="number"){if(k=k===void 0?1:k,k===0)return I;return Z[k-1]}var X=0,V=Z.length;while(X<V){if(Z[X]._name===k)return Z[X];X+=1}return null}function v(){return I}return c.propertyGroup=propertyGroupFactory(c,v),Z=o(H,$,c.propertyGroup),c.numProperties=Z.length,c._name="Contents",c}}(),TextExpressionInterface=function(){return function(o){var d;function i(r){switch(r){case"ADBE Text Document":return i.sourceText;default:return null}}return Object.defineProperty(i,"sourceText",{get:function r(){o.textProperty.getValue();var h=o.textProperty.currentData.t;if(!d||h!==d.value)d=new String(h),d.value=h||new String(h),Object.defineProperty(d,"style",{get:function a(){return{fillColor:o.textProperty.currentData.fc}}});return d}}),i}}();function _typeof(o){return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof(o)}var FootageInterface=function(){var o=function i(r){var h="",a=r.getFootageData();function g(){return h="",a=r.getFootageData(),l}function l(x){if(a[x]){if(h=x,a=a[x],_typeof(a)==="object")return l;return a}var w=x.indexOf(h);if(w!==-1){var z=parseInt(x.substr(w+h.length),10);if(a=a[z],_typeof(a)==="object")return l;return a}return""}return g},d=function i(r){function h(a){if(a==="Outline")return h.outlineInterface();return null}return h._name="Outline",h.outlineInterface=o(r),h};return function(i){function r(h){if(h==="Data")return r.dataInterface;return null}return r._name="Data",r.dataInterface=d(i),r}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(o){return interfaces[o]||null}var expressionHelpers=function(){function o(g,l,x){if(l.x)x.k=!0,x.x=!0,x.initiateExpression=ExpressionManager.initiateExpression,x.effectsSequence.push(x.initiateExpression(g,l,x).bind(x))}function d(g){if(g*=this.elem.globalData.frameRate,g-=this.offsetTime,g!==this._cachingAtTime.lastFrame)this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<g?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(g,this._cachingAtTime),this._cachingAtTime.lastFrame=g;return this._cachingAtTime.value}function i(g){var l=-0.01,x=this.getValueAtTime(g),w=this.getValueAtTime(g+l),z=0;if(x.length){var _;for(_=0;_<x.length;_+=1)z+=Math.pow(w[_]-x[_],2);z=Math.sqrt(z)*100}else z=0;return z}function r(g){if(this.vel!==void 0)return this.vel;var l=-0.001,x=this.getValueAtTime(g),w=this.getValueAtTime(g+l),z;if(x.length){z=createTypedArray("float32",x.length);var _;for(_=0;_<x.length;_+=1)z[_]=(w[_]-x[_])/l}else z=(w-x)/l;return z}function h(){return this.pv}function a(g){this.propertyGroup=g}return{searchExpressions:o,getSpeedAtTime:i,getVelocityAtTime:r,getValueAtTime:d,getStaticValueAtTime:h,setGroupProperty:a}}();function addPropertyDecorator(){function o(n,Y,H){if(!this.k||!this.keyframes)return this.pv;n=n?n.toLowerCase():"";var $=this.comp.renderedFrame,I=this.keyframes,Z=I[I.length-1].t;if($<=Z)return this.pv;var c,v;if(!H){if(!Y||Y>I.length-1)Y=I.length-1;v=I[I.length-1-Y].t,c=Z-v}else{if(!Y)c=Math.max(0,Z-this.elem.data.ip);else c=Math.abs(Z-this.elem.comp.globalData.frameRate*Y);v=Z-c}var k,X,V;if(n==="pingpong"){var u=Math.floor(($-v)/c);if(u%2!==0)return this.getValueAtTime((c-($-v)%c+v)/this.comp.globalData.frameRate,0)}else if(n==="offset"){var p=this.getValueAtTime(v/this.comp.globalData.frameRate,0),U=this.getValueAtTime(Z/this.comp.globalData.frameRate,0),F=this.getValueAtTime((($-v)%c+v)/this.comp.globalData.frameRate,0),L=Math.floor(($-v)/c);if(this.pv.length){V=new Array(p.length),X=V.length;for(k=0;k<X;k+=1)V[k]=(U[k]-p[k])*L+F[k];return V}return(U-p)*L+F}else if(n==="continue"){var j=this.getValueAtTime(Z/this.comp.globalData.frameRate,0),C=this.getValueAtTime((Z-0.001)/this.comp.globalData.frameRate,0);if(this.pv.length){V=new Array(j.length),X=V.length;for(k=0;k<X;k+=1)V[k]=j[k]+(j[k]-C[k])*(($-Z)/this.comp.globalData.frameRate)/0.0005;return V}return j+(j-C)*(($-Z)/0.001)}return this.getValueAtTime((($-v)%c+v)/this.comp.globalData.frameRate,0)}function d(n,Y,H){if(!this.k)return this.pv;n=n?n.toLowerCase():"";var $=this.comp.renderedFrame,I=this.keyframes,Z=I[0].t;if($>=Z)return this.pv;var c,v;if(!H){if(!Y||Y>I.length-1)Y=I.length-1;v=I[Y].t,c=v-Z}else{if(!Y)c=Math.max(0,this.elem.data.op-Z);else c=Math.abs(this.elem.comp.globalData.frameRate*Y);v=Z+c}var k,X,V;if(n==="pingpong"){var u=Math.floor((Z-$)/c);if(u%2===0)return this.getValueAtTime(((Z-$)%c+Z)/this.comp.globalData.frameRate,0)}else if(n==="offset"){var p=this.getValueAtTime(Z/this.comp.globalData.frameRate,0),U=this.getValueAtTime(v/this.comp.globalData.frameRate,0),F=this.getValueAtTime((c-(Z-$)%c+Z)/this.comp.globalData.frameRate,0),L=Math.floor((Z-$)/c)+1;if(this.pv.length){V=new Array(p.length),X=V.length;for(k=0;k<X;k+=1)V[k]=F[k]-(U[k]-p[k])*L;return V}return F-(U-p)*L}else if(n==="continue"){var j=this.getValueAtTime(Z/this.comp.globalData.frameRate,0),C=this.getValueAtTime((Z+0.001)/this.comp.globalData.frameRate,0);if(this.pv.length){V=new Array(j.length),X=V.length;for(k=0;k<X;k+=1)V[k]=j[k]+(j[k]-C[k])*(Z-$)/0.001;return V}return j+(j-C)*(Z-$)/0.001}return this.getValueAtTime((c-((Z-$)%c+Z))/this.comp.globalData.frameRate,0)}function i(n,Y){if(!this.k)return this.pv;if(n=(n||0.4)*0.5,Y=Math.floor(Y||5),Y<=1)return this.pv;var H=this.comp.renderedFrame/this.comp.globalData.frameRate,$=H-n,I=H+n,Z=Y>1?(I-$)/(Y-1):1,c=0,v=0,k;if(this.pv.length)k=createTypedArray("float32",this.pv.length);else k=0;var X;while(c<Y){if(X=this.getValueAtTime($+c*Z),this.pv.length)for(v=0;v<this.pv.length;v+=1)k[v]+=X[v];else k+=X;c+=1}if(this.pv.length)for(v=0;v<this.pv.length;v+=1)k[v]/=Y;else k/=Y;return k}function r(n){if(!this._transformCachingAtTime)this._transformCachingAtTime={v:new Matrix};var Y=this._transformCachingAtTime.v;if(Y.cloneFromProps(this.pre.props),this.appliedTransformations<1){var H=this.a.getValueAtTime(n);Y.translate(-H[0]*this.a.mult,-H[1]*this.a.mult,H[2]*this.a.mult)}if(this.appliedTransformations<2){var $=this.s.getValueAtTime(n);Y.scale($[0]*this.s.mult,$[1]*this.s.mult,$[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var I=this.sk.getValueAtTime(n),Z=this.sa.getValueAtTime(n);Y.skewFromAxis(-I*this.sk.mult,Z*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var c=this.r.getValueAtTime(n);Y.rotate(-c*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var v=this.rz.getValueAtTime(n),k=this.ry.getValueAtTime(n),X=this.rx.getValueAtTime(n),V=this.or.getValueAtTime(n);Y.rotateZ(-v*this.rz.mult).rotateY(k*this.ry.mult).rotateX(X*this.rx.mult).rotateZ(-V[2]*this.or.mult).rotateY(V[1]*this.or.mult).rotateX(V[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var u=this.px.getValueAtTime(n),p=this.py.getValueAtTime(n);if(this.data.p.z){var U=this.pz.getValueAtTime(n);Y.translate(u*this.px.mult,p*this.py.mult,-U*this.pz.mult)}else Y.translate(u*this.px.mult,p*this.py.mult,0)}else{var F=this.p.getValueAtTime(n);Y.translate(F[0]*this.p.mult,F[1]*this.p.mult,-F[2]*this.p.mult)}return Y}function h(){return this.v.clone(new Matrix)}var a=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(n,Y,H){var $=a(n,Y,H);if($.dynamicProperties.length)$.getValueAtTime=r.bind($);else $.getValueAtTime=h.bind($);return $.setGroupProperty=expressionHelpers.setGroupProperty,$};var g=PropertyFactory.getProp;PropertyFactory.getProp=function(n,Y,H,$,I){var Z=g(n,Y,H,$,I);if(Z.kf)Z.getValueAtTime=expressionHelpers.getValueAtTime.bind(Z);else Z.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(Z);Z.setGroupProperty=expressionHelpers.setGroupProperty,Z.loopOut=o,Z.loopIn=d,Z.smooth=i,Z.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(Z),Z.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(Z),Z.numKeys=Y.a===1?Y.k.length:0,Z.propertyIndex=Y.ix;var c=0;if(H!==0)c=createTypedArray("float32",Y.a===1?Y.k[0].s.length:Y.k.length);if(Z._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:c},expressionHelpers.searchExpressions(n,Y,Z),Z.k)I.addDynamicProperty(Z);return Z};function l(n){if(!this._cachingAtTime)this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame};if(n*=this.elem.globalData.frameRate,n-=this.offsetTime,n!==this._cachingAtTime.lastTime)this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<n?this._caching.lastIndex:0,this._cachingAtTime.lastTime=n,this.interpolateShape(n,this._cachingAtTime.shapeValue,this._cachingAtTime);return this._cachingAtTime.shapeValue}var x=ShapePropertyFactory.getConstructorFunction(),w=ShapePropertyFactory.getKeyframedConstructorFunction();function z(){}z.prototype={vertices:function n(Y,H){if(this.k)this.getValue();var $=this.v;if(H!==void 0)$=this.getValueAtTime(H,0);var I,Z=$._length,c=$[Y],v=$.v,k=createSizedArray(Z);for(I=0;I<Z;I+=1)if(Y==="i"||Y==="o")k[I]=[c[I][0]-v[I][0],c[I][1]-v[I][1]];else k[I]=[c[I][0],c[I][1]];return k},points:function n(Y){return this.vertices("v",Y)},inTangents:function n(Y){return this.vertices("i",Y)},outTangents:function n(Y){return this.vertices("o",Y)},isClosed:function n(){return this.v.c},pointOnPath:function n(Y,H){var $=this.v;if(H!==void 0)$=this.getValueAtTime(H,0);if(!this._segmentsLength)this._segmentsLength=bez.getSegmentsLength($);var I=this._segmentsLength,Z=I.lengths,c=I.totalLength*Y,v=0,k=Z.length,X=0,V;while(v<k){if(X+Z[v].addedLength>c){var u=v,p=$.c&&v===k-1?0:v+1,U=(c-X)/Z[v].addedLength;V=bez.getPointInSegment($.v[u],$.v[p],$.o[u],$.i[p],U,Z[v]);break}else X+=Z[v].addedLength;v+=1}if(!V)V=$.c?[$.v[0][0],$.v[0][1]]:[$.v[$._length-1][0],$.v[$._length-1][1]];return V},vectorOnPath:function n(Y,H,$){if(Y==1)Y=this.v.c;else if(Y==0)Y=0.999;var I=this.pointOnPath(Y,H),Z=this.pointOnPath(Y+0.001,H),c=Z[0]-I[0],v=Z[1]-I[1],k=Math.sqrt(Math.pow(c,2)+Math.pow(v,2));if(k===0)return[0,0];var X=$==="tangent"?[c/k,v/k]:[-v/k,c/k];return X},tangentOnPath:function n(Y,H){return this.vectorOnPath(Y,H,"tangent")},normalOnPath:function n(Y,H){return this.vectorOnPath(Y,H,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([z],x),extendPrototype([z],w),w.prototype.getValueAtTime=l,w.prototype.initiateExpression=ExpressionManager.initiateExpression;var _=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(n,Y,H,$,I){var Z=_(n,Y,H,$,I);if(Z.propertyIndex=Y.ix,Z.lock=!1,H===3)expressionHelpers.searchExpressions(n,Y.pt,Z);else if(H===4)expressionHelpers.searchExpressions(n,Y.ks,Z);if(Z.k)n.addDynamicProperty(Z);return Z}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function o(){if(this.data.d.x)return this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0;return null}TextProperty.prototype.getExpressionValue=function(d,i){var r=this.calculateExpression(i);if(d.t!==r){var h={};return this.copyData(h,d),h.t=r.toString(),h.__complete=!1,h}return d},TextProperty.prototype.searchProperty=function(){var d=this.searchKeyframes(),i=this.searchExpressions();return this.kf=d||i,this.kf},TextProperty.prototype.searchExpressions=o}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function o(d,i){var r=createNS("feMerge");r.setAttribute("result",d);var h,a;for(a=0;a<i.length;a+=1)h=createNS("feMergeNode"),h.setAttribute("in",i[a]),r.appendChild(h),r.appendChild(h);return r}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(o,d,i,r,h){this.filterManager=d;var a=createNS("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","linearRGB"),a.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=a,a.setAttribute("result",r+"_tint_1"),o.appendChild(a),a=createNS("feColorMatrix"),a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),a.setAttribute("result",r+"_tint_2"),o.appendChild(a),this.matrixFilter=a;var g=this.createMergeNode(r,[h,r+"_tint_1",r+"_tint_2"]);o.appendChild(g)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var d=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+r+" 0"),this.matrixFilter.setAttribute("values",i[0]-d[0]+" 0 0 0 "+d[0]+" "+(i[1]-d[1])+" 0 0 0 "+d[1]+" "+(i[2]-d[2])+" 0 0 0 "+d[2]+" 0 0 0 1 0")}};function SVGFillFilter(o,d,i,r){this.filterManager=d;var h=createNS("feColorMatrix");h.setAttribute("type","matrix"),h.setAttribute("color-interpolation-filters","sRGB"),h.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),h.setAttribute("result",r),o.appendChild(h),this.matrixFilter=h}SVGFillFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var d=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+d[0]+" 0 0 0 0 "+d[1]+" 0 0 0 0 "+d[2]+" 0 0 0 "+i+" 0")}};function SVGStrokeEffect(o,d,i){this.initialized=!1,this.filterManager=d,this.elem=i,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var o=this.elem.layerElement.children||this.elem.layerElement.childNodes,d,i,r,h;if(this.filterManager.effectElements[1].p.v===1)h=this.elem.maskManager.masksProperties.length,r=0;else r=this.filterManager.effectElements[0].p.v-1,h=r+1;i=createNS("g"),i.setAttribute("fill","none"),i.setAttribute("stroke-linecap","round"),i.setAttribute("stroke-dashoffset",1);for(r;r<h;r+=1)d=createNS("path"),i.appendChild(d),this.paths.push({p:d,m:r});if(this.filterManager.effectElements[10].p.v===3){var a=createNS("mask"),g=createElementID();a.setAttribute("id",g),a.setAttribute("mask-type","alpha"),a.appendChild(i),this.elem.globalData.defs.appendChild(a);var l=createNS("g");l.setAttribute("mask","url("+getLocationHref()+"#"+g+")");while(o[0])l.appendChild(o[0]);this.elem.layerElement.appendChild(l),this.masker=a,i.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2){o=this.elem.layerElement.children||this.elem.layerElement.childNodes;while(o.length)this.elem.layerElement.removeChild(o[0])}this.elem.layerElement.appendChild(i),this.elem.layerElement.removeAttribute("mask"),i.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=i},SVGStrokeEffect.prototype.renderFrame=function(o){if(!this.initialized)this.initialize();var d,i=this.paths.length,r,h;for(d=0;d<i;d+=1)if(this.paths[d].m!==-1){if(r=this.elem.maskManager.viewData[this.paths[d].m],h=this.paths[d].p,o||this.filterManager._mdf||r.prop._mdf)h.setAttribute("d",r.lastPath);if(o||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf){var a;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var g=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*0.01,l=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*0.01,x=h.getTotalLength();a="0 0 0 "+x*g+" ";var w=x*(l-g),z=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*0.01,_=Math.floor(w/z),n;for(n=0;n<_;n+=1)a+="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*0.01+" ";a+="0 "+x*10+" 0 0"}else a="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*0.01;h.setAttribute("stroke-dasharray",a)}}if(o||this.filterManager.effectElements[4].p._mdf)this.pathMasker.setAttribute("stroke-width",this.filterManager.effectElements[4].p.v*2);if(o||this.filterManager.effectElements[6].p._mdf)this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v);if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(o||this.filterManager.effectElements[3].p._mdf){var Y=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(Y[0]*255)+","+bmFloor(Y[1]*255)+","+bmFloor(Y[2]*255)+")")}}};function SVGTritoneFilter(o,d,i,r){this.filterManager=d;var h=createNS("feColorMatrix");h.setAttribute("type","matrix"),h.setAttribute("color-interpolation-filters","linearRGB"),h.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),o.appendChild(h);var a=createNS("feComponentTransfer");a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",r),this.matrixFilter=a;var g=createNS("feFuncR");g.setAttribute("type","table"),a.appendChild(g),this.feFuncR=g;var l=createNS("feFuncG");l.setAttribute("type","table"),a.appendChild(l),this.feFuncG=l;var x=createNS("feFuncB");x.setAttribute("type","table"),a.appendChild(x),this.feFuncB=x,o.appendChild(a)}SVGTritoneFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var d=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v,h=r[0]+" "+i[0]+" "+d[0],a=r[1]+" "+i[1]+" "+d[1],g=r[2]+" "+i[2]+" "+d[2];this.feFuncR.setAttribute("tableValues",h),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",g)}};function SVGProLevelsFilter(o,d,i,r){this.filterManager=d;var h=this.filterManager.effectElements,a=createNS("feComponentTransfer");if(h[10].p.k||h[10].p.v!==0||h[11].p.k||h[11].p.v!==1||h[12].p.k||h[12].p.v!==1||h[13].p.k||h[13].p.v!==0||h[14].p.k||h[14].p.v!==1)this.feFuncR=this.createFeFunc("feFuncR",a);if(h[17].p.k||h[17].p.v!==0||h[18].p.k||h[18].p.v!==1||h[19].p.k||h[19].p.v!==1||h[20].p.k||h[20].p.v!==0||h[21].p.k||h[21].p.v!==1)this.feFuncG=this.createFeFunc("feFuncG",a);if(h[24].p.k||h[24].p.v!==0||h[25].p.k||h[25].p.v!==1||h[26].p.k||h[26].p.v!==1||h[27].p.k||h[27].p.v!==0||h[28].p.k||h[28].p.v!==1)this.feFuncB=this.createFeFunc("feFuncB",a);if(h[31].p.k||h[31].p.v!==0||h[32].p.k||h[32].p.v!==1||h[33].p.k||h[33].p.v!==1||h[34].p.k||h[34].p.v!==0||h[35].p.k||h[35].p.v!==1)this.feFuncA=this.createFeFunc("feFuncA",a);if(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)a.setAttribute("color-interpolation-filters","sRGB"),o.appendChild(a);if(h[3].p.k||h[3].p.v!==0||h[4].p.k||h[4].p.v!==1||h[5].p.k||h[5].p.v!==1||h[6].p.k||h[6].p.v!==0||h[7].p.k||h[7].p.v!==1)a=createNS("feComponentTransfer"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",r),o.appendChild(a),this.feFuncRComposed=this.createFeFunc("feFuncR",a),this.feFuncGComposed=this.createFeFunc("feFuncG",a),this.feFuncBComposed=this.createFeFunc("feFuncB",a)}SVGProLevelsFilter.prototype.createFeFunc=function(o,d){var i=createNS(o);return i.setAttribute("type","table"),d.appendChild(i),i},SVGProLevelsFilter.prototype.getTableValue=function(o,d,i,r,h){var a=0,g=256,l,x=Math.min(o,d),w=Math.max(o,d),z=Array.call(null,{length:g}),_,n=0,Y=h-r,H=d-o;while(a<=256){if(l=a/256,l<=x)_=H<0?h:r;else if(l>=w)_=H<0?r:h;else _=r+Y*Math.pow((l-o)/H,1/i);z[n]=_,n+=1,a+=256/(g-1)}return z.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var d,i=this.filterManager.effectElements;if(this.feFuncRComposed&&(o||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf))d=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",d),this.feFuncGComposed.setAttribute("tableValues",d),this.feFuncBComposed.setAttribute("tableValues",d);if(this.feFuncR&&(o||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf))d=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",d);if(this.feFuncG&&(o||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf))d=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",d);if(this.feFuncB&&(o||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf))d=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",d);if(this.feFuncA&&(o||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf))d=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",d)}};function SVGDropShadowEffect(o,d,i,r,h){var a=d.container.globalData.renderConfig.filterSize,g=d.data.fs||a;o.setAttribute("x",g.x||a.x),o.setAttribute("y",g.y||a.y),o.setAttribute("width",g.width||a.width),o.setAttribute("height",g.height||a.height),this.filterManager=d;var l=createNS("feGaussianBlur");l.setAttribute("in","SourceAlpha"),l.setAttribute("result",r+"_drop_shadow_1"),l.setAttribute("stdDeviation","0"),this.feGaussianBlur=l,o.appendChild(l);var x=createNS("feOffset");x.setAttribute("dx","25"),x.setAttribute("dy","0"),x.setAttribute("in",r+"_drop_shadow_1"),x.setAttribute("result",r+"_drop_shadow_2"),this.feOffset=x,o.appendChild(x);var w=createNS("feFlood");w.setAttribute("flood-color","#00ff00"),w.setAttribute("flood-opacity","1"),w.setAttribute("result",r+"_drop_shadow_3"),this.feFlood=w,o.appendChild(w);var z=createNS("feComposite");z.setAttribute("in",r+"_drop_shadow_3"),z.setAttribute("in2",r+"_drop_shadow_2"),z.setAttribute("operator","in"),z.setAttribute("result",r+"_drop_shadow_4"),o.appendChild(z);var _=this.createMergeNode(r,[r+"_drop_shadow_4",h]);o.appendChild(_)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){if(o||this.filterManager.effectElements[4].p._mdf)this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4);if(o||this.filterManager.effectElements[0].p._mdf){var d=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(d[0]*255),Math.round(d[1]*255),Math.round(d[2]*255)))}if(o||this.filterManager.effectElements[1].p._mdf)this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255);if(o||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,r=(this.filterManager.effectElements[2].p.v-90)*degToRads,h=i*Math.cos(r),a=i*Math.sin(r);this.feOffset.setAttribute("dx",h),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(o,d,i){this.initialized=!1,this.filterManager=d,this.filterElem=o,this.elem=i,i.matteElement=createNS("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}SVGMatte3Effect.prototype.findSymbol=function(o){var d=0,i=_svgMatteSymbols.length;while(d<i){if(_svgMatteSymbols[d]===o)return _svgMatteSymbols[d];d+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(o,d){var i=o.layerElement.parentNode;if(!i)return;var r=i.children,h=0,a=r.length;while(h<a){if(r[h]===o.layerElement)break;h+=1}var g;if(h<=a-2)g=r[h+1];var l=createNS("use");if(l.setAttribute("href","#"+d),g)i.insertBefore(l,g);else i.appendChild(l)},SVGMatte3Effect.prototype.setElementAsMask=function(o,d){if(!this.findSymbol(d)){var i=createElementID(),r=createNS("mask");r.setAttribute("id",d.layerId),r.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(d);var h=o.globalData.defs;h.appendChild(r);var a=createNS("symbol");a.setAttribute("id",i),this.replaceInParent(d,i),a.appendChild(d.layerElement),h.appendChild(a);var g=createNS("use");g.setAttribute("href","#"+i),r.appendChild(g),d.data.hd=!1,d.show()}o.setMatte(d.layerId)},SVGMatte3Effect.prototype.initialize=function(){var o=this.filterManager.effectElements[0].p.v,d=this.elem.comp.elements,i=0,r=d.length;while(i<r){if(d[i]&&d[i].data.ind===o)this.setElementAsMask(this.elem,d[i]);i+=1}this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){if(!this.initialized)this.initialize()};function SVGGaussianBlurEffect(o,d,i,r){o.setAttribute("x","-100%"),o.setAttribute("y","-100%"),o.setAttribute("width","300%"),o.setAttribute("height","300%"),this.filterManager=d;var h=createNS("feGaussianBlur");h.setAttribute("result",r),o.appendChild(h),this.feGaussianBlur=h}SVGGaussianBlurEffect.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var d=0.3,i=this.filterManager.effectElements[0].p.v*d,r=this.filterManager.effectElements[1].p.v,h=r==3?0:i,a=r==2?0:i;this.feGaussianBlur.setAttribute("stdDeviation",h+" "+a);var g=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",g)}};function TransformEffect(){}TransformEffect.prototype.init=function(o){this.effectsManager=o,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(o){if(this._opMdf=!1,this._mdf=!1,o||this.effectsManager._mdf){var d=this.effectsManager.effectElements,i=d[0].p.v,r=d[1].p.v,h=d[2].p.v===1,a=d[3].p.v,g=h?a:d[4].p.v,l=d[5].p.v,x=d[6].p.v,w=d[7].p.v;if(this.matrix.reset(),this.matrix.translate(-i[0],-i[1],i[2]),this.matrix.scale(g*0.01,a*0.01,1),this.matrix.rotate(-w*degToRads),this.matrix.skewFromAxis(-l*degToRads,(x+90)*degToRads),this.matrix.translate(r[0],r[1],0),this._mdf=!0,this.opacity!==d[8].p.v)this.opacity=d[8].p.v,this._opMdf=!0}};function SVGTransformEffect(o,d){this.init(d)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(o){this.init(o)}return extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})});class h1 extends Event{constructor(o,d,i,r){super("context-request",{bubbles:!0,composed:!0}),this.context=o,this.contextTarget=d,this.callback=i,this.subscribe=r??!1}}function _1(o){return o}class _0{constructor(o,d,i,r){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(h,a)=>{this.unsubscribe&&(this.unsubscribe!==a&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=h,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(h,a)),this.unsubscribe=a},this.host=o,d.context!==void 0){let h=d;this.context=h.context,this.callback=h.callback,this.subscribe=h.subscribe??!1}else this.context=d,this.callback=i,this.subscribe=r??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new h1(this.context,this.host,this.t,this.subscribe))}}class Xo{get value(){return this.o}set value(o){this.setValue(o)}setValue(o,d=!1){let i=d||!Object.is(o,this.o);this.o=o,i&&this.updateObservers()}constructor(o){this.subscriptions=new Map,this.updateObservers=()=>{for(let[d,{disposer:i}]of this.subscriptions)d(this.o,i)},o!==void 0&&(this.value=o)}addCallback(o,d,i){if(!i)return void o(this.value);this.subscriptions.has(o)||this.subscriptions.set(o,{disposer:()=>{this.subscriptions.delete(o)},consumerHost:d});let{disposer:r}=this.subscriptions.get(o);o(this.value,r)}clearCallbacks(){this.subscriptions.clear()}}class t2 extends Event{constructor(o,d){super("context-provider",{bubbles:!0,composed:!0}),this.context=o,this.contextTarget=d}}class a1 extends Xo{constructor(o,d,i){super(d.context!==void 0?d.initialValue:i),this.onContextRequest=(r)=>{if(r.context!==this.context)return;let h=r.contextTarget??r.composedPath()[0];h!==this.host&&(r.stopPropagation(),this.addCallback(r.callback,h,r.subscribe))},this.onProviderRequest=(r)=>{if(r.context!==this.context)return;if((r.contextTarget??r.composedPath()[0])===this.host)return;let h=new Set;for(let[a,{consumerHost:g}]of this.subscriptions)h.has(a)||(h.add(a),g.dispatchEvent(new h1(this.context,g,a,!0)));r.stopPropagation()},this.host=o,d.context!==void 0?this.context=d.context:this.context=d,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new t2(this.context,this.host))}}function l0({context:o,subscribe:d}){return(i,r)=>{typeof r=="object"?r.addInitializer(function(){new _0(this,{context:o,callback:(h)=>{i.set.call(this,h)},subscribe:d})}):i.constructor.addInitializer((h)=>{new _0(h,{context:o,callback:(a)=>{h[r]=a},subscribe:d})})}}var y1=globalThis,M1=y1.ShadowRoot&&(y1.ShadyCSS===void 0||y1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Io=Symbol(),m2=new WeakMap;class t1{constructor(o,d,i){if(this._$cssResult$=!0,i!==Io)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=o,this.t=d}get styleSheet(){let o=this.o,d=this.t;if(M1&&o===void 0){let i=d!==void 0&&d.length===1;i&&(o=m2.get(d)),o===void 0&&((this.o=o=new CSSStyleSheet).replaceSync(this.cssText),i&&m2.set(d,o))}return o}toString(){return this.cssText}}var e2=(o)=>new t1(typeof o=="string"?o:o+"",void 0,Io),A=(o,...d)=>{let i=o.length===1?o[0]:d.reduce((r,h,a)=>r+((g)=>{if(g._$cssResult$===!0)return g.cssText;if(typeof g=="number")return g;throw Error("Value passed to 'css' function must be a 'css' function result: "+g+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(h)+o[a+1],o[0]);return new t1(i,o,Io)},od=(o,d)=>{if(M1)o.adoptedStyleSheets=d.map((i)=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of d){let r=document.createElement("style"),h=y1.litNonce;h!==void 0&&r.setAttribute("nonce",h),r.textContent=i.cssText,o.appendChild(r)}},Ko=M1?(o)=>o:(o)=>o instanceof CSSStyleSheet?((d)=>{let i="";for(let r of d.cssRules)i+=r.cssText;return e2(i)})(o):o;var{is:D5,defineProperty:B5,getOwnPropertyDescriptor:N5,getOwnPropertyNames:A5,getOwnPropertySymbols:y5,getPrototypeOf:M5}=Object,E1=globalThis,dd=E1.trustedTypes,t5=dd?dd.emptyScript:"",E5=E1.reactiveElementPolyfillSupport,K1=(o,d)=>o,V1={toAttribute(o,d){switch(d){case Boolean:o=o?t5:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,d){let i=o;switch(d){case Boolean:i=o!==null;break;case Number:i=o===null?null:Number(o);break;case Object:case Array:try{i=JSON.parse(o)}catch(r){i=null}}return i}},m1=(o,d)=>!D5(o,d),id={attribute:!0,type:String,converter:V1,reflect:!1,useDefault:!1,hasChanged:m1};Symbol.metadata??=Symbol("metadata"),E1.litPropertyMetadata??=new WeakMap;class g1 extends HTMLElement{static addInitializer(o){this._$Ei(),(this.l??=[]).push(o)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(o,d=id){if(d.state&&(d.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(o)&&((d=Object.create(d)).wrapped=!0),this.elementProperties.set(o,d),!d.noAccessor){let i=Symbol(),r=this.getPropertyDescriptor(o,i,d);r!==void 0&&B5(this.prototype,o,r)}}static getPropertyDescriptor(o,d,i){let{get:r,set:h}=N5(this.prototype,o)??{get(){return this[d]},set(a){this[d]=a}};return{get:r,set(a){let g=r?.call(this);h?.call(this,a),this.requestUpdate(o,g,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(o){return this.elementProperties.get(o)??id}static _$Ei(){if(this.hasOwnProperty(K1("elementProperties")))return;let o=M5(this);o.finalize(),o.l!==void 0&&(this.l=[...o.l]),this.elementProperties=new Map(o.elementProperties)}static finalize(){if(this.hasOwnProperty(K1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(K1("properties"))){let d=this.properties,i=[...A5(d),...y5(d)];for(let r of i)this.createProperty(r,d[r])}let o=this[Symbol.metadata];if(o!==null){let d=litPropertyMetadata.get(o);if(d!==void 0)for(let[i,r]of d)this.elementProperties.set(i,r)}this._$Eh=new Map;for(let[d,i]of this.elementProperties){let r=this._$Eu(d,i);r!==void 0&&this._$Eh.set(r,d)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(o){let d=[];if(Array.isArray(o)){let i=new Set(o.flat(1/0).reverse());for(let r of i)d.unshift(Ko(r))}else o!==void 0&&d.push(Ko(o));return d}static _$Eu(o,d){let i=d.attribute;return i===!1?void 0:typeof i=="string"?i:typeof o=="string"?o.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((o)=>this.enableUpdating=o),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((o)=>o(this))}addController(o){(this._$EO??=new Set).add(o),this.renderRoot!==void 0&&this.isConnected&&o.hostConnected?.()}removeController(o){this._$EO?.delete(o)}_$E_(){let o=new Map,d=this.constructor.elementProperties;for(let i of d.keys())this.hasOwnProperty(i)&&(o.set(i,this[i]),delete this[i]);o.size>0&&(this._$Ep=o)}createRenderRoot(){let o=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return od(o,this.constructor.elementStyles),o}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((o)=>o.hostConnected?.())}enableUpdating(o){}disconnectedCallback(){this._$EO?.forEach((o)=>o.hostDisconnected?.())}attributeChangedCallback(o,d,i){this._$AK(o,i)}_$ET(o,d){let i=this.constructor.elementProperties.get(o),r=this.constructor._$Eu(o,i);if(r!==void 0&&i.reflect===!0){let h=(i.converter?.toAttribute!==void 0?i.converter:V1).toAttribute(d,i.type);this._$Em=o,h==null?this.removeAttribute(r):this.setAttribute(r,h),this._$Em=null}}_$AK(o,d){let i=this.constructor,r=i._$Eh.get(o);if(r!==void 0&&this._$Em!==r){let h=i.getPropertyOptions(r),a=typeof h.converter=="function"?{fromAttribute:h.converter}:h.converter?.fromAttribute!==void 0?h.converter:V1;this._$Em=r,this[r]=a.fromAttribute(d,h.type)??this._$Ej?.get(r)??null,this._$Em=null}}requestUpdate(o,d,i){if(o!==void 0){let r=this.constructor,h=this[o];if(i??=r.getPropertyOptions(o),!((i.hasChanged??m1)(h,d)||i.useDefault&&i.reflect&&h===this._$Ej?.get(o)&&!this.hasAttribute(r._$Eu(o,i))))return;this.C(o,d,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(o,d,{useDefault:i,reflect:r,wrapped:h},a){i&&!(this._$Ej??=new Map).has(o)&&(this._$Ej.set(o,a??d??this[o]),h!==!0||a!==void 0)||(this._$AL.has(o)||(this.hasUpdated||i||(d=void 0),this._$AL.set(o,d)),r===!0&&this._$Em!==o&&(this._$Eq??=new Set).add(o))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(d){Promise.reject(d)}let o=this.scheduleUpdate();return o!=null&&await o,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,h]of this._$Ep)this[r]=h;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[r,h]of i){let{wrapped:a}=h,g=this[r];a!==!0||this._$AL.has(r)||g===void 0||this.C(r,void 0,h,g)}}let o=!1,d=this._$AL;try{o=this.shouldUpdate(d),o?(this.willUpdate(d),this._$EO?.forEach((i)=>i.hostUpdate?.()),this.update(d)):this._$EM()}catch(i){throw o=!1,this._$EM(),i}o&&this._$AE(d)}willUpdate(o){}_$AE(o){this._$EO?.forEach((d)=>d.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(o)),this.updated(o)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(o){return!0}update(o){this._$Eq&&=this._$Eq.forEach((d)=>this._$ET(d,this[d])),this._$EM()}updated(o){}firstUpdated(o){}}g1.elementStyles=[],g1.shadowRootOptions={mode:"open"},g1[K1("elementProperties")]=new Map,g1[K1("finalized")]=new Map,E5?.({ReactiveElement:g1}),(E1.reactiveElementVersions??=[]).push("2.1.0");var Vo=globalThis,e1=Vo.trustedTypes,rd=e1?e1.createPolicy("lit-html",{createHTML:(o)=>o}):void 0;var M0=`lit$${Math.random().toFixed(9).slice(2)}$`,Fo="?"+M0,m5=`<${Fo}>`,z1=document,j1=()=>z1.createComment(""),G1=(o)=>o===null||typeof o!="object"&&typeof o!="function",jo=Array.isArray,bd=(o)=>jo(o)||typeof o?.[Symbol.iterator]=="function";var F1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hd=/-->/g,ad=/>/g,n1=RegExp(`>|[
|
|
9
|
+
*/var Matrix=function(){var{cos:o,sin:d,tan:i,round:r}=Math;function h(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function a(w){if(w===0)return this;var J=o(w),R=d(w);return this._t(J,-R,0,0,R,J,0,0,0,0,1,0,0,0,0,1)}function g(w){if(w===0)return this;var J=o(w),R=d(w);return this._t(1,0,0,0,0,J,-R,0,0,R,J,0,0,0,0,1)}function l(w){if(w===0)return this;var J=o(w),R=d(w);return this._t(J,0,R,0,0,1,0,0,-R,0,J,0,0,0,0,1)}function x(w){if(w===0)return this;var J=o(w),R=d(w);return this._t(J,-R,0,0,R,J,0,0,0,0,1,0,0,0,0,1)}function f(w,J){return this._t(1,J,w,1,0,0)}function n(w,J){return this.shear(i(w),i(J))}function _(w,J){var R=o(J),G=d(J);return this._t(R,G,0,0,-G,R,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,i(w),1,0,0,0,0,1,0,0,0,0,1)._t(R,-G,0,0,G,R,0,0,0,0,1,0,0,0,0,1)}function v(w,J,R){if(!R&&R!==0)R=1;if(w===1&&J===1&&R===1)return this;return this._t(w,0,0,0,0,J,0,0,0,0,R,0,0,0,0,1)}function Y(w,J,R,G,D,E,t,m,d0,g0,Z0,W0,J0,b0,$0,h0){return this.props[0]=w,this.props[1]=J,this.props[2]=R,this.props[3]=G,this.props[4]=D,this.props[5]=E,this.props[6]=t,this.props[7]=m,this.props[8]=d0,this.props[9]=g0,this.props[10]=Z0,this.props[11]=W0,this.props[12]=J0,this.props[13]=b0,this.props[14]=$0,this.props[15]=h0,this}function H(w,J,R){if(R=R||0,w!==0||J!==0||R!==0)return this._t(1,0,0,0,0,1,0,0,0,0,1,0,w,J,R,1);return this}function $(w,J,R,G,D,E,t,m,d0,g0,Z0,W0,J0,b0,$0,h0){var M=this.props;if(w===1&&J===0&&R===0&&G===0&&D===0&&E===1&&t===0&&m===0&&d0===0&&g0===0&&Z0===1&&W0===0)return M[12]=M[12]*w+M[15]*J0,M[13]=M[13]*E+M[15]*b0,M[14]=M[14]*Z0+M[15]*$0,M[15]*=h0,this._identityCalculated=!1,this;var x0=M[0],o1=M[1],B0=M[2],O0=M[3],y0=M[4],A0=M[5],X0=M[6],d1=M[7],i1=M[8],L0=M[9],r1=M[10],u0=M[11],c1=M[12],N1=M[13],B1=M[14],y1=M[15];return M[0]=x0*w+o1*D+B0*d0+O0*J0,M[1]=x0*J+o1*E+B0*g0+O0*b0,M[2]=x0*R+o1*t+B0*Z0+O0*$0,M[3]=x0*G+o1*m+B0*W0+O0*h0,M[4]=y0*w+A0*D+X0*d0+d1*J0,M[5]=y0*J+A0*E+X0*g0+d1*b0,M[6]=y0*R+A0*t+X0*Z0+d1*$0,M[7]=y0*G+A0*m+X0*W0+d1*h0,M[8]=i1*w+L0*D+r1*d0+u0*J0,M[9]=i1*J+L0*E+r1*g0+u0*b0,M[10]=i1*R+L0*t+r1*Z0+u0*$0,M[11]=i1*G+L0*m+r1*W0+u0*h0,M[12]=c1*w+N1*D+B1*d0+y1*J0,M[13]=c1*J+N1*E+B1*g0+y1*b0,M[14]=c1*R+N1*t+B1*Z0+y1*$0,M[15]=c1*G+N1*m+B1*W0+y1*h0,this._identityCalculated=!1,this}function I(w){var J=w.props;return this.transform(J[0],J[1],J[2],J[3],J[4],J[5],J[6],J[7],J[8],J[9],J[10],J[11],J[12],J[13],J[14],J[15])}function Z(){if(!this._identityCalculated)this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0;return this._identity}function c(w){var J=0;while(J<16){if(w.props[J]!==this.props[J])return!1;J+=1}return!0}function z(w){var J;for(J=0;J<16;J+=1)w.props[J]=this.props[J];return w}function k(w){var J;for(J=0;J<16;J+=1)this.props[J]=w[J]}function X(w,J,R){return{x:w*this.props[0]+J*this.props[4]+R*this.props[8]+this.props[12],y:w*this.props[1]+J*this.props[5]+R*this.props[9]+this.props[13],z:w*this.props[2]+J*this.props[6]+R*this.props[10]+this.props[14]}}function V(w,J,R){return w*this.props[0]+J*this.props[4]+R*this.props[8]+this.props[12]}function u(w,J,R){return w*this.props[1]+J*this.props[5]+R*this.props[9]+this.props[13]}function p(w,J,R){return w*this.props[2]+J*this.props[6]+R*this.props[10]+this.props[14]}function U(){var w=this.props[0]*this.props[5]-this.props[1]*this.props[4],J=this.props[5]/w,R=-this.props[1]/w,G=-this.props[4]/w,D=this.props[0]/w,E=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/w,t=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/w,m=new Matrix;return m.props[0]=J,m.props[1]=R,m.props[4]=G,m.props[5]=D,m.props[12]=E,m.props[13]=t,m}function F(w){var J=this.getInverseMatrix();return J.applyToPointArray(w[0],w[1],w[2]||0)}function L(w){var J,R=w.length,G=[];for(J=0;J<R;J+=1)G[J]=F(w[J]);return G}function j(w,J,R){var G=createTypedArray("float32",6);if(this.isIdentity())G[0]=w[0],G[1]=w[1],G[2]=J[0],G[3]=J[1],G[4]=R[0],G[5]=R[1];else{var D=this.props[0],E=this.props[1],t=this.props[4],m=this.props[5],d0=this.props[12],g0=this.props[13];G[0]=w[0]*D+w[1]*t+d0,G[1]=w[0]*E+w[1]*m+g0,G[2]=J[0]*D+J[1]*t+d0,G[3]=J[0]*E+J[1]*m+g0,G[4]=R[0]*D+R[1]*t+d0,G[5]=R[0]*E+R[1]*m+g0}return G}function C(w,J,R){var G;if(this.isIdentity())G=[w,J,R];else G=[w*this.props[0]+J*this.props[4]+R*this.props[8]+this.props[12],w*this.props[1]+J*this.props[5]+R*this.props[9]+this.props[13],w*this.props[2]+J*this.props[6]+R*this.props[10]+this.props[14]];return G}function T(w,J){if(this.isIdentity())return w+","+J;var R=this.props;return Math.round((w*R[0]+J*R[4]+R[12])*100)/100+","+Math.round((w*R[1]+J*R[5]+R[13])*100)/100}function K(){var w=0,J=this.props,R="matrix3d(",G=1e4;while(w<16)R+=r(J[w]*G)/G,R+=w===15?")":",",w+=1;return R}function Q(w){var J=1e4;if(w<0.000001&&w>0||w>-0.000001&&w<0)return r(w*J)/J;return w}function W(){var w=this.props,J=Q(w[0]),R=Q(w[1]),G=Q(w[4]),D=Q(w[5]),E=Q(w[12]),t=Q(w[13]);return"matrix("+J+","+R+","+G+","+D+","+E+","+t+")"}return function(){this.reset=h,this.rotate=a,this.rotateX=g,this.rotateY=l,this.rotateZ=x,this.skew=n,this.skewFromAxis=_,this.shear=f,this.scale=v,this.setTransform=Y,this.translate=H,this.transform=$,this.multiply=I,this.applyToPoint=X,this.applyToX=V,this.applyToY=u,this.applyToZ=p,this.applyToPointArray=C,this.applyToTriplePoints=j,this.applyToPointStringified=T,this.toCSS=K,this.to2dCSS=W,this.clone=z,this.cloneFromProps=k,this.equals=c,this.inversePoints=L,this.inversePoint=F,this.getInverseMatrix=U,this._t=this.transform,this.isIdentity=Z,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(o){return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$3(o)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(o){setLocationHref(o)}function searchAnimations(){if(standalone===!0)animationManager.searchAnimations(animationData,standalone,renderer);else animationManager.searchAnimations()}function setSubframeRendering(o){setSubframeEnabled(o)}function setPrefix(o){setIdPrefix(o)}function loadAnimation(o){if(standalone===!0)o.animationData=JSON.parse(animationData);return animationManager.loadAnimation(o)}function setQuality(o){if(typeof o==="string")switch(o){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else if(!isNaN(o)&&o>1)setDefaultCurveSegments(o);if(getDefaultCurveSegments()>=50)roundValues(!1);else roundValues(!0)}function inBrowser(){return typeof navigator!=="undefined"}function installPlugin(o,d){if(o==="expressions")setExpressionsPlugin(d)}function getFactory(o){switch(o){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.13.0";function checkReady(){if(document.readyState==="complete")clearInterval(readyStateCheckInterval),searchAnimations()}function getQueryVariable(o){var d=queryString.split("&");for(var i=0;i<d.length;i+=1){var r=d[i].split("=");if(decodeURIComponent(r[0])==o)return decodeURIComponent(r[1])}return null}var queryString="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{if(!((typeof W1==="undefined"?"undefined":_typeof$3(W1))==="object"&&typeof T1!=="undefined")&&!(typeof define==="function"&&define.amd))window.bodymovin=lottie}catch(o){}var ShapeModifiers=function(){var o={},d={};o.registerModifier=i,o.getModifier=r;function i(h,a){if(!d[h])d[h]=a}function r(h,a,g){return new d[h](a,g)}return o}();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(o){if(!this.closed){o.sh.container.addDynamicProperty(o.sh);var d={shape:o.sh,data:o,localShapeCollection:shapeCollectionPool.newShapeCollection()};if(this.shapes.push(d),this.addShapeToModifier(d),this._isAnimated)o.setAsAnimated()}},ShapeModifier.prototype.init=function(o,d){if(this.shapes=[],this.elem=o,this.initDynamicPropertyContainer(o),this.initModifierProperties(o,d),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length)this.k=!0;else this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){if(this.elem.globalData.frameId===this.frameId)return;this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties()},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(o,d){this.s=PropertyFactory.getProp(o,d.s,0,0.01,this),this.e=PropertyFactory.getProp(o,d.e,0,0.01,this),this.o=PropertyFactory.getProp(o,d.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=d.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(o){o.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(o,d,i,r,h){var a=[];if(d<=1)a.push({s:o,e:d});else if(o>=1)a.push({s:o-1,e:d-1});else a.push({s:o,e:1}),a.push({s:0,e:d-1});var g=[],l,x=a.length,f;for(l=0;l<x;l+=1)if(f=a[l],!(f.e*h<r||f.s*h>r+i)){var n,_;if(f.s*h<=r)n=0;else n=(f.s*h-r)/i;if(f.e*h>=r+i)_=1;else _=(f.e*h-r)/i;g.push([n,_])}if(!g.length)g.push([0,0]);return g},TrimModifier.prototype.releasePathsData=function(o){var d,i=o.length;for(d=0;d<i;d+=1)segmentsLengthPool.release(o[d]);return o.length=0,o},TrimModifier.prototype.processShapes=function(o){var d,i;if(this._mdf||o){var r=this.o.v%360/360;if(r<0)r+=1;if(this.s.v>1)d=1+r;else if(this.s.v<0)d=0+r;else d=this.s.v+r;if(this.e.v>1)i=1+r;else if(this.e.v<0)i=0+r;else i=this.e.v+r;if(d>i){var h=d;d=i,i=h}d=Math.round(d*1e4)*0.0001,i=Math.round(i*1e4)*0.0001,this.sValue=d,this.eValue=i}else d=this.sValue,i=this.eValue;var a,g,l=this.shapes.length,x,f,n,_,v,Y=0;if(i===d){for(g=0;g<l;g+=1)if(this.shapes[g].localShapeCollection.releaseShapes(),this.shapes[g].shape._mdf=!0,this.shapes[g].shape.paths=this.shapes[g].localShapeCollection,this._mdf)this.shapes[g].pathsData.length=0}else if(!(i===1&&d===0||i===0&&d===1)){var H=[],$,I;for(g=0;g<l;g+=1)if($=this.shapes[g],!$.shape._mdf&&!this._mdf&&!o&&this.m!==2)$.shape.paths=$.localShapeCollection;else{if(a=$.shape.paths,f=a._length,v=0,!$.shape._mdf&&$.pathsData.length)v=$.totalShapeLength;else{n=this.releasePathsData($.pathsData);for(x=0;x<f;x+=1)_=bez.getSegmentsLength(a.shapes[x]),n.push(_),v+=_.totalLength;$.totalShapeLength=v,$.pathsData=n}Y+=v,$.shape._mdf=!0}var Z=d,c=i,z=0,k;for(g=l-1;g>=0;g-=1)if($=this.shapes[g],$.shape._mdf){if(I=$.localShapeCollection,I.releaseShapes(),this.m===2&&l>1)k=this.calculateShapeEdges(d,i,$.totalShapeLength,z,Y),z+=$.totalShapeLength;else k=[[Z,c]];f=k.length;for(x=0;x<f;x+=1){if(Z=k[x][0],c=k[x][1],H.length=0,c<=1)H.push({s:$.totalShapeLength*Z,e:$.totalShapeLength*c});else if(Z>=1)H.push({s:$.totalShapeLength*(Z-1),e:$.totalShapeLength*(c-1)});else H.push({s:$.totalShapeLength*Z,e:$.totalShapeLength}),H.push({s:0,e:$.totalShapeLength*(c-1)});var X=this.addShapes($,H[0]);if(H[0].s!==H[0].e){if(H.length>1){var V=$.shape.paths.shapes[$.shape.paths._length-1];if(V.c){var u=X.pop();this.addPaths(X,I),X=this.addShapes($,H[1],u)}else this.addPaths(X,I),X=this.addShapes($,H[1])}this.addPaths(X,I)}}$.shape.paths=I}}else if(this._mdf)for(g=0;g<l;g+=1)this.shapes[g].pathsData.length=0,this.shapes[g].shape._mdf=!0},TrimModifier.prototype.addPaths=function(o,d){var i,r=o.length;for(i=0;i<r;i+=1)d.addShape(o[i])},TrimModifier.prototype.addSegment=function(o,d,i,r,h,a,g){if(h.setXYAt(d[0],d[1],"o",a),h.setXYAt(i[0],i[1],"i",a+1),g)h.setXYAt(o[0],o[1],"v",a);h.setXYAt(r[0],r[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(o,d,i,r){if(d.setXYAt(o[1],o[5],"o",i),d.setXYAt(o[2],o[6],"i",i+1),r)d.setXYAt(o[0],o[4],"v",i);d.setXYAt(o[3],o[7],"v",i+1)},TrimModifier.prototype.addShapes=function(o,d,i){var r=o.pathsData,h=o.shape.paths.shapes,a,g=o.shape.paths._length,l,x,f=0,n,_,v,Y,H=[],$,I=!0;if(!i)i=shapePool.newElement(),_=0,$=0;else _=i._length,$=i._length;H.push(i);for(a=0;a<g;a+=1){v=r[a].lengths,i.c=h[a].c,x=h[a].c?v.length:v.length+1;for(l=1;l<x;l+=1)if(n=v[l-1],f+n.addedLength<d.s)f+=n.addedLength,i.c=!1;else if(f>d.e){i.c=!1;break}else{if(d.s<=f&&d.e>=f+n.addedLength)this.addSegment(h[a].v[l-1],h[a].o[l-1],h[a].i[l],h[a].v[l],i,_,I),I=!1;else Y=bez.getNewSegment(h[a].v[l-1],h[a].v[l],h[a].o[l-1],h[a].i[l],(d.s-f)/n.addedLength,(d.e-f)/n.addedLength,v[l-1]),this.addSegmentFromArray(Y,i,_,I),I=!1,i.c=!1;f+=n.addedLength,_+=1}if(h[a].c&&v.length){if(n=v[l-1],f<=d.e){var Z=v[l-1].addedLength;if(d.s<=f&&d.e>=f+Z)this.addSegment(h[a].v[l-1],h[a].o[l-1],h[a].i[0],h[a].v[0],i,_,I),I=!1;else Y=bez.getNewSegment(h[a].v[l-1],h[a].v[0],h[a].o[l-1],h[a].i[0],(d.s-f)/Z,(d.e-f)/Z,v[l-1]),this.addSegmentFromArray(Y,i,_,I),I=!1,i.c=!1}else i.c=!1;f+=n.addedLength,_+=1}if(i._length)i.setXYAt(i.v[$][0],i.v[$][1],"i",$),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1);if(f>d.e)break;if(a<g-1)i=shapePool.newElement(),I=!0,H.push(i),_=0}return H};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(o,d){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(o,d.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(o,d){var i=d/100,r=[0,0],h=o._length,a=0;for(a=0;a<h;a+=1)r[0]+=o.v[a][0],r[1]+=o.v[a][1];r[0]/=h,r[1]/=h;var g=shapePool.newElement();g.c=o.c;var l,x,f,n,_,v;for(a=0;a<h;a+=1)l=o.v[a][0]+(r[0]-o.v[a][0])*i,x=o.v[a][1]+(r[1]-o.v[a][1])*i,f=o.o[a][0]+(r[0]-o.o[a][0])*-i,n=o.o[a][1]+(r[1]-o.o[a][1])*-i,_=o.i[a][0]+(r[0]-o.i[a][0])*-i,v=o.i[a][1]+(r[1]-o.i[a][1])*-i,g.setTripleAt(l,x,f,n,_,v,a);return g},PuckerAndBloatModifier.prototype.processShapes=function(o){var d,i,r=this.shapes.length,h,a,g=this.amount.v;if(g!==0){var l,x;for(i=0;i<r;i+=1){if(l=this.shapes[i],x=l.localShapeCollection,!(!l.shape._mdf&&!this._mdf&&!o)){x.releaseShapes(),l.shape._mdf=!0,d=l.shape.paths.shapes,a=l.shape.paths._length;for(h=0;h<a;h+=1)x.addShape(this.processPath(d[h],g))}l.shape.paths=l.localShapeCollection}}if(!this.dynamicProperties.length)this._mdf=!1};var TransformPropertyFactory=function(){var o=[0,0];function d(x){var f=this._mdf;if(this.iterateDynamicProperties(),this._mdf=this._mdf||f,this.a)x.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]);if(this.s)x.scale(this.s.v[0],this.s.v[1],this.s.v[2]);if(this.sk)x.skewFromAxis(-this.sk.v,this.sa.v);if(this.r)x.rotate(-this.r.v);else x.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);if(this.data.p.s)if(this.data.p.z)x.translate(this.px.v,this.py.v,-this.pz.v);else x.translate(this.px.v,this.py.v,0);else x.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function i(x){if(this.elem.globalData.frameId===this.frameId)return;if(this._isDirty)this.precalculateMatrix(),this._isDirty=!1;if(this.iterateDynamicProperties(),this._mdf||x){var f;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1)this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]);if(this.appliedTransformations<2)this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]);if(this.sk&&this.appliedTransformations<3)this.v.skewFromAxis(-this.sk.v,this.sa.v);if(this.r&&this.appliedTransformations<4)this.v.rotate(-this.r.v);else if(!this.r&&this.appliedTransformations<4)this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);if(this.autoOriented){var n,_;if(f=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)if(this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t)n=this.p.getValueAtTime((this.p.keyframes[0].t+0.01)/f,0),_=this.p.getValueAtTime(this.p.keyframes[0].t/f,0);else if(this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t)n=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/f,0),_=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-0.05)/f,0);else n=this.p.pv,_=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-0.01)/f,this.p.offsetTime);else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){n=[],_=[];var v=this.px,Y=this.py;if(v._caching.lastFrame+v.offsetTime<=v.keyframes[0].t)n[0]=v.getValueAtTime((v.keyframes[0].t+0.01)/f,0),n[1]=Y.getValueAtTime((Y.keyframes[0].t+0.01)/f,0),_[0]=v.getValueAtTime(v.keyframes[0].t/f,0),_[1]=Y.getValueAtTime(Y.keyframes[0].t/f,0);else if(v._caching.lastFrame+v.offsetTime>=v.keyframes[v.keyframes.length-1].t)n[0]=v.getValueAtTime(v.keyframes[v.keyframes.length-1].t/f,0),n[1]=Y.getValueAtTime(Y.keyframes[Y.keyframes.length-1].t/f,0),_[0]=v.getValueAtTime((v.keyframes[v.keyframes.length-1].t-0.01)/f,0),_[1]=Y.getValueAtTime((Y.keyframes[Y.keyframes.length-1].t-0.01)/f,0);else n=[v.pv,Y.pv],_[0]=v.getValueAtTime((v._caching.lastFrame+v.offsetTime-0.01)/f,v.offsetTime),_[1]=Y.getValueAtTime((Y._caching.lastFrame+Y.offsetTime-0.01)/f,Y.offsetTime)}else _=o,n=_;this.v.rotate(-Math.atan2(n[1]-_[1],n[0]-_[0]))}if(this.data.p&&this.data.p.s)if(this.data.p.z)this.v.translate(this.px.v,this.py.v,-this.pz.v);else this.v.translate(this.px.v,this.py.v,0);else this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}function r(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;if(this.r){if(!this.r.effectsSequence.length)this.pre.rotate(-this.r.v),this.appliedTransformations=4}else if(!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length)this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4}function h(){}function a(x){this._addDynamicProperty(x),this.elem.addDynamicProperty(x),this._isDirty=!0}function g(x,f,n){if(this.elem=x,this.frameId=-1,this.propType="transform",this.data=f,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(n||x),f.p&&f.p.s){if(this.px=PropertyFactory.getProp(x,f.p.x,0,0,this),this.py=PropertyFactory.getProp(x,f.p.y,0,0,this),f.p.z)this.pz=PropertyFactory.getProp(x,f.p.z,0,0,this)}else this.p=PropertyFactory.getProp(x,f.p||{k:[0,0,0]},1,0,this);if(f.rx){if(this.rx=PropertyFactory.getProp(x,f.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(x,f.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(x,f.rz,0,degToRads,this),f.or.k[0].ti){var _,v=f.or.k.length;for(_=0;_<v;_+=1)f.or.k[_].to=null,f.or.k[_].ti=null}this.or=PropertyFactory.getProp(x,f.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(x,f.r||{k:0},0,degToRads,this);if(f.sk)this.sk=PropertyFactory.getProp(x,f.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(x,f.sa,0,degToRads,this);if(this.a=PropertyFactory.getProp(x,f.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(x,f.s||{k:[100,100,100]},1,0.01,this),f.o)this.o=PropertyFactory.getProp(x,f.o,0,0.01,x);else this.o={_mdf:!1,v:1};if(this._isDirty=!0,!this.dynamicProperties.length)this.getValue(!0)}g.prototype={applyToMatrix:d,getValue:i,precalculateMatrix:r,autoOrient:h},extendPrototype([DynamicPropertyContainer],g),g.prototype.addDynamicProperty=a,g.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function l(x,f,n){return new g(x,f,n)}return{getTransformProperty:l}}();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(o,d){if(this.getValue=this.processKeys,this.c=PropertyFactory.getProp(o,d.c,0,null,this),this.o=PropertyFactory.getProp(o,d.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(o,d.tr,this),this.so=PropertyFactory.getProp(o,d.tr.so,0,0.01,this),this.eo=PropertyFactory.getProp(o,d.tr.eo,0,0.01,this),this.data=d,!this.dynamicProperties.length)this.getValue(!0);this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(o,d,i,r,h,a){var g=a?-1:1,l=r.s.v[0]+(1-r.s.v[0])*(1-h),x=r.s.v[1]+(1-r.s.v[1])*(1-h);o.translate(r.p.v[0]*g*h,r.p.v[1]*g*h,r.p.v[2]),d.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),d.rotate(-r.r.v*g*h),d.translate(r.a.v[0],r.a.v[1],r.a.v[2]),i.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),i.scale(a?1/l:l,a?1/x:x),i.translate(r.a.v[0],r.a.v[1],r.a.v[2])},RepeaterModifier.prototype.init=function(o,d,i,r){this.elem=o,this.arr=d,this.pos=i,this.elemsData=r,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(o),this.initModifierProperties(o,d[i]);while(i>0)i-=1,this._elements.unshift(d[i]);if(this.dynamicProperties.length)this.k=!0;else this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(o){var d,i=o.length;for(d=0;d<i;d+=1)if(o[d]._processed=!1,o[d].ty==="gr")this.resetElements(o[d].it)},RepeaterModifier.prototype.cloneElements=function(o){var d=JSON.parse(JSON.stringify(o));return this.resetElements(d),d},RepeaterModifier.prototype.changeGroupRender=function(o,d){var i,r=o.length;for(i=0;i<r;i+=1)if(o[i]._render=d,o[i].ty==="gr")this.changeGroupRender(o[i].it,d)},RepeaterModifier.prototype.processShapes=function(o){var d,i,r,h,a,g=!1;if(this._mdf||o){var l=Math.ceil(this.c.v);if(this._groups.length<l){while(this._groups.length<l){var x={it:this.cloneElements(this._elements),ty:"gr"};x.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,x),this._groups.splice(0,0,x),this._currentCopies+=1}this.elem.reloadShapes(),g=!0}a=0;var f;for(r=0;r<=this._groups.length-1;r+=1){if(f=a<l,this._groups[r]._render=f,this.changeGroupRender(this._groups[r].it,f),!f){var n=this.elemsData[r].it,_=n[n.length-1];if(_.transform.op.v!==0)_.transform.op._mdf=!0,_.transform.op.v=0;else _.transform.op._mdf=!1}a+=1}this._currentCopies=l;var v=this.o.v,Y=v%1,H=v>0?Math.floor(v):Math.ceil(v),$=this.pMatrix.props,I=this.rMatrix.props,Z=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var c=0;if(v>0){while(c<H)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),c+=1;if(Y)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,Y,!1),c+=Y}else if(v<0){while(c>H)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),c-=1;if(Y)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-Y,!0),c-=Y}r=this.data.m===1?0:this._currentCopies-1,h=this.data.m===1?1:-1,a=this._currentCopies;var z,k;while(a){if(d=this.elemsData[r].it,i=d[d.length-1].transform.mProps.v.props,k=i.length,d[d.length-1].transform.mProps._mdf=!0,d[d.length-1].transform.op._mdf=!0,d[d.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(r/(this._currentCopies-1)),c!==0){if(r!==0&&h===1||r!==this._currentCopies-1&&h===-1)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1);this.matrix.transform(I[0],I[1],I[2],I[3],I[4],I[5],I[6],I[7],I[8],I[9],I[10],I[11],I[12],I[13],I[14],I[15]),this.matrix.transform(Z[0],Z[1],Z[2],Z[3],Z[4],Z[5],Z[6],Z[7],Z[8],Z[9],Z[10],Z[11],Z[12],Z[13],Z[14],Z[15]),this.matrix.transform($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15]);for(z=0;z<k;z+=1)i[z]=this.matrix.props[z];this.matrix.reset()}else{this.matrix.reset();for(z=0;z<k;z+=1)i[z]=this.matrix.props[z]}c+=1,a-=1,r+=h}}else{a=this._currentCopies,r=0,h=1;while(a)d=this.elemsData[r].it,i=d[d.length-1].transform.mProps.v.props,d[d.length-1].transform.mProps._mdf=!1,d[d.length-1].transform.op._mdf=!1,a-=1,r+=h}return g},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(o,d){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(o,d.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(o,d){var i=shapePool.newElement();i.c=o.c;var r,h=o._length,a,g,l,x,f,n,_=0,v,Y,H,$,I,Z;for(r=0;r<h;r+=1)if(a=o.v[r],l=o.o[r],g=o.i[r],a[0]===l[0]&&a[1]===l[1]&&a[0]===g[0]&&a[1]===g[1])if((r===0||r===h-1)&&!o.c)i.setTripleAt(a[0],a[1],l[0],l[1],g[0],g[1],_),_+=1;else{if(r===0)x=o.v[h-1];else x=o.v[r-1];if(f=Math.sqrt(Math.pow(a[0]-x[0],2)+Math.pow(a[1]-x[1],2)),n=f?Math.min(f/2,d)/f:0,I=a[0]+(x[0]-a[0])*n,v=I,Z=a[1]-(a[1]-x[1])*n,Y=Z,H=v-(v-a[0])*roundCorner,$=Y-(Y-a[1])*roundCorner,i.setTripleAt(v,Y,H,$,I,Z,_),_+=1,r===h-1)x=o.v[0];else x=o.v[r+1];f=Math.sqrt(Math.pow(a[0]-x[0],2)+Math.pow(a[1]-x[1],2)),n=f?Math.min(f/2,d)/f:0,H=a[0]+(x[0]-a[0])*n,v=H,$=a[1]+(x[1]-a[1])*n,Y=$,I=v-(v-a[0])*roundCorner,Z=Y-(Y-a[1])*roundCorner,i.setTripleAt(v,Y,H,$,I,Z,_),_+=1}else i.setTripleAt(o.v[r][0],o.v[r][1],o.o[r][0],o.o[r][1],o.i[r][0],o.i[r][1],_),_+=1;return i},RoundCornersModifier.prototype.processShapes=function(o){var d,i,r=this.shapes.length,h,a,g=this.rd.v;if(g!==0){var l,x;for(i=0;i<r;i+=1){if(l=this.shapes[i],x=l.localShapeCollection,!(!l.shape._mdf&&!this._mdf&&!o)){x.releaseShapes(),l.shape._mdf=!0,d=l.shape.paths.shapes,a=l.shape.paths._length;for(h=0;h<a;h+=1)x.addShape(this.processPath(d[h],g))}l.shape.paths=l.localShapeCollection}}if(!this.dynamicProperties.length)this._mdf=!1};function floatEqual(o,d){return Math.abs(o-d)*1e5<=Math.min(Math.abs(o),Math.abs(d))}function floatZero(o){return Math.abs(o)<=0.00001}function lerp(o,d,i){return o*(1-i)+d*i}function lerpPoint(o,d,i){return[lerp(o[0],d[0],i),lerp(o[1],d[1],i)]}function quadRoots(o,d,i){if(o===0)return[];var r=d*d-4*o*i;if(r<0)return[];var h=-d/(2*o);if(r===0)return[h];var a=Math.sqrt(r)/(2*o);return[h-a,h+a]}function polynomialCoefficients(o,d,i,r){return[-o+3*d-3*i+r,3*o-6*d+3*i,-3*o+3*d,o]}function singlePoint(o){return new PolynomialBezier(o,o,o,o,!1)}function PolynomialBezier(o,d,i,r,h){if(h&&pointEqual(o,d))d=lerpPoint(o,r,0.3333333333333333);if(h&&pointEqual(i,r))i=lerpPoint(o,r,0.6666666666666666);var a=polynomialCoefficients(o[0],d[0],i[0],r[0]),g=polynomialCoefficients(o[1],d[1],i[1],r[1]);this.a=[a[0],g[0]],this.b=[a[1],g[1]],this.c=[a[2],g[2]],this.d=[a[3],g[3]],this.points=[o,d,i,r]}PolynomialBezier.prototype.point=function(o){return[((this.a[0]*o+this.b[0])*o+this.c[0])*o+this.d[0],((this.a[1]*o+this.b[1])*o+this.c[1])*o+this.d[1]]},PolynomialBezier.prototype.derivative=function(o){return[(3*o*this.a[0]+2*this.b[0])*o+this.c[0],(3*o*this.a[1]+2*this.b[1])*o+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(o){var d=this.derivative(o);return Math.atan2(d[1],d[0])},PolynomialBezier.prototype.normalAngle=function(o){var d=this.derivative(o);return Math.atan2(d[0],d[1])},PolynomialBezier.prototype.inflectionPoints=function(){var o=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(o))return[];var d=-0.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/o,i=d*d-0.3333333333333333*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/o;if(i<0)return[];var r=Math.sqrt(i);if(floatZero(r)){if(r>0&&r<1)return[d];return[]}return[d-r,d+r].filter(function(h){return h>0&&h<1})},PolynomialBezier.prototype.split=function(o){if(o<=0)return[singlePoint(this.points[0]),this];if(o>=1)return[this,singlePoint(this.points[this.points.length-1])];var d=lerpPoint(this.points[0],this.points[1],o),i=lerpPoint(this.points[1],this.points[2],o),r=lerpPoint(this.points[2],this.points[3],o),h=lerpPoint(d,i,o),a=lerpPoint(i,r,o),g=lerpPoint(h,a,o);return[new PolynomialBezier(this.points[0],d,h,g,!0),new PolynomialBezier(g,a,r,this.points[3],!0)]};function extrema(o,d){var i=o.points[0][d],r=o.points[o.points.length-1][d];if(i>r){var h=r;r=i,i=h}var a=quadRoots(3*o.a[d],2*o.b[d],o.c[d]);for(var g=0;g<a.length;g+=1)if(a[g]>0&&a[g]<1){var l=o.point(a[g])[d];if(l<i)i=l;else if(l>r)r=l}return{min:i,max:r}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var o=this.bounds();return{left:o.x.min,right:o.x.max,top:o.y.min,bottom:o.y.max,width:o.x.max-o.x.min,height:o.y.max-o.y.min,cx:(o.x.max+o.x.min)/2,cy:(o.y.max+o.y.min)/2}};function intersectData(o,d,i){var r=o.boundingBox();return{cx:r.cx,cy:r.cy,width:r.width,height:r.height,bez:o,t:(d+i)/2,t1:d,t2:i}}function splitData(o){var d=o.bez.split(0.5);return[intersectData(d[0],o.t1,o.t),intersectData(d[1],o.t,o.t2)]}function boxIntersect(o,d){return Math.abs(o.cx-d.cx)*2<o.width+d.width&&Math.abs(o.cy-d.cy)*2<o.height+d.height}function intersectsImpl(o,d,i,r,h,a){if(!boxIntersect(o,d))return;if(i>=a||o.width<=r&&o.height<=r&&d.width<=r&&d.height<=r){h.push([o.t,d.t]);return}var g=splitData(o),l=splitData(d);intersectsImpl(g[0],l[0],i+1,r,h,a),intersectsImpl(g[0],l[1],i+1,r,h,a),intersectsImpl(g[1],l[0],i+1,r,h,a),intersectsImpl(g[1],l[1],i+1,r,h,a)}PolynomialBezier.prototype.intersections=function(o,d,i){if(d===void 0)d=2;if(i===void 0)i=7;var r=[];return intersectsImpl(intersectData(this,0,1),intersectData(o,0,1),0,d,r,i),r},PolynomialBezier.shapeSegment=function(o,d){var i=(d+1)%o.length();return new PolynomialBezier(o.v[d],o.o[d],o.i[i],o.v[i],!0)},PolynomialBezier.shapeSegmentInverted=function(o,d){var i=(d+1)%o.length();return new PolynomialBezier(o.v[i],o.i[i],o.o[d],o.v[d],!0)};function crossProduct(o,d){return[o[1]*d[2]-o[2]*d[1],o[2]*d[0]-o[0]*d[2],o[0]*d[1]-o[1]*d[0]]}function lineIntersection(o,d,i,r){var h=[o[0],o[1],1],a=[d[0],d[1],1],g=[i[0],i[1],1],l=[r[0],r[1],1],x=crossProduct(crossProduct(h,a),crossProduct(g,l));if(floatZero(x[2]))return null;return[x[0]/x[2],x[1]/x[2]]}function polarOffset(o,d,i){return[o[0]+Math.cos(d)*i,o[1]-Math.sin(d)*i]}function pointDistance(o,d){return Math.hypot(o[0]-d[0],o[1]-d[1])}function pointEqual(o,d){return floatEqual(o[0],d[0])&&floatEqual(o[1],d[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(o,d){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(o,d.s,0,null,this),this.frequency=PropertyFactory.getProp(o,d.r,0,null,this),this.pointsType=PropertyFactory.getProp(o,d.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(o,d,i,r,h,a,g){var l=i-Math.PI/2,x=i+Math.PI/2,f=d[0]+Math.cos(i)*r*h,n=d[1]-Math.sin(i)*r*h;o.setTripleAt(f,n,f+Math.cos(l)*a,n-Math.sin(l)*a,f+Math.cos(x)*g,n-Math.sin(x)*g,o.length())}function getPerpendicularVector(o,d){var i=[d[0]-o[0],d[1]-o[1]],r=-Math.PI*0.5,h=[Math.cos(r)*i[0]-Math.sin(r)*i[1],Math.sin(r)*i[0]+Math.cos(r)*i[1]];return h}function getProjectingAngle(o,d){var i=d===0?o.length()-1:d-1,r=(d+1)%o.length(),h=o.v[i],a=o.v[r],g=getPerpendicularVector(h,a);return Math.atan2(0,1)-Math.atan2(g[1],g[0])}function zigZagCorner(o,d,i,r,h,a,g){var l=getProjectingAngle(d,i),x=d.v[i%d._length],f=d.v[i===0?d._length-1:i-1],n=d.v[(i+1)%d._length],_=a===2?Math.sqrt(Math.pow(x[0]-f[0],2)+Math.pow(x[1]-f[1],2)):0,v=a===2?Math.sqrt(Math.pow(x[0]-n[0],2)+Math.pow(x[1]-n[1],2)):0;setPoint(o,d.v[i%d._length],l,g,r,v/((h+1)*2),_/((h+1)*2),a)}function zigZagSegment(o,d,i,r,h,a){for(var g=0;g<r;g+=1){var l=(g+1)/(r+1),x=h===2?Math.sqrt(Math.pow(d.points[3][0]-d.points[0][0],2)+Math.pow(d.points[3][1]-d.points[0][1],2)):0,f=d.normalAngle(l),n=d.point(l);setPoint(o,n,f,a,i,x/((r+1)*2),x/((r+1)*2),h),a=-a}return a}ZigZagModifier.prototype.processPath=function(o,d,i,r){var h=o._length,a=shapePool.newElement();if(a.c=o.c,!o.c)h-=1;if(h===0)return a;var g=-1,l=PolynomialBezier.shapeSegment(o,0);zigZagCorner(a,o,0,d,i,r,g);for(var x=0;x<h;x+=1){if(g=zigZagSegment(a,l,d,i,r,-g),x===h-1&&!o.c)l=null;else l=PolynomialBezier.shapeSegment(o,(x+1)%h);zigZagCorner(a,o,x+1,d,i,r,g)}return a},ZigZagModifier.prototype.processShapes=function(o){var d,i,r=this.shapes.length,h,a,g=this.amplitude.v,l=Math.max(0,Math.round(this.frequency.v)),x=this.pointsType.v;if(g!==0){var f,n;for(i=0;i<r;i+=1){if(f=this.shapes[i],n=f.localShapeCollection,!(!f.shape._mdf&&!this._mdf&&!o)){n.releaseShapes(),f.shape._mdf=!0,d=f.shape.paths.shapes,a=f.shape.paths._length;for(h=0;h<a;h+=1)n.addShape(this.processPath(d[h],g,l,x))}f.shape.paths=f.localShapeCollection}}if(!this.dynamicProperties.length)this._mdf=!1};function linearOffset(o,d,i){var r=Math.atan2(d[0]-o[0],d[1]-o[1]);return[polarOffset(o,r,i),polarOffset(d,r,i)]}function offsetSegment(o,d){var i,r,h,a,g,l,x;x=linearOffset(o.points[0],o.points[1],d),i=x[0],r=x[1],x=linearOffset(o.points[1],o.points[2],d),h=x[0],a=x[1],x=linearOffset(o.points[2],o.points[3],d),g=x[0],l=x[1];var f=lineIntersection(i,r,h,a);if(f===null)f=r;var n=lineIntersection(g,l,h,a);if(n===null)n=g;return new PolynomialBezier(i,f,n,l)}function joinLines(o,d,i,r,h){var a=d.points[3],g=i.points[0];if(r===3)return a;if(pointEqual(a,g))return a;if(r===2){var l=-d.tangentAngle(1),x=-i.tangentAngle(0)+Math.PI,f=lineIntersection(a,polarOffset(a,l+Math.PI/2,100),g,polarOffset(g,l+Math.PI/2,100)),n=f?pointDistance(f,a):pointDistance(a,g)/2,_=polarOffset(a,l,2*n*roundCorner);return o.setXYAt(_[0],_[1],"o",o.length()-1),_=polarOffset(g,x,2*n*roundCorner),o.setTripleAt(g[0],g[1],g[0],g[1],_[0],_[1],o.length()),g}var v=pointEqual(a,d.points[2])?d.points[0]:d.points[2],Y=pointEqual(g,i.points[1])?i.points[3]:i.points[1],H=lineIntersection(v,a,g,Y);if(H&&pointDistance(H,a)<h)return o.setTripleAt(H[0],H[1],H[0],H[1],H[0],H[1],o.length()),H;return a}function getIntersection(o,d){var i=o.intersections(d);if(i.length&&floatEqual(i[0][0],1))i.shift();if(i.length)return i[0];return null}function pruneSegmentIntersection(o,d){var i=o.slice(),r=d.slice(),h=getIntersection(o[o.length-1],d[0]);if(h)i[o.length-1]=o[o.length-1].split(h[0])[0],r[0]=d[0].split(h[1])[1];if(o.length>1&&d.length>1){if(h=getIntersection(o[0],d[d.length-1]),h)return[[o[0].split(h[0])[0]],[d[d.length-1].split(h[1])[1]]]}return[i,r]}function pruneIntersections(o){var d;for(var i=1;i<o.length;i+=1)d=pruneSegmentIntersection(o[i-1],o[i]),o[i-1]=d[0],o[i]=d[1];if(o.length>1)d=pruneSegmentIntersection(o[o.length-1],o[0]),o[o.length-1]=d[0],o[0]=d[1];return o}function offsetSegmentSplit(o,d){var i=o.inflectionPoints(),r,h,a,g;if(i.length===0)return[offsetSegment(o,d)];if(i.length===1||floatEqual(i[1],1))return a=o.split(i[0]),r=a[0],h=a[1],[offsetSegment(r,d),offsetSegment(h,d)];a=o.split(i[0]),r=a[0];var l=(i[1]-i[0])/(1-i[0]);return a=a[1].split(l),g=a[0],h=a[1],[offsetSegment(r,d),offsetSegment(g,d),offsetSegment(h,d)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(o,d){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(o,d.a,0,null,this),this.miterLimit=PropertyFactory.getProp(o,d.ml,0,null,this),this.lineJoin=d.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(o,d,i,r){var h=shapePool.newElement();h.c=o.c;var a=o.length();if(!o.c)a-=1;var g,l,x,f=[];for(g=0;g<a;g+=1)x=PolynomialBezier.shapeSegment(o,g),f.push(offsetSegmentSplit(x,d));if(!o.c)for(g=a-1;g>=0;g-=1)x=PolynomialBezier.shapeSegmentInverted(o,g),f.push(offsetSegmentSplit(x,d));f=pruneIntersections(f);var n=null,_=null;for(g=0;g<f.length;g+=1){var v=f[g];if(_)n=joinLines(h,_,v[0],i,r);_=v[v.length-1];for(l=0;l<v.length;l+=1){if(x=v[l],n&&pointEqual(x.points[0],n))h.setXYAt(x.points[1][0],x.points[1][1],"o",h.length()-1);else h.setTripleAt(x.points[0][0],x.points[0][1],x.points[1][0],x.points[1][1],x.points[0][0],x.points[0][1],h.length());h.setTripleAt(x.points[3][0],x.points[3][1],x.points[3][0],x.points[3][1],x.points[2][0],x.points[2][1],h.length()),n=x.points[3]}}if(f.length)joinLines(h,_,f[0][0],i,r);return h},OffsetPathModifier.prototype.processShapes=function(o){var d,i,r=this.shapes.length,h,a,g=this.amount.v,l=this.miterLimit.v,x=this.lineJoin;if(g!==0){var f,n;for(i=0;i<r;i+=1){if(f=this.shapes[i],n=f.localShapeCollection,!(!f.shape._mdf&&!this._mdf&&!o)){n.releaseShapes(),f.shape._mdf=!0,d=f.shape.paths.shapes,a=f.shape.paths._length;for(h=0;h<a;h+=1)n.addShape(this.processPath(d[h],g,x,l))}f.shape.paths=f.localShapeCollection}}if(!this.dynamicProperties.length)this._mdf=!1};function getFontProperties(o){var d=o.fStyle?o.fStyle.split(" "):[],i="normal",r="normal",h=d.length,a;for(var g=0;g<h;g+=1)switch(a=d[g].toLowerCase(),a){case"italic":r="italic";break;case"bold":i="700";break;case"black":i="900";break;case"medium":i="500";break;case"regular":case"normal":i="400";break;case"light":case"thin":i="200";break;default:break}return{style:r,weight:o.fWeight||i}}var FontManager=function(){var o=5000,d={w:0,size:0,shapes:[],data:{shapes:[]}},i=[];i=i.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=127988,h=917631,a=917601,g=917626,l=65039,x=8205,f=127462,n=127487,_=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function v(Q){var W=Q.split(","),w,J=W.length,R=[];for(w=0;w<J;w+=1)if(W[w]!=="sans-serif"&&W[w]!=="monospace")R.push(W[w]);return R.join(",")}function Y(Q,W){var w=createTag("span");w.setAttribute("aria-hidden",!0),w.style.fontFamily=W;var J=createTag("span");J.innerText="giItT1WQy@!-/#",w.style.position="absolute",w.style.left="-10000px",w.style.top="-10000px",w.style.fontSize="300px",w.style.fontVariant="normal",w.style.fontStyle="normal",w.style.fontWeight="normal",w.style.letterSpacing="0",w.appendChild(J),document.body.appendChild(w);var R=J.offsetWidth;return J.style.fontFamily=v(Q)+", "+W,{node:J,w:R,parent:w}}function H(){var Q,W=this.fonts.length,w,J,R=W;for(Q=0;Q<W;Q+=1)if(this.fonts[Q].loaded)R-=1;else if(this.fonts[Q].fOrigin==="n"||this.fonts[Q].origin===0)this.fonts[Q].loaded=!0;else{if(w=this.fonts[Q].monoCase.node,J=this.fonts[Q].monoCase.w,w.offsetWidth!==J)R-=1,this.fonts[Q].loaded=!0;else if(w=this.fonts[Q].sansCase.node,J=this.fonts[Q].sansCase.w,w.offsetWidth!==J)R-=1,this.fonts[Q].loaded=!0;if(this.fonts[Q].loaded)this.fonts[Q].sansCase.parent.parentNode.removeChild(this.fonts[Q].sansCase.parent),this.fonts[Q].monoCase.parent.parentNode.removeChild(this.fonts[Q].monoCase.parent)}if(R!==0&&Date.now()-this.initTime<o)setTimeout(this.checkLoadedFontsBinded,20);else setTimeout(this.setIsLoadedBinded,10)}function $(Q,W){var w=document.body&&W?"svg":"canvas",J,R=getFontProperties(Q);if(w==="svg"){var G=createNS("text");if(G.style.fontSize="100px",G.setAttribute("font-family",Q.fFamily),G.setAttribute("font-style",R.style),G.setAttribute("font-weight",R.weight),G.textContent="1",Q.fClass)G.style.fontFamily="inherit",G.setAttribute("class",Q.fClass);else G.style.fontFamily=Q.fFamily;W.appendChild(G),J=G}else{var D=new OffscreenCanvas(500,500).getContext("2d");D.font=R.style+" "+R.weight+" 100px "+Q.fFamily,J=D}function E(t){if(w==="svg")return J.textContent=t,J.getComputedTextLength();return J.measureText(t).width}return{measureText:E}}function I(Q,W){if(!Q){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=Q.list;return}if(!document.body){this.isLoaded=!0,Q.list.forEach(function(Z0){Z0.helper=$(Z0),Z0.cache={}}),this.fonts=Q.list;return}var w=Q.list,J,R=w.length,G=R;for(J=0;J<R;J+=1){var D=!0,E,t;if(w[J].loaded=!1,w[J].monoCase=Y(w[J].fFamily,"monospace"),w[J].sansCase=Y(w[J].fFamily,"sans-serif"),!w[J].fPath)w[J].loaded=!0,G-=1;else if(w[J].fOrigin==="p"||w[J].origin===3){if(E=document.querySelectorAll('style[f-forigin="p"][f-family="'+w[J].fFamily+'"], style[f-origin="3"][f-family="'+w[J].fFamily+'"]'),E.length>0)D=!1;if(D){var m=createTag("style");m.setAttribute("f-forigin",w[J].fOrigin),m.setAttribute("f-origin",w[J].origin),m.setAttribute("f-family",w[J].fFamily),m.type="text/css",m.innerText="@font-face {font-family: "+w[J].fFamily+"; font-style: normal; src: url('"+w[J].fPath+"');}",W.appendChild(m)}}else if(w[J].fOrigin==="g"||w[J].origin===1){E=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');for(t=0;t<E.length;t+=1)if(E[t].href.indexOf(w[J].fPath)!==-1)D=!1;if(D){var d0=createTag("link");d0.setAttribute("f-forigin",w[J].fOrigin),d0.setAttribute("f-origin",w[J].origin),d0.type="text/css",d0.rel="stylesheet",d0.href=w[J].fPath,document.body.appendChild(d0)}}else if(w[J].fOrigin==="t"||w[J].origin===2){E=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');for(t=0;t<E.length;t+=1)if(w[J].fPath===E[t].src)D=!1;if(D){var g0=createTag("link");g0.setAttribute("f-forigin",w[J].fOrigin),g0.setAttribute("f-origin",w[J].origin),g0.setAttribute("rel","stylesheet"),g0.setAttribute("href",w[J].fPath),W.appendChild(g0)}}w[J].helper=$(w[J],W),w[J].cache={},this.fonts.push(w[J])}if(G===0)this.isLoaded=!0;else setTimeout(this.checkLoadedFonts.bind(this),100)}function Z(Q){if(!Q)return;if(!this.chars)this.chars=[];var W,w=Q.length,J,R=this.chars.length,G;for(W=0;W<w;W+=1){J=0,G=!1;while(J<R){if(this.chars[J].style===Q[W].style&&this.chars[J].fFamily===Q[W].fFamily&&this.chars[J].ch===Q[W].ch)G=!0;J+=1}if(!G)this.chars.push(Q[W]),R+=1}}function c(Q,W,w){var J=0,R=this.chars.length;while(J<R){if(this.chars[J].ch===Q&&this.chars[J].style===W&&this.chars[J].fFamily===w)return this.chars[J];J+=1}if((typeof Q==="string"&&Q.charCodeAt(0)!==13||!Q)&&console&&console.warn&&!this._warned)this._warned=!0,console.warn("Missing character from exported characters list: ",Q,W,w);return d}function z(Q,W,w){var J=this.getFontByName(W),R=Q;if(!J.cache[R]){var G=J.helper;if(Q===" "){var D=G.measureText("|"+Q+"|"),E=G.measureText("||");J.cache[R]=(D-E)/100}else J.cache[R]=G.measureText(Q)/100}return J.cache[R]*w}function k(Q){var W=0,w=this.fonts.length;while(W<w){if(this.fonts[W].fName===Q)return this.fonts[W];W+=1}return this.fonts[0]}function X(Q){var W=0,w=Q.charCodeAt(0);if(w>=55296&&w<=56319){var J=Q.charCodeAt(1);if(J>=56320&&J<=57343)W=(w-55296)*1024+J-56320+65536}return W}function V(Q,W){var w=Q.toString(16)+W.toString(16);return _.indexOf(w)!==-1}function u(Q){return Q===x}function p(Q){return Q===l}function U(Q){var W=X(Q);if(W>=f&&W<=n)return!0;return!1}function F(Q){return U(Q.substr(0,2))&&U(Q.substr(2,2))}function L(Q){return i.indexOf(Q)!==-1}function j(Q,W){var w=X(Q.substr(W,2));if(w!==r)return!1;var J=0;W+=2;while(J<5){if(w=X(Q.substr(W,2)),w<a||w>g)return!1;J+=1,W+=2}return X(Q.substr(W,2))===h}function C(){this.isLoaded=!0}var T=function Q(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};T.isModifier=V,T.isZeroWidthJoiner=u,T.isFlagEmoji=F,T.isRegionalCode=U,T.isCombinedCharacter=L,T.isRegionalFlag=j,T.isVariationSelector=p,T.BLACK_FLAG_CODE_POINT=r;var K={addChars:Z,addFonts:I,getCharData:c,getFontByName:k,measureText:z,checkLoadedFonts:H,setIsLoaded:C};return T.prototype=K,T}();function SlotManager(o){this.animationData=o}SlotManager.prototype.getProp=function(o){if(this.animationData.slots&&this.animationData.slots[o.sid])return Object.assign(o,this.animationData.slots[o.sid].p);return o};function slotFactory(o){return new SlotManager(o)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function o(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function o(d){if(this.renderableComponents.indexOf(d)===-1)this.renderableComponents.push(d)},removeRenderableComponent:function o(d){if(this.renderableComponents.indexOf(d)!==-1)this.renderableComponents.splice(this.renderableComponents.indexOf(d),1)},prepareRenderableFrame:function o(d){this.checkLayerLimits(d)},checkTransparency:function o(){if(this.finalTransform.mProp.o.v<=0){if(!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent)this.isTransparent=!0,this.hide()}else if(this.isTransparent)this.isTransparent=!1,this.show()},checkLayerLimits:function o(d){if(this.data.ip-this.data.st<=d&&this.data.op-this.data.st>d){if(this.isInRange!==!0)this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()}else if(this.isInRange!==!1)this.globalData._mdf=!0,this.isInRange=!1,this.hide()},renderRenderable:function o(){var d,i=this.renderableComponents.length;for(d=0;d<i;d+=1)this.renderableComponents[d].renderFrame(this._isFirstFrame)},sourceRectAtTime:function o(){return{top:0,left:0,width:100,height:100}},getLayerSize:function o(){if(this.data.ty===5)return{w:this.data.textData.width,h:this.data.textData.height};return{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var o={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(d){return o[d]||""}}();function SliderEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,0,0,i)}function AngleEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,0,0,i)}function ColorEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,1,0,i)}function PointEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,1,0,i)}function LayerIndexEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,0,0,i)}function MaskIndexEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,0,0,i)}function CheckboxEffect(o,d,i){this.p=PropertyFactory.getProp(d,o.v,0,0,i)}function NoValueEffect(){this.p={}}function EffectsManager(o,d){var i=o.ef||[];this.effectElements=[];var r,h=i.length,a;for(r=0;r<h;r+=1)a=new GroupEffect(i[r],d),this.effectElements.push(a)}function GroupEffect(o,d){this.init(o,d)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(o,d){this.data=o,this.effectElements=[],this.initDynamicPropertyContainer(d);var i,r=this.data.ef.length,h,a=this.data.ef;for(i=0;i<r;i+=1){switch(h=null,a[i].ty){case 0:h=new SliderEffect(a[i],d,this);break;case 1:h=new AngleEffect(a[i],d,this);break;case 2:h=new ColorEffect(a[i],d,this);break;case 3:h=new PointEffect(a[i],d,this);break;case 4:case 7:h=new CheckboxEffect(a[i],d,this);break;case 10:h=new LayerIndexEffect(a[i],d,this);break;case 11:h=new MaskIndexEffect(a[i],d,this);break;case 5:h=new EffectsManager(a[i],d,this);break;default:h=new NoValueEffect(a[i],d,this);break}if(h)this.effectElements.push(h)}};function BaseElement(){}BaseElement.prototype={checkMasks:function o(){if(!this.data.hasMask)return!1;var d=0,i=this.data.masksProperties.length;while(d<i){if(this.data.masksProperties[d].mode!=="n"&&this.data.masksProperties[d].cl!==!1)return!0;d+=1}return!1},initExpressions:function o(){var d=getExpressionInterfaces();if(!d)return;var i=d("layer"),r=d("effects"),h=d("shape"),a=d("text"),g=d("comp");if(this.layerInterface=i(this),this.data.hasMask&&this.maskManager)this.layerInterface.registerMaskInterface(this.maskManager);var l=r.createEffectsInterface(this,this.layerInterface);if(this.layerInterface.registerEffectsInterface(l),this.data.ty===0||this.data.xt)this.compInterface=g(this);else if(this.data.ty===4)this.layerInterface.shapeInterface=h(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface;else if(this.data.ty===5)this.layerInterface.textInterface=a(this),this.layerInterface.text=this.layerInterface.textInterface},setBlendMode:function o(){var d=getBlendMode(this.data.bm),i=this.baseElement||this.layerElement;i.style["mix-blend-mode"]=d},initBaseData:function o(d,i,r){if(this.globalData=i,this.comp=r,this.data=d,this.layerId=createElementID(),!this.data.sr)this.data.sr=1;this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function o(){return this.type},sourceRectAtTime:function o(){}};function FrameElement(){}FrameElement.prototype={initFrame:function o(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function o(d,i){var r,h=this.dynamicProperties.length;for(r=0;r<h;r+=1)if(i||this._isParent&&this.dynamicProperties[r].propType==="transform"){if(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf)this.globalData._mdf=!0,this._mdf=!0}},addDynamicProperty:function o(d){if(this.dynamicProperties.indexOf(d)===-1)this.dynamicProperties.push(d)}};function FootageElement(o,d,i){this.initFrame(),this.initRenderable(),this.assetData=d.getAssetData(o.refId),this.footageData=d.imageLoader.getAsset(this.assetData),this.initBaseData(o,d,i)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var o=getExpressionInterfaces();if(!o)return;var d=o("footage");this.layerInterface=d(this)},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(o,d,i){this.initFrame(),this.initRenderable(),this.assetData=d.getAssetData(o.refId),this.initBaseData(o,d,i),this._isPlaying=!1,this._canPlay=!1;var r=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(r),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,d.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,o.au&&o.au.lv?o.au.lv:{k:[100]},1,0.01,this)}AudioElement.prototype.prepareFrame=function(o){if(this.prepareRenderableFrame(o,!0),this.prepareProperties(o,!0),!this.tm._placeholder){var d=this.tm.v;this._currentTime=d}else this._currentTime=o/this.data.sr;this._volume=this.lv.v[0];var i=this._volume*this._volumeMultiplier;if(this._previousVolume!==i)this._previousVolume=i,this.audio.volume(i)},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){if(this.isInRange&&this._canPlay){if(!this._isPlaying)this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0;else if(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>0.1)this.audio.seek(this._currentTime/this.globalData.frameRate)}},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(o){this.audio.rate(o)},AudioElement.prototype.volume=function(o){this._volumeMultiplier=o,this._previousVolume=o*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(o){var d,i=this.layers.length,r;this.completeLayers=!0;for(d=i-1;d>=0;d-=1){if(!this.elements[d]){if(r=this.layers[d],r.ip-r.st<=o-this.layers[d].st&&r.op-r.st>o-this.layers[d].st)this.buildItem(d)}this.completeLayers=this.elements[d]?this.completeLayers:!1}this.checkPendingElements()},BaseRenderer.prototype.createItem=function(o){switch(o.ty){case 2:return this.createImage(o);case 0:return this.createComp(o);case 1:return this.createSolid(o);case 3:return this.createNull(o);case 4:return this.createShape(o);case 5:return this.createText(o);case 6:return this.createAudio(o);case 13:return this.createCamera(o);case 15:return this.createFootage(o);default:return this.createNull(o)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(o){return new AudioElement(o,this.globalData,this)},BaseRenderer.prototype.createFootage=function(o){return new FootageElement(o,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var o,d=this.layers.length;for(o=0;o<d;o+=1)this.buildItem(o);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(o){this.completeLayers=!1;var d,i=o.length,r,h=this.layers.length;for(d=0;d<i;d+=1){r=0;while(r<h){if(this.layers[r].id===o[d].id){this.layers[r]=o[d];break}r+=1}}},BaseRenderer.prototype.setProjectInterface=function(o){this.globalData.projectInterface=o},BaseRenderer.prototype.initItems=function(){if(!this.globalData.progressiveLoad)this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(o,d,i){var r=this.elements,h=this.layers,a=0,g=h.length;while(a<g){if(h[a].ind==d)if(!r[a]||r[a]===!0)this.buildItem(a),this.addPendingElement(o);else if(i.push(r[a]),r[a].setAsParent(),h[a].parent!==void 0)this.buildElementParenting(o,h[a].parent,i);else o.setHierarchy(i);a+=1}},BaseRenderer.prototype.addPendingElement=function(o){this.pendingElements.push(o)},BaseRenderer.prototype.searchExtraCompositions=function(o){var d,i=o.length;for(d=0;d<i;d+=1)if(o[d].xt){var r=this.createComp(o[d]);r.initExpressions(),this.globalData.projectInterface.registerComposition(r)}},BaseRenderer.prototype.getElementById=function(o){var d,i=this.elements.length;for(d=0;d<i;d+=1)if(this.elements[d].data.ind===o)return this.elements[d];return null},BaseRenderer.prototype.getElementByPath=function(o){var d=o.shift(),i;if(typeof d==="number")i=this.elements[d];else{var r,h=this.elements.length;for(r=0;r<h;r+=1)if(this.elements[r].data.nm===d){i=this.elements[r];break}}if(o.length===0)return i;return i.getElementByPath(o)},BaseRenderer.prototype.setupGlobalData=function(o,d){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(o),this.globalData.fontManager.addChars(o.chars),this.globalData.fontManager.addFonts(o.fonts,d),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=o.fr,this.globalData.nm=o.nm,this.globalData.compSize={w:o.w,h:o.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}TransformElement.prototype={initTransform:function o(){var d=new Matrix;if(this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:d,localMat:d,localOpacity:1},this.data.ao)this.finalTransform.mProp.autoOriented=!0;if(this.data.ty!==11);},renderTransform:function o(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var d,i=this.finalTransform.mat,r=0,h=this.hierarchy.length;if(!this.finalTransform._matMdf)while(r<h){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf){d=this.finalTransform.mProp.v.props,i.cloneFromProps(d);for(r=0;r<h;r+=1)i.multiply(this.hierarchy[r].finalTransform.mProp.v)}}if(!this.localTransforms||this.finalTransform._matMdf)this.finalTransform._localMatMdf=this.finalTransform._matMdf;if(this.finalTransform._opMdf)this.finalTransform.localOpacity=this.finalTransform.mProp.o.v},renderLocalTransform:function o(){if(this.localTransforms){var d=0,i=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)while(d<i){if(this.localTransforms[d]._mdf)this.finalTransform._localMatMdf=!0;if(this.localTransforms[d]._opMdf&&!this.finalTransform._opMdf)this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0;d+=1}if(this.finalTransform._localMatMdf){var r=this.finalTransform.localMat;this.localTransforms[0].matrix.clone(r);for(d=1;d<i;d+=1){var h=this.localTransforms[d].matrix;r.multiply(h)}r.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var a=this.finalTransform.localOpacity;for(d=0;d<i;d+=1)a*=this.localTransforms[d].opacity*0.01;this.finalTransform.localOpacity=a}}},searchEffectTransforms:function o(){if(this.renderableEffectsManager){var d=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(d.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var i=0,r=d.length;for(i=0;i<r;i+=1)this.localTransforms.push(d[i])}}},globalToLocal:function o(d){var i=[];i.push(this.finalTransform);var r=!0,h=this.comp;while(r)if(h.finalTransform){if(h.data.hasMask)i.splice(0,0,h.finalTransform);h=h.comp}else r=!1;var a,g=i.length,l;for(a=0;a<g;a+=1)l=i[a].mat.applyToPointArray(0,0,0),d=[d[0]-l[0],d[1]-l[1],0];return d},mHelper:new Matrix};function MaskElement(o,d,i){this.data=o,this.element=d,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var r=this.globalData.defs,h,a=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(a),this.solidPath="";var g,l=this.masksProperties,x=0,f=[],n,_,v=createElementID(),Y,H,$,I,Z="clipPath",c="clip-path";for(h=0;h<a;h+=1){if(l[h].mode!=="a"&&l[h].mode!=="n"||l[h].inv||l[h].o.k!==100||l[h].o.x)Z="mask",c="mask";if((l[h].mode==="s"||l[h].mode==="i")&&x===0)Y=createNS("rect"),Y.setAttribute("fill","#ffffff"),Y.setAttribute("width",this.element.comp.data.w||0),Y.setAttribute("height",this.element.comp.data.h||0),f.push(Y);else Y=null;if(g=createNS("path"),l[h].mode==="n")this.viewData[h]={op:PropertyFactory.getProp(this.element,l[h].o,0,0.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,l[h],3),elem:g,lastPath:""},r.appendChild(g);else{x+=1,g.setAttribute("fill",l[h].mode==="s"?"#000000":"#ffffff"),g.setAttribute("clip-rule","nonzero");var z;if(l[h].x.k!==0)Z="mask",c="mask",I=PropertyFactory.getProp(this.element,l[h].x,0,null,this.element),z=createElementID(),H=createNS("filter"),H.setAttribute("id",z),$=createNS("feMorphology"),$.setAttribute("operator","erode"),$.setAttribute("in","SourceGraphic"),$.setAttribute("radius","0"),H.appendChild($),r.appendChild(H),g.setAttribute("stroke",l[h].mode==="s"?"#000000":"#ffffff");else $=null,I=null;if(this.storedData[h]={elem:g,x:I,expan:$,lastPath:"",lastOperator:"",filterId:z,lastRadius:0},l[h].mode==="i"){_=f.length;var k=createNS("g");for(n=0;n<_;n+=1)k.appendChild(f[n]);var X=createNS("mask");X.setAttribute("mask-type","alpha"),X.setAttribute("id",v+"_"+x),X.appendChild(g),r.appendChild(X),k.setAttribute("mask","url("+getLocationHref()+"#"+v+"_"+x+")"),f.length=0,f.push(k)}else f.push(g);if(l[h].inv&&!this.solidPath)this.solidPath=this.createLayerSolidPath();if(this.viewData[h]={elem:g,lastPath:"",op:PropertyFactory.getProp(this.element,l[h].o,0,0.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,l[h],3),invRect:Y},!this.viewData[h].prop.k)this.drawPath(l[h],this.viewData[h].prop.v,this.viewData[h])}}this.maskElement=createNS(Z),a=f.length;for(h=0;h<a;h+=1)this.maskElement.appendChild(f[h]);if(x>0)this.maskElement.setAttribute("id",v),this.element.maskedElement.setAttribute(c,"url("+getLocationHref()+"#"+v+")"),r.appendChild(this.maskElement);if(this.viewData.length)this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(o){return this.viewData[o].prop},MaskElement.prototype.renderFrame=function(o){var d=this.element.finalTransform.mat,i,r=this.masksProperties.length;for(i=0;i<r;i+=1){if(this.viewData[i].prop._mdf||o)this.drawPath(this.masksProperties[i],this.viewData[i].prop.v,this.viewData[i]);if(this.viewData[i].op._mdf||o)this.viewData[i].elem.setAttribute("fill-opacity",this.viewData[i].op.v);if(this.masksProperties[i].mode!=="n"){if(this.viewData[i].invRect&&(this.element.finalTransform.mProp._mdf||o))this.viewData[i].invRect.setAttribute("transform",d.getInverseMatrix().to2dCSS());if(this.storedData[i].x&&(this.storedData[i].x._mdf||o)){var h=this.storedData[i].expan;if(this.storedData[i].x.v<0){if(this.storedData[i].lastOperator!=="erode")this.storedData[i].lastOperator="erode",this.storedData[i].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[i].filterId+")");h.setAttribute("radius",-this.storedData[i].x.v)}else{if(this.storedData[i].lastOperator!=="dilate")this.storedData[i].lastOperator="dilate",this.storedData[i].elem.setAttribute("filter",null);this.storedData[i].elem.setAttribute("stroke-width",this.storedData[i].x.v*2)}}}}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var o="M0,0 ";return o+=" h"+this.globalData.compSize.w,o+=" v"+this.globalData.compSize.h,o+=" h-"+this.globalData.compSize.w,o+=" v-"+this.globalData.compSize.h+" ",o},MaskElement.prototype.drawPath=function(o,d,i){var r=" M"+d.v[0][0]+","+d.v[0][1],h,a;a=d._length;for(h=1;h<a;h+=1)r+=" C"+d.o[h-1][0]+","+d.o[h-1][1]+" "+d.i[h][0]+","+d.i[h][1]+" "+d.v[h][0]+","+d.v[h][1];if(d.c&&a>1)r+=" C"+d.o[h-1][0]+","+d.o[h-1][1]+" "+d.i[0][0]+","+d.i[0][1]+" "+d.v[0][0]+","+d.v[0][1];if(i.lastPath!==r){var g="";if(i.elem){if(d.c)g=o.inv?this.solidPath+r:r;i.elem.setAttribute("d",g)}i.lastPath=r}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var o={};o.createFilter=d,o.createAlphaToLuminanceFilter=i;function d(r,h){var a=createNS("filter");if(a.setAttribute("id",r),h!==!0)a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%");return a}function i(){var r=createNS("feColorMatrix");return r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),r}return o}(),featureSupport=function(){var o={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas!=="undefined"};if(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))o.maskType=!1;if(/firefox/i.test(navigator.userAgent))o.svgLumaHidden=!1;return o}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(o){var d,i="SourceGraphic",r=o.data.ef?o.data.ef.length:0,h=createElementID(),a=filtersFactory.createFilter(h,!0),g=0;this.filters=[];var l;for(d=0;d<r;d+=1){l=null;var x=o.data.ef[d].ty;if(registeredEffects$1[x]){var f=registeredEffects$1[x].effect;if(l=new f(a,o.effectsManager.effectElements[d],o,idPrefix+g,i),i=idPrefix+g,registeredEffects$1[x].countsAsEffect)g+=1}if(l)this.filters.push(l)}if(g)o.globalData.defs.appendChild(a),o.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+h+")");if(this.filters.length)o.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(o){var d,i=this.filters.length;for(d=0;d<i;d+=1)this.filters[d].renderFrame(o)},SVGEffects.prototype.getEffects=function(o){var d,i=this.filters.length,r=[];for(d=0;d<i;d+=1)if(this.filters[d].type===o)r.push(this.filters[d]);return r};function registerEffect$1(o,d,i){registeredEffects$1[o]={effect:d,countsAsEffect:i}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function o(){this.layerElement=createNS("g")},createContainerElements:function o(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var d=null;if(this.data.td){this.matteMasks={};var i=createNS("g");i.setAttribute("id",this.layerId),i.appendChild(this.layerElement),d=i,this.globalData.defs.appendChild(i)}else if(this.data.tt)this.matteElement.appendChild(this.layerElement),d=this.matteElement,this.baseElement=this.matteElement;else this.baseElement=this.layerElement;if(this.data.ln)this.layerElement.setAttribute("id",this.data.ln);if(this.data.cl)this.layerElement.setAttribute("class",this.data.cl);if(this.data.ty===0&&!this.data.hd){var r=createNS("clipPath"),h=createNS("path");h.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var a=createElementID();if(r.setAttribute("id",a),r.appendChild(h),this.globalData.defs.appendChild(r),this.checkMasks()){var g=createNS("g");if(g.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")"),g.appendChild(this.layerElement),this.transformedElement=g,d)d.appendChild(this.transformedElement);else this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")")}if(this.data.bm!==0)this.setBlendMode()},renderElement:function o(){if(this.finalTransform._localMatMdf)this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS());if(this.finalTransform._opMdf)this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function o(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function o(){if(this.data.hd)return null;return this.baseElement},createRenderableComponents:function o(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function o(d){if(!this.matteMasks)this.matteMasks={};if(!this.matteMasks[d]){var i=this.layerId+"_"+d,r,h,a,g;if(d===1||d===3){var l=createNS("mask");if(l.setAttribute("id",i),l.setAttribute("mask-type",d===3?"luminance":"alpha"),a=createNS("use"),a.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(a),this.globalData.defs.appendChild(l),!featureSupport.maskType&&d===1)l.setAttribute("mask-type","luminance"),r=createElementID(),h=filtersFactory.createFilter(r),this.globalData.defs.appendChild(h),h.appendChild(filtersFactory.createAlphaToLuminanceFilter()),g=createNS("g"),g.appendChild(a),l.appendChild(g),g.setAttribute("filter","url("+getLocationHref()+"#"+r+")")}else if(d===2){var x=createNS("mask");x.setAttribute("id",i),x.setAttribute("mask-type","alpha");var f=createNS("g");x.appendChild(f),r=createElementID(),h=filtersFactory.createFilter(r);var n=createNS("feComponentTransfer");n.setAttribute("in","SourceGraphic"),h.appendChild(n);var _=createNS("feFuncA");_.setAttribute("type","table"),_.setAttribute("tableValues","1.0 0.0"),n.appendChild(_),this.globalData.defs.appendChild(h);var v=createNS("rect");if(v.setAttribute("width",this.comp.data.w),v.setAttribute("height",this.comp.data.h),v.setAttribute("x","0"),v.setAttribute("y","0"),v.setAttribute("fill","#ffffff"),v.setAttribute("opacity","0"),f.setAttribute("filter","url("+getLocationHref()+"#"+r+")"),f.appendChild(v),a=createNS("use"),a.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),f.appendChild(a),!featureSupport.maskType)x.setAttribute("mask-type","luminance"),h.appendChild(filtersFactory.createAlphaToLuminanceFilter()),g=createNS("g"),f.appendChild(v),g.appendChild(this.layerElement),f.appendChild(g);this.globalData.defs.appendChild(x)}this.matteMasks[d]=i}return this.matteMasks[d]},setMatte:function o(d){if(!this.matteElement)return;this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+d+")")}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function o(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function o(d){this.hierarchy=d},setAsParent:function o(){this._isParent=!0},checkParenting:function o(){if(this.data.parent!==void 0)this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){var o={initElement:function d(i,r,h){this.initFrame(),this.initBaseData(i,r,h),this.initTransform(i,r,h),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function d(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var i=this.baseElement||this.layerElement;i.style.display="none",this.hidden=!0}},show:function d(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var i=this.baseElement||this.layerElement;i.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function d(){if(this.data.hd||this.hidden)return;if(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame)this._isFirstFrame=!1},renderInnerContent:function d(){},prepareFrame:function d(i){this._mdf=!1,this.prepareRenderableFrame(i),this.prepareProperties(i,this.isInRange),this.checkTransparency()},destroy:function d(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(o)],RenderableDOMElement)})();function IImageElement(o,d,i){if(this.assetData=d.getAssetData(o.refId),this.assetData&&this.assetData.sid)this.assetData=d.slotManager.getProp(this.assetData);this.initElement(o,d,i),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var o=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",o),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(o,d){this.elem=o,this.pos=d}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function o(d){var i,r=this.shapeModifiers.length;for(i=0;i<r;i+=1)this.shapeModifiers[i].addShape(d)},isShapeInAnimatedModifiers:function o(d){var i=0,r=this.shapeModifiers.length;while(i<r)if(this.shapeModifiers[i].isAnimatedWithShape(d))return!0;return!1},renderModifiers:function o(){if(!this.shapeModifiers.length)return;var d,i=this.shapes.length;for(d=0;d<i;d+=1)this.shapes[d].sh.reset();i=this.shapeModifiers.length;var r;for(d=i-1;d>=0;d-=1)if(r=this.shapeModifiers[d].processShapes(this._isFirstFrame),r)break},searchProcessedElement:function o(d){var i=this.processedElements,r=0,h=i.length;while(r<h){if(i[r].elem===d)return i[r].pos;r+=1}return 0},addProcessedElement:function o(d,i){var r=this.processedElements,h=r.length;while(h)if(h-=1,r[h].elem===d){r[h].pos=i;return}r.push(new ProcessedElement(d,i))},prepareFrame:function o(d){this.prepareRenderableFrame(d),this.prepareProperties(d,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(o,d,i){this.caches=[],this.styles=[],this.transformers=o,this.lStr="",this.sh=i,this.lvl=d,this._isAnimated=!!i.k;var r=0,h=o.length;while(r<h){if(o[r].mProps.dynamicProperties.length){this._isAnimated=!0;break}r+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(o,d){this.data=o,this.type=o.ty,this.d="",this.lvl=d,this._mdf=!1,this.closed=o.hd===!0,this.pElem=createNS("path"),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1};function DashProperty(o,d,i,r){this.elem=o,this.frameId=-1,this.dataProps=createSizedArray(d.length),this.renderer=i,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",d.length?d.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(r);var h,a=d.length||0,g;for(h=0;h<a;h+=1)g=PropertyFactory.getProp(o,d[h].v,0,0,this),this.k=g.k||this.k,this.dataProps[h]={n:d[h].n,p:g};if(!this.k)this.getValue(!0);this._isAnimated=this.k}DashProperty.prototype.getValue=function(o){if(this.elem.globalData.frameId===this.frameId&&!o)return;if(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||o,this._mdf){var d=0,i=this.dataProps.length;if(this.renderer==="svg")this.dashStr="";for(d=0;d<i;d+=1)if(this.dataProps[d].n!=="o")if(this.renderer==="svg")this.dashStr+=" "+this.dataProps[d].p.v;else this.dashArray[d]=this.dataProps[d].p.v;else this.dashoffset[0]=this.dataProps[d].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(o,d,i){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(o,d.o,0,0.01,this),this.w=PropertyFactory.getProp(o,d.w,0,null,this),this.d=new DashProperty(o,d.d||{},"svg",this),this.c=PropertyFactory.getProp(o,d.c,1,255,this),this.style=i,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(o,d,i){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(o,d.o,0,0.01,this),this.c=PropertyFactory.getProp(o,d.c,1,255,this),this.style=i}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(o,d,i){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.style=i}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(o,d,i){this.data=d,this.c=createTypedArray("uint8c",d.p*4);var r=d.k.k[0].s?d.k.k[0].s.length-d.p*4:d.k.k.length-d.p*4;this.o=createTypedArray("float32",r),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=r,this.initDynamicPropertyContainer(i),this.prop=PropertyFactory.getProp(o,d.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(o,d){var i=0,r=this.o.length/2,h;while(i<r){if(h=Math.abs(o[i*4]-o[d*4+i*2]),h>0.01)return!1;i+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s){var o=0,d=this.data.k.k.length;while(o<d){if(!this.comparePoints(this.data.k.k[o].s,this.data.p))return!1;o+=1}}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(o){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||o){var d,i=this.data.p*4,r,h;for(d=0;d<i;d+=1)if(r=d%4===0?100:255,h=Math.round(this.prop.v[d]*r),this.c[d]!==h)this.c[d]=h,this._cmdf=!o;if(this.o.length){i=this.prop.v.length;for(d=this.data.p*4;d<i;d+=1)if(r=d%2===0?100:1,h=d%2===0?Math.round(this.prop.v[d]*100):this.prop.v[d],this.o[d-this.data.p*4]!==h)this.o[d-this.data.p*4]=h,this._omdf=!o}this._mdf=!o}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(o,d,i){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.initGradientData(o,d,i)}SVGGradientFillStyleData.prototype.initGradientData=function(o,d,i){this.o=PropertyFactory.getProp(o,d.o,0,0.01,this),this.s=PropertyFactory.getProp(o,d.s,1,null,this),this.e=PropertyFactory.getProp(o,d.e,1,null,this),this.h=PropertyFactory.getProp(o,d.h||{k:0},0,0.01,this),this.a=PropertyFactory.getProp(o,d.a||{k:0},0,degToRads,this),this.g=new GradientProperty(o,d.g,this),this.style=i,this.stops=[],this.setGradientData(i.pElem,d),this.setGradientOpacity(d,i),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(o,d){var i=createElementID(),r=createNS(d.t===1?"linearGradient":"radialGradient");r.setAttribute("id",i),r.setAttribute("spreadMethod","pad"),r.setAttribute("gradientUnits","userSpaceOnUse");var h=[],a,g,l;l=d.g.p*4;for(g=0;g<l;g+=4)a=createNS("stop"),r.appendChild(a),h.push(a);o.setAttribute(d.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+i+")"),this.gf=r,this.cst=h},SVGGradientFillStyleData.prototype.setGradientOpacity=function(o,d){if(this.g._hasOpacity&&!this.g._collapsable){var i,r,h,a=createNS("mask"),g=createNS("path");a.appendChild(g);var l=createElementID(),x=createElementID();a.setAttribute("id",x);var f=createNS(o.t===1?"linearGradient":"radialGradient");f.setAttribute("id",l),f.setAttribute("spreadMethod","pad"),f.setAttribute("gradientUnits","userSpaceOnUse"),h=o.g.k.k[0].s?o.g.k.k[0].s.length:o.g.k.k.length;var n=this.stops;for(r=o.g.p*4;r<h;r+=2)i=createNS("stop"),i.setAttribute("stop-color","rgb(255,255,255)"),f.appendChild(i),n.push(i);if(g.setAttribute(o.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+l+")"),o.ty==="gs"){if(g.setAttribute("stroke-linecap",lineCapEnum[o.lc||2]),g.setAttribute("stroke-linejoin",lineJoinEnum[o.lj||2]),o.lj===1)g.setAttribute("stroke-miterlimit",o.ml)}this.of=f,this.ms=a,this.ost=n,this.maskId=x,d.msElem=g}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(o,d,i){this.initDynamicPropertyContainer(o),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(o,d.w,0,null,this),this.d=new DashProperty(o,d.d||{},"svg",this),this.initGradientData(o,d,i),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(o,d,i){this.transform={mProps:o,op:d,container:i},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function o(d,i,r,h){if(i===0)return"";var{o:a,i:g,v:l}=d,x,f=" M"+h.applyToPointStringified(l[0][0],l[0][1]);for(x=1;x<i;x+=1)f+=" C"+h.applyToPointStringified(a[x-1][0],a[x-1][1])+" "+h.applyToPointStringified(g[x][0],g[x][1])+" "+h.applyToPointStringified(l[x][0],l[x][1]);if(r&&i)f+=" C"+h.applyToPointStringified(a[x-1][0],a[x-1][1])+" "+h.applyToPointStringified(g[0][0],g[0][1])+" "+h.applyToPointStringified(l[0][0],l[0][1]),f+="z";return f},SVGElementsRenderer=function(){var o=new Matrix,d=new Matrix,i={createRenderFunction:r};function r(_){switch(_.ty){case"fl":return l;case"gf":return f;case"gs":return x;case"st":return n;case"sh":case"el":case"rc":case"sr":return g;case"tr":return h;case"no":return a;default:return null}}function h(_,v,Y){if(Y||v.transform.op._mdf)v.transform.container.setAttribute("opacity",v.transform.op.v);if(Y||v.transform.mProps._mdf)v.transform.container.setAttribute("transform",v.transform.mProps.v.to2dCSS())}function a(){}function g(_,v,Y){var H,$,I,Z,c,z,k=v.styles.length,X=v.lvl,V,u,p,U;for(z=0;z<k;z+=1){if(Z=v.sh._mdf||Y,v.styles[z].lvl<X){u=d.reset(),p=X-v.styles[z].lvl,U=v.transformers.length-1;while(!Z&&p>0)Z=v.transformers[U].mProps._mdf||Z,p-=1,U-=1;if(Z){p=X-v.styles[z].lvl,U=v.transformers.length-1;while(p>0)u.multiply(v.transformers[U].mProps.v),p-=1,U-=1}}else u=o;if(V=v.sh.paths,$=V._length,Z){I="";for(H=0;H<$;H+=1)if(c=V.shapes[H],c&&c._length)I+=buildShapeString(c,c._length,c.c,u);v.caches[z]=I}else I=v.caches[z];v.styles[z].d+=_.hd===!0?"":I,v.styles[z]._mdf=Z||v.styles[z]._mdf}}function l(_,v,Y){var H=v.style;if(v.c._mdf||Y)H.pElem.setAttribute("fill","rgb("+bmFloor(v.c.v[0])+","+bmFloor(v.c.v[1])+","+bmFloor(v.c.v[2])+")");if(v.o._mdf||Y)H.pElem.setAttribute("fill-opacity",v.o.v)}function x(_,v,Y){f(_,v,Y),n(_,v,Y)}function f(_,v,Y){var H=v.gf,$=v.g._hasOpacity,I=v.s.v,Z=v.e.v;if(v.o._mdf||Y){var c=_.ty==="gf"?"fill-opacity":"stroke-opacity";v.style.pElem.setAttribute(c,v.o.v)}if(v.s._mdf||Y){var z=_.t===1?"x1":"cx",k=z==="x1"?"y1":"cy";if(H.setAttribute(z,I[0]),H.setAttribute(k,I[1]),$&&!v.g._collapsable)v.of.setAttribute(z,I[0]),v.of.setAttribute(k,I[1])}var X,V,u,p;if(v.g._cmdf||Y){X=v.cst;var U=v.g.c;u=X.length;for(V=0;V<u;V+=1)p=X[V],p.setAttribute("offset",U[V*4]+"%"),p.setAttribute("stop-color","rgb("+U[V*4+1]+","+U[V*4+2]+","+U[V*4+3]+")")}if($&&(v.g._omdf||Y)){var F=v.g.o;if(v.g._collapsable)X=v.cst;else X=v.ost;u=X.length;for(V=0;V<u;V+=1){if(p=X[V],!v.g._collapsable)p.setAttribute("offset",F[V*2]+"%");p.setAttribute("stop-opacity",F[V*2+1])}}if(_.t===1){if(v.e._mdf||Y){if(H.setAttribute("x2",Z[0]),H.setAttribute("y2",Z[1]),$&&!v.g._collapsable)v.of.setAttribute("x2",Z[0]),v.of.setAttribute("y2",Z[1])}}else{var L;if(v.s._mdf||v.e._mdf||Y){if(L=Math.sqrt(Math.pow(I[0]-Z[0],2)+Math.pow(I[1]-Z[1],2)),H.setAttribute("r",L),$&&!v.g._collapsable)v.of.setAttribute("r",L)}if(v.s._mdf||v.e._mdf||v.h._mdf||v.a._mdf||Y){if(!L)L=Math.sqrt(Math.pow(I[0]-Z[0],2)+Math.pow(I[1]-Z[1],2));var j=Math.atan2(Z[1]-I[1],Z[0]-I[0]),C=v.h.v;if(C>=1)C=0.99;else if(C<=-1)C=-0.99;var T=L*C,K=Math.cos(j+v.a.v)*T+I[0],Q=Math.sin(j+v.a.v)*T+I[1];if(H.setAttribute("fx",K),H.setAttribute("fy",Q),$&&!v.g._collapsable)v.of.setAttribute("fx",K),v.of.setAttribute("fy",Q)}}}function n(_,v,Y){var{style:H,d:$}=v;if($&&($._mdf||Y)&&$.dashStr)H.pElem.setAttribute("stroke-dasharray",$.dashStr),H.pElem.setAttribute("stroke-dashoffset",$.dashoffset[0]);if(v.c&&(v.c._mdf||Y))H.pElem.setAttribute("stroke","rgb("+bmFloor(v.c.v[0])+","+bmFloor(v.c.v[1])+","+bmFloor(v.c.v[2])+")");if(v.o._mdf||Y)H.pElem.setAttribute("stroke-opacity",v.o.v);if(v.w._mdf||Y){if(H.pElem.setAttribute("stroke-width",v.w.v),H.msElem)H.msElem.setAttribute("stroke-width",v.w.v)}}return i}();function SVGShapeElement(o,d,i){this.shapes=[],this.shapesData=o.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(o,d,i),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var o,d=this.shapes.length,i,r,h=this.stylesList.length,a,g=[],l=!1;for(r=0;r<h;r+=1){a=this.stylesList[r],l=!1,g.length=0;for(o=0;o<d;o+=1)if(i=this.shapes[o],i.styles.indexOf(a)!==-1)g.push(i),l=i._isAnimated||l;if(g.length>1&&l)this.setShapesAsAnimated(g)}},SVGShapeElement.prototype.setShapesAsAnimated=function(o){var d,i=o.length;for(d=0;d<i;d+=1)o[d].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(o,d){var i,r=new SVGStyleData(o,d),h=r.pElem;if(o.ty==="st")i=new SVGStrokeStyleData(this,o,r);else if(o.ty==="fl")i=new SVGFillStyleData(this,o,r);else if(o.ty==="gf"||o.ty==="gs"){var a=o.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData;if(i=new a(this,o,r),this.globalData.defs.appendChild(i.gf),i.maskId)this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),h.setAttribute("mask","url("+getLocationHref()+"#"+i.maskId+")")}else if(o.ty==="no")i=new SVGNoStyleData(this,o,r);if(o.ty==="st"||o.ty==="gs"){if(h.setAttribute("stroke-linecap",lineCapEnum[o.lc||2]),h.setAttribute("stroke-linejoin",lineJoinEnum[o.lj||2]),h.setAttribute("fill-opacity","0"),o.lj===1)h.setAttribute("stroke-miterlimit",o.ml)}if(o.r===2)h.setAttribute("fill-rule","evenodd");if(o.ln)h.setAttribute("id",o.ln);if(o.cl)h.setAttribute("class",o.cl);if(o.bm)h.style["mix-blend-mode"]=getBlendMode(o.bm);return this.stylesList.push(r),this.addToAnimatedContents(o,i),i},SVGShapeElement.prototype.createGroupElement=function(o){var d=new ShapeGroupData;if(o.ln)d.gr.setAttribute("id",o.ln);if(o.cl)d.gr.setAttribute("class",o.cl);if(o.bm)d.gr.style["mix-blend-mode"]=getBlendMode(o.bm);return d},SVGShapeElement.prototype.createTransformElement=function(o,d){var i=TransformPropertyFactory.getTransformProperty(this,o,this),r=new SVGTransformData(i,i.o,d);return this.addToAnimatedContents(o,r),r},SVGShapeElement.prototype.createShapeElement=function(o,d,i){var r=4;if(o.ty==="rc")r=5;else if(o.ty==="el")r=6;else if(o.ty==="sr")r=7;var h=ShapePropertyFactory.getShapeProp(this,o,r,this),a=new SVGShapeData(d,i,h);return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(o,a),a},SVGShapeElement.prototype.addToAnimatedContents=function(o,d){var i=0,r=this.animatedContents.length;while(i<r){if(this.animatedContents[i].element===d)return;i+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(o),element:d,data:o})},SVGShapeElement.prototype.setElementStyles=function(o){var d=o.styles,i,r=this.stylesList.length;for(i=0;i<r;i+=1)if(d.indexOf(this.stylesList[i])===-1&&!this.stylesList[i].closed)d.push(this.stylesList[i])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var o,d=this.itemsData.length;for(o=0;o<d;o+=1)this.prevViewData[o]=this.itemsData[o];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),d=this.dynamicProperties.length;for(o=0;o<d;o+=1)this.dynamicProperties[o].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(o,d,i,r,h,a,g){var l=[].concat(a),x,f=o.length-1,n,_,v=[],Y=[],H,$,I;for(x=f;x>=0;x-=1){if(I=this.searchProcessedElement(o[x]),!I)o[x]._render=g;else d[x]=i[I-1];if(o[x].ty==="fl"||o[x].ty==="st"||o[x].ty==="gf"||o[x].ty==="gs"||o[x].ty==="no"){if(!I)d[x]=this.createStyleElement(o[x],h);else d[x].style.closed=o[x].hd;if(o[x]._render){if(d[x].style.pElem.parentNode!==r)r.appendChild(d[x].style.pElem)}v.push(d[x].style)}else if(o[x].ty==="gr"){if(!I)d[x]=this.createGroupElement(o[x]);else{_=d[x].it.length;for(n=0;n<_;n+=1)d[x].prevViewData[n]=d[x].it[n]}if(this.searchShapes(o[x].it,d[x].it,d[x].prevViewData,d[x].gr,h+1,l,g),o[x]._render){if(d[x].gr.parentNode!==r)r.appendChild(d[x].gr)}}else if(o[x].ty==="tr"){if(!I)d[x]=this.createTransformElement(o[x],r);H=d[x].transform,l.push(H)}else if(o[x].ty==="sh"||o[x].ty==="rc"||o[x].ty==="el"||o[x].ty==="sr"){if(!I)d[x]=this.createShapeElement(o[x],l,h);this.setElementStyles(d[x])}else if(o[x].ty==="tm"||o[x].ty==="rd"||o[x].ty==="ms"||o[x].ty==="pb"||o[x].ty==="zz"||o[x].ty==="op"){if(!I)$=ShapeModifiers.getModifier(o[x].ty),$.init(this,o[x]),d[x]=$,this.shapeModifiers.push($);else $=d[x],$.closed=!1;Y.push($)}else if(o[x].ty==="rp"){if(!I)$=ShapeModifiers.getModifier(o[x].ty),d[x]=$,$.init(this,o,x,d),this.shapeModifiers.push($),g=!1;else $=d[x],$.closed=!0;Y.push($)}this.addProcessedElement(o[x],x+1)}f=v.length;for(x=0;x<f;x+=1)v[x].closed=!0;f=Y.length;for(x=0;x<f;x+=1)Y[x].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var o,d=this.stylesList.length;for(o=0;o<d;o+=1)this.stylesList[o].reset();this.renderShape();for(o=0;o<d;o+=1)if(this.stylesList[o]._mdf||this._isFirstFrame){if(this.stylesList[o].msElem)this.stylesList[o].msElem.setAttribute("d",this.stylesList[o].d),this.stylesList[o].d="M0 0"+this.stylesList[o].d;this.stylesList[o].pElem.setAttribute("d",this.stylesList[o].d||"M0 0")}},SVGShapeElement.prototype.renderShape=function(){var o,d=this.animatedContents.length,i;for(o=0;o<d;o+=1)if(i=this.animatedContents[o],(this._isFirstFrame||i.element._isAnimated)&&i.data!==!0)i.fn(i.data,i.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(o,d,i,r,h,a){this.o=o,this.sw=d,this.sc=i,this.fc=r,this.m=h,this.p=a,this._mdf={o:!0,sw:!!d,sc:!!i,fc:!!r,m:!0,p:!0}}LetterProps.prototype.update=function(o,d,i,r,h,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var g=!1;if(this.o!==o)this.o=o,this._mdf.o=!0,g=!0;if(this.sw!==d)this.sw=d,this._mdf.sw=!0,g=!0;if(this.sc!==i)this.sc=i,this._mdf.sc=!0,g=!0;if(this.fc!==r)this.fc=r,this._mdf.fc=!0,g=!0;if(this.m!==h)this.m=h,this._mdf.m=!0,g=!0;if(a.length&&(this.p[0]!==a[0]||this.p[1]!==a[1]||this.p[4]!==a[4]||this.p[5]!==a[5]||this.p[12]!==a[12]||this.p[13]!==a[13]))this.p=a,this._mdf.p=!0,g=!0;return g};function TextProperty(o,d){if(this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,d.d&&d.d.sid)d.d=o.globalData.slotManager.getProp(d.d);if(this.data=d,this.elem=o,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),!this.searchProperty())this.completeTextData(this.currentData)}TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(o,d){for(var i in d)if(Object.prototype.hasOwnProperty.call(d,i))o[i]=d[i];return o},TextProperty.prototype.setCurrentData=function(o){if(!o.__complete)this.completeTextData(o);this.currentData=o,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){if(this.kf=this.data.d.k.length>1,this.kf)this.addEffect(this.getKeyframeValue.bind(this));return this.kf},TextProperty.prototype.addEffect=function(o){this.effectsSequence.push(o),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(o){if((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!o)return;this.currentData.t=this.data.d.k[this.keysIndex].s.t;var d=this.currentData,i=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var r,h=this.effectsSequence.length,a=o||this.data.d.k[this.keysIndex].s;for(r=0;r<h;r+=1)if(i!==this.keysIndex)a=this.effectsSequence[r](a,a.t);else a=this.effectsSequence[r](this.currentData,a.t);if(d!==a)this.setCurrentData(a);this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId},TextProperty.prototype.getKeyframeValue=function(){var o=this.data.d.k,d=this.elem.comp.renderedFrame,i=0,r=o.length;while(i<=r-1){if(i===r-1||o[i+1].t>d)break;i+=1}if(this.keysIndex!==i)this.keysIndex=i;return this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(o){var d=[],i=0,r=o.length,h,a,g=!1,l=!1,x="";while(i<r){if(g=l,l=!1,h=o.charCodeAt(i),x=o.charAt(i),FontManager.isCombinedCharacter(h))g=!0;else if(h>=55296&&h<=56319){if(FontManager.isRegionalFlag(o,i))x=o.substr(i,14);else if(a=o.charCodeAt(i+1),a>=56320&&a<=57343)if(FontManager.isModifier(h,a))x=o.substr(i,2),g=!0;else if(FontManager.isFlagEmoji(o.substr(i,4)))x=o.substr(i,4);else x=o.substr(i,2)}else if(h>56319){if(a=o.charCodeAt(i+1),FontManager.isVariationSelector(h))g=!0}else if(FontManager.isZeroWidthJoiner(h))g=!0,l=!0;if(g)d[d.length-1]+=x,g=!1;else d.push(x);i+=x.length}return d},TextProperty.prototype.completeTextData=function(o){o.__complete=!0;var d=this.elem.globalData.fontManager,i=this.data,r=[],h,a,g,l=0,x,f=i.m.g,n=0,_=0,v=0,Y=[],H=0,$=0,I,Z,c=d.getFontByName(o.f),z,k=0,X=getFontProperties(c);o.fWeight=X.weight,o.fStyle=X.style,o.finalSize=o.s,o.finalText=this.buildFinalText(o.t),a=o.finalText.length,o.finalLineHeight=o.lh;var V=o.tr/1000*o.finalSize,u;if(o.sz){var p=!0,U=o.sz[0],F=o.sz[1],L,j;while(p){j=this.buildFinalText(o.t),L=0,H=0,a=j.length,V=o.tr/1000*o.finalSize;var C=-1;for(h=0;h<a;h+=1){if(u=j[h].charCodeAt(0),g=!1,j[h]===" ")C=h;else if(u===13||u===3)H=0,g=!0,L+=o.finalLineHeight||o.finalSize*1.2;if(d.chars)z=d.getCharData(j[h],c.fStyle,c.fFamily),k=g?0:z.w*o.finalSize/100;else k=d.measureText(j[h],o.f,o.finalSize);if(H+k>U&&j[h]!==" "){if(C===-1)a+=1;else h=C;L+=o.finalLineHeight||o.finalSize*1.2,j.splice(h,C===h?1:0,"\r"),C=-1,H=0}else H+=k,H+=V}if(L+=c.ascent*o.finalSize/100,this.canResize&&o.finalSize>this.minimumFontSize&&F<L)o.finalSize-=1,o.finalLineHeight=o.finalSize*o.lh/o.s;else o.finalText=j,a=o.finalText.length,p=!1}}H=-V,k=0;var T=0,K;for(h=0;h<a;h+=1){if(g=!1,K=o.finalText[h],u=K.charCodeAt(0),u===13||u===3)T=0,Y.push(H),$=H>$?H:$,H=-2*V,x="",g=!0,v+=1;else x=K;if(d.chars)z=d.getCharData(K,c.fStyle,d.getFontByName(o.f).fFamily),k=g?0:z.w*o.finalSize/100;else k=d.measureText(x,o.f,o.finalSize);if(K===" ")T+=k+V;else H+=k+V+T,T=0;if(r.push({l:k,an:k,add:n,n:g,anIndexes:[],val:x,line:v,animatorJustifyOffset:0}),f==2){if(n+=k,x===""||x===" "||h===a-1){if(x===""||x===" ")n-=k;while(_<=h)r[_].an=n,r[_].ind=l,r[_].extra=k,_+=1;l+=1,n=0}}else if(f==3){if(n+=k,x===""||h===a-1){if(x==="")n-=k;while(_<=h)r[_].an=n,r[_].ind=l,r[_].extra=k,_+=1;n=0,l+=1}}else r[l].ind=l,r[l].extra=0,l+=1}if(o.l=r,$=H>$?H:$,Y.push(H),o.sz)o.boxWidth=o.sz[0],o.justifyOffset=0;else switch(o.boxWidth=$,o.j){case 1:o.justifyOffset=-o.boxWidth;break;case 2:o.justifyOffset=-o.boxWidth/2;break;default:o.justifyOffset=0}o.lineWidths=Y;var Q=i.a,W,w;Z=Q.length;var J,R,G=[];for(I=0;I<Z;I+=1){if(W=Q[I],W.a.sc)o.strokeColorAnim=!0;if(W.a.sw)o.strokeWidthAnim=!0;if(W.a.fc||W.a.fh||W.a.fs||W.a.fb)o.fillColorAnim=!0;R=0,J=W.s.b;for(h=0;h<a;h+=1)if(w=r[h],w.anIndexes[I]=R,J==1&&w.val!==""||J==2&&w.val!==""&&w.val!==" "||J==3&&(w.n||w.val==" "||h==a-1)||J==4&&(w.n||h==a-1)){if(W.s.rn===1)G.push(R);R+=1}i.a[I].s.totalChars=R;var D=-1,E;if(W.s.rn===1)for(h=0;h<a;h+=1){if(w=r[h],D!=w.anIndexes[I])D=w.anIndexes[I],E=G.splice(Math.floor(Math.random()*G.length),1)[0];w.anIndexes[I]=E}}o.yOffset=o.finalLineHeight||o.finalSize*1.2,o.ls=o.ls||0,o.ascent=c.ascent*o.finalSize/100},TextProperty.prototype.updateDocumentData=function(o,d){d=d===void 0?this.keysIndex:d;var i=this.copyData({},this.data.d.k[d].s);i=this.copyData(i,o),this.data.d.k[d].s=i,this.recalculate(d),this.setCurrentData(i),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(o){var d=this.data.d.k[o].s;d.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(d)},TextProperty.prototype.canResizeFont=function(o){this.canResize=o,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(o){this.minimumFontSize=Math.floor(o)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var{max:o,min:d,floor:i}=Math;function r(a,g){if(this._currentTextLength=-1,this.k=!1,this.data=g,this.elem=a,this.comp=a.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(a),this.s=PropertyFactory.getProp(a,g.s||{k:0},0,0,this),"e"in g)this.e=PropertyFactory.getProp(a,g.e,0,0,this);else this.e={v:100};if(this.o=PropertyFactory.getProp(a,g.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(a,g.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(a,g.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(a,g.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(a,g.a,0,0.01,this),!this.dynamicProperties.length)this.getValue()}r.prototype={getMult:function a(g){if(this._currentTextLength!==this.elem.textProperty.currentData.l.length)this.getValue();var l=0,x=0,f=1,n=1;if(this.ne.v>0)l=this.ne.v/100;else x=-this.ne.v/100;if(this.xe.v>0)f=1-this.xe.v/100;else n=1+this.xe.v/100;var _=BezierFactory.getBezierEasing(l,x,f,n).get,v=0,Y=this.finalS,H=this.finalE,$=this.data.sh;if($===2){if(H===Y)v=g>=H?1:0;else v=o(0,d(0.5/(H-Y)+(g-Y)/(H-Y),1));v=_(v)}else if($===3){if(H===Y)v=g>=H?0:1;else v=1-o(0,d(0.5/(H-Y)+(g-Y)/(H-Y),1));v=_(v)}else if($===4){if(H===Y)v=0;else if(v=o(0,d(0.5/(H-Y)+(g-Y)/(H-Y),1)),v<0.5)v*=2;else v=1-2*(v-0.5);v=_(v)}else if($===5){if(H===Y)v=0;else{var I=H-Y;g=d(o(0,g+0.5-Y),H-Y);var Z=-I/2+g,c=I/2;v=Math.sqrt(1-Z*Z/(c*c))}v=_(v)}else if($===6){if(H===Y)v=0;else g=d(o(0,g+0.5-Y),H-Y),v=(1+Math.cos(Math.PI+Math.PI*2*g/(H-Y)))/2;v=_(v)}else{if(g>=i(Y))if(g-Y<0)v=o(0,d(d(H,1)-(Y-g),1));else v=o(0,d(H-g,1));v=_(v)}if(this.sm.v!==100){var z=this.sm.v*0.01;if(z===0)z=0.00000001;var k=0.5-z*0.5;if(v<k)v=0;else if(v=(v-k)/z,v>1)v=1}return v*this.a.v},getValue:function a(g){if(this.iterateDynamicProperties(),this._mdf=g||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,g&&this.data.r===2)this.e.v=this._currentTextLength;var l=this.data.r===2?1:100/this.data.totalChars,x=this.o.v/l,f=this.s.v/l+x,n=this.e.v/l+x;if(f>n){var _=f;f=n,n=_}this.finalS=f,this.finalE=n}},extendPrototype([DynamicPropertyContainer],r);function h(a,g,l){return new r(a,g,l)}return{getTextSelectorProp:h}}();function TextAnimatorDataProperty(o,d,i){var r={propType:!1},h=PropertyFactory.getProp,a=d.a;this.a={r:a.r?h(o,a.r,0,degToRads,i):r,rx:a.rx?h(o,a.rx,0,degToRads,i):r,ry:a.ry?h(o,a.ry,0,degToRads,i):r,sk:a.sk?h(o,a.sk,0,degToRads,i):r,sa:a.sa?h(o,a.sa,0,degToRads,i):r,s:a.s?h(o,a.s,1,0.01,i):r,a:a.a?h(o,a.a,1,0,i):r,o:a.o?h(o,a.o,0,0.01,i):r,p:a.p?h(o,a.p,1,0,i):r,sw:a.sw?h(o,a.sw,0,0,i):r,sc:a.sc?h(o,a.sc,1,0,i):r,fc:a.fc?h(o,a.fc,1,0,i):r,fh:a.fh?h(o,a.fh,0,0,i):r,fs:a.fs?h(o,a.fs,0,0.01,i):r,fb:a.fb?h(o,a.fb,0,0.01,i):r,t:a.t?h(o,a.t,0,0,i):r},this.s=TextSelectorProp.getTextSelectorProp(o,d.s,i),this.s.t=d.s.t}function TextAnimatorProperty(o,d,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=o,this._renderType=d,this._elem=i,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}TextAnimatorProperty.prototype.searchProperties=function(){var o,d=this._textData.a.length,i,r=PropertyFactory.getProp;for(o=0;o<d;o+=1)i=this._textData.a[o],this._animatorsData[o]=new TextAnimatorDataProperty(this._elem,i,this);if(this._textData.p&&"m"in this._textData.p)this._pathData={a:r(this._elem,this._textData.p.a,0,0,this),f:r(this._elem,this._textData.p.f,0,0,this),l:r(this._elem,this._textData.p.l,0,0,this),r:r(this._elem,this._textData.p.r,0,0,this),p:r(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0;else this._hasMaskedPath=!1;this._moreOptions.alignment=r(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(o,d){if(this.lettersChangedFlag=d,!this._mdf&&!this._isFirstFrame&&!d&&(!this._hasMaskedPath||!this._pathData.m._mdf))return;this._isFirstFrame=!1;var i=this._moreOptions.alignment.v,r=this._animatorsData,h=this._textData,a=this.mHelper,g=this._renderType,l=this.renderedLetters.length,x,f,n,_,v=o.l,Y,H,$,I,Z,c,z,k,X,V,u,p,U,F,L;if(this._hasMaskedPath){if(L=this._pathData.m,!this._pathData.n||this._pathData._mdf){var j=L.v;if(this._pathData.r.v)j=j.reverse();Y={tLength:0,segments:[]},_=j._length-1;var C;p=0;for(n=0;n<_;n+=1)C=bez.buildBezierData(j.v[n],j.v[n+1],[j.o[n][0]-j.v[n][0],j.o[n][1]-j.v[n][1]],[j.i[n+1][0]-j.v[n+1][0],j.i[n+1][1]-j.v[n+1][1]]),Y.tLength+=C.segmentLength,Y.segments.push(C),p+=C.segmentLength;if(n=_,L.v.c)C=bez.buildBezierData(j.v[n],j.v[0],[j.o[n][0]-j.v[n][0],j.o[n][1]-j.v[n][1]],[j.i[0][0]-j.v[0][0],j.i[0][1]-j.v[0][1]]),Y.tLength+=C.segmentLength,Y.segments.push(C),p+=C.segmentLength;this._pathData.pi=Y}if(Y=this._pathData.pi,H=this._pathData.f.v,z=0,c=1,I=0,Z=!0,V=Y.segments,H<0&&L.v.c){if(Y.tLength<Math.abs(H))H=-Math.abs(H)%Y.tLength;z=V.length-1,X=V[z].points,c=X.length-1;while(H<0)if(H+=X[c].partialLength,c-=1,c<0)z-=1,X=V[z].points,c=X.length-1}X=V[z].points,k=X[c-1],$=X[c],u=$.partialLength}_=v.length,x=0,f=0;var T=o.finalSize*1.2*0.714,K=!0,Q,W,w,J,R;J=r.length;var G,D=-1,E,t,m,d0=H,g0=z,Z0=c,W0=-1,J0,b0,$0,h0,M,x0,o1,B0,O0="",y0=this.defaultPropsArray,A0;if(o.j===2||o.j===1){var X0=0,d1=0,i1=o.j===2?-0.5:-1,L0=0,r1=!0;for(n=0;n<_;n+=1)if(v[n].n){if(X0)X0+=d1;while(L0<n)v[L0].animatorJustifyOffset=X0,L0+=1;X0=0,r1=!0}else{for(w=0;w<J;w+=1)if(Q=r[w].a,Q.t.propType){if(r1&&o.j===2)d1+=Q.t.v*i1;if(W=r[w].s,G=W.getMult(v[n].anIndexes[w],h.a[w].s.totalChars),G.length)X0+=Q.t.v*G[0]*i1;else X0+=Q.t.v*G*i1}r1=!1}if(X0)X0+=d1;while(L0<n)v[L0].animatorJustifyOffset=X0,L0+=1}for(n=0;n<_;n+=1){if(a.reset(),J0=1,v[n].n){if(x=0,f+=o.yOffset,f+=K?1:0,H=d0,K=!1,this._hasMaskedPath)z=g0,c=Z0,X=V[z].points,k=X[c-1],$=X[c],u=$.partialLength,I=0;O0="",B0="",x0="",A0="",y0=this.defaultPropsArray}else{if(this._hasMaskedPath){if(W0!==v[n].line){switch(o.j){case 1:H+=p-o.lineWidths[v[n].line];break;case 2:H+=(p-o.lineWidths[v[n].line])/2;break;default:break}W0=v[n].line}if(D!==v[n].ind){if(v[D])H+=v[D].extra;H+=v[n].an/2,D=v[n].ind}H+=i[0]*v[n].an*0.005;var u0=0;for(w=0;w<J;w+=1){if(Q=r[w].a,Q.p.propType)if(W=r[w].s,G=W.getMult(v[n].anIndexes[w],h.a[w].s.totalChars),G.length)u0+=Q.p.v[0]*G[0];else u0+=Q.p.v[0]*G;if(Q.a.propType)if(W=r[w].s,G=W.getMult(v[n].anIndexes[w],h.a[w].s.totalChars),G.length)u0+=Q.a.v[0]*G[0];else u0+=Q.a.v[0]*G}if(Z=!0,this._pathData.a.v)H=v[0].an*0.5+(p-this._pathData.f.v-v[0].an*0.5-v[v.length-1].an*0.5)*D/(_-1),H+=this._pathData.f.v;while(Z)if(I+u>=H+u0||!X)U=(H+u0-I)/$.partialLength,t=k.point[0]+($.point[0]-k.point[0])*U,m=k.point[1]+($.point[1]-k.point[1])*U,a.translate(-i[0]*v[n].an*0.005,-(i[1]*T)*0.01),Z=!1;else if(X){if(I+=$.partialLength,c+=1,c>=X.length)if(c=0,z+=1,!V[z])if(L.v.c)c=0,z=0,X=V[z].points;else I-=$.partialLength,X=null;else X=V[z].points;if(X)k=$,$=X[c],u=$.partialLength}E=v[n].an/2-v[n].add,a.translate(-E,0,0)}else E=v[n].an/2-v[n].add,a.translate(-E,0,0),a.translate(-i[0]*v[n].an*0.005,-i[1]*T*0.01,0);for(w=0;w<J;w+=1)if(Q=r[w].a,Q.t.propType){if(W=r[w].s,G=W.getMult(v[n].anIndexes[w],h.a[w].s.totalChars),x!==0||o.j!==0)if(this._hasMaskedPath)if(G.length)H+=Q.t.v*G[0];else H+=Q.t.v*G;else if(G.length)x+=Q.t.v*G[0];else x+=Q.t.v*G}if(o.strokeWidthAnim)$0=o.sw||0;if(o.strokeColorAnim)if(o.sc)b0=[o.sc[0],o.sc[1],o.sc[2]];else b0=[0,0,0];if(o.fillColorAnim&&o.fc)h0=[o.fc[0],o.fc[1],o.fc[2]];for(w=0;w<J;w+=1)if(Q=r[w].a,Q.a.propType)if(W=r[w].s,G=W.getMult(v[n].anIndexes[w],h.a[w].s.totalChars),G.length)a.translate(-Q.a.v[0]*G[0],-Q.a.v[1]*G[1],Q.a.v[2]*G[2]);else a.translate(-Q.a.v[0]*G,-Q.a.v[1]*G,Q.a.v[2]*G);for(w=0;w<J;w+=1)if(Q=r[w].a,Q.s.propType)if(W=r[w].s,G=W.getMult(v[n].anIndexes[w],h.a[w].s.totalChars),G.length)a.scale(1+(Q.s.v[0]-1)*G[0],1+(Q.s.v[1]-1)*G[1],1);else a.scale(1+(Q.s.v[0]-1)*G,1+(Q.s.v[1]-1)*G,1);for(w=0;w<J;w+=1){if(Q=r[w].a,W=r[w].s,G=W.getMult(v[n].anIndexes[w],h.a[w].s.totalChars),Q.sk.propType)if(G.length)a.skewFromAxis(-Q.sk.v*G[0],Q.sa.v*G[1]);else a.skewFromAxis(-Q.sk.v*G,Q.sa.v*G);if(Q.r.propType)if(G.length)a.rotateZ(-Q.r.v*G[2]);else a.rotateZ(-Q.r.v*G);if(Q.ry.propType)if(G.length)a.rotateY(Q.ry.v*G[1]);else a.rotateY(Q.ry.v*G);if(Q.rx.propType)if(G.length)a.rotateX(Q.rx.v*G[0]);else a.rotateX(Q.rx.v*G);if(Q.o.propType)if(G.length)J0+=(Q.o.v*G[0]-J0)*G[0];else J0+=(Q.o.v*G-J0)*G;if(o.strokeWidthAnim&&Q.sw.propType)if(G.length)$0+=Q.sw.v*G[0];else $0+=Q.sw.v*G;if(o.strokeColorAnim&&Q.sc.propType)for(M=0;M<3;M+=1)if(G.length)b0[M]+=(Q.sc.v[M]-b0[M])*G[0];else b0[M]+=(Q.sc.v[M]-b0[M])*G;if(o.fillColorAnim&&o.fc){if(Q.fc.propType)for(M=0;M<3;M+=1)if(G.length)h0[M]+=(Q.fc.v[M]-h0[M])*G[0];else h0[M]+=(Q.fc.v[M]-h0[M])*G;if(Q.fh.propType)if(G.length)h0=addHueToRGB(h0,Q.fh.v*G[0]);else h0=addHueToRGB(h0,Q.fh.v*G);if(Q.fs.propType)if(G.length)h0=addSaturationToRGB(h0,Q.fs.v*G[0]);else h0=addSaturationToRGB(h0,Q.fs.v*G);if(Q.fb.propType)if(G.length)h0=addBrightnessToRGB(h0,Q.fb.v*G[0]);else h0=addBrightnessToRGB(h0,Q.fb.v*G)}}for(w=0;w<J;w+=1)if(Q=r[w].a,Q.p.propType)if(W=r[w].s,G=W.getMult(v[n].anIndexes[w],h.a[w].s.totalChars),this._hasMaskedPath)if(G.length)a.translate(0,Q.p.v[1]*G[0],-Q.p.v[2]*G[1]);else a.translate(0,Q.p.v[1]*G,-Q.p.v[2]*G);else if(G.length)a.translate(Q.p.v[0]*G[0],Q.p.v[1]*G[1],-Q.p.v[2]*G[2]);else a.translate(Q.p.v[0]*G,Q.p.v[1]*G,-Q.p.v[2]*G);if(o.strokeWidthAnim)x0=$0<0?0:$0;if(o.strokeColorAnim)o1="rgb("+Math.round(b0[0]*255)+","+Math.round(b0[1]*255)+","+Math.round(b0[2]*255)+")";if(o.fillColorAnim&&o.fc)B0="rgb("+Math.round(h0[0]*255)+","+Math.round(h0[1]*255)+","+Math.round(h0[2]*255)+")";if(this._hasMaskedPath){if(a.translate(0,-o.ls),a.translate(0,i[1]*T*0.01+f,0),this._pathData.p.v){F=($.point[1]-k.point[1])/($.point[0]-k.point[0]);var c1=Math.atan(F)*180/Math.PI;if($.point[0]<k.point[0])c1+=180;a.rotate(-c1*Math.PI/180)}if(a.translate(t,m,0),H-=i[0]*v[n].an*0.005,v[n+1]&&D!==v[n+1].ind)H+=v[n].an/2,H+=o.tr*0.001*o.finalSize}else{if(a.translate(x,f,0),o.ps)a.translate(o.ps[0],o.ps[1]+o.ascent,0);switch(o.j){case 1:a.translate(v[n].animatorJustifyOffset+o.justifyOffset+(o.boxWidth-o.lineWidths[v[n].line]),0,0);break;case 2:a.translate(v[n].animatorJustifyOffset+o.justifyOffset+(o.boxWidth-o.lineWidths[v[n].line])/2,0,0);break;default:break}a.translate(0,-o.ls),a.translate(E,0,0),a.translate(i[0]*v[n].an*0.005,i[1]*T*0.01,0),x+=v[n].l+o.tr*0.001*o.finalSize}if(g==="html")O0=a.toCSS();else if(g==="svg")O0=a.to2dCSS();else y0=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5],a.props[6],a.props[7],a.props[8],a.props[9],a.props[10],a.props[11],a.props[12],a.props[13],a.props[14],a.props[15]];A0=J0}if(l<=n)R=new LetterProps(A0,x0,o1,B0,O0,y0),this.renderedLetters.push(R),l+=1,this.lettersChangedFlag=!0;else R=this.renderedLetters[n],this.lettersChangedFlag=R.update(A0,x0,o1,B0,O0,y0)||this.lettersChangedFlag}},TextAnimatorProperty.prototype.getValue=function(){if(this._elem.globalData.frameId===this._frameId)return;this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties()},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty);function ITextElement(){}ITextElement.prototype.initElement=function(o,d,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(o,d,i),this.textProperty=new TextProperty(this,o.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(o.t,this.renderType,this),this.initTransform(o,d,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(o){this._mdf=!1,this.prepareRenderableFrame(o),this.prepareProperties(o,this.isInRange)},ITextElement.prototype.createPathShape=function(o,d){var i,r=d.length,h,a="";for(i=0;i<r;i+=1)if(d[i].ty==="sh")h=d[i].ks.k,a+=buildShapeString(h,h.i.length,!0,o);return a},ITextElement.prototype.updateDocumentData=function(o,d){this.textProperty.updateDocumentData(o,d)},ITextElement.prototype.canResizeFont=function(o){this.textProperty.canResizeFont(o)},ITextElement.prototype.setMinimumFontSize=function(o){this.textProperty.setMinimumFontSize(o)},ITextElement.prototype.applyTextPropertiesToMatrix=function(o,d,i,r,h){if(o.ps)d.translate(o.ps[0],o.ps[1]+o.ascent,0);switch(d.translate(0,-o.ls,0),o.j){case 1:d.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[i]),0,0);break;case 2:d.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[i])/2,0,0);break;default:break}d.translate(r,h,0)},ITextElement.prototype.buildColor=function(o){return"rgb("+Math.round(o[0]*255)+","+Math.round(o[1]*255)+","+Math.round(o[2]*255)+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){if(this.textProperty._mdf||this.textProperty._isFirstFrame)this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1};var emptyShapeData={shapes:[]};function SVGTextLottieElement(o,d,i){this.textSpans=[],this.renderType="svg",this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){if(this.data.singleShape&&!this.globalData.fontManager.chars)this.textContainer=createNS("text")},SVGTextLottieElement.prototype.buildTextContents=function(o){var d=0,i=o.length,r=[],h="";while(d<i){if(o[d]===String.fromCharCode(13)||o[d]===String.fromCharCode(3))r.push(h),h="";else h+=o[d];d+=1}return r.push(h),r},SVGTextLottieElement.prototype.buildShapeData=function(o,d){if(o.shapes&&o.shapes.length){var i=o.shapes[0];if(i.it){var r=i.it[i.it.length-1];if(r.s)r.s.k[0]=d,r.s.k[1]=d}}return o},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var o,d,i=this.textProperty.currentData;if(this.renderedLetters=createSizedArray(i?i.l.length:0),i.fc)this.layerElement.setAttribute("fill",this.buildColor(i.fc));else this.layerElement.setAttribute("fill","rgba(0,0,0,0)");if(i.sc)this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw);this.layerElement.setAttribute("font-size",i.finalSize);var r=this.globalData.fontManager.getFontByName(i.f);if(r.fClass)this.layerElement.setAttribute("class",r.fClass);else{this.layerElement.setAttribute("font-family",r.fFamily);var{fWeight:h,fStyle:a}=i;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",h)}this.layerElement.setAttribute("aria-label",i.t);var g=i.l||[],l=!!this.globalData.fontManager.chars;d=g.length;var x,f=this.mHelper,n="",_=this.data.singleShape,v=0,Y=0,H=!0,$=i.tr*0.001*i.finalSize;if(_&&!l&&!i.sz){var I=this.textContainer,Z="start";switch(i.j){case 1:Z="end";break;case 2:Z="middle";break;default:Z="start";break}I.setAttribute("text-anchor",Z),I.setAttribute("letter-spacing",$);var c=this.buildTextContents(i.finalText);d=c.length,Y=i.ps?i.ps[1]+i.ascent:0;for(o=0;o<d;o+=1){if(x=this.textSpans[o].span||createNS("tspan"),x.textContent=c[o],x.setAttribute("x",0),x.setAttribute("y",Y),x.style.display="inherit",I.appendChild(x),!this.textSpans[o])this.textSpans[o]={span:null,glyph:null};this.textSpans[o].span=x,Y+=i.finalLineHeight}this.layerElement.appendChild(I)}else{var z=this.textSpans.length,k;for(o=0;o<d;o+=1){if(!this.textSpans[o])this.textSpans[o]={span:null,childSpan:null,glyph:null};if(!l||!_||o===0){if(x=z>o?this.textSpans[o].span:createNS(l?"g":"text"),z<=o){if(x.setAttribute("stroke-linecap","butt"),x.setAttribute("stroke-linejoin","round"),x.setAttribute("stroke-miterlimit","4"),this.textSpans[o].span=x,l){var X=createNS("g");x.appendChild(X),this.textSpans[o].childSpan=X}this.textSpans[o].span=x,this.layerElement.appendChild(x)}x.style.display="inherit"}if(f.reset(),_){if(g[o].n)v=-$,Y+=i.yOffset,Y+=H?1:0,H=!1;this.applyTextPropertiesToMatrix(i,f,g[o].line,v,Y),v+=g[o].l||0,v+=$}if(l){k=this.globalData.fontManager.getCharData(i.finalText[o],r.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily);var V;if(k.t===1)V=new SVGCompElement(k.data,this.globalData,this);else{var u=emptyShapeData;if(k.data&&k.data.shapes)u=this.buildShapeData(k.data,i.finalSize);V=new SVGShapeElement(u,this.globalData,this)}if(this.textSpans[o].glyph){var p=this.textSpans[o].glyph;this.textSpans[o].childSpan.removeChild(p.layerElement),p.destroy()}if(this.textSpans[o].glyph=V,V._debug=!0,V.prepareFrame(0),V.renderFrame(),this.textSpans[o].childSpan.appendChild(V.layerElement),k.t===1)this.textSpans[o].childSpan.setAttribute("transform","scale("+i.finalSize/100+","+i.finalSize/100+")")}else{if(_)x.setAttribute("transform","translate("+f.props[12]+","+f.props[13]+")");x.textContent=g[o].val,x.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}}if(_&&x)x.setAttribute("d",n)}while(o<this.textSpans.length)this.textSpans[o].span.style.display="none",o+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var o=this.layerElement.getBBox();this.bbox={top:o.y,left:o.x,width:o.width,height:o.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var o,d=this.textSpans.length,i;this.renderedFrame=this.comp.renderedFrame;for(o=0;o<d;o+=1)if(i=this.textSpans[o].glyph,i){if(i.prepareFrame(this.comp.renderedFrame-this.data.st),i._mdf)this._mdf=!0}},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),!this.data.singleShape||this._mdf){if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){this._sizeChanged=!0;var o,d,i=this.textAnimator.renderedLetters,r=this.textProperty.currentData.l;d=r.length;var h,a,g;for(o=0;o<d;o+=1)if(!r[o].n){if(h=i[o],a=this.textSpans[o].span,g=this.textSpans[o].glyph,g)g.renderFrame();if(h._mdf.m)a.setAttribute("transform",h.m);if(h._mdf.o)a.setAttribute("opacity",h.o);if(h._mdf.sw)a.setAttribute("stroke-width",h.sw);if(h._mdf.sc)a.setAttribute("stroke",h.sc);if(h._mdf.fc)a.setAttribute("fill",h.fc)}}}};function ISolidElement(o,d,i){this.initElement(o,d,i)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var o=createNS("rect");o.setAttribute("width",this.data.sw),o.setAttribute("height",this.data.sh),o.setAttribute("fill",this.data.sc),this.layerElement.appendChild(o)};function NullElement(o,d,i){this.initFrame(),this.initBaseData(o,d,i),this.initFrame(),this.initTransform(o,d,i),this.initHierarchy()}NullElement.prototype.prepareFrame=function(o){this.prepareProperties(o,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement);function SVGRendererBase(){}extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(o){return new NullElement(o,this.globalData,this)},SVGRendererBase.prototype.createShape=function(o){return new SVGShapeElement(o,this.globalData,this)},SVGRendererBase.prototype.createText=function(o){return new SVGTextLottieElement(o,this.globalData,this)},SVGRendererBase.prototype.createImage=function(o){return new IImageElement(o,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(o){return new ISolidElement(o,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(o){if(this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize)this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize);else this.svgElement.setAttribute("viewBox","0 0 "+o.w+" "+o.h);if(!this.renderConfig.viewBoxOnly)this.svgElement.setAttribute("width",o.w),this.svgElement.setAttribute("height",o.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility;if(this.renderConfig.width)this.svgElement.setAttribute("width",this.renderConfig.width);if(this.renderConfig.height)this.svgElement.setAttribute("height",this.renderConfig.height);if(this.renderConfig.className)this.svgElement.setAttribute("class",this.renderConfig.className);if(this.renderConfig.id)this.svgElement.setAttribute("id",this.renderConfig.id);if(this.renderConfig.focusable!==void 0)this.svgElement.setAttribute("focusable",this.renderConfig.focusable);this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var d=this.globalData.defs;this.setupGlobalData(o,d),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=o;var i=createNS("clipPath"),r=createNS("rect");r.setAttribute("width",o.w),r.setAttribute("height",o.h),r.setAttribute("x",0),r.setAttribute("y",0);var h=createElementID();i.setAttribute("id",h),i.appendChild(r),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+h+")"),d.appendChild(i),this.layers=o.layers,this.elements=createSizedArray(o.layers.length)},SVGRendererBase.prototype.destroy=function(){if(this.animationItem.wrapper)this.animationItem.wrapper.innerText="";this.layerElement=null,this.globalData.defs=null;var o,d=this.layers?this.layers.length:0;for(o=0;o<d;o+=1)if(this.elements[o]&&this.elements[o].destroy)this.elements[o].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(o){var d=0,i=this.layers.length;for(d=0;d<i;d+=1)if(this.layers[d].ind===o)return d;return-1},SVGRendererBase.prototype.buildItem=function(o){var d=this.elements;if(d[o]||this.layers[o].ty===99)return;d[o]=!0;var i=this.createItem(this.layers[o]);if(d[o]=i,getExpressionsPlugin()){if(this.layers[o].ty===0)this.globalData.projectInterface.registerComposition(i);i.initExpressions()}if(this.appendElementInPos(i,o),this.layers[o].tt){var r="tp"in this.layers[o]?this.findIndexByInd(this.layers[o].tp):o-1;if(r===-1)return;if(!this.elements[r]||this.elements[r]===!0)this.buildItem(r),this.addPendingElement(i);else{var h=d[r],a=h.getMatte(this.layers[o].tt);i.setMatte(a)}}},SVGRendererBase.prototype.checkPendingElements=function(){while(this.pendingElements.length){var o=this.pendingElements.pop();if(o.checkParenting(),o.data.tt){var d=0,i=this.elements.length;while(d<i){if(this.elements[d]===o){var r="tp"in o.data?this.findIndexByInd(o.data.tp):d-1,h=this.elements[r],a=h.getMatte(this.layers[d].tt);o.setMatte(a);break}d+=1}}}},SVGRendererBase.prototype.renderFrame=function(o){if(this.renderedFrame===o||this.destroyed)return;if(o===null)o=this.renderedFrame;else this.renderedFrame=o;this.globalData.frameNum=o,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=o,this.globalData._mdf=!1;var d,i=this.layers.length;if(!this.completeLayers)this.checkLayers(o);for(d=i-1;d>=0;d-=1)if(this.completeLayers||this.elements[d])this.elements[d].prepareFrame(o-this.layers[d].st);if(this.globalData._mdf){for(d=0;d<i;d+=1)if(this.completeLayers||this.elements[d])this.elements[d].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(o,d){var i=o.getBaseElement();if(!i)return;var r=0,h;while(r<d){if(this.elements[r]&&this.elements[r]!==!0&&this.elements[r].getBaseElement())h=this.elements[r].getBaseElement();r+=1}if(h)this.layerElement.insertBefore(i,h);else this.layerElement.appendChild(i)},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"};function ICompElement(){}extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(o,d,i){if(this.initFrame(),this.initBaseData(o,d,i),this.initTransform(o,d,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.data.xt||!d.progressiveLoad)this.buildAllItems();this.hide()},ICompElement.prototype.prepareFrame=function(o){if(this._mdf=!1,this.prepareRenderableFrame(o),this.prepareProperties(o,this.isInRange),!this.isInRange&&!this.data.xt)return;if(!this.tm._placeholder){var d=this.tm.v;if(d===this.data.op)d=this.data.op-1;this.renderedFrame=d}else this.renderedFrame=o/this.data.sr;var i,r=this.elements.length;if(!this.completeLayers)this.checkLayers(this.renderedFrame);for(i=r-1;i>=0;i-=1)if(this.completeLayers||this.elements[i]){if(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf)this._mdf=!0}},ICompElement.prototype.renderInnerContent=function(){var o,d=this.layers.length;for(o=0;o<d;o+=1)if(this.completeLayers||this.elements[o])this.elements[o].renderFrame()},ICompElement.prototype.setElements=function(o){this.elements=o},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var o,d=this.layers.length;for(o=0;o<d;o+=1)if(this.elements[o])this.elements[o].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(o,d,i){this.layers=o.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(o,d,i),this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,d.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(o){return new SVGCompElement(o,this.globalData,this)};function SVGRenderer(o,d){this.animationItem=o,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var i="";if(d&&d.title){var r=createNS("title"),h=createElementID();r.setAttribute("id",h),r.textContent=d.title,this.svgElement.appendChild(r),i+=h}if(d&&d.description){var a=createNS("desc"),g=createElementID();a.setAttribute("id",g),a.textContent=d.description,this.svgElement.appendChild(a),i+=" "+g}if(i)this.svgElement.setAttribute("aria-labelledby",i);var l=createNS("defs");this.svgElement.appendChild(l);var x=createNS("g");this.svgElement.appendChild(x),this.layerElement=x,this.renderConfig={preserveAspectRatio:d&&d.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:d&&d.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:d&&d.contentVisibility||"visible",progressiveLoad:d&&d.progressiveLoad||!1,hideOnTransparent:!(d&&d.hideOnTransparent===!1),viewBoxOnly:d&&d.viewBoxOnly||!1,viewBoxSize:d&&d.viewBoxSize||!1,className:d&&d.className||"",id:d&&d.id||"",focusable:d&&d.focusable,filterSize:{width:d&&d.filterSize&&d.filterSize.width||"100%",height:d&&d.filterSize&&d.filterSize.height||"100%",x:d&&d.filterSize&&d.filterSize.x||"0%",y:d&&d.filterSize&&d.filterSize.y||"0%"},width:d&&d.width,height:d&&d.height,runExpressions:!d||d.runExpressions===void 0||d.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:l,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(o){return new SVGCompElement(o,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function o(d){var i,r=d.length,h="_";for(i=0;i<r;i+=1)h+=d[i].transform.key+"_";var a=this.sequences[h];if(!a)a={transforms:[].concat(d),finalTransform:new Matrix,_mdf:!1},this.sequences[h]=a,this.sequenceList.push(a);return a},processSequence:function o(d,i){var r=0,h=d.transforms.length,a=i;while(r<h&&!i){if(d.transforms[r].transform.mProps._mdf){a=!0;break}r+=1}if(a){d.finalTransform.reset();for(r=h-1;r>=0;r-=1)d.finalTransform.multiply(d.transforms[r].transform.mProps.v)}d._mdf=a},processSequences:function o(d){var i,r=this.sequenceList.length;for(i=0;i<r;i+=1)this.processSequence(this.sequenceList[i],d)},getNewKey:function o(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function o(){var d="__lottie_element_luma_buffer",i=null,r=null,h=null;function a(){var x=createNS("svg"),f=createNS("filter"),n=createNS("feColorMatrix");if(f.setAttribute("id",d),n.setAttribute("type","matrix"),n.setAttribute("color-interpolation-filters","sRGB"),n.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),f.appendChild(n),x.appendChild(f),x.setAttribute("id",d+"_svg"),featureSupport.svgLumaHidden)x.style.display="none";return x}function g(){if(!i)h=a(),document.body.appendChild(h),i=createTag("canvas"),r=i.getContext("2d"),r.filter="url(#"+d+")",r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1)}function l(x){if(!i)g();return i.width=x.width,i.height=x.height,r.filter="url(#"+d+")",i}return{load:g,get:l}};function createCanvas(o,d){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(o,d);var i=createTag("canvas");return i.width=o,i.height=d,i}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}}(),registeredEffects={};function CVEffects(o){var d,i=o.data.ef?o.data.ef.length:0;this.filters=[];var r;for(d=0;d<i;d+=1){r=null;var h=o.data.ef[d].ty;if(registeredEffects[h]){var a=registeredEffects[h].effect;r=new a(o.effectsManager.effectElements[d],o)}if(r)this.filters.push(r)}if(this.filters.length)o.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(o){var d,i=this.filters.length;for(d=0;d<i;d+=1)this.filters[d].renderFrame(o)},CVEffects.prototype.getEffects=function(o){var d,i=this.filters.length,r=[];for(d=0;d<i;d+=1)if(this.filters[d].type===o)r.push(this.filters[d]);return r};function registerEffect(o,d){registeredEffects[o]={effect:d}}function CVMaskElement(o,d){this.data=o,this.element=d,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i,r=this.masksProperties.length,h=!1;for(i=0;i<r;i+=1){if(this.masksProperties[i].mode!=="n")h=!0;this.viewData[i]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[i],3)}if(this.hasMasks=h,h)this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(!this.hasMasks)return;var o=this.element.finalTransform.mat,d=this.element.canvasContext,i,r=this.masksProperties.length,h,a,g;d.beginPath();for(i=0;i<r;i+=1)if(this.masksProperties[i].mode!=="n"){if(this.masksProperties[i].inv)d.moveTo(0,0),d.lineTo(this.element.globalData.compSize.w,0),d.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),d.lineTo(0,this.element.globalData.compSize.h),d.lineTo(0,0);g=this.viewData[i].v,h=o.applyToPointArray(g.v[0][0],g.v[0][1],0),d.moveTo(h[0],h[1]);var l,x=g._length;for(l=1;l<x;l+=1)a=o.applyToTriplePoints(g.o[l-1],g.i[l],g.v[l]),d.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);a=o.applyToTriplePoints(g.o[l-1],g.i[0],g.v[0]),d.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5])}this.element.globalData.renderer.save(!0),d.clip()},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};function CVBaseElement(){}var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};CVBaseElement.prototype={createElements:function o(){},initRendererElement:function o(){},createContainerElements:function o(){if(this.data.tt>=1){this.buffers=[];var d=this.globalData.canvasContext,i=assetLoader.createCanvas(d.canvas.width,d.canvas.height);this.buffers.push(i);var r=assetLoader.createCanvas(d.canvas.width,d.canvas.height);if(this.buffers.push(r),this.data.tt>=3&&!document._isProxy)assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function o(){},setBlendMode:function o(){var d=this.globalData;if(d.blendMode!==this.data.bm){d.blendMode=this.data.bm;var i=getBlendMode(this.data.bm);d.canvasContext.globalCompositeOperation=i}},createRenderableComponents:function o(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function o(){if(!this.hidden&&(!this.isInRange||this.isTransparent))this.hidden=!0},showElement:function o(){if(this.isInRange&&!this.isTransparent)this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0},clearCanvas:function o(d){d.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function o(){if(this.data.tt>=1){var d=this.buffers[0],i=d.getContext("2d");this.clearCanvas(i),i.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function o(){if(this.data.tt>=1){var d=this.buffers[1],i=d.getContext("2d");this.clearCanvas(i),i.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var r=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(r.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var h=assetLoader.getLumaCanvas(this.canvasContext.canvas),a=h.getContext("2d");a.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(h,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(d,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function o(d){if(this.hidden||this.data.hd)return;if(this.data.td===1&&!d)return;this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var i=this.data.ty===0;if(this.prepareLayer(),this.globalData.renderer.save(i),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(i),this.exitLayer(),this.maskManager.hasMasks)this.globalData.renderer.restore(!0);if(this._isFirstFrame)this._isFirstFrame=!1},destroy:function o(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(o,d,i,r){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var h=4;if(d.ty==="rc")h=5;else if(d.ty==="el")h=6;else if(d.ty==="sr")h=7;this.sh=ShapePropertyFactory.getShapeProp(o,d,h,o);var a,g=i.length,l;for(a=0;a<g;a+=1)if(!i[a].closed)l={transforms:r.addTransformSequence(i[a].transforms),trNodes:[]},this.styledShapes.push(l),i[a].elements.push(l)}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(o,d,i){this.shapes=[],this.shapesData=o.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(o,d){var i={data:o,type:o.ty,preTransforms:this.transformsManager.addTransformSequence(d),transforms:[],elements:[],closed:o.hd===!0},r={};if(o.ty==="fl"||o.ty==="st"){if(r.c=PropertyFactory.getProp(this,o.c,1,255,this),!r.c.k)i.co="rgb("+bmFloor(r.c.v[0])+","+bmFloor(r.c.v[1])+","+bmFloor(r.c.v[2])+")"}else if(o.ty==="gf"||o.ty==="gs")r.s=PropertyFactory.getProp(this,o.s,1,null,this),r.e=PropertyFactory.getProp(this,o.e,1,null,this),r.h=PropertyFactory.getProp(this,o.h||{k:0},0,0.01,this),r.a=PropertyFactory.getProp(this,o.a||{k:0},0,degToRads,this),r.g=new GradientProperty(this,o.g,this);if(r.o=PropertyFactory.getProp(this,o.o,0,0.01,this),o.ty==="st"||o.ty==="gs"){if(i.lc=lineCapEnum[o.lc||2],i.lj=lineJoinEnum[o.lj||2],o.lj==1)i.ml=o.ml;if(r.w=PropertyFactory.getProp(this,o.w,0,null,this),!r.w.k)i.wi=r.w.v;if(o.d){var h=new DashProperty(this,o.d,"canvas",this);if(r.d=h,!r.d.k)i.da=r.d.dashArray,i.do=r.d.dashoffset[0]}}else i.r=o.r===2?"evenodd":"nonzero";return this.stylesList.push(i),r.style=i,r},CVShapeElement.prototype.createGroupElement=function(){var o={it:[],prevViewData:[]};return o},CVShapeElement.prototype.createTransformElement=function(o){var d={transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,o.o,0,0.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,o,this)}};return d},CVShapeElement.prototype.createShapeElement=function(o){var d=new CVShapeData(this,o,this.stylesList,this.transformsManager);return this.shapes.push(d),this.addShapeToModifiers(d),d},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var o,d=this.itemsData.length;for(o=0;o<d;o+=1)this.prevViewData[o]=this.itemsData[o];this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),d=this.dynamicProperties.length;for(o=0;o<d;o+=1)this.dynamicProperties[o].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(o){var d,i=this.stylesList.length;for(d=0;d<i;d+=1)if(!this.stylesList[d].closed)this.stylesList[d].transforms.push(o)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var o,d=this.stylesList.length;for(o=0;o<d;o+=1)if(!this.stylesList[o].closed)this.stylesList[o].transforms.pop()},CVShapeElement.prototype.closeStyles=function(o){var d,i=o.length;for(d=0;d<i;d+=1)o[d].closed=!0},CVShapeElement.prototype.searchShapes=function(o,d,i,r,h){var a,g=o.length-1,l,x,f=[],n=[],_,v,Y,H=[].concat(h);for(a=g;a>=0;a-=1){if(_=this.searchProcessedElement(o[a]),!_)o[a]._shouldRender=r;else d[a]=i[_-1];if(o[a].ty==="fl"||o[a].ty==="st"||o[a].ty==="gf"||o[a].ty==="gs"){if(!_)d[a]=this.createStyleElement(o[a],H);else d[a].style.closed=!1;f.push(d[a].style)}else if(o[a].ty==="gr"){if(!_)d[a]=this.createGroupElement(o[a]);else{x=d[a].it.length;for(l=0;l<x;l+=1)d[a].prevViewData[l]=d[a].it[l]}this.searchShapes(o[a].it,d[a].it,d[a].prevViewData,r,H)}else if(o[a].ty==="tr"){if(!_)Y=this.createTransformElement(o[a]),d[a]=Y;H.push(d[a]),this.addTransformToStyleList(d[a])}else if(o[a].ty==="sh"||o[a].ty==="rc"||o[a].ty==="el"||o[a].ty==="sr"){if(!_)d[a]=this.createShapeElement(o[a])}else if(o[a].ty==="tm"||o[a].ty==="rd"||o[a].ty==="pb"||o[a].ty==="zz"||o[a].ty==="op"){if(!_)v=ShapeModifiers.getModifier(o[a].ty),v.init(this,o[a]),d[a]=v,this.shapeModifiers.push(v);else v=d[a],v.closed=!1;n.push(v)}else if(o[a].ty==="rp"){if(!_)v=ShapeModifiers.getModifier(o[a].ty),d[a]=v,v.init(this,o,a,d),this.shapeModifiers.push(v),r=!1;else v=d[a],v.closed=!0;n.push(v)}this.addProcessedElement(o[a],a+1)}this.removeTransformFromStyleList(),this.closeStyles(f),g=n.length;for(a=0;a<g;a+=1)n[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(o,d){if(o._opMdf||d.op._mdf||this._isFirstFrame)d.opacity=o.opacity,d.opacity*=d.op.v,d._opMdf=!0},CVShapeElement.prototype.drawLayer=function(){var o,d=this.stylesList.length,i,r,h,a,g,l,x=this.globalData.renderer,f=this.globalData.canvasContext,n,_;for(o=0;o<d;o+=1)if(_=this.stylesList[o],n=_.type,!((n==="st"||n==="gs")&&_.wi===0||!_.data._shouldRender||_.coOp===0||this.globalData.currentGlobalAlpha===0)){if(x.save(),g=_.elements,n==="st"||n==="gs")x.ctxStrokeStyle(n==="st"?_.co:_.grd),x.ctxLineWidth(_.wi),x.ctxLineCap(_.lc),x.ctxLineJoin(_.lj),x.ctxMiterLimit(_.ml||0);else x.ctxFillStyle(n==="fl"?_.co:_.grd);if(x.ctxOpacity(_.coOp),n!=="st"&&n!=="gs")f.beginPath();x.ctxTransform(_.preTransforms.finalTransform.props),r=g.length;for(i=0;i<r;i+=1){if(n==="st"||n==="gs"){if(f.beginPath(),_.da)f.setLineDash(_.da),f.lineDashOffset=_.do}l=g[i].trNodes,a=l.length;for(h=0;h<a;h+=1)if(l[h].t==="m")f.moveTo(l[h].p[0],l[h].p[1]);else if(l[h].t==="c")f.bezierCurveTo(l[h].pts[0],l[h].pts[1],l[h].pts[2],l[h].pts[3],l[h].pts[4],l[h].pts[5]);else f.closePath();if(n==="st"||n==="gs"){if(x.ctxStroke(),_.da)f.setLineDash(this.dashResetter)}}if(n!=="st"&&n!=="gs")this.globalData.renderer.ctxFill(_.r);x.restore()}},CVShapeElement.prototype.renderShape=function(o,d,i,r){var h,a=d.length-1,g;g=o;for(h=a;h>=0;h-=1)if(d[h].ty==="tr")g=i[h].transform,this.renderShapeTransform(o,g);else if(d[h].ty==="sh"||d[h].ty==="el"||d[h].ty==="rc"||d[h].ty==="sr")this.renderPath(d[h],i[h]);else if(d[h].ty==="fl")this.renderFill(d[h],i[h],g);else if(d[h].ty==="st")this.renderStroke(d[h],i[h],g);else if(d[h].ty==="gf"||d[h].ty==="gs")this.renderGradientFill(d[h],i[h],g);else if(d[h].ty==="gr")this.renderShape(g,d[h].it,i[h].it);else if(d[h].ty==="tm");if(r)this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(o,d){if(this._isFirstFrame||d._mdf||o.transforms._mdf){var i=o.trNodes,r=d.paths,h,a,g,l=r._length;i.length=0;var x=o.transforms.finalTransform;for(g=0;g<l;g+=1){var f=r.shapes[g];if(f&&f.v){a=f._length;for(h=1;h<a;h+=1){if(h===1)i.push({t:"m",p:x.applyToPointArray(f.v[0][0],f.v[0][1],0)});i.push({t:"c",pts:x.applyToTriplePoints(f.o[h-1],f.i[h],f.v[h])})}if(a===1)i.push({t:"m",p:x.applyToPointArray(f.v[0][0],f.v[0][1],0)});if(f.c&&a)i.push({t:"c",pts:x.applyToTriplePoints(f.o[h-1],f.i[0],f.v[0])}),i.push({t:"z"})}}o.trNodes=i}},CVShapeElement.prototype.renderPath=function(o,d){if(o.hd!==!0&&o._shouldRender){var i,r=d.styledShapes.length;for(i=0;i<r;i+=1)this.renderStyledShape(d.styledShapes[i],d.sh)}},CVShapeElement.prototype.renderFill=function(o,d,i){var r=d.style;if(d.c._mdf||this._isFirstFrame)r.co="rgb("+bmFloor(d.c.v[0])+","+bmFloor(d.c.v[1])+","+bmFloor(d.c.v[2])+")";if(d.o._mdf||i._opMdf||this._isFirstFrame)r.coOp=d.o.v*i.opacity},CVShapeElement.prototype.renderGradientFill=function(o,d,i){var r=d.style,h;if(!r.grd||d.g._mdf||d.s._mdf||d.e._mdf||o.t!==1&&(d.h._mdf||d.a._mdf)){var a=this.globalData.canvasContext,g=d.s.v,l=d.e.v;if(o.t===1)h=a.createLinearGradient(g[0],g[1],l[0],l[1]);else{var x=Math.sqrt(Math.pow(g[0]-l[0],2)+Math.pow(g[1]-l[1],2)),f=Math.atan2(l[1]-g[1],l[0]-g[0]),n=d.h.v;if(n>=1)n=0.99;else if(n<=-1)n=-0.99;var _=x*n,v=Math.cos(f+d.a.v)*_+g[0],Y=Math.sin(f+d.a.v)*_+g[1];h=a.createRadialGradient(v,Y,0,g[0],g[1],x)}var H,$=o.g.p,I=d.g.c,Z=1;for(H=0;H<$;H+=1){if(d.g._hasOpacity&&d.g._collapsable)Z=d.g.o[H*2+1];h.addColorStop(I[H*4]/100,"rgba("+I[H*4+1]+","+I[H*4+2]+","+I[H*4+3]+","+Z+")")}r.grd=h}r.coOp=d.o.v*i.opacity},CVShapeElement.prototype.renderStroke=function(o,d,i){var{style:r,d:h}=d;if(h&&(h._mdf||this._isFirstFrame))r.da=h.dashArray,r.do=h.dashoffset[0];if(d.c._mdf||this._isFirstFrame)r.co="rgb("+bmFloor(d.c.v[0])+","+bmFloor(d.c.v[1])+","+bmFloor(d.c.v[2])+")";if(d.o._mdf||i._opMdf||this._isFirstFrame)r.coOp=d.o.v*i.opacity;if(d.w._mdf||this._isFirstFrame)r.wi=d.w.v},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function CVTextElement(o,d,i){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var o=this.textProperty.currentData;this.renderedLetters=createSizedArray(o.l?o.l.length:0);var d=!1;if(o.fc)d=!0,this.values.fill=this.buildColor(o.fc);else this.values.fill="rgba(0,0,0,0)";this.fill=d;var i=!1;if(o.sc)i=!0,this.values.stroke=this.buildColor(o.sc),this.values.sWidth=o.sw;var r=this.globalData.fontManager.getFontByName(o.f),h,a,g=o.l,l=this.mHelper;this.stroke=i,this.values.fValue=o.finalSize+"px "+this.globalData.fontManager.getFontByName(o.f).fFamily,a=o.finalText.length;var x,f,n,_,v,Y,H,$,I,Z,c=this.data.singleShape,z=o.tr*0.001*o.finalSize,k=0,X=0,V=!0,u=0;for(h=0;h<a;h+=1){if(x=this.globalData.fontManager.getCharData(o.finalText[h],r.fStyle,this.globalData.fontManager.getFontByName(o.f).fFamily),f=x&&x.data||{},l.reset(),c&&g[h].n)k=-z,X+=o.yOffset,X+=V?1:0,V=!1;if(v=f.shapes?f.shapes[0].it:[],H=v.length,l.scale(o.finalSize/100,o.finalSize/100),c)this.applyTextPropertiesToMatrix(o,l,g[h].line,k,X);I=createSizedArray(H-1);var p=0;for(Y=0;Y<H;Y+=1)if(v[Y].ty==="sh"){_=v[Y].ks.k.i.length,$=v[Y].ks.k,Z=[];for(n=1;n<_;n+=1){if(n===1)Z.push(l.applyToX($.v[0][0],$.v[0][1],0),l.applyToY($.v[0][0],$.v[0][1],0));Z.push(l.applyToX($.o[n-1][0],$.o[n-1][1],0),l.applyToY($.o[n-1][0],$.o[n-1][1],0),l.applyToX($.i[n][0],$.i[n][1],0),l.applyToY($.i[n][0],$.i[n][1],0),l.applyToX($.v[n][0],$.v[n][1],0),l.applyToY($.v[n][0],$.v[n][1],0))}Z.push(l.applyToX($.o[n-1][0],$.o[n-1][1],0),l.applyToY($.o[n-1][0],$.o[n-1][1],0),l.applyToX($.i[0][0],$.i[0][1],0),l.applyToY($.i[0][0],$.i[0][1],0),l.applyToX($.v[0][0],$.v[0][1],0),l.applyToY($.v[0][0],$.v[0][1],0)),I[p]=Z,p+=1}if(c)k+=g[h].l,k+=z;if(this.textSpans[u])this.textSpans[u].elem=I;else this.textSpans[u]={elem:I};u+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var o=this.canvasContext;if(o.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),!this.data.singleShape)this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var d,i,r,h,a,g,l=this.textAnimator.renderedLetters,x=this.textProperty.currentData.l;i=x.length;var f,n=null,_=null,v=null,Y,H,$=this.globalData.renderer;for(d=0;d<i;d+=1)if(!x[d].n){if(f=l[d],f)$.save(),$.ctxTransform(f.p),$.ctxOpacity(f.o);if(this.fill){if(f&&f.fc){if(n!==f.fc)$.ctxFillStyle(f.fc),n=f.fc}else if(n!==this.values.fill)n=this.values.fill,$.ctxFillStyle(this.values.fill);Y=this.textSpans[d].elem,h=Y.length,this.globalData.canvasContext.beginPath();for(r=0;r<h;r+=1){H=Y[r],g=H.length,this.globalData.canvasContext.moveTo(H[0],H[1]);for(a=2;a<g;a+=6)this.globalData.canvasContext.bezierCurveTo(H[a],H[a+1],H[a+2],H[a+3],H[a+4],H[a+5])}this.globalData.canvasContext.closePath(),$.ctxFill()}if(this.stroke){if(f&&f.sw){if(v!==f.sw)v=f.sw,$.ctxLineWidth(f.sw)}else if(v!==this.values.sWidth)v=this.values.sWidth,$.ctxLineWidth(this.values.sWidth);if(f&&f.sc){if(_!==f.sc)_=f.sc,$.ctxStrokeStyle(f.sc)}else if(_!==this.values.stroke)_=this.values.stroke,$.ctxStrokeStyle(this.values.stroke);Y=this.textSpans[d].elem,h=Y.length,this.globalData.canvasContext.beginPath();for(r=0;r<h;r+=1){H=Y[r],g=H.length,this.globalData.canvasContext.moveTo(H[0],H[1]);for(a=2;a<g;a+=6)this.globalData.canvasContext.bezierCurveTo(H[a],H[a+1],H[a+2],H[a+3],H[a+4],H[a+5])}this.globalData.canvasContext.closePath(),$.ctxStroke()}if(f)this.globalData.renderer.restore()}};function CVImageElement(o,d,i){this.assetData=d.getAssetData(o.refId),this.img=d.imageLoader.getAsset(this.assetData),this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var o=createTag("canvas");o.width=this.assetData.w,o.height=this.assetData.h;var d=o.getContext("2d"),i=this.img.width,r=this.img.height,h=i/r,a=this.assetData.w/this.assetData.h,g,l,x=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;if(h>a&&x==="xMidYMid slice"||h<a&&x!=="xMidYMid slice")l=r,g=l*a;else g=i,l=g/a;d.drawImage(this.img,(i-g)/2,(r-l)/2,g,l,0,0,this.assetData.w,this.assetData.h),this.img=o}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(o,d,i){this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function CanvasRendererBase(){}extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(o){return new CVShapeElement(o,this.globalData,this)},CanvasRendererBase.prototype.createText=function(o){return new CVTextElement(o,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(o){return new CVImageElement(o,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(o){return new CVSolidElement(o,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(o){if(o[0]===1&&o[1]===0&&o[4]===0&&o[5]===1&&o[12]===0&&o[13]===0)return;this.canvasContext.transform(o[0],o[1],o[4],o[5],o[12],o[13])},CanvasRendererBase.prototype.ctxOpacity=function(o){this.canvasContext.globalAlpha*=o<0?0:o},CanvasRendererBase.prototype.ctxFillStyle=function(o){this.canvasContext.fillStyle=o},CanvasRendererBase.prototype.ctxStrokeStyle=function(o){this.canvasContext.strokeStyle=o},CanvasRendererBase.prototype.ctxLineWidth=function(o){this.canvasContext.lineWidth=o},CanvasRendererBase.prototype.ctxLineCap=function(o){this.canvasContext.lineCap=o},CanvasRendererBase.prototype.ctxLineJoin=function(o){this.canvasContext.lineJoin=o},CanvasRendererBase.prototype.ctxMiterLimit=function(o){this.canvasContext.miterLimit=o},CanvasRendererBase.prototype.ctxFill=function(o){this.canvasContext.fill(o)},CanvasRendererBase.prototype.ctxFillRect=function(o,d,i,r){this.canvasContext.fillRect(o,d,i,r)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(o){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}if(o)this.globalData.blendMode="source-over";this.contextData.restore(o)},CanvasRendererBase.prototype.configAnimation=function(o){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var d=this.animationItem.container.style;d.width="100%",d.height="100%";var i="0px 0px 0px";if(d.transformOrigin=i,d.mozTransformOrigin=i,d.webkitTransformOrigin=i,d["-webkit-transform"]=i,d.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className)this.animationItem.container.setAttribute("class",this.renderConfig.className);if(this.renderConfig.id)this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=o,this.layers=o.layers,this.transformCanvas={w:o.w,h:o.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(o,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(o.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(o,d){this.reset();var i,r;if(o)i=o,r=d,this.canvasContext.canvas.width=i,this.canvasContext.canvas.height=r;else{if(this.animationItem.wrapper&&this.animationItem.container)i=this.animationItem.wrapper.offsetWidth,r=this.animationItem.wrapper.offsetHeight;else i=this.canvasContext.canvas.width,r=this.canvasContext.canvas.height;this.canvasContext.canvas.width=i*this.renderConfig.dpr,this.canvasContext.canvas.height=r*this.renderConfig.dpr}var h,a;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var g=this.renderConfig.preserveAspectRatio.split(" "),l=g[1]||"meet",x=g[0]||"xMidYMid",f=x.substr(0,4),n=x.substr(4);if(h=i/r,a=this.transformCanvas.w/this.transformCanvas.h,a>h&&l==="meet"||a<h&&l==="slice")this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.w/this.renderConfig.dpr);else this.transformCanvas.sx=r/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.h/this.renderConfig.dpr);if(f==="xMid"&&(a<h&&l==="meet"||a>h&&l==="slice"))this.transformCanvas.tx=(i-this.transformCanvas.w*(r/this.transformCanvas.h))/2*this.renderConfig.dpr;else if(f==="xMax"&&(a<h&&l==="meet"||a>h&&l==="slice"))this.transformCanvas.tx=(i-this.transformCanvas.w*(r/this.transformCanvas.h))*this.renderConfig.dpr;else this.transformCanvas.tx=0;if(n==="YMid"&&(a>h&&l==="meet"||a<h&&l==="slice"))this.transformCanvas.ty=(r-this.transformCanvas.h*(i/this.transformCanvas.w))/2*this.renderConfig.dpr;else if(n==="YMax"&&(a>h&&l==="meet"||a<h&&l==="slice"))this.transformCanvas.ty=(r-this.transformCanvas.h*(i/this.transformCanvas.w))*this.renderConfig.dpr;else this.transformCanvas.ty=0}else if(this.renderConfig.preserveAspectRatio==="none")this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0;else this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0;this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){if(this.renderConfig.clearCanvas&&this.animationItem.wrapper)this.animationItem.wrapper.innerText="";var o,d=this.layers?this.layers.length:0;for(o=d-1;o>=0;o-=1)if(this.elements[o]&&this.elements[o].destroy)this.elements[o].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(o,d){if(this.renderedFrame===o&&this.renderConfig.clearCanvas===!0&&!d||this.destroyed||o===-1)return;this.renderedFrame=o,this.globalData.frameNum=o-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||d,this.globalData.projectInterface.currentFrame=o;var i,r=this.layers.length;if(!this.completeLayers)this.checkLayers(o);for(i=r-1;i>=0;i-=1)if(this.completeLayers||this.elements[i])this.elements[i].prepareFrame(o-this.layers[i].st);if(this.globalData._mdf){if(this.renderConfig.clearCanvas===!0)this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h);else this.save();for(i=r-1;i>=0;i-=1)if(this.completeLayers||this.elements[i])this.elements[i].renderFrame();if(this.renderConfig.clearCanvas!==!0)this.restore()}},CanvasRendererBase.prototype.buildItem=function(o){var d=this.elements;if(d[o]||this.layers[o].ty===99)return;var i=this.createItem(this.layers[o],this,this.globalData);d[o]=i,i.initExpressions()},CanvasRendererBase.prototype.checkPendingElements=function(){while(this.pendingElements.length){var o=this.pendingElements.pop();o.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var o,d=15;for(o=0;o<d;o+=1){var i=new CanvasContext;this.stack[o]=i}this._length=d,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}CVContextData.prototype.duplicate=function(){var o=this._length*2,d=0;for(d=this._length;d<o;d+=1)this.stack[d]=new CanvasContext;this._length=o},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(o){this.cArrPos-=1;var d=this.stack[this.cArrPos],i=d.transform,r,h=this.cTr.props;for(r=0;r<16;r+=1)h[r]=i[r];if(o){this.nativeContext.restore();var a=this.stack[this.cArrPos+1];this.appliedFillStyle=a.fillStyle,this.appliedStrokeStyle=a.strokeStyle,this.appliedLineWidth=a.lineWidth,this.appliedLineCap=a.lineCap,this.appliedLineJoin=a.lineJoin,this.appliedMiterLimit=a.miterLimit}if(this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13]),o||d.opacity!==-1&&this.currentOpacity!==d.opacity)this.nativeContext.globalAlpha=d.opacity,this.currentOpacity=d.opacity;this.currentFillStyle=d.fillStyle,this.currentStrokeStyle=d.strokeStyle,this.currentLineWidth=d.lineWidth,this.currentLineCap=d.lineCap,this.currentLineJoin=d.lineJoin,this.currentMiterLimit=d.miterLimit},CVContextData.prototype.save=function(o){if(o)this.nativeContext.save();var d=this.cTr.props;if(this._length<=this.cArrPos)this.duplicate();var i=this.stack[this.cArrPos],r;for(r=0;r<16;r+=1)i.transform[r]=d[r];this.cArrPos+=1;var h=this.stack[this.cArrPos];h.opacity=i.opacity,h.fillStyle=i.fillStyle,h.strokeStyle=i.strokeStyle,h.lineWidth=i.lineWidth,h.lineCap=i.lineCap,h.lineJoin=i.lineJoin,h.miterLimit=i.miterLimit},CVContextData.prototype.setOpacity=function(o){this.stack[this.cArrPos].opacity=o},CVContextData.prototype.setContext=function(o){this.nativeContext=o},CVContextData.prototype.fillStyle=function(o){if(this.stack[this.cArrPos].fillStyle!==o)this.currentFillStyle=o,this.stack[this.cArrPos].fillStyle=o},CVContextData.prototype.strokeStyle=function(o){if(this.stack[this.cArrPos].strokeStyle!==o)this.currentStrokeStyle=o,this.stack[this.cArrPos].strokeStyle=o},CVContextData.prototype.lineWidth=function(o){if(this.stack[this.cArrPos].lineWidth!==o)this.currentLineWidth=o,this.stack[this.cArrPos].lineWidth=o},CVContextData.prototype.lineCap=function(o){if(this.stack[this.cArrPos].lineCap!==o)this.currentLineCap=o,this.stack[this.cArrPos].lineCap=o},CVContextData.prototype.lineJoin=function(o){if(this.stack[this.cArrPos].lineJoin!==o)this.currentLineJoin=o,this.stack[this.cArrPos].lineJoin=o},CVContextData.prototype.miterLimit=function(o){if(this.stack[this.cArrPos].miterLimit!==o)this.currentMiterLimit=o,this.stack[this.cArrPos].miterLimit=o},CVContextData.prototype.transform=function(o){this.transformMat.cloneFromProps(o);var d=this.cTr;this.transformMat.multiply(d),d.cloneFromProps(this.transformMat.props);var i=d.props;this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13])},CVContextData.prototype.opacity=function(o){var d=this.stack[this.cArrPos].opacity;if(d*=o<0?0:o,this.stack[this.cArrPos].opacity!==d){if(this.currentOpacity!==o)this.nativeContext.globalAlpha=o,this.currentOpacity=o;this.stack[this.cArrPos].opacity=d}},CVContextData.prototype.fill=function(o){if(this.appliedFillStyle!==this.currentFillStyle)this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle;this.nativeContext.fill(o)},CVContextData.prototype.fillRect=function(o,d,i,r){if(this.appliedFillStyle!==this.currentFillStyle)this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle;this.nativeContext.fillRect(o,d,i,r)},CVContextData.prototype.stroke=function(){if(this.appliedStrokeStyle!==this.currentStrokeStyle)this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle;if(this.appliedLineWidth!==this.currentLineWidth)this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth;if(this.appliedLineCap!==this.currentLineCap)this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap;if(this.appliedLineJoin!==this.currentLineJoin)this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin;if(this.appliedMiterLimit!==this.currentMiterLimit)this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit;this.nativeContext.stroke()};function CVCompElement(o,d,i){this.completeLayers=!1,this.layers=o.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(o,d,i),this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,d.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var o=this.canvasContext;o.beginPath(),o.moveTo(0,0),o.lineTo(this.data.w,0),o.lineTo(this.data.w,this.data.h),o.lineTo(0,this.data.h),o.lineTo(0,0),o.clip();var d,i=this.layers.length;for(d=i-1;d>=0;d-=1)if(this.completeLayers||this.elements[d])this.elements[d].renderFrame()},CVCompElement.prototype.destroy=function(){var o,d=this.layers.length;for(o=d-1;o>=0;o-=1)if(this.elements[o])this.elements[o].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(o){return new CVCompElement(o,this.globalData,this)};function CanvasRenderer(o,d){if(this.animationItem=o,this.renderConfig={clearCanvas:d&&d.clearCanvas!==void 0?d.clearCanvas:!0,context:d&&d.context||null,progressiveLoad:d&&d.progressiveLoad||!1,preserveAspectRatio:d&&d.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:d&&d.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:d&&d.contentVisibility||"visible",className:d&&d.className||"",id:d&&d.id||"",runExpressions:!d||d.runExpressions===void 0||d.runExpressions},this.renderConfig.dpr=d&&d.dpr||1,this.animationItem.wrapper)this.renderConfig.dpr=d&&d.dpr||window.devicePixelRatio||1;if(this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas)this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData)}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(o){return new CVCompElement(o,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function o(){},initRendererElement:function o(){if(this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask)this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement);else this.layerElement=this.baseElement;styleDiv(this.baseElement)},createContainerElements:function o(){if(this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln)this.layerElement.setAttribute("id",this.data.ln);if(this.data.cl)this.layerElement.setAttribute("class",this.data.cl);if(this.data.bm!==0)this.setBlendMode()},renderElement:function o(){var d=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var i=this.finalTransform.mat.toCSS();d.transform=i,d.webkitTransform=i}if(this.finalTransform._opMdf)d.opacity=this.finalTransform.mProp.o.v},renderFrame:function o(){if(this.data.hd||this.hidden)return;if(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame)this._isFirstFrame=!1},destroy:function o(){if(this.layerElement=null,this.transformedElement=null,this.matteElement)this.matteElement=null;if(this.maskManager)this.maskManager.destroy(),this.maskManager=null},createRenderableComponents:function o(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function o(){},setMatte:function o(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(o,d,i){this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var o;if(this.data.hasMask)o=createNS("rect"),o.setAttribute("width",this.data.sw),o.setAttribute("height",this.data.sh),o.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh);else o=createTag("div"),o.style.width=this.data.sw+"px",o.style.height=this.data.sh+"px",o.style.backgroundColor=this.data.sc;this.layerElement.appendChild(o)};function HShapeElement(o,d,i){this.shapes=[],this.shapesData=o.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(o,d,i),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var o;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),o=this.svgElement;else{o=createNS("svg");var d=this.comp.data?this.comp.data:this.globalData.compSize;o.setAttribute("width",d.w),o.setAttribute("height",d.h),o.appendChild(this.shapesContainer),this.layerElement.appendChild(o)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=o},HShapeElement.prototype.getTransformedPoint=function(o,d){var i,r=o.length;for(i=0;i<r;i+=1)d=o[i].mProps.v.applyToPointArray(d[0],d[1],0);return d},HShapeElement.prototype.calculateShapeBoundingBox=function(o,d){var i=o.sh.v,r=o.transformers,h,a=i._length,g,l,x,f;if(a<=1)return;for(h=0;h<a-1;h+=1)g=this.getTransformedPoint(r,i.v[h]),l=this.getTransformedPoint(r,i.o[h]),x=this.getTransformedPoint(r,i.i[h+1]),f=this.getTransformedPoint(r,i.v[h+1]),this.checkBounds(g,l,x,f,d);if(i.c)g=this.getTransformedPoint(r,i.v[h]),l=this.getTransformedPoint(r,i.o[h]),x=this.getTransformedPoint(r,i.i[0]),f=this.getTransformedPoint(r,i.v[0]),this.checkBounds(g,l,x,f,d)},HShapeElement.prototype.checkBounds=function(o,d,i,r,h){this.getBoundsOfCurve(o,d,i,r);var a=this.shapeBoundingBox;h.x=bmMin(a.left,h.x),h.xMax=bmMax(a.right,h.xMax),h.y=bmMin(a.top,h.y),h.yMax=bmMax(a.bottom,h.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(o,d,i,r){var h=[[o[0],r[0]],[o[1],r[1]]];for(var a,g,l,x,f,n,_,v=0;v<2;++v)if(g=6*o[v]-12*d[v]+6*i[v],a=-3*o[v]+9*d[v]-9*i[v]+3*r[v],l=3*d[v]-3*o[v],g|=0,a|=0,l|=0,a===0&&g===0);else if(a===0){if(x=-l/g,x>0&&x<1)h[v].push(this.calculateF(x,o,d,i,r,v))}else if(f=g*g-4*l*a,f>=0){if(n=(-g+bmSqrt(f))/(2*a),n>0&&n<1)h[v].push(this.calculateF(n,o,d,i,r,v));if(_=(-g-bmSqrt(f))/(2*a),_>0&&_<1)h[v].push(this.calculateF(_,o,d,i,r,v))}this.shapeBoundingBox.left=bmMin.apply(null,h[0]),this.shapeBoundingBox.top=bmMin.apply(null,h[1]),this.shapeBoundingBox.right=bmMax.apply(null,h[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,h[1])},HShapeElement.prototype.calculateF=function(o,d,i,r,h,a){return bmPow(1-o,3)*d[a]+3*bmPow(1-o,2)*o*i[a]+3*(1-o)*bmPow(o,2)*r[a]+bmPow(o,3)*h[a]},HShapeElement.prototype.calculateBoundingBox=function(o,d){var i,r=o.length;for(i=0;i<r;i+=1)if(o[i]&&o[i].sh)this.calculateShapeBoundingBox(o[i],d);else if(o[i]&&o[i].it)this.calculateBoundingBox(o[i].it,d);else if(o[i]&&o[i].style&&o[i].w)this.expandStrokeBoundingBox(o[i].w,d)},HShapeElement.prototype.expandStrokeBoundingBox=function(o,d){var i=0;if(o.keyframes){for(var r=0;r<o.keyframes.length;r+=1){var h=o.keyframes[r].s;if(h>i)i=h}i*=o.mult}else i=o.v*o.mult;d.x-=i,d.xMax+=i,d.y-=i,d.yMax+=i},HShapeElement.prototype.currentBoxContains=function(o){return this.currentBBox.x<=o.x&&this.currentBBox.y<=o.y&&this.currentBBox.width+this.currentBBox.x>=o.x+o.width&&this.currentBBox.height+this.currentBBox.y>=o.y+o.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var o=this.tempBoundingBox,d=999999;if(o.x=d,o.xMax=-d,o.y=d,o.yMax=-d,this.calculateBoundingBox(this.itemsData,o),o.width=o.xMax<o.x?0:o.xMax-o.x,o.height=o.yMax<o.y?0:o.yMax-o.y,this.currentBoxContains(o))return;var i=!1;if(this.currentBBox.w!==o.width)this.currentBBox.w=o.width,this.shapeCont.setAttribute("width",o.width),i=!0;if(this.currentBBox.h!==o.height)this.currentBBox.h=o.height,this.shapeCont.setAttribute("height",o.height),i=!0;if(i||this.currentBBox.x!==o.x||this.currentBBox.y!==o.y){this.currentBBox.w=o.width,this.currentBBox.h=o.height,this.currentBBox.x=o.x,this.currentBBox.y=o.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var r=this.shapeCont.style,h="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";r.transform=h,r.webkitTransform=h}}};function HTextElement(o,d,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var o=createNS("g");this.maskedElement.appendChild(o),this.innerElem=o}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var o=this.textProperty.currentData;this.renderedLetters=createSizedArray(o.l?o.l.length:0);var d=this.innerElem.style,i=o.fc?this.buildColor(o.fc):"rgba(0,0,0,0)";if(d.fill=i,d.color=i,o.sc)d.stroke=this.buildColor(o.sc),d.strokeWidth=o.sw+"px";var r=this.globalData.fontManager.getFontByName(o.f);if(!this.globalData.fontManager.chars)if(d.fontSize=o.finalSize+"px",d.lineHeight=o.finalSize+"px",r.fClass)this.innerElem.className=r.fClass;else{d.fontFamily=r.fFamily;var{fWeight:h,fStyle:a}=o;d.fontStyle=a,d.fontWeight=h}var g,l,x=o.l;l=x.length;var f,n,_,v=this.mHelper,Y,H="",$=0;for(g=0;g<l;g+=1){if(this.globalData.fontManager.chars){if(!this.textPaths[$])f=createNS("path"),f.setAttribute("stroke-linecap",lineCapEnum[1]),f.setAttribute("stroke-linejoin",lineJoinEnum[2]),f.setAttribute("stroke-miterlimit","4");else f=this.textPaths[$];if(!this.isMasked)if(this.textSpans[$])n=this.textSpans[$],_=n.children[0];else n=createTag("div"),n.style.lineHeight=0,_=createNS("svg"),_.appendChild(f),styleDiv(n)}else if(!this.isMasked)if(this.textSpans[$])n=this.textSpans[$],f=this.textPaths[$];else n=createTag("span"),styleDiv(n),f=createTag("span"),styleDiv(f),n.appendChild(f);else f=this.textPaths[$]?this.textPaths[$]:createNS("text");if(this.globalData.fontManager.chars){var I=this.globalData.fontManager.getCharData(o.finalText[g],r.fStyle,this.globalData.fontManager.getFontByName(o.f).fFamily),Z;if(I)Z=I.data;else Z=null;if(v.reset(),Z&&Z.shapes&&Z.shapes.length)Y=Z.shapes[0].it,v.scale(o.finalSize/100,o.finalSize/100),H=this.createPathShape(v,Y),f.setAttribute("d",H);if(!this.isMasked){if(this.innerElem.appendChild(n),Z&&Z.shapes){document.body.appendChild(_);var c=_.getBBox();_.setAttribute("width",c.width+2),_.setAttribute("height",c.height+2),_.setAttribute("viewBox",c.x-1+" "+(c.y-1)+" "+(c.width+2)+" "+(c.height+2));var z=_.style,k="translate("+(c.x-1)+"px,"+(c.y-1)+"px)";z.transform=k,z.webkitTransform=k,x[g].yOffset=c.y-1}else _.setAttribute("width",1),_.setAttribute("height",1);n.appendChild(_)}else this.innerElem.appendChild(f)}else if(f.textContent=x[g].val,f.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),!this.isMasked){this.innerElem.appendChild(n);var X=f.style,V="translate3d(0,"+-o.finalSize/1.2+"px,0)";X.transform=V,X.webkitTransform=V}else this.innerElem.appendChild(f);if(!this.isMasked)this.textSpans[$]=n;else this.textSpans[$]=f;this.textSpans[$].style.display="block",this.textPaths[$]=f,$+=1}while($<this.textSpans.length)this.textSpans[$].style.display="none",$+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var o;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),o=this.svgElement.style;var d="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";o.transform=d,o.webkitTransform=d}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),!this.lettersChangedFlag&&!this.textAnimator.lettersChangedFlag)return;var i,r,h=0,a=this.textAnimator.renderedLetters,g=this.textProperty.currentData.l;r=g.length;var l,x,f;for(i=0;i<r;i+=1)if(g[i].n)h+=1;else{if(x=this.textSpans[i],f=this.textPaths[i],l=a[h],h+=1,l._mdf.m)if(!this.isMasked)x.style.webkitTransform=l.m,x.style.transform=l.m;else x.setAttribute("transform",l.m);if(x.style.opacity=l.o,l.sw&&l._mdf.sw)f.setAttribute("stroke-width",l.sw);if(l.sc&&l._mdf.sc)f.setAttribute("stroke",l.sc);if(l.fc&&l._mdf.fc)f.setAttribute("fill",l.fc),f.style.color=l.fc}if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var n=this.innerElem.getBBox();if(this.currentBBox.w!==n.width)this.currentBBox.w=n.width,this.svgElement.setAttribute("width",n.width);if(this.currentBBox.h!==n.height)this.currentBBox.h=n.height,this.svgElement.setAttribute("height",n.height);var _=1;if(this.currentBBox.w!==n.width+_*2||this.currentBBox.h!==n.height+_*2||this.currentBBox.x!==n.x-_||this.currentBBox.y!==n.y-_){this.currentBBox.w=n.width+_*2,this.currentBBox.h=n.height+_*2,this.currentBBox.x=n.x-_,this.currentBBox.y=n.y-_,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),o=this.svgElement.style;var v="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";o.transform=v,o.webkitTransform=v}}};function HCameraElement(o,d,i){this.initFrame(),this.initBaseData(o,d,i),this.initHierarchy();var r=PropertyFactory.getProp;if(this.pe=r(this,o.pe,0,0,this),o.ks.p.s)this.px=r(this,o.ks.p.x,1,0,this),this.py=r(this,o.ks.p.y,1,0,this),this.pz=r(this,o.ks.p.z,1,0,this);else this.p=r(this,o.ks.p,1,0,this);if(o.ks.a)this.a=r(this,o.ks.a,1,0,this);if(o.ks.or.k.length&&o.ks.or.k[0].to){var h,a=o.ks.or.k.length;for(h=0;h<a;h+=1)o.ks.or.k[h].to=null,o.ks.or.k[h].ti=null}this.or=r(this,o.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=r(this,o.ks.rx,0,degToRads,this),this.ry=r(this,o.ks.ry,0,degToRads,this),this.rz=r(this,o.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var o,d=this.comp.threeDElements.length,i,r,h;for(o=0;o<d;o+=1)if(i=this.comp.threeDElements[o],i.type==="3d"){r=i.perspectiveElem.style,h=i.container.style;var a=this.pe.v+"px",g="0px 0px 0px",l="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=a,r.webkitPerspective=a,h.transformOrigin=g,h.mozTransformOrigin=g,h.webkitTransformOrigin=g,r.transform=l,r.webkitTransform=l}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var o=this._isFirstFrame,d,i;if(this.hierarchy){i=this.hierarchy.length;for(d=0;d<i;d+=1)o=this.hierarchy[d].finalTransform.mProp._mdf||o}if(o||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy){i=this.hierarchy.length-1;for(d=i;d>=0;d-=1){var r=this.hierarchy[d].finalTransform.mProp;this.mat.translate(-r.p.v[0],-r.p.v[1],r.p.v[2]),this.mat.rotateX(-r.or.v[0]).rotateY(-r.or.v[1]).rotateZ(r.or.v[2]),this.mat.rotateX(-r.rx.v).rotateY(-r.ry.v).rotateZ(r.rz.v),this.mat.scale(1/r.s.v[0],1/r.s.v[1],1/r.s.v[2]),this.mat.translate(r.a.v[0],r.a.v[1],r.a.v[2])}}if(this.p)this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]);else this.mat.translate(-this.px.v,-this.py.v,this.pz.v);if(this.a){var h;if(this.p)h=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]];else h=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(h[0],2)+Math.pow(h[1],2)+Math.pow(h[2],2)),g=[h[0]/a,h[1]/a,h[2]/a],l=Math.sqrt(g[2]*g[2]+g[0]*g[0]),x=Math.atan2(g[1],l),f=Math.atan2(g[0],-g[2]);this.mat.rotateY(f).rotateX(-x)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var n=!this._prevMat.equals(this.mat);if((n||this.pe._mdf)&&this.comp.threeDElements){i=this.comp.threeDElements.length;var _,v,Y;for(d=0;d<i;d+=1)if(_=this.comp.threeDElements[d],_.type==="3d"){if(n){var H=this.mat.toCSS();Y=_.container.style,Y.transform=H,Y.webkitTransform=H}if(this.pe._mdf)v=_.perspectiveElem.style,v.perspective=this.pe.v+"px",v.webkitPerspective=this.pe.v+"px"}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(o){this.prepareProperties(o,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(o,d,i){this.assetData=d.getAssetData(o.refId),this.initElement(o,d,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var o=this.globalData.getAssetsPath(this.assetData),d=new Image;if(this.data.hasMask)this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",o),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h);else this.layerElement.appendChild(d);if(d.crossOrigin="anonymous",d.src=o,this.data.ln)this.baseElement.setAttribute("id",this.data.ln)};function HybridRendererBase(o,d){this.animationItem=o,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:d&&d.className||"",imagePreserveAspectRatio:d&&d.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(d&&d.hideOnTransparent===!1),filterSize:{width:d&&d.filterSize&&d.filterSize.width||"400%",height:d&&d.filterSize&&d.filterSize.height||"400%",x:d&&d.filterSize&&d.filterSize.x||"-100%",y:d&&d.filterSize&&d.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){while(this.pendingElements.length){var o=this.pendingElements.pop();o.checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(o,d){var i=o.getBaseElement();if(!i)return;var r=this.layers[d];if(!r.ddd||!this.supports3d)if(this.threeDElements)this.addTo3dContainer(i,d);else{var h=0,a,g,l;while(h<d){if(this.elements[h]&&this.elements[h]!==!0&&this.elements[h].getBaseElement)g=this.elements[h],l=this.layers[h].ddd?this.getThreeDContainerByPos(h):g.getBaseElement(),a=l||a;h+=1}if(a){if(!r.ddd||!this.supports3d)this.layerElement.insertBefore(i,a)}else if(!r.ddd||!this.supports3d)this.layerElement.appendChild(i)}else this.addTo3dContainer(i,d)},HybridRendererBase.prototype.createShape=function(o){if(!this.supports3d)return new SVGShapeElement(o,this.globalData,this);return new HShapeElement(o,this.globalData,this)},HybridRendererBase.prototype.createText=function(o){if(!this.supports3d)return new SVGTextLottieElement(o,this.globalData,this);return new HTextElement(o,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(o){return this.camera=new HCameraElement(o,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(o){if(!this.supports3d)return new IImageElement(o,this.globalData,this);return new HImageElement(o,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(o){if(!this.supports3d)return new ISolidElement(o,this.globalData,this);return new HSolidElement(o,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(o){var d=0,i=this.threeDElements.length;while(d<i){if(this.threeDElements[d].startPos<=o&&this.threeDElements[d].endPos>=o)return this.threeDElements[d].perspectiveElem;d+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(o,d){var i=createTag("div"),r,h;styleDiv(i);var a=createTag("div");if(styleDiv(a),d==="3d"){r=i.style,r.width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var g="50% 50%";r.webkitTransformOrigin=g,r.mozTransformOrigin=g,r.transformOrigin=g,h=a.style;var l="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";h.transform=l,h.webkitTransform=l}i.appendChild(a);var x={container:a,perspectiveElem:i,startPos:o,endPos:o,type:d};return this.threeDElements.push(x),x},HybridRendererBase.prototype.build3dContainers=function(){var o,d=this.layers.length,i,r="";for(o=0;o<d;o+=1)if(this.layers[o].ddd&&this.layers[o].ty!==3){if(r!=="3d")r="3d",i=this.createThreeDContainer(o,"3d");i.endPos=Math.max(i.endPos,o)}else{if(r!=="2d")r="2d",i=this.createThreeDContainer(o,"2d");i.endPos=Math.max(i.endPos,o)}d=this.threeDElements.length;for(o=d-1;o>=0;o-=1)this.resizerElem.appendChild(this.threeDElements[o].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(o,d){var i=0,r=this.threeDElements.length;while(i<r){if(d<=this.threeDElements[i].endPos){var h=this.threeDElements[i].startPos,a;while(h<d){if(this.elements[h]&&this.elements[h].getBaseElement)a=this.elements[h].getBaseElement();h+=1}if(a)this.threeDElements[i].container.insertBefore(o,a);else this.threeDElements[i].container.appendChild(o);break}i+=1}},HybridRendererBase.prototype.configAnimation=function(o){var d=createTag("div"),i=this.animationItem.wrapper,r=d.style;if(r.width=o.w+"px",r.height=o.h+"px",this.resizerElem=d,styleDiv(d),r.transformStyle="flat",r.mozTransformStyle="flat",r.webkitTransformStyle="flat",this.renderConfig.className)d.setAttribute("class",this.renderConfig.className);i.appendChild(d),r.overflow="hidden";var h=createNS("svg");h.setAttribute("width","1"),h.setAttribute("height","1"),styleDiv(h),this.resizerElem.appendChild(h);var a=createNS("defs");h.appendChild(a),this.data=o,this.setupGlobalData(o,h),this.globalData.defs=a,this.layers=o.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){if(this.animationItem.wrapper)this.animationItem.wrapper.innerText="";this.animationItem.container=null,this.globalData.defs=null;var o,d=this.layers?this.layers.length:0;for(o=0;o<d;o+=1)if(this.elements[o]&&this.elements[o].destroy)this.elements[o].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var o=this.animationItem.wrapper.offsetWidth,d=this.animationItem.wrapper.offsetHeight,i=o/d,r=this.globalData.compSize.w/this.globalData.compSize.h,h,a,g,l;if(r>i)h=o/this.globalData.compSize.w,a=o/this.globalData.compSize.w,g=0,l=(d-this.globalData.compSize.h*(o/this.globalData.compSize.w))/2;else h=d/this.globalData.compSize.h,a=d/this.globalData.compSize.h,g=(o-this.globalData.compSize.w*(d/this.globalData.compSize.h))/2,l=0;var x=this.resizerElem.style;x.webkitTransform="matrix3d("+h+",0,0,0,0,"+a+",0,0,0,0,1,0,"+g+","+l+",0,1)",x.transform=x.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var o=this.globalData.compSize.w,d=this.globalData.compSize.h,i,r=this.threeDElements.length;for(i=0;i<r;i+=1){var h=this.threeDElements[i].perspectiveElem.style;h.webkitPerspective=Math.sqrt(Math.pow(o,2)+Math.pow(d,2))+"px",h.perspective=h.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(o){var d,i=o.length,r=createTag("div");for(d=0;d<i;d+=1)if(o[d].xt){var h=this.createComp(o[d],r,this.globalData.comp,null);h.initExpressions(),this.globalData.projectInterface.registerComposition(h)}};function HCompElement(o,d,i){this.layers=o.layers,this.supports3d=!o.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(o,d,i),this.tm=o.tm?PropertyFactory.getProp(this,o.tm,0,d.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){if(this._createBaseContainerElements(),this.data.hasMask)this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement;else this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(o,d){var i=0,r;while(i<d){if(this.elements[i]&&this.elements[i].getBaseElement)r=this.elements[i].getBaseElement();i+=1}if(r)this.layerElement.insertBefore(o,r);else this.layerElement.appendChild(o)},HCompElement.prototype.createComp=function(o){if(!this.supports3d)return new SVGCompElement(o,this.globalData,this);return new HCompElement(o,this.globalData,this)};function HybridRenderer(o,d){this.animationItem=o,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:d&&d.className||"",imagePreserveAspectRatio:d&&d.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(d&&d.hideOnTransparent===!1),filterSize:{width:d&&d.filterSize&&d.filterSize.width||"400%",height:d&&d.filterSize&&d.filterSize.height||"400%",x:d&&d.filterSize&&d.filterSize.x||"-100%",y:d&&d.filterSize&&d.filterSize.y||"-100%"},runExpressions:!d||d.runExpressions===void 0||d.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(o){if(!this.supports3d)return new SVGCompElement(o,this.globalData,this);return new HCompElement(o,this.globalData,this)};var CompExpressionInterface=function(){return function(o){function d(i){var r=0,h=o.layers.length;while(r<h){if(o.layers[r].nm===i||o.layers[r].ind===i)return o.elements[r].layerInterface;r+=1}return null}return Object.defineProperty(d,"_name",{value:o.data.nm}),d.layer=d,d.pixelAspect=1,d.height=o.data.h||o.globalData.compSize.h,d.width=o.data.w||o.globalData.compSize.w,d.pixelAspect=1,d.frameDuration=1/o.globalData.frameRate,d.displayStartTime=0,d.numLayers=o.layers.length,d}}();function _typeof$2(o){return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$2(o)}function seedRandom(o,d){var i=this,r=256,h=6,a=52,g="random",l=d.pow(r,h),x=d.pow(2,a),f=x*2,n=r-1,_;function v(z,k,X){var V=[];k=k===!0?{entropy:!0}:k||{};var u=I($(k.entropy?[z,c(o)]:z===null?Z():z,3),V),p=new Y(V),U=function F(){var L=p.g(h),j=l,C=0;while(L<x)L=(L+C)*r,j*=r,C=p.g(1);while(L>=f)L/=2,j/=2,C>>>=1;return(L+C)/j};return U.int32=function(){return p.g(4)|0},U.quick=function(){return p.g(4)/4294967296},U.double=U,I(c(p.S),o),(k.pass||X||function(F,L,j,C){if(C){if(C.S)H(C,p);F.state=function(){return H(p,{})}}if(j)return d[g]=F,L;else return F})(U,u,"global"in k?k.global:this==d,k.state)}d["seed"+g]=v;function Y(z){var k,X=z.length,V=this,u=0,p=V.i=V.j=0,U=V.S=[];if(!X)z=[X++];while(u<r)U[u]=u++;for(u=0;u<r;u++)U[u]=U[p=n&p+z[u%X]+(k=U[u])],U[p]=k;V.g=function(F){var L,j=0,C=V.i,T=V.j,K=V.S;while(F--)L=K[C=n&C+1],j=j*r+K[n&(K[C]=K[T=n&T+L])+(K[T]=L)];return V.i=C,V.j=T,j}}function H(z,k){return k.i=z.i,k.j=z.j,k.S=z.S.slice(),k}function $(z,k){var X=[],V=_typeof$2(z),u;if(k&&V=="object")for(u in z)try{X.push($(z[u],k-1))}catch(p){}return X.length?X:V=="string"?z:z+"\x00"}function I(z,k){var X=z+"",V,u=0;while(u<X.length)k[n&u]=n&(V^=k[n&u]*19)+X.charCodeAt(u++);return c(k)}function Z(){try{if(_)return c(_.randomBytes(r));var z=new Uint8Array(r);return(i.crypto||i.msCrypto).getRandomValues(z),c(z)}catch(V){var k=i.navigator,X=k&&k.plugins;return[+new Date,i,X,i.screen,c(o)]}}function c(z){return String.fromCharCode.apply(0,z)}I(d.random(),o)}function initialize$2(o){seedRandom([],o)}var propTypes={SHAPE:"shape"};function _typeof$1(o){return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof$1(o)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(o){return o.constructor===Array||o.constructor===Float32Array}function isNumerable(o,d){return o==="number"||d instanceof Number||o==="boolean"||o==="string"}function $bm_neg(o){var d=_typeof$1(o);if(d==="number"||o instanceof Number||d==="boolean")return-o;if($bm_isInstanceOfArray(o)){var i,r=o.length,h=[];for(i=0;i<r;i+=1)h[i]=-o[i];return h}if(o.propType)return o.v;return-o}var easeInBez=BezierFactory.getBezierEasing(0.333,0,0.833,0.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(0.167,0.167,0.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(0.33,0,0.667,1,"easeInOut").get;function sum(o,d){var i=_typeof$1(o),r=_typeof$1(d);if(isNumerable(i,o)&&isNumerable(r,d)||i==="string"||r==="string")return o+d;if($bm_isInstanceOfArray(o)&&isNumerable(r,d))return o=o.slice(0),o[0]+=d,o;if(isNumerable(i,o)&&$bm_isInstanceOfArray(d))return d=d.slice(0),d[0]=o+d[0],d;if($bm_isInstanceOfArray(o)&&$bm_isInstanceOfArray(d)){var h=0,a=o.length,g=d.length,l=[];while(h<a||h<g){if((typeof o[h]==="number"||o[h]instanceof Number)&&(typeof d[h]==="number"||d[h]instanceof Number))l[h]=o[h]+d[h];else l[h]=d[h]===void 0?o[h]:o[h]||d[h];h+=1}return l}return 0}var add=sum;function sub(o,d){var i=_typeof$1(o),r=_typeof$1(d);if(isNumerable(i,o)&&isNumerable(r,d)){if(i==="string")o=parseInt(o,10);if(r==="string")d=parseInt(d,10);return o-d}if($bm_isInstanceOfArray(o)&&isNumerable(r,d))return o=o.slice(0),o[0]-=d,o;if(isNumerable(i,o)&&$bm_isInstanceOfArray(d))return d=d.slice(0),d[0]=o-d[0],d;if($bm_isInstanceOfArray(o)&&$bm_isInstanceOfArray(d)){var h=0,a=o.length,g=d.length,l=[];while(h<a||h<g){if((typeof o[h]==="number"||o[h]instanceof Number)&&(typeof d[h]==="number"||d[h]instanceof Number))l[h]=o[h]-d[h];else l[h]=d[h]===void 0?o[h]:o[h]||d[h];h+=1}return l}return 0}function mul(o,d){var i=_typeof$1(o),r=_typeof$1(d),h;if(isNumerable(i,o)&&isNumerable(r,d))return o*d;var a,g;if($bm_isInstanceOfArray(o)&&isNumerable(r,d)){g=o.length,h=createTypedArray("float32",g);for(a=0;a<g;a+=1)h[a]=o[a]*d;return h}if(isNumerable(i,o)&&$bm_isInstanceOfArray(d)){g=d.length,h=createTypedArray("float32",g);for(a=0;a<g;a+=1)h[a]=o*d[a];return h}return 0}function div(o,d){var i=_typeof$1(o),r=_typeof$1(d),h;if(isNumerable(i,o)&&isNumerable(r,d))return o/d;var a,g;if($bm_isInstanceOfArray(o)&&isNumerable(r,d)){g=o.length,h=createTypedArray("float32",g);for(a=0;a<g;a+=1)h[a]=o[a]/d;return h}if(isNumerable(i,o)&&$bm_isInstanceOfArray(d)){g=d.length,h=createTypedArray("float32",g);for(a=0;a<g;a+=1)h[a]=o/d[a];return h}return 0}function mod(o,d){if(typeof o==="string")o=parseInt(o,10);if(typeof d==="string")d=parseInt(d,10);return o%d}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(o,d,i){if(d>i){var r=i;i=d,d=r}return Math.min(Math.max(o,d),i)}function radiansToDegrees(o){return o/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(o){return o*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(o,d){if(typeof o==="number"||o instanceof Number)return d=d||0,Math.abs(o-d);if(!d)d=helperLengthArray;var i,r=Math.min(o.length,d.length),h=0;for(i=0;i<r;i+=1)h+=Math.pow(d[i]-o[i],2);return Math.sqrt(h)}function normalize(o){return div(o,length(o))}function rgbToHsl(o){var d=o[0],i=o[1],r=o[2],h=Math.max(d,i,r),a=Math.min(d,i,r),g,l,x=(h+a)/2;if(h===a)g=0,l=0;else{var f=h-a;switch(l=x>0.5?f/(2-h-a):f/(h+a),h){case d:g=(i-r)/f+(i<r?6:0);break;case i:g=(r-d)/f+2;break;case r:g=(d-i)/f+4;break;default:break}g/=6}return[g,l,x,o[3]]}function hue2rgb(o,d,i){if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return o+(d-o)*6*i;if(i<0.5)return d;if(i<0.6666666666666666)return o+(d-o)*(0.6666666666666666-i)*6;return o}function hslToRgb(o){var d=o[0],i=o[1],r=o[2],h,a,g;if(i===0)h=r,g=r,a=r;else{var l=r<0.5?r*(1+i):r+i-r*i,x=2*r-l;h=hue2rgb(x,l,d+0.3333333333333333),a=hue2rgb(x,l,d),g=hue2rgb(x,l,d-0.3333333333333333)}return[h,a,g,o[3]]}function linear(o,d,i,r,h){if(r===void 0||h===void 0)r=d,h=i,d=0,i=1;if(i<d){var a=i;i=d,d=a}if(o<=d)return r;if(o>=i)return h;var g=i===d?0:(o-d)/(i-d);if(!r.length)return r+(h-r)*g;var l,x=r.length,f=createTypedArray("float32",x);for(l=0;l<x;l+=1)f[l]=r[l]+(h[l]-r[l])*g;return f}function random(o,d){if(d===void 0)if(o===void 0)o=0,d=1;else d=o,o=void 0;if(d.length){var i,r=d.length;if(!o)o=createTypedArray("float32",r);var h=createTypedArray("float32",r),a=BMMath.random();for(i=0;i<r;i+=1)h[i]=o[i]+a*(d[i]-o[i]);return h}if(o===void 0)o=0;var g=BMMath.random();return o+g*(d-o)}function createPath(o,d,i,r){var h,a=o.length,g=shapePool.newElement();g.setPathData(!!r,a);var l=[0,0],x,f;for(h=0;h<a;h+=1)x=d&&d[h]?d[h]:l,f=i&&i[h]?i[h]:l,g.setTripleAt(o[h][0],o[h][1],f[0]+o[h][0],f[1]+o[h][1],x[0]+o[h][0],x[1]+o[h][1],h,!0);return g}function initiateExpression(elem,data,property){function noOp(o){return o}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty._name=elem.data.nm,thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function o(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=function o(d,i){var r,h,a=this.pv.length?this.pv.length:1,g=createTypedArray("float32",a);d=5;var l=Math.floor(time*d);r=0,h=0;while(r<l){for(h=0;h<a;h+=1)g[h]+=-i+i*2*BMMath.random();r+=1}var x=time*d,f=x-Math.floor(x),n=createTypedArray("float32",a);if(a>1){for(h=0;h<a;h+=1)n[h]=this.pv[h]+g[h]+(-i+i*2*BMMath.random())*f;return n}return this.pv+g[0]+(-i+i*2*BMMath.random())*f}.bind(this);if(thisProperty.loopIn)loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn;if(thisProperty.loopOut)loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut;if(thisProperty.smooth)smooth=thisProperty.smooth.bind(thisProperty);function loopInDuration(o,d){return loopIn(o,d,!0)}function loopOutDuration(o,d){return loopOut(o,d,!0)}if(this.getValueAtTime)valueAtTime=this.getValueAtTime.bind(this);if(this.getVelocityAtTime)velocityAtTime=this.getVelocityAtTime.bind(this);var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(o,d){var i=[d[0]-o[0],d[1]-o[1],d[2]-o[2]],r=Math.atan2(i[0],Math.sqrt(i[1]*i[1]+i[2]*i[2]))/degToRads,h=-Math.atan2(i[1],i[2])/degToRads;return[h,r,0]}function easeOut(o,d,i,r,h){return applyEase(easeOutBez,o,d,i,r,h)}function easeIn(o,d,i,r,h){return applyEase(easeInBez,o,d,i,r,h)}function ease(o,d,i,r,h){return applyEase(easeInOutBez,o,d,i,r,h)}function applyEase(o,d,i,r,h,a){if(h===void 0)h=i,a=r;else d=(d-i)/(r-i);if(d>1)d=1;else if(d<0)d=0;var g=o(d);if($bm_isInstanceOfArray(h)){var l,x=h.length,f=createTypedArray("float32",x);for(l=0;l<x;l+=1)f[l]=(a[l]-h[l])*g+h[l];return f}return(a-h)*g+h}function nearestKey(o){var d,i=data.k.length,r,h;if(!data.k.length||typeof data.k[0]==="number")r=0,h=0;else if(r=-1,o*=elem.comp.globalData.frameRate,o<data.k[0].t)r=1,h=data.k[0].t;else{for(d=0;d<i-1;d+=1)if(o===data.k[d].t){r=d+1,h=data.k[d].t;break}else if(o>data.k[d].t&&o<data.k[d+1].t){if(o-data.k[d].t>data.k[d+1].t-o)r=d+2,h=data.k[d+1].t;else r=d+1,h=data.k[d].t;break}if(r===-1)r=d+1,h=data.k[d].t}var a={};return a.index=r,a.time=h/elem.comp.globalData.frameRate,a}function key(o){var d,i,r;if(!data.k.length||typeof data.k[0]==="number")throw new Error("The property has no keyframe at index "+o);o-=1,d={time:data.k[o].t/elem.comp.globalData.frameRate,value:[]};var h=Object.prototype.hasOwnProperty.call(data.k[o],"s")?data.k[o].s:data.k[o-1].e;r=h.length;for(i=0;i<r;i+=1)d[i]=h[i],d.value[i]=h[i];return d}function framesToTime(o,d){if(!d)d=elem.comp.globalData.frameRate;return o/d}function timeToFrames(o,d){if(!o&&o!==0)o=time;if(!d)d=elem.comp.globalData.frameRate;return o*d}function seedRandom(o){BMMath.seedrandom(randSeed+o)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(o,d){if(typeof value==="string"){if(d===void 0)return value.substring(o);return value.substring(o,d)}return""}function substr(o,d){if(typeof value==="string"){if(d===void 0)return value.substr(o);return value.substr(o,d)}return""}function posterizeTime(o){time=o===0?0:Math.floor(time*o)/o,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),parent,randSeed=Math.floor(Math.random()*1e6),globalData=elem.globalData;function executeExpression(o){if(value=o,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector")return value;if(this.propType==="textSelector")textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue;if(!thisLayer)text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp;if(!transform){if(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform)anchorPoint=transform.anchorPoint}if(elemType===4&&!content)content=thisLayer("ADBE Root Vectors Group");if(!effect)effect=thisLayer(4);if(hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent)parent=elem.hierarchy[0].layerInterface;if(time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom)seedRandom(randSeed+time);if(needsVelocity)velocity=velocityAtTime(time);return expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt,scoped_bm_rt}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var o={};o.initExpressions=d,o.resetFrame=ExpressionManager.resetFrame;function d(i){var r=0,h=[];function a(){r+=1}function g(){if(r-=1,r===0)x()}function l(f){if(h.indexOf(f)===-1)h.push(f)}function x(){var f,n=h.length;for(f=0;f<n;f+=1)h[f].release();h.length=0}i.renderer.compInterface=CompExpressionInterface(i.renderer),i.renderer.globalData.projectInterface.registerComposition(i.renderer),i.renderer.globalData.pushExpression=a,i.renderer.globalData.popExpression=g,i.renderer.globalData.registerExpressionProperty=l}return o}(),MaskManagerInterface=function(){function o(i,r){this._mask=i,this._data=r}Object.defineProperty(o.prototype,"maskPath",{get:function i(){if(this._mask.prop.k)this._mask.prop.getValue();return this._mask.prop}}),Object.defineProperty(o.prototype,"maskOpacity",{get:function i(){if(this._mask.op.k)this._mask.op.getValue();return this._mask.op.v*100}});var d=function i(r){var h=createSizedArray(r.viewData.length),a,g=r.viewData.length;for(a=0;a<g;a+=1)h[a]=new o(r.viewData[a],r.masksProperties[a]);var l=function x(f){a=0;while(a<g){if(r.masksProperties[a].nm===f)return h[a];a+=1}return null};return l};return d}(),ExpressionPropertyInterface=function(){var o={pv:0,v:0,mult:1},d={pv:[0,0,0],v:[0,0,0],mult:1};function i(g,l,x){Object.defineProperty(g,"velocity",{get:function f(){return l.getVelocityAtTime(l.comp.currentFrame)}}),g.numKeys=l.keyframes?l.keyframes.length:0,g.key=function(f){if(!g.numKeys)return 0;var n="";if("s"in l.keyframes[f-1])n=l.keyframes[f-1].s;else if("e"in l.keyframes[f-2])n=l.keyframes[f-2].e;else n=l.keyframes[f-2].s;var _=x==="unidimensional"?new Number(n):Object.assign({},n);return _.time=l.keyframes[f-1].t/l.elem.comp.globalData.frameRate,_.value=x==="unidimensional"?n[0]:n,_},g.valueAtTime=l.getValueAtTime,g.speedAtTime=l.getSpeedAtTime,g.velocityAtTime=l.getVelocityAtTime,g.propertyGroup=l.propertyGroup}function r(g){if(!g||!("pv"in g))g=o;var l=1/g.mult,x=g.pv*l,f=new Number(x);return f.value=x,i(f,g,"unidimensional"),function(){if(g.k)g.getValue();if(x=g.v*l,f.value!==x)f=new Number(x),f.value=x,f[0]=x,i(f,g,"unidimensional");return f}}function h(g){if(!g||!("pv"in g))g=d;var l=1/g.mult,x=g.data&&g.data.l||g.pv.length,f=createTypedArray("float32",x),n=createTypedArray("float32",x);return f.value=n,i(f,g,"multidimensional"),function(){if(g.k)g.getValue();for(var _=0;_<x;_+=1)n[_]=g.v[_]*l,f[_]=n[_];return f}}function a(){return o}return function(g){if(!g)return a;if(g.propType==="unidimensional")return r(g);return h(g)}}(),TransformExpressionInterface=function(){return function(o){function d(g){switch(g){case"scale":case"Scale":case"ADBE Scale":case 6:return d.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return d.rotation;case"ADBE Rotate X":return d.xRotation;case"ADBE Rotate Y":return d.yRotation;case"position":case"Position":case"ADBE Position":case 2:return d.position;case"ADBE Position_0":return d.xPosition;case"ADBE Position_1":return d.yPosition;case"ADBE Position_2":return d.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return d.anchorPoint;case"opacity":case"Opacity":case 11:return d.opacity;default:return null}}Object.defineProperty(d,"rotation",{get:ExpressionPropertyInterface(o.r||o.rz)}),Object.defineProperty(d,"zRotation",{get:ExpressionPropertyInterface(o.rz||o.r)}),Object.defineProperty(d,"xRotation",{get:ExpressionPropertyInterface(o.rx)}),Object.defineProperty(d,"yRotation",{get:ExpressionPropertyInterface(o.ry)}),Object.defineProperty(d,"scale",{get:ExpressionPropertyInterface(o.s)});var i,r,h,a;if(o.p)a=ExpressionPropertyInterface(o.p);else if(i=ExpressionPropertyInterface(o.px),r=ExpressionPropertyInterface(o.py),o.pz)h=ExpressionPropertyInterface(o.pz);return Object.defineProperty(d,"position",{get:function g(){if(o.p)return a();return[i(),r(),h?h():0]}}),Object.defineProperty(d,"xPosition",{get:ExpressionPropertyInterface(o.px)}),Object.defineProperty(d,"yPosition",{get:ExpressionPropertyInterface(o.py)}),Object.defineProperty(d,"zPosition",{get:ExpressionPropertyInterface(o.pz)}),Object.defineProperty(d,"anchorPoint",{get:ExpressionPropertyInterface(o.a)}),Object.defineProperty(d,"opacity",{get:ExpressionPropertyInterface(o.o)}),Object.defineProperty(d,"skew",{get:ExpressionPropertyInterface(o.sk)}),Object.defineProperty(d,"skewAxis",{get:ExpressionPropertyInterface(o.sa)}),Object.defineProperty(d,"orientation",{get:ExpressionPropertyInterface(o.or)}),d}}(),LayerExpressionInterface=function(){function o(f){var n=new Matrix;if(f!==void 0){var _=this._elem.finalTransform.mProp.getValueAtTime(f);_.clone(n)}else{var v=this._elem.finalTransform.mProp;v.applyToMatrix(n)}return n}function d(f,n){var _=this.getMatrix(n);return _.props[12]=0,_.props[13]=0,_.props[14]=0,this.applyPoint(_,f)}function i(f,n){var _=this.getMatrix(n);return this.applyPoint(_,f)}function r(f,n){var _=this.getMatrix(n);return _.props[12]=0,_.props[13]=0,_.props[14]=0,this.invertPoint(_,f)}function h(f,n){var _=this.getMatrix(n);return this.invertPoint(_,f)}function a(f,n){if(this._elem.hierarchy&&this._elem.hierarchy.length){var _,v=this._elem.hierarchy.length;for(_=0;_<v;_+=1)this._elem.hierarchy[_].finalTransform.mProp.applyToMatrix(f)}return f.applyToPointArray(n[0],n[1],n[2]||0)}function g(f,n){if(this._elem.hierarchy&&this._elem.hierarchy.length){var _,v=this._elem.hierarchy.length;for(_=0;_<v;_+=1)this._elem.hierarchy[_].finalTransform.mProp.applyToMatrix(f)}return f.inversePoint(n)}function l(f){var n=new Matrix;if(n.reset(),this._elem.finalTransform.mProp.applyToMatrix(n),this._elem.hierarchy&&this._elem.hierarchy.length){var _,v=this._elem.hierarchy.length;for(_=0;_<v;_+=1)this._elem.hierarchy[_].finalTransform.mProp.applyToMatrix(n);return n.inversePoint(f)}return n.inversePoint(f)}function x(){return[1,1,1,1]}return function(f){var n;function _($){Y.mask=new MaskManagerInterface($,f)}function v($){Y.effect=$}function Y($){switch($){case"ADBE Root Vectors Group":case"Contents":case 2:return Y.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return n;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return Y.effect;case"ADBE Text Properties":return Y.textInterface;default:return null}}Y.getMatrix=o,Y.invertPoint=g,Y.applyPoint=a,Y.toWorld=i,Y.toWorldVec=d,Y.fromWorld=h,Y.fromWorldVec=r,Y.toComp=i,Y.fromComp=l,Y.sampleImage=x,Y.sourceRectAtTime=f.sourceRectAtTime.bind(f),Y._elem=f,n=TransformExpressionInterface(f.finalTransform.mProp);var H=getDescriptor(n,"anchorPoint");return Object.defineProperties(Y,{hasParent:{get:function $(){return f.hierarchy.length}},parent:{get:function $(){return f.hierarchy[0].layerInterface}},rotation:getDescriptor(n,"rotation"),scale:getDescriptor(n,"scale"),position:getDescriptor(n,"position"),opacity:getDescriptor(n,"opacity"),anchorPoint:H,anchor_point:H,transform:{get:function $(){return n}},active:{get:function $(){return f.isInRange}}}),Y.startTime=f.data.st,Y.index=f.data.ind,Y.source=f.data.refId,Y.height=f.data.ty===0?f.data.h:100,Y.width=f.data.ty===0?f.data.w:100,Y.inPoint=f.data.ip/f.comp.globalData.frameRate,Y.outPoint=f.data.op/f.comp.globalData.frameRate,Y._name=f.data.nm,Y.registerMaskInterface=_,Y.registerEffectsInterface=v,Y}}(),propertyGroupFactory=function(){return function(o,d){return function(i){if(i=i===void 0?1:i,i<=0)return o;return d(i-1)}}}(),PropertyInterface=function(){return function(o,d){var i={_name:o};function r(h){if(h=h===void 0?1:h,h<=0)return i;return d(h-1)}return r}}(),EffectsExpressionInterface=function(){var o={createEffectsInterface:d};function d(h,a){if(h.effectsManager){var g=[],l=h.data.ef,x,f=h.effectsManager.effectElements.length;for(x=0;x<f;x+=1)g.push(i(l[x],h.effectsManager.effectElements[x],a,h));var n=h.data.ef||[],_=function v(Y){x=0,f=n.length;while(x<f){if(Y===n[x].nm||Y===n[x].mn||Y===n[x].ix)return g[x];x+=1}return null};return Object.defineProperty(_,"numProperties",{get:function v(){return n.length}}),_}return null}function i(h,a,g,l){function x(Y){var H=h.ef,$=0,I=H.length;while($<I){if(Y===H[$].nm||Y===H[$].mn||Y===H[$].ix){if(H[$].ty===5)return n[$];return n[$]()}$+=1}throw new Error}var f=propertyGroupFactory(x,g),n=[],_,v=h.ef.length;for(_=0;_<v;_+=1)if(h.ef[_].ty===5)n.push(i(h.ef[_],a.effectElements[_],a.effectElements[_].propertyGroup,l));else n.push(r(a.effectElements[_],h.ef[_].ty,l,f));if(h.mn==="ADBE Color Control")Object.defineProperty(x,"color",{get:function Y(){return n[0]()}});return Object.defineProperties(x,{numProperties:{get:function Y(){return h.np}},_name:{value:h.nm},propertyGroup:{value:f}}),x.enabled=h.en!==0,x.active=x.enabled,x}function r(h,a,g,l){var x=ExpressionPropertyInterface(h.p);function f(){if(a===10)return g.comp.compInterface(h.p.v);return x()}if(h.p.setGroupProperty)h.p.setGroupProperty(PropertyInterface("",l));return f}return o}(),ShapePathInterface=function(){return function o(d,i,r){var h=i.sh;function a(l){if(l==="Shape"||l==="shape"||l==="Path"||l==="path"||l==="ADBE Vector Shape"||l===2)return a.path;return null}var g=propertyGroupFactory(a,r);return h.setGroupProperty(PropertyInterface("Path",g)),Object.defineProperties(a,{path:{get:function l(){if(h.k)h.getValue();return h}},shape:{get:function l(){if(h.k)h.getValue();return h}},_name:{value:d.nm},ix:{value:d.ix},propertyIndex:{value:d.ix},mn:{value:d.mn},propertyGroup:{value:r}}),a}}(),ShapeExpressionInterface=function(){function o(H,$,I){var Z=[],c,z=H?H.length:0;for(c=0;c<z;c+=1)if(H[c].ty==="gr")Z.push(i(H[c],$[c],I));else if(H[c].ty==="fl")Z.push(r(H[c],$[c],I));else if(H[c].ty==="st")Z.push(g(H[c],$[c],I));else if(H[c].ty==="tm")Z.push(l(H[c],$[c],I));else if(H[c].ty==="tr");else if(H[c].ty==="el")Z.push(f(H[c],$[c],I));else if(H[c].ty==="sr")Z.push(n(H[c],$[c],I));else if(H[c].ty==="sh")Z.push(ShapePathInterface(H[c],$[c],I));else if(H[c].ty==="rc")Z.push(_(H[c],$[c],I));else if(H[c].ty==="rd")Z.push(v(H[c],$[c],I));else if(H[c].ty==="rp")Z.push(Y(H[c],$[c],I));else if(H[c].ty==="gf")Z.push(h(H[c],$[c],I));else Z.push(a(H[c],$[c],I));return Z}function d(H,$,I){var Z,c=function k(X){var V=0,u=Z.length;while(V<u){if(Z[V]._name===X||Z[V].mn===X||Z[V].propertyIndex===X||Z[V].ix===X||Z[V].ind===X)return Z[V];V+=1}if(typeof X==="number")return Z[X-1];return null};c.propertyGroup=propertyGroupFactory(c,I),Z=o(H.it,$.it,c.propertyGroup),c.numProperties=Z.length;var z=x(H.it[H.it.length-1],$.it[$.it.length-1],c.propertyGroup);return c.transform=z,c.propertyIndex=H.cix,c._name=H.nm,c}function i(H,$,I){var Z=function k(X){switch(X){case"ADBE Vectors Group":case"Contents":case 2:return Z.content;default:return Z.transform}};Z.propertyGroup=propertyGroupFactory(Z,I);var c=d(H,$,Z.propertyGroup),z=x(H.it[H.it.length-1],$.it[$.it.length-1],Z.propertyGroup);return Z.content=c,Z.transform=z,Object.defineProperty(Z,"_name",{get:function k(){return H.nm}}),Z.numProperties=H.np,Z.propertyIndex=H.ix,Z.nm=H.nm,Z.mn=H.mn,Z}function r(H,$,I){function Z(c){if(c==="Color"||c==="color")return Z.color;if(c==="Opacity"||c==="opacity")return Z.opacity;return null}return Object.defineProperties(Z,{color:{get:ExpressionPropertyInterface($.c)},opacity:{get:ExpressionPropertyInterface($.o)},_name:{value:H.nm},mn:{value:H.mn}}),$.c.setGroupProperty(PropertyInterface("Color",I)),$.o.setGroupProperty(PropertyInterface("Opacity",I)),Z}function h(H,$,I){function Z(c){if(c==="Start Point"||c==="start point")return Z.startPoint;if(c==="End Point"||c==="end point")return Z.endPoint;if(c==="Opacity"||c==="opacity")return Z.opacity;return null}return Object.defineProperties(Z,{startPoint:{get:ExpressionPropertyInterface($.s)},endPoint:{get:ExpressionPropertyInterface($.e)},opacity:{get:ExpressionPropertyInterface($.o)},type:{get:function c(){return"a"}},_name:{value:H.nm},mn:{value:H.mn}}),$.s.setGroupProperty(PropertyInterface("Start Point",I)),$.e.setGroupProperty(PropertyInterface("End Point",I)),$.o.setGroupProperty(PropertyInterface("Opacity",I)),Z}function a(){function H(){return null}return H}function g(H,$,I){var Z=propertyGroupFactory(u,I),c=propertyGroupFactory(V,Z);function z(p){Object.defineProperty(V,H.d[p].nm,{get:ExpressionPropertyInterface($.d.dataProps[p].p)})}var k,X=H.d?H.d.length:0,V={};for(k=0;k<X;k+=1)z(k),$.d.dataProps[k].p.setGroupProperty(c);function u(p){if(p==="Color"||p==="color")return u.color;if(p==="Opacity"||p==="opacity")return u.opacity;if(p==="Stroke Width"||p==="stroke width")return u.strokeWidth;return null}return Object.defineProperties(u,{color:{get:ExpressionPropertyInterface($.c)},opacity:{get:ExpressionPropertyInterface($.o)},strokeWidth:{get:ExpressionPropertyInterface($.w)},dash:{get:function p(){return V}},_name:{value:H.nm},mn:{value:H.mn}}),$.c.setGroupProperty(PropertyInterface("Color",Z)),$.o.setGroupProperty(PropertyInterface("Opacity",Z)),$.w.setGroupProperty(PropertyInterface("Stroke Width",Z)),u}function l(H,$,I){function Z(z){if(z===H.e.ix||z==="End"||z==="end")return Z.end;if(z===H.s.ix)return Z.start;if(z===H.o.ix)return Z.offset;return null}var c=propertyGroupFactory(Z,I);return Z.propertyIndex=H.ix,$.s.setGroupProperty(PropertyInterface("Start",c)),$.e.setGroupProperty(PropertyInterface("End",c)),$.o.setGroupProperty(PropertyInterface("Offset",c)),Z.propertyIndex=H.ix,Z.propertyGroup=I,Object.defineProperties(Z,{start:{get:ExpressionPropertyInterface($.s)},end:{get:ExpressionPropertyInterface($.e)},offset:{get:ExpressionPropertyInterface($.o)},_name:{value:H.nm}}),Z.mn=H.mn,Z}function x(H,$,I){function Z(z){if(H.a.ix===z||z==="Anchor Point")return Z.anchorPoint;if(H.o.ix===z||z==="Opacity")return Z.opacity;if(H.p.ix===z||z==="Position")return Z.position;if(H.r.ix===z||z==="Rotation"||z==="ADBE Vector Rotation")return Z.rotation;if(H.s.ix===z||z==="Scale")return Z.scale;if(H.sk&&H.sk.ix===z||z==="Skew")return Z.skew;if(H.sa&&H.sa.ix===z||z==="Skew Axis")return Z.skewAxis;return null}var c=propertyGroupFactory(Z,I);if($.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",c)),$.transform.mProps.p.setGroupProperty(PropertyInterface("Position",c)),$.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",c)),$.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",c)),$.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",c)),$.transform.mProps.sk)$.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",c)),$.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",c));return $.transform.op.setGroupProperty(PropertyInterface("Opacity",c)),Object.defineProperties(Z,{opacity:{get:ExpressionPropertyInterface($.transform.mProps.o)},position:{get:ExpressionPropertyInterface($.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface($.transform.mProps.a)},scale:{get:ExpressionPropertyInterface($.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface($.transform.mProps.r)},skew:{get:ExpressionPropertyInterface($.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface($.transform.mProps.sa)},_name:{value:H.nm}}),Z.ty="tr",Z.mn=H.mn,Z.propertyGroup=I,Z}function f(H,$,I){function Z(k){if(H.p.ix===k)return Z.position;if(H.s.ix===k)return Z.size;return null}var c=propertyGroupFactory(Z,I);Z.propertyIndex=H.ix;var z=$.sh.ty==="tm"?$.sh.prop:$.sh;return z.s.setGroupProperty(PropertyInterface("Size",c)),z.p.setGroupProperty(PropertyInterface("Position",c)),Object.defineProperties(Z,{size:{get:ExpressionPropertyInterface(z.s)},position:{get:ExpressionPropertyInterface(z.p)},_name:{value:H.nm}}),Z.mn=H.mn,Z}function n(H,$,I){function Z(k){if(H.p.ix===k)return Z.position;if(H.r.ix===k)return Z.rotation;if(H.pt.ix===k)return Z.points;if(H.or.ix===k||k==="ADBE Vector Star Outer Radius")return Z.outerRadius;if(H.os.ix===k)return Z.outerRoundness;if(H.ir&&(H.ir.ix===k||k==="ADBE Vector Star Inner Radius"))return Z.innerRadius;if(H.is&&H.is.ix===k)return Z.innerRoundness;return null}var c=propertyGroupFactory(Z,I),z=$.sh.ty==="tm"?$.sh.prop:$.sh;if(Z.propertyIndex=H.ix,z.or.setGroupProperty(PropertyInterface("Outer Radius",c)),z.os.setGroupProperty(PropertyInterface("Outer Roundness",c)),z.pt.setGroupProperty(PropertyInterface("Points",c)),z.p.setGroupProperty(PropertyInterface("Position",c)),z.r.setGroupProperty(PropertyInterface("Rotation",c)),H.ir)z.ir.setGroupProperty(PropertyInterface("Inner Radius",c)),z.is.setGroupProperty(PropertyInterface("Inner Roundness",c));return Object.defineProperties(Z,{position:{get:ExpressionPropertyInterface(z.p)},rotation:{get:ExpressionPropertyInterface(z.r)},points:{get:ExpressionPropertyInterface(z.pt)},outerRadius:{get:ExpressionPropertyInterface(z.or)},outerRoundness:{get:ExpressionPropertyInterface(z.os)},innerRadius:{get:ExpressionPropertyInterface(z.ir)},innerRoundness:{get:ExpressionPropertyInterface(z.is)},_name:{value:H.nm}}),Z.mn=H.mn,Z}function _(H,$,I){function Z(k){if(H.p.ix===k)return Z.position;if(H.r.ix===k)return Z.roundness;if(H.s.ix===k||k==="Size"||k==="ADBE Vector Rect Size")return Z.size;return null}var c=propertyGroupFactory(Z,I),z=$.sh.ty==="tm"?$.sh.prop:$.sh;return Z.propertyIndex=H.ix,z.p.setGroupProperty(PropertyInterface("Position",c)),z.s.setGroupProperty(PropertyInterface("Size",c)),z.r.setGroupProperty(PropertyInterface("Rotation",c)),Object.defineProperties(Z,{position:{get:ExpressionPropertyInterface(z.p)},roundness:{get:ExpressionPropertyInterface(z.r)},size:{get:ExpressionPropertyInterface(z.s)},_name:{value:H.nm}}),Z.mn=H.mn,Z}function v(H,$,I){function Z(k){if(H.r.ix===k||k==="Round Corners 1")return Z.radius;return null}var c=propertyGroupFactory(Z,I),z=$;return Z.propertyIndex=H.ix,z.rd.setGroupProperty(PropertyInterface("Radius",c)),Object.defineProperties(Z,{radius:{get:ExpressionPropertyInterface(z.rd)},_name:{value:H.nm}}),Z.mn=H.mn,Z}function Y(H,$,I){function Z(k){if(H.c.ix===k||k==="Copies")return Z.copies;if(H.o.ix===k||k==="Offset")return Z.offset;return null}var c=propertyGroupFactory(Z,I),z=$;return Z.propertyIndex=H.ix,z.c.setGroupProperty(PropertyInterface("Copies",c)),z.o.setGroupProperty(PropertyInterface("Offset",c)),Object.defineProperties(Z,{copies:{get:ExpressionPropertyInterface(z.c)},offset:{get:ExpressionPropertyInterface(z.o)},_name:{value:H.nm}}),Z.mn=H.mn,Z}return function(H,$,I){var Z;function c(k){if(typeof k==="number"){if(k=k===void 0?1:k,k===0)return I;return Z[k-1]}var X=0,V=Z.length;while(X<V){if(Z[X]._name===k)return Z[X];X+=1}return null}function z(){return I}return c.propertyGroup=propertyGroupFactory(c,z),Z=o(H,$,c.propertyGroup),c.numProperties=Z.length,c._name="Contents",c}}(),TextExpressionInterface=function(){return function(o){var d;function i(r){switch(r){case"ADBE Text Document":return i.sourceText;default:return null}}return Object.defineProperty(i,"sourceText",{get:function r(){o.textProperty.getValue();var h=o.textProperty.currentData.t;if(!d||h!==d.value)d=new String(h),d.value=h||new String(h),Object.defineProperty(d,"style",{get:function a(){return{fillColor:o.textProperty.currentData.fc}}});return d}}),i}}();function _typeof(o){return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_typeof(o)}var FootageInterface=function(){var o=function i(r){var h="",a=r.getFootageData();function g(){return h="",a=r.getFootageData(),l}function l(x){if(a[x]){if(h=x,a=a[x],_typeof(a)==="object")return l;return a}var f=x.indexOf(h);if(f!==-1){var n=parseInt(x.substr(f+h.length),10);if(a=a[n],_typeof(a)==="object")return l;return a}return""}return g},d=function i(r){function h(a){if(a==="Outline")return h.outlineInterface();return null}return h._name="Outline",h.outlineInterface=o(r),h};return function(i){function r(h){if(h==="Data")return r.dataInterface;return null}return r._name="Data",r.dataInterface=d(i),r}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(o){return interfaces[o]||null}var expressionHelpers=function(){function o(g,l,x){if(l.x)x.k=!0,x.x=!0,x.initiateExpression=ExpressionManager.initiateExpression,x.effectsSequence.push(x.initiateExpression(g,l,x).bind(x))}function d(g){if(g*=this.elem.globalData.frameRate,g-=this.offsetTime,g!==this._cachingAtTime.lastFrame)this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<g?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(g,this._cachingAtTime),this._cachingAtTime.lastFrame=g;return this._cachingAtTime.value}function i(g){var l=-0.01,x=this.getValueAtTime(g),f=this.getValueAtTime(g+l),n=0;if(x.length){var _;for(_=0;_<x.length;_+=1)n+=Math.pow(f[_]-x[_],2);n=Math.sqrt(n)*100}else n=0;return n}function r(g){if(this.vel!==void 0)return this.vel;var l=-0.001,x=this.getValueAtTime(g),f=this.getValueAtTime(g+l),n;if(x.length){n=createTypedArray("float32",x.length);var _;for(_=0;_<x.length;_+=1)n[_]=(f[_]-x[_])/l}else n=(f-x)/l;return n}function h(){return this.pv}function a(g){this.propertyGroup=g}return{searchExpressions:o,getSpeedAtTime:i,getVelocityAtTime:r,getValueAtTime:d,getStaticValueAtTime:h,setGroupProperty:a}}();function addPropertyDecorator(){function o(v,Y,H){if(!this.k||!this.keyframes)return this.pv;v=v?v.toLowerCase():"";var $=this.comp.renderedFrame,I=this.keyframes,Z=I[I.length-1].t;if($<=Z)return this.pv;var c,z;if(!H){if(!Y||Y>I.length-1)Y=I.length-1;z=I[I.length-1-Y].t,c=Z-z}else{if(!Y)c=Math.max(0,Z-this.elem.data.ip);else c=Math.abs(Z-this.elem.comp.globalData.frameRate*Y);z=Z-c}var k,X,V;if(v==="pingpong"){var u=Math.floor(($-z)/c);if(u%2!==0)return this.getValueAtTime((c-($-z)%c+z)/this.comp.globalData.frameRate,0)}else if(v==="offset"){var p=this.getValueAtTime(z/this.comp.globalData.frameRate,0),U=this.getValueAtTime(Z/this.comp.globalData.frameRate,0),F=this.getValueAtTime((($-z)%c+z)/this.comp.globalData.frameRate,0),L=Math.floor(($-z)/c);if(this.pv.length){V=new Array(p.length),X=V.length;for(k=0;k<X;k+=1)V[k]=(U[k]-p[k])*L+F[k];return V}return(U-p)*L+F}else if(v==="continue"){var j=this.getValueAtTime(Z/this.comp.globalData.frameRate,0),C=this.getValueAtTime((Z-0.001)/this.comp.globalData.frameRate,0);if(this.pv.length){V=new Array(j.length),X=V.length;for(k=0;k<X;k+=1)V[k]=j[k]+(j[k]-C[k])*(($-Z)/this.comp.globalData.frameRate)/0.0005;return V}return j+(j-C)*(($-Z)/0.001)}return this.getValueAtTime((($-z)%c+z)/this.comp.globalData.frameRate,0)}function d(v,Y,H){if(!this.k)return this.pv;v=v?v.toLowerCase():"";var $=this.comp.renderedFrame,I=this.keyframes,Z=I[0].t;if($>=Z)return this.pv;var c,z;if(!H){if(!Y||Y>I.length-1)Y=I.length-1;z=I[Y].t,c=z-Z}else{if(!Y)c=Math.max(0,this.elem.data.op-Z);else c=Math.abs(this.elem.comp.globalData.frameRate*Y);z=Z+c}var k,X,V;if(v==="pingpong"){var u=Math.floor((Z-$)/c);if(u%2===0)return this.getValueAtTime(((Z-$)%c+Z)/this.comp.globalData.frameRate,0)}else if(v==="offset"){var p=this.getValueAtTime(Z/this.comp.globalData.frameRate,0),U=this.getValueAtTime(z/this.comp.globalData.frameRate,0),F=this.getValueAtTime((c-(Z-$)%c+Z)/this.comp.globalData.frameRate,0),L=Math.floor((Z-$)/c)+1;if(this.pv.length){V=new Array(p.length),X=V.length;for(k=0;k<X;k+=1)V[k]=F[k]-(U[k]-p[k])*L;return V}return F-(U-p)*L}else if(v==="continue"){var j=this.getValueAtTime(Z/this.comp.globalData.frameRate,0),C=this.getValueAtTime((Z+0.001)/this.comp.globalData.frameRate,0);if(this.pv.length){V=new Array(j.length),X=V.length;for(k=0;k<X;k+=1)V[k]=j[k]+(j[k]-C[k])*(Z-$)/0.001;return V}return j+(j-C)*(Z-$)/0.001}return this.getValueAtTime((c-((Z-$)%c+Z))/this.comp.globalData.frameRate,0)}function i(v,Y){if(!this.k)return this.pv;if(v=(v||0.4)*0.5,Y=Math.floor(Y||5),Y<=1)return this.pv;var H=this.comp.renderedFrame/this.comp.globalData.frameRate,$=H-v,I=H+v,Z=Y>1?(I-$)/(Y-1):1,c=0,z=0,k;if(this.pv.length)k=createTypedArray("float32",this.pv.length);else k=0;var X;while(c<Y){if(X=this.getValueAtTime($+c*Z),this.pv.length)for(z=0;z<this.pv.length;z+=1)k[z]+=X[z];else k+=X;c+=1}if(this.pv.length)for(z=0;z<this.pv.length;z+=1)k[z]/=Y;else k/=Y;return k}function r(v){if(!this._transformCachingAtTime)this._transformCachingAtTime={v:new Matrix};var Y=this._transformCachingAtTime.v;if(Y.cloneFromProps(this.pre.props),this.appliedTransformations<1){var H=this.a.getValueAtTime(v);Y.translate(-H[0]*this.a.mult,-H[1]*this.a.mult,H[2]*this.a.mult)}if(this.appliedTransformations<2){var $=this.s.getValueAtTime(v);Y.scale($[0]*this.s.mult,$[1]*this.s.mult,$[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var I=this.sk.getValueAtTime(v),Z=this.sa.getValueAtTime(v);Y.skewFromAxis(-I*this.sk.mult,Z*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var c=this.r.getValueAtTime(v);Y.rotate(-c*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var z=this.rz.getValueAtTime(v),k=this.ry.getValueAtTime(v),X=this.rx.getValueAtTime(v),V=this.or.getValueAtTime(v);Y.rotateZ(-z*this.rz.mult).rotateY(k*this.ry.mult).rotateX(X*this.rx.mult).rotateZ(-V[2]*this.or.mult).rotateY(V[1]*this.or.mult).rotateX(V[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var u=this.px.getValueAtTime(v),p=this.py.getValueAtTime(v);if(this.data.p.z){var U=this.pz.getValueAtTime(v);Y.translate(u*this.px.mult,p*this.py.mult,-U*this.pz.mult)}else Y.translate(u*this.px.mult,p*this.py.mult,0)}else{var F=this.p.getValueAtTime(v);Y.translate(F[0]*this.p.mult,F[1]*this.p.mult,-F[2]*this.p.mult)}return Y}function h(){return this.v.clone(new Matrix)}var a=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(v,Y,H){var $=a(v,Y,H);if($.dynamicProperties.length)$.getValueAtTime=r.bind($);else $.getValueAtTime=h.bind($);return $.setGroupProperty=expressionHelpers.setGroupProperty,$};var g=PropertyFactory.getProp;PropertyFactory.getProp=function(v,Y,H,$,I){var Z=g(v,Y,H,$,I);if(Z.kf)Z.getValueAtTime=expressionHelpers.getValueAtTime.bind(Z);else Z.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(Z);Z.setGroupProperty=expressionHelpers.setGroupProperty,Z.loopOut=o,Z.loopIn=d,Z.smooth=i,Z.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(Z),Z.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(Z),Z.numKeys=Y.a===1?Y.k.length:0,Z.propertyIndex=Y.ix;var c=0;if(H!==0)c=createTypedArray("float32",Y.a===1?Y.k[0].s.length:Y.k.length);if(Z._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:c},expressionHelpers.searchExpressions(v,Y,Z),Z.k)I.addDynamicProperty(Z);return Z};function l(v){if(!this._cachingAtTime)this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame};if(v*=this.elem.globalData.frameRate,v-=this.offsetTime,v!==this._cachingAtTime.lastTime)this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<v?this._caching.lastIndex:0,this._cachingAtTime.lastTime=v,this.interpolateShape(v,this._cachingAtTime.shapeValue,this._cachingAtTime);return this._cachingAtTime.shapeValue}var x=ShapePropertyFactory.getConstructorFunction(),f=ShapePropertyFactory.getKeyframedConstructorFunction();function n(){}n.prototype={vertices:function v(Y,H){if(this.k)this.getValue();var $=this.v;if(H!==void 0)$=this.getValueAtTime(H,0);var I,Z=$._length,c=$[Y],z=$.v,k=createSizedArray(Z);for(I=0;I<Z;I+=1)if(Y==="i"||Y==="o")k[I]=[c[I][0]-z[I][0],c[I][1]-z[I][1]];else k[I]=[c[I][0],c[I][1]];return k},points:function v(Y){return this.vertices("v",Y)},inTangents:function v(Y){return this.vertices("i",Y)},outTangents:function v(Y){return this.vertices("o",Y)},isClosed:function v(){return this.v.c},pointOnPath:function v(Y,H){var $=this.v;if(H!==void 0)$=this.getValueAtTime(H,0);if(!this._segmentsLength)this._segmentsLength=bez.getSegmentsLength($);var I=this._segmentsLength,Z=I.lengths,c=I.totalLength*Y,z=0,k=Z.length,X=0,V;while(z<k){if(X+Z[z].addedLength>c){var u=z,p=$.c&&z===k-1?0:z+1,U=(c-X)/Z[z].addedLength;V=bez.getPointInSegment($.v[u],$.v[p],$.o[u],$.i[p],U,Z[z]);break}else X+=Z[z].addedLength;z+=1}if(!V)V=$.c?[$.v[0][0],$.v[0][1]]:[$.v[$._length-1][0],$.v[$._length-1][1]];return V},vectorOnPath:function v(Y,H,$){if(Y==1)Y=this.v.c;else if(Y==0)Y=0.999;var I=this.pointOnPath(Y,H),Z=this.pointOnPath(Y+0.001,H),c=Z[0]-I[0],z=Z[1]-I[1],k=Math.sqrt(Math.pow(c,2)+Math.pow(z,2));if(k===0)return[0,0];var X=$==="tangent"?[c/k,z/k]:[-z/k,c/k];return X},tangentOnPath:function v(Y,H){return this.vectorOnPath(Y,H,"tangent")},normalOnPath:function v(Y,H){return this.vectorOnPath(Y,H,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([n],x),extendPrototype([n],f),f.prototype.getValueAtTime=l,f.prototype.initiateExpression=ExpressionManager.initiateExpression;var _=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(v,Y,H,$,I){var Z=_(v,Y,H,$,I);if(Z.propertyIndex=Y.ix,Z.lock=!1,H===3)expressionHelpers.searchExpressions(v,Y.pt,Z);else if(H===4)expressionHelpers.searchExpressions(v,Y.ks,Z);if(Z.k)v.addDynamicProperty(Z);return Z}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function o(){if(this.data.d.x)return this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0;return null}TextProperty.prototype.getExpressionValue=function(d,i){var r=this.calculateExpression(i);if(d.t!==r){var h={};return this.copyData(h,d),h.t=r.toString(),h.__complete=!1,h}return d},TextProperty.prototype.searchProperty=function(){var d=this.searchKeyframes(),i=this.searchExpressions();return this.kf=d||i,this.kf},TextProperty.prototype.searchExpressions=o}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function o(d,i){var r=createNS("feMerge");r.setAttribute("result",d);var h,a;for(a=0;a<i.length;a+=1)h=createNS("feMergeNode"),h.setAttribute("in",i[a]),r.appendChild(h),r.appendChild(h);return r}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(o,d,i,r,h){this.filterManager=d;var a=createNS("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","linearRGB"),a.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=a,a.setAttribute("result",r+"_tint_1"),o.appendChild(a),a=createNS("feColorMatrix"),a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),a.setAttribute("result",r+"_tint_2"),o.appendChild(a),this.matrixFilter=a;var g=this.createMergeNode(r,[h,r+"_tint_1",r+"_tint_2"]);o.appendChild(g)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var d=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+r+" 0"),this.matrixFilter.setAttribute("values",i[0]-d[0]+" 0 0 0 "+d[0]+" "+(i[1]-d[1])+" 0 0 0 "+d[1]+" "+(i[2]-d[2])+" 0 0 0 "+d[2]+" 0 0 0 1 0")}};function SVGFillFilter(o,d,i,r){this.filterManager=d;var h=createNS("feColorMatrix");h.setAttribute("type","matrix"),h.setAttribute("color-interpolation-filters","sRGB"),h.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),h.setAttribute("result",r),o.appendChild(h),this.matrixFilter=h}SVGFillFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var d=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+d[0]+" 0 0 0 0 "+d[1]+" 0 0 0 0 "+d[2]+" 0 0 0 "+i+" 0")}};function SVGStrokeEffect(o,d,i){this.initialized=!1,this.filterManager=d,this.elem=i,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var o=this.elem.layerElement.children||this.elem.layerElement.childNodes,d,i,r,h;if(this.filterManager.effectElements[1].p.v===1)h=this.elem.maskManager.masksProperties.length,r=0;else r=this.filterManager.effectElements[0].p.v-1,h=r+1;i=createNS("g"),i.setAttribute("fill","none"),i.setAttribute("stroke-linecap","round"),i.setAttribute("stroke-dashoffset",1);for(r;r<h;r+=1)d=createNS("path"),i.appendChild(d),this.paths.push({p:d,m:r});if(this.filterManager.effectElements[10].p.v===3){var a=createNS("mask"),g=createElementID();a.setAttribute("id",g),a.setAttribute("mask-type","alpha"),a.appendChild(i),this.elem.globalData.defs.appendChild(a);var l=createNS("g");l.setAttribute("mask","url("+getLocationHref()+"#"+g+")");while(o[0])l.appendChild(o[0]);this.elem.layerElement.appendChild(l),this.masker=a,i.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2){o=this.elem.layerElement.children||this.elem.layerElement.childNodes;while(o.length)this.elem.layerElement.removeChild(o[0])}this.elem.layerElement.appendChild(i),this.elem.layerElement.removeAttribute("mask"),i.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=i},SVGStrokeEffect.prototype.renderFrame=function(o){if(!this.initialized)this.initialize();var d,i=this.paths.length,r,h;for(d=0;d<i;d+=1)if(this.paths[d].m!==-1){if(r=this.elem.maskManager.viewData[this.paths[d].m],h=this.paths[d].p,o||this.filterManager._mdf||r.prop._mdf)h.setAttribute("d",r.lastPath);if(o||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf){var a;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var g=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*0.01,l=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*0.01,x=h.getTotalLength();a="0 0 0 "+x*g+" ";var f=x*(l-g),n=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*0.01,_=Math.floor(f/n),v;for(v=0;v<_;v+=1)a+="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*0.01+" ";a+="0 "+x*10+" 0 0"}else a="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*0.01;h.setAttribute("stroke-dasharray",a)}}if(o||this.filterManager.effectElements[4].p._mdf)this.pathMasker.setAttribute("stroke-width",this.filterManager.effectElements[4].p.v*2);if(o||this.filterManager.effectElements[6].p._mdf)this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v);if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(o||this.filterManager.effectElements[3].p._mdf){var Y=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(Y[0]*255)+","+bmFloor(Y[1]*255)+","+bmFloor(Y[2]*255)+")")}}};function SVGTritoneFilter(o,d,i,r){this.filterManager=d;var h=createNS("feColorMatrix");h.setAttribute("type","matrix"),h.setAttribute("color-interpolation-filters","linearRGB"),h.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),o.appendChild(h);var a=createNS("feComponentTransfer");a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",r),this.matrixFilter=a;var g=createNS("feFuncR");g.setAttribute("type","table"),a.appendChild(g),this.feFuncR=g;var l=createNS("feFuncG");l.setAttribute("type","table"),a.appendChild(l),this.feFuncG=l;var x=createNS("feFuncB");x.setAttribute("type","table"),a.appendChild(x),this.feFuncB=x,o.appendChild(a)}SVGTritoneFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var d=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,r=this.filterManager.effectElements[2].p.v,h=r[0]+" "+i[0]+" "+d[0],a=r[1]+" "+i[1]+" "+d[1],g=r[2]+" "+i[2]+" "+d[2];this.feFuncR.setAttribute("tableValues",h),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",g)}};function SVGProLevelsFilter(o,d,i,r){this.filterManager=d;var h=this.filterManager.effectElements,a=createNS("feComponentTransfer");if(h[10].p.k||h[10].p.v!==0||h[11].p.k||h[11].p.v!==1||h[12].p.k||h[12].p.v!==1||h[13].p.k||h[13].p.v!==0||h[14].p.k||h[14].p.v!==1)this.feFuncR=this.createFeFunc("feFuncR",a);if(h[17].p.k||h[17].p.v!==0||h[18].p.k||h[18].p.v!==1||h[19].p.k||h[19].p.v!==1||h[20].p.k||h[20].p.v!==0||h[21].p.k||h[21].p.v!==1)this.feFuncG=this.createFeFunc("feFuncG",a);if(h[24].p.k||h[24].p.v!==0||h[25].p.k||h[25].p.v!==1||h[26].p.k||h[26].p.v!==1||h[27].p.k||h[27].p.v!==0||h[28].p.k||h[28].p.v!==1)this.feFuncB=this.createFeFunc("feFuncB",a);if(h[31].p.k||h[31].p.v!==0||h[32].p.k||h[32].p.v!==1||h[33].p.k||h[33].p.v!==1||h[34].p.k||h[34].p.v!==0||h[35].p.k||h[35].p.v!==1)this.feFuncA=this.createFeFunc("feFuncA",a);if(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)a.setAttribute("color-interpolation-filters","sRGB"),o.appendChild(a);if(h[3].p.k||h[3].p.v!==0||h[4].p.k||h[4].p.v!==1||h[5].p.k||h[5].p.v!==1||h[6].p.k||h[6].p.v!==0||h[7].p.k||h[7].p.v!==1)a=createNS("feComponentTransfer"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",r),o.appendChild(a),this.feFuncRComposed=this.createFeFunc("feFuncR",a),this.feFuncGComposed=this.createFeFunc("feFuncG",a),this.feFuncBComposed=this.createFeFunc("feFuncB",a)}SVGProLevelsFilter.prototype.createFeFunc=function(o,d){var i=createNS(o);return i.setAttribute("type","table"),d.appendChild(i),i},SVGProLevelsFilter.prototype.getTableValue=function(o,d,i,r,h){var a=0,g=256,l,x=Math.min(o,d),f=Math.max(o,d),n=Array.call(null,{length:g}),_,v=0,Y=h-r,H=d-o;while(a<=256){if(l=a/256,l<=x)_=H<0?h:r;else if(l>=f)_=H<0?r:h;else _=r+Y*Math.pow((l-o)/H,1/i);n[v]=_,v+=1,a+=256/(g-1)}return n.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var d,i=this.filterManager.effectElements;if(this.feFuncRComposed&&(o||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf))d=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",d),this.feFuncGComposed.setAttribute("tableValues",d),this.feFuncBComposed.setAttribute("tableValues",d);if(this.feFuncR&&(o||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf))d=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",d);if(this.feFuncG&&(o||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf))d=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",d);if(this.feFuncB&&(o||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf))d=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",d);if(this.feFuncA&&(o||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf))d=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",d)}};function SVGDropShadowEffect(o,d,i,r,h){var a=d.container.globalData.renderConfig.filterSize,g=d.data.fs||a;o.setAttribute("x",g.x||a.x),o.setAttribute("y",g.y||a.y),o.setAttribute("width",g.width||a.width),o.setAttribute("height",g.height||a.height),this.filterManager=d;var l=createNS("feGaussianBlur");l.setAttribute("in","SourceAlpha"),l.setAttribute("result",r+"_drop_shadow_1"),l.setAttribute("stdDeviation","0"),this.feGaussianBlur=l,o.appendChild(l);var x=createNS("feOffset");x.setAttribute("dx","25"),x.setAttribute("dy","0"),x.setAttribute("in",r+"_drop_shadow_1"),x.setAttribute("result",r+"_drop_shadow_2"),this.feOffset=x,o.appendChild(x);var f=createNS("feFlood");f.setAttribute("flood-color","#00ff00"),f.setAttribute("flood-opacity","1"),f.setAttribute("result",r+"_drop_shadow_3"),this.feFlood=f,o.appendChild(f);var n=createNS("feComposite");n.setAttribute("in",r+"_drop_shadow_3"),n.setAttribute("in2",r+"_drop_shadow_2"),n.setAttribute("operator","in"),n.setAttribute("result",r+"_drop_shadow_4"),o.appendChild(n);var _=this.createMergeNode(r,[r+"_drop_shadow_4",h]);o.appendChild(_)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){if(o||this.filterManager.effectElements[4].p._mdf)this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4);if(o||this.filterManager.effectElements[0].p._mdf){var d=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(d[0]*255),Math.round(d[1]*255),Math.round(d[2]*255)))}if(o||this.filterManager.effectElements[1].p._mdf)this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255);if(o||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,r=(this.filterManager.effectElements[2].p.v-90)*degToRads,h=i*Math.cos(r),a=i*Math.sin(r);this.feOffset.setAttribute("dx",h),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(o,d,i){this.initialized=!1,this.filterManager=d,this.filterElem=o,this.elem=i,i.matteElement=createNS("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}SVGMatte3Effect.prototype.findSymbol=function(o){var d=0,i=_svgMatteSymbols.length;while(d<i){if(_svgMatteSymbols[d]===o)return _svgMatteSymbols[d];d+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(o,d){var i=o.layerElement.parentNode;if(!i)return;var r=i.children,h=0,a=r.length;while(h<a){if(r[h]===o.layerElement)break;h+=1}var g;if(h<=a-2)g=r[h+1];var l=createNS("use");if(l.setAttribute("href","#"+d),g)i.insertBefore(l,g);else i.appendChild(l)},SVGMatte3Effect.prototype.setElementAsMask=function(o,d){if(!this.findSymbol(d)){var i=createElementID(),r=createNS("mask");r.setAttribute("id",d.layerId),r.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(d);var h=o.globalData.defs;h.appendChild(r);var a=createNS("symbol");a.setAttribute("id",i),this.replaceInParent(d,i),a.appendChild(d.layerElement),h.appendChild(a);var g=createNS("use");g.setAttribute("href","#"+i),r.appendChild(g),d.data.hd=!1,d.show()}o.setMatte(d.layerId)},SVGMatte3Effect.prototype.initialize=function(){var o=this.filterManager.effectElements[0].p.v,d=this.elem.comp.elements,i=0,r=d.length;while(i<r){if(d[i]&&d[i].data.ind===o)this.setElementAsMask(this.elem,d[i]);i+=1}this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){if(!this.initialized)this.initialize()};function SVGGaussianBlurEffect(o,d,i,r){o.setAttribute("x","-100%"),o.setAttribute("y","-100%"),o.setAttribute("width","300%"),o.setAttribute("height","300%"),this.filterManager=d;var h=createNS("feGaussianBlur");h.setAttribute("result",r),o.appendChild(h),this.feGaussianBlur=h}SVGGaussianBlurEffect.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var d=0.3,i=this.filterManager.effectElements[0].p.v*d,r=this.filterManager.effectElements[1].p.v,h=r==3?0:i,a=r==2?0:i;this.feGaussianBlur.setAttribute("stdDeviation",h+" "+a);var g=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",g)}};function TransformEffect(){}TransformEffect.prototype.init=function(o){this.effectsManager=o,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(o){if(this._opMdf=!1,this._mdf=!1,o||this.effectsManager._mdf){var d=this.effectsManager.effectElements,i=d[0].p.v,r=d[1].p.v,h=d[2].p.v===1,a=d[3].p.v,g=h?a:d[4].p.v,l=d[5].p.v,x=d[6].p.v,f=d[7].p.v;if(this.matrix.reset(),this.matrix.translate(-i[0],-i[1],i[2]),this.matrix.scale(g*0.01,a*0.01,1),this.matrix.rotate(-f*degToRads),this.matrix.skewFromAxis(-l*degToRads,(x+90)*degToRads),this.matrix.translate(r[0],r[1],0),this._mdf=!0,this.opacity!==d[8].p.v)this.opacity=d[8].p.v,this._opMdf=!0}};function SVGTransformEffect(o,d){this.init(d)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(o){this.init(o)}return extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})});class h1 extends Event{constructor(o,d,i,r){super("context-request",{bubbles:!0,composed:!0}),this.context=o,this.contextTarget=d,this.callback=i,this.subscribe=r??!1}}function _1(o){return o}class _0{constructor(o,d,i,r){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(h,a)=>{this.unsubscribe&&(this.unsubscribe!==a&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=h,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(h,a)),this.unsubscribe=a},this.host=o,d.context!==void 0){let h=d;this.context=h.context,this.callback=h.callback,this.subscribe=h.subscribe??!1}else this.context=d,this.callback=i,this.subscribe=r??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new h1(this.context,this.host,this.t,this.subscribe))}}class Xo{get value(){return this.o}set value(o){this.setValue(o)}setValue(o,d=!1){let i=d||!Object.is(o,this.o);this.o=o,i&&this.updateObservers()}constructor(o){this.subscriptions=new Map,this.updateObservers=()=>{for(let[d,{disposer:i}]of this.subscriptions)d(this.o,i)},o!==void 0&&(this.value=o)}addCallback(o,d,i){if(!i)return void o(this.value);this.subscriptions.has(o)||this.subscriptions.set(o,{disposer:()=>{this.subscriptions.delete(o)},consumerHost:d});let{disposer:r}=this.subscriptions.get(o);o(this.value,r)}clearCallbacks(){this.subscriptions.clear()}}class E2 extends Event{constructor(o,d){super("context-provider",{bubbles:!0,composed:!0}),this.context=o,this.contextTarget=d}}class a1 extends Xo{constructor(o,d,i){super(d.context!==void 0?d.initialValue:i),this.onContextRequest=(r)=>{if(r.context!==this.context)return;let h=r.contextTarget??r.composedPath()[0];h!==this.host&&(r.stopPropagation(),this.addCallback(r.callback,h,r.subscribe))},this.onProviderRequest=(r)=>{if(r.context!==this.context)return;if((r.contextTarget??r.composedPath()[0])===this.host)return;let h=new Set;for(let[a,{consumerHost:g}]of this.subscriptions)h.has(a)||(h.add(a),g.dispatchEvent(new h1(this.context,g,a,!0)));r.stopPropagation()},this.host=o,d.context!==void 0?this.context=d.context:this.context=d,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new E2(this.context,this.host))}}function l0({context:o,subscribe:d}){return(i,r)=>{typeof r=="object"?r.addInitializer(function(){new _0(this,{context:o,callback:(h)=>{i.set.call(this,h)},subscribe:d})}):i.constructor.addInitializer((h)=>{new _0(h,{context:o,callback:(a)=>{h[r]=a},subscribe:d})})}}var A1=globalThis,M1=A1.ShadowRoot&&(A1.ShadyCSS===void 0||A1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Io=Symbol(),m2=new WeakMap;class E1{constructor(o,d,i){if(this._$cssResult$=!0,i!==Io)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=o,this.t=d}get styleSheet(){let o=this.o,d=this.t;if(M1&&o===void 0){let i=d!==void 0&&d.length===1;i&&(o=m2.get(d)),o===void 0&&((this.o=o=new CSSStyleSheet).replaceSync(this.cssText),i&&m2.set(d,o))}return o}toString(){return this.cssText}}var e2=(o)=>new E1(typeof o=="string"?o:o+"",void 0,Io),y=(o,...d)=>{let i=o.length===1?o[0]:d.reduce((r,h,a)=>r+((g)=>{if(g._$cssResult$===!0)return g.cssText;if(typeof g=="number")return g;throw Error("Value passed to 'css' function must be a 'css' function result: "+g+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(h)+o[a+1],o[0]);return new E1(i,o,Io)},od=(o,d)=>{if(M1)o.adoptedStyleSheets=d.map((i)=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of d){let r=document.createElement("style"),h=A1.litNonce;h!==void 0&&r.setAttribute("nonce",h),r.textContent=i.cssText,o.appendChild(r)}},Ko=M1?(o)=>o:(o)=>o instanceof CSSStyleSheet?((d)=>{let i="";for(let r of d.cssRules)i+=r.cssText;return e2(i)})(o):o;var{is:D5,defineProperty:N5,getOwnPropertyDescriptor:B5,getOwnPropertyNames:y5,getOwnPropertySymbols:A5,getPrototypeOf:M5}=Object,t1=globalThis,dd=t1.trustedTypes,E5=dd?dd.emptyScript:"",t5=t1.reactiveElementPolyfillSupport,K1=(o,d)=>o,V1={toAttribute(o,d){switch(d){case Boolean:o=o?E5:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,d){let i=o;switch(d){case Boolean:i=o!==null;break;case Number:i=o===null?null:Number(o);break;case Object:case Array:try{i=JSON.parse(o)}catch(r){i=null}}return i}},m1=(o,d)=>!D5(o,d),id={attribute:!0,type:String,converter:V1,reflect:!1,useDefault:!1,hasChanged:m1};Symbol.metadata??=Symbol("metadata"),t1.litPropertyMetadata??=new WeakMap;class g1 extends HTMLElement{static addInitializer(o){this._$Ei(),(this.l??=[]).push(o)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(o,d=id){if(d.state&&(d.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(o)&&((d=Object.create(d)).wrapped=!0),this.elementProperties.set(o,d),!d.noAccessor){let i=Symbol(),r=this.getPropertyDescriptor(o,i,d);r!==void 0&&N5(this.prototype,o,r)}}static getPropertyDescriptor(o,d,i){let{get:r,set:h}=B5(this.prototype,o)??{get(){return this[d]},set(a){this[d]=a}};return{get:r,set(a){let g=r?.call(this);h?.call(this,a),this.requestUpdate(o,g,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(o){return this.elementProperties.get(o)??id}static _$Ei(){if(this.hasOwnProperty(K1("elementProperties")))return;let o=M5(this);o.finalize(),o.l!==void 0&&(this.l=[...o.l]),this.elementProperties=new Map(o.elementProperties)}static finalize(){if(this.hasOwnProperty(K1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(K1("properties"))){let d=this.properties,i=[...y5(d),...A5(d)];for(let r of i)this.createProperty(r,d[r])}let o=this[Symbol.metadata];if(o!==null){let d=litPropertyMetadata.get(o);if(d!==void 0)for(let[i,r]of d)this.elementProperties.set(i,r)}this._$Eh=new Map;for(let[d,i]of this.elementProperties){let r=this._$Eu(d,i);r!==void 0&&this._$Eh.set(r,d)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(o){let d=[];if(Array.isArray(o)){let i=new Set(o.flat(1/0).reverse());for(let r of i)d.unshift(Ko(r))}else o!==void 0&&d.push(Ko(o));return d}static _$Eu(o,d){let i=d.attribute;return i===!1?void 0:typeof i=="string"?i:typeof o=="string"?o.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((o)=>this.enableUpdating=o),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((o)=>o(this))}addController(o){(this._$EO??=new Set).add(o),this.renderRoot!==void 0&&this.isConnected&&o.hostConnected?.()}removeController(o){this._$EO?.delete(o)}_$E_(){let o=new Map,d=this.constructor.elementProperties;for(let i of d.keys())this.hasOwnProperty(i)&&(o.set(i,this[i]),delete this[i]);o.size>0&&(this._$Ep=o)}createRenderRoot(){let o=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return od(o,this.constructor.elementStyles),o}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((o)=>o.hostConnected?.())}enableUpdating(o){}disconnectedCallback(){this._$EO?.forEach((o)=>o.hostDisconnected?.())}attributeChangedCallback(o,d,i){this._$AK(o,i)}_$ET(o,d){let i=this.constructor.elementProperties.get(o),r=this.constructor._$Eu(o,i);if(r!==void 0&&i.reflect===!0){let h=(i.converter?.toAttribute!==void 0?i.converter:V1).toAttribute(d,i.type);this._$Em=o,h==null?this.removeAttribute(r):this.setAttribute(r,h),this._$Em=null}}_$AK(o,d){let i=this.constructor,r=i._$Eh.get(o);if(r!==void 0&&this._$Em!==r){let h=i.getPropertyOptions(r),a=typeof h.converter=="function"?{fromAttribute:h.converter}:h.converter?.fromAttribute!==void 0?h.converter:V1;this._$Em=r,this[r]=a.fromAttribute(d,h.type)??this._$Ej?.get(r)??null,this._$Em=null}}requestUpdate(o,d,i){if(o!==void 0){let r=this.constructor,h=this[o];if(i??=r.getPropertyOptions(o),!((i.hasChanged??m1)(h,d)||i.useDefault&&i.reflect&&h===this._$Ej?.get(o)&&!this.hasAttribute(r._$Eu(o,i))))return;this.C(o,d,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(o,d,{useDefault:i,reflect:r,wrapped:h},a){i&&!(this._$Ej??=new Map).has(o)&&(this._$Ej.set(o,a??d??this[o]),h!==!0||a!==void 0)||(this._$AL.has(o)||(this.hasUpdated||i||(d=void 0),this._$AL.set(o,d)),r===!0&&this._$Em!==o&&(this._$Eq??=new Set).add(o))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(d){Promise.reject(d)}let o=this.scheduleUpdate();return o!=null&&await o,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,h]of this._$Ep)this[r]=h;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[r,h]of i){let{wrapped:a}=h,g=this[r];a!==!0||this._$AL.has(r)||g===void 0||this.C(r,void 0,h,g)}}let o=!1,d=this._$AL;try{o=this.shouldUpdate(d),o?(this.willUpdate(d),this._$EO?.forEach((i)=>i.hostUpdate?.()),this.update(d)):this._$EM()}catch(i){throw o=!1,this._$EM(),i}o&&this._$AE(d)}willUpdate(o){}_$AE(o){this._$EO?.forEach((d)=>d.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(o)),this.updated(o)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(o){return!0}update(o){this._$Eq&&=this._$Eq.forEach((d)=>this._$ET(d,this[d])),this._$EM()}updated(o){}firstUpdated(o){}}g1.elementStyles=[],g1.shadowRootOptions={mode:"open"},g1[K1("elementProperties")]=new Map,g1[K1("finalized")]=new Map,t5?.({ReactiveElement:g1}),(t1.reactiveElementVersions??=[]).push("2.1.0");var Vo=globalThis,e1=Vo.trustedTypes,rd=e1?e1.createPolicy("lit-html",{createHTML:(o)=>o}):void 0;var M0=`lit$${Math.random().toFixed(9).slice(2)}$`,Fo="?"+M0,m5=`<${Fo}>`,n1=document,j1=()=>n1.createComment(""),G1=(o)=>o===null||typeof o!="object"&&typeof o!="function",jo=Array.isArray,wd=(o)=>jo(o)||typeof o?.[Symbol.iterator]=="function";var F1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hd=/-->/g,ad=/>/g,v1=RegExp(`>|[
|
|
10
10
|
\f\r](?:([^\\s"'>=/]+)([
|
|
11
11
|
\f\r]*=[
|
|
12
12
|
\f\r]*(?:[^
|
|
13
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),gd=/'/g,ld=/"/g,fd=/^(?:script|style|textarea|title)$/i,Go=(o)=>(d,...i)=>({_$litType$:o,strings:d,values:i}),s=Go(1),w0=Go(2),Y6=Go(3),U0=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),xd=new WeakMap,v1=z1.createTreeWalker(z1,129);function wd(o,d){if(!jo(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return rd!==void 0?rd.createHTML(d):d}var cd=(o,d)=>{let i=o.length-1,r=[],h,a=d===2?"<svg>":d===3?"<math>":"",g=F1;for(let l=0;l<i;l++){let x=o[l],w,z,_=-1,n=0;for(;n<x.length&&(g.lastIndex=n,z=g.exec(x),z!==null);)n=g.lastIndex,g===F1?z[1]==="!--"?g=hd:z[1]!==void 0?g=ad:z[2]!==void 0?(fd.test(z[2])&&(h=RegExp("</"+z[2],"g")),g=n1):z[3]!==void 0&&(g=n1):g===n1?z[0]===">"?(g=h??F1,_=-1):z[1]===void 0?_=-2:(_=g.lastIndex-z[2].length,w=z[1],g=z[3]===void 0?n1:z[3]==='"'?ld:gd):g===ld||g===gd?g=n1:g===hd||g===ad?g=F1:(g=n1,h=void 0);let Y=g===n1&&o[l+1].startsWith("/>")?" ":"";a+=g===F1?x+m5:_>=0?(r.push(w),x.slice(0,_)+"$lit$"+x.slice(_)+M0+Y):x+M0+(_===-2?l:Y)}return[wd(o,a+(o[i]||"<?>")+(d===2?"</svg>":d===3?"</math>":"")),r]};class C1{constructor({strings:o,_$litType$:d},i){let r;this.parts=[];let h=0,a=0,g=o.length-1,l=this.parts,[x,w]=cd(o,d);if(this.el=C1.createElement(x,i),v1.currentNode=this.el.content,d===2||d===3){let z=this.el.content.firstChild;z.replaceWith(...z.childNodes)}for(;(r=v1.nextNode())!==null&&l.length<g;){if(r.nodeType===1){if(r.hasAttributes())for(let z of r.getAttributeNames())if(z.endsWith("$lit$")){let _=w[a++],n=r.getAttribute(z).split(M0),Y=/([.?@])?(.*)/.exec(_);l.push({type:1,index:h,name:Y[2],strings:n,ctor:Y[1]==="."?Lo:Y[1]==="?"?uo:Y[1]==="@"?Ro:q1}),r.removeAttribute(z)}else z.startsWith(M0)&&(l.push({type:6,index:h}),r.removeAttribute(z));if(fd.test(r.tagName)){let z=r.textContent.split(M0),_=z.length-1;if(_>0){r.textContent=e1?e1.emptyScript:"";for(let n=0;n<_;n++)r.append(z[n],j1()),v1.nextNode(),l.push({type:2,index:++h});r.append(z[_],j1())}}}else if(r.nodeType===8)if(r.data===Fo)l.push({type:2,index:h});else{let z=-1;for(;(z=r.data.indexOf(M0,z+1))!==-1;)l.push({type:7,index:h}),z+=M0.length-1}h++}}static createElement(o,d){let i=z1.createElement("template");return i.innerHTML=o,i}}function p1(o,d,i=o,r){if(d===U0)return d;let h=r!==void 0?i._$Co?.[r]:i._$Cl,a=G1(d)?void 0:d._$litDirective$;return h?.constructor!==a&&(h?._$AO?.(!1),a===void 0?h=void 0:(h=new a(o),h._$AT(o,i,r)),r!==void 0?(i._$Co??=[])[r]=h:i._$Cl=h),h!==void 0&&(d=p1(o,h._$AS(o,d.values),h,r)),d}class Co{constructor(o,d){this._$AV=[],this._$AN=void 0,this._$AD=o,this._$AM=d}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(o){let{el:{content:d},parts:i}=this._$AD,r=(o?.creationScope??z1).importNode(d,!0);v1.currentNode=r;let h=v1.nextNode(),a=0,g=0,l=i[0];for(;l!==void 0;){if(a===l.index){let x;l.type===2?x=new U1(h,h.nextSibling,this,o):l.type===1?x=new l.ctor(h,l.name,l.strings,this,o):l.type===6&&(x=new To(h,this,o)),this._$AV.push(x),l=i[++g]}a!==l?.index&&(h=v1.nextNode(),a++)}return v1.currentNode=z1,r}p(o){let d=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(o,i,d),d+=i.strings.length-2):i._$AI(o[d])),d++}}class U1{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(o,d,i,r){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=o,this._$AB=d,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let o=this._$AA.parentNode,d=this._$AM;return d!==void 0&&o?.nodeType===11&&(o=d.parentNode),o}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(o,d=this){o=p1(this,o,d),G1(o)?o===y||o==null||o===""?(this._$AH!==y&&this._$AR(),this._$AH=y):o!==this._$AH&&o!==U0&&this._(o):o._$litType$!==void 0?this.$(o):o.nodeType!==void 0?this.T(o):bd(o)?this.k(o):this._(o)}O(o){return this._$AA.parentNode.insertBefore(o,this._$AB)}T(o){this._$AH!==o&&(this._$AR(),this._$AH=this.O(o))}_(o){this._$AH!==y&&G1(this._$AH)?this._$AA.nextSibling.data=o:this.T(z1.createTextNode(o)),this._$AH=o}$(o){let{values:d,_$litType$:i}=o,r=typeof i=="number"?this._$AC(o):(i.el===void 0&&(i.el=C1.createElement(wd(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(d);else{let h=new Co(r,this),a=h.u(this.options);h.p(d),this.T(a),this._$AH=h}}_$AC(o){let d=xd.get(o.strings);return d===void 0&&xd.set(o.strings,d=new C1(o)),d}k(o){jo(this._$AH)||(this._$AH=[],this._$AR());let d=this._$AH,i,r=0;for(let h of o)r===d.length?d.push(i=new U1(this.O(j1()),this.O(j1()),this,this.options)):i=d[r],i._$AI(h),r++;r<d.length&&(this._$AR(i&&i._$AB.nextSibling,r),d.length=r)}_$AR(o=this._$AA.nextSibling,d){for(this._$AP?.(!1,!0,d);o&&o!==this._$AB;){let i=o.nextSibling;o.remove(),o=i}}setConnected(o){this._$AM===void 0&&(this._$Cv=o,this._$AP?.(o))}}class q1{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(o,d,i,r,h){this.type=1,this._$AH=y,this._$AN=void 0,this.element=o,this.name=d,this._$AM=r,this.options=h,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=y}_$AI(o,d=this,i,r){let h=this.strings,a=!1;if(h===void 0)o=p1(this,o,d,0),a=!G1(o)||o!==this._$AH&&o!==U0,a&&(this._$AH=o);else{let g=o,l,x;for(o=h[0],l=0;l<h.length-1;l++)x=p1(this,g[i+l],d,l),x===U0&&(x=this._$AH[l]),a||=!G1(x)||x!==this._$AH[l],x===y?o=y:o!==y&&(o+=(x??"")+h[l+1]),this._$AH[l]=x}a&&!r&&this.j(o)}j(o){o===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,o??"")}}class Lo extends q1{constructor(){super(...arguments),this.type=3}j(o){this.element[this.name]=o===y?void 0:o}}class uo extends q1{constructor(){super(...arguments),this.type=4}j(o){this.element.toggleAttribute(this.name,!!o&&o!==y)}}class Ro extends q1{constructor(o,d,i,r,h){super(o,d,i,r,h),this.type=5}_$AI(o,d=this){if((o=p1(this,o,d,0)??y)===U0)return;let i=this._$AH,r=o===y&&i!==y||o.capture!==i.capture||o.once!==i.once||o.passive!==i.passive,h=o!==y&&(i===y||r);r&&this.element.removeEventListener(this.name,this,i),h&&this.element.addEventListener(this.name,this,o),this._$AH=o}handleEvent(o){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,o):this._$AH.handleEvent(o)}}class To{constructor(o,d,i){this.element=o,this.type=6,this._$AN=void 0,this._$AM=d,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(o){p1(this,o)}}var nd={M:"$lit$",P:M0,A:Fo,C:1,L:cd,R:Co,D:bd,V:p1,I:U1,H:q1,N:uo,U:Ro,B:Lo,F:To},e5=Vo.litHtmlPolyfillSupport;e5?.(C1,U1),(Vo.litHtmlVersions??=[]).push("3.3.0");var oo=(o,d,i)=>{let r=i?.renderBefore??d,h=r._$litPart$;if(h===void 0){let a=i?.renderBefore??null;r._$litPart$=h=new U1(d.insertBefore(j1(),a),a,void 0,i??{})}return h._$AI(o),h};var so=globalThis;class k0 extends g1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let o=super.createRenderRoot();return this.renderOptions.renderBefore??=o.firstChild,o}update(o){let d=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(o),this._$Do=oo(d,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U0}}k0._$litElement$=!0,k0.finalized=!0,so.litElementHydrateSupport?.({LitElement:k0});var o3=so.litElementPolyfillSupport;o3?.({LitElement:k0});(so.litElementVersions??=[]).push("4.2.0");var P=(o)=>(d,i)=>{i!==void 0?i.addInitializer(()=>{customElements.define(o,d)}):customElements.define(o,d)};var d3={attribute:!0,type:String,converter:V1,reflect:!1,hasChanged:m1},i3=(o=d3,d,i)=>{let{kind:r,metadata:h}=i,a=globalThis.litPropertyMetadata.get(h);if(a===void 0&&globalThis.litPropertyMetadata.set(h,a=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),a.set(i.name,o),r==="accessor"){let{name:g}=i;return{set(l){let x=d.get.call(this);d.set.call(this,l),this.requestUpdate(g,x,o)},init(l){return l!==void 0&&this.C(g,void 0,o,l),l}}}if(r==="setter"){let{name:g}=i;return function(l){let x=this[g];d.call(this,l),this.requestUpdate(g,x,o)}}throw Error("Unsupported decorator location: "+r)};function q(o){return(d,i)=>typeof i=="object"?i3(o,d,i):((r,h,a)=>{let g=h.hasOwnProperty(a);return h.constructor.createProperty(a,r),g?Object.getOwnPropertyDescriptor(h,a):void 0})(o,d,i)}function O(o){return q({...o,state:!0,attribute:!1})}var Z1=(o,d,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof d!="object"&&Object.defineProperty(o,d,i),i);function b0(o,d){return(i,r,h)=>{let a=(g)=>g.renderRoot?.querySelector(o)??null;if(d){let{get:g,set:l}=typeof r=="object"?i:h??(()=>{let x=Symbol();return{get(){return this[x]},set(w){this[x]=w}}})();return Z1(i,r,{get(){let x=g.call(this);return x===void 0&&(x=a(this),(x!==null||this.hasUpdated)&&l.call(this,x)),x}})}return Z1(i,r,{get(){return a(this)}})}}var vd={resources:["./base-sounds-v2.mp3"],spritemap:{bet:{start:0,end:0.2612244897959184,loop:!1},click:{start:2,end:2.156734693877551,loop:!1},"dice-roll":{start:4,end:4.522448979591837,loop:!1},"dice-tick":{start:6,end:6.104489795918368,loop:!1},"half-double":{start:8,end:8.182857142857143,loop:!1},"keno-clear":{start:10,end:11.488979591836735,loop:!1},"keno-gem":{start:13,end:14.488979591836735,loop:!1},"limbo-tick":{start:16,end:16.339591836734694,loop:!1},"mines-bomb":{start:18,end:20.14204081632653,loop:!1},"mines-gem":{start:22,end:22.86204081632653,loop:!1},secondary:{start:24,end:24.18285714285714,loop:!1},toggle:{start:26,end:26.208979591836734,loop:!1},win:{start:28,end:29.358367346938774,loop:!1}}};class So{host;muted=!1;audioCtx;buffer;constructor(o){this.host=o,o.addController(this);let d=window.AudioContext||window.webkitAudioContext;this.audioCtx=new d,fetch("https://assets.betorigami.com/sounds/sounds.mp3").then((i)=>{return i.arrayBuffer().then((r)=>{this.audioCtx.decodeAudioData(r,(h)=>{this.buffer=h})}).catch((r)=>{})}).catch(),window.onclick=()=>{this.play("bet",!1),window.onclick=null}}preload(o){}async play(o,d,i=1,r,h=()=>{}){if(!this.buffer)return;let a=this.audioCtx.createBufferSource();a.buffer=this.buffer;let g=vd.spritemap[o];try{if(this.audioCtx&&a){let l=this.audioCtx.createGain(),x=r??(this.host.gameData?.volume??100)/100,w=d??this.muted;return l.gain.value=w?0:Math.min(x,1),l.connect(this.audioCtx.destination),a.connect(l),a.playbackRate.value=i,a.start(0,g.start),setTimeout(()=>{a?.stop(),h()},1000*(g.end-g.start)),a}}catch(l){}}}var P0=8,L1=2,zd=100;class B extends k0{static componentStyles=[];emit(o,d){let i=new CustomEvent(o,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...d});return this.dispatchEvent(i),i}}var i0=_1(Symbol("game"));class io extends B{constructor(){super(...arguments);this.currency="BTC";this.isTheatreMode=!1;this.showFavorites=!1;this.balance=1000;this.baseUrl="https://us-api.dev.betorigami.com/provider/v1";this.authToken="";this.isCryptoMode=!0;this.gameStatsOpen=!1;this.betAmount="0.00";this.autobetNumberOfBets=0;this.hotkeysOpenEnabled=!1;this.volume=100;this.instantBetEnabled=!1;this.mainWidth=1000}_soundController=new So(this);_gameProvider=new a1(this,{context:i0,initialValue:{amount:this.betAmount,updateBalance:this.updateBalance.bind(this),currency:this.currency,isCryptoMode:this.isCryptoMode,isTheatreMode:this.isTheatreMode,showFavorites:this.showFavorites,balance:this.balance,baseUrl:this.baseUrl,authToken:this.authToken,gameStatsOpen:this.gameStatsOpen,autobetNumberOfBets:this.autobetNumberOfBets,hotkeysOpenEnabled:this.hotkeysOpenEnabled,volume:this.volume,instantBetEnabled:this.instantBetEnabled,soundController:this._soundController,updateHotkeysOpenEnabled:this.updateHotkeysOpenEnabled.bind(this),updateVolume:this.updateVolume.bind(this),updateInstantBetEnabled:this.updateInstantBetEnabled.bind(this),updateAutobetNumberOfBets:this.updateAutobetNumberOfBets.bind(this),mainWidth:this.mainWidth,updateMainWidth:this.updateMainWidth.bind(this)}});connectedCallback(){super.connectedCallback(),this.updateProviderValue()}updated(o){if(super.updated(o),o.has("currency")||o.has("isTheatreMode")||o.has("showFavorites")||o.has("balance")||o.has("baseUrl")||o.has("isCryptoMode")||o.has("authToken")||o.has("gameStatsOpen")||o.has("hotkeysOpenEnabled")||o.has("volume")||o.has("instantBetEnabled")||o.has("mainWidth"))this.updateProviderValue()}get gameData(){return this._gameProvider.value}updateProviderValue(){this._gameProvider.setValue({amount:this.betAmount,currency:this.currency,updateBalance:this.updateBalance.bind(this),isCryptoMode:this.isCryptoMode,isTheatreMode:this.isTheatreMode,showFavorites:this.showFavorites,balance:this.balance,baseUrl:this.baseUrl,authToken:this.authToken,gameStatsOpen:this.gameStatsOpen,autobetNumberOfBets:this.autobetNumberOfBets,updateAutobetNumberOfBets:this.updateAutobetNumberOfBets.bind(this),hotkeysOpenEnabled:this.hotkeysOpenEnabled,volume:this.volume,instantBetEnabled:this.instantBetEnabled,soundController:this._soundController,updateHotkeysOpenEnabled:this.updateHotkeysOpenEnabled.bind(this),updateVolume:this.updateVolume.bind(this),updateInstantBetEnabled:this.updateInstantBetEnabled.bind(this),mainWidth:this.mainWidth,updateMainWidth:this.updateMainWidth.bind(this)})}updateHotkeysOpenEnabled(o){this.hotkeysOpenEnabled=o,this.updateProviderValue()}updateVolume(o){this.volume=o,this.updateProviderValue()}updateInstantBetEnabled(o){this.instantBetEnabled=o,this.updateProviderValue()}updateAutobetNumberOfBets(o){this.autobetNumberOfBets=o,this.updateProviderValue()}updateMainWidth(o){this.mainWidth=o,this.updateProviderValue()}updateBalance(o){if(o.isNaN())return;if(o.isLessThan(0)){this.betAmount="0";return}let d=o.toFixed(P0);this.betAmount=d,this.updateProviderValue()}render(){return s`<slot></slot>`}}f([q({type:String})],io.prototype,"currency",void 0),f([q({type:Boolean})],io.prototype,"isTheatreMode",void 0),f([q({type:Boolean})],io.prototype,"showFavorites",void 0),f([q({type:Number})],io.prototype,"balance",void 0),f([q({type:String})],io.prototype,"baseUrl",void 0),f([q({type:String})],io.prototype,"authToken",void 0),f([q({type:Boolean})],io.prototype,"isCryptoMode",void 0),f([q({type:Boolean})],io.prototype,"gameStatsOpen",void 0),f([O()],io.prototype,"betAmount",void 0),f([O()],io.prototype,"autobetNumberOfBets",void 0),f([O()],io.prototype,"hotkeysOpenEnabled",void 0),f([O()],io.prototype,"volume",void 0),f([O()],io.prototype,"instantBetEnabled",void 0),f([O()],io.prototype,"mainWidth",void 0),io=f([P("origami-game-provider-wrapper")],io);var K0={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},R0=(o)=>(...d)=>({_$litDirective$:o,values:d});class T0{constructor(o){}get _$AU(){return this._$AM._$AU}_$AT(o,d,i){this._$Ct=o,this._$AM=d,this._$Ci=i}_$AS(o,d){return this.update(o,d)}update(o,d){return this.render(...d)}}var o0=R0(class extends T0{constructor(o){if(super(o),o.type!==K0.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter((d)=>o[d]).join(" ")+" "}update(o,[d]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter((r)=>r!=="")));for(let r in d)d[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(d)}let i=o.element.classList;for(let r of this.st)r in d||(i.remove(r),this.st.delete(r));for(let r in d){let h=!!d[r];h===this.st.has(r)||this.nt?.has(r)||(h?(i.add(r),this.st.add(r)):(i.remove(r),this.st.delete(r)))}return U0}});var n0=(o)=>o??y;var N=A`
|
|
13
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),gd=/'/g,ld=/"/g,bd=/^(?:script|style|textarea|title)$/i,Go=(o)=>(d,...i)=>({_$litType$:o,strings:d,values:i}),S=Go(1),f0=Go(2),Y6=Go(3),U0=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),xd=new WeakMap,z1=n1.createTreeWalker(n1,129);function fd(o,d){if(!jo(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return rd!==void 0?rd.createHTML(d):d}var cd=(o,d)=>{let i=o.length-1,r=[],h,a=d===2?"<svg>":d===3?"<math>":"",g=F1;for(let l=0;l<i;l++){let x=o[l],f,n,_=-1,v=0;for(;v<x.length&&(g.lastIndex=v,n=g.exec(x),n!==null);)v=g.lastIndex,g===F1?n[1]==="!--"?g=hd:n[1]!==void 0?g=ad:n[2]!==void 0?(bd.test(n[2])&&(h=RegExp("</"+n[2],"g")),g=v1):n[3]!==void 0&&(g=v1):g===v1?n[0]===">"?(g=h??F1,_=-1):n[1]===void 0?_=-2:(_=g.lastIndex-n[2].length,f=n[1],g=n[3]===void 0?v1:n[3]==='"'?ld:gd):g===ld||g===gd?g=v1:g===hd||g===ad?g=F1:(g=v1,h=void 0);let Y=g===v1&&o[l+1].startsWith("/>")?" ":"";a+=g===F1?x+m5:_>=0?(r.push(f),x.slice(0,_)+"$lit$"+x.slice(_)+M0+Y):x+M0+(_===-2?l:Y)}return[fd(o,a+(o[i]||"<?>")+(d===2?"</svg>":d===3?"</math>":"")),r]};class C1{constructor({strings:o,_$litType$:d},i){let r;this.parts=[];let h=0,a=0,g=o.length-1,l=this.parts,[x,f]=cd(o,d);if(this.el=C1.createElement(x,i),z1.currentNode=this.el.content,d===2||d===3){let n=this.el.content.firstChild;n.replaceWith(...n.childNodes)}for(;(r=z1.nextNode())!==null&&l.length<g;){if(r.nodeType===1){if(r.hasAttributes())for(let n of r.getAttributeNames())if(n.endsWith("$lit$")){let _=f[a++],v=r.getAttribute(n).split(M0),Y=/([.?@])?(.*)/.exec(_);l.push({type:1,index:h,name:Y[2],strings:v,ctor:Y[1]==="."?Lo:Y[1]==="?"?uo:Y[1]==="@"?Ro:q1}),r.removeAttribute(n)}else n.startsWith(M0)&&(l.push({type:6,index:h}),r.removeAttribute(n));if(bd.test(r.tagName)){let n=r.textContent.split(M0),_=n.length-1;if(_>0){r.textContent=e1?e1.emptyScript:"";for(let v=0;v<_;v++)r.append(n[v],j1()),z1.nextNode(),l.push({type:2,index:++h});r.append(n[_],j1())}}}else if(r.nodeType===8)if(r.data===Fo)l.push({type:2,index:h});else{let n=-1;for(;(n=r.data.indexOf(M0,n+1))!==-1;)l.push({type:7,index:h}),n+=M0.length-1}h++}}static createElement(o,d){let i=n1.createElement("template");return i.innerHTML=o,i}}function p1(o,d,i=o,r){if(d===U0)return d;let h=r!==void 0?i._$Co?.[r]:i._$Cl,a=G1(d)?void 0:d._$litDirective$;return h?.constructor!==a&&(h?._$AO?.(!1),a===void 0?h=void 0:(h=new a(o),h._$AT(o,i,r)),r!==void 0?(i._$Co??=[])[r]=h:i._$Cl=h),h!==void 0&&(d=p1(o,h._$AS(o,d.values),h,r)),d}class Co{constructor(o,d){this._$AV=[],this._$AN=void 0,this._$AD=o,this._$AM=d}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(o){let{el:{content:d},parts:i}=this._$AD,r=(o?.creationScope??n1).importNode(d,!0);z1.currentNode=r;let h=z1.nextNode(),a=0,g=0,l=i[0];for(;l!==void 0;){if(a===l.index){let x;l.type===2?x=new U1(h,h.nextSibling,this,o):l.type===1?x=new l.ctor(h,l.name,l.strings,this,o):l.type===6&&(x=new To(h,this,o)),this._$AV.push(x),l=i[++g]}a!==l?.index&&(h=z1.nextNode(),a++)}return z1.currentNode=n1,r}p(o){let d=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(o,i,d),d+=i.strings.length-2):i._$AI(o[d])),d++}}class U1{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(o,d,i,r){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=o,this._$AB=d,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let o=this._$AA.parentNode,d=this._$AM;return d!==void 0&&o?.nodeType===11&&(o=d.parentNode),o}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(o,d=this){o=p1(this,o,d),G1(o)?o===A||o==null||o===""?(this._$AH!==A&&this._$AR(),this._$AH=A):o!==this._$AH&&o!==U0&&this._(o):o._$litType$!==void 0?this.$(o):o.nodeType!==void 0?this.T(o):wd(o)?this.k(o):this._(o)}O(o){return this._$AA.parentNode.insertBefore(o,this._$AB)}T(o){this._$AH!==o&&(this._$AR(),this._$AH=this.O(o))}_(o){this._$AH!==A&&G1(this._$AH)?this._$AA.nextSibling.data=o:this.T(n1.createTextNode(o)),this._$AH=o}$(o){let{values:d,_$litType$:i}=o,r=typeof i=="number"?this._$AC(o):(i.el===void 0&&(i.el=C1.createElement(fd(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(d);else{let h=new Co(r,this),a=h.u(this.options);h.p(d),this.T(a),this._$AH=h}}_$AC(o){let d=xd.get(o.strings);return d===void 0&&xd.set(o.strings,d=new C1(o)),d}k(o){jo(this._$AH)||(this._$AH=[],this._$AR());let d=this._$AH,i,r=0;for(let h of o)r===d.length?d.push(i=new U1(this.O(j1()),this.O(j1()),this,this.options)):i=d[r],i._$AI(h),r++;r<d.length&&(this._$AR(i&&i._$AB.nextSibling,r),d.length=r)}_$AR(o=this._$AA.nextSibling,d){for(this._$AP?.(!1,!0,d);o&&o!==this._$AB;){let i=o.nextSibling;o.remove(),o=i}}setConnected(o){this._$AM===void 0&&(this._$Cv=o,this._$AP?.(o))}}class q1{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(o,d,i,r,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=o,this.name=d,this._$AM=r,this.options=h,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=A}_$AI(o,d=this,i,r){let h=this.strings,a=!1;if(h===void 0)o=p1(this,o,d,0),a=!G1(o)||o!==this._$AH&&o!==U0,a&&(this._$AH=o);else{let g=o,l,x;for(o=h[0],l=0;l<h.length-1;l++)x=p1(this,g[i+l],d,l),x===U0&&(x=this._$AH[l]),a||=!G1(x)||x!==this._$AH[l],x===A?o=A:o!==A&&(o+=(x??"")+h[l+1]),this._$AH[l]=x}a&&!r&&this.j(o)}j(o){o===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,o??"")}}class Lo extends q1{constructor(){super(...arguments),this.type=3}j(o){this.element[this.name]=o===A?void 0:o}}class uo extends q1{constructor(){super(...arguments),this.type=4}j(o){this.element.toggleAttribute(this.name,!!o&&o!==A)}}class Ro extends q1{constructor(o,d,i,r,h){super(o,d,i,r,h),this.type=5}_$AI(o,d=this){if((o=p1(this,o,d,0)??A)===U0)return;let i=this._$AH,r=o===A&&i!==A||o.capture!==i.capture||o.once!==i.once||o.passive!==i.passive,h=o!==A&&(i===A||r);r&&this.element.removeEventListener(this.name,this,i),h&&this.element.addEventListener(this.name,this,o),this._$AH=o}handleEvent(o){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,o):this._$AH.handleEvent(o)}}class To{constructor(o,d,i){this.element=o,this.type=6,this._$AN=void 0,this._$AM=d,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(o){p1(this,o)}}var vd={M:"$lit$",P:M0,A:Fo,C:1,L:cd,R:Co,D:wd,V:p1,I:U1,H:q1,N:uo,U:Ro,B:Lo,F:To},e5=Vo.litHtmlPolyfillSupport;e5?.(C1,U1),(Vo.litHtmlVersions??=[]).push("3.3.0");var oo=(o,d,i)=>{let r=i?.renderBefore??d,h=r._$litPart$;if(h===void 0){let a=i?.renderBefore??null;r._$litPart$=h=new U1(d.insertBefore(j1(),a),a,void 0,i??{})}return h._$AI(o),h};var So=globalThis;class k0 extends g1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let o=super.createRenderRoot();return this.renderOptions.renderBefore??=o.firstChild,o}update(o){let d=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(o),this._$Do=oo(d,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U0}}k0._$litElement$=!0,k0.finalized=!0,So.litElementHydrateSupport?.({LitElement:k0});var o3=So.litElementPolyfillSupport;o3?.({LitElement:k0});(So.litElementVersions??=[]).push("4.2.0");var P=(o)=>(d,i)=>{i!==void 0?i.addInitializer(()=>{customElements.define(o,d)}):customElements.define(o,d)};var d3={attribute:!0,type:String,converter:V1,reflect:!1,hasChanged:m1},i3=(o=d3,d,i)=>{let{kind:r,metadata:h}=i,a=globalThis.litPropertyMetadata.get(h);if(a===void 0&&globalThis.litPropertyMetadata.set(h,a=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),a.set(i.name,o),r==="accessor"){let{name:g}=i;return{set(l){let x=d.get.call(this);d.set.call(this,l),this.requestUpdate(g,x,o)},init(l){return l!==void 0&&this.C(g,void 0,o,l),l}}}if(r==="setter"){let{name:g}=i;return function(l){let x=this[g];d.call(this,l),this.requestUpdate(g,x,o)}}throw Error("Unsupported decorator location: "+r)};function q(o){return(d,i)=>typeof i=="object"?i3(o,d,i):((r,h,a)=>{let g=h.hasOwnProperty(a);return h.constructor.createProperty(a,r),g?Object.getOwnPropertyDescriptor(h,a):void 0})(o,d,i)}function O(o){return q({...o,state:!0,attribute:!1})}var Z1=(o,d,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof d!="object"&&Object.defineProperty(o,d,i),i);function w0(o,d){return(i,r,h)=>{let a=(g)=>g.renderRoot?.querySelector(o)??null;if(d){let{get:g,set:l}=typeof r=="object"?i:h??(()=>{let x=Symbol();return{get(){return this[x]},set(f){this[x]=f}}})();return Z1(i,r,{get(){let x=g.call(this);return x===void 0&&(x=a(this),(x!==null||this.hasUpdated)&&l.call(this,x)),x}})}return Z1(i,r,{get(){return a(this)}})}}var zd={resources:["./base-sounds-v2.mp3"],spritemap:{bet:{start:0,end:0.2612244897959184,loop:!1},click:{start:2,end:2.156734693877551,loop:!1},"dice-roll":{start:4,end:4.522448979591837,loop:!1},"dice-tick":{start:6,end:6.104489795918368,loop:!1},"half-double":{start:8,end:8.182857142857143,loop:!1},"keno-clear":{start:10,end:11.488979591836735,loop:!1},"keno-gem":{start:13,end:14.488979591836735,loop:!1},"limbo-tick":{start:16,end:16.339591836734694,loop:!1},"mines-bomb":{start:18,end:20.14204081632653,loop:!1},"mines-gem":{start:22,end:22.86204081632653,loop:!1},secondary:{start:24,end:24.18285714285714,loop:!1},toggle:{start:26,end:26.208979591836734,loop:!1},win:{start:28,end:29.358367346938774,loop:!1}}};class so{host;muted=!1;audioCtx;buffer;constructor(o){this.host=o,o.addController(this);let d=window.AudioContext||window.webkitAudioContext;this.audioCtx=new d,fetch("https://assets.betorigami.com/sounds/sounds.mp3").then((i)=>{return i.arrayBuffer().then((r)=>{this.audioCtx.decodeAudioData(r,(h)=>{this.buffer=h})}).catch((r)=>{})}).catch(),window.onclick=()=>{this.play("bet",!1),window.onclick=null}}preload(o){}async play(o,d,i=1,r,h=()=>{}){if(!this.buffer)return;let a=this.audioCtx.createBufferSource();a.buffer=this.buffer;let g=zd.spritemap[o];try{if(this.audioCtx&&a){let l=this.audioCtx.createGain(),x=r??(this.host.gameData?.volume??100)/100,f=d??this.muted;return l.gain.value=f?0:Math.min(x,1),l.connect(this.audioCtx.destination),a.connect(l),a.playbackRate.value=i,a.start(0,g.start),setTimeout(()=>{a?.stop(),h()},1000*(g.end-g.start)),a}}catch(l){}}}var P0=8,L1=2,nd=100;class N extends k0{static componentStyles=[];emit(o,d){let i=new CustomEvent(o,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...d});return this.dispatchEvent(i),i}}var i0=_1(Symbol("game"));class io extends N{constructor(){super(...arguments);this.currency="BTC";this.isTheatreMode=!1;this.showFavorites=!1;this.balance=1000;this.baseUrl="https://us-api.dev.betorigami.com/provider/v1";this.authToken="";this.isCryptoMode=!0;this.gameStatsOpen=!1;this.betAmount="0.00";this.autobetNumberOfBets=0;this.hotkeysOpenEnabled=!1;this.volume=100;this.instantBetEnabled=!1;this.mainWidth=1000}_soundController=new so(this);_gameProvider=new a1(this,{context:i0,initialValue:{amount:this.betAmount,updateBalance:this.updateBalance.bind(this),currency:this.currency,isCryptoMode:this.isCryptoMode,isTheatreMode:this.isTheatreMode,showFavorites:this.showFavorites,balance:this.balance,baseUrl:this.baseUrl,authToken:this.authToken,gameStatsOpen:this.gameStatsOpen,autobetNumberOfBets:this.autobetNumberOfBets,hotkeysOpenEnabled:this.hotkeysOpenEnabled,volume:this.volume,instantBetEnabled:this.instantBetEnabled,soundController:this._soundController,updateHotkeysOpenEnabled:this.updateHotkeysOpenEnabled.bind(this),updateVolume:this.updateVolume.bind(this),updateInstantBetEnabled:this.updateInstantBetEnabled.bind(this),updateAutobetNumberOfBets:this.updateAutobetNumberOfBets.bind(this),mainWidth:this.mainWidth,updateMainWidth:this.updateMainWidth.bind(this)}});connectedCallback(){super.connectedCallback(),this.updateProviderValue()}updated(o){if(super.updated(o),o.has("currency")||o.has("isTheatreMode")||o.has("showFavorites")||o.has("balance")||o.has("baseUrl")||o.has("isCryptoMode")||o.has("authToken")||o.has("gameStatsOpen")||o.has("hotkeysOpenEnabled")||o.has("volume")||o.has("instantBetEnabled")||o.has("mainWidth"))this.updateProviderValue()}get gameData(){return this._gameProvider.value}updateProviderValue(){this._gameProvider.setValue({amount:this.betAmount,currency:this.currency,updateBalance:this.updateBalance.bind(this),isCryptoMode:this.isCryptoMode,isTheatreMode:this.isTheatreMode,showFavorites:this.showFavorites,balance:this.balance,baseUrl:this.baseUrl,authToken:this.authToken,gameStatsOpen:this.gameStatsOpen,autobetNumberOfBets:this.autobetNumberOfBets,updateAutobetNumberOfBets:this.updateAutobetNumberOfBets.bind(this),hotkeysOpenEnabled:this.hotkeysOpenEnabled,volume:this.volume,instantBetEnabled:this.instantBetEnabled,soundController:this._soundController,updateHotkeysOpenEnabled:this.updateHotkeysOpenEnabled.bind(this),updateVolume:this.updateVolume.bind(this),updateInstantBetEnabled:this.updateInstantBetEnabled.bind(this),mainWidth:this.mainWidth,updateMainWidth:this.updateMainWidth.bind(this)})}updateHotkeysOpenEnabled(o){this.hotkeysOpenEnabled=o,this.updateProviderValue()}updateVolume(o){this.volume=o,this.updateProviderValue()}updateInstantBetEnabled(o){this.instantBetEnabled=o,this.updateProviderValue()}updateAutobetNumberOfBets(o){this.autobetNumberOfBets=o,this.updateProviderValue()}updateMainWidth(o){this.mainWidth=o,this.updateProviderValue()}updateBalance(o){if(o.isNaN())return;if(o.isLessThan(0)){this.betAmount="0";return}let d=o.toFixed(P0);this.betAmount=d,this.updateProviderValue()}render(){return S`<slot></slot>`}}b([q({type:String})],io.prototype,"currency",void 0),b([q({type:Boolean})],io.prototype,"isTheatreMode",void 0),b([q({type:Boolean})],io.prototype,"showFavorites",void 0),b([q({type:Number})],io.prototype,"balance",void 0),b([q({type:String})],io.prototype,"baseUrl",void 0),b([q({type:String})],io.prototype,"authToken",void 0),b([q({type:Boolean})],io.prototype,"isCryptoMode",void 0),b([q({type:Boolean})],io.prototype,"gameStatsOpen",void 0),b([O()],io.prototype,"betAmount",void 0),b([O()],io.prototype,"autobetNumberOfBets",void 0),b([O()],io.prototype,"hotkeysOpenEnabled",void 0),b([O()],io.prototype,"volume",void 0),b([O()],io.prototype,"instantBetEnabled",void 0),b([O()],io.prototype,"mainWidth",void 0),io=b([P("origami-game-provider-wrapper")],io);var K0={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},R0=(o)=>(...d)=>({_$litDirective$:o,values:d});class T0{constructor(o){}get _$AU(){return this._$AM._$AU}_$AT(o,d,i){this._$Ct=o,this._$AM=d,this._$Ci=i}_$AS(o,d){return this.update(o,d)}update(o,d){return this.render(...d)}}var o0=R0(class extends T0{constructor(o){if(super(o),o.type!==K0.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter((d)=>o[d]).join(" ")+" "}update(o,[d]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter((r)=>r!=="")));for(let r in d)d[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(d)}let i=o.element.classList;for(let r of this.st)r in d||(i.remove(r),this.st.delete(r));for(let r in d){let h=!!d[r];h===this.st.has(r)||this.nt?.has(r)||(h?(i.add(r),this.st.add(r)):(i.remove(r),this.st.delete(r)))}return U0}});var v0=(o)=>o??A;var B=y`
|
|
14
14
|
:host {
|
|
15
15
|
all: initial;
|
|
16
16
|
display: block;
|
|
@@ -77,7 +77,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
77
77
|
[hidden] {
|
|
78
78
|
display: none !important;
|
|
79
79
|
}
|
|
80
|
-
`;var pd=
|
|
80
|
+
`;var pd=y`
|
|
81
81
|
:host {
|
|
82
82
|
display: grid;
|
|
83
83
|
grid-template-columns: var(--toggle-button-grid-columns, 1fr 1fr);
|
|
@@ -155,7 +155,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
155
155
|
.button.selected:focus-visible {
|
|
156
156
|
outline-color: rgba(55, 55, 55, 0.8);
|
|
157
157
|
}
|
|
158
|
-
`;class Oo extends
|
|
158
|
+
`;class Oo extends N{constructor(){super(...arguments);this.option1="Manual";this.option2="Auto";this.value="Manual";this.disabled=!1;this.name="Toggle";this.class="";this.noRightBorderRadius=!1}static styles=[B,pd];handleOptionClick(o){if(this.value!==o)this.value=o,this.gameContext?.soundController?.play("toggle").catch((d)=>console.error(d)),this.emit("toggle-change",{detail:{value:o},bubbles:!1,composed:!1})}render(){let o=this.value===this.option1,d=this.value===this.option2;return S`
|
|
159
159
|
<button
|
|
160
160
|
.variant=${o?"primary":"secondary"}
|
|
161
161
|
@click=${()=>this.handleOptionClick(this.option1)}
|
|
@@ -165,7 +165,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
165
165
|
aria-disabled=${this.disabled?"true":"false"}
|
|
166
166
|
id="option1Button"
|
|
167
167
|
tabindex="0"
|
|
168
|
-
name=${
|
|
168
|
+
name=${v0(this.name)}
|
|
169
169
|
>
|
|
170
170
|
${this.option1}
|
|
171
171
|
</button>
|
|
@@ -179,11 +179,11 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
179
179
|
aria-disabled=${this.disabled?"true":"false"}
|
|
180
180
|
id="option2Button"
|
|
181
181
|
tabindex="0"
|
|
182
|
-
name=${
|
|
182
|
+
name=${v0(this.name)}
|
|
183
183
|
>
|
|
184
184
|
${this.option2}
|
|
185
185
|
</button>
|
|
186
|
-
`}}
|
|
186
|
+
`}}b([l0({context:i0,subscribe:!0}),q({attribute:!1})],Oo.prototype,"gameContext",void 0),b([q({type:String})],Oo.prototype,"option1",void 0),b([q({type:String})],Oo.prototype,"option2",void 0),b([q({type:String,reflect:!0})],Oo.prototype,"value",void 0),b([q({type:Boolean,reflect:!0})],Oo.prototype,"disabled",void 0),b([q({type:String})],Oo.prototype,"name",void 0),b([q({type:String})],Oo.prototype,"class",void 0),b([q({type:Boolean})],Oo.prototype,"noRightBorderRadius",void 0),Oo=b([P("origami-toggle")],Oo);var{I:h3}=vd;var Po=(o,d)=>d===void 0?o?._$litType$!==void 0:o?._$litType$===d,$d=(o)=>o?._$litType$?.h!=null;var ro=(o)=>o.strings===void 0,Zd=()=>document.createComment(""),t0=(o,d,i)=>{let r=o._$AA.parentNode,h=d===void 0?o._$AB:d._$AA;if(i===void 0){let a=r.insertBefore(Zd(),h),g=r.insertBefore(Zd(),h);i=new h3(a,g,o,o.options)}else{let a=i._$AB.nextSibling,g=i._$AM,l=g!==o;if(l){let x;i._$AQ?.(o),i._$AM=o,i._$AP!==void 0&&(x=o._$AU)!==g._$AU&&i._$AP(x)}if(a!==h||l){let x=i._$AA;for(;x!==a;){let f=x.nextSibling;r.insertBefore(x,h),x=f}}}return i},l1=(o,d,i=o)=>(o._$AI(d,i),o),a3={},$1=(o,d=a3)=>o._$AH=d,u1=(o)=>o._$AH,ho=(o)=>{o._$AP?.(!1,!0);let d=o._$AA,i=o._$AB.nextSibling;for(;d!==i;){let r=d.nextSibling;d.remove(),d=r}},Jd=(o)=>{o._$AR()};var R1=(o,d)=>{let i=o._$AN;if(i===void 0)return!1;for(let r of i)r._$AO?.(d,!1),R1(r,d);return!0},ao=(o)=>{let d,i;do{if((d=o._$AM)===void 0)break;i=d._$AN,i.delete(o),o=d}while(i?.size===0)},Qd=(o)=>{for(let d;d=o._$AM;o=d){let i=d._$AN;if(i===void 0)d._$AN=i=new Set;else if(i.has(o))break;i.add(o),x3(d)}};function g3(o){this._$AN!==void 0?(ao(this),this._$AM=o,Qd(this)):this._$AM=o}function l3(o,d=!1,i=0){let r=this._$AH,h=this._$AN;if(h!==void 0&&h.size!==0)if(d)if(Array.isArray(r))for(let a=i;a<r.length;a++)R1(r[a],!1),ao(r[a]);else r!=null&&(R1(r,!1),ao(r));else R1(this,o)}var x3=(o)=>{o.type==K0.CHILD&&(o._$AP??=l3,o._$AQ??=g3)};class Do extends T0{constructor(){super(...arguments),this._$AN=void 0}_$AT(o,d,i){super._$AT(o,d,i),Qd(this),this.isConnected=o._$AU}_$AO(o,d=!0){o!==this.isConnected&&(this.isConnected=o,o?this.reconnected?.():this.disconnected?.()),d&&(R1(this,o),ao(this))}setValue(o){if(ro(this._$Ct))this._$Ct._$AI(o,this);else{let d=[...this._$Ct._$AH];d[this._$Ci]=o,this._$Ct._$AI(d,this,0)}}disconnected(){}reconnected(){}}var J1=()=>new Hd;class Hd{}var No=new WeakMap,Q1=R0(class extends Do{render(o){return A}update(o,[d]){let i=d!==this.G;return i&&this.G!==void 0&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=d,this.ht=o.options?.host,this.rt(this.ct=o.element)),A}rt(o){if(this.isConnected||(o=void 0),typeof this.G=="function"){let d=this.ht??globalThis,i=No.get(d);i===void 0&&(i=new WeakMap,No.set(d,i)),i.get(this.G)!==void 0&&this.G.call(this.ht,void 0),i.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?No.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var kd=y`
|
|
187
187
|
:host {
|
|
188
188
|
display: inline-block;
|
|
189
189
|
position: relative;
|
|
@@ -433,7 +433,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
433
433
|
.button[aria-busy="true"] .hotkey-hint {
|
|
434
434
|
opacity: 0.5;
|
|
435
435
|
}
|
|
436
|
-
`;var
|
|
436
|
+
`;var w3=f0`<svg class="spinner" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2.25"></circle><path d="M1.72559 4.97461L6.90836 10.1576L10.9407 6.236" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="15" stroke-dashoffset="45"></path><g style="transform-origin: 8px 8px;" transform="rotate(360deg)"><circle cx="8" cy="8" r="7" stroke-dasharray="45" stroke-linecap="round" stroke="currentColor" stroke-width="2.25" stroke-dashoffset="30" style="transform-origin: 8px 8px;" transform="rotate(180deg)"></circle></g></svg>`;class Bo extends N{constructor(){super(...arguments);this.variant="primary";this.disabled=!1;this.noPointerEvents=!1;this.ariaLabel=null;this.ariaDescribedby=null;this.type="button";this.isLoading=!1;this.fullWidth=!1;this.enableHaptics=!1;this.hotkeyActive=!1}static styles=[B,kd];static shadowRootOptions={...k0.shadowRootOptions,delegatesFocus:!0};triggerHapticFeedback(){if(this.enableHaptics&&"navigator"in window&&"vibrate"in navigator)try{navigator.vibrate(10)}catch(o){console.warn("Error triggering haptic feedback:",o)}}_handleClick(o){this.triggerHapticFeedback(),this.emit("button-click",{detail:{originalEvent:o},composed:!1,bubbles:!1})}triggerActiveState(){this.hotkeyActive=!0,setTimeout(()=>{this.hotkeyActive=!1},150)}render(){let o=this.variant==="icon",d=this.disabled||this.isLoading,i={button:!0,[this.variant]:!0,"full-width":this.fullWidth,loading:this.isLoading,"hotkey-active":this.hotkeyActive},r=o?S`<slot name="icon" aria-hidden="true"></slot>`:S`<slot></slot>`,h=this.hotkey&&this.gameData?.hotkeysOpenEnabled&&!o;return S`
|
|
437
437
|
<button
|
|
438
438
|
class=${o0(i)}
|
|
439
439
|
@click=${this._handleClick}
|
|
@@ -445,7 +445,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
445
445
|
>
|
|
446
446
|
<span class="button-content">
|
|
447
447
|
${r}
|
|
448
|
-
${h?
|
|
448
|
+
${h?S`
|
|
449
449
|
<kbd class="hotkey-hint ${this.hotkey?.length===1&&this.hotkey!==" "?"hotkey-hint--square":""}">
|
|
450
450
|
${this.hotkey===" "?"SPACE":this.hotkey}
|
|
451
451
|
</kbd>
|
|
@@ -453,11 +453,11 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
453
453
|
</span>
|
|
454
454
|
|
|
455
455
|
<span class="spinner-container" aria-hidden="true">
|
|
456
|
-
${
|
|
456
|
+
${w3}
|
|
457
457
|
<span class="visually-hidden">Loading...</span>
|
|
458
458
|
</span>
|
|
459
459
|
</button>
|
|
460
|
-
`}}
|
|
460
|
+
`}}b([l0({context:i0,subscribe:!0})],Bo.prototype,"gameData",void 0),b([q({type:String,reflect:!0})],Bo.prototype,"variant",void 0),b([q({type:Boolean,reflect:!0})],Bo.prototype,"disabled",void 0),b([q({type:Boolean})],Bo.prototype,"noPointerEvents",void 0),b([q({type:String,attribute:"aria-label"})],Bo.prototype,"ariaLabel",void 0),b([q({type:String,attribute:"aria-describedby"})],Bo.prototype,"ariaDescribedby",void 0),b([q({type:String})],Bo.prototype,"type",void 0),b([q({type:Boolean,reflect:!0})],Bo.prototype,"isLoading",void 0),b([q({type:Boolean,reflect:!0})],Bo.prototype,"fullWidth",void 0),b([q({type:Boolean,attribute:"enable-haptics"})],Bo.prototype,"enableHaptics",void 0),b([q({type:String})],Bo.prototype,"hotkey",void 0),b([q({type:Boolean,reflect:!0})],Bo.prototype,"hotkeyActive",void 0),Bo=b([P("origami-button")],Bo);var Yd=y`
|
|
461
461
|
:host {
|
|
462
462
|
display: inline-flex;
|
|
463
463
|
position: relative;
|
|
@@ -513,7 +513,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
513
513
|
::slotted(origami-button:focus-within) {
|
|
514
514
|
z-index: 1;
|
|
515
515
|
}
|
|
516
|
-
`;class
|
|
516
|
+
`;class yo extends N{constructor(){super(...arguments);this.position="right"}static styles=[B,Yd];render(){return S`<slot></slot>`}}b([q({type:String,reflect:!0})],yo.prototype,"position",void 0),yo=b([P("origami-button-group")],yo);var _d=R0(class extends T0{constructor(o){if(super(o),o.type!==K0.PROPERTY&&o.type!==K0.ATTRIBUTE&&o.type!==K0.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ro(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[d]){if(d===U0||d===A)return d;let{element:i,name:r}=o;if(o.type===K0.PROPERTY){if(d===i[r])return U0}else if(o.type===K0.BOOLEAN_ATTRIBUTE){if(!!d===i.hasAttribute(r))return U0}else if(o.type===K0.ATTRIBUTE&&i.getAttribute(r)===d+"")return U0;return $1(o),d}});var Ud=y`
|
|
517
517
|
:host {
|
|
518
518
|
--input-text-color: white;
|
|
519
519
|
--input-background-color: #1a1a1a;
|
|
@@ -793,7 +793,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
793
793
|
::slotted(origami-button-group) {
|
|
794
794
|
height: 100%;
|
|
795
795
|
}
|
|
796
|
-
`;function p0(o,d){let i={waitUntilFirstUpdate:!1,...d};return(r,h)=>{let{update:a}=r,g=Array.isArray(o)?o:[o];r.update=function(l){g.forEach((x)=>{let
|
|
796
|
+
`;function p0(o,d){let i={waitUntilFirstUpdate:!1,...d};return(r,h)=>{let{update:a}=r,g=Array.isArray(o)?o:[o];r.update=function(l){g.forEach((x)=>{let f=x;if(l.has(f)){let n=l.get(f),_=this[f];if(n!==_){if(!i.waitUntilFirstUpdate||this.hasUpdated)this[h](n,_)}}}),a.call(this,l)}}}var qd=y`
|
|
797
797
|
:host {
|
|
798
798
|
position: relative;
|
|
799
799
|
width: 100%;
|
|
@@ -1013,12 +1013,12 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1013
1013
|
.tooltip[data-position="right-end"] .tooltip-arrow {
|
|
1014
1014
|
bottom: var(--tooltip-arrow-size);
|
|
1015
1015
|
}
|
|
1016
|
-
`;var
|
|
1016
|
+
`;var b3={top:"bottom","top-start":"bottom-start","top-end":"bottom-end",bottom:"top","bottom-start":"top-start","bottom-end":"top-end",left:"right","left-start":"right-start","left-end":"right-end",right:"left","right-start":"left-start","right-end":"left-end"};class Ao extends k0{constructor(){super(...arguments);this.content="";this.position="top";this.trigger=["hover","focus"];this.arrow=!0;this.open=!1;this.disabled=!1;this.offset=4;this.theme="light";this.delay=0;this.hideDelay=0;this.fullWidth=!1}static styles=[B,qd];tooltipRef=J1();triggerRef=J1();showTimeout=null;hideTimeout=null;scrollTimeout=null;clickOutsideHandler=null;keydownHandler=null;scrollHandler=null;debounceTime=50;disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners(),this.clearTimeouts()}onOpenChange(){if(this.open)this.show();else this.hide()}onDisabledChange(){if(this.disabled)this.hide()}onPositionChange(){requestAnimationFrame(()=>this.updatePosition())}addEventListeners(){if(!this.keydownHandler)this.keydownHandler=this.handleKeyDown,document.addEventListener("keydown",this.keydownHandler);if(this.hasTrigger("click")&&!this.clickOutsideHandler)this.clickOutsideHandler=this.handleClickOutside,document.addEventListener("click",this.clickOutsideHandler,{capture:!0});if(!this.scrollHandler)this.scrollHandler=this.handleScroll,window.addEventListener("scroll",this.scrollHandler,{passive:!0})}removeEventListeners(){if(this.keydownHandler)document.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null;if(this.clickOutsideHandler)document.removeEventListener("click",this.clickOutsideHandler,{capture:!0}),this.clickOutsideHandler=null;if(this.scrollHandler)window.removeEventListener("scroll",this.scrollHandler),this.scrollHandler=null}hasTrigger(o){return(Array.isArray(this.trigger)?this.trigger:[this.trigger]).includes(o)}handleScroll=()=>{if(this.scrollTimeout!==null)window.clearTimeout(this.scrollTimeout);this.scrollTimeout=window.setTimeout(()=>{if(this.open)this.updatePosition();this.scrollTimeout=null},this.debounceTime)};clearTimeouts(){let o=["showTimeout","hideTimeout","scrollTimeout"];for(let d of o){let i=this[d];if(i!==null)window.clearTimeout(i);this[d]=null}}show(){if(this.disabled||this.open)return;if(this.clearTimeouts(),this.delay>0)this.showTimeout=window.setTimeout(()=>{this.showTooltip()},this.delay);else this.showTooltip()}hide(){if(this.disabled||!this.open)return;if(this.clearTimeouts(),this.hideDelay>0)this.hideTimeout=window.setTimeout(()=>{this.hideTooltip()},this.hideDelay);else this.hideTooltip()}showTooltip(){if(this.tooltipRef.value&&!this.disabled)this.open=!0,this.updatePosition(),this.addEventListeners()}hideTooltip(){if(this.tooltipRef.value)this.open=!1,this.removeEventListeners(),this.clearTimeouts()}updatePosition(){if(!this.tooltipRef.value||!this.triggerRef.value||!this.open)return;let o=this.tooltipRef.value,d=this.triggerRef.value,i=this.triggerSlot.assignedElements()[0]||d,r=this.position,h=this.offset,a=i.getBoundingClientRect(),g=o.getBoundingClientRect(),l=window.innerWidth,x=window.innerHeight,f=a.top,n=x-a.bottom,_=a.left,v=l-a.right,Y=r,H=($)=>{switch($){case"top":case"top-start":case"top-end":return f<g.height+h+6;case"bottom":case"bottom-start":case"bottom-end":return n<g.height+h+6;case"left":case"left-start":case"left-end":return _<g.width+h+6;case"right":case"right-start":case"right-end":return v<g.width+h+6;default:return!1}};if(H(r)){let $=b3[r];if(!H($))Y=$;else{let Z=["top","right","bottom","left"].find((c)=>!H(c));if(Z)Y=Z}}o.setAttribute("data-position",Y)}handleMouseEnter=()=>{if(this.hasTrigger("hover"))this.show()};handleMouseLeave=(o)=>{let d=o.relatedTarget;if(this.tooltipRef.value?.contains(d))return;if(this.hasTrigger("hover"))this.hide()};handleFocus=(o)=>{if(o.composedPath().some((r)=>r===this.triggerRef.value||this.triggerRef.value?.contains(r))&&this.hasTrigger("focus"))this.show()};handleBlur=(o)=>{if(o.composedPath().some((r)=>r===this.triggerRef.value||this.triggerRef.value?.contains(r))&&this.hasTrigger("focus"))this.hide()};handleClick=()=>{if(this.hasTrigger("click"))if(!this.open)this.show();else this.hide()};handleClickOutside=(o)=>{if(!this.open||!this.hasTrigger("click"))return;let d=o.composedPath(),i=this.triggerRef.value&&d.includes(this.triggerRef.value),r=this.tooltipRef.value&&d.includes(this.tooltipRef.value);if(!i&&!r)this.hide()};handleKeyDown=(o)=>{if(o.key==="Escape"&&this.open)this.hide()};render(){let o=`tooltip-${Math.random().toString(36).substring(2,15)}`,d={tooltip:!0,"light-theme":this.theme==="light",visible:this.open,"full-width":this.fullWidth};return S`
|
|
1017
1017
|
<div
|
|
1018
1018
|
style=${`--tooltip-offset: ${this.offset}px`}
|
|
1019
1019
|
${Q1(this.triggerRef)}
|
|
1020
1020
|
class="tooltip-trigger"
|
|
1021
|
-
aria-describedby=${this.open&&this.content?o:
|
|
1021
|
+
aria-describedby=${this.open&&this.content?o:A}
|
|
1022
1022
|
@mouseenter=${this.handleMouseEnter}
|
|
1023
1023
|
@mouseleave=${this.handleMouseLeave}
|
|
1024
1024
|
@focusin=${this.handleFocus}
|
|
@@ -1035,10 +1035,10 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1035
1035
|
>
|
|
1036
1036
|
${this.content}
|
|
1037
1037
|
<slot name="content"></slot>
|
|
1038
|
-
${this.arrow?
|
|
1038
|
+
${this.arrow?S`<div class="tooltip-arrow"></div>`:A}
|
|
1039
1039
|
</div>
|
|
1040
1040
|
</div>
|
|
1041
|
-
`}}
|
|
1041
|
+
`}}b([q({type:String})],Ao.prototype,"content",void 0),b([q({type:String,reflect:!0})],Ao.prototype,"position",void 0),b([q({type:Array,converter:(o)=>{if(typeof o==="string")return o.split(/[\s,]+/).filter(Boolean);return o}})],Ao.prototype,"trigger",void 0),b([q({type:Boolean,reflect:!0})],Ao.prototype,"arrow",void 0),b([q({type:Boolean,reflect:!0})],Ao.prototype,"open",void 0),b([q({type:Boolean,reflect:!0})],Ao.prototype,"disabled",void 0),b([q({type:Number})],Ao.prototype,"offset",void 0),b([q({type:String,reflect:!0})],Ao.prototype,"theme",void 0),b([q({type:Number})],Ao.prototype,"delay",void 0),b([q({type:Number})],Ao.prototype,"hideDelay",void 0),b([q({type:Boolean})],Ao.prototype,"fullWidth",void 0),b([w0("#trigger-slot")],Ao.prototype,"triggerSlot",void 0),b([p0("open")],Ao.prototype,"onOpenChange",null),b([p0("disabled")],Ao.prototype,"onDisabledChange",null),b([p0(["position","offset","content"])],Ao.prototype,"onPositionChange",null),Ao=b([P("origami-tooltip")],Ao);class Mo extends N{constructor(){super(...arguments);this.value="";this.label="";this.placeholder="";this.type="text";this.disabled=!1;this.rightText=null;this.min=null;this.max=null;this.step=null;this.addonButtonsPosition="right";this.name=null;this.autocomplete=null;this.required=!1;this.readonly=!1;this.pattern=null;this.validateOnInput=!1;this.tooltipFullWidth=!1;this.validationPattern=null;this.validationMessage=null;this.inputMode="text";this.hideRightLabel=!1;this.clickable=!1;this.forceActiveBorder=!1;this.keepLabelEnabled=!1;this.handleBeforeInput=null;this.tooltipOffset=4;this.errorMessage=null;this._isIconRotating=!1;this.isHovering=!1;this._hasRightIcon=!1;this.errorTooltipMessage="";this._iconRotationState=!1}static styles=[B,Ud];inputRef=J1();inputId=`input-${Math.random().toString(36).substring(2,11)}`;errorId=`${this.inputId}-error`;handleSlotChange(){let o=this.shadowRoot?.querySelector('slot[name="right-icon"]');if(o)this._hasRightIcon=o.assignedNodes({flatten:!0}).length>0}firstUpdated(){this.handleSlotChange()}handleMouseEnter(){this.isHovering=!0}handleMouseLeave(){this.isHovering=!1}handleInput(o){let d=o.target,i=d.value;this.emit("input-change",{detail:{value:i,target:d}})}handlePaste(o){if(this.type!=="number")return;let d=o.clipboardData;if(!d)return;let i=d.getData("text");if(i&&/[eE]/.test(i)){o.preventDefault();return}}handleClick(o){if(this.clickable){if(o.preventDefault(),o.stopPropagation(),window.getSelection()?.removeAllRanges(),this.emit("input-click"),this._hasRightIcon)this._iconRotationState=!this._iconRotationState,this._isIconRotating=!0}}handleAnimationEnd(){this._isIconRotating=!1}handleFocus(){this.inputRef.value?.select(),this.emit("input-focus")}handleBlur(){this.emit("input-blur",{detail:{value:this.value}})}render(){let o=!this.hideRightLabel&&this.type==="number"?`${Number(this.value||0).toFixed(4)} ${this.rightText}`:void 0,d={"clickable-wrapper":this.clickable,"disable-user-select":this.readonly||this.disabled},i={"input-field":!0,error:!!this.errorMessage,"clickable-input":this.clickable,active:this.forceActiveBorder},r={"input-inner":!0,"has-right-icon":this._hasRightIcon},h={"input-label":!0,disabled:this.disabled&&!this.keepLabelEnabled};return S`
|
|
1042
1042
|
<div
|
|
1043
1043
|
class=${o0(d)}
|
|
1044
1044
|
@mouseenter=${this.handleMouseEnter}
|
|
@@ -1049,22 +1049,22 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1049
1049
|
class=${this.clickable?"clickable-label":""}
|
|
1050
1050
|
@click=${this.clickable?this.handleClick:void 0}
|
|
1051
1051
|
>
|
|
1052
|
-
${this.label||this.rightText||o?
|
|
1052
|
+
${this.label||this.rightText||o?S`
|
|
1053
1053
|
<div class=${o0(h)} id="${this.inputId}-label">
|
|
1054
|
-
${this.isHovering&&this.errorMessage?
|
|
1054
|
+
${this.isHovering&&this.errorMessage?S` <span
|
|
1055
1055
|
id=${this.errorId}
|
|
1056
1056
|
class="input-error"
|
|
1057
1057
|
role="alert"
|
|
1058
1058
|
aria-live="polite"
|
|
1059
1059
|
>${this.errorMessage}</span
|
|
1060
|
-
>`:this.label?
|
|
1060
|
+
>`:this.label?S`
|
|
1061
1061
|
<div class="input-label-text">
|
|
1062
1062
|
<span>${this.label}</span>
|
|
1063
|
-
${this.required?
|
|
1063
|
+
${this.required?S`<span aria-hidden="true">*</span>`:A}
|
|
1064
1064
|
</div>
|
|
1065
|
-
`:
|
|
1065
|
+
`:A}
|
|
1066
1066
|
</div>
|
|
1067
|
-
`:
|
|
1067
|
+
`:A}
|
|
1068
1068
|
</label>
|
|
1069
1069
|
|
|
1070
1070
|
<origami-tooltip
|
|
@@ -1077,10 +1077,10 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1077
1077
|
.offset=${this.tooltipOffset}
|
|
1078
1078
|
>
|
|
1079
1079
|
<div class="input-wrapper">
|
|
1080
|
-
${this.leftAddon?
|
|
1080
|
+
${this.leftAddon?S` <slot name="left-addon" class="input-addon-buttons left"></slot> `:A}
|
|
1081
1081
|
|
|
1082
1082
|
<div class=${o0(r)} @click=${this.clickable?this.handleClick:void 0}>
|
|
1083
|
-
${this.leftIcon?
|
|
1083
|
+
${this.leftIcon?S` <slot name="left-icon" class="input-left-icon"></slot> `:A}
|
|
1084
1084
|
<input
|
|
1085
1085
|
${Q1(this.inputRef)}
|
|
1086
1086
|
id=${this.inputId}
|
|
@@ -1093,20 +1093,20 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1093
1093
|
@focus=${this.handleFocus}
|
|
1094
1094
|
@focusout=${this.handleBlur}
|
|
1095
1095
|
@click=${this.clickable?(a)=>{this.handleClick(a)}:void 0}
|
|
1096
|
-
placeholder=${
|
|
1096
|
+
placeholder=${v0(this.placeholder||void 0)}
|
|
1097
1097
|
class=${o0(i)}
|
|
1098
1098
|
?disabled=${this.disabled}
|
|
1099
1099
|
?required=${this.required}
|
|
1100
1100
|
?readonly=${this.readonly}
|
|
1101
|
-
tabindex=${
|
|
1102
|
-
min=${
|
|
1103
|
-
max=${
|
|
1104
|
-
step=${
|
|
1105
|
-
name=${
|
|
1106
|
-
pattern=${
|
|
1101
|
+
tabindex=${v0(this.readonly||this.disabled?-1:void 0)}
|
|
1102
|
+
min=${v0(this.min!==null?this.min:void 0)}
|
|
1103
|
+
max=${v0(this.max!==null?this.max:void 0)}
|
|
1104
|
+
step=${v0(this.step||void 0)}
|
|
1105
|
+
name=${v0(this.name||void 0)}
|
|
1106
|
+
pattern=${v0(this.pattern||void 0)}
|
|
1107
1107
|
aria-invalid=${this.errorMessage?"true":"false"}
|
|
1108
|
-
aria-describedby=${
|
|
1109
|
-
aria-labelledby=${
|
|
1108
|
+
aria-describedby=${v0(this.errorMessage?this.errorId:void 0)}
|
|
1109
|
+
aria-labelledby=${v0(this.label?`${this.inputId}-label`:void 0)}
|
|
1110
1110
|
/>
|
|
1111
1111
|
<div
|
|
1112
1112
|
class="input-right-icon ${this._isIconRotating?this._iconRotationState?"rotating-forward":"rotating-backward":""}"
|
|
@@ -1117,11 +1117,11 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1117
1117
|
</div>
|
|
1118
1118
|
</div>
|
|
1119
1119
|
|
|
1120
|
-
${this.rightAddon?
|
|
1120
|
+
${this.rightAddon?S` <slot name="right-addon" class="input-addon-buttons right"></slot> `:A}
|
|
1121
1121
|
</div>
|
|
1122
1122
|
</origami-tooltip>
|
|
1123
1123
|
</div>
|
|
1124
|
-
`}get rightIcon(){return this._hasRightIcon}get leftIcon(){return!!this.querySelector('[slot="left-icon"]')}get leftAddon(){return!!this.querySelector('[slot="left-addon"]')}get rightAddon(){return!!this.querySelector('[slot="right-addon"]')}}
|
|
1124
|
+
`}get rightIcon(){return this._hasRightIcon}get leftIcon(){return!!this.querySelector('[slot="left-icon"]')}get leftAddon(){return!!this.querySelector('[slot="left-addon"]')}get rightAddon(){return!!this.querySelector('[slot="right-addon"]')}}b([q({type:String})],Mo.prototype,"value",void 0),b([q({type:String})],Mo.prototype,"label",void 0),b([q({type:String})],Mo.prototype,"placeholder",void 0),b([q({type:String,reflect:!0})],Mo.prototype,"type",void 0),b([q({type:Boolean,reflect:!0})],Mo.prototype,"disabled",void 0),b([q({type:String})],Mo.prototype,"rightText",void 0),b([q({type:Number})],Mo.prototype,"min",void 0),b([q({type:Number})],Mo.prototype,"max",void 0),b([q({type:Number})],Mo.prototype,"step",void 0),b([q({type:String})],Mo.prototype,"addonButtonsPosition",void 0),b([q({type:String})],Mo.prototype,"name",void 0),b([q({type:String})],Mo.prototype,"autocomplete",void 0),b([q({type:Boolean,reflect:!0})],Mo.prototype,"required",void 0),b([q({type:Boolean,reflect:!0})],Mo.prototype,"readonly",void 0),b([q({type:String})],Mo.prototype,"pattern",void 0),b([q({type:Boolean})],Mo.prototype,"validateOnInput",void 0),b([q({type:Boolean})],Mo.prototype,"tooltipFullWidth",void 0),b([q({type:String})],Mo.prototype,"validationPattern",void 0),b([q({type:String})],Mo.prototype,"validationMessage",void 0),b([q({type:String})],Mo.prototype,"inputMode",void 0),b([q({type:Boolean})],Mo.prototype,"hideRightLabel",void 0),b([q({type:Boolean})],Mo.prototype,"clickable",void 0),b([q({type:Boolean,reflect:!0})],Mo.prototype,"forceActiveBorder",void 0),b([q({type:Boolean})],Mo.prototype,"keepLabelEnabled",void 0),b([q({type:Function,attribute:!1})],Mo.prototype,"handleBeforeInput",void 0),b([q({type:Number})],Mo.prototype,"tooltipOffset",void 0),b([O()],Mo.prototype,"errorMessage",void 0),b([O()],Mo.prototype,"_isIconRotating",void 0),b([O()],Mo.prototype,"isHovering",void 0),b([O()],Mo.prototype,"_hasRightIcon",void 0),b([q({type:String})],Mo.prototype,"errorTooltipMessage",void 0),b([O()],Mo.prototype,"_iconRotationState",void 0),Mo=b([P("origami-input")],Mo);var Wd=y`
|
|
1125
1125
|
:host {
|
|
1126
1126
|
display: block;
|
|
1127
1127
|
|
|
@@ -1303,42 +1303,42 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1303
1303
|
.select-input option:disabled {
|
|
1304
1304
|
color: #b3b3b3;
|
|
1305
1305
|
}
|
|
1306
|
-
`;class
|
|
1307
|
-
${this.placeholder?
|
|
1306
|
+
`;class Eo extends N{constructor(){super(...arguments);this.dir="ltr";this.label="";this.options=[];this.placeholder="";this.helperText=null;this.disabled=!1;this.required=!1;this.defaultValue=null;this.id="";this.name="";this.error="";this.size=null;this.autoFocus=!1;this._errorMessage=null;this.value=""}static styles=[B,Wd];_generatedId=`select-${Math.random().toString(36).substring(2,11)}`;get _effectiveId(){return this.id||this._generatedId}getGroupedOptions(){let o=this.options.reduce((i,r)=>{if(r.group){if(!i[r.group])i[r.group]=[];i[r.group].push(r)}return i},{}),d=this.options.filter((i)=>!i.group);return{groupedOptions:o,hasGroups:Object.keys(o).length>0,ungroupedOptions:d}}handleChange(o){let i=o.target.value;this.emit("select-change",{detail:{value:i,originalEvent:o},bubbles:!1,composed:!1}),this.validate()}validate(){if(this.required&&!this.value)return this._errorMessage=this._errorMessage||"This field is required",!1;return this._errorMessage=null,!0}generateOptionElements(){let{groupedOptions:o,hasGroups:d,ungroupedOptions:i}=this.getGroupedOptions();return S`
|
|
1307
|
+
${this.placeholder?S`
|
|
1308
1308
|
<option value="" ?disabled=${!this.value} ?selected=${!this.value}>
|
|
1309
1309
|
${this.placeholder}
|
|
1310
1310
|
</option>
|
|
1311
|
-
`:
|
|
1312
|
-
${d?Object.entries(o).map(([r,h])=>
|
|
1311
|
+
`:A}
|
|
1312
|
+
${d?Object.entries(o).map(([r,h])=>S`
|
|
1313
1313
|
<optgroup label=${r}>
|
|
1314
1314
|
${h.map((a)=>this.renderOption(a))}
|
|
1315
1315
|
</optgroup>
|
|
1316
|
-
`):
|
|
1316
|
+
`):A}
|
|
1317
1317
|
${i.map((r)=>this.renderOption(r))}
|
|
1318
|
-
`}renderOption(o){return
|
|
1318
|
+
`}renderOption(o){return S`
|
|
1319
1319
|
<option
|
|
1320
1320
|
value=${o.value}
|
|
1321
1321
|
?disabled=${o.disabled}
|
|
1322
1322
|
?selected=${this.value===o.value}
|
|
1323
|
-
title=${
|
|
1323
|
+
title=${v0(o.label)}
|
|
1324
1324
|
>
|
|
1325
1325
|
${o.label}
|
|
1326
1326
|
</option>
|
|
1327
|
-
`}render(){let o=!!this._errorMessage||!!this.error,d=`${this._effectiveId}-error`,i=`${this._effectiveId}-helper`,r={"select-input":!0,error:o},h={"select-label-text":!0,disabled:this.disabled},a=[o?d:null,this.helperText?i:null].filter(Boolean).join(" ");return
|
|
1327
|
+
`}render(){let o=!!this._errorMessage||!!this.error,d=`${this._effectiveId}-error`,i=`${this._effectiveId}-helper`,r={"select-input":!0,error:o},h={"select-label-text":!0,disabled:this.disabled},a=[o?d:null,this.helperText?i:null].filter(Boolean).join(" ");return S`
|
|
1328
1328
|
<div class="select-container" dir=${this.dir}>
|
|
1329
|
-
${this.label?
|
|
1329
|
+
${this.label?S`
|
|
1330
1330
|
<div class="select-header">
|
|
1331
1331
|
<label for=${this._effectiveId} class=${o0(h)}>
|
|
1332
|
-
${this.label}${this.required?
|
|
1332
|
+
${this.label}${this.required?S`<span aria-hidden="true"> *</span>`:A}
|
|
1333
1333
|
</label>
|
|
1334
1334
|
</div>
|
|
1335
|
-
`:
|
|
1335
|
+
`:A}
|
|
1336
1336
|
|
|
1337
1337
|
<div class="select-wrapper">
|
|
1338
1338
|
<div class="select-inner">
|
|
1339
1339
|
<select
|
|
1340
1340
|
id=${this._effectiveId}
|
|
1341
|
-
name=${
|
|
1341
|
+
name=${v0(this.name||void 0)}
|
|
1342
1342
|
.value=${this.value}
|
|
1343
1343
|
@change=${this.handleChange}
|
|
1344
1344
|
@blur=${this.validate}
|
|
@@ -1346,11 +1346,11 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1346
1346
|
?disabled=${this.disabled}
|
|
1347
1347
|
?required=${this.required}
|
|
1348
1348
|
role="combobox"
|
|
1349
|
-
size=${
|
|
1349
|
+
size=${v0(this.size??void 0)}
|
|
1350
1350
|
?autofocus=${this.autoFocus}
|
|
1351
1351
|
aria-required=${this.required?"true":"false"}
|
|
1352
1352
|
aria-invalid=${o?"true":"false"}
|
|
1353
|
-
aria-describedby=${
|
|
1353
|
+
aria-describedby=${v0(a||void 0)}
|
|
1354
1354
|
>
|
|
1355
1355
|
${this.generateOptionElements()}
|
|
1356
1356
|
</select>
|
|
@@ -1371,20 +1371,20 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1371
1371
|
</div>
|
|
1372
1372
|
</div>
|
|
1373
1373
|
|
|
1374
|
-
${o?
|
|
1374
|
+
${o?S`
|
|
1375
1375
|
<div id=${d} class="select-error" role="alert">
|
|
1376
1376
|
${this.error||this._errorMessage}
|
|
1377
1377
|
</div>
|
|
1378
|
-
`:
|
|
1379
|
-
${this.helperText?
|
|
1378
|
+
`:A}
|
|
1379
|
+
${this.helperText?S` <div id=${i} class="select-helper">${this.helperText}</div> `:A}
|
|
1380
1380
|
</div>
|
|
1381
|
-
`}}
|
|
1382
|
-
`;var Id=
|
|
1383
|
-
`;var Kd=
|
|
1381
|
+
`}}b([q({type:String,reflect:!0})],Eo.prototype,"dir",void 0),b([q({type:String})],Eo.prototype,"label",void 0),b([q({type:Array})],Eo.prototype,"options",void 0),b([q({type:String})],Eo.prototype,"placeholder",void 0),b([q({type:String})],Eo.prototype,"helperText",void 0),b([q({type:Boolean,reflect:!0})],Eo.prototype,"disabled",void 0),b([q({type:Boolean,reflect:!0})],Eo.prototype,"required",void 0),b([q({type:String})],Eo.prototype,"defaultValue",void 0),b([q({type:String})],Eo.prototype,"id",void 0),b([q({type:String})],Eo.prototype,"name",void 0),b([q({type:String})],Eo.prototype,"error",void 0),b([q({type:Number})],Eo.prototype,"size",void 0),b([q({type:Boolean})],Eo.prototype,"autoFocus",void 0),b([O()],Eo.prototype,"_errorMessage",void 0),b([q({type:String})],Eo.prototype,"value",void 0),Eo=b([P("origami-select")],Eo);var Xd=f0`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><g fill="none" fill-rule="evenodd"><circle cx="16" cy="16" r="16" fill="#F7931A"/><path fill="#FFF" fill-rule="nonzero" d="M23.189 14.02c.314-2.096-1.283-3.223-3.465-3.975l.708-2.84-1.728-.43-.69 2.765c-.454-.114-.92-.22-1.385-.326l.695-2.783L15.596 6l-.708 2.839c-.376-.086-.746-.17-1.104-.26l.002-.009-2.384-.595-.46 1.846s1.283.294 1.256.312c.7.175.826.638.805 1.006l-.806 3.235c.048.012.11.03.18.057l-.183-.045-1.13 4.532c-.086.212-.303.531-.793.41.018.025-1.256-.313-1.256-.313l-.858 1.978 2.25.561c.418.105.828.215 1.231.318l-.715 2.872 1.727.43.708-2.84c.472.127.93.245 1.378.357l-.706 2.828 1.728.43.715-2.866c2.948.558 5.164.333 6.097-2.333.752-2.146-.037-3.385-1.588-4.192 1.13-.26 1.98-1.003 2.207-2.538zm-3.95 5.538c-.533 2.147-4.148.986-5.32.695l.95-3.805c1.172.293 4.929.872 4.37 3.11zm.535-5.569c-.487 1.953-3.495.96-4.47.717l.86-3.45c.975.243 4.118.696 3.61 2.733z"/></g></svg>
|
|
1382
|
+
`;var Id=f0`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><g fill="none" fill-rule="evenodd"><circle cx="16" cy="16" r="16" fill="#627EEA"/><g fill="#FFF" fill-rule="nonzero"><path fill-opacity=".602" d="M16.498 4v8.87l7.497 3.35z"/><path d="M16.498 4L9 16.22l7.498-3.35z"/><path fill-opacity=".602" d="M16.498 21.968v6.027L24 17.616z"/><path d="M16.498 27.995v-6.028L9 17.616z"/><path fill-opacity=".2" d="M16.498 20.573l7.497-4.353-7.497-3.348z"/><path fill-opacity=".602" d="M9 16.22l7.498 4.353v-7.701z"/></g></g></svg>
|
|
1383
|
+
`;var Kd=f0`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
1384
1384
|
<path d="M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16Z" fill="#3E73C4"/>
|
|
1385
1385
|
<path d="M10.0105 9.06197C10.0105 7.99997 9.3705 7.63597 8.0905 7.48397C7.1765 7.36247 6.994 7.11997 6.994 6.69497C6.994 6.26997 7.299 5.99697 7.908 5.99697C8.4565 5.99697 8.7615 6.17897 8.9135 6.63447C8.92934 6.67852 8.9583 6.71665 8.99647 6.74374C9.03464 6.77083 9.0802 6.78557 9.127 6.78597H9.6145C9.64266 6.78672 9.67068 6.78175 9.69685 6.77135C9.72303 6.76095 9.74682 6.74534 9.76678 6.72547C9.78675 6.7056 9.80247 6.68188 9.81299 6.65575C9.82352 6.62963 9.82862 6.60163 9.828 6.57347V6.54347C9.76842 6.21392 9.60168 5.91327 9.35367 5.68823C9.10566 5.46319 8.79027 5.32635 8.4565 5.29897V4.57097C8.4565 4.44947 8.365 4.35847 8.213 4.32797H7.7555C7.634 4.32797 7.5425 4.41897 7.512 4.57097V5.26897C6.5975 5.38997 6.019 5.99697 6.019 6.75597C6.019 7.75697 6.628 8.15147 7.908 8.30347C8.7615 8.45497 9.0355 8.63747 9.0355 9.12297C9.0355 9.60797 8.609 9.94197 8.03 9.94197C7.2375 9.94197 6.9635 9.60847 6.872 9.15297C6.842 9.03197 6.75 8.97097 6.6585 8.97097H6.1405C6.11239 8.97029 6.08442 8.97532 6.05831 8.98575C6.03219 8.99618 6.00846 9.0118 5.98855 9.03166C5.96864 9.05152 5.95296 9.07522 5.94247 9.10131C5.93198 9.12741 5.92689 9.15536 5.9275 9.18347V9.21347C6.049 9.97247 6.537 10.5185 7.5425 10.6705V11.399C7.5425 11.52 7.634 11.6115 7.786 11.6415H8.2435C8.365 11.6415 8.4565 11.5505 8.487 11.399V10.67C9.4015 10.5185 10.0105 9.88097 10.0105 9.06147V9.06197Z" fill="white"/>
|
|
1386
1386
|
<path d="M6.44565 12.2485C4.06865 11.3985 2.84965 8.7585 3.73365 6.422C4.19065 5.147 5.19615 4.1765 6.44565 3.721C6.56766 3.6605 6.62815 3.5695 6.62815 3.4175V2.9925C6.62815 2.8715 6.56766 2.7805 6.44565 2.75C6.41515 2.75 6.35415 2.75 6.32365 2.78C5.63787 2.99416 5.00122 3.34186 4.45037 3.80309C3.89951 4.26431 3.44533 4.82994 3.11398 5.46741C2.78262 6.10489 2.58064 6.80161 2.51966 7.51746C2.45868 8.23332 2.5399 8.95417 2.75865 9.6385C3.30665 11.3385 4.61715 12.6435 6.32365 13.1895C6.44565 13.25 6.56765 13.1895 6.59765 13.068C6.62815 13.038 6.62815 13.007 6.62815 12.9465V12.5215C6.62815 12.4305 6.53715 12.3095 6.44565 12.2485ZM9.67565 2.7805C9.55365 2.7195 9.43165 2.7805 9.40165 2.9015C9.37115 2.932 9.37115 2.9625 9.37115 3.023V3.448C9.37115 3.5695 9.46215 3.6905 9.55365 3.7515C11.9307 4.6015 13.1497 7.2415 12.2657 9.578C11.8087 10.853 10.8032 11.8235 9.55365 12.279C9.43165 12.3395 9.37115 12.4305 9.37115 12.5825V13.0075C9.37115 13.1285 9.43165 13.2195 9.55365 13.25C9.58415 13.25 9.64515 13.25 9.67565 13.22C10.3614 13.0058 10.9981 12.6581 11.5489 12.1969C12.0998 11.7357 12.554 11.1701 12.8853 10.5326C13.2167 9.89511 13.4187 9.19839 13.4796 8.48254C13.5406 7.76668 13.4594 7.04583 13.2407 6.3615C12.6927 4.6315 11.3517 3.3265 9.67565 2.7805Z" fill="white"/>
|
|
1387
|
-
</svg>`;var
|
|
1387
|
+
</svg>`;var f3=(o)=>{let d=o.replace(/[^0-9.]/g,"");if(d.includes(".")){let i=d.split(".");d=`${i[0]}.${i.slice(1).join("")}`}return d};class to extends N{constructor(){super(...arguments);this.label="";this.currency="USDC";this.errorMessage="";this.fiatCurrency="USD";this.value="";this.rightLabel="";this.suffix="";this.placeholder="0.0000";this.disabled=!1;this.readonly=!1;this.disableInput=!1;this.cursorNotAllowed=!1;this.bgColor="";this.testId="";this.tooltip="";this.maxBetEnabled=!1;this.dimmed=!1;this.maxPayoutUSD=0;this.variant="primary";this.required=!1;this.hideCurrencyIcon=!1;this.displayInFiat=!1}get leftAddon(){return!!this.querySelector('[slot="left-addon"]')}get rightAddon(){return!!this.querySelector('[slot="right-addon"]')}formatValue(o){if(!o)return o;try{return Number.parseFloat(o).toFixed(this.displayInFiat?L1:P0)}catch{return o}}preventNonNumericInput(o){if(["e","E","+","-"].includes(o.key))o.preventDefault()}handleChange(o){let d=o.detail.value,i=f3(d);this.emit("raw-currency-input-change",{detail:{value:i}})}handleBlur(){let o=this.formatValue(this.value);this.emit("raw-currency-input-change",{detail:{value:o}}),this.emit("raw-currency-input-blur")}handleFocus(){this.emit("raw-currency-input-focus")}render(){return S`
|
|
1388
1388
|
<origami-input
|
|
1389
1389
|
type="number"
|
|
1390
1390
|
inputmode="decimal"
|
|
@@ -1402,24 +1402,24 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1402
1402
|
@focus=${this.handleFocus}
|
|
1403
1403
|
.errorMessage=${this.errorMessage}
|
|
1404
1404
|
>
|
|
1405
|
-
${this.tooltip?
|
|
1406
|
-
${this.rightAddon?
|
|
1407
|
-
${this.leftAddon?
|
|
1405
|
+
${this.tooltip?S` <origami-tooltip slot="tooltip" .content=${this.tooltip}></origami-tooltip> `:A}
|
|
1406
|
+
${this.rightAddon?S` <slot slot="right-addon" name="right-addon"></slot> `:A}
|
|
1407
|
+
${this.leftAddon?S` <slot slot="left-addon" name="left-addon"></slot> `:A}
|
|
1408
1408
|
|
|
1409
|
-
${!this.hideCurrencyIcon?
|
|
1409
|
+
${!this.hideCurrencyIcon?S`
|
|
1410
1410
|
<div class="svg-container" slot="right-icon">
|
|
1411
|
-
${this.currency==="BTC"?Xd:
|
|
1412
|
-
${this.currency==="ETH"?Id:
|
|
1413
|
-
${this.currency==="USDC"?Kd:
|
|
1411
|
+
${this.currency==="BTC"?Xd:A}
|
|
1412
|
+
${this.currency==="ETH"?Id:A}
|
|
1413
|
+
${this.currency==="USDC"?Kd:A}
|
|
1414
1414
|
</div>
|
|
1415
|
-
`:
|
|
1415
|
+
`:A}
|
|
1416
1416
|
</origami-input>
|
|
1417
|
-
`}}f([q({type:String})],Eo.prototype,"label",void 0),f([q({type:String})],Eo.prototype,"currency",void 0),f([q({type:String})],Eo.prototype,"errorMessage",void 0),f([q({type:String})],Eo.prototype,"fiatCurrency",void 0),f([q({type:String})],Eo.prototype,"value",void 0),f([q({type:String})],Eo.prototype,"rightLabel",void 0),f([q({type:String})],Eo.prototype,"suffix",void 0),f([q({type:String})],Eo.prototype,"placeholder",void 0),f([q({type:Boolean})],Eo.prototype,"disabled",void 0),f([q({type:Boolean})],Eo.prototype,"readonly",void 0),f([q({type:Boolean})],Eo.prototype,"disableInput",void 0),f([q({type:Boolean})],Eo.prototype,"cursorNotAllowed",void 0),f([q({type:String})],Eo.prototype,"bgColor",void 0),f([q({type:String})],Eo.prototype,"testId",void 0),f([q({type:String})],Eo.prototype,"tooltip",void 0),f([q({type:Boolean})],Eo.prototype,"maxBetEnabled",void 0),f([q({type:Boolean})],Eo.prototype,"dimmed",void 0),f([q({type:Number})],Eo.prototype,"maxPayoutUSD",void 0),f([q({type:String})],Eo.prototype,"variant",void 0),f([q({type:Boolean})],Eo.prototype,"required",void 0),f([q({type:Boolean})],Eo.prototype,"hideCurrencyIcon",void 0),f([q({type:Boolean})],Eo.prototype,"displayInFiat",void 0),f([b0("origami-input")],Eo.prototype,"input",void 0),Eo=f([P("origami-raw-currency-input")],Eo);var c3=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mo=Math.ceil,F0=Math.floor,I0="[BigNumber Error] ",Vd=I0+"Number primitive has more than 15 significant digits: ",s0=100000000000000,r0=14,eo=9007199254740991,o2=[1,10,100,1000,1e4,1e5,1e6,1e7,1e8,1e9,10000000000,100000000000,1000000000000,10000000000000],x1=1e7,Q0=1e9;function Fd(o){var d,i,r,h=c.prototype={constructor:c,toString:null,valueOf:null},a=new c(1),g=20,l=4,x=-7,w=21,z=-1e7,_=1e7,n=!1,Y=1,H=0,$={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},I="0123456789abcdefghijklmnopqrstuvwxyz",Z=!0;function c(p,U){var F,L,j,C,T,K,Q,W,b=this;if(!(b instanceof c))return new c(p,U);if(U==null){if(p&&p._isBigNumber===!0){if(b.s=p.s,!p.c||p.e>_)b.c=b.e=null;else if(p.e<z)b.c=[b.e=0];else b.e=p.e,b.c=p.c.slice();return}if((K=typeof p=="number")&&p*0==0){if(b.s=1/p<0?(p=-p,-1):1,p===~~p){for(C=0,T=p;T>=10;T/=10,C++);if(C>_)b.c=b.e=null;else b.e=C,b.c=[p];return}W=String(p)}else{if(!c3.test(W=String(p)))return r(b,W,K);b.s=W.charCodeAt(0)==45?(W=W.slice(1),-1):1}if((C=W.indexOf("."))>-1)W=W.replace(".","");if((T=W.search(/e/i))>0){if(C<0)C=T;C+=+W.slice(T+1),W=W.substring(0,T)}else if(C<0)C=W.length}else{if(v0(U,2,I.length,"Base"),U==10&&Z)return b=new c(p),V(b,g+b.e+1,l);if(W=String(p),K=typeof p=="number"){if(p*0!=0)return r(b,W,K,U);if(b.s=1/p<0?(W=W.slice(1),-1):1,c.DEBUG&&W.replace(/^0\.0*|\./,"").length>15)throw Error(Vd+p)}else b.s=W.charCodeAt(0)===45?(W=W.slice(1),-1):1;F=I.slice(0,U),C=T=0;for(Q=W.length;T<Q;T++)if(F.indexOf(L=W.charAt(T))<0){if(L=="."){if(T>C){C=Q;continue}}else if(!j){if(W==W.toUpperCase()&&(W=W.toLowerCase())||W==W.toLowerCase()&&(W=W.toUpperCase())){j=!0,T=-1,C=0;continue}}return r(b,String(p),K,U)}if(K=!1,W=i(W,U,10,b.s),(C=W.indexOf("."))>-1)W=W.replace(".","");else C=W.length}for(T=0;W.charCodeAt(T)===48;T++);for(Q=W.length;W.charCodeAt(--Q)===48;);if(W=W.slice(T,++Q)){if(Q-=T,K&&c.DEBUG&&Q>15&&(p>eo||p!==F0(p)))throw Error(Vd+b.s*p);if((C=C-T-1)>_)b.c=b.e=null;else if(C<z)b.c=[b.e=0];else{if(b.e=C,b.c=[],T=(C+1)%r0,C<0)T+=r0;if(T<Q){if(T)b.c.push(+W.slice(0,T));for(Q-=r0;T<Q;)b.c.push(+W.slice(T,T+=r0));T=r0-(W=W.slice(T)).length}else T-=Q;for(;T--;W+="0");b.c.push(+W)}}else b.c=[b.e=0]}c.clone=Fd,c.ROUND_UP=0,c.ROUND_DOWN=1,c.ROUND_CEIL=2,c.ROUND_FLOOR=3,c.ROUND_HALF_UP=4,c.ROUND_HALF_DOWN=5,c.ROUND_HALF_EVEN=6,c.ROUND_HALF_CEIL=7,c.ROUND_HALF_FLOOR=8,c.EUCLID=9,c.config=c.set=function(p){var U,F;if(p!=null)if(typeof p=="object"){if(p.hasOwnProperty(U="DECIMAL_PLACES"))F=p[U],v0(F,0,Q0,U),g=F;if(p.hasOwnProperty(U="ROUNDING_MODE"))F=p[U],v0(F,0,8,U),l=F;if(p.hasOwnProperty(U="EXPONENTIAL_AT"))if(F=p[U],F&&F.pop)v0(F[0],-Q0,0,U),v0(F[1],0,Q0,U),x=F[0],w=F[1];else v0(F,-Q0,Q0,U),x=-(w=F<0?-F:F);if(p.hasOwnProperty(U="RANGE"))if(F=p[U],F&&F.pop)v0(F[0],-Q0,-1,U),v0(F[1],1,Q0,U),z=F[0],_=F[1];else if(v0(F,-Q0,Q0,U),F)z=-(_=F<0?-F:F);else throw Error(I0+U+" cannot be zero: "+F);if(p.hasOwnProperty(U="CRYPTO"))if(F=p[U],F===!!F)if(F)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))n=F;else throw n=!F,Error(I0+"crypto unavailable");else n=F;else throw Error(I0+U+" not true or false: "+F);if(p.hasOwnProperty(U="MODULO_MODE"))F=p[U],v0(F,0,9,U),Y=F;if(p.hasOwnProperty(U="POW_PRECISION"))F=p[U],v0(F,0,Q0,U),H=F;if(p.hasOwnProperty(U="FORMAT"))if(F=p[U],typeof F=="object")$=F;else throw Error(I0+U+" not an object: "+F);if(p.hasOwnProperty(U="ALPHABET"))if(F=p[U],typeof F=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(F))Z=F.slice(0,10)=="0123456789",I=F;else throw Error(I0+U+" invalid: "+F)}else throw Error(I0+"Object expected: "+p);return{DECIMAL_PLACES:g,ROUNDING_MODE:l,EXPONENTIAL_AT:[x,w],RANGE:[z,_],CRYPTO:n,MODULO_MODE:Y,POW_PRECISION:H,FORMAT:$,ALPHABET:I}},c.isBigNumber=function(p){if(!p||p._isBigNumber!==!0)return!1;if(!c.DEBUG)return!0;var U,F,L=p.c,j=p.e,C=p.s;o:if({}.toString.call(L)=="[object Array]"){if((C===1||C===-1)&&j>=-Q0&&j<=Q0&&j===F0(j)){if(L[0]===0){if(j===0&&L.length===1)return!0;break o}if(U=(j+1)%r0,U<1)U+=r0;if(String(L[0]).length==U){for(U=0;U<L.length;U++)if(F=L[U],F<0||F>=s0||F!==F0(F))break o;if(F!==0)return!0}}}else if(L===null&&j===null&&(C===null||C===1||C===-1))return!0;throw Error(I0+"Invalid BigNumber: "+p)},c.maximum=c.max=function(){return k(arguments,-1)},c.minimum=c.min=function(){return k(arguments,1)},c.random=function(){var p=9007199254740992,U=Math.random()*p&2097151?function(){return F0(Math.random()*p)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(F){var L,j,C,T,K,Q=0,W=[],b=new c(a);if(F==null)F=g;else v0(F,0,Q0);if(T=mo(F/r0),n)if(crypto.getRandomValues){L=crypto.getRandomValues(new Uint32Array(T*=2));for(;Q<T;)if(K=L[Q]*131072+(L[Q+1]>>>11),K>=9000000000000000)j=crypto.getRandomValues(new Uint32Array(2)),L[Q]=j[0],L[Q+1]=j[1];else W.push(K%100000000000000),Q+=2;Q=T/2}else if(crypto.randomBytes){L=crypto.randomBytes(T*=7);for(;Q<T;)if(K=(L[Q]&31)*281474976710656+L[Q+1]*1099511627776+L[Q+2]*4294967296+L[Q+3]*16777216+(L[Q+4]<<16)+(L[Q+5]<<8)+L[Q+6],K>=9000000000000000)crypto.randomBytes(7).copy(L,Q);else W.push(K%100000000000000),Q+=7;Q=T/7}else throw n=!1,Error(I0+"crypto unavailable");if(!n){for(;Q<T;)if(K=U(),K<9000000000000000)W[Q++]=K%100000000000000}if(T=W[--Q],F%=r0,T&&F)K=o2[r0-F],W[Q]=F0(T/K)*K;for(;W[Q]===0;W.pop(),Q--);if(Q<0)W=[C=0];else{for(C=-1;W[0]===0;W.splice(0,1),C-=r0);for(Q=1,K=W[0];K>=10;K/=10,Q++);if(Q<r0)C-=r0-Q}return b.e=C,b.c=W,b}}(),c.sum=function(){var p=1,U=arguments,F=new c(U[0]);for(;p<U.length;)F=F.plus(U[p++]);return F},i=function(){var p="0123456789";function U(F,L,j,C){var T,K=[0],Q,W=0,b=F.length;for(;W<b;){for(Q=K.length;Q--;K[Q]*=L);K[0]+=C.indexOf(F.charAt(W++));for(T=0;T<K.length;T++)if(K[T]>j-1){if(K[T+1]==null)K[T+1]=0;K[T+1]+=K[T]/j|0,K[T]%=j}}return K.reverse()}return function(F,L,j,C,T){var K,Q,W,b,J,R,G,D,t=F.indexOf("."),E=g,m=l;if(t>=0)b=H,H=0,F=F.replace(".",""),D=new c(L),R=D.pow(F.length-t),H=b,D.c=U(m0(V0(R.c),R.e,"0"),10,j,p),D.e=D.c.length;G=U(F,L,j,T?(K=I,p):(K=p,I)),W=b=G.length;for(;G[--b]==0;G.pop());if(!G[0])return K.charAt(0);if(t<0)--W;else R.c=G,R.e=W,R.s=C,R=d(R,D,E,m,j),G=R.c,J=R.r,W=R.e;if(Q=W+E+1,t=G[Q],b=j/2,J=J||Q<0||G[Q+1]!=null,J=m<4?(t!=null||J)&&(m==0||m==(R.s<0?3:2)):t>b||t==b&&(m==4||J||m==6&&G[Q-1]&1||m==(R.s<0?8:7)),Q<1||!G[0])F=J?m0(K.charAt(1),-E,K.charAt(0)):K.charAt(0);else{if(G.length=Q,J){for(--j;++G[--Q]>j;)if(G[Q]=0,!Q)++W,G=[1].concat(G)}for(b=G.length;!G[--b];);for(t=0,F="";t<=b;F+=K.charAt(G[t++]));F=m0(F,W,K.charAt(0))}return F}}(),d=function(){function p(L,j,C){var T,K,Q,W,b=0,J=L.length,R=j%x1,G=j/x1|0;for(L=L.slice();J--;)Q=L[J]%x1,W=L[J]/x1|0,T=G*Q+W*R,K=R*Q+T%x1*x1+b,b=(K/C|0)+(T/x1|0)+G*W,L[J]=K%C;if(b)L=[b].concat(L);return L}function U(L,j,C,T){var K,Q;if(C!=T)Q=C>T?1:-1;else for(K=Q=0;K<C;K++)if(L[K]!=j[K]){Q=L[K]>j[K]?1:-1;break}return Q}function F(L,j,C,T){var K=0;for(;C--;)L[C]-=K,K=L[C]<j[C]?1:0,L[C]=K*T+L[C]-j[C];for(;!L[0]&&L.length>1;L.splice(0,1));}return function(L,j,C,T,K){var Q,W,b,J,R,G,D,t,E,m,d0,g0,Z0,W0,J0,f0,$0,h0=L.s==j.s?1:-1,M=L.c,x0=j.c;if(!M||!M[0]||!x0||!x0[0])return new c(!L.s||!j.s||(M?x0&&M[0]==x0[0]:!x0)?NaN:M&&M[0]==0||!x0?h0*0:h0/0);if(t=new c(h0),E=t.c=[],W=L.e-j.e,h0=C+W+1,!K)K=s0,W=j0(L.e/r0)-j0(j.e/r0),h0=h0/r0|0;for(b=0;x0[b]==(M[b]||0);b++);if(x0[b]>(M[b]||0))W--;if(h0<0)E.push(1),J=!0;else{if(W0=M.length,f0=x0.length,b=0,h0+=2,R=F0(K/(x0[0]+1)),R>1)x0=p(x0,R,K),M=p(M,R,K),f0=x0.length,W0=M.length;Z0=f0,m=M.slice(0,f0),d0=m.length;for(;d0<f0;m[d0++]=0);if($0=x0.slice(),$0=[0].concat($0),J0=x0[0],x0[1]>=K/2)J0++;do{if(R=0,Q=U(x0,m,f0,d0),Q<0){if(g0=m[0],f0!=d0)g0=g0*K+(m[1]||0);if(R=F0(g0/J0),R>1){if(R>=K)R=K-1;G=p(x0,R,K),D=G.length,d0=m.length;while(U(G,m,D,d0)==1)R--,F(G,f0<D?$0:x0,D,K),D=G.length,Q=1}else{if(R==0)Q=R=1;G=x0.slice(),D=G.length}if(D<d0)G=[0].concat(G);if(F(m,G,d0,K),d0=m.length,Q==-1)while(U(x0,m,f0,d0)<1)R++,F(m,f0<d0?$0:x0,d0,K),d0=m.length}else if(Q===0)R++,m=[0];if(E[b++]=R,m[0])m[d0++]=M[Z0]||0;else m=[M[Z0]],d0=1}while((Z0++<W0||m[0]!=null)&&h0--);if(J=m[0]!=null,!E[0])E.splice(0,1)}if(K==s0){for(b=1,h0=E[0];h0>=10;h0/=10,b++);V(t,C+(t.e=b+W*r0-1)+1,T,J)}else t.e=W,t.r=+J;return t}}();function v(p,U,F,L){var j,C,T,K,Q;if(F==null)F=l;else v0(F,0,8);if(!p.c)return p.toString();if(j=p.c[0],T=p.e,U==null)Q=V0(p.c),Q=L==1||L==2&&(T<=x||T>=w)?lo(Q,T):m0(Q,T,"0");else if(p=V(new c(p),U,F),C=p.e,Q=V0(p.c),K=Q.length,L==1||L==2&&(U<=C||C<=x)){for(;K<U;Q+="0",K++);Q=lo(Q,C)}else if(U-=T,Q=m0(Q,C,"0"),C+1>K){if(--U>0)for(Q+=".";U--;Q+="0");}else if(U+=C-K,U>0){if(C+1==K)Q+=".";for(;U--;Q+="0");}return p.s<0&&j?"-"+Q:Q}function k(p,U){var F,L,j=1,C=new c(p[0]);for(;j<p.length;j++)if(L=new c(p[j]),!L.s||(F=H1(C,L))===U||F===0&&C.s===U)C=L;return C}function X(p,U,F){var L=1,j=U.length;for(;!U[--j];U.pop());for(j=U[0];j>=10;j/=10,L++);if((F=L+F*r0-1)>_)p.c=p.e=null;else if(F<z)p.c=[p.e=0];else p.e=F,p.c=U;return p}r=function(){var p=/^(-?)0([xbo])(?=\w[\w.]*$)/i,U=/^([^.]+)\.$/,F=/^\.([^.]+)$/,L=/^-?(Infinity|NaN)$/,j=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(C,T,K,Q){var W,b=K?T:T.replace(j,"");if(L.test(b))C.s=isNaN(b)?null:b<0?-1:1;else{if(!K){if(b=b.replace(p,function(J,R,G){return W=(G=G.toLowerCase())=="x"?16:G=="b"?2:8,!Q||Q==W?R:J}),Q)W=Q,b=b.replace(U,"$1").replace(F,"0.$1");if(T!=b)return new c(b,W)}if(c.DEBUG)throw Error(I0+"Not a"+(Q?" base "+Q:"")+" number: "+T);C.s=null}C.c=C.e=null}}();function V(p,U,F,L){var j,C,T,K,Q,W,b,J=p.c,R=o2;if(J){o:{for(j=1,K=J[0];K>=10;K/=10,j++);if(C=U-j,C<0)C+=r0,T=U,Q=J[W=0],b=F0(Q/R[j-T-1]%10);else if(W=mo((C+1)/r0),W>=J.length)if(L){for(;J.length<=W;J.push(0));Q=b=0,j=1,C%=r0,T=C-r0+1}else break o;else{Q=K=J[W];for(j=1;K>=10;K/=10,j++);C%=r0,T=C-r0+j,b=T<0?0:F0(Q/R[j-T-1]%10)}if(L=L||U<0||J[W+1]!=null||(T<0?Q:Q%R[j-T-1]),L=F<4?(b||L)&&(F==0||F==(p.s<0?3:2)):b>5||b==5&&(F==4||L||F==6&&(C>0?T>0?Q/R[j-T]:0:J[W-1])%10&1||F==(p.s<0?8:7)),U<1||!J[0]){if(J.length=0,L)U-=p.e+1,J[0]=R[(r0-U%r0)%r0],p.e=-U||0;else J[0]=p.e=0;return p}if(C==0)J.length=W,K=1,W--;else J.length=W+1,K=R[r0-C],J[W]=T>0?F0(Q/R[j-T]%R[T])*K:0;if(L)for(;;)if(W==0){for(C=1,T=J[0];T>=10;T/=10,C++);T=J[0]+=K;for(K=1;T>=10;T/=10,K++);if(C!=K){if(p.e++,J[0]==s0)J[0]=1}break}else{if(J[W]+=K,J[W]!=s0)break;J[W--]=0,K=1}for(C=J.length;J[--C]===0;J.pop());}if(p.e>_)p.c=p.e=null;else if(p.e<z)p.c=[p.e=0]}return p}function u(p){var U,F=p.e;if(F===null)return p.toString();return U=V0(p.c),U=F<=x||F>=w?lo(U,F):m0(U,F,"0"),p.s<0?"-"+U:U}if(h.absoluteValue=h.abs=function(){var p=new c(this);if(p.s<0)p.s=1;return p},h.comparedTo=function(p,U){return H1(this,new c(p,U))},h.decimalPlaces=h.dp=function(p,U){var F,L,j,C=this;if(p!=null){if(v0(p,0,Q0),U==null)U=l;else v0(U,0,8);return V(new c(C),p+C.e+1,U)}if(!(F=C.c))return null;if(L=((j=F.length-1)-j0(this.e/r0))*r0,j=F[j])for(;j%10==0;j/=10,L--);if(L<0)L=0;return L},h.dividedBy=h.div=function(p,U){return d(this,new c(p,U),g,l)},h.dividedToIntegerBy=h.idiv=function(p,U){return d(this,new c(p,U),0,1)},h.exponentiatedBy=h.pow=function(p,U){var F,L,j,C,T,K,Q,W,b,J=this;if(p=new c(p),p.c&&!p.isInteger())throw Error(I0+"Exponent not an integer: "+u(p));if(U!=null)U=new c(U);if(K=p.e>14,!J.c||!J.c[0]||J.c[0]==1&&!J.e&&J.c.length==1||!p.c||!p.c[0])return b=new c(Math.pow(+u(J),K?p.s*(2-go(p)):+u(p))),U?b.mod(U):b;if(Q=p.s<0,U){if(U.c?!U.c[0]:!U.s)return new c(NaN);if(L=!Q&&J.isInteger()&&U.isInteger(),L)J=J.mod(U)}else if(p.e>9&&(J.e>0||J.e<-1||(J.e==0?J.c[0]>1||K&&J.c[1]>=240000000:J.c[0]<80000000000000||K&&J.c[0]<=99999750000000))){if(C=J.s<0&&go(p)?-0:0,J.e>-1)C=1/C;return new c(Q?1/C:C)}else if(H)C=mo(H/r0+2);if(K){if(F=new c(0.5),Q)p.s=1;W=go(p)}else j=Math.abs(+u(p)),W=j%2;b=new c(a);for(;;){if(W){if(b=b.times(J),!b.c)break;if(C){if(b.c.length>C)b.c.length=C}else if(L)b=b.mod(U)}if(j){if(j=F0(j/2),j===0)break;W=j%2}else if(p=p.times(F),V(p,p.e+1,1),p.e>14)W=go(p);else{if(j=+u(p),j===0)break;W=j%2}if(J=J.times(J),C){if(J.c&&J.c.length>C)J.c.length=C}else if(L)J=J.mod(U)}if(L)return b;if(Q)b=a.div(b);return U?b.mod(U):C?V(b,H,l,T):b},h.integerValue=function(p){var U=new c(this);if(p==null)p=l;else v0(p,0,8);return V(U,U.e+1,p)},h.isEqualTo=h.eq=function(p,U){return H1(this,new c(p,U))===0},h.isFinite=function(){return!!this.c},h.isGreaterThan=h.gt=function(p,U){return H1(this,new c(p,U))>0},h.isGreaterThanOrEqualTo=h.gte=function(p,U){return(U=H1(this,new c(p,U)))===1||U===0},h.isInteger=function(){return!!this.c&&j0(this.e/r0)>this.c.length-2},h.isLessThan=h.lt=function(p,U){return H1(this,new c(p,U))<0},h.isLessThanOrEqualTo=h.lte=function(p,U){return(U=H1(this,new c(p,U)))===-1||U===0},h.isNaN=function(){return!this.s},h.isNegative=function(){return this.s<0},h.isPositive=function(){return this.s>0},h.isZero=function(){return!!this.c&&this.c[0]==0},h.minus=function(p,U){var F,L,j,C,T=this,K=T.s;if(p=new c(p,U),U=p.s,!K||!U)return new c(NaN);if(K!=U)return p.s=-U,T.plus(p);var Q=T.e/r0,W=p.e/r0,b=T.c,J=p.c;if(!Q||!W){if(!b||!J)return b?(p.s=-U,p):new c(J?T:NaN);if(!b[0]||!J[0])return J[0]?(p.s=-U,p):new c(b[0]?T:l==3?-0:0)}if(Q=j0(Q),W=j0(W),b=b.slice(),K=Q-W){if(C=K<0)K=-K,j=b;else W=Q,j=J;j.reverse();for(U=K;U--;j.push(0));j.reverse()}else{L=(C=(K=b.length)<(U=J.length))?K:U;for(K=U=0;U<L;U++)if(b[U]!=J[U]){C=b[U]<J[U];break}}if(C)j=b,b=J,J=j,p.s=-p.s;if(U=(L=J.length)-(F=b.length),U>0)for(;U--;b[F++]=0);U=s0-1;for(;L>K;){if(b[--L]<J[L]){for(F=L;F&&!b[--F];b[F]=U);--b[F],b[L]+=s0}b[L]-=J[L]}for(;b[0]==0;b.splice(0,1),--W);if(!b[0])return p.s=l==3?-1:1,p.c=[p.e=0],p;return X(p,b,W)},h.modulo=h.mod=function(p,U){var F,L,j=this;if(p=new c(p,U),!j.c||!p.s||p.c&&!p.c[0])return new c(NaN);else if(!p.c||j.c&&!j.c[0])return new c(j);if(Y==9)L=p.s,p.s=1,F=d(j,p,0,3),p.s=L,F.s*=L;else F=d(j,p,0,Y);if(p=j.minus(F.times(p)),!p.c[0]&&Y==1)p.s=j.s;return p},h.multipliedBy=h.times=function(p,U){var F,L,j,C,T,K,Q,W,b,J,R,G,D,t,E,m=this,d0=m.c,g0=(p=new c(p,U)).c;if(!d0||!g0||!d0[0]||!g0[0]){if(!m.s||!p.s||d0&&!d0[0]&&!g0||g0&&!g0[0]&&!d0)p.c=p.e=p.s=null;else if(p.s*=m.s,!d0||!g0)p.c=p.e=null;else p.c=[0],p.e=0;return p}if(L=j0(m.e/r0)+j0(p.e/r0),p.s*=m.s,Q=d0.length,J=g0.length,Q<J)D=d0,d0=g0,g0=D,j=Q,Q=J,J=j;for(j=Q+J,D=[];j--;D.push(0));t=s0,E=x1;for(j=J;--j>=0;){F=0,R=g0[j]%E,G=g0[j]/E|0;for(T=Q,C=j+T;C>j;)W=d0[--T]%E,b=d0[T]/E|0,K=G*W+b*R,W=R*W+K%E*E+D[C]+F,F=(W/t|0)+(K/E|0)+G*b,D[C--]=W%t;D[C]=F}if(F)++L;else D.splice(0,1);return X(p,D,L)},h.negated=function(){var p=new c(this);return p.s=-p.s||null,p},h.plus=function(p,U){var F,L=this,j=L.s;if(p=new c(p,U),U=p.s,!j||!U)return new c(NaN);if(j!=U)return p.s=-U,L.minus(p);var C=L.e/r0,T=p.e/r0,K=L.c,Q=p.c;if(!C||!T){if(!K||!Q)return new c(j/0);if(!K[0]||!Q[0])return Q[0]?p:new c(K[0]?L:j*0)}if(C=j0(C),T=j0(T),K=K.slice(),j=C-T){if(j>0)T=C,F=Q;else j=-j,F=K;F.reverse();for(;j--;F.push(0));F.reverse()}if(j=K.length,U=Q.length,j-U<0)F=Q,Q=K,K=F,U=j;for(j=0;U;)j=(K[--U]=K[U]+Q[U]+j)/s0|0,K[U]=s0===K[U]?0:K[U]%s0;if(j)K=[j].concat(K),++T;return X(p,K,T)},h.precision=h.sd=function(p,U){var F,L,j,C=this;if(p!=null&&p!==!!p){if(v0(p,1,Q0),U==null)U=l;else v0(U,0,8);return V(new c(C),p,U)}if(!(F=C.c))return null;if(j=F.length-1,L=j*r0+1,j=F[j]){for(;j%10==0;j/=10,L--);for(j=F[0];j>=10;j/=10,L++);}if(p&&C.e+1>L)L=C.e+1;return L},h.shiftedBy=function(p){return v0(p,-eo,eo),this.times("1e"+p)},h.squareRoot=h.sqrt=function(){var p,U,F,L,j,C=this,T=C.c,K=C.s,Q=C.e,W=g+4,b=new c("0.5");if(K!==1||!T||!T[0])return new c(!K||K<0&&(!T||T[0])?NaN:T?C:1/0);if(K=Math.sqrt(+u(C)),K==0||K==1/0){if(U=V0(T),(U.length+Q)%2==0)U+="0";if(K=Math.sqrt(+U),Q=j0((Q+1)/2)-(Q<0||Q%2),K==1/0)U="5e"+Q;else U=K.toExponential(),U=U.slice(0,U.indexOf("e")+1)+Q;F=new c(U)}else F=new c(K+"");if(F.c[0]){if(Q=F.e,K=Q+W,K<3)K=0;for(;;)if(j=F,F=b.times(j.plus(d(C,j,W,1))),V0(j.c).slice(0,K)===(U=V0(F.c)).slice(0,K)){if(F.e<Q)--K;if(U=U.slice(K-3,K+1),U=="9999"||!L&&U=="4999"){if(!L){if(V(j,j.e+g+2,0),j.times(j).eq(C)){F=j;break}}W+=4,K+=4,L=1}else{if(!+U||!+U.slice(1)&&U.charAt(0)=="5")V(F,F.e+g+2,1),p=!F.times(F).eq(C);break}}}return V(F,F.e+g+1,l,p)},h.toExponential=function(p,U){if(p!=null)v0(p,0,Q0),p++;return v(this,p,U,1)},h.toFixed=function(p,U){if(p!=null)v0(p,0,Q0),p=p+this.e+1;return v(this,p,U)},h.toFormat=function(p,U,F){var L,j=this;if(F==null)if(p!=null&&U&&typeof U=="object")F=U,U=null;else if(p&&typeof p=="object")F=p,p=U=null;else F=$;else if(typeof F!="object")throw Error(I0+"Argument not an object: "+F);if(L=j.toFixed(p,U),j.c){var C,T=L.split("."),K=+F.groupSize,Q=+F.secondaryGroupSize,W=F.groupSeparator||"",b=T[0],J=T[1],R=j.s<0,G=R?b.slice(1):b,D=G.length;if(Q)C=K,K=Q,Q=C,D-=C;if(K>0&&D>0){C=D%K||K,b=G.substr(0,C);for(;C<D;C+=K)b+=W+G.substr(C,K);if(Q>0)b+=W+G.slice(C);if(R)b="-"+b}L=J?b+(F.decimalSeparator||"")+((Q=+F.fractionGroupSize)?J.replace(new RegExp("\\d{"+Q+"}\\B","g"),"$&"+(F.fractionGroupSeparator||"")):J):b}return(F.prefix||"")+L+(F.suffix||"")},h.toFraction=function(p){var U,F,L,j,C,T,K,Q,W,b,J,R,G=this,D=G.c;if(p!=null){if(K=new c(p),!K.isInteger()&&(K.c||K.s!==1)||K.lt(a))throw Error(I0+"Argument "+(K.isInteger()?"out of range: ":"not an integer: ")+u(K))}if(!D)return new c(G);U=new c(a),W=F=new c(a),L=Q=new c(a),R=V0(D),C=U.e=R.length-G.e-1,U.c[0]=o2[(T=C%r0)<0?r0+T:T],p=!p||K.comparedTo(U)>0?C>0?U:W:K,T=_,_=1/0,K=new c(R),Q.c[0]=0;for(;;){if(b=d(K,U,0,1),j=F.plus(b.times(L)),j.comparedTo(p)==1)break;F=L,L=j,W=Q.plus(b.times(j=W)),Q=j,U=K.minus(b.times(j=U)),K=j}return j=d(p.minus(F),L,0,1),Q=Q.plus(j.times(W)),F=F.plus(j.times(L)),Q.s=W.s=G.s,C=C*2,J=d(W,L,C,l).minus(G).abs().comparedTo(d(Q,F,C,l).minus(G).abs())<1?[W,L]:[Q,F],_=T,J},h.toNumber=function(){return+u(this)},h.toPrecision=function(p,U){if(p!=null)v0(p,1,Q0);return v(this,p,U,2)},h.toString=function(p){var U,F=this,L=F.s,j=F.e;if(j===null)if(L){if(U="Infinity",L<0)U="-"+U}else U="NaN";else{if(p==null)U=j<=x||j>=w?lo(V0(F.c),j):m0(V0(F.c),j,"0");else if(p===10&&Z)F=V(new c(F),g+j+1,l),U=m0(V0(F.c),F.e,"0");else v0(p,2,I.length,"Base"),U=i(m0(V0(F.c),j,"0"),10,p,L,!0);if(L<0&&F.c[0])U="-"+U}return U},h.valueOf=h.toJSON=function(){return u(this)},h._isBigNumber=!0,h[Symbol.toStringTag]="BigNumber",h[Symbol.for("nodejs.util.inspect.custom")]=h.valueOf,o!=null)c.set(o);return c}function j0(o){var d=o|0;return o>0||o===d?d:d-1}function V0(o){var d,i,r=1,h=o.length,a=o[0]+"";for(;r<h;){d=o[r++]+"",i=r0-d.length;for(;i--;d="0"+d);a+=d}for(h=a.length;a.charCodeAt(--h)===48;);return a.slice(0,h+1||1)}function H1(o,d){var i,r,h=o.c,a=d.c,g=o.s,l=d.s,x=o.e,w=d.e;if(!g||!l)return null;if(i=h&&!h[0],r=a&&!a[0],i||r)return i?r?0:-l:g;if(g!=l)return g;if(i=g<0,r=x==w,!h||!a)return r?0:!h^i?1:-1;if(!r)return x>w^i?1:-1;l=(x=h.length)<(w=a.length)?x:w;for(g=0;g<l;g++)if(h[g]!=a[g])return h[g]>a[g]^i?1:-1;return x==w?0:x>w^i?1:-1}function v0(o,d,i,r){if(o<d||o>i||o!==F0(o))throw Error(I0+(r||"Argument")+(typeof o=="number"?o<d||o>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(o))}function go(o){var d=o.c.length-1;return j0(o.e/r0)==d&&o.c[d]%2!=0}function lo(o,d){return(o.length>1?o.charAt(0)+"."+o.slice(1):o)+(d<0?"e":"e+")+d}function m0(o,d,i){var r,h;if(d<0){for(h=i+".";++d;h+=i);o=h+o}else if(r=o.length,++d>r){for(h=i,d-=r;--d;h+=i);o+=h}else if(d<r)o=o.slice(0,d)+"."+o.slice(d);return o}var n3=Fd(),S=n3;class S0{host;handlers=new Map;isFocusedOnInput=!1;repeating=null;repeatTimer=null;DEFAULT_REPEAT_INTERVAL=200;constructor(o,d){if(this.host=o,o.addController(this),d)d.forEach(({key:i,callback:r,options:h})=>{this.register(i,r,h)})}hostConnected(){window.addEventListener("keydown",this._onKeyDown),window.addEventListener("keyup",this._onKeyUp),window.addEventListener("focusin",this._onFocusIn),window.addEventListener("focusout",this._onFocusOut)}hostDisconnected(){window.removeEventListener("keydown",this._onKeyDown),window.removeEventListener("keyup",this._onKeyUp),window.removeEventListener("focusin",this._onFocusIn),window.removeEventListener("focusout",this._onFocusOut),this._clearRepeatTimer()}_onFocusIn=(o)=>{let d=o.composedPath()[0];if(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)this.isFocusedOnInput=!0,this._clearRepeatTimer()};_onFocusOut=(o)=>{let d=o.composedPath()[0];if(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)this.isFocusedOnInput=!1};_clearRepeatTimer(){if(this.repeatTimer)clearTimeout(this.repeatTimer),this.repeatTimer=null;this.repeating=null}shouldSkipAction(){if(this.isFocusedOnInput)return!0;if(this.checkForOpenModals())return!0;return!1}checkForOpenModals(){let o=document.querySelector("origami-game-provider-wrapper");if(!o?.shadowRoot)return!1;let d=o.shadowRoot.querySelector("*");if(!d)return!1;let i=d.assignedNodes();for(let r of i){let h=r?.shadowRoot;if(!h)return!1;let a=h.querySelector("origami-game-layout");if(!a?.shadowRoot)return!1;if(!!a.shadowRoot.querySelector("origami-responsive-modal[open]"))return!0}return!1}_onKeyDown=(o)=>{if(this.shouldSkipAction())return;let d=o.key.toLowerCase(),i=this.handlers.get(d);if(i){let{callback:r,options:h}=i;if(h.disabled?.()??!1)return;if(o.preventDefault(),o.repeat){if(h.repeat&&!this.repeating)this.repeating=d,this._startRepeating(r,h);return}r(o)}};_onKeyUp=(o)=>{if(this.shouldSkipAction())return;let d=o.key.toLowerCase();if(this.repeating===d)this._clearRepeatTimer()};_startRepeating(o,d){let i=d.repeatInterval??this.DEFAULT_REPEAT_INTERVAL,r=()=>{if(!this.repeating)return;if(!(d.disabled?.()??!1)&&!this.shouldSkipAction())o();if(this.repeating)this.repeatTimer=window.setTimeout(r,i)};this.repeatTimer=window.setTimeout(r,i)}register(o,d,i={}){let r=o.toLowerCase(),h={repeat:!1,repeatInterval:this.DEFAULT_REPEAT_INTERVAL,disabled:()=>!1,...i};this.handlers.set(r,{callback:d,options:h})}}class d2 extends B{static styles=[N,A`
|
|
1417
|
+
`}}b([q({type:String})],to.prototype,"label",void 0),b([q({type:String})],to.prototype,"currency",void 0),b([q({type:String})],to.prototype,"errorMessage",void 0),b([q({type:String})],to.prototype,"fiatCurrency",void 0),b([q({type:String})],to.prototype,"value",void 0),b([q({type:String})],to.prototype,"rightLabel",void 0),b([q({type:String})],to.prototype,"suffix",void 0),b([q({type:String})],to.prototype,"placeholder",void 0),b([q({type:Boolean})],to.prototype,"disabled",void 0),b([q({type:Boolean})],to.prototype,"readonly",void 0),b([q({type:Boolean})],to.prototype,"disableInput",void 0),b([q({type:Boolean})],to.prototype,"cursorNotAllowed",void 0),b([q({type:String})],to.prototype,"bgColor",void 0),b([q({type:String})],to.prototype,"testId",void 0),b([q({type:String})],to.prototype,"tooltip",void 0),b([q({type:Boolean})],to.prototype,"maxBetEnabled",void 0),b([q({type:Boolean})],to.prototype,"dimmed",void 0),b([q({type:Number})],to.prototype,"maxPayoutUSD",void 0),b([q({type:String})],to.prototype,"variant",void 0),b([q({type:Boolean})],to.prototype,"required",void 0),b([q({type:Boolean})],to.prototype,"hideCurrencyIcon",void 0),b([q({type:Boolean})],to.prototype,"displayInFiat",void 0),b([w0("origami-input")],to.prototype,"input",void 0),to=b([P("origami-raw-currency-input")],to);var c3=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mo=Math.ceil,F0=Math.floor,I0="[BigNumber Error] ",Vd=I0+"Number primitive has more than 15 significant digits: ",S0=100000000000000,r0=14,eo=9007199254740991,o2=[1,10,100,1000,1e4,1e5,1e6,1e7,1e8,1e9,10000000000,100000000000,1000000000000,10000000000000],x1=1e7,Q0=1e9;function Fd(o){var d,i,r,h=c.prototype={constructor:c,toString:null,valueOf:null},a=new c(1),g=20,l=4,x=-7,f=21,n=-1e7,_=1e7,v=!1,Y=1,H=0,$={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},I="0123456789abcdefghijklmnopqrstuvwxyz",Z=!0;function c(p,U){var F,L,j,C,T,K,Q,W,w=this;if(!(w instanceof c))return new c(p,U);if(U==null){if(p&&p._isBigNumber===!0){if(w.s=p.s,!p.c||p.e>_)w.c=w.e=null;else if(p.e<n)w.c=[w.e=0];else w.e=p.e,w.c=p.c.slice();return}if((K=typeof p=="number")&&p*0==0){if(w.s=1/p<0?(p=-p,-1):1,p===~~p){for(C=0,T=p;T>=10;T/=10,C++);if(C>_)w.c=w.e=null;else w.e=C,w.c=[p];return}W=String(p)}else{if(!c3.test(W=String(p)))return r(w,W,K);w.s=W.charCodeAt(0)==45?(W=W.slice(1),-1):1}if((C=W.indexOf("."))>-1)W=W.replace(".","");if((T=W.search(/e/i))>0){if(C<0)C=T;C+=+W.slice(T+1),W=W.substring(0,T)}else if(C<0)C=W.length}else{if(z0(U,2,I.length,"Base"),U==10&&Z)return w=new c(p),V(w,g+w.e+1,l);if(W=String(p),K=typeof p=="number"){if(p*0!=0)return r(w,W,K,U);if(w.s=1/p<0?(W=W.slice(1),-1):1,c.DEBUG&&W.replace(/^0\.0*|\./,"").length>15)throw Error(Vd+p)}else w.s=W.charCodeAt(0)===45?(W=W.slice(1),-1):1;F=I.slice(0,U),C=T=0;for(Q=W.length;T<Q;T++)if(F.indexOf(L=W.charAt(T))<0){if(L=="."){if(T>C){C=Q;continue}}else if(!j){if(W==W.toUpperCase()&&(W=W.toLowerCase())||W==W.toLowerCase()&&(W=W.toUpperCase())){j=!0,T=-1,C=0;continue}}return r(w,String(p),K,U)}if(K=!1,W=i(W,U,10,w.s),(C=W.indexOf("."))>-1)W=W.replace(".","");else C=W.length}for(T=0;W.charCodeAt(T)===48;T++);for(Q=W.length;W.charCodeAt(--Q)===48;);if(W=W.slice(T,++Q)){if(Q-=T,K&&c.DEBUG&&Q>15&&(p>eo||p!==F0(p)))throw Error(Vd+w.s*p);if((C=C-T-1)>_)w.c=w.e=null;else if(C<n)w.c=[w.e=0];else{if(w.e=C,w.c=[],T=(C+1)%r0,C<0)T+=r0;if(T<Q){if(T)w.c.push(+W.slice(0,T));for(Q-=r0;T<Q;)w.c.push(+W.slice(T,T+=r0));T=r0-(W=W.slice(T)).length}else T-=Q;for(;T--;W+="0");w.c.push(+W)}}else w.c=[w.e=0]}c.clone=Fd,c.ROUND_UP=0,c.ROUND_DOWN=1,c.ROUND_CEIL=2,c.ROUND_FLOOR=3,c.ROUND_HALF_UP=4,c.ROUND_HALF_DOWN=5,c.ROUND_HALF_EVEN=6,c.ROUND_HALF_CEIL=7,c.ROUND_HALF_FLOOR=8,c.EUCLID=9,c.config=c.set=function(p){var U,F;if(p!=null)if(typeof p=="object"){if(p.hasOwnProperty(U="DECIMAL_PLACES"))F=p[U],z0(F,0,Q0,U),g=F;if(p.hasOwnProperty(U="ROUNDING_MODE"))F=p[U],z0(F,0,8,U),l=F;if(p.hasOwnProperty(U="EXPONENTIAL_AT"))if(F=p[U],F&&F.pop)z0(F[0],-Q0,0,U),z0(F[1],0,Q0,U),x=F[0],f=F[1];else z0(F,-Q0,Q0,U),x=-(f=F<0?-F:F);if(p.hasOwnProperty(U="RANGE"))if(F=p[U],F&&F.pop)z0(F[0],-Q0,-1,U),z0(F[1],1,Q0,U),n=F[0],_=F[1];else if(z0(F,-Q0,Q0,U),F)n=-(_=F<0?-F:F);else throw Error(I0+U+" cannot be zero: "+F);if(p.hasOwnProperty(U="CRYPTO"))if(F=p[U],F===!!F)if(F)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))v=F;else throw v=!F,Error(I0+"crypto unavailable");else v=F;else throw Error(I0+U+" not true or false: "+F);if(p.hasOwnProperty(U="MODULO_MODE"))F=p[U],z0(F,0,9,U),Y=F;if(p.hasOwnProperty(U="POW_PRECISION"))F=p[U],z0(F,0,Q0,U),H=F;if(p.hasOwnProperty(U="FORMAT"))if(F=p[U],typeof F=="object")$=F;else throw Error(I0+U+" not an object: "+F);if(p.hasOwnProperty(U="ALPHABET"))if(F=p[U],typeof F=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(F))Z=F.slice(0,10)=="0123456789",I=F;else throw Error(I0+U+" invalid: "+F)}else throw Error(I0+"Object expected: "+p);return{DECIMAL_PLACES:g,ROUNDING_MODE:l,EXPONENTIAL_AT:[x,f],RANGE:[n,_],CRYPTO:v,MODULO_MODE:Y,POW_PRECISION:H,FORMAT:$,ALPHABET:I}},c.isBigNumber=function(p){if(!p||p._isBigNumber!==!0)return!1;if(!c.DEBUG)return!0;var U,F,L=p.c,j=p.e,C=p.s;o:if({}.toString.call(L)=="[object Array]"){if((C===1||C===-1)&&j>=-Q0&&j<=Q0&&j===F0(j)){if(L[0]===0){if(j===0&&L.length===1)return!0;break o}if(U=(j+1)%r0,U<1)U+=r0;if(String(L[0]).length==U){for(U=0;U<L.length;U++)if(F=L[U],F<0||F>=S0||F!==F0(F))break o;if(F!==0)return!0}}}else if(L===null&&j===null&&(C===null||C===1||C===-1))return!0;throw Error(I0+"Invalid BigNumber: "+p)},c.maximum=c.max=function(){return k(arguments,-1)},c.minimum=c.min=function(){return k(arguments,1)},c.random=function(){var p=9007199254740992,U=Math.random()*p&2097151?function(){return F0(Math.random()*p)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(F){var L,j,C,T,K,Q=0,W=[],w=new c(a);if(F==null)F=g;else z0(F,0,Q0);if(T=mo(F/r0),v)if(crypto.getRandomValues){L=crypto.getRandomValues(new Uint32Array(T*=2));for(;Q<T;)if(K=L[Q]*131072+(L[Q+1]>>>11),K>=9000000000000000)j=crypto.getRandomValues(new Uint32Array(2)),L[Q]=j[0],L[Q+1]=j[1];else W.push(K%100000000000000),Q+=2;Q=T/2}else if(crypto.randomBytes){L=crypto.randomBytes(T*=7);for(;Q<T;)if(K=(L[Q]&31)*281474976710656+L[Q+1]*1099511627776+L[Q+2]*4294967296+L[Q+3]*16777216+(L[Q+4]<<16)+(L[Q+5]<<8)+L[Q+6],K>=9000000000000000)crypto.randomBytes(7).copy(L,Q);else W.push(K%100000000000000),Q+=7;Q=T/7}else throw v=!1,Error(I0+"crypto unavailable");if(!v){for(;Q<T;)if(K=U(),K<9000000000000000)W[Q++]=K%100000000000000}if(T=W[--Q],F%=r0,T&&F)K=o2[r0-F],W[Q]=F0(T/K)*K;for(;W[Q]===0;W.pop(),Q--);if(Q<0)W=[C=0];else{for(C=-1;W[0]===0;W.splice(0,1),C-=r0);for(Q=1,K=W[0];K>=10;K/=10,Q++);if(Q<r0)C-=r0-Q}return w.e=C,w.c=W,w}}(),c.sum=function(){var p=1,U=arguments,F=new c(U[0]);for(;p<U.length;)F=F.plus(U[p++]);return F},i=function(){var p="0123456789";function U(F,L,j,C){var T,K=[0],Q,W=0,w=F.length;for(;W<w;){for(Q=K.length;Q--;K[Q]*=L);K[0]+=C.indexOf(F.charAt(W++));for(T=0;T<K.length;T++)if(K[T]>j-1){if(K[T+1]==null)K[T+1]=0;K[T+1]+=K[T]/j|0,K[T]%=j}}return K.reverse()}return function(F,L,j,C,T){var K,Q,W,w,J,R,G,D,E=F.indexOf("."),t=g,m=l;if(E>=0)w=H,H=0,F=F.replace(".",""),D=new c(L),R=D.pow(F.length-E),H=w,D.c=U(m0(V0(R.c),R.e,"0"),10,j,p),D.e=D.c.length;G=U(F,L,j,T?(K=I,p):(K=p,I)),W=w=G.length;for(;G[--w]==0;G.pop());if(!G[0])return K.charAt(0);if(E<0)--W;else R.c=G,R.e=W,R.s=C,R=d(R,D,t,m,j),G=R.c,J=R.r,W=R.e;if(Q=W+t+1,E=G[Q],w=j/2,J=J||Q<0||G[Q+1]!=null,J=m<4?(E!=null||J)&&(m==0||m==(R.s<0?3:2)):E>w||E==w&&(m==4||J||m==6&&G[Q-1]&1||m==(R.s<0?8:7)),Q<1||!G[0])F=J?m0(K.charAt(1),-t,K.charAt(0)):K.charAt(0);else{if(G.length=Q,J){for(--j;++G[--Q]>j;)if(G[Q]=0,!Q)++W,G=[1].concat(G)}for(w=G.length;!G[--w];);for(E=0,F="";E<=w;F+=K.charAt(G[E++]));F=m0(F,W,K.charAt(0))}return F}}(),d=function(){function p(L,j,C){var T,K,Q,W,w=0,J=L.length,R=j%x1,G=j/x1|0;for(L=L.slice();J--;)Q=L[J]%x1,W=L[J]/x1|0,T=G*Q+W*R,K=R*Q+T%x1*x1+w,w=(K/C|0)+(T/x1|0)+G*W,L[J]=K%C;if(w)L=[w].concat(L);return L}function U(L,j,C,T){var K,Q;if(C!=T)Q=C>T?1:-1;else for(K=Q=0;K<C;K++)if(L[K]!=j[K]){Q=L[K]>j[K]?1:-1;break}return Q}function F(L,j,C,T){var K=0;for(;C--;)L[C]-=K,K=L[C]<j[C]?1:0,L[C]=K*T+L[C]-j[C];for(;!L[0]&&L.length>1;L.splice(0,1));}return function(L,j,C,T,K){var Q,W,w,J,R,G,D,E,t,m,d0,g0,Z0,W0,J0,b0,$0,h0=L.s==j.s?1:-1,M=L.c,x0=j.c;if(!M||!M[0]||!x0||!x0[0])return new c(!L.s||!j.s||(M?x0&&M[0]==x0[0]:!x0)?NaN:M&&M[0]==0||!x0?h0*0:h0/0);if(E=new c(h0),t=E.c=[],W=L.e-j.e,h0=C+W+1,!K)K=S0,W=j0(L.e/r0)-j0(j.e/r0),h0=h0/r0|0;for(w=0;x0[w]==(M[w]||0);w++);if(x0[w]>(M[w]||0))W--;if(h0<0)t.push(1),J=!0;else{if(W0=M.length,b0=x0.length,w=0,h0+=2,R=F0(K/(x0[0]+1)),R>1)x0=p(x0,R,K),M=p(M,R,K),b0=x0.length,W0=M.length;Z0=b0,m=M.slice(0,b0),d0=m.length;for(;d0<b0;m[d0++]=0);if($0=x0.slice(),$0=[0].concat($0),J0=x0[0],x0[1]>=K/2)J0++;do{if(R=0,Q=U(x0,m,b0,d0),Q<0){if(g0=m[0],b0!=d0)g0=g0*K+(m[1]||0);if(R=F0(g0/J0),R>1){if(R>=K)R=K-1;G=p(x0,R,K),D=G.length,d0=m.length;while(U(G,m,D,d0)==1)R--,F(G,b0<D?$0:x0,D,K),D=G.length,Q=1}else{if(R==0)Q=R=1;G=x0.slice(),D=G.length}if(D<d0)G=[0].concat(G);if(F(m,G,d0,K),d0=m.length,Q==-1)while(U(x0,m,b0,d0)<1)R++,F(m,b0<d0?$0:x0,d0,K),d0=m.length}else if(Q===0)R++,m=[0];if(t[w++]=R,m[0])m[d0++]=M[Z0]||0;else m=[M[Z0]],d0=1}while((Z0++<W0||m[0]!=null)&&h0--);if(J=m[0]!=null,!t[0])t.splice(0,1)}if(K==S0){for(w=1,h0=t[0];h0>=10;h0/=10,w++);V(E,C+(E.e=w+W*r0-1)+1,T,J)}else E.e=W,E.r=+J;return E}}();function z(p,U,F,L){var j,C,T,K,Q;if(F==null)F=l;else z0(F,0,8);if(!p.c)return p.toString();if(j=p.c[0],T=p.e,U==null)Q=V0(p.c),Q=L==1||L==2&&(T<=x||T>=f)?lo(Q,T):m0(Q,T,"0");else if(p=V(new c(p),U,F),C=p.e,Q=V0(p.c),K=Q.length,L==1||L==2&&(U<=C||C<=x)){for(;K<U;Q+="0",K++);Q=lo(Q,C)}else if(U-=T,Q=m0(Q,C,"0"),C+1>K){if(--U>0)for(Q+=".";U--;Q+="0");}else if(U+=C-K,U>0){if(C+1==K)Q+=".";for(;U--;Q+="0");}return p.s<0&&j?"-"+Q:Q}function k(p,U){var F,L,j=1,C=new c(p[0]);for(;j<p.length;j++)if(L=new c(p[j]),!L.s||(F=H1(C,L))===U||F===0&&C.s===U)C=L;return C}function X(p,U,F){var L=1,j=U.length;for(;!U[--j];U.pop());for(j=U[0];j>=10;j/=10,L++);if((F=L+F*r0-1)>_)p.c=p.e=null;else if(F<n)p.c=[p.e=0];else p.e=F,p.c=U;return p}r=function(){var p=/^(-?)0([xbo])(?=\w[\w.]*$)/i,U=/^([^.]+)\.$/,F=/^\.([^.]+)$/,L=/^-?(Infinity|NaN)$/,j=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(C,T,K,Q){var W,w=K?T:T.replace(j,"");if(L.test(w))C.s=isNaN(w)?null:w<0?-1:1;else{if(!K){if(w=w.replace(p,function(J,R,G){return W=(G=G.toLowerCase())=="x"?16:G=="b"?2:8,!Q||Q==W?R:J}),Q)W=Q,w=w.replace(U,"$1").replace(F,"0.$1");if(T!=w)return new c(w,W)}if(c.DEBUG)throw Error(I0+"Not a"+(Q?" base "+Q:"")+" number: "+T);C.s=null}C.c=C.e=null}}();function V(p,U,F,L){var j,C,T,K,Q,W,w,J=p.c,R=o2;if(J){o:{for(j=1,K=J[0];K>=10;K/=10,j++);if(C=U-j,C<0)C+=r0,T=U,Q=J[W=0],w=F0(Q/R[j-T-1]%10);else if(W=mo((C+1)/r0),W>=J.length)if(L){for(;J.length<=W;J.push(0));Q=w=0,j=1,C%=r0,T=C-r0+1}else break o;else{Q=K=J[W];for(j=1;K>=10;K/=10,j++);C%=r0,T=C-r0+j,w=T<0?0:F0(Q/R[j-T-1]%10)}if(L=L||U<0||J[W+1]!=null||(T<0?Q:Q%R[j-T-1]),L=F<4?(w||L)&&(F==0||F==(p.s<0?3:2)):w>5||w==5&&(F==4||L||F==6&&(C>0?T>0?Q/R[j-T]:0:J[W-1])%10&1||F==(p.s<0?8:7)),U<1||!J[0]){if(J.length=0,L)U-=p.e+1,J[0]=R[(r0-U%r0)%r0],p.e=-U||0;else J[0]=p.e=0;return p}if(C==0)J.length=W,K=1,W--;else J.length=W+1,K=R[r0-C],J[W]=T>0?F0(Q/R[j-T]%R[T])*K:0;if(L)for(;;)if(W==0){for(C=1,T=J[0];T>=10;T/=10,C++);T=J[0]+=K;for(K=1;T>=10;T/=10,K++);if(C!=K){if(p.e++,J[0]==S0)J[0]=1}break}else{if(J[W]+=K,J[W]!=S0)break;J[W--]=0,K=1}for(C=J.length;J[--C]===0;J.pop());}if(p.e>_)p.c=p.e=null;else if(p.e<n)p.c=[p.e=0]}return p}function u(p){var U,F=p.e;if(F===null)return p.toString();return U=V0(p.c),U=F<=x||F>=f?lo(U,F):m0(U,F,"0"),p.s<0?"-"+U:U}if(h.absoluteValue=h.abs=function(){var p=new c(this);if(p.s<0)p.s=1;return p},h.comparedTo=function(p,U){return H1(this,new c(p,U))},h.decimalPlaces=h.dp=function(p,U){var F,L,j,C=this;if(p!=null){if(z0(p,0,Q0),U==null)U=l;else z0(U,0,8);return V(new c(C),p+C.e+1,U)}if(!(F=C.c))return null;if(L=((j=F.length-1)-j0(this.e/r0))*r0,j=F[j])for(;j%10==0;j/=10,L--);if(L<0)L=0;return L},h.dividedBy=h.div=function(p,U){return d(this,new c(p,U),g,l)},h.dividedToIntegerBy=h.idiv=function(p,U){return d(this,new c(p,U),0,1)},h.exponentiatedBy=h.pow=function(p,U){var F,L,j,C,T,K,Q,W,w,J=this;if(p=new c(p),p.c&&!p.isInteger())throw Error(I0+"Exponent not an integer: "+u(p));if(U!=null)U=new c(U);if(K=p.e>14,!J.c||!J.c[0]||J.c[0]==1&&!J.e&&J.c.length==1||!p.c||!p.c[0])return w=new c(Math.pow(+u(J),K?p.s*(2-go(p)):+u(p))),U?w.mod(U):w;if(Q=p.s<0,U){if(U.c?!U.c[0]:!U.s)return new c(NaN);if(L=!Q&&J.isInteger()&&U.isInteger(),L)J=J.mod(U)}else if(p.e>9&&(J.e>0||J.e<-1||(J.e==0?J.c[0]>1||K&&J.c[1]>=240000000:J.c[0]<80000000000000||K&&J.c[0]<=99999750000000))){if(C=J.s<0&&go(p)?-0:0,J.e>-1)C=1/C;return new c(Q?1/C:C)}else if(H)C=mo(H/r0+2);if(K){if(F=new c(0.5),Q)p.s=1;W=go(p)}else j=Math.abs(+u(p)),W=j%2;w=new c(a);for(;;){if(W){if(w=w.times(J),!w.c)break;if(C){if(w.c.length>C)w.c.length=C}else if(L)w=w.mod(U)}if(j){if(j=F0(j/2),j===0)break;W=j%2}else if(p=p.times(F),V(p,p.e+1,1),p.e>14)W=go(p);else{if(j=+u(p),j===0)break;W=j%2}if(J=J.times(J),C){if(J.c&&J.c.length>C)J.c.length=C}else if(L)J=J.mod(U)}if(L)return w;if(Q)w=a.div(w);return U?w.mod(U):C?V(w,H,l,T):w},h.integerValue=function(p){var U=new c(this);if(p==null)p=l;else z0(p,0,8);return V(U,U.e+1,p)},h.isEqualTo=h.eq=function(p,U){return H1(this,new c(p,U))===0},h.isFinite=function(){return!!this.c},h.isGreaterThan=h.gt=function(p,U){return H1(this,new c(p,U))>0},h.isGreaterThanOrEqualTo=h.gte=function(p,U){return(U=H1(this,new c(p,U)))===1||U===0},h.isInteger=function(){return!!this.c&&j0(this.e/r0)>this.c.length-2},h.isLessThan=h.lt=function(p,U){return H1(this,new c(p,U))<0},h.isLessThanOrEqualTo=h.lte=function(p,U){return(U=H1(this,new c(p,U)))===-1||U===0},h.isNaN=function(){return!this.s},h.isNegative=function(){return this.s<0},h.isPositive=function(){return this.s>0},h.isZero=function(){return!!this.c&&this.c[0]==0},h.minus=function(p,U){var F,L,j,C,T=this,K=T.s;if(p=new c(p,U),U=p.s,!K||!U)return new c(NaN);if(K!=U)return p.s=-U,T.plus(p);var Q=T.e/r0,W=p.e/r0,w=T.c,J=p.c;if(!Q||!W){if(!w||!J)return w?(p.s=-U,p):new c(J?T:NaN);if(!w[0]||!J[0])return J[0]?(p.s=-U,p):new c(w[0]?T:l==3?-0:0)}if(Q=j0(Q),W=j0(W),w=w.slice(),K=Q-W){if(C=K<0)K=-K,j=w;else W=Q,j=J;j.reverse();for(U=K;U--;j.push(0));j.reverse()}else{L=(C=(K=w.length)<(U=J.length))?K:U;for(K=U=0;U<L;U++)if(w[U]!=J[U]){C=w[U]<J[U];break}}if(C)j=w,w=J,J=j,p.s=-p.s;if(U=(L=J.length)-(F=w.length),U>0)for(;U--;w[F++]=0);U=S0-1;for(;L>K;){if(w[--L]<J[L]){for(F=L;F&&!w[--F];w[F]=U);--w[F],w[L]+=S0}w[L]-=J[L]}for(;w[0]==0;w.splice(0,1),--W);if(!w[0])return p.s=l==3?-1:1,p.c=[p.e=0],p;return X(p,w,W)},h.modulo=h.mod=function(p,U){var F,L,j=this;if(p=new c(p,U),!j.c||!p.s||p.c&&!p.c[0])return new c(NaN);else if(!p.c||j.c&&!j.c[0])return new c(j);if(Y==9)L=p.s,p.s=1,F=d(j,p,0,3),p.s=L,F.s*=L;else F=d(j,p,0,Y);if(p=j.minus(F.times(p)),!p.c[0]&&Y==1)p.s=j.s;return p},h.multipliedBy=h.times=function(p,U){var F,L,j,C,T,K,Q,W,w,J,R,G,D,E,t,m=this,d0=m.c,g0=(p=new c(p,U)).c;if(!d0||!g0||!d0[0]||!g0[0]){if(!m.s||!p.s||d0&&!d0[0]&&!g0||g0&&!g0[0]&&!d0)p.c=p.e=p.s=null;else if(p.s*=m.s,!d0||!g0)p.c=p.e=null;else p.c=[0],p.e=0;return p}if(L=j0(m.e/r0)+j0(p.e/r0),p.s*=m.s,Q=d0.length,J=g0.length,Q<J)D=d0,d0=g0,g0=D,j=Q,Q=J,J=j;for(j=Q+J,D=[];j--;D.push(0));E=S0,t=x1;for(j=J;--j>=0;){F=0,R=g0[j]%t,G=g0[j]/t|0;for(T=Q,C=j+T;C>j;)W=d0[--T]%t,w=d0[T]/t|0,K=G*W+w*R,W=R*W+K%t*t+D[C]+F,F=(W/E|0)+(K/t|0)+G*w,D[C--]=W%E;D[C]=F}if(F)++L;else D.splice(0,1);return X(p,D,L)},h.negated=function(){var p=new c(this);return p.s=-p.s||null,p},h.plus=function(p,U){var F,L=this,j=L.s;if(p=new c(p,U),U=p.s,!j||!U)return new c(NaN);if(j!=U)return p.s=-U,L.minus(p);var C=L.e/r0,T=p.e/r0,K=L.c,Q=p.c;if(!C||!T){if(!K||!Q)return new c(j/0);if(!K[0]||!Q[0])return Q[0]?p:new c(K[0]?L:j*0)}if(C=j0(C),T=j0(T),K=K.slice(),j=C-T){if(j>0)T=C,F=Q;else j=-j,F=K;F.reverse();for(;j--;F.push(0));F.reverse()}if(j=K.length,U=Q.length,j-U<0)F=Q,Q=K,K=F,U=j;for(j=0;U;)j=(K[--U]=K[U]+Q[U]+j)/S0|0,K[U]=S0===K[U]?0:K[U]%S0;if(j)K=[j].concat(K),++T;return X(p,K,T)},h.precision=h.sd=function(p,U){var F,L,j,C=this;if(p!=null&&p!==!!p){if(z0(p,1,Q0),U==null)U=l;else z0(U,0,8);return V(new c(C),p,U)}if(!(F=C.c))return null;if(j=F.length-1,L=j*r0+1,j=F[j]){for(;j%10==0;j/=10,L--);for(j=F[0];j>=10;j/=10,L++);}if(p&&C.e+1>L)L=C.e+1;return L},h.shiftedBy=function(p){return z0(p,-eo,eo),this.times("1e"+p)},h.squareRoot=h.sqrt=function(){var p,U,F,L,j,C=this,T=C.c,K=C.s,Q=C.e,W=g+4,w=new c("0.5");if(K!==1||!T||!T[0])return new c(!K||K<0&&(!T||T[0])?NaN:T?C:1/0);if(K=Math.sqrt(+u(C)),K==0||K==1/0){if(U=V0(T),(U.length+Q)%2==0)U+="0";if(K=Math.sqrt(+U),Q=j0((Q+1)/2)-(Q<0||Q%2),K==1/0)U="5e"+Q;else U=K.toExponential(),U=U.slice(0,U.indexOf("e")+1)+Q;F=new c(U)}else F=new c(K+"");if(F.c[0]){if(Q=F.e,K=Q+W,K<3)K=0;for(;;)if(j=F,F=w.times(j.plus(d(C,j,W,1))),V0(j.c).slice(0,K)===(U=V0(F.c)).slice(0,K)){if(F.e<Q)--K;if(U=U.slice(K-3,K+1),U=="9999"||!L&&U=="4999"){if(!L){if(V(j,j.e+g+2,0),j.times(j).eq(C)){F=j;break}}W+=4,K+=4,L=1}else{if(!+U||!+U.slice(1)&&U.charAt(0)=="5")V(F,F.e+g+2,1),p=!F.times(F).eq(C);break}}}return V(F,F.e+g+1,l,p)},h.toExponential=function(p,U){if(p!=null)z0(p,0,Q0),p++;return z(this,p,U,1)},h.toFixed=function(p,U){if(p!=null)z0(p,0,Q0),p=p+this.e+1;return z(this,p,U)},h.toFormat=function(p,U,F){var L,j=this;if(F==null)if(p!=null&&U&&typeof U=="object")F=U,U=null;else if(p&&typeof p=="object")F=p,p=U=null;else F=$;else if(typeof F!="object")throw Error(I0+"Argument not an object: "+F);if(L=j.toFixed(p,U),j.c){var C,T=L.split("."),K=+F.groupSize,Q=+F.secondaryGroupSize,W=F.groupSeparator||"",w=T[0],J=T[1],R=j.s<0,G=R?w.slice(1):w,D=G.length;if(Q)C=K,K=Q,Q=C,D-=C;if(K>0&&D>0){C=D%K||K,w=G.substr(0,C);for(;C<D;C+=K)w+=W+G.substr(C,K);if(Q>0)w+=W+G.slice(C);if(R)w="-"+w}L=J?w+(F.decimalSeparator||"")+((Q=+F.fractionGroupSize)?J.replace(new RegExp("\\d{"+Q+"}\\B","g"),"$&"+(F.fractionGroupSeparator||"")):J):w}return(F.prefix||"")+L+(F.suffix||"")},h.toFraction=function(p){var U,F,L,j,C,T,K,Q,W,w,J,R,G=this,D=G.c;if(p!=null){if(K=new c(p),!K.isInteger()&&(K.c||K.s!==1)||K.lt(a))throw Error(I0+"Argument "+(K.isInteger()?"out of range: ":"not an integer: ")+u(K))}if(!D)return new c(G);U=new c(a),W=F=new c(a),L=Q=new c(a),R=V0(D),C=U.e=R.length-G.e-1,U.c[0]=o2[(T=C%r0)<0?r0+T:T],p=!p||K.comparedTo(U)>0?C>0?U:W:K,T=_,_=1/0,K=new c(R),Q.c[0]=0;for(;;){if(w=d(K,U,0,1),j=F.plus(w.times(L)),j.comparedTo(p)==1)break;F=L,L=j,W=Q.plus(w.times(j=W)),Q=j,U=K.minus(w.times(j=U)),K=j}return j=d(p.minus(F),L,0,1),Q=Q.plus(j.times(W)),F=F.plus(j.times(L)),Q.s=W.s=G.s,C=C*2,J=d(W,L,C,l).minus(G).abs().comparedTo(d(Q,F,C,l).minus(G).abs())<1?[W,L]:[Q,F],_=T,J},h.toNumber=function(){return+u(this)},h.toPrecision=function(p,U){if(p!=null)z0(p,1,Q0);return z(this,p,U,2)},h.toString=function(p){var U,F=this,L=F.s,j=F.e;if(j===null)if(L){if(U="Infinity",L<0)U="-"+U}else U="NaN";else{if(p==null)U=j<=x||j>=f?lo(V0(F.c),j):m0(V0(F.c),j,"0");else if(p===10&&Z)F=V(new c(F),g+j+1,l),U=m0(V0(F.c),F.e,"0");else z0(p,2,I.length,"Base"),U=i(m0(V0(F.c),j,"0"),10,p,L,!0);if(L<0&&F.c[0])U="-"+U}return U},h.valueOf=h.toJSON=function(){return u(this)},h._isBigNumber=!0,h[Symbol.toStringTag]="BigNumber",h[Symbol.for("nodejs.util.inspect.custom")]=h.valueOf,o!=null)c.set(o);return c}function j0(o){var d=o|0;return o>0||o===d?d:d-1}function V0(o){var d,i,r=1,h=o.length,a=o[0]+"";for(;r<h;){d=o[r++]+"",i=r0-d.length;for(;i--;d="0"+d);a+=d}for(h=a.length;a.charCodeAt(--h)===48;);return a.slice(0,h+1||1)}function H1(o,d){var i,r,h=o.c,a=d.c,g=o.s,l=d.s,x=o.e,f=d.e;if(!g||!l)return null;if(i=h&&!h[0],r=a&&!a[0],i||r)return i?r?0:-l:g;if(g!=l)return g;if(i=g<0,r=x==f,!h||!a)return r?0:!h^i?1:-1;if(!r)return x>f^i?1:-1;l=(x=h.length)<(f=a.length)?x:f;for(g=0;g<l;g++)if(h[g]!=a[g])return h[g]>a[g]^i?1:-1;return x==f?0:x>f^i?1:-1}function z0(o,d,i,r){if(o<d||o>i||o!==F0(o))throw Error(I0+(r||"Argument")+(typeof o=="number"?o<d||o>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(o))}function go(o){var d=o.c.length-1;return j0(o.e/r0)==d&&o.c[d]%2!=0}function lo(o,d){return(o.length>1?o.charAt(0)+"."+o.slice(1):o)+(d<0?"e":"e+")+d}function m0(o,d,i){var r,h;if(d<0){for(h=i+".";++d;h+=i);o=h+o}else if(r=o.length,++d>r){for(h=i,d-=r;--d;h+=i);o+=h}else if(d<r)o=o.slice(0,d)+"."+o.slice(d);return o}var v3=Fd(),s=v3;class s0{host;handlers=new Map;isFocusedOnInput=!1;repeating=null;repeatTimer=null;DEFAULT_REPEAT_INTERVAL=200;constructor(o,d){if(this.host=o,o.addController(this),d)d.forEach(({key:i,callback:r,options:h})=>{this.register(i,r,h)})}hostConnected(){window.addEventListener("keydown",this._onKeyDown),window.addEventListener("keyup",this._onKeyUp),window.addEventListener("focusin",this._onFocusIn),window.addEventListener("focusout",this._onFocusOut)}hostDisconnected(){window.removeEventListener("keydown",this._onKeyDown),window.removeEventListener("keyup",this._onKeyUp),window.removeEventListener("focusin",this._onFocusIn),window.removeEventListener("focusout",this._onFocusOut),this._clearRepeatTimer()}_onFocusIn=(o)=>{let d=o.composedPath()[0];if(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)this.isFocusedOnInput=!0,this._clearRepeatTimer()};_onFocusOut=(o)=>{let d=o.composedPath()[0];if(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)this.isFocusedOnInput=!1};_clearRepeatTimer(){if(this.repeatTimer)clearTimeout(this.repeatTimer),this.repeatTimer=null;this.repeating=null}shouldSkipAction(){if(this.isFocusedOnInput)return!0;if(this.checkForOpenModals())return!0;return!1}checkForOpenModals(){let o=document.querySelector("origami-game-provider-wrapper");if(!o?.shadowRoot)return!1;let d=o.shadowRoot.querySelector("*");if(!d)return!1;let i=d.assignedNodes();for(let r of i){let h=r?.shadowRoot;if(!h)return!1;let a=h.querySelector("origami-game-layout");if(!a?.shadowRoot)return!1;if(!!a.shadowRoot.querySelector("origami-responsive-modal[open]"))return!0}return!1}_onKeyDown=(o)=>{if(this.shouldSkipAction())return;let d=o.key.toLowerCase(),i=this.handlers.get(d);if(i){let{callback:r,options:h}=i;if(h.disabled?.()??!1)return;if(o.preventDefault(),o.repeat){if(h.repeat&&!this.repeating)this.repeating=d,this._startRepeating(r,h);return}r(o)}};_onKeyUp=(o)=>{if(this.shouldSkipAction())return;let d=o.key.toLowerCase();if(this.repeating===d)this._clearRepeatTimer()};_startRepeating(o,d){let i=d.repeatInterval??this.DEFAULT_REPEAT_INTERVAL,r=()=>{if(!this.repeating)return;if(!(d.disabled?.()??!1)&&!this.shouldSkipAction())o();if(this.repeating)this.repeatTimer=window.setTimeout(r,i)};this.repeatTimer=window.setTimeout(r,i)}register(o,d,i={}){let r=o.toLowerCase(),h={repeat:!1,repeatInterval:this.DEFAULT_REPEAT_INTERVAL,disabled:()=>!1,...i};this.handlers.set(r,{callback:d,options:h})}}class d2 extends N{static styles=[B,y`
|
|
1418
1418
|
origami-raw-currency-input {
|
|
1419
1419
|
flex-grow: 1;
|
|
1420
1420
|
display: block;
|
|
1421
1421
|
}
|
|
1422
|
-
`];_gameContext=new _0(this,{context:i0,subscribe:!0,callback:(o)=>{if(!
|
|
1422
|
+
`];_gameContext=new _0(this,{context:i0,subscribe:!0,callback:(o)=>{if(!s(o.amount).isEqualTo(this.value)&&!this.isFocused)this.value=s(o.amount).toFixed(P0)}});firstUpdated(){if(this.gameData?.amount)this.value=s(this.gameData.amount).toFixed(P0)}handleValueOrBalanceChange(){if(!this.gameData)return;let o=this.value===""?"0":this.value,d=s(o),i=s(this.gameData.balance??0),r=this.isInvalid;if(d.isNaN())this.isInvalid=!0;else this.isInvalid=d.gt(i);if(r!==this.isInvalid)this.emit("bet-amount-validity-change",{detail:{isValid:!this.isInvalid}})}constructor(){super();this.isFocused=!1;this.isInvalid=!1;this.value="0";this.disabled=!1;this.label="Bet Amount";new s0(this,[{key:"a",callback:this.handleHalfBet.bind(this),options:{disabled:()=>this.disabled||!this.gameData?.hotkeysOpenEnabled,repeat:!0,repeatInterval:200}},{key:"s",callback:this.handleDoubleBet.bind(this),options:{disabled:()=>this.disabled||!this.gameData?.hotkeysOpenEnabled,repeat:!0,repeatInterval:200}},{key:"d",callback:this.handleZeroBet.bind(this),options:{disabled:()=>this.disabled||!this.gameData?.hotkeysOpenEnabled}}])}updateBalanceState(o){if(o.isNaN())return;let d=o.toFixed(P0);this.gameData?.updateBalance(s(d))}handleCurrencyInputChange(o){let d=o.detail.value;this.value=d,this.updateBalanceState(s(d))}updateAmount(o){if(this.disabled)return;let d=o.isLessThan(0)?s(0):o,i=this.gameData?.isCryptoMode?P0:L1,r=d.decimalPlaces(i,s.ROUND_DOWN);if(r.toString()!==this.value)this.value=r.toFixed(i),this.updateBalanceState(s(r))}handleHalfBet(){if(this.disabled||s(this.value).isLessThanOrEqualTo(0))return;this.gameData?.soundController?.play("half-double").catch((o)=>console.error(o)),this.updateAmount(s(this.value).dividedBy(2))}handleDoubleBet(){if(this.disabled)return;if(this.gameData?.soundController?.play("half-double").catch((d)=>console.error(d)),s(this.value).isZero()){this.updateAmount(s(s("1").div(10**(this.gameData?.isCryptoMode?P0:L1))));return}let o=s.min(s(this.value).multipliedBy(2),s(this.gameData?.balance??0));this.updateAmount(o)}handleZeroBet(){if(this.disabled)return;this.gameData?.soundController?.play("click").catch((o)=>console.error(o)),this.updateAmount(s(0))}handleDisplayInFiatChange(){this.value=this.gameData?.isCryptoMode?"0.00000000":"0.00",this.updateBalanceState(s(this.value))}render(){let o=this.gameData?.isCryptoMode?"0.00000000":"0.00",d=this.isInvalid?"Not enough balance":"";return S`
|
|
1423
1423
|
<origami-raw-currency-input
|
|
1424
1424
|
.value=${this.value}
|
|
1425
1425
|
.label=${this.label}
|
|
@@ -1454,7 +1454,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1454
1454
|
</origami-button>
|
|
1455
1455
|
</origami-button-group>
|
|
1456
1456
|
</origami-raw-currency-input>
|
|
1457
|
-
`}}
|
|
1457
|
+
`}}b([l0({context:i0,subscribe:!0})],d2.prototype,"gameData",void 0),b([O()],d2.prototype,"isFocused",void 0),b([O()],d2.prototype,"isInvalid",void 0),b([p0(["value","gameData.balance"])],d2.prototype,"handleValueOrBalanceChange",null),b([O()],d2.prototype,"value",void 0),b([q({type:Boolean})],d2.prototype,"disabled",void 0),b([q({type:String})],d2.prototype,"label",void 0),b([p0("displayInFiat")],d2.prototype,"handleDisplayInFiatChange",null),d2=b([P("origami-bet-amount-input")],d2);var i2=new Map;class r2 extends N{constructor(){super(...arguments);this.src="";this.size="24px";this.triggerSelector="origami-button";this.active=!1}static styles=y`
|
|
1458
1458
|
:host {
|
|
1459
1459
|
display: flex;
|
|
1460
1460
|
align-items: center;
|
|
@@ -1546,7 +1546,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1546
1546
|
justify-content: center;
|
|
1547
1547
|
}
|
|
1548
1548
|
|
|
1549
|
-
`;animation=null;containerRef=J1();abortController=null;lottieModule=null;async connectedCallback(){super.connectedCallback(),await this.initialize()}disconnectedCallback(){this.cleanup(),super.disconnectedCallback()}async initialize(){if(!this.src)return;try{let[o,d]=await Promise.all([this.loadLottieModule(),this.loadAnimationData()]);this.lottieModule=o,await this.setupAnimation(d),this.setupTriggers()}catch(o){console.warn("[LottieIcon] Failed to initialize:",o)}}async loadLottieModule(){let o=await Promise.resolve().then(() =>
|
|
1549
|
+
`;animation=null;containerRef=J1();abortController=null;lottieModule=null;async connectedCallback(){super.connectedCallback(),await this.initialize()}disconnectedCallback(){this.cleanup(),super.disconnectedCallback()}async initialize(){if(!this.src)return;try{let[o,d]=await Promise.all([this.loadLottieModule(),this.loadAnimationData()]);this.lottieModule=o,await this.setupAnimation(d),this.setupTriggers()}catch(o){console.warn("[LottieIcon] Failed to initialize:",o)}}async loadLottieModule(){let o=await Promise.resolve().then(() => s5(jd(),1));return o.default||o}async loadAnimationData(){if(i2.has(this.src))return i2.get(this.src);let o=await fetch(this.src);if(!o.ok)throw new Error(`Failed to load animation: ${o.status}`);let d=await o.json();return i2.set(this.src,d),d}async setupAnimation(o){if(await this.updateComplete,!this.containerRef.value||!this.lottieModule)return;this.animation=this.lottieModule.loadAnimation({container:this.containerRef.value,renderer:"svg",loop:!1,autoplay:!1,animationData:o,rendererSettings:{preserveAspectRatio:"xMidYMid meet",clearCanvas:!1,hideOnTransparent:!0}})}setupTriggers(){if(!this.animation)return;let o=this.closest(this.triggerSelector);if(!o){console.warn(`[LottieIcon] Trigger element "${this.triggerSelector}" not found`);return}this.abortController=new AbortController;let d=()=>this.playAnimation(),i={signal:this.abortController.signal,passive:!0};o.addEventListener("mouseenter",d,i),o.addEventListener("focus",d,i)}playAnimation(){if(!this.animation)return;this.animation.goToAndStop(0,!0),this.animation.play()}cleanup(){if(this.abortController?.abort(),this.abortController=null,this.animation)this.animation.destroy(),this.animation=null;this.lottieModule=null}render(){let o=`width: ${this.size}; height: ${this.size};`;return S`
|
|
1550
1550
|
<div
|
|
1551
1551
|
class=${o0({container:!0,active:this.active})}
|
|
1552
1552
|
style="${o}"
|
|
@@ -1554,7 +1554,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1554
1554
|
role="img"
|
|
1555
1555
|
aria-hidden="true"
|
|
1556
1556
|
></div>
|
|
1557
|
-
`}}
|
|
1557
|
+
`}}b([q({type:String})],r2.prototype,"src",void 0),b([q({type:String})],r2.prototype,"size",void 0),b([q({type:String,attribute:"trigger-selector"})],r2.prototype,"triggerSelector",void 0),b([q({type:Boolean})],r2.prototype,"active",void 0),r2=b([P("lottie-icon")],r2);var D0=25;var k1=3,xo=Array.from({length:24},(o,d)=>({value:(d+1).toString(),label:(d+1).toString()}));var wo=y`
|
|
1558
1558
|
:host {
|
|
1559
1559
|
display: flex;
|
|
1560
1560
|
flex-direction: column;
|
|
@@ -1591,14 +1591,14 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1591
1591
|
flex-direction: column;
|
|
1592
1592
|
}
|
|
1593
1593
|
}
|
|
1594
|
-
`;var Gd=1e4,
|
|
1594
|
+
`;var Gd=1e4,z3=100;function n3(o){if(o<z3)throw new Error("Exceeded Minimum edge allowed on platform");return new s(Gd).minus(o).dividedBy(Gd)}function Ld(o){if(!o)return new Uint8Array;let d=[];for(let i=0;i<o.length;i+=2)d.push(parseInt(o.substring(i,i+2),16));return new Uint8Array(d)}var h2=[new s(1)];function fo(o){if(!Number.isInteger(o)||o<0)throw new Error(`Factorial: <${o}> should be an integer greater or equal to 0`);let d=new s(o);if(!h2[o])h2[o]=d.multipliedBy(fo(o-1));return h2[o]}function S1(o,d){return fo(o).dividedBy(fo(d)).dividedBy(fo(new s(o).minus(d).toNumber()))}var p3=new s(256),bo=new s(25),ud=class{static getResults(o,d){let i=[],r=Array.from(Array(bo.toNumber()).keys());return o.map(Ld).every((h,a)=>{for(let g=0;g<8;g++){if(i.length>=d)return!1;let l=new s(0);for(let x=0;x<4;x++){let f=h[4*g+x];l=l.plus(new s(f).dividedBy(p3.pow(x+1)))}l=l.multipliedBy(bo.minus(new s(8*a+g))).integerValue(s.ROUND_DOWN),i.push(r.splice(l.toNumber(),1)[0])}return!0}),i}static hitMine=(o,d)=>{return d.some((i)=>i===o)};static calculateMultiplierBN(o,d,i){return n3(i).dividedBy(this.calculateWinChanceBN(o,d))}static calculateWinChanceBN(o,d){return S1(bo.minus(d).toNumber(),o).dividedBy(S1(bo.toNumber(),o))}},e=((o)=>{return o.CLASSIC="CLASSIC",o.LOW_RISK="LOW_RISK",o.MEDIUM_RISK="MEDIUM_RISK",o.HIGH_RISK="HIGH_RISK",o})(e||{}),Z3=new s(256),Cd=new s(40),$3=[{tiles:1,payout:{["CLASSIC"]:[0,3.96],["LOW_RISK"]:[0.7,1.85],["MEDIUM_RISK"]:[0.4,2.75],["HIGH_RISK"]:[0,3.96]}},{tiles:2,payout:{["CLASSIC"]:[0,1.9,4.5],["LOW_RISK"]:[0,2,3.8],["MEDIUM_RISK"]:[0,1.8,5.1],["HIGH_RISK"]:[0,0,17.1]}},{tiles:3,payout:{["CLASSIC"]:[0,1,3.1,10.4],["LOW_RISK"]:[0,1.1,1.38,26],["MEDIUM_RISK"]:[0,0,2.8,50],["HIGH_RISK"]:[0,0,0,81.5]}},{tiles:4,payout:{["CLASSIC"]:[0,0.8,1.8,5,22.5],["LOW_RISK"]:[0,0,2.2,7.9,90],["MEDIUM_RISK"]:[0,0,1.7,10,100],["HIGH_RISK"]:[0,0,0,10,259]}},{tiles:5,payout:{["CLASSIC"]:[0,0.25,1.4,4.1,16.5,36],["LOW_RISK"]:[0,0,1.5,4.2,13,300],["MEDIUM_RISK"]:[0,0,1.4,4,14,390],["HIGH_RISK"]:[0,0,0,4.5,48,450]}},{tiles:6,payout:{["CLASSIC"]:[0,0,1,3.68,7,16.5,40],["LOW_RISK"]:[0,0,1.1,2,6.2,100,700],["MEDIUM_RISK"]:[0,0,0,3,9,180,710],["HIGH_RISK"]:[0,0,0,0,11,350,710]}},{tiles:7,payout:{["CLASSIC"]:[0,0,0.47,3,4.5,14,31,60],["LOW_RISK"]:[0,0,1.1,1.6,3.5,15,225,700],["MEDIUM_RISK"]:[0,0,0,2,7,30,400,800],["HIGH_RISK"]:[0,0,0,0,7,90,400,800]}},{tiles:8,payout:{["CLASSIC"]:[0,0,0,2.2,4,13,22,55,70],["LOW_RISK"]:[0,0,1.1,1.5,2,5.5,39,100,800],["MEDIUM_RISK"]:[0,0,0,2,4,11,67,400,900],["HIGH_RISK"]:[0,0,0,0,5,20,270,600,900]}},{tiles:9,payout:{["CLASSIC"]:[0,0,0,1.55,3,8,15,44,60,85],["LOW_RISK"]:[0,0,1.1,1.3,1.7,2.5,7.5,50,250,1000],["MEDIUM_RISK"]:[0,0,0,2,2.5,5,15,100,500,1000],["HIGH_RISK"]:[0,0,0,0,4,11,56,500,800,1000]}},{tiles:10,payout:{["CLASSIC"]:[0,0,0,1.4,2.25,4.5,8,17,50,80,100],["LOW_RISK"]:[0,0,1.1,1.2,1.3,1.8,3.5,13,50,250,1000],["MEDIUM_RISK"]:[0,0,0,1.6,2,4,7,26,100,500,1000],["HIGH_RISK"]:[0,0,0,0,3.5,8,13,63,500,800,1000]}}],Rd=class{static configs(){return $3}static calculateMultiplier(o,d,i){let r=i.filter((a)=>d.includes(a)),h=this.configs().find((a)=>a.tiles===d.length);if(!h)throw new Error(`No configuration found for ${d.length} tiles`);return new s(h.payout[o][r.length]??0)}static getResults(o,d){let i=[],r=Array.from(Array(Cd.toNumber()).keys());return o.map(Ld).every((h,a)=>{for(let g=0;g<8;g++){if(i.length>=d)return!1;let l=new s(0);for(let x=0;x<4;x++){let f=h[4*g+x];l=l.plus(new s(f).dividedBy(Z3.pow(x+1)))}l=l.multipliedBy(Cd.minus(new s(8*a+g))).integerValue(s.ROUND_DOWN),i.push(r.splice(l.toNumber(),1)[0]+1)}return!0}),i}static getChance({correctPicks:o,picked:d}){return new s(S1(10,o)).multipliedBy(S1(30,d-o)).dividedBy(new s(S1(40,d)))}},Y0=((o)=>{return o.ABOVE="ABOVE",o.BELOW="BELOW",o})(Y0||{});class q0{authToken;baseUrl;constructor(o,d){this.authToken=o,this.baseUrl=d+"/games/mines"}async startManualBet(o){try{let i=await(await fetch(`${this.baseUrl}/start`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`},body:JSON.stringify(o)})).json();if(!i.id)throw new Error("Unknown error");return{success:!0,data:i}}catch(d){return{success:!1,error:d?.message||"Unknown Error"}}}async getActiveBet(){try{let d=await(await fetch(`${this.baseUrl}/active-bet`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`}})).json();if(!d.activeBet)return{success:!1,error:"No active bet"};return{success:!0,data:d.activeBet}}catch(o){return{success:!1,error:o?.message||"Unknown Error"}}}async selectTile(o){try{let i=await(await fetch(`${this.baseUrl}/next`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`},body:JSON.stringify(o)})).json();if(!i.id)throw new Error("Unknown error");return{success:!0,data:i}}catch(d){return{success:!1,error:d?.message||"Unknown Error"}}}async cashout(){try{let d=await(await fetch(`${this.baseUrl}/cashout`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`},body:JSON.stringify({})})).json();if(!d.id)throw new Error("Unknown error");return{success:!0,data:d}}catch(o){return{success:!1,error:o?.message||"Unknown Error"}}}async autobetPlay(o){try{let i=await(await fetch(`${this.baseUrl}/auto`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`},body:JSON.stringify(o)})).json();if(!i.id)throw new Error("Unknown error");return{success:!0,data:i}}catch(d){return{success:!1,error:d?.message||"Unknown Error"}}}static getInitialState=()=>{return{selectedTiles:[],mineLocations:[],minesCount:k1,numMinesRemaining:k1,numGemsRemaining:D0-k1,outcome:null,numGemsFound:0,state:"NO_GAME_ACTIVE",betAmount:s(0)}};static deriveSelectedTiles=(o)=>{if(!o?.length)return[];return Array.from(new Set(o.flatMap(({data:d})=>d.mines?.selected??[])))};static deriveMineLocations=(o)=>{return o?.find((i)=>i.data.mines?.minesResult?.length??!1)?.data.mines?.minesResult??[]};static getMinesBetInfo=(o)=>{let d=o?.map((h)=>({minesResult:h.data.mines?.minesResult??[],selected:h.data.mines?.selected??[]}))??[],i=[],r=[];return d.forEach(({minesResult:h,selected:a})=>{i.push(...a),r.push(...h)}),{selected:i,mines:r}};static deriveOutcome=(o)=>{let d=o?.actions??[],i=d[d.length-1]?.data.mines??null;if(!i||!i?.minesResult||i?.minesResult?.length===0)return null;return i.minesResult.length>=1&&i.selected?.length===0||s(o?.multiplier??0).isGreaterThan(0)?"WIN":"LOSS"};static deriveAutoOutcome=(o)=>{let i=(o?.actions??[])[0]?.data.mines??null;if(!i||!i.minesResult)return null;let r=i.selected??[];return i.minesResult.some((a)=>r.includes(a))?"LOSS":"WIN"};static calculateMinesMultiplier=(o,d)=>{if(!d)return s(0);if(o===0)return s(1);let i=Math.min(D0-o,d);return ud.calculateMultiplierBN(o,i,nd)};static getState=(o)=>{let d=o?.actions??[];if(!d||d.length===0||!o)return q0.getInitialState();let i=q0.deriveOutcome(o),r=o?.actions?.[0]?.data.mines?.minesCount??0,h=i==="LOSS"?r-1:r,a=i?"VIEWING_RESULTS":"GAME_IN_PROGRESS",g=q0.deriveSelectedTiles(o?.actions),l=D0-r-g.length,x=q0.deriveMineLocations(o?.actions),f=g.filter((n)=>!x.includes(n)).length;return{currency:o?.currency,selectedTiles:g,mineLocations:x,outcome:i,minesCount:r,numMinesRemaining:h,numGemsFound:f,numGemsRemaining:l,state:a,betAmount:s(o.amount)}}}class g2 extends N{constructor(){super(...arguments);this.inputsDisabled=!1;this.minesState=null;this.isGameActive=!1;this.isLoading=!1;this.minesCount=3;this.isSelectingRandomTile=!1;this.isTileLoading=!1;this.isBetAmountValid=!0}static styles=[B,wo];get _isActionDisabled(){return this.isLoading||this.isSelectingRandomTile||this.isTileLoading}_playSound(o){let d={click:"click",bet:"bet"};this.gameData?.soundController?.play(d[o])}render(){let{betAmount:o=s(0),minesCount:d=0,numGemsFound:i=0,numGemsRemaining:r=0,selectedTiles:h=[]}=this.minesState??{},a=q0.calculateMinesMultiplier(i+1,d),g=q0.calculateMinesMultiplier(i,d),l=h.length>0,x=s(o).multipliedBy(g).minus(o).toFixed(8),f=s(o).multipliedBy(a).minus(o).toFixed(8);return S`
|
|
1595
1595
|
<div>
|
|
1596
1596
|
<origami-bet-amount-input
|
|
1597
1597
|
?disabled=${this.inputsDisabled}
|
|
1598
|
-
@bet-amount-validity-change=${(
|
|
1598
|
+
@bet-amount-validity-change=${(n)=>{this.isBetAmountValid=n.detail.isValid}}
|
|
1599
1599
|
></origami-bet-amount-input>
|
|
1600
1600
|
</div>
|
|
1601
|
-
${this.isGameActive?
|
|
1601
|
+
${this.isGameActive?S`
|
|
1602
1602
|
<div class="grid-two-cells in-game-stats">
|
|
1603
1603
|
<origami-input
|
|
1604
1604
|
.label=${"Mines"}
|
|
@@ -1626,7 +1626,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1626
1626
|
<origami-input
|
|
1627
1627
|
class="full-width"
|
|
1628
1628
|
.label=${`Next Gem: ${a.toFixed(2)}x`}
|
|
1629
|
-
.value=${`${
|
|
1629
|
+
.value=${`${f}`}
|
|
1630
1630
|
type="text"
|
|
1631
1631
|
readonly
|
|
1632
1632
|
>
|
|
@@ -1638,17 +1638,17 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1638
1638
|
></lottie-icon>
|
|
1639
1639
|
</origami-input>
|
|
1640
1640
|
</div>
|
|
1641
|
-
`:
|
|
1641
|
+
`:S`
|
|
1642
1642
|
<origami-select
|
|
1643
1643
|
label="Mines"
|
|
1644
1644
|
.options=${xo}
|
|
1645
1645
|
.value=${this.minesCount.toString()}
|
|
1646
|
-
@select-change=${(
|
|
1646
|
+
@select-change=${(n)=>{this.emit("mines-count-change",{detail:{count:+n.detail.value}})}}
|
|
1647
1647
|
?disabled=${this.inputsDisabled}
|
|
1648
1648
|
></origami-select>
|
|
1649
1649
|
`}
|
|
1650
1650
|
<div class="action-section">
|
|
1651
|
-
${this.isGameActive?
|
|
1651
|
+
${this.isGameActive?S`
|
|
1652
1652
|
<div class="contents">
|
|
1653
1653
|
<origami-button
|
|
1654
1654
|
variant="secondary"
|
|
@@ -1671,7 +1671,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1671
1671
|
Cash Out
|
|
1672
1672
|
</origami-button>
|
|
1673
1673
|
</div>
|
|
1674
|
-
`:
|
|
1674
|
+
`:S`
|
|
1675
1675
|
<origami-button
|
|
1676
1676
|
variant="primary"
|
|
1677
1677
|
?fullWidth=${!0}
|
|
@@ -1684,7 +1684,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1684
1684
|
</origami-button>
|
|
1685
1685
|
`}
|
|
1686
1686
|
</div>
|
|
1687
|
-
`}}
|
|
1687
|
+
`}}b([l0({context:i0,subscribe:!0})],g2.prototype,"gameData",void 0),b([q({type:Boolean})],g2.prototype,"inputsDisabled",void 0),b([q({type:Object})],g2.prototype,"minesState",void 0),b([q({type:Boolean})],g2.prototype,"isGameActive",void 0),b([q({type:Boolean})],g2.prototype,"isLoading",void 0),b([q({type:Number})],g2.prototype,"minesCount",void 0),b([q({type:Boolean})],g2.prototype,"isSelectingRandomTile",void 0),b([q({type:Boolean})],g2.prototype,"isTileLoading",void 0),b([O()],g2.prototype,"isBetAmountValid",void 0),g2=b([P("origami-mines-manual")],g2);var Q3=(o)=>{return o.replace(/[^0-9]/g,"")};class l2 extends N{constructor(){super(...arguments);this.disabled=!1}static styles=[B];_handleAutobetGamesChange(o){if(o.detail&&typeof o.detail.value==="string"){let d=o.detail.value,i=Q3(d);this.gameData?.updateAutobetNumberOfBets(+i)}}_handleAutobetGamesBlur(o){let d=o.detail.value;if(d===""||d==="0")this.gameData?.updateAutobetNumberOfBets(0);else{let i=parseInt(d,10);this.gameData?.updateAutobetNumberOfBets(i)}}preventNonWholeNumberInput(o){if(["e","E","+","-","."].includes(o.key))o.preventDefault()}render(){return S`
|
|
1688
1688
|
<origami-input
|
|
1689
1689
|
label="Games"
|
|
1690
1690
|
type="number"
|
|
@@ -1698,7 +1698,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1698
1698
|
?disabled=${this.disabled}
|
|
1699
1699
|
@keydown=${this.preventNonWholeNumberInput}
|
|
1700
1700
|
>
|
|
1701
|
-
${this.gameData?.autobetNumberOfBets===0?
|
|
1701
|
+
${this.gameData?.autobetNumberOfBets===0?S`
|
|
1702
1702
|
<svg
|
|
1703
1703
|
slot="right-icon"
|
|
1704
1704
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1714,9 +1714,9 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1714
1714
|
fill="#B3B3B3"
|
|
1715
1715
|
/>
|
|
1716
1716
|
</svg>
|
|
1717
|
-
`:
|
|
1717
|
+
`:A}
|
|
1718
1718
|
</origami-input>
|
|
1719
|
-
`}}
|
|
1719
|
+
`}}b([l0({context:i0,subscribe:!0})],l2.prototype,"gameData",void 0),b([q({type:Boolean})],l2.prototype,"disabled",void 0),l2=b([P("origami-bet-count-input")],l2);var Td=y`
|
|
1720
1720
|
:host {
|
|
1721
1721
|
width: 100%;
|
|
1722
1722
|
height: 100%;
|
|
@@ -1844,7 +1844,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1844
1844
|
background: #2F2F2F;
|
|
1845
1845
|
border-radius: inherit;
|
|
1846
1846
|
}
|
|
1847
|
-
`;var
|
|
1847
|
+
`;var Sd=[{value:"5",label:"5 games"},{value:"10",label:"10 games"},{value:"25",label:"25 games"},{value:"50",label:"50 games"},{value:"100",label:"100 games"},{value:"0",label:"Infinite"}],sd=Sd[Sd.length-1]?.value??"0",Od=_1("autobet-context");var H3=(o)=>{if(!o)return"Start Autobet";return"Stop Autobet"},k3={onWinPercentage:"0.00",onLossPercentage:"0.00",stopOnProfit:"0.00000000",stopOnLoss:"0.00000000",onLossStrategy:"Reset",onWinStrategy:"Reset"},Pd=(o)=>{if(["e","E","+","-"].includes(o.key))o.preventDefault()},Dd=(o)=>{if(["e","E","+"].includes(o.key))o.preventDefault()},co=(o)=>{let d=o.replace(/[^0-9.]/g,"");if(d.includes(".")){let i=d.split(".");d=`${i[0]}.${i.slice(1).join("")}`}return d},vo=(o)=>{let d=o.replace(/[^0-9.-]/g,"");if(d.includes(".")){let i=d.split(".");d=`${i[0]}.${i.slice(1).join("")}`}return d};class x2 extends N{constructor(){super(...arguments);this.inputsDisabled=!1;this.autobetSettings=k3;this.currency="USDC";this.autobetStopping=!1;this.autobetInProgress=!1;this.profitOnWin="0.00";this.betDisabled=!1;this._isStarting=!1;this._stopOnLossFocused=!1;this._stopOnProfitFocused=!1;this.isBetAmountValid=!0}static styles=[B,Td];_autobetProvider=new a1(this,{context:Od,initialValue:{numberOfBets:sd,updateNumberOfBets:this.updateNumberOfBets.bind(this)}});willUpdate(o){if(o.has("autobetInProgress")&&this.autobetInProgress)this._isStarting=!1}updateNumberOfBets(o){this._autobetProvider.setValue({...this._autobetProvider.value,numberOfBets:o})}_handleWinPercentageChange(o){if(o.detail&&typeof o.detail.value==="string")this.autobetSettings={...this.autobetSettings,onWinPercentage:vo(o.detail.value)}}_handleLossPercentageChange(o){if(o.detail&&typeof o.detail.value==="string")this.autobetSettings={...this.autobetSettings,onLossPercentage:vo(o.detail.value)}}_handleStopOnProfitChange(o){if(o.detail&&typeof o.detail.value==="string")this.autobetSettings={...this.autobetSettings,stopOnProfit:co(o.detail.value)}}_handleStopOnLossChange(o){if(o.detail&&typeof o.detail.value==="string")this.autobetSettings={...this.autobetSettings,stopOnLoss:co(o.detail.value)}}_hasCustomInputs(){if(!this.customInputsSlot)return!1;let o=this.customInputsSlot.assignedNodes();return o.length>0&&o.some((d)=>d.nodeType===Node.ELEMENT_NODE)}render(){return S`
|
|
1848
1848
|
<div
|
|
1849
1849
|
class=${o0({"form-content":!0,"form-content-disabled":this.inputsDisabled})}
|
|
1850
1850
|
>
|
|
@@ -1857,7 +1857,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1857
1857
|
|
|
1858
1858
|
<slot name="custom-inputs" @slotchange=${()=>this.requestUpdate()}></slot>
|
|
1859
1859
|
|
|
1860
|
-
${!this._hasCustomInputs()?
|
|
1860
|
+
${!this._hasCustomInputs()?S`<origami-bet-count-input ?disabled=${this.inputsDisabled}></origami-bet-count-input>`:A}
|
|
1861
1861
|
|
|
1862
1862
|
<origami-input
|
|
1863
1863
|
label="On Win"
|
|
@@ -1867,7 +1867,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1867
1867
|
@keydown=${Dd}
|
|
1868
1868
|
?disabled=${this.autobetSettings.onWinStrategy==="Reset"||this.inputsDisabled}
|
|
1869
1869
|
?keepLabelEnabled=${!0}
|
|
1870
|
-
@input-blur=${(o)=>{let d=
|
|
1870
|
+
@input-blur=${(o)=>{let d=s(vo(o.detail.value));this.autobetSettings={...this.autobetSettings,onWinPercentage:d.isNaN()?"0.00":d.toFixed(2)}}}
|
|
1871
1871
|
>
|
|
1872
1872
|
<origami-toggle
|
|
1873
1873
|
slot="left-addon"
|
|
@@ -1888,7 +1888,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1888
1888
|
@input-change=${this._handleLossPercentageChange}
|
|
1889
1889
|
?disabled=${this.autobetSettings.onLossStrategy==="Reset"||this.inputsDisabled}
|
|
1890
1890
|
?keepLabelEnabled=${!0}
|
|
1891
|
-
@input-blur=${(o)=>{let d=
|
|
1891
|
+
@input-blur=${(o)=>{let d=s(vo(o.detail.value));this.autobetSettings={...this.autobetSettings,onLossPercentage:d.isNaN()?"0.00":d.toFixed(2)}}}
|
|
1892
1892
|
>
|
|
1893
1893
|
<origami-toggle
|
|
1894
1894
|
slot="left-addon"
|
|
@@ -1911,7 +1911,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1911
1911
|
.hideCurrencyIcon=${this._stopOnLossFocused}
|
|
1912
1912
|
?disabled=${this.inputsDisabled}
|
|
1913
1913
|
@raw-currency-input-focus=${()=>{this._stopOnLossFocused=!0}}
|
|
1914
|
-
@raw-currency-input-blur=${()=>{this._stopOnLossFocused=!1;let o=
|
|
1914
|
+
@raw-currency-input-blur=${()=>{this._stopOnLossFocused=!1;let o=s(co(this.autobetSettings.stopOnLoss));this.autobetSettings={...this.autobetSettings,stopOnLoss:o.isNaN()?"0.00000000":o.toFixed(8)}}}
|
|
1915
1915
|
></origami-raw-currency-input>
|
|
1916
1916
|
|
|
1917
1917
|
<origami-raw-currency-input
|
|
@@ -1924,7 +1924,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1924
1924
|
.hideCurrencyIcon=${this._stopOnProfitFocused}
|
|
1925
1925
|
?disabled=${this.inputsDisabled}
|
|
1926
1926
|
@raw-currency-input-focus=${()=>{this._stopOnProfitFocused=!0}}
|
|
1927
|
-
@raw-currency-input-blur=${()=>{this._stopOnProfitFocused=!1;let o=
|
|
1927
|
+
@raw-currency-input-blur=${()=>{this._stopOnProfitFocused=!1;let o=s(co(this.autobetSettings.stopOnProfit));this.autobetSettings={...this.autobetSettings,stopOnProfit:o.isNaN()?"0.00000000":o.toFixed(8)}}}
|
|
1928
1928
|
></origami-raw-currency-input>
|
|
1929
1929
|
</div>
|
|
1930
1930
|
|
|
@@ -1943,7 +1943,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1943
1943
|
>
|
|
1944
1944
|
${H3(this.autobetInProgress)}
|
|
1945
1945
|
</origami-button>
|
|
1946
|
-
`}}
|
|
1946
|
+
`}}b([q({type:Boolean})],x2.prototype,"inputsDisabled",void 0),b([q({type:Object})],x2.prototype,"autobetSettings",void 0),b([q({type:String})],x2.prototype,"currency",void 0),b([q({type:Boolean})],x2.prototype,"autobetStopping",void 0),b([q({type:Boolean})],x2.prototype,"autobetInProgress",void 0),b([q({type:String})],x2.prototype,"profitOnWin",void 0),b([q({type:Boolean})],x2.prototype,"betDisabled",void 0),b([O()],x2.prototype,"_isStarting",void 0),b([O()],x2.prototype,"_stopOnLossFocused",void 0),b([O()],x2.prototype,"_stopOnProfitFocused",void 0),b([O()],x2.prototype,"isBetAmountValid",void 0),b([l0({context:i0,subscribe:!0})],x2.prototype,"gameData",void 0),b([w0('slot[name="custom-inputs"]')],x2.prototype,"customInputsSlot",void 0),x2=b([P("origami-generic-autobet")],x2);class w2 extends N{constructor(){super(...arguments);this.inputsDisabled=!1;this.autobetStopping=!1;this.autobetInProgress=!1;this.profitOnWin="0.00";this.minesCount=5;this.disableBet=!1;this.isDesktop=!1}static styles=[B,wo];_handleMinesCountChange(o){this.emit("mines-count-change",{detail:{count:+o.detail.value}})}render(){return S`
|
|
1947
1947
|
<origami-generic-autobet
|
|
1948
1948
|
data-is-desktop=${this.isDesktop}
|
|
1949
1949
|
?inputsDisabled=${this.inputsDisabled}
|
|
@@ -1964,7 +1964,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
1964
1964
|
<origami-bet-count-input></origami-bet-count-input>
|
|
1965
1965
|
</div>
|
|
1966
1966
|
</origami-generic-autobet>
|
|
1967
|
-
`}}
|
|
1967
|
+
`}}b([q({type:Boolean})],w2.prototype,"inputsDisabled",void 0),b([q({type:Boolean})],w2.prototype,"autobetStopping",void 0),b([q({type:Boolean})],w2.prototype,"autobetInProgress",void 0),b([q({type:String})],w2.prototype,"profitOnWin",void 0),b([q({type:Number})],w2.prototype,"minesCount",void 0),b([q({type:Boolean})],w2.prototype,"disableBet",void 0),b([q({type:Boolean})],w2.prototype,"isDesktop",void 0),b([l0({context:i0,subscribe:!0})],w2.prototype,"gameData",void 0),w2=b([P("origami-mines-auto")],w2);var Nd=y`
|
|
1968
1968
|
:host {
|
|
1969
1969
|
container-type: inline-size;
|
|
1970
1970
|
}
|
|
@@ -2000,7 +2000,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2000
2000
|
margin-top: 0;
|
|
2001
2001
|
}
|
|
2002
2002
|
}
|
|
2003
|
-
`;class
|
|
2003
|
+
`;class b2 extends N{constructor(){super(...arguments);this.mode="Manual";this.toggleDisabled=!1;this.isLoading=!1;this.enableHaptics=!1;this.className=""}static styles=[B,Nd];betAmount="10.00";currency="USDC";_handleToggleChange(o){let d=o.detail?.value;if(d&&d!==this.mode)this.mode=d,this.emit("bet-mode-change",{detail:{tab:d}})}render(){return S`
|
|
2004
2004
|
<div
|
|
2005
2005
|
class=${o0({controls:!0,[this.className]:!!this.className})}
|
|
2006
2006
|
>
|
|
@@ -2015,7 +2015,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2015
2015
|
|
|
2016
2016
|
<slot name="controls"> </slot>
|
|
2017
2017
|
</div>
|
|
2018
|
-
`}}
|
|
2018
|
+
`}}b([l0({context:i0,subscribe:!0})],b2.prototype,"gameData",void 0),b([q({type:String})],b2.prototype,"mode",void 0),b([q({type:Boolean})],b2.prototype,"toggleDisabled",void 0),b([q({type:Boolean})],b2.prototype,"isLoading",void 0),b([q({type:Boolean})],b2.prototype,"enableHaptics",void 0),b([q({type:String})],b2.prototype,"className",void 0),b2=b([P("origami-game-sidebar")],b2);var Bd=y`
|
|
2019
2019
|
:host {
|
|
2020
2020
|
display: block;
|
|
2021
2021
|
}
|
|
@@ -2138,9 +2138,9 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2138
2138
|
outline: 2px solid #daff01;
|
|
2139
2139
|
outline-offset: 2px;
|
|
2140
2140
|
}
|
|
2141
|
-
`;class
|
|
2141
|
+
`;class f2 extends N{constructor(){super(...arguments);this.value=50;this.min=0;this.max=100;this.step=1;this.disabled=!1;this.label=""}static styles=[B,Bd];handleInput(o){let d=o.target,i=Number(d.value);this.value=i,this.emit("range-slider-change",{detail:{value:i}})}render(){let o=(this.value-this.min)/(this.max-this.min)*100;return S`
|
|
2142
2142
|
<div class="range-slider-container">
|
|
2143
|
-
${this.label?
|
|
2143
|
+
${this.label?S`<label class="range-slider-label">${this.label}</label>`:""}
|
|
2144
2144
|
<div class="slider-wrapper">
|
|
2145
2145
|
<input
|
|
2146
2146
|
type="range"
|
|
@@ -2162,7 +2162,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2162
2162
|
</div>
|
|
2163
2163
|
</div>
|
|
2164
2164
|
</div>
|
|
2165
|
-
`}}
|
|
2165
|
+
`}}b([q({type:Number})],f2.prototype,"value",void 0),b([q({type:Number})],f2.prototype,"min",void 0),b([q({type:Number})],f2.prototype,"max",void 0),b([q({type:Number})],f2.prototype,"step",void 0),b([q({type:Boolean})],f2.prototype,"disabled",void 0),b([q({type:String})],f2.prototype,"label",void 0),f2=b([P("origami-range-slider")],f2);var yd=y`
|
|
2166
2166
|
:host {
|
|
2167
2167
|
display: block;
|
|
2168
2168
|
container-type: inline-size;
|
|
@@ -2247,7 +2247,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2247
2247
|
display: flex;
|
|
2248
2248
|
}
|
|
2249
2249
|
}
|
|
2250
|
-
`;var Y3=
|
|
2250
|
+
`;var Y3=f0`<svg width="auto" height="189" viewBox="0 0 777 189" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2251
2251
|
<g clip-path="url(#clip0_11769_64)">
|
|
2252
2252
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M188.68 72.35V0H116.33C112.51 0 108.91 1.78 106.59 4.8L94.59 20.45L82.6 4.8C80.27 1.78 76.67 0 72.86 0H0.5V72.35C0.5 76.17 2.28 79.77 5.31 82.09L20.96 94.09L5.31 106.08C2.28 108.41 0.5 112.01 0.5 115.82V188.18H72.86C76.67 188.18 80.27 186.4 82.6 183.37L94.59 167.72L106.59 183.37C108.91 186.4 112.51 188.18 116.33 188.18H188.68V115.82C188.68 112.01 186.9 108.41 183.88 106.08L168.23 94.09L183.88 82.09C186.9 79.77 188.68 76.17 188.68 72.35ZM111.06 110.55C96.94 124.67 94.59 141.13 94.59 141.13C94.59 141.13 92.24 124.67 78.13 110.55C64.01 96.44 47.55 94.09 47.55 94.09C47.55 94.09 64.01 91.74 78.13 77.62C92.24 63.51 94.59 47.04 94.59 47.04C94.59 47.04 96.94 63.51 111.06 77.62C125.17 91.74 141.64 94.09 141.64 94.09C141.64 94.09 125.17 96.44 111.06 110.55Z" fill="#b3b3b3"/>
|
|
2253
2253
|
<path d="M235.725 93.693C235.725 61.653 257.227 38.022 290.704 38.022C324.181 38.022 345.843 61.653 345.843 93.693C345.843 125.733 325.246 150.056 290.704 150.056C256.162 150.056 235.725 125.893 235.725 93.693ZM325.405 93.48C325.405 72.883 313.217 56.437 290.704 56.437C268.191 56.437 256.003 72.883 256.003 93.48C256.003 116.046 267.978 131.588 290.704 131.588C313.43 131.588 325.405 115.994 325.405 93.48Z" fill="#b3b3b3"/>
|
|
@@ -2264,7 +2264,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2264
2264
|
</clipPath>
|
|
2265
2265
|
</defs>
|
|
2266
2266
|
</svg>
|
|
2267
|
-
`;class c2 extends
|
|
2267
|
+
`;class c2 extends N{constructor(){super(...arguments);this.showLogo=!0;this.isVolumeSliderOpen=!1}static styles=[B,yd];handleVolumeClick(){if(this.isVolumeSliderOpen=!this.isVolumeSliderOpen,document.activeElement instanceof HTMLElement)document.activeElement.blur()}handleInstantBetClick(){if(this.gameData?.updateInstantBetEnabled(!this.gameData?.instantBetEnabled),document.activeElement instanceof HTMLElement)document.activeElement.blur()}handleProvablyFairClick(){this.emit("footer-provably-fair-click")}handleHotkeysClick(){if(this.gameData?.updateHotkeysOpenEnabled(!this.gameData?.hotkeysOpenEnabled),document.activeElement instanceof HTMLElement)document.activeElement.blur()}render(){let o={position:"top",delay:0,hideDelay:0,offset:0,backgroundColor:"#f8f8f8",textColor:"#333333",animation:!1,arrow:!0,theme:"light",trigger:["hover"]},d={"icon-wrapper":!0,"icon-active":this.isVolumeSliderOpen},i={"icon-wrapper":!0,"icon-active":this.gameData?.instantBetEnabled??!1};return S`
|
|
2268
2268
|
<footer class="footer" role="contentinfo" aria-label="Site information">
|
|
2269
2269
|
<nav class="footer-icon-group" role="navigation" aria-label="Footer navigation">
|
|
2270
2270
|
<div class="volume-control">
|
|
@@ -2291,14 +2291,14 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2291
2291
|
</div>
|
|
2292
2292
|
</origami-button>
|
|
2293
2293
|
</origami-tooltip>
|
|
2294
|
-
${this.isVolumeSliderOpen?
|
|
2294
|
+
${this.isVolumeSliderOpen?S` <origami-range-slider
|
|
2295
2295
|
class="volume-slider"
|
|
2296
2296
|
.value=${this.gameData?.volume??100}
|
|
2297
2297
|
.min=${0}
|
|
2298
2298
|
.max=${100}
|
|
2299
2299
|
.step=${1}
|
|
2300
2300
|
@range-slider-change=${(r)=>this.gameData?.updateVolume(r.detail.value)}
|
|
2301
|
-
></origami-range-slider>`:
|
|
2301
|
+
></origami-range-slider>`:A}
|
|
2302
2302
|
</div>
|
|
2303
2303
|
|
|
2304
2304
|
<origami-tooltip
|
|
@@ -2353,7 +2353,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2353
2353
|
</origami-tooltip>
|
|
2354
2354
|
</nav>
|
|
2355
2355
|
|
|
2356
|
-
${this.showLogo?
|
|
2356
|
+
${this.showLogo?S` <div class="footer-logo hide-on-mobile" aria-hidden="true">${Y3}</div> `:A}
|
|
2357
2357
|
|
|
2358
2358
|
<div class="footer-links">
|
|
2359
2359
|
<origami-button
|
|
@@ -2366,7 +2366,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2366
2366
|
</origami-button>
|
|
2367
2367
|
</div>
|
|
2368
2368
|
</footer>
|
|
2369
|
-
`}}
|
|
2369
|
+
`}}b([l0({context:i0,subscribe:!0})],c2.prototype,"gameData",void 0),b([q({type:Boolean})],c2.prototype,"showLogo",void 0),b([O()],c2.prototype,"isVolumeSliderOpen",void 0),c2=b([P("origami-footer")],c2);function G0(o,d,i){return new Promise((r)=>{if(i?.duration===Number.POSITIVE_INFINITY)throw new Error("Promise-based animations must be finite.");let h=o.animate(d,{...i,duration:_3()?0:i?.duration??0});h.addEventListener("cancel",r,{once:!0}),h.addEventListener("finish",r,{once:!0})})}function _3(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function N0(o){return Promise.all(o.getAnimations().map((d)=>{return new Promise((i)=>{d.cancel(),requestAnimationFrame(i)})}))}var Md=new Map,U3=new WeakMap;function q3(o){return o??{keyframes:[],options:{duration:0}}}function Ad(o,d){if(d.toLowerCase()==="rtl")return{keyframes:o.rtlKeyframes||o.keyframes,options:o.options};return o}function H0(o,d){Md.set(o,q3(d))}function C0(o,d,i){let r=U3.get(o);if(r?.[d])return Ad(r[d],i.dir);let h=Md.get(d);if(h)return Ad(h,i.dir);return{keyframes:[],options:{duration:0}}}function X1(o,d){return new Promise((i)=>{function r(h){if(h.target===o)o.removeEventListener(d,r),i()}o.addEventListener(d,r)})}function*zo(o=document.activeElement){if(o===null||o===void 0)return;if(yield o,"shadowRoot"in o&&o.shadowRoot&&o.shadowRoot.mode!=="closed")yield*zo(o.shadowRoot.activeElement)}function Ed(){return[...zo()].pop()}var td=new WeakMap;function md(o){let d=td.get(o);if(!d)d=window.getComputedStyle(o,null),td.set(o,d);return d}function W3(o){if(typeof o.checkVisibility==="function")return o.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});let d=md(o);return d.visibility!=="hidden"&&d.display!=="none"}function X3(o){let d=md(o),{overflowY:i,overflowX:r}=d;if(i==="scroll"||r==="scroll")return!0;if(i!=="auto"||r!=="auto")return!1;if(o.scrollHeight>o.clientHeight&&i==="auto")return!0;if(o.scrollWidth>o.clientWidth&&r==="auto")return!0;return!1}function I3(o){let d=o.tagName.toLowerCase(),i=Number(o.getAttribute("tabindex"));if(o.hasAttribute("tabindex")&&(isNaN(i)||i<=-1))return!1;if(o.hasAttribute("disabled"))return!1;if(o.closest("[inert]"))return!1;if(d==="input"&&o.getAttribute("type")==="radio"){let a=o.getRootNode(),g=`input[type='radio'][name="${o.getAttribute("name")}"]`,l=a.querySelector(`${g}:checked`);if(l)return l===o;return a.querySelector(g)===o}if(!W3(o))return!1;if((d==="audio"||d==="video")&&o.hasAttribute("controls"))return!0;if(o.hasAttribute("tabindex"))return!0;if(o.hasAttribute("contenteditable")&&o.getAttribute("contenteditable")!=="false")return!0;if(["button","input","select","textarea","a","audio","video","summary","iframe"].includes(d))return!0;return X3(o)}function K3(o,d){return o.getRootNode({composed:!0})?.host!==d}function v2(o){let d=new WeakMap,i=[];function r(h){if(h instanceof Element){if(h.hasAttribute("inert")||h.closest("[inert]"))return;if(d.has(h))return;if(d.set(h,!0),!i.includes(h)&&I3(h))i.push(h);if(h instanceof HTMLSlotElement&&K3(h,o))h.assignedElements({flatten:!0}).forEach((a)=>{r(a)});if(h.shadowRoot!==null&&h.shadowRoot.mode==="open")r(h.shadowRoot)}for(let a of h.children)r(a)}return r(o),i.sort((h,a)=>{let g=Number(h.getAttribute("tabindex"))||0;return(Number(a.getAttribute("tabindex"))||0)-g})}var s1=[];class I1{element;isExternalActivated=!1;tabDirection="forward";currentFocus=null;previousFocus=null;elementsWithTabbableControls;constructor(o){this.element=o,this.elementsWithTabbableControls=["iframe"]}activate(){s1.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){s1=s1.filter((o)=>o!==this.element),this.currentFocus=null,document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return s1[s1.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){let o=v2(this.element);if(!this.element.matches(":focus-within")){let d=o[0],i=o[o.length-1],r=this.tabDirection==="forward"?d:i;if(typeof r?.focus==="function")this.currentFocus=r,r.focus({preventScroll:!1})}}}handleFocusIn=()=>{if(!this.isActive())return;this.checkFocus()};possiblyHasTabbableChildren(o){return this.elementsWithTabbableControls.includes(o.tagName.toLowerCase())||o.hasAttribute("controls")}handleKeyDown=(o)=>{if(o.key!=="Tab"||this.isExternalActivated)return;if(!this.isActive())return;let d=Ed();if(this.previousFocus=d,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;if(o.shiftKey)this.tabDirection="backward";else this.tabDirection="forward";let i=v2(this.element),r=i.findIndex((a)=>a===d);this.previousFocus=this.currentFocus;let h=this.tabDirection==="forward"?1:-1;while(!0){if(r+h>=i.length)r=0;else if(r+h<0)r=i.length-1;else r+=h;this.previousFocus=this.currentFocus;let a=i[r];if(this.tabDirection==="backward"){if(this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return}if(a&&this.possiblyHasTabbableChildren(a))return;o.preventDefault(),this.currentFocus=a??null,this.currentFocus?.focus({preventScroll:!1});let g=[...zo()];if(this.currentFocus&&g.includes(this.currentFocus)||this.previousFocus&&!g.includes(this.previousFocus))break}setTimeout(()=>this.checkFocus())};handleKeyUp=()=>{this.tabDirection="forward"}}var z2=new Set;function V3(){let o=document.documentElement.clientWidth;return Math.abs(window.innerWidth-o)}function F3(){let o=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));if(Number.isNaN(o)||!o)return 0;return o}function Y1(o){if(z2.add(o),!document.documentElement.classList.contains("sl-scroll-lock")){let d=V3()+F3(),i=getComputedStyle(document.documentElement).scrollbarGutter;if(!i||i==="auto")i="stable";if(d<2)i="";document.documentElement.style.setProperty("--sl-scroll-lock-gutter",i),document.documentElement.classList.add("sl-scroll-lock"),document.documentElement.style.setProperty("--sl-scroll-lock-size",`${d}px`)}}function w1(o){if(z2.delete(o),z2.size===0)document.documentElement.classList.remove("sl-scroll-lock"),document.documentElement.style.removeProperty("--sl-scroll-lock-size")}class O1{host;slotNames=[];constructor(o,...d){(this.host=o).addController(this),this.slotNames=d}hasDefaultSlot(){return[...this.host.childNodes].some((o)=>{if(o.nodeType===o.TEXT_NODE&&o.textContent?.trim()!=="")return!0;if(o.nodeType===o.ELEMENT_NODE){let d=o;if(d.tagName.toLowerCase()==="sl-visually-hidden")return!1;if(!d.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(o){return this.host.querySelector(`:scope > [slot="${o}"]`)!==null}test(o){return o==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(o)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange=(o)=>{let d=o.target;if(this.slotNames.includes("[default]")&&!d.name||d.name&&this.slotNames.includes(d.name))this.host.requestUpdate()}}var ed=y`
|
|
2370
2370
|
:root,
|
|
2371
2371
|
:host {
|
|
2372
2372
|
/* Spacing variables that are actually used */
|
|
@@ -2582,9 +2582,9 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2582
2582
|
.close-button:hover {
|
|
2583
2583
|
color: var(--modal-text);
|
|
2584
2584
|
}
|
|
2585
|
-
`;var j3=
|
|
2585
|
+
`;var j3=f0`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
2586
2586
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.41421 2L7.91423 6.5L12.4142 2L13.8284 3.41421L9.32843 7.91419L13.8284 12.4142L12.4142 13.8284L7.91423 9.32839L3.41421 13.8284L2 12.4142L6.5 7.91419L2 3.41421L3.41421 2Z" fill="#B3B3B3"/>
|
|
2587
|
-
</svg>`;class
|
|
2587
|
+
</svg>`;class no extends N{constructor(){super(...arguments);this.fixedPosition=!1;this.open=!1;this.label="";this.lockScrolling=!1;this.noHeader=!1}static styles=[B,ed];hasSlotController=new O1(this,"footer");originalTrigger=null;focusTrap=new I1(this);closeWatcher=null;firstUpdated(){if(this.dialog.hidden=!this.open,this.open){if(this.addOpenListeners(),this.focusTrap.activate(),this.lockScrolling)Y1(this)}}disconnectedCallback(){super.disconnectedCallback(),this.focusTrap.deactivate(),w1(this),this.removeOpenListeners()}requestClose(o){if(this.emit("modal-request-close",{cancelable:!0,detail:{source:o}}).defaultPrevented){let i=C0(this,"dialog.denyClose",{dir:""});G0(this.panel,i.keyframes,i.options);return}this.hide()}addOpenListeners(){if("CloseWatcher"in window)this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard");else document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){this.closeWatcher?.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown=(o)=>{if(o.key==="Escape"&&this.focusTrap.isActive()&&this.open)o.stopPropagation(),this.requestClose("keyboard")};async handleOpenChange(){if(this.open){if(this.emit("modal-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.focusTrap.activate(),this.lockScrolling)Y1(this);let o=this.querySelector("[autofocus]");if(o)o.removeAttribute("autofocus");await Promise.all([N0(this.dialog),N0(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{if(!this.emit("modal-initial-focus",{cancelable:!0}).defaultPrevented)if(o)o.focus({preventScroll:!0});else this.panel.focus({preventScroll:!0});if(o)o.setAttribute("autofocus","")});let d=C0(this,"dialog.show",{dir:""}),i=C0(this,"dialog.overlay.show",{dir:""});await Promise.all([G0(this.panel,d.keyframes,d.options),G0(this.overlay,i.keyframes,i.options)]),this.emit("modal-after-show")}else{this.emit("modal-hide"),this.removeOpenListeners(),this.focusTrap.deactivate(),await Promise.all([N0(this.dialog),N0(this.overlay)]);let o=C0(this,"dialog.hide",{dir:""}),d=C0(this,"dialog.overlay.hide",{dir:""});await Promise.all([G0(this.overlay,d.keyframes,d.options).then(()=>{this.overlay.hidden=!0}),G0(this.panel,o.keyframes,o.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,w1(this);let i=this.originalTrigger;if(typeof i?.focus==="function")setTimeout(()=>i.focus());this.emit("modal-after-hide")}}async show(){if(this.open)return;return this.open=!0,X1(this,"modal-after-show")}async hide(){if(!this.open)return;return this.open=!1,X1(this,"modal-after-hide")}render(){return S`
|
|
2588
2588
|
<div
|
|
2589
2589
|
part="base"
|
|
2590
2590
|
class=${o0({dialog:!0,"dialog--open":this.open,"dialog--has-footer":this.hasSlotController.test("footer"),"dialog--fixed-position":this.fixedPosition})}
|
|
@@ -2602,11 +2602,11 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2602
2602
|
role="dialog"
|
|
2603
2603
|
aria-modal="true"
|
|
2604
2604
|
aria-hidden=${this.open?"false":"true"}
|
|
2605
|
-
aria-label=${
|
|
2606
|
-
aria-labelledby=${
|
|
2605
|
+
aria-label=${v0(this.noHeader?this.label:void 0)}
|
|
2606
|
+
aria-labelledby=${v0(!this.noHeader?"title":void 0)}
|
|
2607
2607
|
tabindex="-1"
|
|
2608
2608
|
>
|
|
2609
|
-
${!this.noHeader?
|
|
2609
|
+
${!this.noHeader?S`
|
|
2610
2610
|
<header part="header" class="dialog__header">
|
|
2611
2611
|
<div class="header-left">
|
|
2612
2612
|
<slot name="header-icon"></slot>
|
|
@@ -2634,7 +2634,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2634
2634
|
</footer>
|
|
2635
2635
|
</div>
|
|
2636
2636
|
</div>
|
|
2637
|
-
`}}
|
|
2637
|
+
`}}b([q({type:Boolean})],no.prototype,"fixedPosition",void 0),b([w0(".dialog")],no.prototype,"dialog",void 0),b([w0(".dialog__panel")],no.prototype,"panel",void 0),b([w0(".dialog__overlay")],no.prototype,"overlay",void 0),b([q({type:Boolean,reflect:!0})],no.prototype,"open",void 0),b([q({reflect:!0})],no.prototype,"label",void 0),b([q({type:Boolean})],no.prototype,"lockScrolling",void 0),b([q({attribute:"no-header",type:Boolean,reflect:!0})],no.prototype,"noHeader",void 0),b([p0("open",{waitUntilFirstUpdate:!0})],no.prototype,"handleOpenChange",null),no=b([P("origami-modal")],no);H0("dialog.show",{keyframes:[{opacity:0,scale:0.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});H0("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:0.8}],options:{duration:250,easing:"ease"}});H0("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});H0("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});H0("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});var o5=y`
|
|
2638
2638
|
:host {
|
|
2639
2639
|
display: block;
|
|
2640
2640
|
color: #ffffff;
|
|
@@ -2841,7 +2841,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2841
2841
|
.show-more-icon.rotated {
|
|
2842
2842
|
transform: rotate(180deg);
|
|
2843
2843
|
}
|
|
2844
|
-
`;var d5=
|
|
2844
|
+
`;var d5=y`
|
|
2845
2845
|
:host {
|
|
2846
2846
|
display: block;
|
|
2847
2847
|
color: #ffffff;
|
|
@@ -2964,7 +2964,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
2964
2964
|
background-color: #444;
|
|
2965
2965
|
}
|
|
2966
2966
|
}
|
|
2967
|
-
`;var i5=
|
|
2967
|
+
`;var i5=y`
|
|
2968
2968
|
:host {
|
|
2969
2969
|
display: block;
|
|
2970
2970
|
}
|
|
@@ -3017,7 +3017,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3017
3017
|
transform: translateX(100%);
|
|
3018
3018
|
}
|
|
3019
3019
|
}
|
|
3020
|
-
`;class
|
|
3020
|
+
`;class n2 extends N{constructor(){super(...arguments);this.width="100%";this.height="40px";this.borderRadius="8px";this.showAnimation=!0}static styles=[B,i5];render(){return S`
|
|
3021
3021
|
<div
|
|
3022
3022
|
class="skeleton ${this.showAnimation?"skeleton--animated":""}"
|
|
3023
3023
|
style="
|
|
@@ -3026,7 +3026,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3026
3026
|
border-radius: ${this.borderRadius};
|
|
3027
3027
|
"
|
|
3028
3028
|
></div>
|
|
3029
|
-
`}}
|
|
3029
|
+
`}}b([q({type:String})],n2.prototype,"width",void 0),b([q({type:String})],n2.prototype,"height",void 0),b([q({type:String})],n2.prototype,"borderRadius",void 0),b([q({type:Boolean})],n2.prototype,"showAnimation",void 0),n2=b([P("origami-skeleton")],n2);function G3(o){let d=o.replace(/-/g,"").substring(0,12),i=parseInt(d,16);return new Date(i)}function C3(o){return o.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0})}class p2 extends N{constructor(){super(...arguments);this._historyData=[];this._isLoading=!1;this._isLoadingMore=!1;this._hasNextPage=!1}static styles=[B,d5];gameConsumer=new _0(this,{context:i0,subscribe:!0});async fetchHistory(o,d=6){if(!this.gameConsumer.value?.baseUrl||!this.gameConsumer.value?.authToken)return{historyData:[],nextCursor:void 0};let i=new URL(`${this.gameConsumer.value.baseUrl}/bet/my-bets`);if(i.searchParams.append("limit",d.toString()),o)i.searchParams.append("beforeId",o);let r=await fetch(i.toString(),{headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.gameConsumer.value.authToken}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);let h=await r.json();return{historyData:h.results.map((g)=>({id:g.id.split("-")[4],fullId:g.id,timestamp:C3(G3(g.id)),bet:`$${Number(g.amount).toFixed(2)}`,win:`$${Number(g.payout).toFixed(2)}`})),nextCursor:h.nextCursor}}async firstUpdated(){await this.loadHistoryData()}async loadHistoryData(){this._isLoading=!0;try{let{historyData:o,nextCursor:d}=await this.fetchHistory();this._historyData=o,this._hasNextPage=!!d}catch(o){console.error("Failed to load history data:",o)}finally{this._isLoading=!1}}async _handleShowMore(){if(this._isLoadingMore||!this._hasNextPage)return;this._isLoadingMore=!0;try{let o=this._historyData[this._historyData.length-1];if(!o)return;let{historyData:d,nextCursor:i}=await this.fetchHistory(o.fullId,6);this._historyData=[...this._historyData,...d],this._hasNextPage=!!i}catch(o){console.error("Failed to load more history data:",o)}finally{this._isLoadingMore=!1}}render(){return S`
|
|
3030
3030
|
<div class="history-table-container">
|
|
3031
3031
|
<origami-input
|
|
3032
3032
|
class="search-input"
|
|
@@ -3066,8 +3066,8 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3066
3066
|
</tr>
|
|
3067
3067
|
</thead>
|
|
3068
3068
|
<tbody>
|
|
3069
|
-
${this._isLoading&&this._historyData.length===0?
|
|
3070
|
-
${Array.from({length:6},()=>
|
|
3069
|
+
${this._isLoading&&this._historyData.length===0?S`
|
|
3070
|
+
${Array.from({length:6},()=>S`
|
|
3071
3071
|
<tr class='table-row--static'>
|
|
3072
3072
|
<td style="padding: 8px;"><origami-skeleton height="24px"></origami-skeleton></td>
|
|
3073
3073
|
<td style="padding: 8px;"><origami-skeleton height="24px"></origami-skeleton></td>
|
|
@@ -3075,13 +3075,13 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3075
3075
|
<td style="padding: 8px;"><origami-skeleton height="24px"></origami-skeleton></td>
|
|
3076
3076
|
</tr>
|
|
3077
3077
|
`)}
|
|
3078
|
-
`:this._historyData.length===0&&!this._isLoading?
|
|
3078
|
+
`:this._historyData.length===0&&!this._isLoading?S`
|
|
3079
3079
|
<tr class='table-row--static'>
|
|
3080
3080
|
<td colspan="4" style="text-align: center; padding: 20px;">
|
|
3081
3081
|
No betting history found
|
|
3082
3082
|
</td>
|
|
3083
3083
|
</tr>
|
|
3084
|
-
`:this._historyData.map((o)=>
|
|
3084
|
+
`:this._historyData.map((o)=>S`
|
|
3085
3085
|
<tr class='table-row' @click=${()=>{this.emit("open-bet-result-modal",{detail:{betId:o.fullId}})}}>
|
|
3086
3086
|
<td>${o.id}</td>
|
|
3087
3087
|
<td>${o.bet}</td>
|
|
@@ -3092,7 +3092,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3092
3092
|
</tbody>
|
|
3093
3093
|
</table>
|
|
3094
3094
|
|
|
3095
|
-
${this._hasNextPage?
|
|
3095
|
+
${this._hasNextPage?S`
|
|
3096
3096
|
<div class="show-more-container">
|
|
3097
3097
|
<origami-button
|
|
3098
3098
|
variant="secondary"
|
|
@@ -3106,9 +3106,9 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3106
3106
|
</svg>
|
|
3107
3107
|
</origami-button>
|
|
3108
3108
|
</div>
|
|
3109
|
-
`:
|
|
3109
|
+
`:A}
|
|
3110
3110
|
</div>
|
|
3111
|
-
`}}
|
|
3111
|
+
`}}b([O()],p2.prototype,"_historyData",void 0),b([O()],p2.prototype,"_isLoading",void 0),b([O()],p2.prototype,"_isLoadingMore",void 0),b([O()],p2.prototype,"_hasNextPage",void 0),p2=b([P("origami-history-table")],p2);var r5=y`
|
|
3112
3112
|
:host {
|
|
3113
3113
|
display: block;
|
|
3114
3114
|
color: #ffffff;
|
|
@@ -3225,7 +3225,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3225
3225
|
.verify-link:hover {
|
|
3226
3226
|
color: #b3b3b3;
|
|
3227
3227
|
}
|
|
3228
|
-
`;var h5=
|
|
3228
|
+
`;var h5=y`
|
|
3229
3229
|
:host {
|
|
3230
3230
|
display: block;
|
|
3231
3231
|
max-width: 100%;
|
|
@@ -3303,7 +3303,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3303
3303
|
origami-limbo-multiplier {
|
|
3304
3304
|
pointer-events: none;
|
|
3305
3305
|
}
|
|
3306
|
-
`;var a5=
|
|
3306
|
+
`;var a5=y`
|
|
3307
3307
|
:host {
|
|
3308
3308
|
display: block;
|
|
3309
3309
|
--success-color: var(--win-success-color, #4ef382);
|
|
@@ -3416,7 +3416,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3416
3416
|
color: var(--text-color);
|
|
3417
3417
|
margin: 0;
|
|
3418
3418
|
}
|
|
3419
|
-
`;var L3=
|
|
3419
|
+
`;var L3=f0`
|
|
3420
3420
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="13" viewBox="0 0 18 13" fill="none">
|
|
3421
3421
|
<path d="M9.00053 13.0001L6.02913 6.31431L11.9719 6.31431L9.00053 13.0001Z" fill="#08FC02"/>
|
|
3422
3422
|
<path d="M9.00069 2.97131L11.9721 6.31422L6.0293 6.31422L9.00069 2.97131Z" fill="#00D403"/>
|
|
@@ -3439,7 +3439,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3439
3439
|
<path d="M9.00017 13.0001L6.02877 6.31431L0.828857 4.45713L9.00017 13.0001Z" fill="#01E200"/>
|
|
3440
3440
|
<path d="M13.643 1.67133L9.00024 2.97135L4.35744 1.67133L3.24316 0.928463L5.286 -0.00012207H12.7145L14.7573 0.928463L13.643 1.67133Z" fill="#08FC02"/>
|
|
3441
3441
|
</svg>
|
|
3442
|
-
`,u3=
|
|
3442
|
+
`,u3=f0`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="15" viewBox="0 0 14 15" fill="none">
|
|
3443
3443
|
<path d="M0 11V4L3.5 0.5H10.5L14 4V11L10.5 14.5H3.5L0 11Z" fill="#D9D9D9"/>
|
|
3444
3444
|
<path d="M2.7998 9.59999V5.39999L4.8998 3.29999H9.0998L11.1998 5.39999V9.59999L9.0998 11.7H4.8998L2.7998 9.59999Z" fill="#08FC02"/>
|
|
3445
3445
|
<path d="M2.8 5.4L0 4V11L2.8 9.6V5.4Z" fill="#01E200"/>
|
|
@@ -3450,10 +3450,10 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3450
3450
|
<path d="M-1.5299e-07 11L3.5 14.5L4.9 11.7L2.8 9.6L-1.5299e-07 11Z" fill="#03BD02"/>
|
|
3451
3451
|
<path d="M10.5 14.5L14 11L11.2 9.6L9.1 11.7L10.5 14.5Z" fill="#01E401"/>
|
|
3452
3452
|
<path d="M14 4L10.5 0.5L9.1 3.3L11.2 5.4L14 4Z" fill="#019902"/>
|
|
3453
|
-
</svg>`,R3={Keno:u3,Mines:L3};class Z2 extends
|
|
3453
|
+
</svg>`,R3={Keno:u3,Mines:L3};class Z2 extends N{static styles=[B,a5];constructor(){super();this.payout=null;this.multiplier=void 0;this.currencySymbol="$";this.title="";this.description="";this.gemCount=4;this.gameType="Keno";this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(){if(this.betId)this.emit("open-bet-result-modal",{detail:{betId:this.betId}})}render(){return S`
|
|
3454
3454
|
<div class="game-win-popup-top">
|
|
3455
3455
|
<h2 id="win-popup-multiplier" class="game-win-popup-multiplier">
|
|
3456
|
-
${this.title||(this.multiplier!==void 0?
|
|
3456
|
+
${this.title||(this.multiplier!==void 0?S`${this.multiplier.toFixed(2)}x`:"")}
|
|
3457
3457
|
</h2>
|
|
3458
3458
|
</div>
|
|
3459
3459
|
|
|
@@ -3469,7 +3469,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3469
3469
|
<span class="game-win-popup-gem-count">${this.gemCount}</span>
|
|
3470
3470
|
</div>
|
|
3471
3471
|
</div>
|
|
3472
|
-
`}}
|
|
3472
|
+
`}}b([q({type:Object})],Z2.prototype,"payout",void 0),b([q({type:Number})],Z2.prototype,"multiplier",void 0),b([q({type:String})],Z2.prototype,"currencySymbol",void 0),b([q({type:String})],Z2.prototype,"title",void 0),b([q({type:String})],Z2.prototype,"description",void 0),b([q({type:Number})],Z2.prototype,"gemCount",void 0),b([q({type:String})],Z2.prototype,"gameType",void 0),b([q({type:String,reflect:!0})],Z2.prototype,"betId",void 0),Z2=b([P("origami-game-win-popup")],Z2);var g5=f0`<svg xmlns="http://www.w3.org/2000/svg" width="65" height="69" viewBox="0 0 65 69" fill="none">
|
|
3473
3473
|
<path d="M7.24675 10.3565C12.1607 5.44252 16.9688 2.2828 17.9855 3.29949L21.6645 6.97856C21.7391 6.9491 21.8139 6.9206 21.8886 6.89173C21.9245 6.87787 21.9598 6.86274 21.9957 6.84901C22.139 6.79423 22.2832 6.74198 22.4271 6.68936C22.4976 6.6636 22.5679 6.63758 22.6386 6.61233C22.7811 6.56135 22.9239 6.51136 23.0671 6.46248C23.1263 6.44226 23.1856 6.42212 23.245 6.40226C23.7408 6.23625 24.2401 6.08371 24.7421 5.9429C24.8028 5.92586 24.8633 5.90776 24.9241 5.89108C25.0925 5.84493 25.2614 5.80067 25.4304 5.75734C25.4582 5.75021 25.4859 5.74268 25.5137 5.73563C25.6933 5.69011 25.8734 5.64701 26.0536 5.60469C26.0816 5.59811 26.1096 5.59158 26.1376 5.58508C36.4359 3.19585 47.6965 6.01242 55.7224 14.0384C68.092 26.4081 68.092 46.4631 55.7224 58.8328C44.8011 69.7541 27.8904 71.0307 15.5662 62.6666C15.5401 62.6489 15.5139 62.6312 15.4878 62.6134C15.0733 62.3303 14.6639 62.0368 14.2603 61.7318C14.2129 61.696 14.1653 61.6607 14.1181 61.6246C13.937 61.4862 13.7577 61.3446 13.5789 61.2017C13.5333 61.1652 13.4872 61.1292 13.4417 61.0925C13.2654 60.9499 13.0904 60.8052 12.9165 60.6583C12.878 60.6258 12.8387 60.5944 12.8003 60.5617C12.6641 60.4455 12.5303 60.3262 12.3956 60.2074C12.3093 60.1313 12.2221 60.0562 12.1365 59.9791C11.7265 59.6095 11.3234 59.2276 10.9286 58.8328C9.3824 57.2866 8.02965 55.6202 6.87002 53.8639C5.71034 52.1075 4.74417 50.2609 3.97106 48.3544C1.65178 42.6349 1.07128 36.3751 2.23098 30.3855C2.6002 28.4786 3.14769 26.5998 3.86953 24.7738L0.190507 21.0947C-0.826159 20.078 2.3329 15.2705 7.24675 10.3565Z" fill="#E11717"/>
|
|
3474
3474
|
<path d="M55.7227 14.0379C68.0923 26.4076 68.0923 46.4629 55.7227 58.8326C43.3531 71.2023 23.2981 71.2023 10.9285 58.8326C-1.44103 46.4629 -1.44103 26.4076 10.9285 14.0379C23.2981 1.66819 43.3531 1.66819 55.7227 14.0379Z" fill="#BD2828"/>
|
|
3475
3475
|
<path d="M53.5983 23.3406C47.3283 9.55092 30.7567 3.59606 16.5848 10.0401C15.6178 10.4797 14.6871 10.9658 13.794 11.4942C12.8055 12.2712 11.8525 13.1153 10.9412 14.0266C0.318338 24.6496 -1.18169 40.9409 6.44115 53.1647C14.2668 62.169 27.5957 65.2947 39.2906 59.977C53.4626 53.533 59.8684 37.1303 53.5983 23.3406Z" fill="#E23437"/>
|
|
@@ -3477,7 +3477,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3477
3477
|
<path d="M21.6671 6.98137L21.6559 6.99258C21.691 7.01366 21.7234 7.03767 21.7518 7.0661C22.7043 8.01923 19.4936 12.775 14.58 17.6888C9.66627 22.6026 4.90993 25.8139 3.9568 24.8613C3.92838 24.8329 3.90436 24.8005 3.88328 24.7654L3.87207 24.7766L0.190252 21.0947L17.9853 3.29951L21.6671 6.98137Z" fill="#BD2828"/>
|
|
3478
3478
|
<path d="M17.9853 3.29951C19.0019 4.3162 15.8425 9.124 10.9286 14.038C6.01467 18.952 1.20693 22.1114 0.190252 21.0947C-0.826425 20.078 2.33295 15.2702 7.24689 10.3562C12.1608 5.44224 16.9686 2.28282 17.9853 3.29951Z" fill="#FF2D31"/>
|
|
3479
3479
|
<path d="M8.28005 10.5222C2.2056 6.61705 9.16214 -4.50045 20.4291 10.5222C30.8426 24.4069 41.9792 16.3075 44.7272 11.8239" stroke="white" stroke-width="5" stroke-linecap="round"/>
|
|
3480
|
-
</svg>`;var l5=
|
|
3480
|
+
</svg>`;var l5=f0`<svg xmlns="http://www.w3.org/2000/svg" width="77" height="63" viewBox="0 0 77 63" fill="none">
|
|
3481
3481
|
<path d="M38.5001 62.1249L24.5002 30.6247L52.5 30.6247L38.5001 62.1249Z" fill="#08FC02"/>
|
|
3482
3482
|
<path d="M38.5001 14.8748L52.5 30.6248L24.5002 30.6248L38.5001 14.8748Z" fill="#00D403"/>
|
|
3483
3483
|
<path d="M60.3749 8.75037L76.9998 21.8754L52.5 30.6255L60.3749 8.75037Z" fill="#03BD02"/>
|
|
@@ -3498,7 +3498,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3498
3498
|
<path d="M38.5005 62.1249L52.5004 30.6247L77 21.8746L38.5005 62.1249Z" fill="#019902"/>
|
|
3499
3499
|
<path d="M38.4995 62.1249L24.4996 30.6247L0 21.8746L38.4995 62.1249Z" fill="#01E200"/>
|
|
3500
3500
|
<path d="M60.3743 8.75005L38.4995 14.8751L16.6247 8.75005L11.3748 5.25003L20.9997 0.875H55.9994L65.6243 5.25003L60.3743 8.75005Z" fill="#08FC02"/>
|
|
3501
|
-
</svg>`;var x5=
|
|
3501
|
+
</svg>`;var x5=y`
|
|
3502
3502
|
:host {
|
|
3503
3503
|
display: grid;
|
|
3504
3504
|
overflow: visible;
|
|
@@ -3838,7 +3838,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3838
3838
|
transform: scale(1.1);
|
|
3839
3839
|
}
|
|
3840
3840
|
}
|
|
3841
|
-
`;class $2 extends
|
|
3841
|
+
`;class $2 extends N{constructor(){super(...arguments);this.tileId=0;this.delayReveal=!1;this.autobetInProgress=!1;this.isAutoMode=!1;this.state="NORMAL";this.ariaLabel="";this.isLoading=!1;this.disabled=!1}static styles=[B,x5];get _isRevealed(){return!["NORMAL","AUTOBET_SELECTED"].includes(this.state)}get _isMine(){return["SELECTED_BOMB","UNSELECTED_BOMB","AUTOBET_SELECTED_BOMB"].includes(this.state)}get _isGem(){return["SELECTED_GEM","UNSELECTED_GEM","AUTOBET_SELECTED_GEM"].includes(this.state)}get _isDisabled(){return this._isRevealed||this.disabled||this.isLoading}_handleClick(){this.emit("mines-tile-selected",{detail:{tile:this.tileId}})}render(){let o={"mines-tile":!0,[this.state.toLowerCase().replace(/_/g,"-")]:!0,"delay-reveal":this.delayReveal,"is-loading":this.isLoading,"auto-mode":this.isAutoMode},d=this._isRevealed?this._isMine?", Mine":", Gem":", Unrevealed",i=this.ariaLabel||`Tile ${this.tileId+1}${d}`;return S`
|
|
3842
3842
|
<button
|
|
3843
3843
|
part="tile-button"
|
|
3844
3844
|
role="gridcell"
|
|
@@ -3850,11 +3850,11 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3850
3850
|
data-is-mine=${this._isMine}
|
|
3851
3851
|
></button>
|
|
3852
3852
|
<button class="rear-tile" ?disabled=${this._isDisabled} @click=${this._handleClick}>
|
|
3853
|
-
${this._isRevealed?
|
|
3854
|
-
<div class="icon-container">${this._isMine?g5:this._isGem?l5:
|
|
3855
|
-
`:
|
|
3853
|
+
${this._isRevealed?S`
|
|
3854
|
+
<div class="icon-container">${this._isMine?g5:this._isGem?l5:A}</div>
|
|
3855
|
+
`:A}
|
|
3856
3856
|
</button>
|
|
3857
|
-
`}}
|
|
3857
|
+
`}}b([q({type:Number})],$2.prototype,"tileId",void 0),b([q({type:Boolean})],$2.prototype,"delayReveal",void 0),b([q({type:Boolean})],$2.prototype,"autobetInProgress",void 0),b([q({type:Boolean})],$2.prototype,"isAutoMode",void 0),b([q({type:String})],$2.prototype,"state",void 0),b([q({type:String,attribute:"aria-label"})],$2.prototype,"ariaLabel",void 0),b([q({type:Boolean})],$2.prototype,"isLoading",void 0),b([q({type:Boolean})],$2.prototype,"disabled",void 0),$2=b([P("origami-mines-tile")],$2);var w5=y`
|
|
3858
3858
|
:host {
|
|
3859
3859
|
display: flex;
|
|
3860
3860
|
align-items: center;
|
|
@@ -3910,7 +3910,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3910
3910
|
padding: 12px;
|
|
3911
3911
|
border-radius: 10px;
|
|
3912
3912
|
}
|
|
3913
|
-
`;class J2 extends
|
|
3913
|
+
`;class J2 extends N{constructor(){super(...arguments);this.isAuto=!1;this.autobetSelectedTiles=[];this.autobetInProgress=!1;this.minesState=null;this.hasWon=!1;this.hitBomb=!1;this.loadingTiles=[];this.isDesktop=!1}static styles=[B,w5];_getTileInfo(o){let d=this.minesState?.state==="VIEWING_RESULTS",i=this.minesState?.mineLocations?.includes(o)??!1,r=this.minesState?.selectedTiles?.includes(o)??!1,h=d||r,a=this.isAuto&&d&&r,g=this.autobetSelectedTiles.includes(o);return{isViewingResults:d,isMine:i,isSelected:r,isRevealed:h,wasAutoRevealed:a,isAutobetSelected:g}}get tiles(){return Array.from({length:D0},(o,d)=>{let{isMine:i,isRevealed:r,wasAutoRevealed:h}=this._getTileInfo(d);return{id:d,isMine:i,isRevealed:r,wasAutoRevealed:h&&r}})}calculateTileState(o){let{isMine:d,isRevealed:i,wasAutoRevealed:r,isAutobetSelected:h,isSelected:a}=this._getTileInfo(o);if(!i)return h?"AUTOBET_SELECTED":"NORMAL";if(d){if(r)return"AUTOBET_SELECTED_BOMB";return a?"SELECTED_BOMB":"UNSELECTED_BOMB"}if(r)return"AUTOBET_SELECTED_GEM";return a?"SELECTED_GEM":"UNSELECTED_GEM"}render(){let o=this.minesState?.state==="VIEWING_RESULTS",d=!this.isAuto&&this.minesState?.state!=="GAME_IN_PROGRESS"||this.isAuto&&this.minesState!==null,i=this.isAuto||o&&!this.hitBomb;return S`
|
|
3914
3914
|
<div class="mines-grid-container" role="grid">
|
|
3915
3915
|
<div
|
|
3916
3916
|
class=${o0({"mines-grid-wrapper":!0})}
|
|
@@ -3919,7 +3919,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3919
3919
|
class=${o0({"mines-grid":!0,"grid-inactive":d,"has-won":o&&this.hasWon})}
|
|
3920
3920
|
role="rowgroup"
|
|
3921
3921
|
>
|
|
3922
|
-
${this.tiles.map((r)=>{let h=this.calculateTileState(r.id);return
|
|
3922
|
+
${this.tiles.map((r)=>{let h=this.calculateTileState(r.id);return S`
|
|
3923
3923
|
<origami-mines-tile
|
|
3924
3924
|
data-is-desktop=${this.isDesktop}
|
|
3925
3925
|
class=${o0({"is-revealed-gem":r.isRevealed&&!r.isMine&&this.minesState?.selectedTiles?.includes(r.id)===!0})}
|
|
@@ -3935,7 +3935,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3935
3935
|
</div>
|
|
3936
3936
|
</div>
|
|
3937
3937
|
</div>
|
|
3938
|
-
`}}
|
|
3938
|
+
`}}b([q({type:Boolean})],J2.prototype,"isAuto",void 0),b([q({type:Array})],J2.prototype,"autobetSelectedTiles",void 0),b([q({type:Boolean})],J2.prototype,"autobetInProgress",void 0),b([q({type:Object})],J2.prototype,"minesState",void 0),b([q({type:Boolean})],J2.prototype,"hasWon",void 0),b([q({type:Boolean})],J2.prototype,"hitBomb",void 0),b([q({type:Array})],J2.prototype,"loadingTiles",void 0),b([q({type:Boolean})],J2.prototype,"isDesktop",void 0),b([l0({context:i0,subscribe:!0})],J2.prototype,"gameData",void 0),J2=b([P("origami-mines-grid")],J2);var b5=y`
|
|
3939
3939
|
:host {
|
|
3940
3940
|
--multiplier-success-color: #daff01;
|
|
3941
3941
|
--multiplier-danger-color: #ef4444;
|
|
@@ -3983,7 +3983,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
3983
3983
|
.multiplier-default {
|
|
3984
3984
|
color: var(--multiplier-default-color);
|
|
3985
3985
|
}
|
|
3986
|
-
`;var T3=250;class Q2 extends
|
|
3986
|
+
`;var T3=250;class Q2 extends N{constructor(){super(...arguments);this.resultMultiplier=null;this.isWin=!0;this.betId="";this.betTargetMultiplier=2;this.disableAnimation=!1;this.inGameDisplay=!1;this.currentValue=1;this.isAnimating=!1;this.queuedMultiplier=null}static styles=[B,b5];animationFrame=null;startTime=null;updated(o){if(o.has("resultMultiplier")&&!this.disableAnimation){if(this.resultMultiplier===null){this.currentValue=1;return}if(this.isAnimating)this.queuedMultiplier={resultMultiplier:this.resultMultiplier,isWin:this.isWin,betId:this.betId,betTargetMultiplier:this.betTargetMultiplier};else this.startAnimation(this.resultMultiplier,this.isWin,this.betId,this.betTargetMultiplier)}}disconnectedCallback(){if(super.disconnectedCallback(),this.animationFrame)cancelAnimationFrame(this.animationFrame)}startAnimation(o,d,i,r){if(this.animationFrame)cancelAnimationFrame(this.animationFrame);this.isAnimating=!0,this.currentValue=1,this.gameData?.soundController?.play("limbo-tick").catch((h)=>console.error(h)),this.animationFrame=requestAnimationFrame((h)=>{this.startTime=h,this.updateAnimation(h,o,d,i,r)})}updateAnimation(o,d,i,r,h){if(!this.startTime)return;let a=o-this.startTime,g=Math.min(a/T3,1);if(d!==null)if(g>=1){if(this.currentValue=d,this.emit("limbo-multiplier-animation-end",{detail:{resultMultiplier:d,isWin:i,betId:r}}),this.isAnimating=!1,this.queuedMultiplier)this.startAnimation(this.queuedMultiplier.resultMultiplier,this.queuedMultiplier.isWin,this.queuedMultiplier.betId,this.queuedMultiplier.betTargetMultiplier),this.queuedMultiplier=null}else if(d>0)this.currentValue=d**g;else this.currentValue=1;else this.currentValue=1;if(g<1)this.animationFrame=requestAnimationFrame((l)=>this.updateAnimation(l,d,i,r,h))}_getMultiplierColor(){if(this.resultMultiplier!==null){if(this.resultMultiplier<this.betTargetMultiplier&&this.currentValue===this.resultMultiplier)return"multiplier-danger";if(this.currentValue>=this.betTargetMultiplier)return"multiplier-success"}return"multiplier-default"}render(){let o=["multiplier",this._getMultiplierColor()].filter(Boolean).join(" "),d=(this.resultMultiplier===0?0:this.currentValue).toFixed(2);return S`<div class=${o}>${this.disableAnimation?this.resultMultiplier?.toFixed(2):d}X</div>`}}b([l0({context:i0,subscribe:!0})],Q2.prototype,"gameData",void 0),b([q({type:Number})],Q2.prototype,"resultMultiplier",void 0),b([q({type:Boolean})],Q2.prototype,"isWin",void 0),b([q({type:String})],Q2.prototype,"betId",void 0),b([q({type:Number})],Q2.prototype,"betTargetMultiplier",void 0),b([q({type:Boolean})],Q2.prototype,"disableAnimation",void 0),b([q({type:Boolean})],Q2.prototype,"inGameDisplay",void 0),b([O()],Q2.prototype,"currentValue",void 0),b([O()],Q2.prototype,"isAnimating",void 0),b([O()],Q2.prototype,"queuedMultiplier",void 0),Q2=b([P("origami-limbo-multiplier")],Q2);var f5=y`
|
|
3987
3987
|
:host {
|
|
3988
3988
|
display: flex;
|
|
3989
3989
|
flex-direction: column;
|
|
@@ -4307,13 +4307,13 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4307
4307
|
background: #848484 !important;
|
|
4308
4308
|
opacity: 1 !important;
|
|
4309
4309
|
}
|
|
4310
|
-
`;class H2 extends
|
|
4310
|
+
`;class H2 extends N{constructor(){super(...arguments);this.step=1;this.isRollLower=!1;this.value=0;this.min=0;this.max=100;this.disabled=!1;this.resultValue=null;this.showDice=!1;this.isWin=!1;this.inGameDisplay=!1;this.isResultVisible=!1;this.dimLosingSide=!1}static styles=[B,f5];fadeOutTimer;lastStepValue=null;lastSoundPlayTime=0;disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.fadeOutTimer)}updated(o){if(o.has("resultValue")&&this.resultValue!==null)this.isResultVisible=!0,this.dimLosingSide=!0,clearTimeout(this.fadeOutTimer),this.fadeOutTimer=setTimeout(()=>{this.isResultVisible=!1,this.dimLosingSide=!1},3000)}handleChange(o){let d=o.target,i=Number(d.value);if(this.lastStepValue===null)this.lastStepValue=i;else if(Math.floor(i)!==Math.floor(this.lastStepValue)){let r=Date.now();if(r-this.lastSoundPlayTime>50)this.gameData?.soundController?.play("dice-tick"),this.lastSoundPlayTime=r}if(this.lastStepValue=i,this.value=i,this.dimLosingSide)this.dimLosingSide=!1;if(this.isResultVisible)this.isResultVisible=!1,clearTimeout(this.fadeOutTimer);this.emit("slider-input-change",{detail:{value:i}})}handleFocus(o){o.target.select()}render(){let o={"dice-result":!0,win:this.isWin&&!this.inGameDisplay,lose:!this.isWin&&this.showDice&&!this.inGameDisplay},d=[0,25,50,75,100],i=this.showDice&&this.resultValue!==null&&this.dimLosingSide,r=this.isRollLower!==this.isWin,h={"track-fill":!0,reverse:!this.isRollLower,"losing-side":i&&r,"hide-track-color":this.inGameDisplay},a={"track-remaining":!0,reverse:!this.isRollLower,"losing-side":i&&!r,"hide-track-color":this.inGameDisplay};return S`
|
|
4311
4311
|
<div
|
|
4312
4312
|
class=${"slider-container"}
|
|
4313
4313
|
style=${`--track-fill-width:${this.value}%; --result-position:${this.resultValue??0}%`}
|
|
4314
4314
|
>
|
|
4315
4315
|
<div class="markers" aria-hidden="true">
|
|
4316
|
-
${d.map((g)=>
|
|
4316
|
+
${d.map((g)=>S`
|
|
4317
4317
|
<div class="marker">
|
|
4318
4318
|
<div class="marker-label">${g}</div>
|
|
4319
4319
|
</div>
|
|
@@ -4321,7 +4321,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4321
4321
|
</div>
|
|
4322
4322
|
|
|
4323
4323
|
<div class="slider-track">
|
|
4324
|
-
${this.showDice?
|
|
4324
|
+
${this.showDice?S`
|
|
4325
4325
|
<div class=${o0({"dice-container":!0,visible:this.isResultVisible})}>
|
|
4326
4326
|
<div class="dice-wrapper">
|
|
4327
4327
|
<div class=${o0(o)} aria-live="polite" aria-atomic="true">
|
|
@@ -4330,14 +4330,14 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4330
4330
|
</div>
|
|
4331
4331
|
</div>
|
|
4332
4332
|
<div class=${o0({"result-line":!0,visible:this.isResultVisible})}></div>
|
|
4333
|
-
`:
|
|
4333
|
+
`:A}
|
|
4334
4334
|
<div class="track-background">
|
|
4335
4335
|
<div class=${o0(h)}></div>
|
|
4336
4336
|
<div class=${o0(a)}></div>
|
|
4337
4337
|
</div>
|
|
4338
4338
|
|
|
4339
4339
|
<div class="input-container">
|
|
4340
|
-
${this.inGameDisplay?
|
|
4340
|
+
${this.inGameDisplay?A:S`<input
|
|
4341
4341
|
type="range"
|
|
4342
4342
|
class="slider"
|
|
4343
4343
|
.value=${this.value.toString()}
|
|
@@ -4357,7 +4357,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4357
4357
|
</div>
|
|
4358
4358
|
</div>
|
|
4359
4359
|
</div>
|
|
4360
|
-
`}}
|
|
4360
|
+
`}}b([q({type:Number})],H2.prototype,"step",void 0),b([q({type:Boolean})],H2.prototype,"isRollLower",void 0),b([q({type:Number})],H2.prototype,"value",void 0),b([q({type:Number})],H2.prototype,"min",void 0),b([q({type:Number})],H2.prototype,"max",void 0),b([q({type:Boolean,reflect:!0})],H2.prototype,"disabled",void 0),b([q({type:Number})],H2.prototype,"resultValue",void 0),b([q({type:Boolean})],H2.prototype,"showDice",void 0),b([q({type:Boolean})],H2.prototype,"isWin",void 0),b([q({type:Boolean})],H2.prototype,"inGameDisplay",void 0),b([l0({context:i0,subscribe:!0})],H2.prototype,"gameData",void 0),b([O()],H2.prototype,"isResultVisible",void 0),b([O()],H2.prototype,"dimLosingSide",void 0),H2=b([P("origami-dice-slider")],H2);var po=f0`
|
|
4361
4361
|
<svg width="64" height="65" viewBox="0 0 64 65" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4362
4362
|
<path d="M0 48.4V16.4L16 0.400009H48L64 16.4V48.4L48 64.4H16L0 48.4Z" fill="#D9D9D9"/>
|
|
4363
4363
|
<path d="M12.8 42V22.8L22.4 13.2H41.6L51.2 22.8V42L41.6 51.6H22.4L12.8 42Z" fill="#08FC02"/>
|
|
@@ -4370,7 +4370,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4370
4370
|
<path d="M48 64.4L64 48.4L51.2 42L41.6 51.6L48 64.4Z" fill="#01E401"/>
|
|
4371
4371
|
<path d="M64 16.4L48 0.400008L41.6 13.2L51.2 22.8L64 16.4Z" fill="#019902"/>
|
|
4372
4372
|
</svg>
|
|
4373
|
-
`;var c5=
|
|
4373
|
+
`;var c5=y`
|
|
4374
4374
|
:host {
|
|
4375
4375
|
display: grid;
|
|
4376
4376
|
overflow: visible;
|
|
@@ -4643,7 +4643,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4643
4643
|
.number-text {
|
|
4644
4644
|
margin: 0;
|
|
4645
4645
|
}
|
|
4646
|
-
`;class k2 extends
|
|
4646
|
+
`;class k2 extends N{constructor(){super(...arguments);this.number=1;this.state="NORMAL";this.disabled=!1;this.ariaLabel=""}static styles=[B,c5];handleClick(){this.emit("keno-tile-click",{detail:{tile:this.number}})}render(){let o={"keno-tile":!0,[this.state.toLowerCase()]:!0},d=this.state==="SELECTED"||this.state==="WIN";return S`
|
|
4647
4647
|
<button
|
|
4648
4648
|
@click=${this.handleClick}
|
|
4649
4649
|
class=${o0(o)}
|
|
@@ -4652,10 +4652,10 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4652
4652
|
?disabled=${this.disabled}
|
|
4653
4653
|
><p class="number-text">${this.number}</p></button>
|
|
4654
4654
|
<button class="rear-button" ?disabled=${this.disabled} @click=${this.handleClick}>
|
|
4655
|
-
${this.state==="WIN"?
|
|
4655
|
+
${this.state==="WIN"?S`<div class="win-icon">${po}</div>`:A}
|
|
4656
4656
|
<p class="number-text">${this.number}</p>
|
|
4657
4657
|
</button>
|
|
4658
|
-
`}}
|
|
4658
|
+
`}}b([q({type:Number})],k2.prototype,"number",void 0),b([q({type:String})],k2.prototype,"state",void 0),b([q({type:Boolean,reflect:!0})],k2.prototype,"disabled",void 0),b([q({type:String,attribute:"aria-label"})],k2.prototype,"ariaLabel",void 0),k2=b([P("origami-keno-tile")],k2);var v5=y`
|
|
4659
4659
|
:host {
|
|
4660
4660
|
display: flex;
|
|
4661
4661
|
align-items: center;
|
|
@@ -4699,12 +4699,12 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4699
4699
|
gap: 12px;
|
|
4700
4700
|
}
|
|
4701
4701
|
}
|
|
4702
|
-
`;class Y2 extends
|
|
4702
|
+
`;class Y2 extends N{constructor(){super(...arguments);this.selectedTiles=[];this.resultTiles=[];this.popupShowing=!1;this.isPlaying=!1;this.gameOver=!1;this.autoselectRunning=!1;this.enableSounds=!0;this.ariaLabel="Keno Game Grid";this.isDesktop=!1}static styles=[B,v5];get selectedCount(){return this.selectedTiles.length}get hitCount(){return this.selectedTiles.filter((o)=>this.resultTiles.includes(o)).length}calculateTileState(o){let d=this.selectedTiles.includes(o),i=this.resultTiles.includes(o);if(this.isPlaying||this.gameOver){if(d&&i)return"WIN";if(i&&!d)return"LOSS";if(d)return"SELECTED";return"NORMAL"}if(d)return"SELECTED";return"NORMAL"}render(){let o=Array.from({length:40},(d,i)=>i+1);return S`
|
|
4703
4703
|
<div
|
|
4704
4704
|
class=${o0({"keno-grid":!0,inactive:this.isPlaying,autoselecting:this.autoselectRunning})}
|
|
4705
4705
|
@click=${()=>this.emit("keno-grid-click")}
|
|
4706
4706
|
>
|
|
4707
|
-
${o.map((d)=>{let i=this.calculateTileState(d);return
|
|
4707
|
+
${o.map((d)=>{let i=this.calculateTileState(d);return S`
|
|
4708
4708
|
<origami-keno-tile
|
|
4709
4709
|
data-is-desktop=${this.isDesktop}
|
|
4710
4710
|
?dimmed=${!this.isPlaying&&this.selectedCount===10&&!this.selectedTiles.includes(d)||this.isPlaying&&!this.selectedTiles.includes(d)||this.popupShowing}
|
|
@@ -4714,9 +4714,9 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4714
4714
|
></origami-keno-tile>
|
|
4715
4715
|
`})}
|
|
4716
4716
|
</div>
|
|
4717
|
-
`}}
|
|
4717
|
+
`}}b([q({type:Array})],Y2.prototype,"selectedTiles",void 0),b([q({type:Array})],Y2.prototype,"resultTiles",void 0),b([q({type:Boolean})],Y2.prototype,"popupShowing",void 0),b([q({type:Boolean,reflect:!0})],Y2.prototype,"isPlaying",void 0),b([q({type:Boolean,reflect:!0})],Y2.prototype,"gameOver",void 0),b([q({type:Boolean})],Y2.prototype,"autoselectRunning",void 0),b([O()],Y2.prototype,"enableSounds",void 0),b([q({type:String,attribute:"aria-label"})],Y2.prototype,"ariaLabel",void 0),b([q({type:Boolean})],Y2.prototype,"isDesktop",void 0),Y2=b([P("origami-keno-grid")],Y2);var z5=["mines","limbo","dice","keno"];class _2 extends k0{constructor(){super(...arguments);this.gameType="mines";this.inBetResultModal=!1}static styles=[B,h5];render(){switch(this.gameType){case"mines":return S`
|
|
4718
4718
|
<origami-mines-grid .minesState=${{selectedTiles:this.minesData?.selectedTiles||[1,12,13],state:"VIEWING_RESULTS",mineLocations:this.minesData?.mineLocations||[1,2,3,5,6]}}></origami-mines-grid>
|
|
4719
|
-
`;case"limbo":return
|
|
4719
|
+
`;case"limbo":return S`
|
|
4720
4720
|
<origami-limbo-multiplier
|
|
4721
4721
|
disableAnimation
|
|
4722
4722
|
?isWin=${this.limboData?.isWin??!0}
|
|
@@ -4726,7 +4726,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4726
4726
|
.betTargetMultiplier=${this.limboData?.betTargetMultiplier??2}
|
|
4727
4727
|
></origami-limbo-multiplier>
|
|
4728
4728
|
<origami-input class=${o0({"limbo-target-input":!0,hidden:!this.inBetResultModal})} .label=${"Target Multiplier"} .value=${this.limboData?.betTargetMultiplier?.toFixed(2)??""}></origami-input>
|
|
4729
|
-
`;case"dice":return
|
|
4729
|
+
`;case"dice":return S`
|
|
4730
4730
|
<origami-dice-slider
|
|
4731
4731
|
?inGameDisplay=${!this.inBetResultModal}
|
|
4732
4732
|
.value=${this.diceData?.value??23.23}
|
|
@@ -4739,7 +4739,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4739
4739
|
.isWin=${this.diceData?.isWin??!0}
|
|
4740
4740
|
.isRollLower=${this.diceData?.isRollLower??!1}
|
|
4741
4741
|
></origami-dice-slider>
|
|
4742
|
-
`;case"keno":return
|
|
4742
|
+
`;case"keno":return S`
|
|
4743
4743
|
<origami-keno-grid
|
|
4744
4744
|
.selectedTiles=${this.kenoData?.selectedTiles||[1,2,3,4,5,6,7,8,9,10]}
|
|
4745
4745
|
.resultTiles=${this.kenoData?.resultTiles||[5,8,22,24,23,37]}
|
|
@@ -4747,20 +4747,20 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4747
4747
|
?gameOver=${this.kenoData?.gameOver??!0}
|
|
4748
4748
|
?popupShowing=${this.kenoData?.popupShowing??!1}
|
|
4749
4749
|
></origami-keno-grid>
|
|
4750
|
-
`;default:this.gameType}}}
|
|
4750
|
+
`;default:this.gameType}}}b([q({type:String})],_2.prototype,"gameType",void 0),b([q({type:Boolean})],_2.prototype,"inBetResultModal",void 0),b([q({type:Object})],_2.prototype,"minesData",void 0),b([q({type:Object})],_2.prototype,"limboData",void 0),b([q({type:Object})],_2.prototype,"diceData",void 0),b([q({type:Object})],_2.prototype,"kenoData",void 0),_2=b([P("origami-game-outcome-display")],_2);var P1=f0`
|
|
4751
4751
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
4752
4752
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.6666 1.33325H5.33329V2.66659H2.66663V14.6666H13.3333V2.66659H10.6666V1.33325ZM9.33329 2.66659H6.66663V3.99992H9.33329V2.66659Z" fill="#B3B3B3"/>
|
|
4753
|
-
</svg>`,
|
|
4753
|
+
</svg>`,S3=f0`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
4754
4754
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.15214 3.11019L7.9998 0.983643L9.84746 3.11019L12.6298 2.66882L12.6783 5.48552L15.0934 6.93588L13.32 9.12475L14.2378 11.7881L11.4723 12.325L10.4634 14.9552L7.9998 13.5889L5.53624 14.9552L4.52732 12.325L1.76184 11.7881L2.67964 9.12475L0.90625 6.93588L3.32133 5.48552L3.36982 2.66882L6.15214 3.11019ZM10.6093 7.00002L9.66646 6.05721L7.33313 8.39055L6.33312 7.39055L5.39032 8.33335L7.33313 10.2761L10.6093 7.00002Z" fill="#1A1A1A"/>
|
|
4755
|
-
</svg>`,Zo="42341428c91a40393242807547a4ddce2aedca139eea0d48c0d336b827d28e41",
|
|
4755
|
+
</svg>`,Zo="42341428c91a40393242807547a4ddce2aedca139eea0d48c0d336b827d28e41",s3=(o)=>{let d=o.split("-")[0];if(!z5.includes(d))return"limbo";return d};class U2 extends k0{constructor(){super(...arguments);this.provablyFairData={publicKey:"42341428c91a40393242807547a4ddce2aedca139eea0d48c0d336b827d28e41",request:"req_789ghi012jkl...",proof:"proof_345mno678pqr...",randomness:"rand_901stu234vwx...",clientSeed:"your_client_seed_here"};this._verifiedStatus="inputting-values";this.baseUrl="";this.activeClientSeed="";this._isLoadingClientSeed=!1;this.authToken=""}static styles=[B,r5];_gameData={mines:{selectedTiles:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],mineLocations:[1,2,3,5,6]},limbo:{isWin:!0,betId:"123",resultMultiplier:1.5,betTargetMultiplier:2},dice:{value:23.23,min:2,max:98,step:1,showDice:!0,disabled:!1,resultValue:23.23,isWin:!0,isRollLower:!1},keno:{selectedTiles:[5,8,22,24,23,37],resultTiles:[5,8,22,24,23,37],isPlaying:!1,gameOver:!0,popupShowing:!1}};get _verifyStatus(){return this.provablyFairData.request==="abcd"?"verified":this.provablyFairData.request===""?"missing":"unverified"}async firstUpdated(){if(!this.baseUrl||!this.authToken)return;this._isLoadingClientSeed=!0;try{let d=await(await fetch(`${this.baseUrl}/provably-fair/my-info`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`}})).json();this.activeClientSeed=d.clientSeed}catch(o){console.error("Failed to load client seed:",o)}finally{this._isLoadingClientSeed=!1}}async changeClientSeed(){let d=await(await fetch(`${this.baseUrl}/provably-fair/client-seed`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`},body:JSON.stringify({clientSeed:this.activeClientSeed})})).json();this.activeClientSeed=d.clientSeed}_handleCopyToClipboard(o){navigator.clipboard.writeText(o)}_handleInputChange(o,d){this.provablyFairData={...this.provablyFairData,[o]:d},this.requestUpdate()}_handleStatusChange(o){this._verifiedStatus=o}_renderClientSeedSection(){return S`
|
|
4756
4756
|
<div class="input-group-item full-width">
|
|
4757
|
-
${this._isLoadingClientSeed?
|
|
4757
|
+
${this._isLoadingClientSeed?S`
|
|
4758
4758
|
<div style="flex: 1;">
|
|
4759
4759
|
<div style="margin-bottom: 8px; font-size: 14px; color: #ffffff;">Active Client Seed</div>
|
|
4760
4760
|
<origami-skeleton height="40px"></origami-skeleton>
|
|
4761
4761
|
</div>
|
|
4762
4762
|
<origami-skeleton width="80px" height="40px"></origami-skeleton>
|
|
4763
|
-
`:
|
|
4763
|
+
`:S`
|
|
4764
4764
|
<origami-input
|
|
4765
4765
|
label="Active Client Seed"
|
|
4766
4766
|
.value=${this.activeClientSeed}
|
|
@@ -4774,7 +4774,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4774
4774
|
<origami-button variant="secondary" @click=${this.changeClientSeed}>Change</origami-button>
|
|
4775
4775
|
`}
|
|
4776
4776
|
</div>
|
|
4777
|
-
`}_renderVerificationInputs(){return
|
|
4777
|
+
`}_renderVerificationInputs(){return S`
|
|
4778
4778
|
<origami-input
|
|
4779
4779
|
label="Public Key"
|
|
4780
4780
|
.placeholder=${"Enter Public Key"}
|
|
@@ -4823,32 +4823,32 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4823
4823
|
<origami-button @button-click=${()=>this._handleCopyToClipboard(this.provablyFairData.proof)} variant=${"secondary"}> ${P1}</origami-button>
|
|
4824
4824
|
</origami-button-group>
|
|
4825
4825
|
</origami-input>
|
|
4826
|
-
`}_renderStatusButton(){switch(this._verifyStatus){case"missing":return
|
|
4826
|
+
`}_renderStatusButton(){switch(this._verifyStatus){case"missing":return S`
|
|
4827
4827
|
<origami-button noPointerEvents variant="secondary" class="full-width" fullWidth>Pending Inputs</origami-button>
|
|
4828
4828
|
<origami-button disabled variant="secondary" class="full-width" fullWidth @click=${()=>this._handleStatusChange("viewing-outcome")}>
|
|
4829
4829
|
View Outcome
|
|
4830
4830
|
</origami-button>
|
|
4831
|
-
`;case"verified":return
|
|
4831
|
+
`;case"verified":return S`
|
|
4832
4832
|
<origami-button noPointerEvents class="full-width" variant="success" fullWidth @click=${()=>this._handleStatusChange("viewing-outcome")}>
|
|
4833
|
-
Provable Fairness Verified ${
|
|
4833
|
+
Provable Fairness Verified ${S3}
|
|
4834
4834
|
</origami-button>
|
|
4835
4835
|
|
|
4836
4836
|
<origami-button variant="secondary" class="full-width" fullWidth @click=${()=>this._handleStatusChange("viewing-outcome")}>
|
|
4837
4837
|
View Outcome
|
|
4838
4838
|
</origami-button>
|
|
4839
|
-
`;case"unverified":return
|
|
4839
|
+
`;case"unverified":return S`
|
|
4840
4840
|
<origami-button variant="danger" class="full-width" noPointerEvents fullWidth>Provable Fairness Unverified</origami-button>
|
|
4841
4841
|
<origami-button class="full-width" disabled variant="secondary" fullWidth @click=${()=>this._handleStatusChange("viewing-outcome")}>
|
|
4842
4842
|
View Outcome
|
|
4843
4843
|
</origami-button>
|
|
4844
|
-
`}}_renderInputtingValues(){return
|
|
4844
|
+
`}}_renderInputtingValues(){return S`
|
|
4845
4845
|
${this._renderVerificationInputs()}
|
|
4846
4846
|
<hr class="divider full-width" />
|
|
4847
4847
|
${this._renderStatusButton()}
|
|
4848
|
-
`}_renderViewingOutcome(){return
|
|
4848
|
+
`}_renderViewingOutcome(){return S`
|
|
4849
4849
|
<origami-game-outcome-display
|
|
4850
4850
|
class="full-width"
|
|
4851
|
-
.gameType=${
|
|
4851
|
+
.gameType=${s3(this.provablyFairData.request)}
|
|
4852
4852
|
.minesData=${this._gameData.mines}
|
|
4853
4853
|
.limboData=${this._gameData.limbo}
|
|
4854
4854
|
.diceData=${this._gameData.dice}
|
|
@@ -4860,13 +4860,13 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4860
4860
|
<origami-button class="full-width" fullWidth variant="secondary" @click=${()=>this._handleStatusChange("inputting-values")}>
|
|
4861
4861
|
Back
|
|
4862
4862
|
</origami-button>
|
|
4863
|
-
`}render(){return
|
|
4863
|
+
`}render(){return S`
|
|
4864
4864
|
${this._renderClientSeedSection()}
|
|
4865
4865
|
|
|
4866
4866
|
<hr class="divider full-width" />
|
|
4867
4867
|
|
|
4868
4868
|
${this._verifiedStatus==="inputting-values"?this._renderInputtingValues():this._renderViewingOutcome()}
|
|
4869
|
-
`}}
|
|
4869
|
+
`}}b([q({type:Object})],U2.prototype,"provablyFairData",void 0),b([O()],U2.prototype,"_verifiedStatus",void 0),b([q({type:String})],U2.prototype,"baseUrl",void 0),b([O()],U2.prototype,"activeClientSeed",void 0),b([O()],U2.prototype,"_isLoadingClientSeed",void 0),b([O()],U2.prototype,"authToken",void 0),U2=b([P("origami-fairness-content")],U2);var n5=(o)=>$d(o)?o._$litType$.h:o.strings,p5=R0(class extends T0{constructor(o){super(o),this.et=new WeakMap}render(o){return[o]}update(o,[d]){let i=Po(this.it)?n5(this.it):null,r=Po(d)?n5(d):null;if(i!==null&&(r===null||i!==r)){let h=u1(o).pop(),a=this.et.get(i);if(a===void 0){let g=document.createDocumentFragment();a=oo(A,g),a.setConnected(!1),this.et.set(i,a)}$1(a,[h]),t0(a,void 0,h)}if(r!==null){if(i===null||i!==r){let h=this.et.get(r);if(h!==void 0){let a=u1(h).pop();Jd(o),t0(o,void 0,a),$1(o,[a])}}this.it=d}else this.it=void 0;return this.render(d)}});class q2 extends k0{constructor(){super(...arguments);this.provablyFairData={publicKey:"",request:"",proof:"",randomness:"",clientSeed:""};this._activeTab="History"}static styles=[B,o5];gameConsumer=new _0(this,{context:i0,subscribe:!0});connectedCallback(){super.connectedCallback(),this._activeTab=this.provablyFairData?.request?"Fairness":"History"}_handleToggleChange(o){let d=o.detail.value;if(d==="Fairness"||d==="History")this._activeTab=d}_renderTabContent(){return p5(this._activeTab==="History"?S`<origami-history-table></origami-history-table>`:S`<origami-fairness-content .baseUrl=${this.gameConsumer.value?.baseUrl??""} .authToken=${this.gameConsumer.value?.authToken??""} .provablyFairData=${this.provablyFairData}></origami-fairness-content>`)}render(){return S`
|
|
4870
4870
|
<div class="fairness-content">
|
|
4871
4871
|
<origami-toggle
|
|
4872
4872
|
option1="History"
|
|
@@ -4877,7 +4877,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
4877
4877
|
|
|
4878
4878
|
${this._renderTabContent()}
|
|
4879
4879
|
</div>
|
|
4880
|
-
`}}
|
|
4880
|
+
`}}b([q({type:Object})],q2.prototype,"provablyFairData",void 0),b([O()],q2.prototype,"_activeTab",void 0),q2=b([P("origami-fairness-details")],q2);var Z5=y`
|
|
4881
4881
|
:host {
|
|
4882
4882
|
display: block;
|
|
4883
4883
|
width: 100%;
|
|
@@ -5073,7 +5073,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5073
5073
|
order: 1;
|
|
5074
5074
|
}
|
|
5075
5075
|
}
|
|
5076
|
-
`;var $5=
|
|
5076
|
+
`;var $5=y`
|
|
5077
5077
|
:host {
|
|
5078
5078
|
display: block;
|
|
5079
5079
|
--success-color: var(--win-success-color, #22c55e);
|
|
@@ -5357,7 +5357,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5357
5357
|
/* transform: scale(0.85); */
|
|
5358
5358
|
}
|
|
5359
5359
|
}
|
|
5360
|
-
`;class c0{authToken;baseUrl;static totalDiceValue=1e4;constructor(o,d){this.authToken=o,this.baseUrl=d+"/games/dice"}async startBet(o){try{let i=await(await fetch(`${this.baseUrl}/play`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`},body:JSON.stringify(o)})).json();if(!i.id)throw new Error("Unknown error");return{success:!0,data:i}}catch(d){return{success:!1,error:d?.message||"Unknown Error"}}}static getMultiplier(o,d){let i=c0.getWinChance(o,d);return
|
|
5360
|
+
`;class c0{authToken;baseUrl;static totalDiceValue=1e4;constructor(o,d){this.authToken=o,this.baseUrl=d+"/games/dice"}async startBet(o){try{let i=await(await fetch(`${this.baseUrl}/play`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`},body:JSON.stringify(o)})).json();if(!i.id)throw new Error("Unknown error");return{success:!0,data:i}}catch(d){return{success:!1,error:d?.message||"Unknown Error"}}}static getMultiplier(o,d){let i=c0.getWinChance(o,d);return s(99).dividedBy(s(i)).toFixed(4)}static getWinChance(o,d){let i=d==="ABOVE"?c0.totalDiceValue-o:o;return s(i).div(c0.totalDiceValue).multipliedBy(100).toFixed(4)}static getSelectedValueFromMultiplier(o,d){let i=s(99).dividedBy(o);return c0.getSelectedValueFromWinChance(i.toNumber(),d)}static getSelectedValueFromWinChance(o,d){let i=s(o).dividedBy(100).multipliedBy(c0.totalDiceValue);if(d==="ABOVE")return c0.totalDiceValue-i.toNumber();return i.toNumber()}static getSelectedValueFromRollOver(o){return c0.totalDiceValue-o}}class W2{betData;constructor(o){this.betData=o}_getDiceData(){if(!this.betData.betActions||this.betData.betActions.length===0)return{resultValue:50,userValue:50,isRollLower:!1,winChance:"50.0000",isDiceWin:!1};let o=this.betData.betActions[0]?.data.DICE,d=this.betData.betActions[this.betData.betActions.length-1]?.data.DICE;if(!d||!o)return{resultValue:50,userValue:50,isRollLower:!1,winChance:"50.0000",isDiceWin:!1};let i=o.direction===Y0.BELOW,r=s(this.betData.multiplier).isGreaterThan(0),h=c0.getWinChance(o.selectedValue,o.direction);return{resultValue:d.result[0],userValue:o.selectedValue,isRollLower:i,winChance:h,isDiceWin:r}}_getMinesData(){if(!this.betData.betActions||this.betData.betActions.length===0)return{mineLocations:[],selectedTiles:[]};let o=this.betData.betActions.map((d)=>{if(!d.data.MINES)return null;return{...d,data:{mines:d.data.MINES},type:d.type}}).filter(Boolean);return{mineLocations:q0.deriveMineLocations(o),selectedTiles:q0.deriveSelectedTiles(o)}}_getKenoData(){if(!this.betData.betActions||this.betData.betActions.length===0)return{selectedNumbers:[],drawnNumbers:[],risk:e.CLASSIC};let o=this.betData.betActions[0]?.data.KENO,d=this.betData.betActions[this.betData.betActions.length-1]?.data.KENO;if(!d||!o)return{selectedNumbers:[],drawnNumbers:[],risk:e.CLASSIC};return{selectedNumbers:o.selectedNumbers,drawnNumbers:d.result,risk:o.riskLevel}}_getLimboData(){if(!this.betData.betActions||this.betData.betActions.length===0)return{resultMultiplier:0,targetMultiplier:0};let o=this.betData.betActions[0]?.data.LIMBO,d=this.betData.betActions[this.betData.betActions.length-1]?.data.LIMBO;if(!d||!o)return{resultMultiplier:0,targetMultiplier:0};return{resultMultiplier:d.randomMultiplier,targetMultiplier:o.targetMultiplier,isWin:Number(d.randomMultiplier)>=Number(o.targetMultiplier)}}getMinesDisplayData(){let{mineLocations:o,selectedTiles:d}=this._getMinesData();return{selectedTiles:d,mineLocations:o}}getLimboDisplayData(){let{resultMultiplier:o,targetMultiplier:d,isWin:i}=this._getLimboData();return{isWin:i||!1,betId:this.betData.id||"123",resultMultiplier:Number(o),betTargetMultiplier:Number(d)}}getDiceDisplayData(){let{resultValue:o,userValue:d,isRollLower:i,isDiceWin:r}=this._getDiceData();return{value:d/100,min:2,max:98,step:1,showDice:!0,disabled:!0,resultValue:o/100,isWin:r,isRollLower:i}}getKenoDisplayData(){let{selectedNumbers:o,drawnNumbers:d}=this._getKenoData();return{selectedTiles:o,resultTiles:d,isPlaying:!1,gameOver:!0,popupShowing:!1}}}var O3=(o)=>{return`${o.gameSlug}-${o.userId}-${o.tenantId}-${o.nonce}-${o.clientSeed}`};class X2 extends N{constructor(){super(...arguments);this.betId="";this.betData=null}static styles=[B,$5];gameConsumer=new _0(this,{context:i0,subscribe:!0});async betIdUpdated(){try{let o=await(await fetch(`${this.gameConsumer.value?.baseUrl}/bet/bet-info?betId=${this.betId}`)).json();this.betData=o}catch{}}_getDataExtractor(){return this.betData?new W2(this.betData):null}_formatAmount(o){let d=Number.parseFloat(o);return Number.isNaN(d)?"0.00":d.toFixed(2)}openVerifyOutcomeModal(){this.emit("open-verify-outcome-modal",{detail:{verifyData:{publicKey:Zo,request:O3({gameSlug:this.gameType.toLowerCase(),userId:this.betData?.userId??"",tenantId:this.betData?.tenantId??"",nonce:this.betData?.nonce.toString()??"",clientSeed:this.betData?.clientSeed??""}),proof:this.betData?.proof??"",randomness:this.betData?.randomValue??"",clientSeed:this.betData?.clientSeed??""}}})}get gameType(){if(!this.betData)return"limbo";let o=Object.keys(this.betData?.betActions?.[0]?.data)?.[0]??Object.keys(this.betData?.betActions?.[1]?.data)?.[0]??"Unknown";return o.charAt(0).toUpperCase()+o.slice(1)}render(){if(!this.betData)return S`
|
|
5361
5361
|
<div class="game-result-modal">
|
|
5362
5362
|
<!-- Modal header skeleton -->
|
|
5363
5363
|
<div class="modal-header">
|
|
@@ -5392,7 +5392,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5392
5392
|
|
|
5393
5393
|
<origami-skeleton height="40px"></origami-skeleton>
|
|
5394
5394
|
</div>
|
|
5395
|
-
`;let o=this._getDataExtractor();if(!o)return
|
|
5395
|
+
`;let o=this._getDataExtractor();if(!o)return S`<div class="error">Failed to load bet data</div>`;let d=this._formatAmount(this.betData.amount),i=this._formatAmount(this.betData.payout),r=this.betData.multiplier?.toFixed(2)??"0.00";return S`
|
|
5396
5396
|
<div class="game-result-modal success">
|
|
5397
5397
|
|
|
5398
5398
|
<div class="game-summary">
|
|
@@ -5429,7 +5429,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5429
5429
|
|
|
5430
5430
|
<origami-button fullWidth class="full-width" @click=${this.openVerifyOutcomeModal}>Verify Outcome</origami-button>
|
|
5431
5431
|
</div>
|
|
5432
|
-
`}}
|
|
5432
|
+
`}}b([q({type:String})],X2.prototype,"betId",void 0),b([O()],X2.prototype,"betData",void 0),b([p0("betId")],X2.prototype,"betIdUpdated",null),X2=b([P("origami-bet-result-modal")],X2);var J5=(o)=>{let{activeElement:d}=document;if(d&&o.contains(d))document.activeElement?.blur()};var Q5=y`
|
|
5433
5433
|
:host {
|
|
5434
5434
|
/* Only variables actually used in the drawer */
|
|
5435
5435
|
--sl-color-neutral-0: hsl(240, 5.9%, 11%);
|
|
@@ -5629,7 +5629,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5629
5629
|
border: solid 1px var(--sl-color-neutral-0);
|
|
5630
5630
|
}
|
|
5631
5631
|
}
|
|
5632
|
-
`;class $o extends
|
|
5632
|
+
`;class $o extends N{constructor(){super(...arguments);this.open=!1;this.label="";this.contained=!1;this.noHeader=!1;this.noCloseButton=!1}static styles=[B,Q5];hasSlotController=new O1(this,"footer");originalTrigger=null;focusTrap=new I1(this);closeWatcher=null;isDragging=!1;startY=0;currentY=0;isCustomClosing=!1;originalHeight=0;firstUpdated(){if(this.drawer.hidden=!this.open,this.open){if(this.addOpenListeners(),!this.contained)this.focusTrap.activate(),Y1(this)}}disconnectedCallback(){super.disconnectedCallback(),w1(this),this.removeOpenListeners(),this.cleanupDragState()}requestClose(o){if(this.emit("drawer-request-close",{cancelable:!0,detail:{source:o}}).defaultPrevented){let i=C0(this,"drawer.denyClose",{dir:""});G0(this.panel,i.keyframes,i.options);return}this.hide()}addOpenListeners(){if("CloseWatcher"in window){if(this.closeWatcher?.destroy(),!this.contained)this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard")}else document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),this.closeWatcher?.destroy()}handleDocumentKeyDown=(o)=>{if(this.contained)return;if(o.key==="Escape"&&this.focusTrap.isActive()&&this.open)o.stopImmediatePropagation(),this.requestClose("keyboard")};handleTouchStart=(o)=>{this.isDragging=!0,this.startY=o.touches[0].clientY,this.currentY=this.startY,this.originalHeight=this.panel.offsetHeight,o.preventDefault()};handleTouchMove=(o)=>{if(!this.isDragging)return;this.currentY=o.touches[0].clientY;let d=this.currentY-this.startY;if(d>0){let i=Math.min(d,200);this.panel.style.transform=`translateY(${i}px)`,this.panel.style.transition="none";let r=Math.max(0.3,1-i/200);this.overlay.style.opacity=r.toString()}else{let i=Math.min(Math.abs(d),100),r=this.originalHeight+i;this.panel.style.transform="",this.panel.style.height=`${r}px`,this.panel.style.transition="none";let h=Math.min(1,1+i/200);this.overlay.style.opacity=h.toString()}o.preventDefault()};handleTouchEnd=()=>{if(!this.isDragging)return;this.isDragging=!1;let o=this.currentY-this.startY;if(o>100)this.closeFromCurrentPosition();else if(o>0)this.panel.style.transition="transform 0.3s ease",this.panel.style.transform="translateY(0)",this.overlay.style.transition="opacity 0.3s ease",this.overlay.style.opacity="1",setTimeout(()=>{this.panel.style.transition="",this.panel.style.transform="",this.overlay.style.transition="",this.overlay.style.opacity=""},300);else this.panel.style.transition="height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)",this.panel.style.height=`${this.originalHeight}px`,this.overlay.style.transition="opacity 0.4s ease",this.overlay.style.opacity="1",setTimeout(()=>{this.panel.style.transition="",this.panel.style.height="",this.overlay.style.transition="",this.overlay.style.opacity=""},400)};handleMouseDown=(o)=>{this.isDragging=!0,this.startY=o.clientY,this.currentY=this.startY,this.originalHeight=this.panel.offsetHeight,document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp),o.preventDefault()};handleMouseMove=(o)=>{if(!this.isDragging)return;this.currentY=o.clientY;let d=this.currentY-this.startY;if(d>0){let i=Math.min(d,200);this.panel.style.transform=`translateY(${i}px)`,this.panel.style.transition="none";let r=Math.max(0.3,1-i/200);this.overlay.style.opacity=r.toString()}else{let i=Math.min(Math.abs(d),100),r=this.originalHeight+i;this.panel.style.transform="",this.panel.style.height=`${r}px`,this.panel.style.transition="none";let h=Math.min(1,1+i/200);this.overlay.style.opacity=h.toString()}};handleMouseUp=()=>{if(!this.isDragging)return;this.isDragging=!1;let o=this.currentY-this.startY,d=100;if(document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),o>d)this.closeFromCurrentPosition();else if(o>0)this.panel.style.transition="transform 0.3s ease",this.panel.style.transform="translateY(0)",this.overlay.style.transition="opacity 0.3s ease",this.overlay.style.opacity="1",setTimeout(()=>{this.panel.style.transition="",this.panel.style.transform="",this.overlay.style.transition="",this.overlay.style.opacity=""},300);else this.panel.style.transition="height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)",this.panel.style.height=`${this.originalHeight}px`,this.overlay.style.transition="opacity 0.4s ease",this.overlay.style.opacity="1",setTimeout(()=>{this.panel.style.transition="",this.panel.style.height="",this.overlay.style.transition="",this.overlay.style.opacity=""},400)};async closeFromCurrentPosition(){let d=this.panel.style.transform.match(/translateY\(([^)]+)\)/)?.[1]||"0px",i=parseFloat(d),r=this.panel.offsetHeight,h=r-i,a=250,g=Math.max(100,h/r*250);if(this.emit("drawer-request-close",{cancelable:!0,detail:{source:"overlay"}}).defaultPrevented){this.panel.style.transition="transform 0.3s ease",this.panel.style.transform="translateY(0)",this.overlay.style.transition="opacity 0.3s ease",this.overlay.style.opacity="1",setTimeout(()=>{this.panel.style.transition="",this.panel.style.transform="",this.overlay.style.transition="",this.overlay.style.opacity=""},300);return}if(this.isCustomClosing=!0,this.emit("drawer-hide"),this.removeOpenListeners(),this.cleanupDragState(),!this.contained)this.focusTrap.deactivate(),w1(this);this.panel.style.transition=`transform ${g}ms ease-out`,this.panel.style.transform=`translateY(${r}px)`,this.overlay.style.transition=`opacity ${g}ms ease-out`,this.overlay.style.opacity="0",setTimeout(async()=>{if(this.drawer.hidden=!0,this.panel.style.transform="",this.panel.style.transition="",this.overlay.style.opacity="",this.overlay.style.transition="",this.open=!1,this.isCustomClosing=!1,typeof this.originalTrigger?.focus==="function")setTimeout(()=>this.originalTrigger?.focus());this.emit("drawer-after-hide")},g)}cleanupDragState(){if(this.isDragging=!1,document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),!this.isCustomClosing&&this.panel)this.panel.style.transform="",this.panel.style.transition="",this.panel.style.height="";if(!this.isCustomClosing&&this.overlay)this.overlay.style.opacity="",this.overlay.style.transition=""}handlePanelWheel=(o)=>{o.stopPropagation();let d=this.panel.querySelector(".drawer__body");if(d)if(!(d.scrollHeight>d.clientHeight))o.preventDefault();else{let r=d.scrollTop>0,h=d.scrollTop<d.scrollHeight-d.clientHeight;if(!r&&o.deltaY<0||!h&&o.deltaY>0)o.preventDefault()}else o.preventDefault()};handlePanelTouchStart=(o)=>{if(!this.isDragging){let d=this.panel.querySelector(".drawer__body");if(d&&o.touches.length>0)d.dataset.prevTouchY=o.touches[0].clientY.toString()}};handlePanelTouchMove=(o)=>{if(!this.isDragging){o.stopPropagation();let d=this.panel.querySelector(".drawer__body");if(d)if(!(d.scrollHeight>d.clientHeight))o.preventDefault();else{let h=o.touches[0].clientY,a=parseFloat(d.dataset.prevTouchY||"0"),g=h-a,l=d.scrollTop>0,x=d.scrollTop<d.scrollHeight-d.clientHeight;if(!l&&g>0||!x&&g<0)o.preventDefault();d.dataset.prevTouchY=h.toString()}else o.preventDefault()}};async handleOpenChange(){if(this.open){if(this.emit("drawer-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,!this.contained)this.focusTrap.activate(),Y1(this);let o=this.querySelector("[autofocus]");if(o)o.removeAttribute("autofocus");await Promise.all([N0(this.drawer),N0(this.overlay)]),this.drawer.hidden=!1,requestAnimationFrame(()=>{if(!this.emit("drawer-initial-focus",{cancelable:!0}).defaultPrevented)if(o)o.focus({preventScroll:!0});else this.panel.focus({preventScroll:!0});if(o)o.setAttribute("autofocus","")});let d=C0(this,"drawer.showBottom",{dir:""}),i=C0(this,"drawer.overlay.show",{dir:""});await Promise.all([G0(this.panel,d.keyframes,d.options),G0(this.overlay,i.keyframes,i.options)]),this.emit("drawer-after-show")}else{if(this.isCustomClosing)return;if(J5(this),this.emit("drawer-hide"),this.removeOpenListeners(),this.cleanupDragState(),!this.contained)this.focusTrap.deactivate(),w1(this);await Promise.all([N0(this.drawer),N0(this.overlay)]);let o=C0(this,"drawer.hideBottom",{dir:""}),d=C0(this,"drawer.overlay.hide",{dir:""});await Promise.all([G0(this.overlay,d.keyframes,d.options).then(()=>{this.overlay.hidden=!0}),G0(this.panel,o.keyframes,o.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1;let i=this.originalTrigger;if(typeof i?.focus==="function")setTimeout(()=>i.focus());this.emit("drawer-after-hide")}}handleNoModalChange(){if(this.open&&!this.contained)this.focusTrap.activate(),Y1(this);if(this.open&&this.contained)this.focusTrap.deactivate(),w1(this)}async show(){if(this.open)return;return this.open=!0,X1(this,"drawer-after-show")}async hide(){if(!this.open)return;return this.open=!1,X1(this,"drawer-after-hide")}render(){return S`
|
|
5633
5633
|
<div
|
|
5634
5634
|
part="base"
|
|
5635
5635
|
class=${o0({drawer:!0,"drawer--open":this.open,"drawer--bottom":!0,"drawer--contained":this.contained,"drawer--fixed":!this.contained,"drawer--has-footer":this.hasSlotController.test("footer")})}
|
|
@@ -5642,8 +5642,8 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5642
5642
|
role="dialog"
|
|
5643
5643
|
aria-modal="true"
|
|
5644
5644
|
aria-hidden=${this.open?"false":"true"}
|
|
5645
|
-
aria-label=${
|
|
5646
|
-
aria-labelledby=${
|
|
5645
|
+
aria-label=${v0(this.noHeader?this.label:void 0)}
|
|
5646
|
+
aria-labelledby=${v0(!this.noHeader?"title":void 0)}
|
|
5647
5647
|
tabindex="0"
|
|
5648
5648
|
@wheel=${this.handlePanelWheel}
|
|
5649
5649
|
@touchstart=${this.handlePanelTouchStart}
|
|
@@ -5657,7 +5657,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5657
5657
|
>
|
|
5658
5658
|
<div class="drawer__drag-handle"></div>
|
|
5659
5659
|
</div>
|
|
5660
|
-
${!this.noHeader?
|
|
5660
|
+
${!this.noHeader?S`
|
|
5661
5661
|
<header part="header" class="drawer__header">
|
|
5662
5662
|
<h2 part="title" class="drawer__title" id="title">
|
|
5663
5663
|
<!-- If there's no label, use an invisible character to prevent the header from collapsing -->
|
|
@@ -5665,7 +5665,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5665
5665
|
</h2>
|
|
5666
5666
|
<div part="header-actions" class="drawer__header-actions">
|
|
5667
5667
|
<slot name="header-actions"></slot>
|
|
5668
|
-
${!this.noCloseButton?
|
|
5668
|
+
${!this.noCloseButton?S`
|
|
5669
5669
|
<button
|
|
5670
5670
|
part="close-button"
|
|
5671
5671
|
exportparts="base:close-button__base"
|
|
@@ -5686,7 +5686,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5686
5686
|
</footer>
|
|
5687
5687
|
</div>
|
|
5688
5688
|
</div>
|
|
5689
|
-
`}}
|
|
5689
|
+
`}}b([w0(".drawer")],$o.prototype,"drawer",void 0),b([w0(".drawer__panel")],$o.prototype,"panel",void 0),b([w0(".drawer__overlay")],$o.prototype,"overlay",void 0),b([q({type:Boolean,reflect:!0})],$o.prototype,"open",void 0),b([q({reflect:!0})],$o.prototype,"label",void 0),b([q({type:Boolean,reflect:!0})],$o.prototype,"contained",void 0),b([q({attribute:"no-header",type:Boolean,reflect:!0})],$o.prototype,"noHeader",void 0),b([q({attribute:"no-close-button",type:Boolean,reflect:!0})],$o.prototype,"noCloseButton",void 0),b([p0("open",{waitUntilFirstUpdate:!0})],$o.prototype,"handleOpenChange",null),b([p0("contained",{waitUntilFirstUpdate:!0})],$o.prototype,"handleNoModalChange",null),$o=b([P("origami-drawer")],$o);H0("drawer.showTop",{keyframes:[{opacity:0,translate:"0 -100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}});H0("drawer.hideTop",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 -100%"}],options:{duration:250,easing:"ease"}});H0("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}});H0("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}});H0("drawer.showBottom",{keyframes:[{opacity:0,translate:"0 100%"},{opacity:1,translate:"0 0"}],options:{duration:250,easing:"ease"}});H0("drawer.hideBottom",{keyframes:[{opacity:1,translate:"0 0"},{opacity:0,translate:"0 100%"}],options:{duration:250,easing:"ease"}});H0("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}});H0("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}});H0("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}});H0("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});H0("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});var H5=y`
|
|
5690
5690
|
:host {
|
|
5691
5691
|
display: contents;
|
|
5692
5692
|
}
|
|
@@ -5708,7 +5708,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5708
5708
|
display: none;
|
|
5709
5709
|
}
|
|
5710
5710
|
}
|
|
5711
|
-
`;class I2 extends
|
|
5711
|
+
`;class I2 extends N{constructor(){super(...arguments);this.showFooter=!0;this.open=!1;this.label=""}static styles=[B,H5];handleCloseEvent(){this.emit("responsive-modal-close")}render(){return S`
|
|
5712
5712
|
<origami-modal
|
|
5713
5713
|
no-header
|
|
5714
5714
|
class="hide-on-mobile"
|
|
@@ -5728,7 +5728,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5728
5728
|
>
|
|
5729
5729
|
<slot name="mobile-content"></slot>
|
|
5730
5730
|
</origami-drawer>
|
|
5731
|
-
`}}
|
|
5731
|
+
`}}b([q({type:Boolean})],I2.prototype,"showFooter",void 0),b([q({type:Boolean,reflect:!0})],I2.prototype,"open",void 0),b([q({type:String})],I2.prototype,"label",void 0),I2=b([P("origami-responsive-modal")],I2);var k5=y`
|
|
5732
5732
|
:host {
|
|
5733
5733
|
position: absolute;
|
|
5734
5734
|
top: 12px;
|
|
@@ -5760,7 +5760,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5760
5760
|
max-width: 320px;
|
|
5761
5761
|
}
|
|
5762
5762
|
}
|
|
5763
|
-
`;var Y5=
|
|
5763
|
+
`;var Y5=y`
|
|
5764
5764
|
:host {
|
|
5765
5765
|
display: block;
|
|
5766
5766
|
width: 275px;
|
|
@@ -5916,15 +5916,15 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5916
5916
|
opacity: 0;
|
|
5917
5917
|
}
|
|
5918
5918
|
}
|
|
5919
|
-
`;var P3=
|
|
5919
|
+
`;var P3=f0`
|
|
5920
5920
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
5921
5921
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.22821 4.66528L12 1.47557L14.7718 4.66528L18.9447 4.00323L19.0175 8.22828L22.6401 10.4038L19.98 13.6871L21.3567 17.6821L17.2085 18.4875L15.6951 22.4328L12 20.3833L8.30494 22.4328L6.79152 18.4875L2.64329 17.6821L4.02 13.6871L1.35989 10.4038L4.98246 8.22828L5.05533 4.00323L9.22821 4.66528ZM15.9139 10.5L14.4997 9.08579L11 12.5855L9.49497 11.0855L8.08545 12.5L11 15.4142L15.9139 10.5Z" fill="white"/>
|
|
5922
5922
|
</svg>
|
|
5923
|
-
`,D3=
|
|
5923
|
+
`,D3=f0`
|
|
5924
5924
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 17" fill="none">
|
|
5925
5925
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.41421 2.5L7.91423 7L12.4142 2.5L13.8284 3.91421L9.32843 8.41419L13.8284 12.9142L12.4142 14.3284L7.91423 9.82839L3.41421 14.3284L2 12.9142L6.5 8.41419L2 3.91421L3.41421 2.5Z" fill="#B3B3B3"/>
|
|
5926
5926
|
</svg>
|
|
5927
|
-
`;class K2 extends
|
|
5927
|
+
`;class K2 extends N{constructor(){super(...arguments);this.type="success";this.message="";this.autoCloseDelay=0;this.flipToRefreshTimer=!1;this.isHiding=!1;this.isPaused=!1;this.progressWidth=100}static styles=[B,Y5];timer;remainingTime=0;updateInterval=50;connectedCallback(){super.connectedCallback(),this.initializeTimer(this.autoCloseDelay)}disconnectedCallback(){super.disconnectedCallback(),this.clearTimer()}handleAutoCloseDelayChange(){if(this.autoCloseDelay>0)this.isHiding=!0,setTimeout(()=>{this.isHiding=!1,this.clearTimer(),this.initializeTimer(this.autoCloseDelay)},300)}initializeTimer(o){if(o>0)this.remainingTime=o,this.progressWidth=100,this.startTimer()}startTimer(){if(this.clearTimer(),this.remainingTime<=0){this.handleClose();return}this.timer=setTimeout(()=>{if(!this.isPaused)if(this.remainingTime-=this.updateInterval,this.progressWidth=Math.max(0,this.remainingTime/this.autoCloseDelay*100),this.remainingTime<=0)this.handleClose();else this.startTimer();else this.startTimer()},this.updateInterval)}clearTimer(){if(this.timer)clearTimeout(this.timer),this.timer=void 0}handleMouseEnter(){this.isPaused=!0}handleMouseLeave(){this.isPaused=!1}handleClose(){this.isHiding=!0,setTimeout(()=>{this.emit("alert-close",{detail:{id:this.id}})},300)}render(){return S`
|
|
5928
5928
|
<div
|
|
5929
5929
|
class="alert alert-${this.type} ${this.isHiding?"alert-hiding":""}"
|
|
5930
5930
|
@mouseenter=${this.handleMouseEnter}
|
|
@@ -5936,21 +5936,21 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5936
5936
|
|
|
5937
5937
|
<div class="alert-content">
|
|
5938
5938
|
<span class="alert-message">${this.message}</span>
|
|
5939
|
-
${this.autoCloseDelay>0?
|
|
5939
|
+
${this.autoCloseDelay>0?S`
|
|
5940
5940
|
<div
|
|
5941
5941
|
class="alert-progress"
|
|
5942
5942
|
style="transform: scaleX(${this.progressWidth/100})"
|
|
5943
5943
|
></div>
|
|
5944
|
-
`:
|
|
5944
|
+
`:A}
|
|
5945
5945
|
<button class="alert-close" @click=${this.handleClose} aria-label="Close alert">
|
|
5946
5946
|
${D3}
|
|
5947
5947
|
</button>
|
|
5948
5948
|
</div>
|
|
5949
5949
|
|
|
5950
5950
|
</div>
|
|
5951
|
-
`}}
|
|
5951
|
+
`}}b([q({type:String})],K2.prototype,"type",void 0),b([q({type:String})],K2.prototype,"message",void 0),b([q({type:Number})],K2.prototype,"autoCloseDelay",void 0),b([q({type:Boolean})],K2.prototype,"flipToRefreshTimer",void 0),b([O()],K2.prototype,"isHiding",void 0),b([O()],K2.prototype,"isPaused",void 0),b([O()],K2.prototype,"progressWidth",void 0),b([p0("flipToRefreshTimer",{waitUntilFirstUpdate:!0})],K2.prototype,"handleAutoCloseDelayChange",null),K2=b([P("origami-alert")],K2);var _5=(o,d,i)=>{let r=new Map;for(let h=d;h<=i;h++)r.set(o[h],h);return r},Jo=R0(class extends T0{constructor(o){if(super(o),o.type!==K0.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,d,i){let r;i===void 0?i=d:d!==void 0&&(r=d);let h=[],a=[],g=0;for(let l of o)h[g]=r?r(l,g):g,a[g]=i(l,g),g++;return{values:a,keys:h}}render(o,d,i){return this.dt(o,d,i).values}update(o,[d,i,r]){let h=u1(o),{values:a,keys:g}=this.dt(d,i,r);if(!Array.isArray(h))return this.ut=g,a;let l=this.ut??=[],x=[],f,n,_=0,v=h.length-1,Y=0,H=a.length-1;for(;_<=v&&Y<=H;)if(h[_]===null)_++;else if(h[v]===null)v--;else if(l[_]===g[Y])x[Y]=l1(h[_],a[Y]),_++,Y++;else if(l[v]===g[H])x[H]=l1(h[v],a[H]),v--,H--;else if(l[_]===g[H])x[H]=l1(h[_],a[H]),t0(o,x[H+1],h[_]),_++,H--;else if(l[v]===g[Y])x[Y]=l1(h[v],a[Y]),t0(o,h[_],h[v]),v--,Y++;else if(f===void 0&&(f=_5(g,Y,H),n=_5(l,_,v)),f.has(l[_]))if(f.has(l[v])){let $=n.get(g[Y]),I=$!==void 0?h[$]:null;if(I===null){let Z=t0(o,h[_]);l1(Z,a[Y]),x[Y]=Z}else x[Y]=l1(I,a[Y]),t0(o,h[_],I),h[$]=null;Y++}else ho(h[v]),v--;else ho(h[_]),_++;for(;Y<=H;){let $=t0(o,x[H+1]);l1($,a[Y]),x[Y++]=$}for(;_<=v;){let $=h[_++];$!==null&&ho($)}return this.ut=g,$1(o,x),U0}});class V2 extends N{constructor(){super(...arguments);this.alerts=[]}static styles=[B,k5];addAlert(o){let d=o.id,i={autoCloseDelay:5000,showCloseButton:!0,flipToRefreshTimer:!1,...o},r=this.alerts.findIndex((h)=>h.id===d);if(r!==-1)this.alerts=[...this.alerts.slice(0,r),{...i,flipToRefreshTimer:!i.flipToRefreshTimer},...this.alerts.slice(r+1)];else this.alerts=[...this.alerts,i];return d}clearAllAlerts(){this.alerts=[]}handleAlertClose(o){this.alerts=this.alerts.filter((d)=>d.id!==o.detail.id)}render(){if(this.alerts.length===0)return A;return S`
|
|
5952
5952
|
<div class="alert-manager" @alert-close=${this.handleAlertClose}>
|
|
5953
|
-
${Jo(this.alerts,(o)=>o.id,(o)=>
|
|
5953
|
+
${Jo(this.alerts,(o)=>o.id,(o)=>S`
|
|
5954
5954
|
<origami-alert
|
|
5955
5955
|
key=${o.id}
|
|
5956
5956
|
id=${o.id}
|
|
@@ -5961,14 +5961,14 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
5961
5961
|
></origami-alert>
|
|
5962
5962
|
`)}
|
|
5963
5963
|
</div>
|
|
5964
|
-
`}}
|
|
5964
|
+
`}}b([O()],V2.prototype,"alerts",void 0),V2=b([P("origami-alert-manager")],V2);var N3={publicKey:Zo,request:"",proof:"",randomness:"",clientSeed:""};class F2 extends N{constructor(){super(...arguments);this.gameType="keno";this.showFooter=!0;this.betResultModalId=null;this.provablyFairModalData=null}static styles=[B,Z5];resizeObserver;firstUpdated(){this.setupMainWidthObserver()}setupMainWidthObserver(){if(!this.gameLayoutMain)return;this.resizeObserver=new ResizeObserver((o)=>{for(let d of o){let i=d.contentRect.width;if(i!==this.gameData?.mainWidth)this.gameData?.updateMainWidth(i)}}),this.resizeObserver.observe(this.gameLayoutMain),this.gameData?.updateMainWidth(this.gameLayoutMain.clientWidth)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}renderBetResultModal(o){if(!this.betResultModalId)return A;return S`
|
|
5965
5965
|
<origami-bet-result-modal
|
|
5966
5966
|
slot=${o}
|
|
5967
5967
|
.betId=${this.betResultModalId}
|
|
5968
5968
|
></origami-bet-result-modal>
|
|
5969
|
-
`}renderFairnessModal(o){if(!this.provablyFairModalData)return
|
|
5969
|
+
`}renderFairnessModal(o){if(!this.provablyFairModalData)return A;return S`
|
|
5970
5970
|
<origami-fairness-details slot=${o} .provablyFairData=${this.provablyFairModalData}></origami-fairness-details>
|
|
5971
|
-
`}openVerifyOutcomeModal(o){this.betResultModalId=null,this.provablyFairModalData=o.detail.verifyData}render(){return
|
|
5971
|
+
`}openVerifyOutcomeModal(o){this.betResultModalId=null,this.provablyFairModalData=o.detail.verifyData}render(){return S`
|
|
5972
5972
|
<div class=${o0({"game-layout-container":!0,"theatre-mode":this.gameData?.isTheatreMode??!1})}
|
|
5973
5973
|
@open-verify-outcome-modal=${(o)=>{this.provablyFairModalData=o.detail.verifyData}}
|
|
5974
5974
|
@open-bet-result-modal=${(o)=>{this.provablyFairModalData=null,this.betResultModalId=o.detail.betId}}
|
|
@@ -6012,9 +6012,9 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6012
6012
|
${this.renderFairnessModal("desktop-content")}
|
|
6013
6013
|
</origami-responsive-modal>
|
|
6014
6014
|
|
|
6015
|
-
${this.showFooter?
|
|
6015
|
+
${this.showFooter?S`<origami-footer @footer-provably-fair-click=${()=>this.provablyFairModalData=N3}></origami-footer>`:A}
|
|
6016
6016
|
</div>
|
|
6017
|
-
`}}
|
|
6017
|
+
`}}b([l0({context:i0,subscribe:!0})],F2.prototype,"gameData",void 0),b([q({type:String})],F2.prototype,"gameType",void 0),b([q({type:Boolean})],F2.prototype,"showFooter",void 0),b([w0("#alert-manager")],F2.prototype,"alertManager",void 0),b([w0(".game-layout-main")],F2.prototype,"gameLayoutMain",void 0),b([O()],F2.prototype,"betResultModalId",void 0),b([O()],F2.prototype,"provablyFairModalData",void 0),F2=b([P("origami-game-layout")],F2);var U5=y`
|
|
6018
6018
|
:host {
|
|
6019
6019
|
display: none;
|
|
6020
6020
|
}
|
|
@@ -6058,7 +6058,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6058
6058
|
min-width: 0;
|
|
6059
6059
|
}
|
|
6060
6060
|
}
|
|
6061
|
-
`;class j2 extends
|
|
6061
|
+
`;class j2 extends N{constructor(){super(...arguments);this.selectedValue=50;this.diceDirection=Y0.ABOVE;this.disabled=!1;this.winChanceInputFocused=!1;this.multiplierInputFocused=!1;this.winChanceInputValue="50.0000";this.multiplierInputValue="1.9800"}static styles=[B,U5];handleMultiplierBlur(){this.multiplierInputValue=c0.getMultiplier(this.selectedValue,this.diceDirection)}handleWinChanceBlur(){this.winChanceInputValue=c0.getWinChance(this.selectedValue,this.diceDirection)}updated(o){if(o.has("selectedValue")||o.has("diceDirection")){if(!this.multiplierInputFocused)this.multiplierInputValue=c0.getMultiplier(this.selectedValue,this.diceDirection);if(!this.winChanceInputFocused)this.winChanceInputValue=c0.getWinChance(this.selectedValue,this.diceDirection)}}render(){let o=this.multiplierInputFocused&&(this.multiplierInputValue===""||+this.multiplierInputValue<1.0102||+this.multiplierInputValue>9900)?"Must be between 1.0102 and 9900":"",d=this.winChanceInputFocused&&(this.winChanceInputValue===""||+this.winChanceInputValue<0.01||+this.winChanceInputValue>98)?"Must be between 0.01 and 98":"";return S`
|
|
6062
6062
|
<origami-input
|
|
6063
6063
|
tooltipOffset=${0}
|
|
6064
6064
|
class="stat-input multiplier"
|
|
@@ -6085,7 +6085,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6085
6085
|
.label=${this.diceDirection===Y0.ABOVE?"Roll Over":"Roll Under"}
|
|
6086
6086
|
type="text"
|
|
6087
6087
|
?disabled=${this.disabled}
|
|
6088
|
-
.value=${
|
|
6088
|
+
.value=${s(this.selectedValue/100).toFixed(2)}
|
|
6089
6089
|
@click=${(i)=>{if(!this.disabled)i.preventDefault(),this.emit("dice-roll-over-toggle")}}
|
|
6090
6090
|
style="cursor: ${this.disabled?"not-allowed":"pointer"};"
|
|
6091
6091
|
>
|
|
@@ -6116,7 +6116,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6116
6116
|
slot="right-icon"
|
|
6117
6117
|
></lottie-icon>
|
|
6118
6118
|
</origami-input>
|
|
6119
|
-
`}}
|
|
6119
|
+
`}}b([q({type:Number})],j2.prototype,"selectedValue",void 0),b([q({type:String})],j2.prototype,"diceDirection",void 0),b([q({type:Boolean})],j2.prototype,"disabled",void 0),b([O()],j2.prototype,"winChanceInputFocused",void 0),b([O()],j2.prototype,"multiplierInputFocused",void 0),b([O()],j2.prototype,"winChanceInputValue",void 0),b([O()],j2.prototype,"multiplierInputValue",void 0),j2=b([P("origami-dice-content-bottom")],j2);var q5=y`
|
|
6120
6120
|
:host {
|
|
6121
6121
|
display: flex;
|
|
6122
6122
|
flex-direction: column;
|
|
@@ -6141,7 +6141,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6141
6141
|
.profit-input {
|
|
6142
6142
|
cursor: help;
|
|
6143
6143
|
}
|
|
6144
|
-
`;class G2 extends
|
|
6144
|
+
`;class G2 extends N{constructor(){super(...arguments);this.isPlaying=!1;this.profitOnWin="0.00";this.betDisabled=!1;this.currency="USDC";this.inputsDisabled=!1;this.isBetAmountValid=!0}static styles=[B,q5];render(){return S`
|
|
6145
6145
|
<div>
|
|
6146
6146
|
<origami-bet-amount-input
|
|
6147
6147
|
?disabled=${this.inputsDisabled}
|
|
@@ -6177,7 +6177,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6177
6177
|
Place Bet
|
|
6178
6178
|
</origami-button>
|
|
6179
6179
|
</div>
|
|
6180
|
-
`}}
|
|
6180
|
+
`}}b([q({type:Boolean})],G2.prototype,"isPlaying",void 0),b([q({type:String})],G2.prototype,"profitOnWin",void 0),b([q({type:Boolean})],G2.prototype,"betDisabled",void 0),b([q({type:String})],G2.prototype,"currency",void 0),b([q({type:Boolean})],G2.prototype,"inputsDisabled",void 0),b([l0({context:i0,subscribe:!0})],G2.prototype,"gameData",void 0),b([O()],G2.prototype,"isBetAmountValid",void 0),G2=b([P("origami-dice-manual")],G2);class C2 extends N{constructor(){super(...arguments);this.inputsDisabled=!1;this.autobetStopping=!1;this.autobetInProgress=!1;this.profitOnWin="0.00";this.betDisabled=!1;this.isDesktop=!1}render(){return S`
|
|
6181
6181
|
<origami-generic-autobet
|
|
6182
6182
|
data-is-desktop=${this.isDesktop}
|
|
6183
6183
|
?inputsDisabled=${this.inputsDisabled}
|
|
@@ -6187,7 +6187,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6187
6187
|
?betDisabled=${this.betDisabled}
|
|
6188
6188
|
>
|
|
6189
6189
|
</origami-generic-autobet>
|
|
6190
|
-
`}}
|
|
6190
|
+
`}}b([q({type:Boolean})],C2.prototype,"inputsDisabled",void 0),b([q({type:Boolean})],C2.prototype,"autobetStopping",void 0),b([q({type:Boolean})],C2.prototype,"autobetInProgress",void 0),b([q({type:String})],C2.prototype,"profitOnWin",void 0),b([q({type:Boolean})],C2.prototype,"betDisabled",void 0),b([q({type:Boolean})],C2.prototype,"isDesktop",void 0),C2=b([P("origami-dice-auto")],C2);var W5=y`
|
|
6191
6191
|
:host {
|
|
6192
6192
|
height: 250px;
|
|
6193
6193
|
display: grid;
|
|
@@ -6202,7 +6202,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6202
6202
|
grid-template-rows: auto 1fr auto;
|
|
6203
6203
|
padding-bottom: 0;
|
|
6204
6204
|
}
|
|
6205
|
-
`;var X5=
|
|
6205
|
+
`;var X5=y`
|
|
6206
6206
|
:host {
|
|
6207
6207
|
display: block;
|
|
6208
6208
|
--history-pill-primary-color: #00e701;
|
|
@@ -6313,7 +6313,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6313
6313
|
font-size: var(--pill-font-size);
|
|
6314
6314
|
visibility: hidden;
|
|
6315
6315
|
}
|
|
6316
|
-
`;class L2 extends
|
|
6316
|
+
`;class L2 extends N{constructor(){super(...arguments);this.history=[];this.gameType="mines";this.animatingInIds=new Set}static styles=[B,X5];updated(o){if(super.updated(o),o.has("history"))this.handleHistoryChange(o.get("history"))}handleHistoryChange(o){let d=this.history.filter((i)=>!o.includes(i));this.animatingInIds=new Set([...this.animatingInIds,...d.map((i)=>i.id)])}handleAnimationEnd(o,d){if(o.animationName==="slideInFromRight"&&this.animatingInIds.has(d.id))this.animatingInIds=new Set([...this.animatingInIds].filter((i)=>i!==d.id))}formatMultiplier(o){return o.toFixed(2)}renderHistoryPill(o){let d={"history-pill":!0,"history-pill-won":o.won,"slide-in":this.animatingInIds.has(o.id)},i=this.gameType==="dice"?this.formatMultiplier(o.multiplier):`${this.formatMultiplier(o.multiplier)}X`;return S`
|
|
6317
6317
|
<div
|
|
6318
6318
|
class=${o0(d)}
|
|
6319
6319
|
@click=${()=>this.handleHistoryPillClick(o)}
|
|
@@ -6321,9 +6321,9 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6321
6321
|
>
|
|
6322
6322
|
${i}
|
|
6323
6323
|
</div>
|
|
6324
|
-
`}handleHistoryPillClick(o){this.emit("open-bet-result-modal",{detail:{betId:o.id}})}render(){return
|
|
6324
|
+
`}handleHistoryPillClick(o){this.emit("open-bet-result-modal",{detail:{betId:o.id}})}render(){return S`
|
|
6325
6325
|
${Jo(this.history,(o)=>o.id,(o)=>this.renderHistoryPill(o))}
|
|
6326
|
-
`}}
|
|
6326
|
+
`}}b([q({type:Array})],L2.prototype,"history",void 0),b([q({type:String})],L2.prototype,"gameType",void 0),b([O()],L2.prototype,"animatingInIds",void 0),L2=b([P("origami-history-pills")],L2);class u2 extends N{constructor(){super(...arguments);this.selectedValue=50;this.diceDirection=Y0.ABOVE;this.isPlaying=!1;this.showDice=!0;this.isWin=!0;this.resultValue=null;this.history=[];this.isDesktop=!1}static styles=[B,W5];render(){return S`
|
|
6327
6327
|
<origami-history-pills
|
|
6328
6328
|
data-is-desktop=${this.isDesktop}
|
|
6329
6329
|
.gameType=${"dice"}
|
|
@@ -6349,7 +6349,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6349
6349
|
.selectedValue=${this.selectedValue}
|
|
6350
6350
|
.diceDirection=${this.diceDirection}
|
|
6351
6351
|
></origami-dice-content-bottom>
|
|
6352
|
-
`}}
|
|
6352
|
+
`}}b([q({type:Number})],u2.prototype,"selectedValue",void 0),b([q({type:String})],u2.prototype,"diceDirection",void 0),b([q({type:Boolean})],u2.prototype,"isPlaying",void 0),b([q({type:Boolean})],u2.prototype,"showDice",void 0),b([q({type:Boolean})],u2.prototype,"isWin",void 0),b([q({type:Number})],u2.prototype,"resultValue",void 0),b([q({type:Array})],u2.prototype,"history",void 0),b([q({type:Boolean})],u2.prototype,"isDesktop",void 0),u2=b([P("origami-dice-content")],u2);var b1=(o)=>{if(o===1)return"Draw";if(o>1)return"Win";return"Loss"};function n0(o){return new Promise((d)=>setTimeout(d,o))}class e0 extends N{constructor(){super(...arguments);this.manualOrAuto="Manual";this.hasPendingBet=!1;this.autobetInProgress=!1;this.autobetStopping=!1}static soundsToPreload=[];static styles=[B];gameConsumer=new _0(this,{context:i0,subscribe:!0});get gameData(){return this.gameConsumer.value}get isToggleDisabled(){return this.autobetInProgress||this.hasPendingBet}get areInputsDisabled(){return this.autobetInProgress||this.hasPendingBet}getDelay(o){return this.gameData?.instantBetEnabled?Math.min(o/10,20):o}async forceUIUpdate(){this.requestUpdate(),await new Promise((o)=>setTimeout(o,0))}async executeInstantOrAnimated(o,d){if(this.gameData?.instantBetEnabled){let i=await o();return await this.forceUIUpdate(),i}else return await d()}async ensureMinimumDisplayTime(o=!1,d=500,i=500){if(this.gameData?.instantBetEnabled)await this.forceUIUpdate(),await n0(o?d:i)}firstUpdated(){this.constructor.soundsToPreload.forEach((d)=>{this.gameData?.soundController?.preload(d)})}async toggleAutobet(o){if(this.autobetInProgress){this.autobetStopping=!0;return}let d=o.detail;this.autobetStopping=!1,this.autobetInProgress=!0;let i=this.gameData?.amount??"0",r=s(0),h=i;try{this.hasPendingBet=!0;let a=!0;while(a&&!this.autobetStopping){let g=await this.executeAutobet(d,h);if(g.hasError){if(g.errorMessage)this.emit("show-alert",{detail:{type:"error",message:g.errorMessage}});else this.emit("show-alert",{detail:{type:"error",message:"An error occurred during autobet"}});a=!1;continue}if(r=r.plus(g.pnl),h=this.adjustBetAmount(d,g.gameOutcome,i,h),this.gameData?.updateBalance(s(h)),!this.isPnLWithinLimits(d,r)){a=!1;continue}if(this.gameData?.autobetNumberOfBets===0){a=!0;continue}this.gameData?.updateAutobetNumberOfBets(this.gameData?.autobetNumberOfBets-1),a=!Number.isNaN(this.gameData?.autobetNumberOfBets)&&!!this.gameData?.autobetNumberOfBets&&this.gameData?.autobetNumberOfBets>0}}catch(a){console.error("Error occurred in toggle autobet",a),this.emit("show-alert",{detail:{type:"error",message:"An unexpected error occurred"}})}finally{this.autobetInProgress=!1,this.hasPendingBet=!1,this.autobetStopping=!1}}adjustBetAmount(o,d,i,r){if(d==="Draw")return r;if(o.onWinStrategy==="Reset"&&d==="Win"||o.onLossStrategy==="Reset"&&d==="Loss")return i;let h=d==="Win"?o.onWinPercentage:o.onLossPercentage,a=s(h).dividedBy(100).plus(1);return s(r).multipliedBy(a).toFixed(2)}isPnLWithinLimits(o,d){let i=!s(o.stopOnLoss).eq(0)&&s(d).negated().gte(o.stopOnLoss),r=!s(o.stopOnProfit).eq(0)&&d.gte(o.stopOnProfit);return!i&&!r}}b([O()],e0.prototype,"manualOrAuto",void 0),b([O()],e0.prototype,"hasPendingBet",void 0),b([O()],e0.prototype,"autobetInProgress",void 0),b([O()],e0.prototype,"autobetStopping",void 0);class Qo{static getRandomValueInRange(o,d){return Math.floor(Math.random()*(d-o+1))+o}async startBet(o){let{amount:d,direction:i,selectedValue:r}=o,h=Qo.getRandomValueInRange(0,1e4),a=0;if(h>r)if(i===Y0.ABOVE)a=s(c0.getMultiplier(r,i)).toNumber();else a=0;else if(i===Y0.BELOW)a=s(c0.getMultiplier(r,i)).toNumber();else a=0;let g=s(d).multipliedBy(a).toString(),l={id:crypto.randomUUID(),tenantId:"origami-casino",userId:"mock-user",gameId:"dice",currency:"USDC",amount:d,payout:g,afterBalance:"1000",maxPayoutReached:!1,multiplier:a,clientSeed:"mock-seed",randomValue:"mock-random",proof:"mock-proof",nonce:1,completedAt:new Date().toISOString(),betActions:[{id:crypto.randomUUID(),data:{DICE:{direction:i,selectedValue:r}},type:"START_BET",actionIndex:0,originalActionId:null,betAmount:d,payoutAmount:"0",betId:crypto.randomUUID(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),webhookId:crypto.randomUUID()},{id:crypto.randomUUID(),data:{DICE:{result:[h]}},type:"END_BET",actionIndex:1,originalActionId:null,betAmount:"0",payoutAmount:g,betId:crypto.randomUUID(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),webhookId:crypto.randomUUID()}]};return await n0(250),{success:!0,data:l}}}class Ho extends e0{get isToggleDisabled(){return this.isManualPlaying||this.autobetInProgress||this.autobetStopping}get areInputsDisabled(){return this.isManualPlaying||this.autobetInProgress||this.autobetStopping}firstUpdated(){this.gameData?.soundController?.preload("https://assets.betorigami.com/sounds/dice/roll.mp3"),this.gameData?.soundController?.preload("win")}isSpacebarDisabled=()=>{if(!this.gameData?.hotkeysOpenEnabled)return!0;if(this.manualOrAuto==="Manual")return this._diceManualEl?.shadowRoot?.querySelector("origami-button")?.disabled??!0;else return this._diceAutoEl?.shadowRoot?.querySelector("origami-generic-autobet")?.shadowRoot?.querySelector(".bet-btn")?.disabled??!0};handleSpacebar=()=>{if(this.isSpacebarDisabled())return;if(this.manualOrAuto==="Manual")this.dicePlay();else{let d=this._diceAutoEl?.shadowRoot?.querySelector("origami-generic-autobet")?.shadowRoot?.querySelector(".bet-btn");if(d instanceof HTMLElement)d.click()}};diceRollOverToggle=()=>{this.diceDirection=this.diceDirection===Y0.ABOVE?Y0.BELOW:Y0.ABOVE,this.selectedValue=c0.getSelectedValueFromRollOver(this.selectedValue)};constructor(){super();this.diceDirection=Y0.ABOVE;this.selectedValue=5000;this.isManualPlaying=!1;this.showDice=!1;this.isWin=!0;this.resultValue=null;this.history=[];new s0(this,[{key:" ",callback:this.handleSpacebar.bind(this),options:{repeat:!0,repeatInterval:200,disabled:this.isSpacebarDisabled}},{key:"q",callback:this.diceRollOverToggle.bind(this),options:{disabled:()=>this.isManualPlaying||this.autobetInProgress||this.autobetStopping||!this.gameData?.hotkeysOpenEnabled}},{key:"w",callback:this.decreaseSlider.bind(this),options:{repeat:!0,repeatInterval:200,disabled:()=>this.isManualPlaying||this.autobetInProgress||this.autobetStopping||!this.gameData?.hotkeysOpenEnabled}},{key:"e",callback:this.increaseSlider.bind(this),options:{repeat:!0,repeatInterval:200,disabled:()=>this.isManualPlaying||this.autobetInProgress||this.autobetStopping||!this.gameData?.hotkeysOpenEnabled}}])}decreaseSlider(){this.selectedValue=Math.max(5,this.selectedValue-100)}increaseSlider(){this.selectedValue=Math.min(9995,this.selectedValue+100)}get diceApi(){return!!this.gameData.authToken&&!!this.gameData.baseUrl?new c0(this.gameData.authToken,this.gameData.baseUrl??""):new Qo}async dicePlay(){this.isManualPlaying=!0,this.showDice=!1,this.gameData?.soundController?.play("bet").catch((o)=>console.error(o));try{let o=await this.handleBetExecution(this.gameData.amount);if(!o.success)console.error(o.error)}catch(o){console.error("Error in dicePlay:",o)}finally{this.isManualPlaying=!1}}async handleBetExecution(o){if(!this.gameData.currency)throw new Error("Currency is not set");let d={amount:o,currency:this.gameData.currency,direction:this.diceDirection,selectedValue:this.selectedValue},i=await this.diceApi.startBet(d);if(i.success){if(this.gameData.soundController?.play("dice-roll").catch((l)=>{console.error("Failed to play sound:",l)}),this.isWin=s(i.data.multiplier).isGreaterThan(0),this.isWin)setTimeout(()=>{this.gameData.soundController?.play("win").catch((l)=>{console.error("Failed to play sound:",l)})},300);this.emit("balance-change",{detail:{balance:Number(i.data.afterBalance),currency:this.gameData.currency}}),this.showDice=!0;let{betActions:r}=i.data,h=r[r.length-1];if(!h)throw new Error("No action data received");let{result:a}=h.data.DICE,g=a[0];this.resultValue=g,this.addToHistory(g/100,this.isWin,i.data.id??"")}return i}addToHistory(o,d,i){let r=[...this.history,{multiplier:o,won:d,id:i}];this.history=r}async executeAutobet(o,d){try{let i=await this.handleBetExecution(d);if(!i.success)return{pnl:s(0),gameOutcome:"Draw",hasError:!0,errorMessage:i.error||"Error processing bet"};let r=i.data,h=s(r.payout).minus(r.amount),a=b1(r.multiplier);return{pnl:h,gameOutcome:a,hasError:!1}}catch(i){return console.error("Error in executeAutobet:",i),{pnl:s(0),gameOutcome:"Draw",hasError:!0,errorMessage:"An unexpected error occurred"}}}sliderInputChange=(o)=>{this.selectedValue=o.detail.value*100};diceMultiplierChange=(o)=>{let d=+o.detail.multiplier;if(!Number.isNaN(d)&&d>0)this.selectedValue=c0.getSelectedValueFromMultiplier(d,this.diceDirection);else this.selectedValue=0};diceWinChanceChange=(o)=>{let d=+o.detail.winChance;if(!Number.isNaN(d)&&d>0&&d<100)this.selectedValue=c0.getSelectedValueFromWinChance(d,this.diceDirection);else this.selectedValue=0};render(){let o=s(c0.getMultiplier(this.selectedValue,this.diceDirection)).multipliedBy(this.gameData.amount).minus(this.gameData.amount).toFixed(4),d=+c0.getMultiplier(this.selectedValue,this.diceDirection),i=d<1.01||Number.isNaN(d)||d>9900,r=this.gameData.mainWidth>768;return S`
|
|
6353
6353
|
<origami-game-layout .gameType=${"dice"}>
|
|
6354
6354
|
<origami-game-sidebar
|
|
6355
6355
|
data-is-desktop=${r}
|
|
@@ -6358,7 +6358,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6358
6358
|
.mode=${this.manualOrAuto}
|
|
6359
6359
|
@bet-mode-change=${(h)=>{this.manualOrAuto=h.detail.tab}}
|
|
6360
6360
|
>
|
|
6361
|
-
${this.manualOrAuto==="Manual"?
|
|
6361
|
+
${this.manualOrAuto==="Manual"?S`<origami-dice-manual
|
|
6362
6362
|
slot="controls"
|
|
6363
6363
|
data-is-desktop=${r}
|
|
6364
6364
|
@dice-manual-play=${this.dicePlay}
|
|
@@ -6367,7 +6367,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6367
6367
|
.profitOnWin=${o}
|
|
6368
6368
|
?betDisabled=${i}
|
|
6369
6369
|
?inputsDisabled=${this.areInputsDisabled}
|
|
6370
|
-
></origami-dice-manual>`:
|
|
6370
|
+
></origami-dice-manual>`:S`<origami-dice-auto
|
|
6371
6371
|
data-is-desktop=${r}
|
|
6372
6372
|
?isDesktop=${r}
|
|
6373
6373
|
.inputsDisabled=${this.areInputsDisabled}
|
|
@@ -6404,7 +6404,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6404
6404
|
@dice-roll-over-toggle=${this.diceRollOverToggle}
|
|
6405
6405
|
></origami-dice-content>
|
|
6406
6406
|
</origami-game-layout>
|
|
6407
|
-
`}}
|
|
6407
|
+
`}}b([O()],Ho.prototype,"diceDirection",void 0),b([O()],Ho.prototype,"selectedValue",void 0),b([O()],Ho.prototype,"isManualPlaying",void 0),b([O()],Ho.prototype,"showDice",void 0),b([O()],Ho.prototype,"isWin",void 0),b([O()],Ho.prototype,"resultValue",void 0),b([O()],Ho.prototype,"history",void 0),b([w0("origami-dice-manual")],Ho.prototype,"_diceManualEl",void 0),b([w0("origami-dice-auto")],Ho.prototype,"_diceAutoEl",void 0),Ho=b([P("origami-dice-game")],Ho);var ko=y`
|
|
6408
6408
|
:host {
|
|
6409
6409
|
display: flex;
|
|
6410
6410
|
flex-direction: column-reverse;
|
|
@@ -6465,7 +6465,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6465
6465
|
.contents {
|
|
6466
6466
|
display: contents;
|
|
6467
6467
|
}
|
|
6468
|
-
`;class T2 extends
|
|
6468
|
+
`;class T2 extends N{constructor(){super(...arguments);this.inputsDisabled=!1;this.risk=e.CLASSIC;this.isPlaying=!1;this.disableBet=!1;this.autoselectRunning=!1;this.selectedTilesCount=0;this.isBetAmountValid=!0}static styles=[B,ko];render(){return S`
|
|
6469
6469
|
<div class="controls-section">
|
|
6470
6470
|
<origami-bet-amount-input
|
|
6471
6471
|
class="grid-full-width"
|
|
@@ -6484,7 +6484,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6484
6484
|
Auto Pick
|
|
6485
6485
|
</origami-button>
|
|
6486
6486
|
|
|
6487
|
-
${this.selectedTilesCount>0?
|
|
6487
|
+
${this.selectedTilesCount>0?S` <origami-button
|
|
6488
6488
|
variant="secondary"
|
|
6489
6489
|
class=${o0({"hide-on-desktop":!0,"grid-full-width":!0})}
|
|
6490
6490
|
?fullWidth=${!0}
|
|
@@ -6492,7 +6492,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6492
6492
|
?disabled=${this.isPlaying||this.autoselectRunning}
|
|
6493
6493
|
>
|
|
6494
6494
|
Clear Table
|
|
6495
|
-
</origami-button>`:
|
|
6495
|
+
</origami-button>`:A}
|
|
6496
6496
|
|
|
6497
6497
|
<origami-select
|
|
6498
6498
|
class="grid-full-width"
|
|
@@ -6505,7 +6505,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6505
6505
|
</div>
|
|
6506
6506
|
|
|
6507
6507
|
<div class="action-section">
|
|
6508
|
-
${this.selectedTilesCount>0?
|
|
6508
|
+
${this.selectedTilesCount>0?S`<origami-button
|
|
6509
6509
|
variant="secondary"
|
|
6510
6510
|
class=${o0({"hide-on-mobile":!0,"grid-full-width":!0})}
|
|
6511
6511
|
?fullWidth=${!0}
|
|
@@ -6514,7 +6514,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6514
6514
|
hotkey="W"
|
|
6515
6515
|
>
|
|
6516
6516
|
Clear Table
|
|
6517
|
-
</origami-button>`:
|
|
6517
|
+
</origami-button>`:A}
|
|
6518
6518
|
<origami-button
|
|
6519
6519
|
variant="secondary"
|
|
6520
6520
|
class=${o0({"hide-on-mobile":!0,"grid-full-width":!0})}
|
|
@@ -6539,7 +6539,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6539
6539
|
Place Bet
|
|
6540
6540
|
</origami-button>
|
|
6541
6541
|
</div>
|
|
6542
|
-
`}}
|
|
6542
|
+
`}}b([q({type:Boolean})],T2.prototype,"inputsDisabled",void 0),b([q({type:String})],T2.prototype,"risk",void 0),b([q({type:Boolean})],T2.prototype,"isPlaying",void 0),b([q({type:Boolean})],T2.prototype,"disableBet",void 0),b([q({type:Boolean})],T2.prototype,"autoselectRunning",void 0),b([q({type:Number})],T2.prototype,"selectedTilesCount",void 0),b([l0({context:i0,subscribe:!0})],T2.prototype,"gameData",void 0),b([O()],T2.prototype,"isBetAmountValid",void 0),T2=b([P("origami-keno-manual")],T2);class S2 extends N{constructor(){super(...arguments);this.inputsDisabled=!1;this.autobetStopping=!1;this.disableBet=!1;this.autobetInProgress=!1;this.autoselectRunning=!1;this.selectedTilesCount=0;this.isDesktop=!1}static styles=[B,ko];render(){return S`
|
|
6543
6543
|
<origami-generic-autobet
|
|
6544
6544
|
?inputsDisabled=${this.inputsDisabled||this.autoselectRunning}
|
|
6545
6545
|
?autobetStopping=${this.autobetStopping}
|
|
@@ -6571,7 +6571,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6571
6571
|
>
|
|
6572
6572
|
Auto Pick
|
|
6573
6573
|
</origami-button>
|
|
6574
|
-
${this.selectedTilesCount>0||this.autoselectRunning?
|
|
6574
|
+
${this.selectedTilesCount>0||this.autoselectRunning?S` <origami-button
|
|
6575
6575
|
variant="secondary"
|
|
6576
6576
|
class=${o0({"hide-on-desktop":!0,"grid-full-width":!0})}
|
|
6577
6577
|
?fullWidth=${!0}
|
|
@@ -6580,11 +6580,11 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6580
6580
|
hotkey="W"
|
|
6581
6581
|
>
|
|
6582
6582
|
Clear Table
|
|
6583
|
-
</origami-button>`:
|
|
6583
|
+
</origami-button>`:A}
|
|
6584
6584
|
</div>
|
|
6585
6585
|
|
|
6586
6586
|
<div slot="action-buttons-desktop" class="action-section">
|
|
6587
|
-
${this.selectedTilesCount>0||this.autoselectRunning?
|
|
6587
|
+
${this.selectedTilesCount>0||this.autoselectRunning?S`<origami-button
|
|
6588
6588
|
variant="secondary"
|
|
6589
6589
|
class=${o0({"hide-on-mobile":!0,"grid-full-width":!0})}
|
|
6590
6590
|
?fullWidth=${!0}
|
|
@@ -6593,7 +6593,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6593
6593
|
hotkey="W"
|
|
6594
6594
|
>
|
|
6595
6595
|
Clear Table
|
|
6596
|
-
</origami-button>`:
|
|
6596
|
+
</origami-button>`:A}
|
|
6597
6597
|
<origami-button
|
|
6598
6598
|
variant="secondary"
|
|
6599
6599
|
class=${o0({"hide-on-mobile":!0,"grid-full-width":!0})}
|
|
@@ -6607,7 +6607,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6607
6607
|
</origami-button>
|
|
6608
6608
|
</div>
|
|
6609
6609
|
</origami-generic-autobet>
|
|
6610
|
-
`}}
|
|
6610
|
+
`}}b([q({type:Boolean})],S2.prototype,"inputsDisabled",void 0),b([q({type:Boolean})],S2.prototype,"autobetStopping",void 0),b([q({type:Boolean})],S2.prototype,"disableBet",void 0),b([q({type:Boolean})],S2.prototype,"autobetInProgress",void 0),b([q({type:Boolean})],S2.prototype,"autoselectRunning",void 0),b([q({type:Number})],S2.prototype,"selectedTilesCount",void 0),b([q({type:Boolean})],S2.prototype,"isDesktop",void 0),S2=b([P("origami-keno-auto")],S2);var I5=y`
|
|
6611
6611
|
:host {
|
|
6612
6612
|
display: flex;
|
|
6613
6613
|
flex-direction: column;
|
|
@@ -6742,12 +6742,12 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6742
6742
|
cursor: help;
|
|
6743
6743
|
}
|
|
6744
6744
|
}
|
|
6745
|
-
`;var
|
|
6745
|
+
`;var B3=[{tiles:1,payout:{[e.CLASSIC]:[0,3.96],[e.LOW_RISK]:[0.7,1.85],[e.MEDIUM_RISK]:[0.4,2.75],[e.HIGH_RISK]:[0,3.96]}},{tiles:2,payout:{[e.CLASSIC]:[0,1.9,4.5],[e.LOW_RISK]:[0,2,3.8],[e.MEDIUM_RISK]:[0,1.8,5.1],[e.HIGH_RISK]:[0,0,17.1]}},{tiles:3,payout:{[e.CLASSIC]:[0,1,3.1,10.4],[e.LOW_RISK]:[0,1.1,1.38,26],[e.MEDIUM_RISK]:[0,0,2.8,50],[e.HIGH_RISK]:[0,0,0,81.5]}},{tiles:4,payout:{[e.CLASSIC]:[0,0.8,1.8,5,22.5],[e.LOW_RISK]:[0,0,2.2,7.9,90],[e.MEDIUM_RISK]:[0,0,1.7,10,100],[e.HIGH_RISK]:[0,0,0,10,259]}},{tiles:5,payout:{[e.CLASSIC]:[0,0.25,1.4,4.1,16.5,36],[e.LOW_RISK]:[0,0,1.5,4.2,13,300],[e.MEDIUM_RISK]:[0,0,1.4,4,14,390],[e.HIGH_RISK]:[0,0,0,4.5,48,450]}},{tiles:6,payout:{[e.CLASSIC]:[0,0,1,3.68,7,16.5,40],[e.LOW_RISK]:[0,0,1.1,2,6.2,100,700],[e.MEDIUM_RISK]:[0,0,0,3,9,180,710],[e.HIGH_RISK]:[0,0,0,0,11,350,710]}},{tiles:7,payout:{[e.CLASSIC]:[0,0,0.47,3,4.5,14,31,60],[e.LOW_RISK]:[0,0,1.1,1.6,3.5,15,225,700],[e.MEDIUM_RISK]:[0,0,0,2,7,30,400,800],[e.HIGH_RISK]:[0,0,0,0,7,90,400,800]}},{tiles:8,payout:{[e.CLASSIC]:[0,0,0,2.2,4,13,22,55,70],[e.LOW_RISK]:[0,0,1.1,1.5,2,5.5,39,100,800],[e.MEDIUM_RISK]:[0,0,0,2,4,11,67,400,900],[e.HIGH_RISK]:[0,0,0,0,5,20,270,600,900]}},{tiles:9,payout:{[e.CLASSIC]:[0,0,0,1.55,3,8,15,44,60,85],[e.LOW_RISK]:[0,0,1.1,1.3,1.7,2.5,7.5,50,250,1000],[e.MEDIUM_RISK]:[0,0,0,2,2.5,5,15,100,500,1000],[e.HIGH_RISK]:[0,0,0,0,4,11,56,500,800,1000]}},{tiles:10,payout:{[e.CLASSIC]:[0,0,0,1.4,2.25,4.5,8,17,50,80,100],[e.LOW_RISK]:[0,0,1.1,1.2,1.3,1.8,3.5,13,50,250,1000],[e.MEDIUM_RISK]:[0,0,0,1.6,2,4,7,26,100,500,1000],[e.HIGH_RISK]:[0,0,0,0,3.5,8,13,63,500,800,1000]}}];class s2 extends N{constructor(){super(...arguments);this.selectedTiles=[];this.risk=e.CLASSIC;this.betAmount="0";this.hitCount=0;this.multipliersForSelectedTiles=0;this.resultTiles=[];this.hoverItemIndex=-1}static styles=[B,I5];handleMouseOver(o,d){if(d.target)this.hoverItemIndex=o}handleMouseLeave(){this.hoverItemIndex=-1}render(){let o=this.multipliersForSelectedTiles,r=[null,...B3[o-1]?.payout?.[this.risk]??[]],h=Array.from({length:o+1},(x,f)=>f),a=r[this.hoverItemIndex+1]??0,g=this.hoverItemIndex>=0?Rd.getChance({correctPicks:this.hoverItemIndex,picked:this.selectedTiles.length}).times(100):s(0),l=a*+this.betAmount;if(o===0)return S`<div class="empty-message-container">
|
|
6746
6746
|
<div class="empty-message-wrapper">
|
|
6747
6747
|
<p class="message">Select 1-10 Tiles</p>
|
|
6748
6748
|
</div>
|
|
6749
|
-
</div>`;return
|
|
6750
|
-
${this.hoverItemIndex>-1?
|
|
6749
|
+
</div>`;return S`
|
|
6750
|
+
${this.hoverItemIndex>-1?S`<div class="multiplier-info">
|
|
6751
6751
|
<origami-input
|
|
6752
6752
|
class="stat-input multiplier"
|
|
6753
6753
|
.label=${" "}
|
|
@@ -6786,13 +6786,13 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6786
6786
|
slot="right-icon"
|
|
6787
6787
|
></lottie-icon>
|
|
6788
6788
|
</origami-input>
|
|
6789
|
-
</div>`:
|
|
6789
|
+
</div>`:A}
|
|
6790
6790
|
<div class="container" style="--button-count: ${h.length}">
|
|
6791
6791
|
<div
|
|
6792
6792
|
class="hit-column-wrapper"
|
|
6793
6793
|
data-tooltip-show=${this.hoverItemIndex>-1?"true":"false"}
|
|
6794
6794
|
>
|
|
6795
|
-
${h.map((x)=>
|
|
6795
|
+
${h.map((x)=>S`
|
|
6796
6796
|
<span class="multiply-button" data-testid="keno-multiple-${x}">
|
|
6797
6797
|
${(r[x+1]??0).toFixed(2)}x
|
|
6798
6798
|
</span>
|
|
@@ -6800,20 +6800,20 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6800
6800
|
</div>
|
|
6801
6801
|
|
|
6802
6802
|
<div class="gem-container" @mouseleave=${()=>this.handleMouseLeave()}>
|
|
6803
|
-
${h.map((x)=>
|
|
6803
|
+
${h.map((x)=>S`
|
|
6804
6804
|
<span
|
|
6805
6805
|
class="multiply-button"
|
|
6806
6806
|
data-testid="keno-multiple-${x}"
|
|
6807
6807
|
hovered=${this.hoverItemIndex===x}
|
|
6808
6808
|
match-hit-count=${this.hitCount===x&&this.resultTiles.length>0}
|
|
6809
|
-
@mouseenter=${(
|
|
6809
|
+
@mouseenter=${(f)=>this.handleMouseOver(x,f)}
|
|
6810
6810
|
>
|
|
6811
6811
|
<span>${x}</span> ${po}
|
|
6812
6812
|
</span>
|
|
6813
6813
|
`)}
|
|
6814
6814
|
</div>
|
|
6815
6815
|
</div>
|
|
6816
|
-
`}}
|
|
6816
|
+
`}}b([q({type:Array})],s2.prototype,"selectedTiles",void 0),b([q({type:String})],s2.prototype,"risk",void 0),b([q({type:String})],s2.prototype,"betAmount",void 0),b([q({type:Number})],s2.prototype,"hitCount",void 0),b([q({type:Number})],s2.prototype,"multipliersForSelectedTiles",void 0),b([q({type:Array})],s2.prototype,"resultTiles",void 0),b([O()],s2.prototype,"hoverItemIndex",void 0),s2=b([P("origami-keno-content-bottom")],s2);var K5=y`
|
|
6817
6817
|
:host {
|
|
6818
6818
|
height: 100%;
|
|
6819
6819
|
}
|
|
@@ -6850,11 +6850,11 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6850
6850
|
}
|
|
6851
6851
|
}
|
|
6852
6852
|
|
|
6853
|
-
`;class O2 extends
|
|
6853
|
+
`;class O2 extends N{constructor(){super(...arguments);this.selectedTiles=[];this.resultTiles=[];this.isPlaying=!1;this.gameOver=!1;this.multipliersForSelectedTiles=0;this.payout=null;this.gameWinPopupShowing=!1;this.multiplier=0;this.risk=e.CLASSIC;this.betAmount="0";this.autoselectRunning=!1;this.isDesktop=!1}static styles=[B,K5];get hitCount(){return this.selectedTiles.filter((o)=>this.resultTiles.includes(o)).length}render(){return S`
|
|
6854
6854
|
<div
|
|
6855
6855
|
class=${o0({container:!0})}
|
|
6856
6856
|
>
|
|
6857
|
-
${this.gameWinPopupShowing?
|
|
6857
|
+
${this.gameWinPopupShowing?S`<origami-game-win-popup
|
|
6858
6858
|
.gameType=${"Keno"}
|
|
6859
6859
|
slot="game-overlay"
|
|
6860
6860
|
.payout=${this.payout}
|
|
@@ -6862,7 +6862,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6862
6862
|
.currencySymbol=${"USDC"}
|
|
6863
6863
|
.gemCount=${this.hitCount}
|
|
6864
6864
|
.betId=${this.betId}
|
|
6865
|
-
></origami-game-win-popup>`:
|
|
6865
|
+
></origami-game-win-popup>`:A}
|
|
6866
6866
|
<origami-keno-grid
|
|
6867
6867
|
data-is-desktop=${this.isDesktop}
|
|
6868
6868
|
.isDesktop=${this.isDesktop}
|
|
@@ -6885,7 +6885,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6885
6885
|
.multipliersForSelectedTiles=${this.multipliersForSelectedTiles}
|
|
6886
6886
|
></origami-keno-content-bottom>
|
|
6887
6887
|
</div>
|
|
6888
|
-
`}}
|
|
6888
|
+
`}}b([q({type:Array})],O2.prototype,"selectedTiles",void 0),b([q({type:Array})],O2.prototype,"resultTiles",void 0),b([q({type:Boolean})],O2.prototype,"isPlaying",void 0),b([q({type:Boolean})],O2.prototype,"gameOver",void 0),b([q({type:Number})],O2.prototype,"multipliersForSelectedTiles",void 0),b([q({type:Object})],O2.prototype,"payout",void 0),b([q({type:Boolean})],O2.prototype,"gameWinPopupShowing",void 0),b([q({type:Number})],O2.prototype,"multiplier",void 0),b([q({type:String})],O2.prototype,"risk",void 0),b([q({type:String})],O2.prototype,"betAmount",void 0),b([q({type:String})],O2.prototype,"betId",void 0),b([q({type:Boolean})],O2.prototype,"autoselectRunning",void 0),b([q({type:Boolean})],O2.prototype,"isDesktop",void 0),O2=b([P("origami-keno-content")],O2);var Yo=10,V5=40;class P2{authToken;baseUrl;constructor(o,d){this.authToken=o,this.baseUrl=d+"/games/keno"}async startBet(o){try{let i=await(await fetch(`${this.baseUrl}/play`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`},body:JSON.stringify(o)})).json();if(!i.id)throw new Error("Unknown error");return{success:!0,data:i}}catch(d){return{success:!1,error:d?.message||"Unknown Error"}}}}var y3={[e.LOW_RISK]:10,[e.MEDIUM_RISK]:8,[e.CLASSIC]:8,[e.HIGH_RISK]:5},A3={[e.LOW_RISK]:{min:1.2,max:2.5},[e.MEDIUM_RISK]:{min:1.5,max:5},[e.HIGH_RISK]:{min:2,max:10},[e.CLASSIC]:{min:2,max:10}};class D1{static generateRandomTiles(o,d=[]){let i=Array.from({length:V5},(r,h)=>h+1).filter((r)=>!d.includes(r));return[...i].sort(()=>0.5-Math.random()).slice(0,Math.min(o,i.length))}static calculateMultiplier(o,d,i){let r=o.filter((l)=>d.includes(l)).length,{min:h,max:a}=A3[i],g=r===0?0:h+r/o.length*(a-h);return Number.parseFloat(g.toFixed(2))}startBet=async(o)=>{let{amount:d,riskLevel:i,selectedNumbers:r}=o,h=D1.generateRandomTiles(y3[i]),a=D1.calculateMultiplier(r,h,i),g=s(d).multipliedBy(a).toString(),l={id:crypto.randomUUID(),tenantId:"origami-casino",userId:"mock-user",gameId:"keno",currency:"USDC",amount:d,payout:g,afterBalance:"1000",maxPayoutReached:!1,multiplier:a,clientSeed:"mock-seed",randomValue:"mock-random",proof:"mock-proof",nonce:1,completedAt:new Date().toISOString(),betActions:[{id:crypto.randomUUID(),data:{KENO:{riskLevel:i,usdAmount:100,selectedNumbers:r}},type:"START_BET",actionIndex:0,originalActionId:null,betAmount:d,payoutAmount:"0",betId:crypto.randomUUID(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),webhookId:crypto.randomUUID()},{id:crypto.randomUUID(),data:{KENO:{result:h}},type:"END_BET",actionIndex:1,originalActionId:null,betAmount:"0",payoutAmount:g,betId:crypto.randomUUID(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),webhookId:crypto.randomUUID()}]};return await n0(250),{success:!0,data:l}}}class _o extends e0{get isToggleDisabled(){return this.autobetInProgress||this.isManualPlaying||this.autoselectRunning}get areInputsDisabled(){return this.autobetInProgress||this.isManualPlaying||this.autoselectRunning}get kenoApi(){return!!this.gameData.authToken&&!!this.gameData.baseUrl?new P2(this.gameData.authToken,this.gameData.baseUrl):new D1}async kenoPlay(){if(this.gameWinPopupShowing=!1,this.selectedTiles.length===0){alert("Please select at least one tile");return}this.gameData?.soundController?.play("bet").catch((o)=>console.error(o)),this.isManualPlaying=!0,this.resultTiles=[],this.gameOver=!1;try{let o=await this.handleBetExecution(this.gameData?.amount??"0",this.getDelay(200));if(!o.success){console.error(o.error);return}this.betId=o.data.id}catch(o){console.error("Error in kenoPlay:",o)}finally{this.isManualPlaying=!1,this.gameOver=!0}}async handleBetExecution(o,d){if(!this.gameData?.currency)throw new Error("Currency is not set");let i={amount:o,currency:this.gameData.currency,riskLevel:this.kenoRisk,selectedNumbers:this.selectedTiles},r=await this.kenoApi.startBet(i);if(r.success){let{betActions:h}=r.data,a=h[h.length-1]?.data.KENO;if(!a)throw new Error("No keno data found");if(this.multiplier=r.data.multiplier,await this.executeInstantOrAnimated(async()=>{a.result.forEach((g)=>{if(this.selectedTiles.includes(g))this.gameData?.soundController?.play("keno-gem").catch((l)=>console.error(l));else this.gameData?.soundController?.play("secondary").catch((l)=>console.error(l))}),this.resultTiles=[...a.result]},async()=>{for(let g of a.result){if(this.selectedTiles.includes(g))this.gameData?.soundController?.play("keno-gem").catch((l)=>console.error(l));else this.gameData?.soundController?.play("secondary").catch((l)=>console.error(l));this.resultTiles=[...this.resultTiles,g],await n0(d)}}),this.gameWinPopupShowing=s(r.data.multiplier).isGreaterThan(0),this.gameWinPopupShowing)this.gameData?.soundController?.play("win").catch((g)=>console.error(g));this.payout=s(r.data.payout),this.addToHistory(s(r.data.multiplier).toNumber(),this.gameWinPopupShowing),this.emit("balance-change",{detail:{balance:Number(r.data.afterBalance),currency:this.gameData.currency}})}return r}addToHistory(o,d){let i=[...this.history,{multiplier:o,won:d}];this.history=i.slice(-5)}async executeAutobet(o,d){try{if(!this.gameData?.currency)throw new Error("Currency is not set");if(this.resultTiles=[],this.gameOver=!1,this.gameWinPopupShowing=!1,this.gameData?.instantBetEnabled)await this.forceUIUpdate();if(this.selectedTiles.length===0)return{pnl:s(0),gameOutcome:"Draw",hasError:!0,errorMessage:"Please select at least one tile"};let i={amount:d,currency:this.gameData.currency,riskLevel:this.kenoRisk,selectedNumbers:this.selectedTiles},r=await this.kenoApi.startBet(i);if(!r.success)return{pnl:s(0),gameOutcome:"Draw",hasError:!0,errorMessage:r.error||"Error processing bet"};this.multiplier=r.data.multiplier;let h=r.data,a=s(h.payout).minus(h.amount),g=b1(h.multiplier),l=h.betActions,x=l[l.length-1]?.data.KENO;if(!x)throw new Error("No keno data found");let{result:f}=x;if(await this.executeInstantOrAnimated(async()=>{f.forEach((n)=>{if(this.selectedTiles.includes(n))this.gameData?.soundController?.play("keno-gem").catch((_)=>console.error(_));else this.gameData?.soundController?.play("secondary").catch((_)=>console.error(_))}),this.resultTiles=[...f]},async()=>{for(let n of f){if(this.selectedTiles.includes(n))this.gameData?.soundController?.play("keno-gem").catch((_)=>console.error(_));else this.gameData?.soundController?.play("secondary").catch((_)=>console.error(_));this.resultTiles=[...this.resultTiles,n],await n0(this.getDelay(200))}}),this.gameWinPopupShowing=s(h.multiplier).isGreaterThan(0),this.gameWinPopupShowing)this.gameData?.soundController?.play("win").catch((n)=>console.error(n));if(this.payout=s(h.payout),this.addToHistory(h.multiplier,this.gameWinPopupShowing),await this.ensureMinimumDisplayTime(this.gameWinPopupShowing,500,500),!this.gameData?.instantBetEnabled)await n0(this.getDelay(500));return this.gameWinPopupShowing=!1,this.emit("balance-change",{detail:{balance:Number(r.data.afterBalance),currency:this.gameData.currency}}),{pnl:a,gameOutcome:g,hasError:!1}}catch(i){return console.error("Error in executeAutobet:",i),{pnl:s(0),gameOutcome:"Draw",hasError:!0,errorMessage:"An unexpected error occurred"}}finally{this.gameOver=!0}}handleTileClick=(o)=>{if(this.gameOver)this.newGame();if(this.autoselectRunning)return;if(this.gameData?.soundController?.play("click").catch((i)=>console.error(i)),this.selectedTiles.includes(o.detail.tile))this.selectedTiles=this.selectedTiles.filter((i)=>i!==o.detail.tile);else if(this.selectedTiles.length<Yo)this.selectedTiles=[...this.selectedTiles,o.detail.tile]};handleRiskChange=(o)=>{this.kenoRisk=o.detail.value};autoPick=async()=>{if(this.isManualPlaying||this.autoselectRunning)return;if(this.autoselectRunning=!0,this.hadTilesBeforeAutopick=this.selectedTiles.length>0,this.resultTiles=[],this.gameWinPopupShowing=!1,this.selectedTiles.length>=Yo)this.selectedTiles=[];let o=Yo-this.selectedTiles.length;if(o<=0)return;let i=Array.from({length:40},(a,g)=>g+1).filter((a)=>!this.selectedTiles.includes(a));if(i.length===0)return;let h=[...i].sort(()=>0.5-Math.random()).slice(0,o);await this.executeInstantOrAnimated(async()=>{this.gameData?.soundController?.play("click").catch((a)=>console.error(a)),this.selectedTiles=[...this.selectedTiles,...h]},async()=>{for(let a of h)this.gameData?.soundController?.play("click").catch((g)=>console.error(g)),await n0(this.getDelay(200)),this.selectedTiles=[...this.selectedTiles,a]}),this.autoselectRunning=!1,this.hadTilesBeforeAutopick=!1};clearTable=()=>{if(this.isManualPlaying||this.autoselectRunning)return;this.gameData?.soundController?.play("keno-clear").catch((o)=>console.error(o)),this.gameWinPopupShowing=!1,this.selectedTiles=[],this.resultTiles=[],this.payout=null};newGame=()=>{this.gameWinPopupShowing=!1,this.resultTiles=[],this.payout=null};render(){let o=this.autoselectRunning?10:this.selectedTiles.length,d=this.selectedTiles.length>0||this.autoselectRunning,i=this.gameData?.mainWidth>768;return S`
|
|
6889
6889
|
<origami-game-layout>
|
|
6890
6890
|
<origami-game-sidebar
|
|
6891
6891
|
data-is-desktop=${i}
|
|
@@ -6897,7 +6897,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6897
6897
|
@keno-clear-table=${this.clearTable}
|
|
6898
6898
|
@keno-risk-change=${this.handleRiskChange}
|
|
6899
6899
|
>
|
|
6900
|
-
${this.manualOrAuto==="Manual"?
|
|
6900
|
+
${this.manualOrAuto==="Manual"?S`<origami-keno-manual
|
|
6901
6901
|
data-is-desktop=${i}
|
|
6902
6902
|
slot="controls"
|
|
6903
6903
|
.inputsDisabled=${this.areInputsDisabled}
|
|
@@ -6906,7 +6906,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6906
6906
|
?disableBet=${this.areInputsDisabled||this.selectedTiles.length===0}
|
|
6907
6907
|
?autoselectRunning=${this.autoselectRunning}
|
|
6908
6908
|
.selectedTilesCount=${d?1:0}
|
|
6909
|
-
></origami-keno-manual>`:
|
|
6909
|
+
></origami-keno-manual>`:S`<origami-keno-auto
|
|
6910
6910
|
data-is-desktop=${i}
|
|
6911
6911
|
.isDesktop=${i}
|
|
6912
6912
|
.inputsDisabled=${this.areInputsDisabled}
|
|
@@ -6956,7 +6956,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6956
6956
|
?autoselectRunning=${this.autoselectRunning}
|
|
6957
6957
|
></origami-keno-content>
|
|
6958
6958
|
</origami-game-layout>
|
|
6959
|
-
`}getButton(o){let d;if(this.manualOrAuto==="Manual")d=this._kenoManualEl?.shadowRoot?.querySelector(`origami-button[hotkey="${o}"]`);else if(o===" ")d=this._kenoAutoEl?.shadowRoot?.querySelector("origami-generic-autobet")?.shadowRoot?.querySelector(".bet-btn");else d=this._kenoAutoEl?.shadowRoot?.querySelector("origami-generic-autobet")?.querySelector(`origami-button[hotkey="${o}"]`);return d}isButtonDisabled(o){if(!this.gameData?.hotkeysOpenEnabled)return!0;return this.getButton(o)?.disabled??!0}handleSpacebar=()=>{if(this.isButtonDisabled(" "))return;if(this.manualOrAuto==="Manual")this.kenoPlay();else this.getButton(" ")?.click()};handleAutoPick=()=>{if(this.isButtonDisabled("Q"))return;this.autoPick()};handleClearTable=()=>{if(this.isButtonDisabled("W"))return;this.clearTable()};constructor(){super();this.isManualPlaying=!1;this.history=[];this.selectedTiles=[];this.resultTiles=[];this.gameWinPopupShowing=!1;this.gameOver=!1;this.payout=null;this.kenoRisk=e.CLASSIC;this.autoselectRunning=!1;this.multiplier=0;this.hadTilesBeforeAutopick=!1;new
|
|
6959
|
+
`}getButton(o){let d;if(this.manualOrAuto==="Manual")d=this._kenoManualEl?.shadowRoot?.querySelector(`origami-button[hotkey="${o}"]`);else if(o===" ")d=this._kenoAutoEl?.shadowRoot?.querySelector("origami-generic-autobet")?.shadowRoot?.querySelector(".bet-btn");else d=this._kenoAutoEl?.shadowRoot?.querySelector("origami-generic-autobet")?.querySelector(`origami-button[hotkey="${o}"]`);return d}isButtonDisabled(o){if(!this.gameData?.hotkeysOpenEnabled)return!0;return this.getButton(o)?.disabled??!0}handleSpacebar=()=>{if(this.isButtonDisabled(" "))return;if(this.manualOrAuto==="Manual")this.kenoPlay();else this.getButton(" ")?.click()};handleAutoPick=()=>{if(this.isButtonDisabled("Q"))return;this.autoPick()};handleClearTable=()=>{if(this.isButtonDisabled("W"))return;this.clearTable()};constructor(){super();this.isManualPlaying=!1;this.history=[];this.selectedTiles=[];this.resultTiles=[];this.gameWinPopupShowing=!1;this.gameOver=!1;this.payout=null;this.kenoRisk=e.CLASSIC;this.autoselectRunning=!1;this.multiplier=0;this.hadTilesBeforeAutopick=!1;new s0(this,[{key:" ",callback:this.handleSpacebar.bind(this),options:{disabled:()=>this.isButtonDisabled(" ")}},{key:"q",callback:this.handleAutoPick.bind(this),options:{disabled:()=>this.isButtonDisabled("Q")}},{key:"w",callback:this.handleClearTable.bind(this),options:{disabled:()=>this.isButtonDisabled("W")}}])}}b([O()],_o.prototype,"isManualPlaying",void 0),b([O()],_o.prototype,"history",void 0),b([O()],_o.prototype,"selectedTiles",void 0),b([O()],_o.prototype,"resultTiles",void 0),b([q({type:Boolean})],_o.prototype,"gameWinPopupShowing",void 0),b([O()],_o.prototype,"gameOver",void 0),b([O()],_o.prototype,"payout",void 0),b([O()],_o.prototype,"kenoRisk",void 0),b([O()],_o.prototype,"autoselectRunning",void 0),b([O()],_o.prototype,"multiplier",void 0),b([O()],_o.prototype,"hadTilesBeforeAutopick",void 0),b([O()],_o.prototype,"betId",void 0),b([w0("origami-keno-manual")],_o.prototype,"_kenoManualEl",void 0),b([w0("origami-keno-auto")],_o.prototype,"_kenoAutoEl",void 0),_o=b([P("origami-keno-game")],_o);var F5=y`
|
|
6960
6960
|
:host {
|
|
6961
6961
|
display: flex;
|
|
6962
6962
|
flex-direction: column;
|
|
@@ -6981,7 +6981,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
6981
6981
|
.profit-input {
|
|
6982
6982
|
cursor: help;
|
|
6983
6983
|
}
|
|
6984
|
-
`;class D2 extends
|
|
6984
|
+
`;class D2 extends N{constructor(){super(...arguments);this.inputsDisabled=!1;this.isPlaying=!1;this.profitOnWin="0.00";this.betDisabled=!1;this.isBetAmountValid=!0}static styles=[B,F5];render(){return S`
|
|
6985
6985
|
<div>
|
|
6986
6986
|
<origami-bet-amount-input
|
|
6987
6987
|
?disabled=${this.inputsDisabled}
|
|
@@ -7017,7 +7017,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7017
7017
|
Place Bet
|
|
7018
7018
|
</origami-button>
|
|
7019
7019
|
</div>
|
|
7020
|
-
`}}
|
|
7020
|
+
`}}b([q({type:Boolean})],D2.prototype,"inputsDisabled",void 0),b([q({type:Boolean})],D2.prototype,"isPlaying",void 0),b([q({type:String})],D2.prototype,"profitOnWin",void 0),b([q({type:Boolean})],D2.prototype,"betDisabled",void 0),b([O()],D2.prototype,"isBetAmountValid",void 0),b([l0({context:i0,subscribe:!0})],D2.prototype,"gameData",void 0),D2=b([P("origami-limbo-manual")],D2);class N2 extends N{constructor(){super(...arguments);this.inputsDisabled=!1;this.autobetStopping=!1;this.autobetInProgress=!1;this.profitOnWin="0.00";this.betDisabled=!1;this.isDesktop=!1}render(){return S`
|
|
7021
7021
|
<origami-generic-autobet
|
|
7022
7022
|
data-is-desktop=${this.isDesktop}
|
|
7023
7023
|
?inputsDisabled=${this.inputsDisabled}
|
|
@@ -7027,7 +7027,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7027
7027
|
?betDisabled=${this.betDisabled}
|
|
7028
7028
|
>
|
|
7029
7029
|
</origami-generic-autobet>
|
|
7030
|
-
`}}
|
|
7030
|
+
`}}b([q({type:Boolean})],N2.prototype,"inputsDisabled",void 0),b([q({type:Boolean})],N2.prototype,"autobetStopping",void 0),b([q({type:Boolean})],N2.prototype,"autobetInProgress",void 0),b([q({type:String})],N2.prototype,"profitOnWin",void 0),b([q({type:Boolean})],N2.prototype,"betDisabled",void 0),b([q({type:Boolean})],N2.prototype,"isDesktop",void 0),N2=b([P("origami-limbo-auto")],N2);var j5=y`
|
|
7031
7031
|
:host {
|
|
7032
7032
|
width: 100%;
|
|
7033
7033
|
height: 100%;
|
|
@@ -7052,7 +7052,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7052
7052
|
display: block;
|
|
7053
7053
|
}
|
|
7054
7054
|
}
|
|
7055
|
-
`;class
|
|
7055
|
+
`;class f1{authToken;baseUrl;constructor(o,d){this.authToken=o,this.baseUrl=d+"/games/limbo"}startBet=async(o)=>{try{let i=await(await fetch(`${this.baseUrl}/play`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`},body:JSON.stringify(o)})).json();if(!i.id)throw new Error("Unknown error");return{success:!0,data:i}}catch(d){return{success:!1,error:d?.message||"Unknown Error"}}};static calculateMultiplier(o){if(o<0.000099||o>99.9999)return"0";return s(99).dividedBy(s(o)).toFixed(4)}static calculateWinChance(o){return s(99).dividedBy(s(o)).toFixed(8)}static calculateProfitOnWin(o,d){return s(o).multipliedBy(d).minus(o).toFixed(4)}}var G5=y`
|
|
7056
7056
|
:host {
|
|
7057
7057
|
display: flex;
|
|
7058
7058
|
flex-direction: column;
|
|
@@ -7094,7 +7094,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7094
7094
|
order: 1; /* 1st item */
|
|
7095
7095
|
}
|
|
7096
7096
|
}
|
|
7097
|
-
`;class
|
|
7097
|
+
`;class B2 extends N{constructor(){super(...arguments);this.targetMultiplier=50;this.disabled=!1;this.winChanceInputFocused=!1;this.multiplierInputFocused=!1;this.winChanceInputValue="50.0000";this.multiplierInputValue="1.98"}static styles=[B,G5];handleWinChanceBlur(){this.winChanceInputValue=f1.calculateWinChance(this.targetMultiplier)}handleMultiplierBlur(){this.multiplierInputValue=s(this.targetMultiplier).toFixed(2)}targetMultiplierChanged(){if(!this.winChanceInputFocused)this.winChanceInputValue=f1.calculateWinChance(this.targetMultiplier);if(!this.multiplierInputFocused)this.multiplierInputValue=s(this.targetMultiplier).toFixed(2)}render(){let o=this.multiplierInputFocused&&(this.multiplierInputValue===""||+this.multiplierInputValue<1.01)?"Multiplier must be at least 1.01":"",d=this.winChanceInputFocused&&(this.winChanceInputValue===""||+this.winChanceInputValue<0.000099||+this.winChanceInputValue>99.9999)?"Win chance must be between 0.000099 and 99.9999":"";return S`
|
|
7098
7098
|
<origami-input
|
|
7099
7099
|
class="stat-input multiplier"
|
|
7100
7100
|
.label=${"Target Multiplier"}
|
|
@@ -7134,7 +7134,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7134
7134
|
slot="right-icon"
|
|
7135
7135
|
></lottie-icon>
|
|
7136
7136
|
</origami-input>
|
|
7137
|
-
`}}
|
|
7137
|
+
`}}b([q({type:Number})],B2.prototype,"targetMultiplier",void 0),b([q({type:Boolean,reflect:!0})],B2.prototype,"disabled",void 0),b([O()],B2.prototype,"winChanceInputFocused",void 0),b([O()],B2.prototype,"multiplierInputFocused",void 0),b([O()],B2.prototype,"winChanceInputValue",void 0),b([O()],B2.prototype,"multiplierInputValue",void 0),b([p0("targetMultiplier")],B2.prototype,"targetMultiplierChanged",null),B2=b([P("origami-limbo-content-bottom")],B2);class y2 extends N{constructor(){super(...arguments);this.targetMultiplier=50;this.betTargetMultiplier=2;this.history=[];this.resultMultiplier=null;this.isWin=!0;this.betId="";this.isPlaying=!1;this.isDesktop=!1}static styles=[B,j5];render(){return S`
|
|
7138
7138
|
<origami-history-pills
|
|
7139
7139
|
data-is-desktop=${this.isDesktop}
|
|
7140
7140
|
.gameType=${"limbo"}
|
|
@@ -7157,7 +7157,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7157
7157
|
.targetMultiplier=${this.targetMultiplier}
|
|
7158
7158
|
></origami-limbo-content-bottom>
|
|
7159
7159
|
</div>
|
|
7160
|
-
`}}
|
|
7160
|
+
`}}b([q({type:Number})],y2.prototype,"targetMultiplier",void 0),b([q({type:Number})],y2.prototype,"betTargetMultiplier",void 0),b([q({type:Array})],y2.prototype,"history",void 0),b([q({type:Number})],y2.prototype,"resultMultiplier",void 0),b([q({type:Boolean})],y2.prototype,"isWin",void 0),b([q({type:String})],y2.prototype,"betId",void 0),b([q({type:Boolean})],y2.prototype,"isPlaying",void 0),b([q({type:Boolean})],y2.prototype,"isDesktop",void 0),y2=b([P("origami-limbo-content")],y2);class Uo{static getRandomMultiplier(){return s(Math.max(1,Math.min(+(1/Math.random()),1e6)).toFixed(2)).toString()}startBet=async(o)=>{let{amount:d,targetMultiplier:i}=o,r=Uo.getRandomMultiplier(),h=s(r).gte(i),a=h?s(d).multipliedBy(i).toString():"0",g={id:crypto.randomUUID(),tenantId:"origami-casino",userId:"mock-user",gameId:"limbo",currency:"USDC",amount:d,payout:a,afterBalance:"1000",maxPayoutReached:!1,multiplier:h?i:0,clientSeed:"mock-seed",randomValue:"mock-random",proof:"mock-proof",nonce:1,completedAt:new Date().toISOString(),betActions:[{id:crypto.randomUUID(),data:{LIMBO:{targetMultiplier:i,result:[s(r).toNumber()],randomMultiplier:r}},type:"END_BET",actionIndex:0,originalActionId:null,betAmount:d,payoutAmount:"0",betId:crypto.randomUUID(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),webhookId:crypto.randomUUID()},{id:crypto.randomUUID(),data:{LIMBO:{result:[s(r).toNumber()],randomMultiplier:r}},type:"END_BET",actionIndex:1,originalActionId:null,betAmount:"0",payoutAmount:a,betId:crypto.randomUUID(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),webhookId:crypto.randomUUID()}]};return await n0(250),{success:!0,data:g}}}var M3=100;class qo extends e0{get isToggleDisabled(){return this.isManualPlaying||this.autobetInProgress||this.autobetStopping}get areInputsDisabled(){return this.isManualPlaying||this.autobetInProgress||this.autobetStopping}get limboApi(){return!!this.gameData.authToken&&!!this.gameData.baseUrl?new f1(this.gameData.authToken,this.gameData.baseUrl):new Uo}async limboPlay(){this.isManualPlaying=!0,this.gameData?.soundController?.play("bet");try{let o=await this.handleBetExecution(this.gameData?.amount??"0");if(!o.success){console.error(o.error);return}let d=o.data.id;await new Promise((r)=>{let h=(a)=>{if(a.detail.betId===d)this.removeEventListener("limbo-multiplier-animation-end",h),r()};this.addEventListener("limbo-multiplier-animation-end",h)})}catch(o){console.error("Error in limboPlay:",o)}finally{this.isManualPlaying=!1}}async handleBetExecution(o){if(this.resultMultiplier=null,!this.gameData?.currency)throw new Error("Currency is not set");let d={amount:o,currency:this.gameData.currency,targetMultiplier:this.targetMultiplier*M3},i=await this.limboApi.startBet(d);if(i.success){this.emit("balance-change",{detail:{balance:Number(i.data.afterBalance),currency:this.gameData.currency}});let{betActions:r,id:h}=i.data,a=r[r.length-1];if(!a)throw new Error("No action data received");let{randomMultiplier:g}=a.data.LIMBO;this.resultMultiplier=Number(g),this.betTargetMultiplier=this.targetMultiplier,this.isWin=this.targetMultiplier<=Number(g),this.betId=h}return i}isSpacebarDisabled=()=>{if(!this.gameData?.hotkeysOpenEnabled)return!0;if(this.manualOrAuto==="Manual")return this._limboManualEl?.shadowRoot?.querySelector("origami-button")?.disabled??!0;else return this._limboAutoEl?.shadowRoot?.querySelector("origami-generic-autobet")?.shadowRoot?.querySelector(".bet-btn")?.disabled??!0};handleSpacebar=()=>{if(this.isSpacebarDisabled())return;if(this.manualOrAuto==="Manual")this.limboPlay();else{let d=this._limboAutoEl?.shadowRoot?.querySelector("origami-generic-autobet")?.shadowRoot?.querySelector(".bet-btn");if(d instanceof HTMLElement)d.click()}};constructor(){super();this.targetMultiplier=2;this.resultMultiplier=null;this.isManualPlaying=!1;this.isWin=!1;this.history=[];this.betTargetMultiplier=2;this.betId="";new s0(this,[{key:" ",callback:this.handleSpacebar.bind(this),options:{repeat:!0,repeatInterval:200,disabled:this.isSpacebarDisabled}}])}async executeAutobet(o,d){try{let i=await this.handleBetExecution(d);if(!i.success)return{pnl:s(0),gameOutcome:"Draw",hasError:!0,errorMessage:i.error||"Error processing bet"};let r=i.data.id;await new Promise((x)=>{let f=(n)=>{if(n.detail.betId===r)this.removeEventListener("limbo-multiplier-animation-end",f),x()};this.addEventListener("limbo-multiplier-animation-end",f)});let a=i.data,g=s(a.payout).minus(a.amount),l=b1(a.multiplier);return{pnl:g,gameOutcome:l,hasError:!1}}catch(i){return console.error("Error in executeAutobet:",i),{pnl:s(0),gameOutcome:"Draw",hasError:!0,errorMessage:"An unexpected error occurred"}}}multiplierChange=(o)=>{let d=+o.detail.multiplier;this.targetMultiplier=d};calculateProfitOnWin(){return s(this.gameData?.amount??"0").multipliedBy(this.targetMultiplier).minus(this.gameData?.amount??"0").toFixed(4)}winChanceChange=(o)=>{let d=+o.detail.winChance;this.targetMultiplier=+f1.calculateMultiplier(d)};multiplierAnimationEnd=(o)=>{let{resultMultiplier:d,isWin:i,betId:r}=o.detail;if(i)this.gameData.soundController?.play("win",!1);this.history=[...this.history.filter((h)=>h.id!==r),{multiplier:d,won:i,id:r}],this.dispatchEvent(new CustomEvent("limbo-multiplier-animation-end",{detail:o.detail,bubbles:!0,composed:!0}))};render(){let o=this.calculateProfitOnWin(),d=f1.calculateMultiplier(this.targetMultiplier),i=this.targetMultiplier<1.01||Number.isNaN(this.targetMultiplier),r=this.gameData?.mainWidth>768;return S`
|
|
7161
7161
|
<origami-game-layout>
|
|
7162
7162
|
<origami-game-sidebar
|
|
7163
7163
|
data-is-desktop=${r}
|
|
@@ -7166,7 +7166,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7166
7166
|
.mode=${this.manualOrAuto}
|
|
7167
7167
|
@bet-mode-change=${(h)=>{this.manualOrAuto=h.detail.tab}}
|
|
7168
7168
|
>
|
|
7169
|
-
${this.manualOrAuto==="Manual"?
|
|
7169
|
+
${this.manualOrAuto==="Manual"?S`<origami-limbo-manual
|
|
7170
7170
|
slot="controls"
|
|
7171
7171
|
data-is-desktop=${r}
|
|
7172
7172
|
@limbo-manual-play=${this.limboPlay}
|
|
@@ -7175,7 +7175,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7175
7175
|
.winChance=${d}
|
|
7176
7176
|
.isPlaying=${this.isManualPlaying}
|
|
7177
7177
|
?betDisabled=${i}
|
|
7178
|
-
></origami-limbo-manual>`:
|
|
7178
|
+
></origami-limbo-manual>`:S`<origami-limbo-auto
|
|
7179
7179
|
data-is-desktop=${r}
|
|
7180
7180
|
.isDesktop=${r}
|
|
7181
7181
|
.inputsDisabled=${this.areInputsDisabled}
|
|
@@ -7215,11 +7215,11 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7215
7215
|
@limbo-multiplier-animation-end=${this.multiplierAnimationEnd}
|
|
7216
7216
|
></origami-limbo-content>
|
|
7217
7217
|
</origami-game-layout>
|
|
7218
|
-
`}}
|
|
7218
|
+
`}}b([O()],qo.prototype,"targetMultiplier",void 0),b([O()],qo.prototype,"resultMultiplier",void 0),b([O()],qo.prototype,"isManualPlaying",void 0),b([O()],qo.prototype,"isWin",void 0),b([O()],qo.prototype,"history",void 0),b([O()],qo.prototype,"betTargetMultiplier",void 0),b([O()],qo.prototype,"betId",void 0),b([w0("origami-limbo-manual")],qo.prototype,"_limboManualEl",void 0),b([w0("origami-limbo-auto")],qo.prototype,"_limboAutoEl",void 0),qo=b([P("origami-limbo-game")],qo);class a0{static mockSettings={shouldWin:!0};static activeBet=null;static minePositions=[];static setMockSettings(o){if(a0.mockSettings={...a0.mockSettings,...o},o.minePositions)a0.minePositions=o.minePositions}static getRandomValueInRange(o,d){return Math.floor(Math.random()*(d-o+1))+o}static generateMinePositions(o){if(a0.mockSettings.minePositions)return a0.mockSettings.minePositions;let d=[];while(d.length<o){let i=a0.getRandomValueInRange(0,D0-1);if(!d.includes(i))d.push(i)}return d}static addAction(o,d,i,r,h,a,g=!1){let l=o.length,x={minesCount:i,selected:d,winMultiplier:"0"};return[...o,{id:crypto.randomUUID(),data:{mines:{...x,minesResult:g?a0.minePositions??[]:[]}},type:r,actionIndex:l,originalActionId:null,betAmount:h,payoutAmount:a}]}static updateBetResult(o){let{prevResult:d=null,amount:i,minesCount:r,selectedTiles:h,isComplete:a=!1,actionType:g="INTERMEDIATE_NON_BET_ACTION"}=o,x=!h.some(($)=>a0.minePositions.includes($))&&(!a||h.length>0),f=h.filter(($)=>!a0.minePositions.includes($)).length,n=x?q0.calculateMinesMultiplier(f,r):s(0),_=x?s(i).multipliedBy(n).toString():"0",v=d?.actions||[];if(!d)v=a0.addAction([],[],r,"START_BET",i,"0");let Y=a?"END_BET":g,H=Y==="END_BET";return v=a0.addAction(v,h,r,Y,i,_,H),{id:d?.id||crypto.randomUUID(),tenantId:"origami-casino",userId:"mock-user",usdRate:1,gameId:"mines",currency:"USDC",edge:0.01,amount:i,payout:_,afterBalance:"1000",maxPayoutReached:!1,multiplier:n.toNumber(),clientSeed:"mock-seed",randomValue:"mock-random",proof:"mock-proof",nonce:"1",completedAt:a?new Date().toISOString():null,actions:v}}async startManualBet(o){a0.minePositions=a0.generateMinePositions(o.minesCount);let d=a0.updateBetResult({amount:o.amount,minesCount:o.minesCount,selectedTiles:[]});return a0.activeBet=d,await n0(250),{success:!0,data:d}}async getActiveBet(){if(!a0.activeBet)return{success:!1,error:"No active bet"};return await n0(250),{success:!0,data:a0.activeBet}}async selectTile(o){if(!a0.activeBet)return{success:!1,error:"No active bet"};let d=a0.activeBet.actions,i=d[d.length-1],h=[...i?.data.mines.selected||[],...o.selected],a=o.selected.some((x)=>a0.minePositions.includes(x)),g=i?.data.mines.minesCount??0,l=a0.updateBetResult({prevResult:a0.activeBet,amount:a0.activeBet.amount,minesCount:g,selectedTiles:h,isComplete:a});if(a0.activeBet=l,a)a0.activeBet=null;return await n0(250),{success:!0,data:l}}async cashout(){if(!a0.activeBet)return{success:!1,error:"No active bet"};let o=a0.activeBet.actions,d=o[o.length-1],i=d?.data.mines.selected??[],r=d?.data.mines.minesCount??0,h=a0.updateBetResult({prevResult:a0.activeBet,amount:a0.activeBet.amount,minesCount:r,selectedTiles:i,isComplete:!0,actionType:"END_BET"});return a0.activeBet=null,await n0(250),{success:!0,data:h}}async autobetPlay(o){a0.minePositions=a0.generateMinePositions(o.minesCount??k1);let d=a0.updateBetResult({amount:o.amount,minesCount:o.minesCount??k1,selectedTiles:o.selected,isComplete:!0});return await n0(250),{success:!0,data:d}}}var C5=y`
|
|
7219
7219
|
:host([data-is-desktop='true']) {
|
|
7220
7220
|
height: 569.98px;
|
|
7221
7221
|
}
|
|
7222
|
-
`;class
|
|
7222
|
+
`;class A2 extends N{constructor(){super(...arguments);this.isAuto=!1;this.autobetSelectedTiles=[];this.autobetInProgress=!1;this.minesState=null;this.showWinPopup=!1;this.hitBomb=!1;this.loadingTiles=[];this.isDesktop=!1}static styles=[B,C5];render(){return S`
|
|
7223
7223
|
<origami-mines-grid
|
|
7224
7224
|
data-is-desktop=${this.isDesktop}
|
|
7225
7225
|
.isDesktop=${this.isDesktop}
|
|
@@ -7231,7 +7231,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7231
7231
|
?hitBomb=${this.hitBomb}
|
|
7232
7232
|
.loadingTiles=${this.loadingTiles}
|
|
7233
7233
|
></origami-mines-grid>
|
|
7234
|
-
`}}
|
|
7234
|
+
`}}b([q({type:Boolean})],A2.prototype,"isAuto",void 0),b([q({type:Array})],A2.prototype,"autobetSelectedTiles",void 0),b([q({type:Boolean})],A2.prototype,"autobetInProgress",void 0),b([q({type:Object})],A2.prototype,"minesState",void 0),b([q({type:Boolean})],A2.prototype,"showWinPopup",void 0),b([q({type:Boolean})],A2.prototype,"hitBomb",void 0),b([q({type:Array})],A2.prototype,"loadingTiles",void 0),b([q({type:Boolean})],A2.prototype,"isDesktop",void 0),A2=b([P("origami-mines-content")],A2);class L5{previousValues=[];callback;constructor(o){this.callback=o}check(o){if(o.length!==this.previousValues.length||o.some((i,r)=>i!==this.previousValues[r]))this.callback([...o],[...this.previousValues]),this.previousValues=[...o]}}class Wo extends e0{_playSound(o){let d={click:"click",bet:"bet",win:"win",bomb:"mines-bomb",gem:"mines-gem"};this.gameData?.soundController?.play(d[o]).catch((i)=>console.error(i))}authTokenWatcher=new L5(([o],[d])=>{if(o&&o!==d)this.isCheckingForSession=!0,this.getMinesActiveBet()});get isToggleDisabled(){let o=this.getMinesState;return this.autobetInProgress||o?.state==="GAME_IN_PROGRESS"||this.isCheckingForSession||this.isLoading}get areInputsDisabled(){let o=this.getMinesState;return this.autobetInProgress||o?.state==="GAME_IN_PROGRESS"||this.isCheckingForSession||this.isLoading}get isGameActive(){return this.getMinesState?.state==="GAME_IN_PROGRESS"}get minesApi(){return!!this.gameData.authToken&&!!this.gameData.baseUrl?new q0(this.gameData.authToken,this.gameData.baseUrl??""):new a0}addToHistory(o,d,i){if(!i)return;let r=[...this.history,{multiplier:o,won:d,id:i}];this.history=r}async getMinesActiveBet(){try{let o=await this.minesApi.getActiveBet();if(!o.success){this.emit("show-alert",{detail:{type:"error",message:o.error}});return}if(o.data){if(this.gameData?.updateBalance(s(o.data.amount)),this.minesData=o.data,this.manualOrAuto!=="Manual")this.manualOrAuto="Manual"}}finally{this.isCheckingForSession=!1}}async firstUpdated(){super.firstUpdated(),await this.getMinesActiveBet()}updated(o){super.updated(o),this.authTokenWatcher.check([this.gameData?.authToken])}get getMinesState(){if(!this.minesData)return null;return q0.getState(this.minesData)}async executeAutobet(o,d){if(this.minesData=null,this.autobetSelectedTiles.length===0)return{pnl:s(0),gameOutcome:"Draw",hasError:!0,errorMessage:"Please select at least one tile to autobet"};try{if(!this.gameData?.currency)throw new Error("Currency is not set");let i=await this.minesApi.autobetPlay({amount:d,currency:this.gameData.currency,minesCount:this.minesCount,selected:this.autobetSelectedTiles});if(!i.success)return{pnl:s(0),gameOutcome:"Draw",hasError:!0,errorMessage:i.error||"Error processing bet"};this.minesData=i.data,this.emit("balance-change",{detail:{balance:Number(i.data.afterBalance),currency:this.gameData.currency}});let r=i.data,{multiplier:h,id:a}=r,g=s(h).isGreaterThan(0);if(g)this._playSound("win");this.addToHistory(h,g,a);let l=s(r.payout).minus(r.amount),x=b1(r.multiplier);return await this.waitForAnimationsComplete(g),{pnl:l,gameOutcome:x,hasError:!1}}catch(i){return console.error("Error in executeAutobet:",i),{pnl:s(0),gameOutcome:"Draw",hasError:!0,errorMessage:"An unexpected error occurred"}}}async toggleAutobet(o){if(this.autobetSelectedTiles.length===0){this.emit("show-alert",{detail:{type:"error",message:"Please select at least one tile to autobet"}});return}if(!this.autobetInProgress)this.emit("show-alert",{detail:{id:"autobet-started",type:"warning",message:"Autobet Started",autoCloseDelay:5000}});await super.toggleAutobet(o)}minesClickHandler=async(o)=>{if(this._playSound("click"),this.manualOrAuto==="Auto"){if(this.autobetSelectedTiles.includes(o.detail.tile))this.autobetSelectedTiles=this.autobetSelectedTiles.filter((i)=>i!==o.detail.tile);else if(this.autobetSelectedTiles.length<25-this.minesCount)this.autobetSelectedTiles=[...this.autobetSelectedTiles,o.detail.tile];this.minesData=null;return}let d=o.detail.tile;await this.minesNext(d)};async minesManualStart(){if(this.isLoading=!0,this.minesData=null,this._playSound("bet"),!this.gameData?.currency)throw new Error("Currency is not set");let o={amount:this.gameData?.amount??"0",currency:this.gameData.currency,minesCount:this.minesCount},d=await this.minesApi.startManualBet(o);if(!d.success){this.emit("show-alert",{detail:{type:"error",message:d.error}});return}this.emit("balance-change",{detail:{balance:Number(d.data.afterBalance),currency:this.gameData.currency}}),this.minesData=d.data,this.isLoading=!1}async minesChooseRandomTile(){this.isSelectingRandomTile=!0,this._playSound("click");let d=this.getMinesState?.selectedTiles??[],i=Array.from({length:D0},(h,a)=>a).filter((h)=>!d.includes(h)),r=i[Math.floor(Math.random()*i.length)];if(r!==void 0)await this.minesNext(r);this.isSelectingRandomTile=!1}async minesNext(o){if(this.loadingTiles.includes(o))return;this.loadingTiles=[...this.loadingTiles,o];try{let d=await this.minesApi.selectTile({betId:this.minesData?.id??"",selected:[o]});if(!d.success){this.emit("show-alert",{detail:{type:"error",message:d.error}});return}let i=!!d.data.completedAt;if(this._playSound(i?"bomb":"gem"),this.minesData=d.data,d.data.completedAt){let{multiplier:r,id:h}=d.data,a=s(r).isGreaterThan(0);this.addToHistory(r,a,h)}}finally{this.loadingTiles=this.loadingTiles.filter((d)=>d!==o)}}async minesCashout(){this.isLoading=!0;let o=await this.minesApi.cashout();if(!o.success){this.emit("show-alert",{detail:{type:"error",message:o.error}}),this.isLoading=!1;return}let d=o.data?.afterBalance,i=o.data?.currency;if(d&&i)this.emit("balance-change",{detail:{balance:Number(d),currency:i}});if(this.isLoading=!1,this.minesData=o.data,this.minesData){let{multiplier:r,id:h}=this.minesData,a=s(r).isGreaterThan(0);if(a)this._playSound("win");this.addToHistory(r,a,h)}}onManualOrAutoChange(){this.minesData=null,this.autobetSelectedTiles=[]}onMinesCountChange(){if(this.manualOrAuto==="Auto"&&this.autobetSelectedTiles.length>25-this.minesCount)this.autobetSelectedTiles=[]}onAutobetChange(){if(!this.autobetInProgress)this.minesData=null}isSpacebarDisabled=()=>{if(!this.gameData?.hotkeysOpenEnabled)return!0;if(this.manualOrAuto==="Manual")return this._minesManualEl?.shadowRoot?.querySelector("origami-button")?.disabled??!0;else return this._minesAutoEl?.shadowRoot?.querySelector("origami-generic-autobet")?.shadowRoot?.querySelector(".bet-btn")?.disabled??!0};handleSpacebar=()=>{if(this.isSpacebarDisabled())return;if(this.manualOrAuto==="Manual")if(this.isGameActive)this.minesCashout();else this.minesManualStart();else{let d=this._minesAutoEl?.shadowRoot?.querySelector("origami-generic-autobet")?.shadowRoot?.querySelector(".bet-btn");if(d instanceof HTMLElement)d.click()}};pickRandomTile=()=>{if(!this.isGameActive)return;this.minesChooseRandomTile()};async waitForAnimationsComplete(o){if(await n0(200),o)await n0(150);await n0(200)}constructor(){super();this.minesCount=3;this.autobetSelectedTiles=[];this.minesData=null;this.isLoading=!1;this.isSelectingRandomTile=!1;this.history=[];this.isCheckingForSession=!0;this.loadingTiles=[];new s0(this,[{key:" ",callback:this.handleSpacebar.bind(this),options:{disabled:this.isSpacebarDisabled}},{key:"q",callback:this.pickRandomTile.bind(this),options:{repeat:!0,repeatInterval:200,disabled:()=>!this.isGameActive||this.autobetInProgress&&!this.autobetStopping||!this.gameData?.hotkeysOpenEnabled}},{key:"w",callback:this.minesCashout.bind(this),options:{disabled:()=>!this.isGameActive||(this.getMinesState?.selectedTiles.length??0)===0||!this.gameData?.hotkeysOpenEnabled}}])}render(){let o=this.getMinesState,d=this.minesData?.multiplier,i=o?.state==="VIEWING_RESULTS"&&o?.outcome==="WIN",r=this.minesData?.payout,h=this.gameData?.currency??"USDC",a=o?.mineLocations?.some((l)=>o?.selectedTiles?.includes(l))??!1,g=this.gameData?.mainWidth>768;return S`
|
|
7235
7235
|
<origami-game-layout>
|
|
7236
7236
|
<origami-game-sidebar
|
|
7237
7237
|
data-is-desktop=${g}
|
|
@@ -7241,7 +7241,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7241
7241
|
@bet-mode-change=${(l)=>{this.manualOrAuto=l.detail.tab}}
|
|
7242
7242
|
@mines-count-change=${(l)=>{this.minesCount=l.detail.count}}
|
|
7243
7243
|
>
|
|
7244
|
-
${this.manualOrAuto==="Manual"?
|
|
7244
|
+
${this.manualOrAuto==="Manual"?S`<origami-mines-manual
|
|
7245
7245
|
data-is-desktop=${g}
|
|
7246
7246
|
slot="controls"
|
|
7247
7247
|
.minesState=${o}
|
|
@@ -7254,7 +7254,7 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7254
7254
|
?isLoading=${this.isLoading}
|
|
7255
7255
|
?isSelectingRandomTile=${this.isSelectingRandomTile}
|
|
7256
7256
|
?isTileLoading=${this.loadingTiles.length>0}
|
|
7257
|
-
></origami-mines-manual>`:
|
|
7257
|
+
></origami-mines-manual>`:S`<origami-mines-auto
|
|
7258
7258
|
data-is-desktop=${g}
|
|
7259
7259
|
.isDesktop=${g}
|
|
7260
7260
|
?inputsDisabled=${this.areInputsDisabled}
|
|
@@ -7281,16 +7281,16 @@ var u5=Object.create;var{getPrototypeOf:R5,defineProperty:M2,getOwnPropertyNames
|
|
|
7281
7281
|
.loadingTiles=${this.loadingTiles}
|
|
7282
7282
|
>
|
|
7283
7283
|
</origami-mines-content>
|
|
7284
|
-
${i?
|
|
7284
|
+
${i?S`<origami-game-win-popup
|
|
7285
7285
|
.gameType=${"Mines"}
|
|
7286
7286
|
slot="game-overlay"
|
|
7287
|
-
.payout=${
|
|
7287
|
+
.payout=${s(r??"0")}
|
|
7288
7288
|
.multiplier=${d}
|
|
7289
7289
|
.variant=${d&&d>0?"success":"warning"}
|
|
7290
7290
|
.currencySymbol=${h}
|
|
7291
7291
|
.gemCount=${this.getMinesState?.numGemsFound??0}
|
|
7292
7292
|
.betId=${this.minesData?.id}
|
|
7293
7293
|
inModal
|
|
7294
|
-
></origami-game-win-popup>`:
|
|
7294
|
+
></origami-game-win-popup>`:A}
|
|
7295
7295
|
</origami-game-layout>
|
|
7296
|
-
`}}
|
|
7296
|
+
`}}b([O()],Wo.prototype,"minesCount",void 0),b([O()],Wo.prototype,"autobetSelectedTiles",void 0),b([O()],Wo.prototype,"minesData",void 0),b([O()],Wo.prototype,"isLoading",void 0),b([O()],Wo.prototype,"isSelectingRandomTile",void 0),b([O()],Wo.prototype,"history",void 0),b([O()],Wo.prototype,"isCheckingForSession",void 0),b([O()],Wo.prototype,"loadingTiles",void 0),b([w0("origami-mines-manual")],Wo.prototype,"_minesManualEl",void 0),b([w0("origami-mines-auto")],Wo.prototype,"_minesAutoEl",void 0),b([p0("manualOrAuto")],Wo.prototype,"onManualOrAutoChange",null),b([p0("minesCount")],Wo.prototype,"onMinesCountChange",null),b([p0("autobetInProgress")],Wo.prototype,"onAutobetChange",null),Wo=b([P("origami-mines-game")],Wo);export{Wo as MinesGame,qo as LimboGame,_o as KenoGame,io as GameProviderWrapper,Ho as DiceGame};
|