• File: main.js
  • Full Path: /var/www/imaliway-sandbox/main.js
  • Date Modified: 03/19/2025 9:32 PM
  • File size: 988.37 KB
  • MIME-type: text/plain
  • Charset: utf-8
var mD=Object.create;var bh=Object.defineProperty,gD=Object.defineProperties,vD=Object.getOwnPropertyDescriptor,yD=Object.getOwnPropertyDescriptors,CD=Object.getOwnPropertyNames,wv=Object.getOwnPropertySymbols,ED=Object.getPrototypeOf,_v=Object.prototype.hasOwnProperty,bD=Object.prototype.propertyIsEnumerable;var Tv=(e,t,r)=>t in e?bh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,me=(e,t)=>{for(var r in t||={})_v.call(t,r)&&Tv(e,r,t[r]);if(wv)for(var r of wv(t))bD.call(t,r)&&Tv(e,r,t[r]);return e},at=(e,t)=>gD(e,yD(t));var ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var SD=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of CD(t))!_v.call(e,i)&&i!==r&&bh(e,i,{get:()=>t[i],enumerable:!(n=vD(t,i))||n.enumerable});return e};var ql=(e,t,r)=>(r=e!=null?mD(ED(e)):{},SD(t||!e||!e.__esModule?bh(r,"default",{value:e,enumerable:!0}):r,e));var zs=(e,t,r)=>new Promise((n,i)=>{var s=l=>{try{a(r.next(l))}catch(u){i(u)}},o=l=>{try{a(r.throw(l))}catch(u){i(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,o);a((r=r.apply(e,t)).next())});var lS=ce((uz,aS)=>{"use strict";aS.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Ni=ce(Ds=>{"use strict";var hg,RL=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Ds.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};Ds.getSymbolTotalCodewords=function(t){return RL[t]};Ds.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Ds.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');hg=t};Ds.isKanjiModeEnabled=function(){return typeof hg<"u"};Ds.toSJIS=function(t){return hg(t)}});var rf=ce(Hr=>{"use strict";Hr.L={bit:1};Hr.M={bit:0};Hr.Q={bit:3};Hr.H={bit:2};function kL(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return Hr.L;case"m":case"medium":return Hr.M;case"q":case"quartile":return Hr.Q;case"h":case"high":return Hr.H;default:throw new Error("Unknown EC Level: "+e)}}Hr.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4};Hr.from=function(t,r){if(Hr.isValid(t))return t;try{return kL(t)}catch{return r}}});var fS=ce((hz,cS)=>{"use strict";function uS(){this.buffer=[],this.length=0}uS.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let r=0;r<t;r++)this.putBit((e>>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};cS.exports=uS});var dS=ce((dz,hS)=>{"use strict";function hl(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}hl.prototype.set=function(e,t,r,n){let i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)};hl.prototype.get=function(e,t){return this.data[e*this.size+t]};hl.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};hl.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};hS.exports=hl});var pS=ce(nf=>{"use strict";var FL=Ni().getSymbolSize;nf.getRowColCoords=function(t){if(t===1)return[];let r=Math.floor(t/7)+2,n=FL(t),i=n===145?26:Math.ceil((n-13)/(2*r-2))*2,s=[n-7];for(let o=1;o<r-1;o++)s[o]=s[o-1]-i;return s.push(6),s.reverse()};nf.getPositions=function(t){let r=[],n=nf.getRowColCoords(t),i=n.length;for(let s=0;s<i;s++)for(let o=0;o<i;o++)s===0&&o===0||s===0&&o===i-1||s===i-1&&o===0||r.push([n[s],n[o]]);return r}});var vS=ce(gS=>{"use strict";var LL=Ni().getSymbolSize,mS=7;gS.getPositions=function(t){let r=LL(t);return[[0,0],[r-mS,0],[0,r-mS]]}});var yS=ce(xt=>{"use strict";xt.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var As={N1:3,N2:3,N3:40,N4:10};xt.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7};xt.from=function(t){return xt.isValid(t)?parseInt(t,10):void 0};xt.getPenaltyN1=function(t){let r=t.size,n=0,i=0,s=0,o=null,a=null;for(let l=0;l<r;l++){i=s=0,o=a=null;for(let u=0;u<r;u++){let c=t.get(l,u);c===o?i++:(i>=5&&(n+=As.N1+(i-5)),o=c,i=1),c=t.get(u,l),c===a?s++:(s>=5&&(n+=As.N1+(s-5)),a=c,s=1)}i>=5&&(n+=As.N1+(i-5)),s>=5&&(n+=As.N1+(s-5))}return n};xt.getPenaltyN2=function(t){let r=t.size,n=0;for(let i=0;i<r-1;i++)for(let s=0;s<r-1;s++){let o=t.get(i,s)+t.get(i,s+1)+t.get(i+1,s)+t.get(i+1,s+1);(o===4||o===0)&&n++}return n*As.N2};xt.getPenaltyN3=function(t){let r=t.size,n=0,i=0,s=0;for(let o=0;o<r;o++){i=s=0;for(let a=0;a<r;a++)i=i<<1&2047|t.get(o,a),a>=10&&(i===1488||i===93)&&n++,s=s<<1&2047|t.get(a,o),a>=10&&(s===1488||s===93)&&n++}return n*As.N3};xt.getPenaltyN4=function(t){let r=0,n=t.data.length;for(let s=0;s<n;s++)r+=t.data[s];return Math.abs(Math.ceil(r*100/n/5)-10)*As.N4};function OL(e,t,r){switch(e){case xt.Patterns.PATTERN000:return(t+r)%2===0;case xt.Patterns.PATTERN001:return t%2===0;case xt.Patterns.PATTERN010:return r%3===0;case xt.Patterns.PATTERN011:return(t+r)%3===0;case xt.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2===0;case xt.Patterns.PATTERN101:return t*r%2+t*r%3===0;case xt.Patterns.PATTERN110:return(t*r%2+t*r%3)%2===0;case xt.Patterns.PATTERN111:return(t*r%3+(t+r)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}xt.applyMask=function(t,r){let n=r.size;for(let i=0;i<n;i++)for(let s=0;s<n;s++)r.isReserved(s,i)||r.xor(s,i,OL(t,s,i))};xt.getBestMask=function(t,r){let n=Object.keys(xt.Patterns).length,i=0,s=1/0;for(let o=0;o<n;o++){r(o),xt.applyMask(o,t);let a=xt.getPenaltyN1(t)+xt.getPenaltyN2(t)+xt.getPenaltyN3(t)+xt.getPenaltyN4(t);xt.applyMask(o,t),a<s&&(s=a,i=o)}return i}});var pg=ce(dg=>{"use strict";var Ri=rf(),sf=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],of=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];dg.getBlocksCount=function(t,r){switch(r){case Ri.L:return sf[(t-1)*4+0];case Ri.M:return sf[(t-1)*4+1];case Ri.Q:return sf[(t-1)*4+2];case Ri.H:return sf[(t-1)*4+3];default:return}};dg.getTotalCodewordsCount=function(t,r){switch(r){case Ri.L:return of[(t-1)*4+0];case Ri.M:return of[(t-1)*4+1];case Ri.Q:return of[(t-1)*4+2];case Ri.H:return of[(t-1)*4+3];default:return}}});var CS=ce(lf=>{"use strict";var dl=new Uint8Array(512),af=new Uint8Array(256);(function(){let t=1;for(let r=0;r<255;r++)dl[r]=t,af[t]=r,t<<=1,t&256&&(t^=285);for(let r=255;r<512;r++)dl[r]=dl[r-255]})();lf.log=function(t){if(t<1)throw new Error("log("+t+")");return af[t]};lf.exp=function(t){return dl[t]};lf.mul=function(t,r){return t===0||r===0?0:dl[af[t]+af[r]]}});var ES=ce(pl=>{"use strict";var mg=CS();pl.mul=function(t,r){let n=new Uint8Array(t.length+r.length-1);for(let i=0;i<t.length;i++)for(let s=0;s<r.length;s++)n[i+s]^=mg.mul(t[i],r[s]);return n};pl.mod=function(t,r){let n=new Uint8Array(t);for(;n.length-r.length>=0;){let i=n[0];for(let o=0;o<r.length;o++)n[o]^=mg.mul(r[o],i);let s=0;for(;s<n.length&&n[s]===0;)s++;n=n.slice(s)}return n};pl.generateECPolynomial=function(t){let r=new Uint8Array([1]);for(let n=0;n<t;n++)r=pl.mul(r,new Uint8Array([1,mg.exp(n)]));return r}});var xS=ce((Ez,SS)=>{"use strict";var bS=ES();function gg(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}gg.prototype.initialize=function(t){this.degree=t,this.genPoly=bS.generateECPolynomial(this.degree)};gg.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let r=new Uint8Array(t.length+this.degree);r.set(t);let n=bS.mod(r,this.genPoly),i=this.degree-n.length;if(i>0){let s=new Uint8Array(this.degree);return s.set(n,i),s}return n};SS.exports=gg});var vg=ce(IS=>{"use strict";IS.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}});var yg=ce(oi=>{"use strict";var wS="[0-9]+",BL="[A-Z $%*+\\-./:]+",ml="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ml=ml.replace(/u/g,"\\u");var VL="(?:(?![A-Z0-9 $%*+\\-./:]|"+ml+`)(?:.|[\r
]))+`;oi.KANJI=new RegExp(ml,"g");oi.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");oi.BYTE=new RegExp(VL,"g");oi.NUMERIC=new RegExp(wS,"g");oi.ALPHANUMERIC=new RegExp(BL,"g");var UL=new RegExp("^"+ml+"$"),jL=new RegExp("^"+wS+"$"),HL=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");oi.testKanji=function(t){return UL.test(t)};oi.testNumeric=function(t){return jL.test(t)};oi.testAlphanumeric=function(t){return HL.test(t)}});var ki=ce(Gt=>{"use strict";var qL=vg(),Cg=yg();Gt.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};Gt.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};Gt.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};Gt.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};Gt.MIXED={bit:-1};Gt.getCharCountIndicator=function(t,r){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!qL.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?t.ccBits[0]:r<27?t.ccBits[1]:t.ccBits[2]};Gt.getBestModeForData=function(t){return Cg.testNumeric(t)?Gt.NUMERIC:Cg.testAlphanumeric(t)?Gt.ALPHANUMERIC:Cg.testKanji(t)?Gt.KANJI:Gt.BYTE};Gt.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")};Gt.isValid=function(t){return t&&t.bit&&t.ccBits};function GL(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return Gt.NUMERIC;case"alphanumeric":return Gt.ALPHANUMERIC;case"kanji":return Gt.KANJI;case"byte":return Gt.BYTE;default:throw new Error("Unknown mode: "+e)}}Gt.from=function(t,r){if(Gt.isValid(t))return t;try{return GL(t)}catch{return r}}});var MS=ce(Ms=>{"use strict";var uf=Ni(),zL=pg(),TS=rf(),Fi=ki(),Eg=vg(),DS=7973,_S=uf.getBCHDigit(DS);function $L(e,t,r){for(let n=1;n<=40;n++)if(t<=Ms.getCapacity(n,r,e))return n}function AS(e,t){return Fi.getCharCountIndicator(e,t)+4}function KL(e,t){let r=0;return e.forEach(function(n){let i=AS(n.mode,t);r+=i+n.getBitsLength()}),r}function WL(e,t){for(let r=1;r<=40;r++)if(KL(e,r)<=Ms.getCapacity(r,t,Fi.MIXED))return r}Ms.from=function(t,r){return Eg.isValid(t)?parseInt(t,10):r};Ms.getCapacity=function(t,r,n){if(!Eg.isValid(t))throw new Error("Invalid QR Code version");typeof n>"u"&&(n=Fi.BYTE);let i=uf.getSymbolTotalCodewords(t),s=zL.getTotalCodewordsCount(t,r),o=(i-s)*8;if(n===Fi.MIXED)return o;let a=o-AS(n,t);switch(n){case Fi.NUMERIC:return Math.floor(a/10*3);case Fi.ALPHANUMERIC:return Math.floor(a/11*2);case Fi.KANJI:return Math.floor(a/13);case Fi.BYTE:default:return Math.floor(a/8)}};Ms.getBestVersionForData=function(t,r){let n,i=TS.from(r,TS.M);if(Array.isArray(t)){if(t.length>1)return WL(t,i);if(t.length===0)return 1;n=t[0]}else n=t;return $L(n.mode,n.getLength(),i)};Ms.getEncodedBits=function(t){if(!Eg.isValid(t)||t<7)throw new Error("Invalid QR Code version");let r=t<<12;for(;uf.getBCHDigit(r)-_S>=0;)r^=DS<<uf.getBCHDigit(r)-_S;return t<<12|r}});var kS=ce(RS=>{"use strict";var bg=Ni(),NS=1335,QL=21522,PS=bg.getBCHDigit(NS);RS.getEncodedBits=function(t,r){let n=t.bit<<3|r,i=n<<10;for(;bg.getBCHDigit(i)-PS>=0;)i^=NS<<bg.getBCHDigit(i)-PS;return(n<<10|i)^QL}});var LS=ce((Tz,FS)=>{"use strict";var YL=ki();function Uo(e){this.mode=YL.NUMERIC,this.data=e.toString()}Uo.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Uo.prototype.getLength=function(){return this.data.length};Uo.prototype.getBitsLength=function(){return Uo.getBitsLength(this.data.length)};Uo.prototype.write=function(t){let r,n,i;for(r=0;r+3<=this.data.length;r+=3)n=this.data.substr(r,3),i=parseInt(n,10),t.put(i,10);let s=this.data.length-r;s>0&&(n=this.data.substr(r),i=parseInt(n,10),t.put(i,s*3+1))};FS.exports=Uo});var BS=ce((_z,OS)=>{"use strict";var ZL=ki(),Sg=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function jo(e){this.mode=ZL.ALPHANUMERIC,this.data=e}jo.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};jo.prototype.getLength=function(){return this.data.length};jo.prototype.getBitsLength=function(){return jo.getBitsLength(this.data.length)};jo.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let n=Sg.indexOf(this.data[r])*45;n+=Sg.indexOf(this.data[r+1]),t.put(n,11)}this.data.length%2&&t.put(Sg.indexOf(this.data[r]),6)};OS.exports=jo});var US=ce((Dz,VS)=>{"use strict";VS.exports=function(t){for(var r=[],n=t.length,i=0;i<n;i++){var s=t.charCodeAt(i);if(s>=55296&&s<=56319&&n>i+1){var o=t.charCodeAt(i+1);o>=56320&&o<=57343&&(s=(s-55296)*1024+o-56320+65536,i+=1)}if(s<128){r.push(s);continue}if(s<2048){r.push(s>>6|192),r.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128);continue}if(s>=65536&&s<=1114111){r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer}});var HS=ce((Az,jS)=>{"use strict";var XL=US(),JL=ki();function Ho(e){this.mode=JL.BYTE,typeof e=="string"&&(e=XL(e)),this.data=new Uint8Array(e)}Ho.getBitsLength=function(t){return t*8};Ho.prototype.getLength=function(){return this.data.length};Ho.prototype.getBitsLength=function(){return Ho.getBitsLength(this.data.length)};Ho.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)};jS.exports=Ho});var GS=ce((Mz,qS)=>{"use strict";var eO=ki(),tO=Ni();function qo(e){this.mode=eO.KANJI,this.data=e}qo.getBitsLength=function(t){return t*13};qo.prototype.getLength=function(){return this.data.length};qo.prototype.getBitsLength=function(){return qo.getBitsLength(this.data.length)};qo.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=tO.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};qS.exports=qo});var zS=ce((Pz,xg)=>{"use strict";var gl={single_source_shortest_paths:function(e,t,r){var n={},i={};i[t]=0;var s=gl.PriorityQueue.make();s.push(t,0);for(var o,a,l,u,c,f,h,p,d;!s.empty();){o=s.pop(),a=o.value,u=o.cost,c=e[a]||{};for(l in c)c.hasOwnProperty(l)&&(f=c[l],h=u+f,p=i[l],d=typeof i[l]>"u",(d||p>h)&&(i[l]=h,s.push(l,h),n[l]=a))}if(typeof r<"u"&&typeof i[r]>"u"){var m=["Could not find a path from ",t," to ",r,"."].join("");throw new Error(m)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t,i;n;)r.push(n),i=e[n],n=e[n];return r.reverse(),r},find_path:function(e,t,r){var n=gl.single_source_shortest_paths(e,t,r);return gl.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(e){var t=gl.PriorityQueue,r={},n;e=e||{};for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof xg<"u"&&(xg.exports=gl)});var JS=ce(Go=>{"use strict";var mt=ki(),WS=LS(),QS=BS(),YS=HS(),ZS=GS(),vl=yg(),cf=Ni(),rO=zS();function $S(e){return unescape(encodeURIComponent(e)).length}function yl(e,t,r){let n=[],i;for(;(i=e.exec(r))!==null;)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function XS(e){let t=yl(vl.NUMERIC,mt.NUMERIC,e),r=yl(vl.ALPHANUMERIC,mt.ALPHANUMERIC,e),n,i;return cf.isKanjiModeEnabled()?(n=yl(vl.BYTE,mt.BYTE,e),i=yl(vl.KANJI,mt.KANJI,e)):(n=yl(vl.BYTE_KANJI,mt.BYTE,e),i=[]),t.concat(r,n,i).sort(function(o,a){return o.index-a.index}).map(function(o){return{data:o.data,mode:o.mode,length:o.length}})}function Ig(e,t){switch(t){case mt.NUMERIC:return WS.getBitsLength(e);case mt.ALPHANUMERIC:return QS.getBitsLength(e);case mt.KANJI:return ZS.getBitsLength(e);case mt.BYTE:return YS.getBitsLength(e)}}function nO(e){return e.reduce(function(t,r){let n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===r.mode?(t[t.length-1].data+=r.data,t):(t.push(r),t)},[])}function iO(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r];switch(n.mode){case mt.NUMERIC:t.push([n,{data:n.data,mode:mt.ALPHANUMERIC,length:n.length},{data:n.data,mode:mt.BYTE,length:n.length}]);break;case mt.ALPHANUMERIC:t.push([n,{data:n.data,mode:mt.BYTE,length:n.length}]);break;case mt.KANJI:t.push([n,{data:n.data,mode:mt.BYTE,length:$S(n.data)}]);break;case mt.BYTE:t.push([{data:n.data,mode:mt.BYTE,length:$S(n.data)}])}}return t}function sO(e,t){let r={},n={start:{}},i=["start"];for(let s=0;s<e.length;s++){let o=e[s],a=[];for(let l=0;l<o.length;l++){let u=o[l],c=""+s+l;a.push(c),r[c]={node:u,lastCount:0},n[c]={};for(let f=0;f<i.length;f++){let h=i[f];r[h]&&r[h].node.mode===u.mode?(n[h][c]=Ig(r[h].lastCount+u.length,u.mode)-Ig(r[h].lastCount,u.mode),r[h].lastCount+=u.length):(r[h]&&(r[h].lastCount=u.length),n[h][c]=Ig(u.length,u.mode)+4+mt.getCharCountIndicator(u.mode,t))}}i=a}for(let s=0;s<i.length;s++)n[i[s]].end=0;return{map:n,table:r}}function KS(e,t){let r,n=mt.getBestModeForData(e);if(r=mt.from(t,n),r!==mt.BYTE&&r.bit<n.bit)throw new Error('"'+e+'" cannot be encoded with mode '+mt.toString(r)+`.
 Suggested mode is: `+mt.toString(n));switch(r===mt.KANJI&&!cf.isKanjiModeEnabled()&&(r=mt.BYTE),r){case mt.NUMERIC:return new WS(e);case mt.ALPHANUMERIC:return new QS(e);case mt.KANJI:return new ZS(e);case mt.BYTE:return new YS(e)}}Go.fromArray=function(t){return t.reduce(function(r,n){return typeof n=="string"?r.push(KS(n,null)):n.data&&r.push(KS(n.data,n.mode)),r},[])};Go.fromString=function(t,r){let n=XS(t,cf.isKanjiModeEnabled()),i=iO(n),s=sO(i,r),o=rO.find_path(s.map,"start","end"),a=[];for(let l=1;l<o.length-1;l++)a.push(s.table[o[l]].node);return Go.fromArray(nO(a))};Go.rawSplit=function(t){return Go.fromArray(XS(t,cf.isKanjiModeEnabled()))}});var tx=ce(ex=>{"use strict";var hf=Ni(),wg=rf(),oO=fS(),aO=dS(),lO=pS(),uO=vS(),Dg=yS(),Ag=pg(),cO=xS(),ff=MS(),fO=kS(),hO=ki(),Tg=JS();function dO(e,t){let r=e.size,n=uO.getPositions(t);for(let i=0;i<n.length;i++){let s=n[i][0],o=n[i][1];for(let a=-1;a<=7;a++)if(!(s+a<=-1||r<=s+a))for(let l=-1;l<=7;l++)o+l<=-1||r<=o+l||(a>=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?e.set(s+a,o+l,!0,!0):e.set(s+a,o+l,!1,!0))}}function pO(e){let t=e.size;for(let r=8;r<t-8;r++){let n=r%2===0;e.set(r,6,n,!0),e.set(6,r,n,!0)}}function mO(e,t){let r=lO.getPositions(t);for(let n=0;n<r.length;n++){let i=r[n][0],s=r[n][1];for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o===-2||o===2||a===-2||a===2||o===0&&a===0?e.set(i+o,s+a,!0,!0):e.set(i+o,s+a,!1,!0)}}function gO(e,t){let r=e.size,n=ff.getEncodedBits(t),i,s,o;for(let a=0;a<18;a++)i=Math.floor(a/3),s=a%3+r-8-3,o=(n>>a&1)===1,e.set(i,s,o,!0),e.set(s,i,o,!0)}function _g(e,t,r){let n=e.size,i=fO.getEncodedBits(t,r),s,o;for(s=0;s<15;s++)o=(i>>s&1)===1,s<6?e.set(s,8,o,!0):s<8?e.set(s+1,8,o,!0):e.set(n-15+s,8,o,!0),s<8?e.set(8,n-s-1,o,!0):s<9?e.set(8,15-s-1+1,o,!0):e.set(8,15-s-1,o,!0);e.set(n-8,8,1,!0)}function vO(e,t){let r=e.size,n=-1,i=r-1,s=7,o=0;for(let a=r-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!e.isReserved(i,a-l)){let u=!1;o<t.length&&(u=(t[o]>>>s&1)===1),e.set(i,a-l,u),s--,s===-1&&(o++,s=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}function yO(e,t,r){let n=new oO;r.forEach(function(l){n.put(l.mode.bit,4),n.put(l.getLength(),hO.getCharCountIndicator(l.mode,e)),l.write(n)});let i=hf.getSymbolTotalCodewords(e),s=Ag.getTotalCodewordsCount(e,t),o=(i-s)*8;for(n.getLengthInBits()+4<=o&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);let a=(o-n.getLengthInBits())/8;for(let l=0;l<a;l++)n.put(l%2?17:236,8);return CO(n,e,t)}function CO(e,t,r){let n=hf.getSymbolTotalCodewords(t),i=Ag.getTotalCodewordsCount(t,r),s=n-i,o=Ag.getBlocksCount(t,r),a=n%o,l=o-a,u=Math.floor(n/o),c=Math.floor(s/o),f=c+1,h=u-c,p=new cO(h),d=0,m=new Array(o),b=new Array(o),g=0,C=new Uint8Array(e.buffer);for(let R=0;R<o;R++){let F=R<l?c:f;m[R]=C.slice(d,d+F),b[R]=p.encode(m[R]),d+=F,g=Math.max(g,F)}let y=new Uint8Array(n),E=0,I,T;for(I=0;I<g;I++)for(T=0;T<o;T++)I<m[T].length&&(y[E++]=m[T][I]);for(I=0;I<h;I++)for(T=0;T<o;T++)y[E++]=b[T][I];return y}function EO(e,t,r,n){let i;if(Array.isArray(e))i=Tg.fromArray(e);else if(typeof e=="string"){let u=t;if(!u){let c=Tg.rawSplit(e);u=ff.getBestVersionForData(c,r)}i=Tg.fromString(e,u||40)}else throw new Error("Invalid data");let s=ff.getBestVersionForData(i,r);if(!s)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=s;else if(t<s)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+s+`.
`);let o=yO(t,r,i),a=hf.getSymbolSize(t),l=new aO(a);return dO(l,t),pO(l),mO(l,t),_g(l,r,0),t>=7&&gO(l,t),vO(l,o),isNaN(n)&&(n=Dg.getBestMask(l,_g.bind(null,l,r))),Dg.applyMask(n,l),_g(l,r,n),{modules:l,version:t,errorCorrectionLevel:r,maskPattern:n,segments:i}}ex.create=function(t,r){if(typeof t>"u"||t==="")throw new Error("No input text");let n=wg.M,i,s;return typeof r<"u"&&(n=wg.from(r.errorCorrectionLevel,wg.M),i=ff.from(r.version),s=Dg.from(r.maskPattern),r.toSJISFunc&&hf.setToSJISFunction(r.toSJISFunc)),EO(t,i,n,s)}});var Mg=ce(Ps=>{"use strict";function rx(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(n){return[n,n]}))),t.length===6&&t.push("F","F");let r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+t.slice(0,6).join("")}}Ps.getOptions=function(t){t||(t={}),t.color||(t.color={});let r=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:n,scale:n?4:i,margin:r,color:{dark:rx(t.color.dark||"#000000ff"),light:rx(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}};Ps.getScale=function(t,r){return r.width&&r.width>=t+r.margin*2?r.width/(t+r.margin*2):r.scale};Ps.getImageWidth=function(t,r){let n=Ps.getScale(t,r);return Math.floor((t+r.margin*2)*n)};Ps.qrToImageData=function(t,r,n){let i=r.modules.size,s=r.modules.data,o=Ps.getScale(i,n),a=Math.floor((i+n.margin*2)*o),l=n.margin*o,u=[n.color.light,n.color.dark];for(let c=0;c<a;c++)for(let f=0;f<a;f++){let h=(c*a+f)*4,p=n.color.light;if(c>=l&&f>=l&&c<a-l&&f<a-l){let d=Math.floor((c-l)/o),m=Math.floor((f-l)/o);p=u[s[d*i+m]?1:0]}t[h++]=p.r,t[h++]=p.g,t[h++]=p.b,t[h]=p.a}}});var nx=ce(df=>{"use strict";var Pg=Mg();function bO(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}function SO(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}df.render=function(t,r,n){let i=n,s=r;typeof i>"u"&&(!r||!r.getContext)&&(i=r,r=void 0),r||(s=SO()),i=Pg.getOptions(i);let o=Pg.getImageWidth(t.modules.size,i),a=s.getContext("2d"),l=a.createImageData(o,o);return Pg.qrToImageData(l.data,t,i),bO(a,s,o),a.putImageData(l,0,0),s};df.renderToDataURL=function(t,r,n){let i=n;typeof i>"u"&&(!r||!r.getContext)&&(i=r,r=void 0),i||(i={});let s=df.render(t,r,i),o=i.type||"image/png",a=i.rendererOpts||{};return s.toDataURL(o,a.quality)}});var ox=ce(sx=>{"use strict";var xO=Mg();function ix(e,t){let r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function Ng(e,t,r){let n=e+t;return typeof r<"u"&&(n+=" "+r),n}function IO(e,t,r){let n="",i=0,s=!1,o=0;for(let a=0;a<e.length;a++){let l=Math.floor(a%t),u=Math.floor(a/t);!l&&!s&&(s=!0),e[a]?(o++,a>0&&l>0&&e[a-1]||(n+=s?Ng("M",l+r,.5+u+r):Ng("m",i,0),i=0,s=!1),l+1<t&&e[a+1]||(n+=Ng("h",o),o=0)):i++}return n}sx.render=function(t,r,n){let i=xO.getOptions(r),s=t.modules.size,o=t.modules.data,a=s+i.margin*2,l=i.color.light.a?"<path "+ix(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",u="<path "+ix(i.color.dark,"stroke")+' d="'+IO(o,s,i.margin)+'"/>',c='viewBox="0 0 '+a+" "+a+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+c+' shape-rendering="crispEdges">'+l+u+`</svg>
`;return typeof n=="function"&&n(null,h),h}});var lx=ce(Cl=>{"use strict";var wO=lS(),Rg=tx(),ax=nx(),TO=ox();function kg(e,t,r,n,i){let s=[].slice.call(arguments,1),o=s.length,a=typeof s[o-1]=="function";if(!a&&!wO())throw new Error("Callback required as last argument");if(a){if(o<2)throw new Error("Too few arguments provided");o===2?(i=r,r=t,t=n=void 0):o===3&&(t.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=r,r=t,t=void 0))}else{if(o<1)throw new Error("Too few arguments provided");return o===1?(r=t,t=n=void 0):o===2&&!t.getContext&&(n=r,r=t,t=void 0),new Promise(function(l,u){try{let c=Rg.create(r,n);l(e(c,t,n))}catch(c){u(c)}})}try{let l=Rg.create(r,n);i(null,e(l,t,n))}catch(l){i(l)}}Cl.create=Rg.create;Cl.toCanvas=kg.bind(null,ax.render);Cl.toDataURL=kg.bind(null,ax.renderToDataURL);Cl.toString=kg.bind(null,function(e,t,r){return TO.render(e,r)})});var fx=ce((mf,Fg)=>{"use strict";(function(t,r){typeof mf=="object"&&typeof Fg=="object"?Fg.exports=r():typeof define=="function"&&define.amd?define([],r):typeof mf=="object"?mf.Pusher=r():t.Pusher=r()})(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(n,i,s){r.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:s})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,i){if(i&1&&(n=r(n)),i&8||i&4&&typeof n=="object"&&n&&n.__esModule)return n;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:n}),i&2&&typeof n!="string")for(var o in n)r.d(s,o,(function(a){return n[a]}).bind(null,o));return s},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=2)}([function(e,t,r){"use strict";var n=this&&this.__extends||function(){var p=function(d,m){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,g){b.__proto__=g}||function(b,g){for(var C in g)g.hasOwnProperty(C)&&(b[C]=g[C])},p(d,m)};return function(d,m){p(d,m);function b(){this.constructor=d}d.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=256,s=function(){function p(d){d===void 0&&(d="="),this._paddingCharacter=d}return p.prototype.encodedLength=function(d){return this._paddingCharacter?(d+2)/3*4|0:(d*8+5)/6|0},p.prototype.encode=function(d){for(var m="",b=0;b<d.length-2;b+=3){var g=d[b]<<16|d[b+1]<<8|d[b+2];m+=this._encodeByte(g>>>3*6&63),m+=this._encodeByte(g>>>2*6&63),m+=this._encodeByte(g>>>1*6&63),m+=this._encodeByte(g>>>0*6&63)}var C=d.length-b;if(C>0){var g=d[b]<<16|(C===2?d[b+1]<<8:0);m+=this._encodeByte(g>>>3*6&63),m+=this._encodeByte(g>>>2*6&63),C===2?m+=this._encodeByte(g>>>1*6&63):m+=this._paddingCharacter||"",m+=this._paddingCharacter||""}return m},p.prototype.maxDecodedLength=function(d){return this._paddingCharacter?d/4*3|0:(d*6+7)/8|0},p.prototype.decodedLength=function(d){return this.maxDecodedLength(d.length-this._getPaddingLength(d))},p.prototype.decode=function(d){if(d.length===0)return new Uint8Array(0);for(var m=this._getPaddingLength(d),b=d.length-m,g=new Uint8Array(this.maxDecodedLength(b)),C=0,y=0,E=0,I=0,T=0,R=0,F=0;y<b-4;y+=4)I=this._decodeChar(d.charCodeAt(y+0)),T=this._decodeChar(d.charCodeAt(y+1)),R=this._decodeChar(d.charCodeAt(y+2)),F=this._decodeChar(d.charCodeAt(y+3)),g[C++]=I<<2|T>>>4,g[C++]=T<<4|R>>>2,g[C++]=R<<6|F,E|=I&i,E|=T&i,E|=R&i,E|=F&i;if(y<b-1&&(I=this._decodeChar(d.charCodeAt(y)),T=this._decodeChar(d.charCodeAt(y+1)),g[C++]=I<<2|T>>>4,E|=I&i,E|=T&i),y<b-2&&(R=this._decodeChar(d.charCodeAt(y+2)),g[C++]=T<<4|R>>>2,E|=R&i),y<b-3&&(F=this._decodeChar(d.charCodeAt(y+3)),g[C++]=R<<6|F,E|=F&i),E!==0)throw new Error("Base64Coder: incorrect characters for decoding");return g},p.prototype._encodeByte=function(d){var m=d;return m+=65,m+=25-d>>>8&6,m+=51-d>>>8&-75,m+=61-d>>>8&-15,m+=62-d>>>8&3,String.fromCharCode(m)},p.prototype._decodeChar=function(d){var m=i;return m+=(42-d&d-44)>>>8&-i+d-43+62,m+=(46-d&d-48)>>>8&-i+d-47+63,m+=(47-d&d-58)>>>8&-i+d-48+52,m+=(64-d&d-91)>>>8&-i+d-65+0,m+=(96-d&d-123)>>>8&-i+d-97+26,m},p.prototype._getPaddingLength=function(d){var m=0;if(this._paddingCharacter){for(var b=d.length-1;b>=0&&d[b]===this._paddingCharacter;b--)m++;if(d.length<4||m>2)throw new Error("Base64Coder: incorrect padding")}return m},p}();t.Coder=s;var o=new s;function a(p){return o.encode(p)}t.encode=a;function l(p){return o.decode(p)}t.decode=l;var u=function(p){n(d,p);function d(){return p!==null&&p.apply(this,arguments)||this}return d.prototype._encodeByte=function(m){var b=m;return b+=65,b+=25-m>>>8&6,b+=51-m>>>8&-75,b+=61-m>>>8&-13,b+=62-m>>>8&49,String.fromCharCode(b)},d.prototype._decodeChar=function(m){var b=i;return b+=(44-m&m-46)>>>8&-i+m-45+62,b+=(94-m&m-96)>>>8&-i+m-95+63,b+=(47-m&m-58)>>>8&-i+m-48+52,b+=(64-m&m-91)>>>8&-i+m-65+0,b+=(96-m&m-123)>>>8&-i+m-97+26,b},d}(s);t.URLSafeCoder=u;var c=new u;function f(p){return c.encode(p)}t.encodeURLSafe=f;function h(p){return c.decode(p)}t.decodeURLSafe=h,t.encodedLength=function(p){return o.encodedLength(p)},t.maxDecodedLength=function(p){return o.maxDecodedLength(p)},t.decodedLength=function(p){return o.decodedLength(p)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="utf8: invalid string",i="utf8: invalid source encoding";function s(l){for(var u=new Uint8Array(o(l)),c=0,f=0;f<l.length;f++){var h=l.charCodeAt(f);h<128?u[c++]=h:h<2048?(u[c++]=192|h>>6,u[c++]=128|h&63):h<55296?(u[c++]=224|h>>12,u[c++]=128|h>>6&63,u[c++]=128|h&63):(f++,h=(h&1023)<<10,h|=l.charCodeAt(f)&1023,h+=65536,u[c++]=240|h>>18,u[c++]=128|h>>12&63,u[c++]=128|h>>6&63,u[c++]=128|h&63)}return u}t.encode=s;function o(l){for(var u=0,c=0;c<l.length;c++){var f=l.charCodeAt(c);if(f<128)u+=1;else if(f<2048)u+=2;else if(f<55296)u+=3;else if(f<=57343){if(c>=l.length-1)throw new Error(n);c++,u+=4}else throw new Error(n)}return u}t.encodedLength=o;function a(l){for(var u=[],c=0;c<l.length;c++){var f=l[c];if(f&128){var h=void 0;if(f<224){if(c>=l.length)throw new Error(i);var p=l[++c];if((p&192)!==128)throw new Error(i);f=(f&31)<<6|p&63,h=128}else if(f<240){if(c>=l.length-1)throw new Error(i);var p=l[++c],d=l[++c];if((p&192)!==128||(d&192)!==128)throw new Error(i);f=(f&15)<<12|(p&63)<<6|d&63,h=2048}else if(f<248){if(c>=l.length-2)throw new Error(i);var p=l[++c],d=l[++c],m=l[++c];if((p&192)!==128||(d&192)!==128||(m&192)!==128)throw new Error(i);f=(f&15)<<18|(p&63)<<12|(d&63)<<6|m&63,h=65536}else throw new Error(i);if(f<h||f>=55296&&f<=57343)throw new Error(i);if(f>=65536){if(f>1114111)throw new Error(i);f-=65536,u.push(String.fromCharCode(55296|f>>10)),f=56320|f&1023}}u.push(String.fromCharCode(f))}return u.join("")}t.decode=a},function(e,t,r){e.exports=r(3).default},function(e,t,r){"use strict";r.r(t);class n{constructor(v,S){this.lastId=0,this.prefix=v,this.name=S}create(v){this.lastId++;var S=this.lastId,N=this.prefix+S,L=this.name+"["+S+"]",K=!1,ne=function(){K||(v.apply(null,arguments),K=!0)};return this[S]=ne,{number:S,id:N,name:L,callback:ne}}remove(v){delete this[v.number]}}var i=new n("_pusher_script_","Pusher.ScriptReceivers"),s={VERSION:"8.4.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},o=s;class a{constructor(v){this.options=v,this.receivers=v.receivers||i,this.loading={}}load(v,S,N){var L=this;if(L.loading[v]&&L.loading[v].length>0)L.loading[v].push(N);else{L.loading[v]=[N];var K=Oe.createScriptRequest(L.getPath(v,S)),ne=L.receivers.create(function(be){if(L.receivers.remove(ne),L.loading[v]){var ke=L.loading[v];delete L.loading[v];for(var ot=function(Ut){Ut||K.cleanup()},vt=0;vt<ke.length;vt++)ke[vt](be,ot)}});K.send(ne)}}getRoot(v){var S,N=Oe.getDocument().location.protocol;return v&&v.useTLS||N==="https:"?S=this.options.cdn_https:S=this.options.cdn_http,S.replace(/\/*$/,"")+"/"+this.options.version}getPath(v,S){return this.getRoot(S)+"/"+v+this.options.suffix+".js"}}var l=new n("_pusher_dependencies","Pusher.DependenciesReceivers"),u=new a({cdn_http:o.cdn_http,cdn_https:o.cdn_https,version:o.VERSION,suffix:o.dependency_suffix,receivers:l});let c={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}};var h={buildLogSuffix:function(x){let v="See:",S=c.urls[x];if(!S)return"";let N;return S.fullUrl?N=S.fullUrl:S.path&&(N=c.baseUrl+S.path),N?`${v} ${N}`:""}},p=function(x){return x.UserAuthentication="user-authentication",x.ChannelAuthorization="channel-authorization",x}(p||{});class d extends Error{constructor(v){super(v),Object.setPrototypeOf(this,new.target.prototype)}}class m extends Error{constructor(v){super(v),Object.setPrototypeOf(this,new.target.prototype)}}class b extends Error{constructor(v){super(v),Object.setPrototypeOf(this,new.target.prototype)}}class g extends Error{constructor(v){super(v),Object.setPrototypeOf(this,new.target.prototype)}}class C extends Error{constructor(v){super(v),Object.setPrototypeOf(this,new.target.prototype)}}class y extends Error{constructor(v){super(v),Object.setPrototypeOf(this,new.target.prototype)}}class E extends Error{constructor(v){super(v),Object.setPrototypeOf(this,new.target.prototype)}}class I extends Error{constructor(v){super(v),Object.setPrototypeOf(this,new.target.prototype)}}class T extends Error{constructor(v,S){super(S),this.status=v,Object.setPrototypeOf(this,new.target.prototype)}}var F=function(x,v,S,N,L){let K=Oe.createXHR();K.open("POST",S.endpoint,!0),K.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var ne in S.headers)K.setRequestHeader(ne,S.headers[ne]);if(S.headersProvider!=null){let be=S.headersProvider();for(var ne in be)K.setRequestHeader(ne,be[ne])}return K.onreadystatechange=function(){if(K.readyState===4)if(K.status===200){let be,ke=!1;try{be=JSON.parse(K.responseText),ke=!0}catch{L(new T(200,`JSON returned from ${N.toString()} endpoint was invalid, yet status code was 200. Data was: ${K.responseText}`),null)}ke&&L(null,be)}else{let be="";switch(N){case p.UserAuthentication:be=h.buildLogSuffix("authenticationEndpoint");break;case p.ChannelAuthorization:be=`Clients must be authorized to join private or presence channels. ${h.buildLogSuffix("authorizationEndpoint")}`;break}L(new T(K.status,`Unable to retrieve auth string from ${N.toString()} endpoint - received status: ${K.status} from ${S.endpoint}. ${be}`),null)}},K.send(v),K};function q(x){return w(P(x))}for(var Z=String.fromCharCode,W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",z={},ee=0,se=W.length;ee<se;ee++)z[W.charAt(ee)]=ee;var G=function(x){var v=x.charCodeAt(0);return v<128?x:v<2048?Z(192|v>>>6)+Z(128|v&63):Z(224|v>>>12&15)+Z(128|v>>>6&63)+Z(128|v&63)},P=function(x){return x.replace(/[^\x00-\x7F]/g,G)},k=function(x){var v=[0,2,1][x.length%3],S=x.charCodeAt(0)<<16|(x.length>1?x.charCodeAt(1):0)<<8|(x.length>2?x.charCodeAt(2):0),N=[W.charAt(S>>>18),W.charAt(S>>>12&63),v>=2?"=":W.charAt(S>>>6&63),v>=1?"=":W.charAt(S&63)];return N.join("")},w=window.btoa||function(x){return x.replace(/[\s\S]{1,3}/g,k)};class D{constructor(v,S,N,L){this.clear=S,this.timer=v(()=>{this.timer&&(this.timer=L(this.timer))},N)}isRunning(){return this.timer!==null}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}}var j=D;function B(x){window.clearTimeout(x)}function J(x){window.clearInterval(x)}class ae extends j{constructor(v,S){super(setTimeout,B,v,function(N){return S(),null})}}class pe extends j{constructor(v,S){super(setInterval,J,v,function(N){return S(),N})}}var Ie={now(){return Date.now?Date.now():new Date().valueOf()},defer(x){return new ae(0,x)},method(x,...v){var S=Array.prototype.slice.call(arguments,1);return function(N){return N[x].apply(N,S.concat(arguments))}}},ge=Ie;function we(x,...v){for(var S=0;S<v.length;S++){var N=v[S];for(var L in N)N[L]&&N[L].constructor&&N[L].constructor===Object?x[L]=we(x[L]||{},N[L]):x[L]=N[L]}return x}function rt(){for(var x=["Pusher"],v=0;v<arguments.length;v++)typeof arguments[v]=="string"?x.push(arguments[v]):x.push(ar(arguments[v]));return x.join(" : ")}function ht(x,v){var S=Array.prototype.indexOf;if(x===null)return-1;if(S&&x.indexOf===S)return x.indexOf(v);for(var N=0,L=x.length;N<L;N++)if(x[N]===v)return N;return-1}function Be(x,v){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&v(x[S],S,x)}function We(x){var v=[];return Be(x,function(S,N){v.push(N)}),v}function st(x){var v=[];return Be(x,function(S){v.push(S)}),v}function Te(x,v,S){for(var N=0;N<x.length;N++)v.call(S||window,x[N],N,x)}function oe(x,v){for(var S=[],N=0;N<x.length;N++)S.push(v(x[N],N,x,S));return S}function yt(x,v){var S={};return Be(x,function(N,L){S[L]=v(N)}),S}function Qr(x,v){v=v||function(L){return!!L};for(var S=[],N=0;N<x.length;N++)v(x[N],N,x,S)&&S.push(x[N]);return S}function Fr(x,v){var S={};return Be(x,function(N,L){(v&&v(N,L,x,S)||N)&&(S[L]=N)}),S}function Lr(x){var v=[];return Be(x,function(S,N){v.push([N,S])}),v}function Or(x,v){for(var S=0;S<x.length;S++)if(v(x[S],S,x))return!0;return!1}function Yr(x,v){for(var S=0;S<x.length;S++)if(!v(x[S],S,x))return!1;return!0}function or(x){return yt(x,function(v){return typeof v=="object"&&(v=ar(v)),encodeURIComponent(q(v.toString()))})}function pn(x){var v=Fr(x,function(N){return N!==void 0}),S=oe(Lr(or(v)),ge.method("join","=")).join("&");return S}function mn(x){var v=[],S=[];return function N(L,K){var ne,be,ke;switch(typeof L){case"object":if(!L)return null;for(ne=0;ne<v.length;ne+=1)if(v[ne]===L)return{$ref:S[ne]};if(v.push(L),S.push(K),Object.prototype.toString.apply(L)==="[object Array]")for(ke=[],ne=0;ne<L.length;ne+=1)ke[ne]=N(L[ne],K+"["+ne+"]");else{ke={};for(be in L)Object.prototype.hasOwnProperty.call(L,be)&&(ke[be]=N(L[be],K+"["+JSON.stringify(be)+"]"))}return ke;case"number":case"string":case"boolean":return L}}(x,"$")}function ar(x){try{return JSON.stringify(x)}catch{return JSON.stringify(mn(x))}}class gn{constructor(){this.globalLog=v=>{window.console&&window.console.log&&window.console.log(v)}}debug(...v){this.log(this.globalLog,v)}warn(...v){this.log(this.globalLogWarn,v)}error(...v){this.log(this.globalLogError,v)}globalLogWarn(v){window.console&&window.console.warn?window.console.warn(v):this.globalLog(v)}globalLogError(v){window.console&&window.console.error?window.console.error(v):this.globalLogWarn(v)}log(v,...S){var N=rt.apply(this,arguments);yh.log?yh.log(N):yh.logToConsole&&v.bind(this)(N)}}var Je=new gn,jn=function(x,v,S,N,L){(S.headers!==void 0||S.headersProvider!=null)&&Je.warn(`To send headers with the ${N.toString()} request, you must use AJAX, rather than JSONP.`);var K=x.nextAuthCallbackID.toString();x.nextAuthCallbackID++;var ne=x.getDocument(),be=ne.createElement("script");x.auth_callbacks[K]=function(vt){L(null,vt)};var ke="Pusher.auth_callbacks['"+K+"']";be.src=S.endpoint+"?callback="+encodeURIComponent(ke)+"&"+v;var ot=ne.getElementsByTagName("head")[0]||ne.documentElement;ot.insertBefore(be,ot.firstChild)},js=jn;class Hs{constructor(v){this.src=v}send(v){var S=this,N="Error loading "+S.src;S.script=document.createElement("script"),S.script.id=v.id,S.script.src=S.src,S.script.type="text/javascript",S.script.charset="UTF-8",S.script.addEventListener?(S.script.onerror=function(){v.callback(N)},S.script.onload=function(){v.callback(null)}):S.script.onreadystatechange=function(){(S.script.readyState==="loaded"||S.script.readyState==="complete")&&v.callback(null)},S.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(S.errorScript=document.createElement("script"),S.errorScript.id=v.id+"_error",S.errorScript.text=v.name+"('"+N+"');",S.script.async=S.errorScript.async=!1):S.script.async=!0;var L=document.getElementsByTagName("head")[0];L.insertBefore(S.script,L.firstChild),S.errorScript&&L.insertBefore(S.errorScript,S.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class qs{constructor(v,S){this.url=v,this.data=S}send(v){if(!this.request){var S=pn(this.data),N=this.url+"/"+v.number+"?"+S;this.request=Oe.createScriptRequest(N),this.request.send(v)}}cleanup(){this.request&&this.request.cleanup()}}var DT=function(x,v){return function(S,N){var L="http"+(v?"s":"")+"://",K=L+(x.host||x.options.host)+x.options.path,ne=Oe.createJSONPRequest(K,S),be=Oe.ScriptReceivers.create(function(ke,ot){i.remove(be),ne.cleanup(),ot&&ot.host&&(x.host=ot.host),N&&N(ke,ot)});ne.send(be)}},AT={name:"jsonp",getAgent:DT},MT=AT;function ch(x,v,S){var N=x+(v.useTLS?"s":""),L=v.useTLS?v.hostTLS:v.hostNonTLS;return N+"://"+L+S}function fh(x,v){var S="/app/"+x,N="?protocol="+o.PROTOCOL+"&client=js&version="+o.VERSION+(v?"&"+v:"");return S+N}var PT={getInitial:function(x,v){var S=(v.httpPath||"")+fh(x,"flash=false");return ch("ws",v,S)}},NT={getInitial:function(x,v){var S=(v.httpPath||"/pusher")+fh(x);return ch("http",v,S)}},RT={getInitial:function(x,v){return ch("http",v,v.httpPath||"/pusher")},getPath:function(x,v){return fh(x)}};class kT{constructor(){this._callbacks={}}get(v){return this._callbacks[hh(v)]}add(v,S,N){var L=hh(v);this._callbacks[L]=this._callbacks[L]||[],this._callbacks[L].push({fn:S,context:N})}remove(v,S,N){if(!v&&!S&&!N){this._callbacks={};return}var L=v?[hh(v)]:We(this._callbacks);S||N?this.removeCallback(L,S,N):this.removeAllCallbacks(L)}removeCallback(v,S,N){Te(v,function(L){this._callbacks[L]=Qr(this._callbacks[L]||[],function(K){return S&&S!==K.fn||N&&N!==K.context}),this._callbacks[L].length===0&&delete this._callbacks[L]},this)}removeAllCallbacks(v){Te(v,function(S){delete this._callbacks[S]},this)}}function hh(x){return"_"+x}class Hn{constructor(v){this.callbacks=new kT,this.global_callbacks=[],this.failThrough=v}bind(v,S,N){return this.callbacks.add(v,S,N),this}bind_global(v){return this.global_callbacks.push(v),this}unbind(v,S,N){return this.callbacks.remove(v,S,N),this}unbind_global(v){return v?(this.global_callbacks=Qr(this.global_callbacks||[],S=>S!==v),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(v,S,N){for(var L=0;L<this.global_callbacks.length;L++)this.global_callbacks[L](v,S);var K=this.callbacks.get(v),ne=[];if(N?ne.push(S,N):S&&ne.push(S),K&&K.length>0)for(var L=0;L<K.length;L++)K[L].fn.apply(K[L].context||window,ne);else this.failThrough&&this.failThrough(v,S);return this}}class FT extends Hn{constructor(v,S,N,L,K){super(),this.initialize=Oe.transportConnectionInitializer,this.hooks=v,this.name=S,this.priority=N,this.key=L,this.options=K,this.state="new",this.timeline=K.timeline,this.activityTimeout=K.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return!!this.hooks.handlesActivityChecks}supportsPing(){return!!this.hooks.supportsPing}connect(){if(this.socket||this.state!=="initialized")return!1;var v=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(v,this.options)}catch(S){return ge.defer(()=>{this.onError(S),this.changeState("closed")}),!1}return this.bindListeners(),Je.debug("Connecting",{transport:this.name,url:v}),this.changeState("connecting"),!0}close(){return this.socket?(this.socket.close(),!0):!1}send(v){return this.state==="open"?(ge.defer(()=>{this.socket&&this.socket.send(v)}),!0):!1}ping(){this.state==="open"&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(v){this.emit("error",{type:"WebSocketError",error:v}),this.timeline.error(this.buildTimelineMessage({error:v.toString()}))}onClose(v){v?this.changeState("closed",{code:v.code,reason:v.reason,wasClean:v.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(v){this.emit("message",v)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=v=>{this.onError(v)},this.socket.onclose=v=>{this.onClose(v)},this.socket.onmessage=v=>{this.onMessage(v)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(v,S){this.state=v,this.timeline.info(this.buildTimelineMessage({state:v,params:S})),this.emit(v,S)}buildTimelineMessage(v){return we({cid:this.id},v)}}class Gs{constructor(v){this.hooks=v}isSupported(v){return this.hooks.isSupported(v)}createConnection(v,S,N,L){return new FT(this.hooks,v,S,N,L)}}var LT=new Gs({urls:PT,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!Oe.getWebSocketAPI()},isSupported:function(){return!!Oe.getWebSocketAPI()},getSocket:function(x){return Oe.createWebSocket(x)}}),nv={urls:NT,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},iv=we({getSocket:function(x){return Oe.HTTPFactory.createStreamingSocket(x)}},nv),sv=we({getSocket:function(x){return Oe.HTTPFactory.createPollingSocket(x)}},nv),ov={isSupported:function(){return Oe.isXHRSupported()}},OT=new Gs(we({},iv,ov)),BT=new Gs(we({},sv,ov)),VT={ws:LT,xhr_streaming:OT,xhr_polling:BT},Vl=VT,UT=new Gs({file:"sockjs",urls:RT,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(x,v){return new window.SockJS(x,null,{js_path:u.getPath("sockjs",{useTLS:v.useTLS}),ignore_null_origin:v.ignoreNullOrigin})},beforeOpen:function(x,v){x.send(JSON.stringify({path:v}))}}),av={isSupported:function(x){var v=Oe.isXDRSupported(x.useTLS);return v}},jT=new Gs(we({},iv,av)),HT=new Gs(we({},sv,av));Vl.xdr_streaming=jT,Vl.xdr_polling=HT,Vl.sockjs=UT;var qT=Vl;class GT extends Hn{constructor(){super();var v=this;window.addEventListener!==void 0&&(window.addEventListener("online",function(){v.emit("online")},!1),window.addEventListener("offline",function(){v.emit("offline")},!1))}isOnline(){return window.navigator.onLine===void 0?!0:window.navigator.onLine}}var zT=new GT;class $T{constructor(v,S,N){this.manager=v,this.transport=S,this.minPingDelay=N.minPingDelay,this.maxPingDelay=N.maxPingDelay,this.pingDelay=void 0}createConnection(v,S,N,L){L=we({},L,{activityTimeout:this.pingDelay});var K=this.transport.createConnection(v,S,N,L),ne=null,be=function(){K.unbind("open",be),K.bind("closed",ke),ne=ge.now()},ke=ot=>{if(K.unbind("closed",ke),ot.code===1002||ot.code===1003)this.manager.reportDeath();else if(!ot.wasClean&&ne){var vt=ge.now()-ne;vt<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(vt/2,this.minPingDelay))}};return K.bind("open",be),K}isSupported(v){return this.manager.isAlive()&&this.transport.isSupported(v)}}let lv={decodeMessage:function(x){try{var v=JSON.parse(x.data),S=v.data;if(typeof S=="string")try{S=JSON.parse(v.data)}catch{}var N={event:v.event,channel:v.channel,data:S};return v.user_id&&(N.user_id=v.user_id),N}catch(L){throw{type:"MessageParseError",error:L,data:x.data}}},encodeMessage:function(x){return JSON.stringify(x)},processHandshake:function(x){var v=lv.decodeMessage(x);if(v.event==="pusher:connection_established"){if(!v.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:v.data.socket_id,activityTimeout:v.data.activity_timeout*1e3}}else{if(v.event==="pusher:error")return{action:this.getCloseAction(v.data),error:this.getCloseError(v.data)};throw"Invalid handshake"}},getCloseAction:function(x){return x.code<4e3?x.code>=1002&&x.code<=1004?"backoff":null:x.code===4e3?"tls_only":x.code<4100?"refused":x.code<4200?"backoff":x.code<4300?"retry":"refused"},getCloseError:function(x){return x.code!==1e3&&x.code!==1001?{type:"PusherError",data:{code:x.code,message:x.reason||x.message}}:null}};var Yi=lv;class KT extends Hn{constructor(v,S){super(),this.id=v,this.transport=S,this.activityTimeout=S.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(v){return this.transport.send(v)}send_event(v,S,N){var L={event:v,data:S};return N&&(L.channel=N),Je.debug("Event sent",L),this.send(Yi.encodeMessage(L))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var v={message:N=>{var L;try{L=Yi.decodeMessage(N)}catch(K){this.emit("error",{type:"MessageParseError",error:K,data:N.data})}if(L!==void 0){switch(Je.debug("Event recd",L),L.event){case"pusher:error":this.emit("error",{type:"PusherError",data:L.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong");break}this.emit("message",L)}},activity:()=>{this.emit("activity")},error:N=>{this.emit("error",N)},closed:N=>{S(),N&&N.code&&this.handleCloseEvent(N),this.transport=null,this.emit("closed")}},S=()=>{Be(v,(N,L)=>{this.transport.unbind(L,N)})};Be(v,(N,L)=>{this.transport.bind(L,N)})}handleCloseEvent(v){var S=Yi.getCloseAction(v),N=Yi.getCloseError(v);N&&this.emit("error",N),S&&this.emit(S,{action:S,error:N})}}class WT{constructor(v,S){this.transport=v,this.callback=S,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=v=>{this.unbindListeners();var S;try{S=Yi.processHandshake(v)}catch(N){this.finish("error",{error:N}),this.transport.close();return}S.action==="connected"?this.finish("connected",{connection:new KT(S.id,this.transport),activityTimeout:S.activityTimeout}):(this.finish(S.action,{error:S.error}),this.transport.close())},this.onClosed=v=>{this.unbindListeners();var S=Yi.getCloseAction(v)||"backoff",N=Yi.getCloseError(v);this.finish(S,{error:N})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(v,S){this.callback(we({transport:this.transport,action:v},S))}}class QT{constructor(v,S){this.timeline=v,this.options=S||{}}send(v,S){this.timeline.isEmpty()||this.timeline.send(Oe.TimelineTransport.getAgent(this,v),S)}}class dh extends Hn{constructor(v,S){super(function(N,L){Je.debug("No callbacks on "+v+" for "+N)}),this.name=v,this.pusher=S,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(v,S){return S(null,{auth:""})}trigger(v,S){if(v.indexOf("client-")!==0)throw new d("Event '"+v+"' does not start with 'client-'");if(!this.subscribed){var N=h.buildLogSuffix("triggeringClientEvents");Je.warn(`Client event triggered before channel 'subscription_succeeded' event . ${N}`)}return this.pusher.send_event(v,S,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(v){var S=v.event,N=v.data;if(S==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(v);else if(S==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(v);else if(S.indexOf("pusher_internal:")!==0){var L={};this.emit(S,N,L)}}handleSubscriptionSucceededEvent(v){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",v.data)}handleSubscriptionCountEvent(v){v.data.subscription_count&&(this.subscriptionCount=v.data.subscription_count),this.emit("pusher:subscription_count",v.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(v,S)=>{v?(this.subscriptionPending=!1,Je.error(v.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:v.message},v instanceof T?{status:v.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:S.auth,channel_data:S.channel_data,channel:this.name})}))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class ph extends dh{authorize(v,S){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:v},S)}}class YT{constructor(){this.reset()}get(v){return Object.prototype.hasOwnProperty.call(this.members,v)?{id:v,info:this.members[v]}:null}each(v){Be(this.members,(S,N)=>{v(this.get(N))})}setMyID(v){this.myID=v}onSubscription(v){this.members=v.presence.hash,this.count=v.presence.count,this.me=this.get(this.myID)}addMember(v){return this.get(v.user_id)===null&&this.count++,this.members[v.user_id]=v.user_info,this.get(v.user_id)}removeMember(v){var S=this.get(v.user_id);return S&&(delete this.members[v.user_id],this.count--),S}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}var ZT=function(x,v,S,N){function L(K){return K instanceof S?K:new S(function(ne){ne(K)})}return new(S||(S=Promise))(function(K,ne){function be(vt){try{ot(N.next(vt))}catch(Ut){ne(Ut)}}function ke(vt){try{ot(N.throw(vt))}catch(Ut){ne(Ut)}}function ot(vt){vt.done?K(vt.value):L(vt.value).then(be,ke)}ot((N=N.apply(x,v||[])).next())})};class XT extends ph{constructor(v,S){super(v,S),this.members=new YT}authorize(v,S){super.authorize(v,(N,L)=>ZT(this,void 0,void 0,function*(){if(!N)if(L=L,L.channel_data!=null){var K=JSON.parse(L.channel_data);this.members.setMyID(K.user_id)}else if(yield this.pusher.user.signinDonePromise,this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else{let ne=h.buildLogSuffix("authorizationEndpoint");Je.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${ne}, or the user should be signed in.`),S("Invalid auth response");return}S(N,L)}))}handleEvent(v){var S=v.event;if(S.indexOf("pusher_internal:")===0)this.handleInternalEvent(v);else{var N=v.data,L={};v.user_id&&(L.user_id=v.user_id),this.emit(S,N,L)}}handleInternalEvent(v){var S=v.event,N=v.data;switch(S){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(v);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(v);break;case"pusher_internal:member_added":var L=this.members.addMember(N);this.emit("pusher:member_added",L);break;case"pusher_internal:member_removed":var K=this.members.removeMember(N);K&&this.emit("pusher:member_removed",K);break}}handleSubscriptionSucceededEvent(v){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(v.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var JT=r(1),mh=r(0);class e_ extends ph{constructor(v,S,N){super(v,S),this.key=null,this.nacl=N}authorize(v,S){super.authorize(v,(N,L)=>{if(N){S(N,L);return}let K=L.shared_secret;if(!K){S(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null);return}this.key=Object(mh.decode)(K),delete L.shared_secret,S(null,L)})}trigger(v,S){throw new y("Client events are not currently supported for encrypted channels")}handleEvent(v){var S=v.event,N=v.data;if(S.indexOf("pusher_internal:")===0||S.indexOf("pusher:")===0){super.handleEvent(v);return}this.handleEncryptedEvent(S,N)}handleEncryptedEvent(v,S){if(!this.key){Je.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!S.ciphertext||!S.nonce){Je.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+S);return}let N=Object(mh.decode)(S.ciphertext);if(N.length<this.nacl.secretbox.overheadLength){Je.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${N.length}`);return}let L=Object(mh.decode)(S.nonce);if(L.length<this.nacl.secretbox.nonceLength){Je.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${L.length}`);return}let K=this.nacl.secretbox.open(N,L,this.key);if(K===null){Je.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,(ne,be)=>{if(ne){Je.error(`Failed to make a request to the authEndpoint: ${be}. Unable to fetch new key, so dropping encrypted event`);return}if(K=this.nacl.secretbox.open(N,L,this.key),K===null){Je.error("Failed to decrypt event with new key. Dropping encrypted event");return}this.emit(v,this.getDataToEmit(K))});return}this.emit(v,this.getDataToEmit(K))}getDataToEmit(v){let S=Object(JT.decode)(v);try{return JSON.parse(S)}catch{return S}}}class t_ extends Hn{constructor(v,S){super(),this.state="initialized",this.connection=null,this.key=v,this.options=S,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var N=Oe.getNetwork();N.bind("online",()=>{this.timeline.info({netinfo:"online"}),(this.state==="connecting"||this.state==="unavailable")&&this.retryIn(0)}),N.bind("offline",()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()}),this.updateStrategy()}connect(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}}send(v){return this.connection?this.connection.send(v):!1}send_event(v,S,N){return this.connection?this.connection.send_event(v,S,N):!1}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var v=(S,N)=>{S?this.runner=this.strategy.connect(0,v):N.action==="error"?(this.emit("error",{type:"HandshakeError",error:N.error}),this.timeline.error({handshakeError:N.error})):(this.abortConnecting(),this.handshakeCallbacks[N.action](N))};this.runner=this.strategy.connect(0,v)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var v=this.abandonConnection();v.close()}}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(v){this.timeline.info({action:"retry",delay:v}),v>0&&this.emit("connecting_in",Math.round(v/1e3)),this.retryTimer=new ae(v||0,()=>{this.disconnectInternally(),this.connect()})}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new ae(this.options.unavailableTimeout,()=>{this.updateState("unavailable")})}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new ae(this.options.pongTimeout,()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)})}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new ae(this.activityTimeout,()=>{this.sendActivityCheck()}))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(v){return we({},v,{message:S=>{this.resetActivityCheck(),this.emit("message",S)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:S=>{this.emit("error",S)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(v){return we({},v,{connected:S=>{this.activityTimeout=Math.min(this.options.activityTimeout,S.activityTimeout,S.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(S.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let v=S=>N=>{N.error&&this.emit("error",{type:"WebSocketError",error:N.error}),S(N)};return{tls_only:v(()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)}),refused:v(()=>{this.disconnect()}),backoff:v(()=>{this.retryIn(1e3)}),retry:v(()=>{this.retryIn(0)})}}setConnection(v){this.connection=v;for(var S in this.connectionCallbacks)this.connection.bind(S,this.connectionCallbacks[S]);this.resetActivityCheck()}abandonConnection(){if(this.connection){this.stopActivityCheck();for(var v in this.connectionCallbacks)this.connection.unbind(v,this.connectionCallbacks[v]);var S=this.connection;return this.connection=null,S}}updateState(v,S){var N=this.state;if(this.state=v,N!==v){var L=v;L==="connected"&&(L+=" with new socket ID "+S.socket_id),Je.debug("State changed",N+" -> "+L),this.timeline.info({state:v,params:S}),this.emit("state_change",{previous:N,current:v}),this.emit(v,S)}}shouldRetry(){return this.state==="connecting"||this.state==="connected"}}class r_{constructor(){this.channels={}}add(v,S){return this.channels[v]||(this.channels[v]=n_(v,S)),this.channels[v]}all(){return st(this.channels)}find(v){return this.channels[v]}remove(v){var S=this.channels[v];return delete this.channels[v],S}disconnect(){Be(this.channels,function(v){v.disconnect()})}}function n_(x,v){if(x.indexOf("private-encrypted-")===0){if(v.config.nacl)return qn.createEncryptedChannel(x,v,v.config.nacl);let S="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",N=h.buildLogSuffix("encryptedChannelSupport");throw new y(`${S}. ${N}`)}else{if(x.indexOf("private-")===0)return qn.createPrivateChannel(x,v);if(x.indexOf("presence-")===0)return qn.createPresenceChannel(x,v);if(x.indexOf("#")===0)throw new m('Cannot create a channel with name "'+x+'".');return qn.createChannel(x,v)}}var i_={createChannels(){return new r_},createConnectionManager(x,v){return new t_(x,v)},createChannel(x,v){return new dh(x,v)},createPrivateChannel(x,v){return new ph(x,v)},createPresenceChannel(x,v){return new XT(x,v)},createEncryptedChannel(x,v,S){return new e_(x,v,S)},createTimelineSender(x,v){return new QT(x,v)},createHandshake(x,v){return new WT(x,v)},createAssistantToTheTransportManager(x,v,S){return new $T(x,v,S)}},qn=i_;class uv{constructor(v){this.options=v||{},this.livesLeft=this.options.lives||1/0}getAssistant(v){return qn.createAssistantToTheTransportManager(this,v,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class Zi{constructor(v,S){this.strategies=v,this.loop=!!S.loop,this.failFast=!!S.failFast,this.timeout=S.timeout,this.timeoutLimit=S.timeoutLimit}isSupported(){return Or(this.strategies,ge.method("isSupported"))}connect(v,S){var N=this.strategies,L=0,K=this.timeout,ne=null,be=(ke,ot)=>{ot?S(null,ot):(L=L+1,this.loop&&(L=L%N.length),L<N.length?(K&&(K=K*2,this.timeoutLimit&&(K=Math.min(K,this.timeoutLimit))),ne=this.tryStrategy(N[L],v,{timeout:K,failFast:this.failFast},be)):S(!0))};return ne=this.tryStrategy(N[L],v,{timeout:K,failFast:this.failFast},be),{abort:function(){ne.abort()},forceMinPriority:function(ke){v=ke,ne&&ne.forceMinPriority(ke)}}}tryStrategy(v,S,N,L){var K=null,ne=null;return N.timeout>0&&(K=new ae(N.timeout,function(){ne.abort(),L(!0)})),ne=v.connect(S,function(be,ke){be&&K&&K.isRunning()&&!N.failFast||(K&&K.ensureAborted(),L(be,ke))}),{abort:function(){K&&K.ensureAborted(),ne.abort()},forceMinPriority:function(be){ne.forceMinPriority(be)}}}}class gh{constructor(v){this.strategies=v}isSupported(){return Or(this.strategies,ge.method("isSupported"))}connect(v,S){return s_(this.strategies,v,function(N,L){return function(K,ne){if(L[N].error=K,K){o_(L)&&S(!0);return}Te(L,function(be){be.forceMinPriority(ne.transport.priority)}),S(null,ne)}})}}function s_(x,v,S){var N=oe(x,function(L,K,ne,be){return L.connect(v,S(K,be))});return{abort:function(){Te(N,a_)},forceMinPriority:function(L){Te(N,function(K){K.forceMinPriority(L)})}}}function o_(x){return Yr(x,function(v){return!!v.error})}function a_(x){!x.error&&!x.aborted&&(x.abort(),x.aborted=!0)}class l_{constructor(v,S,N){this.strategy=v,this.transports=S,this.ttl=N.ttl||1800*1e3,this.usingTLS=N.useTLS,this.timeline=N.timeline}isSupported(){return this.strategy.isSupported()}connect(v,S){var N=this.usingTLS,L=u_(N),K=L&&L.cacheSkipCount?L.cacheSkipCount:0,ne=[this.strategy];if(L&&L.timestamp+this.ttl>=ge.now()){var be=this.transports[L.transport];be&&(["ws","wss"].includes(L.transport)||K>3?(this.timeline.info({cached:!0,transport:L.transport,latency:L.latency}),ne.push(new Zi([be],{timeout:L.latency*2+1e3,failFast:!0}))):K++)}var ke=ge.now(),ot=ne.pop().connect(v,function vt(Ut,Hl){Ut?(cv(N),ne.length>0?(ke=ge.now(),ot=ne.pop().connect(v,vt)):S(Ut)):(c_(N,Hl.transport.name,ge.now()-ke,K),S(null,Hl))});return{abort:function(){ot.abort()},forceMinPriority:function(vt){v=vt,ot&&ot.forceMinPriority(vt)}}}}function vh(x){return"pusherTransport"+(x?"TLS":"NonTLS")}function u_(x){var v=Oe.getLocalStorage();if(v)try{var S=v[vh(x)];if(S)return JSON.parse(S)}catch{cv(x)}return null}function c_(x,v,S,N){var L=Oe.getLocalStorage();if(L)try{L[vh(x)]=ar({timestamp:ge.now(),transport:v,latency:S,cacheSkipCount:N})}catch{}}function cv(x){var v=Oe.getLocalStorage();if(v)try{delete v[vh(x)]}catch{}}class Ul{constructor(v,{delay:S}){this.strategy=v,this.options={delay:S}}isSupported(){return this.strategy.isSupported()}connect(v,S){var N=this.strategy,L,K=new ae(this.options.delay,function(){L=N.connect(v,S)});return{abort:function(){K.ensureAborted(),L&&L.abort()},forceMinPriority:function(ne){v=ne,L&&L.forceMinPriority(ne)}}}}class ha{constructor(v,S,N){this.test=v,this.trueBranch=S,this.falseBranch=N}isSupported(){var v=this.test()?this.trueBranch:this.falseBranch;return v.isSupported()}connect(v,S){var N=this.test()?this.trueBranch:this.falseBranch;return N.connect(v,S)}}class f_{constructor(v){this.strategy=v}isSupported(){return this.strategy.isSupported()}connect(v,S){var N=this.strategy.connect(v,function(L,K){K&&N.abort(),S(L,K)});return N}}function da(x){return function(){return x.isSupported()}}var h_=function(x,v,S){var N={};function L(xv,fD,hD,dD,pD){var Iv=S(x,xv,fD,hD,dD,pD);return N[xv]=Iv,Iv}var K=Object.assign({},v,{hostNonTLS:x.wsHost+":"+x.wsPort,hostTLS:x.wsHost+":"+x.wssPort,httpPath:x.wsPath}),ne=Object.assign({},K,{useTLS:!0}),be=Object.assign({},v,{hostNonTLS:x.httpHost+":"+x.httpPort,hostTLS:x.httpHost+":"+x.httpsPort,httpPath:x.httpPath}),ke={loop:!0,timeout:15e3,timeoutLimit:6e4},ot=new uv({minPingDelay:1e4,maxPingDelay:x.activityTimeout}),vt=new uv({lives:2,minPingDelay:1e4,maxPingDelay:x.activityTimeout}),Ut=L("ws","ws",3,K,ot),Hl=L("wss","ws",3,ne,ot),oD=L("sockjs","sockjs",1,be),vv=L("xhr_streaming","xhr_streaming",1,be,vt),aD=L("xdr_streaming","xdr_streaming",1,be,vt),yv=L("xhr_polling","xhr_polling",1,be),lD=L("xdr_polling","xdr_polling",1,be),Cv=new Zi([Ut],ke),uD=new Zi([Hl],ke),cD=new Zi([oD],ke),Ev=new Zi([new ha(da(vv),vv,aD)],ke),bv=new Zi([new ha(da(yv),yv,lD)],ke),Sv=new Zi([new ha(da(Ev),new gh([Ev,new Ul(bv,{delay:4e3})]),bv)],ke),Ch=new ha(da(Sv),Sv,cD),Eh;return v.useTLS?Eh=new gh([Cv,new Ul(Ch,{delay:2e3})]):Eh=new gh([Cv,new Ul(uD,{delay:2e3}),new Ul(Ch,{delay:5e3})]),new l_(new f_(new ha(da(Ut),Eh,Ch)),N,{ttl:18e5,timeline:v.timeline,useTLS:v.useTLS})},d_=h_,p_=function(){var x=this;x.timeline.info(x.buildTimelineMessage({transport:x.name+(x.options.useTLS?"s":"")})),x.hooks.isInitialized()?x.changeState("initialized"):x.hooks.file?(x.changeState("initializing"),u.load(x.hooks.file,{useTLS:x.options.useTLS},function(v,S){x.hooks.isInitialized()?(x.changeState("initialized"),S(!0)):(v&&x.onError(v),x.onClose(),S(!1))})):x.onClose()},m_={getRequest:function(x){var v=new window.XDomainRequest;return v.ontimeout=function(){x.emit("error",new b),x.close()},v.onerror=function(S){x.emit("error",S),x.close()},v.onprogress=function(){v.responseText&&v.responseText.length>0&&x.onChunk(200,v.responseText)},v.onload=function(){v.responseText&&v.responseText.length>0&&x.onChunk(200,v.responseText),x.emit("finished",200),x.close()},v},abortRequest:function(x){x.ontimeout=x.onerror=x.onprogress=x.onload=null,x.abort()}},g_=m_;let v_=256*1024;class y_ extends Hn{constructor(v,S,N){super(),this.hooks=v,this.method=S,this.url=N}start(v){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},Oe.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(v)}close(){this.unloader&&(Oe.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(v,S){for(;;){var N=this.advanceBuffer(S);if(N)this.emit("chunk",{status:v,data:N});else break}this.isBufferTooLong(S)&&this.emit("buffer_too_long")}advanceBuffer(v){var S=v.slice(this.position),N=S.indexOf(`
`);return N!==-1?(this.position+=N+1,S.slice(0,N)):null}isBufferTooLong(v){return this.position===v.length&&v.length>v_}}var fv=function(x){return x[x.CONNECTING=0]="CONNECTING",x[x.OPEN=1]="OPEN",x[x.CLOSED=3]="CLOSED",x}(fv||{}),Xi=fv,C_=1;class E_{constructor(v,S){this.hooks=v,this.session=dv(1e3)+"/"+I_(8),this.location=b_(S),this.readyState=Xi.CONNECTING,this.openStream()}send(v){return this.sendRaw(JSON.stringify([v]))}ping(){this.hooks.sendHeartbeat(this)}close(v,S){this.onClose(v,S,!0)}sendRaw(v){if(this.readyState===Xi.OPEN)try{return Oe.createSocketRequest("POST",hv(S_(this.location,this.session))).start(v),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(v,S,N){this.closeStream(),this.readyState=Xi.CLOSED,this.onclose&&this.onclose({code:v,reason:S,wasClean:N})}onChunk(v){if(v.status===200){this.readyState===Xi.OPEN&&this.onActivity();var S,N=v.data.slice(0,1);switch(N){case"o":S=JSON.parse(v.data.slice(1)||"{}"),this.onOpen(S);break;case"a":S=JSON.parse(v.data.slice(1)||"[]");for(var L=0;L<S.length;L++)this.onEvent(S[L]);break;case"m":S=JSON.parse(v.data.slice(1)||"null"),this.onEvent(S);break;case"h":this.hooks.onHeartbeat(this);break;case"c":S=JSON.parse(v.data.slice(1)||"[]"),this.onClose(S[0],S[1],!0);break}}}onOpen(v){this.readyState===Xi.CONNECTING?(v&&v.hostname&&(this.location.base=x_(this.location.base,v.hostname)),this.readyState=Xi.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(v){this.readyState===Xi.OPEN&&this.onmessage&&this.onmessage({data:v})}onActivity(){this.onactivity&&this.onactivity()}onError(v){this.onerror&&this.onerror(v)}openStream(){this.stream=Oe.createSocketRequest("POST",hv(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",v=>{this.onChunk(v)}),this.stream.bind("finished",v=>{this.hooks.onFinished(this,v)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(v){ge.defer(()=>{this.onError(v),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function b_(x){var v=/([^\?]*)\/*(\??.*)/.exec(x);return{base:v[1],queryString:v[2]}}function S_(x,v){return x.base+"/"+v+"/xhr_send"}function hv(x){var v=x.indexOf("?")===-1?"?":"&";return x+v+"t="+ +new Date+"&n="+C_++}function x_(x,v){var S=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(x);return S[1]+v+S[3]}function dv(x){return Oe.randomInt(x)}function I_(x){for(var v=[],S=0;S<x;S++)v.push(dv(32).toString(32));return v.join("")}var w_=E_,T_={getReceiveURL:function(x,v){return x.base+"/"+v+"/xhr_streaming"+x.queryString},onHeartbeat:function(x){x.sendRaw("[]")},sendHeartbeat:function(x){x.sendRaw("[]")},onFinished:function(x,v){x.onClose(1006,"Connection interrupted ("+v+")",!1)}},__=T_,D_={getReceiveURL:function(x,v){return x.base+"/"+v+"/xhr"+x.queryString},onHeartbeat:function(){},sendHeartbeat:function(x){x.sendRaw("[]")},onFinished:function(x,v){v===200?x.reconnect():x.onClose(1006,"Connection interrupted ("+v+")",!1)}},A_=D_,M_={getRequest:function(x){var v=Oe.getXHRAPI(),S=new v;return S.onreadystatechange=S.onprogress=function(){switch(S.readyState){case 3:S.responseText&&S.responseText.length>0&&x.onChunk(S.status,S.responseText);break;case 4:S.responseText&&S.responseText.length>0&&x.onChunk(S.status,S.responseText),x.emit("finished",S.status),x.close();break}},S},abortRequest:function(x){x.onreadystatechange=null,x.abort()}},P_=M_,N_={createStreamingSocket(x){return this.createSocket(__,x)},createPollingSocket(x){return this.createSocket(A_,x)},createSocket(x,v){return new w_(x,v)},createXHR(x,v){return this.createRequest(P_,x,v)},createRequest(x,v,S){return new y_(x,v,S)}},pv=N_;pv.createXDR=function(x,v){return this.createRequest(g_,x,v)};var R_=pv,k_={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:i,DependenciesReceivers:l,getDefaultStrategy:d_,Transports:qT,transportConnectionInitializer:p_,HTTPFactory:R_,TimelineTransport:MT,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(x){window.Pusher=x;var v=()=>{this.onDocumentBody(x.ready)};window.JSON?v():u.load("json2",{},v)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:F,jsonp:js}},onDocumentBody(x){document.body?x():setTimeout(()=>{this.onDocumentBody(x)},0)},createJSONPRequest(x,v){return new qs(x,v)},createScriptRequest(x){return new Hs(x)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var x=this.getXHRAPI();return new x},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return zT},createWebSocket(x){var v=this.getWebSocketAPI();return new v(x)},createSocketRequest(x,v){if(this.isXHRSupported())return this.HTTPFactory.createXHR(x,v);if(this.isXDRSupported(v.indexOf("https:")===0))return this.HTTPFactory.createXDR(x,v);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var x=this.getXHRAPI();return!!x&&new x().withCredentials!==void 0},isXDRSupported(x){var v=x?"https:":"http:",S=this.getProtocol();return!!window.XDomainRequest&&S===v},addUnloadListener(x){window.addEventListener!==void 0?window.addEventListener("unload",x,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",x)},removeUnloadListener(x){window.addEventListener!==void 0?window.removeEventListener("unload",x,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",x)},randomInt(x){return Math.floor(function(){return(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)}()*x)}},Oe=k_,mv=function(x){return x[x.ERROR=3]="ERROR",x[x.INFO=6]="INFO",x[x.DEBUG=7]="DEBUG",x}(mv||{}),jl=mv;class F_{constructor(v,S,N){this.key=v,this.session=S,this.events=[],this.options=N||{},this.sent=0,this.uniqueID=0}log(v,S){v<=this.options.level&&(this.events.push(we({},S,{timestamp:ge.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(v){this.log(jl.ERROR,v)}info(v){this.log(jl.INFO,v)}debug(v){this.log(jl.DEBUG,v)}isEmpty(){return this.events.length===0}send(v,S){var N=we({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],v(N,(L,K)=>{L||this.sent++,S&&S(L,K)}),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class L_{constructor(v,S,N,L){this.name=v,this.priority=S,this.transport=N,this.options=L||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(v,S){if(this.isSupported()){if(this.priority<v)return gv(new g,S)}else return gv(new I,S);var N=!1,L=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),K=null,ne=function(){L.unbind("initialized",ne),L.connect()},be=function(){K=qn.createHandshake(L,function(Ut){N=!0,vt(),S(null,Ut)})},ke=function(Ut){vt(),S(Ut)},ot=function(){vt();var Ut;Ut=ar(L),S(new C(Ut))},vt=function(){L.unbind("initialized",ne),L.unbind("open",be),L.unbind("error",ke),L.unbind("closed",ot)};return L.bind("initialized",ne),L.bind("open",be),L.bind("error",ke),L.bind("closed",ot),L.initialize(),{abort:()=>{N||(vt(),K?K.close():L.close())},forceMinPriority:Ut=>{N||this.priority<Ut&&(K?K.close():L.close())}}}}function gv(x,v){return ge.defer(function(){v(x)}),{abort:function(){},forceMinPriority:function(){}}}let{Transports:O_}=Oe;var B_=function(x,v,S,N,L,K){var ne=O_[S];if(!ne)throw new E(S);var be=(!x.enabledTransports||ht(x.enabledTransports,v)!==-1)&&(!x.disabledTransports||ht(x.disabledTransports,v)===-1),ke;return be?(L=Object.assign({ignoreNullOrigin:x.ignoreNullOrigin},L),ke=new L_(v,N,K?K.getAssistant(ne):ne,L)):ke=V_,ke},V_={isSupported:function(){return!1},connect:function(x,v){var S=ge.defer(function(){v(new I)});return{abort:function(){S.ensureAborted()},forceMinPriority:function(){}}}};function U_(x){if(x==null)throw"You must pass an options object";if(x.cluster==null)throw"Options object must provide a cluster";"disableStats"in x&&Je.warn("The disableStats option is deprecated in favor of enableStats")}let j_=(x,v)=>{var S="socket_id="+encodeURIComponent(x.socketId);for(var N in v.params)S+="&"+encodeURIComponent(N)+"="+encodeURIComponent(v.params[N]);if(v.paramsProvider!=null){let L=v.paramsProvider();for(var N in L)S+="&"+encodeURIComponent(N)+"="+encodeURIComponent(L[N])}return S};var H_=x=>{if(typeof Oe.getAuthorizers()[x.transport]>"u")throw`'${x.transport}' is not a recognized auth transport`;return(v,S)=>{let N=j_(v,x);Oe.getAuthorizers()[x.transport](Oe,N,x,p.UserAuthentication,S)}};let q_=(x,v)=>{var S="socket_id="+encodeURIComponent(x.socketId);S+="&channel_name="+encodeURIComponent(x.channelName);for(var N in v.params)S+="&"+encodeURIComponent(N)+"="+encodeURIComponent(v.params[N]);if(v.paramsProvider!=null){let L=v.paramsProvider();for(var N in L)S+="&"+encodeURIComponent(N)+"="+encodeURIComponent(L[N])}return S};var G_=x=>{if(typeof Oe.getAuthorizers()[x.transport]>"u")throw`'${x.transport}' is not a recognized auth transport`;return(v,S)=>{let N=q_(v,x);Oe.getAuthorizers()[x.transport](Oe,N,x,p.ChannelAuthorization,S)}};let z_=(x,v,S)=>{let N={authTransport:v.transport,authEndpoint:v.endpoint,auth:{params:v.params,headers:v.headers}};return(L,K)=>{let ne=x.channel(L.channelName);S(ne,N).authorize(L.socketId,K)}};function $_(x,v){let S={activityTimeout:x.activityTimeout||o.activityTimeout,cluster:x.cluster,httpPath:x.httpPath||o.httpPath,httpPort:x.httpPort||o.httpPort,httpsPort:x.httpsPort||o.httpsPort,pongTimeout:x.pongTimeout||o.pongTimeout,statsHost:x.statsHost||o.stats_host,unavailableTimeout:x.unavailableTimeout||o.unavailableTimeout,wsPath:x.wsPath||o.wsPath,wsPort:x.wsPort||o.wsPort,wssPort:x.wssPort||o.wssPort,enableStats:Z_(x),httpHost:K_(x),useTLS:Y_(x),wsHost:W_(x),userAuthenticator:X_(x),channelAuthorizer:eD(x,v)};return"disabledTransports"in x&&(S.disabledTransports=x.disabledTransports),"enabledTransports"in x&&(S.enabledTransports=x.enabledTransports),"ignoreNullOrigin"in x&&(S.ignoreNullOrigin=x.ignoreNullOrigin),"timelineParams"in x&&(S.timelineParams=x.timelineParams),"nacl"in x&&(S.nacl=x.nacl),S}function K_(x){return x.httpHost?x.httpHost:x.cluster?`sockjs-${x.cluster}.pusher.com`:o.httpHost}function W_(x){return x.wsHost?x.wsHost:Q_(x.cluster)}function Q_(x){return`ws-${x}.pusher.com`}function Y_(x){return Oe.getProtocol()==="https:"?!0:x.forceTLS!==!1}function Z_(x){return"enableStats"in x?x.enableStats:"disableStats"in x?!x.disableStats:!1}function X_(x){let v=Object.assign(Object.assign({},o.userAuthentication),x.userAuthentication);return"customHandler"in v&&v.customHandler!=null?v.customHandler:H_(v)}function J_(x,v){let S;return"channelAuthorization"in x?S=Object.assign(Object.assign({},o.channelAuthorization),x.channelAuthorization):(S={transport:x.authTransport||o.authTransport,endpoint:x.authEndpoint||o.authEndpoint},"auth"in x&&("params"in x.auth&&(S.params=x.auth.params),"headers"in x.auth&&(S.headers=x.auth.headers)),"authorizer"in x&&(S.customHandler=z_(v,S,x.authorizer))),S}function eD(x,v){let S=J_(x,v);return"customHandler"in S&&S.customHandler!=null?S.customHandler:G_(S)}class tD extends Hn{constructor(v){super(function(S,N){Je.debug(`No callbacks on watchlist events for ${S}`)}),this.pusher=v,this.bindWatchlistInternalEvent()}handleEvent(v){v.data.events.forEach(S=>{this.emit(S.name,S)})}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",v=>{var S=v.event;S==="pusher_internal:watchlist_events"&&this.handleEvent(v)})}}function rD(){let x,v;return{promise:new Promise((N,L)=>{x=N,v=L}),resolve:x,reject:v}}var nD=rD;class iD extends Hn{constructor(v){super(function(S,N){Je.debug("No callbacks on user for "+S)}),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(S,N)=>{if(S){Je.warn(`Error during signin: ${S}`),this._cleanup();return}this.pusher.send_event("pusher:signin",{auth:N.auth,user_data:N.user_data})},this.pusher=v,this.pusher.connection.bind("state_change",({previous:S,current:N})=>{S!=="connected"&&N==="connected"&&this._signin(),S==="connected"&&N!=="connected"&&(this._cleanup(),this._newSigninPromiseIfNeeded())}),this.watchlist=new tD(v),this.pusher.connection.bind("message",S=>{var N=S.event;N==="pusher:signin_success"&&this._onSigninSuccess(S.data),this.serverToUserChannel&&this.serverToUserChannel.name===S.channel&&this.serverToUserChannel.handleEvent(S)})}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),this.pusher.connection.state==="connected"&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(v){try{this.user_data=JSON.parse(v.user_data)}catch{Je.error(`Failed parsing user data after signin: ${v.user_data}`),this._cleanup();return}if(typeof this.user_data.id!="string"||this.user_data.id===""){Je.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){let v=S=>{S.subscriptionPending&&S.subscriptionCancelled?S.reinstateSubscription():!S.subscriptionPending&&this.pusher.connection.state==="connected"&&S.subscribe()};this.serverToUserChannel=new dh(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global((S,N)=>{S.indexOf("pusher_internal:")===0||S.indexOf("pusher:")===0||this.emit(S,N)}),v(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested||this.signinDonePromise&&!this.signinDonePromise.done)return;let{promise:v,resolve:S,reject:N}=nD();v.done=!1;let L=()=>{v.done=!0};v.then(L).catch(L),this.signinDonePromise=v,this._signinDoneResolve=S}}class Xt{static ready(){Xt.isReady=!0;for(var v=0,S=Xt.instances.length;v<S;v++)Xt.instances[v].connect()}static getClientFeatures(){return We(Fr({ws:Oe.Transports.ws},function(v){return v.isSupported({})}))}constructor(v,S){sD(v),U_(S),this.key=v,this.config=$_(S,this),this.channels=qn.createChannels(),this.global_emitter=new Hn,this.sessionID=Oe.randomInt(1e9),this.timeline=new F_(this.key,this.sessionID,{cluster:this.config.cluster,features:Xt.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:jl.INFO,version:o.VERSION}),this.config.enableStats&&(this.timelineSender=qn.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+Oe.TimelineTransport.name}));var N=L=>Oe.getDefaultStrategy(this.config,L,B_);this.connection=qn.createConnectionManager(this.key,{getStrategy:N,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind("connected",()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())}),this.connection.bind("message",L=>{var K=L.event,ne=K.indexOf("pusher_internal:")===0;if(L.channel){var be=this.channel(L.channel);be&&be.handleEvent(L)}ne||this.global_emitter.emit(L.event,L.data)}),this.connection.bind("connecting",()=>{this.channels.disconnect()}),this.connection.bind("disconnected",()=>{this.channels.disconnect()}),this.connection.bind("error",L=>{Je.warn(L)}),Xt.instances.push(this),this.timeline.info({instances:Xt.instances.length}),this.user=new iD(this),Xt.isReady&&this.connect()}channel(v){return this.channels.find(v)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var v=this.connection.isUsingTLS(),S=this.timelineSender;this.timelineSenderTimer=new pe(6e4,function(){S.send(v)})}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(v,S,N){return this.global_emitter.bind(v,S,N),this}unbind(v,S,N){return this.global_emitter.unbind(v,S,N),this}bind_global(v){return this.global_emitter.bind_global(v),this}unbind_global(v){return this.global_emitter.unbind_global(v),this}unbind_all(v){return this.global_emitter.unbind_all(),this}subscribeAll(){var v;for(v in this.channels.channels)this.channels.channels.hasOwnProperty(v)&&this.subscribe(v)}subscribe(v){var S=this.channels.add(v,this);return S.subscriptionPending&&S.subscriptionCancelled?S.reinstateSubscription():!S.subscriptionPending&&this.connection.state==="connected"&&S.subscribe(),S}unsubscribe(v){var S=this.channels.find(v);S&&S.subscriptionPending?S.cancelSubscription():(S=this.channels.remove(v),S&&S.subscribed&&S.unsubscribe())}send_event(v,S,N){return this.connection.send_event(v,S,N)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}Xt.instances=[],Xt.isReady=!1,Xt.logToConsole=!1,Xt.Runtime=Oe,Xt.ScriptReceivers=Oe.ScriptReceivers,Xt.DependenciesReceivers=Oe.DependenciesReceivers,Xt.auth_callbacks=Oe.auth_callbacks;var yh=t.default=Xt;function sD(x){if(x==null)throw"You must pass your app key when you instantiate Pusher."}Oe.setup(Xt)}])})});var qe=ce((m7,aI)=>{"use strict";aI.exports={options:{usePureJavaScript:!1}}});var cI=ce((g7,uI)=>{"use strict";var e0={};uI.exports=e0;var lI={};e0.encode=function(e,t,r){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(r!==void 0&&typeof r!="number")throw new TypeError('"maxline" must be a number.');var n="";if(!(e instanceof Uint8Array))n=SB(e,t);else{var i=0,s=t.length,o=t.charAt(0),a=[0];for(i=0;i<e.length;++i){for(var l=0,u=e[i];l<a.length;++l)u+=a[l]<<8,a[l]=u%s,u=u/s|0;for(;u>0;)a.push(u%s),u=u/s|0}for(i=0;e[i]===0&&i<e.length-1;++i)n+=o;for(i=a.length-1;i>=0;--i)n+=t[a[i]]}if(r){var c=new RegExp(".{1,"+r+"}","g");n=n.match(c).join(`\r
`)}return n};e0.decode=function(e,t){if(typeof e!="string")throw new TypeError('"input" must be a string.');if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');var r=lI[t];if(!r){r=lI[t]=[];for(var n=0;n<t.length;++n)r[t.charCodeAt(n)]=n}e=e.replace(/\s/g,"");for(var i=t.length,s=t.charAt(0),o=[0],n=0;n<e.length;n++){var a=r[e.charCodeAt(n)];if(a===void 0)return;for(var l=0,u=a;l<o.length;++l)u+=o[l]*i,o[l]=u&255,u>>=8;for(;u>0;)o.push(u&255),u>>=8}for(var c=0;e[c]===s&&c<e.length-1;++c)o.push(0);return typeof Buffer<"u"?Buffer.from(o.reverse()):new Uint8Array(o.reverse())};function SB(e,t){var r=0,n=t.length,i=t.charAt(0),s=[0];for(r=0;r<e.length();++r){for(var o=0,a=e.at(r);o<s.length;++o)a+=s[o]<<8,s[o]=a%n,a=a/n|0;for(;a>0;)s.push(a%n),a=a/n|0}var l="";for(r=0;e.at(r)===0&&r<e.length()-1;++r)l+=i;for(r=s.length-1;r>=0;--r)l+=t[s[r]];return l}});var nt=ce((v7,pI)=>{"use strict";var fI=qe(),hI=cI(),U=pI.exports=fI.util=fI.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){U.nextTick=process.nextTick,typeof setImmediate=="function"?U.setImmediate=setImmediate:U.setImmediate=U.nextTick;return}if(typeof setImmediate=="function"){U.setImmediate=function(){return setImmediate.apply(void 0,arguments)},U.nextTick=function(a){return setImmediate(a)};return}if(U.setImmediate=function(a){setTimeout(a,0)},typeof window<"u"&&typeof window.postMessage=="function"){let a=function(l){if(l.source===window&&l.data===e){l.stopPropagation();var u=t.slice();t.length=0,u.forEach(function(c){c()})}};var o=a,e="forge.setImmediate",t=[];U.setImmediate=function(l){t.push(l),t.length===1&&window.postMessage(e,"*")},window.addEventListener("message",a,!0)}if(typeof MutationObserver<"u"){var r=Date.now(),n=!0,i=document.createElement("div"),t=[];new MutationObserver(function(){var l=t.slice();t.length=0,l.forEach(function(u){u()})}).observe(i,{attributes:!0});var s=U.setImmediate;U.setImmediate=function(l){Date.now()-r>15?(r=Date.now(),s(l)):(t.push(l),t.length===1&&i.setAttribute("a",n=!n))}}U.nextTick=U.setImmediate})();U.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;U.globalScope=function(){return U.isNodejs?global:typeof self>"u"?window:self}();U.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};U.isArrayBuffer=function(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer};U.isArrayBufferView=function(e){return e&&U.isArrayBuffer(e.buffer)&&e.byteLength!==void 0};function Il(e){if(!(e===8||e===16||e===24||e===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}U.ByteBuffer=t0;function t0(e){if(this.data="",this.read=0,typeof e=="string")this.data=e;else if(U.isArrayBuffer(e)||U.isArrayBufferView(e))if(typeof Buffer<"u"&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch{for(var r=0;r<t.length;++r)this.putByte(t[r])}}else(e instanceof t0||typeof e=="object"&&typeof e.data=="string"&&typeof e.read=="number")&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}U.ByteStringBuffer=t0;var xB=4096;U.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>xB&&(this.data.substr(0,1),this._constructedStringLength=0)};U.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};U.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};U.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))};U.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)t&1&&(r+=e),t>>>=1,t>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this};U.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this};U.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(U.encodeUtf8(e))};U.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};U.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};U.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};U.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))};U.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))};U.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))};U.ByteStringBuffer.prototype.putInt=function(e,t){Il(t);var r="";do t-=8,r+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(r)};U.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)};U.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())};U.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};U.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e};U.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e};U.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e};U.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e};U.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e};U.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e};U.ByteStringBuffer.prototype.getInt=function(e){Il(e);var t=0;do t=(t<<8)+this.data.charCodeAt(this.read++),e-=8;while(e>0);return t};U.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t};U.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};U.ByteStringBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};U.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)};U.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this};U.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};U.ByteStringBuffer.prototype.copy=function(){var e=U.createBuffer(this.data);return e.read=this.read,e};U.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};U.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};U.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this};U.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t);r<16&&(e+="0"),e+=r.toString(16)}return e};U.ByteStringBuffer.prototype.toString=function(){return U.decodeUtf8(this.bytes())};function IB(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var r=U.isArrayBuffer(e),n=U.isArrayBufferView(e);if(r||n){r?this.data=new DataView(e):this.data=new DataView(e.buffer,e.byteOffset,e.byteLength),this.write="writeOffset"in t?t.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,e!=null&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)}U.DataBuffer=IB;U.DataBuffer.prototype.length=function(){return this.write-this.read};U.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};U.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this};U.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this};U.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r<t;++r)this.data.setUint8(e);return this};U.DataBuffer.prototype.putBytes=function(e,t){if(U.isArrayBufferView(e)){var r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),n=r.byteLength-r.byteOffset;this.accommodate(n);var i=new Uint8Array(this.data.buffer,this.write);return i.set(r),this.write+=n,this}if(U.isArrayBuffer(e)){var r=new Uint8Array(e);this.accommodate(r.byteLength);var i=new Uint8Array(this.data.buffer);return i.set(r,this.write),this.write+=r.byteLength,this}if(e instanceof U.DataBuffer||typeof e=="object"&&typeof e.read=="number"&&typeof e.write=="number"&&U.isArrayBufferView(e.data)){var r=new Uint8Array(e.data.byteLength,e.read,e.length());this.accommodate(r.byteLength);var i=new Uint8Array(e.data.byteLength,this.write);return i.set(r),this.write+=r.byteLength,this}if(e instanceof U.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary",typeof e=="string"){var s;if(t==="hex")return this.accommodate(Math.ceil(e.length/2)),s=new Uint8Array(this.data.buffer,this.write),this.write+=U.binary.hex.decode(e,s,this.write),this;if(t==="base64")return this.accommodate(Math.ceil(e.length/4)*3),s=new Uint8Array(this.data.buffer,this.write),this.write+=U.binary.base64.decode(e,s,this.write),this;if(t==="utf8"&&(e=U.encodeUtf8(e),t="binary"),t==="binary"||t==="raw")return this.accommodate(e.length),s=new Uint8Array(this.data.buffer,this.write),this.write+=U.binary.raw.decode(s),this;if(t==="utf16")return this.accommodate(e.length*2),s=new Uint16Array(this.data.buffer,this.write),this.write+=U.text.utf16.encode(s),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)};U.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this};U.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")};U.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this};U.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this};U.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this};U.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this};U.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this};U.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this};U.DataBuffer.prototype.putInt=function(e,t){Il(t),this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this};U.DataBuffer.prototype.putSignedInt=function(e,t){return Il(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)};U.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};U.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e};U.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e};U.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e};U.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e};U.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e};U.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e};U.DataBuffer.prototype.getInt=function(e){Il(e);var t=0;do t=(t<<8)+this.data.getInt8(this.read++),e-=8;while(e>0);return t};U.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t};U.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};U.DataBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};U.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)};U.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this};U.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};U.DataBuffer.prototype.copy=function(){return new U.DataBuffer(this)};U.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this};U.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};U.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this};U.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var r=this.data.getUint8(t);r<16&&(e+="0"),e+=r.toString(16)}return e};U.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if(e=e||"utf8",e==="binary"||e==="raw")return U.binary.raw.encode(t);if(e==="hex")return U.binary.hex.encode(t);if(e==="base64")return U.binary.base64.encode(t);if(e==="utf8")return U.text.utf8.decode(t);if(e==="utf16")return U.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)};U.createBuffer=function(e,t){return t=t||"raw",e!==void 0&&t==="utf8"&&(e=U.encodeUtf8(e)),new U.ByteBuffer(e)};U.fillString=function(e,t){for(var r="";t>0;)t&1&&(r+=e),t>>>=1,t>0&&(e+=e);return r};U.xorBytes=function(e,t,r){for(var n="",i="",s="",o=0,a=0;r>0;--r,++o)i=e.charCodeAt(o)^t.charCodeAt(o),a>=10&&(n+=s,s="",a=0),s+=String.fromCharCode(i),++a;return n+=s,n};U.hexToBytes=function(e){var t="",r=0;for(e.length&!0&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t};U.bytesToHex=function(e){return U.createBuffer(e).toHex()};U.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var Bi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Vi=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,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,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],dI="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";U.encode64=function(e,t){for(var r="",n="",i,s,o,a=0;a<e.length;)i=e.charCodeAt(a++),s=e.charCodeAt(a++),o=e.charCodeAt(a++),r+=Bi.charAt(i>>2),r+=Bi.charAt((i&3)<<4|s>>4),isNaN(s)?r+="==":(r+=Bi.charAt((s&15)<<2|o>>6),r+=isNaN(o)?"=":Bi.charAt(o&63)),t&&r.length>t&&(n+=r.substr(0,t)+`\r
`,r=r.substr(t));return n+=r,n};U.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",r,n,i,s,o=0;o<e.length;)r=Vi[e.charCodeAt(o++)-43],n=Vi[e.charCodeAt(o++)-43],i=Vi[e.charCodeAt(o++)-43],s=Vi[e.charCodeAt(o++)-43],t+=String.fromCharCode(r<<2|n>>4),i!==64&&(t+=String.fromCharCode((n&15)<<4|i>>2),s!==64&&(t+=String.fromCharCode((i&3)<<6|s)));return t};U.encodeUtf8=function(e){return unescape(encodeURIComponent(e))};U.decodeUtf8=function(e){return decodeURIComponent(escape(e))};U.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:hI.encode,decode:hI.decode}};U.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)};U.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length)),r=r||0;for(var i=r,s=0;s<e.length;++s)n[i++]=e.charCodeAt(s);return t?i-r:n};U.binary.hex.encode=U.bytesToHex;U.binary.hex.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/2))),r=r||0;var i=0,s=r;for(e.length&1&&(i=1,n[s++]=parseInt(e[0],16));i<e.length;i+=2)n[s++]=parseInt(e.substr(i,2),16);return t?s-r:n};U.binary.base64.encode=function(e,t){for(var r="",n="",i,s,o,a=0;a<e.byteLength;)i=e[a++],s=e[a++],o=e[a++],r+=Bi.charAt(i>>2),r+=Bi.charAt((i&3)<<4|s>>4),isNaN(s)?r+="==":(r+=Bi.charAt((s&15)<<2|o>>6),r+=isNaN(o)?"=":Bi.charAt(o&63)),t&&r.length>t&&(n+=r.substr(0,t)+`\r
`,r=r.substr(t));return n+=r,n};U.binary.base64.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),r=r||0;for(var i,s,o,a,l=0,u=r;l<e.length;)i=Vi[e.charCodeAt(l++)-43],s=Vi[e.charCodeAt(l++)-43],o=Vi[e.charCodeAt(l++)-43],a=Vi[e.charCodeAt(l++)-43],n[u++]=i<<2|s>>4,o!==64&&(n[u++]=(s&15)<<4|o>>2,a!==64&&(n[u++]=(o&3)<<6|a));return t?u-r:n.subarray(0,u)};U.binary.base58.encode=function(e,t){return U.binary.baseN.encode(e,dI,t)};U.binary.base58.decode=function(e,t){return U.binary.baseN.decode(e,dI,t)};U.text={utf8:{},utf16:{}};U.text.utf8.encode=function(e,t,r){e=U.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length)),r=r||0;for(var i=r,s=0;s<e.length;++s)n[i++]=e.charCodeAt(s);return t?i-r:n};U.text.utf8.decode=function(e){return U.decodeUtf8(String.fromCharCode.apply(null,e))};U.text.utf16.encode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length*2));var i=new Uint16Array(n.buffer);r=r||0;for(var s=r,o=r,a=0;a<e.length;++a)i[o++]=e.charCodeAt(a),s+=2;return t?s-r:n};U.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))};U.deflate=function(e,t,r){if(t=U.decode64(e.deflate(U.encode64(t)).rval),r){var n=2,i=t.charCodeAt(1);i&32&&(n=6),t=t.substring(n,t.length-4)}return t};U.inflate=function(e,t,r){var n=e.inflate(U.encode64(t)).rval;return n===null?null:U.decode64(n)};var r0=function(e,t,r){if(!e)throw new Error("WebStorage not available.");var n;if(r===null?n=e.removeItem(t):(r=U.encode64(JSON.stringify(r)),n=e.setItem(t,r)),typeof n<"u"&&n.rval!==!0){var i=new Error(n.error.message);throw i.id=n.error.id,i.name=n.error.name,i}},n0=function(e,t){if(!e)throw new Error("WebStorage not available.");var r=e.getItem(t);if(e.init)if(r.rval===null){if(r.error){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}r=null}else r=r.rval;return r!==null&&(r=JSON.parse(U.decode64(r))),r},wB=function(e,t,r,n){var i=n0(e,t);i===null&&(i={}),i[r]=n,r0(e,t,i)},TB=function(e,t,r){var n=n0(e,t);return n!==null&&(n=r in n?n[r]:null),n},_B=function(e,t,r){var n=n0(e,t);if(n!==null&&r in n){delete n[r];var i=!0;for(var s in n){i=!1;break}i&&(n=null),r0(e,t,n)}},DB=function(e,t){r0(e,t,null)},Mf=function(e,t,r){var n=null;typeof r>"u"&&(r=["web","flash"]);var i,s=!1,o=null;for(var a in r){i=r[a];try{if(i==="flash"||i==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");n=e.apply(this,t),s=i==="flash"}(i==="web"||i==="both")&&(t[0]=localStorage,n=e.apply(this,t),s=!0)}catch(l){o=l}if(s)break}if(!s)throw o;return n};U.setItem=function(e,t,r,n,i){Mf(wB,arguments,i)};U.getItem=function(e,t,r,n){return Mf(TB,arguments,n)};U.removeItem=function(e,t,r,n){Mf(_B,arguments,n)};U.clearItems=function(e,t,r){Mf(DB,arguments,r)};U.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0};U.format=function(e){for(var t=/%./g,r,n,i=0,s=[],o=0;r=t.exec(e);){n=e.substring(o,t.lastIndex-2),n.length>0&&s.push(n),o=t.lastIndex;var a=r[0][1];switch(a){case"s":case"o":i<arguments.length?s.push(arguments[i+++1]):s.push("<?>");break;case"%":s.push("%");break;default:s.push("<%"+a+"?>")}}return s.push(e.substring(o)),s.join("")};U.formatNumber=function(e,t,r,n){var i=e,s=isNaN(t=Math.abs(t))?2:t,o=r===void 0?",":r,a=n===void 0?".":n,l=i<0?"-":"",u=parseInt(i=Math.abs(+i||0).toFixed(s),10)+"",c=u.length>3?u.length%3:0;return l+(c?u.substr(0,c)+a:"")+u.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+a)+(s?o+Math.abs(i-u).toFixed(s).slice(2):"")};U.formatSize=function(e){return e>=1073741824?e=U.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?e=U.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?e=U.formatNumber(e/1024,0)+" KiB":e=U.formatNumber(e,0)+" bytes",e};U.bytesFromIP=function(e){return e.indexOf(".")!==-1?U.bytesFromIPv4(e):e.indexOf(":")!==-1?U.bytesFromIPv6(e):null};U.bytesFromIPv4=function(e){if(e=e.split("."),e.length!==4)return null;for(var t=U.createBuffer(),r=0;r<e.length;++r){var n=parseInt(e[r],10);if(isNaN(n))return null;t.putByte(n)}return t.getBytes()};U.bytesFromIPv6=function(e){var t=0;e=e.split(":").filter(function(o){return o.length===0&&++t,!0});for(var r=(8-e.length+t)*2,n=U.createBuffer(),i=0;i<8;++i){if(!e[i]||e[i].length===0){n.fillWithByte(0,r),r=0;continue}var s=U.hexToBytes(e[i]);s.length<2&&n.putByte(0),n.putBytes(s)}return n.getBytes()};U.bytesToIP=function(e){return e.length===4?U.bytesToIPv4(e):e.length===16?U.bytesToIPv6(e):null};U.bytesToIPv4=function(e){if(e.length!==4)return null;for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t.join(".")};U.bytesToIPv6=function(e){if(e.length!==16)return null;for(var t=[],r=[],n=0,i=0;i<e.length;i+=2){for(var s=U.bytesToHex(e[i]+e[i+1]);s[0]==="0"&&s!=="0";)s=s.substr(1);if(s==="0"){var o=r[r.length-1],a=t.length;!o||a!==o.end+1?r.push({start:a,end:a}):(o.end=a,o.end-o.start>r[n].end-r[n].start&&(n=r.length-1))}t.push(s)}if(r.length>0){var l=r[n];l.end-l.start>0&&(t.splice(l.start,l.end-l.start+1,""),l.start===0&&t.unshift(""),l.end===7&&t.push(""))}return t.join(":")};U.estimateCores=function(e,t){if(typeof e=="function"&&(t=e,e={}),e=e||{},"cores"in U&&!e.update)return t(null,U.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return U.cores=navigator.hardwareConcurrency,t(null,U.cores);if(typeof Worker>"u")return U.cores=1,t(null,U.cores);if(typeof Blob>"u")return U.cores=2,t(null,U.cores);var r=URL.createObjectURL(new Blob(["(",(function(){self.addEventListener("message",function(o){for(var a=Date.now(),l=a+4;Date.now()<l;);self.postMessage({st:a,et:l})})}).toString(),")()"],{type:"application/javascript"}));n([],5,16);function n(o,a,l){if(a===0){var u=Math.floor(o.reduce(function(c,f){return c+f},0)/o.length);return U.cores=Math.max(1,u),URL.revokeObjectURL(r),t(null,U.cores)}i(l,function(c,f){o.push(s(l,f)),n(o,a-1,l)})}function i(o,a){for(var l=[],u=[],c=0;c<o;++c){var f=new Worker(r);f.addEventListener("message",function(h){if(u.push(h.data),u.length===o){for(var p=0;p<o;++p)l[p].terminate();a(null,u)}}),l.push(f)}for(var c=0;c<o;++c)l[c].postMessage(c)}function s(o,a){for(var l=[],u=0;u<o;++u)for(var c=a[u],f=l[u]=[],h=0;h<o;++h)if(u!==h){var p=a[h];(c.st>p.st&&c.st<p.et||p.st>c.st&&p.st<c.et)&&f.push(h)}return l.reduce(function(d,m){return Math.max(d,m.length)},0)}}});var Pf=ce((y7,mI)=>{"use strict";var Wt=qe();nt();mI.exports=Wt.cipher=Wt.cipher||{};Wt.cipher.algorithms=Wt.cipher.algorithms||{};Wt.cipher.createCipher=function(e,t){var r=e;if(typeof r=="string"&&(r=Wt.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+e);return new Wt.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})};Wt.cipher.createDecipher=function(e,t){var r=e;if(typeof r=="string"&&(r=Wt.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+e);return new Wt.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})};Wt.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),Wt.cipher.algorithms[e]=t};Wt.cipher.getAlgorithm=function(e){return e=e.toUpperCase(),e in Wt.cipher.algorithms?Wt.cipher.algorithms[e]:null};var i0=Wt.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};i0.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=Wt.util.createBuffer(),this.output=e.output||Wt.util.createBuffer(),this.mode.start(t)};i0.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};i0.prototype.finish=function(e){e&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(r){return e(this.blockSize,r,!1)},this.mode.unpad=function(r){return e(this.blockSize,r,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t))}});var o0=ce((C7,gI)=>{"use strict";var Qt=qe();nt();Qt.cipher=Qt.cipher||{};var Qe=gI.exports=Qt.cipher.modes=Qt.cipher.modes||{};Qe.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Qe.ecb.prototype.start=function(e){};Qe.ecb.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])};Qe.ecb.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])};Qe.ecb.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0};Qe.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return n>this.blockSize<<2?!1:(e.truncate(n),!0)};Qe.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Qe.cbc.prototype.start=function(e){if(e.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in e)this._iv=Nf(e.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};Qe.cbc.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]);this._prev=this._outBlock};Qe.cbc.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)t.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)};Qe.cbc.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0};Qe.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return n>this.blockSize<<2?!1:(e.truncate(n),!0)};Qe.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=Qt.util.createBuffer(),this._partialBytes=0};Qe.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Nf(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Qe.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32()^this._outBlock[i],t.putInt32(this._inBlock[i]);return}var s=(this.blockSize-n)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i]);if(s>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Qe.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32(),t.putInt32(this._inBlock[i]^this._outBlock[i]);return}var s=(this.blockSize-n)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i]);if(s>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Qe.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Qt.util.createBuffer(),this._partialBytes=0};Qe.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Nf(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Qe.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(e.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i];return}var s=(this.blockSize-n)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(s>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Qe.ofb.prototype.decrypt=Qe.ofb.prototype.encrypt;Qe.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Qt.util.createBuffer(),this._partialBytes=0};Qe.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Nf(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Qe.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]);else{var s=(this.blockSize-n)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(s>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}Rf(this._inBlock)};Qe.ctr.prototype.decrypt=Qe.ctr.prototype.encrypt;Qe.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=Qt.util.createBuffer(),this._partialBytes=0,this._R=3774873600};Qe.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t=Qt.util.createBuffer(e.iv);this._cipherLength=0;var r;if("additionalData"in e?r=Qt.util.createBuffer(e.additionalData):r=Qt.util.createBuffer(),"tagLength"in e?this._tagLength=e.tagLength:this._tagLength=128,this._tag=null,e.decrypt&&(this._tag=Qt.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var n=t.length();if(n===12)this._j0=[t.getInt32(),t.getInt32(),t.getInt32(),1];else{for(this._j0=[0,0,0,0];t.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(s0(n*8)))}this._inBlock=this._j0.slice(0),Rf(this._inBlock),this._partialBytes=0,r=Qt.util.createBuffer(r),this._aDataLength=s0(r.length()*8);var i=r.length()%this.blockSize;for(i&&r.fillWithByte(0,this.blockSize-i),this._s=[0,0,0,0];r.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()])};Qe.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^=e.getInt32());this._cipherLength+=this.blockSize}else{var s=(this.blockSize-n)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(s<=0||r){if(r){var o=n%this.blockSize;this._cipherLength+=o,this._partialOutput.truncate(this.blockSize-o)}else this._cipherLength+=this.blockSize;for(var i=0;i<this._ints;++i)this._outBlock[i]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),Rf(this._inBlock)};Qe.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n<this.blockSize&&!(r&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),Rf(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^this._hashBlock[i]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize};Qe.gcm.prototype.afterFinish=function(e,t){var r=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=Qt.util.createBuffer();var n=this._aDataLength.concat(s0(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,n);var i=[];this.cipher.encrypt(this._j0,i);for(var s=0;s<this._ints;++s)this.tag.putInt32(this._s[s]^i[s]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r};Qe.gcm.prototype.multiply=function(e,t){for(var r=[0,0,0,0],n=t.slice(0),i=0;i<128;++i){var s=e[i/32|0]&1<<31-i%32;s&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),this.pow(n,n)}return r};Qe.gcm.prototype.pow=function(e,t){for(var r=e[3]&1,n=3;n>0;--n)t[n]=e[n]>>>1|(e[n-1]&1)<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)};Qe.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=r/8|0,i=e[n]>>>(7-r%8)*4&15,s=this._m[r][i];t[0]^=s[0],t[1]^=s[1],t[2]^=s[2],t[3]^=s[3]}return t};Qe.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)};Qe.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,s=new Array(i),o=0;o<i;++o){var a=[0,0,0,0],l=o/n|0,u=(n-1-o%n)*t;a[l]=1<<t-1<<u,s[o]=this.generateSubHashTable(this.multiply(a,e),t)}return s};Qe.gcm.prototype.generateSubHashTable=function(e,t){var r=1<<t,n=r>>>1,i=new Array(r);i[n]=e.slice(0);for(var s=n>>>1;s>0;)this.pow(i[2*s],i[s]=[]),s>>=1;for(s=2;s<n;){for(var o=1;o<s;++o){var a=i[s],l=i[o];i[s+o]=[a[0]^l[0],a[1]^l[1],a[2]^l[2],a[3]^l[3]]}s*=2}for(i[0]=[0,0,0,0],s=n+1;s<r;++s){var u=i[s^n];i[s]=[e[0]^u[0],e[1]^u[1],e[2]^u[2],e[3]^u[3]]}return i};function Nf(e,t){if(typeof e=="string"&&(e=Qt.util.createBuffer(e)),Qt.util.isArray(e)&&e.length>4){var r=e;e=Qt.util.createBuffer();for(var n=0;n<r.length;++n)e.putByte(r[n])}if(e.length()<t)throw new Error("Invalid IV length; got "+e.length()+" bytes and expected "+t+" bytes.");if(!Qt.util.isArray(e)){for(var i=[],s=t/4,n=0;n<s;++n)i.push(e.getInt32());e=i}return e}function Rf(e){e[e.length-1]=e[e.length-1]+1&4294967295}function s0(e){return[e/4294967296|0,e&4294967295]}});var Ui=ce((E7,EI)=>{"use strict";var It=qe();Pf();o0();nt();EI.exports=It.aes=It.aes||{};It.aes.startEncrypting=function(e,t,r,n){var i=kf({key:e,output:r,decrypt:!1,mode:n});return i.start(t),i};It.aes.createEncryptionCipher=function(e,t){return kf({key:e,output:null,decrypt:!1,mode:t})};It.aes.startDecrypting=function(e,t,r,n){var i=kf({key:e,output:r,decrypt:!0,mode:n});return i.start(t),i};It.aes.createDecryptionCipher=function(e,t){return kf({key:e,output:null,decrypt:!0,mode:t})};It.aes.Algorithm=function(e,t){u0||yI();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(n,i){return l0(r._w,n,i,!1)},decrypt:function(n,i){return l0(r._w,n,i,!0)}}}),r._init=!1};It.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t=e.key,r;if(typeof t=="string"&&(t.length===16||t.length===24||t.length===32))t=It.util.createBuffer(t);else if(It.util.isArray(t)&&(t.length===16||t.length===24||t.length===32)){r=t,t=It.util.createBuffer();for(var n=0;n<r.length;++n)t.putByte(r[n])}if(!It.util.isArray(t)){r=t,t=[];var i=r.length();if(i===16||i===24||i===32){i=i>>>2;for(var n=0;n<i;++n)t.push(r.getInt32())}}if(!It.util.isArray(t)||!(t.length===4||t.length===6||t.length===8))throw new Error("Invalid key parameter.");var s=this.mode.name,o=["CFB","OFB","CTR","GCM"].indexOf(s)!==-1;this._w=CI(t,e.decrypt&&!o),this._init=!0}};It.aes._expandKey=function(e,t){return u0||yI(),CI(e,t)};It.aes._updateBlock=l0;Xo("AES-ECB",It.cipher.modes.ecb);Xo("AES-CBC",It.cipher.modes.cbc);Xo("AES-CFB",It.cipher.modes.cfb);Xo("AES-OFB",It.cipher.modes.ofb);Xo("AES-CTR",It.cipher.modes.ctr);Xo("AES-GCM",It.cipher.modes.gcm);function Xo(e,t){var r=function(){return new It.aes.Algorithm(e,t)};It.cipher.registerAlgorithm(e,r)}var u0=!1,Zo=4,dr,a0,vI,Ns,fn;function yI(){u0=!0,vI=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;dr=new Array(256),a0=new Array(256),Ns=new Array(4),fn=new Array(4);for(var t=0;t<4;++t)Ns[t]=new Array(256),fn[t]=new Array(256);for(var r=0,n=0,i,s,o,a,l,u,c,t=0;t<256;++t){a=n^n<<1^n<<2^n<<3^n<<4,a=a>>8^a&255^99,dr[r]=a,a0[a]=r,l=e[a],i=e[r],s=e[i],o=e[s],u=l<<24^a<<16^a<<8^(a^l),c=(i^s^o)<<24^(r^o)<<16^(r^s^o)<<8^(r^i^o);for(var f=0;f<4;++f)Ns[f][r]=u,fn[f][a]=c,u=u<<24|u>>>8,c=c<<24|c>>>8;r===0?r=n=1:(r=i^e[e[e[i^o]]],n^=e[e[n]])}}function CI(e,t){for(var r=e.slice(0),n,i=1,s=r.length,o=s+6+1,a=Zo*o,l=s;l<a;++l)n=r[l-1],l%s===0?(n=dr[n>>>16&255]<<24^dr[n>>>8&255]<<16^dr[n&255]<<8^dr[n>>>24]^vI[i]<<24,i++):s>6&&l%s===4&&(n=dr[n>>>24]<<24^dr[n>>>16&255]<<16^dr[n>>>8&255]<<8^dr[n&255]),r[l]=r[l-s]^n;if(t){var u,c=fn[0],f=fn[1],h=fn[2],p=fn[3],d=r.slice(0);a=r.length;for(var l=0,m=a-Zo;l<a;l+=Zo,m-=Zo)if(l===0||l===a-Zo)d[l]=r[m],d[l+1]=r[m+3],d[l+2]=r[m+2],d[l+3]=r[m+1];else for(var b=0;b<Zo;++b)u=r[m+b],d[l+(3&-b)]=c[dr[u>>>24]]^f[dr[u>>>16&255]]^h[dr[u>>>8&255]]^p[dr[u&255]];r=d}return r}function l0(e,t,r,n){var i=e.length/4-1,s,o,a,l,u;n?(s=fn[0],o=fn[1],a=fn[2],l=fn[3],u=a0):(s=Ns[0],o=Ns[1],a=Ns[2],l=Ns[3],u=dr);var c,f,h,p,d,m,b;c=t[0]^e[0],f=t[n?3:1]^e[1],h=t[2]^e[2],p=t[n?1:3]^e[3];for(var g=3,C=1;C<i;++C)d=s[c>>>24]^o[f>>>16&255]^a[h>>>8&255]^l[p&255]^e[++g],m=s[f>>>24]^o[h>>>16&255]^a[p>>>8&255]^l[c&255]^e[++g],b=s[h>>>24]^o[p>>>16&255]^a[c>>>8&255]^l[f&255]^e[++g],p=s[p>>>24]^o[c>>>16&255]^a[f>>>8&255]^l[h&255]^e[++g],c=d,f=m,h=b;r[0]=u[c>>>24]<<24^u[f>>>16&255]<<16^u[h>>>8&255]<<8^u[p&255]^e[++g],r[n?3:1]=u[f>>>24]<<24^u[h>>>16&255]<<16^u[p>>>8&255]<<8^u[c&255]^e[++g],r[2]=u[h>>>24]<<24^u[p>>>16&255]<<16^u[c>>>8&255]<<8^u[f&255]^e[++g],r[n?1:3]=u[p>>>24]<<24^u[c>>>16&255]<<16^u[f>>>8&255]<<8^u[h&255]^e[++g]}function kf(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),r="AES-"+t,n;e.decrypt?n=It.cipher.createDecipher(r,e.key):n=It.cipher.createCipher(r,e.key);var i=n.start;return n.start=function(s,o){var a=null;o instanceof It.util.ByteBuffer&&(a=o,o={}),o=o||{},o.output=a,o.iv=s,i.call(n,o)},n}});var ji=ce((b7,bI)=>{"use strict";var wl=qe();wl.pki=wl.pki||{};var c0=bI.exports=wl.pki.oids=wl.oids=wl.oids||{};function X(e,t){c0[e]=t,c0[t]=e}function gt(e,t){c0[e]=t}X("1.2.840.113549.1.1.1","rsaEncryption");X("1.2.840.113549.1.1.4","md5WithRSAEncryption");X("1.2.840.113549.1.1.5","sha1WithRSAEncryption");X("1.2.840.113549.1.1.7","RSAES-OAEP");X("1.2.840.113549.1.1.8","mgf1");X("1.2.840.113549.1.1.9","pSpecified");X("1.2.840.113549.1.1.10","RSASSA-PSS");X("1.2.840.113549.1.1.11","sha256WithRSAEncryption");X("1.2.840.113549.1.1.12","sha384WithRSAEncryption");X("1.2.840.113549.1.1.13","sha512WithRSAEncryption");X("1.3.101.112","EdDSA25519");X("1.2.840.10040.4.3","dsa-with-sha1");X("1.3.14.3.2.7","desCBC");X("1.3.14.3.2.26","sha1");X("1.3.14.3.2.29","sha1WithRSASignature");X("2.16.840.1.101.3.4.2.1","sha256");X("2.16.840.1.101.3.4.2.2","sha384");X("2.16.840.1.101.3.4.2.3","sha512");X("2.16.840.1.101.3.4.2.4","sha224");X("2.16.840.1.101.3.4.2.5","sha512-224");X("2.16.840.1.101.3.4.2.6","sha512-256");X("1.2.840.113549.2.2","md2");X("1.2.840.113549.2.5","md5");X("1.2.840.113549.1.7.1","data");X("1.2.840.113549.1.7.2","signedData");X("1.2.840.113549.1.7.3","envelopedData");X("1.2.840.113549.1.7.4","signedAndEnvelopedData");X("1.2.840.113549.1.7.5","digestedData");X("1.2.840.113549.1.7.6","encryptedData");X("1.2.840.113549.1.9.1","emailAddress");X("1.2.840.113549.1.9.2","unstructuredName");X("1.2.840.113549.1.9.3","contentType");X("1.2.840.113549.1.9.4","messageDigest");X("1.2.840.113549.1.9.5","signingTime");X("1.2.840.113549.1.9.6","counterSignature");X("1.2.840.113549.1.9.7","challengePassword");X("1.2.840.113549.1.9.8","unstructuredAddress");X("1.2.840.113549.1.9.14","extensionRequest");X("1.2.840.113549.1.9.20","friendlyName");X("1.2.840.113549.1.9.21","localKeyId");X("1.2.840.113549.1.9.22.1","x509Certificate");X("1.2.840.113549.1.12.10.1.1","keyBag");X("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");X("1.2.840.113549.1.12.10.1.3","certBag");X("1.2.840.113549.1.12.10.1.4","crlBag");X("1.2.840.113549.1.12.10.1.5","secretBag");X("1.2.840.113549.1.12.10.1.6","safeContentsBag");X("1.2.840.113549.1.5.13","pkcs5PBES2");X("1.2.840.113549.1.5.12","pkcs5PBKDF2");X("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");X("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");X("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");X("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");X("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");X("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");X("1.2.840.113549.2.7","hmacWithSHA1");X("1.2.840.113549.2.8","hmacWithSHA224");X("1.2.840.113549.2.9","hmacWithSHA256");X("1.2.840.113549.2.10","hmacWithSHA384");X("1.2.840.113549.2.11","hmacWithSHA512");X("1.2.840.113549.3.7","des-EDE3-CBC");X("2.16.840.1.101.3.4.1.2","aes128-CBC");X("2.16.840.1.101.3.4.1.22","aes192-CBC");X("2.16.840.1.101.3.4.1.42","aes256-CBC");X("2.5.4.3","commonName");X("2.5.4.4","surname");X("2.5.4.5","serialNumber");X("2.5.4.6","countryName");X("2.5.4.7","localityName");X("2.5.4.8","stateOrProvinceName");X("2.5.4.9","streetAddress");X("2.5.4.10","organizationName");X("2.5.4.11","organizationalUnitName");X("2.5.4.12","title");X("2.5.4.13","description");X("2.5.4.15","businessCategory");X("2.5.4.17","postalCode");X("2.5.4.42","givenName");X("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");X("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");X("2.16.840.1.113730.1.1","nsCertType");X("2.16.840.1.113730.1.13","nsComment");gt("2.5.29.1","authorityKeyIdentifier");gt("2.5.29.2","keyAttributes");gt("2.5.29.3","certificatePolicies");gt("2.5.29.4","keyUsageRestriction");gt("2.5.29.5","policyMapping");gt("2.5.29.6","subtreesConstraint");gt("2.5.29.7","subjectAltName");gt("2.5.29.8","issuerAltName");gt("2.5.29.9","subjectDirectoryAttributes");gt("2.5.29.10","basicConstraints");gt("2.5.29.11","nameConstraints");gt("2.5.29.12","policyConstraints");gt("2.5.29.13","basicConstraints");X("2.5.29.14","subjectKeyIdentifier");X("2.5.29.15","keyUsage");gt("2.5.29.16","privateKeyUsagePeriod");X("2.5.29.17","subjectAltName");X("2.5.29.18","issuerAltName");X("2.5.29.19","basicConstraints");gt("2.5.29.20","cRLNumber");gt("2.5.29.21","cRLReason");gt("2.5.29.22","expirationDate");gt("2.5.29.23","instructionCode");gt("2.5.29.24","invalidityDate");gt("2.5.29.25","cRLDistributionPoints");gt("2.5.29.26","issuingDistributionPoint");gt("2.5.29.27","deltaCRLIndicator");gt("2.5.29.28","issuingDistributionPoint");gt("2.5.29.29","certificateIssuer");gt("2.5.29.30","nameConstraints");X("2.5.29.31","cRLDistributionPoints");X("2.5.29.32","certificatePolicies");gt("2.5.29.33","policyMappings");gt("2.5.29.34","policyConstraints");X("2.5.29.35","authorityKeyIdentifier");gt("2.5.29.36","policyConstraints");X("2.5.29.37","extKeyUsage");gt("2.5.29.46","freshestCRL");gt("2.5.29.54","inhibitAnyPolicy");X("1.3.6.1.4.1.11129.2.4.2","timestampList");X("1.3.6.1.5.5.7.1.1","authorityInfoAccess");X("1.3.6.1.5.5.7.3.1","serverAuth");X("1.3.6.1.5.5.7.3.2","clientAuth");X("1.3.6.1.5.5.7.3.3","codeSigning");X("1.3.6.1.5.5.7.3.4","emailProtection");X("1.3.6.1.5.5.7.3.8","timeStamping")});var hn=ce((S7,xI)=>{"use strict";var Dt=qe();nt();ji();var fe=xI.exports=Dt.asn1=Dt.asn1||{};fe.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};fe.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};fe.create=function(e,t,r,n,i){if(Dt.util.isArray(n)){for(var s=[],o=0;o<n.length;++o)n[o]!==void 0&&s.push(n[o]);n=s}var a={tagClass:e,type:t,constructed:r,composed:r||Dt.util.isArray(n),value:n};return i&&"bitStringContents"in i&&(a.bitStringContents=i.bitStringContents,a.original=fe.copy(a)),a};fe.copy=function(e,t){var r;if(Dt.util.isArray(e)){r=[];for(var n=0;n<e.length;++n)r.push(fe.copy(e[n],t));return r}return typeof e=="string"?e:(r={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:fe.copy(e.value,t)},t&&!t.excludeBitStringContents&&(r.bitStringContents=e.bitStringContents),r)};fe.equals=function(e,t,r){if(Dt.util.isArray(e)){if(!Dt.util.isArray(t)||e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!fe.equals(e[n],t[n]))return!1;return!0}if(typeof e!=typeof t)return!1;if(typeof e=="string")return e===t;var i=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&fe.equals(e.value,t.value);return r&&r.includeBitStringContents&&(i=i&&e.bitStringContents===t.bitStringContents),i};fe.getBerValueLength=function(e){var t=e.getByte();if(t!==128){var r,n=t&128;return n?r=e.getInt((t&127)<<3):r=t,r}};function Tl(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}var AB=function(e,t){var r=e.getByte();if(t--,r!==128){var n,i=r&128;if(!i)n=r;else{var s=r&127;Tl(e,t,s),n=e.getInt(s<<3)}if(n<0)throw new Error("Negative length: "+n);return n}};fe.fromDer=function(e,t){t===void 0&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof t=="boolean"&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),typeof e=="string"&&(e=Dt.util.createBuffer(e));var r=e.length(),n=Ff(e,e.length(),0,t);if(t.parseAllBytes&&e.length()!==0){var i=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw i.byteCount=r,i.remaining=e.length(),i}return n};function Ff(e,t,r,n){var i;Tl(e,t,2);var s=e.getByte();t--;var o=s&192,a=s&31;i=e.length();var l=AB(e,t);if(t-=i-e.length(),l!==void 0&&l>t){if(n.strict){var u=new Error("Too few bytes to read ASN.1 value.");throw u.available=e.length(),u.remaining=t,u.requested=l,u}l=t}var c,f,h=(s&32)===32;if(h)if(c=[],l===void 0)for(;;){if(Tl(e,t,2),e.bytes(2)==="\0\0"){e.getBytes(2),t-=2;break}i=e.length(),c.push(Ff(e,t,r+1,n)),t-=i-e.length()}else for(;l>0;)i=e.length(),c.push(Ff(e,l,r+1,n)),t-=i-e.length(),l-=i-e.length();if(c===void 0&&o===fe.Class.UNIVERSAL&&a===fe.Type.BITSTRING&&(f=e.bytes(l)),c===void 0&&n.decodeBitStrings&&o===fe.Class.UNIVERSAL&&a===fe.Type.BITSTRING&&l>1){var p=e.read,d=t,m=0;if(a===fe.Type.BITSTRING&&(Tl(e,t,1),m=e.getByte(),t--),m===0)try{i=e.length();var b={strict:!0,decodeBitStrings:!0},g=Ff(e,t,r+1,b),C=i-e.length();t-=C,a==fe.Type.BITSTRING&&C++;var y=g.tagClass;C===l&&(y===fe.Class.UNIVERSAL||y===fe.Class.CONTEXT_SPECIFIC)&&(c=[g])}catch{}c===void 0&&(e.read=p,t=d)}if(c===void 0){if(l===void 0){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");l=t}if(a===fe.Type.BMPSTRING)for(c="";l>0;l-=2)Tl(e,t,2),c+=String.fromCharCode(e.getInt16()),t-=2;else c=e.getBytes(l),t-=l}var E=f===void 0?null:{bitStringContents:f};return fe.create(o,a,h,c,E)}fe.toDer=function(e){var t=Dt.util.createBuffer(),r=e.tagClass|e.type,n=Dt.util.createBuffer(),i=!1;if("bitStringContents"in e&&(i=!0,e.original&&(i=fe.equals(e,e.original))),i)n.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:n.putByte(0);for(var s=0;s<e.value.length;++s)e.value[s]!==void 0&&n.putBuffer(fe.toDer(e.value[s]))}else if(e.type===fe.Type.BMPSTRING)for(var s=0;s<e.value.length;++s)n.putInt16(e.value.charCodeAt(s));else e.type===fe.Type.INTEGER&&e.value.length>1&&(e.value.charCodeAt(0)===0&&!(e.value.charCodeAt(1)&128)||e.value.charCodeAt(0)===255&&(e.value.charCodeAt(1)&128)===128)?n.putBytes(e.value.substr(1)):n.putBytes(e.value);if(t.putByte(r),n.length()<=127)t.putByte(n.length()&127);else{var o=n.length(),a="";do a+=String.fromCharCode(o&255),o=o>>>8;while(o>0);t.putByte(a.length|128);for(var s=a.length-1;s>=0;--s)t.putByte(a.charCodeAt(s))}return t.putBuffer(n),t};fe.oidToDer=function(e){var t=e.split("."),r=Dt.util.createBuffer();r.putByte(40*parseInt(t[0],10)+parseInt(t[1],10));for(var n,i,s,o,a=2;a<t.length;++a){n=!0,i=[],s=parseInt(t[a],10);do o=s&127,s=s>>>7,n||(o|=128),i.push(o),n=!1;while(s>0);for(var l=i.length-1;l>=0;--l)r.putByte(i[l])}return r};fe.derToOid=function(e){var t;typeof e=="string"&&(e=Dt.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var n=0;e.length()>0;)r=e.getByte(),n=n<<7,r&128?n+=r&127:(t+="."+(n+r),n=0);return t};fe.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),s=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),a=0;if(e.length>11){var l=e.charAt(10),u=10;l!=="+"&&l!=="-"&&(a=parseInt(e.substr(10,2),10),u+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(s,o,a,0),u&&(l=e.charAt(u),l==="+"||l==="-")){var c=parseInt(e.substr(u+1,2),10),f=parseInt(e.substr(u+4,2),10),h=c*60+f;h*=6e4,l==="+"?t.setTime(+t-h):t.setTime(+t+h)}return t};fe.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),o=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),l=0,u=0,c=!1;e.charAt(e.length-1)==="Z"&&(c=!0);var f=e.length-5,h=e.charAt(f);if(h==="+"||h==="-"){var p=parseInt(e.substr(f+1,2),10),d=parseInt(e.substr(f+4,2),10);u=p*60+d,u*=6e4,h==="+"&&(u*=-1),c=!0}return e.charAt(14)==="."&&(l=parseFloat(e.substr(14),10)*1e3),c?(t.setUTCFullYear(r,n,i),t.setUTCHours(s,o,a,l),t.setTime(+t+u)):(t.setFullYear(r,n,i),t.setHours(s,o,a,l)),t};fe.dateToUtcTime=function(e){if(typeof e=="string")return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z",t};fe.dateToGeneralizedTime=function(e){if(typeof e=="string")return e;var t="",r=[];r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z",t};fe.integerToDer=function(e){var t=Dt.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r};fe.derToInteger=function(e){typeof e=="string"&&(e=Dt.util.createBuffer(e));var t=e.length()*8;if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)};fe.validate=function(e,t,r,n){var i=!1;if((e.tagClass===t.tagClass||typeof t.tagClass>"u")&&(e.type===t.type||typeof t.type>"u"))if(e.constructed===t.constructed||typeof t.constructed>"u"){if(i=!0,t.value&&Dt.util.isArray(t.value))for(var s=0,o=0;i&&o<t.value.length;++o)i=t.value[o].optional||!1,e.value[s]&&(i=fe.validate(e.value[s],t.value[o],r,n),i?++s:t.value[o].optional&&(i=!0)),!i&&n&&n.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');if(i&&r&&(t.capture&&(r[t.capture]=e.value),t.captureAsn1&&(r[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(r[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)){var a;if(e.bitStringContents.length<2)r[t.captureBitStringValue]="";else{var l=e.bitStringContents.charCodeAt(0);if(l!==0)throw new Error("captureBitStringValue only supported for zero unused bits");r[t.captureBitStringValue]=e.bitStringContents.slice(1)}}}else n&&n.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');else n&&(e.tagClass!==t.tagClass&&n.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&n.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));return i};var SI=/[^\\u0000-\\u00ff]/;fe.prettyPrint=function(e,t,r){var n="";t=t||0,r=r||2,t>0&&(n+=`
`);for(var i="",s=0;s<t*r;++s)i+=" ";switch(n+=i+"Tag: ",e.tagClass){case fe.Class.UNIVERSAL:n+="Universal:";break;case fe.Class.APPLICATION:n+="Application:";break;case fe.Class.CONTEXT_SPECIFIC:n+="Context-Specific:";break;case fe.Class.PRIVATE:n+="Private:";break}if(e.tagClass===fe.Class.UNIVERSAL)switch(n+=e.type,e.type){case fe.Type.NONE:n+=" (None)";break;case fe.Type.BOOLEAN:n+=" (Boolean)";break;case fe.Type.INTEGER:n+=" (Integer)";break;case fe.Type.BITSTRING:n+=" (Bit string)";break;case fe.Type.OCTETSTRING:n+=" (Octet string)";break;case fe.Type.NULL:n+=" (Null)";break;case fe.Type.OID:n+=" (Object Identifier)";break;case fe.Type.ODESC:n+=" (Object Descriptor)";break;case fe.Type.EXTERNAL:n+=" (External or Instance of)";break;case fe.Type.REAL:n+=" (Real)";break;case fe.Type.ENUMERATED:n+=" (Enumerated)";break;case fe.Type.EMBEDDED:n+=" (Embedded PDV)";break;case fe.Type.UTF8:n+=" (UTF8)";break;case fe.Type.ROID:n+=" (Relative Object Identifier)";break;case fe.Type.SEQUENCE:n+=" (Sequence)";break;case fe.Type.SET:n+=" (Set)";break;case fe.Type.PRINTABLESTRING:n+=" (Printable String)";break;case fe.Type.IA5String:n+=" (IA5String (ASCII))";break;case fe.Type.UTCTIME:n+=" (UTC time)";break;case fe.Type.GENERALIZEDTIME:n+=" (Generalized time)";break;case fe.Type.BMPSTRING:n+=" (BMP String)";break}else n+=e.type;if(n+=`
`,n+=i+"Constructed: "+e.constructed+`
`,e.composed){for(var o=0,a="",s=0;s<e.value.length;++s)e.value[s]!==void 0&&(o+=1,a+=fe.prettyPrint(e.value[s],t+1,r),s+1<e.value.length&&(a+=","));n+=i+"Sub values: "+o+a}else{if(n+=i+"Value: ",e.type===fe.Type.OID){var l=fe.derToOid(e.value);n+=l,Dt.pki&&Dt.pki.oids&&l in Dt.pki.oids&&(n+=" ("+Dt.pki.oids[l]+") ")}if(e.type===fe.Type.INTEGER)try{n+=fe.derToInteger(e.value)}catch{n+="0x"+Dt.util.bytesToHex(e.value)}else if(e.type===fe.Type.BITSTRING){if(e.value.length>1?n+="0x"+Dt.util.bytesToHex(e.value.slice(1)):n+="(none)",e.value.length>0){var u=e.value.charCodeAt(0);u==1?n+=" (1 unused bit shown)":u>1&&(n+=" ("+u+" unused bits shown)")}}else if(e.type===fe.Type.OCTETSTRING)SI.test(e.value)||(n+="("+e.value+") "),n+="0x"+Dt.util.bytesToHex(e.value);else if(e.type===fe.Type.UTF8)try{n+=Dt.util.decodeUtf8(e.value)}catch(c){if(c.message==="URI malformed")n+="0x"+Dt.util.bytesToHex(e.value)+" (malformed UTF8)";else throw c}else e.type===fe.Type.PRINTABLESTRING||e.type===fe.Type.IA5String?n+=e.value:SI.test(e.value)?n+="0x"+Dt.util.bytesToHex(e.value):e.value.length===0?n+="[null]":n+=e.value}return n}});var Pn=ce((x7,II)=>{"use strict";var Lf=qe();II.exports=Lf.md=Lf.md||{};Lf.md.algorithms=Lf.md.algorithms||{}});var Jo=ce((I7,wI)=>{"use strict";var li=qe();Pn();nt();var MB=wI.exports=li.hmac=li.hmac||{};MB.create=function(){var e=null,t=null,r=null,n=null,i={};return i.start=function(s,o){if(s!==null)if(typeof s=="string")if(s=s.toLowerCase(),s in li.md.algorithms)t=li.md.algorithms[s].create();else throw new Error('Unknown hash algorithm "'+s+'"');else t=s;if(o===null)o=e;else{if(typeof o=="string")o=li.util.createBuffer(o);else if(li.util.isArray(o)){var a=o;o=li.util.createBuffer();for(var l=0;l<a.length;++l)o.putByte(a[l])}var u=o.length();u>t.blockLength&&(t.start(),t.update(o.bytes()),o=t.digest()),r=li.util.createBuffer(),n=li.util.createBuffer(),u=o.length();for(var l=0;l<u;++l){var a=o.at(l);r.putByte(54^a),n.putByte(92^a)}if(u<t.blockLength)for(var a=t.blockLength-u,l=0;l<a;++l)r.putByte(54),n.putByte(92);e=o,r=r.bytes(),n=n.bytes()}t.start(),t.update(r)},i.update=function(s){t.update(s)},i.getMac=function(){var s=t.digest().bytes();return t.start(),t.update(n),t.update(s),t.digest()},i.digest=i.getMac,i}});var Bf=ce((w7,AI)=>{"use strict";var Nn=qe();Pn();nt();var _I=AI.exports=Nn.md5=Nn.md5||{};Nn.md.md5=Nn.md.algorithms.md5=_I;_I.create=function(){DI||PB();var e=null,t=Nn.util.createBuffer(),r=new Array(16),n={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var i=n.messageLengthSize/4,s=0;s<i;++s)n.fullMessageLength.push(0);return t=Nn.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},n},n.start(),n.update=function(i,s){s==="utf8"&&(i=Nn.util.encodeUtf8(i));var o=i.length;n.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var a=n.fullMessageLength.length-1;a>=0;--a)n.fullMessageLength[a]+=o[1],o[1]=o[0]+(n.fullMessageLength[a]/4294967296>>>0),n.fullMessageLength[a]=n.fullMessageLength[a]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(i),TI(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var i=Nn.util.createBuffer();i.putBytes(t.bytes());var s=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,o=s&n.blockLength-1;i.putBytes(f0.substr(0,n.blockLength-o));for(var a,l=0,u=n.fullMessageLength.length-1;u>=0;--u)a=n.fullMessageLength[u]*8+l,l=a/4294967296>>>0,i.putInt32Le(a>>>0);var c={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};TI(c,r,i);var f=Nn.util.createBuffer();return f.putInt32Le(c.h0),f.putInt32Le(c.h1),f.putInt32Le(c.h2),f.putInt32Le(c.h3),f},n};var f0=null,Of=null,_l=null,ea=null,DI=!1;function PB(){f0="\x80",f0+=Nn.util.fillString("\0",64),Of=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],_l=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],ea=new Array(64);for(var e=0;e<64;++e)ea[e]=Math.floor(Math.abs(Math.sin(e+1))*4294967296);DI=!0}function TI(e,t,r){for(var n,i,s,o,a,l,u,c,f=r.length();f>=64;){for(i=e.h0,s=e.h1,o=e.h2,a=e.h3,c=0;c<16;++c)t[c]=r.getInt32Le(),l=a^s&(o^a),n=i+l+ea[c]+t[c],u=_l[c],i=a,a=o,o=s,s+=n<<u|n>>>32-u;for(;c<32;++c)l=o^a&(s^o),n=i+l+ea[c]+t[Of[c]],u=_l[c],i=a,a=o,o=s,s+=n<<u|n>>>32-u;for(;c<48;++c)l=s^o^a,n=i+l+ea[c]+t[Of[c]],u=_l[c],i=a,a=o,o=s,s+=n<<u|n>>>32-u;for(;c<64;++c)l=o^(s|~a),n=i+l+ea[c]+t[Of[c]],u=_l[c],i=a,a=o,o=s,s+=n<<u|n>>>32-u;e.h0=e.h0+i|0,e.h1=e.h1+s|0,e.h2=e.h2+o|0,e.h3=e.h3+a|0,f-=64}}});var Rs=ce((T7,PI)=>{"use strict";var Uf=qe();nt();var MI=PI.exports=Uf.pem=Uf.pem||{};MI.encode=function(e,t){t=t||{};var r="-----BEGIN "+e.type+`-----\r
`,n;if(e.procType&&(n={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]},r+=Vf(n)),e.contentDomain&&(n={name:"Content-Domain",values:[e.contentDomain]},r+=Vf(n)),e.dekInfo&&(n={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&n.values.push(e.dekInfo.parameters),r+=Vf(n)),e.headers)for(var i=0;i<e.headers.length;++i)r+=Vf(e.headers[i]);return e.procType&&(r+=`\r
`),r+=Uf.util.encode64(e.body,t.maxline||64)+`\r
`,r+="-----END "+e.type+`-----\r
`,r};MI.decode=function(e){for(var t=[],r=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,n=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,i=/\r?\n/,s;s=r.exec(e),!!s;){var o=s[1];o==="NEW CERTIFICATE REQUEST"&&(o="CERTIFICATE REQUEST");var a={type:o,procType:null,contentDomain:null,dekInfo:null,headers:[],body:Uf.util.decode64(s[3])};if(t.push(a),!!s[2]){for(var l=s[2].split(i),u=0;s&&u<l.length;){for(var c=l[u].replace(/\s+$/,""),f=u+1;f<l.length;++f){var h=l[f];if(!/\s/.test(h[0]))break;c+=h,u=f}if(s=c.match(n),s){for(var p={name:s[1],values:[]},d=s[2].split(","),m=0;m<d.length;++m)p.values.push(NB(d[m]));if(a.procType)if(!a.contentDomain&&p.name==="Content-Domain")a.contentDomain=d[0]||"";else if(!a.dekInfo&&p.name==="DEK-Info"){if(p.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');a.dekInfo={algorithm:d[0],parameters:d[1]||null}}else a.headers.push(p);else{if(p.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(p.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');a.procType={version:d[0],type:d[1]}}}++u}if(a.procType==="ENCRYPTED"&&!a.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(t.length===0)throw new Error("Invalid PEM formatted message.");return t};function Vf(e){for(var t=e.name+": ",r=[],n=function(l,u){return" "+u},i=0;i<e.values.length;++i)r.push(e.values[i].replace(/^(\S+\r\n)/,n));t+=r.join(",")+`\r
`;for(var s=0,o=-1,i=0;i<t.length;++i,++s)if(s>65&&o!==-1){var a=t[o];a===","?(++o,t=t.substr(0,o)+`\r
 `+t.substr(o)):t=t.substr(0,o)+`\r
`+a+t.substr(o+1),s=i-o-1,o=-1,++i}else(t[i]===" "||t[i]==="	"||t[i]===",")&&(o=i);return t}function NB(e){return e.replace(/^\s+/,"")}});var Dl=ce((_7,RI)=>{"use strict";var Pt=qe();Pf();o0();nt();RI.exports=Pt.des=Pt.des||{};Pt.des.startEncrypting=function(e,t,r,n){var i=jf({key:e,output:r,decrypt:!1,mode:n||(t===null?"ECB":"CBC")});return i.start(t),i};Pt.des.createEncryptionCipher=function(e,t){return jf({key:e,output:null,decrypt:!1,mode:t})};Pt.des.startDecrypting=function(e,t,r,n){var i=jf({key:e,output:r,decrypt:!0,mode:n||(t===null?"ECB":"CBC")});return i.start(t),i};Pt.des.createDecryptionCipher=function(e,t){return jf({key:e,output:null,decrypt:!0,mode:t})};Pt.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(n,i){return NI(r._keys,n,i,!1)},decrypt:function(n,i){return NI(r._keys,n,i,!0)}}}),r._init=!1};Pt.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=Pt.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=jB(t),this._init=!0}};Rn("DES-ECB",Pt.cipher.modes.ecb);Rn("DES-CBC",Pt.cipher.modes.cbc);Rn("DES-CFB",Pt.cipher.modes.cfb);Rn("DES-OFB",Pt.cipher.modes.ofb);Rn("DES-CTR",Pt.cipher.modes.ctr);Rn("3DES-ECB",Pt.cipher.modes.ecb);Rn("3DES-CBC",Pt.cipher.modes.cbc);Rn("3DES-CFB",Pt.cipher.modes.cfb);Rn("3DES-OFB",Pt.cipher.modes.ofb);Rn("3DES-CTR",Pt.cipher.modes.ctr);function Rn(e,t){var r=function(){return new Pt.des.Algorithm(e,t)};Pt.cipher.registerAlgorithm(e,r)}var RB=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],kB=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],FB=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],LB=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],OB=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],BB=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],VB=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],UB=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function jB(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],a=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],l=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],c=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],f=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],h=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],p=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],d=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],m=e.length()>8?3:1,b=[],g=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],C=0,y,E=0;E<m;E++){var I=e.getInt32(),T=e.getInt32();y=(I>>>4^T)&252645135,T^=y,I^=y<<4,y=(T>>>-16^I)&65535,I^=y,T^=y<<-16,y=(I>>>2^T)&858993459,T^=y,I^=y<<2,y=(T>>>-16^I)&65535,I^=y,T^=y<<-16,y=(I>>>1^T)&1431655765,T^=y,I^=y<<1,y=(T>>>8^I)&16711935,I^=y,T^=y<<8,y=(I>>>1^T)&1431655765,T^=y,I^=y<<1,y=I<<8|T>>>20&240,I=T<<24|T<<8&16711680|T>>>8&65280|T>>>24&240,T=y;for(var R=0;R<g.length;++R){g[R]?(I=I<<2|I>>>26,T=T<<2|T>>>26):(I=I<<1|I>>>27,T=T<<1|T>>>27),I&=-15,T&=-15;var F=t[I>>>28]|r[I>>>24&15]|n[I>>>20&15]|i[I>>>16&15]|s[I>>>12&15]|o[I>>>8&15]|a[I>>>4&15],q=l[T>>>28]|u[T>>>24&15]|c[T>>>20&15]|f[T>>>16&15]|h[T>>>12&15]|p[T>>>8&15]|d[T>>>4&15];y=(q>>>16^F)&65535,b[C++]=F^y,b[C++]=q^y<<16}}return b}function NI(e,t,r,n){var i=e.length===32?3:9,s;i===3?s=n?[30,-2,-2]:[0,32,2]:s=n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var o,a=t[0],l=t[1];o=(a>>>4^l)&252645135,l^=o,a^=o<<4,o=(a>>>16^l)&65535,l^=o,a^=o<<16,o=(l>>>2^a)&858993459,a^=o,l^=o<<2,o=(l>>>8^a)&16711935,a^=o,l^=o<<8,o=(a>>>1^l)&1431655765,l^=o,a^=o<<1,a=a<<1|a>>>31,l=l<<1|l>>>31;for(var u=0;u<i;u+=3){for(var c=s[u+1],f=s[u+2],h=s[u];h!=c;h+=f){var p=l^e[h],d=(l>>>4|l<<28)^e[h+1];o=a,a=l,l=o^(kB[p>>>24&63]|LB[p>>>16&63]|BB[p>>>8&63]|UB[p&63]|RB[d>>>24&63]|FB[d>>>16&63]|OB[d>>>8&63]|VB[d&63])}o=a,a=l,l=o}a=a>>>1|a<<31,l=l>>>1|l<<31,o=(a>>>1^l)&1431655765,l^=o,a^=o<<1,o=(l>>>8^a)&16711935,a^=o,l^=o<<8,o=(l>>>2^a)&858993459,a^=o,l^=o<<2,o=(a>>>16^l)&65535,l^=o,a^=o<<16,o=(a>>>4^l)&252645135,l^=o,a^=o<<4,r[0]=a,r[1]=l}function jf(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),r="DES-"+t,n;e.decrypt?n=Pt.cipher.createDecipher(r,e.key):n=Pt.cipher.createCipher(r,e.key);var i=n.start;return n.start=function(s,o){var a=null;o instanceof Pt.util.ByteBuffer&&(a=o,o={}),o=o||{},o.output=a,o.iv=s,i.call(n,o)},n}});var Hf=ce(()=>{"use strict"});var qf=ce((M7,kI)=>{"use strict";var pr=qe();Jo();Pn();nt();var HB=pr.pkcs5=pr.pkcs5||{},ui;pr.util.isNodejs&&!pr.options.usePureJavaScript&&(ui=Hf());kI.exports=pr.pbkdf2=HB.pbkdf2=function(e,t,r,n,i,s){if(typeof i=="function"&&(s=i,i=null),pr.util.isNodejs&&!pr.options.usePureJavaScript&&ui.pbkdf2&&(i===null||typeof i!="object")&&(ui.pbkdf2Sync.length>4||!i||i==="sha1"))return typeof i!="string"&&(i="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),s?ui.pbkdf2Sync.length===4?ui.pbkdf2(e,t,r,n,function(y,E){if(y)return s(y);s(null,E.toString("binary"))}):ui.pbkdf2(e,t,r,n,i,function(y,E){if(y)return s(y);s(null,E.toString("binary"))}):ui.pbkdf2Sync.length===4?ui.pbkdf2Sync(e,t,r,n).toString("binary"):ui.pbkdf2Sync(e,t,r,n,i).toString("binary");if((typeof i>"u"||i===null)&&(i="sha1"),typeof i=="string"){if(!(i in pr.md.algorithms))throw new Error("Unknown hash algorithm: "+i);i=pr.md[i].create()}var o=i.digestLength;if(n>4294967295*o){var a=new Error("Derived key is too long.");if(s)return s(a);throw a}var l=Math.ceil(n/o),u=n-(l-1)*o,c=pr.hmac.create();c.start(i,e);var f="",h,p,d;if(!s){for(var m=1;m<=l;++m){c.start(null,null),c.update(t),c.update(pr.util.int32ToBytes(m)),h=d=c.digest().getBytes();for(var b=2;b<=r;++b)c.start(null,null),c.update(d),p=c.digest().getBytes(),h=pr.util.xorBytes(h,p,o),d=p;f+=m<l?h:h.substr(0,u)}return f}var m=1,b;function g(){if(m>l)return s(null,f);c.start(null,null),c.update(t),c.update(pr.util.int32ToBytes(m)),h=d=c.digest().getBytes(),b=2,C()}function C(){if(b<=r)return c.start(null,null),c.update(d),p=c.digest().getBytes(),h=pr.util.xorBytes(h,p,o),d=p,++b,pr.util.setImmediate(C);f+=m<l?h:h.substr(0,u),++m,g()}g()}});var d0=ce((P7,VI)=>{"use strict";var kn=qe();Pn();nt();var LI=VI.exports=kn.sha256=kn.sha256||{};kn.md.sha256=kn.md.algorithms.sha256=LI;LI.create=function(){OI||qB();var e=null,t=kn.util.createBuffer(),r=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var i=n.messageLengthSize/4,s=0;s<i;++s)n.fullMessageLength.push(0);return t=kn.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},n},n.start(),n.update=function(i,s){s==="utf8"&&(i=kn.util.encodeUtf8(i));var o=i.length;n.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var a=n.fullMessageLength.length-1;a>=0;--a)n.fullMessageLength[a]+=o[1],o[1]=o[0]+(n.fullMessageLength[a]/4294967296>>>0),n.fullMessageLength[a]=n.fullMessageLength[a]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(i),FI(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var i=kn.util.createBuffer();i.putBytes(t.bytes());var s=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,o=s&n.blockLength-1;i.putBytes(h0.substr(0,n.blockLength-o));for(var a,l,u=n.fullMessageLength[0]*8,c=0;c<n.fullMessageLength.length-1;++c)a=n.fullMessageLength[c+1]*8,l=a/4294967296>>>0,u+=l,i.putInt32(u>>>0),u=a>>>0;i.putInt32(u);var f={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};FI(f,r,i);var h=kn.util.createBuffer();return h.putInt32(f.h0),h.putInt32(f.h1),h.putInt32(f.h2),h.putInt32(f.h3),h.putInt32(f.h4),h.putInt32(f.h5),h.putInt32(f.h6),h.putInt32(f.h7),h},n};var h0=null,OI=!1,BI=null;function qB(){h0="\x80",h0+=kn.util.fillString("\0",64),BI=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OI=!0}function FI(e,t,r){for(var n,i,s,o,a,l,u,c,f,h,p,d,m,b,g,C=r.length();C>=64;){for(u=0;u<16;++u)t[u]=r.getInt32();for(;u<64;++u)n=t[u-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=t[u-15],i=(i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[u]=n+t[u-7]+i+t[u-16]|0;for(c=e.h0,f=e.h1,h=e.h2,p=e.h3,d=e.h4,m=e.h5,b=e.h6,g=e.h7,u=0;u<64;++u)o=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),a=b^d&(m^b),s=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),l=c&f|h&(c^f),n=g+o+a+BI[u]+t[u],i=s+l,g=b,b=m,m=d,d=p+n>>>0,p=h,h=f,f=c,c=n+i>>>0;e.h0=e.h0+c|0,e.h1=e.h1+f|0,e.h2=e.h2+h|0,e.h3=e.h3+p|0,e.h4=e.h4+d|0,e.h5=e.h5+m|0,e.h6=e.h6+b|0,e.h7=e.h7+g|0,C-=64}}});var p0=ce((N7,UI)=>{"use strict";var Fn=qe();nt();var Gf=null;Fn.util.isNodejs&&!Fn.options.usePureJavaScript&&!process.versions["node-webkit"]&&(Gf=Hf());var GB=UI.exports=Fn.prng=Fn.prng||{};GB.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,n=new Array(32),i=0;i<32;++i)n[i]=r.create();t.pools=n,t.pool=0,t.generate=function(u,c){if(!c)return t.generateSync(u);var f=t.plugin.cipher,h=t.plugin.increment,p=t.plugin.formatKey,d=t.plugin.formatSeed,m=Fn.util.createBuffer();t.key=null,b();function b(g){if(g)return c(g);if(m.length()>=u)return c(null,m.getBytes(u));if(t.generated>1048575&&(t.key=null),t.key===null)return Fn.util.nextTick(function(){s(b)});var C=f(t.key,t.seed);t.generated+=C.length,m.putBytes(C),t.key=p(f(t.key,h(t.seed))),t.seed=d(f(t.key,t.seed)),Fn.util.setImmediate(b)}},t.generateSync=function(u){var c=t.plugin.cipher,f=t.plugin.increment,h=t.plugin.formatKey,p=t.plugin.formatSeed;t.key=null;for(var d=Fn.util.createBuffer();d.length()<u;){t.generated>1048575&&(t.key=null),t.key===null&&o();var m=c(t.key,t.seed);t.generated+=m.length,d.putBytes(m),t.key=h(c(t.key,f(t.seed))),t.seed=p(c(t.key,t.seed))}return d.getBytes(u)};function s(u){if(t.pools[0].messageLength>=32)return a(),u();var c=32-t.pools[0].messageLength<<5;t.seedFile(c,function(f,h){if(f)return u(f);t.collect(h),a(),u()})}function o(){if(t.pools[0].messageLength>=32)return a();var u=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(u)),a()}function a(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var u=t.plugin.md.create();u.update(t.keyBytes);for(var c=1,f=0;f<32;++f)t.reseeds%c===0&&(u.update(t.pools[f].digest().getBytes()),t.pools[f].start()),c=c<<1;t.keyBytes=u.digest().getBytes(),u.start(),u.update(t.keyBytes);var h=u.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(h),t.generated=0}function l(u){var c=null,f=Fn.util.globalScope,h=f.crypto||f.msCrypto;h&&h.getRandomValues&&(c=function(I){return h.getRandomValues(I)});var p=Fn.util.createBuffer();if(c)for(;p.length()<u;){var d=Math.max(1,Math.min(u-p.length(),65536)/4),m=new Uint32Array(Math.floor(d));try{c(m);for(var b=0;b<m.length;++b)p.putInt32(m[b])}catch(I){if(!(typeof QuotaExceededError<"u"&&I instanceof QuotaExceededError))throw I}}if(p.length()<u)for(var g,C,y,E=Math.floor(Math.random()*65536);p.length()<u;){C=16807*(E&65535),g=16807*(E>>16),C+=(g&32767)<<16,C+=g>>15,C=(C&2147483647)+(C>>31),E=C&4294967295;for(var b=0;b<3;++b)y=E>>>(b<<3),y^=Math.floor(Math.random()*256),p.putByte(y&255)}return p.getBytes(u)}return Gf?(t.seedFile=function(u,c){Gf.randomBytes(u,function(f,h){if(f)return c(f);c(null,h.toString())})},t.seedFileSync=function(u){return Gf.randomBytes(u).toString()}):(t.seedFile=function(u,c){try{c(null,l(u))}catch(f){c(f)}},t.seedFileSync=l),t.collect=function(u){for(var c=u.length,f=0;f<c;++f)t.pools[t.pool].update(u.substr(f,1)),t.pool=t.pool===31?0:t.pool+1},t.collectInt=function(u,c){for(var f="",h=0;h<c;h+=8)f+=String.fromCharCode(u>>h&255);t.collect(f)},t.registerWorker=function(u){if(u===self)t.seedFile=function(f,h){function p(d){var m=d.data;m.forge&&m.forge.prng&&(self.removeEventListener("message",p),h(m.forge.prng.err,m.forge.prng.bytes))}self.addEventListener("message",p),self.postMessage({forge:{prng:{needed:f}}})};else{var c=function(f){var h=f.data;h.forge&&h.forge.prng&&t.seedFile(h.forge.prng.needed,function(p,d){u.postMessage({forge:{prng:{err:p,bytes:d}}})})};u.addEventListener("message",c)}},t}});var qr=ce((R7,m0)=>{"use strict";var Yt=qe();Ui();d0();p0();nt();(function(){if(Yt.random&&Yt.random.getBytes){m0.exports=Yt.random;return}(function(e){var t={},r=new Array(4),n=Yt.util.createBuffer();t.formatKey=function(f){var h=Yt.util.createBuffer(f);return f=new Array(4),f[0]=h.getInt32(),f[1]=h.getInt32(),f[2]=h.getInt32(),f[3]=h.getInt32(),Yt.aes._expandKey(f,!1)},t.formatSeed=function(f){var h=Yt.util.createBuffer(f);return f=new Array(4),f[0]=h.getInt32(),f[1]=h.getInt32(),f[2]=h.getInt32(),f[3]=h.getInt32(),f},t.cipher=function(f,h){return Yt.aes._updateBlock(f,h,r,!1),n.putInt32(r[0]),n.putInt32(r[1]),n.putInt32(r[2]),n.putInt32(r[3]),n.getBytes()},t.increment=function(f){return++f[3],f},t.md=Yt.md.sha256;function i(){var f=Yt.prng.create(t);return f.getBytes=function(h,p){return f.generate(h,p)},f.getBytesSync=function(h){return f.generate(h)},f}var s=i(),o=null,a=Yt.util.globalScope,l=a.crypto||a.msCrypto;if(l&&l.getRandomValues&&(o=function(f){return l.getRandomValues(f)}),Yt.options.usePureJavaScript||!Yt.util.isNodejs&&!o){if(typeof window>"u"||window.document,s.collectInt(+new Date,32),typeof navigator<"u"){var u="";for(var c in navigator)try{typeof navigator[c]=="string"&&(u+=navigator[c])}catch{}s.collect(u),u=null}e&&(e().mousemove(function(f){s.collectInt(f.clientX,16),s.collectInt(f.clientY,16)}),e().keypress(function(f){s.collectInt(f.charCode,8)}))}if(!Yt.random)Yt.random=s;else for(var c in s)Yt.random[c]=s[c];Yt.random.createInstance=i,m0.exports=Yt.random})(typeof jQuery<"u"?jQuery:null)})()});var v0=ce((k7,qI)=>{"use strict";var xr=qe();nt();var g0=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],jI=[1,2,3,5],zB=function(e,t){return e<<t&65535|(e&65535)>>16-t},$B=function(e,t){return(e&65535)>>t|e<<16-t&65535};qI.exports=xr.rc2=xr.rc2||{};xr.rc2.expandKey=function(e,t){typeof e=="string"&&(e=xr.util.createBuffer(e)),t=t||128;var r=e,n=e.length(),i=t,s=Math.ceil(i/8),o=255>>(i&7),a;for(a=n;a<128;a++)r.putByte(g0[r.at(a-1)+r.at(a-n)&255]);for(r.setAt(128-s,g0[r.at(128-s)&o]),a=127-s;a>=0;a--)r.setAt(a,g0[r.at(a+1)^r.at(a+s)]);return r};var HI=function(e,t,r){var n=!1,i=null,s=null,o=null,a,l,u,c,f=[];for(e=xr.rc2.expandKey(e,t),u=0;u<64;u++)f.push(e.getInt16Le());r?(a=function(d){for(u=0;u<4;u++)d[u]+=f[c]+(d[(u+3)%4]&d[(u+2)%4])+(~d[(u+3)%4]&d[(u+1)%4]),d[u]=zB(d[u],jI[u]),c++},l=function(d){for(u=0;u<4;u++)d[u]+=f[d[(u+3)%4]&63]}):(a=function(d){for(u=3;u>=0;u--)d[u]=$B(d[u],jI[u]),d[u]-=f[c]+(d[(u+3)%4]&d[(u+2)%4])+(~d[(u+3)%4]&d[(u+1)%4]),c--},l=function(d){for(u=3;u>=0;u--)d[u]-=f[d[(u+3)%4]&63]});var h=function(d){var m=[];for(u=0;u<4;u++){var b=i.getInt16Le();o!==null&&(r?b^=o.getInt16Le():o.putInt16Le(b)),m.push(b&65535)}c=r?0:63;for(var g=0;g<d.length;g++)for(var C=0;C<d[g][0];C++)d[g][1](m);for(u=0;u<4;u++)o!==null&&(r?o.putInt16Le(m[u]):m[u]^=o.getInt16Le()),s.putInt16Le(m[u])},p=null;return p={start:function(d,m){d&&typeof d=="string"&&(d=xr.util.createBuffer(d)),n=!1,i=xr.util.createBuffer(),s=m||new xr.util.createBuffer,o=d,p.output=s},update:function(d){for(n||i.putBuffer(d);i.length()>=8;)h([[5,a],[1,l],[6,a],[1,l],[5,a]])},finish:function(d){var m=!0;if(r)if(d)m=d(8,i,!r);else{var b=i.length()===8?8:8-i.length();i.fillWithByte(b,b)}if(m&&(n=!0,p.update()),!r&&(m=i.length()===0,m))if(d)m=d(8,s,!r);else{var g=s.length(),C=s.at(g-1);C>g?m=!1:s.truncate(C)}return m}},p};xr.rc2.startEncrypting=function(e,t,r){var n=xr.rc2.createEncryptionCipher(e,128);return n.start(t,r),n};xr.rc2.createEncryptionCipher=function(e,t){return HI(e,t,!0)};xr.rc2.startDecrypting=function(e,t,r){var n=xr.rc2.createDecryptionCipher(e,128);return n.start(t,r),n};xr.rc2.createDecryptionCipher=function(e,t){return HI(e,t,!1)}});var Ml=ce((F7,ZI)=>{"use strict";var y0=qe();ZI.exports=y0.jsbn=y0.jsbn||{};var ci,KB=0xdeadbeefcafe,GI=(KB&16777215)==15715070;function Q(e,t,r){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}y0.jsbn.BigInteger=Q;function it(){return new Q(null)}function WB(e,t,r,n,i,s){for(;--s>=0;){var o=t*this.data[e++]+r.data[n]+i;i=Math.floor(o/67108864),r.data[n++]=o&67108863}return i}function QB(e,t,r,n,i,s){for(var o=t&32767,a=t>>15;--s>=0;){var l=this.data[e]&32767,u=this.data[e++]>>15,c=a*l+u*o;l=o*l+((c&32767)<<15)+r.data[n]+(i&1073741823),i=(l>>>30)+(c>>>15)+a*u+(i>>>30),r.data[n++]=l&1073741823}return i}function zI(e,t,r,n,i,s){for(var o=t&16383,a=t>>14;--s>=0;){var l=this.data[e]&16383,u=this.data[e++]>>14,c=a*l+u*o;l=o*l+((c&16383)<<14)+r.data[n]+i,i=(l>>28)+(c>>14)+a*u,r.data[n++]=l&268435455}return i}typeof navigator>"u"?(Q.prototype.am=zI,ci=28):GI&&navigator.appName=="Microsoft Internet Explorer"?(Q.prototype.am=QB,ci=30):GI&&navigator.appName!="Netscape"?(Q.prototype.am=WB,ci=26):(Q.prototype.am=zI,ci=28);Q.prototype.DB=ci;Q.prototype.DM=(1<<ci)-1;Q.prototype.DV=1<<ci;var C0=52;Q.prototype.FV=Math.pow(2,C0);Q.prototype.F1=C0-ci;Q.prototype.F2=2*ci-C0;var YB="0123456789abcdefghijklmnopqrstuvwxyz",zf=new Array,ta,Gr;ta=48;for(Gr=0;Gr<=9;++Gr)zf[ta++]=Gr;ta=97;for(Gr=10;Gr<36;++Gr)zf[ta++]=Gr;ta=65;for(Gr=10;Gr<36;++Gr)zf[ta++]=Gr;function $I(e){return YB.charAt(e)}function KI(e,t){var r=zf[e.charCodeAt(t)];return r??-1}function ZB(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function XB(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function Hi(e){var t=it();return t.fromInt(e),t}function JB(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var n=e.length,i=!1,s=0;--n>=0;){var o=r==8?e[n]&255:KI(e,n);if(o<0){e.charAt(n)=="-"&&(i=!0);continue}i=!1,s==0?this.data[this.t++]=o:s+r>this.DB?(this.data[this.t-1]|=(o&(1<<this.DB-s)-1)<<s,this.data[this.t++]=o>>this.DB-s):this.data[this.t-1]|=o<<s,s+=r,s>=this.DB&&(s-=this.DB)}r==8&&e[0]&128&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),i&&Q.ZERO.subTo(this,this)}function eV(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t}function tV(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var r=(1<<t)-1,n,i=!1,s="",o=this.t,a=this.DB-o*this.DB%t;if(o-- >0)for(a<this.DB&&(n=this.data[o]>>a)>0&&(i=!0,s=$I(n));o>=0;)a<t?(n=(this.data[o]&(1<<a)-1)<<t-a,n|=this.data[--o]>>(a+=this.DB-t)):(n=this.data[o]>>(a-=t)&r,a<=0&&(a+=this.DB,--o)),n>0&&(i=!0),i&&(s+=$I(n));return i?s:"0"}function rV(){var e=it();return Q.ZERO.subTo(this,e),e}function nV(){return this.s<0?this.negate():this}function iV(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this.data[r]-e.data[r])!=0)return t;return 0}function $f(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}function sV(){return this.t<=0?0:this.DB*(this.t-1)+$f(this.data[this.t-1]^this.s&this.DM)}function oV(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s}function aV(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s}function lV(e,t){var r=e%this.DB,n=this.DB-r,i=(1<<n)-1,s=Math.floor(e/this.DB),o=this.s<<r&this.DM,a;for(a=this.t-1;a>=0;--a)t.data[a+s+1]=this.data[a]>>n|o,o=(this.data[a]&i)<<r;for(a=s-1;a>=0;--a)t.data[a]=0;t.data[s]=o,t.t=this.t+s+1,t.s=this.s,t.clamp()}function uV(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var n=e%this.DB,i=this.DB-n,s=(1<<n)-1;t.data[0]=this.data[r]>>n;for(var o=r+1;o<this.t;++o)t.data[o-r-1]|=(this.data[o]&s)<<i,t.data[o-r]=this.data[o]>>n;n>0&&(t.data[this.t-r-1]|=(this.s&s)<<i),t.t=this.t-r,t.clamp()}function cV(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()}function fV(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t.data[i]=0;for(i=0;i<n.t;++i)t.data[i+r.t]=r.am(0,n.data[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&Q.ZERO.subTo(t,t)}function hV(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()}function dV(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t){t?.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=it());var s=it(),o=this.s,a=e.s,l=this.DB-$f(n.data[n.t-1]);l>0?(n.lShiftTo(l,s),i.lShiftTo(l,r)):(n.copyTo(s),i.copyTo(r));var u=s.t,c=s.data[u-1];if(c!=0){var f=c*(1<<this.F1)+(u>1?s.data[u-2]>>this.F2:0),h=this.FV/f,p=(1<<this.F1)/f,d=1<<this.F2,m=r.t,b=m-u,g=t??it();for(s.dlShiftTo(b,g),r.compareTo(g)>=0&&(r.data[r.t++]=1,r.subTo(g,r)),Q.ONE.dlShiftTo(u,g),g.subTo(s,s);s.t<u;)s.data[s.t++]=0;for(;--b>=0;){var C=r.data[--m]==c?this.DM:Math.floor(r.data[m]*h+(r.data[m-1]+d)*p);if((r.data[m]+=s.am(0,C,r,b,0,u))<C)for(s.dlShiftTo(b,g),r.subTo(g,r);r.data[m]<--C;)r.subTo(g,r)}t!=null&&(r.drShiftTo(u,t),o!=a&&Q.ZERO.subTo(t,t)),r.t=u,r.clamp(),l>0&&r.rShiftTo(l,r),o<0&&Q.ZERO.subTo(r,r)}}}function pV(e){var t=it();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(Q.ZERO)>0&&e.subTo(t,t),t}function ks(e){this.m=e}function mV(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function gV(e){return e}function vV(e){e.divRemTo(this.m,null,e)}function yV(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function CV(e,t){e.squareTo(t),this.reduce(t)}ks.prototype.convert=mV;ks.prototype.revert=gV;ks.prototype.reduce=vV;ks.prototype.mulTo=yV;ks.prototype.sqrTo=CV;function EV(){if(this.t<1)return 0;var e=this.data[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function Fs(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function bV(e){var t=it();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(Q.ZERO)>0&&this.m.subTo(t,t),t}function SV(e){var t=it();return e.copyTo(t),this.reduce(t),t}function xV(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e.data[t]&32767,n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function IV(e,t){e.squareTo(t),this.reduce(t)}function wV(e,t,r){e.multiplyTo(t,r),this.reduce(r)}Fs.prototype.convert=bV;Fs.prototype.revert=SV;Fs.prototype.reduce=xV;Fs.prototype.mulTo=wV;Fs.prototype.sqrTo=IV;function TV(){return(this.t>0?this.data[0]&1:this.s)==0}function _V(e,t){if(e>4294967295||e<1)return Q.ONE;var r=it(),n=it(),i=t.convert(this),s=$f(e)-1;for(i.copyTo(r);--s>=0;)if(t.sqrTo(r,n),(e&1<<s)>0)t.mulTo(n,i,r);else{var o=r;r=n,n=o}return t.revert(r)}function DV(e,t){var r;return e<256||t.isEven()?r=new ks(t):r=new Fs(t),this.exp(e,r)}Q.prototype.copyTo=ZB;Q.prototype.fromInt=XB;Q.prototype.fromString=JB;Q.prototype.clamp=eV;Q.prototype.dlShiftTo=oV;Q.prototype.drShiftTo=aV;Q.prototype.lShiftTo=lV;Q.prototype.rShiftTo=uV;Q.prototype.subTo=cV;Q.prototype.multiplyTo=fV;Q.prototype.squareTo=hV;Q.prototype.divRemTo=dV;Q.prototype.invDigit=EV;Q.prototype.isEven=TV;Q.prototype.exp=_V;Q.prototype.toString=tV;Q.prototype.negate=rV;Q.prototype.abs=nV;Q.prototype.compareTo=iV;Q.prototype.bitLength=sV;Q.prototype.mod=pV;Q.prototype.modPowInt=DV;Q.ZERO=Hi(0);Q.ONE=Hi(1);function AV(){var e=it();return this.copyTo(e),e}function MV(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function PV(){return this.t==0?this.s:this.data[0]<<24>>24}function NV(){return this.t==0?this.s:this.data[0]<<16>>16}function RV(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function kV(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function FV(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=Hi(r),i=it(),s=it(),o="";for(this.divRemTo(n,i,s);i.signum()>0;)o=(r+s.intValue()).toString(e).substr(1)+o,i.divRemTo(n,i,s);return s.intValue().toString(e)+o}function LV(e,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,s=0,o=0,a=0;a<e.length;++a){var l=KI(e,a);if(l<0){e.charAt(a)=="-"&&this.signum()==0&&(i=!0);continue}o=t*o+l,++s>=r&&(this.dMultiply(n),this.dAddOffset(o,0),s=0,o=0)}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(o,0)),i&&Q.ZERO.subTo(this,this)}function OV(e,t,r){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(Q.ONE.shiftLeft(e-1),E0,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(Q.ONE.shiftLeft(e-1),this);else{var n=new Array,i=e&7;n.length=(e>>3)+1,t.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}}function BV(){var e=this.t,t=new Array;t[0]=this.s;var r=this.DB-e*this.DB%8,n,i=0;if(e-- >0)for(r<this.DB&&(n=this.data[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this.data[e]&(1<<r)-1)<<8-r,n|=this.data[--e]>>(r+=this.DB-8)):(n=this.data[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),n&128&&(n|=-256),i==0&&(this.s&128)!=(n&128)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t}function VV(e){return this.compareTo(e)==0}function UV(e){return this.compareTo(e)<0?this:e}function jV(e){return this.compareTo(e)>0?this:e}function HV(e,t,r){var n,i,s=Math.min(e.t,this.t);for(n=0;n<s;++n)r.data[n]=t(this.data[n],e.data[n]);if(e.t<this.t){for(i=e.s&this.DM,n=s;n<this.t;++n)r.data[n]=t(this.data[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=s;n<e.t;++n)r.data[n]=t(i,e.data[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()}function qV(e,t){return e&t}function GV(e){var t=it();return this.bitwiseTo(e,qV,t),t}function E0(e,t){return e|t}function zV(e){var t=it();return this.bitwiseTo(e,E0,t),t}function WI(e,t){return e^t}function $V(e){var t=it();return this.bitwiseTo(e,WI,t),t}function QI(e,t){return e&~t}function KV(e){var t=it();return this.bitwiseTo(e,QI,t),t}function WV(){for(var e=it(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}function QV(e){var t=it();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function YV(e){var t=it();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function ZV(e){if(e==0)return-1;var t=0;return e&65535||(e>>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}function XV(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+ZV(this.data[e]);return this.s<0?this.t*this.DB:-1}function JV(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function e3(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=JV(this.data[r]^t);return e}function t3(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this.data[t]&1<<e%this.DB)!=0}function r3(e,t){var r=Q.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r}function n3(e){return this.changeBit(e,E0)}function i3(e){return this.changeBit(e,QI)}function s3(e){return this.changeBit(e,WI)}function o3(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()}function a3(e){var t=it();return this.addTo(e,t),t}function l3(e){var t=it();return this.subTo(e,t),t}function u3(e){var t=it();return this.multiplyTo(e,t),t}function c3(e){var t=it();return this.divRemTo(e,t,null),t}function f3(e){var t=it();return this.divRemTo(e,null,t),t}function h3(e){var t=it(),r=it();return this.divRemTo(e,t,r),new Array(t,r)}function d3(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function p3(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function Al(){}function YI(e){return e}function m3(e,t,r){e.multiplyTo(t,r)}function g3(e,t){e.squareTo(t)}Al.prototype.convert=YI;Al.prototype.revert=YI;Al.prototype.mulTo=m3;Al.prototype.sqrTo=g3;function v3(e){return this.exp(e,new Al)}function y3(e,t,r){var n=Math.min(this.t+e.t,t);for(r.s=0,r.t=n;n>0;)r.data[--n]=0;var i;for(i=r.t-this.t;n<i;++n)r.data[n+this.t]=this.am(0,e.data[n],r,n,0,this.t);for(i=Math.min(e.t,t);n<i;++n)this.am(0,e.data[n],r,n,0,t-n);r.clamp()}function C3(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)}function ra(e){this.r2=it(),this.q3=it(),Q.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function E3(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=it();return e.copyTo(t),this.reduce(t),t}function b3(e){return e}function S3(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function x3(e,t){e.squareTo(t),this.reduce(t)}function I3(e,t,r){e.multiplyTo(t,r),this.reduce(r)}ra.prototype.convert=E3;ra.prototype.revert=b3;ra.prototype.reduce=S3;ra.prototype.mulTo=I3;ra.prototype.sqrTo=x3;function w3(e,t){var r=e.bitLength(),n,i=Hi(1),s;if(r<=0)return i;r<18?n=1:r<48?n=3:r<144?n=4:r<768?n=5:n=6,r<8?s=new ks(t):t.isEven()?s=new ra(t):s=new Fs(t);var o=new Array,a=3,l=n-1,u=(1<<n)-1;if(o[1]=s.convert(this),n>1){var c=it();for(s.sqrTo(o[1],c);a<=u;)o[a]=it(),s.mulTo(c,o[a-2],o[a]),a+=2}var f=e.t-1,h,p=!0,d=it(),m;for(r=$f(e.data[f])-1;f>=0;){for(r>=l?h=e.data[f]>>r-l&u:(h=(e.data[f]&(1<<r+1)-1)<<l-r,f>0&&(h|=e.data[f-1]>>this.DB+r-l)),a=n;!(h&1);)h>>=1,--a;if((r-=a)<0&&(r+=this.DB,--f),p)o[h].copyTo(i),p=!1;else{for(;a>1;)s.sqrTo(i,d),s.sqrTo(d,i),a-=2;a>0?s.sqrTo(i,d):(m=i,i=d,d=m),s.mulTo(d,o[h],i)}for(;f>=0&&!(e.data[f]&1<<r);)s.sqrTo(i,d),m=i,i=d,d=m,--r<0&&(r=this.DB-1,--f)}return s.revert(i)}function T3(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return t;for(i<s&&(s=i),s>0&&(t.rShiftTo(s,t),r.rShiftTo(s,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r}function _3(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r}function D3(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return Q.ZERO;for(var r=e.clone(),n=this.clone(),i=Hi(1),s=Hi(0),o=Hi(0),a=Hi(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!i.isEven()||!s.isEven())&&(i.addTo(this,i),s.subTo(e,s)),i.rShiftTo(1,i)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;n.isEven();)n.rShiftTo(1,n),t?((!o.isEven()||!a.isEven())&&(o.addTo(this,o),a.subTo(e,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);r.compareTo(n)>=0?(r.subTo(n,r),t&&i.subTo(o,i),s.subTo(a,s)):(n.subTo(r,n),t&&o.subTo(i,o),a.subTo(s,a))}if(n.compareTo(Q.ONE)!=0)return Q.ZERO;if(a.compareTo(e)>=0)return a.subtract(e);if(a.signum()<0)a.addTo(e,a);else return a;return a.signum()<0?a.add(e):a}var dn=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],A3=(1<<26)/dn[dn.length-1];function M3(e){var t,r=this.abs();if(r.t==1&&r.data[0]<=dn[dn.length-1]){for(t=0;t<dn.length;++t)if(r.data[0]==dn[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<dn.length;){for(var n=dn[t],i=t+1;i<dn.length&&n<A3;)n*=dn[i++];for(n=r.modInt(n);t<i;)if(n%dn[t++]==0)return!1}return r.millerRabin(e)}function P3(e){var t=this.subtract(Q.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n=t.shiftRight(r),i=N3(),s,o=0;o<e;++o){do s=new Q(this.bitLength(),i);while(s.compareTo(Q.ONE)<=0||s.compareTo(t)>=0);var a=s.modPow(n,this);if(a.compareTo(Q.ONE)!=0&&a.compareTo(t)!=0){for(var l=1;l++<r&&a.compareTo(t)!=0;)if(a=a.modPowInt(2,this),a.compareTo(Q.ONE)==0)return!1;if(a.compareTo(t)!=0)return!1}}return!0}function N3(){return{nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(Math.random()*256)}}}Q.prototype.chunkSize=RV;Q.prototype.toRadix=FV;Q.prototype.fromRadix=LV;Q.prototype.fromNumber=OV;Q.prototype.bitwiseTo=HV;Q.prototype.changeBit=r3;Q.prototype.addTo=o3;Q.prototype.dMultiply=d3;Q.prototype.dAddOffset=p3;Q.prototype.multiplyLowerTo=y3;Q.prototype.multiplyUpperTo=C3;Q.prototype.modInt=_3;Q.prototype.millerRabin=P3;Q.prototype.clone=AV;Q.prototype.intValue=MV;Q.prototype.byteValue=PV;Q.prototype.shortValue=NV;Q.prototype.signum=kV;Q.prototype.toByteArray=BV;Q.prototype.equals=VV;Q.prototype.min=UV;Q.prototype.max=jV;Q.prototype.and=GV;Q.prototype.or=zV;Q.prototype.xor=$V;Q.prototype.andNot=KV;Q.prototype.not=WV;Q.prototype.shiftLeft=QV;Q.prototype.shiftRight=YV;Q.prototype.getLowestSetBit=XV;Q.prototype.bitCount=e3;Q.prototype.testBit=t3;Q.prototype.setBit=n3;Q.prototype.clearBit=i3;Q.prototype.flipBit=s3;Q.prototype.add=a3;Q.prototype.subtract=l3;Q.prototype.multiply=u3;Q.prototype.divide=c3;Q.prototype.remainder=f3;Q.prototype.divideAndRemainder=h3;Q.prototype.modPow=w3;Q.prototype.modInverse=D3;Q.prototype.pow=v3;Q.prototype.gcd=T3;Q.prototype.isProbablePrime=M3});var na=ce((L7,tw)=>{"use strict";var Ln=qe();Pn();nt();var JI=tw.exports=Ln.sha1=Ln.sha1||{};Ln.md.sha1=Ln.md.algorithms.sha1=JI;JI.create=function(){ew||R3();var e=null,t=Ln.util.createBuffer(),r=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var i=n.messageLengthSize/4,s=0;s<i;++s)n.fullMessageLength.push(0);return t=Ln.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},n},n.start(),n.update=function(i,s){s==="utf8"&&(i=Ln.util.encodeUtf8(i));var o=i.length;n.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var a=n.fullMessageLength.length-1;a>=0;--a)n.fullMessageLength[a]+=o[1],o[1]=o[0]+(n.fullMessageLength[a]/4294967296>>>0),n.fullMessageLength[a]=n.fullMessageLength[a]>>>0,o[0]=o[1]/4294967296>>>0;return t.putBytes(i),XI(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var i=Ln.util.createBuffer();i.putBytes(t.bytes());var s=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,o=s&n.blockLength-1;i.putBytes(b0.substr(0,n.blockLength-o));for(var a,l,u=n.fullMessageLength[0]*8,c=0;c<n.fullMessageLength.length-1;++c)a=n.fullMessageLength[c+1]*8,l=a/4294967296>>>0,u+=l,i.putInt32(u>>>0),u=a>>>0;i.putInt32(u);var f={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};XI(f,r,i);var h=Ln.util.createBuffer();return h.putInt32(f.h0),h.putInt32(f.h1),h.putInt32(f.h2),h.putInt32(f.h3),h.putInt32(f.h4),h},n};var b0=null,ew=!1;function R3(){b0="\x80",b0+=Ln.util.fillString("\0",64),ew=!0}function XI(e,t,r){for(var n,i,s,o,a,l,u,c,f=r.length();f>=64;){for(i=e.h0,s=e.h1,o=e.h2,a=e.h3,l=e.h4,c=0;c<16;++c)n=r.getInt32(),t[c]=n,u=a^s&(o^a),n=(i<<5|i>>>27)+u+l+1518500249+n,l=a,a=o,o=(s<<30|s>>>2)>>>0,s=i,i=n;for(;c<20;++c)n=t[c-3]^t[c-8]^t[c-14]^t[c-16],n=n<<1|n>>>31,t[c]=n,u=a^s&(o^a),n=(i<<5|i>>>27)+u+l+1518500249+n,l=a,a=o,o=(s<<30|s>>>2)>>>0,s=i,i=n;for(;c<32;++c)n=t[c-3]^t[c-8]^t[c-14]^t[c-16],n=n<<1|n>>>31,t[c]=n,u=s^o^a,n=(i<<5|i>>>27)+u+l+1859775393+n,l=a,a=o,o=(s<<30|s>>>2)>>>0,s=i,i=n;for(;c<40;++c)n=t[c-6]^t[c-16]^t[c-28]^t[c-32],n=n<<2|n>>>30,t[c]=n,u=s^o^a,n=(i<<5|i>>>27)+u+l+1859775393+n,l=a,a=o,o=(s<<30|s>>>2)>>>0,s=i,i=n;for(;c<60;++c)n=t[c-6]^t[c-16]^t[c-28]^t[c-32],n=n<<2|n>>>30,t[c]=n,u=s&o|a&(s^o),n=(i<<5|i>>>27)+u+l+2400959708+n,l=a,a=o,o=(s<<30|s>>>2)>>>0,s=i,i=n;for(;c<80;++c)n=t[c-6]^t[c-16]^t[c-28]^t[c-32],n=n<<2|n>>>30,t[c]=n,u=s^o^a,n=(i<<5|i>>>27)+u+l+3395469782+n,l=a,a=o,o=(s<<30|s>>>2)>>>0,s=i,i=n;e.h0=e.h0+i|0,e.h1=e.h1+s|0,e.h2=e.h2+o|0,e.h3=e.h3+a|0,e.h4=e.h4+l|0,f-=64}}});var S0=ce((O7,nw)=>{"use strict";var On=qe();nt();qr();na();var rw=nw.exports=On.pkcs1=On.pkcs1||{};rw.encode_rsa_oaep=function(e,t,r){var n,i,s,o;typeof r=="string"?(n=r,i=arguments[3]||void 0,s=arguments[4]||void 0):r&&(n=r.label||void 0,i=r.seed||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(o=r.mgf1.md)),s?s.start():s=On.md.sha1.create(),o||(o=s);var a=Math.ceil(e.n.bitLength()/8),l=a-2*s.digestLength-2;if(t.length>l){var u=new Error("RSAES-OAEP input message length is too long.");throw u.length=t.length,u.maxLength=l,u}n||(n=""),s.update(n,"raw");for(var c=s.digest(),f="",h=l-t.length,p=0;p<h;p++)f+="\0";var d=c.getBytes()+f+""+t;if(!i)i=On.random.getBytes(s.digestLength);else if(i.length!==s.digestLength){var u=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw u.seedLength=i.length,u.digestLength=s.digestLength,u}var m=Kf(i,a-s.digestLength-1,o),b=On.util.xorBytes(d,m,d.length),g=Kf(b,s.digestLength,o),C=On.util.xorBytes(i,g,i.length);return"\0"+C+b};rw.decode_rsa_oaep=function(e,t,r){var n,i,s;typeof r=="string"?(n=r,i=arguments[3]||void 0):r&&(n=r.label||void 0,i=r.md||void 0,r.mgf1&&r.mgf1.md&&(s=r.mgf1.md));var o=Math.ceil(e.n.bitLength()/8);if(t.length!==o){var b=new Error("RSAES-OAEP encoded message length is invalid.");throw b.length=t.length,b.expectedLength=o,b}if(i===void 0?i=On.md.sha1.create():i.start(),s||(s=i),o<2*i.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");n||(n=""),i.update(n,"raw");for(var a=i.digest().getBytes(),l=t.charAt(0),u=t.substring(1,i.digestLength+1),c=t.substring(1+i.digestLength),f=Kf(c,i.digestLength,s),h=On.util.xorBytes(u,f,u.length),p=Kf(h,o-i.digestLength-1,s),d=On.util.xorBytes(c,p,c.length),m=d.substring(0,i.digestLength),b=l!=="\0",g=0;g<i.digestLength;++g)b|=a.charAt(g)!==m.charAt(g);for(var C=1,y=i.digestLength,E=i.digestLength;E<d.length;E++){var I=d.charCodeAt(E),T=I&1^1,R=C?65534:0;b|=I&R,C=C&T,y+=C}if(b||d.charCodeAt(y)!==1)throw new Error("Invalid RSAES-OAEP padding.");return d.substring(y+1)};function Kf(e,t,r){r||(r=On.md.sha1.create());for(var n="",i=Math.ceil(t/r.digestLength),s=0;s<i;++s){var o=String.fromCharCode(s>>24&255,s>>16&255,s>>8&255,s&255);r.start(),r.update(e+o),n+=r.digest().getBytes()}return n.substring(0,t)}});var I0=ce((B7,x0)=>{"use strict";var qi=qe();nt();Ml();qr();(function(){if(qi.prime){x0.exports=qi.prime;return}var e=x0.exports=qi.prime=qi.prime||{},t=qi.jsbn.BigInteger,r=[6,4,2,4,2,4,6,2],n=new t(null);n.fromInt(30);var i=function(f,h){return f|h};e.generateProbablePrime=function(f,h,p){typeof h=="function"&&(p=h,h={}),h=h||{};var d=h.algorithm||"PRIMEINC";typeof d=="string"&&(d={name:d}),d.options=d.options||{};var m=h.prng||qi.random,b={nextBytes:function(g){for(var C=m.getBytesSync(g.length),y=0;y<g.length;++y)g[y]=C.charCodeAt(y)}};if(d.name==="PRIMEINC")return s(f,b,d.options,p);throw new Error("Invalid prime generation algorithm: "+d.name)};function s(f,h,p,d){return"workers"in p?l(f,h,p,d):o(f,h,p,d)}function o(f,h,p,d){var m=u(f,h),b=0,g=c(m.bitLength());"millerRabinTests"in p&&(g=p.millerRabinTests);var C=10;"maxBlockTime"in p&&(C=p.maxBlockTime),a(m,f,h,b,g,C,d)}function a(f,h,p,d,m,b,g){var C=+new Date;do{if(f.bitLength()>h&&(f=u(h,p)),f.isProbablePrime(m))return g(null,f);f.dAddOffset(r[d++%8],0)}while(b<0||+new Date-C<b);qi.util.setImmediate(function(){a(f,h,p,d,m,b,g)})}function l(f,h,p,d){if(typeof Worker>"u")return o(f,h,p,d);var m=u(f,h),b=p.workers,g=p.workLoad||100,C=g*30/8,y=p.workerScript||"forge/prime.worker.js";if(b===-1)return qi.util.estimateCores(function(I,T){I&&(T=2),b=T-1,E()});E();function E(){b=Math.max(1,b);for(var I=[],T=0;T<b;++T)I[T]=new Worker(y);for(var R=b,T=0;T<b;++T)I[T].addEventListener("message",q);var F=!1;function q(Z){if(!F){--R;var W=Z.data;if(W.found){for(var z=0;z<I.length;++z)I[z].terminate();return F=!0,d(null,new t(W.prime,16))}m.bitLength()>f&&(m=u(f,h));var ee=m.toString(16);Z.target.postMessage({hex:ee,workLoad:g}),m.dAddOffset(C,0)}}}}function u(f,h){var p=new t(f,h),d=f-1;return p.testBit(d)||p.bitwiseTo(t.ONE.shiftLeft(d),i,p),p.dAddOffset(31-p.mod(n).byteValue(),0),p}function c(f){return f<=100?27:f<=150?18:f<=200?15:f<=250?12:f<=300?9:f<=350?8:f<=400?7:f<=500?6:f<=600?5:f<=800?4:f<=1250?3:2}})()});var Pl=ce((V7,cw)=>{"use strict";var Se=qe();hn();Ml();ji();S0();I0();qr();nt();typeof et>"u"&&(et=Se.jsbn.BigInteger);var et,w0=Se.util.isNodejs?Hf():null,H=Se.asn1,zr=Se.util;Se.pki=Se.pki||{};cw.exports=Se.pki.rsa=Se.rsa=Se.rsa||{};var Le=Se.pki,k3=[6,4,2,4,2,4,6,2],F3={name:"PrivateKeyInfo",tagClass:H.Class.UNIVERSAL,type:H.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:H.Class.UNIVERSAL,type:H.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:H.Class.UNIVERSAL,type:H.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:H.Class.UNIVERSAL,type:H.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},L3={name:"RSAPrivateKey",tagClass:H.Class.UNIVERSAL,type:H.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},O3={name:"RSAPublicKey",tagClass:H.Class.UNIVERSAL,type:H.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:H.Class.UNIVERSAL,type:H.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},B3=Se.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:H.Class.UNIVERSAL,type:H.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:H.Class.UNIVERSAL,type:H.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:H.Class.UNIVERSAL,type:H.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:H.Class.UNIVERSAL,type:H.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:H.Class.UNIVERSAL,type:H.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},V3={name:"DigestInfo",tagClass:H.Class.UNIVERSAL,type:H.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:H.Class.UNIVERSAL,type:H.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:H.Class.UNIVERSAL,type:H.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:H.Class.UNIVERSAL,type:H.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:H.Class.UNIVERSAL,type:H.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},U3=function(e){var t;if(e.algorithm in Le.oids)t=Le.oids[e.algorithm];else{var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}var n=H.oidToDer(t).getBytes(),i=H.create(H.Class.UNIVERSAL,H.Type.SEQUENCE,!0,[]),s=H.create(H.Class.UNIVERSAL,H.Type.SEQUENCE,!0,[]);s.value.push(H.create(H.Class.UNIVERSAL,H.Type.OID,!1,n)),s.value.push(H.create(H.Class.UNIVERSAL,H.Type.NULL,!1,""));var o=H.create(H.Class.UNIVERSAL,H.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(s),i.value.push(o),H.toDer(i).getBytes()},lw=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(et.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(et.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var n;do n=new et(Se.util.bytesToHex(Se.random.getBytes(t.n.bitLength()/8)),16);while(n.compareTo(t.n)>=0||!n.gcd(t.n).equals(et.ONE));e=e.multiply(n.modPow(t.e,t.n)).mod(t.n);for(var i=e.mod(t.p).modPow(t.dP,t.p),s=e.mod(t.q).modPow(t.dQ,t.q);i.compareTo(s)<0;)i=i.add(t.p);var o=i.subtract(s).multiply(t.qInv).mod(t.p).multiply(t.q).add(s);return o=o.multiply(n.modInverse(t.n)).mod(t.n),o};Le.rsa.encrypt=function(e,t,r){var n=r,i,s=Math.ceil(t.n.bitLength()/8);r!==!1&&r!==!0?(n=r===2,i=uw(e,t,r)):(i=Se.util.createBuffer(),i.putBytes(e));for(var o=new et(i.toHex(),16),a=lw(o,t,n),l=a.toString(16),u=Se.util.createBuffer(),c=s-Math.ceil(l.length/2);c>0;)u.putByte(0),--c;return u.putBytes(Se.util.hexToBytes(l)),u.getBytes()};Le.rsa.decrypt=function(e,t,r,n){var i=Math.ceil(t.n.bitLength()/8);if(e.length!==i){var s=new Error("Encrypted message length is invalid.");throw s.length=e.length,s.expected=i,s}var o=new et(Se.util.createBuffer(e).toHex(),16);if(o.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var a=lw(o,t,r),l=a.toString(16),u=Se.util.createBuffer(),c=i-Math.ceil(l.length/2);c>0;)u.putByte(0),--c;return u.putBytes(Se.util.hexToBytes(l)),n!==!1?Wf(u.getBytes(),t,r):u.getBytes()};Le.rsa.createKeyPairGenerationState=function(e,t,r){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,r=r||{};var n=r.prng||Se.random,i={nextBytes:function(a){for(var l=n.getBytesSync(a.length),u=0;u<a.length;++u)a[u]=l.charCodeAt(u)}},s=r.algorithm||"PRIMEINC",o;if(s==="PRIMEINC")o={algorithm:s,state:0,bits:e,rng:i,eInt:t||65537,e:new et(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},o.e.fromInt(o.eInt);else throw new Error("Invalid key generation algorithm: "+s);return o};Le.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new et(null);r.fromInt(30);for(var n=0,i=function(f,h){return f|h},s=+new Date,o,a=0;e.keys===null&&(t<=0||a<t);){if(e.state===0){var l=e.p===null?e.pBits:e.qBits,u=l-1;e.pqState===0?(e.num=new et(l,e.rng),e.num.testBit(u)||e.num.bitwiseTo(et.ONE.shiftLeft(u),i,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),n=0,++e.pqState):e.pqState===1?e.num.bitLength()>l?e.pqState=0:e.num.isProbablePrime(H3(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(k3[n++%8],0):e.pqState===2?e.pqState=e.num.subtract(et.ONE).gcd(e.e).compareTo(et.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(et.ONE),e.q1=e.q.subtract(et.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(et.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var c=e.e.modInverse(e.phi);e.keys={privateKey:Le.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:Le.rsa.setPublicKey(e.n,e.e)}}o=+new Date,a+=o-s,s=o}return e.keys!==null};Le.rsa.generateKeyPair=function(e,t,r,n){if(arguments.length===1?typeof e=="object"?(r=e,e=void 0):typeof e=="function"&&(n=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(n=t,t=void 0):typeof t!="number"&&(r=t,t=void 0):(r=e,n=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof r=="function"&&(n=r,r=void 0):(n=r,r=t,t=void 0)),r=r||{},e===void 0&&(e=r.bits||2048),t===void 0&&(t=r.e||65537),!Se.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(n){if(iw("generateKeyPair"))return w0.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(a,l,u){if(a)return n(a);n(null,{privateKey:Le.privateKeyFromPem(u),publicKey:Le.publicKeyFromPem(l)})});if(sw("generateKey")&&sw("exportKey"))return zr.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:aw(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(a){return zr.globalScope.crypto.subtle.exportKey("pkcs8",a.privateKey)}).then(void 0,function(a){n(a)}).then(function(a){if(a){var l=Le.privateKeyFromAsn1(H.fromDer(Se.util.createBuffer(a)));n(null,{privateKey:l,publicKey:Le.setRsaPublicKey(l.n,l.e)})}});if(ow("generateKey")&&ow("exportKey")){var i=zr.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:aw(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);i.oncomplete=function(a){var l=a.target.result,u=zr.globalScope.msCrypto.subtle.exportKey("pkcs8",l.privateKey);u.oncomplete=function(c){var f=c.target.result,h=Le.privateKeyFromAsn1(H.fromDer(Se.util.createBuffer(f)));n(null,{privateKey:h,publicKey:Le.setRsaPublicKey(h.n,h.e)})},u.onerror=function(c){n(c)}},i.onerror=function(a){n(a)};return}}else if(iw("generateKeyPairSync")){var s=w0.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Le.privateKeyFromPem(s.privateKey),publicKey:Le.publicKeyFromPem(s.publicKey)}}}var o=Le.rsa.createKeyPairGenerationState(e,t,r);if(!n)return Le.rsa.stepKeyPairGenerationState(o,0),o.keys;j3(o,r,n)};Le.setRsaPublicKey=Le.rsa.setPublicKey=function(e,t){var r={n:e,e:t};return r.encrypt=function(n,i,s){if(typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSAES-PKCS1-V1_5"),i==="RSAES-PKCS1-V1_5")i={encode:function(a,l,u){return uw(a,l,2).getBytes()}};else if(i==="RSA-OAEP"||i==="RSAES-OAEP")i={encode:function(a,l){return Se.pkcs1.encode_rsa_oaep(l,a,s)}};else if(["RAW","NONE","NULL",null].indexOf(i)!==-1)i={encode:function(a){return a}};else if(typeof i=="string")throw new Error('Unsupported encryption scheme: "'+i+'".');var o=i.encode(n,r,!0);return Le.rsa.encrypt(o,r,!0)},r.verify=function(n,i,s,o){typeof s=="string"?s=s.toUpperCase():s===void 0&&(s="RSASSA-PKCS1-V1_5"),o===void 0&&(o={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in o||(o._parseAllDigestBytes=!0),s==="RSASSA-PKCS1-V1_5"?s={verify:function(l,u){u=Wf(u,r,!0);var c=H.fromDer(u,{parseAllBytes:o._parseAllDigestBytes}),f={},h=[];if(!H.validate(c,V3,f,h)){var p=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw p.errors=h,p}var d=H.derToOid(f.algorithmIdentifier);if(!(d===Se.oids.md2||d===Se.oids.md5||d===Se.oids.sha1||d===Se.oids.sha224||d===Se.oids.sha256||d===Se.oids.sha384||d===Se.oids.sha512||d===Se.oids["sha512-224"]||d===Se.oids["sha512-256"])){var p=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw p.oid=d,p}if((d===Se.oids.md2||d===Se.oids.md5)&&!("parameters"in f))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return l===f.digest}}:(s==="NONE"||s==="NULL"||s===null)&&(s={verify:function(l,u){return u=Wf(u,r,!0),l===u}});var a=Le.rsa.decrypt(i,r,!0,!1);return s.verify(n,a,r.n.bitLength())},r};Le.setRsaPrivateKey=Le.rsa.setPrivateKey=function(e,t,r,n,i,s,o,a){var l={n:e,e:t,d:r,p:n,q:i,dP:s,dQ:o,qInv:a};return l.decrypt=function(u,c,f){typeof c=="string"?c=c.toUpperCase():c===void 0&&(c="RSAES-PKCS1-V1_5");var h=Le.rsa.decrypt(u,l,!1,!1);if(c==="RSAES-PKCS1-V1_5")c={decode:Wf};else if(c==="RSA-OAEP"||c==="RSAES-OAEP")c={decode:function(p,d){return Se.pkcs1.decode_rsa_oaep(d,p,f)}};else if(["RAW","NONE","NULL",null].indexOf(c)!==-1)c={decode:function(p){return p}};else throw new Error('Unsupported encryption scheme: "'+c+'".');return c.decode(h,l,!1)},l.sign=function(u,c){var f=!1;typeof c=="string"&&(c=c.toUpperCase()),c===void 0||c==="RSASSA-PKCS1-V1_5"?(c={encode:U3},f=1):(c==="NONE"||c==="NULL"||c===null)&&(c={encode:function(){return u}},f=1);var h=c.encode(u,l.n.bitLength());return Le.rsa.encrypt(h,l,f)},l};Le.wrapRsaPrivateKey=function(e){return H.create(H.Class.UNIVERSAL,H.Type.SEQUENCE,!0,[H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,H.integerToDer(0).getBytes()),H.create(H.Class.UNIVERSAL,H.Type.SEQUENCE,!0,[H.create(H.Class.UNIVERSAL,H.Type.OID,!1,H.oidToDer(Le.oids.rsaEncryption).getBytes()),H.create(H.Class.UNIVERSAL,H.Type.NULL,!1,"")]),H.create(H.Class.UNIVERSAL,H.Type.OCTETSTRING,!1,H.toDer(e).getBytes())])};Le.privateKeyFromAsn1=function(e){var t={},r=[];if(H.validate(e,F3,t,r)&&(e=H.fromDer(Se.util.createBuffer(t.privateKey))),t={},r=[],!H.validate(e,L3,t,r)){var n=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw n.errors=r,n}var i,s,o,a,l,u,c,f;return i=Se.util.createBuffer(t.privateKeyModulus).toHex(),s=Se.util.createBuffer(t.privateKeyPublicExponent).toHex(),o=Se.util.createBuffer(t.privateKeyPrivateExponent).toHex(),a=Se.util.createBuffer(t.privateKeyPrime1).toHex(),l=Se.util.createBuffer(t.privateKeyPrime2).toHex(),u=Se.util.createBuffer(t.privateKeyExponent1).toHex(),c=Se.util.createBuffer(t.privateKeyExponent2).toHex(),f=Se.util.createBuffer(t.privateKeyCoefficient).toHex(),Le.setRsaPrivateKey(new et(i,16),new et(s,16),new et(o,16),new et(a,16),new et(l,16),new et(u,16),new et(c,16),new et(f,16))};Le.privateKeyToAsn1=Le.privateKeyToRSAPrivateKey=function(e){return H.create(H.Class.UNIVERSAL,H.Type.SEQUENCE,!0,[H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,H.integerToDer(0).getBytes()),H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,Bn(e.n)),H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,Bn(e.e)),H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,Bn(e.d)),H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,Bn(e.p)),H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,Bn(e.q)),H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,Bn(e.dP)),H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,Bn(e.dQ)),H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,Bn(e.qInv))])};Le.publicKeyFromAsn1=function(e){var t={},r=[];if(H.validate(e,B3,t,r)){var n=H.derToOid(t.publicKeyOid);if(n!==Le.oids.rsaEncryption){var i=new Error("Cannot read public key. Unknown OID.");throw i.oid=n,i}e=t.rsaPublicKey}if(r=[],!H.validate(e,O3,t,r)){var i=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw i.errors=r,i}var s=Se.util.createBuffer(t.publicKeyModulus).toHex(),o=Se.util.createBuffer(t.publicKeyExponent).toHex();return Le.setRsaPublicKey(new et(s,16),new et(o,16))};Le.publicKeyToAsn1=Le.publicKeyToSubjectPublicKeyInfo=function(e){return H.create(H.Class.UNIVERSAL,H.Type.SEQUENCE,!0,[H.create(H.Class.UNIVERSAL,H.Type.SEQUENCE,!0,[H.create(H.Class.UNIVERSAL,H.Type.OID,!1,H.oidToDer(Le.oids.rsaEncryption).getBytes()),H.create(H.Class.UNIVERSAL,H.Type.NULL,!1,"")]),H.create(H.Class.UNIVERSAL,H.Type.BITSTRING,!1,[Le.publicKeyToRSAPublicKey(e)])])};Le.publicKeyToRSAPublicKey=function(e){return H.create(H.Class.UNIVERSAL,H.Type.SEQUENCE,!0,[H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,Bn(e.n)),H.create(H.Class.UNIVERSAL,H.Type.INTEGER,!1,Bn(e.e))])};function uw(e,t,r){var n=Se.util.createBuffer(),i=Math.ceil(t.n.bitLength()/8);if(e.length>i-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=i-11,s}n.putByte(0),n.putByte(r);var o=i-3-e.length,a;if(r===0||r===1){a=r===0?0:255;for(var l=0;l<o;++l)n.putByte(a)}else for(;o>0;){for(var u=0,c=Se.random.getBytes(o),l=0;l<o;++l)a=c.charCodeAt(l),a===0?++u:n.putByte(a);o=u}return n.putByte(0),n.putBytes(e),n}function Wf(e,t,r,n){var i=Math.ceil(t.n.bitLength()/8),s=Se.util.createBuffer(e),o=s.getByte(),a=s.getByte();if(o!==0||r&&a!==0&&a!==1||!r&&a!=2||r&&a===0&&typeof n>"u")throw new Error("Encryption block is invalid.");var l=0;if(a===0){l=i-3-n;for(var u=0;u<l;++u)if(s.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(a===1)for(l=0;s.length()>1;){if(s.getByte()!==255){--s.read;break}++l}else if(a===2)for(l=0;s.length()>1;){if(s.getByte()===0){--s.read;break}++l}var c=s.getByte();if(c!==0||l!==i-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function j3(e,t,r){typeof t=="function"&&(r=t,t={}),t=t||{};var n={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(n.prng=t.prng),i();function i(){s(e.pBits,function(a,l){if(a)return r(a);if(e.p=l,e.q!==null)return o(a,e.q);s(e.qBits,o)})}function s(a,l){Se.prime.generateProbablePrime(a,n,l)}function o(a,l){if(a)return r(a);if(e.q=l,e.p.compareTo(e.q)<0){var u=e.p;e.p=e.q,e.q=u}if(e.p.subtract(et.ONE).gcd(e.e).compareTo(et.ONE)!==0){e.p=null,i();return}if(e.q.subtract(et.ONE).gcd(e.e).compareTo(et.ONE)!==0){e.q=null,s(e.qBits,o);return}if(e.p1=e.p.subtract(et.ONE),e.q1=e.q.subtract(et.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(et.ONE)!==0){e.p=e.q=null,i();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,s(e.qBits,o);return}var c=e.e.modInverse(e.phi);e.keys={privateKey:Le.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:Le.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}}function Bn(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=Se.util.hexToBytes(t);return r.length>1&&(r.charCodeAt(0)===0&&!(r.charCodeAt(1)&128)||r.charCodeAt(0)===255&&(r.charCodeAt(1)&128)===128)?r.substr(1):r}function H3(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function iw(e){return Se.util.isNodejs&&typeof w0[e]=="function"}function sw(e){return typeof zr.globalScope<"u"&&typeof zr.globalScope.crypto=="object"&&typeof zr.globalScope.crypto.subtle=="object"&&typeof zr.globalScope.crypto.subtle[e]=="function"}function ow(e){return typeof zr.globalScope<"u"&&typeof zr.globalScope.msCrypto=="object"&&typeof zr.globalScope.msCrypto.subtle=="object"&&typeof zr.globalScope.msCrypto.subtle[e]=="function"}function aw(e){for(var t=Se.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),n=0;n<t.length;++n)r[n]=t.charCodeAt(n);return r}});var T0=ce((U7,mw)=>{"use strict";var de=qe();Ui();hn();Dl();Pn();ji();qf();Rs();qr();v0();Pl();nt();typeof fw>"u"&&(fw=de.jsbn.BigInteger);var fw,$=de.asn1,Ue=de.pki=de.pki||{};mw.exports=Ue.pbe=de.pbe=de.pbe||{};var Ls=Ue.oids,q3={name:"EncryptedPrivateKeyInfo",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:$.Class.UNIVERSAL,type:$.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:$.Class.UNIVERSAL,type:$.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},G3={name:"PBES2Algorithms",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:$.Class.UNIVERSAL,type:$.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:$.Class.UNIVERSAL,type:$.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:$.Class.UNIVERSAL,type:$.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:$.Class.UNIVERSAL,type:$.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:$.Class.UNIVERSAL,type:$.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:$.Class.UNIVERSAL,type:$.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:$.Class.UNIVERSAL,type:$.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},z3={name:"pkcs-12PbeParams",tagClass:$.Class.UNIVERSAL,type:$.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:$.Class.UNIVERSAL,type:$.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:$.Class.UNIVERSAL,type:$.Type.INTEGER,constructed:!1,capture:"iterations"}]};Ue.encryptPrivateKeyInfo=function(e,t,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var n=de.random.getBytesSync(r.saltSize),i=r.count,s=$.integerToDer(i),o,a,l;if(r.algorithm.indexOf("aes")===0||r.algorithm==="des"){var u,c,f;switch(r.algorithm){case"aes128":o=16,u=16,c=Ls["aes128-CBC"],f=de.aes.createEncryptionCipher;break;case"aes192":o=24,u=16,c=Ls["aes192-CBC"],f=de.aes.createEncryptionCipher;break;case"aes256":o=32,u=16,c=Ls["aes256-CBC"],f=de.aes.createEncryptionCipher;break;case"des":o=8,u=8,c=Ls.desCBC,f=de.des.createEncryptionCipher;break;default:var h=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw h.algorithm=r.algorithm,h}var p="hmacWith"+r.prfAlgorithm.toUpperCase(),d=pw(p),m=de.pkcs5.pbkdf2(t,n,i,o,d),b=de.random.getBytesSync(u),g=f(m);g.start(b),g.update($.toDer(e)),g.finish(),l=g.output.getBytes();var C=$3(n,s,o,p);a=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(Ls.pkcs5PBES2).getBytes()),$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(Ls.pkcs5PBKDF2).getBytes()),C]),$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(c).getBytes()),$.create($.Class.UNIVERSAL,$.Type.OCTETSTRING,!1,b)])])])}else if(r.algorithm==="3des"){o=24;var y=new de.util.ByteBuffer(n),m=Ue.pbe.generatePkcs12Key(t,y,1,i,o),b=Ue.pbe.generatePkcs12Key(t,y,2,i,o),g=de.des.createEncryptionCipher(m);g.start(b),g.update($.toDer(e)),g.finish(),l=g.output.getBytes(),a=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(Ls["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OCTETSTRING,!1,n),$.create($.Class.UNIVERSAL,$.Type.INTEGER,!1,s.getBytes())])])}else{var h=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw h.algorithm=r.algorithm,h}var E=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[a,$.create($.Class.UNIVERSAL,$.Type.OCTETSTRING,!1,l)]);return E};Ue.decryptPrivateKeyInfo=function(e,t){var r=null,n={},i=[];if(!$.validate(e,q3,n,i)){var s=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=i,s}var o=$.derToOid(n.encryptionOid),a=Ue.pbe.getCipher(o,n.encryptionParams,t),l=de.util.createBuffer(n.encryptedData);return a.update(l),a.finish()&&(r=$.fromDer(a.output)),r};Ue.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:$.toDer(e).getBytes()};return de.pem.encode(r,{maxline:t})};Ue.encryptedPrivateKeyFromPem=function(e){var t=de.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return $.fromDer(t.body)};Ue.encryptRsaPrivateKey=function(e,t,r){if(r=r||{},!r.legacy){var n=Ue.wrapRsaPrivateKey(Ue.privateKeyToAsn1(e));return n=Ue.encryptPrivateKeyInfo(n,t,r),Ue.encryptedPrivateKeyToPem(n)}var i,s,o,a;switch(r.algorithm){case"aes128":i="AES-128-CBC",o=16,s=de.random.getBytesSync(16),a=de.aes.createEncryptionCipher;break;case"aes192":i="AES-192-CBC",o=24,s=de.random.getBytesSync(16),a=de.aes.createEncryptionCipher;break;case"aes256":i="AES-256-CBC",o=32,s=de.random.getBytesSync(16),a=de.aes.createEncryptionCipher;break;case"3des":i="DES-EDE3-CBC",o=24,s=de.random.getBytesSync(8),a=de.des.createEncryptionCipher;break;case"des":i="DES-CBC",o=8,s=de.random.getBytesSync(8),a=de.des.createEncryptionCipher;break;default:var l=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw l.algorithm=r.algorithm,l}var u=de.pbe.opensslDeriveBytes(t,s.substr(0,8),o),c=a(u);c.start(s),c.update($.toDer(Ue.privateKeyToAsn1(e))),c.finish();var f={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:i,parameters:de.util.bytesToHex(s).toUpperCase()},body:c.output.getBytes()};return de.pem.encode(f)};Ue.decryptRsaPrivateKey=function(e,t){var r=null,n=de.pem.decode(e)[0];if(n.type!=="ENCRYPTED PRIVATE KEY"&&n.type!=="PRIVATE KEY"&&n.type!=="RSA PRIVATE KEY"){var i=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw i.headerType=i,i}if(n.procType&&n.procType.type==="ENCRYPTED"){var s,o;switch(n.dekInfo.algorithm){case"DES-CBC":s=8,o=de.des.createDecryptionCipher;break;case"DES-EDE3-CBC":s=24,o=de.des.createDecryptionCipher;break;case"AES-128-CBC":s=16,o=de.aes.createDecryptionCipher;break;case"AES-192-CBC":s=24,o=de.aes.createDecryptionCipher;break;case"AES-256-CBC":s=32,o=de.aes.createDecryptionCipher;break;case"RC2-40-CBC":s=5,o=function(f){return de.rc2.createDecryptionCipher(f,40)};break;case"RC2-64-CBC":s=8,o=function(f){return de.rc2.createDecryptionCipher(f,64)};break;case"RC2-128-CBC":s=16,o=function(f){return de.rc2.createDecryptionCipher(f,128)};break;default:var i=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".');throw i.algorithm=n.dekInfo.algorithm,i}var a=de.util.hexToBytes(n.dekInfo.parameters),l=de.pbe.opensslDeriveBytes(t,a.substr(0,8),s),u=o(l);if(u.start(a),u.update(de.util.createBuffer(n.body)),u.finish())r=u.output.getBytes();else return r}else r=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?r=Ue.decryptPrivateKeyInfo($.fromDer(r),t):r=$.fromDer(r),r!==null&&(r=Ue.privateKeyFromAsn1(r)),r};Ue.pbe.generatePkcs12Key=function(e,t,r,n,i,s){var o,a;if(typeof s>"u"||s===null){if(!("sha1"in de.md))throw new Error('"sha1" hash algorithm unavailable.');s=de.md.sha1.create()}var l=s.digestLength,u=s.blockLength,c=new de.util.ByteBuffer,f=new de.util.ByteBuffer;if(e!=null){for(a=0;a<e.length;a++)f.putInt16(e.charCodeAt(a));f.putInt16(0)}var h=f.length(),p=t.length(),d=new de.util.ByteBuffer;d.fillWithByte(r,u);var m=u*Math.ceil(p/u),b=new de.util.ByteBuffer;for(a=0;a<m;a++)b.putByte(t.at(a%p));var g=u*Math.ceil(h/u),C=new de.util.ByteBuffer;for(a=0;a<g;a++)C.putByte(f.at(a%h));var y=b;y.putBuffer(C);for(var E=Math.ceil(i/l),I=1;I<=E;I++){var T=new de.util.ByteBuffer;T.putBytes(d.bytes()),T.putBytes(y.bytes());for(var R=0;R<n;R++)s.start(),s.update(T.getBytes()),T=s.digest();var F=new de.util.ByteBuffer;for(a=0;a<u;a++)F.putByte(T.at(a%l));var q=Math.ceil(p/u)+Math.ceil(h/u),Z=new de.util.ByteBuffer;for(o=0;o<q;o++){var W=new de.util.ByteBuffer(y.getBytes(u)),z=511;for(a=F.length()-1;a>=0;a--)z=z>>8,z+=F.at(a)+W.at(a),W.setAt(a,z&255);Z.putBuffer(W)}y=Z,c.putBuffer(T)}return c.truncate(c.length()-i),c};Ue.pbe.getCipher=function(e,t,r){switch(e){case Ue.oids.pkcs5PBES2:return Ue.pbe.getCipherForPBES2(e,t,r);case Ue.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case Ue.oids["pbewithSHAAnd40BitRC2-CBC"]:return Ue.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}};Ue.pbe.getCipherForPBES2=function(e,t,r){var n={},i=[];if(!$.validate(t,G3,n,i)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=i,s}if(e=$.derToOid(n.kdfOid),e!==Ue.oids.pkcs5PBKDF2){var s=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw s.oid=e,s.supportedOids=["pkcs5PBKDF2"],s}if(e=$.derToOid(n.encOid),e!==Ue.oids["aes128-CBC"]&&e!==Ue.oids["aes192-CBC"]&&e!==Ue.oids["aes256-CBC"]&&e!==Ue.oids["des-EDE3-CBC"]&&e!==Ue.oids.desCBC){var s=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw s.oid=e,s.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],s}var o=n.kdfSalt,a=de.util.createBuffer(n.kdfIterationCount);a=a.getInt(a.length()<<3);var l,u;switch(Ue.oids[e]){case"aes128-CBC":l=16,u=de.aes.createDecryptionCipher;break;case"aes192-CBC":l=24,u=de.aes.createDecryptionCipher;break;case"aes256-CBC":l=32,u=de.aes.createDecryptionCipher;break;case"des-EDE3-CBC":l=24,u=de.des.createDecryptionCipher;break;case"desCBC":l=8,u=de.des.createDecryptionCipher;break}var c=dw(n.prfOid),f=de.pkcs5.pbkdf2(r,o,a,l,c),h=n.encIv,p=u(f);return p.start(h),p};Ue.pbe.getCipherForPKCS12PBE=function(e,t,r){var n={},i=[];if(!$.validate(t,z3,n,i)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=i,s}var o=de.util.createBuffer(n.salt),a=de.util.createBuffer(n.iterations);a=a.getInt(a.length()<<3);var l,u,c;switch(e){case Ue.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:l=24,u=8,c=de.des.startDecrypting;break;case Ue.oids["pbewithSHAAnd40BitRC2-CBC"]:l=5,u=8,c=function(m,b){var g=de.rc2.createDecryptionCipher(m,40);return g.start(b,null),g};break;default:var s=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw s.oid=e,s}var f=dw(n.prfOid),h=Ue.pbe.generatePkcs12Key(r,o,1,a,l,f);f.start();var p=Ue.pbe.generatePkcs12Key(r,o,2,a,u,f);return c(h,p)};Ue.pbe.opensslDeriveBytes=function(e,t,r,n){if(typeof n>"u"||n===null){if(!("md5"in de.md))throw new Error('"md5" hash algorithm unavailable.');n=de.md.md5.create()}t===null&&(t="");for(var i=[hw(n,e+t)],s=16,o=1;s<r;++o,s+=16)i.push(hw(n,i[o-1]+e+t));return i.join("").substr(0,r)};function hw(e,t){return e.start().update(t).digest().getBytes()}function dw(e){var t;if(!e)t="hmacWithSHA1";else if(t=Ue.oids[$.derToOid(e)],!t){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}return pw(t)}function pw(e){var t=de.md;switch(e){case"hmacWithSHA224":t=de.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}function $3(e,t,r,n){var i=$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OCTETSTRING,!1,e),$.create($.Class.UNIVERSAL,$.Type.INTEGER,!1,t.getBytes())]);return n!=="hmacWithSHA1"&&i.value.push($.create($.Class.UNIVERSAL,$.Type.INTEGER,!1,de.util.hexToBytes(r.toString(16))),$.create($.Class.UNIVERSAL,$.Type.SEQUENCE,!0,[$.create($.Class.UNIVERSAL,$.Type.OID,!1,$.oidToDer(Ue.oids[n]).getBytes()),$.create($.Class.UNIVERSAL,$.Type.NULL,!1,"")])),i}});var _0=ce((j7,yw)=>{"use strict";var ia=qe();hn();nt();var he=ia.asn1,sa=yw.exports=ia.pkcs7asn1=ia.pkcs7asn1||{};ia.pkcs7=ia.pkcs7||{};ia.pkcs7.asn1=sa;var gw={name:"ContentInfo",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:he.Class.UNIVERSAL,type:he.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:he.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};sa.contentInfoValidator=gw;var vw={name:"EncryptedContentInfo",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:he.Class.UNIVERSAL,type:he.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:he.Class.UNIVERSAL,type:he.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:he.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:he.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};sa.envelopedDataValidator={name:"EnvelopedData",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:he.Class.UNIVERSAL,type:he.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:he.Class.UNIVERSAL,type:he.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(vw)};sa.encryptedDataValidator={name:"EncryptedData",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:he.Class.UNIVERSAL,type:he.Type.INTEGER,constructed:!1,capture:"version"}].concat(vw)};var K3={name:"SignerInfo",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:he.Class.UNIVERSAL,type:he.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:he.Class.UNIVERSAL,type:he.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:he.Class.UNIVERSAL,type:he.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:he.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:he.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:he.Class.UNIVERSAL,type:he.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:he.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};sa.signedDataValidator={name:"SignedData",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:he.Class.UNIVERSAL,type:he.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:he.Class.UNIVERSAL,type:he.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},gw,{name:"SignedData.Certificates",tagClass:he.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:he.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:he.Class.UNIVERSAL,type:he.Type.SET,capture:"signerInfos",optional:!0,value:[K3]}]};sa.recipientInfoValidator={name:"RecipientInfo",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:he.Class.UNIVERSAL,type:he.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:he.Class.UNIVERSAL,type:he.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:he.Class.UNIVERSAL,type:he.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:he.Class.UNIVERSAL,type:he.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:he.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:he.Class.UNIVERSAL,type:he.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var D0=ce((H7,Cw)=>{"use strict";var Os=qe();nt();Os.mgf=Os.mgf||{};var W3=Cw.exports=Os.mgf.mgf1=Os.mgf1=Os.mgf1||{};W3.create=function(e){var t={generate:function(r,n){for(var i=new Os.util.ByteBuffer,s=Math.ceil(n/e.digestLength),o=0;o<s;o++){var a=new Os.util.ByteBuffer;a.putInt32(o),e.start(),e.update(r+a.getBytes()),i.putBuffer(e.digest())}return i.truncate(i.length()-n),i.getBytes()}};return t}});var bw=ce((q7,Ew)=>{"use strict";var Qf=qe();D0();Ew.exports=Qf.mgf=Qf.mgf||{};Qf.mgf.mgf1=Qf.mgf1});var Yf=ce((G7,Sw)=>{"use strict";var Bs=qe();qr();nt();var Q3=Sw.exports=Bs.pss=Bs.pss||{};Q3.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,r=e.mgf,n=t.digestLength,i=e.salt||null;typeof i=="string"&&(i=Bs.util.createBuffer(i));var s;if("saltLength"in e)s=e.saltLength;else if(i!==null)s=i.length();else throw new Error("Salt length not specified or specific salt not given.");if(i!==null&&i.length()!==s)throw new Error("Given salt length does not match length of given salt.");var o=e.prng||Bs.random,a={};return a.encode=function(l,u){var c,f=u-1,h=Math.ceil(f/8),p=l.digest().getBytes();if(h<n+s+2)throw new Error("Message is too long to encrypt.");var d;i===null?d=o.getBytesSync(s):d=i.bytes();var m=new Bs.util.ByteBuffer;m.fillWithByte(0,8),m.putBytes(p),m.putBytes(d),t.start(),t.update(m.getBytes());var b=t.digest().getBytes(),g=new Bs.util.ByteBuffer;g.fillWithByte(0,h-s-n-2),g.putByte(1),g.putBytes(d);var C=g.getBytes(),y=h-n-1,E=r.generate(b,y),I="";for(c=0;c<y;c++)I+=String.fromCharCode(C.charCodeAt(c)^E.charCodeAt(c));var T=65280>>8*h-f&255;return I=String.fromCharCode(I.charCodeAt(0)&~T)+I.substr(1),I+b+"\xBC"},a.verify=function(l,u,c){var f,h=c-1,p=Math.ceil(h/8);if(u=u.substr(-p),p<n+s+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(u.charCodeAt(p-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var d=p-n-1,m=u.substr(0,d),b=u.substr(d,n),g=65280>>8*p-h&255;if(m.charCodeAt(0)&g)throw new Error("Bits beyond keysize not zero as expected.");var C=r.generate(b,d),y="";for(f=0;f<d;f++)y+=String.fromCharCode(m.charCodeAt(f)^C.charCodeAt(f));y=String.fromCharCode(y.charCodeAt(0)&~g)+y.substr(1);var E=p-n-s-2;for(f=0;f<E;f++)if(y.charCodeAt(f)!==0)throw new Error("Leftmost octets not zero as expected");if(y.charCodeAt(E)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var I=y.substr(-s),T=new Bs.util.ByteBuffer;T.fillWithByte(0,8),T.putBytes(l),T.putBytes(I),t.start(),t.update(T.getBytes());var R=t.digest().getBytes();return b===R},a}});var Jf=ce((z7,_w)=>{"use strict";var xe=qe();Ui();hn();Dl();Pn();bw();ji();Rs();Yf();Pl();nt();var _=xe.asn1,ie=_w.exports=xe.pki=xe.pki||{},tt=ie.oids,Ot={};Ot.CN=tt.commonName;Ot.commonName="CN";Ot.C=tt.countryName;Ot.countryName="C";Ot.L=tt.localityName;Ot.localityName="L";Ot.ST=tt.stateOrProvinceName;Ot.stateOrProvinceName="ST";Ot.O=tt.organizationName;Ot.organizationName="O";Ot.OU=tt.organizationalUnitName;Ot.organizationalUnitName="OU";Ot.E=tt.emailAddress;Ot.emailAddress="E";var Iw=xe.pki.rsa.publicKeyValidator,Y3={name:"Certificate",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:_.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:_.Class.UNIVERSAL,type:_.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:_.Class.UNIVERSAL,type:_.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:_.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:_.Class.UNIVERSAL,type:_.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:_.Class.UNIVERSAL,type:_.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:_.Class.UNIVERSAL,type:_.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:_.Class.UNIVERSAL,type:_.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},Iw,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:_.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:_.Class.UNIVERSAL,type:_.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:_.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:_.Class.UNIVERSAL,type:_.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:_.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:_.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:_.Class.UNIVERSAL,type:_.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},Z3={name:"rsapss",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:_.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:_.Class.UNIVERSAL,type:_.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:_.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:_.Class.UNIVERSAL,type:_.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:_.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:_.Class.UNIVERSAL,type:_.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:_.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:_.Class.UNIVERSAL,type:_.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},X3={name:"CertificationRequestInfo",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:_.Class.UNIVERSAL,type:_.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},Iw,{name:"CertificationRequestInfo.attributes",tagClass:_.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:_.Class.UNIVERSAL,type:_.Type.SET,constructed:!0}]}]}]},J3={name:"CertificationRequest",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[X3,{name:"CertificationRequest.signatureAlgorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:_.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:_.Class.UNIVERSAL,type:_.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};ie.RDNAttributesAsArray=function(e,t){for(var r=[],n,i,s,o=0;o<e.value.length;++o){n=e.value[o];for(var a=0;a<n.value.length;++a)s={},i=n.value[a],s.type=_.derToOid(i.value[0].value),s.value=i.value[1].value,s.valueTagClass=i.value[1].type,s.type in tt&&(s.name=tt[s.type],s.name in Ot&&(s.shortName=Ot[s.name])),t&&(t.update(s.type),t.update(s.value)),r.push(s)}return r};ie.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var n=e[r],i=_.derToOid(n.value[0].value),s=n.value[1].value,o=0;o<s.length;++o){var a={};if(a.type=i,a.value=s[o].value,a.valueTagClass=s[o].type,a.type in tt&&(a.name=tt[a.type],a.name in Ot&&(a.shortName=Ot[a.name])),a.type===tt.extensionRequest){a.extensions=[];for(var l=0;l<a.value.length;++l)a.extensions.push(ie.certificateExtensionFromAsn1(a.value[l]))}t.push(a)}return t};function Gi(e,t){typeof t=="string"&&(t={shortName:t});for(var r=null,n,i=0;r===null&&i<e.attributes.length;++i)n=e.attributes[i],(t.type&&t.type===n.type||t.name&&t.name===n.name||t.shortName&&t.shortName===n.shortName)&&(r=n);return r}var Zf=function(e,t,r){var n={};if(e!==tt["RSASSA-PSS"])return n;r&&(n={hash:{algorithmOid:tt.sha1},mgf:{algorithmOid:tt.mgf1,hash:{algorithmOid:tt.sha1}},saltLength:20});var i={},s=[];if(!_.validate(t,Z3,i,s)){var o=new Error("Cannot read RSASSA-PSS parameter block.");throw o.errors=s,o}return i.hashOid!==void 0&&(n.hash=n.hash||{},n.hash.algorithmOid=_.derToOid(i.hashOid)),i.maskGenOid!==void 0&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=_.derToOid(i.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=_.derToOid(i.maskGenHashOid)),i.saltLength!==void 0&&(n.saltLength=i.saltLength.charCodeAt(0)),n},Xf=function(e){switch(tt[e.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return xe.md.sha1.create();case"md5WithRSAEncryption":return xe.md.md5.create();case"sha256WithRSAEncryption":return xe.md.sha256.create();case"sha384WithRSAEncryption":return xe.md.sha384.create();case"sha512WithRSAEncryption":return xe.md.sha512.create();case"RSASSA-PSS":return xe.md.sha256.create();default:var t=new Error("Could not compute "+e.type+" digest. Unknown signature OID.");throw t.signatureOid=e.signatureOid,t}},ww=function(e){var t=e.certificate,r;switch(t.signatureOid){case tt.sha1WithRSAEncryption:case tt.sha1WithRSASignature:break;case tt["RSASSA-PSS"]:var n,i;if(n=tt[t.signatureParameters.mgf.hash.algorithmOid],n===void 0||xe.md[n]===void 0){var s=new Error("Unsupported MGF hash function.");throw s.oid=t.signatureParameters.mgf.hash.algorithmOid,s.name=n,s}if(i=tt[t.signatureParameters.mgf.algorithmOid],i===void 0||xe.mgf[i]===void 0){var s=new Error("Unsupported MGF function.");throw s.oid=t.signatureParameters.mgf.algorithmOid,s.name=i,s}if(i=xe.mgf[i].create(xe.md[n].create()),n=tt[t.signatureParameters.hash.algorithmOid],n===void 0||xe.md[n]===void 0){var s=new Error("Unsupported RSASSA-PSS hash function.");throw s.oid=t.signatureParameters.hash.algorithmOid,s.name=n,s}r=xe.pss.create(xe.md[n].create(),i,t.signatureParameters.saltLength);break}return t.publicKey.verify(e.md.digest().getBytes(),e.signature,r)};ie.certificateFromPem=function(e,t,r){var n=xe.pem.decode(e)[0];if(n.type!=="CERTIFICATE"&&n.type!=="X509 CERTIFICATE"&&n.type!=="TRUSTED CERTIFICATE"){var i=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw i.headerType=n.type,i}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var s=_.fromDer(n.body,r);return ie.certificateFromAsn1(s,t)};ie.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:_.toDer(ie.certificateToAsn1(e)).getBytes()};return xe.pem.encode(r,{maxline:t})};ie.publicKeyFromPem=function(e){var t=xe.pem.decode(e)[0];if(t.type!=="PUBLIC KEY"&&t.type!=="RSA PUBLIC KEY"){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var n=_.fromDer(t.body);return ie.publicKeyFromAsn1(n)};ie.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:_.toDer(ie.publicKeyToAsn1(e)).getBytes()};return xe.pem.encode(r,{maxline:t})};ie.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:_.toDer(ie.publicKeyToRSAPublicKey(e)).getBytes()};return xe.pem.encode(r,{maxline:t})};ie.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||xe.md.sha1.create(),n=t.type||"RSAPublicKey",i;switch(n){case"RSAPublicKey":i=_.toDer(ie.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":i=_.toDer(ie.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}r.start(),r.update(i);var s=r.digest();if(t.encoding==="hex"){var o=s.toHex();return t.delimiter?o.match(/.{2}/g).join(t.delimiter):o}else{if(t.encoding==="binary")return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return s};ie.certificationRequestFromPem=function(e,t,r){var n=xe.pem.decode(e)[0];if(n.type!=="CERTIFICATE REQUEST"){var i=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw i.headerType=n.type,i}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var s=_.fromDer(n.body,r);return ie.certificationRequestFromAsn1(s,t)};ie.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:_.toDer(ie.certificationRequestToAsn1(e)).getBytes()};return xe.pem.encode(r,{maxline:t})};ie.createCertificate=function(){var e={};return e.version=2,e.serialNumber="00",e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return Gi(e.issuer,t)},e.issuer.addField=function(t){$r([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return Gi(e.subject,t)},e.subject.addField=function(t){$r([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){$r(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){$r(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)Tw(t[r],{cert:e});e.extensions=t},e.getExtension=function(t){typeof t=="string"&&(t={name:t});for(var r=null,n,i=0;r===null&&i<e.extensions.length;++i)n=e.extensions[i],(t.id&&n.id===t.id||t.name&&n.name===t.name)&&(r=n);return r},e.sign=function(t,r){e.md=r||xe.md.sha1.create();var n=tt[e.md.algorithm+"WithRSAEncryption"];if(!n){var i=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw i.algorithm=e.md.algorithm,i}e.signatureOid=e.siginfo.algorithmOid=n,e.tbsCertificate=ie.getTBSCertificate(e);var s=_.toDer(e.tbsCertificate);e.md.update(s.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1;if(!e.issued(t)){var n=t.issuer,i=e.subject,s=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw s.expectedIssuer=i.attributes,s.actualIssuer=n.attributes,s}var o=t.md;if(o===null){o=Xf({signatureOid:t.signatureOid,type:"certificate"});var a=t.tbsCertificate||ie.getTBSCertificate(t),l=_.toDer(a);o.update(l.getBytes())}return o!==null&&(r=ww({certificate:e,md:o,signature:t.signature})),r},e.isIssuer=function(t){var r=!1,n=e.issuer,i=t.subject;if(n.hash&&i.hash)r=n.hash===i.hash;else if(n.attributes.length===i.attributes.length){r=!0;for(var s,o,a=0;r&&a<n.attributes.length;++a)s=n.attributes[a],o=i.attributes[a],(s.type!==o.type||s.value!==o.value)&&(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return ie.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=tt.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var n=e.extensions[r];if(n.id===t){var i=e.generateSubjectKeyIdentifier().getBytes();return xe.util.hexToBytes(n.subjectKeyIdentifier)===i}}return!1},e};ie.certificateFromAsn1=function(e,t){var r={},n=[];if(!_.validate(e,Y3,r,n)){var i=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw i.errors=n,i}var s=_.derToOid(r.publicKeyOid);if(s!==ie.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var o=ie.createCertificate();o.version=r.certVersion?r.certVersion.charCodeAt(0):0;var a=xe.util.createBuffer(r.certSerialNumber);o.serialNumber=a.toHex(),o.signatureOid=xe.asn1.derToOid(r.certSignatureOid),o.signatureParameters=Zf(o.signatureOid,r.certSignatureParams,!0),o.siginfo.algorithmOid=xe.asn1.derToOid(r.certinfoSignatureOid),o.siginfo.parameters=Zf(o.siginfo.algorithmOid,r.certinfoSignatureParams,!1),o.signature=r.certSignature;var l=[];if(r.certValidity1UTCTime!==void 0&&l.push(_.utcTimeToDate(r.certValidity1UTCTime)),r.certValidity2GeneralizedTime!==void 0&&l.push(_.generalizedTimeToDate(r.certValidity2GeneralizedTime)),r.certValidity3UTCTime!==void 0&&l.push(_.utcTimeToDate(r.certValidity3UTCTime)),r.certValidity4GeneralizedTime!==void 0&&l.push(_.generalizedTimeToDate(r.certValidity4GeneralizedTime)),l.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(l.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(o.validity.notBefore=l[0],o.validity.notAfter=l[1],o.tbsCertificate=r.tbsCertificate,t){o.md=Xf({signatureOid:o.signatureOid,type:"certificate"});var u=_.toDer(o.tbsCertificate);o.md.update(u.getBytes())}var c=xe.md.sha1.create(),f=_.toDer(r.certIssuer);c.update(f.getBytes()),o.issuer.getField=function(d){return Gi(o.issuer,d)},o.issuer.addField=function(d){$r([d]),o.issuer.attributes.push(d)},o.issuer.attributes=ie.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(o.issuer.uniqueId=r.certIssuerUniqueId),o.issuer.hash=c.digest().toHex();var h=xe.md.sha1.create(),p=_.toDer(r.certSubject);return h.update(p.getBytes()),o.subject.getField=function(d){return Gi(o.subject,d)},o.subject.addField=function(d){$r([d]),o.subject.attributes.push(d)},o.subject.attributes=ie.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(o.subject.uniqueId=r.certSubjectUniqueId),o.subject.hash=h.digest().toHex(),r.certExtensions?o.extensions=ie.certificateExtensionsFromAsn1(r.certExtensions):o.extensions=[],o.publicKey=ie.publicKeyFromAsn1(r.subjectPublicKeyInfo),o};ie.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var n=e.value[r],i=0;i<n.value.length;++i)t.push(ie.certificateExtensionFromAsn1(n.value[i]));return t};ie.certificateExtensionFromAsn1=function(e){var t={};if(t.id=_.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===_.Type.BOOLEAN?(t.critical=e.value[1].value.charCodeAt(0)!==0,t.value=e.value[2].value):t.value=e.value[1].value,t.id in tt){if(t.name=tt[t.id],t.name==="keyUsage"){var r=_.fromDer(t.value),n=0,i=0;r.value.length>1&&(n=r.value.charCodeAt(1),i=r.value.length>2?r.value.charCodeAt(2):0),t.digitalSignature=(n&128)===128,t.nonRepudiation=(n&64)===64,t.keyEncipherment=(n&32)===32,t.dataEncipherment=(n&16)===16,t.keyAgreement=(n&8)===8,t.keyCertSign=(n&4)===4,t.cRLSign=(n&2)===2,t.encipherOnly=(n&1)===1,t.decipherOnly=(i&128)===128}else if(t.name==="basicConstraints"){var r=_.fromDer(t.value);r.value.length>0&&r.value[0].type===_.Type.BOOLEAN?t.cA=r.value[0].value.charCodeAt(0)!==0:t.cA=!1;var s=null;r.value.length>0&&r.value[0].type===_.Type.INTEGER?s=r.value[0].value:r.value.length>1&&(s=r.value[1].value),s!==null&&(t.pathLenConstraint=_.derToInteger(s))}else if(t.name==="extKeyUsage")for(var r=_.fromDer(t.value),o=0;o<r.value.length;++o){var a=_.derToOid(r.value[o].value);a in tt?t[tt[a]]=!0:t[a]=!0}else if(t.name==="nsCertType"){var r=_.fromDer(t.value),n=0;r.value.length>1&&(n=r.value.charCodeAt(1)),t.client=(n&128)===128,t.server=(n&64)===64,t.email=(n&32)===32,t.objsign=(n&16)===16,t.reserved=(n&8)===8,t.sslCA=(n&4)===4,t.emailCA=(n&2)===2,t.objCA=(n&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var l,r=_.fromDer(t.value),u=0;u<r.value.length;++u){l=r.value[u];var c={type:l.type,value:l.value};switch(t.altNames.push(c),l.type){case 1:case 2:case 6:break;case 7:c.ip=xe.util.bytesToIP(l.value);break;case 8:c.oid=_.derToOid(l.value);break;default:}}}else if(t.name==="subjectKeyIdentifier"){var r=_.fromDer(t.value);t.subjectKeyIdentifier=xe.util.bytesToHex(r.value)}}return t};ie.certificationRequestFromAsn1=function(e,t){var r={},n=[];if(!_.validate(e,J3,r,n)){var i=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw i.errors=n,i}var s=_.derToOid(r.publicKeyOid);if(s!==ie.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var o=ie.createCertificationRequest();if(o.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,o.signatureOid=xe.asn1.derToOid(r.csrSignatureOid),o.signatureParameters=Zf(o.signatureOid,r.csrSignatureParams,!0),o.siginfo.algorithmOid=xe.asn1.derToOid(r.csrSignatureOid),o.siginfo.parameters=Zf(o.siginfo.algorithmOid,r.csrSignatureParams,!1),o.signature=r.csrSignature,o.certificationRequestInfo=r.certificationRequestInfo,t){o.md=Xf({signatureOid:o.signatureOid,type:"certification request"});var a=_.toDer(o.certificationRequestInfo);o.md.update(a.getBytes())}var l=xe.md.sha1.create();return o.subject.getField=function(u){return Gi(o.subject,u)},o.subject.addField=function(u){$r([u]),o.subject.attributes.push(u)},o.subject.attributes=ie.RDNAttributesAsArray(r.certificationRequestInfoSubject,l),o.subject.hash=l.digest().toHex(),o.publicKey=ie.publicKeyFromAsn1(r.subjectPublicKeyInfo),o.getAttribute=function(u){return Gi(o,u)},o.addAttribute=function(u){$r([u]),o.attributes.push(u)},o.attributes=ie.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),o};ie.createCertificationRequest=function(){var e={};return e.version=0,e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return Gi(e.subject,t)},e.subject.addField=function(t){$r([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return Gi(e,t)},e.addAttribute=function(t){$r([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){$r(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){$r(t),e.attributes=t},e.sign=function(t,r){e.md=r||xe.md.sha1.create();var n=tt[e.md.algorithm+"WithRSAEncryption"];if(!n){var i=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw i.algorithm=e.md.algorithm,i}e.signatureOid=e.siginfo.algorithmOid=n,e.certificationRequestInfo=ie.getCertificationRequestInfo(e);var s=_.toDer(e.certificationRequestInfo);e.md.update(s.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md;if(r===null){r=Xf({signatureOid:e.signatureOid,type:"certification request"});var n=e.certificationRequestInfo||ie.getCertificationRequestInfo(e),i=_.toDer(n);r.update(i.getBytes())}return r!==null&&(t=ww({certificate:e,md:r,signature:e.signature})),t},e};function oa(e){for(var t=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[]),r,n,i=e.attributes,s=0;s<i.length;++s){r=i[s];var o=r.value,a=_.Type.PRINTABLESTRING;"valueTagClass"in r&&(a=r.valueTagClass,a===_.Type.UTF8&&(o=xe.util.encodeUtf8(o))),n=_.create(_.Class.UNIVERSAL,_.Type.SET,!0,[_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(r.type).getBytes()),_.create(_.Class.UNIVERSAL,a,!1,o)])]),t.value.push(n)}return t}function $r(e){for(var t,r=0;r<e.length;++r){if(t=e[r],typeof t.name>"u"&&(t.type&&t.type in ie.oids?t.name=ie.oids[t.type]:t.shortName&&t.shortName in Ot&&(t.name=ie.oids[Ot[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in ie.oids)t.type=ie.oids[t.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=t,n}if(typeof t.shortName>"u"&&t.name&&t.name in Ot&&(t.shortName=Ot[t.name]),t.type===tt.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=_.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var i=0;i<t.extensions.length;++i)t.value.push(ie.certificateExtensionToAsn1(Tw(t.extensions[i])))}if(typeof t.value>"u"){var n=new Error("Attribute value not specified.");throw n.attribute=t,n}}}function Tw(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in ie.oids&&(e.name=ie.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in ie.oids)e.id=ie.oids[e.name];else{var r=new Error("Extension ID not specified.");throw r.extension=e,r}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var n=0,i=0,s=0;e.digitalSignature&&(i|=128,n=7),e.nonRepudiation&&(i|=64,n=6),e.keyEncipherment&&(i|=32,n=5),e.dataEncipherment&&(i|=16,n=4),e.keyAgreement&&(i|=8,n=3),e.keyCertSign&&(i|=4,n=2),e.cRLSign&&(i|=2,n=1),e.encipherOnly&&(i|=1,n=0),e.decipherOnly&&(s|=128,n=7);var o=String.fromCharCode(n);s!==0?o+=String.fromCharCode(i)+String.fromCharCode(s):i!==0&&(o+=String.fromCharCode(i)),e.value=_.create(_.Class.UNIVERSAL,_.Type.BITSTRING,!1,o)}else if(e.name==="basicConstraints")e.value=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(_.create(_.Class.UNIVERSAL,_.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in e&&e.value.value.push(_.create(_.Class.UNIVERSAL,_.Type.INTEGER,!1,_.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[]);var a=e.value.value;for(var l in e)e[l]===!0&&(l in tt?a.push(_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(tt[l]).getBytes())):l.indexOf(".")!==-1&&a.push(_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(l).getBytes())))}else if(e.name==="nsCertType"){var n=0,i=0;e.client&&(i|=128,n=7),e.server&&(i|=64,n=6),e.email&&(i|=32,n=5),e.objsign&&(i|=16,n=4),e.reserved&&(i|=8,n=3),e.sslCA&&(i|=4,n=2),e.emailCA&&(i|=2,n=1),e.objCA&&(i|=1,n=0);var o=String.fromCharCode(n);i!==0&&(o+=String.fromCharCode(i)),e.value=_.create(_.Class.UNIVERSAL,_.Type.BITSTRING,!1,o)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[]);for(var u,c=0;c<e.altNames.length;++c){u=e.altNames[c];var o=u.value;if(u.type===7&&u.ip){if(o=xe.util.bytesFromIP(u.ip),o===null){var r=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw r.extension=e,r}}else u.type===8&&(u.oid?o=_.oidToDer(_.oidToDer(u.oid)):o=_.oidToDer(o));e.value.value.push(_.create(_.Class.CONTEXT_SPECIFIC,u.type,!1,o))}}else if(e.name==="nsComment"&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=_.create(_.Class.UNIVERSAL,_.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var f=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=f.toHex(),e.value=_.create(_.Class.UNIVERSAL,_.Type.OCTETSTRING,!1,f.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[]);var a=e.value.value;if(e.keyIdentifier){var h=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;a.push(_.create(_.Class.CONTEXT_SPECIFIC,0,!1,h))}if(e.authorityCertIssuer){var p=[_.create(_.Class.CONTEXT_SPECIFIC,4,!0,[oa(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];a.push(_.create(_.Class.CONTEXT_SPECIFIC,1,!0,p))}if(e.serialNumber){var d=xe.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);a.push(_.create(_.Class.CONTEXT_SPECIFIC,2,!1,d))}}else if(e.name==="cRLDistributionPoints"){e.value=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[]);for(var a=e.value.value,m=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[]),b=_.create(_.Class.CONTEXT_SPECIFIC,0,!0,[]),u,c=0;c<e.altNames.length;++c){u=e.altNames[c];var o=u.value;if(u.type===7&&u.ip){if(o=xe.util.bytesFromIP(u.ip),o===null){var r=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw r.extension=e,r}}else u.type===8&&(u.oid?o=_.oidToDer(_.oidToDer(u.oid)):o=_.oidToDer(o));b.value.push(_.create(_.Class.CONTEXT_SPECIFIC,u.type,!1,o))}m.value.push(_.create(_.Class.CONTEXT_SPECIFIC,0,!0,[b])),a.push(m)}if(typeof e.value>"u"){var r=new Error("Extension value not specified.");throw r.extension=e,r}return e}function A0(e,t){switch(e){case tt["RSASSA-PSS"]:var r=[];return t.hash.algorithmOid!==void 0&&r.push(_.create(_.Class.CONTEXT_SPECIFIC,0,!0,[_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(t.hash.algorithmOid).getBytes()),_.create(_.Class.UNIVERSAL,_.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&r.push(_.create(_.Class.CONTEXT_SPECIFIC,1,!0,[_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(t.mgf.algorithmOid).getBytes()),_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(t.mgf.hash.algorithmOid).getBytes()),_.create(_.Class.UNIVERSAL,_.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&r.push(_.create(_.Class.CONTEXT_SPECIFIC,2,!0,[_.create(_.Class.UNIVERSAL,_.Type.INTEGER,!1,_.integerToDer(t.saltLength).getBytes())])),_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,r);default:return _.create(_.Class.UNIVERSAL,_.Type.NULL,!1,"")}}function e4(e){var t=_.create(_.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var r=e.attributes,n=0;n<r.length;++n){var i=r[n],s=i.value,o=_.Type.UTF8;"valueTagClass"in i&&(o=i.valueTagClass),o===_.Type.UTF8&&(s=xe.util.encodeUtf8(s));var a=!1;"valueConstructed"in i&&(a=i.valueConstructed);var l=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(i.type).getBytes()),_.create(_.Class.UNIVERSAL,_.Type.SET,!0,[_.create(_.Class.UNIVERSAL,o,a,s)])]);t.value.push(l)}return t}var t4=new Date("1950-01-01T00:00:00Z"),r4=new Date("2050-01-01T00:00:00Z");function xw(e){return e>=t4&&e<r4?_.create(_.Class.UNIVERSAL,_.Type.UTCTIME,!1,_.dateToUtcTime(e)):_.create(_.Class.UNIVERSAL,_.Type.GENERALIZEDTIME,!1,_.dateToGeneralizedTime(e))}ie.getTBSCertificate=function(e){var t=xw(e.validity.notBefore),r=xw(e.validity.notAfter),n=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.CONTEXT_SPECIFIC,0,!0,[_.create(_.Class.UNIVERSAL,_.Type.INTEGER,!1,_.integerToDer(e.version).getBytes())]),_.create(_.Class.UNIVERSAL,_.Type.INTEGER,!1,xe.util.hexToBytes(e.serialNumber)),_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(e.siginfo.algorithmOid).getBytes()),A0(e.siginfo.algorithmOid,e.siginfo.parameters)]),oa(e.issuer),_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[t,r]),oa(e.subject),ie.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&n.value.push(_.create(_.Class.CONTEXT_SPECIFIC,1,!0,[_.create(_.Class.UNIVERSAL,_.Type.BITSTRING,!1,"\0"+e.issuer.uniqueId)])),e.subject.uniqueId&&n.value.push(_.create(_.Class.CONTEXT_SPECIFIC,2,!0,[_.create(_.Class.UNIVERSAL,_.Type.BITSTRING,!1,"\0"+e.subject.uniqueId)])),e.extensions.length>0&&n.value.push(ie.certificateExtensionsToAsn1(e.extensions)),n};ie.getCertificationRequestInfo=function(e){var t=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.INTEGER,!1,_.integerToDer(e.version).getBytes()),oa(e.subject),ie.publicKeyToAsn1(e.publicKey),e4(e)]);return t};ie.distinguishedNameToAsn1=function(e){return oa(e)};ie.certificateToAsn1=function(e){var t=e.tbsCertificate||ie.getTBSCertificate(e);return _.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[t,_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(e.signatureOid).getBytes()),A0(e.signatureOid,e.signatureParameters)]),_.create(_.Class.UNIVERSAL,_.Type.BITSTRING,!1,"\0"+e.signature)])};ie.certificateExtensionsToAsn1=function(e){var t=_.create(_.Class.CONTEXT_SPECIFIC,3,!0,[]),r=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n<e.length;++n)r.value.push(ie.certificateExtensionToAsn1(e[n]));return t};ie.certificateExtensionToAsn1=function(e){var t=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[]);t.value.push(_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(e.id).getBytes())),e.critical&&t.value.push(_.create(_.Class.UNIVERSAL,_.Type.BOOLEAN,!1,"\xFF"));var r=e.value;return typeof e.value!="string"&&(r=_.toDer(r).getBytes()),t.value.push(_.create(_.Class.UNIVERSAL,_.Type.OCTETSTRING,!1,r)),t};ie.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||ie.getCertificationRequestInfo(e);return _.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[t,_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(e.signatureOid).getBytes()),A0(e.signatureOid,e.signatureParameters)]),_.create(_.Class.UNIVERSAL,_.Type.BITSTRING,!1,"\0"+e.signature)])};ie.createCaStore=function(e){var t={certs:{}};t.getIssuer=function(o){var a=r(o.issuer);return a},t.addCertificate=function(o){if(typeof o=="string"&&(o=xe.pki.certificateFromPem(o)),n(o.subject),!t.hasCertificate(o))if(o.subject.hash in t.certs){var a=t.certs[o.subject.hash];xe.util.isArray(a)||(a=[a]),a.push(o),t.certs[o.subject.hash]=a}else t.certs[o.subject.hash]=o},t.hasCertificate=function(o){typeof o=="string"&&(o=xe.pki.certificateFromPem(o));var a=r(o.subject);if(!a)return!1;xe.util.isArray(a)||(a=[a]);for(var l=_.toDer(ie.certificateToAsn1(o)).getBytes(),u=0;u<a.length;++u){var c=_.toDer(ie.certificateToAsn1(a[u])).getBytes();if(l===c)return!0}return!1},t.listAllCertificates=function(){var o=[];for(var a in t.certs)if(t.certs.hasOwnProperty(a)){var l=t.certs[a];if(!xe.util.isArray(l))o.push(l);else for(var u=0;u<l.length;++u)o.push(l[u])}return o},t.removeCertificate=function(o){var a;if(typeof o=="string"&&(o=xe.pki.certificateFromPem(o)),n(o.subject),!t.hasCertificate(o))return null;var l=r(o.subject);if(!xe.util.isArray(l))return a=t.certs[o.subject.hash],delete t.certs[o.subject.hash],a;for(var u=_.toDer(ie.certificateToAsn1(o)).getBytes(),c=0;c<l.length;++c){var f=_.toDer(ie.certificateToAsn1(l[c])).getBytes();u===f&&(a=l[c],l.splice(c,1))}return l.length===0&&delete t.certs[o.subject.hash],a};function r(o){return n(o),t.certs[o.hash]||null}function n(o){if(!o.hash){var a=xe.md.sha1.create();o.attributes=ie.RDNAttributesAsArray(oa(o),a),o.hash=a.digest().toHex()}}if(e)for(var i=0;i<e.length;++i){var s=e[i];t.addCertificate(s)}return t};ie.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};ie.verifyCertificateChain=function(e,t,r){typeof r=="function"&&(r={verify:r}),r=r||{},t=t.slice(0);var n=t.slice(0),i=r.validityCheckDate;typeof i>"u"&&(i=new Date);var s=!0,o=null,a=0;do{var l=t.shift(),u=null,c=!1;if(i&&(i<l.validity.notBefore||i>l.validity.notAfter)&&(o={message:"Certificate is not valid yet or has expired.",error:ie.certificateError.certificate_expired,notBefore:l.validity.notBefore,notAfter:l.validity.notAfter,now:i}),o===null){if(u=t[0]||e.getIssuer(l),u===null&&l.isIssuer(l)&&(c=!0,u=l),u){var f=u;xe.util.isArray(f)||(f=[f]);for(var h=!1;!h&&f.length>0;){u=f.shift();try{h=u.verify(l)}catch{}}h||(o={message:"Certificate signature is invalid.",error:ie.certificateError.bad_certificate})}o===null&&(!u||c)&&!e.hasCertificate(l)&&(o={message:"Certificate is not trusted.",error:ie.certificateError.unknown_ca})}if(o===null&&u&&!l.isIssuer(u)&&(o={message:"Certificate issuer is invalid.",error:ie.certificateError.bad_certificate}),o===null)for(var p={keyUsage:!0,basicConstraints:!0},d=0;o===null&&d<l.extensions.length;++d){var m=l.extensions[d];m.critical&&!(m.name in p)&&(o={message:"Certificate has an unsupported critical extension.",error:ie.certificateError.unsupported_certificate})}if(o===null&&(!s||t.length===0&&(!u||c))){var b=l.getExtension("basicConstraints"),g=l.getExtension("keyUsage");if(g!==null&&(!g.keyCertSign||b===null)&&(o={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:ie.certificateError.bad_certificate}),o===null&&b!==null&&!b.cA&&(o={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:ie.certificateError.bad_certificate}),o===null&&g!==null&&"pathLenConstraint"in b){var C=a-1;C>b.pathLenConstraint&&(o={message:"Certificate basicConstraints pathLenConstraint violated.",error:ie.certificateError.bad_certificate})}}var y=o===null?!0:o.error,E=r.verify?r.verify(y,a,n):y;if(E===!0)o=null;else throw y===!0&&(o={message:"The application rejected the certificate.",error:ie.certificateError.bad_certificate}),(E||E===0)&&(typeof E=="object"&&!xe.util.isArray(E)?(E.message&&(o.message=E.message),E.error&&(o.error=E.error)):typeof E=="string"&&(o.error=E)),o;s=!1,++a}while(t.length>0);return!0}});var P0=ce(($7,Aw)=>{"use strict";var wt=qe();hn();Jo();ji();_0();T0();qr();Pl();na();nt();Jf();var O=wt.asn1,Ye=wt.pki,Rl=Aw.exports=wt.pkcs12=wt.pkcs12||{},Dw={name:"ContentInfo",tagClass:O.Class.UNIVERSAL,type:O.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:O.Class.UNIVERSAL,type:O.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:O.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},n4={name:"PFX",tagClass:O.Class.UNIVERSAL,type:O.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:O.Class.UNIVERSAL,type:O.Type.INTEGER,constructed:!1,capture:"version"},Dw,{name:"PFX.macData",tagClass:O.Class.UNIVERSAL,type:O.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:O.Class.UNIVERSAL,type:O.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:O.Class.UNIVERSAL,type:O.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:O.Class.UNIVERSAL,type:O.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:O.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:O.Class.UNIVERSAL,type:O.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:O.Class.UNIVERSAL,type:O.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:O.Class.UNIVERSAL,type:O.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},i4={name:"SafeBag",tagClass:O.Class.UNIVERSAL,type:O.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:O.Class.UNIVERSAL,type:O.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:O.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:O.Class.UNIVERSAL,type:O.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},s4={name:"Attribute",tagClass:O.Class.UNIVERSAL,type:O.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:O.Class.UNIVERSAL,type:O.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:O.Class.UNIVERSAL,type:O.Type.SET,constructed:!0,capture:"values"}]},o4={name:"CertBag",tagClass:O.Class.UNIVERSAL,type:O.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:O.Class.UNIVERSAL,type:O.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:O.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:O.Class.UNIVERSAL,type:O.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function Nl(e,t,r,n){for(var i=[],s=0;s<e.length;s++)for(var o=0;o<e[s].safeBags.length;o++){var a=e[s].safeBags[o];if(!(n!==void 0&&a.type!==n)){if(t===null){i.push(a);continue}a.attributes[t]!==void 0&&a.attributes[t].indexOf(r)>=0&&i.push(a)}}return i}Rl.pkcs12FromAsn1=function(e,t,r){typeof t=="string"?(r=t,t=!0):t===void 0&&(t=!0);var n={},i=[];if(!O.validate(e,n4,n,i)){var s=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw s.errors=s,s}var o={version:n.version.charCodeAt(0),safeContents:[],getBags:function(b){var g={},C;return"localKeyId"in b?C=b.localKeyId:"localKeyIdHex"in b&&(C=wt.util.hexToBytes(b.localKeyIdHex)),C===void 0&&!("friendlyName"in b)&&"bagType"in b&&(g[b.bagType]=Nl(o.safeContents,null,null,b.bagType)),C!==void 0&&(g.localKeyId=Nl(o.safeContents,"localKeyId",C,b.bagType)),"friendlyName"in b&&(g.friendlyName=Nl(o.safeContents,"friendlyName",b.friendlyName,b.bagType)),g},getBagsByFriendlyName:function(b,g){return Nl(o.safeContents,"friendlyName",b,g)},getBagsByLocalKeyId:function(b,g){return Nl(o.safeContents,"localKeyId",b,g)}};if(n.version.charCodeAt(0)!==3){var s=new Error("PKCS#12 PFX of version other than 3 not supported.");throw s.version=n.version.charCodeAt(0),s}if(O.derToOid(n.contentType)!==Ye.oids.data){var s=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw s.oid=O.derToOid(n.contentType),s}var a=n.content.value[0];if(a.tagClass!==O.Class.UNIVERSAL||a.type!==O.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(a=M0(a),n.mac){var l=null,u=0,c=O.derToOid(n.macAlgorithm);switch(c){case Ye.oids.sha1:l=wt.md.sha1.create(),u=20;break;case Ye.oids.sha256:l=wt.md.sha256.create(),u=32;break;case Ye.oids.sha384:l=wt.md.sha384.create(),u=48;break;case Ye.oids.sha512:l=wt.md.sha512.create(),u=64;break;case Ye.oids.md5:l=wt.md.md5.create(),u=16;break}if(l===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+c);var f=new wt.util.ByteBuffer(n.macSalt),h="macIterations"in n?parseInt(wt.util.bytesToHex(n.macIterations),16):1,p=Rl.generateKey(r,f,3,h,u,l),d=wt.hmac.create();d.start(l,p),d.update(a.value);var m=d.getMac();if(m.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return a4(o,a.value,t,r),o};function M0(e){if(e.composed||e.constructed){for(var t=wt.util.createBuffer(),r=0;r<e.value.length;++r)t.putBytes(e.value[r].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function a4(e,t,r,n){if(t=O.fromDer(t,r),t.tagClass!==O.Class.UNIVERSAL||t.type!==O.Type.SEQUENCE||t.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var i=0;i<t.value.length;i++){var s=t.value[i],o={},a=[];if(!O.validate(s,Dw,o,a)){var l=new Error("Cannot read ContentInfo.");throw l.errors=a,l}var u={encrypted:!1},c=null,f=o.content.value[0];switch(O.derToOid(o.contentType)){case Ye.oids.data:if(f.tagClass!==O.Class.UNIVERSAL||f.type!==O.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");c=M0(f).value;break;case Ye.oids.encryptedData:c=l4(f,n),u.encrypted=!0;break;default:var l=new Error("Unsupported PKCS#12 contentType.");throw l.contentType=O.derToOid(o.contentType),l}u.safeBags=u4(c,r,n),e.safeContents.push(u)}}function l4(e,t){var r={},n=[];if(!O.validate(e,wt.pkcs7.asn1.encryptedDataValidator,r,n)){var i=new Error("Cannot read EncryptedContentInfo.");throw i.errors=n,i}var s=O.derToOid(r.contentType);if(s!==Ye.oids.data){var i=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw i.oid=s,i}s=O.derToOid(r.encAlgorithm);var o=Ye.pbe.getCipher(s,r.encParameter,t),a=M0(r.encryptedContentAsn1),l=wt.util.createBuffer(a.value);if(o.update(l),!o.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return o.output.getBytes()}function u4(e,t,r){if(!t&&e.length===0)return[];if(e=O.fromDer(e,t),e.tagClass!==O.Class.UNIVERSAL||e.type!==O.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],i=0;i<e.value.length;i++){var s=e.value[i],o={},a=[];if(!O.validate(s,i4,o,a)){var l=new Error("Cannot read SafeBag.");throw l.errors=a,l}var u={type:O.derToOid(o.bagId),attributes:c4(o.bagAttributes)};n.push(u);var c,f,h=o.bagValue.value[0];switch(u.type){case Ye.oids.pkcs8ShroudedKeyBag:if(h=Ye.decryptPrivateKeyInfo(h,r),h===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case Ye.oids.keyBag:try{u.key=Ye.privateKeyFromAsn1(h)}catch{u.key=null,u.asn1=h}continue;case Ye.oids.certBag:c=o4,f=function(){if(O.derToOid(o.certId)!==Ye.oids.x509Certificate){var d=new Error("Unsupported certificate type, only X.509 supported.");throw d.oid=O.derToOid(o.certId),d}var m=O.fromDer(o.cert,t);try{u.cert=Ye.certificateFromAsn1(m,!0)}catch{u.cert=null,u.asn1=m}};break;default:var l=new Error("Unsupported PKCS#12 SafeBag type.");throw l.oid=u.type,l}if(c!==void 0&&!O.validate(h,c,o,a)){var l=new Error("Cannot read PKCS#12 "+c.name);throw l.errors=a,l}f()}return n}function c4(e){var t={};if(e!==void 0)for(var r=0;r<e.length;++r){var n={},i=[];if(!O.validate(e[r],s4,n,i)){var s=new Error("Cannot read PKCS#12 BagAttribute.");throw s.errors=i,s}var o=O.derToOid(n.oid);if(Ye.oids[o]!==void 0){t[Ye.oids[o]]=[];for(var a=0;a<n.values.length;++a)t[Ye.oids[o]].push(n.values[a].value)}}return t}Rl.toPkcs12Asn1=function(e,t,r,n){n=n||{},n.saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||n.encAlgorithm||"aes128","useMac"in n||(n.useMac=!0),"localKeyId"in n||(n.localKeyId=null),"generateLocalKeyId"in n||(n.generateLocalKeyId=!0);var i=n.localKeyId,s;if(i!==null)i=wt.util.hexToBytes(i);else if(n.generateLocalKeyId)if(t){var o=wt.util.isArray(t)?t[0]:t;typeof o=="string"&&(o=Ye.certificateFromPem(o));var a=wt.md.sha1.create();a.update(O.toDer(Ye.certificateToAsn1(o)).getBytes()),i=a.digest().getBytes()}else i=wt.random.getBytes(20);var l=[];i!==null&&l.push(O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.OID,!1,O.oidToDer(Ye.oids.localKeyId).getBytes()),O.create(O.Class.UNIVERSAL,O.Type.SET,!0,[O.create(O.Class.UNIVERSAL,O.Type.OCTETSTRING,!1,i)])])),"friendlyName"in n&&l.push(O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.OID,!1,O.oidToDer(Ye.oids.friendlyName).getBytes()),O.create(O.Class.UNIVERSAL,O.Type.SET,!0,[O.create(O.Class.UNIVERSAL,O.Type.BMPSTRING,!1,n.friendlyName)])])),l.length>0&&(s=O.create(O.Class.UNIVERSAL,O.Type.SET,!0,l));var u=[],c=[];t!==null&&(wt.util.isArray(t)?c=t:c=[t]);for(var f=[],h=0;h<c.length;++h){t=c[h],typeof t=="string"&&(t=Ye.certificateFromPem(t));var p=h===0?s:void 0,d=Ye.certificateToAsn1(t),m=O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.OID,!1,O.oidToDer(Ye.oids.certBag).getBytes()),O.create(O.Class.CONTEXT_SPECIFIC,0,!0,[O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.OID,!1,O.oidToDer(Ye.oids.x509Certificate).getBytes()),O.create(O.Class.CONTEXT_SPECIFIC,0,!0,[O.create(O.Class.UNIVERSAL,O.Type.OCTETSTRING,!1,O.toDer(d).getBytes())])])]),p]);f.push(m)}if(f.length>0){var b=O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,f),g=O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.OID,!1,O.oidToDer(Ye.oids.data).getBytes()),O.create(O.Class.CONTEXT_SPECIFIC,0,!0,[O.create(O.Class.UNIVERSAL,O.Type.OCTETSTRING,!1,O.toDer(b).getBytes())])]);u.push(g)}var C=null;if(e!==null){var y=Ye.wrapRsaPrivateKey(Ye.privateKeyToAsn1(e));r===null?C=O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.OID,!1,O.oidToDer(Ye.oids.keyBag).getBytes()),O.create(O.Class.CONTEXT_SPECIFIC,0,!0,[y]),s]):C=O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.OID,!1,O.oidToDer(Ye.oids.pkcs8ShroudedKeyBag).getBytes()),O.create(O.Class.CONTEXT_SPECIFIC,0,!0,[Ye.encryptPrivateKeyInfo(y,r,n)]),s]);var E=O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[C]),I=O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.OID,!1,O.oidToDer(Ye.oids.data).getBytes()),O.create(O.Class.CONTEXT_SPECIFIC,0,!0,[O.create(O.Class.UNIVERSAL,O.Type.OCTETSTRING,!1,O.toDer(E).getBytes())])]);u.push(I)}var T=O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,u),R;if(n.useMac){var a=wt.md.sha1.create(),F=new wt.util.ByteBuffer(wt.random.getBytes(n.saltSize)),q=n.count,e=Rl.generateKey(r,F,3,q,20),Z=wt.hmac.create();Z.start(a,e),Z.update(O.toDer(T).getBytes());var W=Z.getMac();R=O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.OID,!1,O.oidToDer(Ye.oids.sha1).getBytes()),O.create(O.Class.UNIVERSAL,O.Type.NULL,!1,"")]),O.create(O.Class.UNIVERSAL,O.Type.OCTETSTRING,!1,W.getBytes())]),O.create(O.Class.UNIVERSAL,O.Type.OCTETSTRING,!1,F.getBytes()),O.create(O.Class.UNIVERSAL,O.Type.INTEGER,!1,O.integerToDer(q).getBytes())])}return O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.INTEGER,!1,O.integerToDer(3).getBytes()),O.create(O.Class.UNIVERSAL,O.Type.SEQUENCE,!0,[O.create(O.Class.UNIVERSAL,O.Type.OID,!1,O.oidToDer(Ye.oids.data).getBytes()),O.create(O.Class.CONTEXT_SPECIFIC,0,!0,[O.create(O.Class.UNIVERSAL,O.Type.OCTETSTRING,!1,O.toDer(T).getBytes())])]),R])};Rl.generateKey=wt.pbe.generatePkcs12Key});var R0=ce((K7,Mw)=>{"use strict";var zi=qe();hn();ji();T0();Rs();qf();P0();Yf();Pl();nt();Jf();var N0=zi.asn1,aa=Mw.exports=zi.pki=zi.pki||{};aa.pemToDer=function(e){var t=zi.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return zi.util.createBuffer(t.body)};aa.privateKeyFromPem=function(e){var t=zi.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=N0.fromDer(t.body);return aa.privateKeyFromAsn1(n)};aa.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:N0.toDer(aa.privateKeyToAsn1(e)).getBytes()};return zi.pem.encode(r,{maxline:t})};aa.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:N0.toDer(e).getBytes()};return zi.pem.encode(r,{maxline:t})}});var V0=ce((W7,Bw)=>{"use strict";var Y=qe();hn();Jo();Bf();Rs();R0();qr();na();nt();var nh=function(e,t,r,n){var i=Y.util.createBuffer(),s=e.length>>1,o=s+(e.length&1),a=e.substr(0,o),l=e.substr(s,o),u=Y.util.createBuffer(),c=Y.hmac.create();r=t+r;var f=Math.ceil(n/16),h=Math.ceil(n/20);c.start("MD5",a);var p=Y.util.createBuffer();u.putBytes(r);for(var d=0;d<f;++d)c.start(null,null),c.update(u.getBytes()),u.putBuffer(c.digest()),c.start(null,null),c.update(u.bytes()+r),p.putBuffer(c.digest());c.start("SHA1",l);var m=Y.util.createBuffer();u.clear(),u.putBytes(r);for(var d=0;d<h;++d)c.start(null,null),c.update(u.getBytes()),u.putBuffer(c.digest()),c.start(null,null),c.update(u.bytes()+r),m.putBuffer(c.digest());return i.putBytes(Y.util.xorBytes(p.getBytes(),m.getBytes(),n)),i},f4=function(e,t,r){var n=Y.hmac.create();n.start("SHA1",e);var i=Y.util.createBuffer();return i.putInt32(t[0]),i.putInt32(t[1]),i.putByte(r.type),i.putByte(r.version.major),i.putByte(r.version.minor),i.putInt16(r.length),i.putBytes(r.fragment.bytes()),n.update(i.getBytes()),n.digest().getBytes()},h4=function(e,t,r){var n=!1;try{var i=e.deflate(t.fragment.getBytes());t.fragment=Y.util.createBuffer(i),t.length=i.length,n=!0}catch{}return n},d4=function(e,t,r){var n=!1;try{var i=e.inflate(t.fragment.getBytes());t.fragment=Y.util.createBuffer(i),t.length=i.length,n=!0}catch{}return n},Rr=function(e,t){var r=0;switch(t){case 1:r=e.getByte();break;case 2:r=e.getInt16();break;case 3:r=e.getInt24();break;case 4:r=e.getInt32();break}return Y.util.createBuffer(e.getBytes(r))},Kr=function(e,t,r){e.putInt(r.length(),t<<3),e.putBuffer(r)},M={};M.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}};M.SupportedVersions=[M.Versions.TLS_1_1,M.Versions.TLS_1_0];M.Version=M.SupportedVersions[0];M.MaxFragment=15360;M.ConnectionEnd={server:0,client:1};M.PRFAlgorithm={tls_prf_sha256:0};M.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};M.CipherType={stream:0,block:1,aead:2};M.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};M.CompressionMethod={none:0,deflate:1};M.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24};M.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};M.Alert={};M.Alert.Level={warning:1,fatal:2};M.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};M.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};M.CipherSuites={};M.getCipherSuite=function(e){var t=null;for(var r in M.CipherSuites){var n=M.CipherSuites[r];if(n.id[0]===e.charCodeAt(0)&&n.id[1]===e.charCodeAt(1)){t=n;break}}return t};M.handleUnexpected=function(e,t){var r=!e.open&&e.entity===M.ConnectionEnd.client;r||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.unexpected_message}})};M.handleHelloRequest=function(e,t,r){!e.handshaking&&e.handshakes>0&&(M.queue(e,M.createAlert(e,{level:M.Alert.Level.warning,description:M.Alert.Description.no_renegotiation})),M.flush(e)),e.process()};M.parseHelloMessage=function(e,t,r){var n=null,i=e.entity===M.ConnectionEnd.client;if(r<38)e.error(e,{message:i?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.illegal_parameter}});else{var s=t.fragment,o=s.length();if(n={version:{major:s.getByte(),minor:s.getByte()},random:Y.util.createBuffer(s.getBytes(32)),session_id:Rr(s,1),extensions:[]},i?(n.cipher_suite=s.getBytes(2),n.compression_method=s.getByte()):(n.cipher_suites=Rr(s,2),n.compression_methods=Rr(s,1)),o=r-(o-s.length()),o>0){for(var a=Rr(s,2);a.length()>0;)n.extensions.push({type:[a.getByte(),a.getByte()],data:Rr(a,2)});if(!i)for(var l=0;l<n.extensions.length;++l){var u=n.extensions[l];if(u.type[0]===0&&u.type[1]===0)for(var c=Rr(u.data,2);c.length()>0;){var f=c.getByte();if(f!==0)break;e.session.extensions.server_name.serverNameList.push(Rr(c,2).getBytes())}}}if(e.session.version&&(n.version.major!==e.session.version.major||n.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.protocol_version}});if(i)e.session.cipherSuite=M.getCipherSuite(n.cipher_suite);else for(var h=Y.util.createBuffer(n.cipher_suites.bytes());h.length()>0&&(e.session.cipherSuite=M.getCipherSuite(h.getBytes(2)),e.session.cipherSuite===null););if(e.session.cipherSuite===null)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.handshake_failure},cipherSuite:Y.util.bytesToHex(n.cipher_suite)});i?e.session.compressionMethod=n.compression_method:e.session.compressionMethod=M.CompressionMethod.none}return n};M.createSecurityParameters=function(e,t){var r=e.entity===M.ConnectionEnd.client,n=t.random.bytes(),i=r?e.session.sp.client_random:n,s=r?n:M.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:M.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:s}};M.handleServerHello=function(e,t,r){var n=M.parseHelloMessage(e,t,r);if(!e.fail){if(n.version.minor<=e.version.minor)e.version.minor=n.version.minor;else return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.protocol_version}});e.session.version=e.version;var i=n.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=Rw,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=m4,e.session.resuming=!1,M.createSecurityParameters(e,n)),e.session.id=i,e.process()}};M.handleClientHello=function(e,t,r){var n=M.parseHelloMessage(e,t,r);if(!e.fail){var i=n.session_id.bytes(),s=null;if(e.sessionCache&&(s=e.sessionCache.getSession(i),s===null?i="":(s.version.major!==n.version.major||s.version.minor>n.version.minor)&&(s=null,i="")),i.length===0&&(i=Y.random.getBytes(32)),e.session.id=i,e.session.clientHelloVersion=n.version,e.session.sp={},s)e.version=e.session.version=s.version,e.session.sp=s.sp;else{for(var o,a=1;a<M.SupportedVersions.length&&(o=M.SupportedVersions[a],!(o.minor<=n.version.minor));++a);e.version={major:o.major,minor:o.minor},e.session.version=e.version}s!==null?(e.expect=O0,e.session.resuming=!0,e.session.sp.client_random=n.random.bytes()):(e.expect=e.verifyClient!==!1?S4:L0,e.session.resuming=!1,M.createSecurityParameters(e,n)),e.open=!0,M.queue(e,M.createRecord(e,{type:M.ContentType.handshake,data:M.createServerHello(e)})),e.session.resuming?(M.queue(e,M.createRecord(e,{type:M.ContentType.change_cipher_spec,data:M.createChangeCipherSpec()})),e.state.pending=M.createConnectionState(e),e.state.current.write=e.state.pending.write,M.queue(e,M.createRecord(e,{type:M.ContentType.handshake,data:M.createFinished(e)}))):(M.queue(e,M.createRecord(e,{type:M.ContentType.handshake,data:M.createCertificate(e)})),e.fail||(M.queue(e,M.createRecord(e,{type:M.ContentType.handshake,data:M.createServerKeyExchange(e)})),e.verifyClient!==!1&&M.queue(e,M.createRecord(e,{type:M.ContentType.handshake,data:M.createCertificateRequest(e)})),M.queue(e,M.createRecord(e,{type:M.ContentType.handshake,data:M.createServerHelloDone(e)})))),M.flush(e),e.process()}};M.handleCertificate=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.illegal_parameter}});var n=t.fragment,i={certificate_list:Rr(n,3)},s,o,a=[];try{for(;i.certificate_list.length()>0;)s=Rr(i.certificate_list,3),o=Y.asn1.fromDer(s),s=Y.pki.certificateFromAsn1(o,!0),a.push(s)}catch(u){return e.error(e,{message:"Could not parse certificate list.",cause:u,send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.bad_certificate}})}var l=e.entity===M.ConnectionEnd.client;(l||e.verifyClient===!0)&&a.length===0?e.error(e,{message:l?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.illegal_parameter}}):a.length===0?e.expect=l?Pw:L0:(l?e.session.serverCertificate=a[0]:e.session.clientCertificate=a[0],M.verifyCertificateChain(e,a)&&(e.expect=l?Pw:L0)),e.process()};M.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.unsupported_certificate}});e.expect=g4,e.process()};M.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.unsupported_certificate}});var n=t.fragment,i={enc_pre_master_secret:Rr(n,2).getBytes()},s=null;if(e.getPrivateKey)try{s=e.getPrivateKey(e,e.session.serverCertificate),s=Y.pki.privateKeyFromPem(s)}catch(l){e.error(e,{message:"Could not get private key.",cause:l,send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.internal_error}})}if(s===null)return e.error(e,{message:"No private key set.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.internal_error}});try{var o=e.session.sp;o.pre_master_secret=s.decrypt(i.enc_pre_master_secret);var a=e.session.clientHelloVersion;if(a.major!==o.pre_master_secret.charCodeAt(0)||a.minor!==o.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{o.pre_master_secret=Y.random.getBytes(48)}e.expect=O0,e.session.clientCertificate!==null&&(e.expect=x4),e.process()};M.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.illegal_parameter}});var n=t.fragment,i={certificate_types:Rr(n,1),certificate_authorities:Rr(n,2)};e.session.certificateRequest=i,e.expect=v4,e.process()};M.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.illegal_parameter}});var n=t.fragment;n.read-=4;var i=n.bytes();n.read+=4;var s={signature:Rr(n,2).getBytes()},o=Y.util.createBuffer();o.putBuffer(e.session.md5.digest()),o.putBuffer(e.session.sha1.digest()),o=o.getBytes();try{var a=e.session.clientCertificate;if(!a.publicKey.verify(o,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(i),e.session.sha1.update(i)}catch{return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.handshake_failure}})}e.expect=O0,e.process()};M.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.record_overflow}});if(e.serverCertificate===null){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.insufficient_security}},i=0,s=e.verify(e,n.alert.description,i,[]);if(s!==!0)return(s||s===0)&&(typeof s=="object"&&!Y.util.isArray(s)?(s.message&&(n.message=s.message),s.alert&&(n.alert.description=s.alert)):typeof s=="number"&&(n.alert.description=s)),e.error(e,n)}e.session.certificateRequest!==null&&(t=M.createRecord(e,{type:M.ContentType.handshake,data:M.createCertificate(e)}),M.queue(e,t)),t=M.createRecord(e,{type:M.ContentType.handshake,data:M.createClientKeyExchange(e)}),M.queue(e,t),e.expect=E4;var o=function(a,l){a.session.certificateRequest!==null&&a.session.clientCertificate!==null&&M.queue(a,M.createRecord(a,{type:M.ContentType.handshake,data:M.createCertificateVerify(a,l)})),M.queue(a,M.createRecord(a,{type:M.ContentType.change_cipher_spec,data:M.createChangeCipherSpec()})),a.state.pending=M.createConnectionState(a),a.state.current.write=a.state.pending.write,M.queue(a,M.createRecord(a,{type:M.ContentType.handshake,data:M.createFinished(a)})),a.expect=Rw,M.flush(a),a.process()};if(e.session.certificateRequest===null||e.session.clientCertificate===null)return o(e,null);M.getClientSignature(e,o)};M.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.illegal_parameter}});var r=e.entity===M.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=M.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&r||e.session.resuming&&!r)&&(e.state.pending=null),e.expect=r?y4:I4,e.process()};M.handleFinished=function(e,t,r){var n=t.fragment;n.read-=4;var i=n.bytes();n.read+=4;var s=t.fragment.getBytes();n=Y.util.createBuffer(),n.putBuffer(e.session.md5.digest()),n.putBuffer(e.session.sha1.digest());var o=e.entity===M.ConnectionEnd.client,a=o?"server finished":"client finished",l=e.session.sp,u=12,c=nh;if(n=c(l.master_secret,a,n.getBytes(),u),n.getBytes()!==s)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.decrypt_error}});e.session.md5.update(i),e.session.sha1.update(i),(e.session.resuming&&o||!e.session.resuming&&!o)&&(M.queue(e,M.createRecord(e,{type:M.ContentType.change_cipher_spec,data:M.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,M.queue(e,M.createRecord(e,{type:M.ContentType.handshake,data:M.createFinished(e)}))),e.expect=o?C4:w4,e.handshaking=!1,++e.handshakes,e.peerCertificate=o?e.session.serverCertificate:e.session.clientCertificate,M.flush(e),e.isConnected=!0,e.connected(e),e.process()};M.handleAlert=function(e,t){var r=t.fragment,n={level:r.getByte(),description:r.getByte()},i;switch(n.description){case M.Alert.Description.close_notify:i="Connection closed.";break;case M.Alert.Description.unexpected_message:i="Unexpected message.";break;case M.Alert.Description.bad_record_mac:i="Bad record MAC.";break;case M.Alert.Description.decryption_failed:i="Decryption failed.";break;case M.Alert.Description.record_overflow:i="Record overflow.";break;case M.Alert.Description.decompression_failure:i="Decompression failed.";break;case M.Alert.Description.handshake_failure:i="Handshake failure.";break;case M.Alert.Description.bad_certificate:i="Bad certificate.";break;case M.Alert.Description.unsupported_certificate:i="Unsupported certificate.";break;case M.Alert.Description.certificate_revoked:i="Certificate revoked.";break;case M.Alert.Description.certificate_expired:i="Certificate expired.";break;case M.Alert.Description.certificate_unknown:i="Certificate unknown.";break;case M.Alert.Description.illegal_parameter:i="Illegal parameter.";break;case M.Alert.Description.unknown_ca:i="Unknown certificate authority.";break;case M.Alert.Description.access_denied:i="Access denied.";break;case M.Alert.Description.decode_error:i="Decode error.";break;case M.Alert.Description.decrypt_error:i="Decrypt error.";break;case M.Alert.Description.export_restriction:i="Export restriction.";break;case M.Alert.Description.protocol_version:i="Unsupported protocol version.";break;case M.Alert.Description.insufficient_security:i="Insufficient security.";break;case M.Alert.Description.internal_error:i="Internal error.";break;case M.Alert.Description.user_canceled:i="User canceled.";break;case M.Alert.Description.no_renegotiation:i="Renegotiation not supported.";break;default:i="Unknown error.";break}if(n.description===M.Alert.Description.close_notify)return e.close();e.error(e,{message:i,send:!1,origin:e.entity===M.ConnectionEnd.client?"server":"client",alert:n}),e.process()};M.handleHandshake=function(e,t){var r=t.fragment,n=r.getByte(),i=r.getInt24();if(i>r.length())return e.fragmented=t,t.fragment=Y.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var s=r.bytes(i+4);r.read+=4,n in rh[e.entity][e.expect]?(e.entity===M.ConnectionEnd.server&&!e.open&&!e.fail&&(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:Y.md.md5.create(),sha1:Y.md.sha1.create()}),n!==M.HandshakeType.hello_request&&n!==M.HandshakeType.certificate_verify&&n!==M.HandshakeType.finished&&(e.session.md5.update(s),e.session.sha1.update(s)),rh[e.entity][e.expect][n](e,t,i)):M.handleUnexpected(e,t)};M.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()};M.handleHeartbeat=function(e,t){var r=t.fragment,n=r.getByte(),i=r.getInt16(),s=r.getBytes(i);if(n===M.HeartbeatMessageType.heartbeat_request){if(e.handshaking||i>s.length)return e.process();M.queue(e,M.createRecord(e,{type:M.ContentType.heartbeat,data:M.createHeartbeat(M.HeartbeatMessageType.heartbeat_response,s)})),M.flush(e)}else if(n===M.HeartbeatMessageType.heartbeat_response){if(s!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,Y.util.createBuffer(s))}e.process()};var p4=0,m4=1,Pw=2,g4=3,v4=4,Rw=5,y4=6,C4=7,E4=8,b4=0,S4=1,L0=2,x4=3,O0=4,I4=5,w4=6,A=M.handleUnexpected,kw=M.handleChangeCipherSpec,nr=M.handleAlert,mr=M.handleHandshake,Fw=M.handleApplicationData,ir=M.handleHeartbeat,B0=[];B0[M.ConnectionEnd.client]=[[A,nr,mr,A,ir],[A,nr,mr,A,ir],[A,nr,mr,A,ir],[A,nr,mr,A,ir],[A,nr,mr,A,ir],[kw,nr,A,A,ir],[A,nr,mr,A,ir],[A,nr,mr,Fw,ir],[A,nr,mr,A,ir]];B0[M.ConnectionEnd.server]=[[A,nr,mr,A,ir],[A,nr,mr,A,ir],[A,nr,mr,A,ir],[A,nr,mr,A,ir],[kw,nr,A,A,ir],[A,nr,mr,A,ir],[A,nr,mr,Fw,ir],[A,nr,mr,A,ir]];var $i=M.handleHelloRequest,T4=M.handleServerHello,Lw=M.handleCertificate,Nw=M.handleServerKeyExchange,k0=M.handleCertificateRequest,eh=M.handleServerHelloDone,Ow=M.handleFinished,rh=[];rh[M.ConnectionEnd.client]=[[A,A,T4,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[$i,A,A,A,A,A,A,A,A,A,A,Lw,Nw,k0,eh,A,A,A,A,A,A],[$i,A,A,A,A,A,A,A,A,A,A,A,Nw,k0,eh,A,A,A,A,A,A],[$i,A,A,A,A,A,A,A,A,A,A,A,A,k0,eh,A,A,A,A,A,A],[$i,A,A,A,A,A,A,A,A,A,A,A,A,A,eh,A,A,A,A,A,A],[$i,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[$i,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,Ow],[$i,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[$i,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A]];var _4=M.handleClientHello,D4=M.handleClientKeyExchange,A4=M.handleCertificateVerify;rh[M.ConnectionEnd.server]=[[A,_4,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,Lw,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,D4,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A4,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,Ow],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A]];M.generateKeys=function(e,t){var r=nh,n=t.client_random+t.server_random;e.session.resuming||(t.master_secret=r(t.pre_master_secret,"master secret",n,48).bytes(),t.pre_master_secret=null),n=t.server_random+t.client_random;var i=2*t.mac_key_length+2*t.enc_key_length,s=e.version.major===M.Versions.TLS_1_0.major&&e.version.minor===M.Versions.TLS_1_0.minor;s&&(i+=2*t.fixed_iv_length);var o=r(t.master_secret,"key expansion",n,i),a={client_write_MAC_key:o.getBytes(t.mac_key_length),server_write_MAC_key:o.getBytes(t.mac_key_length),client_write_key:o.getBytes(t.enc_key_length),server_write_key:o.getBytes(t.enc_key_length)};return s&&(a.client_write_IV=o.getBytes(t.fixed_iv_length),a.server_write_IV=o.getBytes(t.fixed_iv_length)),a};M.createConnectionState=function(e){var t=e.entity===M.ConnectionEnd.client,r=function(){var s={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(o){return!0},compressionState:null,compressFunction:function(o){return!0},updateSequenceNumber:function(){s.sequenceNumber[1]===4294967295?(s.sequenceNumber[1]=0,++s.sequenceNumber[0]):++s.sequenceNumber[1]}};return s},n={read:r(),write:r()};if(n.read.update=function(s,o){return n.read.cipherFunction(o,n.read)?n.read.compressFunction(s,o,n.read)||s.error(s,{message:"Could not decompress record.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.decompression_failure}}):s.error(s,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.bad_record_mac}}),!s.fail},n.write.update=function(s,o){return n.write.compressFunction(s,o,n.write)?n.write.cipherFunction(o,n.write)||s.error(s,{message:"Could not encrypt record.",send:!1,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.internal_error}}):s.error(s,{message:"Could not compress record.",send:!1,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.internal_error}}),!s.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=M.generateKeys(e,i),n.read.macKey=t?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,n.write.macKey=t?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(n,e,i),i.compression_algorithm){case M.CompressionMethod.none:break;case M.CompressionMethod.deflate:n.read.compressFunction=d4,n.write.compressFunction=h4;break;default:throw new Error("Unsupported compression algorithm.")}}return n};M.createRandom=function(){var e=new Date,t=+e+e.getTimezoneOffset()*6e4,r=Y.util.createBuffer();return r.putInt32(t),r.putBytes(Y.random.getBytes(28)),r};M.createRecord=function(e,t){if(!t.data)return null;var r={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return r};M.createAlert=function(e,t){var r=Y.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),M.createRecord(e,{type:M.ContentType.alert,data:r})};M.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=Y.util.createBuffer(),r=0;r<e.cipherSuites.length;++r){var n=e.cipherSuites[r];t.putByte(n.id[0]),t.putByte(n.id[1])}var i=t.length(),s=Y.util.createBuffer();s.putByte(M.CompressionMethod.none);var o=s.length(),a=Y.util.createBuffer();if(e.virtualHost){var l=Y.util.createBuffer();l.putByte(0),l.putByte(0);var u=Y.util.createBuffer();u.putByte(0),Kr(u,2,Y.util.createBuffer(e.virtualHost));var c=Y.util.createBuffer();Kr(c,2,u),Kr(l,2,c),a.putBuffer(l)}var f=a.length();f>0&&(f+=2);var h=e.session.id,p=h.length+1+2+4+28+2+i+1+o+f,d=Y.util.createBuffer();return d.putByte(M.HandshakeType.client_hello),d.putInt24(p),d.putByte(e.version.major),d.putByte(e.version.minor),d.putBytes(e.session.sp.client_random),Kr(d,1,Y.util.createBuffer(h)),Kr(d,2,t),Kr(d,1,s),f>0&&Kr(d,2,a),d};M.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,n=Y.util.createBuffer();return n.putByte(M.HandshakeType.server_hello),n.putInt24(r),n.putByte(e.version.major),n.putByte(e.version.minor),n.putBytes(e.session.sp.server_random),Kr(n,1,Y.util.createBuffer(t)),n.putByte(e.session.cipherSuite.id[0]),n.putByte(e.session.cipherSuite.id[1]),n.putByte(e.session.compressionMethod),n};M.createCertificate=function(e){var t=e.entity===M.ConnectionEnd.client,r=null;if(e.getCertificate){var n;t?n=e.session.certificateRequest:n=e.session.extensions.server_name.serverNameList,r=e.getCertificate(e,n)}var i=Y.util.createBuffer();if(r!==null)try{Y.util.isArray(r)||(r=[r]);for(var s=null,o=0;o<r.length;++o){var a=Y.pem.decode(r[o])[0];if(a.type!=="CERTIFICATE"&&a.type!=="X509 CERTIFICATE"&&a.type!=="TRUSTED CERTIFICATE"){var l=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw l.headerType=a.type,l}if(a.procType&&a.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=Y.util.createBuffer(a.body);s===null&&(s=Y.asn1.fromDer(u.bytes(),!1));var c=Y.util.createBuffer();Kr(c,3,u),i.putBuffer(c)}r=Y.pki.certificateFromAsn1(s),t?e.session.clientCertificate=r:e.session.serverCertificate=r}catch(p){return e.error(e,{message:"Could not send certificate list.",cause:p,send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.bad_certificate}})}var f=3+i.length(),h=Y.util.createBuffer();return h.putByte(M.HandshakeType.certificate),h.putInt24(f),Kr(h,3,i),h};M.createClientKeyExchange=function(e){var t=Y.util.createBuffer();t.putByte(e.session.clientHelloVersion.major),t.putByte(e.session.clientHelloVersion.minor),t.putBytes(Y.random.getBytes(46));var r=e.session.sp;r.pre_master_secret=t.getBytes();var n=e.session.serverCertificate.publicKey;t=n.encrypt(r.pre_master_secret);var i=t.length+2,s=Y.util.createBuffer();return s.putByte(M.HandshakeType.client_key_exchange),s.putInt24(i),s.putInt16(t.length),s.putBytes(t),s};M.createServerKeyExchange=function(e){var t=0,r=Y.util.createBuffer();return t>0&&(r.putByte(M.HandshakeType.server_key_exchange),r.putInt24(t)),r};M.getClientSignature=function(e,t){var r=Y.util.createBuffer();r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest()),r=r.getBytes(),e.getSignature=e.getSignature||function(n,i,s){var o=null;if(n.getPrivateKey)try{o=n.getPrivateKey(n,n.session.clientCertificate),o=Y.pki.privateKeyFromPem(o)}catch(a){n.error(n,{message:"Could not get private key.",cause:a,send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.internal_error}})}o===null?n.error(n,{message:"No private key set.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.internal_error}}):i=o.sign(i,null),s(n,i)},e.getSignature(e,r,t)};M.createCertificateVerify=function(e,t){var r=t.length+2,n=Y.util.createBuffer();return n.putByte(M.HandshakeType.certificate_verify),n.putInt24(r),n.putInt16(t.length),n.putBytes(t),n};M.createCertificateRequest=function(e){var t=Y.util.createBuffer();t.putByte(1);var r=Y.util.createBuffer();for(var n in e.caStore.certs){var i=e.caStore.certs[n],s=Y.pki.distinguishedNameToAsn1(i.subject),o=Y.asn1.toDer(s);r.putInt16(o.length()),r.putBuffer(o)}var a=1+t.length()+2+r.length(),l=Y.util.createBuffer();return l.putByte(M.HandshakeType.certificate_request),l.putInt24(a),Kr(l,1,t),Kr(l,2,r),l};M.createServerHelloDone=function(e){var t=Y.util.createBuffer();return t.putByte(M.HandshakeType.server_hello_done),t.putInt24(0),t};M.createChangeCipherSpec=function(){var e=Y.util.createBuffer();return e.putByte(1),e};M.createFinished=function(e){var t=Y.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var r=e.entity===M.ConnectionEnd.client,n=e.session.sp,i=12,s=nh,o=r?"client finished":"server finished";t=s(n.master_secret,o,t.getBytes(),i);var a=Y.util.createBuffer();return a.putByte(M.HandshakeType.finished),a.putInt24(t.length()),a.putBuffer(t),a};M.createHeartbeat=function(e,t,r){typeof r>"u"&&(r=t.length);var n=Y.util.createBuffer();n.putByte(e),n.putInt16(r),n.putBytes(t);var i=n.length(),s=Math.max(16,i-r-3);return n.putBytes(Y.random.getBytes(s)),n};M.queue=function(e,t){if(t&&!(t.fragment.length()===0&&(t.type===M.ContentType.handshake||t.type===M.ContentType.alert||t.type===M.ContentType.change_cipher_spec))){if(t.type===M.ContentType.handshake){var r=t.fragment.bytes();e.session.md5.update(r),e.session.sha1.update(r),r=null}var n;if(t.fragment.length()<=M.MaxFragment)n=[t];else{n=[];for(var i=t.fragment.bytes();i.length>M.MaxFragment;)n.push(M.createRecord(e,{type:t.type,data:Y.util.createBuffer(i.slice(0,M.MaxFragment))})),i=i.slice(M.MaxFragment);i.length>0&&n.push(M.createRecord(e,{type:t.type,data:Y.util.createBuffer(i)}))}for(var s=0;s<n.length&&!e.fail;++s){var o=n[s],a=e.state.current.write;a.update(e,o)&&e.records.push(o)}}};M.flush=function(e){for(var t=0;t<e.records.length;++t){var r=e.records[t];e.tlsData.putByte(r.type),e.tlsData.putByte(r.version.major),e.tlsData.putByte(r.version.minor),e.tlsData.putInt16(r.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)};var F0=function(e){switch(e){case!0:return!0;case Y.pki.certificateError.bad_certificate:return M.Alert.Description.bad_certificate;case Y.pki.certificateError.unsupported_certificate:return M.Alert.Description.unsupported_certificate;case Y.pki.certificateError.certificate_revoked:return M.Alert.Description.certificate_revoked;case Y.pki.certificateError.certificate_expired:return M.Alert.Description.certificate_expired;case Y.pki.certificateError.certificate_unknown:return M.Alert.Description.certificate_unknown;case Y.pki.certificateError.unknown_ca:return M.Alert.Description.unknown_ca;default:return M.Alert.Description.bad_certificate}},M4=function(e){switch(e){case!0:return!0;case M.Alert.Description.bad_certificate:return Y.pki.certificateError.bad_certificate;case M.Alert.Description.unsupported_certificate:return Y.pki.certificateError.unsupported_certificate;case M.Alert.Description.certificate_revoked:return Y.pki.certificateError.certificate_revoked;case M.Alert.Description.certificate_expired:return Y.pki.certificateError.certificate_expired;case M.Alert.Description.certificate_unknown:return Y.pki.certificateError.certificate_unknown;case M.Alert.Description.unknown_ca:return Y.pki.certificateError.unknown_ca;default:return Y.pki.certificateError.bad_certificate}};M.verifyCertificateChain=function(e,t){try{var r={};for(var n in e.verifyOptions)r[n]=e.verifyOptions[n];r.verify=function(s,o,a){var l=F0(s),u=e.verify(e,s,o,a);if(u!==!0){if(typeof u=="object"&&!Y.util.isArray(u)){var c=new Error("The application rejected the certificate.");throw c.send=!0,c.alert={level:M.Alert.Level.fatal,description:M.Alert.Description.bad_certificate},u.message&&(c.message=u.message),u.alert&&(c.alert.description=u.alert),c}u!==s&&(u=M4(u))}return u},Y.pki.verifyCertificateChain(e.caStore,t,r)}catch(s){var i=s;(typeof i!="object"||Y.util.isArray(i))&&(i={send:!0,alert:{level:M.Alert.Level.fatal,description:F0(s)}}),"send"in i||(i.send=!0),"alert"in i||(i.alert={level:M.Alert.Level.fatal,description:F0(i.error)}),e.error(e,i)}return!e.fail};M.createSessionCache=function(e,t){var r=null;if(e&&e.getSession&&e.setSession&&e.order)r=e;else{r={},r.cache=e||{},r.capacity=Math.max(t||100,1),r.order=[];for(var n in e)r.order.length<=t?r.order.push(n):delete e[n];r.getSession=function(i){var s=null,o=null;if(i?o=Y.util.bytesToHex(i):r.order.length>0&&(o=r.order[0]),o!==null&&o in r.cache){s=r.cache[o],delete r.cache[o];for(var a in r.order)if(r.order[a]===o){r.order.splice(a,1);break}}return s},r.setSession=function(i,s){if(r.order.length===r.capacity){var o=r.order.shift();delete r.cache[o]}var o=Y.util.bytesToHex(i);r.order.push(o),r.cache[o]=s}}return r};M.createConnection=function(e){var t=null;e.caStore?Y.util.isArray(e.caStore)?t=Y.pki.createCaStore(e.caStore):t=e.caStore:t=Y.pki.createCaStore();var r=e.cipherSuites||null;if(r===null){r=[];for(var n in M.CipherSuites)r.push(M.CipherSuites[n])}var i=e.server?M.ConnectionEnd.server:M.ConnectionEnd.client,s=e.sessionCache?M.createSessionCache(e.sessionCache):null,o={version:{major:M.Version.major,minor:M.Version.minor},entity:i,sessionId:e.sessionId,caStore:t,sessionCache:s,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(c,f,h,p){return f},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:Y.util.createBuffer(),tlsData:Y.util.createBuffer(),data:Y.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(c,f){f.origin=f.origin||(c.entity===M.ConnectionEnd.client?"client":"server"),f.send&&(M.queue(c,M.createAlert(c,f.alert)),M.flush(c));var h=f.fatal!==!1;h&&(c.fail=!0),e.error(c,f),h&&c.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null};o.reset=function(c){o.version={major:M.Version.major,minor:M.Version.minor},o.record=null,o.session=null,o.peerCertificate=null,o.state={pending:null,current:null},o.expect=o.entity===M.ConnectionEnd.client?p4:b4,o.fragmented=null,o.records=[],o.open=!1,o.handshakes=0,o.handshaking=!1,o.isConnected=!1,o.fail=!(c||typeof c>"u"),o.input.clear(),o.tlsData.clear(),o.data.clear(),o.state.current=M.createConnectionState(o)},o.reset();var a=function(c,f){var h=f.type-M.ContentType.change_cipher_spec,p=B0[c.entity][c.expect];h in p?p[h](c,f):M.handleUnexpected(c,f)},l=function(c){var f=0,h=c.input,p=h.length();if(p<5)f=5-p;else{c.record={type:h.getByte(),version:{major:h.getByte(),minor:h.getByte()},length:h.getInt16(),fragment:Y.util.createBuffer(),ready:!1};var d=c.record.version.major===c.version.major;d&&c.session&&c.session.version&&(d=c.record.version.minor===c.version.minor),d||c.error(c,{message:"Incompatible TLS version.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.protocol_version}})}return f},u=function(c){var f=0,h=c.input,p=h.length();if(p<c.record.length)f=c.record.length-p;else{c.record.fragment.putBytes(h.getBytes(c.record.length)),h.compact();var d=c.state.current.read;d.update(c,c.record)&&(c.fragmented!==null&&(c.fragmented.type===c.record.type?(c.fragmented.fragment.putBuffer(c.record.fragment),c.record=c.fragmented):c.error(c,{message:"Invalid fragmented record.",send:!0,alert:{level:M.Alert.Level.fatal,description:M.Alert.Description.unexpected_message}})),c.record.ready=!0)}return f};return o.handshake=function(c){if(o.entity!==M.ConnectionEnd.client)o.error(o,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(o.handshaking)o.error(o,{message:"Handshake already in progress.",fatal:!1});else{o.fail&&!o.open&&o.handshakes===0&&(o.fail=!1),o.handshaking=!0,c=c||"";var f=null;c.length>0&&(o.sessionCache&&(f=o.sessionCache.getSession(c)),f===null&&(c="")),c.length===0&&o.sessionCache&&(f=o.sessionCache.getSession(),f!==null&&(c=f.id)),o.session={id:c,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:Y.md.md5.create(),sha1:Y.md.sha1.create()},f&&(o.version=f.version,o.session.sp=f.sp),o.session.sp.client_random=M.createRandom().getBytes(),o.open=!0,M.queue(o,M.createRecord(o,{type:M.ContentType.handshake,data:M.createClientHello(o)})),M.flush(o)}},o.process=function(c){var f=0;return c&&o.input.putBytes(c),o.fail||(o.record!==null&&o.record.ready&&o.record.fragment.isEmpty()&&(o.record=null),o.record===null&&(f=l(o)),!o.fail&&o.record!==null&&!o.record.ready&&(f=u(o)),!o.fail&&o.record!==null&&o.record.ready&&a(o,o.record)),f},o.prepare=function(c){return M.queue(o,M.createRecord(o,{type:M.ContentType.application_data,data:Y.util.createBuffer(c)})),M.flush(o)},o.prepareHeartbeatRequest=function(c,f){return c instanceof Y.util.ByteBuffer&&(c=c.bytes()),typeof f>"u"&&(f=c.length),o.expectedHeartbeatPayload=c,M.queue(o,M.createRecord(o,{type:M.ContentType.heartbeat,data:M.createHeartbeat(M.HeartbeatMessageType.heartbeat_request,c,f)})),M.flush(o)},o.close=function(c){if(!o.fail&&o.sessionCache&&o.session){var f={id:o.session.id,version:o.session.version,sp:o.session.sp};f.sp.keys=null,o.sessionCache.setSession(f.id,f)}o.open&&(o.open=!1,o.input.clear(),(o.isConnected||o.handshaking)&&(o.isConnected=o.handshaking=!1,M.queue(o,M.createAlert(o,{level:M.Alert.Level.warning,description:M.Alert.Description.close_notify})),M.flush(o)),o.closed(o)),o.reset(c)},o};Bw.exports=Y.tls=Y.tls||{};for(th in M)typeof M[th]!="function"&&(Y.tls[th]=M[th]);var th;Y.tls.prf_tls1=nh;Y.tls.hmac_sha1=f4;Y.tls.createSessionCache=M.createSessionCache;Y.tls.createConnection=M.createConnection});var jw=ce((Q7,Uw)=>{"use strict";var Ki=qe();Ui();V0();var Wr=Uw.exports=Ki.tls;Wr.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Wr.BulkCipherAlgorithm.aes,e.cipher_type=Wr.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Wr.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:Vw};Wr.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Wr.BulkCipherAlgorithm.aes,e.cipher_type=Wr.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Wr.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:Vw};function Vw(e,t,r){var n=t.entity===Ki.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:Ki.cipher.createDecipher("AES-CBC",n?r.keys.server_write_key:r.keys.client_write_key),iv:n?r.keys.server_write_IV:r.keys.client_write_IV},e.write.cipherState={init:!1,cipher:Ki.cipher.createCipher("AES-CBC",n?r.keys.client_write_key:r.keys.server_write_key),iv:n?r.keys.client_write_IV:r.keys.server_write_IV},e.read.cipherFunction=k4,e.write.cipherFunction=P4,e.read.macLength=e.write.macLength=r.mac_length,e.read.macFunction=e.write.macFunction=Wr.hmac_sha1}function P4(e,t){var r=!1,n=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(n),t.updateSequenceNumber();var i;e.version.minor===Wr.Versions.TLS_1_0.minor?i=t.cipherState.init?null:t.cipherState.iv:i=Ki.random.getBytesSync(16),t.cipherState.init=!0;var s=t.cipherState.cipher;return s.start({iv:i}),e.version.minor>=Wr.Versions.TLS_1_1.minor&&s.output.putBytes(i),s.update(e.fragment),s.finish(N4)&&(e.fragment=s.output,e.length=e.fragment.length(),r=!0),r}function N4(e,t,r){if(!r){var n=e-t.length()%e;t.fillWithByte(n-1,n)}return!0}function R4(e,t,r){var n=!0;if(r){for(var i=t.length(),s=t.last(),o=i-1-s;o<i-1;++o)n=n&&t.at(o)==s;n&&t.truncate(s+1)}return n}function k4(e,t){var r=!1,n;e.version.minor===Wr.Versions.TLS_1_0.minor?n=t.cipherState.init?null:t.cipherState.iv:n=e.fragment.getBytes(16),t.cipherState.init=!0;var i=t.cipherState.cipher;i.start({iv:n}),i.update(e.fragment),r=i.finish(R4);var s=t.macLength,o=Ki.random.getBytesSync(s),a=i.output.length();a>=s?(e.fragment=i.output.getBytes(a-s),o=i.output.getBytes(s)):e.fragment=i.output.getBytes(),e.fragment=Ki.util.createBuffer(e.fragment),e.length=e.fragment.length();var l=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),r=F4(t.macKey,o,l)&&r,r}function F4(e,t,r){var n=Ki.hmac.create();return n.start("SHA1",e),n.update(t),t=n.digest().getBytes(),n.start(null,null),n.update(r),r=n.digest().getBytes(),t===r}});var H0=ce((Y7,zw)=>{"use strict";var At=qe();Pn();nt();var kl=zw.exports=At.sha512=At.sha512||{};At.md.sha512=At.md.algorithms.sha512=kl;var qw=At.sha384=At.sha512.sha384=At.sha512.sha384||{};qw.create=function(){return kl.create("SHA-384")};At.md.sha384=At.md.algorithms.sha384=qw;At.sha512.sha256=At.sha512.sha256||{create:function(){return kl.create("SHA-512/256")}};At.md["sha512/256"]=At.md.algorithms["sha512/256"]=At.sha512.sha256;At.sha512.sha224=At.sha512.sha224||{create:function(){return kl.create("SHA-512/224")}};At.md["sha512/224"]=At.md.algorithms["sha512/224"]=At.sha512.sha224;kl.create=function(e){if(Gw||L4(),typeof e>"u"&&(e="SHA-512"),!(e in Vs))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=Vs[e],r=null,n=At.util.createBuffer(),i=new Array(80),s=0;s<80;++s)i[s]=new Array(2);var o=64;switch(e){case"SHA-384":o=48;break;case"SHA-512/256":o=32;break;case"SHA-512/224":o=28;break}var a={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:o,messageLength:0,fullMessageLength:null,messageLengthSize:16};return a.start=function(){a.messageLength=0,a.fullMessageLength=a.messageLength128=[];for(var l=a.messageLengthSize/4,u=0;u<l;++u)a.fullMessageLength.push(0);n=At.util.createBuffer(),r=new Array(t.length);for(var u=0;u<t.length;++u)r[u]=t[u].slice(0);return a},a.start(),a.update=function(l,u){u==="utf8"&&(l=At.util.encodeUtf8(l));var c=l.length;a.messageLength+=c,c=[c/4294967296>>>0,c>>>0];for(var f=a.fullMessageLength.length-1;f>=0;--f)a.fullMessageLength[f]+=c[1],c[1]=c[0]+(a.fullMessageLength[f]/4294967296>>>0),a.fullMessageLength[f]=a.fullMessageLength[f]>>>0,c[0]=c[1]/4294967296>>>0;return n.putBytes(l),Hw(r,i,n),(n.read>2048||n.length()===0)&&n.compact(),a},a.digest=function(){var l=At.util.createBuffer();l.putBytes(n.bytes());var u=a.fullMessageLength[a.fullMessageLength.length-1]+a.messageLengthSize,c=u&a.blockLength-1;l.putBytes(U0.substr(0,a.blockLength-c));for(var f,h,p=a.fullMessageLength[0]*8,d=0;d<a.fullMessageLength.length-1;++d)f=a.fullMessageLength[d+1]*8,h=f/4294967296>>>0,p+=h,l.putInt32(p>>>0),p=f>>>0;l.putInt32(p);for(var m=new Array(r.length),d=0;d<r.length;++d)m[d]=r[d].slice(0);Hw(m,i,l);var b=At.util.createBuffer(),g;e==="SHA-512"?g=m.length:e==="SHA-384"?g=m.length-2:g=m.length-4;for(var d=0;d<g;++d)b.putInt32(m[d][0]),(d!==g-1||e!=="SHA-512/224")&&b.putInt32(m[d][1]);return b},a};var U0=null,Gw=!1,j0=null,Vs=null;function L4(){U0="\x80",U0+=At.util.fillString("\0",128),j0=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],Vs={},Vs["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],Vs["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],Vs["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],Vs["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],Gw=!0}function Hw(e,t,r){for(var n,i,s,o,a,l,u,c,f,h,p,d,m,b,g,C,y,E,I,T,R,F,q,Z,W,z,ee,se,G,P,k,w,D,j,B,J=r.length();J>=128;){for(G=0;G<16;++G)t[G][0]=r.getInt32()>>>0,t[G][1]=r.getInt32()>>>0;for(;G<80;++G)w=t[G-2],P=w[0],k=w[1],n=((P>>>19|k<<13)^(k>>>29|P<<3)^P>>>6)>>>0,i=((P<<13|k>>>19)^(k<<3|P>>>29)^(P<<26|k>>>6))>>>0,j=t[G-15],P=j[0],k=j[1],s=((P>>>1|k<<31)^(P>>>8|k<<24)^P>>>7)>>>0,o=((P<<31|k>>>1)^(P<<24|k>>>8)^(P<<25|k>>>7))>>>0,D=t[G-7],B=t[G-16],k=i+D[1]+o+B[1],t[G][0]=n+D[0]+s+B[0]+(k/4294967296>>>0)>>>0,t[G][1]=k>>>0;for(m=e[0][0],b=e[0][1],g=e[1][0],C=e[1][1],y=e[2][0],E=e[2][1],I=e[3][0],T=e[3][1],R=e[4][0],F=e[4][1],q=e[5][0],Z=e[5][1],W=e[6][0],z=e[6][1],ee=e[7][0],se=e[7][1],G=0;G<80;++G)u=((R>>>14|F<<18)^(R>>>18|F<<14)^(F>>>9|R<<23))>>>0,c=((R<<18|F>>>14)^(R<<14|F>>>18)^(F<<23|R>>>9))>>>0,f=(W^R&(q^W))>>>0,h=(z^F&(Z^z))>>>0,a=((m>>>28|b<<4)^(b>>>2|m<<30)^(b>>>7|m<<25))>>>0,l=((m<<4|b>>>28)^(b<<30|m>>>2)^(b<<25|m>>>7))>>>0,p=(m&g|y&(m^g))>>>0,d=(b&C|E&(b^C))>>>0,k=se+c+h+j0[G][1]+t[G][1],n=ee+u+f+j0[G][0]+t[G][0]+(k/4294967296>>>0)>>>0,i=k>>>0,k=l+d,s=a+p+(k/4294967296>>>0)>>>0,o=k>>>0,ee=W,se=z,W=q,z=Z,q=R,Z=F,k=T+i,R=I+n+(k/4294967296>>>0)>>>0,F=k>>>0,I=y,T=E,y=g,E=C,g=m,C=b,k=i+o,m=n+s+(k/4294967296>>>0)>>>0,b=k>>>0;k=e[0][1]+b,e[0][0]=e[0][0]+m+(k/4294967296>>>0)>>>0,e[0][1]=k>>>0,k=e[1][1]+C,e[1][0]=e[1][0]+g+(k/4294967296>>>0)>>>0,e[1][1]=k>>>0,k=e[2][1]+E,e[2][0]=e[2][0]+y+(k/4294967296>>>0)>>>0,e[2][1]=k>>>0,k=e[3][1]+T,e[3][0]=e[3][0]+I+(k/4294967296>>>0)>>>0,e[3][1]=k>>>0,k=e[4][1]+F,e[4][0]=e[4][0]+R+(k/4294967296>>>0)>>>0,e[4][1]=k>>>0,k=e[5][1]+Z,e[5][0]=e[5][0]+q+(k/4294967296>>>0)>>>0,e[5][1]=k>>>0,k=e[6][1]+z,e[6][0]=e[6][0]+W+(k/4294967296>>>0)>>>0,e[6][1]=k>>>0,k=e[7][1]+se,e[7][0]=e[7][0]+ee+(k/4294967296>>>0)>>>0,e[7][1]=k>>>0,J-=128}}});var $w=ce(q0=>{"use strict";var O4=qe();hn();var Zt=O4.asn1;q0.privateKeyValidator={name:"PrivateKeyInfo",tagClass:Zt.Class.UNIVERSAL,type:Zt.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Zt.Class.UNIVERSAL,type:Zt.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Zt.Class.UNIVERSAL,type:Zt.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Zt.Class.UNIVERSAL,type:Zt.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Zt.Class.UNIVERSAL,type:Zt.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};q0.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Zt.Class.UNIVERSAL,type:Zt.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Zt.Class.UNIVERSAL,type:Zt.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Zt.Class.UNIVERSAL,type:Zt.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:Zt.Class.UNIVERSAL,type:Zt.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var sT=ce((X7,iT)=>{"use strict";var sr=qe();Ml();qr();H0();nt();var Xw=$w(),B4=Xw.publicKeyValidator,V4=Xw.privateKeyValidator;typeof Kw>"u"&&(Kw=sr.jsbn.BigInteger);var Kw,$0=sr.util.ByteBuffer,Ir=typeof Buffer>"u"?Uint8Array:Buffer;sr.pki=sr.pki||{};iT.exports=sr.pki.ed25519=sr.ed25519=sr.ed25519||{};var Ze=sr.ed25519;Ze.constants={};Ze.constants.PUBLIC_KEY_BYTE_LENGTH=32;Ze.constants.PRIVATE_KEY_BYTE_LENGTH=64;Ze.constants.SEED_BYTE_LENGTH=32;Ze.constants.SIGN_BYTE_LENGTH=64;Ze.constants.HASH_BYTE_LENGTH=64;Ze.generateKeyPair=function(e){e=e||{};var t=e.seed;if(t===void 0)t=sr.random.getBytesSync(Ze.constants.SEED_BYTE_LENGTH);else if(typeof t=="string"){if(t.length!==Ze.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+Ze.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=fi({message:t,encoding:"binary"});for(var r=new Ir(Ze.constants.PUBLIC_KEY_BYTE_LENGTH),n=new Ir(Ze.constants.PRIVATE_KEY_BYTE_LENGTH),i=0;i<32;++i)n[i]=t[i];return q4(r,n),{publicKey:r,privateKey:n}};Ze.privateKeyFromAsn1=function(e){var t={},r=[],n=sr.asn1.validate(e,V4,t,r);if(!n){var i=new Error("Invalid Key.");throw i.errors=r,i}var s=sr.asn1.derToOid(t.privateKeyOid),o=sr.oids.EdDSA25519;if(s!==o)throw new Error('Invalid OID "'+s+'"; OID must be "'+o+'".');var a=t.privateKey,l=fi({message:sr.asn1.fromDer(a).value,encoding:"binary"});return{privateKeyBytes:l}};Ze.publicKeyFromAsn1=function(e){var t={},r=[],n=sr.asn1.validate(e,B4,t,r);if(!n){var i=new Error("Invalid Key.");throw i.errors=r,i}var s=sr.asn1.derToOid(t.publicKeyOid),o=sr.oids.EdDSA25519;if(s!==o)throw new Error('Invalid OID "'+s+'"; OID must be "'+o+'".');var a=t.ed25519PublicKey;if(a.length!==Ze.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return fi({message:a,encoding:"binary"})};Ze.publicKeyFromPrivateKey=function(e){e=e||{};var t=fi({message:e.privateKey,encoding:"binary"});if(t.length!==Ze.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Ze.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new Ir(Ze.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n<r.length;++n)r[n]=t[32+n];return r};Ze.sign=function(e){e=e||{};var t=fi(e),r=fi({message:e.privateKey,encoding:"binary"});if(r.length===Ze.constants.SEED_BYTE_LENGTH){var n=Ze.generateKeyPair({seed:r});r=n.privateKey}else if(r.length!==Ze.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Ze.constants.SEED_BYTE_LENGTH+" or "+Ze.constants.PRIVATE_KEY_BYTE_LENGTH);var i=new Ir(Ze.constants.SIGN_BYTE_LENGTH+t.length);G4(i,t,t.length,r);for(var s=new Ir(Ze.constants.SIGN_BYTE_LENGTH),o=0;o<s.length;++o)s[o]=i[o];return s};Ze.verify=function(e){e=e||{};var t=fi(e);if(e.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var r=fi({message:e.signature,encoding:"binary"});if(r.length!==Ze.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+Ze.constants.SIGN_BYTE_LENGTH);var n=fi({message:e.publicKey,encoding:"binary"});if(n.length!==Ze.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+Ze.constants.PUBLIC_KEY_BYTE_LENGTH);var i=new Ir(Ze.constants.SIGN_BYTE_LENGTH+t.length),s=new Ir(Ze.constants.SIGN_BYTE_LENGTH+t.length),o;for(o=0;o<Ze.constants.SIGN_BYTE_LENGTH;++o)i[o]=r[o];for(o=0;o<t.length;++o)i[o+Ze.constants.SIGN_BYTE_LENGTH]=t[o];return z4(s,i,i.length,n)>=0};function fi(e){var t=e.message;if(t instanceof Uint8Array||t instanceof Ir)return t;var r=e.encoding;if(t===void 0)if(e.md)t=e.md.digest().getBytes(),r="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof t=="string"&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.from(t,r);t=new $0(t,r)}else if(!(t instanceof $0))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var n=new Ir(t.length()),i=0;i<n.length;++i)n[i]=t.at(i);return n}var K0=Me(),ih=Me([1]),U4=Me([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),j4=Me([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),Ww=Me([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),Qw=Me([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),G0=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),H4=Me([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function Fl(e,t){var r=sr.md.sha512.create(),n=new $0(e);r.update(n.getBytes(t),"binary");var i=r.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(i,"binary");for(var s=new Ir(Ze.constants.HASH_BYTE_LENGTH),o=0;o<64;++o)s[o]=i.charCodeAt(o);return s}function q4(e,t){var r=[Me(),Me(),Me(),Me()],n,i=Fl(t,32);for(i[0]&=248,i[31]&=127,i[31]|=64,Z0(r,i),Y0(e,r),n=0;n<32;++n)t[n+32]=e[n];return 0}function G4(e,t,r,n){var i,s,o=new Float64Array(64),a=[Me(),Me(),Me(),Me()],l=Fl(n,32);l[0]&=248,l[31]&=127,l[31]|=64;var u=r+64;for(i=0;i<r;++i)e[64+i]=t[i];for(i=0;i<32;++i)e[32+i]=l[32+i];var c=Fl(e.subarray(32),r+32);for(W0(c),Z0(a,c),Y0(e,a),i=32;i<64;++i)e[i]=n[i];var f=Fl(e,r+64);for(W0(f),i=32;i<64;++i)o[i]=0;for(i=0;i<32;++i)o[i]=c[i];for(i=0;i<32;++i)for(s=0;s<32;s++)o[i+s]+=f[i]*l[s];return Jw(e.subarray(32),o),u}function z4(e,t,r,n){var i,s,o=new Ir(32),a=[Me(),Me(),Me(),Me()],l=[Me(),Me(),Me(),Me()];if(s=-1,r<64||$4(l,n))return-1;for(i=0;i<r;++i)e[i]=t[i];for(i=0;i<32;++i)e[i+32]=n[i];var u=Fl(e,r);if(W0(u),rT(a,l,u),Z0(l,t.subarray(32)),Q0(a,l),Y0(o,a),r-=64,eT(t,0,o,0)){for(i=0;i<r;++i)e[i]=0;return-1}for(i=0;i<r;++i)e[i]=t[i+64];return s=r,s}function Jw(e,t){var r,n,i,s;for(n=63;n>=32;--n){for(r=0,i=n-32,s=n-12;i<s;++i)t[i]+=r-16*t[n]*G0[i-(n-32)],r=t[i]+128>>8,t[i]-=r*256;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;++i)t[i]+=r-(t[31]>>4)*G0[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=r*G0[i];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=t[n]&255}function W0(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;Jw(e,t)}function Q0(e,t){var r=Me(),n=Me(),i=Me(),s=Me(),o=Me(),a=Me(),l=Me(),u=Me(),c=Me();ua(r,e[1],e[0]),ua(c,t[1],t[0]),St(r,r,c),la(n,e[0],e[1]),la(c,t[0],t[1]),St(n,n,c),St(i,e[3],t[3]),St(i,i,j4),St(s,e[2],t[2]),la(s,s,s),ua(o,n,r),ua(a,s,i),la(l,s,i),la(u,n,r),St(e[0],o,a),St(e[1],u,l),St(e[2],l,a),St(e[3],o,u)}function Yw(e,t,r){for(var n=0;n<4;++n)nT(e[n],t[n],r)}function Y0(e,t){var r=Me(),n=Me(),i=Me();Y4(i,t[2]),St(r,t[0],i),St(n,t[1],i),sh(e,n),e[31]^=tT(r)<<7}function sh(e,t){var r,n,i,s=Me(),o=Me();for(r=0;r<16;++r)o[r]=t[r];for(z0(o),z0(o),z0(o),n=0;n<2;++n){for(s[0]=o[0]-65517,r=1;r<15;++r)s[r]=o[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=o[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,nT(o,s,1-i)}for(r=0;r<16;r++)e[2*r]=o[r]&255,e[2*r+1]=o[r]>>8}function $4(e,t){var r=Me(),n=Me(),i=Me(),s=Me(),o=Me(),a=Me(),l=Me();return Wi(e[2],ih),K4(e[1],t),Us(i,e[1]),St(s,i,U4),ua(i,i,e[2]),la(s,e[2],s),Us(o,s),Us(a,o),St(l,a,o),St(r,l,i),St(r,r,s),W4(r,r),St(r,r,i),St(r,r,s),St(r,r,s),St(e[0],r,s),Us(n,e[0]),St(n,n,s),Zw(n,i)&&St(e[0],e[0],H4),Us(n,e[0]),St(n,n,s),Zw(n,i)?-1:(tT(e[0])===t[31]>>7&&ua(e[0],K0,e[0]),St(e[3],e[0],e[1]),0)}function K4(e,t){var r;for(r=0;r<16;++r)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function W4(e,t){var r=Me(),n;for(n=0;n<16;++n)r[n]=t[n];for(n=250;n>=0;--n)Us(r,r),n!==1&&St(r,r,t);for(n=0;n<16;++n)e[n]=r[n]}function Zw(e,t){var r=new Ir(32),n=new Ir(32);return sh(r,e),sh(n,t),eT(r,0,n,0)}function eT(e,t,r,n){return Q4(e,t,r,n,32)}function Q4(e,t,r,n,i){var s,o=0;for(s=0;s<i;++s)o|=e[t+s]^r[n+s];return(1&o-1>>>8)-1}function tT(e){var t=new Ir(32);return sh(t,e),t[0]&1}function rT(e,t,r){var n,i;for(Wi(e[0],K0),Wi(e[1],ih),Wi(e[2],ih),Wi(e[3],K0),i=255;i>=0;--i)n=r[i/8|0]>>(i&7)&1,Yw(e,t,n),Q0(t,e),Q0(e,e),Yw(e,t,n)}function Z0(e,t){var r=[Me(),Me(),Me(),Me()];Wi(r[0],Ww),Wi(r[1],Qw),Wi(r[2],ih),St(r[3],Ww,Qw),rT(e,r,t)}function Wi(e,t){var r;for(r=0;r<16;r++)e[r]=t[r]|0}function Y4(e,t){var r=Me(),n;for(n=0;n<16;++n)r[n]=t[n];for(n=253;n>=0;--n)Us(r,r),n!==2&&n!==4&&St(r,r,t);for(n=0;n<16;++n)e[n]=r[n]}function z0(e){var t,r,n=1;for(t=0;t<16;++t)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-n*65536;e[0]+=n-1+37*(n-1)}function nT(e,t,r){for(var n,i=~(r-1),s=0;s<16;++s)n=i&(e[s]^t[s]),e[s]^=n,t[s]^=n}function Me(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;++t)r[t]=e[t];return r}function la(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]+r[n]}function ua(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]-r[n]}function Us(e,t){St(e,t,t)}function St(e,t,r){var n,i,s=0,o=0,a=0,l=0,u=0,c=0,f=0,h=0,p=0,d=0,m=0,b=0,g=0,C=0,y=0,E=0,I=0,T=0,R=0,F=0,q=0,Z=0,W=0,z=0,ee=0,se=0,G=0,P=0,k=0,w=0,D=0,j=r[0],B=r[1],J=r[2],ae=r[3],pe=r[4],Ie=r[5],ge=r[6],we=r[7],rt=r[8],ht=r[9],Be=r[10],We=r[11],st=r[12],Te=r[13],oe=r[14],yt=r[15];n=t[0],s+=n*j,o+=n*B,a+=n*J,l+=n*ae,u+=n*pe,c+=n*Ie,f+=n*ge,h+=n*we,p+=n*rt,d+=n*ht,m+=n*Be,b+=n*We,g+=n*st,C+=n*Te,y+=n*oe,E+=n*yt,n=t[1],o+=n*j,a+=n*B,l+=n*J,u+=n*ae,c+=n*pe,f+=n*Ie,h+=n*ge,p+=n*we,d+=n*rt,m+=n*ht,b+=n*Be,g+=n*We,C+=n*st,y+=n*Te,E+=n*oe,I+=n*yt,n=t[2],a+=n*j,l+=n*B,u+=n*J,c+=n*ae,f+=n*pe,h+=n*Ie,p+=n*ge,d+=n*we,m+=n*rt,b+=n*ht,g+=n*Be,C+=n*We,y+=n*st,E+=n*Te,I+=n*oe,T+=n*yt,n=t[3],l+=n*j,u+=n*B,c+=n*J,f+=n*ae,h+=n*pe,p+=n*Ie,d+=n*ge,m+=n*we,b+=n*rt,g+=n*ht,C+=n*Be,y+=n*We,E+=n*st,I+=n*Te,T+=n*oe,R+=n*yt,n=t[4],u+=n*j,c+=n*B,f+=n*J,h+=n*ae,p+=n*pe,d+=n*Ie,m+=n*ge,b+=n*we,g+=n*rt,C+=n*ht,y+=n*Be,E+=n*We,I+=n*st,T+=n*Te,R+=n*oe,F+=n*yt,n=t[5],c+=n*j,f+=n*B,h+=n*J,p+=n*ae,d+=n*pe,m+=n*Ie,b+=n*ge,g+=n*we,C+=n*rt,y+=n*ht,E+=n*Be,I+=n*We,T+=n*st,R+=n*Te,F+=n*oe,q+=n*yt,n=t[6],f+=n*j,h+=n*B,p+=n*J,d+=n*ae,m+=n*pe,b+=n*Ie,g+=n*ge,C+=n*we,y+=n*rt,E+=n*ht,I+=n*Be,T+=n*We,R+=n*st,F+=n*Te,q+=n*oe,Z+=n*yt,n=t[7],h+=n*j,p+=n*B,d+=n*J,m+=n*ae,b+=n*pe,g+=n*Ie,C+=n*ge,y+=n*we,E+=n*rt,I+=n*ht,T+=n*Be,R+=n*We,F+=n*st,q+=n*Te,Z+=n*oe,W+=n*yt,n=t[8],p+=n*j,d+=n*B,m+=n*J,b+=n*ae,g+=n*pe,C+=n*Ie,y+=n*ge,E+=n*we,I+=n*rt,T+=n*ht,R+=n*Be,F+=n*We,q+=n*st,Z+=n*Te,W+=n*oe,z+=n*yt,n=t[9],d+=n*j,m+=n*B,b+=n*J,g+=n*ae,C+=n*pe,y+=n*Ie,E+=n*ge,I+=n*we,T+=n*rt,R+=n*ht,F+=n*Be,q+=n*We,Z+=n*st,W+=n*Te,z+=n*oe,ee+=n*yt,n=t[10],m+=n*j,b+=n*B,g+=n*J,C+=n*ae,y+=n*pe,E+=n*Ie,I+=n*ge,T+=n*we,R+=n*rt,F+=n*ht,q+=n*Be,Z+=n*We,W+=n*st,z+=n*Te,ee+=n*oe,se+=n*yt,n=t[11],b+=n*j,g+=n*B,C+=n*J,y+=n*ae,E+=n*pe,I+=n*Ie,T+=n*ge,R+=n*we,F+=n*rt,q+=n*ht,Z+=n*Be,W+=n*We,z+=n*st,ee+=n*Te,se+=n*oe,G+=n*yt,n=t[12],g+=n*j,C+=n*B,y+=n*J,E+=n*ae,I+=n*pe,T+=n*Ie,R+=n*ge,F+=n*we,q+=n*rt,Z+=n*ht,W+=n*Be,z+=n*We,ee+=n*st,se+=n*Te,G+=n*oe,P+=n*yt,n=t[13],C+=n*j,y+=n*B,E+=n*J,I+=n*ae,T+=n*pe,R+=n*Ie,F+=n*ge,q+=n*we,Z+=n*rt,W+=n*ht,z+=n*Be,ee+=n*We,se+=n*st,G+=n*Te,P+=n*oe,k+=n*yt,n=t[14],y+=n*j,E+=n*B,I+=n*J,T+=n*ae,R+=n*pe,F+=n*Ie,q+=n*ge,Z+=n*we,W+=n*rt,z+=n*ht,ee+=n*Be,se+=n*We,G+=n*st,P+=n*Te,k+=n*oe,w+=n*yt,n=t[15],E+=n*j,I+=n*B,T+=n*J,R+=n*ae,F+=n*pe,q+=n*Ie,Z+=n*ge,W+=n*we,z+=n*rt,ee+=n*ht,se+=n*Be,G+=n*We,P+=n*st,k+=n*Te,w+=n*oe,D+=n*yt,s+=38*I,o+=38*T,a+=38*R,l+=38*F,u+=38*q,c+=38*Z,f+=38*W,h+=38*z,p+=38*ee,d+=38*se,m+=38*G,b+=38*P,g+=38*k,C+=38*w,y+=38*D,i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=o+i+65535,i=Math.floor(n/65536),o=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=l+i+65535,i=Math.floor(n/65536),l=n-i*65536,n=u+i+65535,i=Math.floor(n/65536),u=n-i*65536,n=c+i+65535,i=Math.floor(n/65536),c=n-i*65536,n=f+i+65535,i=Math.floor(n/65536),f=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=p+i+65535,i=Math.floor(n/65536),p=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=m+i+65535,i=Math.floor(n/65536),m=n-i*65536,n=b+i+65535,i=Math.floor(n/65536),b=n-i*65536,n=g+i+65535,i=Math.floor(n/65536),g=n-i*65536,n=C+i+65535,i=Math.floor(n/65536),C=n-i*65536,n=y+i+65535,i=Math.floor(n/65536),y=n-i*65536,n=E+i+65535,i=Math.floor(n/65536),E=n-i*65536,s+=i-1+37*(i-1),i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=o+i+65535,i=Math.floor(n/65536),o=n-i*65536,n=a+i+65535,i=Math.floor(n/65536),a=n-i*65536,n=l+i+65535,i=Math.floor(n/65536),l=n-i*65536,n=u+i+65535,i=Math.floor(n/65536),u=n-i*65536,n=c+i+65535,i=Math.floor(n/65536),c=n-i*65536,n=f+i+65535,i=Math.floor(n/65536),f=n-i*65536,n=h+i+65535,i=Math.floor(n/65536),h=n-i*65536,n=p+i+65535,i=Math.floor(n/65536),p=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=m+i+65535,i=Math.floor(n/65536),m=n-i*65536,n=b+i+65535,i=Math.floor(n/65536),b=n-i*65536,n=g+i+65535,i=Math.floor(n/65536),g=n-i*65536,n=C+i+65535,i=Math.floor(n/65536),C=n-i*65536,n=y+i+65535,i=Math.floor(n/65536),y=n-i*65536,n=E+i+65535,i=Math.floor(n/65536),E=n-i*65536,s+=i-1+37*(i-1),e[0]=s,e[1]=o,e[2]=a,e[3]=l,e[4]=u,e[5]=c,e[6]=f,e[7]=h,e[8]=p,e[9]=d,e[10]=m,e[11]=b,e[12]=g,e[13]=C,e[14]=y,e[15]=E}});var uT=ce((J7,lT)=>{"use strict";var kr=qe();nt();qr();Ml();lT.exports=kr.kem=kr.kem||{};var oT=kr.jsbn.BigInteger;kr.kem.rsa={};kr.kem.rsa.create=function(e,t){t=t||{};var r=t.prng||kr.random,n={};return n.encrypt=function(i,s){var o=Math.ceil(i.n.bitLength()/8),a;do a=new oT(kr.util.bytesToHex(r.getBytesSync(o)),16).mod(i.n);while(a.compareTo(oT.ONE)<=0);a=kr.util.hexToBytes(a.toString(16));var l=o-a.length;l>0&&(a=kr.util.fillString("\0",l)+a);var u=i.encrypt(a,"NONE"),c=e.generate(a,s);return{encapsulation:u,key:c}},n.decrypt=function(i,s,o){var a=i.decrypt(s,"NONE");return e.generate(a,o)},n};kr.kem.kdf1=function(e,t){aT(this,e,0,t||e.digestLength)};kr.kem.kdf2=function(e,t){aT(this,e,1,t||e.digestLength)};function aT(e,t,r,n){e.generate=function(i,s){for(var o=new kr.util.ByteBuffer,a=Math.ceil(s/n)+r,l=new kr.util.ByteBuffer,u=r;u<a;++u){l.putInt32(u),t.start(),t.update(i+l.getBytes());var c=t.digest();o.putBytes(c.getBytes(n))}return o.truncate(o.length()-s),o.getBytes()}}});var dT=ce((eK,hT)=>{"use strict";var Xe=qe();nt();hT.exports=Xe.log=Xe.log||{};Xe.log.levels=["none","error","warning","info","debug","verbose","max"];var oh={},ev=[],Ol=null;Xe.log.LEVEL_LOCKED=2;Xe.log.NO_LEVEL_CHECK=4;Xe.log.INTERPOLATE=8;for(Vn=0;Vn<Xe.log.levels.length;++Vn)X0=Xe.log.levels[Vn],oh[X0]={index:Vn,name:X0.toUpperCase()};var X0,Vn;Xe.log.logMessage=function(e){for(var t=oh[e.level].index,r=0;r<ev.length;++r){var n=ev[r];if(n.flags&Xe.log.NO_LEVEL_CHECK)n.f(e);else{var i=oh[n.level].index;t<=i&&n.f(n,e)}}};Xe.log.prepareStandard=function(e){"standard"in e||(e.standard=oh[e.level].name+" ["+e.category+"] "+e.message)};Xe.log.prepareFull=function(e){if(!("full"in e)){var t=[e.message];t=t.concat([]),e.full=Xe.util.format.apply(this,t)}};Xe.log.prepareStandardFull=function(e){"standardFull"in e||(Xe.log.prepareStandard(e),e.standardFull=e.standard)};for(J0=["error","warning","info","debug","verbose"],Vn=0;Vn<J0.length;++Vn)(function(t){Xe.log[t]=function(r,n){var i=Array.prototype.slice.call(arguments).slice(2),s={timestamp:new Date,level:t,category:r,message:n,arguments:i};Xe.log.logMessage(s)}})(J0[Vn]);var J0,Vn;Xe.log.makeLogger=function(e){var t={flags:0,f:e};return Xe.log.setLevel(t,"none"),t};Xe.log.setLevel=function(e,t){var r=!1;if(e&&!(e.flags&Xe.log.LEVEL_LOCKED))for(var n=0;n<Xe.log.levels.length;++n){var i=Xe.log.levels[n];if(t==i){e.level=t,r=!0;break}}return r};Xe.log.lock=function(e,t){typeof t>"u"||t?e.flags|=Xe.log.LEVEL_LOCKED:e.flags&=~Xe.log.LEVEL_LOCKED};Xe.log.addLogger=function(e){ev.push(e)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(cT={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},Bl=function(e,t){Xe.log.prepareStandard(t);var r=cT[t.level],n=[t.standard];n=n.concat(t.arguments.slice()),r.apply(console,n)},ca=Xe.log.makeLogger(Bl)):(Bl=function(t,r){Xe.log.prepareStandardFull(r),console.log(r.standardFull)},ca=Xe.log.makeLogger(Bl)),Xe.log.setLevel(ca,"debug"),Xe.log.addLogger(ca),Ol=ca):console={log:function(){}};var ca,cT,Bl;Ol!==null&&typeof window<"u"&&window.location&&(Ll=new URL(window.location.href).searchParams,Ll.has("console.level")&&Xe.log.setLevel(Ol,Ll.get("console.level").slice(-1)[0]),Ll.has("console.lock")&&(fT=Ll.get("console.lock").slice(-1)[0],fT=="true"&&Xe.log.lock(Ol)));var Ll,fT;Xe.log.consoleLogger=Ol});var mT=ce((tK,pT)=>{"use strict";pT.exports=Pn();Bf();na();d0();H0()});var yT=ce((rK,vT)=>{"use strict";var le=qe();Ui();hn();Dl();ji();Rs();_0();qr();nt();Jf();var V=le.asn1,gr=vT.exports=le.pkcs7=le.pkcs7||{};gr.messageFromPem=function(e){var t=le.pem.decode(e)[0];if(t.type!=="PKCS7"){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=V.fromDer(t.body);return gr.messageFromAsn1(n)};gr.messageToPem=function(e,t){var r={type:"PKCS7",body:V.toDer(e.toAsn1()).getBytes()};return le.pem.encode(r,{maxline:t})};gr.messageFromAsn1=function(e){var t={},r=[];if(!V.validate(e,gr.asn1.contentInfoValidator,t,r)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=r,n}var i=V.derToOid(t.contentType),s;switch(i){case le.pki.oids.envelopedData:s=gr.createEnvelopedData();break;case le.pki.oids.encryptedData:s=gr.createEncryptedData();break;case le.pki.oids.signedData:s=gr.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+i+" is not (yet) supported.")}return s.fromAsn1(t.content.value[0]),s};gr.createSignedData=function(){var e=null;return e={type:le.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(n){if(rv(e,n,gr.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var i=e.rawCapture.certificates.value,s=0;s<i.length;++s)e.certificates.push(le.pki.certificateFromAsn1(i[s]))},toAsn1:function(){e.contentInfo||e.sign();for(var n=[],i=0;i<e.certificates.length;++i)n.push(le.pki.certificateToAsn1(e.certificates[i]));var s=[],o=V.create(V.Class.CONTEXT_SPECIFIC,0,!0,[V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.INTEGER,!1,V.integerToDer(e.version).getBytes()),V.create(V.Class.UNIVERSAL,V.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return n.length>0&&o.value[0].value.push(V.create(V.Class.CONTEXT_SPECIFIC,0,!0,n)),s.length>0&&o.value[0].value.push(V.create(V.Class.CONTEXT_SPECIFIC,1,!0,s)),o.value[0].value.push(V.create(V.Class.UNIVERSAL,V.Type.SET,!0,e.signerInfos)),V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.OID,!1,V.oidToDer(e.type).getBytes()),o])},addSigner:function(n){var i=n.issuer,s=n.serialNumber;if(n.certificate){var o=n.certificate;typeof o=="string"&&(o=le.pki.certificateFromPem(o)),i=o.issuer.attributes,s=o.serialNumber}var a=n.key;if(!a)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof a=="string"&&(a=le.pki.privateKeyFromPem(a));var l=n.digestAlgorithm||le.pki.oids.sha1;switch(l){case le.pki.oids.sha1:case le.pki.oids.sha256:case le.pki.oids.sha384:case le.pki.oids.sha512:case le.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+l)}var u=n.authenticatedAttributes||[];if(u.length>0){for(var c=!1,f=!1,h=0;h<u.length;++h){var p=u[h];if(!c&&p.type===le.pki.oids.contentType){if(c=!0,f)break;continue}if(!f&&p.type===le.pki.oids.messageDigest){if(f=!0,c)break;continue}}if(!c||!f)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:a,version:1,issuer:i,serialNumber:s,digestAlgorithm:l,signatureAlgorithm:le.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(n){if(n=n||{},(typeof e.content!="object"||e.contentInfo===null)&&(e.contentInfo=V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.OID,!1,V.oidToDer(le.pki.oids.data).getBytes())]),"content"in e)){var i;e.content instanceof le.util.ByteBuffer?i=e.content.bytes():typeof e.content=="string"&&(i=le.util.encodeUtf8(e.content)),n.detached?e.detachedContent=V.create(V.Class.UNIVERSAL,V.Type.OCTETSTRING,!1,i):e.contentInfo.value.push(V.create(V.Class.CONTEXT_SPECIFIC,0,!0,[V.create(V.Class.UNIVERSAL,V.Type.OCTETSTRING,!1,i)]))}if(e.signers.length!==0){var s=t();r(s)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(n){typeof n=="string"&&(n=le.pki.certificateFromPem(n)),e.certificates.push(n)},addCertificateRevokationList:function(n){throw new Error("PKCS#7 CRL support not yet implemented.")}},e;function t(){for(var n={},i=0;i<e.signers.length;++i){var s=e.signers[i],o=s.digestAlgorithm;o in n||(n[o]=le.md[le.pki.oids[o]].create()),s.authenticatedAttributes.length===0?s.md=n[o]:s.md=le.md[le.pki.oids[o]].create()}e.digestAlgorithmIdentifiers=[];for(var o in n)e.digestAlgorithmIdentifiers.push(V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.OID,!1,V.oidToDer(o).getBytes()),V.create(V.Class.UNIVERSAL,V.Type.NULL,!1,"")]));return n}function r(n){var i;if(e.detachedContent?i=e.detachedContent:(i=e.contentInfo.value[1],i=i.value[0]),!i)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var s=V.derToOid(e.contentInfo.value[0].value),o=V.toDer(i);o.getByte(),V.getBerValueLength(o),o=o.getBytes();for(var a in n)n[a].start().update(o);for(var l=new Date,u=0;u<e.signers.length;++u){var c=e.signers[u];if(c.authenticatedAttributes.length===0){if(s!==le.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{c.authenticatedAttributesAsn1=V.create(V.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var f=V.create(V.Class.UNIVERSAL,V.Type.SET,!0,[]),h=0;h<c.authenticatedAttributes.length;++h){var p=c.authenticatedAttributes[h];p.type===le.pki.oids.messageDigest?p.value=n[c.digestAlgorithm].digest():p.type===le.pki.oids.signingTime&&(p.value||(p.value=l)),f.value.push(tv(p)),c.authenticatedAttributesAsn1.value.push(tv(p))}o=V.toDer(f).getBytes(),c.md.start().update(o)}c.signature=c.key.sign(c.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=r5(e.signers)}};gr.createEncryptedData=function(){var e=null;return e={type:le.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:le.pki.oids["aes256-CBC"]},fromAsn1:function(t){rv(e,t,gr.asn1.encryptedDataValidator)},decrypt:function(t){t!==void 0&&(e.encryptedContent.key=t),gT(e)}},e};gr.createEnvelopedData=function(){var e=null;return e={type:le.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:le.pki.oids["aes256-CBC"]},fromAsn1:function(t){var r=rv(e,t,gr.asn1.envelopedDataValidator);e.recipients=J4(r.recipientInfos.value)},toAsn1:function(){return V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.OID,!1,V.oidToDer(e.type).getBytes()),V.create(V.Class.CONTEXT_SPECIFIC,0,!0,[V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.INTEGER,!1,V.integerToDer(e.version).getBytes()),V.create(V.Class.UNIVERSAL,V.Type.SET,!0,e5(e.recipients)),V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,n5(e.encryptedContent))])])])},findRecipient:function(t){for(var r=t.issuer.attributes,n=0;n<e.recipients.length;++n){var i=e.recipients[n],s=i.issuer;if(i.serialNumber===t.serialNumber&&s.length===r.length){for(var o=!0,a=0;a<r.length;++a)if(s[a].type!==r[a].type||s[a].value!==r[a].value){o=!1;break}if(o)return i}}return null},decrypt:function(t,r){if(e.encryptedContent.key===void 0&&t!==void 0&&r!==void 0)switch(t.encryptedContent.algorithm){case le.pki.oids.rsaEncryption:case le.pki.oids.desCBC:var n=r.decrypt(t.encryptedContent.content);e.encryptedContent.key=le.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}gT(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:le.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,r){if(e.encryptedContent.content===void 0){r=r||e.encryptedContent.algorithm,t=t||e.encryptedContent.key;var n,i,s;switch(r){case le.pki.oids["aes128-CBC"]:n=16,i=16,s=le.aes.createEncryptionCipher;break;case le.pki.oids["aes192-CBC"]:n=24,i=16,s=le.aes.createEncryptionCipher;break;case le.pki.oids["aes256-CBC"]:n=32,i=16,s=le.aes.createEncryptionCipher;break;case le.pki.oids["des-EDE3-CBC"]:n=24,i=8,s=le.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(t===void 0)t=le.util.createBuffer(le.random.getBytes(n));else if(t.length()!=n)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+n+".");e.encryptedContent.algorithm=r,e.encryptedContent.key=t,e.encryptedContent.parameter=le.util.createBuffer(le.random.getBytes(i));var o=s(t);if(o.start(e.encryptedContent.parameter.copy()),o.update(e.content),!o.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=o.output}for(var a=0;a<e.recipients.length;++a){var l=e.recipients[a];if(l.encryptedContent.content===void 0)switch(l.encryptedContent.algorithm){case le.pki.oids.rsaEncryption:l.encryptedContent.content=l.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+l.encryptedContent.algorithm)}}}},e};function Z4(e){var t={},r=[];if(!V.validate(e,gr.asn1.recipientInfoValidator,t,r)){var n=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw n.errors=r,n}return{version:t.version.charCodeAt(0),issuer:le.pki.RDNAttributesAsArray(t.issuer),serialNumber:le.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:V.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function X4(e){return V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.INTEGER,!1,V.integerToDer(e.version).getBytes()),V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[le.pki.distinguishedNameToAsn1({attributes:e.issuer}),V.create(V.Class.UNIVERSAL,V.Type.INTEGER,!1,le.util.hexToBytes(e.serialNumber))]),V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.OID,!1,V.oidToDer(e.encryptedContent.algorithm).getBytes()),V.create(V.Class.UNIVERSAL,V.Type.NULL,!1,"")]),V.create(V.Class.UNIVERSAL,V.Type.OCTETSTRING,!1,e.encryptedContent.content)])}function J4(e){for(var t=[],r=0;r<e.length;++r)t.push(Z4(e[r]));return t}function e5(e){for(var t=[],r=0;r<e.length;++r)t.push(X4(e[r]));return t}function t5(e){var t=V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.INTEGER,!1,V.integerToDer(e.version).getBytes()),V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[le.pki.distinguishedNameToAsn1({attributes:e.issuer}),V.create(V.Class.UNIVERSAL,V.Type.INTEGER,!1,le.util.hexToBytes(e.serialNumber))]),V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.OID,!1,V.oidToDer(e.digestAlgorithm).getBytes()),V.create(V.Class.UNIVERSAL,V.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.OID,!1,V.oidToDer(e.signatureAlgorithm).getBytes()),V.create(V.Class.UNIVERSAL,V.Type.NULL,!1,"")])),t.value.push(V.create(V.Class.UNIVERSAL,V.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var r=V.create(V.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n<e.unauthenticatedAttributes.length;++n){var i=e.unauthenticatedAttributes[n];r.values.push(tv(i))}t.value.push(r)}return t}function r5(e){for(var t=[],r=0;r<e.length;++r)t.push(t5(e[r]));return t}function tv(e){var t;if(e.type===le.pki.oids.contentType)t=V.create(V.Class.UNIVERSAL,V.Type.OID,!1,V.oidToDer(e.value).getBytes());else if(e.type===le.pki.oids.messageDigest)t=V.create(V.Class.UNIVERSAL,V.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===le.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),n=new Date("2050-01-01T00:00:00Z"),i=e.value;if(typeof i=="string"){var s=Date.parse(i);isNaN(s)?i.length===13?i=V.utcTimeToDate(i):i=V.generalizedTimeToDate(i):i=new Date(s)}i>=r&&i<n?t=V.create(V.Class.UNIVERSAL,V.Type.UTCTIME,!1,V.dateToUtcTime(i)):t=V.create(V.Class.UNIVERSAL,V.Type.GENERALIZEDTIME,!1,V.dateToGeneralizedTime(i))}return V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.OID,!1,V.oidToDer(e.type).getBytes()),V.create(V.Class.UNIVERSAL,V.Type.SET,!0,[t])])}function n5(e){return[V.create(V.Class.UNIVERSAL,V.Type.OID,!1,V.oidToDer(le.pki.oids.data).getBytes()),V.create(V.Class.UNIVERSAL,V.Type.SEQUENCE,!0,[V.create(V.Class.UNIVERSAL,V.Type.OID,!1,V.oidToDer(e.algorithm).getBytes()),e.parameter?V.create(V.Class.UNIVERSAL,V.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),V.create(V.Class.CONTEXT_SPECIFIC,0,!0,[V.create(V.Class.UNIVERSAL,V.Type.OCTETSTRING,!1,e.content.getBytes())])]}function rv(e,t,r){var n={},i=[];if(!V.validate(t,r,n,i)){var s=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw s.errors=s,s}var o=V.derToOid(n.contentType);if(o!==le.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(n.encryptedContent){var a="";if(le.util.isArray(n.encryptedContent))for(var l=0;l<n.encryptedContent.length;++l){if(n.encryptedContent[l].type!==V.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");a+=n.encryptedContent[l].value}else a=n.encryptedContent;e.encryptedContent={algorithm:V.derToOid(n.encAlgorithm),parameter:le.util.createBuffer(n.encParameter.value),content:le.util.createBuffer(a)}}if(n.content){var a="";if(le.util.isArray(n.content))for(var l=0;l<n.content.length;++l){if(n.content[l].type!==V.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");a+=n.content[l].value}else a=n.content;e.content=le.util.createBuffer(a)}return e.version=n.version.charCodeAt(0),e.rawCapture=n,n}function gT(e){if(e.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(e.content===void 0){var t;switch(e.encryptedContent.algorithm){case le.pki.oids["aes128-CBC"]:case le.pki.oids["aes192-CBC"]:case le.pki.oids["aes256-CBC"]:t=le.aes.createDecryptionCipher(e.encryptedContent.key);break;case le.pki.oids.desCBC:case le.pki.oids["des-EDE3-CBC"]:t=le.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}});var ET=ce((nK,CT)=>{"use strict";var zt=qe();Ui();Jo();Bf();na();nt();var lh=CT.exports=zt.ssh=zt.ssh||{};lh.privateKeyToPutty=function(e,t,r){r=r||"",t=t||"";var n="ssh-rsa",i=t===""?"none":"aes256-cbc",s="PuTTY-User-Key-File-2: "+n+`\r
`;s+="Encryption: "+i+`\r
`,s+="Comment: "+r+`\r
`;var o=zt.util.createBuffer();fa(o,n),Un(o,e.e),Un(o,e.n);var a=zt.util.encode64(o.bytes(),64),l=Math.floor(a.length/66)+1;s+="Public-Lines: "+l+`\r
`,s+=a;var u=zt.util.createBuffer();Un(u,e.d),Un(u,e.p),Un(u,e.q),Un(u,e.qInv);var c;if(!t)c=zt.util.encode64(u.bytes(),64);else{var f=u.length()+16-1;f-=f%16;var h=ah(u.bytes());h.truncate(h.length()-f+u.length()),u.putBuffer(h);var p=zt.util.createBuffer();p.putBuffer(ah("\0\0\0\0",t)),p.putBuffer(ah("\0\0\0",t));var d=zt.aes.createEncryptionCipher(p.truncate(8),"CBC");d.start(zt.util.createBuffer().fillWithByte(0,16)),d.update(u.copy()),d.finish();var m=d.output;m.truncate(16),c=zt.util.encode64(m.bytes(),64)}l=Math.floor(c.length/66)+1,s+=`\r
Private-Lines: `+l+`\r
`,s+=c;var b=ah("putty-private-key-file-mac-key",t),g=zt.util.createBuffer();fa(g,n),fa(g,i),fa(g,r),g.putInt32(o.length()),g.putBuffer(o),g.putInt32(u.length()),g.putBuffer(u);var C=zt.hmac.create();return C.start("sha1",b),C.update(g.bytes()),s+=`\r
Private-MAC: `+C.digest().toHex()+`\r
`,s};lh.publicKeyToOpenSSH=function(e,t){var r="ssh-rsa";t=t||"";var n=zt.util.createBuffer();return fa(n,r),Un(n,e.e),Un(n,e.n),r+" "+zt.util.encode64(n.bytes())+" "+t};lh.privateKeyToOpenSSH=function(e,t){return t?zt.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):zt.pki.privateKeyToPem(e)};lh.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||zt.md.md5.create(),n="ssh-rsa",i=zt.util.createBuffer();fa(i,n),Un(i,e.e),Un(i,e.n),r.start(),r.update(i.getBytes());var s=r.digest();if(t.encoding==="hex"){var o=s.toHex();return t.delimiter?o.match(/.{2}/g).join(t.delimiter):o}else{if(t.encoding==="binary")return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return s};function Un(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var n=zt.util.hexToBytes(r);e.putInt32(n.length),e.putBytes(n)}function fa(e,t){e.putInt32(t.length),e.putString(t)}function ah(){for(var e=zt.md.sha1.create(),t=arguments.length,r=0;r<t;++r)e.update(arguments[r]);return e.digest()}});var ST=ce((iK,bT)=>{"use strict";bT.exports=qe();Ui();jw();hn();Pf();Dl();sT();Jo();uT();dT();mT();D0();qf();Rs();S0();P0();yT();R0();I0();p0();Yf();qr();v0();ET();V0();nt()});var IT=ce((exports,module)=>{"use strict";typeof navigator<"u"&&function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.lottie=t())}(exports,function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var r,n=e.length,i;for(r=0;r<n;r+=1){i=e[r].prototype;for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t.prototype[s]=i[s])}}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(r){this.audios.push(r)},pause:function(){var r,n=this.audios.length;for(r=0;r<n;r+=1)this.audios[r].pause()},resume:function(){var r,n=this.audios.length;for(r=0;r<n;r+=1)this.audios[r].resume()},setRate:function(r){var n,i=this.audios.length;for(n=0;n<i;n+=1)this.audios[n].setRate(r)},createAudio:function(r){return this.audioFactory?this.audioFactory(r):window.Howl?new window.Howl({src:[r]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(r){this.audioFactory=r},setVolume:function(r){this._volume=r,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var r,n=this.audios.length;for(r=0;r<n;r+=1)this.audios[r].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(r,n){var i=0,s=[],o;switch(r){case"int16":case"uint8c":o=1;break;default:o=1.1;break}for(i=0;i<n;i+=1)s.push(o);return s}function t(r,n){return r==="float32"?new Float32Array(n):r==="int16"?new Int16Array(n):r==="uint8c"?new Uint8ClampedArray(n):e(r,n)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?t:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function(r){return typeof r}:_typeof$6=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$6(e)}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 e=["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"],t,r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]})();function ProjectInterface$1(){return{}}BMMath.random=Math.random,BMMath.abs=function(e){var t=_typeof$6(e);if(t==="object"&&e.length){var r=createSizedArray(e.length),n,i=e.length;for(n=0;n<i;n+=1)r[n]=Math.abs(e[n]);return r}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(e){_shouldRoundValues=!!e}function bmRnd(e){return _shouldRoundValues?Math.round(e):e}function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,r,n){this.type=e,this.currentTime=t,this.totalTime=r,this.direction=n<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,r,n){this.type=e,this.currentLoop=r,this.totalLoops=t,this.direction=n<0?-1:1}function BMSegmentStartEvent(e,t,r){this.type=e,this.firstFrame=t,this.totalFrames=r}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}function BMAnimationConfigErrorEvent(e,t){this.type=e,this.nativeError=t}var createElementID=function(){var e=0;return function(){return e+=1,idPrefix$1+"__lottie_element_"+e}}();function HSVtoRGB(e,t,r){var n,i,s,o,a,l,u,c;switch(o=Math.floor(e*6),a=e*6-o,l=r*(1-t),u=r*(1-a*t),c=r*(1-(1-a)*t),o%6){case 0:n=r,i=c,s=l;break;case 1:n=u,i=r,s=l;break;case 2:n=l,i=r,s=c;break;case 3:n=l,i=u,s=r;break;case 4:n=c,i=l,s=r;break;case 5:n=r,i=l,s=u;break;default:break}return[n,i,s]}function RGBtoHSV(e,t,r){var n=Math.max(e,t,r),i=Math.min(e,t,r),s=n-i,o,a=n===0?0:s/n,l=n/255;switch(n){case i:o=0;break;case e:o=t-r+s*(t<r?6:0),o/=6*s;break;case t:o=r-e+s*2,o/=6*s;break;case r:o=e-t+s*4,o/=6*s;break;default:break}return[o,a,l]}function addSaturationToRGB(e,t){var r=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return r[1]+=t,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(e,t){var r=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return r[2]+=t,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(e,t){var r=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return r[0]+=t/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var e=[],t,r;for(t=0;t<256;t+=1)r=t.toString(16),e[t]=r.length===1?"0"+r:r;return function(n,i,s){return n<0&&(n=0),i<0&&(i=0),s<0&&(s=0),"#"+e[n]+e[i]+e[s]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t},getIdPrefix=function(){return idPrefix$1};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(r){return typeof r}:_typeof$5=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$5(e)}var dataManager=function(){var e=1,t=[],r,n,i={onmessage:function(){},postMessage:function(p){r({data:p})}},s={postMessage:function(p){i.onmessage({data:p})}};function o(h){if(window.Worker&&window.Blob&&getWebWorker()){var p=new Blob(["var _workerSelf = self; self.onmessage = ",h.toString()],{type:"text/javascript"}),d=URL.createObjectURL(p);return new Worker(d)}return r=h,i}function a(){n||(n=o(function(p){function d(){function b(G,P){var k,w,D=G.length,j,B,J,ae;for(w=0;w<D;w+=1)if(k=G[w],"ks"in k&&!k.completed){if(k.completed=!0,k.hasMask){var pe=k.masksProperties;for(B=pe.length,j=0;j<B;j+=1)if(pe[j].pt.k.i)I(pe[j].pt.k);else for(ae=pe[j].pt.k.length,J=0;J<ae;J+=1)pe[j].pt.k[J].s&&I(pe[j].pt.k[J].s[0]),pe[j].pt.k[J].e&&I(pe[j].pt.k[J].e[0])}k.ty===0?(k.layers=y(k.refId,P),b(k.layers,P)):k.ty===4?E(k.shapes):k.ty===5&&ee(k)}}function g(G,P){if(G){var k=0,w=G.length;for(k=0;k<w;k+=1)G[k].t===1&&(G[k].data.layers=y(G[k].data.refId,P),b(G[k].data.layers,P))}}function C(G,P){for(var k=0,w=P.length;k<w;){if(P[k].id===G)return P[k];k+=1}return null}function y(G,P){var k=C(G,P);return k?k.layers.__used?JSON.parse(JSON.stringify(k.layers)):(k.layers.__used=!0,k.layers):null}function E(G){var P,k=G.length,w,D;for(P=k-1;P>=0;P-=1)if(G[P].ty==="sh")if(G[P].ks.k.i)I(G[P].ks.k);else for(D=G[P].ks.k.length,w=0;w<D;w+=1)G[P].ks.k[w].s&&I(G[P].ks.k[w].s[0]),G[P].ks.k[w].e&&I(G[P].ks.k[w].e[0]);else G[P].ty==="gr"&&E(G[P].it)}function I(G){var P,k=G.i.length;for(P=0;P<k;P+=1)G.i[P][0]+=G.v[P][0],G.i[P][1]+=G.v[P][1],G.o[P][0]+=G.v[P][0],G.o[P][1]+=G.v[P][1]}function T(G,P){var k=P?P.split("."):[100,100,100];return G[0]>k[0]?!0:k[0]>G[0]?!1:G[1]>k[1]?!0:k[1]>G[1]?!1:G[2]>k[2]?!0:k[2]>G[2]?!1:null}var R=function(){var G=[4,4,14];function P(w){var D=w.t.d;w.t.d={k:[{s:D,t:0}]}}function k(w){var D,j=w.length;for(D=0;D<j;D+=1)w[D].ty===5&&P(w[D])}return function(w){if(T(G,w.v)&&(k(w.layers),w.assets)){var D,j=w.assets.length;for(D=0;D<j;D+=1)w.assets[D].layers&&k(w.assets[D].layers)}}}(),F=function(){var G=[4,7,99];return function(P){if(P.chars&&!T(G,P.v)){var k,w=P.chars.length;for(k=0;k<w;k+=1){var D=P.chars[k];D.data&&D.data.shapes&&(E(D.data.shapes),D.data.ip=0,D.data.op=99999,D.data.st=0,D.data.sr=1,D.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}},P.chars[k].t||(D.data.shapes.push({ty:"no"}),D.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"})))}}}}(),q=function(){var G=[5,7,15];function P(w){var D=w.t.p;typeof D.a=="number"&&(D.a={a:0,k:D.a}),typeof D.p=="number"&&(D.p={a:0,k:D.p}),typeof D.r=="number"&&(D.r={a:0,k:D.r})}function k(w){var D,j=w.length;for(D=0;D<j;D+=1)w[D].ty===5&&P(w[D])}return function(w){if(T(G,w.v)&&(k(w.layers),w.assets)){var D,j=w.assets.length;for(D=0;D<j;D+=1)w.assets[D].layers&&k(w.assets[D].layers)}}}(),Z=function(){var G=[4,1,9];function P(w){var D,j=w.length,B,J;for(D=0;D<j;D+=1)if(w[D].ty==="gr")P(w[D].it);else if(w[D].ty==="fl"||w[D].ty==="st")if(w[D].c.k&&w[D].c.k[0].i)for(J=w[D].c.k.length,B=0;B<J;B+=1)w[D].c.k[B].s&&(w[D].c.k[B].s[0]/=255,w[D].c.k[B].s[1]/=255,w[D].c.k[B].s[2]/=255,w[D].c.k[B].s[3]/=255),w[D].c.k[B].e&&(w[D].c.k[B].e[0]/=255,w[D].c.k[B].e[1]/=255,w[D].c.k[B].e[2]/=255,w[D].c.k[B].e[3]/=255);else w[D].c.k[0]/=255,w[D].c.k[1]/=255,w[D].c.k[2]/=255,w[D].c.k[3]/=255}function k(w){var D,j=w.length;for(D=0;D<j;D+=1)w[D].ty===4&&P(w[D].shapes)}return function(w){if(T(G,w.v)&&(k(w.layers),w.assets)){var D,j=w.assets.length;for(D=0;D<j;D+=1)w.assets[D].layers&&k(w.assets[D].layers)}}}(),W=function(){var G=[4,4,18];function P(w){var D,j=w.length,B,J;for(D=j-1;D>=0;D-=1)if(w[D].ty==="sh")if(w[D].ks.k.i)w[D].ks.k.c=w[D].closed;else for(J=w[D].ks.k.length,B=0;B<J;B+=1)w[D].ks.k[B].s&&(w[D].ks.k[B].s[0].c=w[D].closed),w[D].ks.k[B].e&&(w[D].ks.k[B].e[0].c=w[D].closed);else w[D].ty==="gr"&&P(w[D].it)}function k(w){var D,j,B=w.length,J,ae,pe,Ie;for(j=0;j<B;j+=1){if(D=w[j],D.hasMask){var ge=D.masksProperties;for(ae=ge.length,J=0;J<ae;J+=1)if(ge[J].pt.k.i)ge[J].pt.k.c=ge[J].cl;else for(Ie=ge[J].pt.k.length,pe=0;pe<Ie;pe+=1)ge[J].pt.k[pe].s&&(ge[J].pt.k[pe].s[0].c=ge[J].cl),ge[J].pt.k[pe].e&&(ge[J].pt.k[pe].e[0].c=ge[J].cl)}D.ty===4&&P(D.shapes)}}return function(w){if(T(G,w.v)&&(k(w.layers),w.assets)){var D,j=w.assets.length;for(D=0;D<j;D+=1)w.assets[D].layers&&k(w.assets[D].layers)}}}();function z(G){G.__complete||(Z(G),R(G),F(G),q(G),W(G),b(G.layers,G.assets),g(G.chars,G.assets),G.__complete=!0)}function ee(G){G.t.a.length===0&&"m"in G.t.p}var se={};return se.completeData=z,se.checkColors=Z,se.checkChars=F,se.checkPathProperties=q,se.checkShapes=W,se.completeLayers=b,se}if(s.dataManager||(s.dataManager=d()),s.assetLoader||(s.assetLoader=function(){function b(C){var y=C.getResponseHeader("content-type");return y&&C.responseType==="json"&&y.indexOf("json")!==-1||C.response&&_typeof$5(C.response)==="object"?C.response:C.response&&typeof C.response=="string"?JSON.parse(C.response):C.responseText?JSON.parse(C.responseText):null}function g(C,y,E,I){var T,R=new XMLHttpRequest;try{R.responseType="json"}catch{}R.onreadystatechange=function(){if(R.readyState===4)if(R.status===200)T=b(R),E(T);else try{T=b(R),E(T)}catch(F){I&&I(F)}};try{R.open(["G","E","T"].join(""),C,!0)}catch{R.open(["G","E","T"].join(""),y+"/"+C,!0)}R.send()}return{load:g}}()),p.data.type==="loadAnimation")s.assetLoader.load(p.data.path,p.data.fullPath,function(b){s.dataManager.completeData(b),s.postMessage({id:p.data.id,payload:b,status:"success"})},function(){s.postMessage({id:p.data.id,status:"error"})});else if(p.data.type==="complete"){var m=p.data.animation;s.dataManager.completeData(m),s.postMessage({id:p.data.id,payload:m,status:"success"})}else p.data.type==="loadData"&&s.assetLoader.load(p.data.path,p.data.fullPath,function(b){s.postMessage({id:p.data.id,payload:b,status:"success"})},function(){s.postMessage({id:p.data.id,status:"error"})})}),n.onmessage=function(h){var p=h.data,d=p.id,m=t[d];t[d]=null,p.status==="success"?m.onComplete(p.payload):m.onError&&m.onError()})}function l(h,p){e+=1;var d="processId_"+e;return t[d]={onComplete:h,onError:p},d}function u(h,p,d){a();var m=l(p,d);n.postMessage({type:"loadAnimation",path:h,fullPath:window.location.origin+window.location.pathname,id:m})}function c(h,p,d){a();var m=l(p,d);n.postMessage({type:"loadData",path:h,fullPath:window.location.origin+window.location.pathname,id:m})}function f(h,p,d){a();var m=l(p,d);n.postMessage({type:"complete",animation:h,id:m})}return{loadAnimation:u,loadData:c,completeAnimation:f}}(),ImagePreloader=function(){var e=function(){var g=createTag("canvas");g.width=1,g.height=1;var C=g.getContext("2d");return C.fillStyle="rgba(0,0,0,0)",C.fillRect(0,0,1,1),g}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(g,C,y){var E="";if(g.e)E=g.p;else if(C){var I=g.p;I.indexOf("images/")!==-1&&(I=I.split("/")[1]),E=C+I}else E=y,E+=g.u?g.u:"",E+=g.p;return E}function i(g){var C=0,y=setInterval((function(){var E=g.getBBox();(E.width||C>500)&&(this._imageLoaded(),clearInterval(y)),C+=1}).bind(this),50)}function s(g){var C=n(g,this.assetsPath,this.path),y=createNS("image");isSafari?this.testImageLoaded(y):y.addEventListener("load",this._imageLoaded,!1),y.addEventListener("error",(function(){E.img=e,this._imageLoaded()}).bind(this),!1),y.setAttributeNS("http://www.w3.org/1999/xlink","href",C),this._elementHelper.append?this._elementHelper.append(y):this._elementHelper.appendChild(y);var E={img:y,assetData:g};return E}function o(g){var C=n(g,this.assetsPath,this.path),y=createTag("img");y.crossOrigin="anonymous",y.addEventListener("load",this._imageLoaded,!1),y.addEventListener("error",(function(){E.img=e,this._imageLoaded()}).bind(this),!1),y.src=C;var E={img:y,assetData:g};return E}function a(g){var C={assetData:g},y=n(g,this.assetsPath,this.path);return dataManager.loadData(y,(function(E){C.img=E,this._footageLoaded()}).bind(this),(function(){C.img={},this._footageLoaded()}).bind(this)),C}function l(g,C){this.imagesLoadedCb=C;var y,E=g.length;for(y=0;y<E;y+=1)g[y].layers||(!g[y].t||g[y].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(g[y]))):g[y].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(g[y]))))}function u(g){this.path=g||""}function c(g){this.assetsPath=g||""}function f(g){for(var C=0,y=this.images.length;C<y;){if(this.images[C].assetData===g)return this.images[C].img;C+=1}return null}function h(){this.imagesLoadedCb=null,this.images.length=0}function p(){return this.totalImages===this.loadedAssets}function d(){return this.totalFootages===this.loadedFootagesCount}function m(g,C){g==="svg"?(this._elementHelper=C,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function b(){this._imageLoaded=t.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=i.bind(this),this.createFootageData=a.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return b.prototype={loadAssets:l,setAssetsPath:c,setPath:u,loadedImages:p,loadedFootages:d,destroy:h,getAsset:f,createImgData:o,createImageData:s,imageLoaded:t,footageLoaded:r,setCacheType:m},b}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,r){if(this._cbs[t])for(var n=this._cbs[t],i=0;i<n.length;i+=1)n[i](r)},addEventListener:function(t,r){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(r),(function(){this.removeEventListener(t,r)}).bind(this)},removeEventListener:function(t,r){if(!r)this._cbs[t]=null;else if(this._cbs[t]){for(var n=0,i=this._cbs[t].length;n<i;)this._cbs[t][n]===r&&(this._cbs[t].splice(n,1),n-=1,i-=1),n+=1;this._cbs[t].length||(this._cbs[t]=null)}}};var markerParser=function(){function e(t){for(var r=t.split(`\r
`),n={},i,s=0,o=0;o<r.length;o+=1)i=r[o].split(":"),i.length===2&&(n[i[0]]=i[1].trim(),s+=1);if(s===0)throw new Error;return n}return function(t){for(var r=[],n=0;n<t.length;n+=1){var i=t[n],s={time:i.tm,duration:i.dr};try{s.payload=JSON.parse(t[n].cm)}catch{try{s.payload=e(t[n].cm)}catch{s.payload={name:t[n].cm}}}r.push(s)}return r}}(),ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(r){for(var n=0,i=this.compositions.length;n<i;){if(this.compositions[n].data&&this.compositions[n].data.nm===r)return this.compositions[n].prepareFrame&&this.compositions[n].data.xt&&this.compositions[n].prepareFrame(this.currentFrame),this.compositions[n].compInterface;n+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(t,r){renderers[t]=r};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$4=function(r){return typeof r}:_typeof$4=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$4(e)}var AnimationItem=function(){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(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var r=getRenderer(t);this.renderer=new r(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,e.loop===""||e.loop===null||e.loop===void 0||e.loop===!0?this.loop=!0:e.loop===!1?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay="autoplay"in e?e.autoplay:!0,this.name=e.name?e.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(e,"autoloadSegments")?e.autoloadSegments:!0,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(e.path.lastIndexOf("\\")!==-1?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&_typeof$4(t)!=="object"&&(t=JSON.parse(t));var r={wrapper:e,animationData:t},n=e.attributes;r.path=n.getNamedItem("data-animation-path")?n.getNamedItem("data-animation-path").value:n.getNamedItem("data-bm-path")?n.getNamedItem("data-bm-path").value:n.getNamedItem("bm-path")?n.getNamedItem("bm-path").value:"",r.animType=n.getNamedItem("data-anim-type")?n.getNamedItem("data-anim-type").value:n.getNamedItem("data-bm-type")?n.getNamedItem("data-bm-type").value:n.getNamedItem("bm-type")?n.getNamedItem("bm-type").value:n.getNamedItem("data-bm-renderer")?n.getNamedItem("data-bm-renderer").value:n.getNamedItem("bm-renderer")?n.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var i=n.getNamedItem("data-anim-loop")?n.getNamedItem("data-anim-loop").value:n.getNamedItem("data-bm-loop")?n.getNamedItem("data-bm-loop").value:n.getNamedItem("bm-loop")?n.getNamedItem("bm-loop").value:"";i==="false"?r.loop=!1:i==="true"?r.loop=!0:i!==""&&(r.loop=parseInt(i,10));var s=n.getNamedItem("data-anim-autoplay")?n.getNamedItem("data-anim-autoplay").value:n.getNamedItem("data-bm-autoplay")?n.getNamedItem("data-bm-autoplay").value:n.getNamedItem("bm-autoplay")?n.getNamedItem("bm-autoplay").value:!0;r.autoplay=s!=="false",r.name=n.getNamedItem("data-name")?n.getNamedItem("data-name").value:n.getNamedItem("data-bm-name")?n.getNamedItem("data-bm-name").value:n.getNamedItem("bm-name")?n.getNamedItem("bm-name").value:"";var o=n.getNamedItem("data-anim-prerender")?n.getNamedItem("data-anim-prerender").value:n.getNamedItem("data-bm-prerender")?n.getNamedItem("data-bm-prerender").value:n.getNamedItem("bm-prerender")?n.getNamedItem("bm-prerender").value:"";o==="false"&&(r.prerender=!1),r.path?this.setParams(r):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t=this.animationData.layers,r,n=t.length,i=e.layers,s,o=i.length;for(s=0;s<o;s+=1)for(r=0;r<n;){if(t[r].id===i[s].id){t[r]=i[s];break}r+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(n=e.assets.length,r=0;r<n;r+=1)this.animationData.assets.push(e.assets[r]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||e.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var t=e.shift();this.timeCompleted=t.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){var e=this.animationData.segments;e||(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(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():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 e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var r=typeof e=="number"?e:void 0,n=typeof t=="number"?t:void 0;this.renderer.updateContainerSize(r,n)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){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))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,r=0;r<this.markers.length;r+=1)if(t=this.markers[r],t.payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,r){if(!(r&&this.name!==r)){var n=Number(e);if(isNaN(n)){var i=this.getMarkerData(e);i&&this.goToAndStop(i.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,r){if(!(r&&this.name!==r)){var n=Number(e);if(isNaN(n)){var i=this.getMarkerData(e);i&&(i.duration?this.playSegments([i.time,i.time+i.duration],!0):this.goToAndStop(i.time,!0))}else this.goToAndStop(n,t,r);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!(this.isPaused===!0||this.isLoaded===!1)){var t=this.currentRawFrame+e*this.frameModifier,r=!1;t>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(r=!0,t=this.totalFrames-1):t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):t<0?this.checkSegments(t%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(r=!0,t=0)):this.setCurrentRawFrameValue(t),r&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?r=e:this.currentRawFrame+this.firstFrame>t&&(r=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,r!==-1&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),_typeof$4(e[0])==="object"){var r,n=e.length;for(r=0;r<n;r+=1)this.segments.push(e[r])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return this.segments.length?(this.adjustSegment(this.segments.shift(),e),!0):!1},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(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(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||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(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var r=e.p;r.indexOf("images/")!==-1&&(r=r.split("/")[1]),t=this.assetsPath+r}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,r=this.assets.length;t<r;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,r){try{var n=this.renderer.getElementByPath(e);n.updateDocumentData(t,r)}catch{}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,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(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}e==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),e==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),e==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),e==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),e==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],r=0,n=0,i=0,s=!0,o=!1;function a(P){for(var k=0,w=P.target;k<n;)t[k].animation===w&&(t.splice(k,1),k-=1,n-=1,w.isPaused||f()),k+=1}function l(P,k){if(!P)return null;for(var w=0;w<n;){if(t[w].elem===P&&t[w].elem!==null)return t[w].animation;w+=1}var D=new AnimationItem;return h(D,P),D.setData(P,k),D}function u(){var P,k=t.length,w=[];for(P=0;P<k;P+=1)w.push(t[P].animation);return w}function c(){i+=1,Z()}function f(){i-=1}function h(P,k){P.addEventListener("destroy",a),P.addEventListener("_active",c),P.addEventListener("_idle",f),t.push({elem:k,animation:P}),n+=1}function p(P){var k=new AnimationItem;return h(k,null),k.setParams(P),k}function d(P,k){var w;for(w=0;w<n;w+=1)t[w].animation.setSpeed(P,k)}function m(P,k){var w;for(w=0;w<n;w+=1)t[w].animation.setDirection(P,k)}function b(P){var k;for(k=0;k<n;k+=1)t[k].animation.play(P)}function g(P){var k=P-r,w;for(w=0;w<n;w+=1)t[w].animation.advanceTime(k);r=P,i&&!o?window.requestAnimationFrame(g):s=!0}function C(P){r=P,window.requestAnimationFrame(g)}function y(P){var k;for(k=0;k<n;k+=1)t[k].animation.pause(P)}function E(P,k,w){var D;for(D=0;D<n;D+=1)t[D].animation.goToAndStop(P,k,w)}function I(P){var k;for(k=0;k<n;k+=1)t[k].animation.stop(P)}function T(P){var k;for(k=0;k<n;k+=1)t[k].animation.togglePause(P)}function R(P){var k;for(k=n-1;k>=0;k-=1)t[k].animation.destroy(P)}function F(P,k,w){var D=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),j,B=D.length;for(j=0;j<B;j+=1)w&&D[j].setAttribute("data-bm-type",w),l(D[j],P);if(k&&B===0){w||(w="svg");var J=document.getElementsByTagName("body")[0];J.innerText="";var ae=createTag("div");ae.style.width="100%",ae.style.height="100%",ae.setAttribute("data-bm-type",w),J.appendChild(ae),l(ae,P)}}function q(){var P;for(P=0;P<n;P+=1)t[P].animation.resize()}function Z(){!o&&i&&s&&(window.requestAnimationFrame(C),s=!1)}function W(){o=!0}function z(){o=!1,Z()}function ee(P,k){var w;for(w=0;w<n;w+=1)t[w].animation.setVolume(P,k)}function se(P){var k;for(k=0;k<n;k+=1)t[k].animation.mute(P)}function G(P){var k;for(k=0;k<n;k+=1)t[k].animation.unmute(P)}return e.registerAnimation=l,e.loadAnimation=p,e.setSpeed=d,e.setDirection=m,e.play=b,e.pause=y,e.stop=I,e.togglePause=T,e.searchAnimations=F,e.resize=q,e.goToAndStop=E,e.destroy=R,e.freeze=W,e.unfreeze=z,e.setVolume=ee,e.mute=se,e.unmute=G,e.getRegisteredAnimations=u,e}(),BezierFactory=function(){var e={};e.getBezierEasing=r;var t={};function r(C,y,E,I,T){var R=T||("bez_"+C+"_"+y+"_"+E+"_"+I).replace(/\./g,"p");if(t[R])return t[R];var F=new g([C,y,E,I]);return t[R]=F,F}var n=4,i=.001,s=1e-7,o=10,a=11,l=1/(a-1),u=typeof Float32Array=="function";function c(C,y){return 1-3*y+3*C}function f(C,y){return 3*y-6*C}function h(C){return 3*C}function p(C,y,E){return((c(y,E)*C+f(y,E))*C+h(y))*C}function d(C,y,E){return 3*c(y,E)*C*C+2*f(y,E)*C+h(y)}function m(C,y,E,I,T){var R,F,q=0;do F=y+(E-y)/2,R=p(F,I,T)-C,R>0?E=F:y=F;while(Math.abs(R)>s&&++q<o);return F}function b(C,y,E,I){for(var T=0;T<n;++T){var R=d(y,E,I);if(R===0)return y;var F=p(y,E,I)-C;y-=F/R}return y}function g(C){this._p=C,this._mSampleValues=u?new Float32Array(a):new Array(a),this._precomputed=!1,this.get=this.get.bind(this)}return g.prototype={get:function(y){var E=this._p[0],I=this._p[1],T=this._p[2],R=this._p[3];return this._precomputed||this._precompute(),E===I&&T===R?y:y===0?0:y===1?1:p(this._getTForX(y),I,R)},_precompute:function(){var y=this._p[0],E=this._p[1],I=this._p[2],T=this._p[3];this._precomputed=!0,(y!==E||I!==T)&&this._calcSampleValues()},_calcSampleValues:function(){for(var y=this._p[0],E=this._p[2],I=0;I<a;++I)this._mSampleValues[I]=p(I*l,y,E)},_getTForX:function(y){for(var E=this._p[0],I=this._p[2],T=this._mSampleValues,R=0,F=1,q=a-1;F!==q&&T[F]<=y;++F)R+=l;--F;var Z=(y-T[F])/(T[F+1]-T[F]),W=R+Z*l,z=d(W,E,I);return z>=i?b(y,W,E,I):z===0?W:m(y,R,R+l,E,I)}},e}(),pooling=function(){function e(t){return t.concat(createSizedArray(t.length))}return{double:e}}(),poolFactory=function(){return function(e,t,r){var n=0,i=e,s=createSizedArray(i),o={newElement:a,release:l};function a(){var u;return n?(n-=1,u=s[n]):u=t(),u}function l(u){n===i&&(s=pooling.double(s),i*=2),r&&r(u),s[n]=u,n+=1}return o}}(),bezierLengthPool=function(){function e(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,e)}(),segmentsLengthPool=function(){function e(){return{lengths:[],totalLength:0}}function t(r){var n,i=r.lengths.length;for(n=0;n<i;n+=1)bezierLengthPool.release(r.lengths[n]);r.lengths.length=0}return poolFactory(8,e,t)}();function bezFunction(){var e=Math;function t(h,p,d,m,b,g){var C=h*m+p*b+d*g-b*m-g*h-d*p;return C>-.001&&C<.001}function r(h,p,d,m,b,g,C,y,E){if(d===0&&g===0&&E===0)return t(h,p,m,b,C,y);var I=e.sqrt(e.pow(m-h,2)+e.pow(b-p,2)+e.pow(g-d,2)),T=e.sqrt(e.pow(C-h,2)+e.pow(y-p,2)+e.pow(E-d,2)),R=e.sqrt(e.pow(C-m,2)+e.pow(y-b,2)+e.pow(E-g,2)),F;return I>T?I>R?F=I-T-R:F=R-T-I:R>T?F=R-T-I:F=T-I-R,F>-1e-4&&F<1e-4}var n=function(){return function(h,p,d,m){var b=getDefaultCurveSegments(),g,C,y,E,I,T=0,R,F=[],q=[],Z=bezierLengthPool.newElement();for(y=d.length,g=0;g<b;g+=1){for(I=g/(b-1),R=0,C=0;C<y;C+=1)E=bmPow(1-I,3)*h[C]+3*bmPow(1-I,2)*I*d[C]+3*(1-I)*bmPow(I,2)*m[C]+bmPow(I,3)*p[C],F[C]=E,q[C]!==null&&(R+=bmPow(F[C]-q[C],2)),q[C]=F[C];R&&(R=bmSqrt(R),T+=R),Z.percents[g]=I,Z.lengths[g]=T}return Z.addedLength=T,Z}}();function i(h){var p=segmentsLengthPool.newElement(),d=h.c,m=h.v,b=h.o,g=h.i,C,y=h._length,E=p.lengths,I=0;for(C=0;C<y-1;C+=1)E[C]=n(m[C],m[C+1],b[C],g[C+1]),I+=E[C].addedLength;return d&&y&&(E[C]=n(m[C],m[0],b[C],g[0]),I+=E[C].addedLength),p.totalLength=I,p}function s(h){this.segmentLength=0,this.points=new Array(h)}function o(h,p){this.partialLength=h,this.point=p}var a=function(){var h={};return function(p,d,m,b){var g=(p[0]+"_"+p[1]+"_"+d[0]+"_"+d[1]+"_"+m[0]+"_"+m[1]+"_"+b[0]+"_"+b[1]).replace(/\./g,"p");if(!h[g]){var C=getDefaultCurveSegments(),y,E,I,T,R,F=0,q,Z,W=null;p.length===2&&(p[0]!==d[0]||p[1]!==d[1])&&t(p[0],p[1],d[0],d[1],p[0]+m[0],p[1]+m[1])&&t(p[0],p[1],d[0],d[1],d[0]+b[0],d[1]+b[1])&&(C=2);var z=new s(C);for(I=m.length,y=0;y<C;y+=1){for(Z=createSizedArray(I),R=y/(C-1),q=0,E=0;E<I;E+=1)T=bmPow(1-R,3)*p[E]+3*bmPow(1-R,2)*R*(p[E]+m[E])+3*(1-R)*bmPow(R,2)*(d[E]+b[E])+bmPow(R,3)*d[E],Z[E]=T,W!==null&&(q+=bmPow(Z[E]-W[E],2));q=bmSqrt(q),F+=q,z.points[y]=new o(q,Z),W=Z}z.segmentLength=F,h[g]=z}return h[g]}}();function l(h,p){var d=p.percents,m=p.lengths,b=d.length,g=bmFloor((b-1)*h),C=h*p.addedLength,y=0;if(g===b-1||g===0||C===m[g])return d[g];for(var E=m[g]>C?-1:1,I=!0;I;)if(m[g]<=C&&m[g+1]>C?(y=(C-m[g])/(m[g+1]-m[g]),I=!1):g+=E,g<0||g>=b-1){if(g===b-1)return d[g];I=!1}return d[g]+(d[g+1]-d[g])*y}function u(h,p,d,m,b,g){var C=l(b,g),y=1-C,E=e.round((y*y*y*h[0]+(C*y*y+y*C*y+y*y*C)*d[0]+(C*C*y+y*C*C+C*y*C)*m[0]+C*C*C*p[0])*1e3)/1e3,I=e.round((y*y*y*h[1]+(C*y*y+y*C*y+y*y*C)*d[1]+(C*C*y+y*C*C+C*y*C)*m[1]+C*C*C*p[1])*1e3)/1e3;return[E,I]}var c=createTypedArray("float32",8);function f(h,p,d,m,b,g,C){b<0?b=0:b>1&&(b=1);var y=l(b,C);g=g>1?1:g;var E=l(g,C),I,T=h.length,R=1-y,F=1-E,q=R*R*R,Z=y*R*R*3,W=y*y*R*3,z=y*y*y,ee=R*R*F,se=y*R*F+R*y*F+R*R*E,G=y*y*F+R*y*E+y*R*E,P=y*y*E,k=R*F*F,w=y*F*F+R*E*F+R*F*E,D=y*E*F+R*E*E+y*F*E,j=y*E*E,B=F*F*F,J=E*F*F+F*E*F+F*F*E,ae=E*E*F+F*E*E+E*F*E,pe=E*E*E;for(I=0;I<T;I+=1)c[I*4]=e.round((q*h[I]+Z*d[I]+W*m[I]+z*p[I])*1e3)/1e3,c[I*4+1]=e.round((ee*h[I]+se*d[I]+G*m[I]+P*p[I])*1e3)/1e3,c[I*4+2]=e.round((k*h[I]+w*d[I]+D*m[I]+j*p[I])*1e3)/1e3,c[I*4+3]=e.round((B*h[I]+J*d[I]+ae*m[I]+pe*p[I])*1e3)/1e3;return c}return{getSegmentsLength:i,getNewSegment:f,getPointInSegment:u,buildBezierData:a,pointOnLine2D:t,pointOnLine3D:r}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var r=this.offsetTime,n;this.propType==="multidimensional"&&(n=createTypedArray("float32",this.pv.length));for(var i=t.lastIndex,s=i,o=this.keyframes.length-1,a=!0,l,u,c;a;){if(l=this.keyframes[s],u=this.keyframes[s+1],s===o-1&&e>=u.t-r){l.h&&(l=u),i=0;break}if(u.t-r>e){i=s;break}s<o-1?s+=1:(i=0,a=!1)}c=this.keyframesMetadata[s]||{};var f,h,p,d,m,b,g=u.t-r,C=l.t-r,y;if(l.to){c.bezierData||(c.bezierData=bez.buildBezierData(l.s,u.s||l.e,l.to,l.ti));var E=c.bezierData;if(e>=g||e<C){var I=e>=g?E.points.length-1:0;for(h=E.points[I].point.length,f=0;f<h;f+=1)n[f]=E.points[I].point[f]}else{c.__fnct?b=c.__fnct:(b=BezierFactory.getBezierEasing(l.o.x,l.o.y,l.i.x,l.i.y,l.n).get,c.__fnct=b),p=b((e-C)/(g-C));var T=E.segmentLength*p,R,F=t.lastFrame<e&&t._lastKeyframeIndex===s?t._lastAddedLength:0;for(m=t.lastFrame<e&&t._lastKeyframeIndex===s?t._lastPoint:0,a=!0,d=E.points.length;a;){if(F+=E.points[m].partialLength,T===0||p===0||m===E.points.length-1){for(h=E.points[m].point.length,f=0;f<h;f+=1)n[f]=E.points[m].point[f];break}else if(T>=F&&T<F+E.points[m+1].partialLength){for(R=(T-F)/E.points[m+1].partialLength,h=E.points[m].point.length,f=0;f<h;f+=1)n[f]=E.points[m].point[f]+(E.points[m+1].point[f]-E.points[m].point[f])*R;break}m<d-1?m+=1:a=!1}t._lastPoint=m,t._lastAddedLength=F-E.points[m].partialLength,t._lastKeyframeIndex=s}}else{var q,Z,W,z,ee;if(o=l.s.length,y=u.s||l.e,this.sh&&l.h!==1)if(e>=g)n[0]=y[0],n[1]=y[1],n[2]=y[2];else if(e<=C)n[0]=l.s[0],n[1]=l.s[1],n[2]=l.s[2];else{var se=createQuaternion(l.s),G=createQuaternion(y),P=(e-C)/(g-C);quaternionToEuler(n,slerp(se,G,P))}else for(s=0;s<o;s+=1)l.h!==1&&(e>=g?p=1:e<C?p=0:(l.o.x.constructor===Array?(c.__fnct||(c.__fnct=[]),c.__fnct[s]?b=c.__fnct[s]:(q=l.o.x[s]===void 0?l.o.x[0]:l.o.x[s],Z=l.o.y[s]===void 0?l.o.y[0]:l.o.y[s],W=l.i.x[s]===void 0?l.i.x[0]:l.i.x[s],z=l.i.y[s]===void 0?l.i.y[0]:l.i.y[s],b=BezierFactory.getBezierEasing(q,Z,W,z).get,c.__fnct[s]=b)):c.__fnct?b=c.__fnct:(q=l.o.x,Z=l.o.y,W=l.i.x,z=l.i.y,b=BezierFactory.getBezierEasing(q,Z,W,z).get,l.keyframeMetadata=b),p=b((e-C)/(g-C)))),y=u.s||l.e,ee=l.h===1?l.s[s]:l.s[s]+(y[s]-l.s[s])*p,this.propType==="multidimensional"?n[s]=ee:n=ee}return t.lastIndex=i,n}function slerp(e,t,r){var n=[],i=e[0],s=e[1],o=e[2],a=e[3],l=t[0],u=t[1],c=t[2],f=t[3],h,p,d,m,b;return p=i*l+s*u+o*c+a*f,p<0&&(p=-p,l=-l,u=-u,c=-c,f=-f),1-p>1e-6?(h=Math.acos(p),d=Math.sin(h),m=Math.sin((1-r)*h)/d,b=Math.sin(r*h)/d):(m=1-r,b=r),n[0]=m*i+b*l,n[1]=m*s+b*u,n[2]=m*o+b*c,n[3]=m*a+b*f,n}function quaternionToEuler(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=Math.atan2(2*n*s-2*r*i,1-2*n*n-2*i*i),a=Math.asin(2*r*n+2*i*s),l=Math.atan2(2*r*s-2*n*i,1-2*r*r-2*i*i);e[0]=o/degToRads,e[1]=a/degToRads,e[2]=l/degToRads}function createQuaternion(e){var t=e[0]*degToRads,r=e[1]*degToRads,n=e[2]*degToRads,i=Math.cos(t/2),s=Math.cos(r/2),o=Math.cos(n/2),a=Math.sin(t/2),l=Math.sin(r/2),u=Math.sin(n/2),c=i*s*o-a*l*u,f=a*l*o+i*s*u,h=a*s*o+i*l*u,p=i*l*o-a*s*u;return[f,h,p,c]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=r&&e>=r||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var n=this.interpolateValue(e,this._caching);this.pv=n}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if(this.propType==="unidimensional")t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var r=0,n=this.v.length;r<n;)t=e[r]*this.mult,mathAbs(this.v[r]-t)>1e-5&&(this.v[r]=t,this._mdf=!0),r+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var e,t=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)r=this.effectsSequence[e](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,r,n){this.propType="unidimensional",this.mult=r||1,this.data=t,this.v=r?t.k*r:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.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(e,t,r,n){this.propType="multidimensional",this.mult=r||1,this.data=t,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var i,s=t.k.length;for(this.v=createTypedArray("float32",s),this.pv=createTypedArray("float32",s),this.vel=createTypedArray("float32",s),i=0;i<s;i+=1)this.v[i]=t.k[i]*this.mult,this.pv[i]=t.k[i];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,r,n){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=r||1,this.elem=e,this.container=n,this.comp=e.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(e,t,r,n){this.propType="multidimensional";var i,s=t.k.length,o,a,l,u;for(i=0;i<s-1;i+=1)t.k[i].to&&t.k[i].s&&t.k[i+1]&&t.k[i+1].s&&(o=t.k[i].s,a=t.k[i+1].s,l=t.k[i].to,u=t.k[i].ti,(o.length===2&&!(o[0]===a[0]&&o[1]===a[1])&&bez.pointOnLine2D(o[0],o[1],a[0],a[1],o[0]+l[0],o[1]+l[1])&&bez.pointOnLine2D(o[0],o[1],a[0],a[1],a[0]+u[0],a[1]+u[1])||o.length===3&&!(o[0]===a[0]&&o[1]===a[1]&&o[2]===a[2])&&bez.pointOnLine3D(o[0],o[1],o[2],a[0],a[1],a[2],o[0]+l[0],o[1]+l[1],o[2]+l[2])&&bez.pointOnLine3D(o[0],o[1],o[2],a[0],a[1],a[2],a[0]+u[0],a[1]+u[1],a[2]+u[2]))&&(t.k[i].to=null,t.k[i].ti=null),o[0]===a[0]&&o[1]===a[1]&&l[0]===0&&l[1]===0&&u[0]===0&&u[1]===0&&(o.length===2||o[2]===a[2]&&l[2]===0&&u[2]===0)&&(t.k[i].to=null,t.k[i].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=e,this.container=n,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var c=t.k[0].s.length;for(this.v=createTypedArray("float32",c),this.pv=createTypedArray("float32",c),i=0;i<c;i+=1)this.v[i]=initFrame,this.pv[i]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",c)},this.addEffect=addEffect}var PropertyFactory=function(){function e(r,n,i,s,o){n.sid&&(n=r.globalData.slotManager.getProp(n));var a;if(!n.k.length)a=new ValueProperty(r,n,s,o);else if(typeof n.k[0]=="number")a=new MultiDimensionalProperty(r,n,s,o);else switch(i){case 0:a=new KeyframedValueProperty(r,n,s,o);break;case 1:a=new KeyframedMultidimensionalProperty(r,n,s,o);break;default:break}return a.effectsSequence.length&&o.addDynamicProperty(a),a}var t={getProp:e};return t}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var t,r=this.dynamicProperties.length;for(t=0;t<r;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function e(){return createTypedArray("float32",2)}return poolFactory(8,e)}();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(e,t){this.c=e,this.setLength(t);for(var r=0;r<t;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},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(e,t,r,n,i){var s;switch(this._length=Math.max(this._length,n+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":s=this.v;break;case"i":s=this.i;break;case"o":s=this.o;break;default:s=[];break}(!s[n]||s[n]&&!i)&&(s[n]=pointPool.newElement()),s[n][0]=e,s[n][1]=t},ShapePath.prototype.setTripleAt=function(e,t,r,n,i,s,o,a){this.setXYAt(e,t,"v",o,a),this.setXYAt(r,n,"o",o,a),this.setXYAt(i,s,"i",o,a)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,r=this.o,n=this.i,i=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],n[0][0],n[0][1],r[0][0],r[0][1],0,!1),i=1);var s=this._length-1,o=this._length,a;for(a=i;a<o;a+=1)e.setTripleAt(t[s][0],t[s][1],n[s][0],n[s][1],r[s][0],r[s][1],a,!1),s-=1;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function e(){return new ShapePath}function t(i){var s=i._length,o;for(o=0;o<s;o+=1)pointPool.release(i.v[o]),pointPool.release(i.i[o]),pointPool.release(i.o[o]),i.v[o]=null,i.i[o]=null,i.o[o]=null;i._length=0,i.c=!1}function r(i){var s=n.newElement(),o,a=i._length===void 0?i.v.length:i._length;for(s.setLength(a),s.c=i.c,o=0;o<a;o+=1)s.setTripleAt(i.v[o][0],i.v[o][1],i.o[o][0],i.o[o][1],i.i[o][0],i.i[o][1],o);return s}var n=poolFactory(4,e,t);return n.clone=r,n}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=function(){var e={newShapeCollection:i,release:s},t=0,r=4,n=createSizedArray(r);function i(){var o;return t?(t-=1,o=n[t]):o=new ShapeCollection,o}function s(o){var a,l=o._length;for(a=0;a<l;a+=1)shapePool.release(o.shapes[a]);o._length=0,t===r&&(n=pooling.double(n),r*=2),n[t]=o,t+=1}return e}(),ShapePropertyFactory=function(){var e=-999999;function t(g,C,y){var E=y.lastIndex,I,T,R,F,q,Z,W,z,ee,se=this.keyframes;if(g<se[0].t-this.offsetTime)I=se[0].s[0],R=!0,E=0;else if(g>=se[se.length-1].t-this.offsetTime)I=se[se.length-1].s?se[se.length-1].s[0]:se[se.length-2].e[0],R=!0;else{for(var G=E,P=se.length-1,k=!0,w,D,j;k&&(w=se[G],D=se[G+1],!(D.t-this.offsetTime>g));)G<P-1?G+=1:k=!1;if(j=this.keyframesMetadata[G]||{},R=w.h===1,E=G,!R){if(g>=D.t-this.offsetTime)z=1;else if(g<w.t-this.offsetTime)z=0;else{var B;j.__fnct?B=j.__fnct:(B=BezierFactory.getBezierEasing(w.o.x,w.o.y,w.i.x,w.i.y).get,j.__fnct=B),z=B((g-(w.t-this.offsetTime))/(D.t-this.offsetTime-(w.t-this.offsetTime)))}T=D.s?D.s[0]:w.e[0]}I=w.s[0]}for(Z=C._length,W=I.i[0].length,y.lastIndex=E,F=0;F<Z;F+=1)for(q=0;q<W;q+=1)ee=R?I.i[F][q]:I.i[F][q]+(T.i[F][q]-I.i[F][q])*z,C.i[F][q]=ee,ee=R?I.o[F][q]:I.o[F][q]+(T.o[F][q]-I.o[F][q])*z,C.o[F][q]=ee,ee=R?I.v[F][q]:I.v[F][q]+(T.v[F][q]-I.v[F][q])*z,C.v[F][q]=ee}function r(){var g=this.comp.renderedFrame-this.offsetTime,C=this.keyframes[0].t-this.offsetTime,y=this.keyframes[this.keyframes.length-1].t-this.offsetTime,E=this._caching.lastFrame;return E!==e&&(E<C&&g<C||E>y&&g>y)||(this._caching.lastIndex=E<g?this._caching.lastIndex:0,this.interpolateShape(g,this.pv,this._caching)),this._caching.lastFrame=g,this.pv}function n(){this.paths=this.localShapeCollection}function i(g,C){if(g._length!==C._length||g.c!==C.c)return!1;var y,E=g._length;for(y=0;y<E;y+=1)if(g.v[y][0]!==C.v[y][0]||g.v[y][1]!==C.v[y][1]||g.o[y][0]!==C.o[y][0]||g.o[y][1]!==C.o[y][1]||g.i[y][0]!==C.i[y][0]||g.i[y][1]!==C.i[y][1])return!1;return!0}function s(g){i(this.v,g)||(this.v=shapePool.clone(g),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function o(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var g;this.kf?g=this.pv:this.data.ks?g=this.data.ks.k:g=this.data.pt.k;var C,y=this.effectsSequence.length;for(C=0;C<y;C+=1)g=this.effectsSequence[C](g);this.setVValue(g),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function a(g,C,y){this.propType="shape",this.comp=g.comp,this.container=g,this.elem=g,this.data=C,this.k=!1,this.kf=!1,this._mdf=!1;var E=y===3?C.pt.k:C.ks.k;this.v=shapePool.clone(E),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=n,this.effectsSequence=[]}function l(g){this.effectsSequence.push(g),this.container.addDynamicProperty(this)}a.prototype.interpolateShape=t,a.prototype.getValue=o,a.prototype.setVValue=s,a.prototype.addEffect=l;function u(g,C,y){this.propType="shape",this.comp=g.comp,this.elem=g,this.container=g,this.offsetTime=g.data.st,this.keyframes=y===3?C.pt.k:C.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var E=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,E),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=e,this.reset=n,this._caching={lastFrame:e,lastIndex:0},this.effectsSequence=[r.bind(this)]}u.prototype.getValue=o,u.prototype.interpolateShape=t,u.prototype.setVValue=s,u.prototype.addEffect=l;var c=function(){var g=roundCorner;function C(y,E){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=E.d,this.elem=y,this.comp=y.comp,this.frameId=-1,this.initDynamicPropertyContainer(y),this.p=PropertyFactory.getProp(y,E.p,1,0,this),this.s=PropertyFactory.getProp(y,E.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return C.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var E=this.p.v[0],I=this.p.v[1],T=this.s.v[0]/2,R=this.s.v[1]/2,F=this.d!==3,q=this.v;q.v[0][0]=E,q.v[0][1]=I-R,q.v[1][0]=F?E+T:E-T,q.v[1][1]=I,q.v[2][0]=E,q.v[2][1]=I+R,q.v[3][0]=F?E-T:E+T,q.v[3][1]=I,q.i[0][0]=F?E-T*g:E+T*g,q.i[0][1]=I-R,q.i[1][0]=F?E+T:E-T,q.i[1][1]=I-R*g,q.i[2][0]=F?E+T*g:E-T*g,q.i[2][1]=I+R,q.i[3][0]=F?E-T:E+T,q.i[3][1]=I+R*g,q.o[0][0]=F?E+T*g:E-T*g,q.o[0][1]=I-R,q.o[1][0]=F?E+T:E-T,q.o[1][1]=I+R*g,q.o[2][0]=F?E-T*g:E+T*g,q.o[2][1]=I+R,q.o[3][0]=F?E-T:E+T,q.o[3][1]=I-R*g}},extendPrototype([DynamicPropertyContainer],C),C}(),f=function(){function g(C,y){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=C,this.comp=C.comp,this.data=y,this.frameId=-1,this.d=y.d,this.initDynamicPropertyContainer(C),y.sy===1?(this.ir=PropertyFactory.getProp(C,y.ir,0,0,this),this.is=PropertyFactory.getProp(C,y.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(C,y.pt,0,0,this),this.p=PropertyFactory.getProp(C,y.p,1,0,this),this.r=PropertyFactory.getProp(C,y.r,0,degToRads,this),this.or=PropertyFactory.getProp(C,y.or,0,0,this),this.os=PropertyFactory.getProp(C,y.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return g.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var y=Math.floor(this.pt.v)*2,E=Math.PI*2/y,I=!0,T=this.or.v,R=this.ir.v,F=this.os.v,q=this.is.v,Z=2*Math.PI*T/(y*2),W=2*Math.PI*R/(y*2),z,ee,se,G,P=-Math.PI/2;P+=this.r.v;var k=this.data.d===3?-1:1;for(this.v._length=0,z=0;z<y;z+=1){ee=I?T:R,se=I?F:q,G=I?Z:W;var w=ee*Math.cos(P),D=ee*Math.sin(P),j=w===0&&D===0?0:D/Math.sqrt(w*w+D*D),B=w===0&&D===0?0:-w/Math.sqrt(w*w+D*D);w+=+this.p.v[0],D+=+this.p.v[1],this.v.setTripleAt(w,D,w-j*G*se*k,D-B*G*se*k,w+j*G*se*k,D+B*G*se*k,z,!0),I=!I,P+=E*k}},convertPolygonToPath:function(){var y=Math.floor(this.pt.v),E=Math.PI*2/y,I=this.or.v,T=this.os.v,R=2*Math.PI*I/(y*4),F,q=-Math.PI*.5,Z=this.data.d===3?-1:1;for(q+=this.r.v,this.v._length=0,F=0;F<y;F+=1){var W=I*Math.cos(q),z=I*Math.sin(q),ee=W===0&&z===0?0:z/Math.sqrt(W*W+z*z),se=W===0&&z===0?0:-W/Math.sqrt(W*W+z*z);W+=+this.p.v[0],z+=+this.p.v[1],this.v.setTripleAt(W,z,W-ee*R*T*Z,z-se*R*T*Z,W+ee*R*T*Z,z+se*R*T*Z,F,!0),q+=E*Z}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],g),g}(),h=function(){function g(C,y){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=y.d,this.initDynamicPropertyContainer(C),this.p=PropertyFactory.getProp(C,y.p,1,0,this),this.s=PropertyFactory.getProp(C,y.s,1,0,this),this.r=PropertyFactory.getProp(C,y.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return g.prototype={convertRectToPath:function(){var y=this.p.v[0],E=this.p.v[1],I=this.s.v[0]/2,T=this.s.v[1]/2,R=bmMin(I,T,this.r.v),F=R*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(y+I,E-T+R,y+I,E-T+R,y+I,E-T+F,0,!0),this.v.setTripleAt(y+I,E+T-R,y+I,E+T-F,y+I,E+T-R,1,!0),R!==0?(this.v.setTripleAt(y+I-R,E+T,y+I-R,E+T,y+I-F,E+T,2,!0),this.v.setTripleAt(y-I+R,E+T,y-I+F,E+T,y-I+R,E+T,3,!0),this.v.setTripleAt(y-I,E+T-R,y-I,E+T-R,y-I,E+T-F,4,!0),this.v.setTripleAt(y-I,E-T+R,y-I,E-T+F,y-I,E-T+R,5,!0),this.v.setTripleAt(y-I+R,E-T,y-I+R,E-T,y-I+F,E-T,6,!0),this.v.setTripleAt(y+I-R,E-T,y+I-F,E-T,y+I-R,E-T,7,!0)):(this.v.setTripleAt(y-I,E+T,y-I+F,E+T,y-I,E+T,2),this.v.setTripleAt(y-I,E-T,y-I,E-T+F,y-I,E-T,3))):(this.v.setTripleAt(y+I,E-T+R,y+I,E-T+F,y+I,E-T+R,0,!0),R!==0?(this.v.setTripleAt(y+I-R,E-T,y+I-R,E-T,y+I-F,E-T,1,!0),this.v.setTripleAt(y-I+R,E-T,y-I+F,E-T,y-I+R,E-T,2,!0),this.v.setTripleAt(y-I,E-T+R,y-I,E-T+R,y-I,E-T+F,3,!0),this.v.setTripleAt(y-I,E+T-R,y-I,E+T-F,y-I,E+T-R,4,!0),this.v.setTripleAt(y-I+R,E+T,y-I+R,E+T,y-I+F,E+T,5,!0),this.v.setTripleAt(y+I-R,E+T,y+I-F,E+T,y+I-R,E+T,6,!0),this.v.setTripleAt(y+I,E+T-R,y+I,E+T-R,y+I,E+T-F,7,!0)):(this.v.setTripleAt(y-I,E-T,y-I+F,E-T,y-I,E-T,1,!0),this.v.setTripleAt(y-I,E+T,y-I,E+T-F,y-I,E+T,2,!0),this.v.setTripleAt(y+I,E+T,y+I-F,E+T,y+I,E+T,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:n},extendPrototype([DynamicPropertyContainer],g),g}();function p(g,C,y){var E;if(y===3||y===4){var I=y===3?C.pt:C.ks,T=I.k;T.length?E=new u(g,C,y):E=new a(g,C,y)}else y===5?E=new h(g,C):y===6?E=new c(g,C):y===7&&(E=new f(g,C));return E.k&&g.addDynamicProperty(E),E}function d(){return a}function m(){return u}var b={};return b.getShapeProp=p,b.getConstructorFunction=d,b.getKeyframedConstructorFunction=m,b}();var Matrix=function(){var e=Math.cos,t=Math.sin,r=Math.tan,n=Math.round;function i(){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 s(w){if(w===0)return this;var D=e(w),j=t(w);return this._t(D,-j,0,0,j,D,0,0,0,0,1,0,0,0,0,1)}function o(w){if(w===0)return this;var D=e(w),j=t(w);return this._t(1,0,0,0,0,D,-j,0,0,j,D,0,0,0,0,1)}function a(w){if(w===0)return this;var D=e(w),j=t(w);return this._t(D,0,j,0,0,1,0,0,-j,0,D,0,0,0,0,1)}function l(w){if(w===0)return this;var D=e(w),j=t(w);return this._t(D,-j,0,0,j,D,0,0,0,0,1,0,0,0,0,1)}function u(w,D){return this._t(1,D,w,1,0,0)}function c(w,D){return this.shear(r(w),r(D))}function f(w,D){var j=e(D),B=t(D);return this._t(j,B,0,0,-B,j,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(w),1,0,0,0,0,1,0,0,0,0,1)._t(j,-B,0,0,B,j,0,0,0,0,1,0,0,0,0,1)}function h(w,D,j){return!j&&j!==0&&(j=1),w===1&&D===1&&j===1?this:this._t(w,0,0,0,0,D,0,0,0,0,j,0,0,0,0,1)}function p(w,D,j,B,J,ae,pe,Ie,ge,we,rt,ht,Be,We,st,Te){return this.props[0]=w,this.props[1]=D,this.props[2]=j,this.props[3]=B,this.props[4]=J,this.props[5]=ae,this.props[6]=pe,this.props[7]=Ie,this.props[8]=ge,this.props[9]=we,this.props[10]=rt,this.props[11]=ht,this.props[12]=Be,this.props[13]=We,this.props[14]=st,this.props[15]=Te,this}function d(w,D,j){return j=j||0,w!==0||D!==0||j!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,w,D,j,1):this}function m(w,D,j,B,J,ae,pe,Ie,ge,we,rt,ht,Be,We,st,Te){var oe=this.props;if(w===1&&D===0&&j===0&&B===0&&J===0&&ae===1&&pe===0&&Ie===0&&ge===0&&we===0&&rt===1&&ht===0)return oe[12]=oe[12]*w+oe[15]*Be,oe[13]=oe[13]*ae+oe[15]*We,oe[14]=oe[14]*rt+oe[15]*st,oe[15]*=Te,this._identityCalculated=!1,this;var yt=oe[0],Qr=oe[1],Fr=oe[2],Lr=oe[3],Or=oe[4],Yr=oe[5],or=oe[6],pn=oe[7],mn=oe[8],ar=oe[9],gn=oe[10],Je=oe[11],jn=oe[12],js=oe[13],Hs=oe[14],qs=oe[15];return oe[0]=yt*w+Qr*J+Fr*ge+Lr*Be,oe[1]=yt*D+Qr*ae+Fr*we+Lr*We,oe[2]=yt*j+Qr*pe+Fr*rt+Lr*st,oe[3]=yt*B+Qr*Ie+Fr*ht+Lr*Te,oe[4]=Or*w+Yr*J+or*ge+pn*Be,oe[5]=Or*D+Yr*ae+or*we+pn*We,oe[6]=Or*j+Yr*pe+or*rt+pn*st,oe[7]=Or*B+Yr*Ie+or*ht+pn*Te,oe[8]=mn*w+ar*J+gn*ge+Je*Be,oe[9]=mn*D+ar*ae+gn*we+Je*We,oe[10]=mn*j+ar*pe+gn*rt+Je*st,oe[11]=mn*B+ar*Ie+gn*ht+Je*Te,oe[12]=jn*w+js*J+Hs*ge+qs*Be,oe[13]=jn*D+js*ae+Hs*we+qs*We,oe[14]=jn*j+js*pe+Hs*rt+qs*st,oe[15]=jn*B+js*Ie+Hs*ht+qs*Te,this._identityCalculated=!1,this}function b(w){var D=w.props;return this.transform(D[0],D[1],D[2],D[3],D[4],D[5],D[6],D[7],D[8],D[9],D[10],D[11],D[12],D[13],D[14],D[15])}function g(){return 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),this._identity}function C(w){for(var D=0;D<16;){if(w.props[D]!==this.props[D])return!1;D+=1}return!0}function y(w){var D;for(D=0;D<16;D+=1)w.props[D]=this.props[D];return w}function E(w){var D;for(D=0;D<16;D+=1)this.props[D]=w[D]}function I(w,D,j){return{x:w*this.props[0]+D*this.props[4]+j*this.props[8]+this.props[12],y:w*this.props[1]+D*this.props[5]+j*this.props[9]+this.props[13],z:w*this.props[2]+D*this.props[6]+j*this.props[10]+this.props[14]}}function T(w,D,j){return w*this.props[0]+D*this.props[4]+j*this.props[8]+this.props[12]}function R(w,D,j){return w*this.props[1]+D*this.props[5]+j*this.props[9]+this.props[13]}function F(w,D,j){return w*this.props[2]+D*this.props[6]+j*this.props[10]+this.props[14]}function q(){var w=this.props[0]*this.props[5]-this.props[1]*this.props[4],D=this.props[5]/w,j=-this.props[1]/w,B=-this.props[4]/w,J=this.props[0]/w,ae=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/w,pe=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/w,Ie=new Matrix;return Ie.props[0]=D,Ie.props[1]=j,Ie.props[4]=B,Ie.props[5]=J,Ie.props[12]=ae,Ie.props[13]=pe,Ie}function Z(w){var D=this.getInverseMatrix();return D.applyToPointArray(w[0],w[1],w[2]||0)}function W(w){var D,j=w.length,B=[];for(D=0;D<j;D+=1)B[D]=Z(w[D]);return B}function z(w,D,j){var B=createTypedArray("float32",6);if(this.isIdentity())B[0]=w[0],B[1]=w[1],B[2]=D[0],B[3]=D[1],B[4]=j[0],B[5]=j[1];else{var J=this.props[0],ae=this.props[1],pe=this.props[4],Ie=this.props[5],ge=this.props[12],we=this.props[13];B[0]=w[0]*J+w[1]*pe+ge,B[1]=w[0]*ae+w[1]*Ie+we,B[2]=D[0]*J+D[1]*pe+ge,B[3]=D[0]*ae+D[1]*Ie+we,B[4]=j[0]*J+j[1]*pe+ge,B[5]=j[0]*ae+j[1]*Ie+we}return B}function ee(w,D,j){var B;return this.isIdentity()?B=[w,D,j]:B=[w*this.props[0]+D*this.props[4]+j*this.props[8]+this.props[12],w*this.props[1]+D*this.props[5]+j*this.props[9]+this.props[13],w*this.props[2]+D*this.props[6]+j*this.props[10]+this.props[14]],B}function se(w,D){if(this.isIdentity())return w+","+D;var j=this.props;return Math.round((w*j[0]+D*j[4]+j[12])*100)/100+","+Math.round((w*j[1]+D*j[5]+j[13])*100)/100}function G(){for(var w=0,D=this.props,j="matrix3d(",B=1e4;w<16;)j+=n(D[w]*B)/B,j+=w===15?")":",",w+=1;return j}function P(w){var D=1e4;return w<1e-6&&w>0||w>-1e-6&&w<0?n(w*D)/D:w}function k(){var w=this.props,D=P(w[0]),j=P(w[1]),B=P(w[4]),J=P(w[5]),ae=P(w[12]),pe=P(w[13]);return"matrix("+D+","+j+","+B+","+J+","+ae+","+pe+")"}return function(){this.reset=i,this.rotate=s,this.rotateX=o,this.rotateY=a,this.rotateZ=l,this.skew=c,this.skewFromAxis=f,this.shear=u,this.scale=h,this.setTransform=p,this.translate=d,this.transform=m,this.multiply=b,this.applyToPoint=I,this.applyToX=T,this.applyToY=R,this.applyToZ=F,this.applyToPointArray=ee,this.applyToTriplePoints=z,this.applyToPointStringified=se,this.toCSS=G,this.to2dCSS=k,this.clone=y,this.cloneFromProps=E,this.equals=C,this.inversePoints=W,this.inversePoint=Z,this.getInverseMatrix=q,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(r){return typeof r}:_typeof$3=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$3(e)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(e){setLocationHref(e)}function searchAnimations(){standalone===!0?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return standalone===!0&&(e.animationData=JSON.parse(animationData)),animationManager.loadAnimation(e)}function setQuality(e){if(typeof e=="string")switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return typeof navigator<"u"}function installPlugin(e,t){e==="expressions"&&setExpressionsPlugin(t)}function getFactory(e){switch(e){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.12.2";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),r=0;r<t.length;r+=1){var n=t[r].split("=");if(decodeURIComponent(n[0])==e)return decodeURIComponent(n[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{!((typeof exports>"u"?"undefined":_typeof$3(exports))==="object"&&typeof module<"u")&&!(typeof define=="function"&&define.amd)&&(window.bodymovin=lottie)}catch(e){}var ShapeModifiers=function(){var e={},t={};e.registerModifier=r,e.getModifier=n;function r(i,s){t[i]||(t[i]=s)}function n(i,s,o){return new t[i](s,o)}return e}();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,r,n,i){var s=[];t<=1?s.push({s:e,e:t}):e>=1?s.push({s:e-1,e:t-1}):(s.push({s:e,e:1}),s.push({s:0,e:t-1}));var o=[],a,l=s.length,u;for(a=0;a<l;a+=1)if(u=s[a],!(u.e*i<n||u.s*i>n+r)){var c,f;u.s*i<=n?c=0:c=(u.s*i-n)/r,u.e*i>=n+r?f=1:f=(u.e*i-n)/r,o.push([c,f])}return o.length||o.push([0,0]),o},TrimModifier.prototype.releasePathsData=function(e){var t,r=e.length;for(t=0;t<r;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){var t,r;if(this._mdf||e){var n=this.o.v%360/360;if(n<0&&(n+=1),this.s.v>1?t=1+n:this.s.v<0?t=0+n:t=this.s.v+n,this.e.v>1?r=1+n:this.e.v<0?r=0+n:r=this.e.v+n,t>r){var i=t;t=r,r=i}t=Math.round(t*1e4)*1e-4,r=Math.round(r*1e4)*1e-4,this.sValue=t,this.eValue=r}else t=this.sValue,r=this.eValue;var s,o,a=this.shapes.length,l,u,c,f,h,p=0;if(r===t)for(o=0;o<a;o+=1)this.shapes[o].localShapeCollection.releaseShapes(),this.shapes[o].shape._mdf=!0,this.shapes[o].shape.paths=this.shapes[o].localShapeCollection,this._mdf&&(this.shapes[o].pathsData.length=0);else if(r===1&&t===0||r===0&&t===1){if(this._mdf)for(o=0;o<a;o+=1)this.shapes[o].pathsData.length=0,this.shapes[o].shape._mdf=!0}else{var d=[],m,b;for(o=0;o<a;o+=1)if(m=this.shapes[o],!m.shape._mdf&&!this._mdf&&!e&&this.m!==2)m.shape.paths=m.localShapeCollection;else{if(s=m.shape.paths,u=s._length,h=0,!m.shape._mdf&&m.pathsData.length)h=m.totalShapeLength;else{for(c=this.releasePathsData(m.pathsData),l=0;l<u;l+=1)f=bez.getSegmentsLength(s.shapes[l]),c.push(f),h+=f.totalLength;m.totalShapeLength=h,m.pathsData=c}p+=h,m.shape._mdf=!0}var g=t,C=r,y=0,E;for(o=a-1;o>=0;o-=1)if(m=this.shapes[o],m.shape._mdf){for(b=m.localShapeCollection,b.releaseShapes(),this.m===2&&a>1?(E=this.calculateShapeEdges(t,r,m.totalShapeLength,y,p),y+=m.totalShapeLength):E=[[g,C]],u=E.length,l=0;l<u;l+=1){g=E[l][0],C=E[l][1],d.length=0,C<=1?d.push({s:m.totalShapeLength*g,e:m.totalShapeLength*C}):g>=1?d.push({s:m.totalShapeLength*(g-1),e:m.totalShapeLength*(C-1)}):(d.push({s:m.totalShapeLength*g,e:m.totalShapeLength}),d.push({s:0,e:m.totalShapeLength*(C-1)}));var I=this.addShapes(m,d[0]);if(d[0].s!==d[0].e){if(d.length>1){var T=m.shape.paths.shapes[m.shape.paths._length-1];if(T.c){var R=I.pop();this.addPaths(I,b),I=this.addShapes(m,d[1],R)}else this.addPaths(I,b),I=this.addShapes(m,d[1])}this.addPaths(I,b)}}m.shape.paths=b}}},TrimModifier.prototype.addPaths=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)t.addShape(e[r])},TrimModifier.prototype.addSegment=function(e,t,r,n,i,s,o){i.setXYAt(t[0],t[1],"o",s),i.setXYAt(r[0],r[1],"i",s+1),o&&i.setXYAt(e[0],e[1],"v",s),i.setXYAt(n[0],n[1],"v",s+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,r,n){t.setXYAt(e[1],e[5],"o",r),t.setXYAt(e[2],e[6],"i",r+1),n&&t.setXYAt(e[0],e[4],"v",r),t.setXYAt(e[3],e[7],"v",r+1)},TrimModifier.prototype.addShapes=function(e,t,r){var n=e.pathsData,i=e.shape.paths.shapes,s,o=e.shape.paths._length,a,l,u=0,c,f,h,p,d=[],m,b=!0;for(r?(f=r._length,m=r._length):(r=shapePool.newElement(),f=0,m=0),d.push(r),s=0;s<o;s+=1){for(h=n[s].lengths,r.c=i[s].c,l=i[s].c?h.length:h.length+1,a=1;a<l;a+=1)if(c=h[a-1],u+c.addedLength<t.s)u+=c.addedLength,r.c=!1;else if(u>t.e){r.c=!1;break}else t.s<=u&&t.e>=u+c.addedLength?(this.addSegment(i[s].v[a-1],i[s].o[a-1],i[s].i[a],i[s].v[a],r,f,b),b=!1):(p=bez.getNewSegment(i[s].v[a-1],i[s].v[a],i[s].o[a-1],i[s].i[a],(t.s-u)/c.addedLength,(t.e-u)/c.addedLength,h[a-1]),this.addSegmentFromArray(p,r,f,b),b=!1,r.c=!1),u+=c.addedLength,f+=1;if(i[s].c&&h.length){if(c=h[a-1],u<=t.e){var g=h[a-1].addedLength;t.s<=u&&t.e>=u+g?(this.addSegment(i[s].v[a-1],i[s].o[a-1],i[s].i[0],i[s].v[0],r,f,b),b=!1):(p=bez.getNewSegment(i[s].v[a-1],i[s].v[0],i[s].o[a-1],i[s].i[0],(t.s-u)/g,(t.e-u)/g,h[a-1]),this.addSegmentFromArray(p,r,f,b),b=!1,r.c=!1)}else r.c=!1;u+=c.addedLength,f+=1}if(r._length&&(r.setXYAt(r.v[m][0],r.v[m][1],"i",m),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),u>t.e)break;s<o-1&&(r=shapePool.newElement(),b=!0,d.push(r),f=0)}return d};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var r=t/100,n=[0,0],i=e._length,s=0;for(s=0;s<i;s+=1)n[0]+=e.v[s][0],n[1]+=e.v[s][1];n[0]/=i,n[1]/=i;var o=shapePool.newElement();o.c=e.c;var a,l,u,c,f,h;for(s=0;s<i;s+=1)a=e.v[s][0]+(n[0]-e.v[s][0])*r,l=e.v[s][1]+(n[1]-e.v[s][1])*r,u=e.o[s][0]+(n[0]-e.o[s][0])*-r,c=e.o[s][1]+(n[1]-e.o[s][1])*-r,f=e.i[s][0]+(n[0]-e.i[s][0])*-r,h=e.i[s][1]+(n[1]-e.i[s][1])*-r,o.setTripleAt(a,l,u,c,f,h,s);return o},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,r,n=this.shapes.length,i,s,o=this.amount.v;if(o!==0){var a,l;for(r=0;r<n;r+=1){if(a=this.shapes[r],l=a.localShapeCollection,!(!a.shape._mdf&&!this._mdf&&!e))for(l.releaseShapes(),a.shape._mdf=!0,t=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)l.addShape(this.processPath(t[i],o));a.shape.paths=a.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(l){var u=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||u,this.a&&l.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&l.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&l.skewFromAxis(-this.sk.v,this.sa.v),this.r?l.rotate(-this.r.v):l.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.data.p.s?this.data.p.z?l.translate(this.px.v,this.py.v,-this.pz.v):l.translate(this.px.v,this.py.v,0):l.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function r(l){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||l){var u;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]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!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]),this.autoOriented){var c,f;if(u=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(c=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/u,0),f=this.p.getValueAtTime(this.p.keyframes[0].t/u,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(c=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/u,0),f=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/u,0)):(c=this.p.pv,f=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/u,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){c=[],f=[];var h=this.px,p=this.py;h._caching.lastFrame+h.offsetTime<=h.keyframes[0].t?(c[0]=h.getValueAtTime((h.keyframes[0].t+.01)/u,0),c[1]=p.getValueAtTime((p.keyframes[0].t+.01)/u,0),f[0]=h.getValueAtTime(h.keyframes[0].t/u,0),f[1]=p.getValueAtTime(p.keyframes[0].t/u,0)):h._caching.lastFrame+h.offsetTime>=h.keyframes[h.keyframes.length-1].t?(c[0]=h.getValueAtTime(h.keyframes[h.keyframes.length-1].t/u,0),c[1]=p.getValueAtTime(p.keyframes[p.keyframes.length-1].t/u,0),f[0]=h.getValueAtTime((h.keyframes[h.keyframes.length-1].t-.01)/u,0),f[1]=p.getValueAtTime((p.keyframes[p.keyframes.length-1].t-.01)/u,0)):(c=[h.pv,p.pv],f[0]=h.getValueAtTime((h._caching.lastFrame+h.offsetTime-.01)/u,h.offsetTime),f[1]=p.getValueAtTime((p._caching.lastFrame+p.offsetTime-.01)/u,p.offsetTime))}else f=e,c=f;this.v.rotate(-Math.atan2(c[1]-f[1],c[0]-f[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function n(){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;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!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 i(){}function s(l){this._addDynamicProperty(l),this.elem.addDynamicProperty(l),this._isDirty=!0}function o(l,u,c){if(this.elem=l,this.frameId=-1,this.propType="transform",this.data=u,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(c||l),u.p&&u.p.s?(this.px=PropertyFactory.getProp(l,u.p.x,0,0,this),this.py=PropertyFactory.getProp(l,u.p.y,0,0,this),u.p.z&&(this.pz=PropertyFactory.getProp(l,u.p.z,0,0,this))):this.p=PropertyFactory.getProp(l,u.p||{k:[0,0,0]},1,0,this),u.rx){if(this.rx=PropertyFactory.getProp(l,u.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(l,u.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(l,u.rz,0,degToRads,this),u.or.k[0].ti){var f,h=u.or.k.length;for(f=0;f<h;f+=1)u.or.k[f].to=null,u.or.k[f].ti=null}this.or=PropertyFactory.getProp(l,u.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(l,u.r||{k:0},0,degToRads,this);u.sk&&(this.sk=PropertyFactory.getProp(l,u.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(l,u.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(l,u.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(l,u.s||{k:[100,100,100]},1,.01,this),u.o?this.o=PropertyFactory.getProp(l,u.o,0,.01,l):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}o.prototype={applyToMatrix:t,getValue:r,precalculateMatrix:n,autoOrient:i},extendPrototype([DynamicPropertyContainer],o),o.prototype.addDynamicProperty=s,o.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function a(l,u,c){return new o(l,u,c)}return{getTransformProperty:a}}();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,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(e,t,r,n,i,s){var o=s?-1:1,a=n.s.v[0]+(1-n.s.v[0])*(1-i),l=n.s.v[1]+(1-n.s.v[1])*(1-i);e.translate(n.p.v[0]*o*i,n.p.v[1]*o*i,n.p.v[2]),t.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),t.rotate(-n.r.v*o*i),t.translate(n.a.v[0],n.a.v[1],n.a.v[2]),r.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),r.scale(s?1/a:a,s?1/l:l),r.translate(n.a.v[0],n.a.v[1],n.a.v[2])},RepeaterModifier.prototype.init=function(e,t,r,n){for(this.elem=e,this.arr=t,this.pos=r,this.elemsData=n,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[r]);r>0;)r-=1,this._elements.unshift(t[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t]._processed=!1,e[t].ty==="gr"&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)e[r]._render=t,e[r].ty==="gr"&&this.changeGroupRender(e[r].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t,r,n,i,s,o=!1;if(this._mdf||e){var a=Math.ceil(this.c.v);if(this._groups.length<a){for(;this._groups.length<a;){var l={it:this.cloneElements(this._elements),ty:"gr"};l.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,l),this._groups.splice(0,0,l),this._currentCopies+=1}this.elem.reloadShapes(),o=!0}s=0;var u;for(n=0;n<=this._groups.length-1;n+=1){if(u=s<a,this._groups[n]._render=u,this.changeGroupRender(this._groups[n].it,u),!u){var c=this.elemsData[n].it,f=c[c.length-1];f.transform.op.v!==0?(f.transform.op._mdf=!0,f.transform.op.v=0):f.transform.op._mdf=!1}s+=1}this._currentCopies=a;var h=this.o.v,p=h%1,d=h>0?Math.floor(h):Math.ceil(h),m=this.pMatrix.props,b=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var C=0;if(h>0){for(;C<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),C+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),C+=p)}else if(h<0){for(;C>d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),C-=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),C-=p)}n=this.data.m===1?0:this._currentCopies-1,i=this.data.m===1?1:-1,s=this._currentCopies;for(var y,E;s;){if(t=this.elemsData[n].it,r=t[t.length-1].transform.mProps.v.props,E=r.length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(n/(this._currentCopies-1)),C!==0){for((n!==0&&i===1||n!==this._currentCopies-1&&i===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9],b[10],b[11],b[12],b[13],b[14],b[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),y=0;y<E;y+=1)r[y]=this.matrix.props[y];this.matrix.reset()}else for(this.matrix.reset(),y=0;y<E;y+=1)r[y]=this.matrix.props[y];C+=1,s-=1,n+=i}}else for(s=this._currentCopies,n=0,i=1;s;)t=this.elemsData[n].it,r=t[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,s-=1,n+=i;return o},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var r=shapePool.newElement();r.c=e.c;var n,i=e._length,s,o,a,l,u,c,f=0,h,p,d,m,b,g;for(n=0;n<i;n+=1)s=e.v[n],a=e.o[n],o=e.i[n],s[0]===a[0]&&s[1]===a[1]&&s[0]===o[0]&&s[1]===o[1]?(n===0||n===i-1)&&!e.c?(r.setTripleAt(s[0],s[1],a[0],a[1],o[0],o[1],f),f+=1):(n===0?l=e.v[i-1]:l=e.v[n-1],u=Math.sqrt(Math.pow(s[0]-l[0],2)+Math.pow(s[1]-l[1],2)),c=u?Math.min(u/2,t)/u:0,b=s[0]+(l[0]-s[0])*c,h=b,g=s[1]-(s[1]-l[1])*c,p=g,d=h-(h-s[0])*roundCorner,m=p-(p-s[1])*roundCorner,r.setTripleAt(h,p,d,m,b,g,f),f+=1,n===i-1?l=e.v[0]:l=e.v[n+1],u=Math.sqrt(Math.pow(s[0]-l[0],2)+Math.pow(s[1]-l[1],2)),c=u?Math.min(u/2,t)/u:0,d=s[0]+(l[0]-s[0])*c,h=d,m=s[1]+(l[1]-s[1])*c,p=m,b=h-(h-s[0])*roundCorner,g=p-(p-s[1])*roundCorner,r.setTripleAt(h,p,d,m,b,g,f),f+=1):(r.setTripleAt(e.v[n][0],e.v[n][1],e.o[n][0],e.o[n][1],e.i[n][0],e.i[n][1],f),f+=1);return r},RoundCornersModifier.prototype.processShapes=function(e){var t,r,n=this.shapes.length,i,s,o=this.rd.v;if(o!==0){var a,l;for(r=0;r<n;r+=1){if(a=this.shapes[r],l=a.localShapeCollection,!(!a.shape._mdf&&!this._mdf&&!e))for(l.releaseShapes(),a.shape._mdf=!0,t=a.shape.paths.shapes,s=a.shape.paths._length,i=0;i<s;i+=1)l.addShape(this.processPath(t[i],o));a.shape.paths=a.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function floatEqual(e,t){return Math.abs(e-t)*1e5<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,r){return e*(1-r)+t*r}function lerpPoint(e,t,r){return[lerp(e[0],t[0],r),lerp(e[1],t[1],r)]}function quadRoots(e,t,r){if(e===0)return[];var n=t*t-4*e*r;if(n<0)return[];var i=-t/(2*e);if(n===0)return[i];var s=Math.sqrt(n)/(2*e);return[i-s,i+s]}function polynomialCoefficients(e,t,r,n){return[-e+3*t-3*r+n,3*e-6*t+3*r,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,r,n,i){i&&pointEqual(e,t)&&(t=lerpPoint(e,n,1/3)),i&&pointEqual(r,n)&&(r=lerpPoint(e,n,2/3));var s=polynomialCoefficients(e[0],t[0],r[0],n[0]),o=polynomialCoefficients(e[1],t[1],r[1],n[1]);this.a=[s[0],o[0]],this.b=[s[1],o[1]],this.c=[s[2],o[2]],this.d=[s[3],o[3]],this.points=[e,t,r,n]}PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,r=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(r<0)return[];var n=Math.sqrt(r);return floatZero(n)?n>0&&n<1?[t]:[]:[t-n,t+n].filter(function(i){return i>0&&i<1})},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),r=lerpPoint(this.points[1],this.points[2],e),n=lerpPoint(this.points[2],this.points[3],e),i=lerpPoint(t,r,e),s=lerpPoint(r,n,e),o=lerpPoint(i,s,e);return[new PolynomialBezier(this.points[0],t,i,o,!0),new PolynomialBezier(o,s,n,this.points[3],!0)]};function extrema(e,t){var r=e.points[0][t],n=e.points[e.points.length-1][t];if(r>n){var i=n;n=r,r=i}for(var s=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),o=0;o<s.length;o+=1)if(s[o]>0&&s[o]<1){var a=e.point(s[o])[t];a<r?r=a:a>n&&(n=a)}return{min:r,max:n}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}};function intersectData(e,t,r){var n=e.boundingBox();return{cx:n.cx,cy:n.cy,width:n.width,height:n.height,bez:e,t:(t+r)/2,t1:t,t2:r}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return Math.abs(e.cx-t.cx)*2<e.width+t.width&&Math.abs(e.cy-t.cy)*2<e.height+t.height}function intersectsImpl(e,t,r,n,i,s){if(boxIntersect(e,t)){if(r>=s||e.width<=n&&e.height<=n&&t.width<=n&&t.height<=n){i.push([e.t,t.t]);return}var o=splitData(e),a=splitData(t);intersectsImpl(o[0],a[0],r+1,n,i,s),intersectsImpl(o[0],a[1],r+1,n,i,s),intersectsImpl(o[1],a[0],r+1,n,i,s),intersectsImpl(o[1],a[1],r+1,n,i,s)}}PolynomialBezier.prototype.intersections=function(e,t,r){t===void 0&&(t=2),r===void 0&&(r=7);var n=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,n,r),n},PolynomialBezier.shapeSegment=function(e,t){var r=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[r],e.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var r=(t+1)%e.length();return new PolynomialBezier(e.v[r],e.i[r],e.o[t],e.v[t],!0)};function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,r,n){var i=[e[0],e[1],1],s=[t[0],t[1],1],o=[r[0],r[1],1],a=[n[0],n[1],1],l=crossProduct(crossProduct(i,s),crossProduct(o,a));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(e,t,r){return[e[0]+Math.cos(t)*r,e[1]-Math.sin(t)*r]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(e,t,r,n,i,s,o){var a=r-Math.PI/2,l=r+Math.PI/2,u=t[0]+Math.cos(r)*n*i,c=t[1]-Math.sin(r)*n*i;e.setTripleAt(u,c,u+Math.cos(a)*s,c-Math.sin(a)*s,u+Math.cos(l)*o,c-Math.sin(l)*o,e.length())}function getPerpendicularVector(e,t){var r=[t[0]-e[0],t[1]-e[1]],n=-Math.PI*.5,i=[Math.cos(n)*r[0]-Math.sin(n)*r[1],Math.sin(n)*r[0]+Math.cos(n)*r[1]];return i}function getProjectingAngle(e,t){var r=t===0?e.length()-1:t-1,n=(t+1)%e.length(),i=e.v[r],s=e.v[n],o=getPerpendicularVector(i,s);return Math.atan2(0,1)-Math.atan2(o[1],o[0])}function zigZagCorner(e,t,r,n,i,s,o){var a=getProjectingAngle(t,r),l=t.v[r%t._length],u=t.v[r===0?t._length-1:r-1],c=t.v[(r+1)%t._length],f=s===2?Math.sqrt(Math.pow(l[0]-u[0],2)+Math.pow(l[1]-u[1],2)):0,h=s===2?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0;setPoint(e,t.v[r%t._length],a,o,n,h/((i+1)*2),f/((i+1)*2),s)}function zigZagSegment(e,t,r,n,i,s){for(var o=0;o<n;o+=1){var a=(o+1)/(n+1),l=i===2?Math.sqrt(Math.pow(t.points[3][0]-t.points[0][0],2)+Math.pow(t.points[3][1]-t.points[0][1],2)):0,u=t.normalAngle(a),c=t.point(a);setPoint(e,c,u,s,r,l/((n+1)*2),l/((n+1)*2),i),s=-s}return s}ZigZagModifier.prototype.processPath=function(e,t,r,n){var i=e._length,s=shapePool.newElement();if(s.c=e.c,e.c||(i-=1),i===0)return s;var o=-1,a=PolynomialBezier.shapeSegment(e,0);zigZagCorner(s,e,0,t,r,n,o);for(var l=0;l<i;l+=1)o=zigZagSegment(s,a,t,r,n,-o),l===i-1&&!e.c?a=null:a=PolynomialBezier.shapeSegment(e,(l+1)%i),zigZagCorner(s,e,l+1,t,r,n,o);return s},ZigZagModifier.prototype.processShapes=function(e){var t,r,n=this.shapes.length,i,s,o=this.amplitude.v,a=Math.max(0,Math.round(this.frequency.v)),l=this.pointsType.v;if(o!==0){var u,c;for(r=0;r<n;r+=1){if(u=this.shapes[r],c=u.localShapeCollection,!(!u.shape._mdf&&!this._mdf&&!e))for(c.releaseShapes(),u.shape._mdf=!0,t=u.shape.paths.shapes,s=u.shape.paths._length,i=0;i<s;i+=1)c.addShape(this.processPath(t[i],o,a,l));u.shape.paths=u.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function linearOffset(e,t,r){var n=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,n,r),polarOffset(t,n,r)]}function offsetSegment(e,t){var r,n,i,s,o,a,l;l=linearOffset(e.points[0],e.points[1],t),r=l[0],n=l[1],l=linearOffset(e.points[1],e.points[2],t),i=l[0],s=l[1],l=linearOffset(e.points[2],e.points[3],t),o=l[0],a=l[1];var u=lineIntersection(r,n,i,s);u===null&&(u=n);var c=lineIntersection(o,a,i,s);return c===null&&(c=o),new PolynomialBezier(r,u,c,a)}function joinLines(e,t,r,n,i){var s=t.points[3],o=r.points[0];if(n===3||pointEqual(s,o))return s;if(n===2){var a=-t.tangentAngle(1),l=-r.tangentAngle(0)+Math.PI,u=lineIntersection(s,polarOffset(s,a+Math.PI/2,100),o,polarOffset(o,a+Math.PI/2,100)),c=u?pointDistance(u,s):pointDistance(s,o)/2,f=polarOffset(s,a,2*c*roundCorner);return e.setXYAt(f[0],f[1],"o",e.length()-1),f=polarOffset(o,l,2*c*roundCorner),e.setTripleAt(o[0],o[1],o[0],o[1],f[0],f[1],e.length()),o}var h=pointEqual(s,t.points[2])?t.points[0]:t.points[2],p=pointEqual(o,r.points[1])?r.points[3]:r.points[1],d=lineIntersection(h,s,o,p);return d&&pointDistance(d,s)<i?(e.setTripleAt(d[0],d[1],d[0],d[1],d[0],d[1],e.length()),d):s}function getIntersection(e,t){var r=e.intersections(t);return r.length&&floatEqual(r[0][0],1)&&r.shift(),r.length?r[0]:null}function pruneSegmentIntersection(e,t){var r=e.slice(),n=t.slice(),i=getIntersection(e[e.length-1],t[0]);return i&&(r[e.length-1]=e[e.length-1].split(i[0])[0],n[0]=t[0].split(i[1])[1]),e.length>1&&t.length>1&&(i=getIntersection(e[0],t[t.length-1]),i)?[[e[0].split(i[0])[0]],[t[t.length-1].split(i[1])[1]]]:[r,n]}function pruneIntersections(e){for(var t,r=1;r<e.length;r+=1)t=pruneSegmentIntersection(e[r-1],e[r]),e[r-1]=t[0],e[r]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var r=e.inflectionPoints(),n,i,s,o;if(r.length===0)return[offsetSegment(e,t)];if(r.length===1||floatEqual(r[1],1))return s=e.split(r[0]),n=s[0],i=s[1],[offsetSegment(n,t),offsetSegment(i,t)];s=e.split(r[0]),n=s[0];var a=(r[1]-r[0])/(1-r[0]);return s=s[1].split(a),o=s[0],i=s[1],[offsetSegment(n,t),offsetSegment(o,t),offsetSegment(i,t)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(e,t,r,n){var i=shapePool.newElement();i.c=e.c;var s=e.length();e.c||(s-=1);var o,a,l,u=[];for(o=0;o<s;o+=1)l=PolynomialBezier.shapeSegment(e,o),u.push(offsetSegmentSplit(l,t));if(!e.c)for(o=s-1;o>=0;o-=1)l=PolynomialBezier.shapeSegmentInverted(e,o),u.push(offsetSegmentSplit(l,t));u=pruneIntersections(u);var c=null,f=null;for(o=0;o<u.length;o+=1){var h=u[o];for(f&&(c=joinLines(i,f,h[0],r,n)),f=h[h.length-1],a=0;a<h.length;a+=1)l=h[a],c&&pointEqual(l.points[0],c)?i.setXYAt(l.points[1][0],l.points[1][1],"o",i.length()-1):i.setTripleAt(l.points[0][0],l.points[0][1],l.points[1][0],l.points[1][1],l.points[0][0],l.points[0][1],i.length()),i.setTripleAt(l.points[3][0],l.points[3][1],l.points[3][0],l.points[3][1],l.points[2][0],l.points[2][1],i.length()),c=l.points[3]}return u.length&&joinLines(i,f,u[0][0],r,n),i},OffsetPathModifier.prototype.processShapes=function(e){var t,r,n=this.shapes.length,i,s,o=this.amount.v,a=this.miterLimit.v,l=this.lineJoin;if(o!==0){var u,c;for(r=0;r<n;r+=1){if(u=this.shapes[r],c=u.localShapeCollection,!(!u.shape._mdf&&!this._mdf&&!e))for(c.releaseShapes(),u.shape._mdf=!0,t=u.shape.paths.shapes,s=u.shape.paths._length,i=0;i<s;i+=1)c.addShape(this.processPath(t[i],o,l,a));u.shape.paths=u.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],r="normal",n="normal",i=t.length,s,o=0;o<i;o+=1)switch(s=t[o].toLowerCase(),s){case"italic":n="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200";break;default:break}return{style:n,weight:e.fWeight||r}}var FontManager=function(){var e=5e3,t={w:0,size:0,shapes:[],data:{shapes:[]}},r=[];r=r.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 n=127988,i=917631,s=917601,o=917626,a=65039,l=8205,u=127462,c=127487,f=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function h(P){var k=P.split(","),w,D=k.length,j=[];for(w=0;w<D;w+=1)k[w]!=="sans-serif"&&k[w]!=="monospace"&&j.push(k[w]);return j.join(",")}function p(P,k){var w=createTag("span");w.setAttribute("aria-hidden",!0),w.style.fontFamily=k;var D=createTag("span");D.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(D),document.body.appendChild(w);var j=D.offsetWidth;return D.style.fontFamily=h(P)+", "+k,{node:D,w:j,parent:w}}function d(){var P,k=this.fonts.length,w,D,j=k;for(P=0;P<k;P+=1)this.fonts[P].loaded?j-=1:this.fonts[P].fOrigin==="n"||this.fonts[P].origin===0?this.fonts[P].loaded=!0:(w=this.fonts[P].monoCase.node,D=this.fonts[P].monoCase.w,w.offsetWidth!==D?(j-=1,this.fonts[P].loaded=!0):(w=this.fonts[P].sansCase.node,D=this.fonts[P].sansCase.w,w.offsetWidth!==D&&(j-=1,this.fonts[P].loaded=!0)),this.fonts[P].loaded&&(this.fonts[P].sansCase.parent.parentNode.removeChild(this.fonts[P].sansCase.parent),this.fonts[P].monoCase.parent.parentNode.removeChild(this.fonts[P].monoCase.parent)));j!==0&&Date.now()-this.initTime<e?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function m(P,k){var w=document.body&&k?"svg":"canvas",D,j=getFontProperties(P);if(w==="svg"){var B=createNS("text");B.style.fontSize="100px",B.setAttribute("font-family",P.fFamily),B.setAttribute("font-style",j.style),B.setAttribute("font-weight",j.weight),B.textContent="1",P.fClass?(B.style.fontFamily="inherit",B.setAttribute("class",P.fClass)):B.style.fontFamily=P.fFamily,k.appendChild(B),D=B}else{var J=new OffscreenCanvas(500,500).getContext("2d");J.font=j.style+" "+j.weight+" 100px "+P.fFamily,D=J}function ae(pe){return w==="svg"?(D.textContent=pe,D.getComputedTextLength()):D.measureText(pe).width}return{measureText:ae}}function b(P,k){if(!P){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=P.list;return}if(!document.body){this.isLoaded=!0,P.list.forEach(function(rt){rt.helper=m(rt),rt.cache={}}),this.fonts=P.list;return}var w=P.list,D,j=w.length,B=j;for(D=0;D<j;D+=1){var J=!0,ae,pe;if(w[D].loaded=!1,w[D].monoCase=p(w[D].fFamily,"monospace"),w[D].sansCase=p(w[D].fFamily,"sans-serif"),!w[D].fPath)w[D].loaded=!0,B-=1;else if(w[D].fOrigin==="p"||w[D].origin===3){if(ae=document.querySelectorAll('style[f-forigin="p"][f-family="'+w[D].fFamily+'"], style[f-origin="3"][f-family="'+w[D].fFamily+'"]'),ae.length>0&&(J=!1),J){var Ie=createTag("style");Ie.setAttribute("f-forigin",w[D].fOrigin),Ie.setAttribute("f-origin",w[D].origin),Ie.setAttribute("f-family",w[D].fFamily),Ie.type="text/css",Ie.innerText="@font-face {font-family: "+w[D].fFamily+"; font-style: normal; src: url('"+w[D].fPath+"');}",k.appendChild(Ie)}}else if(w[D].fOrigin==="g"||w[D].origin===1){for(ae=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),pe=0;pe<ae.length;pe+=1)ae[pe].href.indexOf(w[D].fPath)!==-1&&(J=!1);if(J){var ge=createTag("link");ge.setAttribute("f-forigin",w[D].fOrigin),ge.setAttribute("f-origin",w[D].origin),ge.type="text/css",ge.rel="stylesheet",ge.href=w[D].fPath,document.body.appendChild(ge)}}else if(w[D].fOrigin==="t"||w[D].origin===2){for(ae=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),pe=0;pe<ae.length;pe+=1)w[D].fPath===ae[pe].src&&(J=!1);if(J){var we=createTag("link");we.setAttribute("f-forigin",w[D].fOrigin),we.setAttribute("f-origin",w[D].origin),we.setAttribute("rel","stylesheet"),we.setAttribute("href",w[D].fPath),k.appendChild(we)}}w[D].helper=m(w[D],k),w[D].cache={},this.fonts.push(w[D])}B===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function g(P){if(P){this.chars||(this.chars=[]);var k,w=P.length,D,j=this.chars.length,B;for(k=0;k<w;k+=1){for(D=0,B=!1;D<j;)this.chars[D].style===P[k].style&&this.chars[D].fFamily===P[k].fFamily&&this.chars[D].ch===P[k].ch&&(B=!0),D+=1;B||(this.chars.push(P[k]),j+=1)}}}function C(P,k,w){for(var D=0,j=this.chars.length;D<j;){if(this.chars[D].ch===P&&this.chars[D].style===k&&this.chars[D].fFamily===w)return this.chars[D];D+=1}return(typeof P=="string"&&P.charCodeAt(0)!==13||!P)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",P,k,w)),t}function y(P,k,w){var D=this.getFontByName(k),j=P;if(!D.cache[j]){var B=D.helper;if(P===" "){var J=B.measureText("|"+P+"|"),ae=B.measureText("||");D.cache[j]=(J-ae)/100}else D.cache[j]=B.measureText(P)/100}return D.cache[j]*w}function E(P){for(var k=0,w=this.fonts.length;k<w;){if(this.fonts[k].fName===P)return this.fonts[k];k+=1}return this.fonts[0]}function I(P){var k=0,w=P.charCodeAt(0);if(w>=55296&&w<=56319){var D=P.charCodeAt(1);D>=56320&&D<=57343&&(k=(w-55296)*1024+D-56320+65536)}return k}function T(P,k){var w=P.toString(16)+k.toString(16);return f.indexOf(w)!==-1}function R(P){return P===l}function F(P){return P===a}function q(P){var k=I(P);return k>=u&&k<=c}function Z(P){return q(P.substr(0,2))&&q(P.substr(2,2))}function W(P){return r.indexOf(P)!==-1}function z(P,k){var w=I(P.substr(k,2));if(w!==n)return!1;var D=0;for(k+=2;D<5;){if(w=I(P.substr(k,2)),w<s||w>o)return!1;D+=1,k+=2}return I(P.substr(k,2))===i}function ee(){this.isLoaded=!0}var se=function(){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)};se.isModifier=T,se.isZeroWidthJoiner=R,se.isFlagEmoji=Z,se.isRegionalCode=q,se.isCombinedCharacter=W,se.isRegionalFlag=z,se.isVariationSelector=F,se.BLACK_FLAG_CODE_POINT=n;var G={addChars:g,addFonts:b,getCharData:C,getFontByName:E,measureText:y,checkLoadedFonts:d,setIsLoaded:ee};return se.prototype=G,se}();function SlotManager(e){this.animationData=e}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e};function slotFactory(e){return new SlotManager(e)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){this.renderableComponents.indexOf(t)===-1&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){this.renderableComponents.indexOf(t)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,r=this.renderableComponents.length;for(t=0;t<r;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var e={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(t){return e[t]||""}}();function SliderEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function AngleEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function ColorEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,1,0,r)}function PointEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,1,0,r)}function LayerIndexEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function MaskIndexEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function CheckboxEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var r=e.ef||[];this.effectElements=[];var n,i=r.length,s;for(n=0;n<i;n+=1)s=new GroupEffect(r[n],t),this.effectElements.push(s)}function GroupEffect(e,t){this.init(e,t)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var r,n=this.data.ef.length,i,s=this.data.ef;for(r=0;r<n;r+=1){switch(i=null,s[r].ty){case 0:i=new SliderEffect(s[r],t,this);break;case 1:i=new AngleEffect(s[r],t,this);break;case 2:i=new ColorEffect(s[r],t,this);break;case 3:i=new PointEffect(s[r],t,this);break;case 4:case 7:i=new CheckboxEffect(s[r],t,this);break;case 10:i=new LayerIndexEffect(s[r],t,this);break;case 11:i=new MaskIndexEffect(s[r],t,this);break;case 5:i=new EffectsManager(s[r],t,this);break;default:i=new NoValueEffect(s[r],t,this);break}i&&this.effectElements.push(i)}};function BaseElement(){}BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,r=this.data.masksProperties.length;t<r;){if(this.data.masksProperties[t].mode!=="n"&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},initExpressions:function(){var t=getExpressionInterfaces();if(t){var r=t("layer"),n=t("effects"),i=t("shape"),s=t("text"),o=t("comp");this.layerInterface=r(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var a=n.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(a),this.data.ty===0||this.data.xt?this.compInterface=o(this):this.data.ty===4?(this.layerInterface.shapeInterface=i(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=s(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var t=getBlendMode(this.data.bm),r=this.baseElement||this.layerElement;r.style["mix-blend-mode"]=t},initBaseData:function(t,r,n){this.globalData=r,this.comp=n,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function FrameElement(){}FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,r){var n,i=this.dynamicProperties.length;for(n=0;n<i;n+=1)(r||this._isParent&&this.dynamicProperties[n].propType==="transform")&&(this.dynamicProperties[n].getValue(),this.dynamicProperties[n]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&this.dynamicProperties.push(t)}};function FootageElement(e,t,r){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,r)}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 e=getExpressionInterfaces();if(e){var t=e("footage");this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(e,t,r){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,r),this._isPlaying=!1,this._canPlay=!1;var n=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(n),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var r=this._volume*this._volumeMultiplier;this._previousVolume!==r&&(this._previousVolume=r,this.audio.volume(r))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},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(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*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(e){var t,r=this.layers.length,n;for(this.completeLayers=!0,t=r-1;t>=0;t-=1)this.elements[t]||(n=this.layers[t],n.ip-n.st<=e-this.layers[t].st&&n.op-n.st>e-this.layers[t].st&&this.buildItem(t)),this.completeLayers=this.elements[t]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e);default:return this.createNull(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){this.completeLayers=!1;var t,r=e.length,n,i=this.layers.length;for(t=0;t<r;t+=1)for(n=0;n<i;){if(this.layers[n].id===e[t].id){this.layers[n]=e[t];break}n+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,r){for(var n=this.elements,i=this.layers,s=0,o=i.length;s<o;)i[s].ind==t&&(!n[s]||n[s]===!0?(this.buildItem(s),this.addPendingElement(e)):(r.push(n[s]),n[s].setAsParent(),i[s].parent!==void 0?this.buildElementParenting(e,i[s].parent,r):e.setHierarchy(r))),s+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,r=e.length;for(t=0;t<r;t+=1)if(e[t].xt){var n=this.createComp(e[t]);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},BaseRenderer.prototype.getElementById=function(e){var t,r=this.elements.length;for(t=0;t<r;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t=e.shift(),r;if(typeof t=="number")r=this.elements[t];else{var n,i=this.elements.length;for(n=0;n<i;n+=1)if(this.elements[n].data.nm===t){r=this.elements[n];break}}return e.length===0?r:r.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),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=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}TransformElement.prototype={initTransform:function(){var t=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:t,localMat:t,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,r=this.finalTransform.mat,n=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;n<i;){if(this.hierarchy[n].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}n+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,r.cloneFromProps(t),n=0;n<i;n+=1)r.multiply(this.hierarchy[n].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var t=0,r=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;t<r;)this.localTransforms[t]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[t]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),t+=1;if(this.finalTransform._localMatMdf){var n=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(n),t=1;t<r;t+=1){var i=this.localTransforms[t].matrix;n.multiply(i)}n.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var s=this.finalTransform.localOpacity;for(t=0;t<r;t+=1)s*=this.localTransforms[t].opacity*.01;this.finalTransform.localOpacity=s}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var t=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(t.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var r=0,n=t.length;for(r=0;r<n;r+=1)this.localTransforms.push(t[r])}}},globalToLocal:function(t){var r=[];r.push(this.finalTransform);for(var n=!0,i=this.comp;n;)i.finalTransform?(i.data.hasMask&&r.splice(0,0,i.finalTransform),i=i.comp):n=!1;var s,o=r.length,a;for(s=0;s<o;s+=1)a=r[s].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix};function MaskElement(e,t,r){this.data=e,this.element=t,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var n=this.globalData.defs,i,s=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(s),this.solidPath="";var o,a=this.masksProperties,l=0,u=[],c,f,h=createElementID(),p,d,m,b,g="clipPath",C="clip-path";for(i=0;i<s;i+=1)if((a[i].mode!=="a"&&a[i].mode!=="n"||a[i].inv||a[i].o.k!==100||a[i].o.x)&&(g="mask",C="mask"),(a[i].mode==="s"||a[i].mode==="i")&&l===0?(p=createNS("rect"),p.setAttribute("fill","#ffffff"),p.setAttribute("width",this.element.comp.data.w||0),p.setAttribute("height",this.element.comp.data.h||0),u.push(p)):p=null,o=createNS("path"),a[i].mode==="n")this.viewData[i]={op:PropertyFactory.getProp(this.element,a[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,a[i],3),elem:o,lastPath:""},n.appendChild(o);else{l+=1,o.setAttribute("fill",a[i].mode==="s"?"#000000":"#ffffff"),o.setAttribute("clip-rule","nonzero");var y;if(a[i].x.k!==0?(g="mask",C="mask",b=PropertyFactory.getProp(this.element,a[i].x,0,null,this.element),y=createElementID(),d=createNS("filter"),d.setAttribute("id",y),m=createNS("feMorphology"),m.setAttribute("operator","erode"),m.setAttribute("in","SourceGraphic"),m.setAttribute("radius","0"),d.appendChild(m),n.appendChild(d),o.setAttribute("stroke",a[i].mode==="s"?"#000000":"#ffffff")):(m=null,b=null),this.storedData[i]={elem:o,x:b,expan:m,lastPath:"",lastOperator:"",filterId:y,lastRadius:0},a[i].mode==="i"){f=u.length;var E=createNS("g");for(c=0;c<f;c+=1)E.appendChild(u[c]);var I=createNS("mask");I.setAttribute("mask-type","alpha"),I.setAttribute("id",h+"_"+l),I.appendChild(o),n.appendChild(I),E.setAttribute("mask","url("+getLocationHref()+"#"+h+"_"+l+")"),u.length=0,u.push(E)}else u.push(o);a[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:o,lastPath:"",op:PropertyFactory.getProp(this.element,a[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,a[i],3),invRect:p},this.viewData[i].prop.k||this.drawPath(a[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(g),s=u.length,i=0;i<s;i+=1)this.maskElement.appendChild(u[i]);l>0&&(this.maskElement.setAttribute("id",h),this.element.maskedElement.setAttribute(C,"url("+getLocationHref()+"#"+h+")"),n.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t=this.element.finalTransform.mat,r,n=this.masksProperties.length;for(r=0;r<n;r+=1)if((this.viewData[r].prop._mdf||e)&&this.drawPath(this.masksProperties[r],this.viewData[r].prop.v,this.viewData[r]),(this.viewData[r].op._mdf||e)&&this.viewData[r].elem.setAttribute("fill-opacity",this.viewData[r].op.v),this.masksProperties[r].mode!=="n"&&(this.viewData[r].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[r].invRect.setAttribute("transform",t.getInverseMatrix().to2dCSS()),this.storedData[r].x&&(this.storedData[r].x._mdf||e))){var i=this.storedData[r].expan;this.storedData[r].x.v<0?(this.storedData[r].lastOperator!=="erode"&&(this.storedData[r].lastOperator="erode",this.storedData[r].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[r].filterId+")")),i.setAttribute("radius",-this.storedData[r].x.v)):(this.storedData[r].lastOperator!=="dilate"&&(this.storedData[r].lastOperator="dilate",this.storedData[r].elem.setAttribute("filter",null)),this.storedData[r].elem.setAttribute("stroke-width",this.storedData[r].x.v*2))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e="M0,0 ";return e+=" h"+this.globalData.compSize.w,e+=" v"+this.globalData.compSize.h,e+=" h-"+this.globalData.compSize.w,e+=" v-"+this.globalData.compSize.h+" ",e},MaskElement.prototype.drawPath=function(e,t,r){var n=" M"+t.v[0][0]+","+t.v[0][1],i,s;for(s=t._length,i=1;i<s;i+=1)n+=" C"+t.o[i-1][0]+","+t.o[i-1][1]+" "+t.i[i][0]+","+t.i[i][1]+" "+t.v[i][0]+","+t.v[i][1];if(t.c&&s>1&&(n+=" C"+t.o[i-1][0]+","+t.o[i-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),r.lastPath!==n){var o="";r.elem&&(t.c&&(o=e.inv?this.solidPath+n:n),r.elem.setAttribute("d",o)),r.lastPath=n}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={};e.createFilter=t,e.createAlphaToLuminanceFilter=r;function t(n,i){var s=createNS("filter");return s.setAttribute("id",n),i!==!0&&(s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%")),s}function r(){var n=createNS("feColorMatrix");return n.setAttribute("type","matrix"),n.setAttribute("color-interpolation-filters","sRGB"),n.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),n}return e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/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))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(e){var t,r="SourceGraphic",n=e.data.ef?e.data.ef.length:0,i=createElementID(),s=filtersFactory.createFilter(i,!0),o=0;this.filters=[];var a;for(t=0;t<n;t+=1){a=null;var l=e.data.ef[t].ty;if(registeredEffects$1[l]){var u=registeredEffects$1[l].effect;a=new u(s,e.effectsManager.effectElements[t],e,idPrefix+o,r),r=idPrefix+o,registeredEffects$1[l].countsAsEffect&&(o+=1)}a&&this.filters.push(a)}o&&(e.globalData.defs.appendChild(s),e.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+i+")")),this.filters.length&&e.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(e){var t,r=this.filters.length;for(t=0;t<r;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,r=this.filters.length,n=[];for(t=0;t<r;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n};function registerEffect$1(e,t,r){registeredEffects$1[e]={effect:t,countsAsEffect:r}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t=null;if(this.data.td){this.matteMasks={};var r=createNS("g");r.setAttribute("id",this.layerId),r.appendChild(this.layerElement),t=r,this.globalData.defs.appendChild(r)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),t=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var n=createNS("clipPath"),i=createNS("path");i.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var s=createElementID();if(n.setAttribute("id",s),n.appendChild(i),this.globalData.defs.appendChild(n),this.checkMasks()){var o=createNS("g");o.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")"),o.appendChild(this.layerElement),this.transformedElement=o,t?t.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(t){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[t]){var r=this.layerId+"_"+t,n,i,s,o;if(t===1||t===3){var a=createNS("mask");a.setAttribute("id",r),a.setAttribute("mask-type",t===3?"luminance":"alpha"),s=createNS("use"),s.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),a.appendChild(s),this.globalData.defs.appendChild(a),!featureSupport.maskType&&t===1&&(a.setAttribute("mask-type","luminance"),n=createElementID(),i=filtersFactory.createFilter(n),this.globalData.defs.appendChild(i),i.appendChild(filtersFactory.createAlphaToLuminanceFilter()),o=createNS("g"),o.appendChild(s),a.appendChild(o),o.setAttribute("filter","url("+getLocationHref()+"#"+n+")"))}else if(t===2){var l=createNS("mask");l.setAttribute("id",r),l.setAttribute("mask-type","alpha");var u=createNS("g");l.appendChild(u),n=createElementID(),i=filtersFactory.createFilter(n);var c=createNS("feComponentTransfer");c.setAttribute("in","SourceGraphic"),i.appendChild(c);var f=createNS("feFuncA");f.setAttribute("type","table"),f.setAttribute("tableValues","1.0 0.0"),c.appendChild(f),this.globalData.defs.appendChild(i);var h=createNS("rect");h.setAttribute("width",this.comp.data.w),h.setAttribute("height",this.comp.data.h),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("fill","#ffffff"),h.setAttribute("opacity","0"),u.setAttribute("filter","url("+getLocationHref()+"#"+n+")"),u.appendChild(h),s=createNS("use"),s.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),u.appendChild(s),featureSupport.maskType||(l.setAttribute("mask-type","luminance"),i.appendChild(filtersFactory.createAlphaToLuminanceFilter()),o=createNS("g"),u.appendChild(h),o.appendChild(this.layerElement),u.appendChild(o)),this.globalData.defs.appendChild(l)}this.matteMasks[t]=r}return this.matteMasks[t]},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){var e={initElement:function(r,n,i){this.initFrame(),this.initBaseData(r,n,i),this.initTransform(r,n,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var r=this.baseElement||this.layerElement;r.style.display="none",this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var r=this.baseElement||this.layerElement;r.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(r){this._mdf=!1,this.prepareRenderableFrame(r),this.prepareProperties(r,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(e)],RenderableDOMElement)})();function IImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,r),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 e=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",e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function(t){var r,n=this.shapeModifiers.length;for(r=0;r<n;r+=1)this.shapeModifiers[r].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var r=0,n=this.shapeModifiers.length;r<n;)if(this.shapeModifiers[r].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,r=this.shapes.length;for(t=0;t<r;t+=1)this.shapes[t].sh.reset();r=this.shapeModifiers.length;var n;for(t=r-1;t>=0&&(n=this.shapeModifiers[t].processShapes(this._isFirstFrame),!n);t-=1);}},searchProcessedElement:function(t){for(var r=this.processedElements,n=0,i=r.length;n<i;){if(r[n].elem===t)return r[n].pos;n+=1}return 0},addProcessedElement:function(t,r){for(var n=this.processedElements,i=n.length;i;)if(i-=1,n[i].elem===t){n[i].pos=r;return}n.push(new ProcessedElement(t,r))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(e,t,r){this.caches=[],this.styles=[],this.transformers=e,this.lStr="",this.sh=r,this.lvl=t,this._isAnimated=!!r.k;for(var n=0,i=e.length;n<i;){if(e[n].mProps.dynamicProperties.length){this._isAnimated=!0;break}n+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d="",this.lvl=t,this._mdf=!1,this.closed=e.hd===!0,this.pElem=createNS("path"),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1};function DashProperty(e,t,r,n){this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",t.length?t.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(n);var i,s=t.length||0,o;for(i=0;i<s;i+=1)o=PropertyFactory.getProp(e,t[i].v,0,0,this),this.k=o.k||this.k,this.dataProps[i]={n:t[i].n,p:o};this.k||this.getValue(!0),this._isAnimated=this.k}DashProperty.prototype.getValue=function(e){if(!(this.elem.globalData.frameId===this.frameId&&!e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,r=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),t=0;t<r;t+=1)this.dataProps[t].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v:this.dashoffset[0]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=r}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=r}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(e,t,r){this.data=t,this.c=createTypedArray("uint8c",t.p*4);var n=t.k.k[0].s?t.k.k[0].s.length-t.p*4:t.k.k.length-t.p*4;this.o=createTypedArray("float32",n),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=n,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(e,t){for(var r=0,n=this.o.length/2,i;r<n;){if(i=Math.abs(e[r*4]-e[t*4+r*2]),i>.01)return!1;r+=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)for(var e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,r=this.data.p*4,n,i;for(t=0;t<r;t+=1)n=t%4===0?100:255,i=Math.round(this.prop.v[t]*n),this.c[t]!==i&&(this.c[t]=i,this._cmdf=!e);if(this.o.length)for(r=this.prop.v.length,t=this.data.p*4;t<r;t+=1)n=t%2===0?100:1,i=t%2===0?Math.round(this.prop.v[t]*100):this.prop.v[t],this.o[t-this.data.p*4]!==i&&(this.o[t-this.data.p*4]=i,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,r)}SVGGradientFillStyleData.prototype.initGradientData=function(e,t,r){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,t),this.setGradientOpacity(t,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var r=createElementID(),n=createNS(t.t===1?"linearGradient":"radialGradient");n.setAttribute("id",r),n.setAttribute("spreadMethod","pad"),n.setAttribute("gradientUnits","userSpaceOnUse");var i=[],s,o,a;for(a=t.g.p*4,o=0;o<a;o+=4)s=createNS("stop"),n.appendChild(s),i.push(s);e.setAttribute(t.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=n,this.cst=i},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var r,n,i,s=createNS("mask"),o=createNS("path");s.appendChild(o);var a=createElementID(),l=createElementID();s.setAttribute("id",l);var u=createNS(e.t===1?"linearGradient":"radialGradient");u.setAttribute("id",a),u.setAttribute("spreadMethod","pad"),u.setAttribute("gradientUnits","userSpaceOnUse"),i=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var c=this.stops;for(n=e.g.p*4;n<i;n+=2)r=createNS("stop"),r.setAttribute("stop-color","rgb(255,255,255)"),u.appendChild(r),c.push(r);o.setAttribute(e.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+a+")"),e.ty==="gs"&&(o.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),o.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),e.lj===1&&o.setAttribute("stroke-miterlimit",e.ml)),this.of=u,this.ms=s,this.ost=c,this.maskId=l,t.msElem=o}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.initGradientData(e,t,r),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(e,t,r){this.transform={mProps:e,op:t,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function(t,r,n,i){if(r===0)return"";var s=t.o,o=t.i,a=t.v,l,u=" M"+i.applyToPointStringified(a[0][0],a[0][1]);for(l=1;l<r;l+=1)u+=" C"+i.applyToPointStringified(s[l-1][0],s[l-1][1])+" "+i.applyToPointStringified(o[l][0],o[l][1])+" "+i.applyToPointStringified(a[l][0],a[l][1]);return n&&r&&(u+=" C"+i.applyToPointStringified(s[l-1][0],s[l-1][1])+" "+i.applyToPointStringified(o[0][0],o[0][1])+" "+i.applyToPointStringified(a[0][0],a[0][1]),u+="z"),u},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix,r={createRenderFunction:n};function n(f){switch(f.ty){case"fl":return a;case"gf":return u;case"gs":return l;case"st":return c;case"sh":case"el":case"rc":case"sr":return o;case"tr":return i;case"no":return s;default:return null}}function i(f,h,p){(p||h.transform.op._mdf)&&h.transform.container.setAttribute("opacity",h.transform.op.v),(p||h.transform.mProps._mdf)&&h.transform.container.setAttribute("transform",h.transform.mProps.v.to2dCSS())}function s(){}function o(f,h,p){var d,m,b,g,C,y,E=h.styles.length,I=h.lvl,T,R,F,q;for(y=0;y<E;y+=1){if(g=h.sh._mdf||p,h.styles[y].lvl<I){for(R=t.reset(),F=I-h.styles[y].lvl,q=h.transformers.length-1;!g&&F>0;)g=h.transformers[q].mProps._mdf||g,F-=1,q-=1;if(g)for(F=I-h.styles[y].lvl,q=h.transformers.length-1;F>0;)R.multiply(h.transformers[q].mProps.v),F-=1,q-=1}else R=e;if(T=h.sh.paths,m=T._length,g){for(b="",d=0;d<m;d+=1)C=T.shapes[d],C&&C._length&&(b+=buildShapeString(C,C._length,C.c,R));h.caches[y]=b}else b=h.caches[y];h.styles[y].d+=f.hd===!0?"":b,h.styles[y]._mdf=g||h.styles[y]._mdf}}function a(f,h,p){var d=h.style;(h.c._mdf||p)&&d.pElem.setAttribute("fill","rgb("+bmFloor(h.c.v[0])+","+bmFloor(h.c.v[1])+","+bmFloor(h.c.v[2])+")"),(h.o._mdf||p)&&d.pElem.setAttribute("fill-opacity",h.o.v)}function l(f,h,p){u(f,h,p),c(f,h,p)}function u(f,h,p){var d=h.gf,m=h.g._hasOpacity,b=h.s.v,g=h.e.v;if(h.o._mdf||p){var C=f.ty==="gf"?"fill-opacity":"stroke-opacity";h.style.pElem.setAttribute(C,h.o.v)}if(h.s._mdf||p){var y=f.t===1?"x1":"cx",E=y==="x1"?"y1":"cy";d.setAttribute(y,b[0]),d.setAttribute(E,b[1]),m&&!h.g._collapsable&&(h.of.setAttribute(y,b[0]),h.of.setAttribute(E,b[1]))}var I,T,R,F;if(h.g._cmdf||p){I=h.cst;var q=h.g.c;for(R=I.length,T=0;T<R;T+=1)F=I[T],F.setAttribute("offset",q[T*4]+"%"),F.setAttribute("stop-color","rgb("+q[T*4+1]+","+q[T*4+2]+","+q[T*4+3]+")")}if(m&&(h.g._omdf||p)){var Z=h.g.o;for(h.g._collapsable?I=h.cst:I=h.ost,R=I.length,T=0;T<R;T+=1)F=I[T],h.g._collapsable||F.setAttribute("offset",Z[T*2]+"%"),F.setAttribute("stop-opacity",Z[T*2+1])}if(f.t===1)(h.e._mdf||p)&&(d.setAttribute("x2",g[0]),d.setAttribute("y2",g[1]),m&&!h.g._collapsable&&(h.of.setAttribute("x2",g[0]),h.of.setAttribute("y2",g[1])));else{var W;if((h.s._mdf||h.e._mdf||p)&&(W=Math.sqrt(Math.pow(b[0]-g[0],2)+Math.pow(b[1]-g[1],2)),d.setAttribute("r",W),m&&!h.g._collapsable&&h.of.setAttribute("r",W)),h.e._mdf||h.h._mdf||h.a._mdf||p){W||(W=Math.sqrt(Math.pow(b[0]-g[0],2)+Math.pow(b[1]-g[1],2)));var z=Math.atan2(g[1]-b[1],g[0]-b[0]),ee=h.h.v;ee>=1?ee=.99:ee<=-1&&(ee=-.99);var se=W*ee,G=Math.cos(z+h.a.v)*se+b[0],P=Math.sin(z+h.a.v)*se+b[1];d.setAttribute("fx",G),d.setAttribute("fy",P),m&&!h.g._collapsable&&(h.of.setAttribute("fx",G),h.of.setAttribute("fy",P))}}}function c(f,h,p){var d=h.style,m=h.d;m&&(m._mdf||p)&&m.dashStr&&(d.pElem.setAttribute("stroke-dasharray",m.dashStr),d.pElem.setAttribute("stroke-dashoffset",m.dashoffset[0])),h.c&&(h.c._mdf||p)&&d.pElem.setAttribute("stroke","rgb("+bmFloor(h.c.v[0])+","+bmFloor(h.c.v[1])+","+bmFloor(h.c.v[2])+")"),(h.o._mdf||p)&&d.pElem.setAttribute("stroke-opacity",h.o.v),(h.w._mdf||p)&&(d.pElem.setAttribute("stroke-width",h.w.v),d.msElem&&d.msElem.setAttribute("stroke-width",h.w.v))}return r}();function SVGShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,r),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 e,t=this.shapes.length,r,n,i=this.stylesList.length,s,o=[],a=!1;for(n=0;n<i;n+=1){for(s=this.stylesList[n],a=!1,o.length=0,e=0;e<t;e+=1)r=this.shapes[e],r.styles.indexOf(s)!==-1&&(o.push(r),a=r._isAnimated||a);o.length>1&&a&&this.setShapesAsAnimated(o)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var r,n=new SVGStyleData(e,t),i=n.pElem;if(e.ty==="st")r=new SVGStrokeStyleData(this,e,n);else if(e.ty==="fl")r=new SVGFillStyleData(this,e,n);else if(e.ty==="gf"||e.ty==="gs"){var s=e.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData;r=new s(this,e,n),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),i.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))}else e.ty==="no"&&(r=new SVGNoStyleData(this,e,n));return(e.ty==="st"||e.ty==="gs")&&(i.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),i.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),i.setAttribute("fill-opacity","0"),e.lj===1&&i.setAttribute("stroke-miterlimit",e.ml)),e.r===2&&i.setAttribute("fill-rule","evenodd"),e.ln&&i.setAttribute("id",e.ln),e.cl&&i.setAttribute("class",e.cl),e.bm&&(i.style["mix-blend-mode"]=getBlendMode(e.bm)),this.stylesList.push(n),this.addToAnimatedContents(e,r),r},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute("id",e.ln),e.cl&&t.gr.setAttribute("class",e.cl),e.bm&&(t.gr.style["mix-blend-mode"]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var r=TransformPropertyFactory.getTransformProperty(this,e,this),n=new SVGTransformData(r,r.o,t);return this.addToAnimatedContents(e,n),n},SVGShapeElement.prototype.createShapeElement=function(e,t,r){var n=4;e.ty==="rc"?n=5:e.ty==="el"?n=6:e.ty==="sr"&&(n=7);var i=ShapePropertyFactory.getShapeProp(this,e,n,this),s=new SVGShapeData(t,r,i);return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(e,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var r=0,n=this.animatedContents.length;r<n;){if(this.animatedContents[r].element===t)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t=e.styles,r,n=this.stylesList.length;for(r=0;r<n;r+=1)this.stylesList[r].closed||t.push(this.stylesList[r])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,r,n,i,s,o){var a=[].concat(s),l,u=e.length-1,c,f,h=[],p=[],d,m,b;for(l=u;l>=0;l-=1){if(b=this.searchProcessedElement(e[l]),b?t[l]=r[b-1]:e[l]._render=o,e[l].ty==="fl"||e[l].ty==="st"||e[l].ty==="gf"||e[l].ty==="gs"||e[l].ty==="no")b?t[l].style.closed=!1:t[l]=this.createStyleElement(e[l],i),e[l]._render&&t[l].style.pElem.parentNode!==n&&n.appendChild(t[l].style.pElem),h.push(t[l].style);else if(e[l].ty==="gr"){if(!b)t[l]=this.createGroupElement(e[l]);else for(f=t[l].it.length,c=0;c<f;c+=1)t[l].prevViewData[c]=t[l].it[c];this.searchShapes(e[l].it,t[l].it,t[l].prevViewData,t[l].gr,i+1,a,o),e[l]._render&&t[l].gr.parentNode!==n&&n.appendChild(t[l].gr)}else e[l].ty==="tr"?(b||(t[l]=this.createTransformElement(e[l],n)),d=t[l].transform,a.push(d)):e[l].ty==="sh"||e[l].ty==="rc"||e[l].ty==="el"||e[l].ty==="sr"?(b||(t[l]=this.createShapeElement(e[l],a,i)),this.setElementStyles(t[l])):e[l].ty==="tm"||e[l].ty==="rd"||e[l].ty==="ms"||e[l].ty==="pb"||e[l].ty==="zz"||e[l].ty==="op"?(b?(m=t[l],m.closed=!1):(m=ShapeModifiers.getModifier(e[l].ty),m.init(this,e[l]),t[l]=m,this.shapeModifiers.push(m)),p.push(m)):e[l].ty==="rp"&&(b?(m=t[l],m.closed=!0):(m=ShapeModifiers.getModifier(e[l].ty),t[l]=m,m.init(this,e,l,t),this.shapeModifiers.push(m),o=!1),p.push(m));this.addProcessedElement(e[l],l+1)}for(u=h.length,l=0;l<u;l+=1)h[l].closed=!0;for(u=p.length,l=0;l<u;l+=1)p[l].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d="M0 0"+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var e,t=this.animatedContents.length,r;for(e=0;e<t;e+=1)r=this.animatedContents[e],(this._isFirstFrame||r.element._isAnimated)&&r.data!==!0&&r.fn(r.data,r.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(e,t,r,n,i,s){this.o=e,this.sw=t,this.sc=r,this.fc=n,this.m=i,this.p=s,this._mdf={o:!0,sw:!!t,sc:!!r,fc:!!n,m:!0,p:!0}}LetterProps.prototype.update=function(e,t,r,n,i,s){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 o=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,o=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,o=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,o=!0),this.fc!==n&&(this.fc=n,this._mdf.fc=!0,o=!0),this.m!==i&&(this.m=i,this._mdf.m=!0,o=!0),s.length&&(this.p[0]!==s[0]||this.p[1]!==s[1]||this.p[4]!==s[4]||this.p[5]!==s[5]||this.p[12]!==s[12]||this.p[13]!==s[13])&&(this.p=s,this._mdf.p=!0,o=!0),o};function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,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(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!e)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,r=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var n,i=this.effectsSequence.length,s=e||this.data.d.k[this.keysIndex].s;for(n=0;n<i;n+=1)r!==this.keysIndex?s=this.effectsSequence[n](s,s.t):s=this.effectsSequence[n](this.currentData,s.t);t!==s&&this.setCurrentData(s),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,r=0,n=e.length;r<=n-1&&!(r===n-1||e[r+1].t>t);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t=[],r=0,n=e.length,i,s,o=!1,a=!1,l="";r<n;)o=a,a=!1,i=e.charCodeAt(r),l=e.charAt(r),FontManager.isCombinedCharacter(i)?o=!0:i>=55296&&i<=56319?FontManager.isRegionalFlag(e,r)?l=e.substr(r,14):(s=e.charCodeAt(r+1),s>=56320&&s<=57343&&(FontManager.isModifier(i,s)?(l=e.substr(r,2),o=!0):FontManager.isFlagEmoji(e.substr(r,4))?l=e.substr(r,4):l=e.substr(r,2))):i>56319?(s=e.charCodeAt(r+1),FontManager.isVariationSelector(i)&&(o=!0)):FontManager.isZeroWidthJoiner(i)&&(o=!0,a=!0),o?(t[t.length-1]+=l,o=!1):t.push(l),r+=l.length;return t},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t=this.elem.globalData.fontManager,r=this.data,n=[],i,s,o,a=0,l,u=r.m.g,c=0,f=0,h=0,p=[],d=0,m=0,b,g,C=t.getFontByName(e.f),y,E=0,I=getFontProperties(C);e.fWeight=I.weight,e.fStyle=I.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),s=e.finalText.length,e.finalLineHeight=e.lh;var T=e.tr/1e3*e.finalSize,R;if(e.sz)for(var F=!0,q=e.sz[0],Z=e.sz[1],W,z;F;){z=this.buildFinalText(e.t),W=0,d=0,s=z.length,T=e.tr/1e3*e.finalSize;var ee=-1;for(i=0;i<s;i+=1)R=z[i].charCodeAt(0),o=!1,z[i]===" "?ee=i:(R===13||R===3)&&(d=0,o=!0,W+=e.finalLineHeight||e.finalSize*1.2),t.chars?(y=t.getCharData(z[i],C.fStyle,C.fFamily),E=o?0:y.w*e.finalSize/100):E=t.measureText(z[i],e.f,e.finalSize),d+E>q&&z[i]!==" "?(ee===-1?s+=1:i=ee,W+=e.finalLineHeight||e.finalSize*1.2,z.splice(i,ee===i?1:0,"\r"),ee=-1,d=0):(d+=E,d+=T);W+=C.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&Z<W?(e.finalSize-=1,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=z,s=e.finalText.length,F=!1)}d=-T,E=0;var se=0,G;for(i=0;i<s;i+=1)if(o=!1,G=e.finalText[i],R=G.charCodeAt(0),R===13||R===3?(se=0,p.push(d),m=d>m?d:m,d=-2*T,l="",o=!0,h+=1):l=G,t.chars?(y=t.getCharData(G,C.fStyle,t.getFontByName(e.f).fFamily),E=o?0:y.w*e.finalSize/100):E=t.measureText(l,e.f,e.finalSize),G===" "?se+=E+T:(d+=E+T+se,se=0),n.push({l:E,an:E,add:c,n:o,anIndexes:[],val:l,line:h,animatorJustifyOffset:0}),u==2){if(c+=E,l===""||l===" "||i===s-1){for((l===""||l===" ")&&(c-=E);f<=i;)n[f].an=c,n[f].ind=a,n[f].extra=E,f+=1;a+=1,c=0}}else if(u==3){if(c+=E,l===""||i===s-1){for(l===""&&(c-=E);f<=i;)n[f].an=c,n[f].ind=a,n[f].extra=E,f+=1;c=0,a+=1}}else n[a].ind=a,n[a].extra=0,a+=1;if(e.l=n,m=d>m?d:m,p.push(d),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=m,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=p;var P=r.a,k,w;g=P.length;var D,j,B=[];for(b=0;b<g;b+=1){for(k=P[b],k.a.sc&&(e.strokeColorAnim=!0),k.a.sw&&(e.strokeWidthAnim=!0),(k.a.fc||k.a.fh||k.a.fs||k.a.fb)&&(e.fillColorAnim=!0),j=0,D=k.s.b,i=0;i<s;i+=1)w=n[i],w.anIndexes[b]=j,(D==1&&w.val!==""||D==2&&w.val!==""&&w.val!==" "||D==3&&(w.n||w.val==" "||i==s-1)||D==4&&(w.n||i==s-1))&&(k.s.rn===1&&B.push(j),j+=1);r.a[b].s.totalChars=j;var J=-1,ae;if(k.s.rn===1)for(i=0;i<s;i+=1)w=n[i],J!=w.anIndexes[b]&&(J=w.anIndexes[b],ae=B.splice(Math.floor(Math.random()*B.length),1)[0]),w.anIndexes[b]=ae}e.yOffset=e.finalLineHeight||e.finalSize*1.2,e.ls=e.ls||0,e.ascent=C.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=t===void 0?this.keysIndex:t;var r=this.copyData({},this.data.d.k[t].s);r=this.copyData(r,e),this.data.d.k[t].s=r,this.recalculate(t),this.setCurrentData(r),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,r=Math.floor;function n(s,o){this._currentTextLength=-1,this.k=!1,this.data=o,this.elem=s,this.comp=s.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(s),this.s=PropertyFactory.getProp(s,o.s||{k:0},0,0,this),"e"in o?this.e=PropertyFactory.getProp(s,o.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(s,o.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(s,o.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(s,o.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(s,o.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(s,o.a,0,.01,this),this.dynamicProperties.length||this.getValue()}n.prototype={getMult:function(o){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var a=0,l=0,u=1,c=1;this.ne.v>0?a=this.ne.v/100:l=-this.ne.v/100,this.xe.v>0?u=1-this.xe.v/100:c=1+this.xe.v/100;var f=BezierFactory.getBezierEasing(a,l,u,c).get,h=0,p=this.finalS,d=this.finalE,m=this.data.sh;if(m===2)d===p?h=o>=d?1:0:h=e(0,t(.5/(d-p)+(o-p)/(d-p),1)),h=f(h);else if(m===3)d===p?h=o>=d?0:1:h=1-e(0,t(.5/(d-p)+(o-p)/(d-p),1)),h=f(h);else if(m===4)d===p?h=0:(h=e(0,t(.5/(d-p)+(o-p)/(d-p),1)),h<.5?h*=2:h=1-2*(h-.5)),h=f(h);else if(m===5){if(d===p)h=0;else{var b=d-p;o=t(e(0,o+.5-p),d-p);var g=-b/2+o,C=b/2;h=Math.sqrt(1-g*g/(C*C))}h=f(h)}else m===6?(d===p?h=0:(o=t(e(0,o+.5-p),d-p),h=(1+Math.cos(Math.PI+Math.PI*2*o/(d-p)))/2),h=f(h)):(o>=r(p)&&(o-p<0?h=e(0,t(t(d,1)-(p-o),1)):h=e(0,t(d-o,1))),h=f(h));if(this.sm.v!==100){var y=this.sm.v*.01;y===0&&(y=1e-8);var E=.5-y*.5;h<E?h=0:(h=(h-E)/y,h>1&&(h=1))}return h*this.a.v},getValue:function(o){this.iterateDynamicProperties(),this._mdf=o||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,o&&this.data.r===2&&(this.e.v=this._currentTextLength);var a=this.data.r===2?1:100/this.data.totalChars,l=this.o.v/a,u=this.s.v/a+l,c=this.e.v/a+l;if(u>c){var f=u;u=c,c=f}this.finalS=u,this.finalE=c}},extendPrototype([DynamicPropertyContainer],n);function i(s,o,a){return new n(s,o,a)}return{getTextSelectorProp:i}}();function TextAnimatorDataProperty(e,t,r){var n={propType:!1},i=PropertyFactory.getProp,s=t.a;this.a={r:s.r?i(e,s.r,0,degToRads,r):n,rx:s.rx?i(e,s.rx,0,degToRads,r):n,ry:s.ry?i(e,s.ry,0,degToRads,r):n,sk:s.sk?i(e,s.sk,0,degToRads,r):n,sa:s.sa?i(e,s.sa,0,degToRads,r):n,s:s.s?i(e,s.s,1,.01,r):n,a:s.a?i(e,s.a,1,0,r):n,o:s.o?i(e,s.o,0,.01,r):n,p:s.p?i(e,s.p,1,0,r):n,sw:s.sw?i(e,s.sw,0,0,r):n,sc:s.sc?i(e,s.sc,1,0,r):n,fc:s.fc?i(e,s.fc,1,0,r):n,fh:s.fh?i(e,s.fh,0,0,r):n,fs:s.fs?i(e,s.fs,0,.01,r):n,fb:s.fb?i(e,s.fb,0,.01,r):n,t:s.t?i(e,s.t,0,0,r):n},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,r),this.s.t=t.s.t}function TextAnimatorProperty(e,t,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}TextAnimatorProperty.prototype.searchProperties=function(){var e,t=this._textData.a.length,r,n=PropertyFactory.getProp;for(e=0;e<t;e+=1)r=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,r,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:n(this._elem,this._textData.p.a,0,0,this),f:n(this._elem,this._textData.p.f,0,0,this),l:n(this._elem,this._textData.p.l,0,0,this),r:n(this._elem,this._textData.p.r,0,0,this),p:n(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=n(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,!(!this._mdf&&!this._isFirstFrame&&!t&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var r=this._moreOptions.alignment.v,n=this._animatorsData,i=this._textData,s=this.mHelper,o=this._renderType,a=this.renderedLetters.length,l,u,c,f,h=e.l,p,d,m,b,g,C,y,E,I,T,R,F,q,Z,W;if(this._hasMaskedPath){if(W=this._pathData.m,!this._pathData.n||this._pathData._mdf){var z=W.v;this._pathData.r.v&&(z=z.reverse()),p={tLength:0,segments:[]},f=z._length-1;var ee;for(F=0,c=0;c<f;c+=1)ee=bez.buildBezierData(z.v[c],z.v[c+1],[z.o[c][0]-z.v[c][0],z.o[c][1]-z.v[c][1]],[z.i[c+1][0]-z.v[c+1][0],z.i[c+1][1]-z.v[c+1][1]]),p.tLength+=ee.segmentLength,p.segments.push(ee),F+=ee.segmentLength;c=f,W.v.c&&(ee=bez.buildBezierData(z.v[c],z.v[0],[z.o[c][0]-z.v[c][0],z.o[c][1]-z.v[c][1]],[z.i[0][0]-z.v[0][0],z.i[0][1]-z.v[0][1]]),p.tLength+=ee.segmentLength,p.segments.push(ee),F+=ee.segmentLength),this._pathData.pi=p}if(p=this._pathData.pi,d=this._pathData.f.v,y=0,C=1,b=0,g=!0,T=p.segments,d<0&&W.v.c)for(p.tLength<Math.abs(d)&&(d=-Math.abs(d)%p.tLength),y=T.length-1,I=T[y].points,C=I.length-1;d<0;)d+=I[C].partialLength,C-=1,C<0&&(y-=1,I=T[y].points,C=I.length-1);I=T[y].points,E=I[C-1],m=I[C],R=m.partialLength}f=h.length,l=0,u=0;var se=e.finalSize*1.2*.714,G=!0,P,k,w,D,j;D=n.length;var B,J=-1,ae,pe,Ie,ge=d,we=y,rt=C,ht=-1,Be,We,st,Te,oe,yt,Qr,Fr,Lr="",Or=this.defaultPropsArray,Yr;if(e.j===2||e.j===1){var or=0,pn=0,mn=e.j===2?-.5:-1,ar=0,gn=!0;for(c=0;c<f;c+=1)if(h[c].n){for(or&&(or+=pn);ar<c;)h[ar].animatorJustifyOffset=or,ar+=1;or=0,gn=!0}else{for(w=0;w<D;w+=1)P=n[w].a,P.t.propType&&(gn&&e.j===2&&(pn+=P.t.v*mn),k=n[w].s,B=k.getMult(h[c].anIndexes[w],i.a[w].s.totalChars),B.length?or+=P.t.v*B[0]*mn:or+=P.t.v*B*mn);gn=!1}for(or&&(or+=pn);ar<c;)h[ar].animatorJustifyOffset=or,ar+=1}for(c=0;c<f;c+=1){if(s.reset(),Be=1,h[c].n)l=0,u+=e.yOffset,u+=G?1:0,d=ge,G=!1,this._hasMaskedPath&&(y=we,C=rt,I=T[y].points,E=I[C-1],m=I[C],R=m.partialLength,b=0),Lr="",Fr="",yt="",Yr="",Or=this.defaultPropsArray;else{if(this._hasMaskedPath){if(ht!==h[c].line){switch(e.j){case 1:d+=F-e.lineWidths[h[c].line];break;case 2:d+=(F-e.lineWidths[h[c].line])/2;break;default:break}ht=h[c].line}J!==h[c].ind&&(h[J]&&(d+=h[J].extra),d+=h[c].an/2,J=h[c].ind),d+=r[0]*h[c].an*.005;var Je=0;for(w=0;w<D;w+=1)P=n[w].a,P.p.propType&&(k=n[w].s,B=k.getMult(h[c].anIndexes[w],i.a[w].s.totalChars),B.length?Je+=P.p.v[0]*B[0]:Je+=P.p.v[0]*B),P.a.propType&&(k=n[w].s,B=k.getMult(h[c].anIndexes[w],i.a[w].s.totalChars),B.length?Je+=P.a.v[0]*B[0]:Je+=P.a.v[0]*B);for(g=!0,this._pathData.a.v&&(d=h[0].an*.5+(F-this._pathData.f.v-h[0].an*.5-h[h.length-1].an*.5)*J/(f-1),d+=this._pathData.f.v);g;)b+R>=d+Je||!I?(q=(d+Je-b)/m.partialLength,pe=E.point[0]+(m.point[0]-E.point[0])*q,Ie=E.point[1]+(m.point[1]-E.point[1])*q,s.translate(-r[0]*h[c].an*.005,-(r[1]*se)*.01),g=!1):I&&(b+=m.partialLength,C+=1,C>=I.length&&(C=0,y+=1,T[y]?I=T[y].points:W.v.c?(C=0,y=0,I=T[y].points):(b-=m.partialLength,I=null)),I&&(E=m,m=I[C],R=m.partialLength));ae=h[c].an/2-h[c].add,s.translate(-ae,0,0)}else ae=h[c].an/2-h[c].add,s.translate(-ae,0,0),s.translate(-r[0]*h[c].an*.005,-r[1]*se*.01,0);for(w=0;w<D;w+=1)P=n[w].a,P.t.propType&&(k=n[w].s,B=k.getMult(h[c].anIndexes[w],i.a[w].s.totalChars),(l!==0||e.j!==0)&&(this._hasMaskedPath?B.length?d+=P.t.v*B[0]:d+=P.t.v*B:B.length?l+=P.t.v*B[0]:l+=P.t.v*B));for(e.strokeWidthAnim&&(st=e.sw||0),e.strokeColorAnim&&(e.sc?We=[e.sc[0],e.sc[1],e.sc[2]]:We=[0,0,0]),e.fillColorAnim&&e.fc&&(Te=[e.fc[0],e.fc[1],e.fc[2]]),w=0;w<D;w+=1)P=n[w].a,P.a.propType&&(k=n[w].s,B=k.getMult(h[c].anIndexes[w],i.a[w].s.totalChars),B.length?s.translate(-P.a.v[0]*B[0],-P.a.v[1]*B[1],P.a.v[2]*B[2]):s.translate(-P.a.v[0]*B,-P.a.v[1]*B,P.a.v[2]*B));for(w=0;w<D;w+=1)P=n[w].a,P.s.propType&&(k=n[w].s,B=k.getMult(h[c].anIndexes[w],i.a[w].s.totalChars),B.length?s.scale(1+(P.s.v[0]-1)*B[0],1+(P.s.v[1]-1)*B[1],1):s.scale(1+(P.s.v[0]-1)*B,1+(P.s.v[1]-1)*B,1));for(w=0;w<D;w+=1){if(P=n[w].a,k=n[w].s,B=k.getMult(h[c].anIndexes[w],i.a[w].s.totalChars),P.sk.propType&&(B.length?s.skewFromAxis(-P.sk.v*B[0],P.sa.v*B[1]):s.skewFromAxis(-P.sk.v*B,P.sa.v*B)),P.r.propType&&(B.length?s.rotateZ(-P.r.v*B[2]):s.rotateZ(-P.r.v*B)),P.ry.propType&&(B.length?s.rotateY(P.ry.v*B[1]):s.rotateY(P.ry.v*B)),P.rx.propType&&(B.length?s.rotateX(P.rx.v*B[0]):s.rotateX(P.rx.v*B)),P.o.propType&&(B.length?Be+=(P.o.v*B[0]-Be)*B[0]:Be+=(P.o.v*B-Be)*B),e.strokeWidthAnim&&P.sw.propType&&(B.length?st+=P.sw.v*B[0]:st+=P.sw.v*B),e.strokeColorAnim&&P.sc.propType)for(oe=0;oe<3;oe+=1)B.length?We[oe]+=(P.sc.v[oe]-We[oe])*B[0]:We[oe]+=(P.sc.v[oe]-We[oe])*B;if(e.fillColorAnim&&e.fc){if(P.fc.propType)for(oe=0;oe<3;oe+=1)B.length?Te[oe]+=(P.fc.v[oe]-Te[oe])*B[0]:Te[oe]+=(P.fc.v[oe]-Te[oe])*B;P.fh.propType&&(B.length?Te=addHueToRGB(Te,P.fh.v*B[0]):Te=addHueToRGB(Te,P.fh.v*B)),P.fs.propType&&(B.length?Te=addSaturationToRGB(Te,P.fs.v*B[0]):Te=addSaturationToRGB(Te,P.fs.v*B)),P.fb.propType&&(B.length?Te=addBrightnessToRGB(Te,P.fb.v*B[0]):Te=addBrightnessToRGB(Te,P.fb.v*B))}}for(w=0;w<D;w+=1)P=n[w].a,P.p.propType&&(k=n[w].s,B=k.getMult(h[c].anIndexes[w],i.a[w].s.totalChars),this._hasMaskedPath?B.length?s.translate(0,P.p.v[1]*B[0],-P.p.v[2]*B[1]):s.translate(0,P.p.v[1]*B,-P.p.v[2]*B):B.length?s.translate(P.p.v[0]*B[0],P.p.v[1]*B[1],-P.p.v[2]*B[2]):s.translate(P.p.v[0]*B,P.p.v[1]*B,-P.p.v[2]*B));if(e.strokeWidthAnim&&(yt=st<0?0:st),e.strokeColorAnim&&(Qr="rgb("+Math.round(We[0]*255)+","+Math.round(We[1]*255)+","+Math.round(We[2]*255)+")"),e.fillColorAnim&&e.fc&&(Fr="rgb("+Math.round(Te[0]*255)+","+Math.round(Te[1]*255)+","+Math.round(Te[2]*255)+")"),this._hasMaskedPath){if(s.translate(0,-e.ls),s.translate(0,r[1]*se*.01+u,0),this._pathData.p.v){Z=(m.point[1]-E.point[1])/(m.point[0]-E.point[0]);var jn=Math.atan(Z)*180/Math.PI;m.point[0]<E.point[0]&&(jn+=180),s.rotate(-jn*Math.PI/180)}s.translate(pe,Ie,0),d-=r[0]*h[c].an*.005,h[c+1]&&J!==h[c+1].ind&&(d+=h[c].an/2,d+=e.tr*.001*e.finalSize)}else{switch(s.translate(l,u,0),e.ps&&s.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:s.translate(h[c].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[h[c].line]),0,0);break;case 2:s.translate(h[c].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[h[c].line])/2,0,0);break;default:break}s.translate(0,-e.ls),s.translate(ae,0,0),s.translate(r[0]*h[c].an*.005,r[1]*se*.01,0),l+=h[c].l+e.tr*.001*e.finalSize}o==="html"?Lr=s.toCSS():o==="svg"?Lr=s.to2dCSS():Or=[s.props[0],s.props[1],s.props[2],s.props[3],s.props[4],s.props[5],s.props[6],s.props[7],s.props[8],s.props[9],s.props[10],s.props[11],s.props[12],s.props[13],s.props[14],s.props[15]],Yr=Be}a<=c?(j=new LetterProps(Yr,yt,Qr,Fr,Lr,Or),this.renderedLetters.push(j),a+=1,this.lettersChangedFlag=!0):(j=this.renderedLetters[c],this.lettersChangedFlag=j.update(Yr,yt,Qr,Fr,Lr,Or)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(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(e,t,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,r),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var r,n=t.length,i,s="";for(r=0;r<n;r+=1)t[r].ty==="sh"&&(i=t[r].ks.k,s+=buildShapeString(i,i.i.length,!0,e));return s},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,r,n,i){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[r]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[r])/2,0,0);break;default:break}t.translate(n,i,0)},ITextElement.prototype.buildColor=function(e){return"rgb("+Math.round(e[0]*255)+","+Math.round(e[1]*255)+","+Math.round(e[2]*255)+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(e,t,r){this.textSpans=[],this.renderType="svg",this.initElement(e,t,r)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(e){for(var t=0,r=e.length,n=[],i="";t<r;)e[t]==="\r"||e[t]===""?(n.push(i),i=""):i+=e[t],t+=1;return n.push(i),n},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var r=e.shapes[0];if(r.it){var n=r.it[r.it.length-1];n.s&&(n.s.k[0]=t,n.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var e,t,r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var n=this.globalData.fontManager.getFontByName(r.f);if(n.fClass)this.layerElement.setAttribute("class",n.fClass);else{this.layerElement.setAttribute("font-family",n.fFamily);var i=r.fWeight,s=r.fStyle;this.layerElement.setAttribute("font-style",s),this.layerElement.setAttribute("font-weight",i)}this.layerElement.setAttribute("aria-label",r.t);var o=r.l||[],a=!!this.globalData.fontManager.chars;t=o.length;var l,u=this.mHelper,c="",f=this.data.singleShape,h=0,p=0,d=!0,m=r.tr*.001*r.finalSize;if(f&&!a&&!r.sz){var b=this.textContainer,g="start";switch(r.j){case 1:g="end";break;case 2:g="middle";break;default:g="start";break}b.setAttribute("text-anchor",g),b.setAttribute("letter-spacing",m);var C=this.buildTextContents(r.finalText);for(t=C.length,p=r.ps?r.ps[1]+r.ascent:0,e=0;e<t;e+=1)l=this.textSpans[e].span||createNS("tspan"),l.textContent=C[e],l.setAttribute("x",0),l.setAttribute("y",p),l.style.display="inherit",b.appendChild(l),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=l,p+=r.finalLineHeight;this.layerElement.appendChild(b)}else{var y=this.textSpans.length,E;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!a||!f||e===0){if(l=y>e?this.textSpans[e].span:createNS(a?"g":"text"),y<=e){if(l.setAttribute("stroke-linecap","butt"),l.setAttribute("stroke-linejoin","round"),l.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=l,a){var I=createNS("g");l.appendChild(I),this.textSpans[e].childSpan=I}this.textSpans[e].span=l,this.layerElement.appendChild(l)}l.style.display="inherit"}if(u.reset(),f&&(o[e].n&&(h=-m,p+=r.yOffset,p+=d?1:0,d=!1),this.applyTextPropertiesToMatrix(r,u,o[e].line,h,p),h+=o[e].l||0,h+=m),a){E=this.globalData.fontManager.getCharData(r.finalText[e],n.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily);var T;if(E.t===1)T=new SVGCompElement(E.data,this.globalData,this);else{var R=emptyShapeData;E.data&&E.data.shapes&&(R=this.buildShapeData(E.data,r.finalSize)),T=new SVGShapeElement(R,this.globalData,this)}if(this.textSpans[e].glyph){var F=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(F.layerElement),F.destroy()}this.textSpans[e].glyph=T,T._debug=!0,T.prepareFrame(0),T.renderFrame(),this.textSpans[e].childSpan.appendChild(T.layerElement),E.t===1&&this.textSpans[e].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else f&&l.setAttribute("transform","translate("+u.props[12]+","+u.props[13]+")"),l.textContent=o[e].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}f&&l&&l.setAttribute("d",c)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display="none",e+=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 e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t=this.textSpans.length,r;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<t;e+=1)r=this.textSpans[e].glyph,r&&(r.prepareFrame(this.comp.renderedFrame-this.data.st),r._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var e,t,r=this.textAnimator.renderedLetters,n=this.textProperty.currentData.l;t=n.length;var i,s,o;for(e=0;e<t;e+=1)n[e].n||(i=r[e],s=this.textSpans[e].span,o=this.textSpans[e].glyph,o&&o.renderFrame(),i._mdf.m&&s.setAttribute("transform",i.m),i._mdf.o&&s.setAttribute("opacity",i.o),i._mdf.sw&&s.setAttribute("stroke-width",i.sw),i._mdf.sc&&s.setAttribute("stroke",i.sc),i._mdf.fc&&s.setAttribute("fill",i.fc))}};function ISolidElement(e,t,r){this.initElement(e,t,r)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS("rect");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.layerElement.appendChild(e)};function NullElement(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initFrame(),this.initTransform(e,t,r),this.initHierarchy()}NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!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(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){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):this.svgElement.setAttribute("viewBox","0 0 "+e.w+" "+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",e.w),this.svgElement.setAttribute("height",e.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),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),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 t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var r=createNS("clipPath"),n=createNS("rect");n.setAttribute("width",e.w),n.setAttribute("height",e.h),n.setAttribute("x",0),n.setAttribute("y",0);var i=createElementID();r.setAttribute("id",i),r.appendChild(n),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+i+")"),t.appendChild(r),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e,t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,r=this.layers.length;for(t=0;t<r;t+=1)if(this.layers[t].ind===e)return t;return-1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){t[e]=!0;var r=this.createItem(this.layers[e]);if(t[e]=r,getExpressionsPlugin()&&(this.layers[e].ty===0&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,e),this.layers[e].tt){var n="tp"in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(n===-1)return;if(!this.elements[n]||this.elements[n]===!0)this.buildItem(n),this.addPendingElement(r);else{var i=t[n],s=i.getMatte(this.layers[e].tt);r.setMatte(s)}}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,r=this.elements.length;t<r;){if(this.elements[t]===e){var n="tp"in e.data?this.findIndexByInd(e.data.tp):t-1,i=this.elements[n],s=i.getMatte(this.layers[t].tt);e.setMatte(s);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(!(this.renderedFrame===e||this.destroyed)){e===null?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var t,r=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=r-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<r;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var r=e.getBaseElement();if(r){for(var n=0,i;n<t;)this.elements[n]&&this.elements[n]!==!0&&this.elements[n].getBaseElement()&&(i=this.elements[n].getBaseElement()),n+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},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(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initTransform(e,t,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!t.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var r,n=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(e,t,r){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)};function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(t&&t.title){var n=createNS("title"),i=createElementID();n.setAttribute("id",i),n.textContent=t.title,this.svgElement.appendChild(n),r+=i}if(t&&t.description){var s=createNS("desc"),o=createElementID();s.setAttribute("id",o),s.textContent=t.description,this.svgElement.appendChild(s),r+=" "+o}r&&this.svgElement.setAttribute("aria-labelledby",r);var a=createNS("defs");this.svgElement.appendChild(a);var l=createNS("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&t.hideOnTransparent===!1),viewBoxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||"",id:t&&t.id||"",focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||"100%",height:t&&t.filterSize&&t.filterSize.height||"100%",x:t&&t.filterSize&&t.filterSize.x||"0%",y:t&&t.filterSize&&t.filterSize.y||"0%"},width:t&&t.width,height:t&&t.height,runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:a,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function(t){var r,n=t.length,i="_";for(r=0;r<n;r+=1)i+=t[r].transform.key+"_";var s=this.sequences[i];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=s,this.sequenceList.push(s)),s},processSequence:function(t,r){for(var n=0,i=t.transforms.length,s=r;n<i&&!r;){if(t.transforms[n].transform.mProps._mdf){s=!0;break}n+=1}if(s)for(t.finalTransform.reset(),n=i-1;n>=0;n-=1)t.finalTransform.multiply(t.transforms[n].transform.mProps.v);t._mdf=s},processSequences:function(t){var r,n=this.sequenceList.length;for(r=0;r<n;r+=1)this.processSequence(this.sequenceList[r],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var t="__lottie_element_luma_buffer",r=null,n=null,i=null;function s(){var l=createNS("svg"),u=createNS("filter"),c=createNS("feColorMatrix");return u.setAttribute("id",t),c.setAttribute("type","matrix"),c.setAttribute("color-interpolation-filters","sRGB"),c.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"),u.appendChild(c),l.appendChild(u),l.setAttribute("id",t+"_svg"),featureSupport.svgLumaHidden&&(l.style.display="none"),l}function o(){r||(i=s(),document.body.appendChild(i),r=createTag("canvas"),n=r.getContext("2d"),n.filter="url(#"+t+")",n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1))}function a(l){return r||o(),r.width=l.width,r.height=l.height,n.filter="url(#"+t+")",r}return{load:o,get:a}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var r=createTag("canvas");return r.width=e,r.height=t,r}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}}(),registeredEffects={};function CVEffects(e){var t,r=e.data.ef?e.data.ef.length:0;this.filters=[];var n;for(t=0;t<r;t+=1){n=null;var i=e.data.ef[t].ty;if(registeredEffects[i]){var s=registeredEffects[i].effect;n=new s(e.effectsManager.effectElements[t],e)}n&&this.filters.push(n)}this.filters.length&&e.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(e){var t,r=this.filters.length;for(t=0;t<r;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,r=this.filters.length,n=[];for(t=0;t<r;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n};function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var r,n=this.masksProperties.length,i=!1;for(r=0;r<n;r+=1)this.masksProperties[r].mode!=="n"&&(i=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);this.hasMasks=i,i&&this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e=this.element.finalTransform.mat,t=this.element.canvasContext,r,n=this.masksProperties.length,i,s,o;for(t.beginPath(),r=0;r<n;r+=1)if(this.masksProperties[r].mode!=="n"){this.masksProperties[r].inv&&(t.moveTo(0,0),t.lineTo(this.element.globalData.compSize.w,0),t.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),t.lineTo(0,this.element.globalData.compSize.h),t.lineTo(0,0)),o=this.viewData[r].v,i=e.applyToPointArray(o.v[0][0],o.v[0][1],0),t.moveTo(i[0],i[1]);var a,l=o._length;for(a=1;a<l;a+=1)s=e.applyToTriplePoints(o.o[a-1],o.i[a],o.v[a]),t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);s=e.applyToTriplePoints(o.o[a-1],o.i[0],o.v[0]),t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}this.element.globalData.renderer.save(!0),t.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(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var t=this.globalData.canvasContext,r=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(r);var n=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(n),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(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var r=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=r}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(t){t.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var t=this.buffers[0],r=t.getContext("2d");this.clearCanvas(r),r.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(){if(this.data.tt>=1){var t=this.buffers[1],r=t.getContext("2d");this.clearCanvas(r),r.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 n=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(n.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var i=assetLoader.getLumaCanvas(this.canvasContext.canvas),s=i.getContext("2d");s.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(i,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(t,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(t){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!t)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var r=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(r),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(r),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){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(e,t,r,n){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var i=4;t.ty==="rc"?i=5:t.ty==="el"?i=6:t.ty==="sr"&&(i=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,i,e);var s,o=r.length,a;for(s=0;s<o;s+=1)r[s].closed||(a={transforms:n.addTransformSequence(r[s].transforms),trNodes:[]},this.styledShapes.push(a),r[s].elements.push(a))}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,r)}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(e,t){var r={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:e.hd===!0},n={};if(e.ty==="fl"||e.ty==="st"?(n.c=PropertyFactory.getProp(this,e.c,1,255,this),n.c.k||(r.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):(e.ty==="gf"||e.ty==="gs")&&(n.s=PropertyFactory.getProp(this,e.s,1,null,this),n.e=PropertyFactory.getProp(this,e.e,1,null,this),n.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,e.g,this)),n.o=PropertyFactory.getProp(this,e.o,0,.01,this),e.ty==="st"||e.ty==="gs"){if(r.lc=lineCapEnum[e.lc||2],r.lj=lineJoinEnum[e.lj||2],e.lj==1&&(r.ml=e.ml),n.w=PropertyFactory.getProp(this,e.w,0,null,this),n.w.k||(r.wi=n.w.v),e.d){var i=new DashProperty(this,e.d,"canvas",this);n.d=i,n.d.k||(r.da=n.d.dashArray,r.do=n.d.dashoffset[0])}}else r.r=e.r===2?"evenodd":"nonzero";return this.stylesList.push(r),n.style=r,n},CVShapeElement.prototype.createGroupElement=function(){var e={it:[],prevViewData:[]};return e},CVShapeElement.prototype.createTransformElement=function(e){var t={transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}};return t},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,r=this.stylesList.length;for(t=0;t<r;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,r,n,i){var s,o=e.length-1,a,l,u=[],c=[],f,h,p,d=[].concat(i);for(s=o;s>=0;s-=1){if(f=this.searchProcessedElement(e[s]),f?t[s]=r[f-1]:e[s]._shouldRender=n,e[s].ty==="fl"||e[s].ty==="st"||e[s].ty==="gf"||e[s].ty==="gs")f?t[s].style.closed=!1:t[s]=this.createStyleElement(e[s],d),u.push(t[s].style);else if(e[s].ty==="gr"){if(!f)t[s]=this.createGroupElement(e[s]);else for(l=t[s].it.length,a=0;a<l;a+=1)t[s].prevViewData[a]=t[s].it[a];this.searchShapes(e[s].it,t[s].it,t[s].prevViewData,n,d)}else e[s].ty==="tr"?(f||(p=this.createTransformElement(e[s]),t[s]=p),d.push(t[s]),this.addTransformToStyleList(t[s])):e[s].ty==="sh"||e[s].ty==="rc"||e[s].ty==="el"||e[s].ty==="sr"?f||(t[s]=this.createShapeElement(e[s])):e[s].ty==="tm"||e[s].ty==="rd"||e[s].ty==="pb"||e[s].ty==="zz"||e[s].ty==="op"?(f?(h=t[s],h.closed=!1):(h=ShapeModifiers.getModifier(e[s].ty),h.init(this,e[s]),t[s]=h,this.shapeModifiers.push(h)),c.push(h)):e[s].ty==="rp"&&(f?(h=t[s],h.closed=!0):(h=ShapeModifiers.getModifier(e[s].ty),t[s]=h,h.init(this,e,s,t),this.shapeModifiers.push(h),n=!1),c.push(h));this.addProcessedElement(e[s],s+1)}for(this.removeTransformFromStyleList(),this.closeStyles(u),o=c.length,s=0;s<o;s+=1)c[s].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(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t=this.stylesList.length,r,n,i,s,o,a,l=this.globalData.renderer,u=this.globalData.canvasContext,c,f;for(e=0;e<t;e+=1)if(f=this.stylesList[e],c=f.type,!((c==="st"||c==="gs")&&f.wi===0||!f.data._shouldRender||f.coOp===0||this.globalData.currentGlobalAlpha===0)){for(l.save(),o=f.elements,c==="st"||c==="gs"?(l.ctxStrokeStyle(c==="st"?f.co:f.grd),l.ctxLineWidth(f.wi),l.ctxLineCap(f.lc),l.ctxLineJoin(f.lj),l.ctxMiterLimit(f.ml||0)):l.ctxFillStyle(c==="fl"?f.co:f.grd),l.ctxOpacity(f.coOp),c!=="st"&&c!=="gs"&&u.beginPath(),l.ctxTransform(f.preTransforms.finalTransform.props),n=o.length,r=0;r<n;r+=1){for((c==="st"||c==="gs")&&(u.beginPath(),f.da&&(u.setLineDash(f.da),u.lineDashOffset=f.do)),a=o[r].trNodes,s=a.length,i=0;i<s;i+=1)a[i].t==="m"?u.moveTo(a[i].p[0],a[i].p[1]):a[i].t==="c"?u.bezierCurveTo(a[i].pts[0],a[i].pts[1],a[i].pts[2],a[i].pts[3],a[i].pts[4],a[i].pts[5]):u.closePath();(c==="st"||c==="gs")&&(l.ctxStroke(),f.da&&u.setLineDash(this.dashResetter))}c!=="st"&&c!=="gs"&&this.globalData.renderer.ctxFill(f.r),l.restore()}},CVShapeElement.prototype.renderShape=function(e,t,r,n){var i,s=t.length-1,o;for(o=e,i=s;i>=0;i-=1)t[i].ty==="tr"?(o=r[i].transform,this.renderShapeTransform(e,o)):t[i].ty==="sh"||t[i].ty==="el"||t[i].ty==="rc"||t[i].ty==="sr"?this.renderPath(t[i],r[i]):t[i].ty==="fl"?this.renderFill(t[i],r[i],o):t[i].ty==="st"?this.renderStroke(t[i],r[i],o):t[i].ty==="gf"||t[i].ty==="gs"?this.renderGradientFill(t[i],r[i],o):t[i].ty==="gr"?this.renderShape(o,t[i].it,r[i].it):t[i].ty;n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var r=e.trNodes,n=t.paths,i,s,o,a=n._length;r.length=0;var l=e.transforms.finalTransform;for(o=0;o<a;o+=1){var u=n.shapes[o];if(u&&u.v){for(s=u._length,i=1;i<s;i+=1)i===1&&r.push({t:"m",p:l.applyToPointArray(u.v[0][0],u.v[0][1],0)}),r.push({t:"c",pts:l.applyToTriplePoints(u.o[i-1],u.i[i],u.v[i])});s===1&&r.push({t:"m",p:l.applyToPointArray(u.v[0][0],u.v[0][1],0)}),u.c&&s&&(r.push({t:"c",pts:l.applyToTriplePoints(u.o[i-1],u.i[0],u.v[0])}),r.push({t:"z"}))}}e.trNodes=r}},CVShapeElement.prototype.renderPath=function(e,t){if(e.hd!==!0&&e._shouldRender){var r,n=t.styledShapes.length;for(r=0;r<n;r+=1)this.renderStyledShape(t.styledShapes[r],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,r){var n=t.style;(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,r){var n=t.style,i;if(!n.grd||t.g._mdf||t.s._mdf||t.e._mdf||e.t!==1&&(t.h._mdf||t.a._mdf)){var s=this.globalData.canvasContext,o=t.s.v,a=t.e.v;if(e.t===1)i=s.createLinearGradient(o[0],o[1],a[0],a[1]);else{var l=Math.sqrt(Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)),u=Math.atan2(a[1]-o[1],a[0]-o[0]),c=t.h.v;c>=1?c=.99:c<=-1&&(c=-.99);var f=l*c,h=Math.cos(u+t.a.v)*f+o[0],p=Math.sin(u+t.a.v)*f+o[1];i=s.createRadialGradient(h,p,0,o[0],o[1],l)}var d,m=e.g.p,b=t.g.c,g=1;for(d=0;d<m;d+=1)t.g._hasOpacity&&t.g._collapsable&&(g=t.g.o[d*2+1]),i.addColorStop(b[d*4]/100,"rgba("+b[d*4+1]+","+b[d*4+2]+","+b[d*4+3]+","+g+")");n.grd=i}n.coOp=t.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(e,t,r){var n=t.style,i=t.d;i&&(i._mdf||this._isFirstFrame)&&(n.da=i.dashArray,n.do=i.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*r.opacity),(t.w._mdf||this._isFirstFrame)&&(n.wi=t.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(e,t,r){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(e,t,r)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=t;var r=!1;e.sc&&(r=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var n=this.globalData.fontManager.getFontByName(e.f),i,s,o=e.l,a=this.mHelper;this.stroke=r,this.values.fValue=e.finalSize+"px "+this.globalData.fontManager.getFontByName(e.f).fFamily,s=e.finalText.length;var l,u,c,f,h,p,d,m,b,g,C=this.data.singleShape,y=e.tr*.001*e.finalSize,E=0,I=0,T=!0,R=0;for(i=0;i<s;i+=1){l=this.globalData.fontManager.getCharData(e.finalText[i],n.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily),u=l&&l.data||{},a.reset(),C&&o[i].n&&(E=-y,I+=e.yOffset,I+=T?1:0,T=!1),h=u.shapes?u.shapes[0].it:[],d=h.length,a.scale(e.finalSize/100,e.finalSize/100),C&&this.applyTextPropertiesToMatrix(e,a,o[i].line,E,I),b=createSizedArray(d-1);var F=0;for(p=0;p<d;p+=1)if(h[p].ty==="sh"){for(f=h[p].ks.k.i.length,m=h[p].ks.k,g=[],c=1;c<f;c+=1)c===1&&g.push(a.applyToX(m.v[0][0],m.v[0][1],0),a.applyToY(m.v[0][0],m.v[0][1],0)),g.push(a.applyToX(m.o[c-1][0],m.o[c-1][1],0),a.applyToY(m.o[c-1][0],m.o[c-1][1],0),a.applyToX(m.i[c][0],m.i[c][1],0),a.applyToY(m.i[c][0],m.i[c][1],0),a.applyToX(m.v[c][0],m.v[c][1],0),a.applyToY(m.v[c][0],m.v[c][1],0));g.push(a.applyToX(m.o[c-1][0],m.o[c-1][1],0),a.applyToY(m.o[c-1][0],m.o[c-1][1],0),a.applyToX(m.i[0][0],m.i[0][1],0),a.applyToY(m.i[0][0],m.i[0][1],0),a.applyToX(m.v[0][0],m.v[0][1],0),a.applyToY(m.v[0][0],m.v[0][1],0)),b[F]=g,F+=1}C&&(E+=o[i].l,E+=y),this.textSpans[R]?this.textSpans[R].elem=b:this.textSpans[R]={elem:b},R+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var e=this.canvasContext;e.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 t,r,n,i,s,o,a=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;r=l.length;var u,c=null,f=null,h=null,p,d,m=this.globalData.renderer;for(t=0;t<r;t+=1)if(!l[t].n){if(u=a[t],u&&(m.save(),m.ctxTransform(u.p),m.ctxOpacity(u.o)),this.fill){for(u&&u.fc?c!==u.fc&&(m.ctxFillStyle(u.fc),c=u.fc):c!==this.values.fill&&(c=this.values.fill,m.ctxFillStyle(this.values.fill)),p=this.textSpans[t].elem,i=p.length,this.globalData.canvasContext.beginPath(),n=0;n<i;n+=1)for(d=p[n],o=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),s=2;s<o;s+=6)this.globalData.canvasContext.bezierCurveTo(d[s],d[s+1],d[s+2],d[s+3],d[s+4],d[s+5]);this.globalData.canvasContext.closePath(),m.ctxFill()}if(this.stroke){for(u&&u.sw?h!==u.sw&&(h=u.sw,m.ctxLineWidth(u.sw)):h!==this.values.sWidth&&(h=this.values.sWidth,m.ctxLineWidth(this.values.sWidth)),u&&u.sc?f!==u.sc&&(f=u.sc,m.ctxStrokeStyle(u.sc)):f!==this.values.stroke&&(f=this.values.stroke,m.ctxStrokeStyle(this.values.stroke)),p=this.textSpans[t].elem,i=p.length,this.globalData.canvasContext.beginPath(),n=0;n<i;n+=1)for(d=p[n],o=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),s=2;s<o;s+=6)this.globalData.canvasContext.bezierCurveTo(d[s],d[s+1],d[s+2],d[s+3],d[s+4],d[s+5]);this.globalData.canvasContext.closePath(),m.ctxStroke()}u&&this.globalData.renderer.restore()}};function CVImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,r)}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 e=createTag("canvas");e.width=this.assetData.w,e.height=this.assetData.h;var t=e.getContext("2d"),r=this.img.width,n=this.img.height,i=r/n,s=this.assetData.w/this.assetData.h,o,a,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;i>s&&l==="xMidYMid slice"||i<s&&l!=="xMidYMid slice"?(a=n,o=a*s):(o=r,a=o/s),t.drawImage(this.img,(r-o)/2,(n-a)/2,o,a,0,0,this.assetData.w,this.assetData.h),this.img=e}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(e,t,r){this.initElement(e,t,r)}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(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){e[0]===1&&e[1]===0&&e[4]===0&&e[5]===1&&e[12]===0&&e[13]===0||this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,r,n){this.canvasContext.fillRect(e,t,r,n)},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(e){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}e&&(this.globalData.blendMode="source-over"),this.contextData.restore(e)},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var t=this.animationItem.container.style;t.width="100%",t.height="100%";var r="0px 0px 0px";t.transformOrigin=r,t.mozTransformOrigin=r,t.webkitTransformOrigin=r,t["-webkit-transform"]=r,t.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),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,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(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){this.reset();var r,n;e?(r=e,n=t,this.canvasContext.canvas.width=r,this.canvasContext.canvas.height=n):(this.animationItem.wrapper&&this.animationItem.container?(r=this.animationItem.wrapper.offsetWidth,n=this.animationItem.wrapper.offsetHeight):(r=this.canvasContext.canvas.width,n=this.canvasContext.canvas.height),this.canvasContext.canvas.width=r*this.renderConfig.dpr,this.canvasContext.canvas.height=n*this.renderConfig.dpr);var i,s;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var o=this.renderConfig.preserveAspectRatio.split(" "),a=o[1]||"meet",l=o[0]||"xMidYMid",u=l.substr(0,4),c=l.substr(4);i=r/n,s=this.transformCanvas.w/this.transformCanvas.h,s>i&&a==="meet"||s<i&&a==="slice"?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr)),u==="xMid"&&(s<i&&a==="meet"||s>i&&a==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(n/this.transformCanvas.h))/2*this.renderConfig.dpr:u==="xMax"&&(s<i&&a==="meet"||s>i&&a==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(n/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,c==="YMid"&&(s>i&&a==="meet"||s<i&&a==="slice")?this.transformCanvas.ty=(n-this.transformCanvas.h*(r/this.transformCanvas.w))/2*this.renderConfig.dpr:c==="YMax"&&(s>i&&a==="meet"||s<i&&a==="slice")?this.transformCanvas.ty=(n-this.transformCanvas.h*(r/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(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(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");var e,t=this.layers?this.layers.length:0;for(e=t-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if(!(this.renderedFrame===e&&this.renderConfig.clearCanvas===!0&&!t||this.destroyed||e===-1)){this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var r,n=this.layers.length;for(this.completeLayers||this.checkLayers(e),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(e-this.layers[r].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){var r=this.createItem(this.layers[e],this,this.globalData);t[e]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();e.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 e,t=15;for(e=0;e<t;e+=1){var r=new CanvasContext;this.stack[e]=r}this._length=t,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 e=this._length*2,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){this.cArrPos-=1;var t=this.stack[this.cArrPos],r=t.transform,n,i=this.cTr.props;for(n=0;n<16;n+=1)i[n]=r[n];if(e){this.nativeContext.restore();var s=this.stack[this.cArrPos+1];this.appliedFillStyle=s.fillStyle,this.appliedStrokeStyle=s.strokeStyle,this.appliedLineWidth=s.lineWidth,this.appliedLineCap=s.lineCap,this.appliedLineJoin=s.lineJoin,this.appliedMiterLimit=s.miterLimit}this.nativeContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),(e||t.opacity!==-1&&this.currentOpacity!==t.opacity)&&(this.nativeContext.globalAlpha=t.opacity,this.currentOpacity=t.opacity),this.currentFillStyle=t.fillStyle,this.currentStrokeStyle=t.strokeStyle,this.currentLineWidth=t.lineWidth,this.currentLineCap=t.lineCap,this.currentLineJoin=t.lineJoin,this.currentMiterLimit=t.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var r=this.stack[this.cArrPos],n;for(n=0;n<16;n+=1)r.transform[n]=t[n];this.cArrPos+=1;var i=this.stack[this.cArrPos];i.opacity=r.opacity,i.fillStyle=r.fillStyle,i.strokeStyle=r.strokeStyle,i.lineWidth=r.lineWidth,i.lineCap=r.lineCap,i.lineJoin=r.lineJoin,i.miterLimit=r.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var r=t.props;this.nativeContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,r,n){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,r,n)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()};function CVCompElement(e,t,r){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e=this.canvasContext;e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip();var t,r=this.layers.length;for(t=r-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var e,t=this.layers.length;for(e=t-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)};function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:t&&t.clearCanvas!==void 0?t.clearCanvas:!0,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",className:t&&t.className||"",id:t&&t.id||"",runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),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(e){return new CVCompElement(e,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){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)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var r=this.finalTransform.mat.toCSS();t.transform=r,t.webkitTransform=r}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(e,t,r){this.initElement(e,t,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?(e=createNS("rect"),e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(e=createTag("div"),e.style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)};function HShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(e,t,r),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 e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)t=e[r].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var r=e.sh.v,n=e.transformers,i,s=r._length,o,a,l,u;if(!(s<=1)){for(i=0;i<s-1;i+=1)o=this.getTransformedPoint(n,r.v[i]),a=this.getTransformedPoint(n,r.o[i]),l=this.getTransformedPoint(n,r.i[i+1]),u=this.getTransformedPoint(n,r.v[i+1]),this.checkBounds(o,a,l,u,t);r.c&&(o=this.getTransformedPoint(n,r.v[i]),a=this.getTransformedPoint(n,r.o[i]),l=this.getTransformedPoint(n,r.i[0]),u=this.getTransformedPoint(n,r.v[0]),this.checkBounds(o,a,l,u,t))}},HShapeElement.prototype.checkBounds=function(e,t,r,n,i){this.getBoundsOfCurve(e,t,r,n);var s=this.shapeBoundingBox;i.x=bmMin(s.left,i.x),i.xMax=bmMax(s.right,i.xMax),i.y=bmMin(s.top,i.y),i.yMax=bmMax(s.bottom,i.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(e,t,r,n){for(var i=[[e[0],n[0]],[e[1],n[1]]],s,o,a,l,u,c,f,h=0;h<2;++h)o=6*e[h]-12*t[h]+6*r[h],s=-3*e[h]+9*t[h]-9*r[h]+3*n[h],a=3*t[h]-3*e[h],o|=0,s|=0,a|=0,s===0&&o===0||(s===0?(l=-a/o,l>0&&l<1&&i[h].push(this.calculateF(l,e,t,r,n,h))):(u=o*o-4*a*s,u>=0&&(c=(-o+bmSqrt(u))/(2*s),c>0&&c<1&&i[h].push(this.calculateF(c,e,t,r,n,h)),f=(-o-bmSqrt(u))/(2*s),f>0&&f<1&&i[h].push(this.calculateF(f,e,t,r,n,h)))));this.shapeBoundingBox.left=bmMin.apply(null,i[0]),this.shapeBoundingBox.top=bmMin.apply(null,i[1]),this.shapeBoundingBox.right=bmMax.apply(null,i[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,i[1])},HShapeElement.prototype.calculateF=function(e,t,r,n,i,s){return bmPow(1-e,3)*t[s]+3*bmPow(1-e,2)*e*r[s]+3*(1-e)*bmPow(e,2)*n[s]+bmPow(e,3)*i[s]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)e[r]&&e[r].sh?this.calculateShapeBoundingBox(e[r],t):e[r]&&e[r].it?this.calculateBoundingBox(e[r].it,t):e[r]&&e[r].style&&e[r].w&&this.expandStrokeBoundingBox(e[r].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var r=0;if(e.keyframes){for(var n=0;n<e.keyframes.length;n+=1){var i=e.keyframes[n].s;i>r&&(r=i)}r*=e.mult}else r=e.v*e.mult;t.x-=r,t.xMax+=r,t.y-=r,t.yMax+=r},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,this.currentBoxContains(e))return;var r=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute("width",e.width),r=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute("height",e.height),r=!0),r||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var n=this.shapeCont.style,i="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";n.transform=i,n.webkitTransform=i}}};function HTextElement(e,t,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(e,t,r)}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 e=createNS("g");this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,r=e.fc?this.buildColor(e.fc):"rgba(0,0,0,0)";t.fill=r,t.color=r,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+"px");var n=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars)if(t.fontSize=e.finalSize+"px",t.lineHeight=e.finalSize+"px",n.fClass)this.innerElem.className=n.fClass;else{t.fontFamily=n.fFamily;var i=e.fWeight,s=e.fStyle;t.fontStyle=s,t.fontWeight=i}var o,a,l=e.l;a=l.length;var u,c,f,h=this.mHelper,p,d="",m=0;for(o=0;o<a;o+=1){if(this.globalData.fontManager.chars?(this.textPaths[m]?u=this.textPaths[m]:(u=createNS("path"),u.setAttribute("stroke-linecap",lineCapEnum[1]),u.setAttribute("stroke-linejoin",lineJoinEnum[2]),u.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[m]?(c=this.textSpans[m],f=c.children[0]):(c=createTag("div"),c.style.lineHeight=0,f=createNS("svg"),f.appendChild(u),styleDiv(c)))):this.isMasked?u=this.textPaths[m]?this.textPaths[m]:createNS("text"):this.textSpans[m]?(c=this.textSpans[m],u=this.textPaths[m]):(c=createTag("span"),styleDiv(c),u=createTag("span"),styleDiv(u),c.appendChild(u)),this.globalData.fontManager.chars){var b=this.globalData.fontManager.getCharData(e.finalText[o],n.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily),g;if(b?g=b.data:g=null,h.reset(),g&&g.shapes&&g.shapes.length&&(p=g.shapes[0].it,h.scale(e.finalSize/100,e.finalSize/100),d=this.createPathShape(h,p),u.setAttribute("d",d)),this.isMasked)this.innerElem.appendChild(u);else{if(this.innerElem.appendChild(c),g&&g.shapes){document.body.appendChild(f);var C=f.getBBox();f.setAttribute("width",C.width+2),f.setAttribute("height",C.height+2),f.setAttribute("viewBox",C.x-1+" "+(C.y-1)+" "+(C.width+2)+" "+(C.height+2));var y=f.style,E="translate("+(C.x-1)+"px,"+(C.y-1)+"px)";y.transform=E,y.webkitTransform=E,l[o].yOffset=C.y-1}else f.setAttribute("width",1),f.setAttribute("height",1);c.appendChild(f)}}else if(u.textContent=l[o].val,u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(u);else{this.innerElem.appendChild(c);var I=u.style,T="translate3d(0,"+-e.finalSize/1.2+"px,0)";I.transform=T,I.webkitTransform=T}this.isMasked?this.textSpans[m]=u:this.textSpans[m]=c,this.textSpans[m].style.display="block",this.textPaths[m]=u,m+=1}for(;m<this.textSpans.length;)this.textSpans[m].style.display="none",m+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var e;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),e=this.svgElement.style;var t="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";e.transform=t,e.webkitTransform=t}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),!(!this.lettersChangedFlag&&!this.textAnimator.lettersChangedFlag)){var r,n,i=0,s=this.textAnimator.renderedLetters,o=this.textProperty.currentData.l;n=o.length;var a,l,u;for(r=0;r<n;r+=1)o[r].n?i+=1:(l=this.textSpans[r],u=this.textPaths[r],a=s[i],i+=1,a._mdf.m&&(this.isMasked?l.setAttribute("transform",a.m):(l.style.webkitTransform=a.m,l.style.transform=a.m)),l.style.opacity=a.o,a.sw&&a._mdf.sw&&u.setAttribute("stroke-width",a.sw),a.sc&&a._mdf.sc&&u.setAttribute("stroke",a.sc),a.fc&&a._mdf.fc&&(u.setAttribute("fill",a.fc),u.style.color=a.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var c=this.innerElem.getBBox();this.currentBBox.w!==c.width&&(this.currentBBox.w=c.width,this.svgElement.setAttribute("width",c.width)),this.currentBBox.h!==c.height&&(this.currentBBox.h=c.height,this.svgElement.setAttribute("height",c.height));var f=1;if(this.currentBBox.w!==c.width+f*2||this.currentBBox.h!==c.height+f*2||this.currentBBox.x!==c.x-f||this.currentBBox.y!==c.y-f){this.currentBBox.w=c.width+f*2,this.currentBBox.h=c.height+f*2,this.currentBBox.x=c.x-f,this.currentBBox.y=c.y-f,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),e=this.svgElement.style;var h="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";e.transform=h,e.webkitTransform=h}}}};function HCameraElement(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initHierarchy();var n=PropertyFactory.getProp;if(this.pe=n(this,e.pe,0,0,this),e.ks.p.s?(this.px=n(this,e.ks.p.x,1,0,this),this.py=n(this,e.ks.p.y,1,0,this),this.pz=n(this,e.ks.p.z,1,0,this)):this.p=n(this,e.ks.p,1,0,this),e.ks.a&&(this.a=n(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var i,s=e.ks.or.k.length;for(i=0;i<s;i+=1)e.ks.or.k[i].to=null,e.ks.or.k[i].ti=null}this.or=n(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=n(this,e.ks.rx,0,degToRads,this),this.ry=n(this,e.ks.ry,0,degToRads,this),this.rz=n(this,e.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 e,t=this.comp.threeDElements.length,r,n,i;for(e=0;e<t;e+=1)if(r=this.comp.threeDElements[e],r.type==="3d"){n=r.perspectiveElem.style,i=r.container.style;var s=this.pe.v+"px",o="0px 0px 0px",a="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";n.perspective=s,n.webkitPerspective=s,i.transformOrigin=o,i.mozTransformOrigin=o,i.webkitTransformOrigin=o,n.transform=a,n.webkitTransform=a}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e=this._isFirstFrame,t,r;if(this.hierarchy)for(r=this.hierarchy.length,t=0;t<r;t+=1)e=this.hierarchy[t].finalTransform.mProp._mdf||e;if(e||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)for(r=this.hierarchy.length-1,t=r;t>=0;t-=1){var n=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-n.p.v[0],-n.p.v[1],n.p.v[2]),this.mat.rotateX(-n.or.v[0]).rotateY(-n.or.v[1]).rotateZ(n.or.v[2]),this.mat.rotateX(-n.rx.v).rotateY(-n.ry.v).rotateZ(n.rz.v),this.mat.scale(1/n.s.v[0],1/n.s.v[1],1/n.s.v[2]),this.mat.translate(n.a.v[0],n.a.v[1],n.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var i;this.p?i=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:i=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var s=Math.sqrt(Math.pow(i[0],2)+Math.pow(i[1],2)+Math.pow(i[2],2)),o=[i[0]/s,i[1]/s,i[2]/s],a=Math.sqrt(o[2]*o[2]+o[0]*o[0]),l=Math.atan2(o[1],a),u=Math.atan2(o[0],-o[2]);this.mat.rotateY(u).rotateX(-l)}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 c=!this._prevMat.equals(this.mat);if((c||this.pe._mdf)&&this.comp.threeDElements){r=this.comp.threeDElements.length;var f,h,p;for(t=0;t<r;t+=1)if(f=this.comp.threeDElements[t],f.type==="3d"){if(c){var d=this.mat.toCSS();p=f.container.style,p.transform=d,p.webkitTransform=d}this.pe._mdf&&(h=f.perspectiveElem.style,h.perspective=this.pe.v+"px",h.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=new Image;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",e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin="anonymous",t.src=e,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)};function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.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(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();e.checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(e,t){var r=e.getBaseElement();if(r){var n=this.layers[t];if(!n.ddd||!this.supports3d)if(this.threeDElements)this.addTo3dContainer(r,t);else{for(var i=0,s,o,a;i<t;)this.elements[i]&&this.elements[i]!==!0&&this.elements[i].getBaseElement&&(o=this.elements[i],a=this.layers[i].ddd?this.getThreeDContainerByPos(i):o.getBaseElement(),s=a||s),i+=1;s?(!n.ddd||!this.supports3d)&&this.layerElement.insertBefore(r,s):(!n.ddd||!this.supports3d)&&this.layerElement.appendChild(r)}else this.addTo3dContainer(r,t)}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,r=this.threeDElements.length;t<r;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var r=createTag("div"),n,i;styleDiv(r);var s=createTag("div");if(styleDiv(s),t==="3d"){n=r.style,n.width=this.globalData.compSize.w+"px",n.height=this.globalData.compSize.h+"px";var o="50% 50%";n.webkitTransformOrigin=o,n.mozTransformOrigin=o,n.transformOrigin=o,i=s.style;var a="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";i.transform=a,i.webkitTransform=a}r.appendChild(s);var l={container:s,perspectiveElem:r,startPos:e,endPos:e,type:t};return this.threeDElements.push(l),l},HybridRendererBase.prototype.build3dContainers=function(){var e,t=this.layers.length,r,n="";for(e=0;e<t;e+=1)this.layers[e].ddd&&this.layers[e].ty!==3?(n!=="3d"&&(n="3d",r=this.createThreeDContainer(e,"3d")),r.endPos=Math.max(r.endPos,e)):(n!=="2d"&&(n="2d",r=this.createThreeDContainer(e,"2d")),r.endPos=Math.max(r.endPos,e));for(t=this.threeDElements.length,e=t-1;e>=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var r=0,n=this.threeDElements.length;r<n;){if(t<=this.threeDElements[r].endPos){for(var i=this.threeDElements[r].startPos,s;i<t;)this.elements[i]&&this.elements[i].getBaseElement&&(s=this.elements[i].getBaseElement()),i+=1;s?this.threeDElements[r].container.insertBefore(e,s):this.threeDElements[r].container.appendChild(e);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag("div"),r=this.animationItem.wrapper,n=t.style;n.width=e.w+"px",n.height=e.h+"px",this.resizerElem=t,styleDiv(t),n.transformStyle="flat",n.mozTransformStyle="flat",n.webkitTransformStyle="flat",this.renderConfig.className&&t.setAttribute("class",this.renderConfig.className),r.appendChild(t),n.overflow="hidden";var i=createNS("svg");i.setAttribute("width","1"),i.setAttribute("height","1"),styleDiv(i),this.resizerElem.appendChild(i);var s=createNS("defs");i.appendChild(s),this.data=e,this.setupGlobalData(e,i),this.globalData.defs=s,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e,t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e=this.animationItem.wrapper.offsetWidth,t=this.animationItem.wrapper.offsetHeight,r=e/t,n=this.globalData.compSize.w/this.globalData.compSize.h,i,s,o,a;n>r?(i=e/this.globalData.compSize.w,s=e/this.globalData.compSize.w,o=0,a=(t-this.globalData.compSize.h*(e/this.globalData.compSize.w))/2):(i=t/this.globalData.compSize.h,s=t/this.globalData.compSize.h,o=(e-this.globalData.compSize.w*(t/this.globalData.compSize.h))/2,a=0);var l=this.resizerElem.style;l.webkitTransform="matrix3d("+i+",0,0,0,0,"+s+",0,0,0,0,1,0,"+o+","+a+",0,1)",l.transform=l.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 e=this.globalData.compSize.w,t=this.globalData.compSize.h,r,n=this.threeDElements.length;for(r=0;r<n;r+=1){var i=this.threeDElements[r].perspectiveElem.style;i.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(t,2))+"px",i.perspective=i.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,r=e.length,n=createTag("div");for(t=0;t<r;t+=1)if(e[t].xt){var i=this.createComp(e[t],n,this.globalData.comp,null);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}};function HCompElement(e,t,r){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(e,t){for(var r=0,n;r<t;)this.elements[r]&&this.elements[r].getBaseElement&&(n=this.elements[r].getBaseElement()),r+=1;n?this.layerElement.insertBefore(e,n):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&t.hideOnTransparent===!1),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"},runExpressions:!t||t.runExpressions===void 0||t.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(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(){return function(e){function t(r){for(var n=0,i=e.layers.length;n<i;){if(e.layers[n].nm===r||e.layers[n].ind===r)return e.elements[n].layerInterface;n+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t}}();function _typeof$2(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$2=function(r){return typeof r}:_typeof$2=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$2(e)}function seedRandom(e,t){var r=this,n=256,i=6,s=52,o="random",a=t.pow(n,i),l=t.pow(2,s),u=l*2,c=n-1,f;function h(y,E,I){var T=[];E=E===!0?{entropy:!0}:E||{};var R=b(m(E.entropy?[y,C(e)]:y===null?g():y,3),T),F=new p(T),q=function(){for(var W=F.g(i),z=a,ee=0;W<l;)W=(W+ee)*n,z*=n,ee=F.g(1);for(;W>=u;)W/=2,z/=2,ee>>>=1;return(W+ee)/z};return q.int32=function(){return F.g(4)|0},q.quick=function(){return F.g(4)/4294967296},q.double=q,b(C(F.S),e),(E.pass||I||function(Z,W,z,ee){return ee&&(ee.S&&d(ee,F),Z.state=function(){return d(F,{})}),z?(t[o]=Z,W):Z})(q,R,"global"in E?E.global:this==t,E.state)}t["seed"+o]=h;function p(y){var E,I=y.length,T=this,R=0,F=T.i=T.j=0,q=T.S=[];for(I||(y=[I++]);R<n;)q[R]=R++;for(R=0;R<n;R++)q[R]=q[F=c&F+y[R%I]+(E=q[R])],q[F]=E;T.g=function(Z){for(var W,z=0,ee=T.i,se=T.j,G=T.S;Z--;)W=G[ee=c&ee+1],z=z*n+G[c&(G[ee]=G[se=c&se+W])+(G[se]=W)];return T.i=ee,T.j=se,z}}function d(y,E){return E.i=y.i,E.j=y.j,E.S=y.S.slice(),E}function m(y,E){var I=[],T=_typeof$2(y),R;if(E&&T=="object")for(R in y)try{I.push(m(y[R],E-1))}catch{}return I.length?I:T=="string"?y:y+"\0"}function b(y,E){for(var I=y+"",T,R=0;R<I.length;)E[c&R]=c&(T^=E[c&R]*19)+I.charCodeAt(R++);return C(E)}function g(){try{if(f)return C(f.randomBytes(n));var y=new Uint8Array(n);return(r.crypto||r.msCrypto).getRandomValues(y),C(y)}catch{var E=r.navigator,I=E&&E.plugins;return[+new Date,r,I,r.screen,C(e)]}}function C(y){return String.fromCharCode.apply(0,y)}b(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof$1(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$1=function(r){return typeof r}:_typeof$1=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$1(e)}var ExpressionManager=function(){"use strict";var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return e==="number"||t instanceof Number||e==="boolean"||e==="string"}function $bm_neg(e){var t=_typeof$1(e);if(t==="number"||e instanceof Number||t==="boolean")return-e;if($bm_isInstanceOfArray(e)){var r,n=e.length,i=[];for(r=0;r<n;r+=1)i[r]=-e[r];return i}return e.propType?e.v:-e}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(e,t){var r=_typeof$1(e),n=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(n,t)||r==="string"||n==="string")return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return e=e.slice(0),e[0]+=t,e;if(isNumerable(r,e)&&$bm_isInstanceOfArray(t))return t=t.slice(0),t[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var i=0,s=e.length,o=t.length,a=[];i<s||i<o;)(typeof e[i]=="number"||e[i]instanceof Number)&&(typeof t[i]=="number"||t[i]instanceof Number)?a[i]=e[i]+t[i]:a[i]=t[i]===void 0?e[i]:e[i]||t[i],i+=1;return a}return 0}var add=sum;function sub(e,t){var r=_typeof$1(e),n=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(n,t))return r==="string"&&(e=parseInt(e,10)),n==="string"&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return e=e.slice(0),e[0]-=t,e;if(isNumerable(r,e)&&$bm_isInstanceOfArray(t))return t=t.slice(0),t[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var i=0,s=e.length,o=t.length,a=[];i<s||i<o;)(typeof e[i]=="number"||e[i]instanceof Number)&&(typeof t[i]=="number"||t[i]instanceof Number)?a[i]=e[i]-t[i]:a[i]=t[i]===void 0?e[i]:e[i]||t[i],i+=1;return a}return 0}function mul(e,t){var r=_typeof$1(e),n=_typeof$1(t),i;if(isNumerable(r,e)&&isNumerable(n,t))return e*t;var s,o;if($bm_isInstanceOfArray(e)&&isNumerable(n,t)){for(o=e.length,i=createTypedArray("float32",o),s=0;s<o;s+=1)i[s]=e[s]*t;return i}if(isNumerable(r,e)&&$bm_isInstanceOfArray(t)){for(o=t.length,i=createTypedArray("float32",o),s=0;s<o;s+=1)i[s]=e*t[s];return i}return 0}function div(e,t){var r=_typeof$1(e),n=_typeof$1(t),i;if(isNumerable(r,e)&&isNumerable(n,t))return e/t;var s,o;if($bm_isInstanceOfArray(e)&&isNumerable(n,t)){for(o=e.length,i=createTypedArray("float32",o),s=0;s<o;s+=1)i[s]=e[s]/t;return i}if(isNumerable(r,e)&&$bm_isInstanceOfArray(t)){for(o=t.length,i=createTypedArray("float32",o),s=0;s<o;s+=1)i[s]=e/t[s];return i}return 0}function mod(e,t){return typeof e=="string"&&(e=parseInt(e,10)),typeof t=="string"&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,r){if(t>r){var n=r;r=t,t=n}return Math.min(Math.max(e,t),r)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if(typeof e=="number"||e instanceof Number)return t=t||0,Math.abs(e-t);t||(t=helperLengthArray);var r,n=Math.min(e.length,t.length),i=0;for(r=0;r<n;r+=1)i+=Math.pow(t[r]-e[r],2);return Math.sqrt(i)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t=e[0],r=e[1],n=e[2],i=Math.max(t,r,n),s=Math.min(t,r,n),o,a,l=(i+s)/2;if(i===s)o=0,a=0;else{var u=i-s;switch(a=l>.5?u/(2-i-s):u/(i+s),i){case t:o=(r-n)/u+(r<n?6:0);break;case r:o=(n-t)/u+2;break;case n:o=(t-r)/u+4;break;default:break}o/=6}return[o,a,l,e[3]]}function hue2rgb(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function hslToRgb(e){var t=e[0],r=e[1],n=e[2],i,s,o;if(r===0)i=n,o=n,s=n;else{var a=n<.5?n*(1+r):n+r-n*r,l=2*n-a;i=hue2rgb(l,a,t+1/3),s=hue2rgb(l,a,t),o=hue2rgb(l,a,t-1/3)}return[i,s,o,e[3]]}function linear(e,t,r,n,i){if((n===void 0||i===void 0)&&(n=t,i=r,t=0,r=1),r<t){var s=r;r=t,t=s}if(e<=t)return n;if(e>=r)return i;var o=r===t?0:(e-t)/(r-t);if(!n.length)return n+(i-n)*o;var a,l=n.length,u=createTypedArray("float32",l);for(a=0;a<l;a+=1)u[a]=n[a]+(i[a]-n[a])*o;return u}function random(e,t){if(t===void 0&&(e===void 0?(e=0,t=1):(t=e,e=void 0)),t.length){var r,n=t.length;e||(e=createTypedArray("float32",n));var i=createTypedArray("float32",n),s=BMMath.random();for(r=0;r<n;r+=1)i[r]=e[r]+s*(t[r]-e[r]);return i}e===void 0&&(e=0);var o=BMMath.random();return e+o*(t-e)}function createPath(e,t,r,n){var i,s=e.length,o=shapePool.newElement();o.setPathData(!!n,s);var a=[0,0],l,u;for(i=0;i<s;i+=1)l=t&&t[i]?t[i]:a,u=r&&r[i]?r[i]:a,o.setTripleAt(e[i][0],e[i][1],u[0]+e[i][0],u[1]+e[i][1],l[0]+e[i][0],l[1]+e[i][1],i,!0);return o}function initiateExpression(elem,data,property){function noOp(e){return e}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.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){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 e(t,r){var n,i,s=this.pv.length?this.pv.length:1,o=createTypedArray("float32",s);t=5;var a=Math.floor(time*t);for(n=0,i=0;n<a;){for(i=0;i<s;i+=1)o[i]+=-r+r*2*BMMath.random();n+=1}var l=time*t,u=l-Math.floor(l),c=createTypedArray("float32",s);if(s>1){for(i=0;i<s;i+=1)c[i]=this.pv[i]+o[i]+(-r+r*2*BMMath.random())*u;return c}return this.pv+o[0]+(-r+r*2*BMMath.random())*u}).bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty));function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(e,t){var r=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],n=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads,i=-Math.atan2(r[1],r[2])/degToRads;return[i,n,0]}function easeOut(e,t,r,n,i){return applyEase(easeOutBez,e,t,r,n,i)}function easeIn(e,t,r,n,i){return applyEase(easeInBez,e,t,r,n,i)}function ease(e,t,r,n,i){return applyEase(easeInOutBez,e,t,r,n,i)}function applyEase(e,t,r,n,i,s){i===void 0?(i=r,s=n):t=(t-r)/(n-r),t>1?t=1:t<0&&(t=0);var o=e(t);if($bm_isInstanceOfArray(i)){var a,l=i.length,u=createTypedArray("float32",l);for(a=0;a<l;a+=1)u[a]=(s[a]-i[a])*o+i[a];return u}return(s-i)*o+i}function nearestKey(e){var t,r=data.k.length,n,i;if(!data.k.length||typeof data.k[0]=="number")n=0,i=0;else if(n=-1,e*=elem.comp.globalData.frameRate,e<data.k[0].t)n=1,i=data.k[0].t;else{for(t=0;t<r-1;t+=1)if(e===data.k[t].t){n=t+1,i=data.k[t].t;break}else if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(n=t+2,i=data.k[t+1].t):(n=t+1,i=data.k[t].t);break}n===-1&&(n=t+1,i=data.k[t].t)}var s={};return s.index=n,s.time=i/elem.comp.globalData.frameRate,s}function key(e){var t,r,n;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var i=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(n=i.length,r=0;r<n;r+=1)t[r]=i[r],t.value[r]=i[r];return t}function framesToTime(e,t){return t||(t=elem.comp.globalData.frameRate),e/t}function timeToFrames(e,t){return!e&&e!==0&&(e=time),t||(t=elem.comp.globalData.frameRate),e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return typeof value=="string"?t===void 0?value.substring(e):value.substring(e,t):""}function substr(e,t){return typeof value=="string"?t===void 0?value.substr(e):value.substr(e,t):""}function posterizeTime(e){time=e===0?0:Math.floor(time*e)/e,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(e){return value=e,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),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),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType===4&&!content&&(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),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 e={};e.initExpressions=t,e.resetFrame=ExpressionManager.resetFrame;function t(r){var n=0,i=[];function s(){n+=1}function o(){n-=1,n===0&&l()}function a(u){i.indexOf(u)===-1&&i.push(u)}function l(){var u,c=i.length;for(u=0;u<c;u+=1)i[u].release();i.length=0}r.renderer.compInterface=CompExpressionInterface(r.renderer),r.renderer.globalData.projectInterface.registerComposition(r.renderer),r.renderer.globalData.pushExpression=s,r.renderer.globalData.popExpression=o,r.renderer.globalData.registerExpressionProperty=a}return e}(),MaskManagerInterface=function(){function e(r,n){this._mask=r,this._data=n}Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),this._mask.op.v*100}});var t=function(n){var i=createSizedArray(n.viewData.length),s,o=n.viewData.length;for(s=0;s<o;s+=1)i[s]=new e(n.viewData[s],n.masksProperties[s]);var a=function(u){for(s=0;s<o;){if(n.masksProperties[s].nm===u)return i[s];s+=1}return null};return a};return t}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function r(o,a,l){Object.defineProperty(o,"velocity",{get:function(){return a.getVelocityAtTime(a.comp.currentFrame)}}),o.numKeys=a.keyframes?a.keyframes.length:0,o.key=function(u){if(!o.numKeys)return 0;var c="";"s"in a.keyframes[u-1]?c=a.keyframes[u-1].s:"e"in a.keyframes[u-2]?c=a.keyframes[u-2].e:c=a.keyframes[u-2].s;var f=l==="unidimensional"?new Number(c):Object.assign({},c);return f.time=a.keyframes[u-1].t/a.elem.comp.globalData.frameRate,f.value=l==="unidimensional"?c[0]:c,f},o.valueAtTime=a.getValueAtTime,o.speedAtTime=a.getSpeedAtTime,o.velocityAtTime=a.getVelocityAtTime,o.propertyGroup=a.propertyGroup}function n(o){(!o||!("pv"in o))&&(o=e);var a=1/o.mult,l=o.pv*a,u=new Number(l);return u.value=l,r(u,o,"unidimensional"),function(){return o.k&&o.getValue(),l=o.v*a,u.value!==l&&(u=new Number(l),u.value=l,r(u,o,"unidimensional")),u}}function i(o){(!o||!("pv"in o))&&(o=t);var a=1/o.mult,l=o.data&&o.data.l||o.pv.length,u=createTypedArray("float32",l),c=createTypedArray("float32",l);return u.value=c,r(u,o,"multidimensional"),function(){o.k&&o.getValue();for(var f=0;f<l;f+=1)c[f]=o.v[f]*a,u[f]=c[f];return u}}function s(){return e}return function(o){return o?o.propType==="unidimensional"?n(o):i(o):s}}(),TransformExpressionInterface=function(){return function(e){function t(o){switch(o){case"scale":case"Scale":case"ADBE Scale":case 6:return t.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return t.rotation;case"ADBE Rotate X":return t.xRotation;case"ADBE Rotate Y":return t.yRotation;case"position":case"Position":case"ADBE Position":case 2:return t.position;case"ADBE Position_0":return t.xPosition;case"ADBE Position_1":return t.yPosition;case"ADBE Position_2":return t.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return t.anchorPoint;case"opacity":case"Opacity":case 11:return t.opacity;default:return null}}Object.defineProperty(t,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(t,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(t,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(t,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(t,"scale",{get:ExpressionPropertyInterface(e.s)});var r,n,i,s;return e.p?s=ExpressionPropertyInterface(e.p):(r=ExpressionPropertyInterface(e.px),n=ExpressionPropertyInterface(e.py),e.pz&&(i=ExpressionPropertyInterface(e.pz))),Object.defineProperty(t,"position",{get:function(){return e.p?s():[r(),n(),i?i():0]}}),Object.defineProperty(t,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(t,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(t,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(t,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(t,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(t,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(t,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(t,"orientation",{get:ExpressionPropertyInterface(e.or)}),t}}(),LayerExpressionInterface=function(){function e(u){var c=new Matrix;if(u!==void 0){var f=this._elem.finalTransform.mProp.getValueAtTime(u);f.clone(c)}else{var h=this._elem.finalTransform.mProp;h.applyToMatrix(c)}return c}function t(u,c){var f=this.getMatrix(c);return f.props[12]=0,f.props[13]=0,f.props[14]=0,this.applyPoint(f,u)}function r(u,c){var f=this.getMatrix(c);return this.applyPoint(f,u)}function n(u,c){var f=this.getMatrix(c);return f.props[12]=0,f.props[13]=0,f.props[14]=0,this.invertPoint(f,u)}function i(u,c){var f=this.getMatrix(c);return this.invertPoint(f,u)}function s(u,c){if(this._elem.hierarchy&&this._elem.hierarchy.length){var f,h=this._elem.hierarchy.length;for(f=0;f<h;f+=1)this._elem.hierarchy[f].finalTransform.mProp.applyToMatrix(u)}return u.applyToPointArray(c[0],c[1],c[2]||0)}function o(u,c){if(this._elem.hierarchy&&this._elem.hierarchy.length){var f,h=this._elem.hierarchy.length;for(f=0;f<h;f+=1)this._elem.hierarchy[f].finalTransform.mProp.applyToMatrix(u)}return u.inversePoint(c)}function a(u){var c=new Matrix;if(c.reset(),this._elem.finalTransform.mProp.applyToMatrix(c),this._elem.hierarchy&&this._elem.hierarchy.length){var f,h=this._elem.hierarchy.length;for(f=0;f<h;f+=1)this._elem.hierarchy[f].finalTransform.mProp.applyToMatrix(c);return c.inversePoint(u)}return c.inversePoint(u)}function l(){return[1,1,1,1]}return function(u){var c;function f(m){p.mask=new MaskManagerInterface(m,u)}function h(m){p.effect=m}function p(m){switch(m){case"ADBE Root Vectors Group":case"Contents":case 2:return p.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return c;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return p.effect;case"ADBE Text Properties":return p.textInterface;default:return null}}p.getMatrix=e,p.invertPoint=o,p.applyPoint=s,p.toWorld=r,p.toWorldVec=t,p.fromWorld=i,p.fromWorldVec=n,p.toComp=r,p.fromComp=a,p.sampleImage=l,p.sourceRectAtTime=u.sourceRectAtTime.bind(u),p._elem=u,c=TransformExpressionInterface(u.finalTransform.mProp);var d=getDescriptor(c,"anchorPoint");return Object.defineProperties(p,{hasParent:{get:function(){return u.hierarchy.length}},parent:{get:function(){return u.hierarchy[0].layerInterface}},rotation:getDescriptor(c,"rotation"),scale:getDescriptor(c,"scale"),position:getDescriptor(c,"position"),opacity:getDescriptor(c,"opacity"),anchorPoint:d,anchor_point:d,transform:{get:function(){return c}},active:{get:function(){return u.isInRange}}}),p.startTime=u.data.st,p.index=u.data.ind,p.source=u.data.refId,p.height=u.data.ty===0?u.data.h:100,p.width=u.data.ty===0?u.data.w:100,p.inPoint=u.data.ip/u.comp.globalData.frameRate,p.outPoint=u.data.op/u.comp.globalData.frameRate,p._name=u.data.nm,p.registerMaskInterface=f,p.registerEffectsInterface=h,p}}(),propertyGroupFactory=function(){return function(e,t){return function(r){return r=r===void 0?1:r,r<=0?e:t(r-1)}}}(),PropertyInterface=function(){return function(e,t){var r={_name:e};function n(i){return i=i===void 0?1:i,i<=0?r:t(i-1)}return n}}(),EffectsExpressionInterface=function(){var e={createEffectsInterface:t};function t(i,s){if(i.effectsManager){var o=[],a=i.data.ef,l,u=i.effectsManager.effectElements.length;for(l=0;l<u;l+=1)o.push(r(a[l],i.effectsManager.effectElements[l],s,i));var c=i.data.ef||[],f=function(p){for(l=0,u=c.length;l<u;){if(p===c[l].nm||p===c[l].mn||p===c[l].ix)return o[l];l+=1}return null};return Object.defineProperty(f,"numProperties",{get:function(){return c.length}}),f}return null}function r(i,s,o,a){function l(p){for(var d=i.ef,m=0,b=d.length;m<b;){if(p===d[m].nm||p===d[m].mn||p===d[m].ix)return d[m].ty===5?c[m]:c[m]();m+=1}throw new Error}var u=propertyGroupFactory(l,o),c=[],f,h=i.ef.length;for(f=0;f<h;f+=1)i.ef[f].ty===5?c.push(r(i.ef[f],s.effectElements[f],s.effectElements[f].propertyGroup,a)):c.push(n(s.effectElements[f],i.ef[f].ty,a,u));return i.mn==="ADBE Color Control"&&Object.defineProperty(l,"color",{get:function(){return c[0]()}}),Object.defineProperties(l,{numProperties:{get:function(){return i.np}},_name:{value:i.nm},propertyGroup:{value:u}}),l.enabled=i.en!==0,l.active=l.enabled,l}function n(i,s,o,a){var l=ExpressionPropertyInterface(i.p);function u(){return s===10?o.comp.compInterface(i.p.v):l()}return i.p.setGroupProperty&&i.p.setGroupProperty(PropertyInterface("",a)),u}return e}(),ShapePathInterface=function(){return function(t,r,n){var i=r.sh;function s(a){return a==="Shape"||a==="shape"||a==="Path"||a==="path"||a==="ADBE Vector Shape"||a===2?s.path:null}var o=propertyGroupFactory(s,n);return i.setGroupProperty(PropertyInterface("Path",o)),Object.defineProperties(s,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:n}}),s}}(),ShapeExpressionInterface=function(){function e(d,m,b){var g=[],C,y=d?d.length:0;for(C=0;C<y;C+=1)d[C].ty==="gr"?g.push(r(d[C],m[C],b)):d[C].ty==="fl"?g.push(n(d[C],m[C],b)):d[C].ty==="st"?g.push(o(d[C],m[C],b)):d[C].ty==="tm"?g.push(a(d[C],m[C],b)):d[C].ty==="tr"||(d[C].ty==="el"?g.push(u(d[C],m[C],b)):d[C].ty==="sr"?g.push(c(d[C],m[C],b)):d[C].ty==="sh"?g.push(ShapePathInterface(d[C],m[C],b)):d[C].ty==="rc"?g.push(f(d[C],m[C],b)):d[C].ty==="rd"?g.push(h(d[C],m[C],b)):d[C].ty==="rp"?g.push(p(d[C],m[C],b)):d[C].ty==="gf"?g.push(i(d[C],m[C],b)):g.push(s(d[C],m[C],b)));return g}function t(d,m,b){var g,C=function(I){for(var T=0,R=g.length;T<R;){if(g[T]._name===I||g[T].mn===I||g[T].propertyIndex===I||g[T].ix===I||g[T].ind===I)return g[T];T+=1}return typeof I=="number"?g[I-1]:null};C.propertyGroup=propertyGroupFactory(C,b),g=e(d.it,m.it,C.propertyGroup),C.numProperties=g.length;var y=l(d.it[d.it.length-1],m.it[m.it.length-1],C.propertyGroup);return C.transform=y,C.propertyIndex=d.cix,C._name=d.nm,C}function r(d,m,b){var g=function(I){switch(I){case"ADBE Vectors Group":case"Contents":case 2:return g.content;default:return g.transform}};g.propertyGroup=propertyGroupFactory(g,b);var C=t(d,m,g.propertyGroup),y=l(d.it[d.it.length-1],m.it[m.it.length-1],g.propertyGroup);return g.content=C,g.transform=y,Object.defineProperty(g,"_name",{get:function(){return d.nm}}),g.numProperties=d.np,g.propertyIndex=d.ix,g.nm=d.nm,g.mn=d.mn,g}function n(d,m,b){function g(C){return C==="Color"||C==="color"?g.color:C==="Opacity"||C==="opacity"?g.opacity:null}return Object.defineProperties(g,{color:{get:ExpressionPropertyInterface(m.c)},opacity:{get:ExpressionPropertyInterface(m.o)},_name:{value:d.nm},mn:{value:d.mn}}),m.c.setGroupProperty(PropertyInterface("Color",b)),m.o.setGroupProperty(PropertyInterface("Opacity",b)),g}function i(d,m,b){function g(C){return C==="Start Point"||C==="start point"?g.startPoint:C==="End Point"||C==="end point"?g.endPoint:C==="Opacity"||C==="opacity"?g.opacity:null}return Object.defineProperties(g,{startPoint:{get:ExpressionPropertyInterface(m.s)},endPoint:{get:ExpressionPropertyInterface(m.e)},opacity:{get:ExpressionPropertyInterface(m.o)},type:{get:function(){return"a"}},_name:{value:d.nm},mn:{value:d.mn}}),m.s.setGroupProperty(PropertyInterface("Start Point",b)),m.e.setGroupProperty(PropertyInterface("End Point",b)),m.o.setGroupProperty(PropertyInterface("Opacity",b)),g}function s(){function d(){return null}return d}function o(d,m,b){var g=propertyGroupFactory(R,b),C=propertyGroupFactory(T,g);function y(F){Object.defineProperty(T,d.d[F].nm,{get:ExpressionPropertyInterface(m.d.dataProps[F].p)})}var E,I=d.d?d.d.length:0,T={};for(E=0;E<I;E+=1)y(E),m.d.dataProps[E].p.setGroupProperty(C);function R(F){return F==="Color"||F==="color"?R.color:F==="Opacity"||F==="opacity"?R.opacity:F==="Stroke Width"||F==="stroke width"?R.strokeWidth:null}return Object.defineProperties(R,{color:{get:ExpressionPropertyInterface(m.c)},opacity:{get:ExpressionPropertyInterface(m.o)},strokeWidth:{get:ExpressionPropertyInterface(m.w)},dash:{get:function(){return T}},_name:{value:d.nm},mn:{value:d.mn}}),m.c.setGroupProperty(PropertyInterface("Color",g)),m.o.setGroupProperty(PropertyInterface("Opacity",g)),m.w.setGroupProperty(PropertyInterface("Stroke Width",g)),R}function a(d,m,b){function g(y){return y===d.e.ix||y==="End"||y==="end"?g.end:y===d.s.ix?g.start:y===d.o.ix?g.offset:null}var C=propertyGroupFactory(g,b);return g.propertyIndex=d.ix,m.s.setGroupProperty(PropertyInterface("Start",C)),m.e.setGroupProperty(PropertyInterface("End",C)),m.o.setGroupProperty(PropertyInterface("Offset",C)),g.propertyIndex=d.ix,g.propertyGroup=b,Object.defineProperties(g,{start:{get:ExpressionPropertyInterface(m.s)},end:{get:ExpressionPropertyInterface(m.e)},offset:{get:ExpressionPropertyInterface(m.o)},_name:{value:d.nm}}),g.mn=d.mn,g}function l(d,m,b){function g(y){return d.a.ix===y||y==="Anchor Point"?g.anchorPoint:d.o.ix===y||y==="Opacity"?g.opacity:d.p.ix===y||y==="Position"?g.position:d.r.ix===y||y==="Rotation"||y==="ADBE Vector Rotation"?g.rotation:d.s.ix===y||y==="Scale"?g.scale:d.sk&&d.sk.ix===y||y==="Skew"?g.skew:d.sa&&d.sa.ix===y||y==="Skew Axis"?g.skewAxis:null}var C=propertyGroupFactory(g,b);return m.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",C)),m.transform.mProps.p.setGroupProperty(PropertyInterface("Position",C)),m.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",C)),m.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",C)),m.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",C)),m.transform.mProps.sk&&(m.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",C)),m.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",C))),m.transform.op.setGroupProperty(PropertyInterface("Opacity",C)),Object.defineProperties(g,{opacity:{get:ExpressionPropertyInterface(m.transform.mProps.o)},position:{get:ExpressionPropertyInterface(m.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(m.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(m.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(m.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(m.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(m.transform.mProps.sa)},_name:{value:d.nm}}),g.ty="tr",g.mn=d.mn,g.propertyGroup=b,g}function u(d,m,b){function g(E){return d.p.ix===E?g.position:d.s.ix===E?g.size:null}var C=propertyGroupFactory(g,b);g.propertyIndex=d.ix;var y=m.sh.ty==="tm"?m.sh.prop:m.sh;return y.s.setGroupProperty(PropertyInterface("Size",C)),y.p.setGroupProperty(PropertyInterface("Position",C)),Object.defineProperties(g,{size:{get:ExpressionPropertyInterface(y.s)},position:{get:ExpressionPropertyInterface(y.p)},_name:{value:d.nm}}),g.mn=d.mn,g}function c(d,m,b){function g(E){return d.p.ix===E?g.position:d.r.ix===E?g.rotation:d.pt.ix===E?g.points:d.or.ix===E||E==="ADBE Vector Star Outer Radius"?g.outerRadius:d.os.ix===E?g.outerRoundness:d.ir&&(d.ir.ix===E||E==="ADBE Vector Star Inner Radius")?g.innerRadius:d.is&&d.is.ix===E?g.innerRoundness:null}var C=propertyGroupFactory(g,b),y=m.sh.ty==="tm"?m.sh.prop:m.sh;return g.propertyIndex=d.ix,y.or.setGroupProperty(PropertyInterface("Outer Radius",C)),y.os.setGroupProperty(PropertyInterface("Outer Roundness",C)),y.pt.setGroupProperty(PropertyInterface("Points",C)),y.p.setGroupProperty(PropertyInterface("Position",C)),y.r.setGroupProperty(PropertyInterface("Rotation",C)),d.ir&&(y.ir.setGroupProperty(PropertyInterface("Inner Radius",C)),y.is.setGroupProperty(PropertyInterface("Inner Roundness",C))),Object.defineProperties(g,{position:{get:ExpressionPropertyInterface(y.p)},rotation:{get:ExpressionPropertyInterface(y.r)},points:{get:ExpressionPropertyInterface(y.pt)},outerRadius:{get:ExpressionPropertyInterface(y.or)},outerRoundness:{get:ExpressionPropertyInterface(y.os)},innerRadius:{get:ExpressionPropertyInterface(y.ir)},innerRoundness:{get:ExpressionPropertyInterface(y.is)},_name:{value:d.nm}}),g.mn=d.mn,g}function f(d,m,b){function g(E){return d.p.ix===E?g.position:d.r.ix===E?g.roundness:d.s.ix===E||E==="Size"||E==="ADBE Vector Rect Size"?g.size:null}var C=propertyGroupFactory(g,b),y=m.sh.ty==="tm"?m.sh.prop:m.sh;return g.propertyIndex=d.ix,y.p.setGroupProperty(PropertyInterface("Position",C)),y.s.setGroupProperty(PropertyInterface("Size",C)),y.r.setGroupProperty(PropertyInterface("Rotation",C)),Object.defineProperties(g,{position:{get:ExpressionPropertyInterface(y.p)},roundness:{get:ExpressionPropertyInterface(y.r)},size:{get:ExpressionPropertyInterface(y.s)},_name:{value:d.nm}}),g.mn=d.mn,g}function h(d,m,b){function g(E){return d.r.ix===E||E==="Round Corners 1"?g.radius:null}var C=propertyGroupFactory(g,b),y=m;return g.propertyIndex=d.ix,y.rd.setGroupProperty(PropertyInterface("Radius",C)),Object.defineProperties(g,{radius:{get:ExpressionPropertyInterface(y.rd)},_name:{value:d.nm}}),g.mn=d.mn,g}function p(d,m,b){function g(E){return d.c.ix===E||E==="Copies"?g.copies:d.o.ix===E||E==="Offset"?g.offset:null}var C=propertyGroupFactory(g,b),y=m;return g.propertyIndex=d.ix,y.c.setGroupProperty(PropertyInterface("Copies",C)),y.o.setGroupProperty(PropertyInterface("Offset",C)),Object.defineProperties(g,{copies:{get:ExpressionPropertyInterface(y.c)},offset:{get:ExpressionPropertyInterface(y.o)},_name:{value:d.nm}}),g.mn=d.mn,g}return function(d,m,b){var g;function C(E){if(typeof E=="number")return E=E===void 0?1:E,E===0?b:g[E-1];for(var I=0,T=g.length;I<T;){if(g[I]._name===E)return g[I];I+=1}return null}function y(){return b}return C.propertyGroup=propertyGroupFactory(C,y),g=e(d,m,C.propertyGroup),C.numProperties=g.length,C._name="Contents",C}}(),TextExpressionInterface=function(){return function(e){var t;function r(n){switch(n){case"ADBE Text Document":return r.sourceText;default:return null}}return Object.defineProperty(r,"sourceText",{get:function(){e.textProperty.getValue();var i=e.textProperty.currentData.t;return(!t||i!==t.value)&&(t=new String(i),t.value=i||new String(i),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),r}}();function _typeof(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(r){return typeof r}:_typeof=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof(e)}var FootageInterface=function(){var e=function(n){var i="",s=n.getFootageData();function o(){return i="",s=n.getFootageData(),a}function a(l){if(s[l])return i=l,s=s[l],_typeof(s)==="object"?a:s;var u=l.indexOf(i);if(u!==-1){var c=parseInt(l.substr(u+i.length),10);return s=s[c],_typeof(s)==="object"?a:s}return""}return o},t=function(n){function i(s){return s==="Outline"?i.outlineInterface():null}return i._name="Outline",i.outlineInterface=e(n),i};return function(r){function n(i){return i==="Data"?n.dataInterface:null}return n._name="Data",n.dataInterface=t(r),n}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers=function(){function e(o,a,l){a.x&&(l.k=!0,l.x=!0,l.initiateExpression=ExpressionManager.initiateExpression,l.effectsSequence.push(l.initiateExpression(o,a,l).bind(l)))}function t(o){return o*=this.elem.globalData.frameRate,o-=this.offsetTime,o!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<o?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(o,this._cachingAtTime),this._cachingAtTime.lastFrame=o),this._cachingAtTime.value}function r(o){var a=-.01,l=this.getValueAtTime(o),u=this.getValueAtTime(o+a),c=0;if(l.length){var f;for(f=0;f<l.length;f+=1)c+=Math.pow(u[f]-l[f],2);c=Math.sqrt(c)*100}else c=0;return c}function n(o){if(this.vel!==void 0)return this.vel;var a=-.001,l=this.getValueAtTime(o),u=this.getValueAtTime(o+a),c;if(l.length){c=createTypedArray("float32",l.length);var f;for(f=0;f<l.length;f+=1)c[f]=(u[f]-l[f])/a}else c=(u-l)/a;return c}function i(){return this.pv}function s(o){this.propertyGroup=o}return{searchExpressions:e,getSpeedAtTime:r,getVelocityAtTime:n,getValueAtTime:t,getStaticValueAtTime:i,setGroupProperty:s}}();function addPropertyDecorator(){function e(h,p,d){if(!this.k||!this.keyframes)return this.pv;h=h?h.toLowerCase():"";var m=this.comp.renderedFrame,b=this.keyframes,g=b[b.length-1].t;if(m<=g)return this.pv;var C,y;d?(p?C=Math.abs(g-this.elem.comp.globalData.frameRate*p):C=Math.max(0,g-this.elem.data.ip),y=g-C):((!p||p>b.length-1)&&(p=b.length-1),y=b[b.length-1-p].t,C=g-y);var E,I,T;if(h==="pingpong"){var R=Math.floor((m-y)/C);if(R%2!==0)return this.getValueAtTime((C-(m-y)%C+y)/this.comp.globalData.frameRate,0)}else if(h==="offset"){var F=this.getValueAtTime(y/this.comp.globalData.frameRate,0),q=this.getValueAtTime(g/this.comp.globalData.frameRate,0),Z=this.getValueAtTime(((m-y)%C+y)/this.comp.globalData.frameRate,0),W=Math.floor((m-y)/C);if(this.pv.length){for(T=new Array(F.length),I=T.length,E=0;E<I;E+=1)T[E]=(q[E]-F[E])*W+Z[E];return T}return(q-F)*W+Z}else if(h==="continue"){var z=this.getValueAtTime(g/this.comp.globalData.frameRate,0),ee=this.getValueAtTime((g-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(T=new Array(z.length),I=T.length,E=0;E<I;E+=1)T[E]=z[E]+(z[E]-ee[E])*((m-g)/this.comp.globalData.frameRate)/5e-4;return T}return z+(z-ee)*((m-g)/.001)}return this.getValueAtTime(((m-y)%C+y)/this.comp.globalData.frameRate,0)}function t(h,p,d){if(!this.k)return this.pv;h=h?h.toLowerCase():"";var m=this.comp.renderedFrame,b=this.keyframes,g=b[0].t;if(m>=g)return this.pv;var C,y;d?(p?C=Math.abs(this.elem.comp.globalData.frameRate*p):C=Math.max(0,this.elem.data.op-g),y=g+C):((!p||p>b.length-1)&&(p=b.length-1),y=b[p].t,C=y-g);var E,I,T;if(h==="pingpong"){var R=Math.floor((g-m)/C);if(R%2===0)return this.getValueAtTime(((g-m)%C+g)/this.comp.globalData.frameRate,0)}else if(h==="offset"){var F=this.getValueAtTime(g/this.comp.globalData.frameRate,0),q=this.getValueAtTime(y/this.comp.globalData.frameRate,0),Z=this.getValueAtTime((C-(g-m)%C+g)/this.comp.globalData.frameRate,0),W=Math.floor((g-m)/C)+1;if(this.pv.length){for(T=new Array(F.length),I=T.length,E=0;E<I;E+=1)T[E]=Z[E]-(q[E]-F[E])*W;return T}return Z-(q-F)*W}else if(h==="continue"){var z=this.getValueAtTime(g/this.comp.globalData.frameRate,0),ee=this.getValueAtTime((g+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(T=new Array(z.length),I=T.length,E=0;E<I;E+=1)T[E]=z[E]+(z[E]-ee[E])*(g-m)/.001;return T}return z+(z-ee)*(g-m)/.001}return this.getValueAtTime((C-((g-m)%C+g))/this.comp.globalData.frameRate,0)}function r(h,p){if(!this.k)return this.pv;if(h=(h||.4)*.5,p=Math.floor(p||5),p<=1)return this.pv;var d=this.comp.renderedFrame/this.comp.globalData.frameRate,m=d-h,b=d+h,g=p>1?(b-m)/(p-1):1,C=0,y=0,E;this.pv.length?E=createTypedArray("float32",this.pv.length):E=0;for(var I;C<p;){if(I=this.getValueAtTime(m+C*g),this.pv.length)for(y=0;y<this.pv.length;y+=1)E[y]+=I[y];else E+=I;C+=1}if(this.pv.length)for(y=0;y<this.pv.length;y+=1)E[y]/=p;else E/=p;return E}function n(h){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var p=this._transformCachingAtTime.v;if(p.cloneFromProps(this.pre.props),this.appliedTransformations<1){var d=this.a.getValueAtTime(h);p.translate(-d[0]*this.a.mult,-d[1]*this.a.mult,d[2]*this.a.mult)}if(this.appliedTransformations<2){var m=this.s.getValueAtTime(h);p.scale(m[0]*this.s.mult,m[1]*this.s.mult,m[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var b=this.sk.getValueAtTime(h),g=this.sa.getValueAtTime(h);p.skewFromAxis(-b*this.sk.mult,g*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var C=this.r.getValueAtTime(h);p.rotate(-C*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var y=this.rz.getValueAtTime(h),E=this.ry.getValueAtTime(h),I=this.rx.getValueAtTime(h),T=this.or.getValueAtTime(h);p.rotateZ(-y*this.rz.mult).rotateY(E*this.ry.mult).rotateX(I*this.rx.mult).rotateZ(-T[2]*this.or.mult).rotateY(T[1]*this.or.mult).rotateX(T[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var R=this.px.getValueAtTime(h),F=this.py.getValueAtTime(h);if(this.data.p.z){var q=this.pz.getValueAtTime(h);p.translate(R*this.px.mult,F*this.py.mult,-q*this.pz.mult)}else p.translate(R*this.px.mult,F*this.py.mult,0)}else{var Z=this.p.getValueAtTime(h);p.translate(Z[0]*this.p.mult,Z[1]*this.p.mult,-Z[2]*this.p.mult)}return p}function i(){return this.v.clone(new Matrix)}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(h,p,d){var m=s(h,p,d);return m.dynamicProperties.length?m.getValueAtTime=n.bind(m):m.getValueAtTime=i.bind(m),m.setGroupProperty=expressionHelpers.setGroupProperty,m};var o=PropertyFactory.getProp;PropertyFactory.getProp=function(h,p,d,m,b){var g=o(h,p,d,m,b);g.kf?g.getValueAtTime=expressionHelpers.getValueAtTime.bind(g):g.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(g),g.setGroupProperty=expressionHelpers.setGroupProperty,g.loopOut=e,g.loopIn=t,g.smooth=r,g.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(g),g.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(g),g.numKeys=p.a===1?p.k.length:0,g.propertyIndex=p.ix;var C=0;return d!==0&&(C=createTypedArray("float32",p.a===1?p.k[0].s.length:p.k.length)),g._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:C},expressionHelpers.searchExpressions(h,p,g),g.k&&b.addDynamicProperty(g),g};function a(h){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),h*=this.elem.globalData.frameRate,h-=this.offsetTime,h!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<h?this._caching.lastIndex:0,this._cachingAtTime.lastTime=h,this.interpolateShape(h,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}var l=ShapePropertyFactory.getConstructorFunction(),u=ShapePropertyFactory.getKeyframedConstructorFunction();function c(){}c.prototype={vertices:function(p,d){this.k&&this.getValue();var m=this.v;d!==void 0&&(m=this.getValueAtTime(d,0));var b,g=m._length,C=m[p],y=m.v,E=createSizedArray(g);for(b=0;b<g;b+=1)p==="i"||p==="o"?E[b]=[C[b][0]-y[b][0],C[b][1]-y[b][1]]:E[b]=[C[b][0],C[b][1]];return E},points:function(p){return this.vertices("v",p)},inTangents:function(p){return this.vertices("i",p)},outTangents:function(p){return this.vertices("o",p)},isClosed:function(){return this.v.c},pointOnPath:function(p,d){var m=this.v;d!==void 0&&(m=this.getValueAtTime(d,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(m));for(var b=this._segmentsLength,g=b.lengths,C=b.totalLength*p,y=0,E=g.length,I=0,T;y<E;){if(I+g[y].addedLength>C){var R=y,F=m.c&&y===E-1?0:y+1,q=(C-I)/g[y].addedLength;T=bez.getPointInSegment(m.v[R],m.v[F],m.o[R],m.i[F],q,g[y]);break}else I+=g[y].addedLength;y+=1}return T||(T=m.c?[m.v[0][0],m.v[0][1]]:[m.v[m._length-1][0],m.v[m._length-1][1]]),T},vectorOnPath:function(p,d,m){p==1?p=this.v.c:p==0&&(p=.999);var b=this.pointOnPath(p,d),g=this.pointOnPath(p+.001,d),C=g[0]-b[0],y=g[1]-b[1],E=Math.sqrt(Math.pow(C,2)+Math.pow(y,2));if(E===0)return[0,0];var I=m==="tangent"?[C/E,y/E]:[-y/E,C/E];return I},tangentOnPath:function(p,d){return this.vectorOnPath(p,d,"tangent")},normalOnPath:function(p,d){return this.vectorOnPath(p,d,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([c],l),extendPrototype([c],u),u.prototype.getValueAtTime=a,u.prototype.initiateExpression=ExpressionManager.initiateExpression;var f=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(h,p,d,m,b){var g=f(h,p,d,m,b);return g.propertyIndex=p.ix,g.lock=!1,d===3?expressionHelpers.searchExpressions(h,p.pt,g):d===4&&expressionHelpers.searchExpressions(h,p.ks,g),g.k&&h.addDynamicProperty(g),g}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function e(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(t,r){var n=this.calculateExpression(r);if(t.t!==n){var i={};return this.copyData(i,t),i.t=n.toString(),i.__complete=!1,i}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),r=this.searchExpressions();return this.kf=t||r,this.kf},TextProperty.prototype.searchExpressions=e}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function e(t,r){var n=createNS("feMerge");n.setAttribute("result",t);var i,s;for(s=0;s<r.length;s+=1)i=createNS("feMergeNode"),i.setAttribute("in",r[s]),n.appendChild(i),n.appendChild(i);return n}};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(e,t,r,n,i){this.filterManager=t;var s=createNS("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=s,s.setAttribute("result",n+"_tint_1"),e.appendChild(s),s=createNS("feColorMatrix"),s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),s.setAttribute("result",n+"_tint_2"),e.appendChild(s),this.matrixFilter=s;var o=this.createMergeNode(n,[i,n+"_tint_1",n+"_tint_2"]);e.appendChild(o)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+n+" 0"),this.matrixFilter.setAttribute("values",r[0]-t[0]+" 0 0 0 "+t[0]+" "+(r[1]-t[1])+" 0 0 0 "+t[1]+" "+(r[2]-t[2])+" 0 0 0 "+t[2]+" 0 0 0 1 0")}};function SVGFillFilter(e,t,r,n){this.filterManager=t;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),i.setAttribute("result",n),e.appendChild(i),this.matrixFilter=i}SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+t[0]+" 0 0 0 0 "+t[1]+" 0 0 0 0 "+t[2]+" 0 0 0 "+r+" 0")}};function SVGStrokeEffect(e,t,r){this.initialized=!1,this.filterManager=t,this.elem=r,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var e=this.elem.layerElement.children||this.elem.layerElement.childNodes,t,r,n,i;for(this.filterManager.effectElements[1].p.v===1?(i=this.elem.maskManager.masksProperties.length,n=0):(n=this.filterManager.effectElements[0].p.v-1,i=n+1),r=createNS("g"),r.setAttribute("fill","none"),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-dashoffset",1),n;n<i;n+=1)t=createNS("path"),r.appendChild(t),this.paths.push({p:t,m:n});if(this.filterManager.effectElements[10].p.v===3){var s=createNS("mask"),o=createElementID();s.setAttribute("id",o),s.setAttribute("mask-type","alpha"),s.appendChild(r),this.elem.globalData.defs.appendChild(s);var a=createNS("g");for(a.setAttribute("mask","url("+getLocationHref()+"#"+o+")");e[0];)a.appendChild(e[0]);this.elem.layerElement.appendChild(a),this.masker=s,r.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)for(e=this.elem.layerElement.children||this.elem.layerElement.childNodes;e.length;)this.elem.layerElement.removeChild(e[0]);this.elem.layerElement.appendChild(r),this.elem.layerElement.removeAttribute("mask"),r.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=r},SVGStrokeEffect.prototype.renderFrame=function(e){this.initialized||this.initialize();var t,r=this.paths.length,n,i;for(t=0;t<r;t+=1)if(this.paths[t].m!==-1&&(n=this.elem.maskManager.viewData[this.paths[t].m],i=this.paths[t].p,(e||this.filterManager._mdf||n.prop._mdf)&&i.setAttribute("d",n.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||n.prop._mdf)){var s;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var o=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,a=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,l=i.getTotalLength();s="0 0 0 "+l*o+" ";var u=l*(a-o),c=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01,f=Math.floor(u/c),h;for(h=0;h<f;h+=1)s+="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01+" ";s+="0 "+l*10+" 0 0"}else s="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",s)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",this.filterManager.effectElements[4].p.v*2),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(e||this.filterManager.effectElements[3].p._mdf)){var p=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(p[0]*255)+","+bmFloor(p[1]*255)+","+bmFloor(p[2]*255)+")")}};function SVGTritoneFilter(e,t,r,n){this.filterManager=t;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.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"),e.appendChild(i);var s=createNS("feComponentTransfer");s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("result",n),this.matrixFilter=s;var o=createNS("feFuncR");o.setAttribute("type","table"),s.appendChild(o),this.feFuncR=o;var a=createNS("feFuncG");a.setAttribute("type","table"),s.appendChild(a),this.feFuncG=a;var l=createNS("feFuncB");l.setAttribute("type","table"),s.appendChild(l),this.feFuncB=l,e.appendChild(s)}SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v,i=n[0]+" "+r[0]+" "+t[0],s=n[1]+" "+r[1]+" "+t[1],o=n[2]+" "+r[2]+" "+t[2];this.feFuncR.setAttribute("tableValues",i),this.feFuncG.setAttribute("tableValues",s),this.feFuncB.setAttribute("tableValues",o)}};function SVGProLevelsFilter(e,t,r,n){this.filterManager=t;var i=this.filterManager.effectElements,s=createNS("feComponentTransfer");(i[10].p.k||i[10].p.v!==0||i[11].p.k||i[11].p.v!==1||i[12].p.k||i[12].p.v!==1||i[13].p.k||i[13].p.v!==0||i[14].p.k||i[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",s)),(i[17].p.k||i[17].p.v!==0||i[18].p.k||i[18].p.v!==1||i[19].p.k||i[19].p.v!==1||i[20].p.k||i[20].p.v!==0||i[21].p.k||i[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",s)),(i[24].p.k||i[24].p.v!==0||i[25].p.k||i[25].p.v!==1||i[26].p.k||i[26].p.v!==1||i[27].p.k||i[27].p.v!==0||i[28].p.k||i[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",s)),(i[31].p.k||i[31].p.v!==0||i[32].p.k||i[32].p.v!==1||i[33].p.k||i[33].p.v!==1||i[34].p.k||i[34].p.v!==0||i[35].p.k||i[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",s)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(s.setAttribute("color-interpolation-filters","sRGB"),e.appendChild(s)),(i[3].p.k||i[3].p.v!==0||i[4].p.k||i[4].p.v!==1||i[5].p.k||i[5].p.v!==1||i[6].p.k||i[6].p.v!==0||i[7].p.k||i[7].p.v!==1)&&(s=createNS("feComponentTransfer"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("result",n),e.appendChild(s),this.feFuncRComposed=this.createFeFunc("feFuncR",s),this.feFuncGComposed=this.createFeFunc("feFuncG",s),this.feFuncBComposed=this.createFeFunc("feFuncB",s))}SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var r=createNS(e);return r.setAttribute("type","table"),t.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(e,t,r,n,i){for(var s=0,o=256,a,l=Math.min(e,t),u=Math.max(e,t),c=Array.call(null,{length:o}),f,h=0,p=i-n,d=t-e;s<=256;)a=s/256,a<=l?f=d<0?i:n:a>=u?f=d<0?n:i:f=n+p*Math.pow((a-e)/d,1/r),c[h]=f,h+=1,s+=256/(o-1);return c.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,r=this.filterManager.effectElements;this.feFuncRComposed&&(e||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(t=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(t=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(t=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(t=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(t=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",t))}};function SVGDropShadowEffect(e,t,r,n,i){var s=t.container.globalData.renderConfig.filterSize,o=t.data.fs||s;e.setAttribute("x",o.x||s.x),e.setAttribute("y",o.y||s.y),e.setAttribute("width",o.width||s.width),e.setAttribute("height",o.height||s.height),this.filterManager=t;var a=createNS("feGaussianBlur");a.setAttribute("in","SourceAlpha"),a.setAttribute("result",n+"_drop_shadow_1"),a.setAttribute("stdDeviation","0"),this.feGaussianBlur=a,e.appendChild(a);var l=createNS("feOffset");l.setAttribute("dx","25"),l.setAttribute("dy","0"),l.setAttribute("in",n+"_drop_shadow_1"),l.setAttribute("result",n+"_drop_shadow_2"),this.feOffset=l,e.appendChild(l);var u=createNS("feFlood");u.setAttribute("flood-color","#00ff00"),u.setAttribute("flood-opacity","1"),u.setAttribute("result",n+"_drop_shadow_3"),this.feFlood=u,e.appendChild(u);var c=createNS("feComposite");c.setAttribute("in",n+"_drop_shadow_3"),c.setAttribute("in2",n+"_drop_shadow_2"),c.setAttribute("operator","in"),c.setAttribute("result",n+"_drop_shadow_4"),e.appendChild(c);var f=this.createMergeNode(n,[n+"_drop_shadow_4",i]);e.appendChild(f)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(t[0]*255),Math.round(t[1]*255),Math.round(t[2]*255)))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,n=(this.filterManager.effectElements[2].p.v-90)*degToRads,i=r*Math.cos(n),s=r*Math.sin(n);this.feOffset.setAttribute("dx",i),this.feOffset.setAttribute("dy",s)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,r){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,r=_svgMatteSymbols.length;t<r;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var r=e.layerElement.parentNode;if(r){for(var n=r.children,i=0,s=n.length;i<s&&n[i]!==e.layerElement;)i+=1;var o;i<=s-2&&(o=n[i+1]);var a=createNS("use");a.setAttribute("href","#"+t),o?r.insertBefore(a,o):r.appendChild(a)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var r=createElementID(),n=createNS("mask");n.setAttribute("id",t.layerId),n.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(t);var i=e.globalData.defs;i.appendChild(n);var s=createNS("symbol");s.setAttribute("id",r),this.replaceInParent(t,r),s.appendChild(t.layerElement),i.appendChild(s);var o=createNS("use");o.setAttribute("href","#"+r),n.appendChild(o),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,r=0,n=t.length;r<n;)t[r]&&t[r].data.ind===e&&this.setElementAsMask(this.elem,t[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()};function SVGGaussianBlurEffect(e,t,r,n){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var i=createNS("feGaussianBlur");i.setAttribute("result",n),e.appendChild(i),this.feGaussianBlur=i}SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=.3,r=this.filterManager.effectElements[0].p.v*t,n=this.filterManager.effectElements[1].p.v,i=n==3?0:r,s=n==2?0:r;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+s);var o=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",o)}};function TransformEffect(){}TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,r=t[0].p.v,n=t[1].p.v,i=t[2].p.v===1,s=t[3].p.v,o=i?s:t[4].p.v,a=t[5].p.v,l=t[6].p.v,u=t[7].p.v;this.matrix.reset(),this.matrix.translate(-r[0],-r[1],r[2]),this.matrix.scale(o*.01,s*.01,1),this.matrix.rotate(-u*degToRads),this.matrix.skewFromAxis(-a*degToRads,(l+90)*degToRads),this.matrix.translate(n[0],n[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}};function SVGTransformEffect(e,t){this.init(t)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(e){this.init(e)}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})});function xD(e,t){return Object.is(e,t)}var Kt=null,Gl=!1,zl=1,hi=Symbol("SIGNAL");function ct(e){let t=Kt;return Kt=e,t}var Sh={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function xh(e){if(Gl)throw new Error("");if(Kt===null)return;Kt.consumerOnSignalRead(e);let t=Kt.nextProducerIndex++;if($s(Kt),t<Kt.producerNode.length&&Kt.producerNode[t]!==e&&pa(Kt)){let r=Kt.producerNode[t];$l(r,Kt.producerIndexOfThis[t])}Kt.producerNode[t]!==e&&(Kt.producerNode[t]=e,Kt.producerIndexOfThis[t]=pa(Kt)?Rv(e,Kt,t):0),Kt.producerLastReadVersion[t]=e.version}function ID(){zl++}function wD(e){if(!(pa(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===zl)){if(!e.producerMustRecompute(e)&&!Ih(e)){e.dirty=!1,e.lastCleanEpoch=zl;return}e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=zl}}function Dv(e){if(e.liveConsumerNode===void 0)return;let t=Gl;Gl=!0;try{for(let r of e.liveConsumerNode)r.dirty||TD(r)}finally{Gl=t}}function Av(){return Kt?.consumerAllowSignalWrites!==!1}function TD(e){e.dirty=!0,Dv(e),e.consumerMarkedDirty?.(e)}function Mv(e){return e&&(e.nextProducerIndex=0),ct(e)}function Pv(e,t){if(ct(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(pa(e))for(let r=e.nextProducerIndex;r<e.producerNode.length;r++)$l(e.producerNode[r],e.producerIndexOfThis[r]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function Ih(e){$s(e);for(let t=0;t<e.producerNode.length;t++){let r=e.producerNode[t],n=e.producerLastReadVersion[t];if(n!==r.version||(wD(r),n!==r.version))return!0}return!1}function Nv(e){if($s(e),pa(e))for(let t=0;t<e.producerNode.length;t++)$l(e.producerNode[t],e.producerIndexOfThis[t]);e.producerNode.length=e.producerLastReadVersion.length=e.producerIndexOfThis.length=0,e.liveConsumerNode&&(e.liveConsumerNode.length=e.liveConsumerIndexOfThis.length=0)}function Rv(e,t,r){if(kv(e),$s(e),e.liveConsumerNode.length===0)for(let n=0;n<e.producerNode.length;n++)e.producerIndexOfThis[n]=Rv(e.producerNode[n],e,n);return e.liveConsumerIndexOfThis.push(r),e.liveConsumerNode.push(t)-1}function $l(e,t){if(kv(e),$s(e),e.liveConsumerNode.length===1)for(let n=0;n<e.producerNode.length;n++)$l(e.producerNode[n],e.producerIndexOfThis[n]);let r=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[r],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[r],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){let n=e.liveConsumerIndexOfThis[t],i=e.liveConsumerNode[t];$s(i),i.producerIndexOfThis[n]=t}}function pa(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function $s(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function kv(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function _D(){throw new Error}var Fv=_D;function Lv(){Fv()}function Ov(e){Fv=e}var DD=null;function Bv(e){let t=Object.create(wh);t.value=e;let r=()=>(xh(t),t.value);return r[hi]=t,r}function Kl(e,t){Av()||Lv(),e.equal(e.value,t)||(e.value=t,AD(e))}function Vv(e,t){Av()||Lv(),Kl(e,t(e.value))}var wh=at(me({},Sh),{equal:xD,value:void 0});function AD(e){e.version++,ID(),Dv(e),DD?.()}function Fe(e){return typeof e=="function"}function Ks(e){let r=e(n=>{Error.call(n),n.stack=new Error().stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Wl=Ks(e=>function(r){e(this),this.message=r?`${r.length} errors occurred during unsubscription:
${r.map((n,i)=>`${i+1}) ${n.toString()}`).join(`
  `)}`:"",this.name="UnsubscriptionError",this.errors=r});function Ji(e,t){if(e){let r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Bt=class e{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(let s of r)s.remove(this);else r.remove(this);let{initialTeardown:n}=this;if(Fe(n))try{n()}catch(s){t=s instanceof Wl?s.errors:[s]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let s of i)try{Uv(s)}catch(o){t=t??[],o instanceof Wl?t=[...t,...o.errors]:t.push(o)}}if(t)throw new Wl(t)}}add(t){var r;if(t&&t!==this)if(this.closed)Uv(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}}_hasParent(t){let{_parentage:r}=this;return r===t||Array.isArray(r)&&r.includes(t)}_addParent(t){let{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t}_removeParent(t){let{_parentage:r}=this;r===t?this._parentage=null:Array.isArray(r)&&Ji(r,t)}remove(t){let{_finalizers:r}=this;r&&Ji(r,t),t instanceof e&&t._removeParent(this)}};Bt.EMPTY=(()=>{let e=new Bt;return e.closed=!0,e})();var Th=Bt.EMPTY;function Ql(e){return e instanceof Bt||e&&"closed"in e&&Fe(e.remove)&&Fe(e.add)&&Fe(e.unsubscribe)}function Uv(e){Fe(e)?e():e.unsubscribe()}var Zr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Ws={setTimeout(e,t,...r){let{delegate:n}=Ws;return n?.setTimeout?n.setTimeout(e,t,...r):setTimeout(e,t,...r)},clearTimeout(e){let{delegate:t}=Ws;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Yl(e){Ws.setTimeout(()=>{let{onUnhandledError:t}=Zr;if(t)t(e);else throw e})}function ma(){}var jv=_h("C",void 0,void 0);function Hv(e){return _h("E",void 0,e)}function qv(e){return _h("N",e,void 0)}function _h(e,t,r){return{kind:e,value:t,error:r}}var es=null;function Qs(e){if(Zr.useDeprecatedSynchronousErrorHandling){let t=!es;if(t&&(es={errorThrown:!1,error:null}),e(),t){let{errorThrown:r,error:n}=es;if(es=null,r)throw n}}else e()}function Gv(e){Zr.useDeprecatedSynchronousErrorHandling&&es&&(es.errorThrown=!0,es.error=e)}var ts=class extends Bt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Ql(t)&&t.add(this)):this.destination=ND}static create(t,r,n){return new Gn(t,r,n)}next(t){this.isStopped?Ah(qv(t),this):this._next(t)}error(t){this.isStopped?Ah(Hv(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Ah(jv,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},MD=Function.prototype.bind;function Dh(e,t){return MD.call(e,t)}var Mh=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:r}=this;if(r.next)try{r.next(t)}catch(n){Zl(n)}}error(t){let{partialObserver:r}=this;if(r.error)try{r.error(t)}catch(n){Zl(n)}else Zl(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(r){Zl(r)}}},Gn=class extends ts{constructor(t,r,n){super();let i;if(Fe(t)||!t)i={next:t??void 0,error:r??void 0,complete:n??void 0};else{let s;this&&Zr.useDeprecatedNextContext?(s=Object.create(t),s.unsubscribe=()=>this.unsubscribe(),i={next:t.next&&Dh(t.next,s),error:t.error&&Dh(t.error,s),complete:t.complete&&Dh(t.complete,s)}):i=t}this.destination=new Mh(i)}};function Zl(e){Zr.useDeprecatedSynchronousErrorHandling?Gv(e):Yl(e)}function PD(e){throw e}function Ah(e,t){let{onStoppedNotification:r}=Zr;r&&Ws.setTimeout(()=>r(e,t))}var ND={closed:!0,next:ma,error:PD,complete:ma};var Ys=typeof Symbol=="function"&&Symbol.observable||"@@observable";function wr(e){return e}function Ph(...e){return Nh(e)}function Nh(e){return e.length===0?wr:e.length===1?e[0]:function(r){return e.reduce((n,i)=>i(n),r)}}var je=(()=>{class e{constructor(r){r&&(this._subscribe=r)}lift(r){let n=new e;return n.source=this,n.operator=r,n}subscribe(r,n,i){let s=kD(r)?r:new Gn(r,n,i);return Qs(()=>{let{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(r){try{return this._subscribe(r)}catch(n){r.error(n)}}forEach(r,n){return n=zv(n),new n((i,s)=>{let o=new Gn({next:a=>{try{r(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:i});this.subscribe(o)})}_subscribe(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)}[Ys](){return this}pipe(...r){return Nh(r)(this)}toPromise(r){return r=zv(r),new r((n,i)=>{let s;this.subscribe(o=>s=o,o=>i(o),()=>n(s))})}}return e.create=t=>new e(t),e})();function zv(e){var t;return(t=e??Zr.Promise)!==null&&t!==void 0?t:Promise}function RD(e){return e&&Fe(e.next)&&Fe(e.error)&&Fe(e.complete)}function kD(e){return e&&e instanceof ts||RD(e)&&Ql(e)}function Rh(e){return Fe(e?.lift)}function Ge(e){return t=>{if(Rh(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function ze(e,t,r,n,i){return new kh(e,t,r,n,i)}var kh=class extends ts{constructor(t,r,n,i,s,o){super(t),this.onFinalize=s,this.shouldUnsubscribe=o,this._next=r?function(a){try{r(a)}catch(l){t.error(l)}}:super._next,this._error=i?function(a){try{i(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:r}=this;super.unsubscribe(),!r&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};function Zs(){return Ge((e,t)=>{let r=null;e._refCount++;let n=ze(t,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount){r=null;return}let i=e._connection,s=r;r=null,i&&(!s||i===s)&&i.unsubscribe(),t.unsubscribe()});e.subscribe(n),n.closed||(r=e.connect())})}var Xs=class extends je{constructor(t,r){super(),this.source=t,this.subjectFactory=r,this._subject=null,this._refCount=0,this._connection=null,Rh(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new Bt;let r=this.getSubject();t.add(this.source.subscribe(ze(r,void 0,()=>{this._teardown(),r.complete()},n=>{this._teardown(),r.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Bt.EMPTY)}return t}refCount(){return Zs()(this)}};var $v=Ks(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Mt=(()=>{class e extends je{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){let n=new Xl(this,this);return n.operator=r,n}_throwIfClosed(){if(this.closed)throw new $v}next(r){Qs(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(r)}})}error(r){Qs(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;let{observers:n}=this;for(;n.length;)n.shift().error(r)}})}complete(){Qs(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){let{hasError:n,isStopped:i,observers:s}=this;return n||i?Th:(this.currentObservers=null,s.push(r),new Bt(()=>{this.currentObservers=null,Ji(s,r)}))}_checkFinalizedStatuses(r){let{hasError:n,thrownError:i,isStopped:s}=this;n?r.error(i):s&&r.complete()}asObservable(){let r=new je;return r.source=this,r}}return e.create=(t,r)=>new Xl(t,r),e})(),Xl=class extends Mt{constructor(t,r){super(),this.destination=t,this.source=r}next(t){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.next)===null||n===void 0||n.call(r,t)}error(t){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.error)===null||n===void 0||n.call(r,t)}complete(){var t,r;(r=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||r===void 0||r.call(t)}_subscribe(t){var r,n;return(n=(r=this.source)===null||r===void 0?void 0:r.subscribe(t))!==null&&n!==void 0?n:Th}};var $t=class extends Mt{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let r=super._subscribe(t);return!r.closed&&t.next(this._value),r}getValue(){let{hasError:t,thrownError:r,_value:n}=this;if(t)throw r;return this._throwIfClosed(),n}next(t){super.next(this._value=t)}};var ga={now(){return(ga.delegate||Date).now()},delegate:void 0};var va=class extends Mt{constructor(t=1/0,r=1/0,n=ga){super(),this._bufferSize=t,this._windowTime=r,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=r===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,r)}next(t){let{isStopped:r,_buffer:n,_infiniteTimeWindow:i,_timestampProvider:s,_windowTime:o}=this;r||(n.push(t),!i&&n.push(s.now()+o)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let r=this._innerSubscribe(t),{_infiniteTimeWindow:n,_buffer:i}=this,s=i.slice();for(let o=0;o<s.length&&!t.closed;o+=n?1:2)t.next(s[o]);return this._checkFinalizedStatuses(t),r}_trimBuffer(){let{_bufferSize:t,_timestampProvider:r,_buffer:n,_infiniteTimeWindow:i}=this,s=(i?1:2)*t;if(t<1/0&&s<n.length&&n.splice(0,n.length-s),!i){let o=r.now(),a=0;for(let l=1;l<n.length&&n[l]<=o;l+=2)a=l;a&&n.splice(0,a+1)}}};var Jl=class extends Bt{constructor(t,r){super()}schedule(t,r=0){return this}};var ya={setInterval(e,t,...r){let{delegate:n}=ya;return n?.setInterval?n.setInterval(e,t,...r):setInterval(e,t,...r)},clearInterval(e){let{delegate:t}=ya;return(t?.clearInterval||clearInterval)(e)},delegate:void 0};var eu=class extends Jl{constructor(t,r){super(t,r),this.scheduler=t,this.work=r,this.pending=!1}schedule(t,r=0){var n;if(this.closed)return this;this.state=t;let i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,r)),this.pending=!0,this.delay=r,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(s,this.id,r),this}requestAsyncId(t,r,n=0){return ya.setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,r,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return r;r!=null&&ya.clearInterval(r)}execute(t,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(t,r);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,r){let n=!1,i;try{this.work(t)}catch(s){n=!0,i=s||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),i}unsubscribe(){if(!this.closed){let{id:t,scheduler:r}=this,{actions:n}=r;this.work=this.state=this.scheduler=null,this.pending=!1,Ji(n,this),t!=null&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,super.unsubscribe()}}};var Js=class e{constructor(t,r=e.now){this.schedulerActionCtor=t,this.now=r}schedule(t,r=0,n){return new this.schedulerActionCtor(this,t).schedule(n,r)}};Js.now=ga.now;var tu=class extends Js{constructor(t,r=Js.now){super(t,r),this.actions=[],this._active=!1}flush(t){let{actions:r}=this;if(this._active){r.push(t);return}let n;this._active=!0;do if(n=t.execute(t.state,t.delay))break;while(t=r.shift());if(this._active=!1,n){for(;t=r.shift();)t.unsubscribe();throw n}}};var Fh=new tu(eu),Kv=Fh;var Tr=new je(e=>e.complete());function ru(e){return e&&Fe(e.schedule)}function Wv(e){return e[e.length-1]}function nu(e){return Fe(Wv(e))?e.pop():void 0}function di(e){return ru(Wv(e))?e.pop():void 0}function Yv(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?s(c.value):i(c.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}function Qv(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function rs(e){return this instanceof rs?(this.v=e,this):new rs(e)}function Zv(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i={},a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(p){return function(d){return Promise.resolve(d).then(p,f)}}function a(p,d){n[p]&&(i[p]=function(m){return new Promise(function(b,g){s.push([p,m,b,g])>1||l(p,m)})},d&&(i[p]=d(i[p])))}function l(p,d){try{u(n[p](d))}catch(m){h(s[0][3],m)}}function u(p){p.value instanceof rs?Promise.resolve(p.value.v).then(c,f):h(s[0][2],p)}function c(p){l("next",p)}function f(p){l("throw",p)}function h(p,d){p(d),s.shift(),s.length&&l(s[0][0],s[0][1])}}function Xv(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Qv=="function"?Qv(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(a,l){o=e[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(u){s({value:u,done:a})},o)}}var iu=e=>e&&typeof e.length=="number"&&typeof e!="function";function su(e){return Fe(e?.then)}function ou(e){return Fe(e[Ys])}function au(e){return Symbol.asyncIterator&&Fe(e?.[Symbol.asyncIterator])}function lu(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function FD(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var uu=FD();function cu(e){return Fe(e?.[uu])}function fu(e){return Zv(this,arguments,function*(){let r=e.getReader();try{for(;;){let{value:n,done:i}=yield rs(r.read());if(i)return yield rs(void 0);yield yield rs(n)}}finally{r.releaseLock()}})}function hu(e){return Fe(e?.getReader)}function Nt(e){if(e instanceof je)return e;if(e!=null){if(ou(e))return LD(e);if(iu(e))return OD(e);if(su(e))return BD(e);if(au(e))return Jv(e);if(cu(e))return VD(e);if(hu(e))return UD(e)}throw lu(e)}function LD(e){return new je(t=>{let r=e[Ys]();if(Fe(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function OD(e){return new je(t=>{for(let r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function BD(e){return new je(t=>{e.then(r=>{t.closed||(t.next(r),t.complete())},r=>t.error(r)).then(null,Yl)})}function VD(e){return new je(t=>{for(let r of e)if(t.next(r),t.closed)return;t.complete()})}function Jv(e){return new je(t=>{jD(e,t).catch(r=>t.error(r))})}function UD(e){return Jv(fu(e))}function jD(e,t){var r,n,i,s;return Yv(this,void 0,void 0,function*(){try{for(r=Xv(e);n=yield r.next(),!n.done;){let o=n.value;if(t.next(o),t.closed)return}}catch(o){i={error:o}}finally{try{n&&!n.done&&(s=r.return)&&(yield s.call(r))}finally{if(i)throw i.error}}t.complete()})}function vr(e,t,r,n=0,i=!1){let s=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(s),!i)return s}function du(e,t=0){return Ge((r,n)=>{r.subscribe(ze(n,i=>vr(n,e,()=>n.next(i),t),()=>vr(n,e,()=>n.complete(),t),i=>vr(n,e,()=>n.error(i),t)))})}function pu(e,t=0){return Ge((r,n)=>{n.add(e.schedule(()=>r.subscribe(n),t))})}function ey(e,t){return Nt(e).pipe(pu(t),du(t))}function ty(e,t){return Nt(e).pipe(pu(t),du(t))}function ry(e,t){return new je(r=>{let n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}function ny(e,t){return new je(r=>{let n;return vr(r,t,()=>{n=e[uu](),vr(r,t,()=>{let i,s;try{({value:i,done:s}=n.next())}catch(o){r.error(o);return}s?r.complete():r.next(i)},0,!0)}),()=>Fe(n?.return)&&n.return()})}function mu(e,t){if(!e)throw new Error("Iterable cannot be null");return new je(r=>{vr(r,t,()=>{let n=e[Symbol.asyncIterator]();vr(r,t,()=>{n.next().then(i=>{i.done?r.complete():r.next(i.value)})},0,!0)})})}function iy(e,t){return mu(fu(e),t)}function sy(e,t){if(e!=null){if(ou(e))return ey(e,t);if(iu(e))return ry(e,t);if(su(e))return ty(e,t);if(au(e))return mu(e,t);if(cu(e))return ny(e,t);if(hu(e))return iy(e,t)}throw lu(e)}function Tt(e,t){return t?sy(e,t):Nt(e)}function _e(...e){let t=di(e);return Tt(e,t)}function eo(e,t){let r=Fe(e)?e:()=>e,n=i=>i.error(r());return new je(t?i=>t.schedule(n,0,i):n)}function Lh(e){return!!e&&(e instanceof je||Fe(e.lift)&&Fe(e.subscribe))}var zn=Ks(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function oy(e){return e instanceof Date&&!isNaN(e)}function Ae(e,t){return Ge((r,n)=>{let i=0;r.subscribe(ze(n,s=>{n.next(e.call(t,s,i++))}))})}var{isArray:HD}=Array;function qD(e,t){return HD(t)?e(...t):e(t)}function gu(e){return Ae(t=>qD(e,t))}var{isArray:GD}=Array,{getPrototypeOf:zD,prototype:$D,keys:KD}=Object;function vu(e){if(e.length===1){let t=e[0];if(GD(t))return{args:t,keys:null};if(WD(t)){let r=KD(t);return{args:r.map(n=>t[n]),keys:r}}}return{args:e,keys:null}}function WD(e){return e&&typeof e=="object"&&zD(e)===$D}function yu(e,t){return e.reduce((r,n,i)=>(r[n]=t[i],r),{})}function Cu(...e){let t=di(e),r=nu(e),{args:n,keys:i}=vu(e);if(n.length===0)return Tt([],t);let s=new je(QD(n,t,i?o=>yu(i,o):wr));return r?s.pipe(gu(r)):s}function QD(e,t,r=wr){return n=>{ay(t,()=>{let{length:i}=e,s=new Array(i),o=i,a=i;for(let l=0;l<i;l++)ay(t,()=>{let u=Tt(e[l],t),c=!1;u.subscribe(ze(n,f=>{s[l]=f,c||(c=!0,a--),a||n.next(r(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}function ay(e,t,r){e?vr(r,e,t):t()}function ly(e,t,r,n,i,s,o,a){let l=[],u=0,c=0,f=!1,h=()=>{f&&!l.length&&!u&&t.complete()},p=m=>u<n?d(m):l.push(m),d=m=>{s&&t.next(m),u++;let b=!1;Nt(r(m,c++)).subscribe(ze(t,g=>{i?.(g),s?p(g):t.next(g)},()=>{b=!0},void 0,()=>{if(b)try{for(u--;l.length&&u<n;){let g=l.shift();o?vr(t,o,()=>d(g)):d(g)}h()}catch(g){t.error(g)}}))};return e.subscribe(ze(t,p,()=>{f=!0,h()})),()=>{a?.()}}function Vt(e,t,r=1/0){return Fe(t)?Vt((n,i)=>Ae((s,o)=>t(n,s,i,o))(Nt(e(n,i))),r):(typeof t=="number"&&(r=t),Ge((n,i)=>ly(n,i,e,r)))}function Oh(e=1/0){return Vt(wr,e)}function uy(){return Oh(1)}function to(...e){return uy()(Tt(e,di(e)))}function ro(e){return new je(t=>{Nt(e()).subscribe(t)})}function Bh(...e){let t=nu(e),{args:r,keys:n}=vu(e),i=new je(s=>{let{length:o}=r;if(!o){s.complete();return}let a=new Array(o),l=o,u=o;for(let c=0;c<o;c++){let f=!1;Nt(r[c]).subscribe(ze(s,h=>{f||(f=!0,u--),a[c]=h},()=>l--,void 0,()=>{(!l||!f)&&(u||s.next(n?yu(n,a):a),s.complete())}))}});return t?i.pipe(gu(t)):i}function cy(e=0,t,r=Kv){let n=-1;return t!=null&&(ru(t)?r=t:n=t),new je(i=>{let s=oy(e)?+e-r.now():e;s<0&&(s=0);let o=0;return r.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete())},s)})}function Ca(e=0,t=Fh){return e<0&&(e=0),cy(e,e,t)}function lr(e,t){return Ge((r,n)=>{let i=0;r.subscribe(ze(n,s=>e.call(t,s,i++)&&n.next(s)))})}function Xr(e){return Ge((t,r)=>{let n=null,i=!1,s;n=t.subscribe(ze(r,void 0,void 0,o=>{s=Nt(e(o,Xr(e)(t))),n?(n.unsubscribe(),n=null,s.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,s.subscribe(r))})}function fy(e,t,r,n,i){return(s,o)=>{let a=r,l=t,u=0;s.subscribe(ze(o,c=>{let f=u++;l=a?e(l,c,f):(a=!0,c),n&&o.next(l)},i&&(()=>{a&&o.next(l),o.complete()})))}}function pi(e,t){return Fe(t)?Vt(e,t,1):Vt(e,1)}function mi(e){return Ge((t,r)=>{let n=!1;t.subscribe(ze(r,i=>{n=!0,r.next(i)},()=>{n||r.next(e),r.complete()}))})}function $n(e){return e<=0?()=>Tr:Ge((t,r)=>{let n=0;t.subscribe(ze(r,i=>{++n<=e&&(r.next(i),e<=n&&r.complete())}))})}function Vh(e){return Ae(()=>e)}function Eu(e=YD){return Ge((t,r)=>{let n=!1;t.subscribe(ze(r,i=>{n=!0,r.next(i)},()=>n?r.complete():r.error(e())))})}function YD(){return new zn}function ns(e){return Ge((t,r)=>{try{t.subscribe(r)}finally{r.add(e)}})}function vn(e,t){let r=arguments.length>=2;return n=>n.pipe(e?lr((i,s)=>e(i,s,n)):wr,$n(1),r?mi(t):Eu(()=>new zn))}function no(e){return e<=0?()=>Tr:Ge((t,r)=>{let n=[];t.subscribe(ze(r,i=>{n.push(i),e<n.length&&n.shift()},()=>{for(let i of n)r.next(i);r.complete()},void 0,()=>{n=null}))})}function Uh(e,t){let r=arguments.length>=2;return n=>n.pipe(e?lr((i,s)=>e(i,s,n)):wr,no(1),r?mi(t):Eu(()=>new zn))}function jh(e,t){return Ge(fy(e,t,arguments.length>=2,!0))}function hy(e={}){let{connector:t=()=>new Mt,resetOnError:r=!0,resetOnComplete:n=!0,resetOnRefCountZero:i=!0}=e;return s=>{let o,a,l,u=0,c=!1,f=!1,h=()=>{a?.unsubscribe(),a=void 0},p=()=>{h(),o=l=void 0,c=f=!1},d=()=>{let m=o;p(),m?.unsubscribe()};return Ge((m,b)=>{u++,!f&&!c&&h();let g=l=l??t();b.add(()=>{u--,u===0&&!f&&!c&&(a=Hh(d,i))}),g.subscribe(b),!o&&u>0&&(o=new Gn({next:C=>g.next(C),error:C=>{f=!0,h(),a=Hh(p,r,C),g.error(C)},complete:()=>{c=!0,h(),a=Hh(p,n),g.complete()}}),Nt(m).subscribe(o))})(s)}}function Hh(e,t,...r){if(t===!0){e();return}if(t===!1)return;let n=new Gn({next:()=>{n.unsubscribe(),e()}});return Nt(t(...r)).subscribe(n)}function qh(e,t,r){let n,i=!1;return e&&typeof e=="object"?{bufferSize:n=1/0,windowTime:t=1/0,refCount:i=!1,scheduler:r}=e:n=e??1/0,hy({connector:()=>new va(n,t,r),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function io(...e){let t=di(e);return Ge((r,n)=>{(t?to(e,r,t):to(e,r)).subscribe(n)})}function jt(e,t){return Ge((r,n)=>{let i=null,s=0,o=!1,a=()=>o&&!i&&n.complete();r.subscribe(ze(n,l=>{i?.unsubscribe();let u=0,c=s++;Nt(e(l,c)).subscribe(i=ze(n,f=>n.next(t?t(l,f,c,u++):f),()=>{i=null,a()}))},()=>{o=!0,a()}))})}function gi(e){return Ge((t,r)=>{Nt(e).subscribe(ze(r,()=>r.complete(),ma)),!r.closed&&t.subscribe(r)})}function Gh(e,t=!1){return Ge((r,n)=>{let i=0;r.subscribe(ze(n,s=>{let o=e(s,i++);(o||t)&&n.next(s),!o&&n.complete()}))})}function Ht(e,t,r){let n=Fe(e)||t||r?{next:e,error:t,complete:r}:e;return n?Ge((i,s)=>{var o;(o=n.subscribe)===null||o===void 0||o.call(n);let a=!0;i.subscribe(ze(s,l=>{var u;(u=n.next)===null||u===void 0||u.call(n,l),s.next(l)},()=>{var l;a=!1,(l=n.complete)===null||l===void 0||l.call(n),s.complete()},l=>{var u;a=!1,(u=n.error)===null||u===void 0||u.call(n,l),s.error(l)},()=>{var l,u;a&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(u=n.finalize)===null||u===void 0||u.call(n)}))}):wr}var rC="https://g.co/ng/security#xss",ve=class extends Error{constructor(t,r){super(Xu(t,r)),this.code=t}};function Xu(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}var nC=Symbol("InputSignalNode#UNSET"),ZD=at(me({},wh),{transformFn:void 0,applyValueToInputSignal(e,t){Kl(e,t)}});function iC(e,t){let r=Object.create(ZD);r.value=e,r.transformFn=t?.transform;function n(){if(xh(r),r.value===nC)throw new ve(-950,!1);return r.value}return n[hi]=r,n}function Na(e){return{toString:e}.toString()}var bu="__parameters__";function XD(e){return function(...r){if(e){let n=e(...r);for(let i in n)this[i]=n[i]}}}function sC(e,t,r){return Na(()=>{let n=XD(t);function i(...s){if(this instanceof i)return n.apply(this,s),this;let o=new i(...s);return a.annotation=o,a;function a(l,u,c){let f=l.hasOwnProperty(bu)?l[bu]:Object.defineProperty(l,bu,{value:[]})[bu];for(;f.length<=c;)f.push(null);return(f[c]=f[c]||[]).push(o),l}}return r&&(i.prototype=Object.create(r.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i})}var _r=globalThis;function Et(e){for(let t in e)if(e[t]===Et)return t;throw Error("Could not find renamed property on target object.")}function JD(e,t){for(let r in t)t.hasOwnProperty(r)&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function fr(e){if(typeof e=="string")return e;if(Array.isArray(e))return"["+e.map(fr).join(", ")+"]";if(e==null)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;let t=e.toString();if(t==null)return""+t;let r=t.indexOf(`
`);return r===-1?t:t.substring(0,r)}function ad(e,t){return e==null||e===""?t===null?"":t:t==null||t===""?e:e+" "+t}var eA=Et({__forward_ref__:Et});function bi(e){return e.__forward_ref__=bi,e.toString=function(){return fr(this())},e}function cr(e){return oC(e)?e():e}function oC(e){return typeof e=="function"&&e.hasOwnProperty(eA)&&e.__forward_ref__===bi}function Ce(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function nn(e){return{providers:e.providers||[],imports:e.imports||[]}}function Ju(e){return dy(e,lC)||dy(e,uC)}function aC(e){return Ju(e)!==null}function dy(e,t){return e.hasOwnProperty(t)?e[t]:null}function tA(e){let t=e&&(e[lC]||e[uC]);return t||null}function py(e){return e&&(e.hasOwnProperty(my)||e.hasOwnProperty(rA))?e[my]:null}var lC=Et({\u0275prov:Et}),my=Et({\u0275inj:Et}),uC=Et({ngInjectableDef:Et}),rA=Et({ngInjectorDef:Et}),De=class{constructor(t,r){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof r=="number"?this.__NG_ELEMENT_ID__=r:r!==void 0&&(this.\u0275prov=Ce({token:this,providedIn:r.providedIn||"root",factory:r.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function cC(e){return e&&!!e.\u0275providers}var nA=Et({\u0275cmp:Et}),iA=Et({\u0275dir:Et}),sA=Et({\u0275pipe:Et}),oA=Et({\u0275mod:Et}),Ru=Et({\u0275fac:Et}),Ea=Et({__NG_ELEMENT_ID__:Et}),gy=Et({__NG_ENV_ID__:Et});function ec(e){return typeof e=="string"?e:e==null?"":String(e)}function aA(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():ec(e)}function lA(e,t){let r=t?`. Dependency path: ${t.join(" > ")} > ${e}`:"";throw new ve(-200,e)}function dp(e,t){throw new ve(-201,!1)}var $e=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}($e||{}),ld;function fC(){return ld}function yr(e){let t=ld;return ld=e,t}function hC(e,t,r){let n=Ju(e);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(r&$e.Optional)return null;if(t!==void 0)return t;dp(e,"Injector")}var uA={},ba=uA,ud="__NG_DI_FLAG__",ku="ngTempTokenPath",cA="ngTokenPath",fA=/\n/gm,hA="\u0275",vy="__source",lo;function dA(){return lo}function vi(e){let t=lo;return lo=e,t}function pA(e,t=$e.Default){if(lo===void 0)throw new ve(-203,!1);return lo===null?hC(e,void 0,t):lo.get(e,t&$e.Optional?null:void 0,t)}function Re(e,t=$e.Default){return(fC()||pA)(cr(e),t)}function re(e,t=$e.Default){return Re(e,tc(t))}function tc(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function cd(e){let t=[];for(let r=0;r<e.length;r++){let n=cr(e[r]);if(Array.isArray(n)){if(n.length===0)throw new ve(900,!1);let i,s=$e.Default;for(let o=0;o<n.length;o++){let a=n[o],l=mA(a);typeof l=="number"?l===-1?i=a.token:s|=l:i=a}t.push(Re(i,s))}else t.push(Re(n))}return t}function dC(e,t){return e[ud]=t,e.prototype[ud]=t,e}function mA(e){return e[ud]}function gA(e,t,r,n){let i=e[ku];throw t[vy]&&i.unshift(t[vy]),e.message=vA(`
`+e.message,i,r,n),e[cA]=i,e[ku]=null,e}function vA(e,t,r,n=null){e=e&&e.charAt(0)===`
`&&e.charAt(1)==hA?e.slice(2):e;let i=fr(t);if(Array.isArray(t))i=t.map(fr).join(" -> ");else if(typeof t=="object"){let s=[];for(let o in t)if(t.hasOwnProperty(o)){let a=t[o];s.push(o+":"+(typeof a=="string"?JSON.stringify(a):fr(a)))}i=`{${s.join(", ")}}`}return`${r}${n?"("+n+")":""}[${i}]: ${e.replace(fA,`
  `)}`}var rc=dC(sC("Optional"),8);var pp=dC(sC("SkipSelf"),4);function as(e,t){let r=e.hasOwnProperty(Ru);return r?e[Ru]:null}function yA(e,t,r){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],s=t[n];if(r&&(i=r(i),s=r(s)),s!==i)return!1}return!0}function CA(e){return e.flat(Number.POSITIVE_INFINITY)}function mp(e,t){e.forEach(r=>Array.isArray(r)?mp(r,t):t(r))}function pC(e,t,r){t>=e.length?e.push(r):e.splice(t,0,r)}function Fu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function EA(e,t,r,n){let i=e.length;if(i==t)e.push(r,n);else if(i===1)e.push(n,e[0]),e[0]=r;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=r,e[t+1]=n}}function gp(e,t,r){let n=Ra(e,t);return n>=0?e[n|1]=r:(n=~n,EA(e,n,t,r)),n}function zh(e,t){let r=Ra(e,t);if(r>=0)return e[r|1]}function Ra(e,t){return bA(e,t,1)}function bA(e,t,r){let n=0,i=e.length>>r;for(;i!==n;){let s=n+(i-n>>1),o=e[s<<r];if(t===o)return s<<r;o>t?i=s:n=s+1}return~(i<<r)}var co={},Cr=[],fo=new De(""),mC=new De("",-1),gC=new De(""),Lu=class{get(t,r=ba){if(r===ba){let n=new Error(`NullInjectorError: No provider for ${fr(t)}!`);throw n.name="NullInjectorError",n}return r}},vC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(vC||{}),En=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(En||{}),kt=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(kt||{});function SA(e,t,r){let n=e.length;for(;;){let i=e.indexOf(t,r);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===n||e.charCodeAt(i+s)<=32)return i}r=i+1}}function fd(e,t,r){let n=0;for(;n<r.length;){let i=r[n];if(typeof i=="number"){if(i!==0)break;n++;let s=r[n++],o=r[n++],a=r[n++];e.setAttribute(t,o,a,s)}else{let s=i,o=r[++n];xA(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),n++}}return n}function yC(e){return e===3||e===4||e===6}function xA(e){return e.charCodeAt(0)===64}function Sa(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let r=-1;for(let n=0;n<t.length;n++){let i=t[n];typeof i=="number"?r=i:r===0||(r===-1||r===2?yy(e,r,i,null,t[++n]):yy(e,r,i,null,null))}}return e}function yy(e,t,r,n,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===r){if(n===null){i!==null&&(e[s+1]=i);return}else if(n===e[s+1]){e[s+2]=i;return}}s++,n!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,r),n!==null&&e.splice(s++,0,n),i!==null&&e.splice(s++,0,i)}var CC="ng-template";function IA(e,t,r,n){let i=0;if(n){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&SA(t[i+1].toLowerCase(),r,0)!==-1)return!0}else if(vp(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===r)return!0}return!1}function vp(e){return e.type===4&&e.value!==CC}function wA(e,t,r){let n=e.type===4&&!r?CC:e.value;return t===n}function TA(e,t,r){let n=4,i=e.attrs,s=i!==null?AA(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!Jr(n)&&!Jr(l))return!1;if(o&&Jr(l))continue;o=!1,n=l|n&1;continue}if(!o)if(n&4){if(n=2|n&1,l!==""&&!wA(e,l,r)||l===""&&t.length===1){if(Jr(n))return!1;o=!0}}else if(n&8){if(i===null||!IA(e,i,l,r)){if(Jr(n))return!1;o=!0}}else{let u=t[++a],c=_A(l,i,vp(e),r);if(c===-1){if(Jr(n))return!1;o=!0;continue}if(u!==""){let f;if(c>s?f="":f=i[c+1].toLowerCase(),n&2&&u!==f){if(Jr(n))return!1;o=!0}}}}return Jr(n)||o}function Jr(e){return(e&1)===0}function _A(e,t,r,n){if(t===null)return-1;let i=0;if(n||!r){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return MA(t,e)}function DA(e,t,r=!1){for(let n=0;n<t.length;n++)if(TA(e,t[n],r))return!0;return!1}function AA(e){for(let t=0;t<e.length;t++){let r=e[t];if(yC(r))return t}return e.length}function MA(e,t){let r=e.indexOf(4);if(r>-1)for(r++;r<e.length;){let n=e[r];if(typeof n=="number")return-1;if(n===t)return r;r++}return-1}function Cy(e,t){return e?":not("+t.trim()+")":t}function PA(e){let t=e[0],r=1,n=2,i="",s=!1;for(;r<e.length;){let o=e[r];if(typeof o=="string")if(n&2){let a=e[++r];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else n&8?i+="."+o:n&4&&(i+=" "+o);else i!==""&&!Jr(o)&&(t+=Cy(s,i),i=""),n=o,s=s||!Jr(n);r++}return i!==""&&(t+=Cy(s,i)),t}function NA(e){return e.map(PA).join(",")}function RA(e){let t=[],r=[],n=1,i=2;for(;n<e.length;){let s=e[n];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++n]):i===8&&r.push(s);else{if(!Jr(i))break;i=s}n++}return{attrs:t,classes:r}}function dt(e){return Na(()=>{let t=wC(e),r=at(me({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===vC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||En.Emulated,styles:e.styles||Cr,_:null,schemas:e.schemas||null,tView:null,id:""});TC(r);let n=e.dependencies;return r.directiveDefs=by(n,!1),r.pipeDefs=by(n,!0),r.id=LA(r),r})}function kA(e){return ls(e)||bC(e)}function FA(e){return e!==null}function sn(e){return Na(()=>({type:e.type,bootstrap:e.bootstrap||Cr,declarations:e.declarations||Cr,imports:e.imports||Cr,exports:e.exports||Cr,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function Ey(e,t){if(e==null)return co;let r={};for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],s,o,a=kt.None;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s):(s=i,o=i),t?(r[s]=a!==kt.None?[n,a]:n,t[s]=o):r[s]=n}return r}function Lt(e){return Na(()=>{let t=wC(e);return TC(t),t})}function EC(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone===!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function ls(e){return e[nA]||null}function bC(e){return e[iA]||null}function SC(e){return e[sA]||null}function xC(e){let t=ls(e)||bC(e)||SC(e);return t!==null?t.standalone:!1}function IC(e,t){let r=e[oA]||null;if(!r&&t===!0)throw new Error(`Type ${fr(e)} does not have '\u0275mod' property.`);return r}function wC(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||co,exportAs:e.exportAs||null,standalone:e.standalone===!0,signals:e.signals===!0,selectors:e.selectors||Cr,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Ey(e.inputs,t),outputs:Ey(e.outputs),debugInfo:null}}function TC(e){e.features?.forEach(t=>t(e))}function by(e,t){if(!e)return null;let r=t?SC:kA;return()=>(typeof e=="function"?e():e).map(n=>r(n)).filter(FA)}function LA(e){let t=0,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(let i of r)t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function vo(e){return{\u0275providers:e}}function OA(...e){return{\u0275providers:_C(!0,e),\u0275fromNgModule:!0}}function _C(e,...t){let r=[],n=new Set,i,s=o=>{r.push(o)};return mp(t,o=>{let a=o;hd(a,s,[],n)&&(i||=[],i.push(a))}),i!==void 0&&DC(i,s),r}function DC(e,t){for(let r=0;r<e.length;r++){let{ngModule:n,providers:i}=e[r];yp(i,s=>{t(s,n)})}}function hd(e,t,r,n){if(e=cr(e),!e)return!1;let i=null,s=py(e),o=!s&&ls(e);if(!s&&!o){let l=e.ngModule;if(s=py(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=n.has(i);if(o){if(a)return!1;if(n.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let u of l)hd(u,t,r,n)}}else if(s){if(s.imports!=null&&!a){n.add(i);let u;try{mp(s.imports,c=>{hd(c,t,r,n)&&(u||=[],u.push(c))})}finally{}u!==void 0&&DC(u,t)}if(!a){let u=as(i)||(()=>new i);t({provide:i,useFactory:u,deps:Cr},i),t({provide:gC,useValue:i,multi:!0},i),t({provide:fo,useValue:()=>Re(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let u=e;yp(l,c=>{t(c,u)})}}else return!1;return i!==e&&e.providers!==void 0}function yp(e,t){for(let r of e)cC(r)&&(r=r.\u0275providers),Array.isArray(r)?yp(r,t):t(r)}var BA=Et({provide:String,useValue:Et});function AC(e){return e!==null&&typeof e=="object"&&BA in e}function VA(e){return!!(e&&e.useExisting)}function UA(e){return!!(e&&e.useFactory)}function ho(e){return typeof e=="function"}function jA(e){return!!e.useClass}var nc=new De(""),_u={},HA={},$h;function Cp(){return $h===void 0&&($h=new Lu),$h}var Er=class{},xa=class extends Er{get destroyed(){return this._destroyed}constructor(t,r,n,i){super(),this.parent=r,this.source=n,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,pd(t,o=>this.processProvider(o)),this.records.set(mC,so(void 0,this)),i.has("environment")&&this.records.set(Er,so(void 0,this));let s=this.records.get(nc);s!=null&&typeof s.value=="string"&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(gC,Cr,$e.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;let t=ct(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let r=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of r)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),ct(t)}}onDestroy(t){return this.assertNotDestroyed(),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){this.assertNotDestroyed();let r=vi(this),n=yr(void 0),i;try{return t()}finally{vi(r),yr(n)}}get(t,r=ba,n=$e.Default){if(this.assertNotDestroyed(),t.hasOwnProperty(gy))return t[gy](this);n=tc(n);let i,s=vi(this),o=yr(void 0);try{if(!(n&$e.SkipSelf)){let l=this.records.get(t);if(l===void 0){let u=KA(t)&&Ju(t);u&&this.injectableDefInScope(u)?l=so(dd(t),_u):l=null,this.records.set(t,l)}if(l!=null)return this.hydrate(t,l)}let a=n&$e.Self?Cp():this.parent;return r=n&$e.Optional&&r===ba?null:r,a.get(t,r)}catch(a){if(a.name==="NullInjectorError"){if((a[ku]=a[ku]||[]).unshift(fr(t)),s)throw a;return gA(a,t,"R3InjectorError",this.source)}else throw a}finally{yr(o),vi(s)}}resolveInjectorInitializers(){let t=ct(null),r=vi(this),n=yr(void 0),i;try{let s=this.get(fo,Cr,$e.Self);for(let o of s)o()}finally{vi(r),yr(n),ct(t)}}toString(){let t=[],r=this.records;for(let n of r.keys())t.push(fr(n));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new ve(205,!1)}processProvider(t){t=cr(t);let r=ho(t)?t:cr(t&&t.provide),n=GA(t);if(!ho(t)&&t.multi===!0){let i=this.records.get(r);i||(i=so(void 0,_u,!0),i.factory=()=>cd(i.multi),this.records.set(r,i)),r=t,i.multi.push(t)}this.records.set(r,n)}hydrate(t,r){let n=ct(null);try{return r.value===_u&&(r.value=HA,r.value=r.factory()),typeof r.value=="object"&&r.value&&$A(r.value)&&this._ngOnDestroyHooks.add(r.value),r.value}finally{ct(n)}}injectableDefInScope(t){if(!t.providedIn)return!1;let r=cr(t.providedIn);return typeof r=="string"?r==="any"||this.scopes.has(r):this.injectorDefTypes.has(r)}removeOnDestroy(t){let r=this._onDestroyHooks.indexOf(t);r!==-1&&this._onDestroyHooks.splice(r,1)}};function dd(e){let t=Ju(e),r=t!==null?t.factory:as(e);if(r!==null)return r;if(e instanceof De)throw new ve(204,!1);if(e instanceof Function)return qA(e);throw new ve(204,!1)}function qA(e){if(e.length>0)throw new ve(204,!1);let r=tA(e);return r!==null?()=>r.factory(e):()=>new e}function GA(e){if(AC(e))return so(void 0,e.useValue);{let t=MC(e);return so(t,_u)}}function MC(e,t,r){let n;if(ho(e)){let i=cr(e);return as(i)||dd(i)}else if(AC(e))n=()=>cr(e.useValue);else if(UA(e))n=()=>e.useFactory(...cd(e.deps||[]));else if(VA(e))n=()=>Re(cr(e.useExisting));else{let i=cr(e&&(e.useClass||e.provide));if(zA(e))n=()=>new i(...cd(e.deps));else return as(i)||dd(i)}return n}function so(e,t,r=!1){return{factory:e,value:t,multi:r?[]:void 0}}function zA(e){return!!e.deps}function $A(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function KA(e){return typeof e=="function"||typeof e=="object"&&e instanceof De}function pd(e,t){for(let r of e)Array.isArray(r)?pd(r,t):r&&cC(r)?pd(r.\u0275providers,t):t(r)}function Zn(e,t){e instanceof xa&&e.assertNotDestroyed();let r,n=vi(e),i=yr(void 0);try{return t()}finally{vi(n),yr(i)}}function PC(){return fC()!==void 0||dA()!=null}function NC(e){if(!PC())throw new ve(-203,!1)}function WA(e){return typeof e=="function"}var Xn=0,He=1,Ne=2,Jt=3,tn=4,on=5,Ou=6,Ia=7,bn=8,po=9,rn=10,qt=11,wa=12,Sy=13,yo=14,Sn=15,ka=16,oo=17,Kn=18,ic=19,RC=20,yi=21,Kh=22,us=23,xn=25,kC=1;var cs=7,Bu=8,mo=9,Dr=10,Ep=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(Ep||{});function ss(e){return Array.isArray(e)&&typeof e[kC]=="object"}function Jn(e){return Array.isArray(e)&&e[kC]===!0}function FC(e){return(e.flags&4)!==0}function sc(e){return e.componentOffset>-1}function bp(e){return(e.flags&1)===1}function Ci(e){return!!e.template}function QA(e){return(e[Ne]&512)!==0}var md=class{constructor(t,r,n){this.previousValue=t,this.currentValue=r,this.firstChange=n}isFirstChange(){return this.firstChange}};function LC(e,t,r,n){t!==null?t.applyValueToInputSignal(t,n):e[r]=n}function Br(){return OC}function OC(e){return e.type.prototype.ngOnChanges&&(e.setInput=ZA),YA}Br.ngInherit=!0;function YA(){let e=VC(this),t=e?.current;if(t){let r=e.previous;if(r===co)e.previous=t;else for(let n in t)r[n]=t[n];e.current=null,this.ngOnChanges(t)}}function ZA(e,t,r,n,i){let s=this.declaredInputs[n],o=VC(e)||XA(e,{previous:co,current:null}),a=o.current||(o.current={}),l=o.previous,u=l[s];a[s]=new md(u&&u.currentValue,r,l===co),LC(e,t,i,r)}var BC="__ngSimpleChanges__";function VC(e){return e[BC]||null}function XA(e,t){return e[BC]=t}var xy=null;var yn=function(e,t,r){xy?.(e,t,r)},UC="svg",JA="math",eM=!1;function tM(){return eM}function In(e){for(;Array.isArray(e);)e=e[Xn];return e}function jC(e,t){return In(t[e])}function Vr(e,t){return In(t[e.index])}function HC(e,t){return e.data[t]}function rM(e,t){return e[t]}function Si(e,t){let r=t[e];return ss(r)?r:r[Xn]}function nM(e){return(e[Ne]&4)===4}function Sp(e){return(e[Ne]&128)===128}function iM(e){return Jn(e[Jt])}function Vu(e,t){return t==null?null:e[t]}function qC(e){e[oo]=0}function sM(e){e[Ne]&1024||(e[Ne]|=1024,Sp(e)&&Ta(e))}function oM(e,t){for(;e>0;)t=t[yo],e--;return t}function xp(e){return!!(e[Ne]&9216||e[us]?.dirty)}function gd(e){e[rn].changeDetectionScheduler?.notify(1),xp(e)?Ta(e):e[Ne]&64&&(tM()?(e[Ne]|=1024,Ta(e)):e[rn].changeDetectionScheduler?.notify())}function Ta(e){e[rn].changeDetectionScheduler?.notify();let t=_a(e);for(;t!==null&&!(t[Ne]&8192||(t[Ne]|=8192,!Sp(t)));)t=_a(t)}function GC(e,t){if((e[Ne]&256)===256)throw new ve(911,!1);e[yi]===null&&(e[yi]=[]),e[yi].push(t)}function aM(e,t){if(e[yi]===null)return;let r=e[yi].indexOf(t);r!==-1&&e[yi].splice(r,1)}function _a(e){let t=e[Jt];return Jn(t)?t[Jt]:t}var Ke={lFrame:JC(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function lM(){return Ke.lFrame.elementDepthCount}function uM(){Ke.lFrame.elementDepthCount++}function cM(){Ke.lFrame.elementDepthCount--}function zC(){return Ke.bindingsEnabled}function fM(){return Ke.skipHydrationRootTNode!==null}function hM(e){return Ke.skipHydrationRootTNode===e}function dM(){Ke.skipHydrationRootTNode=null}function ft(){return Ke.lFrame.lView}function er(){return Ke.lFrame.tView}function br(){let e=$C();for(;e!==null&&e.type===64;)e=e.parent;return e}function $C(){return Ke.lFrame.currentTNode}function pM(){let e=Ke.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Fa(e,t){let r=Ke.lFrame;r.currentTNode=e,r.isParent=t}function KC(){return Ke.lFrame.isParent}function mM(){Ke.lFrame.isParent=!1}function WC(){let e=Ke.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function gM(e){return Ke.lFrame.bindingIndex=e}function oc(){return Ke.lFrame.bindingIndex++}function QC(e){let t=Ke.lFrame,r=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,r}function vM(){return Ke.lFrame.inI18n}function yM(e,t){let r=Ke.lFrame;r.bindingIndex=r.bindingRootIndex=e,vd(t)}function CM(){return Ke.lFrame.currentDirectiveIndex}function vd(e){Ke.lFrame.currentDirectiveIndex=e}function EM(e){let t=Ke.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function YC(){return Ke.lFrame.currentQueryIndex}function Ip(e){Ke.lFrame.currentQueryIndex=e}function bM(e){let t=e[He];return t.type===2?t.declTNode:t.type===1?e[on]:null}function ZC(e,t,r){if(r&$e.SkipSelf){let i=t,s=e;for(;i=i.parent,i===null&&!(r&$e.Host);)if(i=bM(s),i===null||(s=s[yo],i.type&10))break;if(i===null)return!1;t=i,e=s}let n=Ke.lFrame=XC();return n.currentTNode=t,n.lView=e,!0}function wp(e){let t=XC(),r=e[He];Ke.lFrame=t,t.currentTNode=r.firstChild,t.lView=e,t.tView=r,t.contextLView=e,t.bindingIndex=r.bindingStartIndex,t.inI18n=!1}function XC(){let e=Ke.lFrame,t=e===null?null:e.child;return t===null?JC(e):t}function JC(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function e1(){let e=Ke.lFrame;return Ke.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var t1=e1;function Tp(){let e=e1();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function SM(e){return(Ke.lFrame.contextLView=oM(e,Ke.lFrame.contextLView))[bn]}function ys(){return Ke.lFrame.selectedIndex}function fs(e){Ke.lFrame.selectedIndex=e}function _p(){let e=Ke.lFrame;return HC(e.tView,e.selectedIndex)}function r1(){Ke.lFrame.currentNamespace=UC}function n1(){xM()}function xM(){Ke.lFrame.currentNamespace=null}function IM(){return Ke.lFrame.currentNamespace}var i1=!0;function Dp(){return i1}function Ap(e){i1=e}function wM(e,t,r){let{ngOnChanges:n,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(n){let o=OC(t);(r.preOrderHooks??=[]).push(e,o),(r.preOrderCheckHooks??=[]).push(e,o)}i&&(r.preOrderHooks??=[]).push(0-e,i),s&&((r.preOrderHooks??=[]).push(e,s),(r.preOrderCheckHooks??=[]).push(e,s))}function Mp(e,t){for(let r=t.directiveStart,n=t.directiveEnd;r<n;r++){let s=e.data[r].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:u,ngOnDestroy:c}=s;o&&(e.contentHooks??=[]).push(-r,o),a&&((e.contentHooks??=[]).push(r,a),(e.contentCheckHooks??=[]).push(r,a)),l&&(e.viewHooks??=[]).push(-r,l),u&&((e.viewHooks??=[]).push(r,u),(e.viewCheckHooks??=[]).push(r,u)),c!=null&&(e.destroyHooks??=[]).push(r,c)}}function Du(e,t,r){s1(e,t,3,r)}function Au(e,t,r,n){(e[Ne]&3)===r&&s1(e,t,r,n)}function Wh(e,t){let r=e[Ne];(r&3)===t&&(r&=16383,r+=1,e[Ne]=r)}function s1(e,t,r,n){let i=n!==void 0?e[oo]&65535:0,s=n??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],n!=null&&a>=n)break}else t[l]<0&&(e[oo]+=65536),(a<s||s==-1)&&(TM(e,r,t,l),e[oo]=(e[oo]&4294901760)+l+2),l++}function Iy(e,t){yn(4,e,t);let r=ct(null);try{t.call(e)}finally{ct(r),yn(5,e,t)}}function TM(e,t,r,n){let i=r[n]<0,s=r[n+1],o=i?-r[n]:r[n],a=e[o];i?e[Ne]>>14<e[oo]>>16&&(e[Ne]&3)===t&&(e[Ne]+=16384,Iy(a,s)):Iy(a,s)}var uo=-1,hs=class{constructor(t,r,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=r,this.injectImpl=n}};function _M(e){return e instanceof hs}function DM(e){return(e.flags&8)!==0}function AM(e){return(e.flags&16)!==0}function o1(e){return e!==uo}function Uu(e){return e&32767}function MM(e){return e>>16}function ju(e,t){let r=MM(e),n=t;for(;r>0;)n=n[yo],r--;return n}var yd=!0;function Hu(e){let t=yd;return yd=e,t}var PM=256,a1=PM-1,l1=5,NM=0,Cn={};function RM(e,t,r){let n;typeof r=="string"?n=r.charCodeAt(0)||0:r.hasOwnProperty(Ea)&&(n=r[Ea]),n==null&&(n=r[Ea]=NM++);let i=n&a1,s=1<<i;t.data[e+(i>>l1)]|=s}function qu(e,t){let r=u1(e,t);if(r!==-1)return r;let n=t[He];n.firstCreatePass&&(e.injectorIndex=t.length,Qh(n.data,e),Qh(t,null),Qh(n.blueprint,null));let i=Pp(e,t),s=e.injectorIndex;if(o1(i)){let o=Uu(i),a=ju(i,t),l=a[He].data;for(let u=0;u<8;u++)t[s+u]=a[o+u]|l[o+u]}return t[s+8]=i,s}function Qh(e,t){e.push(0,0,0,0,0,0,0,0,t)}function u1(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Pp(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let r=0,n=null,i=t;for(;i!==null;){if(n=p1(i),n===null)return uo;if(r++,i=i[yo],n.injectorIndex!==-1)return n.injectorIndex|r<<16}return uo}function Cd(e,t,r){RM(e,t,r)}function kM(e,t){if(t==="class")return e.classes;if(t==="style")return e.styles;let r=e.attrs;if(r){let n=r.length,i=0;for(;i<n;){let s=r[i];if(yC(s))break;if(s===0)i=i+2;else if(typeof s=="number")for(i++;i<n&&typeof r[i]=="string";)i++;else{if(s===t)return r[i+1];i=i+2}}}return null}function c1(e,t,r){if(r&$e.Optional||e!==void 0)return e;dp(t,"NodeInjector")}function f1(e,t,r,n){if(r&$e.Optional&&n===void 0&&(n=null),!(r&($e.Self|$e.Host))){let i=e[po],s=yr(void 0);try{return i?i.get(t,n,r&$e.Optional):hC(t,n,r&$e.Optional)}finally{yr(s)}}return c1(n,t,r)}function h1(e,t,r,n=$e.Default,i){if(e!==null){if(t[Ne]&2048&&!(n&$e.Self)){let o=BM(e,t,r,n,Cn);if(o!==Cn)return o}let s=d1(e,t,r,n,Cn);if(s!==Cn)return s}return f1(t,r,n,i)}function d1(e,t,r,n,i){let s=LM(r);if(typeof s=="function"){if(!ZC(t,e,n))return n&$e.Host?c1(i,r,n):f1(t,r,n,i);try{let o;if(o=s(n),o==null&&!(n&$e.Optional))dp(r);else return o}finally{t1()}}else if(typeof s=="number"){let o=null,a=u1(e,t),l=uo,u=n&$e.Host?t[Sn][on]:null;for((a===-1||n&$e.SkipSelf)&&(l=a===-1?Pp(e,t):t[a+8],l===uo||!Ty(n,!1)?a=-1:(o=t[He],a=Uu(l),t=ju(l,t)));a!==-1;){let c=t[He];if(wy(s,a,c.data)){let f=FM(a,t,r,o,n,u);if(f!==Cn)return f}l=t[a+8],l!==uo&&Ty(n,t[He].data[a+8]===u)&&wy(s,a,t)?(o=c,a=Uu(l),t=ju(l,t)):a=-1}}return i}function FM(e,t,r,n,i,s){let o=t[He],a=o.data[e+8],l=n==null?sc(a)&&yd:n!=o&&(a.type&3)!==0,u=i&$e.Host&&s===a,c=Mu(a,o,r,l,u);return c!==null?ds(t,o,c,a):Cn}function Mu(e,t,r,n,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,u=e.directiveEnd,c=s>>20,f=n?a:a+c,h=i?a+c:u;for(let p=f;p<h;p++){let d=o[p];if(p<l&&r===d||p>=l&&d.type===r)return p}if(i){let p=o[l];if(p&&Ci(p)&&p.type===r)return l}return null}function ds(e,t,r,n){let i=e[r],s=t.data;if(_M(i)){let o=i;o.resolving&&lA(aA(s[r]));let a=Hu(o.canSeeViewProviders);o.resolving=!0;let l,u=o.injectImpl?yr(o.injectImpl):null,c=ZC(e,n,$e.Default);try{i=e[r]=o.factory(void 0,s,e,n),t.firstCreatePass&&r>=n.directiveStart&&wM(r,s[r],t)}finally{u!==null&&yr(u),Hu(a),o.resolving=!1,t1()}}return i}function LM(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Ea)?e[Ea]:void 0;return typeof t=="number"?t>=0?t&a1:OM:t}function wy(e,t,r){let n=1<<e;return!!(r[t+(e>>l1)]&n)}function Ty(e,t){return!(e&$e.Self)&&!(e&$e.Host&&t)}var os=class{constructor(t,r){this._tNode=t,this._lView=r}get(t,r,n){return h1(this._tNode,this._lView,t,tc(n),r)}};function OM(){return new os(br(),ft())}function ei(e){return Na(()=>{let t=e.prototype.constructor,r=t[Ru]||Ed(t),n=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==n;){let s=i[Ru]||Ed(i);if(s&&s!==r)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function Ed(e){return oC(e)?()=>{let t=Ed(cr(e));return t&&t()}:as(e)}function BM(e,t,r,n,i){let s=e,o=t;for(;s!==null&&o!==null&&o[Ne]&2048&&!(o[Ne]&512);){let a=d1(s,o,r,n|$e.Self,Cn);if(a!==Cn)return a;let l=s.parent;if(!l){let u=o[RC];if(u){let c=u.get(r,Cn,n);if(c!==Cn)return c}l=p1(o),o=o[yo]}s=l}return i}function p1(e){let t=e[He],r=t.type;return r===2?t.declTNode:r===1?e[on]:null}function Np(e){return kM(br(),e)}function _y(e,t=null,r=null,n){let i=m1(e,t,r,n);return i.resolveInjectorInitializers(),i}function m1(e,t=null,r=null,n,i=new Set){let s=[r||Cr,OA(e)];return n=n||(typeof e=="object"?void 0:fr(e)),new xa(s,t||Cp(),n||null,i)}var Cs=(()=>{let t=class t{static create(n,i){if(Array.isArray(n))return _y({name:""},i,n,"");{let s=n.name??"";return _y({name:s},n.parent,n.providers,s)}}};t.THROW_IF_NOT_FOUND=ba,t.NULL=new Lu,t.\u0275prov=Ce({token:t,providedIn:"any",factory:()=>Re(mC)}),t.__NG_ELEMENT_ID__=-1;let e=t;return e})();var VM="ngOriginalError";function Yh(e){return e[VM]}var Wn=class{constructor(){this._console=console}handleError(t){let r=this._findOriginalError(t);this._console.error("ERROR",t),r&&this._console.error("ORIGINAL ERROR",r)}_findOriginalError(t){let r=t&&Yh(t);for(;r&&Yh(r);)r=Yh(r);return r||null}},g1=new De("",{providedIn:"root",factory:()=>re(Wn).handleError.bind(void 0)}),ac=(()=>{let t=class t{};t.__NG_ELEMENT_ID__=UM,t.__NG_ENV_ID__=n=>n;let e=t;return e})(),bd=class extends ac{constructor(t){super(),this._lView=t}onDestroy(t){return GC(this._lView,t),()=>aM(this._lView,t)}};function UM(){return new bd(ft())}function Dy(e,t){return iC(e,t)}function jM(e){return iC(nC,e)}var Co=(Dy.required=jM,Dy);function HM(){return Eo(br(),ft())}function Eo(e,t){return new Sr(Vr(e,t))}var Sr=(()=>{let t=class t{constructor(n){this.nativeElement=n}};t.__NG_ELEMENT_ID__=HM;let e=t;return e})();function qM(e){return e instanceof Sr?e.nativeElement:e}var Sd=class extends Mt{constructor(t=!1){super(),this.destroyRef=void 0,this.__isAsync=t,PC()&&(this.destroyRef=re(ac,{optional:!0})??void 0)}emit(t){let r=ct(null);try{super.next(t)}finally{ct(r)}}subscribe(t,r,n){let i=t,s=r||(()=>null),o=n;if(t&&typeof t=="object"){let l=t;i=l.next?.bind(l),s=l.error?.bind(l),o=l.complete?.bind(l)}this.__isAsync&&(s=Zh(s),i&&(i=Zh(i)),o&&(o=Zh(o)));let a=super.subscribe({next:i,error:s,complete:o});return t instanceof Bt&&t.add(a),a}};function Zh(e){return t=>{setTimeout(e,void 0,t)}}var Rt=Sd;function GM(){return this._results[Symbol.iterator]()}var xd=class e{get changes(){return this._changes??=new Rt}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;let r=e.prototype;r[Symbol.iterator]||(r[Symbol.iterator]=GM)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,r){return this._results.reduce(t,r)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,r){this.dirty=!1;let n=CA(t);(this._changesDetected=!yA(this._results,n,r))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}};function v1(e){return(e.flags&128)===128}var y1=new Map,zM=0;function $M(){return zM++}function KM(e){y1.set(e[ic],e)}function WM(e){y1.delete(e[ic])}var Ay="__ngContext__";function ps(e,t){ss(t)?(e[Ay]=t[ic],KM(t)):e[Ay]=t}function C1(e){return b1(e[wa])}function E1(e){return b1(e[tn])}function b1(e){for(;e!==null&&!Jn(e);)e=e[tn];return e}var Id;function S1(e){Id=e}function QM(){if(Id!==void 0)return Id;if(typeof document<"u")return document;throw new ve(210,!1)}var Rp=new De("",{providedIn:"root",factory:()=>YM}),YM="ng",kp=new De(""),Tn=new De("",{providedIn:"platform",factory:()=>"unknown"});var Fp=new De("",{providedIn:"root",factory:()=>QM().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var ZM="h",XM="b";var JM=()=>null;function Lp(e,t,r=!1){return JM(e,t,r)}var x1=!1,eP=new De("",{providedIn:"root",factory:()=>x1});var Su;function tP(){if(Su===void 0&&(Su=null,_r.trustedTypes))try{Su=_r.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Su}function lc(e){return tP()?.createHTML(e)||e}var xu;function rP(){if(xu===void 0&&(xu=null,_r.trustedTypes))try{xu=_r.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return xu}function My(e){return rP()?.createScriptURL(e)||e}var Qn=class{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${rC})`}},wd=class extends Qn{getTypeName(){return"HTML"}},Td=class extends Qn{getTypeName(){return"Style"}},_d=class extends Qn{getTypeName(){return"Script"}},Dd=class extends Qn{getTypeName(){return"URL"}},Ad=class extends Qn{getTypeName(){return"ResourceURL"}};function an(e){return e instanceof Qn?e.changingThisBreaksApplicationSecurity:e}function xi(e,t){let r=nP(e);if(r!=null&&r!==t){if(r==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${r} (see ${rC})`)}return r===t}function nP(e){return e instanceof Qn&&e.getTypeName()||null}function I1(e){return new wd(e)}function w1(e){return new Td(e)}function T1(e){return new _d(e)}function _1(e){return new Dd(e)}function D1(e){return new Ad(e)}function iP(e){let t=new Pd(e);return sP()?new Md(t):t}var Md=class{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let r=new window.DOMParser().parseFromString(lc(t),"text/html").body;return r===null?this.inertDocumentHelper.getInertBodyElement(t):(r.removeChild(r.firstChild),r)}catch{return null}}},Pd=class{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let r=this.inertDocument.createElement("template");return r.innerHTML=lc(t),r}};function sP(){try{return!!new window.DOMParser().parseFromString(lc(""),"text/html")}catch{return!1}}var oP=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function uc(e){return e=String(e),e.match(oP)?e:"unsafe:"+e}function ti(e){let t={};for(let r of e.split(","))t[r]=!0;return t}function La(...e){let t={};for(let r of e)for(let n in r)r.hasOwnProperty(n)&&(t[n]=!0);return t}var A1=ti("area,br,col,hr,img,wbr"),M1=ti("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),P1=ti("rp,rt"),aP=La(P1,M1),lP=La(M1,ti("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),uP=La(P1,ti("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Py=La(A1,lP,uP,aP),N1=ti("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),cP=ti("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),fP=ti("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),hP=La(N1,cP,fP),dP=ti("script,style,template"),Nd=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let r=t.firstChild,n=!0,i=[];for(;r;){if(r.nodeType===Node.ELEMENT_NODE?n=this.startElement(r):r.nodeType===Node.TEXT_NODE?this.chars(r.nodeValue):this.sanitizedSomething=!0,n&&r.firstChild){i.push(r),r=gP(r);continue}for(;r;){r.nodeType===Node.ELEMENT_NODE&&this.endElement(r);let s=mP(r);if(s){r=s;break}r=i.pop()}}return this.buf.join("")}startElement(t){let r=Ny(t).toLowerCase();if(!Py.hasOwnProperty(r))return this.sanitizedSomething=!0,!dP.hasOwnProperty(r);this.buf.push("<"),this.buf.push(r);let n=t.attributes;for(let i=0;i<n.length;i++){let s=n.item(i),o=s.name,a=o.toLowerCase();if(!hP.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=s.value;N1[a]&&(l=uc(l)),this.buf.push(" ",o,'="',Ry(l),'"')}return this.buf.push(">"),!0}endElement(t){let r=Ny(t).toLowerCase();Py.hasOwnProperty(r)&&!A1.hasOwnProperty(r)&&(this.buf.push("</"),this.buf.push(r),this.buf.push(">"))}chars(t){this.buf.push(Ry(t))}};function pP(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function mP(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw R1(t);return t}function gP(e){let t=e.firstChild;if(t&&pP(e,t))throw R1(t);return t}function Ny(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function R1(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var vP=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,yP=/([^\#-~ |!])/g;function Ry(e){return e.replace(/&/g,"&amp;").replace(vP,function(t){let r=t.charCodeAt(0),n=t.charCodeAt(1);return"&#"+((r-55296)*1024+(n-56320)+65536)+";"}).replace(yP,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Iu;function k1(e,t){let r=null;try{Iu=Iu||iP(e);let n=t?String(t):"";r=Iu.getInertBodyElement(n);let i=5,s=n;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,n=s,s=r.innerHTML,r=Iu.getInertBodyElement(n)}while(n!==s);let a=new Nd().sanitizeChildren(ky(r)||r);return lc(a)}finally{if(r){let n=ky(r)||r;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function ky(e){return"content"in e&&CP(e)?e.content:null}function CP(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var _n=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(_n||{});function Op(e){let t=L1();return t?t.sanitize(_n.URL,e)||"":xi(e,"URL")?an(e):uc(ec(e))}function EP(e){let t=L1();if(t)return My(t.sanitize(_n.RESOURCE_URL,e)||"");if(xi(e,"ResourceURL"))return My(an(e));throw new ve(904,!1)}function bP(e,t){return t==="src"&&(e==="embed"||e==="frame"||e==="iframe"||e==="media"||e==="script")||t==="href"&&(e==="base"||e==="link")?EP:Op}function F1(e,t,r){return bP(t,r)(e)}function L1(){let e=ft();return e&&e[rn].sanitizer}function cc(e){return e.ownerDocument.defaultView}function O1(e){return e instanceof Function?e():e}var wn=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(wn||{}),SP;function Bp(e,t){return SP(e,t)}function ao(e,t,r,n,i){if(n!=null){let s,o=!1;Jn(n)?s=n:ss(n)&&(o=!0,n=n[Xn]);let a=In(n);e===0&&r!==null?i==null?H1(t,r,a):Gu(t,r,a,i||null,!0):e===1&&r!==null?Gu(t,r,a,i||null,!0):e===2?VP(t,a,o):e===3&&t.destroyNode(a),s!=null&&jP(t,e,s,r,i)}}function xP(e,t){return e.createText(t)}function IP(e,t,r){e.setValue(t,r)}function B1(e,t,r){return e.createElement(t,r)}function wP(e,t){V1(e,t),t[Xn]=null,t[on]=null}function TP(e,t,r,n,i,s){n[Xn]=i,n[on]=t,fc(e,n,r,1,i,s)}function V1(e,t){t[rn].changeDetectionScheduler?.notify(1),fc(e,t,t[qt],2,null,null)}function _P(e){let t=e[wa];if(!t)return Xh(e[He],e);for(;t;){let r=null;if(ss(t))r=t[wa];else{let n=t[Dr];n&&(r=n)}if(!r){for(;t&&!t[tn]&&t!==e;)ss(t)&&Xh(t[He],t),t=t[Jt];t===null&&(t=e),ss(t)&&Xh(t[He],t),r=t&&t[tn]}t=r}}function DP(e,t,r,n){let i=Dr+n,s=r.length;n>0&&(r[i-1][tn]=t),n<s-Dr?(t[tn]=r[i],pC(r,Dr+n,t)):(r.push(t),t[tn]=null),t[Jt]=r;let o=t[ka];o!==null&&r!==o&&AP(o,t);let a=t[Kn];a!==null&&a.insertView(e),gd(t),t[Ne]|=128}function AP(e,t){let r=e[mo],i=t[Jt][Jt][Sn];t[Sn]!==i&&(e[Ne]|=Ep.HasTransplantedViews),r===null?e[mo]=[t]:r.push(t)}function U1(e,t){let r=e[mo],n=r.indexOf(t);r.splice(n,1)}function Rd(e,t){if(e.length<=Dr)return;let r=Dr+t,n=e[r];if(n){let i=n[ka];i!==null&&i!==e&&U1(i,n),t>0&&(e[r-1][tn]=n[tn]);let s=Fu(e,Dr+t);wP(n[He],n);let o=s[Kn];o!==null&&o.detachView(s[He]),n[Jt]=null,n[tn]=null,n[Ne]&=-129}return n}function j1(e,t){if(!(t[Ne]&256)){let r=t[qt];r.destroyNode&&fc(e,t,r,3,null,null),_P(t)}}function Xh(e,t){if(t[Ne]&256)return;let r=ct(null);try{t[Ne]&=-129,t[Ne]|=256,t[us]&&Nv(t[us]),PP(e,t),MP(e,t),t[He].type===1&&t[qt].destroy();let n=t[ka];if(n!==null&&Jn(t[Jt])){n!==t[Jt]&&U1(n,t);let i=t[Kn];i!==null&&i.detachView(e)}WM(t)}finally{ct(r)}}function MP(e,t){let r=e.cleanup,n=t[Ia];if(r!==null)for(let s=0;s<r.length-1;s+=2)if(typeof r[s]=="string"){let o=r[s+3];o>=0?n[o]():n[-o].unsubscribe(),s+=2}else{let o=n[r[s+1]];r[s].call(o)}n!==null&&(t[Ia]=null);let i=t[yi];if(i!==null){t[yi]=null;for(let s=0;s<i.length;s++){let o=i[s];o()}}}function PP(e,t){let r;if(e!=null&&(r=e.destroyHooks)!=null)for(let n=0;n<r.length;n+=2){let i=t[r[n]];if(!(i instanceof hs)){let s=r[n+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];yn(4,a,l);try{l.call(a)}finally{yn(5,a,l)}}else{yn(4,i,s);try{s.call(i)}finally{yn(5,i,s)}}}}}function NP(e,t,r){return RP(e,t.parent,r)}function RP(e,t,r){let n=t;for(;n!==null&&n.type&40;)t=n,n=t.parent;if(n===null)return r[Xn];{let{componentOffset:i}=n;if(i>-1){let{encapsulation:s}=e.data[n.directiveStart+i];if(s===En.None||s===En.Emulated)return null}return Vr(n,r)}}function Gu(e,t,r,n,i){e.insertBefore(t,r,n,i)}function H1(e,t,r){e.appendChild(t,r)}function Fy(e,t,r,n,i){n!==null?Gu(e,t,r,n,i):H1(e,t,r)}function kP(e,t,r,n){e.removeChild(t,r,n)}function Vp(e,t){return e.parentNode(t)}function FP(e,t){return e.nextSibling(t)}function LP(e,t,r){return BP(e,t,r)}function OP(e,t,r){return e.type&40?Vr(e,r):null}var BP=OP,Ly;function Up(e,t,r,n){let i=NP(e,n,t),s=t[qt],o=n.parent||t[on],a=LP(o,n,t);if(i!=null)if(Array.isArray(r))for(let l=0;l<r.length;l++)Fy(s,i,r[l],a,!1);else Fy(s,i,r,a,!1);Ly!==void 0&&Ly(s,n,t,r,i)}function Pu(e,t){if(t!==null){let r=t.type;if(r&3)return Vr(t,e);if(r&4)return kd(-1,e[t.index]);if(r&8){let n=t.child;if(n!==null)return Pu(e,n);{let i=e[t.index];return Jn(i)?kd(-1,i):In(i)}}else{if(r&32)return Bp(t,e)()||In(e[t.index]);{let n=q1(e,t);if(n!==null){if(Array.isArray(n))return n[0];let i=_a(e[Sn]);return Pu(i,n)}else return Pu(e,t.next)}}}return null}function q1(e,t){if(t!==null){let n=e[Sn][on],i=t.projection;return n.projection[i]}return null}function kd(e,t){let r=Dr+e+1;if(r<t.length){let n=t[r],i=n[He].firstChild;if(i!==null)return Pu(n,i)}return t[cs]}function VP(e,t,r){let n=Vp(e,t);n&&kP(e,n,t,r)}function jp(e,t,r,n,i,s,o){for(;r!=null;){let a=n[r.index],l=r.type;if(o&&t===0&&(a&&ps(In(a),n),r.flags|=2),(r.flags&32)!==32)if(l&8)jp(e,t,r.child,n,i,s,!1),ao(t,e,i,a,s);else if(l&32){let u=Bp(r,n),c;for(;c=u();)ao(t,e,i,c,s);ao(t,e,i,a,s)}else l&16?UP(e,t,n,r,i,s):ao(t,e,i,a,s);r=o?r.projectionNext:r.next}}function fc(e,t,r,n,i,s){jp(r,n,e.firstChild,t,i,s,!1)}function UP(e,t,r,n,i,s){let o=r[Sn],l=o[on].projection[n.projection];if(Array.isArray(l))for(let u=0;u<l.length;u++){let c=l[u];ao(t,e,i,c,s)}else{let u=l,c=o[Jt];v1(n)&&(u.flags|=128),jp(e,t,u,c,i,s,!0)}}function jP(e,t,r,n,i){let s=r[cs],o=In(r);s!==o&&ao(t,e,n,s,i);for(let a=Dr;a<r.length;a++){let l=r[a];fc(l[He],l,e,t,n,s)}}function HP(e,t,r,n,i){if(t)i?e.addClass(r,n):e.removeClass(r,n);else{let s=n.indexOf("-")===-1?void 0:wn.DashCase;i==null?e.removeStyle(r,n,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=wn.Important),e.setStyle(r,n,i,s))}}function qP(e,t,r){e.setAttribute(t,"style",r)}function G1(e,t,r){r===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",r)}function z1(e,t,r){let{mergedAttrs:n,classes:i,styles:s}=r;n!==null&&fd(e,t,n),i!==null&&G1(e,t,i),s!==null&&qP(e,t,s)}var ri={};function Pe(e=1){$1(er(),ft(),ys()+e,!1)}function $1(e,t,r,n){if(!n)if((t[Ne]&3)===3){let s=e.preOrderCheckHooks;s!==null&&Du(t,s,r)}else{let s=e.preOrderHooks;s!==null&&Au(t,s,0,r)}fs(r)}function Ee(e,t=$e.Default){let r=ft();if(r===null)return Re(e,t);let n=br();return h1(n,r,cr(e),t)}function K1(e,t,r,n,i,s){let o=ct(null);try{let a=null;i&kt.SignalBased&&(a=t[n][hi]),a!==null&&a.transformFn!==void 0&&(s=a.transformFn(s)),i&kt.HasDecoratorInputTransform&&(s=e.inputTransforms[n].call(t,s)),e.setInput!==null?e.setInput(t,a,s,r,n):LC(t,a,n,s)}finally{ct(o)}}function GP(e,t){let r=e.hostBindingOpCodes;if(r!==null)try{for(let n=0;n<r.length;n++){let i=r[n];if(i<0)fs(~i);else{let s=i,o=r[++n],a=r[++n];yM(o,s);let l=t[s];a(2,l)}}}finally{fs(-1)}}function hc(e,t,r,n,i,s,o,a,l,u,c){let f=t.blueprint.slice();return f[Xn]=i,f[Ne]=n|4|128|8|64,(u!==null||e&&e[Ne]&2048)&&(f[Ne]|=2048),qC(f),f[Jt]=f[yo]=e,f[bn]=r,f[rn]=o||e&&e[rn],f[qt]=a||e&&e[qt],f[po]=l||e&&e[po]||null,f[on]=s,f[ic]=$M(),f[Ou]=c,f[RC]=u,f[Sn]=t.type==2?e[Sn]:f,f}function dc(e,t,r,n,i){let s=e.data[t];if(s===null)s=zP(e,t,r,n,i),vM()&&(s.flags|=32);else if(s.type&64){s.type=r,s.value=n,s.attrs=i;let o=pM();s.injectorIndex=o===null?-1:o.injectorIndex}return Fa(s,!0),s}function zP(e,t,r,n,i){let s=$C(),o=KC(),a=o?s:s&&s.parent,l=e.data[t]=ZP(e,a,r,t,n,i);return e.firstChild===null&&(e.firstChild=l),s!==null&&(o?s.child==null&&l.parent!==null&&(s.child=l):s.next===null&&(s.next=l,l.prev=s)),l}function W1(e,t,r,n){if(r===0)return-1;let i=t.length;for(let s=0;s<r;s++)t.push(n),e.blueprint.push(n),e.data.push(null);return i}function Q1(e,t,r,n,i){let s=ys(),o=n&2;try{fs(-1),o&&t.length>xn&&$1(e,t,xn,!1),yn(o?2:0,i),r(n,i)}finally{fs(s),yn(o?3:1,i)}}function Y1(e,t,r){if(FC(t)){let n=ct(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=r[o];a.contentQueries(1,l,o)}}}finally{ct(n)}}}function Z1(e,t,r){zC()&&(n2(e,t,r,Vr(r,t)),(r.flags&64)===64&&nE(e,t,r))}function X1(e,t,r=Vr){let n=t.localNames;if(n!==null){let i=t.index+1;for(let s=0;s<n.length;s+=2){let o=n[s+1],a=o===-1?r(t,e):e[o];e[i++]=a}}}function J1(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=Hp(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function Hp(e,t,r,n,i,s,o,a,l,u,c){let f=xn+n,h=f+i,p=$P(f,h),d=typeof u=="function"?u():u;return p[He]={type:e,blueprint:p,template:r,queries:null,viewQuery:a,declTNode:t,data:p.slice().fill(null,f),bindingStartIndex:f,expandoStartIndex:h,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:d,incompleteFirstPass:!1,ssrId:c}}function $P(e,t){let r=[];for(let n=0;n<t;n++)r.push(n<e?null:ri);return r}function KP(e,t,r,n){let s=n.get(eP,x1)||r===En.ShadowDom,o=e.selectRootElement(t,s);return WP(o),o}function WP(e){QP(e)}var QP=()=>null;function YP(e,t,r,n){let i=oE(t);i.push(r),e.firstCreatePass&&aE(e).push(n,i.length-1)}function ZP(e,t,r,n,i,s){let o=t?t.injectorIndex:-1,a=0;return fM()&&(a|=128),{type:r,index:n,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Oy(e,t,r,n,i){for(let s in t){if(!t.hasOwnProperty(s))continue;let o=t[s];if(o===void 0)continue;n??={};let a,l=kt.None;Array.isArray(o)?(a=o[0],l=o[1]):a=o;let u=s;if(i!==null){if(!i.hasOwnProperty(s))continue;u=i[s]}e===0?By(n,r,u,a,l):By(n,r,u,a)}return n}function By(e,t,r,n,i){let s;e.hasOwnProperty(r)?(s=e[r]).push(t,n):s=e[r]=[t,n],i!==void 0&&s.push(i)}function XP(e,t,r){let n=t.directiveStart,i=t.directiveEnd,s=e.data,o=t.attrs,a=[],l=null,u=null;for(let c=n;c<i;c++){let f=s[c],h=r?r.get(f):null,p=h?h.inputs:null,d=h?h.outputs:null;l=Oy(0,f.inputs,c,l,p),u=Oy(1,f.outputs,c,u,d);let m=l!==null&&o!==null&&!vp(t)?p2(l,c,o):null;a.push(m)}l!==null&&(l.hasOwnProperty("class")&&(t.flags|=8),l.hasOwnProperty("style")&&(t.flags|=16)),t.initialInputs=a,t.inputs=l,t.outputs=u}function JP(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function eE(e,t,r,n,i,s,o,a){let l=Vr(t,r),u=t.inputs,c;!a&&u!=null&&(c=u[n])?(qp(e,r,c,n,i),sc(t)&&e2(r,t.index)):t.type&3?(n=JP(n),i=o!=null?o(i,t.value||"",n):i,s.setProperty(l,n,i)):t.type&12}function e2(e,t){let r=Si(t,e);r[Ne]&16||(r[Ne]|=64)}function tE(e,t,r,n){if(zC()){let i=n===null?null:{"":-1},s=s2(e,r),o,a;s===null?o=a=null:[o,a]=s,o!==null&&rE(e,t,r,o,i,a),i&&o2(r,n,i)}r.mergedAttrs=Sa(r.mergedAttrs,r.attrs)}function rE(e,t,r,n,i,s){for(let u=0;u<n.length;u++)Cd(qu(r,t),e,n[u].type);l2(r,e.data.length,n.length);for(let u=0;u<n.length;u++){let c=n[u];c.providersResolver&&c.providersResolver(c)}let o=!1,a=!1,l=W1(e,t,n.length,null);for(let u=0;u<n.length;u++){let c=n[u];r.mergedAttrs=Sa(r.mergedAttrs,c.hostAttrs),u2(e,r,t,l,c),a2(l,c,i),c.contentQueries!==null&&(r.flags|=4),(c.hostBindings!==null||c.hostAttrs!==null||c.hostVars!==0)&&(r.flags|=64);let f=c.type.prototype;!o&&(f.ngOnChanges||f.ngOnInit||f.ngDoCheck)&&((e.preOrderHooks??=[]).push(r.index),o=!0),!a&&(f.ngOnChanges||f.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(r.index),a=!0),l++}XP(e,r,s)}function t2(e,t,r,n,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;r2(o)!=a&&o.push(a),o.push(r,n,s)}}function r2(e){let t=e.length;for(;t>0;){let r=e[--t];if(typeof r=="number"&&r<0)return r}return 0}function n2(e,t,r,n){let i=r.directiveStart,s=r.directiveEnd;sc(r)&&c2(t,r,e.data[i+r.componentOffset]),e.firstCreatePass||qu(r,t),ps(n,t);let o=r.initialInputs;for(let a=i;a<s;a++){let l=e.data[a],u=ds(t,e,a,r);if(ps(u,t),o!==null&&d2(t,a-i,u,l,r,o),Ci(l)){let c=Si(r.index,t);c[bn]=ds(t,e,a,r)}}}function nE(e,t,r){let n=r.directiveStart,i=r.directiveEnd,s=r.index,o=CM();try{fs(s);for(let a=n;a<i;a++){let l=e.data[a],u=t[a];vd(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&i2(l,u)}}finally{fs(-1),vd(o)}}function i2(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function s2(e,t){let r=e.directiveRegistry,n=null,i=null;if(r)for(let s=0;s<r.length;s++){let o=r[s];if(DA(t,o.selectors,!1))if(n||(n=[]),Ci(o))if(o.findHostDirectiveDefs!==null){let a=[];i=i||new Map,o.findHostDirectiveDefs(o,a,i),n.unshift(...a,o);let l=a.length;Fd(e,t,l)}else n.unshift(o),Fd(e,t,0);else i=i||new Map,o.findHostDirectiveDefs?.(o,n,i),n.push(o)}return n===null?null:[n,i]}function Fd(e,t,r){t.componentOffset=r,(e.components??=[]).push(t.index)}function o2(e,t,r){if(t){let n=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=r[t[i+1]];if(s==null)throw new ve(-301,!1);n.push(t[i],s)}}}function a2(e,t,r){if(r){if(t.exportAs)for(let n=0;n<t.exportAs.length;n++)r[t.exportAs[n]]=e;Ci(t)&&(r[""]=e)}}function l2(e,t,r){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+r,e.providerIndexes=t}function u2(e,t,r,n,i){e.data[n]=i;let s=i.factory||(i.factory=as(i.type,!0)),o=new hs(s,Ci(i),Ee);e.blueprint[n]=o,r[n]=o,t2(e,t,n,W1(e,r,i.hostVars,ri),i)}function c2(e,t,r){let n=Vr(t,e),i=J1(r),s=e[rn].rendererFactory,o=16;r.signals?o=4096:r.onPush&&(o=64);let a=pc(e,hc(e,i,null,o,n,t,null,s.createRenderer(n,r),null,null,null));e[t.index]=a}function f2(e,t,r,n,i,s){let o=Vr(e,t);h2(t[qt],o,s,e.value,r,n,i)}function h2(e,t,r,n,i,s,o){if(s==null)e.removeAttribute(t,i,r);else{let a=o==null?ec(s):o(s,n||"",i);e.setAttribute(t,i,a,r)}}function d2(e,t,r,n,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;){let l=o[a++],u=o[a++],c=o[a++],f=o[a++];K1(n,r,l,u,c,f)}}function p2(e,t,r){let n=null,i=0;for(;i<r.length;){let s=r[i];if(s===0){i+=4;continue}else if(s===5){i+=2;continue}if(typeof s=="number")break;if(e.hasOwnProperty(s)){n===null&&(n=[]);let o=e[s];for(let a=0;a<o.length;a+=3)if(o[a]===t){n.push(s,o[a+1],o[a+2],r[i+1]);break}}i+=2}return n}function iE(e,t,r,n){return[e,!0,0,t,null,n,null,r,null,null]}function sE(e,t){let r=e.contentQueries;if(r!==null){let n=ct(null);try{for(let i=0;i<r.length;i+=2){let s=r[i],o=r[i+1];if(o!==-1){let a=e.data[o];Ip(s),a.contentQueries(2,t[o],o)}}}finally{ct(n)}}}function pc(e,t){return e[wa]?e[Sy][tn]=t:e[wa]=t,e[Sy]=t,t}function Ld(e,t,r){Ip(0);let n=ct(null);try{t(e,r)}finally{ct(n)}}function oE(e){return e[Ia]||(e[Ia]=[])}function aE(e){return e.cleanup||(e.cleanup=[])}function lE(e,t){let r=e[po],n=r?r.get(Wn,null):null;n&&n.handleError(t)}function qp(e,t,r,n,i){for(let s=0;s<r.length;){let o=r[s++],a=r[s++],l=r[s++],u=t[o],c=e.data[o];K1(c,u,n,a,l,i)}}function m2(e,t,r){let n=jC(t,e);IP(e[qt],n,r)}function g2(e,t){let r=Si(t,e),n=r[He];v2(n,r);let i=r[Xn];i!==null&&r[Ou]===null&&(r[Ou]=Lp(i,r[po])),Gp(n,r,r[bn])}function v2(e,t){for(let r=t.length;r<e.blueprint.length;r++)t.push(e.blueprint[r])}function Gp(e,t,r){wp(t);try{let n=e.viewQuery;n!==null&&Ld(1,n,r);let i=e.template;i!==null&&Q1(e,t,i,1,r),e.firstCreatePass&&(e.firstCreatePass=!1),t[Kn]?.finishViewCreation(e),e.staticContentQueries&&sE(e,t),e.staticViewQueries&&Ld(2,e.viewQuery,r);let s=e.components;s!==null&&y2(t,s)}catch(n){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),n}finally{t[Ne]&=-5,Tp()}}function y2(e,t){for(let r=0;r<t.length;r++)g2(e,t[r])}function C2(e,t,r,n){let i=ct(null);try{let s=t.tView,a=e[Ne]&4096?4096:16,l=hc(e,s,r,a,null,t,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),u=e[t.index];l[ka]=u;let c=e[Kn];return c!==null&&(l[Kn]=c.createEmbeddedView(s)),Gp(s,l,r),l}finally{ct(i)}}function Vy(e,t){return!t||t.firstChild===null||v1(e)}function E2(e,t,r,n=!0){let i=t[He];if(DP(i,t,e,r),n){let o=kd(r,e),a=t[qt],l=Vp(a,e[cs]);l!==null&&TP(i,e[on],a,t,l,o)}let s=t[Ou];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function zu(e,t,r,n,i=!1){for(;r!==null;){let s=t[r.index];s!==null&&n.push(In(s)),Jn(s)&&b2(s,n);let o=r.type;if(o&8)zu(e,t,r.child,n);else if(o&32){let a=Bp(r,t),l;for(;l=a();)n.push(l)}else if(o&16){let a=q1(t,r);if(Array.isArray(a))n.push(...a);else{let l=_a(t[Sn]);zu(l[He],l,a,n,!0)}}r=i?r.projectionNext:r.next}return n}function b2(e,t){for(let r=Dr;r<e.length;r++){let n=e[r],i=n[He].firstChild;i!==null&&zu(n[He],n,i,t)}e[cs]!==e[Xn]&&t.push(e[cs])}var uE=[];function S2(e){return e[us]??x2(e)}function x2(e){let t=uE.pop()??Object.create(w2);return t.lView=e,t}function I2(e){e.lView[us]!==e&&(e.lView=null,uE.push(e))}var w2=at(me({},Sh),{consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{Ta(e.lView)},consumerOnSignalRead(){this.lView[us]=this}}),cE=100;function fE(e,t=!0,r=0){let n=e[rn],i=n.rendererFactory,s=!1;s||i.begin?.();try{T2(e,r)}catch(o){throw t&&lE(e,o),o}finally{s||(i.end?.(),n.inlineEffectRunner?.flush())}}function T2(e,t){Od(e,t);let r=0;for(;xp(e);){if(r===cE)throw new ve(103,!1);r++,Od(e,1)}}function _2(e,t,r,n){let i=t[Ne];if((i&256)===256)return;let s=!1;!s&&t[rn].inlineEffectRunner?.flush(),wp(t);let o=null,a=null;!s&&D2(e)&&(a=S2(t),o=Mv(a));try{qC(t),gM(e.bindingStartIndex),r!==null&&Q1(e,t,r,2,n);let l=(i&3)===3;if(!s)if(l){let f=e.preOrderCheckHooks;f!==null&&Du(t,f,null)}else{let f=e.preOrderHooks;f!==null&&Au(t,f,0,null),Wh(t,0)}if(A2(t),hE(t,0),e.contentQueries!==null&&sE(e,t),!s)if(l){let f=e.contentCheckHooks;f!==null&&Du(t,f)}else{let f=e.contentHooks;f!==null&&Au(t,f,1),Wh(t,1)}GP(e,t);let u=e.components;u!==null&&pE(t,u,0);let c=e.viewQuery;if(c!==null&&Ld(2,c,n),!s)if(l){let f=e.viewCheckHooks;f!==null&&Du(t,f)}else{let f=e.viewHooks;f!==null&&Au(t,f,2),Wh(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[Kh]){for(let f of t[Kh])f();t[Kh]=null}s||(t[Ne]&=-73)}catch(l){throw Ta(t),l}finally{a!==null&&(Pv(a,o),I2(a)),Tp()}}function D2(e){return e.type!==2}function hE(e,t){for(let r=C1(e);r!==null;r=E1(r))for(let n=Dr;n<r.length;n++){let i=r[n];dE(i,t)}}function A2(e){for(let t=C1(e);t!==null;t=E1(t)){if(!(t[Ne]&Ep.HasTransplantedViews))continue;let r=t[mo];for(let n=0;n<r.length;n++){let i=r[n],s=i[Jt];sM(i)}}}function M2(e,t,r){let n=Si(t,e);dE(n,r)}function dE(e,t){Sp(e)&&Od(e,t)}function Od(e,t){let n=e[He],i=e[Ne],s=e[us],o=!!(t===0&&i&16);if(o||=!!(i&64&&t===0),o||=!!(i&1024),o||=!!(s?.dirty&&Ih(s)),s&&(s.dirty=!1),e[Ne]&=-9217,o)_2(n,e,n.template,e[bn]);else if(i&8192){hE(e,1);let a=n.components;a!==null&&pE(e,a,1)}}function pE(e,t,r){for(let n=0;n<t.length;n++)M2(e,t[n],r)}function zp(e){for(e[rn].changeDetectionScheduler?.notify();e;){e[Ne]|=64;let t=_a(e);if(QA(e)&&!t)return e;e=t}return null}var ms=class{get rootNodes(){let t=this._lView,r=t[He];return zu(r,t,r.firstChild,[])}constructor(t,r,n=!0){this._lView=t,this._cdRefInjectingView=r,this.notifyErrorHandler=n,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[bn]}set context(t){this._lView[bn]=t}get destroyed(){return(this._lView[Ne]&256)===256}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[Jt];if(Jn(t)){let r=t[Bu],n=r?r.indexOf(this):-1;n>-1&&(Rd(t,n),Fu(r,n))}this._attachedToViewContainer=!1}j1(this._lView[He],this._lView)}onDestroy(t){GC(this._lView,t)}markForCheck(){zp(this._cdRefInjectingView||this._lView)}detach(){this._lView[Ne]&=-129}reattach(){gd(this._lView),this._lView[Ne]|=128}detectChanges(){this._lView[Ne]|=1024,fE(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ve(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,V1(this._lView[He],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new ve(902,!1);this._appRef=t,gd(this._lView)}},gs=(()=>{let t=class t{};t.__NG_ELEMENT_ID__=R2;let e=t;return e})(),P2=gs,N2=class extends P2{constructor(t,r,n){super(),this._declarationLView=t,this._declarationTContainer=r,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,r){return this.createEmbeddedViewImpl(t,r)}createEmbeddedViewImpl(t,r,n){let i=C2(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:r,dehydratedView:n});return new ms(i)}};function R2(){return $p(br(),ft())}function $p(e,t){return e.type&4?new N2(t,e,Eo(e,t)):null}var qq=new RegExp(`^(\\d+)*(${XM}|${ZM})*(.*)`);var k2=()=>null;function Uy(e,t){return k2(e,t)}var Bd=class{},Vd=class{},$u=class{};function F2(e){let t=Error(`No component factory found for ${fr(e)}.`);return t[L2]=e,t}var L2="ngComponent";var Ud=class{resolveComponentFactory(t){throw F2(t)}},mc=(()=>{let t=class t{};t.NULL=new Ud;let e=t;return e})(),Da=class{},ln=(()=>{let t=class t{constructor(){this.destroyNode=null}};t.__NG_ELEMENT_ID__=()=>O2();let e=t;return e})();function O2(){let e=ft(),t=br(),r=Si(t.index,e);return(ss(r)?r:e)[qt]}var B2=(()=>{let t=class t{};t.\u0275prov=Ce({token:t,providedIn:"root",factory:()=>null});let e=t;return e})(),Jh={};var jy=new Set;function gc(e){jy.has(e)||(jy.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}function Hy(...e){}function V2(){let e=typeof _r.requestAnimationFrame=="function",t=_r[e?"requestAnimationFrame":"setTimeout"],r=_r[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&t&&r){let n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);let i=r[Zone.__symbol__("OriginalDelegate")];i&&(r=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:r}}var _t=class e{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Rt(!1),this.onMicrotaskEmpty=new Rt(!1),this.onStable=new Rt(!1),this.onError=new Rt(!1),typeof Zone>"u")throw new ve(908,!1);Zone.assertZonePatched();let i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!n&&r,i.shouldCoalesceRunChangeDetection=n,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=V2().nativeRequestAnimationFrame,H2(i)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get("isAngularZone")===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new ve(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new ve(909,!1)}run(t,r,n){return this._inner.run(t,r,n)}runTask(t,r,n,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,U2,Hy,Hy);try{return s.runTask(o,r,n)}finally{s.cancelTask(o)}}runGuarded(t,r,n){return this._inner.runGuarded(t,r,n)}runOutsideAngular(t){return this._outer.run(t)}},U2={};function Kp(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function j2(e){e.isCheckStableRunning||e.lastRequestAnimationFrameId!==-1||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(_r,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,jd(e),e.isCheckStableRunning=!0,Kp(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),jd(e))}function H2(e){let t=()=>{j2(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(r,n,i,s,o,a)=>{if(q2(a))return r.invokeTask(i,s,o,a);try{return qy(e),r.invokeTask(i,s,o,a)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),Gy(e)}},onInvoke:(r,n,i,s,o,a,l)=>{try{return qy(e),r.invoke(i,s,o,a,l)}finally{e.shouldCoalesceRunChangeDetection&&t(),Gy(e)}},onHasTask:(r,n,i,s)=>{r.hasTask(i,s),n===i&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,jd(e),Kp(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,n,i,s)=>(r.handleError(i,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function jd(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.lastRequestAnimationFrameId!==-1?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function qy(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Gy(e){e._nesting--,Kp(e)}function q2(e){return!Array.isArray(e)||e.length!==1?!1:e[0].data?.__ignore_ng_zone__===!0}var mE=(()=>{let t=class t{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){let n=[...this.internalCallbacks];this.internalCallbacks.length=0;for(let i of n)i()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}};t.\u0275prov=Ce({token:t,providedIn:"root",factory:()=>new t});let e=t;return e})();function Hd(e,t,r){let n=r?e.styles:null,i=r?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=ad(i,a);else if(s==2){let l=a,u=t[++o];n=ad(n,l+": "+u+";")}}r?e.styles=n:e.stylesWithoutHost=n,r?e.classes=i:e.classesWithoutHost=i}var Ku=class extends mc{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let r=ls(t);return new Aa(r,this.ngModule)}};function zy(e){let t=[];for(let r in e){if(!e.hasOwnProperty(r))continue;let n=e[r];n!==void 0&&t.push({propName:Array.isArray(n)?n[0]:n,templateName:r})}return t}function G2(e){let t=e.toLowerCase();return t==="svg"?UC:t==="math"?JA:null}var qd=class{constructor(t,r){this.injector=t,this.parentInjector=r}get(t,r,n){n=tc(n);let i=this.injector.get(t,Jh,n);return i!==Jh||r===Jh?i:this.parentInjector.get(t,r,n)}},Aa=class extends $u{get inputs(){let t=this.componentDef,r=t.inputTransforms,n=zy(t.inputs);if(r!==null)for(let i of n)r.hasOwnProperty(i.propName)&&(i.transform=r[i.propName]);return n}get outputs(){return zy(this.componentDef.outputs)}constructor(t,r){super(),this.componentDef=t,this.ngModule=r,this.componentType=t.type,this.selector=NA(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!r}create(t,r,n,i){let s=ct(null);try{i=i||this.ngModule;let o=i instanceof Er?i:i?.injector;o&&this.componentDef.getStandaloneInjector!==null&&(o=this.componentDef.getStandaloneInjector(o)||o);let a=o?new qd(t,o):t,l=a.get(Da,null);if(l===null)throw new ve(407,!1);let u=a.get(B2,null),c=a.get(mE,null),f=a.get(Bd,null),h={rendererFactory:l,sanitizer:u,inlineEffectRunner:null,afterRenderEventManager:c,changeDetectionScheduler:f},p=l.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",m=n?KP(p,n,this.componentDef.encapsulation,a):B1(p,d,G2(d)),b=512;this.componentDef.signals?b|=4096:this.componentDef.onPush||(b|=16);let g=null;m!==null&&(g=Lp(m,a,!0));let C=Hp(0,null,null,1,0,null,null,null,null,null,null),y=hc(null,C,null,b,null,null,h,p,a,null,g);wp(y);let E,I;try{let T=this.componentDef,R,F=null;T.findHostDirectiveDefs?(R=[],F=new Map,T.findHostDirectiveDefs(T,R,F),R.push(T)):R=[T];let q=z2(y,m),Z=$2(q,m,T,R,y,h,p);I=HC(C,xn),m&&Q2(p,T,m,n),r!==void 0&&Y2(I,this.ngContentSelectors,r),E=W2(Z,T,R,F,y,[Z2]),Gp(C,y,null)}finally{Tp()}return new Gd(this.componentType,E,Eo(I,y),y,I)}finally{ct(s)}}},Gd=class extends Vd{constructor(t,r,n,i,s){super(),this.location=n,this._rootLView=i,this._tNode=s,this.previousInputValues=null,this.instance=r,this.hostView=this.changeDetectorRef=new ms(i,void 0,!1),this.componentType=t}setInput(t,r){let n=this._tNode.inputs,i;if(n!==null&&(i=n[t])){if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),r))return;let s=this._rootLView;qp(s[He],s,i,t,r),this.previousInputValues.set(t,r);let o=Si(this._tNode.index,s);zp(o)}}get injector(){return new os(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function z2(e,t){let r=e[He],n=xn;return e[n]=t,dc(r,n,2,"#host",null)}function $2(e,t,r,n,i,s,o){let a=i[He];K2(n,e,t,o);let l=null;t!==null&&(l=Lp(t,i[po]));let u=s.rendererFactory.createRenderer(t,r),c=16;r.signals?c=4096:r.onPush&&(c=64);let f=hc(i,J1(r),null,c,i[e.index],e,s,u,null,null,l);return a.firstCreatePass&&Fd(a,e,n.length-1),pc(i,f),i[e.index]=f}function K2(e,t,r,n){for(let i of e)t.mergedAttrs=Sa(t.mergedAttrs,i.hostAttrs);t.mergedAttrs!==null&&(Hd(t,t.mergedAttrs,!0),r!==null&&z1(n,r,t))}function W2(e,t,r,n,i,s){let o=br(),a=i[He],l=Vr(o,i);rE(a,i,o,r,null,n);for(let c=0;c<r.length;c++){let f=o.directiveStart+c,h=ds(i,a,f,o);ps(h,i)}nE(a,i,o),l&&ps(l,i);let u=ds(i,a,o.directiveStart+o.componentOffset,o);if(e[bn]=i[bn]=u,s!==null)for(let c of s)c(u,t);return Y1(a,o,i),u}function Q2(e,t,r,n){if(n)fd(e,r,["ng-version","17.3.12"]);else{let{attrs:i,classes:s}=RA(t.selectors[0]);i&&fd(e,r,i),s&&s.length>0&&G1(e,r,s.join(" "))}}function Y2(e,t,r){let n=e.projection=[];for(let i=0;i<t.length;i++){let s=r[i];n.push(s!=null?Array.from(s):null)}}function Z2(){let e=br();Mp(ft()[He],e)}var Ii=(()=>{let t=class t{};t.__NG_ELEMENT_ID__=X2;let e=t;return e})();function X2(){let e=br();return vE(e,ft())}var J2=Ii,gE=class extends J2{constructor(t,r,n){super(),this._lContainer=t,this._hostTNode=r,this._hostLView=n}get element(){return Eo(this._hostTNode,this._hostLView)}get injector(){return new os(this._hostTNode,this._hostLView)}get parentInjector(){let t=Pp(this._hostTNode,this._hostLView);if(o1(t)){let r=ju(t,this._hostLView),n=Uu(t),i=r[He].data[n+8];return new os(i,r)}else return new os(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let r=$y(this._lContainer);return r!==null&&r[t]||null}get length(){return this._lContainer.length-Dr}createEmbeddedView(t,r,n){let i,s;typeof n=="number"?i=n:n!=null&&(i=n.index,s=n.injector);let o=Uy(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(r||{},s,o);return this.insertImpl(a,i,Vy(this._hostTNode,o)),a}createComponent(t,r,n,i,s){let o=t&&!WA(t),a;if(o)a=r;else{let d=r||{};a=d.index,n=d.injector,i=d.projectableNodes,s=d.environmentInjector||d.ngModuleRef}let l=o?t:new Aa(ls(t)),u=n||this.parentInjector;if(!s&&l.ngModule==null){let m=(o?u:this.parentInjector).get(Er,null);m&&(s=m)}let c=ls(l.componentType??{}),f=Uy(this._lContainer,c?.id??null),h=f?.firstChild??null,p=l.create(u,i,h,s);return this.insertImpl(p.hostView,a,Vy(this._hostTNode,f)),p}insert(t,r){return this.insertImpl(t,r,!0)}insertImpl(t,r,n){let i=t._lView;if(iM(i)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let l=i[Jt],u=new gE(l,l[on],l[Jt]);u.detach(u.indexOf(t))}}let s=this._adjustIndex(r),o=this._lContainer;return E2(o,i,s,n),t.attachToViewContainerRef(),pC(ed(o),s,t),t}move(t,r){return this.insert(t,r)}indexOf(t){let r=$y(this._lContainer);return r!==null?r.indexOf(t):-1}remove(t){let r=this._adjustIndex(t,-1),n=Rd(this._lContainer,r);n&&(Fu(ed(this._lContainer),r),j1(n[He],n))}detach(t){let r=this._adjustIndex(t,-1),n=Rd(this._lContainer,r);return n&&Fu(ed(this._lContainer),r)!=null?new ms(n):null}_adjustIndex(t,r=0){return t??this.length+r}};function $y(e){return e[Bu]}function ed(e){return e[Bu]||(e[Bu]=[])}function vE(e,t){let r,n=t[e.index];return Jn(n)?r=n:(r=iE(n,t,null,e),t[e.index]=r,pc(t,r)),tN(r,t,e,n),new gE(r,e,t)}function eN(e,t){let r=e[qt],n=r.createComment(""),i=Vr(t,e),s=Vp(r,i);return Gu(r,s,n,FP(r,i),!1),n}var tN=iN,rN=()=>!1;function nN(e,t,r){return rN(e,t,r)}function iN(e,t,r,n){if(e[cs])return;let i;r.type&8?i=In(n):i=eN(t,r),e[cs]=i}var zd=class e{constructor(t){this.queryList=t,this.matches=null}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},$d=class e{constructor(t=[]){this.queries=t}createEmbeddedView(t){let r=t.queries;if(r!==null){let n=t.contentQueries!==null?t.contentQueries[0]:r.length,i=[];for(let s=0;s<n;s++){let o=r.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new e(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let r=0;r<this.queries.length;r++)Wp(t,r).matches!==null&&this.queries[r].setDirty()}},Kd=class{constructor(t,r,n=null){this.flags=r,this.read=n,typeof t=="string"?this.predicate=hN(t):this.predicate=t}},Wd=class e{constructor(t=[]){this.queries=t}elementStart(t,r){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,r)}elementEnd(t){for(let r=0;r<this.queries.length;r++)this.queries[r].elementEnd(t)}embeddedTView(t){let r=null;for(let n=0;n<this.length;n++){let i=r!==null?r.length:0,s=this.getByIndex(n).embeddedTView(t,i);s&&(s.indexInDeclarationView=n,r!==null?r.push(s):r=[s])}return r!==null?new e(r):null}template(t,r){for(let n=0;n<this.queries.length;n++)this.queries[n].template(t,r)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},Qd=class e{constructor(t,r=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=r}elementStart(t,r){this.isApplyingToNode(r)&&this.matchTNode(t,r)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,r){this.elementStart(t,r)}embeddedTView(t,r){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,r),new e(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let r=this._declarationNodeIndex,n=t.parent;for(;n!==null&&n.type&8&&n.index!==r;)n=n.parent;return r===(n!==null?n.index:-1)}return this._appliesToNextNode}matchTNode(t,r){let n=this.metadata.predicate;if(Array.isArray(n))for(let i=0;i<n.length;i++){let s=n[i];this.matchTNodeWithReadOption(t,r,sN(r,s)),this.matchTNodeWithReadOption(t,r,Mu(r,t,s,!1,!1))}else n===gs?r.type&4&&this.matchTNodeWithReadOption(t,r,-1):this.matchTNodeWithReadOption(t,r,Mu(r,t,n,!1,!1))}matchTNodeWithReadOption(t,r,n){if(n!==null){let i=this.metadata.read;if(i!==null)if(i===Sr||i===Ii||i===gs&&r.type&4)this.addMatch(r.index,-2);else{let s=Mu(r,t,i,!1,!1);s!==null&&this.addMatch(r.index,s)}else this.addMatch(r.index,n)}}addMatch(t,r){this.matches===null?this.matches=[t,r]:this.matches.push(t,r)}};function sN(e,t){let r=e.localNames;if(r!==null){for(let n=0;n<r.length;n+=2)if(r[n]===t)return r[n+1]}return null}function oN(e,t){return e.type&11?Eo(e,t):e.type&4?$p(e,t):null}function aN(e,t,r,n){return r===-1?oN(t,e):r===-2?lN(e,t,n):ds(e,e[He],r,t)}function lN(e,t,r){if(r===Sr)return Eo(t,e);if(r===gs)return $p(t,e);if(r===Ii)return vE(t,e)}function yE(e,t,r,n){let i=t[Kn].queries[n];if(i.matches===null){let s=e.data,o=r.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let u=o[l];if(u<0)a.push(null);else{let c=s[u];a.push(aN(t,c,o[l+1],r.metadata.read))}}i.matches=a}return i.matches}function Yd(e,t,r,n){let i=e.queries.getByIndex(r),s=i.matches;if(s!==null){let o=yE(e,t,i,r);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)n.push(o[a/2]);else{let u=s[a+1],c=t[-l];for(let f=Dr;f<c.length;f++){let h=c[f];h[ka]===h[Jt]&&Yd(h[He],h,u,n)}if(c[mo]!==null){let f=c[mo];for(let h=0;h<f.length;h++){let p=f[h];Yd(p[He],p,u,n)}}}}}return n}function uN(e,t){return e[Kn].queries[t].queryList}function cN(e,t,r){let n=new xd((r&4)===4);return YP(e,t,n,n.destroy),(t[Kn]??=new $d).queries.push(new zd(n))-1}function fN(e,t,r){let n=er();return n.firstCreatePass&&(dN(n,new Kd(e,t,r),-1),(t&2)===2&&(n.staticViewQueries=!0)),cN(n,ft(),t)}function hN(e){return e.split(",").map(t=>t.trim())}function dN(e,t,r){e.queries===null&&(e.queries=new Wd),e.queries.track(new Qd(t,r))}function Wp(e,t){return e.queries.getByIndex(t)}function pN(e,t){let r=e[He],n=Wp(r,t);return n.crossesNgTemplate?Yd(r,e,t,[]):yE(r,e,n,t)}function mN(e){return typeof e=="function"&&e[hi]!==void 0}function bo(e,t){gc("NgSignals");let r=Bv(e),n=r[hi];return t?.equal&&(n.equal=t.equal),r.set=i=>Kl(n,i),r.update=i=>Vv(n,i),r.asReadonly=gN.bind(r),r}function gN(){let e=this[hi];if(e.readonlyFn===void 0){let t=()=>this();t[hi]=e,e.readonlyFn=t}return e.readonlyFn}function CE(e){return mN(e)&&typeof e.set=="function"}function vN(e){return Object.getPrototypeOf(e.prototype).constructor}function Ur(e){let t=vN(e.type),r=!0,n=[e];for(;t;){let i;if(Ci(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new ve(903,!1);i=t.\u0275dir}if(i){if(r){n.push(i);let o=e;o.inputs=wu(e.inputs),o.inputTransforms=wu(e.inputTransforms),o.declaredInputs=wu(e.declaredInputs),o.outputs=wu(e.outputs);let a=i.hostBindings;a&&SN(e,a);let l=i.viewQuery,u=i.contentQueries;if(l&&EN(e,l),u&&bN(e,u),yN(e,i),JD(e.outputs,i.outputs),Ci(i)&&i.data.animation){let c=e.data;c.animation=(c.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===Ur&&(r=!1)}}t=Object.getPrototypeOf(t)}CN(n)}function yN(e,t){for(let r in t.inputs){if(!t.inputs.hasOwnProperty(r)||e.inputs.hasOwnProperty(r))continue;let n=t.inputs[r];if(n!==void 0&&(e.inputs[r]=n,e.declaredInputs[r]=t.declaredInputs[r],t.inputTransforms!==null)){let i=Array.isArray(n)?n[0]:n;if(!t.inputTransforms.hasOwnProperty(i))continue;e.inputTransforms??={},e.inputTransforms[i]=t.inputTransforms[i]}}}function CN(e){let t=0,r=null;for(let n=e.length-1;n>=0;n--){let i=e[n];i.hostVars=t+=i.hostVars,i.hostAttrs=Sa(i.hostAttrs,r=Sa(r,i.hostAttrs))}}function wu(e){return e===co?{}:e===Cr?[]:e}function EN(e,t){let r=e.viewQuery;r?e.viewQuery=(n,i)=>{t(n,i),r(n,i)}:e.viewQuery=t}function bN(e,t){let r=e.contentQueries;r?e.contentQueries=(n,i,s)=>{t(n,i,s),r(n,i,s)}:e.contentQueries=t}function SN(e,t){let r=e.hostBindings;r?e.hostBindings=(n,i)=>{t(n,i),r(n,i)}:e.hostBindings=t}function Qp(e){let t=e.inputConfig,r={};for(let n in t)if(t.hasOwnProperty(n)){let i=t[n];Array.isArray(i)&&i[3]&&(r[n]=i[3])}e.inputTransforms=r}var Ei=class{},Ma=class{};var Zd=class extends Ei{constructor(t,r,n){super(),this._parent=r,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new Ku(this);let i=IC(t);this._bootstrapComponents=O1(i.bootstrap),this._r3Injector=m1(t,r,[{provide:Ei,useValue:this},{provide:mc,useValue:this.componentFactoryResolver},...n],fr(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){let t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(r=>r()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}},Xd=class extends Ma{constructor(t){super(),this.moduleType=t}create(t){return new Zd(this.moduleType,t,[])}};var Wu=class extends Ei{constructor(t){super(),this.componentFactoryResolver=new Ku(this),this.instance=null;let r=new xa([...t.providers,{provide:Ei,useValue:this},{provide:mc,useValue:this.componentFactoryResolver}],t.parent||Cp(),t.debugName,new Set(["environment"]));this.injector=r,t.runEnvironmentInitializers&&r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function Yp(e,t,r=null){return new Wu({providers:e,parent:t,debugName:r,runEnvironmentInitializers:!0}).injector}var So=(()=>{let t=class t{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new $t(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function EE(e){return Zp(e)?Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e:!1}function xN(e,t){if(Array.isArray(e))for(let r=0;r<e.length;r++)t(e[r]);else{let r=e[Symbol.iterator](),n;for(;!(n=r.next()).done;)t(n.value)}}function Zp(e){return e!==null&&(typeof e=="function"||typeof e=="object")}function bE(e,t,r){return e[t]=r}function Yn(e,t,r){let n=e[t];return Object.is(n,r)?!1:(e[t]=r,!0)}function Ky(e,t,r,n){let i=Yn(e,t,r);return Yn(e,t+1,n)||i}function IN(e,t,r,n,i,s){let o=Ky(e,t,r,n);return Ky(e,t+2,i,s)||o}function wN(e){return(e.flags&32)===32}function TN(e,t,r,n,i,s,o,a,l){let u=t.consts,c=dc(t,e,4,o||null,Vu(u,a));tE(t,r,c,Vu(u,l)),Mp(t,c);let f=c.tView=Hp(2,c,n,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,u,null);return t.queries!==null&&(t.queries.template(t,c),f.queries=t.queries.embeddedTView(c)),c}function wi(e,t,r,n,i,s,o,a){let l=ft(),u=er(),c=e+xn,f=u.firstCreatePass?TN(c,u,l,t,r,n,i,s,o):u.data[c];Fa(f,!1);let h=_N(u,l,f,e);Dp()&&Up(u,l,h,f),ps(h,l);let p=iE(h,l,h,f);return l[c]=p,pc(l,p),nN(p,f,l),bp(f)&&Z1(u,l,f),o!=null&&X1(l,f,a),wi}var _N=DN;function DN(e,t,r,n){return Ap(!0),t[qt].createComment("")}function Ti(e,t,r,n){let i=ft(),s=oc();if(Yn(i,s,t)){let o=er(),a=_p();f2(a,i,e,t,r,n)}return Ti}function AN(e,t,r,n){return Yn(e,oc(),r)?t+ec(r)+n:ri}function Tu(e,t){return e<<17|t<<2}function vs(e){return e>>17&32767}function MN(e){return(e&2)==2}function PN(e,t){return e&131071|t<<17}function Jd(e){return e|2}function go(e){return(e&131068)>>2}function td(e,t){return e&-131069|t<<2}function NN(e){return(e&1)===1}function ep(e){return e|1}function RN(e,t,r,n,i,s){let o=s?t.classBindings:t.styleBindings,a=vs(o),l=go(o);e[n]=r;let u=!1,c;if(Array.isArray(r)){let f=r;c=f[1],(c===null||Ra(f,c)>0)&&(u=!0)}else c=r;if(i)if(l!==0){let h=vs(e[a+1]);e[n+1]=Tu(h,a),h!==0&&(e[h+1]=td(e[h+1],n)),e[a+1]=PN(e[a+1],n)}else e[n+1]=Tu(a,0),a!==0&&(e[a+1]=td(e[a+1],n)),a=n;else e[n+1]=Tu(l,0),a===0?a=n:e[l+1]=td(e[l+1],n),l=n;u&&(e[n+1]=Jd(e[n+1])),Wy(e,c,n,!0),Wy(e,c,n,!1),kN(t,c,e,n,s),o=Tu(a,l),s?t.classBindings=o:t.styleBindings=o}function kN(e,t,r,n,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Ra(s,t)>=0&&(r[n+1]=ep(r[n+1]))}function Wy(e,t,r,n){let i=e[r+1],s=t===null,o=n?vs(i):go(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],u=e[o+1];FN(l,t)&&(a=!0,e[o+1]=n?ep(u):Jd(u)),o=n?vs(u):go(u)}a&&(e[r+1]=n?Jd(i):ep(i))}function FN(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Ra(e,t)>=0:!1}var en={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function LN(e){return e.substring(en.key,en.keyEnd)}function ON(e){return BN(e),SE(e,xE(e,0,en.textEnd))}function SE(e,t){let r=en.textEnd;return r===t?-1:(t=en.keyEnd=VN(e,en.key=t,r),xE(e,t,r))}function BN(e){en.key=0,en.keyEnd=0,en.value=0,en.valueEnd=0,en.textEnd=e.length}function xE(e,t,r){for(;t<r&&e.charCodeAt(t)<=32;)t++;return t}function VN(e,t,r){for(;t<r&&e.charCodeAt(t)>32;)t++;return t}function lt(e,t,r){let n=ft(),i=oc();if(Yn(n,i,t)){let s=er(),o=_p();eE(s,o,n,e,t,n[qt],r,!1)}return lt}function tp(e,t,r,n,i){let s=t.inputs,o=i?"class":"style";qp(e,r,s[o],o,n)}function vc(e,t,r){return wE(e,t,r,!1),vc}function xo(e,t){return wE(e,t,null,!0),xo}function IE(e){jN(KN,UN,e,!0)}function UN(e,t){for(let r=ON(t);r>=0;r=SE(t,r))gp(e,LN(t),!0)}function wE(e,t,r,n){let i=ft(),s=er(),o=QC(2);if(s.firstUpdatePass&&_E(s,e,o,n),t!==ri&&Yn(i,o,t)){let a=s.data[ys()];DE(s,a,i,i[qt],e,i[o+1]=QN(t,r),n,o)}}function jN(e,t,r,n){let i=er(),s=QC(2);i.firstUpdatePass&&_E(i,null,s,n);let o=ft();if(r!==ri&&Yn(o,s,r)){let a=i.data[ys()];if(AE(a,n)&&!TE(i,s)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(r=ad(l,r||"")),tp(i,a,o,r,n)}else WN(i,a,o,o[qt],o[s+1],o[s+1]=$N(e,t,r),n,s)}}function TE(e,t){return t>=e.expandoStartIndex}function _E(e,t,r,n){let i=e.data;if(i[r+1]===null){let s=i[ys()],o=TE(e,r);AE(s,n)&&t===null&&!o&&(t=!1),t=HN(i,s,t,n),RN(i,s,t,r,o,n)}}function HN(e,t,r,n){let i=EM(e),s=n?t.residualClasses:t.residualStyles;if(i===null)(n?t.classBindings:t.styleBindings)===0&&(r=rd(null,e,t,r,n),r=Pa(r,t.attrs,n),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(r=rd(i,e,t,r,n),s===null){let l=qN(e,t,n);l!==void 0&&Array.isArray(l)&&(l=rd(null,e,t,l[1],n),l=Pa(l,t.attrs,n),GN(e,t,n,l))}else s=zN(e,t,n)}return s!==void 0&&(n?t.residualClasses=s:t.residualStyles=s),r}function qN(e,t,r){let n=r?t.classBindings:t.styleBindings;if(go(n)!==0)return e[vs(n)]}function GN(e,t,r,n){let i=r?t.classBindings:t.styleBindings;e[vs(i)]=n}function zN(e,t,r){let n,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;n=Pa(n,o,r)}return Pa(n,t.attrs,r)}function rd(e,t,r,n,i){let s=null,o=r.directiveEnd,a=r.directiveStylingLast;for(a===-1?a=r.directiveStart:a++;a<o&&(s=t[a],n=Pa(n,s.hostAttrs,i),s!==e);)a++;return e!==null&&(r.directiveStylingLast=a),n}function Pa(e,t,r){let n=r?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===n&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),gp(e,o,r?!0:t[++s]))}return e===void 0?null:e}function $N(e,t,r){if(r==null||r==="")return Cr;let n=[],i=an(r);if(Array.isArray(i))for(let s=0;s<i.length;s++)e(n,i[s],!0);else if(typeof i=="object")for(let s in i)i.hasOwnProperty(s)&&e(n,s,i[s]);else typeof i=="string"&&t(n,i);return n}function KN(e,t,r){let n=String(t);n!==""&&!n.includes(" ")&&gp(e,n,r)}function WN(e,t,r,n,i,s,o,a){i===ri&&(i=Cr);let l=0,u=0,c=0<i.length?i[0]:null,f=0<s.length?s[0]:null;for(;c!==null||f!==null;){let h=l<i.length?i[l+1]:void 0,p=u<s.length?s[u+1]:void 0,d=null,m;c===f?(l+=2,u+=2,h!==p&&(d=f,m=p)):f===null||c!==null&&c<f?(l+=2,d=c):(u+=2,d=f,m=p),d!==null&&DE(e,t,r,n,d,m,o,a),c=l<i.length?i[l]:null,f=u<s.length?s[u]:null}}function DE(e,t,r,n,i,s,o,a){if(!(t.type&3))return;let l=e.data,u=l[a+1],c=NN(u)?Qy(l,t,r,i,go(u),o):void 0;if(!Qu(c)){Qu(s)||MN(u)&&(s=Qy(l,null,r,i,a,o));let f=jC(ys(),r);HP(n,o,f,i,s)}}function Qy(e,t,r,n,i,s){let o=t===null,a;for(;i>0;){let l=e[i],u=Array.isArray(l),c=u?l[1]:l,f=c===null,h=r[i+1];h===ri&&(h=f?Cr:void 0);let p=f?zh(h,n):c===n?h:void 0;if(u&&!Qu(p)&&(p=zh(l,n)),Qu(p)&&(a=p,o))return a;let d=e[i+1];i=o?vs(d):go(d)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=zh(l,n))}return a}function Qu(e){return e!==void 0}function QN(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=fr(an(e)))),e}function AE(e,t){return(e.flags&(t?8:16))!==0}function YN(e,t,r,n,i,s){let o=t.consts,a=Vu(o,i),l=dc(t,e,2,n,a);return tE(t,r,l,Vu(o,s)),l.attrs!==null&&Hd(l,l.attrs,!1),l.mergedAttrs!==null&&Hd(l,l.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,l),l}function te(e,t,r,n){let i=ft(),s=er(),o=xn+e,a=i[qt],l=s.firstCreatePass?YN(o,s,i,t,r,n):s.data[o],u=ZN(s,i,l,a,t,e);i[o]=u;let c=bp(l);return Fa(l,!0),z1(a,u,l),!wN(l)&&Dp()&&Up(s,i,u,l),lM()===0&&ps(u,i),uM(),c&&(Z1(s,i,l),Y1(s,l,i)),n!==null&&X1(i,l),te}function ue(){let e=br();KC()?mM():(e=e.parent,Fa(e,!1));let t=e;hM(t)&&dM(),cM();let r=er();return r.firstCreatePass&&(Mp(r,e),FC(e)&&r.queries.elementEnd(e)),t.classesWithoutHost!=null&&DM(t)&&tp(r,t,ft(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&AM(t)&&tp(r,t,ft(),t.stylesWithoutHost,!1),ue}function ut(e,t,r,n){return te(e,t,r,n),ue(),ut}var ZN=(e,t,r,n,i,s)=>(Ap(!0),B1(n,i,IM()));var is=void 0;function XN(e){let t=e,r=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return r===1&&n===0?1:5}var JN=["en",[["a","p"],["AM","PM"],is],[["AM","PM"],is,is],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],is,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],is,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",is,"{1} 'at' {0}",is],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",XN],nd={};function yc(e){let t=eR(e),r=Yy(t);if(r)return r;let n=t.split("-")[0];if(r=Yy(n),r)return r;if(n==="en")return JN;throw new ve(701,!1)}function Yy(e){return e in nd||(nd[e]=_r.ng&&_r.ng.common&&_r.ng.common.locales&&_r.ng.common.locales[e]),nd[e]}var Es=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}(Es||{});function eR(e){return e.toLowerCase().replace(/_/g,"-")}var Yu="en-US",tR="USD";var rR=Yu;function nR(e){typeof e=="string"&&(rR=e.toLowerCase().replace(/_/g,"-"))}function bt(e,t,r,n){let i=ft(),s=er(),o=br();return ME(s,i,i[qt],o,e,t,n),bt}function iR(e,t,r,n){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===r&&i[s+1]===n){let a=t[Ia],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function ME(e,t,r,n,i,s,o){let a=bp(n),u=e.firstCreatePass&&aE(e),c=t[bn],f=oE(t),h=!0;if(n.type&3||o){let m=Vr(n,t),b=o?o(m):m,g=f.length,C=o?E=>o(In(E[n.index])):n.index,y=null;if(!o&&a&&(y=iR(e,t,i,n.index)),y!==null){let E=y.__ngLastListenerFn__||y;E.__ngNextListenerFn__=s,y.__ngLastListenerFn__=s,h=!1}else{s=Xy(n,t,c,s,!1);let E=r.listen(b,i,s);f.push(s,E),u&&u.push(i,C,g,g+1)}}else s=Xy(n,t,c,s,!1);let p=n.outputs,d;if(h&&p!==null&&(d=p[i])){let m=d.length;if(m)for(let b=0;b<m;b+=2){let g=d[b],C=d[b+1],I=t[g][C].subscribe(s),T=f.length;f.push(s,I),u&&u.push(i,n.index,T,-(T+1))}}}function Zy(e,t,r,n){let i=ct(null);try{return yn(6,t,r),r(n)!==!1}catch(s){return lE(e,s),!1}finally{yn(7,t,r),ct(i)}}function Xy(e,t,r,n,i){return function s(o){if(o===Function)return n;let a=e.componentOffset>-1?Si(e.index,t):t;zp(a);let l=Zy(t,r,n,o),u=s.__ngNextListenerFn__;for(;u;)l=Zy(t,r,u,o)&&l,u=u.__ngNextListenerFn__;return i&&l===!1&&o.preventDefault(),l}}function Cc(e=1){return SM(e)}function Ec(e,t,r){fN(e,t,r)}function Oa(e){let t=ft(),r=er(),n=YC();Ip(n+1);let i=Wp(r,n);if(e.dirty&&nM(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=pN(t,n);e.reset(s,qM),e.notifyOnChanges()}return!0}return!1}function Ba(){return uN(ft(),YC())}function sR(e,t,r,n){r>=e.data.length&&(e.data[r]=null,e.blueprint[r]=null),t[r]=n}function ye(e,t=""){let r=ft(),n=er(),i=e+xn,s=n.firstCreatePass?dc(n,i,1,t,null):n.data[i],o=oR(n,r,s,t,e);r[i]=o,Dp()&&Up(n,r,o,s),Fa(s,!1)}var oR=(e,t,r,n,i)=>(Ap(!0),xP(t[qt],n));function ur(e){return Ar("",e,""),ur}function Ar(e,t,r){let n=ft(),i=AN(n,e,t,r);return i!==ri&&m2(n,ys(),i),Ar}function Xp(e,t,r){CE(t)&&(t=t());let n=ft(),i=oc();if(Yn(n,i,t)){let s=er(),o=_p();eE(s,o,n,e,t,n[qt],r,!1)}return Xp}function PE(e,t){let r=CE(e);return r&&e.set(t),r}function Jp(e,t){let r=ft(),n=er(),i=br();return ME(n,r,r[qt],i,e,t),Jp}function aR(e,t,r){let n=er();if(n.firstCreatePass){let i=Ci(e);rp(r,n.data,n.blueprint,i,!0),rp(t,n.data,n.blueprint,i,!1)}}function rp(e,t,r,n,i){if(e=cr(e),Array.isArray(e))for(let s=0;s<e.length;s++)rp(e[s],t,r,n,i);else{let s=er(),o=ft(),a=br(),l=ho(e)?e:cr(e.provide),u=MC(e),c=a.providerIndexes&1048575,f=a.directiveStart,h=a.providerIndexes>>20;if(ho(e)||!e.multi){let p=new hs(u,i,Ee),d=sd(l,t,i?c:c+h,f);d===-1?(Cd(qu(a,o),s,l),id(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(p),o.push(p)):(r[d]=p,o[d]=p)}else{let p=sd(l,t,c+h,f),d=sd(l,t,c,c+h),m=p>=0&&r[p],b=d>=0&&r[d];if(i&&!b||!i&&!m){Cd(qu(a,o),s,l);let g=cR(i?uR:lR,r.length,i,n,u);!i&&b&&(r[d].providerFactory=g),id(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(g),o.push(g)}else{let g=NE(r[i?d:p],u,!i&&n);id(s,e,p>-1?p:d,g)}!i&&n&&b&&r[d].componentProviders++}}}function id(e,t,r,n){let i=ho(t),s=jA(t);if(i||s){let l=(s?cr(t.useClass):t).prototype.ngOnDestroy;if(l){let u=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let c=u.indexOf(r);c===-1?u.push(r,[n,l]):u[c+1].push(n,l)}else u.push(r,l)}}}function NE(e,t,r){return r&&e.componentProviders++,e.multi.push(t)-1}function sd(e,t,r,n){for(let i=r;i<n;i++)if(t[i]===e)return i;return-1}function lR(e,t,r,n){return np(this.multi,[])}function uR(e,t,r,n){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=ds(r,r[He],this.providerFactory.index,n);s=a.slice(0,o),np(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],np(i,s);return s}function np(e,t){for(let r=0;r<e.length;r++){let n=e[r];t.push(n())}return t}function cR(e,t,r,n,i){let s=new hs(e,r,Ee);return s.multi=[],s.index=t,s.componentProviders=0,NE(s,i,n&&!r),s}function Io(e,t=[]){return r=>{r.providersResolver=(n,i)=>aR(n,i?i(e):e,t)}}var fR=(()=>{let t=class t{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let i=_C(!1,n.type),s=i.length>0?Yp([i],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,s)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}};t.\u0275prov=Ce({token:t,providedIn:"environment",factory:()=>new t(Re(Er))});let e=t;return e})();function Ct(e){gc("NgStandalone"),e.getStandaloneInjector=t=>t.get(fR).getOrCreateStandaloneInjector(e)}function Va(e,t,r,n){return hR(ft(),WC(),e,t,r,n)}function RE(e,t){let r=e[t];return r===ri?void 0:r}function hR(e,t,r,n,i,s){let o=t+r;return Yn(e,o,i)?bE(e,o+1,s?n.call(s,i):n(i)):RE(e,o+1)}function dR(e,t,r,n,i,s,o,a,l){let u=t+r;return IN(e,u,i,s,o,a)?bE(e,u+4,l?n.call(l,i,s,o,a):n(i,s,o,a)):RE(e,u+4)}function wo(e,t){let r=er(),n,i=e+xn;r.firstCreatePass?(n=pR(t,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks??=[]).push(i,n.onDestroy)):n=r.data[i];let s=n.factory||(n.factory=as(n.type,!0)),o,a=yr(Ee);try{let l=Hu(!1),u=s();return Hu(l),sR(r,ft(),i,u),u}finally{yr(a)}}function pR(e,t){if(t)for(let r=t.length-1;r>=0;r--){let n=t[r];if(e===n.name)return n}}function To(e,t,r,n,i,s){let o=e+xn,a=ft(),l=rM(a,o);return mR(a,o)?dR(a,WC(),t,l.transform,r,n,i,s,l):l.transform(r,n,i,s)}function mR(e,t){return e[He].data[t].pure}var bc=(()=>{let t=class t{log(n){console.log(n)}warn(n){console.warn(n)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"platform"});let e=t;return e})();var kE=new De("");function ni(e){return!!e&&typeof e.then=="function"}function FE(e){return!!e&&typeof e.subscribe=="function"}var LE=new De(""),OE=(()=>{let t=class t{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,i)=>{this.resolve=n,this.reject=i}),this.appInits=re(LE,{optional:!0})??[]}runInitializers(){if(this.initialized)return;let n=[];for(let s of this.appInits){let o=s();if(ni(o))n.push(o);else if(FE(o)){let a=new Promise((l,u)=>{o.subscribe({complete:l,error:u})});n.push(a)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{i()}).catch(s=>{this.reject(s)}),n.length===0&&i(),this.initialized=!0}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Sc=new De("");function gR(){Ov(()=>{throw new ve(600,!1)})}function vR(e){return e.isBoundToModule}function yR(e,t,r){try{let n=r();return ni(n)?n.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):n}catch(n){throw t.runOutsideAngular(()=>e.handleError(n)),n}}var _o=(()=>{let t=class t{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=re(g1),this.afterRenderEffectManager=re(mE),this.externalTestViews=new Set,this.beforeRender=new Mt,this.afterTick=new Mt,this.componentTypes=[],this.components=[],this.isStable=re(So).hasPendingTasks.pipe(Ae(n=>!n)),this._injector=re(Er)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,i){let s=n instanceof $u;if(!this._injector.get(OE).done){let p=!s&&xC(n),d=!1;throw new ve(405,d)}let a;s?a=n:a=this._injector.get(mc).resolveComponentFactory(n),this.componentTypes.push(a.componentType);let l=vR(a)?void 0:this._injector.get(Ei),u=i||a.selector,c=a.create(Cs.NULL,[],u,l),f=c.location.nativeElement,h=c.injector.get(kE,null);return h?.registerApplication(f),c.onDestroy(()=>{this.detachView(c.hostView),od(this.components,c),h?.unregisterApplication(f)}),this._loadComponent(c),c}tick(){this._tick(!0)}_tick(n){if(this._runningTick)throw new ve(101,!1);let i=ct(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(n)}catch(s){this.internalErrorHandler(s)}finally{this.afterTick.next(),this._runningTick=!1,ct(i)}}detectChangesInAttachedViews(n){let i=0,s=this.afterRenderEffectManager;for(;;){if(i===cE)throw new ve(103,!1);if(n){let o=i===0;this.beforeRender.next(o);for(let{_lView:a,notifyErrorHandler:l}of this._views)CR(a,o,l)}if(i++,s.executeInternalCallbacks(),![...this.externalTestViews.keys(),...this._views].some(({_lView:o})=>ip(o))&&(s.execute(),![...this.externalTestViews.keys(),...this._views].some(({_lView:o})=>ip(o))))break}}attachView(n){let i=n;this._views.push(i),i.attachToAppRef(this)}detachView(n){let i=n;od(this._views,i),i.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);let i=this._injector.get(Sc,[]);[...this._bootstrapListeners,...i].forEach(s=>s(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>od(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new ve(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function od(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}function CR(e,t,r){!t&&!ip(e)||ER(e,r,t)}function ip(e){return xp(e)}function ER(e,t,r){let n;r?(n=0,e[Ne]|=1024):e[Ne]&64?n=0:n=1,fE(e,t,n)}var sp=class{constructor(t,r){this.ngModuleFactory=t,this.componentFactories=r}},em=(()=>{let t=class t{compileModuleSync(n){return new Xd(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let i=this.compileModuleSync(n),s=IC(n),o=O1(s.declarations).reduce((a,l)=>{let u=ls(l);return u&&a.push(new Aa(u)),a},[]);return new sp(i,o)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var bR=(()=>{let t=class t{constructor(){this.zone=re(_t),this.applicationRef=re(_o)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function SR(e){return[{provide:_t,useFactory:e},{provide:fo,multi:!0,useFactory:()=>{let t=re(bR,{optional:!0});return()=>t.initialize()}},{provide:fo,multi:!0,useFactory:()=>{let t=re(TR);return()=>{t.initialize()}}},{provide:g1,useFactory:xR}]}function xR(){let e=re(_t),t=re(Wn);return r=>e.runOutsideAngular(()=>t.handleError(r))}function IR(e){let t=SR(()=>new _t(wR(e)));return vo([[],t])}function wR(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var TR=(()=>{let t=class t{constructor(){this.subscription=new Bt,this.initialized=!1,this.zone=re(_t),this.pendingTasks=re(So)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{_t.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{_t.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function _R(){return typeof $localize<"u"&&$localize.locale||Yu}var xc=new De("",{providedIn:"root",factory:()=>re(xc,$e.Optional|$e.SkipSelf)||_R()}),BE=new De("",{providedIn:"root",factory:()=>tR});var VE=new De("");var Nu=null;function DR(e=[],t){return Cs.create({name:t,providers:[{provide:nc,useValue:"platform"},{provide:VE,useValue:new Set([()=>Nu=null])},...e]})}function AR(e=[]){if(Nu)return Nu;let t=DR(e);return Nu=t,gR(),MR(t),t}function MR(e){e.get(kp,null)?.forEach(r=>r())}var bs=(()=>{let t=class t{};t.__NG_ELEMENT_ID__=PR;let e=t;return e})();function PR(e){return NR(br(),ft(),(e&16)===16)}function NR(e,t,r){if(sc(e)&&!r){let n=Si(e.index,t);return new ms(n,n)}else if(e.type&47){let n=t[Sn];return new ms(n,t)}return null}var op=class{constructor(){}supports(t){return EE(t)}create(t){return new ap(t)}},RR=(e,t)=>t,ap=class{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||RR}forEachItem(t){let r;for(r=this._itHead;r!==null;r=r._next)t(r)}forEachOperation(t){let r=this._itHead,n=this._removalsHead,i=0,s=null;for(;r||n;){let o=!n||r&&r.currentIndex<Jy(n,i,s)?r:n,a=Jy(o,i,s),l=o.currentIndex;if(o===n)i--,n=n._nextRemoved;else if(r=r._next,o.previousIndex==null)i++;else{s||(s=[]);let u=a-i,c=l-i;if(u!=c){for(let h=0;h<u;h++){let p=h<s.length?s[h]:s[h]=0,d=p+h;c<=d&&d<u&&(s[h]=p+1)}let f=o.previousIndex;s[f]=c-u}}a!==l&&t(o,a,l)}}forEachPreviousItem(t){let r;for(r=this._previousItHead;r!==null;r=r._nextPrevious)t(r)}forEachAddedItem(t){let r;for(r=this._additionsHead;r!==null;r=r._nextAdded)t(r)}forEachMovedItem(t){let r;for(r=this._movesHead;r!==null;r=r._nextMoved)t(r)}forEachRemovedItem(t){let r;for(r=this._removalsHead;r!==null;r=r._nextRemoved)t(r)}forEachIdentityChange(t){let r;for(r=this._identityChangesHead;r!==null;r=r._nextIdentityChange)t(r)}diff(t){if(t==null&&(t=[]),!EE(t))throw new ve(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let r=this._itHead,n=!1,i,s,o;if(Array.isArray(t)){this.length=t.length;for(let a=0;a<this.length;a++)s=t[a],o=this._trackByFn(a,s),r===null||!Object.is(r.trackById,o)?(r=this._mismatch(r,s,o,a),n=!0):(n&&(r=this._verifyReinsertion(r,s,o,a)),Object.is(r.item,s)||this._addIdentityChange(r,s)),r=r._next}else i=0,xN(t,a=>{o=this._trackByFn(i,a),r===null||!Object.is(r.trackById,o)?(r=this._mismatch(r,a,o,i),n=!0):(n&&(r=this._verifyReinsertion(r,a,o,i)),Object.is(r.item,a)||this._addIdentityChange(r,a)),r=r._next,i++}),this.length=i;return this._truncate(r),this.collection=t,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;t!==null;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;t!==null;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,r,n,i){let s;return t===null?s=this._itTail:(s=t._prev,this._remove(t)),t=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),t!==null?(Object.is(t.item,r)||this._addIdentityChange(t,r),this._reinsertAfter(t,s,i)):(t=this._linkedRecords===null?null:this._linkedRecords.get(n,i),t!==null?(Object.is(t.item,r)||this._addIdentityChange(t,r),this._moveAfter(t,s,i)):t=this._addAfter(new lp(r,n),s,i)),t}_verifyReinsertion(t,r,n,i){let s=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return s!==null?t=this._reinsertAfter(s,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;t!==null;){let r=t._next;this._addToRemovals(this._unlink(t)),t=r}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,r,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(t);let i=t._prevRemoved,s=t._nextRemoved;return i===null?this._removalsHead=s:i._nextRemoved=s,s===null?this._removalsTail=i:s._prevRemoved=i,this._insertAfter(t,r,n),this._addToMoves(t,n),t}_moveAfter(t,r,n){return this._unlink(t),this._insertAfter(t,r,n),this._addToMoves(t,n),t}_addAfter(t,r,n){return this._insertAfter(t,r,n),this._additionsTail===null?this._additionsTail=this._additionsHead=t:this._additionsTail=this._additionsTail._nextAdded=t,t}_insertAfter(t,r,n){let i=r===null?this._itHead:r._next;return t._next=i,t._prev=r,i===null?this._itTail=t:i._prev=t,r===null?this._itHead=t:r._next=t,this._linkedRecords===null&&(this._linkedRecords=new Zu),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){this._linkedRecords!==null&&this._linkedRecords.remove(t);let r=t._prev,n=t._next;return r===null?this._itHead=n:r._next=n,n===null?this._itTail=r:n._prev=r,t}_addToMoves(t,r){return t.previousIndex===r||(this._movesTail===null?this._movesTail=this._movesHead=t:this._movesTail=this._movesTail._nextMoved=t),t}_addToRemovals(t){return this._unlinkedRecords===null&&(this._unlinkedRecords=new Zu),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,r){return t.item=r,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=t:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=t,t}},lp=class{constructor(t,r){this.item=t,this.trackById=r,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},up=class{constructor(){this._head=null,this._tail=null}add(t){this._head===null?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,r){let n;for(n=this._head;n!==null;n=n._nextDup)if((r===null||r<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){let r=t._prevDup,n=t._nextDup;return r===null?this._head=n:r._nextDup=n,n===null?this._tail=r:n._prevDup=r,this._head===null}},Zu=class{constructor(){this.map=new Map}put(t){let r=t.trackById,n=this.map.get(r);n||(n=new up,this.map.set(r,n)),n.add(t)}get(t,r){let n=t,i=this.map.get(n);return i?i.get(t,r):null}remove(t){let r=t.trackById;return this.map.get(r).remove(t)&&this.map.delete(r),t}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Jy(e,t,r){let n=e.previousIndex;if(n===null)return n;let i=0;return r&&n<r.length&&(i=r[n]),n+t+i}var cp=class{constructor(){}supports(t){return t instanceof Map||Zp(t)}create(){return new fp}},fp=class{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(t){let r;for(r=this._mapHead;r!==null;r=r._next)t(r)}forEachPreviousItem(t){let r;for(r=this._previousMapHead;r!==null;r=r._nextPrevious)t(r)}forEachChangedItem(t){let r;for(r=this._changesHead;r!==null;r=r._nextChanged)t(r)}forEachAddedItem(t){let r;for(r=this._additionsHead;r!==null;r=r._nextAdded)t(r)}forEachRemovedItem(t){let r;for(r=this._removalsHead;r!==null;r=r._nextRemoved)t(r)}diff(t){if(!t)t=new Map;else if(!(t instanceof Map||Zp(t)))throw new ve(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let r=this._mapHead;if(this._appendAfter=null,this._forEach(t,(n,i)=>{if(r&&r.key===i)this._maybeAddToChanges(r,n),this._appendAfter=r,r=r._next;else{let s=this._getOrCreateRecordForKey(i,n);r=this._insertBeforeOrAppend(r,s)}}),r){r._prev&&(r._prev._next=null),this._removalsHead=r;for(let n=r;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,r){if(t){let n=t._prev;return r._next=t,r._prev=n,t._prev=r,n&&(n._next=r),t===this._mapHead&&(this._mapHead=r),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=r,r._prev=this._appendAfter):this._mapHead=r,this._appendAfter=r,null}_getOrCreateRecordForKey(t,r){if(this._records.has(t)){let i=this._records.get(t);this._maybeAddToChanges(i,r);let s=i._prev,o=i._next;return s&&(s._next=o),o&&(o._prev=s),i._next=null,i._prev=null,i}let n=new hp(t);return this._records.set(t,n),n.currentValue=r,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;t!==null;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;t!=null;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,r){Object.is(r,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=r,this._addToChanges(t))}_addToAdditions(t){this._additionsHead===null?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){this._changesHead===null?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,r){t instanceof Map?t.forEach(r):Object.keys(t).forEach(n=>r(t[n],n))}},hp=class{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}};function eC(){return new tm([new op])}var tm=(()=>{let t=class t{constructor(n){this.factories=n}static create(n,i){if(i!=null){let s=i.factories.slice();n=n.concat(s)}return new t(n)}static extend(n){return{provide:t,useFactory:i=>t.create(n,i||eC()),deps:[[t,new pp,new rc]]}}find(n){let i=this.factories.find(s=>s.supports(n));if(i!=null)return i;throw new ve(901,!1)}};t.\u0275prov=Ce({token:t,providedIn:"root",factory:eC});let e=t;return e})();function tC(){return new rm([new cp])}var rm=(()=>{let t=class t{constructor(n){this.factories=n}static create(n,i){if(i){let s=i.factories.slice();n=n.concat(s)}return new t(n)}static extend(n){return{provide:t,useFactory:i=>t.create(n,i||tC()),deps:[[t,new pp,new rc]]}}find(n){let i=this.factories.find(s=>s.supports(n));if(i)return i;throw new ve(901,!1)}};t.\u0275prov=Ce({token:t,providedIn:"root",factory:tC});let e=t;return e})();function UE(e){try{let{rootComponent:t,appProviders:r,platformProviders:n}=e,i=AR(n),s=[IR(),...r||[]],a=new Wu({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1}).injector,l=a.get(_t);return l.run(()=>{a.resolveInjectorInitializers();let u=a.get(Wn,null),c;l.runOutsideAngular(()=>{c=l.onError.subscribe({next:p=>{u.handleError(p)}})});let f=()=>a.destroy(),h=i.get(VE);return h.add(f),a.onDestroy(()=>{c.unsubscribe(),h.delete(f)}),yR(u,l,()=>{let p=a.get(OE);return p.runInitializers(),p.donePromise.then(()=>{let d=a.get(xc,Yu);nR(d||Yu);let m=a.get(_o);return t!==void 0&&m.bootstrap(t),m})})})}catch(t){return Promise.reject(t)}}function Ss(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}var WE=null;function si(){return WE}function QE(e){WE??=e}var Ic=class{};var hr=new De(""),YE=(()=>{let t=class t{historyGo(n){throw new Error("")}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:()=>re(FR),providedIn:"platform"});let e=t;return e})();var FR=(()=>{let t=class t extends YE{constructor(){super(),this._doc=re(hr),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return si().getBaseHref(this._doc)}onPopState(n){let i=si().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",n,!1),()=>i.removeEventListener("popstate",n)}onHashChange(n){let i=si().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",n,!1),()=>i.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,i,s){this._history.pushState(n,i,s)}replaceState(n,i,s){this._history.replaceState(n,i,s)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:()=>new t,providedIn:"platform"});let e=t;return e})();function ZE(e,t){if(e.length==0)return t;if(t.length==0)return e;let r=0;return e.endsWith("/")&&r++,t.startsWith("/")&&r++,r==2?e+t.substring(1):r==1?e+t:e+"/"+t}function jE(e){let t=e.match(/#|\?|$/),r=t&&t.index||e.length,n=r-(e[r-1]==="/"?1:0);return e.slice(0,n)+e.slice(r)}function xs(e){return e&&e[0]!=="?"?"?"+e:e}var Ao=(()=>{let t=class t{historyGo(n){throw new Error("")}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:()=>re(XE),providedIn:"root"});let e=t;return e})(),LR=new De(""),XE=(()=>{let t=class t extends Ao{constructor(n,i){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??re(hr).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return ZE(this._baseHref,n)}path(n=!1){let i=this._platformLocation.pathname+xs(this._platformLocation.search),s=this._platformLocation.hash;return s&&n?`${i}${s}`:i}pushState(n,i,s,o){let a=this.prepareExternalUrl(s+xs(o));this._platformLocation.pushState(n,i,a)}replaceState(n,i,s,o){let a=this.prepareExternalUrl(s+xs(o));this._platformLocation.replaceState(n,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};t.\u0275fac=function(i){return new(i||t)(Re(YE),Re(LR,8))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Mr=(()=>{let t=class t{constructor(n){this._subject=new Rt,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;let i=this._locationStrategy.getBaseHref();this._basePath=VR(jE(HE(i))),this._locationStrategy.onPopState(s=>{this._subject.emit({url:this.path(!0),pop:!0,state:s.state,type:s.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,i=""){return this.path()==this.normalize(n+xs(i))}normalize(n){return t.stripTrailingSlash(BR(this._basePath,HE(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,i="",s=null){this._locationStrategy.pushState(s,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+xs(i)),s)}replaceState(n,i="",s=null){this._locationStrategy.replaceState(s,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+xs(i)),s)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{let i=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",i){this._urlChangeListeners.forEach(s=>s(n,i))}subscribe(n,i,s){return this._subject.subscribe({next:n,error:i,complete:s})}};t.normalizeQueryParams=xs,t.joinWithSlash=ZE,t.stripTrailingSlash=jE,t.\u0275fac=function(i){return new(i||t)(Re(Ao))},t.\u0275prov=Ce({token:t,factory:()=>OR(),providedIn:"root"});let e=t;return e})();function OR(){return new Mr(Re(Ao))}function BR(e,t){if(!e||!t.startsWith(e))return t;let r=t.substring(e.length);return r===""||["/",";","?","#"].includes(r[0])?r:t}function HE(e){return e.replace(/\/index.html$/,"")}function VR(e){if(new RegExp("^(https?:)?//").test(e)){let[,r]=e.split(/\/\/[^\/]+/);return r}return e}var JE={ADP:[void 0,void 0,0],AFN:[void 0,"\u060B",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058F",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20BC"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09F3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xA5","\xA5"],COP:[void 0,"$",2],CRC:[void 0,"\u20A1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010D",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xA3"],ESP:[void 0,"\u20A7",0],EUR:["\u20AC"],FJD:[void 0,"$"],FKP:[void 0,"\xA3"],GBP:["\xA3"],GEL:[void 0,"\u20BE"],GHS:[void 0,"GH\u20B5"],GIP:[void 0,"\xA3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20AA"],INR:["\u20B9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xA5",void 0,0],KHR:[void 0,"\u17DB"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20A9",0],KRW:["\u20A9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20B8"],LAK:[void 0,"\u20AD",0],LBP:[void 0,"L\xA3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20AE",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20A6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20B1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20B2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20BD"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xA3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xA3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xA3",0],THB:[void 0,"\u0E3F"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20BA"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20B4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20AB",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202FCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xA4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]},eb=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(eb||{});var ii={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Ua(e,t){let r=yc(e),n=r[Es.NumberSymbols][t];if(typeof n>"u"){if(t===ii.CurrencyDecimal)return r[Es.NumberSymbols][ii.Decimal];if(t===ii.CurrencyGroup)return r[Es.NumberSymbols][ii.Group]}return n}function UR(e,t){return yc(e)[Es.NumberFormats][t]}function jR(e){return yc(e)[Es.Currencies]}function HR(e,t,r="en"){let n=jR(r)[e]||JE[e]||[],i=n[1];return t==="narrow"&&typeof i=="string"?i:n[0]||e}var qR=2;function GR(e){let t,r=JE[e];return r&&(t=r[2]),typeof t=="number"?t:qR}var zR=/^(\d+)?\.((\d+)(-(\d+))?)?$/,qE=22,wc=".",ja="0",$R=";",KR=",",nm="#",GE="\xA4";function WR(e,t,r,n,i,s,o=!1){let a="",l=!1;if(!isFinite(e))a=Ua(r,ii.Infinity);else{let u=XR(e);o&&(u=ZR(u));let c=t.minInt,f=t.minFrac,h=t.maxFrac;if(s){let C=s.match(zR);if(C===null)throw new Error(`${s} is not a valid digit info`);let y=C[1],E=C[3],I=C[5];y!=null&&(c=im(y)),E!=null&&(f=im(E)),I!=null?h=im(I):E!=null&&f>h&&(h=f)}JR(u,f,h);let p=u.digits,d=u.integerLen,m=u.exponent,b=[];for(l=p.every(C=>!C);d<c;d++)p.unshift(0);for(;d<0;d++)p.unshift(0);d>0?b=p.splice(d,p.length):(b=p,p=[0]);let g=[];for(p.length>=t.lgSize&&g.unshift(p.splice(-t.lgSize,p.length).join(""));p.length>t.gSize;)g.unshift(p.splice(-t.gSize,p.length).join(""));p.length&&g.unshift(p.join("")),a=g.join(Ua(r,n)),b.length&&(a+=Ua(r,i)+b.join("")),m&&(a+=Ua(r,ii.Exponential)+"+"+m)}return e<0&&!l?a=t.negPre+a+t.negSuf:a=t.posPre+a+t.posSuf,a}function QR(e,t,r,n,i){let s=UR(t,eb.Currency),o=YR(s,Ua(t,ii.MinusSign));return o.minFrac=GR(n),o.maxFrac=o.minFrac,WR(e,o,t,ii.CurrencyGroup,ii.CurrencyDecimal,i).replace(GE,r).replace(GE,"").trim()}function YR(e,t="-"){let r={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=e.split($R),i=n[0],s=n[1],o=i.indexOf(wc)!==-1?i.split(wc):[i.substring(0,i.lastIndexOf(ja)+1),i.substring(i.lastIndexOf(ja)+1)],a=o[0],l=o[1]||"";r.posPre=a.substring(0,a.indexOf(nm));for(let c=0;c<l.length;c++){let f=l.charAt(c);f===ja?r.minFrac=r.maxFrac=c+1:f===nm?r.maxFrac=c+1:r.posSuf+=f}let u=a.split(KR);if(r.gSize=u[1]?u[1].length:0,r.lgSize=u[2]||u[1]?(u[2]||u[1]).length:0,s){let c=i.length-r.posPre.length-r.posSuf.length,f=s.indexOf(nm);r.negPre=s.substring(0,f).replace(/'/g,""),r.negSuf=s.slice(f+c).replace(/'/g,"")}else r.negPre=t+r.posPre,r.negSuf=r.posSuf;return r}function ZR(e){if(e.digits[0]===0)return e;let t=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(t===0?e.digits.push(0,0):t===1&&e.digits.push(0),e.integerLen+=2),e}function XR(e){let t=Math.abs(e)+"",r=0,n,i,s,o,a;for((i=t.indexOf(wc))>-1&&(t=t.replace(wc,"")),(s=t.search(/e/i))>0?(i<0&&(i=s),i+=+t.slice(s+1),t=t.substring(0,s)):i<0&&(i=t.length),s=0;t.charAt(s)===ja;s++);if(s===(a=t.length))n=[0],i=1;else{for(a--;t.charAt(a)===ja;)a--;for(i-=s,n=[],o=0;s<=a;s++,o++)n[o]=Number(t.charAt(s))}return i>qE&&(n=n.splice(0,qE-1),r=i-1,i=1),{digits:n,exponent:r,integerLen:i}}function JR(e,t,r){if(t>r)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${r}).`);let n=e.digits,i=n.length-e.integerLen,s=Math.min(Math.max(t,i),r),o=s+e.integerLen,a=n[o];if(o>0){n.splice(Math.max(e.integerLen,o));for(let f=o;f<n.length;f++)n[f]=0}else{i=Math.max(0,i),e.integerLen=1,n.length=Math.max(1,o=s+1),n[0]=0;for(let f=1;f<o;f++)n[f]=0}if(a>=5)if(o-1<0){for(let f=0;f>o;f--)n.unshift(0),e.integerLen++;n.unshift(1),e.integerLen++}else n[o-1]++;for(;i<Math.max(0,s);i++)n.push(0);let l=s!==0,u=t+e.integerLen,c=n.reduceRight(function(f,h,p,d){return h=h+f,d[p]=h<10?h:h-10,l&&(d[p]===0&&p>=u?d.pop():l=!1),h>=10?1:0},0);c&&(n.unshift(c),e.integerLen++)}function im(e){let t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}function Tc(e,t){t=encodeURIComponent(t);for(let r of e.split(";")){let n=r.indexOf("="),[i,s]=n==-1?[r,""]:[r.slice(0,n),r.slice(n+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var sm=/\s+/,zE=[],tb=(()=>{let t=class t{constructor(n,i){this._ngEl=n,this._renderer=i,this.initialClasses=zE,this.stateMap=new Map}set klass(n){this.initialClasses=n!=null?n.trim().split(sm):zE}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(sm):n}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let i of n)this._updateState(i,!0);else if(n!=null)for(let i of Object.keys(n))this._updateState(i,!!n[i]);this._applyStateDiff()}_updateState(n,i){let s=this.stateMap.get(n);s!==void 0?(s.enabled!==i&&(s.changed=!0,s.enabled=i),s.touched=!0):this.stateMap.set(n,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let i=n[0],s=n[1];s.changed?(this._toggleClass(i,s.enabled),s.changed=!1):s.touched||(s.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),s.touched=!1}}_toggleClass(n,i){n=n.trim(),n.length>0&&n.split(sm).forEach(s=>{i?this._renderer.addClass(this._ngEl.nativeElement,s):this._renderer.removeClass(this._ngEl.nativeElement,s)})}};t.\u0275fac=function(i){return new(i||t)(Ee(Sr),Ee(ln))},t.\u0275dir=Lt({type:t,selectors:[["","ngClass",""]],inputs:{klass:[kt.None,"class","klass"],ngClass:"ngClass"},standalone:!0});let e=t;return e})();var om=class{constructor(t,r,n,i){this.$implicit=t,this.ngForOf=r,this.index=n,this.count=i}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},_c=(()=>{let t=class t{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,i,s){this._viewContainer=n,this._template=i,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let n=this._ngForOf;if(!this._differ&&n)if(0)try{}catch{}else this._differ=this._differs.find(n).create(this.ngForTrackBy)}if(this._differ){let n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){let i=this._viewContainer;n.forEachOperation((s,o,a)=>{if(s.previousIndex==null)i.createEmbeddedView(this._template,new om(s.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)i.remove(o===null?void 0:o);else if(o!==null){let l=i.get(o);i.move(l,a),$E(l,s)}});for(let s=0,o=i.length;s<o;s++){let l=i.get(s).context;l.index=s,l.count=o,l.ngForOf=this._ngForOf}n.forEachIdentityChange(s=>{let o=i.get(s.currentIndex);$E(o,s)})}static ngTemplateContextGuard(n,i){return!0}};t.\u0275fac=function(i){return new(i||t)(Ee(Ii),Ee(gs),Ee(tm))},t.\u0275dir=Lt({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let e=t;return e})();function $E(e,t){e.context.$implicit=t.item}var Dc=(()=>{let t=class t{constructor(n,i){this._viewContainer=n,this._context=new am,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){KE("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){KE("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,i){return!0}};t.\u0275fac=function(i){return new(i||t)(Ee(Ii),Ee(gs))},t.\u0275dir=Lt({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let e=t;return e})(),am=class{constructor(){this.$implicit=null,this.ngIf=null}};function KE(e,t){if(!!!(!t||t.createEmbeddedView))throw new Error(`${e} must be a TemplateRef, but received '${fr(t)}'.`)}var Ac=(()=>{let t=class t{constructor(n,i,s){this._ngEl=n,this._differs=i,this._renderer=s,this._ngStyle=null,this._differ=null}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,i){let[s,o]=n.split("."),a=s.indexOf("-")===-1?void 0:wn.DashCase;i!=null?this._renderer.setStyle(this._ngEl.nativeElement,s,o?`${i}${o}`:i,a):this._renderer.removeStyle(this._ngEl.nativeElement,s,a)}_applyChanges(n){n.forEachRemovedItem(i=>this._setStyle(i.key,null)),n.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),n.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}};t.\u0275fac=function(i){return new(i||t)(Ee(Sr),Ee(rm),Ee(ln))},t.\u0275dir=Lt({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});let e=t;return e})();function ek(e,t){return new ve(2100,!1)}var Mo=(()=>{let t=class t{constructor(n,i="USD"){this._locale=n,this._defaultCurrencyCode=i}transform(n,i=this._defaultCurrencyCode,s="symbol",o,a){if(!tk(n))return null;a||=this._locale,typeof s=="boolean"&&(s=s?"symbol":"code");let l=i||this._defaultCurrencyCode;s!=="code"&&(s==="symbol"||s==="symbol-narrow"?l=HR(l,s==="symbol"?"wide":"narrow",a):l=s);try{let u=rk(n);return QR(u,a,l,i,o)}catch(u){throw ek(t,u.message)}}};t.\u0275fac=function(i){return new(i||t)(Ee(xc,16),Ee(BE,16))},t.\u0275pipe=EC({name:"currency",type:t,pure:!0,standalone:!0});let e=t;return e})();function tk(e){return!(e==null||e===""||e!==e)}function rk(e){if(typeof e=="string"&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!="number")throw new Error(`${e} is not a number`);return e}var um=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=sn({type:t}),t.\u0275inj=nn({});let e=t;return e})(),cm="browser",nk="server";function rb(e){return e===cm}function Mc(e){return e===nk}var Do=class{};var Ga=class{},Nc=class{},Is=class e{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
`).forEach(r=>{let n=r.indexOf(":");if(n>0){let i=r.slice(0,n),s=i.toLowerCase(),o=r.slice(n+1).trim();this.maybeSetNormalizedName(i,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((r,n)=>{this.setHeaderEntries(n,r)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([r,n])=>{this.setHeaderEntries(r,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let r=this.headers.get(t.toLowerCase());return r&&r.length>0?r[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,r){return this.clone({name:t,value:r,op:"a"})}set(t,r){return this.clone({name:t,value:r,op:"s"})}delete(t,r){return this.clone({name:t,value:r,op:"d"})}maybeSetNormalizedName(t,r){this.normalizedNames.has(r)||this.normalizedNames.set(r,t)}init(){this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(r=>{this.headers.set(r,t.headers.get(r)),this.normalizedNames.set(r,t.normalizedNames.get(r))})}clone(t){let r=new e;return r.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,r.lazyUpdate=(this.lazyUpdate||[]).concat([t]),r}applyUpdate(t){let r=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,r);let i=(t.op==="a"?this.headers.get(r):void 0)||[];i.push(...n),this.headers.set(r,i);break;case"d":let s=t.value;if(!s)this.headers.delete(r),this.normalizedNames.delete(r);else{let o=this.headers.get(r);if(!o)return;o=o.filter(a=>s.indexOf(a)===-1),o.length===0?(this.headers.delete(r),this.normalizedNames.delete(r)):this.headers.set(r,o)}break}}setHeaderEntries(t,r){let n=(Array.isArray(r)?r:[r]).map(s=>s.toString()),i=t.toLowerCase();this.headers.set(i,n),this.maybeSetNormalizedName(t,i)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(r=>t(this.normalizedNames.get(r),this.headers.get(r)))}};var hm=class{encodeKey(t){return nb(t)}encodeValue(t){return nb(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function ik(e,t){let r=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(i=>{let s=i.indexOf("="),[o,a]=s==-1?[t.decodeKey(i),""]:[t.decodeKey(i.slice(0,s)),t.decodeValue(i.slice(s+1))],l=r.get(o)||[];l.push(a),r.set(o,l)}),r}var sk=/%(\d[a-f0-9])/gi,ok={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function nb(e){return encodeURIComponent(e).replace(sk,(t,r)=>ok[r]??t)}function Pc(e){return`${e}`}var _i=class e{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new hm,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=ik(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(r=>{let n=t.fromObject[r],i=Array.isArray(n)?n.map(Pc):[Pc(n)];this.map.set(r,i)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let r=this.map.get(t);return r?r[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,r){return this.clone({param:t,value:r,op:"a"})}appendAll(t){let r=[];return Object.keys(t).forEach(n=>{let i=t[n];Array.isArray(i)?i.forEach(s=>{r.push({param:n,value:s,op:"a"})}):r.push({param:n,value:i,op:"a"})}),this.clone(r)}set(t,r){return this.clone({param:t,value:r,op:"s"})}delete(t,r){return this.clone({param:t,value:r,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let r=this.encoder.encodeKey(t);return this.map.get(t).map(n=>r+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let r=new e({encoder:this.encoder});return r.cloneFrom=this.cloneFrom||this,r.updates=(this.updates||[]).concat(t),r}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let r=(t.op==="a"?this.map.get(t.param):void 0)||[];r.push(Pc(t.value)),this.map.set(t.param,r);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],i=n.indexOf(Pc(t.value));i!==-1&&n.splice(i,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var dm=class{constructor(){this.map=new Map}set(t,r){return this.map.set(t,r),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function ak(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function ib(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function sb(e){return typeof Blob<"u"&&e instanceof Blob}function ab(e){return typeof FormData<"u"&&e instanceof FormData}function lk(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}var qa=class e{constructor(t,r,n,i){this.url=r,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase();let s;if(ak(this.method)||i?(this.body=n!==void 0?n:null,s=i):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),this.transferCache=s.transferCache),this.headers??=new Is,this.context??=new dm,!this.params)this.params=new _i,this.urlWithParams=r;else{let o=this.params.toString();if(o.length===0)this.urlWithParams=r;else{let a=r.indexOf("?"),l=a===-1?"?":a<r.length-1?"&":"";this.urlWithParams=r+l+o}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||ib(this.body)||sb(this.body)||ab(this.body)||lk(this.body)?this.body:this.body instanceof _i?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||ab(this.body)?null:sb(this.body)?this.body.type||null:ib(this.body)?null:typeof this.body=="string"?"text/plain":this.body instanceof _i?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?"application/json":null}clone(t={}){let r=t.method||this.method,n=t.url||this.url,i=t.responseType||this.responseType,s=t.transferCache??this.transferCache,o=t.body!==void 0?t.body:this.body,a=t.withCredentials??this.withCredentials,l=t.reportProgress??this.reportProgress,u=t.headers||this.headers,c=t.params||this.params,f=t.context??this.context;return t.setHeaders!==void 0&&(u=Object.keys(t.setHeaders).reduce((h,p)=>h.set(p,t.setHeaders[p]),u)),t.setParams&&(c=Object.keys(t.setParams).reduce((h,p)=>h.set(p,t.setParams[p]),c)),new e(r,n,o,{params:c,headers:u,context:f,reportProgress:l,responseType:i,withCredentials:a,transferCache:s})}},Po=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(Po||{}),za=class{constructor(t,r=Fc.Ok,n="OK"){this.headers=t.headers||new Is,this.status=t.status!==void 0?t.status:r,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},pm=class e extends za{constructor(t={}){super(t),this.type=Po.ResponseHeader}clone(t={}){return new e({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},Rc=class e extends za{constructor(t={}){super(t),this.type=Po.Response,this.body=t.body!==void 0?t.body:null}clone(t={}){return new e({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},kc=class extends za{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},Fc=function(e){return e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints",e[e.Ok=200]="Ok",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.ImUsed=226]="ImUsed",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.Unused=306]="Unused",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.UriTooLong=414]="UriTooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.ImATeapot=418]="ImATeapot",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.TooEarly=425]="TooEarly",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HttpVersionNotSupported=505]="HttpVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",e}(Fc||{});function fm(e,t){return{body:t,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}var mm=(()=>{let t=class t{constructor(n){this.handler=n}request(n,i,s={}){let o;if(n instanceof qa)o=n;else{let u;s.headers instanceof Is?u=s.headers:u=new Is(s.headers);let c;s.params&&(s.params instanceof _i?c=s.params:c=new _i({fromObject:s.params})),o=new qa(n,i,s.body!==void 0?s.body:null,{headers:u,context:s.context,params:c,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}let a=_e(o).pipe(pi(u=>this.handler.handle(u)));if(n instanceof qa||s.observe==="events")return a;let l=a.pipe(lr(u=>u instanceof Rc));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return l.pipe(Ae(u=>{if(u.body!==null&&!(u.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return u.body}));case"blob":return l.pipe(Ae(u=>{if(u.body!==null&&!(u.body instanceof Blob))throw new Error("Response is not a Blob.");return u.body}));case"text":return l.pipe(Ae(u=>{if(u.body!==null&&typeof u.body!="string")throw new Error("Response is not a string.");return u.body}));case"json":default:return l.pipe(Ae(u=>u.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}delete(n,i={}){return this.request("DELETE",n,i)}get(n,i={}){return this.request("GET",n,i)}head(n,i={}){return this.request("HEAD",n,i)}jsonp(n,i){return this.request("JSONP",n,{params:new _i().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,i={}){return this.request("OPTIONS",n,i)}patch(n,i,s={}){return this.request("PATCH",n,fm(s,i))}post(n,i,s={}){return this.request("POST",n,fm(s,i))}put(n,i,s={}){return this.request("PUT",n,fm(s,i))}};t.\u0275fac=function(i){return new(i||t)(Re(Ga))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac});let e=t;return e})();function uk(e,t){return t(e)}function ck(e,t,r){return(n,i)=>Zn(r,()=>t(n,s=>e(s,i)))}var gm=new De(""),fk=new De(""),hk=new De("");var lb=(()=>{let t=class t extends Ga{constructor(n,i){super(),this.backend=n,this.injector=i,this.chain=null,this.pendingTasks=re(So);let s=re(hk,{optional:!0});this.backend=s??n}handle(n){if(this.chain===null){let s=Array.from(new Set([...this.injector.get(gm),...this.injector.get(fk,[])]));this.chain=s.reduceRight((o,a)=>ck(o,a,this.injector),uk)}let i=this.pendingTasks.add();return this.chain(n,s=>this.backend.handle(s)).pipe(ns(()=>this.pendingTasks.remove(i)))}};t.\u0275fac=function(i){return new(i||t)(Re(Nc),Re(Er))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac});let e=t;return e})();var dk=/^\)\]\}',?\n/;function pk(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}var ub=(()=>{let t=class t{constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new ve(-2800,!1);let i=this.xhrFactory;return(i.\u0275loadImpl?Tt(i.\u0275loadImpl()):_e(null)).pipe(jt(()=>new je(o=>{let a=i.build();if(a.open(n.method,n.urlWithParams),n.withCredentials&&(a.withCredentials=!0),n.headers.forEach((b,g)=>a.setRequestHeader(b,g.join(","))),n.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let b=n.detectContentTypeHeader();b!==null&&a.setRequestHeader("Content-Type",b)}if(n.responseType){let b=n.responseType.toLowerCase();a.responseType=b!=="json"?b:"text"}let l=n.serializeBody(),u=null,c=()=>{if(u!==null)return u;let b=a.statusText||"OK",g=new Is(a.getAllResponseHeaders()),C=pk(a)||n.url;return u=new pm({headers:g,status:a.status,statusText:b,url:C}),u},f=()=>{let{headers:b,status:g,statusText:C,url:y}=c(),E=null;g!==Fc.NoContent&&(E=typeof a.response>"u"?a.responseText:a.response),g===0&&(g=E?Fc.Ok:0);let I=g>=200&&g<300;if(n.responseType==="json"&&typeof E=="string"){let T=E;E=E.replace(dk,"");try{E=E!==""?JSON.parse(E):null}catch(R){E=T,I&&(I=!1,E={error:R,text:E})}}I?(o.next(new Rc({body:E,headers:b,status:g,statusText:C,url:y||void 0})),o.complete()):o.error(new kc({error:E,headers:b,status:g,statusText:C,url:y||void 0}))},h=b=>{let{url:g}=c(),C=new kc({error:b,status:a.status||0,statusText:a.statusText||"Unknown Error",url:g||void 0});o.error(C)},p=!1,d=b=>{p||(o.next(c()),p=!0);let g={type:Po.DownloadProgress,loaded:b.loaded};b.lengthComputable&&(g.total=b.total),n.responseType==="text"&&a.responseText&&(g.partialText=a.responseText),o.next(g)},m=b=>{let g={type:Po.UploadProgress,loaded:b.loaded};b.lengthComputable&&(g.total=b.total),o.next(g)};return a.addEventListener("load",f),a.addEventListener("error",h),a.addEventListener("timeout",h),a.addEventListener("abort",h),n.reportProgress&&(a.addEventListener("progress",d),l!==null&&a.upload&&a.upload.addEventListener("progress",m)),a.send(l),o.next({type:Po.Sent}),()=>{a.removeEventListener("error",h),a.removeEventListener("abort",h),a.removeEventListener("load",f),a.removeEventListener("timeout",h),n.reportProgress&&(a.removeEventListener("progress",d),l!==null&&a.upload&&a.upload.removeEventListener("progress",m)),a.readyState!==a.DONE&&a.abort()}})))}};t.\u0275fac=function(i){return new(i||t)(Re(Do))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac});let e=t;return e})(),hb=new De(""),mk="XSRF-TOKEN",gk=new De("",{providedIn:"root",factory:()=>mk}),vk="X-XSRF-TOKEN",yk=new De("",{providedIn:"root",factory:()=>vk}),Lc=class{},Ck=(()=>{let t=class t{constructor(n,i,s){this.doc=n,this.platform=i,this.cookieName=s,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=Tc(n,this.cookieName),this.lastCookieString=n),this.lastToken}};t.\u0275fac=function(i){return new(i||t)(Re(hr),Re(Tn),Re(gk))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac});let e=t;return e})();function Ek(e,t){let r=e.url.toLowerCase();if(!re(hb)||e.method==="GET"||e.method==="HEAD"||r.startsWith("http://")||r.startsWith("https://"))return t(e);let n=re(Lc).getToken(),i=re(yk);return n!=null&&!e.headers.has(i)&&(e=e.clone({headers:e.headers.set(i,n)})),t(e)}var db=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(db||{});function bk(e,t){return{\u0275kind:e,\u0275providers:t}}function pb(...e){let t=[mm,ub,lb,{provide:Ga,useExisting:lb},{provide:Nc,useExisting:ub},{provide:gm,useValue:Ek,multi:!0},{provide:hb,useValue:!0},{provide:Lc,useClass:Ck}];for(let r of e)t.push(...r.\u0275providers);return vo(t)}function mb(e){return bk(db.Interceptors,e.map(t=>({provide:gm,useValue:t,multi:!0})))}var Cm=class extends Ic{constructor(){super(...arguments),this.supportsDOMEvents=!0}},Em=class e extends Cm{static makeCurrent(){QE(new e)}onAndCancel(t,r,n){return t.addEventListener(r,n),()=>{t.removeEventListener(r,n)}}dispatchEvent(t,r){t.dispatchEvent(r)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,r){return r=r||this.getDefaultDocument(),r.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,r){return r==="window"?window:r==="document"?t:r==="body"?t.body:null}getBaseHref(t){let r=Sk();return r==null?null:xk(r)}resetBaseElement(){$a=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Tc(document.cookie,t)}},$a=null;function Sk(){return $a=$a||document.querySelector("base"),$a?$a.getAttribute("href"):null}function xk(e){return new URL(e,document.baseURI).pathname}var Ik=(()=>{let t=class t{build(){return new XMLHttpRequest}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac});let e=t;return e})(),bm=new De(""),Cb=(()=>{let t=class t{constructor(n,i){this._zone=i,this._eventNameToPlugin=new Map,n.forEach(s=>{s.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,i,s){return this._findPluginFor(i).addEventListener(n,i,s)}getZone(){return this._zone}_findPluginFor(n){let i=this._eventNameToPlugin.get(n);if(i)return i;if(i=this._plugins.find(o=>o.supports(n)),!i)throw new ve(5101,!1);return this._eventNameToPlugin.set(n,i),i}};t.\u0275fac=function(i){return new(i||t)(Re(bm),Re(_t))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac});let e=t;return e})(),Oc=class{constructor(t){this._doc=t}},vm="ng-app-id",Eb=(()=>{let t=class t{constructor(n,i,s,o={}){this.doc=n,this.appId=i,this.nonce=s,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Mc(o),this.resetHostNodes()}addStyles(n){for(let i of n)this.changeUsageCount(i,1)===1&&this.onStyleAdded(i)}removeStyles(n){for(let i of n)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(i=>i.remove()),n.clear());for(let i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let i of this.getAllStyles())this.addStyleToHost(n,i)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let i of this.hostNodes)this.addStyleToHost(i,n)}onStyleRemoved(n){let i=this.styleRef;i.get(n)?.elements?.forEach(s=>s.remove()),i.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${vm}="${this.appId}"]`);if(n?.length){let i=new Map;return n.forEach(s=>{s.textContent!=null&&i.set(s.textContent,s)}),i}return null}changeUsageCount(n,i){let s=this.styleRef;if(s.has(n)){let o=s.get(n);return o.usage+=i,o.usage}return s.set(n,{usage:i,elements:[]}),i}getStyleElement(n,i){let s=this.styleNodesInDOM,o=s?.get(i);if(o?.parentNode===n)return s.delete(i),o.removeAttribute(vm),o;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=i,this.platformIsServer&&a.setAttribute(vm,this.appId),n.appendChild(a),a}}addStyleToHost(n,i){let s=this.getStyleElement(n,i),o=this.styleRef,a=o.get(i)?.elements;a?a.push(s):o.set(i,{elements:[s],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};t.\u0275fac=function(i){return new(i||t)(Re(hr),Re(Rp),Re(Fp,8),Re(Tn))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac});let e=t;return e})(),ym={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},xm=/%COMP%/g,bb="%COMP%",wk=`_nghost-${bb}`,Tk=`_ngcontent-${bb}`,_k=!0,Dk=new De("",{providedIn:"root",factory:()=>_k});function Ak(e){return Tk.replace(xm,e)}function Mk(e){return wk.replace(xm,e)}function Sb(e,t){return t.map(r=>r.replace(xm,e))}var gb=(()=>{let t=class t{constructor(n,i,s,o,a,l,u,c=null){this.eventManager=n,this.sharedStylesHost=i,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=a,this.platformId=l,this.ngZone=u,this.nonce=c,this.rendererByCompId=new Map,this.platformIsServer=Mc(l),this.defaultRenderer=new Ka(n,a,u,this.platformIsServer)}createRenderer(n,i){if(!n||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===En.ShadowDom&&(i=at(me({},i),{encapsulation:En.Emulated}));let s=this.getOrCreateRenderer(n,i);return s instanceof Bc?s.applyToHost(n):s instanceof Wa&&s.applyStyles(),s}getOrCreateRenderer(n,i){let s=this.rendererByCompId,o=s.get(i.id);if(!o){let a=this.doc,l=this.ngZone,u=this.eventManager,c=this.sharedStylesHost,f=this.removeStylesOnCompDestroy,h=this.platformIsServer;switch(i.encapsulation){case En.Emulated:o=new Bc(u,c,i,this.appId,f,a,l,h);break;case En.ShadowDom:return new Sm(u,c,n,i,a,l,this.nonce,h);default:o=new Wa(u,c,i,f,a,l,h);break}s.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}};t.\u0275fac=function(i){return new(i||t)(Re(Cb),Re(Eb),Re(Rp),Re(Dk),Re(hr),Re(Tn),Re(_t),Re(Fp))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac});let e=t;return e})(),Ka=class{constructor(t,r,n,i){this.eventManager=t,this.doc=r,this.ngZone=n,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,r){return r?this.doc.createElementNS(ym[r]||r,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,r){(vb(t)?t.content:t).appendChild(r)}insertBefore(t,r,n){t&&(vb(t)?t.content:t).insertBefore(r,n)}removeChild(t,r){t&&t.removeChild(r)}selectRootElement(t,r){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new ve(-5104,!1);return r||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,r,n,i){if(i){r=i+":"+r;let s=ym[i];s?t.setAttributeNS(s,r,n):t.setAttribute(r,n)}else t.setAttribute(r,n)}removeAttribute(t,r,n){if(n){let i=ym[n];i?t.removeAttributeNS(i,r):t.removeAttribute(`${n}:${r}`)}else t.removeAttribute(r)}addClass(t,r){t.classList.add(r)}removeClass(t,r){t.classList.remove(r)}setStyle(t,r,n,i){i&(wn.DashCase|wn.Important)?t.style.setProperty(r,n,i&wn.Important?"important":""):t.style[r]=n}removeStyle(t,r,n){n&wn.DashCase?t.style.removeProperty(r):t.style[r]=""}setProperty(t,r,n){t!=null&&(t[r]=n)}setValue(t,r){t.nodeValue=r}listen(t,r,n){if(typeof t=="string"&&(t=si().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${r}`);return this.eventManager.addEventListener(t,r,this.decoratePreventDefault(n))}decoratePreventDefault(t){return r=>{if(r==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(r)):t(r))===!1&&r.preventDefault()}}};function vb(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Sm=class extends Ka{constructor(t,r,n,i,s,o,a,l){super(t,s,o,l),this.sharedStylesHost=r,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=Sb(i.id,i.styles);for(let c of u){let f=document.createElement("style");a&&f.setAttribute("nonce",a),f.textContent=c,this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,r){return super.appendChild(this.nodeOrShadowRoot(t),r)}insertBefore(t,r,n){return super.insertBefore(this.nodeOrShadowRoot(t),r,n)}removeChild(t,r){return super.removeChild(this.nodeOrShadowRoot(t),r)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Wa=class extends Ka{constructor(t,r,n,i,s,o,a,l){super(t,s,o,a),this.sharedStylesHost=r,this.removeStylesOnCompDestroy=i,this.styles=l?Sb(l,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},Bc=class extends Wa{constructor(t,r,n,i,s,o,a,l){let u=i+"-"+n.id;super(t,r,n,s,o,a,l,u),this.contentAttr=Ak(u),this.hostAttr=Mk(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,r){let n=super.createElement(t,r);return super.setAttribute(n,this.contentAttr,""),n}},Pk=(()=>{let t=class t extends Oc{constructor(n){super(n)}supports(n){return!0}addEventListener(n,i,s){return n.addEventListener(i,s,!1),()=>this.removeEventListener(n,i,s)}removeEventListener(n,i,s){return n.removeEventListener(i,s)}};t.\u0275fac=function(i){return new(i||t)(Re(hr))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac});let e=t;return e})(),yb=["alt","control","meta","shift"],Nk={"\b":"Backspace","	":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Rk={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},kk=(()=>{let t=class t extends Oc{constructor(n){super(n)}supports(n){return t.parseEventName(n)!=null}addEventListener(n,i,s){let o=t.parseEventName(i),a=t.eventCallback(o.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>si().onAndCancel(n,o.domEventName,a))}static parseEventName(n){let i=n.toLowerCase().split("."),s=i.shift();if(i.length===0||!(s==="keydown"||s==="keyup"))return null;let o=t._normalizeKey(i.pop()),a="",l=i.indexOf("code");if(l>-1&&(i.splice(l,1),a="code."),yb.forEach(c=>{let f=i.indexOf(c);f>-1&&(i.splice(f,1),a+=c+".")}),a+=o,i.length!=0||o.length===0)return null;let u={};return u.domEventName=s,u.fullKey=a,u}static matchEventFullKeyCode(n,i){let s=Nk[n.key]||n.key,o="";return i.indexOf("code.")>-1&&(s=n.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),yb.forEach(a=>{if(a!==s){let l=Rk[a];l(n)&&(o+=a+".")}}),o+=s,o===i)}static eventCallback(n,i,s){return o=>{t.matchEventFullKeyCode(o,n)&&s.runGuarded(()=>i(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}};t.\u0275fac=function(i){return new(i||t)(Re(hr))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac});let e=t;return e})();function xb(e,t){return UE(me({rootComponent:e},Fk(t)))}function Fk(e){return{appProviders:[...Uk,...e?.providers??[]],platformProviders:Vk}}function Lk(){Em.makeCurrent()}function Ok(){return new Wn}function Bk(){return S1(document),document}var Vk=[{provide:Tn,useValue:cm},{provide:kp,useValue:Lk,multi:!0},{provide:hr,useFactory:Bk,deps:[]}];var Uk=[{provide:nc,useValue:"root"},{provide:Wn,useFactory:Ok,deps:[]},{provide:bm,useClass:Pk,multi:!0,deps:[hr,_t,Tn]},{provide:bm,useClass:kk,multi:!0,deps:[hr]},gb,Eb,Cb,{provide:Da,useExisting:gb},{provide:Do,useClass:Ik,deps:[]},[]];var Ib=(()=>{let t=class t{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};t.\u0275fac=function(i){return new(i||t)(Re(hr))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Im=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:function(i){let s=null;return i?s=new(i||t):s=Re(jk),s},providedIn:"root"});let e=t;return e})(),jk=(()=>{let t=class t extends Im{constructor(n){super(),this._doc=n}sanitize(n,i){if(i==null)return null;switch(n){case _n.NONE:return i;case _n.HTML:return xi(i,"HTML")?an(i):k1(this._doc,String(i)).toString();case _n.STYLE:return xi(i,"Style")?an(i):i;case _n.SCRIPT:if(xi(i,"Script"))return an(i);throw new ve(5200,!1);case _n.URL:return xi(i,"URL")?an(i):uc(String(i));case _n.RESOURCE_URL:if(xi(i,"ResourceURL"))return an(i);throw new ve(5201,!1);default:throw new ve(5202,!1)}}bypassSecurityTrustHtml(n){return I1(n)}bypassSecurityTrustStyle(n){return w1(n)}bypassSecurityTrustScript(n){return T1(n)}bypassSecurityTrustUrl(n){return _1(n)}bypassSecurityTrustResourceUrl(n){return D1(n)}};t.\u0275fac=function(i){return new(i||t)(Re(hr))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Ve="primary",ul=Symbol("RouteTitle"),Am=class{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let r=this.params[t];return Array.isArray(r)?r[0]:r}return null}getAll(t){if(this.has(t)){let r=this.params[t];return Array.isArray(r)?r:[r]}return[]}get keys(){return Object.keys(this.params)}};function Lo(e){return new Am(e)}function Hk(e,t,r){let n=r.path.split("/");if(n.length>e.length||r.pathMatch==="full"&&(t.hasChildren()||n.length<e.length))return null;let i={};for(let s=0;s<n.length;s++){let o=n[s],a=e[s];if(o.startsWith(":"))i[o.substring(1)]=a;else if(o!==a.path)return null}return{consumed:e.slice(0,n.length),posParams:i}}function qk(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!Dn(e[r],t[r]))return!1;return!0}function Dn(e,t){let r=e?Mm(e):void 0,n=t?Mm(t):void 0;if(!r||!n||r.length!=n.length)return!1;let i;for(let s=0;s<r.length;s++)if(i=r[s],!Pb(e[i],t[i]))return!1;return!0}function Mm(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e)]}function Pb(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;let r=[...e].sort(),n=[...t].sort();return r.every((i,s)=>n[s]===i)}else return e===t}function Nb(e){return e.length>0?e[e.length-1]:null}function Pi(e){return Lh(e)?e:ni(e)?Tt(Promise.resolve(e)):_e(e)}var Gk={exact:kb,subset:Fb},Rb={exact:zk,subset:$k,ignored:()=>!0};function Tb(e,t,r){return Gk[r.paths](e.root,t.root,r.matrixParams)&&Rb[r.queryParams](e.queryParams,t.queryParams)&&!(r.fragment==="exact"&&e.fragment!==t.fragment)}function zk(e,t){return Dn(e,t)}function kb(e,t,r){if(!Ts(e.segments,t.segments)||!jc(e.segments,t.segments,r)||e.numberOfChildren!==t.numberOfChildren)return!1;for(let n in t.children)if(!e.children[n]||!kb(e.children[n],t.children[n],r))return!1;return!0}function $k(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(r=>Pb(e[r],t[r]))}function Fb(e,t,r){return Lb(e,t,t.segments,r)}function Lb(e,t,r,n){if(e.segments.length>r.length){let i=e.segments.slice(0,r.length);return!(!Ts(i,r)||t.hasChildren()||!jc(i,r,n))}else if(e.segments.length===r.length){if(!Ts(e.segments,r)||!jc(e.segments,r,n))return!1;for(let i in t.children)if(!e.children[i]||!Fb(e.children[i],t.children[i],n))return!1;return!0}else{let i=r.slice(0,e.segments.length),s=r.slice(e.segments.length);return!Ts(e.segments,i)||!jc(e.segments,i,n)||!e.children[Ve]?!1:Lb(e.children[Ve],t,s,n)}}function jc(e,t,r){return t.every((n,i)=>Rb[r](e[i].parameters,n.parameters))}var Di=class{constructor(t=new pt([],{}),r={},n=null){this.root=t,this.queryParams=r,this.fragment=n}get queryParamMap(){return this._queryParamMap??=Lo(this.queryParams),this._queryParamMap}toString(){return Qk.serialize(this)}},pt=class{constructor(t,r){this.segments=t,this.children=r,this.parent=null,Object.values(r).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Hc(this)}},ws=class{constructor(t,r){this.path=t,this.parameters=r}get parameterMap(){return this._parameterMap??=Lo(this.parameters),this._parameterMap}toString(){return Bb(this)}};function Kk(e,t){return Ts(e,t)&&e.every((r,n)=>Dn(r.parameters,t[n].parameters))}function Ts(e,t){return e.length!==t.length?!1:e.every((r,n)=>r.path===t[n].path)}function Wk(e,t){let r=[];return Object.entries(e.children).forEach(([n,i])=>{n===Ve&&(r=r.concat(t(i,n)))}),Object.entries(e.children).forEach(([n,i])=>{n!==Ve&&(r=r.concat(t(i,n)))}),r}var rg=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:()=>new Gc,providedIn:"root"});let e=t;return e})(),Gc=class{parse(t){let r=new Nm(t);return new Di(r.parseRootSegment(),r.parseQueryParams(),r.parseFragment())}serialize(t){let r=`/${Qa(t.root,!0)}`,n=Xk(t.queryParams),i=typeof t.fragment=="string"?`#${Yk(t.fragment)}`:"";return`${r}${n}${i}`}},Qk=new Gc;function Hc(e){return e.segments.map(t=>Bb(t)).join("/")}function Qa(e,t){if(!e.hasChildren())return Hc(e);if(t){let r=e.children[Ve]?Qa(e.children[Ve],!1):"",n=[];return Object.entries(e.children).forEach(([i,s])=>{i!==Ve&&n.push(`${i}:${Qa(s,!1)}`)}),n.length>0?`${r}(${n.join("//")})`:r}else{let r=Wk(e,(n,i)=>i===Ve?[Qa(e.children[Ve],!1)]:[`${i}:${Qa(n,!1)}`]);return Object.keys(e.children).length===1&&e.children[Ve]!=null?`${Hc(e)}/${r[0]}`:`${Hc(e)}/(${r.join("//")})`}}function Ob(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Vc(e){return Ob(e).replace(/%3B/gi,";")}function Yk(e){return encodeURI(e)}function Pm(e){return Ob(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function qc(e){return decodeURIComponent(e)}function _b(e){return qc(e.replace(/\+/g,"%20"))}function Bb(e){return`${Pm(e.path)}${Zk(e.parameters)}`}function Zk(e){return Object.entries(e).map(([t,r])=>`;${Pm(t)}=${Pm(r)}`).join("")}function Xk(e){let t=Object.entries(e).map(([r,n])=>Array.isArray(n)?n.map(i=>`${Vc(r)}=${Vc(i)}`).join("&"):`${Vc(r)}=${Vc(n)}`).filter(r=>r);return t.length?`?${t.join("&")}`:""}var Jk=/^[^\/()?;#]+/;function wm(e){let t=e.match(Jk);return t?t[0]:""}var eF=/^[^\/()?;=#]+/;function tF(e){let t=e.match(eF);return t?t[0]:""}var rF=/^[^=?&#]+/;function nF(e){let t=e.match(rF);return t?t[0]:""}var iF=/^[^&#]+/;function sF(e){let t=e.match(iF);return t?t[0]:""}var Nm=class{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new pt([],{}):new pt([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(r).length>0)&&(n[Ve]=new pt(t,r)),n}parseSegment(){let t=wm(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new ve(4009,!1);return this.capture(t),new ws(qc(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let r=tF(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let i=wm(this.remaining);i&&(n=i,this.capture(n))}t[qc(r)]=qc(n)}parseQueryParam(t){let r=nF(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let o=sF(this.remaining);o&&(n=o,this.capture(n))}let i=_b(r),s=_b(n);if(t.hasOwnProperty(i)){let o=t[i];Array.isArray(o)||(o=[o],t[i]=o),o.push(s)}else t[i]=s}parseParens(t){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=wm(this.remaining),i=this.remaining[n.length];if(i!=="/"&&i!==")"&&i!==";")throw new ve(4010,!1);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=Ve);let o=this.parseChildren();r[s]=Object.keys(o).length===1?o[Ve]:new pt([],o),this.consumeOptional("//")}return r}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new ve(4011,!1)}};function Vb(e){return e.segments.length>0?new pt([],{[Ve]:e}):e}function Ub(e){let t={};for(let[n,i]of Object.entries(e.children)){let s=Ub(i);if(n===Ve&&s.segments.length===0&&s.hasChildren())for(let[o,a]of Object.entries(s.children))t[o]=a;else(s.segments.length>0||s.hasChildren())&&(t[n]=s)}let r=new pt(e.segments,t);return oF(r)}function oF(e){if(e.numberOfChildren===1&&e.children[Ve]){let t=e.children[Ve];return new pt(e.segments.concat(t.segments),t.children)}return e}function Oo(e){return e instanceof Di}function aF(e,t,r=null,n=null){let i=jb(e);return Hb(i,t,r,n)}function jb(e){let t;function r(s){let o={};for(let l of s.children){let u=r(l);o[l.outlet]=u}let a=new pt(s.url,o);return s===e&&(t=a),a}let n=r(e.root),i=Vb(n);return t??i}function Hb(e,t,r,n){let i=e;for(;i.parent;)i=i.parent;if(t.length===0)return Tm(i,i,i,r,n);let s=lF(t);if(s.toRoot())return Tm(i,i,new pt([],{}),r,n);let o=uF(s,i,e),a=o.processChildren?Xa(o.segmentGroup,o.index,s.commands):Gb(o.segmentGroup,o.index,s.commands);return Tm(i,o.segmentGroup,a,r,n)}function zc(e){return typeof e=="object"&&e!=null&&!e.outlets&&!e.segmentPath}function tl(e){return typeof e=="object"&&e!=null&&e.outlets}function Tm(e,t,r,n,i){let s={};n&&Object.entries(n).forEach(([l,u])=>{s[l]=Array.isArray(u)?u.map(c=>`${c}`):`${u}`});let o;e===t?o=r:o=qb(e,t,r);let a=Vb(Ub(o));return new Di(a,s,i)}function qb(e,t,r){let n={};return Object.entries(e.children).forEach(([i,s])=>{s===t?n[i]=r:n[i]=qb(s,t,r)}),new pt(e.segments,n)}var $c=class{constructor(t,r,n){if(this.isAbsolute=t,this.numberOfDoubleDots=r,this.commands=n,t&&n.length>0&&zc(n[0]))throw new ve(4003,!1);let i=n.find(tl);if(i&&i!==Nb(n))throw new ve(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function lF(e){if(typeof e[0]=="string"&&e.length===1&&e[0]==="/")return new $c(!0,0,e);let t=0,r=!1,n=e.reduce((i,s,o)=>{if(typeof s=="object"&&s!=null){if(s.outlets){let a={};return Object.entries(s.outlets).forEach(([l,u])=>{a[l]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(s.segmentPath)return[...i,s.segmentPath]}return typeof s!="string"?[...i,s]:o===0?(s.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?r=!0:a===".."?t++:a!=""&&i.push(a))}),i):[...i,s]},[]);return new $c(r,t,n)}var ko=class{constructor(t,r,n){this.segmentGroup=t,this.processChildren=r,this.index=n}};function uF(e,t,r){if(e.isAbsolute)return new ko(t,!0,0);if(!r)return new ko(t,!1,NaN);if(r.parent===null)return new ko(r,!0,0);let n=zc(e.commands[0])?0:1,i=r.segments.length-1+n;return cF(r,i,e.numberOfDoubleDots)}function cF(e,t,r){let n=e,i=t,s=r;for(;s>i;){if(s-=i,n=n.parent,!n)throw new ve(4005,!1);i=n.segments.length}return new ko(n,!1,i-s)}function fF(e){return tl(e[0])?e[0].outlets:{[Ve]:e}}function Gb(e,t,r){if(e??=new pt([],{}),e.segments.length===0&&e.hasChildren())return Xa(e,t,r);let n=hF(e,t,r),i=r.slice(n.commandIndex);if(n.match&&n.pathIndex<e.segments.length){let s=new pt(e.segments.slice(0,n.pathIndex),{});return s.children[Ve]=new pt(e.segments.slice(n.pathIndex),e.children),Xa(s,0,i)}else return n.match&&i.length===0?new pt(e.segments,{}):n.match&&!e.hasChildren()?Rm(e,t,r):n.match?Xa(e,0,i):Rm(e,t,r)}function Xa(e,t,r){if(r.length===0)return new pt(e.segments,{});{let n=fF(r),i={};if(Object.keys(n).some(s=>s!==Ve)&&e.children[Ve]&&e.numberOfChildren===1&&e.children[Ve].segments.length===0){let s=Xa(e.children[Ve],t,r);return new pt(e.segments,s.children)}return Object.entries(n).forEach(([s,o])=>{typeof o=="string"&&(o=[o]),o!==null&&(i[s]=Gb(e.children[s],t,o))}),Object.entries(e.children).forEach(([s,o])=>{n[s]===void 0&&(i[s]=o)}),new pt(e.segments,i)}}function hF(e,t,r){let n=0,i=t,s={match:!1,pathIndex:0,commandIndex:0};for(;i<e.segments.length;){if(n>=r.length)return s;let o=e.segments[i],a=r[n];if(tl(a))break;let l=`${a}`,u=n<r.length-1?r[n+1]:null;if(i>0&&l===void 0)break;if(l&&u&&typeof u=="object"&&u.outlets===void 0){if(!Ab(l,u,o))return s;n+=2}else{if(!Ab(l,{},o))return s;n++}i++}return{match:!0,pathIndex:i,commandIndex:n}}function Rm(e,t,r){let n=e.segments.slice(0,t),i=0;for(;i<r.length;){let s=r[i];if(tl(s)){let l=dF(s.outlets);return new pt(n,l)}if(i===0&&zc(r[0])){let l=e.segments[t];n.push(new ws(l.path,Db(r[0]))),i++;continue}let o=tl(s)?s.outlets[Ve]:`${s}`,a=i<r.length-1?r[i+1]:null;o&&a&&zc(a)?(n.push(new ws(o,Db(a))),i+=2):(n.push(new ws(o,{})),i++)}return new pt(n,{})}function dF(e){let t={};return Object.entries(e).forEach(([r,n])=>{typeof n=="string"&&(n=[n]),n!==null&&(t[r]=Rm(new pt([],{}),0,n))}),t}function Db(e){let t={};return Object.entries(e).forEach(([r,n])=>t[r]=`${n}`),t}function Ab(e,t,r){return e==r.path&&Dn(t,r.parameters)}var Ja="imperative",tr=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(tr||{}),jr=class{constructor(t,r){this.id=t,this.url=r}},rl=class extends jr{constructor(t,r,n="imperative",i=null){super(t,r),this.type=tr.NavigationStart,this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Ai=class extends jr{constructor(t,r,n){super(t,r),this.urlAfterRedirects=n,this.type=tr.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Nr=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(Nr||{}),km=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(km||{}),Mi=class extends jr{constructor(t,r,n,i){super(t,r),this.reason=n,this.code=i,this.type=tr.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},_s=class extends jr{constructor(t,r,n,i){super(t,r),this.reason=n,this.code=i,this.type=tr.NavigationSkipped}},nl=class extends jr{constructor(t,r,n,i){super(t,r),this.error=n,this.target=i,this.type=tr.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Kc=class extends jr{constructor(t,r,n,i){super(t,r),this.urlAfterRedirects=n,this.state=i,this.type=tr.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Fm=class extends jr{constructor(t,r,n,i){super(t,r),this.urlAfterRedirects=n,this.state=i,this.type=tr.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Lm=class extends jr{constructor(t,r,n,i,s){super(t,r),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=s,this.type=tr.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Om=class extends jr{constructor(t,r,n,i){super(t,r),this.urlAfterRedirects=n,this.state=i,this.type=tr.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Bm=class extends jr{constructor(t,r,n,i){super(t,r),this.urlAfterRedirects=n,this.state=i,this.type=tr.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Vm=class{constructor(t){this.route=t,this.type=tr.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Um=class{constructor(t){this.route=t,this.type=tr.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},jm=class{constructor(t){this.snapshot=t,this.type=tr.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Hm=class{constructor(t){this.snapshot=t,this.type=tr.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},qm=class{constructor(t){this.snapshot=t,this.type=tr.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Gm=class{constructor(t){this.snapshot=t,this.type=tr.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var il=class{},sl=class{constructor(t){this.url=t}};var zm=class{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new Jc,this.attachRef=null}},Jc=(()=>{let t=class t{constructor(){this.contexts=new Map}onChildOutletCreated(n,i){let s=this.getOrCreateContext(n);s.outlet=i,this.contexts.set(n,s)}onChildOutletDestroyed(n){let i=this.getContext(n);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let i=this.getContext(n);return i||(i=new zm,this.contexts.set(n,i)),i}getContext(n){return this.contexts.get(n)||null}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Wc=class{constructor(t){this._root=t}get root(){return this._root.value}parent(t){let r=this.pathFromRoot(t);return r.length>1?r[r.length-2]:null}children(t){let r=$m(t,this._root);return r?r.children.map(n=>n.value):[]}firstChild(t){let r=$m(t,this._root);return r&&r.children.length>0?r.children[0].value:null}siblings(t){let r=Km(t,this._root);return r.length<2?[]:r[r.length-2].children.map(i=>i.value).filter(i=>i!==t)}pathFromRoot(t){return Km(t,this._root).map(r=>r.value)}};function $m(e,t){if(e===t.value)return t;for(let r of t.children){let n=$m(e,r);if(n)return n}return null}function Km(e,t){if(e===t.value)return[t];for(let r of t.children){let n=Km(e,r);if(n.length)return n.unshift(t),n}return[]}var Pr=class{constructor(t,r){this.value=t,this.children=r}toString(){return`TreeNode(${this.value})`}};function Ro(e){let t={};return e&&e.children.forEach(r=>t[r.value.outlet]=r),t}var Qc=class extends Wc{constructor(t,r){super(t),this.snapshot=r,ig(this,t)}toString(){return this.snapshot.toString()}};function zb(e){let t=pF(e),r=new $t([new ws("",{})]),n=new $t({}),i=new $t({}),s=new $t({}),o=new $t(""),a=new un(r,n,s,o,i,Ve,e,t.root);return a.snapshot=t.root,new Qc(new Pr(a,[]),t)}function pF(e){let t={},r={},n={},i="",s=new ol([],t,n,i,r,Ve,e,null,{});return new Yc("",new Pr(s,[]))}var un=class{constructor(t,r,n,i,s,o,a,l){this.urlSubject=t,this.paramsSubject=r,this.queryParamsSubject=n,this.fragmentSubject=i,this.dataSubject=s,this.outlet=o,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(Ae(u=>u[ul]))??_e(void 0),this.url=t,this.params=r,this.queryParams=n,this.fragment=i,this.data=s}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Ae(t=>Lo(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Ae(t=>Lo(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function ng(e,t,r="emptyOnly"){let n,{routeConfig:i}=e;return t!==null&&(r==="always"||i?.path===""||!t.component&&!t.routeConfig?.loadComponent)?n={params:me(me({},t.params),e.params),data:me(me({},t.data),e.data),resolve:me(me(me(me({},e.data),t.data),i?.data),e._resolvedData)}:n={params:me({},e.params),data:me({},e.data),resolve:me(me({},e.data),e._resolvedData??{})},i&&Kb(i)&&(n.resolve[ul]=i.title),n}var ol=class{get title(){return this.data?.[ul]}constructor(t,r,n,i,s,o,a,l,u){this.url=t,this.params=r,this.queryParams=n,this.fragment=i,this.data=s,this.outlet=o,this.component=a,this.routeConfig=l,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Lo(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Lo(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(n=>n.toString()).join("/"),r=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${r}')`}},Yc=class extends Wc{constructor(t,r){super(r),this.url=t,ig(this,r)}toString(){return $b(this._root)}};function ig(e,t){t.value._routerState=e,t.children.forEach(r=>ig(e,r))}function $b(e){let t=e.children.length>0?` { ${e.children.map($b).join(", ")} } `:"";return`${e.value}${t}`}function _m(e){if(e.snapshot){let t=e.snapshot,r=e._futureSnapshot;e.snapshot=r,Dn(t.queryParams,r.queryParams)||e.queryParamsSubject.next(r.queryParams),t.fragment!==r.fragment&&e.fragmentSubject.next(r.fragment),Dn(t.params,r.params)||e.paramsSubject.next(r.params),qk(t.url,r.url)||e.urlSubject.next(r.url),Dn(t.data,r.data)||e.dataSubject.next(r.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function Wm(e,t){let r=Dn(e.params,t.params)&&Kk(e.url,t.url),n=!e.parent!=!t.parent;return r&&!n&&(!e.parent||Wm(e.parent,t.parent))}function Kb(e){return typeof e.title=="string"||e.title===null}var sg=(()=>{let t=class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=Ve,this.activateEvents=new Rt,this.deactivateEvents=new Rt,this.attachEvents=new Rt,this.detachEvents=new Rt,this.parentContexts=re(Jc),this.location=re(Ii),this.changeDetector=re(bs),this.environmentInjector=re(Er),this.inputBinder=re(og,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:i,previousValue:s}=n.name;if(i)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new ve(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new ve(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new ve(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,i){this.activated=n,this._activatedRoute=i,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,i){if(this.isActivated)throw new ve(4013,!1);this._activatedRoute=n;let s=this.location,a=n.snapshot.component,l=this.parentContexts.getOrCreateContext(this.name).children,u=new Qm(n,l,s.injector);this.activated=s.createComponent(a,{index:s.length,injector:u,environmentInjector:i??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=Lt({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Br]});let e=t;return e})(),Qm=class e{__ngOutletInjector(t){return new e(this.route,this.childContexts,t)}constructor(t,r,n){this.route=t,this.childContexts=r,this.parent=n}get(t,r){return t===un?this.route:t===Jc?this.childContexts:this.parent.get(t,r)}},og=new De("");function mF(e,t,r){let n=al(e,t._root,r?r._root:void 0);return new Qc(n,t)}function al(e,t,r){if(r&&e.shouldReuseRoute(t.value,r.value.snapshot)){let n=r.value;n._futureSnapshot=t.value;let i=gF(e,t,r);return new Pr(n,i)}else{if(e.shouldAttach(t.value)){let s=e.retrieve(t.value);if(s!==null){let o=s.route;return o.value._futureSnapshot=t.value,o.children=t.children.map(a=>al(e,a)),o}}let n=vF(t.value),i=t.children.map(s=>al(e,s));return new Pr(n,i)}}function gF(e,t,r){return t.children.map(n=>{for(let i of r.children)if(e.shouldReuseRoute(n.value,i.value.snapshot))return al(e,n,i);return al(e,n)})}function vF(e){return new un(new $t(e.url),new $t(e.params),new $t(e.queryParams),new $t(e.fragment),new $t(e.data),e.outlet,e.component,e)}var Wb="ngNavigationCancelingError";function Qb(e,t){let{redirectTo:r,navigationBehaviorOptions:n}=Oo(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,i=Yb(!1,Nr.Redirect);return i.url=r,i.navigationBehaviorOptions=n,i}function Yb(e,t){let r=new Error(`NavigationCancelingError: ${e||""}`);return r[Wb]=!0,r.cancellationCode=t,r}function yF(e){return Zb(e)&&Oo(e.url)}function Zb(e){return!!e&&e[Wb]}var CF=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=dt({type:t,selectors:[["ng-component"]],standalone:!0,features:[Ct],decls:1,vars:0,template:function(i,s){i&1&&ut(0,"router-outlet")},dependencies:[sg],encapsulation:2});let e=t;return e})();function EF(e,t){return e.providers&&!e._injector&&(e._injector=Yp(e.providers,t,`Route: ${e.path}`)),e._injector??t}function ag(e){let t=e.children&&e.children.map(ag),r=t?at(me({},e),{children:t}):me({},e);return!r.component&&!r.loadComponent&&(t||r.loadChildren)&&r.outlet&&r.outlet!==Ve&&(r.component=CF),r}function An(e){return e.outlet||Ve}function bF(e,t){let r=e.filter(n=>An(n)===t);return r.push(...e.filter(n=>An(n)!==t)),r}function cl(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){let r=t.routeConfig;if(r?._loadedInjector)return r._loadedInjector;if(r?._injector)return r._injector}return null}var SF=(e,t,r,n)=>Ae(i=>(new Ym(t,i.targetRouterState,i.currentRouterState,r,n).activate(e),i)),Ym=class{constructor(t,r,n,i,s){this.routeReuseStrategy=t,this.futureState=r,this.currState=n,this.forwardEvent=i,this.inputBindingEnabled=s}activate(t){let r=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(r,n,t),_m(this.futureState.root),this.activateChildRoutes(r,n,t)}deactivateChildRoutes(t,r,n){let i=Ro(r);t.children.forEach(s=>{let o=s.value.outlet;this.deactivateRoutes(s,i[o],n),delete i[o]}),Object.values(i).forEach(s=>{this.deactivateRouteAndItsChildren(s,n)})}deactivateRoutes(t,r,n){let i=t.value,s=r?r.value:null;if(i===s)if(i.component){let o=n.getContext(i.outlet);o&&this.deactivateChildRoutes(t,r,o.children)}else this.deactivateChildRoutes(t,r,n);else s&&this.deactivateRouteAndItsChildren(r,n)}deactivateRouteAndItsChildren(t,r){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,r):this.deactivateRouteAndOutlet(t,r)}detachAndStoreRouteSubtree(t,r){let n=r.getContext(t.value.outlet),i=n&&t.value.component?n.children:r,s=Ro(t);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,i);if(n&&n.outlet){let o=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:o,route:t,contexts:a})}}deactivateRouteAndOutlet(t,r){let n=r.getContext(t.value.outlet),i=n&&t.value.component?n.children:r,s=Ro(t);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,i);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(t,r,n){let i=Ro(r);t.children.forEach(s=>{this.activateRoutes(s,i[s.value.outlet],n),this.forwardEvent(new Gm(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Hm(t.value.snapshot))}activateRoutes(t,r,n){let i=t.value,s=r?r.value:null;if(_m(i),i===s)if(i.component){let o=n.getOrCreateContext(i.outlet);this.activateChildRoutes(t,r,o.children)}else this.activateChildRoutes(t,r,n);else if(i.component){let o=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),_m(a.route.value),this.activateChildRoutes(t,null,o.children)}else{let a=cl(i.snapshot);o.attachRef=null,o.route=i,o.injector=a,o.outlet&&o.outlet.activateWith(i,o.injector),this.activateChildRoutes(t,null,o.children)}}else this.activateChildRoutes(t,null,n)}},Zc=class{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},Fo=class{constructor(t,r){this.component=t,this.route=r}};function xF(e,t,r){let n=e._root,i=t?t._root:null;return Ya(n,i,r,[n.value])}function IF(e){let t=e.routeConfig?e.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:e,guards:t}}function Vo(e,t){let r=Symbol(),n=t.get(e,r);return n===r?typeof e=="function"&&!aC(e)?e:t.get(e):n}function Ya(e,t,r,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let s=Ro(t);return e.children.forEach(o=>{wF(o,s[o.value.outlet],r,n.concat([o.value]),i),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,a])=>el(a,r.getContext(o),i)),i}function wF(e,t,r,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let s=e.value,o=t?t.value:null,a=r?r.getContext(e.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){let l=TF(o,s,s.routeConfig.runGuardsAndResolvers);l?i.canActivateChecks.push(new Zc(n)):(s.data=o.data,s._resolvedData=o._resolvedData),s.component?Ya(e,t,a?a.children:null,n,i):Ya(e,t,r,n,i),l&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new Fo(a.outlet.component,o))}else o&&el(t,a,i),i.canActivateChecks.push(new Zc(n)),s.component?Ya(e,null,a?a.children:null,n,i):Ya(e,null,r,n,i);return i}function TF(e,t,r){if(typeof r=="function")return r(e,t);switch(r){case"pathParamsChange":return!Ts(e.url,t.url);case"pathParamsOrQueryParamsChange":return!Ts(e.url,t.url)||!Dn(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Wm(e,t)||!Dn(e.queryParams,t.queryParams);case"paramsChange":default:return!Wm(e,t)}}function el(e,t,r){let n=Ro(e),i=e.value;Object.entries(n).forEach(([s,o])=>{i.component?t?el(o,t.children.getContext(s),r):el(o,null,r):el(o,t,r)}),i.component?t&&t.outlet&&t.outlet.isActivated?r.canDeactivateChecks.push(new Fo(t.outlet.component,i)):r.canDeactivateChecks.push(new Fo(null,i)):r.canDeactivateChecks.push(new Fo(null,i))}function fl(e){return typeof e=="function"}function _F(e){return typeof e=="boolean"}function DF(e){return e&&fl(e.canLoad)}function AF(e){return e&&fl(e.canActivate)}function MF(e){return e&&fl(e.canActivateChild)}function PF(e){return e&&fl(e.canDeactivate)}function NF(e){return e&&fl(e.canMatch)}function Xb(e){return e instanceof zn||e?.name==="EmptyError"}var Uc=Symbol("INITIAL_VALUE");function Bo(){return jt(e=>Cu(e.map(t=>t.pipe($n(1),io(Uc)))).pipe(Ae(t=>{for(let r of t)if(r!==!0){if(r===Uc)return Uc;if(r===!1||r instanceof Di)return r}return!0}),lr(t=>t!==Uc),$n(1)))}function RF(e,t){return Vt(r=>{let{targetSnapshot:n,currentSnapshot:i,guards:{canActivateChecks:s,canDeactivateChecks:o}}=r;return o.length===0&&s.length===0?_e(at(me({},r),{guardsResult:!0})):kF(o,n,i,e).pipe(Vt(a=>a&&_F(a)?FF(n,s,e,t):_e(a)),Ae(a=>at(me({},r),{guardsResult:a})))})}function kF(e,t,r,n){return Tt(e).pipe(Vt(i=>UF(i.component,i.route,r,t,n)),vn(i=>i!==!0,!0))}function FF(e,t,r,n){return Tt(t).pipe(pi(i=>to(OF(i.route.parent,n),LF(i.route,n),VF(e,i.path,r),BF(e,i.route,r))),vn(i=>i!==!0,!0))}function LF(e,t){return e!==null&&t&&t(new qm(e)),_e(!0)}function OF(e,t){return e!==null&&t&&t(new jm(e)),_e(!0)}function BF(e,t,r){let n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||n.length===0)return _e(!0);let i=n.map(s=>ro(()=>{let o=cl(t)??r,a=Vo(s,o),l=AF(a)?a.canActivate(t,e):Zn(o,()=>a(t,e));return Pi(l).pipe(vn())}));return _e(i).pipe(Bo())}function VF(e,t,r){let n=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>IF(o)).filter(o=>o!==null).map(o=>ro(()=>{let a=o.guards.map(l=>{let u=cl(o.node)??r,c=Vo(l,u),f=MF(c)?c.canActivateChild(n,e):Zn(u,()=>c(n,e));return Pi(f).pipe(vn())});return _e(a).pipe(Bo())}));return _e(s).pipe(Bo())}function UF(e,t,r,n,i){let s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!s||s.length===0)return _e(!0);let o=s.map(a=>{let l=cl(t)??i,u=Vo(a,l),c=PF(u)?u.canDeactivate(e,t,r,n):Zn(l,()=>u(e,t,r,n));return Pi(c).pipe(vn())});return _e(o).pipe(Bo())}function jF(e,t,r,n){let i=t.canLoad;if(i===void 0||i.length===0)return _e(!0);let s=i.map(o=>{let a=Vo(o,e),l=DF(a)?a.canLoad(t,r):Zn(e,()=>a(t,r));return Pi(l)});return _e(s).pipe(Bo(),Jb(n))}function Jb(e){return Ph(Ht(t=>{if(Oo(t))throw Qb(e,t)}),Ae(t=>t===!0))}function HF(e,t,r,n){let i=t.canMatch;if(!i||i.length===0)return _e(!0);let s=i.map(o=>{let a=Vo(o,e),l=NF(a)?a.canMatch(t,r):Zn(e,()=>a(t,r));return Pi(l)});return _e(s).pipe(Bo(),Jb(n))}var ll=class{constructor(t){this.segmentGroup=t||null}},Xc=class extends Error{constructor(t){super(),this.urlTree=t}};function No(e){return eo(new ll(e))}function qF(e){return eo(new ve(4e3,!1))}function GF(e){return eo(Yb(!1,Nr.GuardRejected))}var Zm=class{constructor(t,r){this.urlSerializer=t,this.urlTree=r}lineralizeSegments(t,r){let n=[],i=r.root;for(;;){if(n=n.concat(i.segments),i.numberOfChildren===0)return _e(n);if(i.numberOfChildren>1||!i.children[Ve])return qF(t.redirectTo);i=i.children[Ve]}}applyRedirectCommands(t,r,n){let i=this.applyRedirectCreateUrlTree(r,this.urlSerializer.parse(r),t,n);if(r.startsWith("/"))throw new Xc(i);return i}applyRedirectCreateUrlTree(t,r,n,i){let s=this.createSegmentGroup(t,r.root,n,i);return new Di(s,this.createQueryParams(r.queryParams,this.urlTree.queryParams),r.fragment)}createQueryParams(t,r){let n={};return Object.entries(t).forEach(([i,s])=>{if(typeof s=="string"&&s.startsWith(":")){let a=s.substring(1);n[i]=r[a]}else n[i]=s}),n}createSegmentGroup(t,r,n,i){let s=this.createSegments(t,r.segments,n,i),o={};return Object.entries(r.children).forEach(([a,l])=>{o[a]=this.createSegmentGroup(t,l,n,i)}),new pt(s,o)}createSegments(t,r,n,i){return r.map(s=>s.path.startsWith(":")?this.findPosParam(t,s,i):this.findOrReturn(s,n))}findPosParam(t,r,n){let i=n[r.path.substring(1)];if(!i)throw new ve(4001,!1);return i}findOrReturn(t,r){let n=0;for(let i of r){if(i.path===t.path)return r.splice(n),i;n++}return t}},Xm={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function zF(e,t,r,n,i){let s=lg(e,t,r);return s.matched?(n=EF(t,n),HF(n,t,r,i).pipe(Ae(o=>o===!0?s:me({},Xm)))):_e(s)}function lg(e,t,r){if(t.path==="**")return $F(r);if(t.path==="")return t.pathMatch==="full"&&(e.hasChildren()||r.length>0)?me({},Xm):{matched:!0,consumedSegments:[],remainingSegments:r,parameters:{},positionalParamSegments:{}};let i=(t.matcher||Hk)(r,e,t);if(!i)return me({},Xm);let s={};Object.entries(i.posParams??{}).forEach(([a,l])=>{s[a]=l.path});let o=i.consumed.length>0?me(me({},s),i.consumed[i.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:i.consumed,remainingSegments:r.slice(i.consumed.length),parameters:o,positionalParamSegments:i.posParams??{}}}function $F(e){return{matched:!0,parameters:e.length>0?Nb(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}function Mb(e,t,r,n){return r.length>0&&QF(e,r,n)?{segmentGroup:new pt(t,WF(n,new pt(r,e.children))),slicedSegments:[]}:r.length===0&&YF(e,r,n)?{segmentGroup:new pt(e.segments,KF(e,r,n,e.children)),slicedSegments:r}:{segmentGroup:new pt(e.segments,e.children),slicedSegments:r}}function KF(e,t,r,n){let i={};for(let s of r)if(ef(e,t,s)&&!n[An(s)]){let o=new pt([],{});i[An(s)]=o}return me(me({},n),i)}function WF(e,t){let r={};r[Ve]=t;for(let n of e)if(n.path===""&&An(n)!==Ve){let i=new pt([],{});r[An(n)]=i}return r}function QF(e,t,r){return r.some(n=>ef(e,t,n)&&An(n)!==Ve)}function YF(e,t,r){return r.some(n=>ef(e,t,n))}function ef(e,t,r){return(e.hasChildren()||t.length>0)&&r.pathMatch==="full"?!1:r.path===""}function ZF(e,t,r,n){return An(e)!==n&&(n===Ve||!ef(t,r,e))?!1:lg(t,e,r).matched}function XF(e,t,r){return t.length===0&&!e.children[r]}var Jm=class{};function JF(e,t,r,n,i,s,o="emptyOnly"){return new eg(e,t,r,n,i,o,s).recognize()}var eL=31,eg=class{constructor(t,r,n,i,s,o,a){this.injector=t,this.configLoader=r,this.rootComponentType=n,this.config=i,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=a,this.applyRedirects=new Zm(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new ve(4002,`'${t.segmentGroup}'`)}recognize(){let t=Mb(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(Ae(r=>{let n=new ol([],Object.freeze({}),Object.freeze(me({},this.urlTree.queryParams)),this.urlTree.fragment,{},Ve,this.rootComponentType,null,{}),i=new Pr(n,r),s=new Yc("",i),o=aF(n,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(o),this.inheritParamsAndData(s._root,null),{state:s,tree:o}}))}match(t){return this.processSegmentGroup(this.injector,this.config,t,Ve).pipe(Xr(n=>{if(n instanceof Xc)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof ll?this.noMatchError(n):n}))}inheritParamsAndData(t,r){let n=t.value,i=ng(n,r,this.paramsInheritanceStrategy);n.params=Object.freeze(i.params),n.data=Object.freeze(i.data),t.children.forEach(s=>this.inheritParamsAndData(s,n))}processSegmentGroup(t,r,n,i){return n.segments.length===0&&n.hasChildren()?this.processChildren(t,r,n):this.processSegment(t,r,n,n.segments,i,!0).pipe(Ae(s=>s instanceof Pr?[s]:[]))}processChildren(t,r,n){let i=[];for(let s of Object.keys(n.children))s==="primary"?i.unshift(s):i.push(s);return Tt(i).pipe(pi(s=>{let o=n.children[s],a=bF(r,s);return this.processSegmentGroup(t,a,o,s)}),jh((s,o)=>(s.push(...o),s)),mi(null),Uh(),Vt(s=>{if(s===null)return No(n);let o=eS(s);return tL(o),_e(o)}))}processSegment(t,r,n,i,s,o){return Tt(r).pipe(pi(a=>this.processSegmentAgainstRoute(a._injector??t,r,a,n,i,s,o).pipe(Xr(l=>{if(l instanceof ll)return _e(null);throw l}))),vn(a=>!!a),Xr(a=>{if(Xb(a))return XF(n,i,s)?_e(new Jm):No(n);throw a}))}processSegmentAgainstRoute(t,r,n,i,s,o,a){return ZF(n,i,s,o)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(t,i,n,s,o):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,i,r,n,s,o):No(i):No(i)}expandSegmentAgainstRouteUsingRedirect(t,r,n,i,s,o){let{matched:a,consumedSegments:l,positionalParamSegments:u,remainingSegments:c}=lg(r,i,s);if(!a)return No(r);i.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>eL&&(this.allowRedirects=!1));let f=this.applyRedirects.applyRedirectCommands(l,i.redirectTo,u);return this.applyRedirects.lineralizeSegments(i,f).pipe(Vt(h=>this.processSegment(t,n,r,h.concat(c),o,!1)))}matchSegmentAgainstRoute(t,r,n,i,s){let o=zF(r,n,i,t,this.urlSerializer);return n.path==="**"&&(r.children={}),o.pipe(jt(a=>a.matched?(t=n._injector??t,this.getChildConfig(t,n,i).pipe(jt(({routes:l})=>{let u=n._loadedInjector??t,{consumedSegments:c,remainingSegments:f,parameters:h}=a,p=new ol(c,h,Object.freeze(me({},this.urlTree.queryParams)),this.urlTree.fragment,nL(n),An(n),n.component??n._loadedComponent??null,n,iL(n)),{segmentGroup:d,slicedSegments:m}=Mb(r,c,f,l);if(m.length===0&&d.hasChildren())return this.processChildren(u,l,d).pipe(Ae(g=>g===null?null:new Pr(p,g)));if(l.length===0&&m.length===0)return _e(new Pr(p,[]));let b=An(n)===s;return this.processSegment(u,l,d,m,b?Ve:s,!0).pipe(Ae(g=>new Pr(p,g instanceof Pr?[g]:[])))}))):No(r)))}getChildConfig(t,r,n){return r.children?_e({routes:r.children,injector:t}):r.loadChildren?r._loadedRoutes!==void 0?_e({routes:r._loadedRoutes,injector:r._loadedInjector}):jF(t,r,n,this.urlSerializer).pipe(Vt(i=>i?this.configLoader.loadChildren(t,r).pipe(Ht(s=>{r._loadedRoutes=s.routes,r._loadedInjector=s.injector})):GF(r))):_e({routes:[],injector:t})}};function tL(e){e.sort((t,r)=>t.value.outlet===Ve?-1:r.value.outlet===Ve?1:t.value.outlet.localeCompare(r.value.outlet))}function rL(e){let t=e.value.routeConfig;return t&&t.path===""}function eS(e){let t=[],r=new Set;for(let n of e){if(!rL(n)){t.push(n);continue}let i=t.find(s=>n.value.routeConfig===s.value.routeConfig);i!==void 0?(i.children.push(...n.children),r.add(i)):t.push(n)}for(let n of r){let i=eS(n.children);t.push(new Pr(n.value,i))}return t.filter(n=>!r.has(n))}function nL(e){return e.data||{}}function iL(e){return e.resolve||{}}function sL(e,t,r,n,i,s){return Vt(o=>JF(e,t,r,n,o.extractedUrl,i,s).pipe(Ae(({state:a,tree:l})=>at(me({},o),{targetSnapshot:a,urlAfterRedirects:l}))))}function oL(e,t){return Vt(r=>{let{targetSnapshot:n,guards:{canActivateChecks:i}}=r;if(!i.length)return _e(r);let s=new Set(i.map(l=>l.route)),o=new Set;for(let l of s)if(!o.has(l))for(let u of tS(l))o.add(u);let a=0;return Tt(o).pipe(pi(l=>s.has(l)?aL(l,n,e,t):(l.data=ng(l,l.parent,e).resolve,_e(void 0))),Ht(()=>a++),no(1),Vt(l=>a===o.size?_e(r):Tr))})}function tS(e){let t=e.children.map(r=>tS(r)).flat();return[e,...t]}function aL(e,t,r,n){let i=e.routeConfig,s=e._resolve;return i?.title!==void 0&&!Kb(i)&&(s[ul]=i.title),lL(s,e,t,n).pipe(Ae(o=>(e._resolvedData=o,e.data=ng(e,e.parent,r).resolve,null)))}function lL(e,t,r,n){let i=Mm(e);if(i.length===0)return _e({});let s={};return Tt(i).pipe(Vt(o=>uL(e[o],t,r,n).pipe(vn(),Ht(a=>{s[o]=a}))),no(1),Vh(s),Xr(o=>Xb(o)?Tr:eo(o)))}function uL(e,t,r,n){let i=cl(t)??n,s=Vo(e,i),o=s.resolve?s.resolve(t,r):Zn(i,()=>s(t,r));return Pi(o)}function Dm(e){return jt(t=>{let r=e(t);return r?Tt(r).pipe(Ae(()=>t)):_e(t)})}var rS=(()=>{let t=class t{buildTitle(n){let i,s=n.root;for(;s!==void 0;)i=this.getResolvedTitleForRoute(s)??i,s=s.children.find(o=>o.outlet===Ve);return i}getResolvedTitleForRoute(n){return n.data[ul]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:()=>re(cL),providedIn:"root"});let e=t;return e})(),cL=(()=>{let t=class t extends rS{constructor(n){super(),this.title=n}updateTitle(n){let i=this.buildTitle(n);i!==void 0&&this.title.setTitle(i)}};t.\u0275fac=function(i){return new(i||t)(Re(Ib))},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),ug=new De("",{providedIn:"root",factory:()=>({})}),cg=new De(""),fL=(()=>{let t=class t{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=re(em)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return _e(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let i=Pi(n.loadComponent()).pipe(Ae(nS),Ht(o=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=o}),ns(()=>{this.componentLoaders.delete(n)})),s=new Xs(i,()=>new Mt).pipe(Zs());return this.componentLoaders.set(n,s),s}loadChildren(n,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return _e({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let o=hL(i,this.compiler,n,this.onLoadEndListener).pipe(ns(()=>{this.childrenLoaders.delete(i)})),a=new Xs(o,()=>new Mt).pipe(Zs());return this.childrenLoaders.set(i,a),a}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function hL(e,t,r,n){return Pi(e.loadChildren()).pipe(Ae(nS),Vt(i=>i instanceof Ma||Array.isArray(i)?_e(i):Tt(t.compileModuleAsync(i))),Ae(i=>{n&&n(e);let s,o,a=!1;return Array.isArray(i)?(o=i,a=!0):(s=i.create(r).injector,o=s.get(cg,[],{optional:!0,self:!0}).flat()),{routes:o.map(ag),injector:s}}))}function dL(e){return e&&typeof e=="object"&&"default"in e}function nS(e){return dL(e)?e.default:e}var fg=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:()=>re(pL),providedIn:"root"});let e=t;return e})(),pL=(()=>{let t=class t{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,i){return n}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),mL=new De("");var gL=(()=>{let t=class t{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Mt,this.transitionAbortSubject=new Mt,this.configLoader=re(fL),this.environmentInjector=re(Er),this.urlSerializer=re(rg),this.rootContexts=re(Jc),this.location=re(Mr),this.inputBindingEnabled=re(og,{optional:!0})!==null,this.titleStrategy=re(rS),this.options=re(ug,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=re(fg),this.createViewTransition=re(mL,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>_e(void 0),this.rootComponentType=null;let n=s=>this.events.next(new Vm(s)),i=s=>this.events.next(new Um(s));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let i=++this.navigationId;this.transitions?.next(at(me(me({},this.transitions.value),n),{id:i}))}setupNavigations(n,i,s){return this.transitions=new $t({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Ja,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(lr(o=>o.id!==0),Ae(o=>at(me({},o),{extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),jt(o=>{let a=!1,l=!1;return _e(o).pipe(jt(u=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",Nr.SupersededByNewNavigation),Tr;this.currentTransition=o,this.currentNavigation={id:u.id,initialUrl:u.rawUrl,extractedUrl:u.extractedUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?at(me({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let c=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),f=u.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!c&&f!=="reload"){let h="";return this.events.next(new _s(u.id,this.urlSerializer.serialize(u.rawUrl),h,km.IgnoredSameUrlNavigation)),u.resolve(null),Tr}if(this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return _e(u).pipe(jt(h=>{let p=this.transitions?.getValue();return this.events.next(new rl(h.id,this.urlSerializer.serialize(h.extractedUrl),h.source,h.restoredState)),p!==this.transitions?.getValue()?Tr:Promise.resolve(h)}),sL(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),Ht(h=>{o.targetSnapshot=h.targetSnapshot,o.urlAfterRedirects=h.urlAfterRedirects,this.currentNavigation=at(me({},this.currentNavigation),{finalUrl:h.urlAfterRedirects});let p=new Kc(h.id,this.urlSerializer.serialize(h.extractedUrl),this.urlSerializer.serialize(h.urlAfterRedirects),h.targetSnapshot);this.events.next(p)}));if(c&&this.urlHandlingStrategy.shouldProcessUrl(u.currentRawUrl)){let{id:h,extractedUrl:p,source:d,restoredState:m,extras:b}=u,g=new rl(h,this.urlSerializer.serialize(p),d,m);this.events.next(g);let C=zb(this.rootComponentType).snapshot;return this.currentTransition=o=at(me({},u),{targetSnapshot:C,urlAfterRedirects:p,extras:at(me({},b),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=p,_e(o)}else{let h="";return this.events.next(new _s(u.id,this.urlSerializer.serialize(u.extractedUrl),h,km.IgnoredByUrlHandlingStrategy)),u.resolve(null),Tr}}),Ht(u=>{let c=new Fm(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(c)}),Ae(u=>(this.currentTransition=o=at(me({},u),{guards:xF(u.targetSnapshot,u.currentSnapshot,this.rootContexts)}),o)),RF(this.environmentInjector,u=>this.events.next(u)),Ht(u=>{if(o.guardsResult=u.guardsResult,Oo(u.guardsResult))throw Qb(this.urlSerializer,u.guardsResult);let c=new Lm(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.events.next(c)}),lr(u=>u.guardsResult?!0:(this.cancelNavigationTransition(u,"",Nr.GuardRejected),!1)),Dm(u=>{if(u.guards.canActivateChecks.length)return _e(u).pipe(Ht(c=>{let f=new Om(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(f)}),jt(c=>{let f=!1;return _e(c).pipe(oL(this.paramsInheritanceStrategy,this.environmentInjector),Ht({next:()=>f=!0,complete:()=>{f||this.cancelNavigationTransition(c,"",Nr.NoDataFromResolver)}}))}),Ht(c=>{let f=new Bm(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(f)}))}),Dm(u=>{let c=f=>{let h=[];f.routeConfig?.loadComponent&&!f.routeConfig._loadedComponent&&h.push(this.configLoader.loadComponent(f.routeConfig).pipe(Ht(p=>{f.component=p}),Ae(()=>{})));for(let p of f.children)h.push(...c(p));return h};return Cu(c(u.targetSnapshot.root)).pipe(mi(null),$n(1))}),Dm(()=>this.afterPreactivation()),jt(()=>{let{currentSnapshot:u,targetSnapshot:c}=o,f=this.createViewTransition?.(this.environmentInjector,u.root,c.root);return f?Tt(f).pipe(Ae(()=>o)):_e(o)}),Ae(u=>{let c=mF(n.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=o=at(me({},u),{targetRouterState:c}),this.currentNavigation.targetRouterState=c,o}),Ht(()=>{this.events.next(new il)}),SF(this.rootContexts,n.routeReuseStrategy,u=>this.events.next(u),this.inputBindingEnabled),$n(1),Ht({next:u=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Ai(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),this.titleStrategy?.updateTitle(u.targetRouterState.snapshot),u.resolve(!0)},complete:()=>{a=!0}}),gi(this.transitionAbortSubject.pipe(Ht(u=>{throw u}))),ns(()=>{!a&&!l&&this.cancelNavigationTransition(o,"",Nr.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),Xr(u=>{if(l=!0,Zb(u))this.events.next(new Mi(o.id,this.urlSerializer.serialize(o.extractedUrl),u.message,u.cancellationCode)),yF(u)?this.events.next(new sl(u.url)):o.resolve(!1);else{this.events.next(new nl(o.id,this.urlSerializer.serialize(o.extractedUrl),u,o.targetSnapshot??void 0));try{o.resolve(n.errorHandler(u))}catch(c){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(c)}}return Tr}))}))}cancelNavigationTransition(n,i,s){let o=new Mi(n.id,this.urlSerializer.serialize(n.extractedUrl),i,s);this.events.next(o),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function vL(e){return e!==Ja}var yL=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:()=>re(CL),providedIn:"root"});let e=t;return e})(),tg=class{shouldDetach(t){return!1}store(t,r){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,r){return t.routeConfig===r.routeConfig}},CL=(()=>{let t=class t extends tg{};t.\u0275fac=(()=>{let n;return function(s){return(n||(n=ei(t)))(s||t)}})(),t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),iS=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:()=>re(EL),providedIn:"root"});let e=t;return e})(),EL=(()=>{let t=class t extends iS{constructor(){super(...arguments),this.location=re(Mr),this.urlSerializer=re(rg),this.options=re(ug,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=re(fg),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Di,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=zb(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(i=>{i.type==="popstate"&&n(i.url,i.state)})}handleRouterEvent(n,i){if(n instanceof rl)this.stateMemento=this.createStateMemento();else if(n instanceof _s)this.rawUrlTree=i.initialUrl;else if(n instanceof Kc){if(this.urlUpdateStrategy==="eager"&&!i.extras.skipLocationChange){let s=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(s,i)}}else n instanceof il?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,this.urlUpdateStrategy==="deferred"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,i))):n instanceof Mi&&(n.code===Nr.GuardRejected||n.code===Nr.NoDataFromResolver)?this.restoreHistory(i):n instanceof nl?this.restoreHistory(i,!0):n instanceof Ai&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,i){let s=this.urlSerializer.serialize(n);if(this.location.isCurrentPathEqualTo(s)||i.extras.replaceUrl){let o=this.browserPageId,a=me(me({},i.extras.state),this.generateNgRouterState(i.id,o));this.location.replaceState(s,"",a)}else{let o=me(me({},i.extras.state),this.generateNgRouterState(i.id,this.browserPageId+1));this.location.go(s,"",o)}}restoreHistory(n,i=!1){if(this.canceledNavigationResolution==="computed"){let s=this.browserPageId,o=this.currentPageId-s;o!==0?this.location.historyGo(o):this.currentUrlTree===n.finalUrl&&o===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,i){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:i}:{navigationId:n}}};t.\u0275fac=(()=>{let n;return function(s){return(n||(n=ei(t)))(s||t)}})(),t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Za=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(Za||{});function bL(e,t){e.events.pipe(lr(r=>r instanceof Ai||r instanceof Mi||r instanceof nl||r instanceof _s),Ae(r=>r instanceof Ai||r instanceof _s?Za.COMPLETE:(r instanceof Mi?r.code===Nr.Redirect||r.code===Nr.SupersededByNewNavigation:!1)?Za.REDIRECTING:Za.FAILED),lr(r=>r!==Za.REDIRECTING),$n(1)).subscribe(()=>{t()})}function SL(e){throw e}var xL={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},IL={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},cn=(()=>{let t=class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.isNgZoneEnabled=!1,this.console=re(bc),this.stateManager=re(iS),this.options=re(ug,{optional:!0})||{},this.pendingTasks=re(So),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=re(gL),this.urlSerializer=re(rg),this.location=re(Mr),this.urlHandlingStrategy=re(fg),this._events=new Mt,this.errorHandler=this.options.errorHandler||SL,this.navigated=!1,this.routeReuseStrategy=re(yL),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=re(cg,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!re(og,{optional:!0}),this.eventsSubscription=new Bt,this.isNgZoneEnabled=re(_t)instanceof _t&&_t.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(i=>{try{let s=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(s!==null&&o!==null){if(this.stateManager.handleRouterEvent(i,o),i instanceof Mi&&i.code!==Nr.Redirect&&i.code!==Nr.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof Ai)this.navigated=!0;else if(i instanceof sl){let a=this.urlHandlingStrategy.merge(i.url,s.currentRawUrl),l={info:s.extras.info,skipLocationChange:s.extras.skipLocationChange,replaceUrl:this.urlUpdateStrategy==="eager"||vL(s.source)};this.scheduleNavigation(a,Ja,null,l,{resolve:s.resolve,reject:s.reject,promise:s.promise})}}TL(i)&&this._events.next(i)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Ja,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",i)},0)})}navigateToSyncWithBrowser(n,i,s){let o={replaceUrl:!0},a=s?.navigationId?s:null;if(s){let u=me({},s);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(o.state=u)}let l=this.parseUrl(n);this.scheduleNavigation(l,i,a,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(ag),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,i={}){let{relativeTo:s,queryParams:o,fragment:a,queryParamsHandling:l,preserveFragment:u}=i,c=u?this.currentUrlTree.fragment:a,f=null;switch(l){case"merge":f=me(me({},this.currentUrlTree.queryParams),o);break;case"preserve":f=this.currentUrlTree.queryParams;break;default:f=o||null}f!==null&&(f=this.removeEmptyProps(f));let h;try{let p=s?s.snapshot:this.routerState.snapshot.root;h=jb(p)}catch{(typeof n[0]!="string"||!n[0].startsWith("/"))&&(n=[]),h=this.currentUrlTree.root}return Hb(h,n,f,c??null)}navigateByUrl(n,i={skipLocationChange:!1}){let s=Oo(n)?n:this.parseUrl(n),o=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(o,Ja,null,i)}navigate(n,i={skipLocationChange:!1}){return wL(n),this.navigateByUrl(this.createUrlTree(n,i),i)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,i){let s;if(i===!0?s=me({},xL):i===!1?s=me({},IL):s=i,Oo(n))return Tb(this.currentUrlTree,n,s);let o=this.parseUrl(n);return Tb(this.currentUrlTree,o,s)}removeEmptyProps(n){return Object.entries(n).reduce((i,[s,o])=>(o!=null&&(i[s]=o),i),{})}scheduleNavigation(n,i,s,o,a){if(this.disposed)return Promise.resolve(!1);let l,u,c;a?(l=a.resolve,u=a.reject,c=a.promise):c=new Promise((h,p)=>{l=h,u=p});let f=this.pendingTasks.add();return bL(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(f))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:o,resolve:l,reject:u,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(h=>Promise.reject(h))}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function wL(e){for(let t=0;t<e.length;t++)if(e[t]==null)throw new ve(4008,!1)}function TL(e){return!(e instanceof il)&&!(e instanceof sl)}var sS=(()=>{let t=class t{constructor(n,i,s,o,a,l){this.router=n,this.route=i,this.tabIndexAttribute=s,this.renderer=o,this.el=a,this.locationStrategy=l,this.href=null,this.commands=null,this.onChanges=new Mt,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;let u=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area",this.isAnchorElement?this.subscription=n.events.subscribe(c=>{c instanceof Ai&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(n){n!=null?(this.commands=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(n,i,s,o,a){let l=this.urlTree;if(l===null||this.isAnchorElement&&(n!==0||i||s||o||a||typeof this.target=="string"&&this.target!="_self"))return!0;let u={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(l,u),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let n=this.urlTree;this.href=n!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(n)):null;let i=this.href===null?null:F1(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",i)}applyAttributeValue(n,i){let s=this.renderer,o=this.el.nativeElement;i!==null?s.setAttribute(o,n,i):s.removeAttribute(o,n)}get urlTree(){return this.commands===null?null:this.router.createUrlTree(this.commands,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}};t.\u0275fac=function(i){return new(i||t)(Ee(cn),Ee(un),Np("tabindex"),Ee(ln),Ee(Sr),Ee(Ao))},t.\u0275dir=Lt({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(i,s){i&1&&bt("click",function(a){return s.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),i&2&&Ti("target",s.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[kt.HasDecoratorInputTransform,"preserveFragment","preserveFragment",Ss],skipLocationChange:[kt.HasDecoratorInputTransform,"skipLocationChange","skipLocationChange",Ss],replaceUrl:[kt.HasDecoratorInputTransform,"replaceUrl","replaceUrl",Ss],routerLink:"routerLink"},standalone:!0,features:[Qp,Br]});let e=t;return e})();var _L=new De("");function oS(e,...t){return vo([{provide:cg,multi:!0,useValue:e},[],{provide:un,useFactory:DL,deps:[cn]},{provide:Sc,multi:!0,useFactory:AL},t.map(r=>r.\u0275providers)])}function DL(e){return e.routerState.root}function AL(){let e=re(Cs);return t=>{let r=e.get(_o);if(t!==r.components[0])return;let n=e.get(cn),i=e.get(ML);e.get(PL)===1&&n.initialNavigation(),e.get(NL,null,$e.Optional)?.setUpPreloading(),e.get(_L,null,$e.Optional)?.init(),n.resetRootComponentType(r.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var ML=new De("",{factory:()=>new Mt}),PL=new De("",{providedIn:"root",factory:()=>1});var NL=new De("");var zo=ql(lx(),1);var _O=["qrcElement"],ux=(()=>{let t=class t{constructor(n,i){this.renderer=n,this.sanitizer=i,this.allowEmptyString=!1,this.colorDark="#000000ff",this.colorLight="#ffffffff",this.cssClass="qrcode",this.elementType="canvas",this.errorCorrectionLevel="M",this.margin=4,this.qrdata="",this.scale=4,this.width=10,this.qrCodeURL=new Rt,this.context=null}ngOnChanges(){return zs(this,null,function*(){yield this.createQRCode()})}isValidQrCodeText(n){return this.allowEmptyString===!1?!(typeof n>"u"||n===""||n==="null"||n===null):!(typeof n>"u")}toDataURL(n){return new Promise((i,s)=>{(0,zo.toDataURL)(this.qrdata,n,(o,a)=>{o?s(o):i(a)})})}toCanvas(n,i){return new Promise((s,o)=>{(0,zo.toCanvas)(n,this.qrdata,i,a=>{a?o(a):s("success")})})}toSVG(n){return new Promise((i,s)=>{(0,zo.toString)(this.qrdata,n,(o,a)=>{o?s(o):i(a)})})}renderElement(n){for(let i of this.qrcElement.nativeElement.childNodes)this.renderer.removeChild(this.qrcElement.nativeElement,i);this.renderer.appendChild(this.qrcElement.nativeElement,n)}createQRCode(){return zs(this,null,function*(){this.version&&this.version>40?(console.warn("[angularx-qrcode] max value for `version` is 40"),this.version=40):this.version&&this.version<1?(console.warn("[angularx-qrcode]`min value for `version` is 1"),this.version=1):this.version!==void 0&&isNaN(this.version)&&(console.warn("[angularx-qrcode] version should be a number, defaulting to auto."),this.version=void 0);try{if(!this.isValidQrCodeText(this.qrdata))throw new Error("[angularx-qrcode] Field `qrdata` is empty, set 'allowEmptyString=\"true\"' to overwrite this behaviour.");this.isValidQrCodeText(this.qrdata)&&this.qrdata===""&&(this.qrdata=" ");let n={color:{dark:this.colorDark,light:this.colorLight},errorCorrectionLevel:this.errorCorrectionLevel,margin:this.margin,scale:this.scale,version:this.version,width:this.width},i=this.imageSrc,s=this.imageHeight||40,o=this.imageWidth||40;switch(this.elementType){case"canvas":{let a=this.renderer.createElement("canvas");this.context=a.getContext("2d"),this.toCanvas(a,n).then(()=>{if(this.ariaLabel&&this.renderer.setAttribute(a,"aria-label",`${this.ariaLabel}`),this.title&&this.renderer.setAttribute(a,"title",`${this.title}`),i&&this.context){this.centerImage=new Image(o,s),i!==this.centerImage.src&&(this.centerImage.src=i),s!==this.centerImage.height&&(this.centerImage.height=s),o!==this.centerImage.width&&(this.centerImage.width=o);let l=this.centerImage;l&&(l.onload=()=>{this.context?.drawImage(l,a.width/2-o/2,a.height/2-s/2,o,s)})}this.renderElement(a),this.emitQRCodeURL(a)}).catch(l=>{console.error("[angularx-qrcode] canvas error:",l)});break}case"svg":{let a=this.renderer.createElement("div");this.toSVG(n).then(l=>{this.renderer.setProperty(a,"innerHTML",l);let u=a.firstChild;this.renderer.setAttribute(u,"height",`${this.width}`),this.renderer.setAttribute(u,"width",`${this.width}`),this.renderElement(u),this.emitQRCodeURL(u)}).catch(l=>{console.error("[angularx-qrcode] svg error:",l)});break}case"url":case"img":default:{let a=this.renderer.createElement("img");this.toDataURL(n).then(l=>{this.alt&&a.setAttribute("alt",this.alt),this.ariaLabel&&a.setAttribute("aria-label",this.ariaLabel),a.setAttribute("src",l),this.title&&a.setAttribute("title",this.title),this.renderElement(a),this.emitQRCodeURL(a)}).catch(l=>{console.error("[angularx-qrcode] img/url error:",l)})}}}catch(n){console.error("[angularx-qrcode] Error generating QR Code:",n.message)}})}emitQRCodeURL(n){let i=n.constructor.name;if(i===SVGSVGElement.name){let o=n.outerHTML,a=new Blob([o],{type:"image/svg+xml"}),l=URL.createObjectURL(a),u=this.sanitizer.bypassSecurityTrustUrl(l);this.qrCodeURL.emit(u);return}let s="";i===HTMLCanvasElement.name&&(s=n.toDataURL("image/png")),i===HTMLImageElement.name&&(s=n.src),fetch(s).then(o=>o.blob()).then(o=>URL.createObjectURL(o)).then(o=>this.sanitizer.bypassSecurityTrustUrl(o)).then(o=>{this.qrCodeURL.emit(o)}).catch(o=>{console.error("[angularx-qrcode] Error when fetching image/png URL: "+o)})}};t.\u0275fac=function(i){return new(i||t)(Ee(ln),Ee(Im))},t.\u0275cmp=dt({type:t,selectors:[["qrcode"]],viewQuery:function(i,s){if(i&1&&Ec(_O,7),i&2){let o;Oa(o=Ba())&&(s.qrcElement=o.first)}},inputs:{allowEmptyString:"allowEmptyString",colorDark:"colorDark",colorLight:"colorLight",cssClass:"cssClass",elementType:"elementType",errorCorrectionLevel:"errorCorrectionLevel",imageSrc:"imageSrc",imageHeight:"imageHeight",imageWidth:"imageWidth",margin:"margin",qrdata:"qrdata",scale:"scale",version:"version",width:"width",alt:"alt",ariaLabel:"ariaLabel",title:"title"},outputs:{qrCodeURL:"qrCodeURL"},features:[Br],decls:2,vars:2,consts:[["qrcElement",""]],template:function(i,s){i&1&&ut(0,"div",null,0),i&2&&IE(s.cssClass)},encapsulation:2,changeDetection:0});let e=t;return e})(),cx=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=sn({type:t}),t.\u0275inj=nn({});let e=t;return e})();var pf=function(e){return e.PENDING="PENDING",e.USED="USED",e.EXPIRED="EXPIRED",e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE",e}(pf||{});var ai={production:!1,apiUrl:"https://paytek-africa.net:11901/api/apps",apiKey:"31|YEwf8ocRy4zyiFGdPKJTXxkkRfKRXbrcjnyfe8Q1",appId:"3576128409",apiPublicKey:`-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0tnN71ibgTryKECTMvt7
M+eqaJwib5ln/Xpk0FA6arbeXlFA2Qr+Wnxf1u5bFABRFZCr4y7df/Bq4tLgY81U
UgjKN9M6Ygi5wnNUqzly+DDz6avidkm8OErhVGl1ir+nVgy4Ivx09u9um+nf/ua1
kZ8KJM2u57nKsCdXhilPoif18X6s+jo33L66aVuAczo+785scOhYvcYWPtH0815a
z6MnbBqBlZ0CGlA4YudiRa3Hm+gYROk/UU7Ol0kWh0hLFwht9LHsDIMI6N3rdCRs
T8rNz3NOdZ5RoXUx8uGwBwH2DHx1IV0AhMGVUjJNCzdYF9MhzCm45FLcSh+VSZ0i
ZoHQIvabkZI77qhe7FfVPqKl9JUt60t0VngCzgx/ql3hg3stNWhQcP/pFeZA7nig
oILojBw1Jr0DlrPmQJ1ff/GlwfbJgY16rlhqdtwPzboRfrDk3QNANygOq8rlTdfy
ku1Y7Xwrk4XOo9ybEjh4HLSuWdd8LdEaOTgn8nInwz2X2dBRlFWmNZ9vyqx26KQC
8akW7O/1M1iocDKAzmphAFQqYoDkUj3GmcoZObBrg4h8KsWjcJjez8I1jw1znppc
IxhAgP/ncQcgZm3QMWPJS2YQEPOqmSEAfx2JyyUT3CSzZP03p1jxV2vNqo0PLGy5
6c/RwJbODviY6LabqtFCBB8CAwEAAQ==
-----END PUBLIC KEY-----`,pusherKey:"ad52cb097fca7bdd5e08",pusherCluster:"ap2",pusherChannel:"payments"};var hx=ql(fx());var gf=(()=>{let t=class t{constructor(){this.pusher=new hx.default(ai.pusherKey,{cluster:ai.pusherCluster})}listen(n,i,s){this.pusher.subscribe(n).bind(i,s)}unsubscribe(n){this.channel.unbind(n)}disconnect(){this.pusher.disconnect()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Li=function(e){return e.PENDING="PENDING",e.SUCCESS="SUCCESS",e.FAILED="FAILED",e.REJECTED="REJECTED",e.EXPIRED="EXPIRED",e}(Li||{});var rr=[];for(let e=0;e<256;++e)rr.push((e+256).toString(16).slice(1));function dx(e,t=0){return(rr[e[t+0]]+rr[e[t+1]]+rr[e[t+2]]+rr[e[t+3]]+"-"+rr[e[t+4]]+rr[e[t+5]]+"-"+rr[e[t+6]]+rr[e[t+7]]+"-"+rr[e[t+8]]+rr[e[t+9]]+"-"+rr[e[t+10]]+rr[e[t+11]]+rr[e[t+12]]+rr[e[t+13]]+rr[e[t+14]]+rr[e[t+15]]).toLowerCase()}var Lg,AO=new Uint8Array(16);function Og(){if(!Lg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Lg=crypto.getRandomValues.bind(crypto)}return Lg(AO)}var MO=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Bg={randomUUID:MO};function PO(e,t,r){if(Bg.randomUUID&&!t&&!e)return Bg.randomUUID();e=e||{};let n=e.random??e.rng?.()??Og();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return dx(n)}var Vg=PO;function px(){return Vg().replace(/-/g,"").substring(0,12)}function $o(){window.close()}var mx=(()=>{let t=class t{constructor(){this.cacheKey="httpCache"}put(n,i){let s=this.getCache();s[n]=i,sessionStorage.setItem(this.cacheKey,JSON.stringify(s))}get(n){return this.getCache()[n]||null}clear(){sessionStorage.removeItem(this.cacheKey)}getCache(){let n=sessionStorage.getItem(this.cacheKey);return n?JSON.parse(n):{}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var vf=(()=>{let t=class t{constructor(){this.http=re(mm),this.cache=re(mx),this.pusherServ=re(gf)}getLinkInformation(n){let i=`https://imali.co.mz:11901/api/get-store-link/${n}`,s=this.cache.get(i);return s?_e(s):this.http.get(i).pipe(Ae(o=>{console.log(o);let a=o.data[0],l=at(me({},a),{status:a.status});return this.cache.put(i,l),l}))}getAvailablePaymentServices(){let n=`${ai.apiUrl}/get-payment-services`,i=this.cache.get(n);return i?_e(i):this.http.get(n).pipe(Ae(s=>{let o=s.data??[];return console.log(o),this.cache.put(n,o),o}))}makePayment(){}createPayment(n,i,s,o,a){let l=px();return this.http.post("https://imali.co.mz:11901/api/imaliway/v2/payments",{client_account_number:n,amount:i,store_account_number:s,partner_transaction_id:l,payment_method:o.toLowerCase(),payment_type:a}).pipe(jt(({data:u})=>Ca(1e4).pipe(io(0),jt(()=>this.http.get("https://imali.co.mz:11901/api/imaliway/v2/payments/status",{params:{partner_transaction_id:l,payment_type:a}}).pipe(Ae(({data:c})=>c),Xr(c=>(console.error("Error fetching payment:",c),_e(u))))),Gh(c=>c.status===Li.PENDING,!0))))}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Oi=(()=>{let t=class t{setLinkInformation(n){this.linkInformation.set(n)}setPaymentInput(n,i){this.paymentMethod=n,this.paymentNumber=i}getLinkInformation(){return this.linkInformation()}getPaymentMethod(){return this.paymentMethod}getPaymentNumber(){return this.paymentNumber}getPayment(){return this.payment()}clear(){this.payment.set({}),this.paymentNumber="",this.paymentMethod="",this.linkInformation.set({})}constructor(){this.linkInformation=bo({}),this.paymentMethod="",this.paymentNumber="",this.payment=bo({})}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var NO=e=>({color:e}),vx=e=>({"background-color":e}),RO=e=>["/payment",e];function kO(e,t){if(e&1&&(te(0,"div",9)(1,"label",10),ye(2,"Nota"),ue(),te(3,"p",11),ye(4),ue()()),e&2){let r=Cc();Pe(4),ur(r.info==null?null:r.info.short_description)}}function FO(e,t){if(e&1&&(te(0,"button",26),ut(1,"img",27),ue()),e&2){let r=t.$implicit;lt("routerLink",Va(4,RO,r.name)),Pe(),lt("src",r.logo,Op)("alt",r.name)("ngStyle",Va(6,vx,r.color))}}var yx=(()=>{let t=class t{constructor(n,i,s,o){this.router=n,this.route=i,this.paymentServ=s,this.linkServ=o,this.customPurple="#6D50E3",this.linkId="",this.paymentServs=[],this.info=null,this.pusherServ=re(gf)}ngOnInit(){this.pusherServ.listen("paymentss","payment-push",n=>{console.log(`Push: ${n}`)}),this.pusherServ.listen("paymments","payment-qrcode",n=>{console.log(`QrCode: ${n}`)}),this.paymentServ.makePayment(),this.linkServ.clear(),this.linkId=this.route.snapshot.paramMap.get("linkId"),this.paymentServ.getLinkInformation(this.linkId).subscribe({next:n=>{n.status!==pf.PENDING&&n.status!==pf.ACTIVE&&this.router.navigate([n.status?.toLowerCase()]),this.info=n,this.linkServ.setLinkInformation(n)},error:n=>{this.router.navigate(["not-found"])}}),this.paymentServ.getAvailablePaymentServices().subscribe({next:n=>{this.paymentServs=n,this.paymentServs.forEach(i=>{switch(i.name){case"iMali":i.color="#FFFFFF";break;case"eMola":i.color="#F37227";break;case"mKesh":i.color="#FFD200";break;case"MPesa":i.color="#E70101";break}})}})}};t.\u0275fac=function(i){return new(i||t)(Ee(cn),Ee(un),Ee(vf),Ee(Oi))},t.\u0275cmp=dt({type:t,selectors:[["app-home"]],standalone:!0,features:[Ct],decls:41,vars:17,consts:[[1,"flex"],[1,"h-screen","flex-[7]","flex","flex-col","justify-center","items-center","bg-slate-200"],[1,"w-full","flex","px-8","items-center","sm:justify-center","md:space-x-16","pb-4","pt-24"],[1,"flex","flex-col","space-y-2","ml-2"],[1,"text-sm","md:text-base","truncate","w-56","sm:w-64","md:w-72","lg:w-96"],[1,"font-bold"],[1,"text-sm","lg:text-3xl"],["colorLight","#E2E8F0",3,"qrdata"],[1,"space-y-5"],[1,"w-screen","max-w-[21rem]","md:max-w-xl","px-4","py-3","rounded-lg","shadow-sm","bg-white"],[1,"block","text-sm","text-gray-400"],[1,"mt-1","text-base","text-black","font-semibold"],["class","w-screen max-w-[21rem] md:max-w-xl px-4 py-3 rounded-lg shadow-sm bg-white",4,"ngIf"],[1,"grid","grid-cols-2","gap-6","py-20"],["class","flex justify-center items-center",3,"routerLink",4,"ngFor","ngForOf"],[1,"text-center","pb-20"],[1,"text-gray-400"],["href","https://imali.co.mz/politicas-de-privacidade/","target","_blank",1,"no-underline",3,"ngStyle"],[1,"flex-[3]","bg-slate-200","hidden","lg:block"],[1,"flex","flex-col","justify-evenly","items-center","h-screen","rounded-s-[2rem]",3,"ngStyle"],["src","assets/images/imali_logo_white.png","alt","imali_logo",1,"w-20"],[1,"text-white","py-10"],["href","https://imali.co.mz/","target","_blank",1,"text-white","underline"],[1,"relative"],["src","assets/images/tv.png","alt","tv",1,"h-44"],["src","assets/images/lightbulb.png","alt","lightbulb",1,"h-52","absolute","bottom-0","left-0","translate-x-[-44%]","translate-y-[30%]"],[1,"flex","justify-center","items-center",3,"routerLink"],[1,"w-44","h-16","object-contain","rounded-full",3,"src","alt","ngStyle"]],template:function(i,s){i&1&&(te(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),ye(5," Comerciante: "),te(6,"span",5),ye(7),ue()(),te(8,"p",6)(9,"span",5),ye(10),wo(11,"currency"),ue(),te(12,"span"),ye(13," MZN "),ue()()(),te(14,"div"),ut(15,"qrcode",7),ue()(),te(16,"div",8)(17,"div",9)(18,"label",10),ye(19,"Nome do produto"),ue(),te(20,"p",11),ye(21),ue()(),wi(22,kO,5,1,"div",12),ue(),te(23,"div",13),wi(24,FO,2,8,"button",14),ue(),te(25,"div",15)(26,"p",16),ye(27,"Ao realizar um pagamento, concorda com os nossos"),ue(),te(28,"a",17),ye(29,"Termos de Servi\xE7o Gerais"),ue()()(),te(30,"div",18)(31,"div",19)(32,"div"),ut(33,"img",20),te(34,"p",21),ye(35,"Aproveita o teu dinheiro da melhor forma."),ue(),te(36,"a",22),ye(37,"Saber Mais"),ue()(),te(38,"div",23),ut(39,"img",24)(40,"img",25),ue()()()()),i&2&&(Pe(7),ur(s.info==null?null:s.info.store_name),Pe(3),ur(To(11,8,s.info==null?null:s.info.amount,"","","1.2-2")),Pe(5),lt("qrdata","Your data string"),Pe(6),ur(s.info==null?null:s.info.title),Pe(),lt("ngIf",(s.info==null?null:s.info.short_description)!=null),Pe(2),lt("ngForOf",s.paymentServs),Pe(4),lt("ngStyle",Va(13,NO,s.customPurple)),Pe(3),lt("ngStyle",Va(15,vx,s.customPurple)))},dependencies:[_c,Dc,cx,ux,Mo,Ac,sS],styles:["/*# sourceMappingURL=home.component.css.map */"]});let e=t;return e})();var _x=(()=>{let t=class t{constructor(n,i){this._renderer=n,this._elementRef=i,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(n,i){this._renderer.setProperty(this._elementRef.nativeElement,n,i)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}};t.\u0275fac=function(i){return new(i||t)(Ee(ln),Ee(Sr))},t.\u0275dir=Lt({type:t});let e=t;return e})(),LO=(()=>{let t=class t extends _x{};t.\u0275fac=(()=>{let n;return function(s){return(n||(n=ei(t)))(s||t)}})(),t.\u0275dir=Lt({type:t,features:[Ur]});let e=t;return e})(),Dx=new De("");var OO={provide:Dx,useExisting:bi(()=>If),multi:!0};function BO(){let e=si()?si().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}var VO=new De(""),If=(()=>{let t=class t extends _x{constructor(n,i,s){super(n,i),this._compositionMode=s,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!BO())}writeValue(n){let i=n??"";this.setProperty("value",i)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}};t.\u0275fac=function(i){return new(i||t)(Ee(ln),Ee(Sr),Ee(VO,8))},t.\u0275dir=Lt({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,s){i&1&&bt("input",function(a){return s._handleInput(a.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(a){return s._compositionEnd(a.target.value)})},features:[Io([OO]),Ur]});let e=t;return e})();function UO(e){return e==null||(typeof e=="string"||Array.isArray(e))&&e.length===0}function jO(e){return e!=null&&typeof e.length=="number"}var wf=new De(""),Ax=new De("");function HO(e){return t=>jO(t.value)&&t.value.length>e?{maxlength:{requiredLength:e,actualLength:t.value.length}}:null}function qO(e){if(!e)return Ug;let t,r;return typeof e=="string"?(r="",e.charAt(0)!=="^"&&(r+="^"),r+=e,e.charAt(e.length-1)!=="$"&&(r+="$"),t=new RegExp(r)):(r=e.toString(),t=e),n=>{if(UO(n.value))return null;let i=n.value;return t.test(i)?null:{pattern:{requiredPattern:r,actualValue:i}}}}function Ug(e){return null}function Mx(e){return e!=null}function Px(e){return ni(e)?Tt(e):e}function Nx(e){let t={};return e.forEach(r=>{t=r!=null?me(me({},t),r):t}),Object.keys(t).length===0?null:t}function Rx(e,t){return t.map(r=>r(e))}function GO(e){return!e.validate}function kx(e){return e.map(t=>GO(t)?t:r=>t.validate(r))}function zO(e){if(!e)return null;let t=e.filter(Mx);return t.length==0?null:function(r){return Nx(Rx(r,t))}}function Gg(e){return e!=null?zO(kx(e)):null}function $O(e){if(!e)return null;let t=e.filter(Mx);return t.length==0?null:function(r){let n=Rx(r,t).map(Px);return Bh(n).pipe(Ae(Nx))}}function zg(e){return e!=null?$O(kx(e)):null}function Cx(e,t){return e===null?[t]:Array.isArray(e)?[...e,t]:[e,t]}function KO(e){return e._rawValidators}function WO(e){return e._rawAsyncValidators}function jg(e){return e?Array.isArray(e)?e:[e]:[]}function bf(e,t){return Array.isArray(e)?e.includes(t):e===t}function Ex(e,t){let r=jg(t);return jg(e).forEach(i=>{bf(r,i)||r.push(i)}),r}function bx(e,t){return jg(t).filter(r=>!bf(e,r))}var Sf=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Gg(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=zg(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,r){return this.control?this.control.hasError(t,r):!1}getError(t,r){return this.control?this.control.getError(t,r):null}},Wo=class extends Sf{get formDirective(){return null}get path(){return null}},xl=class extends Sf{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},xf=class{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},QO={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},z$=at(me({},QO),{"[class.ng-submitted]":"isSubmitted"}),Fx=(()=>{let t=class t extends xf{constructor(n){super(n)}};t.\u0275fac=function(i){return new(i||t)(Ee(xl,2))},t.\u0275dir=Lt({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,s){i&2&&xo("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},features:[Ur]});let e=t;return e})(),Lx=(()=>{let t=class t extends xf{constructor(n){super(n)}};t.\u0275fac=function(i){return new(i||t)(Ee(Wo,10))},t.\u0275dir=Lt({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,s){i&2&&xo("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)("ng-submitted",s.isSubmitted)},features:[Ur]});let e=t;return e})();var El="VALID",Cf="INVALID",Ko="PENDING",bl="DISABLED";function $g(e){return(Tf(e)?e.validators:e)||null}function YO(e){return Array.isArray(e)?Gg(e):e||null}function Kg(e,t){return(Tf(t)?t.asyncValidators:e)||null}function ZO(e){return Array.isArray(e)?zg(e):e||null}function Tf(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function Ox(e,t,r){let n=e.controls;if(!(t?Object.keys(n):n).length)throw new ve(1e3,"");if(!n[r])throw new ve(1001,"")}function Bx(e,t,r){e._forEachChild((n,i)=>{if(r[i]===void 0)throw new ve(1002,"")})}var Qo=class{constructor(t,r){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(r)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===El}get invalid(){return this.status===Cf}get pending(){return this.status==Ko}get disabled(){return this.status===bl}get enabled(){return this.status!==bl}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Ex(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ex(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(bx(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(bx(t,this._rawAsyncValidators))}hasValidator(t){return bf(this._rawValidators,t)}hasAsyncValidator(t){return bf(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(r=>{r.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=Ko,t.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){let r=this._parentMarkedDirty(t.onlySelf);this.status=bl,this.errors=null,this._forEachChild(n=>{n.disable(at(me({},t),{onlySelf:!0}))}),this._updateValue(),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(at(me({},t),{skipPristineCheck:r})),this._onDisabledChange.forEach(n=>n(!0))}enable(t={}){let r=this._parentMarkedDirty(t.onlySelf);this.status=El,this._forEachChild(n=>{n.enable(at(me({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(at(me({},t),{skipPristineCheck:r})),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===El||this.status===Ko)&&this._runAsyncValidator(t.emitEvent)),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(r=>r._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?bl:El}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Ko,this._hasOwnPendingAsyncValidator=!0;let r=Px(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(n=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(n,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,r={}){this.errors=t,this._updateControlsErrors(r.emitEvent!==!1)}get(t){let r=t;return r==null||(Array.isArray(r)||(r=r.split(".")),r.length===0)?null:r.reduce((n,i)=>n&&n._find(i),this)}getError(t,r){let n=r?this.get(r):this;return n&&n.errors?n.errors[t]:null}hasError(t,r){return!!this.getError(t,r)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new Rt,this.statusChanges=new Rt}_calculateStatus(){return this._allControlsDisabled()?bl:this.errors?Cf:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ko)?Ko:this._anyControlsHaveStatus(Cf)?Cf:El}_anyControlsHaveStatus(t){return this._anyControls(r=>r.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Tf(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let r=this._parent&&this._parent.dirty;return!t&&!!r&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=YO(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=ZO(this._rawAsyncValidators)}},Yo=class extends Qo{constructor(t,r,n){super($g(r),Kg(n,r)),this.controls=t,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,r){return this.controls[t]?this.controls[t]:(this.controls[t]=r,r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange),r)}addControl(t,r,n={}){this.registerControl(t,r),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(t,r={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}setControl(t,r,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],r&&this.registerControl(t,r),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,r={}){Bx(this,!0,t),Object.keys(t).forEach(n=>{Ox(this,!0,n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(t,r={}){t!=null&&(Object.keys(t).forEach(n=>{let i=this.controls[n];i&&i.patchValue(t[n],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(t={},r={}){this._forEachChild((n,i)=>{n.reset(t?t[i]:null,{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r),this._updateTouched(r),this.updateValueAndValidity(r)}getRawValue(){return this._reduceChildren({},(t,r,n)=>(t[n]=r.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(r,n)=>n._syncPendingControls()?!0:r);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(r=>{let n=this.controls[r];n&&t(n,r)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[r,n]of Object.entries(this.controls))if(this.contains(r)&&t(n))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(r,n,i)=>((n.enabled||this.disabled)&&(r[i]=n.value),r))}_reduceChildren(t,r){let n=t;return this._forEachChild((i,s)=>{n=r(n,i,s)}),n}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Hg=class extends Yo{};var _f=new De("CallSetDisabledState",{providedIn:"root",factory:()=>Df}),Df="always";function XO(e,t){return[...t.path,e]}function Vx(e,t,r=Df){Ux(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||r==="always")&&t.valueAccessor.setDisabledState?.(e.disabled),eB(e,t),rB(e,t),tB(e,t),JO(e,t)}function Sx(e,t){e.forEach(r=>{r.registerOnValidatorChange&&r.registerOnValidatorChange(t)})}function JO(e,t){if(t.valueAccessor.setDisabledState){let r=n=>{t.valueAccessor.setDisabledState(n)};e.registerOnDisabledChange(r),t._registerOnDestroy(()=>{e._unregisterOnDisabledChange(r)})}}function Ux(e,t){let r=KO(e);t.validator!==null?e.setValidators(Cx(r,t.validator)):typeof r=="function"&&e.setValidators([r]);let n=WO(e);t.asyncValidator!==null?e.setAsyncValidators(Cx(n,t.asyncValidator)):typeof n=="function"&&e.setAsyncValidators([n]);let i=()=>e.updateValueAndValidity();Sx(t._rawValidators,i),Sx(t._rawAsyncValidators,i)}function eB(e,t){t.valueAccessor.registerOnChange(r=>{e._pendingValue=r,e._pendingChange=!0,e._pendingDirty=!0,e.updateOn==="change"&&jx(e,t)})}function tB(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,e.updateOn==="blur"&&e._pendingChange&&jx(e,t),e.updateOn!=="submit"&&e.markAsTouched()})}function jx(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function rB(e,t){let r=(n,i)=>{t.valueAccessor.writeValue(n),i&&t.viewToModelUpdate(n)};e.registerOnChange(r),t._registerOnDestroy(()=>{e._unregisterOnChange(r)})}function nB(e,t){e==null,Ux(e,t)}function iB(e,t){if(!e.hasOwnProperty("model"))return!1;let r=e.model;return r.isFirstChange()?!0:!Object.is(t,r.currentValue)}function sB(e){return Object.getPrototypeOf(e.constructor)===LO}function oB(e,t){e._syncPendingControls(),t.forEach(r=>{let n=r.control;n.updateOn==="submit"&&n._pendingChange&&(r.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function aB(e,t){if(!t)return null;Array.isArray(t);let r,n,i;return t.forEach(s=>{s.constructor===If?r=s:sB(s)?n=s:i=s}),i||n||r||null}var lB={provide:Wo,useExisting:bi(()=>Wg)},Sl=Promise.resolve(),Wg=(()=>{let t=class t extends Wo{constructor(n,i,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._directives=new Set,this.ngSubmit=new Rt,this.form=new Yo({},Gg(n),zg(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(n){Sl.then(()=>{let i=this._findContainer(n.path);n.control=i.registerControl(n.name,n.control),Vx(n.control,n,this.callSetDisabledState),n.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(n)})}getControl(n){return this.form.get(n.path)}removeControl(n){Sl.then(()=>{let i=this._findContainer(n.path);i&&i.removeControl(n.name),this._directives.delete(n)})}addFormGroup(n){Sl.then(()=>{let i=this._findContainer(n.path),s=new Yo({});nB(s,n),i.registerControl(n.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(n){Sl.then(()=>{let i=this._findContainer(n.path);i&&i.removeControl(n.name)})}getFormGroup(n){return this.form.get(n.path)}updateModel(n,i){Sl.then(()=>{this.form.get(n.path).setValue(i)})}setValue(n){this.control.setValue(n)}onSubmit(n){return this.submitted=!0,oB(this.form,this._directives),this.ngSubmit.emit(n),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submitted=!1}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(n){return n.pop(),n.length?this.form.get(n):this.form}};t.\u0275fac=function(i){return new(i||t)(Ee(wf,10),Ee(Ax,10),Ee(_f,8))},t.\u0275dir=Lt({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,s){i&1&&bt("submit",function(a){return s.onSubmit(a)})("reset",function(){return s.onReset()})},inputs:{options:[kt.None,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Io([lB]),Ur]});let e=t;return e})();function xx(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}function Ix(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===2&&"value"in e&&"disabled"in e}var Ef=class extends Qo{constructor(t=null,r,n){super($g(r),Kg(n,r)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(r),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Tf(r)&&(r.nonNullable||r.initialValueIsDefault)&&(Ix(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,r={}){this.value=this._pendingValue=t,this._onChange.length&&r.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,r.emitViewToModelChange!==!1)),this.updateValueAndValidity(r)}patchValue(t,r={}){this.setValue(t,r)}reset(t=this.defaultValue,r={}){this._applyFormState(t),this.markAsPristine(r),this.markAsUntouched(r),this.setValue(this.value,r),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){xx(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){xx(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Ix(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var uB={provide:xl,useExisting:bi(()=>Qg)},wx=Promise.resolve(),Qg=(()=>{let t=class t extends xl{constructor(n,i,s,o,a,l){super(),this._changeDetectorRef=a,this.callSetDisabledState=l,this.control=new Ef,this._registered=!1,this.name="",this.update=new Rt,this._parent=n,this._setValidators(i),this._setAsyncValidators(s),this.valueAccessor=aB(this,o)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let i=n.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),iB(n,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Vx(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(n){wx.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let i=n.isDisabled.currentValue,s=i!==0&&Ss(i);wx.then(()=>{s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?XO(n,this._parent):[n]}};t.\u0275fac=function(i){return new(i||t)(Ee(Wo,9),Ee(wf,10),Ee(Ax,10),Ee(Dx,10),Ee(bs,8),Ee(_f,8))},t.\u0275dir=Lt({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[kt.None,"disabled","isDisabled"],model:[kt.None,"ngModel","model"],options:[kt.None,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Io([uB]),Ur,Br]});let e=t;return e})(),Hx=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=Lt({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let e=t;return e})();var cB=new De("");function fB(e){return typeof e=="number"?e:parseInt(e,10)}var qx=(()=>{let t=class t{constructor(){this._validator=Ug}ngOnChanges(n){if(this.inputName in n){let i=this.normalizeInput(n[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Ug,this._onChange&&this._onChange()}}validate(n){return this._validator(n)}registerOnValidatorChange(n){this._onChange=n}enabled(n){return n!=null}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=Lt({type:t,features:[Br]});let e=t;return e})();var hB={provide:wf,useExisting:bi(()=>Yg),multi:!0},Yg=(()=>{let t=class t extends qx{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=n=>fB(n),this.createValidator=n=>HO(n)}};t.\u0275fac=(()=>{let n;return function(s){return(n||(n=ei(t)))(s||t)}})(),t.\u0275dir=Lt({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,s){i&2&&Ti("maxlength",s._enabled?s.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Io([hB]),Ur]});let e=t;return e})(),dB={provide:wf,useExisting:bi(()=>Zg),multi:!0},Zg=(()=>{let t=class t extends qx{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=n=>n,this.createValidator=n=>qO(n)}};t.\u0275fac=(()=>{let n;return function(s){return(n||(n=ei(t)))(s||t)}})(),t.\u0275dir=Lt({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(i,s){i&2&&Ti("pattern",s._enabled?s.pattern:null)},inputs:{pattern:"pattern"},features:[Io([dB]),Ur]});let e=t;return e})();var Gx=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=sn({type:t}),t.\u0275inj=nn({});let e=t;return e})(),qg=class extends Qo{constructor(t,r,n){super($g(r),Kg(n,r)),this.controls=t,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,r={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}insert(t,r,n={}){this.controls.splice(t,0,r),this._registerControl(r),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(t,r={}){let n=this._adjustIndex(t);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:r.emitEvent})}setControl(t,r,n={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),r&&(this.controls.splice(i,0,r),this._registerControl(r)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,r={}){Bx(this,!1,t),t.forEach((n,i)=>{Ox(this,!1,i),this.at(i).setValue(n,{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(t,r={}){t!=null&&(t.forEach((n,i)=>{this.at(i)&&this.at(i).patchValue(n,{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(t=[],r={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r),this._updateTouched(r),this.updateValueAndValidity(r)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(r=>r._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((r,n)=>n._syncPendingControls()?!0:r,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((r,n)=>{t(r,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(r=>r.enabled&&t(r))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Tx(e){return!!e&&(e.asyncValidators!==void 0||e.validators!==void 0||e.updateOn!==void 0)}var pB=(()=>{let t=class t{constructor(){this.useNonNullable=!1}get nonNullable(){let n=new t;return n.useNonNullable=!0,n}group(n,i=null){let s=this._reduceControls(n),o={};return Tx(i)?o=i:i!==null&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Yo(s,o)}record(n,i=null){let s=this._reduceControls(n);return new Hg(s,i)}control(n,i,s){let o={};return this.useNonNullable?(Tx(i)?o=i:(o.validators=i,o.asyncValidators=s),new Ef(n,at(me({},o),{nonNullable:!0}))):new Ef(n,i,s)}array(n,i,s){let o=n.map(a=>this._createControl(a));return new qg(o,i,s)}_reduceControls(n){let i={};return Object.keys(n).forEach(s=>{i[s]=this._createControl(n[s])}),i}_createControl(n){if(n instanceof Ef)return n;if(n instanceof Qo)return n;if(Array.isArray(n)){let i=n[0],s=n.length>1?n[1]:null,o=n.length>2?n[2]:null;return this.control(i,s,o)}else return this.control(n)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),zx=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:()=>re(pB).nonNullable,providedIn:"root"});let e=t;return e})();var Af=(()=>{let t=class t{static withConfig(n){return{ngModule:t,providers:[{provide:_f,useValue:n.callSetDisabledState??Df}]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=sn({type:t}),t.\u0275inj=nn({imports:[Gx]});let e=t;return e})(),$x=(()=>{let t=class t{static withConfig(n){return{ngModule:t,providers:[{provide:cB,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:_f,useValue:n.callSetDisabledState??Df}]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=sn({type:t}),t.\u0275inj=nn({imports:[Gx]});let e=t;return e})();function mB(e,t){if(e&1&&(te(0,"div",4),ye(1),ue()),e&2){let r=Cc();Pe(),Ar(`
`,r.errorMessage,`
`)}}var Wx=(()=>{let t=class t{constructor(){this.label="",this.placeholder="",this.value="",this.errorMessage="Invalid input",this.pattern=".*",this.maxLength=null,this.startValidate=!1,this.valueChange=new Rt,this.isFocused=!1}onInputChange(n){this.value=n,this.valueChange.emit(n)}isValid(){return new RegExp(this.pattern).test(this.value)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=dt({type:t,selectors:[["app-input-field"]],inputs:{label:"label",placeholder:"placeholder",value:"value",errorMessage:"errorMessage",pattern:"pattern",maxLength:"maxLength",startValidate:"startValidate"},outputs:{valueChange:"valueChange"},standalone:!0,features:[Ct],decls:5,vars:14,consts:[[1,"relative","w-[25rem]","lg:w-screen","max-w-[80vw]","lg:max-w-[35vw]","px-6","py-3","rounded-3xl","shadow-sm","bg-white"],["for","input",1,"absolute","left-6","top-4","transition-all","text-xl","pointer-events-none"],["id","input","type","text",1,"block","w-full","bg-white","px-4","mt-4","text-gray-900","placeholder-transparent","rounded-lg","focus:outline-none","text-xl",3,"ngModelChange","focus","blur","ngModel","placeholder","pattern","maxlength"],["class","text-red-500 text-base mt-2 ml-5",4,"ngIf"],[1,"text-red-500","text-base","mt-2","ml-5"]],template:function(i,s){i&1&&(te(0,"div",0)(1,"label",1),ye(2),ue(),te(3,"input",2),Jp("ngModelChange",function(a){return PE(s.value,a)||(s.value=a),a}),bt("ngModelChange",function(a){return s.onInputChange(a)})("focus",function(){return s.isFocused=!0})("blur",function(){return s.isFocused=s.value!==""}),ue()(),wi(4,mB,2,1,"div",3)),i&2&&(Pe(),xo("text-gray-400",!s.value&&!s.isFocused)("text-xs",s.value||s.isFocused)("text-gray-500",s.value||s.isFocused)("-translate-y-3",s.value||s.isFocused),Pe(),Ar(" ",s.label," "),Pe(),Xp("ngModel",s.value),lt("placeholder",s.isFocused?"":s.placeholder)("pattern",s.pattern)("maxlength",s.maxLength),Pe(),lt("ngIf",s.startValidate&&!s.isValid()))},dependencies:[Af,If,Fx,Yg,Zg,Qg,Dc],encapsulation:2});let e=t;return e})();var Qx=(()=>{let t=class t{constructor(n,i,s,o){this.router=n,this.route=i,this.location=s,this.linkServ=o,this.linkInfo={},this.paymentMethod="",this.paymentNumber=bo(""),this.submited=!1,this.nb=re(zx),this.form=this.nb.group({paymentNr:this.nb.control("")})}ngOnInit(){this.linkInfo=this.linkServ.getLinkInformation(),this.linkInfo.amount==null&&this.goBack(),this.paymentMethod=this.route.snapshot.paramMap.get("method"),this.paymentNumber.set(this.linkServ.getPaymentNumber())}goBack(){this.linkServ.setPaymentInput("",""),this.location.back()}getPattern(){switch(this.paymentMethod){case"mKesh":return"^8(2|3)[0-9]{7}$";case"MPesa":return"^8(4|5)[0-9]{7}$";case"eMola":return"^8(6|7)[0-9]{7}$";default:return"^8[2-7][0-9]{7}|[2-9][0-9]{8}$"}}onSubmit(){RegExp(this.getPattern()).test(this.paymentNumber())?(this.linkServ.setPaymentInput(this.paymentMethod,this.paymentNumber()),this.router.navigate(["pay/confirmation"])):this.submited=!0}};t.\u0275fac=function(i){return new(i||t)(Ee(cn),Ee(un),Ee(Mr),Ee(Oi))},t.\u0275cmp=dt({type:t,selectors:[["app-payment-form"]],standalone:!0,features:[Ct],decls:33,vars:15,consts:[[1,"flex","bg-slate-200",3,"keydown.enter"],[1,"h-screen","flex-[7]","flex","flex-col","justify-center"],[1,"flex","flex-col"],[1,"space-y-8","px-[3rem]","sm:px-[9rem]","md:px-[12rem]","lg:px-[14rem]","xl:px-[16rem]","2xl:px-[18rem]"],[3,"click"],["src","assets/images/left_arrow.png","alt","back",3,"width"],[1,"text-2xl","sm:text-3xl","lg:text-2xl","xl:text-4xl","font-bold"],[1,"space-y-3"],[1,"text-sm","md:text-base"],[1,"font-bold"],[1,"text-2xl","md:text-3xl"],[1,"flex","justify-center","py-10"],[3,"valueChange","label","value","pattern","maxLength","startValidate","errorMessage"],[1,"flex","justify-center","py-20"],[1,"w-[50vw]","lg:w-[25vw]"],["type","submit",1,"w-full","py-2","rounded-full","bg-customGreen","text-xl","text-white",3,"click"],[1,"flex-[3]","hidden","lg:block"],[1,"flex","flex-col","justify-around","items-center","h-screen","rounded-s-[2rem]","bg-white","drop-shadow-md"],["src","assets/images/imali_logo.png","alt","imali_logo",1,"w-20"],[1,"py-10"],["href","https://imali.co.mz/","target","_blank",1,"underline"]],template:function(i,s){i&1&&(te(0,"div",0),bt("keydown.enter",function(){return s.onSubmit()},!1,cc),te(1,"div",1)(2,"div",2)(3,"div",3)(4,"button",4),bt("click",function(){return s.goBack()}),ut(5,"img",5),ue(),te(6,"p",6),ye(7),ue(),te(8,"div",7)(9,"p",8),ye(10," Comerciante: "),te(11,"span",9),ye(12),ue()(),te(13,"p",10)(14,"span",9),ye(15),wo(16,"currency"),ue(),te(17,"span"),ye(18," MZN "),ue()()()()(),te(19,"form",11)(20,"app-input-field",12),bt("valueChange",function(a){return s.paymentNumber.set(a)}),ue()(),te(21,"div",13)(22,"div",14)(23,"button",15),bt("click",function(){return s.onSubmit()}),ye(24," Continuar "),ue()()()(),te(25,"div",16)(26,"div",17)(27,"div"),ut(28,"img",18),te(29,"p",19),ye(30,"Aproveita o teu dinheiro da melhor forma."),ue(),te(31,"a",20),ye(32,"Saber Mais"),ue()()()()()),i&2&&(Pe(5),lt("width",20),Pe(2),Ar('A pagar com "',s.paymentMethod,'"'),Pe(5),ur(s.linkInfo.store_name),Pe(3),ur(To(16,10,s.linkInfo.amount,"","","1.2-2")),Pe(5),lt("label",s.paymentMethod==="iMali"?"N\xFAmero de telefone ou conta":"N\xFAmero de telefone")("value",s.paymentNumber())("pattern",s.getPattern())("maxLength",9)("startValidate",s.submited)("errorMessage",s.paymentMethod==="iMali"?"N\xFAmero de telefone ou conta esta invalido!":"N\xFAmero de telefone invalido!"))},dependencies:[Mo,Wx,Af,Hx,Lx,Wg]});let e=t;return e})();function Xg(e){e||(NC(Xg),e=re(ac));let t=new je(r=>e.onDestroy(r.next.bind(r)));return r=>r.pipe(gi(t))}var gB=["container"],Yx=new De("LottieOptions");function vB(){let e=re(_t),{player:t,useWebWorker:r}=re(Yx),n=e.runOutsideAngular(()=>t());return(ni(n)?Tt(n).pipe(Ae(s=>s.default||s)):_e(n)).pipe(Ht(s=>s.useWebWorker?.(r)),qh({bufferSize:1,refCount:!0}))}var yB=(()=>{let t=class t{constructor(){this.player$=vB().pipe(Vt(n=>CB(this.ngZone).pipe(Ae(()=>n)))),this.ngZone=re(_t)}loadAnimation(n){return this.player$.pipe(Ae(i=>this.createAnimationItem(i,n)))}resolveOptions(n,i){return Object.assign({container:i,renderer:"svg",loop:!0,autoplay:!0},n)}createAnimationItem(n,i){return this.ngZone.runOutsideAngular(()=>n.loadAnimation(i))}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=Ce({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function CB(e){return new je(t=>{let r=e.runOutsideAngular(()=>requestAnimationFrame(()=>{t.next(),t.complete()}));return()=>cancelAnimationFrame(r)})}function Zx(e){return[{provide:Yx,useValue:e}]}var EB=(()=>{let t=class t{constructor(){this.options=Co(null),this.containerClass=Co(null),this.styles=Co(null),this.animationCreated=this.getAnimationItem(),this.complete=this.awaitAnimationItemAndStartListening("complete"),this.loopComplete=this.awaitAnimationItemAndStartListening("loopComplete"),this.enterFrame=this.awaitAnimationItemAndStartListening("enterFrame"),this.segmentStart=this.awaitAnimationItemAndStartListening("segmentStart"),this.configReady=this.awaitAnimationItemAndStartListening("config_ready"),this.dataReady=this.awaitAnimationItemAndStartListening("data_ready"),this.domLoaded=this.awaitAnimationItemAndStartListening("DOMLoaded"),this.destroy=this.awaitAnimationItemAndStartListening("destroy"),this.error=this.awaitAnimationItemAndStartListening("error"),this.ngZone=re(_t),this.isBrowser=rb(re(Tn)),this.animationLoader=re(yB),this.loadAnimation$=new Mt,this.animationItem$=new $t(null),this.setupLoadAnimationListener()}ngOnDestroy(){this.destroyAnimation()}loadAnimation(n,i){this.ngZone.runOutsideAngular(()=>this.loadAnimation$.next([n,i]))}getAnimationItem(){return ro(()=>this.animationItem$).pipe(lr(n=>n!==null))}awaitAnimationItemAndStartListening(n){return this.getAnimationItem().pipe(jt(i=>new je(s=>{this.ngZone.runOutsideAngular(()=>{i.addEventListener(n,o=>{this.ngZone.runOutsideAngular(()=>{s.next(o)})})})})))}setupLoadAnimationListener(){this.loadAnimation$.pipe(lr(([i])=>this.isBrowser&&i.options!==void 0)).pipe(jt(([i,s])=>(this.destroyAnimation(),this.animationLoader.loadAnimation(this.animationLoader.resolveOptions(i.options.currentValue,s)))),Xg()).subscribe(i=>{this.ngZone.run(()=>this.animationItem$.next(i))})}destroyAnimation(){let n=this.animationItem$.getValue();n!==null&&(n.destroy(),this.animationItem$.next(null))}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=Lt({type:t,selectors:[["","lottie",""]],inputs:{options:[kt.SignalBased,"options"],containerClass:[kt.SignalBased,"containerClass"],styles:[kt.SignalBased,"styles"]},outputs:{animationCreated:"animationCreated",complete:"complete",loopComplete:"loopComplete",enterFrame:"enterFrame",segmentStart:"segmentStart",configReady:"configReady",dataReady:"dataReady",domLoaded:"domLoaded",destroy:"destroy",error:"error"}});let e=t;return e})();var Mn=(()=>{let t=class t extends EB{constructor(){super(...arguments),this.width=Co(null),this.height=Co(null),this.container=null}ngOnChanges(n){super.loadAnimation(n,this.container.nativeElement)}};t.\u0275fac=(()=>{let n;return function(s){return(n||(n=ei(t)))(s||t)}})(),t.\u0275cmp=dt({type:t,selectors:[["ng-lottie"]],viewQuery:function(i,s){if(i&1&&Ec(gB,7),i&2){let o;Oa(o=Ba())&&(s.container=o.first)}},inputs:{width:[kt.SignalBased,"width"],height:[kt.SignalBased,"height"]},standalone:!0,features:[Ur,Br,Ct],decls:2,vars:6,consts:[["container",""],[3,"ngStyle","ngClass"]],template:function(i,s){i&1&&ut(0,"div",1,0),i&2&&(vc("width",s.width()||"100%")("height",s.height()||"100%"),lt("ngStyle",s.styles())("ngClass",s.containerClass()))},dependencies:[Ac,tb],encapsulation:2,changeDetection:0});let e=t;return e})();var Xx=(()=>{let t=class t{constructor(){this.options={path:"assets/animations/not-found.json"}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=dt({type:t,selectors:[["app-not-found"]],standalone:!0,features:[Ct],decls:4,vars:1,consts:[[1,"h-screen","flex","flex-col","justify-center","items-center"],[3,"options"],[1,"text-2xl","sm:text-5xl","font-semibold","text-[#009D90]"]],template:function(i,s){i&1&&(te(0,"div",0),ut(1,"ng-lottie",1),te(2,"p",2),ye(3," P\xE1gina n\xE3o foi encontrada "),ue()()),i&2&&(Pe(),lt("options",s.options))},dependencies:[Mn]});let e=t;return e})();var Jx=(()=>{let t=class t{constructor(n,i,s){this.router=n,this.location=i,this.linkServ=s,this.linkInfo={}}ngOnInit(){this.linkInfo=this.linkServ.getLinkInformation(),this.linkInfo.amount==null&&this.goBack()}goBack(){this.location.back()}confirm(){this.router.navigate(["pay/processing"])}};t.\u0275fac=function(i){return new(i||t)(Ee(cn),Ee(Mr),Ee(Oi))},t.\u0275cmp=dt({type:t,selectors:[["app-payment-confirmation"]],standalone:!0,features:[Ct],decls:49,vars:11,consts:[[1,"flex","bg-slate-200",3,"keydown.enter"],[1,"h-screen","flex-[7]","flex","flex-col","justify-center"],[1,"flex","justify-center","mr-[22rem]","py-10"],[3,"click"],["src","assets/images/left_arrow.png","alt","back",3,"width"],[1,"text-4xl","text-center","font-semibold","md:ml-[7rem]"],[1,"md:ml-[8rem]"],[1,"space-y-4","p-6","max-w-md","mx-auto"],[1,"bg-white","rounded-xl","p-4"],[1,"text-gray-500"],[1,"text-black","font-medium","mt-2"],[1,"flex","justify-between"],[1,"text-black","font-medium"],[1,"flex","justify-between","mt-2"],[1,"bg-white","rounded-xl","p-4","space-y-2"],[1,"flex","justify-center","md:ml-[10rem]","py-20"],[1,"w-[50vw]","md:w-[25vw]"],[1,"w-full","py-2","rounded-full","bg-customGreen","text-xl","text-white",3,"click"],[1,"flex-[3]","hidden","lg:block"],[1,"flex","flex-col","justify-around","items-center","h-screen","rounded-s-[2rem]","bg-white","drop-shadow-md"],["src","assets/images/imali_logo.png","alt","imali_logo",1,"w-20"],[1,"py-10"],["href","https://imali.co.mz/","target","_blank",1,"underline"]],template:function(i,s){i&1&&(te(0,"div",0),bt("keydown.enter",function(){return s.confirm()},!1,cc),te(1,"div",1)(2,"div",2)(3,"button",3),bt("click",function(){return s.goBack()}),ut(4,"img",4),ue()(),te(5,"h1",5),ye(6,"Confirmar Pagamento"),ue(),te(7,"div",6)(8,"div",7)(9,"div",8)(10,"span",9),ye(11,"Nome do Produto"),ue(),te(12,"p",10),ye(13),ue()(),te(14,"div",8)(15,"span",9),ye(16,"Nota"),ue(),te(17,"p",10),ye(18),ue()(),te(19,"div",8)(20,"div",11)(21,"span",9),ye(22,"Pagar para"),ue(),te(23,"span",12),ye(24),ue()(),te(25,"div",13)(26,"span",9),ye(27,"Pagar com"),ue(),te(28,"span",12),ye(29),ue()()(),te(30,"div",14)(31,"div",11)(32,"span",9),ye(33,"Montante"),ue(),te(34,"span",12),ye(35),wo(36,"currency"),ue()()()()(),te(37,"div",15)(38,"div",16)(39,"button",17),bt("click",function(){return s.confirm()}),ye(40," Continuar "),ue()()()(),te(41,"div",18)(42,"div",19)(43,"div"),ut(44,"img",20),te(45,"p",21),ye(46,"Aproveita o teu dinheiro da melhor forma."),ue(),te(47,"a",22),ye(48,"Saber Mais"),ue()()()()()),i&2&&(Pe(4),lt("width",25),Pe(9),ur(s.linkInfo.title),Pe(5),ur(s.linkInfo.short_description),Pe(6),ur(s.linkInfo.store_name),Pe(5),ur(s.linkServ.getPaymentNumber()),Pe(6),Ar("",To(36,6,s.linkInfo.amount,"","","1.2-2")," MZN"))},dependencies:[Mo]});let e=t;return e})();var eI=(()=>{let t=class t{constructor(){this.options={path:"assets/animations/expired-link.json",loop:1}}close(){$o()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=dt({type:t,selectors:[["app-expired-link"]],standalone:!0,features:[Ct],decls:9,vars:1,consts:[[1,"h-screen","flex","flex-col","space-y-10","justify-center","items-center"],[1,"h-[6.5rem]","sm:h-[8rem]","md:h-[10rem]",3,"options"],[1,"space-y-2","text-center"],[1,"font-bold","text-xl","sm:text-2xl","md:text-4xl"],[1,"text-lg","sm:text-xl","md:text-2xl"],[1,"px-16","py-2","md:px-20","md:py-3","rounded-full","text-lg","sm:text-xl","md:text-2xl","text-white","bg-[#2D2D2D]",3,"click"]],template:function(i,s){i&1&&(te(0,"div",0),ut(1,"ng-lottie",1),te(2,"div",2)(3,"p",3),ye(4,"O link expirou!"),ue(),te(5,"p",4),ye(6,"Solicita ao comerciante um novo link."),ue()(),te(7,"button",5),bt("click",function(){return s.close()}),ye(8," Sair "),ue()()),i&2&&(Pe(),lt("options",s.options))},dependencies:[Mn]});let e=t;return e})();var tI=(()=>{let t=class t{constructor(){this.options={path:"assets/animations/success.json",loop:0}}close(){$o()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=dt({type:t,selectors:[["app-used-link"]],standalone:!0,features:[Ct],decls:9,vars:1,consts:[[1,"h-screen","flex","flex-col","space-y-10","justify-center","items-center"],[1,"h-[8rem]","sm:h-[10rem]","md:h-[12rem]",3,"options"],[1,"space-y-2","text-center"],[1,"font-bold","text-xl","sm:text-2xl","md:text-4xl"],[1,"text-lg","sm:text-xl","md:text-2xl"],[1,"px-16","py-2","md:px-20","md:py-3","rounded-full","text-lg","sm:text-xl","md:text-2xl","text-white","bg-[#40AD53]",3,"click"]],template:function(i,s){i&1&&(te(0,"div",0),ut(1,"ng-lottie",1),te(2,"div",2)(3,"p",3),ye(4,"Opera\xE7\xE3o bem sucedida!"),ue(),te(5,"p",4),ye(6,"O teu pagamento foi conclu\xEDdo."),ue()(),te(7,"button",5),bt("click",function(){return s.close()}),ye(8," Sair "),ue()()),i&2&&(Pe(),lt("options",s.options))},dependencies:[Mn]});let e=t;return e})();var rI=(()=>{let t=class t{constructor(){this.options={path:"assets/animations/inactive-link.json",loop:1}}close(){$o()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=dt({type:t,selectors:[["app-inactive-link"]],standalone:!0,features:[Ct],decls:9,vars:1,consts:[[1,"h-screen","flex","flex-col","space-y-10","justify-center","items-center"],[1,"h-[6.5rem]","sm:h-[8rem]","md:h-[10rem]",3,"options"],[1,"space-y-2","text-center"],[1,"font-bold","text-xl","sm:text-2xl","md:text-4xl"],[1,"text-lg","sm:text-xl","md:text-2xl"],[1,"px-16","py-2","md:px-20","md:py-3","rounded-full","text-lg","sm:text-xl","md:text-2xl","text-white","bg-[#2D2D2D]",3,"click"]],template:function(i,s){i&1&&(te(0,"div",0),ut(1,"ng-lottie",1),te(2,"div",2)(3,"p",3),ye(4,"O link est\xE1 inactivo!"),ue(),te(5,"p",4),ye(6,"Solicita ao comerciante um novo link."),ue()(),te(7,"button",5),bt("click",function(){return s.close()}),ye(8," Sair "),ue()()),i&2&&(Pe(),lt("options",s.options))},dependencies:[Mn]});let e=t;return e})();var nI=(()=>{let t=class t{constructor(){this.options={path:"assets/animations/failed.json",loop:0},this.location=re(Mr)}tryAgain(){this.location.back()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=dt({type:t,selectors:[["app-payment-failed"]],standalone:!0,features:[Ct],decls:9,vars:1,consts:[[1,"h-screen","flex","flex-col","space-y-10","justify-center","items-center"],[1,"h-[8.5rem]","sm:h-[10rem]","md:h-[12rem]",3,"options"],[1,"space-y-2","text-center"],[1,"font-bold","text-xl","sm:text-2xl","md:text-4xl"],[1,"text-lg","sm:text-xl","md:text-2xl"],[1,"px-16","py-2","md:px-20","md:py-3","rounded-full","text-lg","sm:text-xl","md:text-2xl","text-white","bg-[#2D2D2D]",3,"click"]],template:function(i,s){i&1&&(te(0,"div",0),ut(1,"ng-lottie",1),te(2,"div",2)(3,"p",3),ye(4,"Pagamento sem sucesso!"),ue(),te(5,"p",4),ye(6,"Volte a tentar fazer o pagamento."),ue()(),te(7,"button",5),bt("click",function(){return s.tryAgain()}),ye(8," Tentar Novamente "),ue()()),i&2&&(Pe(),lt("options",s.options))},dependencies:[Mn]});let e=t;return e})();var Jg=function(e){return e.PUSH="push",e.QRCODE="qrcode",e}(Jg||{});var iI=(()=>{let t=class t{constructor(){this.minutes=0,this.seconds=0,this.countdownCompleted=new Rt,this.displayMinutes="00",this.displaySeconds="00",this.progressPercentage=100,this.circleColor="stroke-green-500"}ngOnInit(){this.totalSeconds=this.minutes*60+this.seconds,this.initialTotalSeconds=this.totalSeconds,this.updateDisplay(),this.startCountdown()}startCountdown(){this.subscription=Ca(1e3).subscribe(()=>{this.totalSeconds>0?(this.totalSeconds--,this.updateDisplay(),this.updateProgress()):(this.subscription.unsubscribe(),this.countdownCompleted.emit())})}updateDisplay(){let n=Math.floor(this.totalSeconds/60),i=this.totalSeconds%60;this.displayMinutes=String(n).padStart(2,"0"),this.displaySeconds=String(i).padStart(2,"0")}updateProgress(){this.progressPercentage=this.totalSeconds/this.initialTotalSeconds*100,this.progressPercentage<=25?this.circleColor="stroke-red-500":this.progressPercentage<=50?this.circleColor="stroke-yellow-500":this.circleColor="stroke-green-500"}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=dt({type:t,selectors:[["app-countdown-timer"]],inputs:{minutes:"minutes",seconds:"seconds"},outputs:{countdownCompleted:"countdownCompleted"},standalone:!0,features:[Ct],decls:7,vars:4,consts:[[1,"relative","w-48","h-48","flex","items-center","justify-center","rounded-full"],["viewBox","0 0 100 100",1,"absolute","w-full","h-full","rotate-[-90deg]"],["cx","50","cy","50","r","45","stroke-width","6","stroke-linecap","round","stroke-dasharray","282.743","fill","none"],[1,"text-3xl","font-bold","text-gray-700"]],template:function(i,s){i&1&&(te(0,"div",0),r1(),te(1,"svg",1),ut(2,"circle",2),ue(),n1(),te(3,"div",3),ye(4),te(5,"span"),ye(6),ue()()()),i&2&&(Pe(2),Ti("class","transition-all duration-1000 "+s.circleColor)("stroke-dashoffset",(1-s.progressPercentage/100)*282.743),Pe(2),Ar(" ",s.displayMinutes,":"),Pe(2),ur(s.displaySeconds))},encapsulation:2});let e=t;return e})();function bB(e,t){if(e&1&&(te(0,"li"),ye(1),ue()),e&2){let r=t.$implicit;Pe(),Ar(" ",r," ")}}var sI=(()=>{let t=class t{constructor(n,i,s,o){this.router=n,this.location=i,this.linkServ=s,this.paymentServ=o,this.linkInfo={},this.onDestroy$=new Mt,this.steps=["Deve ir para o seu telefone;","Ver\xE1 um push notification;","Deve Colocar o seu PIN;","Por fim deve aceitar."]}ngOnInit(){this.linkInfo=this.linkServ.getLinkInformation(),this.linkInfo.amount==null?this.location.back():this.makePayment()}ngOnDestroy(){this.onDestroy$.next(),this.onDestroy$.complete()}makePayment(){this.paymentServ.createPayment(this.linkServ.getPaymentNumber(),this.linkInfo.amount,this.linkInfo.store_account_number,this.linkServ.getPaymentMethod(),Jg.PUSH).pipe(gi(this.onDestroy$)).subscribe(n=>{if(console.log(n),n.status!==Li.PENDING)switch(this.linkServ.clear(),n.status){case Li.EXPIRED:this.router.navigate(["expired"]);break;case Li.FAILED:this.router.navigate(["pay/failed"]);break;case Li.SUCCESS:this.router.navigate(["used"]);break;default:this.router.navigate(["pay/failed"]);break}})}onTimeout(){this.linkServ.clear(),this.router.navigate(["pay/failed"])}};t.\u0275fac=function(i){return new(i||t)(Ee(cn),Ee(Mr),Ee(Oi),Ee(vf))},t.\u0275cmp=dt({type:t,selectors:[["app-payment-loading"]],standalone:!0,features:[Ct],decls:7,vars:3,consts:[[1,"h-screen","flex","flex-col","space-y-10","pt-10","lg:space-y-20","lg:pt-30","justify-center","items-center","bg-slate-200"],[3,"countdownCompleted","minutes","seconds"],[1,"space-y-3","text-gray-700"],[1,"text-base","lg:text-lg","font-semibold"],[1,"list-decimal","list-inside","ml-4","lg:ml-6","space-y-1","text-sm","lg:text-base"],[4,"ngFor","ngForOf"]],template:function(i,s){i&1&&(te(0,"div",0)(1,"app-countdown-timer",1),bt("countdownCompleted",function(){return s.onTimeout()}),ue(),te(2,"div",2)(3,"p",3),ye(4,"Para concluir com o pagamento: "),ue(),te(5,"ol",4),wi(6,bB,2,1,"li",5),ue()()()),i&2&&(Pe(),lt("minutes",3)("seconds",0),Pe(5),lt("ngForOf",s.steps))},dependencies:[iI,_c]});let e=t;return e})();var oI=[{path:"",redirectTo:"not-found",pathMatch:"full"},{path:"not-found",component:Xx},{path:"expired",component:eI},{path:"used",component:tI},{path:"inactive",component:rI},{path:"payment/:method",component:Qx},{path:"pay/confirmation",component:Jx},{path:"pay/processing",component:sI},{path:"pay/failed",component:nI},{path:":linkId",component:yx}];var Qi=ql(ST()),uh=class{generatePrivateKey(){let t=Qi.pki.rsa.generateKeyPair(2048);return Qi.pki.privateKeyToPem(t.privateKey)}generatePublicKey(){let t=Qi.pki.rsa.generateKeyPair(2048);return Qi.pki.publicKeyToPem(t.publicKey)}static encryptData(t,r){let i=Qi.pki.publicKeyFromPem(t).encrypt(r,"RSAES-PKCS1-V1_5");return Qi.util.encode64(i)}};var xT=(e,t)=>{let r=uh.encryptData(ai.apiPublicKey,ai.apiKey),n=e.clone({setHeaders:{Authorization:`Bearer ${r}`,"X-APP-ID":ai.appId,Accept:"Application/json","Content-Type":"Application/json"}});return t(n)};var wT=ql(IT()),TT={providers:[oS(oI),pb(mb([xT])),Zx({player:()=>wT.default})]};var _T=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=dt({type:t,selectors:[["app-root"]],standalone:!0,features:[Ct],decls:1,vars:0,template:function(i,s){i&1&&ut(0,"router-outlet")},dependencies:[sg,um,$x]});let e=t;return e})();xb(_T,TT).catch(e=>console.error(e));
/*! Bundled license information:

pusher-js/dist/web/pusher.js:
  (*!
   * Pusher JavaScript Library v8.4.0
   * https://pusher.com/
   *
   * Copyright 2020, Pusher
   * Released under the MIT licence.
   *)

lottie-web/build/player/lottie.js:
  (*!
   Transformation Matrix v2.0
   (c) Epistemex 2014-2015
   www.epistemex.com
   By Ken Fyrstenberg
   Contributions by leeoniya.
   License: MIT, header required.
   *)

@angular/core/fesm2022/primitives/signals.mjs:
  (**
   * @license Angular v17.3.12
   * (c) 2010-2024 Google LLC. https://angular.io/
   * License: MIT
   *)

@angular/core/fesm2022/core.mjs:
  (**
   * @license Angular v17.3.12
   * (c) 2010-2024 Google LLC. https://angular.io/
   * License: MIT
   *)

@angular/core/fesm2022/core.mjs:
  (*!
   * @license
   * Copyright Google LLC All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   *)

@angular/core/fesm2022/core.mjs:
  (*!
   * @license
   * Copyright Google LLC All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   *)

@angular/core/fesm2022/core.mjs:
  (*!
   * @license
   * Copyright Google LLC All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   *)

@angular/core/fesm2022/core.mjs:
  (*!
   * @license
   * Copyright Google LLC All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   *)

@angular/core/fesm2022/core.mjs:
  (*!
   * @license
   * Copyright Google LLC All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   *)

@angular/common/fesm2022/common.mjs:
  (**
   * @license Angular v17.3.12
   * (c) 2010-2024 Google LLC. https://angular.io/
   * License: MIT
   *)

@angular/common/fesm2022/http.mjs:
  (**
   * @license Angular v17.3.12
   * (c) 2010-2024 Google LLC. https://angular.io/
   * License: MIT
   *)

@angular/platform-browser/fesm2022/platform-browser.mjs:
  (**
   * @license Angular v17.3.12
   * (c) 2010-2024 Google LLC. https://angular.io/
   * License: MIT
   *)

@angular/router/fesm2022/router.mjs:
  (**
   * @license Angular v17.3.12
   * (c) 2010-2024 Google LLC. https://angular.io/
   * License: MIT
   *)

@angular/forms/fesm2022/forms.mjs:
  (**
   * @license Angular v17.3.12
   * (c) 2010-2024 Google LLC. https://angular.io/
   * License: MIT
   *)

@angular/core/fesm2022/rxjs-interop.mjs:
  (**
   * @license Angular v17.3.12
   * (c) 2010-2024 Google LLC. https://angular.io/
   * License: MIT
   *)
*/
//# sourceMappingURL=main.js.map