text: !function(){const t="disabled";!function(t){let e=t.is;customElements.get(e)?console.warn("Already registered "+e):customElements.define(e,t)}(class extends(function(e){return class extends e{constructor(){super(...arguments),this._evCount={}}static get observedAttributes(){return[t]}get disabled(){return this._disabled}set disabled(e){this.attr(t,e,"")}attr(t,e,s){this[(e?"set":"remove")+"Attribute"](t,s||e)}to$(t){const e=t%2;return(t-e)/2+"-"+e}incAttr(t){const e=this._evCount;t in e?e[t]++:e[t]=0,this.attr("data-"+t,this.to$(e[t]))}attributeChangedCallback(e,s,r){switch(e){case t:this._disabled=null!==r}}de(t,e,s=!1){const r=t+(s?"":"-changed"),a=new CustomEvent(r,{detail:e,bubbles:!0,composed:!1});return this.dispatchEvent(a),this.incAttr(r),a}_upgradeProperties(t){t.forEach(t=>{if(this.hasOwnProperty(t)){let e=this[t];delete this[t],this[t]=e}})}}}(HTMLElement)){constructor(){super(),this.chars="!<>-_\\/[]{}—=+*^?#________",this.update=this.update.bind(this)}static get is(){return"co-depends-text-scramble"}static get observedAttributes(){return super.observedAttributes.concat(["text"])}connectedCallback(){this._upgradeProperties(["text"])}attributeChangedCallback(t,e,s){switch(super.attributeChangedCallback(t,e,s),t){case"text":this._text=s,this.setText(e,s)}}get text(){return this._text}set text(t){this.attr("text",t)}setText(t,e){null===t&&(t="");const s=Math.max(t.length,e.length);this.queue=[];for(let r=0;r<s;r++){const s=t[r]||"",a=e[r]||"",i=Math.floor(40*Math.random()),n=i+Math.floor(40*Math.random());this.queue.push({from:s,to:a,start:i,end:n})}cancelAnimationFrame(this.frameRequest),this.frame=0,this.update()}update(){let t="",e=0;for(let s=0,r=this.queue.length;s<r;s++){let{from:r,to:a,start:i,end:n,char:h}=this.queue[s];this.frame>=n?(e++,t+=a):this.frame>=i?((!h||Math.random()<.28)&&(h=this.randomChar(),this.queue[s].char=h),t+=`<span class="dud">${h}</span>`):t+=r}this.innerHTML=t,e===this.queue.length?this.de("text-setting-complete",{},!0):(this.frameRequest=requestAnimationFrame(this.update),this.frame++)}randomChar(){return this.chars[Math.floor(Math.random()*this.chars.length)]}})}();