diff --git a/dist/PDRenderKit.js b/dist/PDRenderKit.js index 9c8c869..f5ee34e 100644 --- a/dist/PDRenderKit.js +++ b/dist/PDRenderKit.js @@ -1 +1 @@ -"use strict";let $SVG_Observer,$Lazy_Observer,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_0_,_1_,_2_,_3_,_4_,_5_,_6_,_7_,_8_,_9_,__0,__1,__2,__3,__4,__5,$0,$1,$2,$3,$4,$5,$6,$7,$8,$9,$0_,$1_,$2_,$3_,$4_,$5_,$6_,$7_,$8_,$9_,$_0,$_1,$_2,$_3,$_4,$_5,$vw,$vh,$history=[],$$android,$$ios,$$mobile,$$desktop;((t,e,n,i,r,s,o,l)=>{const u="innerWidth",a="innerHeight",c="test",h="userAgent";i(r[s]({length:26},((t,e)=>String.fromCharCode(97+e))).map(((t,e)=>{let n=e<10,i=e>=10&&e<20,r=e>=20,s=String(e),o=s.charAt(s.length-1),l=e=>`${e?"$":"_"}${r?"_":""}${o}${i?"_":""} = "${e?t.toUpperCase():t}";`;return`${l(0)}${l(1)}${n?`_${t} = ${e};`:""}`}))[l]("")),$$android=/android/i[c](e[h]),$$ios=/iphone|ipad/i[c](e[h]),$$mobile=$$android||$$ios,$$desktop=!$$mobile,$history=[n.href],[$vw,$vh]=[t[u],t[a]],t.onresize=e=>{[$vw,$vh]=[t[u],t[a]]}})(window,navigator,location,eval,Array,"from",0,"join"),((t,e,n,i,r,s,o,l,u,a,c,h,f,_,g,$,d,p,m,y,v,T,E,b,w,L,A,O,I,R,S,N,U,C,F,D,M,x,k,j,P,V,G,B,H,z,X,Y,q,W,J,K,Q,Z,tt,et,nt,it,rt,st,ot,lt,ut,at,ct,ht,ft,_t,gt,$t,dt,pt,mt,yt,vt,Tt,Et,bt,wt,Lt,At,Ot,It,Rt,St,Nt,Ut,Ct,Ft,Dt,Mt,xt,kt,jt,Pt,Vt)=>{const Gt="getElementById",Bt="querySelector",Ht="parentElement",zt="previousElementSibling",Xt="nextElementSibling",Yt="createElement",qt="classList",Wt="Attribute",Jt="get",Kt="Width",Qt="Height",Zt="scroll",te="natural",ee="client",ne="All",ie="toString",re="prototype",se="length",oe="getHours",le="dataset",ue="push",ae="toUpperCase",ce="toLowerCase",he="floor",fe="size",_e="forEach",ge="set",$e="replace",de="trim",pe="match",me="test",ye="origin",ve="pathname",Te="inner",Ee="HTML",be="empty",we="children",Le="childNodes",Ae="style",Oe="margin",Ie="padding",Re="Top",Se="Left",Ne="Bottom",Ue="Right",Ce="width",Fe="height",De="class",Me="line",xe="data",ke="attr",je="child",Pe="history",Ve="query",Ge="node",Be="insertBefore",He="appendChild",ze="attributes",Xe="yy",Ye="MM",qe="DD",We="dd",Je="HH",Ke="hh",Qe="mm",Ze="ss",tn="init",en="url",nn="timestamp",rn="date",sn="format",on="map",ln="random",un="len",an="display",cn="To",hn="abs",fn="jpeg",_n="jpg",gn="png",$n="download",dn="image",pn="split",mn="font",yn="substring",vn="mt",Tn="str",En="req",bn="gone",wn="unobserve",Ln="fromEntries",An="cloneNode",On="parse",In="json",Rn="keys",Sn="isArray",Nn="createTextNode",Un="append",Cn="files",Fn="values",Dn="header",Mn="href",xn="join",kn="currentScript",jn="parentNode",Pn="removeChild",Vn="getAttribute",Gn=[x,q][xn](Ct),Bn=[W,S][xn](Ct),Hn=[R,X,U,G][xn](Ct),zn=[M,x,W][xn](Ct),Xn=[dt,rt,mt,C,G,U,C,X,ht,x,q][xn](Ct),Yn="$base64",qn="$blob",Wn=["load","click","dblclick","scroll","mousedown","mouseup","mouseenter","mouseleave","mouseover","mouseout","mousemove","touchstart","touchmove","touchenter","touchleave","touchend","touchup","drop","dragstart","dragend","dragenter","dragover","dragleave","focus","blur","input","keydown","keyup","change","contextmenu","cut","paste"],Jn=a.defineProperty;let Kn=!0;var Qn;Kn&&(Kn=!1,function(t){const n=[N,B,H,Z,X,x,D,M,q][xn](Ct),s=[it,X,C,R,q,B,X][xn](Ct),o=[dt,Hn,Pt,ft,q,U][xn](Ct),l=[dt,Hn,Pt,it,zn][xn](Ct),a=[[[mn,Ft,fe,xt],[v,b,H,Q]],[[Me,Ft,Fe,xt],[T,O,H,Q]]],c=[[["%",N,t]],[[lt,Gn,ut,Bn,xt],[M,q,q,H,Y,xt,Mt,Mt,D,Gn,M,Bn,Dt,N,B,V,Mt,H,Hn,N,zn,Mt,t]],[[s,xt],[l]],[[ft,x,N,C,G,Y,C,xt],[lt,dt,ft,Ft+E+Dt+y]]][on]((t=>u[Sn](t)?t[on]((t=>t[xn](Ct)))[xn](Pt):t)).join("\n"),h=a[on]((t=>u[Sn](t)?t[on]((t=>t[xn](Ct)))[xn](Ct):t)).join(";"),f=e[kn][Vn](n);f&&f===o?(e[Ot+tn]=i[Mn],e[Ot+s]=l,r.log(c,h)):e[kn][jn][Pn](e[kn])}(Xn)),Qn=o[re],Jn(Qn,Ot+In,{get:function(){try{return $[On](this[ie]())}catch(t){return}}}),Jn(Qn,Ot+Ee[ce](),{get:function(){const t={" ":" ","<":"<",">":">",'"':""","'":"'"};return this[ie]()[$e](/[ \<\>\"\']/g,(e=>t[e]))}}),Jn(Qn,Ot+"img",{get:async function(){return new Promise(((t,e)=>{const n=new g;n.src=this[ie](),n.crossOrigin="anonymous",n.onload=()=>t(n),n.onerror=e}))}}),Jn(Qn,It+In,{get:function(){return null!=this[Ot+In]}}),Jn(Qn,It+be,{get:function(){return this[ie]()[de]()[se]<1}}),Jn(Qn,Ut,{value:function(t="",e=""){const n=this[ie]();return"string"==typeof t&&t[de]()[se]<1?n:n[$e](t,e)}}),Jn(Qn,Ot+"regexp",{value:function(t=""){return new d(this[ie](),t)}}),Jn(Qn,"$en",{value:function(t=!1){const e=this[ie]();return t?encodeURIComponent(e):encodeURI(e)}}),Jn(Qn,"$de",{value:function(t=!1){const e=this[ie]();return t?decodeURIComponent(e):decodeURI(e)}}),Jn(Qn,"$copy",{value:async function(){try{await n.clipboard.writeText(this[ie]())}catch(t){console.error(t)}}}),Jn(Qn,It,{value:function(t){const e=this[ie]();return t instanceof d?t[me](e):null==t?e[de]()[se]>0:t[de]()===e[de]()}}),Jn(Qn,"$$200",{value:async function(t){return new Promise((async(e,n)=>{try{const i=await fetch(this[ie]());if(i.ok){const r=i.headers[Jt]("Content-Type");if(r&&r.startsWith("image/")){if("image/svg+xml"==r&&!t)return void e(i);const s=await i.blob(),o=new Image,l=URL.createObjectURL(s);o.src=l,o.onload=()=>{e({src:l,img:o})},o.onerror=t=>{URL.revokeObjectURL(l),n(t)}}else e(i)}else n(new Error(`HTTP error! status: ${i.status}`))}catch(t){n(t)}}))}}),Jn(Qn,Ot+en,{get:function(){const t=this[ie]();try{return new _(t)}catch(e){return new _(i[ye]+t)}}}),Jn(Qn,Ot+Ve+ne,{get:function(){return this[ie]()[Ot+en][Ot+Ve+ne]}}),[Ot+En,Nt+Pe,Ut+Pe,Nt+Ve,Ut+Ve,Ve+Nt,Ve+Ut,Ot+Ve][_e]((t=>Jn(Qn,t,{value:function(){const e=this[ie]()[Ot+en];return e[t].apply(e,a[Fn](arguments))}}))),Jn(Qn,"_fa",{get:function(){return("i."+this[ie]()[$e](/\s/,"."))._()}}),Jn(Qn,Ot,{get:function(){const t=this[ie]();return t.startsWith("#")?e[Gt](this[yn](1)):/[\.\[\]]/[me](t)?e[Bt](t):e[Gt](t)||e[Bt](t)}}),Jn(Qn,Ot+"all",{get:function(){return e[Bt+ne](this[ie]())}}),Jn(Qn,Nt,{value:function(t,n){const r=/^\w+(?=[\#\.]*)/i,s=/\.([\w_-]+)?/gi,o=r[me](this)?this[pe](r)[0]:null,l=/^(svg|rect|circle|ellipse|line|polyline|polygon|path|text|tspan|g|defs|symbol|image|use|clipPath|mask|linearGradient|radialGradient)$/i[me](o),c="temp"===this[ie](),h="txt"===this[ie](),f=c?e.createDocumentFragment():h?e[Nn](String(t)):l?e.createElementNS("http://www.w3.org/2000/svg",o):e[Yt](o),_=s[me](this)?this[pe](s):[],g=this[pe](/\#([\w_-]+)?/i),$=[it,X,C,R,q,B,X][xn](Ct),d=[dt,Hn,Pt,it,zn][xn](Ct);if(h)return f;g&&(f.id=g[1]),_[_e]((t=>f[qt].add(t[$e](/^\./,""))));const p=e[Ot+tn],m=e[Ot+$];if(!p||p!=i[Mn]||!m||m!=d)return f;let y,v;if(/^span\.svg/i[me](this)&&null!=$SVG_Observer&&$SVG_Observer.observe(f),null==t&&null!=n&&([t,n]=[n,null]),null!=t&&null!=n)[y,v]=[t,n];else if(null==n)"string"==typeof t||"number"==typeof t||u[Sn](t)?v=t:y=t;else if(null==t)return f;const T="input"===o;if(T||"textarea"===o){const t=/\s(.+)/i,e=this[pe](t);f.placeholder=e?e[1]:"";const n=/\@(\w+)/i,i=this[pe](n);T&&(f.type=i?i[1]:"test")}if("object"==typeof y&&null!=y&&a.keys(y)[_e]((t=>{const e=y[t];["value","innerText","innerHTML","textContent","contentEditable"].includes(t)?f[t]=e:["color","backgroundColor"].includes(t)?f[Ae][t]=e:"style"===t?a.keys(e)[_e]((t=>f[Ae][t]=e[t])):"lazyload"===t?null!=$Lazy_Observer?(f[qt].add("lazyload"),f[ge+Wt]("data-src",e),$Lazy_Observer.observe(f)):f.src=e:null!=e&&f[ge+Wt](t,e)})),null!=v){const t="string"==typeof v,n="number"==typeof v,i=u[Sn](v);if(t||n){const t=String(v);"img"===o||"source"===o?f.src=t:f[Te+Ee]=t}else i&&v[_e]((t=>{const n=t instanceof Element;"string"==typeof t||"number"==typeof t?c?f[He](e[Nn](String(t))):f[Te+Ee]+=t:n&&f[He](t)}))}return f}}),Jn(Qn,Ot+"num",{get:function(){const t=l(this[ie]()[$e](/\,/g,""));return isNaN(t)?void 0:t}}),Jn(Qn,Ot+un,{get:function(){return this[ie]()[se]}}),Jn(Qn,It+vn,{get:function(){return this[ie]()[de]()[se]<1}}),Jn(Qn,Ot+"ary",{value:function(t=""){return this[ie]()[pn](t)}}),Jn(Qn,"$fit",{value:function(t){if(null!=t)return this[ie]()[pe](t)}}),(t=>{Jn(t,Ot+rn,{get:function(){return new f(1e3*this)}}),Jn(t,Ot+bn,{get:function(){const t=s[he](f.now()/1e3),e=parseInt(this),n=s[hn](t-e),i=t>e,r=i?"前":"",o=3600,l=24*o,u=30*l,a=365*l;if(n<60)return"剛剛";let c=i?"":"還有";return n>=a?c+=s[he](n/a)+"年":n>=u?c+=s[he](n/u)+"個月":n>=604800?c+=s[he](n/o)+"週":n>=l?c+=s[he](n/l)+"天":n>=o?c+=s[he](n/o)+"小時":n>=60&&(c+=s[he](n/60)+"分鐘"),c+r}}),[Ot+Z,Ot+Xe,Ot+Xe+Xe,Ot+_t,Ot+Ye,Ot+rt,Ot+qe,Ot+U,Ot+We,Ot+ut,Ot+Je,Ot+M,Ot+Ke,Ot+R,Ot+et,Ot+V,Ot+Qe,Ot+Y,Ot+Ze][_e]((e=>{Jn(t,e,{get:function(){return this[Ot+rn][e]}})})),Jn(t,Ot+sn,{value:function(t){return this[Ot+rn][Ot+sn](t)}}),Jn(t,Ot+Tn,{get:function(){return o(this)}}),Jn(t,Ot+"num",{get:function(){return l(this)}})})(l[re]),(t=>{Jn(t,Ot+on,{get:function(){const t=new c;return this[_e](((e,n)=>t[ge](e,n))),t}}),Jn(t,Ot+ln,{get:function(){let t=this;for(let e=t[se]-1;e>0;e--){const n=s[he](s[ln]()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}}),Jn(t,It+be,{get:function(){return this[se]<1}}),Jn(t,Nt,{value:function(t){let e=this;return u[Sn](t)?e=e.concat(t):null!=t&&e[ue](t),e}}),Jn(t,Ot,{value:function(t){const e=this[se];return"number"!=typeof t||s[hn](t)>e?null:this[(t<0?e:0)+t]}}),Jn(t,Ot+x,{value:function(t){const e=this.indexOf(t);if(-1!=e)return e}}),Jn(t,"$_",{value:function(t){const e=this[se];let n=this;return"number"!=typeof t||s[hn](t)>e?n:-1===t?(n.pop(),n):0===t?(n.shift(),n):(n=n.splice((t<0?e:0)+t,1),n)}}),Jn(t,It,{value:function(t){return-1!==this.indexOf(t)}}),Jn(t,Ot+En,{value:function(e={}){return`/${t.$str("/")}`[$e](/[\/]+/g,"/").$req(e)}}),Jn(t,Ot+un,{get:function(){return this[se]}}),Jn(t,It+vn,{get:function(){return this[se]<1}}),Jn(t,Ot+Tn,{value:function(t){return"string"!=typeof t&&"number"!=typeof t?this.join(""):this.join(String(t)[ie]())}}),Jn(t,St,{value:function(t){if(null==t)return this;let e=[];for(let n=0,i=this[n];n{Jn(t,Ot+on,{get:function(){const t=new Map;for(const e in this)this.hasOwnProperty(e)&&t.set(e,this[e]);return t}}),Jn(t,Ot+Rn,{get:function(){return a[Rn](this)}}),Jn(t,Ot+"vals",{get:function(){return a[Fn](this)}}),Jn(t,Ot,{value:function(t){if(null!=t)return this[String(t)]}}),Jn(t,It,{value:function(t){return null!=t&&null!=this[String(t)]}}),Jn(t,Ot+_e,{value:function(t){if(t instanceof Function)for(const e in this)this.hasOwnProperty(e)&&t(e,this[e])}})})(a[re]),(t=>{Jn(t,Ot+"obj",{get:function(){return a[Ln](this)}}),Jn(t,It+be,{get:function(){return 0===this[fe]}}),Jn(t,se,{get:function(){return this[fe]}}),Jn(t,Nt,{value:function(t,e){const n=new c(this);return n[ge](t,e),n}}),Jn(t,Ot,{value:function(t){return this[Jt](t)}}),Jn(t,Ot+un,{get:function(){return this[fe]}}),Jn(t,It+vn,{get:function(){return 0===this[fe]}})})(c[re]),(t=>{Jn(t,Ot+Z,{get:function(){return this.getFullYear()}}),Jn(t,Ot+Xe,{get:function(){return`${this[Ot+Z]}`.slice(-2)}}),Jn(t,Ot+Xe+Xe,{get:function(){return this[Ot+Z]}}),Jn(t,Ot+_t,{get:function(){return this.getMonth()+1}}),Jn(t,Ot+Ye,{get:function(){const t=this[Ot+_t];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+rt,{get:function(){return this.getDate()}}),Jn(t,Ot+qe,{get:function(){const t=this[Ot+rt];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+U,{get:function(){return this.getDay()}}),Jn(t,Ot+We,{get:function(){const t=this[Ot+U];return 0===t?"Sun":1===t?"Mon":2===t?"Tue":3===t?"Wed":4===t?"Thu":5===t?"Fri":6===t?"Sat":"NaN"}}),Jn(t,Ot+ut,{get:function(){return this[oe]()}}),Jn(t,Ot+Je,{get:function(){const t=this[Ot+ut];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+M,{get:function(){return this[oe]()%12||12}}),Jn(t,Ot+Ke,{get:function(){const t=this[Ot+M];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+R,{get:function(){return this[oe]()>=12?"pm":"am"}}),Jn(t,Ot+et,{get:function(){return this[Ot+R][ae]()}}),Jn(t,Ot+V,{get:function(){return this.getMinutes()}}),Jn(t,Ot+Qe,{get:function(){const t=this[Ot+V];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+Y,{get:function(){return this.getSeconds()}}),Jn(t,Ot+Ze,{get:function(){const t=this[Ot+Y];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+nn,{get:function(){return s[he](this.getTime()/1e3)}}),Jn(t,Ot+bn,{get:function(){return this[Ot+nn][Ot+bn]}}),Jn(t,Ot+sn,{value:function(t){return t=t[$e](/Y{4}/gi,this[Ot+Xe+Xe])[$e](/Y{2}/gi,this[Ot+Xe])[$e](/Y{1}/gi,this[Ot+Z])[$e](/M{2,}/g,this[Ot+Ye])[$e](/M{1}/g,this[Ot+_t])[$e](/D{2,}/g,this[Ot+qe])[$e](/D{1}/g,this[Ot+rt])[$e](/H{2,}/g,this[Ot+Je])[$e](/H{1}/g,this[Ot+ut])[$e](/h{2,}/g,this[Ot+Ke])[$e](/h{1}/g,this[Ot+M])[$e](/m{2,}/g,this[Ot+Qe])[$e](/m{1}/g,this[Ot+V])[$e](/s{2,}/g,this[Ot+Ze])[$e](/s{1}/g,this[Ot+Y])[$e](/A{1}/g,this[Ot+et])[$e](/a{1}/g,this[Ot+R])[$e](/d{2,}/g,this[Ot+We])[$e](/d{1}/g,this[Ot+U])}}),Jn(t,Ot+rn,{value:function(t){const e="object"==typeof t&&null!=t,n=this[Ot+Z],i=this[Ot+_t]-1;if(!e)return new f;const r="object"==typeof t.pre&&null!=t.pre;return h(t.start)&&t.start?new f(n,i,1):h(t.end)&&t.end?new f(n,i-1,0):r?h(t.pre.start)&&t.pre.start?new f(n,i-1,1):h(t.pre.end)&&t.pre.end?new f(n,i,0):new f:new f}})})(f[re]),(n=>{Jn(n,Yn,{value:function(t=dn+"/"+fn,n){const i="number"==typeof n,r=e[Yt]("canvas"),o=r.getContext("2d"),l=parseInt(this[Ce]),u=parseInt(this[Fe]);if(o){if(i&&nnull==this.src?dn+"."+t[pn]("/")[1]:this.src[yn](this.src.lastIndexOf("/")+1))(),r="a"._(),s=_.createObjectURL(this.$blob(t));r.href=s,r.download=n??i,r._attr({type:"application/octet-stream"}),e.body[He](r),r.click(),r.$rm(),URL.revokeObjectURL(s)}}),[_n,gn][_e]((t=>{const e=dn+"/"+(t==_n?fn:gn);Jn(n,Ot+t,{value:function(t){return this[Yn](e,t)}}),Jn(n,Nt+$n+t[ae](),{value:function(t){n[$n](e,t)}})})),Jn(n,Nt+$n,{value:function(t=dn+"/"+fn,e){n[$n](t,e)}})})(g[re]),(t=>{Jn(t,"$"+Ve+ne,{get:function(){const t=new URLSearchParams(this.search),e=new c;return t[_e](((t,n)=>{e.set(t,n)})),a[Ln](e)}});let n=!1;Jn(t,Ot+En,{value:function(t={},e=!1){if(null==t)return;let i=this.href;const r="object"==typeof t[In]&&null!=t[In]&&!u[Sn](t[In]);let s;return t[Cn]&&t.tag?(s=new FormData,r&&a.keys(t.json)[_e]((e=>{s[Un](e,t[In][e])})),t[Cn][_e]((e=>{s[Un](t.tag,e)}))):r&&(s=$.stringify(t[In])),new Promise(((r,l)=>{if(n&&e)return l("等待請求完成.");e&&(n=!0);const u=new XMLHttpRequest;u.open(t.method||"GET",i),t[Dn]&&a[Rn](t[Dn])[_e]((e=>{u.setRequestHeader(e,t[Dn][e])})),u.withCredentials=h(t.credentials)||!1,u.onreadystatechange=()=>{switch(u.readyState){case 1:case 2:case 3:break;case 4:e&&(n=!1);const t=u.responseText,i=u.status;if(/^(4|5)[0-9]{2}/[me](o(i)))return void l(t);try{r($[On](t),i)}catch(e){r(t,i)}}},u.send(s)}))}}),Jn(t,Nt+Pe,{value:function(t){const n=this.href;return $history[ue](n),history.pushState(null,"",n),"string"==typeof t&&t[de]()[se]>0&&(e.title=t),this}}),Jn(t,Ut+Pe,{value:function(t){const n=this.href;return $history.pop(),$history[ue](n),history.replaceState(null,"",n),"string"==typeof t&&t[de]()[se]>0&&(e.title=t),this}}),Jn(t,Nt+Ve,{value:function(t){let e=this[ye]+this[ve],n=this.$queryAll;return"object"!=typeof t||null==t||u[Sn](t)||a.keys(t)[_e]((e=>n[e]=t[e])),a.keys(n)[_e](((t,i)=>e+=`${0==i?"?":"&"}${t}=${n[t]}`)),new URL(e)}}),Jn(t,Ut+Ve,{value:function(t){return this.query__()._query(t)}}),Jn(t,Ve+Nt,{value:function(t){let e=this[ye]+this[ve],n=this.$queryAll;return"string"==typeof t&&t[de]()[se]>0?n[t]=null:u[Sn](t)&&t[_e]((t=>{n[String(t)]=null})),a.keys(n)[_e](((t,i)=>{e+=`${0==i?"?":"&"}${t}=${n[t]}`})),new URL(e)}}),Jn(t,Ve+Ut,{value:function(){return new URL(this[ye]+this[ve])}}),Jn(t,Ot+Ve,{value:function(t){return this.searchParams[Jt](t)}})})(_[re]),(t=>{[[Ot,Te+Ee],[Ot+Ee[ce](),"outer"+Ee],[Ot+Q,Zt+Se],[Ot+Z,Zt+Re],[Ot+K,ee+Kt],[Ot+M,ee+Qt],[Ot+Y+K,Zt+Kt],[Ot+Y+M,Zt+Qt],[Ot+G+K,te+Kt],[Ot+G+M,te+Qt]][_e]((e=>{Jn(t,e[0],{get:function(){return this[e[1]]}})})),Jn(t,"$text",{get:function(){let t=[];return[...this[Le]].filter((t=>t.nodeType===Node.TEXT_NODE&&t.textContent[de]()[se]>0)).forEach((e=>t[ue](e.textContent[de]()))),t.join(" ")}}),Jn(t,Ot+x,{get:function(){const t=this[Ht];return t instanceof Element?[...t[we]].indexOf(this):-1}}),Jn(t,Ot+ze,{get:function(){let t=new c;for(const e of this[ze])t.set(e.name,e.value[de]());return a[Ln](t)}}),[[Ot+qt,qt],[Ot+we,we],[Ot+Le,Le]][_e]((e=>{Jn(t,e[0],{get:function(){return[...this[e[1]]]}})})),Jn(t,se,{get:function(){return this[we][se]}}),Jn(t,Nt,{value:function(t=""){return this[Te+Ee]+=o(t),this}}),Jn(t,Ut,{value:function(t=""){return this[Te+Ee]=o(t),this}}),Jn(t,St,{value:function(t=!1){return this[An](h(t))}}),[[Nt+Q,Zt+Se],[Nt+Z,Zt+Re]][_e]((e=>{Jn(t,e[0],{value:function(t=NaN){return"number"!=typeof t||isNaN(t)||(this[e[1]]=t),this}})})),[[Nt+K,Ce],[Nt+M,Fe],[Nt+H+q,Ie+Re],[Nt+H+P,Ie+Se],[Nt+H+S,Ie+Ne],[Nt+H+X,Ie+Ue],[Nt+V+q,Oe+Re],[Nt+V+P,Oe+Se],[Nt+V+S,Oe+Ne],[Nt+V+X,Oe+Ue]][_e]((e=>{Jn(t,e[0],{value:function(t){if("number"==typeof t||"string"==typeof t){t=o(t)[de]();const n=/^\d+$/[me](t);this[Ae][e[1]]=t+(n?"px":"")}return this}})})),[[Nt+V,"_mt","_ml","_mb","_mr"],[Nt+H,"_pt","_pl","_pb","_pr"]][_e]((e=>{Jn(t,e[0],{value:function(t,n,i,r){return void 0===t&&void 0===n&&void 0===i&&void 0===r||(void 0===n&&void 0===i&&void 0===r?n=i=r=t:void 0===i&&void 0===r?(i=t,r=n):void 0===r&&(r=n),this[e[1]](t||0),this[e[2]](r||0),this[e[3]](i||0),this[e[4]](n||0)),this}})})),Jn(t,De+Ut,{value:function(){return this.className="",this}}),Jn(t,Ut+De,{value:function(t=[]){return this.class__()[Nt+De](t),this}}),Jn(t,It+De,{value:function(t=""){return"string"==typeof t&&t[de]()[se]>0&&this[qt].contains(t)}}),Jn(t,It+De+Nt,{value:function(t=!1,e=[]){return h(t)&&"string"==typeof e&&e[de]()[se]>0?this.class_(e):this[Nt+De](e),this}}),Jn(t,It+Nt+De,{value:function(t=!1,e=[]){return h(t)&&"string"==typeof e&&e[de]()[se]>0?this[Nt+De](e):this.class_(e),this}}),[Nt+Ae,Nt+xe,Nt+ke][_e]((e=>{Jn(t,e,{value:function(t={}){return("object"!=typeof t||null==t||u[Sn](t)?[]:a.keys(t)).filter((t=>"string"==typeof t&&t[de]()[se]>0)).forEach((n=>{e===Nt+Ae?this[Ae][n]=t[n]:e===Nt+xe?this[le][n]=t[n]:e===Nt+ke&&this[ge+Wt](n,t[n])})),this}})})),[Nt+De,De+Nt,Ae+Nt,xe+Nt,ke+Nt][_e]((e=>{Jn(t,e,{value:function(t=[]){return(u[Sn](t)?t:"string"==typeof t&&t[de]()[se]>0?t[pn](/[,. ]/):[]).filter((t=>"string"==typeof t&&t[de]()[se]>0)).forEach((t=>{e===Nt+De?this[qt].add(t):e===De+Nt?this[qt].remove(t):e===Ae+Nt?this[Ae][t]="":e===xe+Nt?delete this[le][t]:e===ke+Nt&&this["remove"+Wt](t)})),this}})})),[Ot+Ae,Ot+xe,Ot+ke][_e]((e=>{Jn(t,e,{value:function(t=""){if(!("string"!=typeof t||t[de]()[se]<1))return e===Ot+Ae?this[Ae][t]:e===Ot+xe?this[le][t]:e===Ot+ke?this[Jt+Wt](t):void 0}})})),[[It+xe,Ot+xe],[It+ke,Ot+ke]][_e]((e=>{Jn(t,e[0],{value:function(t="",n=""){return!("string"!=typeof t||t[de]()[se]<1)&&((n=o(n))[de]()[se]<1?null!=this[e[1]](t):this[e[1]](t)===n)}})})),Jn(t,Nt+je,{value:function(t=[],e){return"string"==typeof t&&t[de]()[se]>0||"number"==typeof t?this[Te+Ee]+=t:u[Sn](t)&&t[se]>1?t[_e]((t=>{"string"==typeof t&&t[de]()[se]>0||"number"==typeof t?this[Te+Ee]+=t:null!=t&&this[He](t)})):u[Sn](t)&&1===t[se]?e instanceof Element&&e[Ht]===this?this[Be](t[0],e):"number"==typeof e&&s[hn](e)<=this[we][se]?this[Be](t[0],this[we][e]):null!=t[0]&&this[He](t[0]):e instanceof Element&&e[Ht]===this?this[Be](t,e):"number"==typeof e&&s[hn](e)<=this[we][se]?this[Be](t,this[we][e]):null!=t&&this[He](t),this}}),Jn(t,Ut+je,{value:function(t=[]){return this.__()._child(t),this}}),Jn(t,Ot+je,{value:function(t=[]){let e=this;return u[Sn](t)?t[_e]((t=>{"string"==typeof t&&t[de]()[se]>0?e=e[Bt](t):"number"==typeof t&&s[hn](t)<=e[we][se]&&(e=e[we][(t<0?e[we][se]:0)+t])})):"string"==typeof t&&t[de]()[se]>0?e=this[Bt](t):"number"==typeof t&&s[hn](t)<=this[we][se]&&(e=this[we][(t<0?this[we][se]:0)+t]),e===this?void 0:e}}),Jn(t,"$parent",{value:function(t=0){let e=this[Ht];if("number"==typeof t&&t>0)for(var n=0;n0)for(var n=0;n0)for(var n=0;n0?this[Bt](t):null}}),Jn(t,Ot+"sel"+ne,{value:function(t=""){return"string"==typeof t&&t[de]()[se]>0&&this[Bt+ne](t)||[]}}),Jn(t,"_go",{value:function(t=""){return"string"==typeof t&&t[de]()[se]>0&&(this.href=t),this.target="_self",this}}),Jn(t,"_open",{value:function(t=""){return"string"==typeof t&&t[de]()[se]>0&&(this.href=t),this.target="_blank",this}}),Wn[_e]((e=>Jn(t,`_${e}`,{value:function(t){return this[`on${e}`]=t instanceof Function?t:null,this}}))),Jn(t,"_video",{value:function(t={}){if(this instanceof HTMLVideoElement&&(this._attr({controlsList:["nodownload","noremoteplayback"].join(",")}),"string"==typeof t.preload&&(this.preload=t.preload),"boolean"==typeof t.loop&&(this.loop=t.loop),"boolean"==typeof t.muted&&(this.muted=t.muted),"boolean"==typeof t.controls&&(this.controls=t.controls),"boolean"==typeof t.playsinline&&t.playsinline&&this._attr({playsinline:""}),"boolean"==typeof t.download||"boolean"==typeof t.remote)){let e=[];t.download||e[ue]("nodownload"),t.remote||e[ue]("noremoteplayback"),this._attr({controlsList:e.join(" ")})}return this}}),Jn(t,Nt+an,{value:function(t=""){return"string"==typeof t&&t[de]()[se]>0&&(this[Ae][an]=t),this}}),Jn(t,Zt+cn+wt,{value:function(t){if("number"!=typeof t)return this;const e=this[ee+Kt],n=this[Zt+Kt];let i=n-t{Jn(t,e[0],{get:function(){return this[e[1]]}})})),Jn(t,"$rm",{value:function(){this.remove()}})})(p[re]),(t=>{Jn(t,Ot+Ee[ce](),{get:function(){let t=e[Yt]("div");return t[He](this),t[Te+Ee]}}),Jn(t,Ot+we,{get:function(){return[...this[we]]}}),Jn(t,Ot+Le,{get:function(){return[...this[Le]]}}),Jn(t,se,{get:function(){return this[we][se]}}),Jn(t,St,{value:function(t=!1){return this[An](h(t))}}),Jn(t,Nt+je,{value:function(t=[]){return"string"==typeof t&&t.trim().length>0||"number"==typeof t?this[He](e[Nn](String(t))):u[Sn](t)&&t.length>1?t[_e]((t=>{"string"==typeof t&&t.trim().length>0||"number"==typeof t?this[He](e[Nn](String(t))):null!=t&&this[He](t)})):u[Sn](t)&&1===t.length?this[He](t[0]):null!=t&&this[He](t),this}}),[[Ot+Tn,Ot+Ee[ce]()],[Ot+un,se],[Ot+je+ne,Ot+we],[Ot+Ge+ne,Ot+Le]][_e]((e=>{Jn(t,e[0],{get:function(){return this[e[1]]}})}))})(m[re]);const Zn=()=>{null==$SVG_Observer&&($SVG_Observer=new IntersectionObserver((t=>{t.forEach((t=>{if(!t.isIntersecting)return;const e=t.target,n=(e.$attr("src")||"")[de]();n.length<1||n.$$200().then((t=>{$SVG_Observer[wn](e),t.text().then((t=>{const n="div"._(t),i=n[Ot+je](0);i.id=n.id,n[qt][_e]((t=>i[qt].add(t))),i.onclick=n.onclick,null!=e[Ht]&&e[Ht][Nt+je](i,e),e.remove()})).catch((t=>{e.__("☒")}))})).catch((t=>{$SVG_Observer[wn](e),e.__("☒")}))}))})),[].slice.call("span.svg".$all)[_e]((t=>$SVG_Observer.observe(t))))},ti=()=>{null==$Lazy_Observer&&($Lazy_Observer=new IntersectionObserver(((t,e)=>{t[_e]((t=>{const e=t.target;if(t.isIntersecting){const t=e.parentElement,n=(e.dataset.src||"").trim(),i=e.$$class("fit"),r=e.$$class("fit-p");if(n.length<1)return;e.class_("lazyload"),delete e.dataset.src,n.$$200(!0).then((n=>{$Lazy_Observer[wn](e),e.src=n.src,i&&(t.style["aspect-ratio"]=`${n.img.target.$nw} / ${n.img.target.$nh}`),r&&(t.style["aspect-ratio"]=`${n.img.target.$nw} / ${n.img.target.$nh}`)})).catch((t=>{$Lazy_Observer[wn](e),e.src="https://cdn.jsdelivr.net/gh/pardnchiu/PDRenderKit@latest/static/image/404.svg"}))}}))})),[].slice.call("img.lazyload".$all)[_e]((t=>$Lazy_Observer[wn](t))))};t._SVGListener=Zn,t._LazyListener=ti,t._Listener=t=>{if(null==t)return Zn(),void ti();0!=t.svg&&Zn(),null!=t.lazyload&&ti()},t.$file=t=>new Promise(((e,n)=>{if(!t)return()=>n();let i=new FileReader;i.readAsDataURL(t),i.onload=t=>e(t),i.onerror=t=>n(t)})),t.$imageFromImageFile=t=>new Promise(((e,n)=>{if(!t)return()=>n();let i=new FileReader;i.readAsDataURL(t),i.onload=function(t){if(!t.target)return()=>n();let i=new Image;i.src=String(t.target.result),i.onload=()=>e(i),i.onerror=t=>n(t)}})),t.$imageFromVideoFile=t=>new Promise(((e,n)=>{if(!t)return()=>n();let i=new FileReader;i.readAsArrayBuffer(t),i.onload=function(){if(!i.result)return()=>n();let r=new Blob([i.result],{type:t.type}),s=URL.createObjectURL(r),o=document.createElement("video");o.preload="metadata",o.src=s,o.muted=!0,o.playsInline=!0,o.onloadeddata=function(){let t=document.createElement("canvas"),i=t.getContext("2d");if(t.width=o.videoWidth,t.height=o.videoHeight,!i)return()=>n();i.drawImage(o,0,0,t.width,t.height);let r=t.toDataURL("image/jpg"),s=new Image;s.src=r,s.onload=()=>e(s),s.onerror=t=>n(t),o.ontimeupdate=null,o.pause()},o.onerror=t=>n(t),o.play()}})),t[qn]=(e,n)=>{let i=t.atob(e.split(",")[1]),r=new ArrayBuffer(i.length),s=new Uint8Array(r);for(let t=0;t{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n=e[se];let i="";for(let r=0;r{let e=`${document.cookie};`,n=new RegExp(`${t}=([^ ;]+)?`),i=e.match(n)??[],r=i[i.length-1];if(!i.length||null==r)return null;r=decodeURIComponent(i[i.length-1]);try{return JSON.parse(r)}catch(t){return r}},t._cookie=(t,e,n)=>{const i=(new Date).getTime();let r;"string"!=typeof t||String(t||"").trim().length<1||(e="object"==typeof e&&null!=e?JSON.stringify(e).trim():String(e).trim(),r="number"==typeof n?new Date(i+1e3*n):new Date(i+36e5),document.cookie=`${t}=${e}; expires=${r.toUTCString()}; path=/`)},t[St]=(t="")=>(console.log(t),String(t).$),t.$all=(t="")=>String(t).$all,t.$url=(t="")=>(t.trim().length>0?t:location.href).$url,t._child=(t=[],e)=>{document.body._child(t,e)},t.__child=(t=[])=>{document.body.__child(t)},document.head._child(["style"._(".dom-temp { display: none !important; }")])})(window,document,navigator,location,console,Math,String,Number,Array,Object,Map,Boolean,Date,URL,Image,JSON,RegExp,Element,DocumentFragment,_a,_b,_c,_d,_e,0,0,0,_i,0,_0,_1,_2,_3,_4,0,_6,_7,_8,0,0,_1_,_2_,_3_,_4_,_5_,0,_7_,_8_,_9_,__0,0,__2,__3,__4,0,$0,$1,$2,$3,0,0,$6,$7,0,0,$0_,$1_,$2_,0,0,$5_,0,$7_,0,$9_,0,0,0,$_3,$_4,0,"$","$$",0,"_$","_","__","","-",".","/",":",0,0," "),((t,e,n,i,r,s,o,l,u,a,c,h)=>{const f=/\{\{\s*(((CALC|LENGTH|UPPER|LOWER|DATE)\(\s*[\w\.\s\+\-\*\/\,\s\/\:]+\s*\))|[\w\.]+)\s*\}\}/i,_=new RegExp(f,"gi"),g=/(CALC|LENGTH|UPPER|LOWER)\(([\w\.]+)\s*([\+\-\*\/\%]+)\s*([\d\.]+)\)/,$=/DATE\(([\w\.]+)\s*,\s*([^\n]+)\)/,d=/^\(?\s*([\w]+)(\s*\,|\s+)?/i,p=/\,\s*([\w]+)\s*\)/i,m=/\s+([\w\.]+)\s*$/i,y=/\s*[\!\>\<\=]+\=*\s*/,v=/([\w\.]+)\s*([\+\-\*\/\%])\s*([\d\.]+)/,T=":path",E=":for",b=":if",w=":else-if",L=":else",A=":model",O=":html",I="parentElement",R="textContent",S="toLowerCase",N="remove",U="alt",C="dom",F="path",D="data",M="event",x="next",k="done",j="trim",P="href",V="src",G="border",B="split",H="Radius",z="padding",X="margin",Y="id",q="isArray",W="style",J="Color",K="Image",Q="Size",Z="Attachment",tt="Mode",et="clip",nt="Blend",it="Repeat",rt="Origin",st="Position",ot="background",lt="innerHTML",ut="forEach",at="value",ct="body",ht="nodeType",ft="length",_t="match",gt="shift",$t="isFor",dt="isAry",pt="isObj",mt="filter",yt="TEXT_NODE",vt="addEventListener",Tt="dom-tag",Et="class",bt="child",wt="attr",Lt="$attr",At="$attributes",Ot="$childNodes",It="$next",Rt="$parent",St="$sel",Nt="$selAll",Ut="$keys",Ct="$key",Ft="attr_";function Dt(t){return`*[dom-tag='${t}']`}t.PD=class{dom;path;data;event;done={};constructor(e={}){t._Listener(e.listener);const n="string"==typeof e[Y]?e[Y].$:null;if(!(n instanceof Element))return;this[C]=n,this[F]={},this[D]=e[D],this[M]=e[M]||{};const i=Date.now();this.#t(n,e[D]||{}).then((t=>{const n=Date.now()-i;null!=e[x]&&(console.log("Rendered, took "+n/1e3+" seconds"),e[x](this[C]))}))}#e(t,e,n){return t=i(t),n=i(n),isNaN(t)||isNaN(n)?void 0:"+"===e?t+n:"-"===e?t-n:"*"===e?t*n:"/"===e?t/n:"%"===e?t%n:t}#n(t,e,n){let i=e[t];null==i||"object"!=typeof i||null==i||r[q](i)?null!=i&&s.defineProperty(e,t,{get:()=>i,set:t=>{i=t,n(t)}}):i[Ut][ut]((t=>{this.#n(t,i,n)}))}#i=async(t,n={},i={})=>{const r=t[Rt](0),s=t[At][T];if(null!=r&&null!=s){if(null==this[F][s])this[F][s]=r;else if(this[F][s]==r)return;fetch(s).then((async s=>{const o=await s.text();"div"._(o)[Ot][ut]((e=>{t["_"+bt](e)})),o.$$(/new\s+PD/)||this.#t(t,n,i),t[Ot][ut]((n=>{n instanceof HTMLScriptElement?e[ct]["_"+bt]("script"._(n.$)):r["_"+bt](n,t)})),t[N]()})).catch((()=>{t[N]()}))}};#r=(e,r={},s={})=>{const l=e[Rt](0),u=e.$i,a=(e[Lt](b)||"")[j](),c=(e[Lt](":once")||"")[j](),h=Boolean(isNaN(parseInt(c))?c:parseInt(c));if(null==l||a[ft]<1)return;let f,_,g=[e],$=e[It](0);for(null!=$&&(f=null!=$[Lt](w),_=null!=$[Lt](L));null!=$&&(f||_);)g.push($),$=$[It](0),null!=$&&(f=null!=$[Lt](w),_=null!=$[Lt](L));const d=t[Ct](16),p="temp"._(g._$((t=>t._$(!0)["_"+wt]({[Tt]:d}))));let m=!1;g[ut]((t=>{if(t["_"+wt]({[Tt]:d}),m)return t[N]();const e=(t[Lt](b)||t[Lt](w)||t[Lt](L)||"")[j](),s=null!=t[Lt](L),a=e[B](y).$(0),c=e[B](y).$(1),f=((e[_t](y)||[]).$(0)||"")[j](),_=this.#s(a,r,(t=>{h||(l[Nt](Dt(d))[ut]((t=>t[N]())),l["_"+bt](p._$(!0),u),this.#t(l,r,{[$t]:!0}))}));f.length<1?m=o(_):">"===f?m=(i(_)||0)>(i(c)||0):"<"===f?m=(i(_)||0)<(i(c)||0):">="===f||">=="===f?m=(i(_)||0)>=(i(c)||0):"<="===f||"<=="===f?m=(i(_)||0)<=(i(c)||0):"=="===f||"==="===f?m="null"==c?null==_:"true"==c?o(_):"false"==c?!o(_):"empty"==c?n(_||"")[ft]<1:n(_||"")==n(c):"!="!==f&&"!=="!==f||(m="null"==c?null!=_:"true"==c?!o(_):"false"==c?o(_):"empty"==c?n(_||"")[ft]>0:n(_||"")!=n(c)),t[Ft](b)[Ft](w)[Ft](L),m||s?m&&t.class_("dom-temp"):t[N]()})),this.#t(l,r,s)};#s=(t="",e={},n)=>{if(t[j]()[ft]<1)return;const i=t.$$(f);let r="",s="";i&&(r=t[B](f)[0]||"",s=t[B](f)[4]||"",t=t[_t](f)[1]);const o=t.$$(/^LENGTH\(.+\)/);o&&(t=t.__(/^LENGTH\(|\)$/g,""));const l=t.$$(/^CALC\(.*\)$/);let u="",a=0;if(l){const e=(t=t.__(/^CALC\(|\)$/g,""))[_t](v);t=e.$(1),u=e.$(2),a=parseInt(e.$(3))||0}const c=t.$$(/^UPPER\(.*\)$/),h=t.$$(/^LOWER\(.*\)$/);(c||h)&&(t=t.__(/^(UPPER|LOWER)\(|\)$/g,""));const _=t.$$(/^DATE\([\w\,\-\s\:]*\)$/);let g="";if(_){const e=(t=t.__(/^DATE\(|\)$/g,""))[_t](/(\w+),\s*([^\n]+)/);t=e.$(1),g=e.$(2)}let $=t[B](/\./),d=e,p=$.$(0),m=d[p];$[gt](),m=this.#o($,d,p,m),null!=n&&this.#n(p,d,(t=>{n(t)}));let y="";if(null!=m&&m instanceof Object&&!Array.isArray(m)?y=m[Ut][ft]:null!=m&&(y=m[ft]),i){if(o)return r+y+s;if(l&&(m=this.#e(m,u,a),null==m))return;return r+m+s}if(o)return y;if(l){if(m=this.#e(m,u,a),null==m)return}else{if(c)return m.toUpperCase();if(h)return m[S]();if(_)return parseInt(m).$format(g)}return m};#l=(t,e={})=>{const n=t[Rt](0),i=(t[Lt](A)||"")[j]();t[Ft](A);this.#s(i,e,(e=>{t[at]=e}));if(null==n||null==i||i[j]()[ft]<1)return;const r=t instanceof HTMLInputElement,s=t instanceof HTMLTextAreaElement,o=t instanceof HTMLSelectElement;r||s?(t[vt]("keyup",(t=>{e[i]=t.target[at]})),t[vt]("change",(t=>{e[i]=t.target[at]}))):o&&t[vt]("change",(t=>{e[i]=t.target[at]}))};#u(t,n={}){const i=t[Lt](Tt)||"",r=t[At][Ut][mt]((t=>t.$$(/^:[\w\-]+$/)))[mt]((t=>!t.$$(/\:(path|for|if|else\-if|else|model)/)));r[ft]<1||r[ut]((r=>{const s=(t[Lt](r)||"")[j](),o=this.#s(s,n,(n=>{const o=e[ct][Nt](Dt(i));o[ft]<1||o[ut]((e=>{this.#a(t,r,n,s)}))}));this.#a(t,r,o,s),t[Ft](r)}))}#a(t,e,i="",r){i=n(i),e[S]()===(":"+Et)[S]()&&t._class(i),[[":"+Y,Y],[":"+V,V],[":"+U,U],[":"+P,P],[O,lt]][ut]((n=>{e[S]()===n[0][S]()&&(i[j]()[ft]<1||(t[n[1]]=i))})),":hide"===e[S]()&&Boolean(isNaN(parseInt(i))?i:parseInt(i))&&(t[W].display="none"),[[":"+X,X],[":"+z,z],[":"+G,G],[":"+G+"-"+H,G+H],[":outline","outline"],[":box-sahdow","boxShadow"],[":bg-"+K,ot+K],[":bg-"+Z,ot+Z],[":bg-Blend-"+tt,ot+nt+tt],[":bg-"+et,ot+et],[":bg-"+rt,ot+rt],[":bg-"+st,ot+st],[":bg-"+st+"-X",ot+st+"X"],[":bg-"+st+"-Y",ot+st+"Y"],[":bg-"+it,ot+it],[":bg-"+Q,ot+Q],[":bg-"+J,ot+J],[":"+J,J[S]()]][ut]((n=>{e[S]()===n[0][S]()&&(i[j]()[ft]<1?t[W][n[1]]=r:t[W][n[1]]=i)})),i[j]()[ft]<1?t[Ft](`${e.__(/^:/,"")}`):t["_"+wt]({[`${e.__(/^:/,"")}`]:i})}#c=(t,e={},n={})=>{(()=>{t[At][Ut][mt]((t=>t.$$(/^@[\w]+$/)))[ut]((e=>{const n=e.__(/\@/,"on"),i=t[Lt](e);t[Ft](e),null!=i&&(t[n]=this[M][i])}))})(),(()=>{if(!o(n[$t]))return;const i=(t[Lt](E)||"")[j](),r=(i[_t](d)||[]).$(1),s=(i[_t](p)||[]).$(1);t[At][Ut][mt]((t=>t.$$(/^:@[\w]+$/)))[ut]((i=>{const l=i.__(/^\:\@/,"on");let u=(t[Lt](i)||"")[j]()[B](/\./)[mt]((t=>t[ft]>0))||[],a=e,c=u.$(0),h=a[c];u[gt](),o(n[dt])&&c!=r||o(n[pt])&&c!=s||(h=this.#o(u,a,c,h),null!=h&&(t[l]=this[M][h]))}))})()};#h=(n,i={},r={})=>{const s=n[Lt](Tt)||t[Ct](16),o=(n[Lt](":once")||"")[j](),l=Boolean(isNaN(parseInt(o))?o:parseInt(o));n["_"+wt]({[Tt]:s});const u=n._$(!0),a=n[Rt](0),c=n.$i,h=n[lt].$$(_);null!=parent&&0!=h&&n[Ot][mt]((t=>t[I]===n&&t[ht]===Node[yt]))[ut]((t=>{((t[R]||"")[_t](_)||[])[ut]((n=>{const r=(n[_t](f)||[]).$(1);if(null==r)return;const o=this.#s(r,i,(t=>{if(l)return;const n=e[ct][St](Dt(s));null!=n&&null!=a&&(a["_"+bt](u._$(!0),c),n[N](),this.#t(a,i))}));null!=o&&this.#f(t,r,o)}))}))};#_=(e,n={},i={})=>{const s=e[Rt](0),o=(e[Lt](E)||"")[j](),l=(e[Lt](":once")||"")[j](),u=Boolean(isNaN(parseInt(l))?l:parseInt(l));if(null==s||o[ft]<1)return;const a=t[Ct](16),c=e._$(!0)["_"+wt]({[Tt]:a}),h="temp"._(),f=e[It](0);e[N]();const _=(o[_t](/^\(?\s*(\w+)/)||[]).$(1),g=(o[_t](/\,\s*(\w+)/)||[]).$(1),$=(o[_t](m)||[]).$(1),d=this.#s($,n,(t=>{const e=s[St](Dt(a))?.$i;s[Nt](Dt(a))[ut]((t=>t[N]())),s["_"+bt](c._$(!0),e),this.#t(s,n,{[$t]:!0})}));r[q](d)?d[ut](((t,e)=>{const i=c._$(!0);h["_"+bt](i);const r={[`${_}`]:t,[`${g}`]:e};"object"==typeof t&&null!=t?(t[Ut][ut]((e=>{this.#n(e,t,(()=>{if(u)return;const t=s[St](Dt(a))?.$i;s[Nt](Dt(a))[ut]((t=>t[N]())),s["_"+bt](c._$(!0),t),this.#t(s,n,{[$t]:!0})}))})),this.#u(i,r),this.#c(i,r,{[$t]:!0,[dt]:!0}),this.#g(i,r),this.#t(i,r,{[$t]:!0})):(this.#u(i,r),this.#c(i,r,{[$t]:!0,[dt]:!0}),this.#g(i,r))})):"object"==typeof d&&null!=d&&d[Ut][ut]((t=>{const e=c._$(!0);h["_"+bt](e),this.#n(t,d,(()=>{if(u)return;const t=s[St](Dt(a))?.$i;s[Nt](Dt(a))[ut]((t=>t[N]())),s["_"+bt](c._$(!0),t),this.#t(s,n,{[$t]:!0})}));const i=d[t],o={[`${_}`]:t,[`${g}`]:i};this.#u(e,o),this.#c(e,o,{[$t]:!0,[pt]:!0}),this.#$(e,o),this.#t(e,o,{[$t]:!0,[dt]:r[q](i)})})),s["_"+bt](h,f)};#g=(t,e={})=>{const n=(t[Lt](E)||"")[j](),i=(n[_t](d)||[]).$(1),r=(n[_t](p)||[]).$(1),s=e[r];t[Ft](E),t[Ot][mt]((e=>e[I]===t&&e[ht]===Node[yt]))[ut]((t=>{((t[R]||"")[_t](_)||[])[ut]((n=>{const o=(n[_t](f)||[]).$(1);if(null==o)return;const l=o[_t](g),u=o[_t]($),a=(l||[]).$(3),c=Number((l||[]).$(4));let h=(null!=l?l.$(2):o)[B](/\./),_=e,d=h.$(0),p=_[d];h[gt](),null!=l&&d===i||null!=u&&d===i?p=this.#s(o,e)||"":d===i?p=this.#o(h,_,d,p):d===r&&(p=this.#e(s,a,c)),null!=p&&this.#f(t,o,p)}))})),this.#t(t,e,{[$t]:!0})};#$=(t,e={})=>{const n=(t[Lt](E)||"")[j](),i=(n[_t](d)||[]).$(1),r=(n[_t](p)||[]).$(1);t[Ft](E),t[Ot][mt]((e=>e[I]===t&&e[ht]===Node[yt]))[ut]((t=>{((t[R]||"")[_t](_)||[])[ut]((n=>{let s=(n[_t](f)||[]).$(1);if(null==s)return;const o=s[_t](g),l=(o||[]).$(3),u=Number((o||[]).$(4));let a=(null!=o?o.$(2):s)[B](/\./),c=e,h=a.$(0),_=c[h];a[gt](),null!=o&&h===r?_=this.#s(s,e)||"":h===r?_=this.#o(a,c,h,_):null!=o&&h===i&&(_=this.#e(_,l,u)),null!=_&&this.#f(t,s,_)}))})),this.#t(t,e,{[$t]:!0})};#o(t,e,n,i){if(null!=i){for(;t[ft]>0;)i=i[t.$(0)],t[gt]();return i}}#f(t,e,n){const i=("{{\\s*?"+(e=e.__(/(\?|\.|\+|\*|\\|\%|\-|\(|\))/g,"\\$1"))+"\\s*?}}").$regexp("i");n=(t[R]||"").__(i,n)||"",t[R]=n}async#t(t,n={},i={}){const r=e.$init;return t==this.dom&&(this.#u(t,n),this.#c(t,n,i),this.#h(t,n,i)),r?(t[Rt](0)==this[C]&&(this[k][t.$i]=!1),await new Promise((e=>(t.$childAll[ut]((async t=>{const e=t[At];if(null!=$Lazy_Observer&&t["$$"+Et]("lazyload")&&$Lazy_Observer.observe(t),null!=$SVG_Observer&&t["$$"+Et]("svg")&&"SPAN"===t.tagName&&$SVG_Observer.observe(t),null!=t[Rt](0)&&null==e[w]&&null==e[L])if(e[T])this.#i(t,n,i);else{if(!e[E])return this.#r(t,n,i),this.#l(t,n),this.#u(t,n),this.#c(t,n,i),this.#h(t,n,i),await this.#t(t,n,i);this.#_(t,n,i)}})),t.class_("dom-temp"),t[Rt](0)==this[C]||t==this[C]?(this[k][t.$i]=!0,e(t)):null)))):t}}})(window,document,String,Number,Array,Object,Boolean,Image,JSON,RegExp,Element,DocumentFragment);class $listener{observer;constructor(t){t=t??{},this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&t.do instanceof Function&&t.do(e.target)}))})),"string"==typeof t.selector&&[].slice.call(document.querySelectorAll(t.selector)).forEach((t=>this.observe(t)))}observe(t){this.observer.observe(t)}unobserve(t){this.observer.unobserve(t)}} \ No newline at end of file +"use strict";let $SVG_Observer,$Lazy_Observer,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_0_,_1_,_2_,_3_,_4_,_5_,_6_,_7_,_8_,_9_,__0,__1,__2,__3,__4,__5,$0,$1,$2,$3,$4,$5,$6,$7,$8,$9,$0_,$1_,$2_,$3_,$4_,$5_,$6_,$7_,$8_,$9_,$_0,$_1,$_2,$_3,$_4,$_5,$vw,$vh,$history=[],$$android,$$ios,$$mobile,$$desktop;((t,e,n,i,r,s,o,l)=>{const u="innerWidth",a="innerHeight",c="test",h="userAgent";i(r[s]({length:26},((t,e)=>String.fromCharCode(97+e))).map(((t,e)=>{let n=e<10,i=e>=10&&e<20,r=e>=20,s=String(e),o=s.charAt(s.length-1),l=e=>`${e?"$":"_"}${r?"_":""}${o}${i?"_":""} = "${e?t.toUpperCase():t}";`;return`${l(0)}${l(1)}${n?`_${t} = ${e};`:""}`}))[l]("")),$$android=/android/i[c](e[h]),$$ios=/iphone|ipad/i[c](e[h]),$$mobile=$$android||$$ios,$$desktop=!$$mobile,$history=[n.href],[$vw,$vh]=[t[u],t[a]],t.onresize=e=>{[$vw,$vh]=[t[u],t[a]]}})(window,navigator,location,eval,Array,"from",0,"join"),((t,e,n,i,r,s,o,l,u,a,c,h,f,_,g,$,d,p,m,y,v,T,E,b,w,L,A,O,I,R,S,N,U,C,F,D,M,x,k,j,P,V,G,B,H,z,X,Y,q,W,J,K,Q,Z,tt,et,nt,it,rt,st,ot,lt,ut,at,ct,ht,ft,_t,gt,$t,dt,pt,mt,yt,vt,Tt,Et,bt,wt,Lt,At,Ot,It,Rt,St,Nt,Ut,Ct,Ft,Dt,Mt,xt,kt,jt,Pt,Vt)=>{const Gt="getElementById",Bt="querySelector",Ht="parentElement",zt="previousElementSibling",Xt="nextElementSibling",Yt="createElement",qt="classList",Wt="Attribute",Jt="get",Kt="Width",Qt="Height",Zt="scroll",te="natural",ee="client",ne="All",ie="toString",re="prototype",se="length",oe="getHours",le="dataset",ue="push",ae="toUpperCase",ce="toLowerCase",he="floor",fe="size",_e="forEach",ge="set",$e="replace",de="trim",pe="match",me="test",ye="origin",ve="pathname",Te="inner",Ee="HTML",be="empty",we="children",Le="childNodes",Ae="style",Oe="margin",Ie="padding",Re="Top",Se="Left",Ne="Bottom",Ue="Right",Ce="width",Fe="height",De="class",Me="line",xe="data",ke="attr",je="child",Pe="history",Ve="query",Ge="node",Be="insertBefore",He="appendChild",ze="attributes",Xe="yy",Ye="MM",qe="DD",We="dd",Je="HH",Ke="hh",Qe="mm",Ze="ss",tn="init",en="url",nn="timestamp",rn="date",sn="format",on="map",ln="random",un="len",an="display",cn="To",hn="abs",fn="jpeg",_n="jpg",gn="png",$n="download",dn="image",pn="split",mn="font",yn="substring",vn="mt",Tn="str",En="req",bn="gone",wn="unobserve",Ln="fromEntries",An="cloneNode",On="parse",In="json",Rn="keys",Sn="isArray",Nn="createTextNode",Un="append",Cn="files",Fn="values",Dn="header",Mn="href",xn="join",kn="currentScript",jn="parentNode",Pn="removeChild",Vn="getAttribute",Gn=[x,q][xn](Ct),Bn=[W,S][xn](Ct),Hn=[R,X,U,G][xn](Ct),zn=[M,x,W][xn](Ct),Xn=[dt,rt,mt,C,G,U,C,X,ht,x,q][xn](Ct),Yn="$base64",qn="$blob",Wn=["load","click","dblclick","scroll","mousedown","mouseup","mouseenter","mouseleave","mouseover","mouseout","mousemove","touchstart","touchmove","touchenter","touchleave","touchend","touchup","drop","dragstart","dragend","dragenter","dragover","dragleave","focus","blur","input","keydown","keyup","change","contextmenu","cut","paste"],Jn=a.defineProperty;let Kn=!0;var Qn;Kn&&(Kn=!1,function(t){const n=[N,B,H,Z,X,x,D,M,q][xn](Ct),s=[it,X,C,R,q,B,X][xn](Ct),o=[dt,Hn,Pt,ft,q,U][xn](Ct),l=[dt,Hn,Pt,it,zn][xn](Ct),a=[[[mn,Ft,fe,xt],[v,b,H,Q]],[[Me,Ft,Fe,xt],[T,O,H,Q]]],c=[[["%",N,t]],[[lt,Gn,ut,Bn,xt],[M,q,q,H,Y,xt,Mt,Mt,D,Gn,M,Bn,Dt,N,B,V,Mt,H,Hn,N,zn,Mt,t]],[[s,xt],[l]],[[ft,x,N,C,G,Y,C,xt],[lt,dt,ft,Ft+E+Dt+y]]][on]((t=>u[Sn](t)?t[on]((t=>t[xn](Ct)))[xn](Pt):t)).join("\n"),h=a[on]((t=>u[Sn](t)?t[on]((t=>t[xn](Ct)))[xn](Ct):t)).join(";"),f=e[kn][Vn](n);f&&f===o?(e[Ot+tn]=i[Mn],e[Ot+s]=l,r.log(c,h)):e[kn][jn][Pn](e[kn])}(Xn)),Qn=o[re],Jn(Qn,Ot+In,{get:function(){try{return $[On](this[ie]())}catch(t){return}}}),Jn(Qn,Ot+Ee[ce](),{get:function(){const t={" ":" ","<":"<",">":">",'"':""","'":"'"};return this[ie]()[$e](/[ \<\>\"\']/g,(e=>t[e]))}}),Jn(Qn,Ot+"img",{get:async function(){return new Promise(((t,e)=>{const n=new g;n.src=this[ie](),n.crossOrigin="anonymous",n.onload=()=>t(n),n.onerror=e}))}}),Jn(Qn,It+In,{get:function(){return null!=this[Ot+In]}}),Jn(Qn,It+be,{get:function(){return this[ie]()[de]()[se]<1}}),Jn(Qn,Ut,{value:function(t="",e=""){const n=this[ie]();return"string"==typeof t&&t[de]()[se]<1?n:n[$e](t,e)}}),Jn(Qn,Ot+"regexp",{value:function(t=""){return new d(this[ie](),t)}}),Jn(Qn,"$en",{value:function(t=!1){const e=this[ie]();return t?encodeURIComponent(e):encodeURI(e)}}),Jn(Qn,"$de",{value:function(t=!1){const e=this[ie]();return t?decodeURIComponent(e):decodeURI(e)}}),Jn(Qn,"$copy",{value:async function(){try{await n.clipboard.writeText(this[ie]())}catch(t){console.error(t)}}}),Jn(Qn,It,{value:function(t){const e=this[ie]();return t instanceof d?t[me](e):null==t?e[de]()[se]>0:t[de]()===e[de]()}}),Jn(Qn,"$$200",{value:async function(t){return new Promise((async(e,n)=>{try{const i=await fetch(this[ie]());if(i.ok){const r=i.headers[Jt]("Content-Type");if(r&&r.startsWith("image/")){if("image/svg+xml"==r&&!t)return void e(i);const s=await i.blob(),o=new Image,l=URL.createObjectURL(s);o.src=l,o.onload=()=>{e({src:l,img:o})},o.onerror=t=>{URL.revokeObjectURL(l),n(t)}}else e(i)}else n(new Error(`HTTP error! status: ${i.status}`))}catch(t){n(t)}}))}}),Jn(Qn,Ot+en,{get:function(){const t=this[ie]();try{return new _(t)}catch(e){return new _(i[ye]+t)}}}),Jn(Qn,Ot+Ve+ne,{get:function(){return this[ie]()[Ot+en][Ot+Ve+ne]}}),[Ot+En,Nt+Pe,Ut+Pe,Nt+Ve,Ut+Ve,Ve+Nt,Ve+Ut,Ot+Ve][_e]((t=>Jn(Qn,t,{value:function(){const e=this[ie]()[Ot+en];return e[t].apply(e,a[Fn](arguments))}}))),Jn(Qn,"_fa",{get:function(){return("i."+this[ie]()[$e](/\s/,"."))._()}}),Jn(Qn,Ot,{get:function(){const t=this[ie]();return t.startsWith("#")?e[Gt](this[yn](1)):/[\.\[\]]/[me](t)?e[Bt](t):e[Gt](t)||e[Bt](t)}}),Jn(Qn,Ot+"all",{get:function(){return[...e[Bt+ne](this[ie]())]}}),Jn(Qn,Nt,{value:function(t,n){const r=/^\w+(?=[\#\.]*)/i,s=/\.([\w_-]+)?/gi,o=r[me](this)?this[pe](r)[0]:null,l=/^(svg|rect|circle|ellipse|line|polyline|polygon|path|text|tspan|g|defs|symbol|image|use|clipPath|mask|linearGradient|radialGradient)$/i[me](o),c="temp"===this[ie](),h="txt"===this[ie](),f=c?e.createDocumentFragment():h?e[Nn](String(t)):l?e.createElementNS("http://www.w3.org/2000/svg",o):e[Yt](o),_=s[me](this)?this[pe](s):[],g=this[pe](/\#([\w_-]+)?/i),$=[it,X,C,R,q,B,X][xn](Ct),d=[dt,Hn,Pt,it,zn][xn](Ct);if(h)return f;g&&(f.id=g[1]),_[_e]((t=>f[qt].add(t[$e](/^\./,""))));const p=e[Ot+tn],m=e[Ot+$];if(!p||p!=i[Mn]||!m||m!=d)return f;let y,v;if(/^span\.svg/i[me](this)&&null!=$SVG_Observer&&$SVG_Observer.observe(f),null==t&&null!=n&&([t,n]=[n,null]),null!=t&&null!=n)[y,v]=[t,n];else if(null==n)"string"==typeof t||"number"==typeof t||u[Sn](t)?v=t:y=t;else if(null==t)return f;const T="input"===o;if(T||"textarea"===o){const t=/\s(.+)/i,e=this[pe](t);f.placeholder=e?e[1]:"";const n=/\@(\w+)/i,i=this[pe](n);T&&(f.type=i?i[1]:"test")}if("object"==typeof y&&null!=y&&a.keys(y)[_e]((t=>{const e=y[t];["value","innerText","innerHTML","textContent","contentEditable"].includes(t)?f[t]=e:["color","backgroundColor"].includes(t)?f[Ae][t]=e:"style"===t?a.keys(e)[_e]((t=>f[Ae][t]=e[t])):"lazyload"===t?null!=$Lazy_Observer?(f[qt].add("lazyload"),f[ge+Wt]("data-src",e),$Lazy_Observer.observe(f)):f.src=e:null!=e&&f[ge+Wt](t,e)})),null!=v){const t="string"==typeof v,n="number"==typeof v,i=u[Sn](v);if(t||n){const t=String(v);"img"===o||"source"===o?f.src=t:f[Te+Ee]=t}else i&&v[_e]((t=>{const n=t instanceof Element;"string"==typeof t||"number"==typeof t?c?f[He](e[Nn](String(t))):f[Te+Ee]+=t:n&&f[He](t)}))}return f}}),Jn(Qn,Ot+"num",{get:function(){const t=l(this[ie]()[$e](/\,/g,""));return isNaN(t)?void 0:t}}),Jn(Qn,Ot+un,{get:function(){return this[ie]()[se]}}),Jn(Qn,It+vn,{get:function(){return this[ie]()[de]()[se]<1}}),Jn(Qn,Ot+"ary",{value:function(t=""){return this[ie]()[pn](t)}}),Jn(Qn,"$fit",{value:function(t){if(null!=t)return this[ie]()[pe](t)}}),(t=>{Jn(t,Ot+rn,{get:function(){return new f(1e3*this)}}),Jn(t,Ot+bn,{get:function(){const t=s[he](f.now()/1e3),e=parseInt(this),n=s[hn](t-e),i=t>e,r=i?"前":"",o=3600,l=24*o,u=30*l,a=365*l;if(n<60)return"剛剛";let c=i?"":"還有";return n>=a?c+=s[he](n/a)+"年":n>=u?c+=s[he](n/u)+"個月":n>=604800?c+=s[he](n/o)+"週":n>=l?c+=s[he](n/l)+"天":n>=o?c+=s[he](n/o)+"小時":n>=60&&(c+=s[he](n/60)+"分鐘"),c+r}}),[Ot+Z,Ot+Xe,Ot+Xe+Xe,Ot+_t,Ot+Ye,Ot+rt,Ot+qe,Ot+U,Ot+We,Ot+ut,Ot+Je,Ot+M,Ot+Ke,Ot+R,Ot+et,Ot+V,Ot+Qe,Ot+Y,Ot+Ze][_e]((e=>{Jn(t,e,{get:function(){return this[Ot+rn][e]}})})),Jn(t,Ot+sn,{value:function(t){return this[Ot+rn][Ot+sn](t)}}),Jn(t,Ot+Tn,{get:function(){return o(this)}}),Jn(t,Ot+"num",{get:function(){return l(this)}})})(l[re]),(t=>{Jn(t,Ot+on,{get:function(){const t=new c;return this[_e](((e,n)=>t[ge](e,n))),t}}),Jn(t,Ot+ln,{get:function(){let t=this;for(let e=t[se]-1;e>0;e--){const n=s[he](s[ln]()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}}),Jn(t,It+be,{get:function(){return this[se]<1}}),Jn(t,Nt,{value:function(t){let e=this;return u[Sn](t)?e=e.concat(t):null!=t&&e[ue](t),e}}),Jn(t,Ot,{value:function(t){const e=this[se];return"number"!=typeof t||s[hn](t)>e?null:this[(t<0?e:0)+t]}}),Jn(t,Ot+x,{value:function(t){const e=this.indexOf(t);if(-1!=e)return e}}),Jn(t,"$_",{value:function(t){const e=this[se];let n=this;return"number"!=typeof t||s[hn](t)>e?n:-1===t?(n.pop(),n):0===t?(n.shift(),n):(n=n.splice((t<0?e:0)+t,1),n)}}),Jn(t,It,{value:function(t){return-1!==this.indexOf(t)}}),Jn(t,Ot+En,{value:function(e={}){return`/${t.$str("/")}`[$e](/[\/]+/g,"/").$req(e)}}),Jn(t,Ot+un,{get:function(){return this[se]}}),Jn(t,It+vn,{get:function(){return this[se]<1}}),Jn(t,Ot+Tn,{value:function(t){return"string"!=typeof t&&"number"!=typeof t?this.join(""):this.join(String(t)[ie]())}}),Jn(t,St,{value:function(t){if(null==t)return this;let e=[];for(let n=0,i=this[n];n{Jn(t,Ot+on,{get:function(){const t=new Map;for(const e in this)this.hasOwnProperty(e)&&t.set(e,this[e]);return t}}),Jn(t,Ot+Rn,{get:function(){return a[Rn](this)}}),Jn(t,Ot+"vals",{get:function(){return a[Fn](this)}}),Jn(t,Ot,{value:function(t){if(null!=t)return this[String(t)]}}),Jn(t,It,{value:function(t){return null!=t&&null!=this[String(t)]}}),Jn(t,Ot+_e,{value:function(t){if(t instanceof Function)for(const e in this)this.hasOwnProperty(e)&&t(e,this[e])}})})(a[re]),(t=>{Jn(t,Ot+"obj",{get:function(){return a[Ln](this)}}),Jn(t,It+be,{get:function(){return 0===this[fe]}}),Jn(t,se,{get:function(){return this[fe]}}),Jn(t,Nt,{value:function(t,e){const n=new c(this);return n[ge](t,e),n}}),Jn(t,Ot,{value:function(t){return this[Jt](t)}}),Jn(t,Ot+un,{get:function(){return this[fe]}}),Jn(t,It+vn,{get:function(){return 0===this[fe]}})})(c[re]),(t=>{Jn(t,Ot+Z,{get:function(){return this.getFullYear()}}),Jn(t,Ot+Xe,{get:function(){return`${this[Ot+Z]}`.slice(-2)}}),Jn(t,Ot+Xe+Xe,{get:function(){return this[Ot+Z]}}),Jn(t,Ot+_t,{get:function(){return this.getMonth()+1}}),Jn(t,Ot+Ye,{get:function(){const t=this[Ot+_t];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+rt,{get:function(){return this.getDate()}}),Jn(t,Ot+qe,{get:function(){const t=this[Ot+rt];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+U,{get:function(){return this.getDay()}}),Jn(t,Ot+We,{get:function(){const t=this[Ot+U];return 0===t?"Sun":1===t?"Mon":2===t?"Tue":3===t?"Wed":4===t?"Thu":5===t?"Fri":6===t?"Sat":"NaN"}}),Jn(t,Ot+ut,{get:function(){return this[oe]()}}),Jn(t,Ot+Je,{get:function(){const t=this[Ot+ut];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+M,{get:function(){return this[oe]()%12||12}}),Jn(t,Ot+Ke,{get:function(){const t=this[Ot+M];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+R,{get:function(){return this[oe]()>=12?"pm":"am"}}),Jn(t,Ot+et,{get:function(){return this[Ot+R][ae]()}}),Jn(t,Ot+V,{get:function(){return this.getMinutes()}}),Jn(t,Ot+Qe,{get:function(){const t=this[Ot+V];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+Y,{get:function(){return this.getSeconds()}}),Jn(t,Ot+Ze,{get:function(){const t=this[Ot+Y];return`${t<10?"0":""}${t}`}}),Jn(t,Ot+nn,{get:function(){return s[he](this.getTime()/1e3)}}),Jn(t,Ot+bn,{get:function(){return this[Ot+nn][Ot+bn]}}),Jn(t,Ot+sn,{value:function(t){return t=t[$e](/Y{4}/gi,this[Ot+Xe+Xe])[$e](/Y{2}/gi,this[Ot+Xe])[$e](/Y{1}/gi,this[Ot+Z])[$e](/M{2,}/g,this[Ot+Ye])[$e](/M{1}/g,this[Ot+_t])[$e](/D{2,}/g,this[Ot+qe])[$e](/D{1}/g,this[Ot+rt])[$e](/H{2,}/g,this[Ot+Je])[$e](/H{1}/g,this[Ot+ut])[$e](/h{2,}/g,this[Ot+Ke])[$e](/h{1}/g,this[Ot+M])[$e](/m{2,}/g,this[Ot+Qe])[$e](/m{1}/g,this[Ot+V])[$e](/s{2,}/g,this[Ot+Ze])[$e](/s{1}/g,this[Ot+Y])[$e](/A{1}/g,this[Ot+et])[$e](/a{1}/g,this[Ot+R])[$e](/d{2,}/g,this[Ot+We])[$e](/d{1}/g,this[Ot+U])}}),Jn(t,Ot+rn,{value:function(t){const e="object"==typeof t&&null!=t,n=this[Ot+Z],i=this[Ot+_t]-1;if(!e)return new f;const r="object"==typeof t.pre&&null!=t.pre;return h(t.start)&&t.start?new f(n,i,1):h(t.end)&&t.end?new f(n,i-1,0):r?h(t.pre.start)&&t.pre.start?new f(n,i-1,1):h(t.pre.end)&&t.pre.end?new f(n,i,0):new f:new f}})})(f[re]),(n=>{Jn(n,Yn,{value:function(t=dn+"/"+fn,n){const i="number"==typeof n,r=e[Yt]("canvas"),o=r.getContext("2d"),l=parseInt(this[Ce]),u=parseInt(this[Fe]);if(o){if(i&&nnull==this.src?dn+"."+t[pn]("/")[1]:this.src[yn](this.src.lastIndexOf("/")+1))(),r="a"._(),s=_.createObjectURL(this.$blob(t));r.href=s,r.download=n??i,r._attr({type:"application/octet-stream"}),e.body[He](r),r.click(),r.$rm(),URL.revokeObjectURL(s)}}),[_n,gn][_e]((t=>{const e=dn+"/"+(t==_n?fn:gn);Jn(n,Ot+t,{value:function(t){return this[Yn](e,t)}}),Jn(n,Nt+$n+t[ae](),{value:function(t){n[$n](e,t)}})})),Jn(n,Nt+$n,{value:function(t=dn+"/"+fn,e){n[$n](t,e)}})})(g[re]),(t=>{Jn(t,"$"+Ve+ne,{get:function(){const t=new URLSearchParams(this.search),e=new c;return t[_e](((t,n)=>{e.set(t,n)})),a[Ln](e)}});let n=!1;Jn(t,Ot+En,{value:function(t={},e=!1){if(null==t)return;let i=this.href;const r="object"==typeof t[In]&&null!=t[In]&&!u[Sn](t[In]);let s;return t[Cn]&&t.tag?(s=new FormData,r&&a.keys(t.json)[_e]((e=>{s[Un](e,t[In][e])})),t[Cn][_e]((e=>{s[Un](t.tag,e)}))):r&&(s=$.stringify(t[In])),new Promise(((r,l)=>{if(n&&e)return l("等待請求完成.");e&&(n=!0);const u=new XMLHttpRequest;u.open(t.method||"GET",i),t[Dn]&&a[Rn](t[Dn])[_e]((e=>{u.setRequestHeader(e,t[Dn][e])})),u.withCredentials=h(t.credentials)||!1,u.onreadystatechange=()=>{switch(u.readyState){case 1:case 2:case 3:break;case 4:e&&(n=!1);const t=u.responseText,i=u.status;if(/^(4|5)[0-9]{2}/[me](o(i)))return void l(t);try{r($[On](t),i)}catch(e){r(t,i)}}},u.send(s)}))}}),Jn(t,Nt+Pe,{value:function(t){const n=this.href;return $history[ue](n),history.pushState(null,"",n),"string"==typeof t&&t[de]()[se]>0&&(e.title=t),this}}),Jn(t,Ut+Pe,{value:function(t){const n=this.href;return $history.pop(),$history[ue](n),history.replaceState(null,"",n),"string"==typeof t&&t[de]()[se]>0&&(e.title=t),this}}),Jn(t,Nt+Ve,{value:function(t){let e=this[ye]+this[ve],n=this.$queryAll;return"object"!=typeof t||null==t||u[Sn](t)||a.keys(t)[_e]((e=>n[e]=t[e])),a.keys(n)[_e](((t,i)=>e+=`${0==i?"?":"&"}${t}=${n[t]}`)),new URL(e)}}),Jn(t,Ut+Ve,{value:function(t){return this.query__()._query(t)}}),Jn(t,Ve+Nt,{value:function(t){let e=this[ye]+this[ve],n=this.$queryAll;return"string"==typeof t&&t[de]()[se]>0?n[t]=null:u[Sn](t)&&t[_e]((t=>{n[String(t)]=null})),a.keys(n)[_e](((t,i)=>{e+=`${0==i?"?":"&"}${t}=${n[t]}`})),new URL(e)}}),Jn(t,Ve+Ut,{value:function(){return new URL(this[ye]+this[ve])}}),Jn(t,Ot+Ve,{value:function(t){return this.searchParams[Jt](t)}})})(_[re]),(t=>{[[Ot,Te+Ee],[Ot+Ee[ce](),"outer"+Ee],[Ot+Q,Zt+Se],[Ot+Z,Zt+Re],[Ot+K,ee+Kt],[Ot+M,ee+Qt],[Ot+Y+K,Zt+Kt],[Ot+Y+M,Zt+Qt],[Ot+G+K,te+Kt],[Ot+G+M,te+Qt]][_e]((e=>{Jn(t,e[0],{get:function(){return this[e[1]]}})})),Jn(t,"$text",{get:function(){let t=[];return[...this[Le]].filter((t=>t.nodeType===Node.TEXT_NODE&&t.textContent[de]()[se]>0)).forEach((e=>t[ue](e.textContent[de]()))),t.join(" ")}}),Jn(t,Ot+x,{get:function(){const t=this[Ht];return t instanceof Element?[...t[we]].indexOf(this):-1}}),Jn(t,Ot+ze,{get:function(){let t=new c;for(const e of this[ze])t.set(e.name,e.value[de]());return a[Ln](t)}}),[[Ot+qt,qt],[Ot+we,we],[Ot+Le,Le]][_e]((e=>{Jn(t,e[0],{get:function(){return[...this[e[1]]]}})})),Jn(t,se,{get:function(){return this[we][se]}}),Jn(t,Nt,{value:function(t=""){return this[Te+Ee]+=o(t),this}}),Jn(t,Ut,{value:function(t=""){return this[Te+Ee]=o(t),this}}),Jn(t,St,{value:function(t=!1){return this[An](h(t))}}),[[Nt+Q,Zt+Se],[Nt+Z,Zt+Re]][_e]((e=>{Jn(t,e[0],{value:function(t=NaN){return"number"!=typeof t||isNaN(t)||(this[e[1]]=t),this}})})),[[Nt+K,Ce],[Nt+M,Fe],[Nt+H+q,Ie+Re],[Nt+H+P,Ie+Se],[Nt+H+S,Ie+Ne],[Nt+H+X,Ie+Ue],[Nt+V+q,Oe+Re],[Nt+V+P,Oe+Se],[Nt+V+S,Oe+Ne],[Nt+V+X,Oe+Ue]][_e]((e=>{Jn(t,e[0],{value:function(t){if("number"==typeof t||"string"==typeof t){t=o(t)[de]();const n=/^\d+$/[me](t);this[Ae][e[1]]=t+(n?"px":"")}return this}})})),[[Nt+V,"_mt","_ml","_mb","_mr"],[Nt+H,"_pt","_pl","_pb","_pr"]][_e]((e=>{Jn(t,e[0],{value:function(t,n,i,r){return void 0===t&&void 0===n&&void 0===i&&void 0===r||(void 0===n&&void 0===i&&void 0===r?n=i=r=t:void 0===i&&void 0===r?(i=t,r=n):void 0===r&&(r=n),this[e[1]](t||0),this[e[2]](r||0),this[e[3]](i||0),this[e[4]](n||0)),this}})})),Jn(t,De+Ut,{value:function(){return this.className="",this}}),Jn(t,Ut+De,{value:function(t=[]){return this.class__()[Nt+De](t),this}}),Jn(t,It+De,{value:function(t=""){return"string"==typeof t&&t[de]()[se]>0&&this[qt].contains(t)}}),Jn(t,It+De+Nt,{value:function(t=!1,e=[]){return h(t)&&"string"==typeof e&&e[de]()[se]>0?this.class_(e):this[Nt+De](e),this}}),Jn(t,It+Nt+De,{value:function(t=!1,e=[]){return h(t)&&"string"==typeof e&&e[de]()[se]>0?this[Nt+De](e):this.class_(e),this}}),[Nt+Ae,Nt+xe,Nt+ke][_e]((e=>{Jn(t,e,{value:function(t={}){return("object"!=typeof t||null==t||u[Sn](t)?[]:a.keys(t)).filter((t=>"string"==typeof t&&t[de]()[se]>0)).forEach((n=>{e===Nt+Ae?this[Ae][n]=t[n]:e===Nt+xe?this[le][n]=t[n]:e===Nt+ke&&this[ge+Wt](n,t[n])})),this}})})),[Nt+De,De+Nt,Ae+Nt,xe+Nt,ke+Nt][_e]((e=>{Jn(t,e,{value:function(t=[]){return(u[Sn](t)?t:"string"==typeof t&&t[de]()[se]>0?t[pn](/[,. ]/):[]).filter((t=>"string"==typeof t&&t[de]()[se]>0)).forEach((t=>{e===Nt+De?this[qt].add(t):e===De+Nt?this[qt].remove(t):e===Ae+Nt?this[Ae][t]="":e===xe+Nt?delete this[le][t]:e===ke+Nt&&this["remove"+Wt](t)})),this}})})),[Ot+Ae,Ot+xe,Ot+ke][_e]((e=>{Jn(t,e,{value:function(t=""){if(!("string"!=typeof t||t[de]()[se]<1))return e===Ot+Ae?this[Ae][t]:e===Ot+xe?this[le][t]:e===Ot+ke?this[Jt+Wt](t):void 0}})})),[[It+xe,Ot+xe],[It+ke,Ot+ke]][_e]((e=>{Jn(t,e[0],{value:function(t="",n=""){return!("string"!=typeof t||t[de]()[se]<1)&&((n=o(n))[de]()[se]<1?null!=this[e[1]](t):this[e[1]](t)===n)}})})),Jn(t,Nt+je,{value:function(t=[],e){return"string"==typeof t&&t[de]()[se]>0||"number"==typeof t?this[Te+Ee]+=t:u[Sn](t)&&t[se]>1?t[_e]((t=>{"string"==typeof t&&t[de]()[se]>0||"number"==typeof t?this[Te+Ee]+=t:null!=t&&this[He](t)})):u[Sn](t)&&1===t[se]?e instanceof Element&&e[Ht]===this?this[Be](t[0],e):"number"==typeof e&&s[hn](e)<=this[we][se]?this[Be](t[0],this[we][e]):null!=t[0]&&this[He](t[0]):e instanceof Element&&e[Ht]===this?this[Be](t,e):"number"==typeof e&&s[hn](e)<=this[we][se]?this[Be](t,this[we][e]):null!=t&&this[He](t),this}}),Jn(t,Ut+je,{value:function(t=[]){return this.__()._child(t),this}}),Jn(t,Ot+je,{value:function(t=[]){let e=this;return u[Sn](t)?t[_e]((t=>{"string"==typeof t&&t[de]()[se]>0?e=e[Bt](t):"number"==typeof t&&s[hn](t)<=e[we][se]&&(e=e[we][(t<0?e[we][se]:0)+t])})):"string"==typeof t&&t[de]()[se]>0?e=this[Bt](t):"number"==typeof t&&s[hn](t)<=this[we][se]&&(e=this[we][(t<0?this[we][se]:0)+t]),e===this?void 0:e}}),Jn(t,"$parent",{value:function(t=0){let e=this[Ht];if("number"==typeof t&&t>0)for(var n=0;n0)for(var n=0;n0)for(var n=0;n0?this[Bt](t):null}}),Jn(t,Ot+"sel"+ne,{value:function(t=""){return"string"==typeof t&&t[de]()[se]>0&&this[Bt+ne](t)||[]}}),Jn(t,"_go",{value:function(t=""){return"string"==typeof t&&t[de]()[se]>0&&(this.href=t),this.target="_self",this}}),Jn(t,"_open",{value:function(t=""){return"string"==typeof t&&t[de]()[se]>0&&(this.href=t),this.target="_blank",this}}),Wn[_e]((e=>Jn(t,`_${e}`,{value:function(t){return this[`on${e}`]=t instanceof Function?t:null,this}}))),Jn(t,"_video",{value:function(t={}){if(this instanceof HTMLVideoElement&&(this._attr({controlsList:["nodownload","noremoteplayback"].join(",")}),"string"==typeof t.preload&&(this.preload=t.preload),"boolean"==typeof t.loop&&(this.loop=t.loop),"boolean"==typeof t.muted&&(this.muted=t.muted),"boolean"==typeof t.controls&&(this.controls=t.controls),"boolean"==typeof t.playsinline&&t.playsinline&&this._attr({playsinline:""}),"boolean"==typeof t.download||"boolean"==typeof t.remote)){let e=[];t.download||e[ue]("nodownload"),t.remote||e[ue]("noremoteplayback"),this._attr({controlsList:e.join(" ")})}return this}}),Jn(t,Nt+an,{value:function(t=""){return"string"==typeof t&&t[de]()[se]>0&&(this[Ae][an]=t),this}}),Jn(t,Zt+cn+wt,{value:function(t){if("number"!=typeof t)return this;const e=this[ee+Kt],n=this[Zt+Kt];let i=n-t{Jn(t,e[0],{get:function(){return this[e[1]]}})})),Jn(t,"$rm",{value:function(){this.remove()}})})(p[re]),(t=>{Jn(t,Ot+Ee[ce](),{get:function(){let t=e[Yt]("div");return t[He](this),t[Te+Ee]}}),Jn(t,Ot+we,{get:function(){return[...this[we]]}}),Jn(t,Ot+Le,{get:function(){return[...this[Le]]}}),Jn(t,se,{get:function(){return this[we][se]}}),Jn(t,St,{value:function(t=!1){return this[An](h(t))}}),Jn(t,Nt+je,{value:function(t=[]){return"string"==typeof t&&t.trim().length>0||"number"==typeof t?this[He](e[Nn](String(t))):u[Sn](t)&&t.length>1?t[_e]((t=>{"string"==typeof t&&t.trim().length>0||"number"==typeof t?this[He](e[Nn](String(t))):null!=t&&this[He](t)})):u[Sn](t)&&1===t.length?this[He](t[0]):null!=t&&this[He](t),this}}),[[Ot+Tn,Ot+Ee[ce]()],[Ot+un,se],[Ot+je+ne,Ot+we],[Ot+Ge+ne,Ot+Le]][_e]((e=>{Jn(t,e[0],{get:function(){return this[e[1]]}})}))})(m[re]);const Zn=()=>{null==$SVG_Observer&&($SVG_Observer=new IntersectionObserver((t=>{t.forEach((t=>{if(!t.isIntersecting)return;const e=t.target,n=(e.$attr("src")||"")[de]();n.length<1||n.$$200().then((t=>{$SVG_Observer[wn](e),t.text().then((t=>{const n="div"._(t),i=n[Ot+je](0);i.id=n.id,n[qt][_e]((t=>i[qt].add(t))),i.onclick=n.onclick,null!=e[Ht]&&e[Ht][Nt+je](i,e),e.remove()})).catch((t=>{e.__("☒")}))})).catch((t=>{$SVG_Observer[wn](e),e.__("☒")}))}))})),[].slice.call("span.svg".$all)[_e]((t=>$SVG_Observer.observe(t))))},ti=()=>{null==$Lazy_Observer&&($Lazy_Observer=new IntersectionObserver(((t,e)=>{t[_e]((t=>{const e=t.target;if(t.isIntersecting){const t=e.parentElement,n=(e.dataset.src||"").trim(),i=e.$$class("fit"),r=e.$$class("fit-p");if(n.length<1)return;e.class_("lazyload"),delete e.dataset.src,n.$$200(!0).then((n=>{$Lazy_Observer[wn](e),e.src=n.src,i&&(t.style["aspect-ratio"]=`${n.img.target.$nw} / ${n.img.target.$nh}`),r&&(t.style["aspect-ratio"]=`${n.img.target.$nw} / ${n.img.target.$nh}`)})).catch((t=>{$Lazy_Observer[wn](e),e.src="https://cdn.jsdelivr.net/gh/pardnchiu/PDRenderKit@latest/static/image/404.svg"}))}}))})),[].slice.call("img.lazyload".$all)[_e]((t=>$Lazy_Observer[wn](t))))};t._SVGListener=Zn,t._LazyListener=ti,t._Listener=t=>{if(null==t)return Zn(),void ti();0!=t.svg&&Zn(),null!=t.lazyload&&ti()},t.$file=t=>new Promise(((e,n)=>{if(!t)return()=>n();let i=new FileReader;i.readAsDataURL(t),i.onload=t=>e(t),i.onerror=t=>n(t)})),t.$imageFromImageFile=t=>new Promise(((e,n)=>{if(!t)return()=>n();let i=new FileReader;i.readAsDataURL(t),i.onload=function(t){if(!t.target)return()=>n();let i=new Image;i.src=String(t.target.result),i.onload=()=>e(i),i.onerror=t=>n(t)}})),t.$imageFromVideoFile=t=>new Promise(((e,n)=>{if(!t)return()=>n();let i=new FileReader;i.readAsArrayBuffer(t),i.onload=function(){if(!i.result)return()=>n();let r=new Blob([i.result],{type:t.type}),s=URL.createObjectURL(r),o=document.createElement("video");o.preload="metadata",o.src=s,o.muted=!0,o.playsInline=!0,o.onloadeddata=function(){let t=document.createElement("canvas"),i=t.getContext("2d");if(t.width=o.videoWidth,t.height=o.videoHeight,!i)return()=>n();i.drawImage(o,0,0,t.width,t.height);let r=t.toDataURL("image/jpg"),s=new Image;s.src=r,s.onload=()=>e(s),s.onerror=t=>n(t),o.ontimeupdate=null,o.pause()},o.onerror=t=>n(t),o.play()}})),t[qn]=(e,n)=>{let i=t.atob(e.split(",")[1]),r=new ArrayBuffer(i.length),s=new Uint8Array(r);for(let t=0;t{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n=e[se];let i="";for(let r=0;r{let e=`${document.cookie};`,n=new RegExp(`${t}=([^ ;]+)?`),i=e.match(n)??[],r=i[i.length-1];if(!i.length||null==r)return null;r=decodeURIComponent(i[i.length-1]);try{return JSON.parse(r)}catch(t){return r}},t._cookie=(t,e,n)=>{const i=(new Date).getTime();let r;"string"!=typeof t||String(t||"").trim().length<1||(e="object"==typeof e&&null!=e?JSON.stringify(e).trim():String(e).trim(),r="number"==typeof n?new Date(i+1e3*n):new Date(i+36e5),document.cookie=`${t}=${e}; expires=${r.toUTCString()}; path=/`)},t[St]=(t="")=>(console.log(t),String(t).$),t.$all=(t="")=>String(t).$all,t.$url=(t="")=>(t.trim().length>0?t:location.href).$url,t._child=(t=[],e)=>{document.body._child(t,e)},t.__child=(t=[])=>{document.body.__child(t)},document.head._child(["style"._(".dom-temp { display: none !important; }")])})(window,document,navigator,location,console,Math,String,Number,Array,Object,Map,Boolean,Date,URL,Image,JSON,RegExp,Element,DocumentFragment,_a,_b,_c,_d,_e,0,0,0,_i,0,_0,_1,_2,_3,_4,0,_6,_7,_8,0,0,_1_,_2_,_3_,_4_,_5_,0,_7_,_8_,_9_,__0,0,__2,__3,__4,0,$0,$1,$2,$3,0,0,$6,$7,0,0,$0_,$1_,$2_,0,0,$5_,0,$7_,0,$9_,0,0,0,$_3,$_4,0,"$","$$",0,"_$","_","__","","-",".","/",":",0,0," "),((t,e,n,i,r,s,o,l,u,a,c,h)=>{const f=/\{\{\s*(((CALC|LENGTH|UPPER|LOWER|DATE)\(\s*[\w\.\s\+\-\*\/\,\s\/\:]+\s*\))|[\w\.]+)\s*\}\}/i,_=new RegExp(f,"gi"),g=/(CALC|LENGTH|UPPER|LOWER)\(([\w\.]+)\s*([\+\-\*\/\%]+)\s*([\d\.]+)\)/,$=/DATE\(([\w\.]+)\s*,\s*([^\n]+)\)/,d=/^\(?\s*([\w]+)(\s*\,|\s+)?/i,p=/\,\s*([\w]+)\s*\)/i,m=/\s+([\w\.]+)\s*$/i,y=/\s*[\!\>\<\=]+\=*\s*/,v=/([\w\.]+)\s*([\+\-\*\/\%])\s*([\d\.]+)/,T=":path",E=":for",b=":if",w=":else-if",L=":else",A=":model",O=":html",I="parentElement",R="textContent",S="toLowerCase",N="remove",U="alt",C="dom",F="path",D="data",M="event",x="next",k="done",j="trim",P="href",V="src",G="border",B="split",H="Radius",z="padding",X="margin",Y="id",q="isArray",W="style",J="Color",K="Image",Q="Size",Z="Attachment",tt="Mode",et="clip",nt="Blend",it="Repeat",rt="Origin",st="Position",ot="background",lt="innerHTML",ut="forEach",at="value",ct="body",ht="nodeType",ft="length",_t="match",gt="shift",$t="isFor",dt="isAry",pt="isObj",mt="filter",yt="TEXT_NODE",vt="addEventListener",Tt="dom-tag",Et="class",bt="child",wt="attr",Lt="$attr",At="$attributes",Ot="$childNodes",It="$next",Rt="$parent",St="$sel",Nt="$selAll",Ut="$keys",Ct="$key",Ft="attr_";function Dt(t){return`*[dom-tag='${t}']`}t.PD=class{dom;path;data;event;done={};constructor(e={}){t._Listener(e.listener);const n="string"==typeof e[Y]?e[Y].$:null;if(!(n instanceof Element))return;this[C]=n,this[F]={},this[D]=e[D],this[M]=e[M]||{};const i=Date.now();this.#t(n,e[D]||{}).then((t=>{const n=Date.now()-i;null!=e[x]&&(console.log("Rendered, took "+n/1e3+" seconds"),e[x](this[C]))}))}#e(t,e,n){return t=i(t),n=i(n),isNaN(t)||isNaN(n)?void 0:"+"===e?t+n:"-"===e?t-n:"*"===e?t*n:"/"===e?t/n:"%"===e?t%n:t}#n(t,e,n){let i=e[t];null==i||"object"!=typeof i||null==i||r[q](i)?null!=i&&s.defineProperty(e,t,{get:()=>i,set:t=>{i=t,n(t)}}):i[Ut][ut]((t=>{this.#n(t,i,n)}))}#i=async(t,n={},i={})=>{const r=t[Rt](0),s=t[At][T];if(null!=r&&null!=s){if(null==this[F][s])this[F][s]=r;else if(this[F][s]==r)return;fetch(s).then((async s=>{const o=await s.text();"div"._(o)[Ot][ut]((e=>{t["_"+bt](e)})),o.$$(/new\s+PD/)||this.#t(t,n,i),t[Ot][ut]((n=>{n instanceof HTMLScriptElement?e[ct]["_"+bt]("script"._(n.$)):r["_"+bt](n,t)})),t[N]()})).catch((()=>{t[N]()}))}};#r=(e,r={},s={})=>{const l=e[Rt](0),u=e.$i,a=(e[Lt](b)||"")[j](),c=(e[Lt](":once")||"")[j](),h=Boolean(isNaN(parseInt(c))?c:parseInt(c));if(null==l||a[ft]<1)return;let f,_,g=[e],$=e[It](0);for(null!=$&&(f=null!=$[Lt](w),_=null!=$[Lt](L));null!=$&&(f||_);)g.push($),$=$[It](0),null!=$&&(f=null!=$[Lt](w),_=null!=$[Lt](L));const d=t[Ct](16),p="temp"._(g._$((t=>t._$(!0)["_"+wt]({[Tt]:d}))));let m=!1;g[ut]((t=>{if(t["_"+wt]({[Tt]:d}),m)return t[N]();const e=(t[Lt](b)||t[Lt](w)||t[Lt](L)||"")[j](),s=null!=t[Lt](L),a=e[B](y).$(0),c=e[B](y).$(1),f=((e[_t](y)||[]).$(0)||"")[j](),_=this.#s(a,r,(t=>{h||(l[Nt](Dt(d))[ut]((t=>t[N]())),l["_"+bt](p._$(!0),u),this.#t(l,r,{[$t]:!0}))}));f.length<1?m=o(_):">"===f?m=(i(_)||0)>(i(c)||0):"<"===f?m=(i(_)||0)<(i(c)||0):">="===f||">=="===f?m=(i(_)||0)>=(i(c)||0):"<="===f||"<=="===f?m=(i(_)||0)<=(i(c)||0):"=="===f||"==="===f?m="null"==c?null==_:"true"==c?o(_):"false"==c?!o(_):"empty"==c?n(_||"")[ft]<1:n(_||"")==n(c):"!="!==f&&"!=="!==f||(m="null"==c?null!=_:"true"==c?!o(_):"false"==c?o(_):"empty"==c?n(_||"")[ft]>0:n(_||"")!=n(c)),t[Ft](b)[Ft](w)[Ft](L),m||s?m&&t.class_("dom-temp"):t[N]()})),this.#t(l,r,s)};#s=(t="",e={},n)=>{if(t[j]()[ft]<1)return;const i=t.$$(f);let r="",s="";i&&(r=t[B](f)[0]||"",s=t[B](f)[4]||"",t=t[_t](f)[1]);const o=t.$$(/^LENGTH\(.+\)/);o&&(t=t.__(/^LENGTH\(|\)$/g,""));const l=t.$$(/^CALC\(.*\)$/);let u="",a=0;if(l){const e=(t=t.__(/^CALC\(|\)$/g,""))[_t](v);t=e.$(1),u=e.$(2),a=parseInt(e.$(3))||0}const c=t.$$(/^UPPER\(.*\)$/),h=t.$$(/^LOWER\(.*\)$/);(c||h)&&(t=t.__(/^(UPPER|LOWER)\(|\)$/g,""));const _=t.$$(/^DATE\([\w\,\-\s\:]*\)$/);let g="";if(_){const e=(t=t.__(/^DATE\(|\)$/g,""))[_t](/(\w+),\s*([^\n]+)/);t=e.$(1),g=e.$(2)}let $=t[B](/\./),d=e,p=$.$(0),m=d[p];$[gt](),m=this.#o($,d,p,m),null!=n&&this.#n(p,d,(t=>{n(t)}));let y="";if(null!=m&&m instanceof Object&&!Array.isArray(m)?y=m[Ut][ft]:null!=m&&(y=m[ft]),i){if(o)return r+y+s;if(l&&(m=this.#e(m,u,a),null==m))return;return r+m+s}if(o)return y;if(l){if(m=this.#e(m,u,a),null==m)return}else{if(c)return m.toUpperCase();if(h)return m[S]();if(_)return parseInt(m).$format(g)}return m};#l=(t,e={})=>{const n=t[Rt](0),i=(t[Lt](A)||"")[j]();t[Ft](A);this.#s(i,e,(t=>{}));if(null==n||null==i||i[j]()[ft]<1)return;const r=t instanceof HTMLInputElement,s=t instanceof HTMLTextAreaElement,o=t instanceof HTMLSelectElement,l=t.$attr("type");!r||"checkbox"!==l&&"radio"!==l?o?t[vt]("change",(t=>{e[i]=t.target[at]})):(r||s)&&(t[vt]("keyup",(t=>{e[i]=t.target[at]})),t[vt]("change",(t=>{e[i]=t.target[at]}))):t[vt]("change",(t=>{e[i]=("input[name='"+t.target.name+"'][type='"+l+"']:checked").$all.map((t=>t.value)).join(",")}))};#u(t,n={}){const i=t[Lt](Tt)||"",r=t[At][Ut][mt]((t=>t.$$(/^:[\w\-]+$/)))[mt]((t=>!t.$$(/\:(path|for|if|else\-if|else|model)/)));r[ft]<1||r[ut]((r=>{const s=(t[Lt](r)||"")[j](),o=this.#s(s,n,(n=>{const o=e[ct][Nt](Dt(i));o[ft]<1||o[ut]((e=>{this.#a(t,r,n,s)}))}));this.#a(t,r,o,s),t[Ft](r)}))}#a(t,e,i="",r){i=n(i),e[S]()===(":"+Et)[S]()&&t._class(i),[[":"+Y,Y],[":"+V,V],[":"+U,U],[":"+P,P],[O,lt]][ut]((n=>{e[S]()===n[0][S]()&&(i[j]()[ft]<1||(t[n[1]]=i))})),":hide"===e[S]()&&Boolean(isNaN(parseInt(i))?i:parseInt(i))&&(t[W].display="none"),[[":"+X,X],[":"+z,z],[":"+G,G],[":"+G+"-"+H,G+H],[":outline","outline"],[":box-sahdow","boxShadow"],[":bg-"+K,ot+K],[":bg-"+Z,ot+Z],[":bg-Blend-"+tt,ot+nt+tt],[":bg-"+et,ot+et],[":bg-"+rt,ot+rt],[":bg-"+st,ot+st],[":bg-"+st+"-X",ot+st+"X"],[":bg-"+st+"-Y",ot+st+"Y"],[":bg-"+it,ot+it],[":bg-"+Q,ot+Q],[":bg-"+J,ot+J],[":"+J,J[S]()]][ut]((n=>{e[S]()===n[0][S]()&&(i[j]()[ft]<1?t[W][n[1]]=r:t[W][n[1]]=i)})),i[j]()[ft]<1?t[Ft](`${e.__(/^:/,"")}`):t["_"+wt]({[`${e.__(/^:/,"")}`]:i})}#c=(t,e={},n={})=>{(()=>{t[At][Ut][mt]((t=>t.$$(/^@[\w]+$/)))[ut]((e=>{const n=e.__(/\@/,"on"),i=t[Lt](e);t[Ft](e),null!=i&&(t[n]=this[M][i])}))})(),(()=>{if(!o(n[$t]))return;const i=(t[Lt](E)||"")[j](),r=(i[_t](d)||[]).$(1),s=(i[_t](p)||[]).$(1);t[At][Ut][mt]((t=>t.$$(/^:@[\w]+$/)))[ut]((i=>{const l=i.__(/^\:\@/,"on");let u=(t[Lt](i)||"")[j]()[B](/\./)[mt]((t=>t[ft]>0))||[],a=e,c=u.$(0),h=a[c];u[gt](),o(n[dt])&&c!=r||o(n[pt])&&c!=s||(h=this.#o(u,a,c,h),null!=h&&(t[l]=this[M][h]))}))})()};#h=(n,i={},r={})=>{const s=n[Lt](Tt)||t[Ct](16),o=(n[Lt](":once")||"")[j](),l=Boolean(isNaN(parseInt(o))?o:parseInt(o));n["_"+wt]({[Tt]:s});const u=n._$(!0),a=n[Rt](0),c=n.$i,h=n[lt].$$(_);null!=parent&&0!=h&&n[Ot][mt]((t=>t[I]===n&&t[ht]===Node[yt]))[ut]((t=>{((t[R]||"")[_t](_)||[])[ut]((n=>{const r=(n[_t](f)||[]).$(1);if(null==r)return;const o=this.#s(r,i,(t=>{if(l)return;const n=e[ct][St](Dt(s));null!=n&&null!=a&&(a["_"+bt](u._$(!0),c),n[N](),this.#t(a,i))}));null!=o&&this.#f(t,r,o)}))}))};#_=(e,n={},i={})=>{const s=e[Rt](0),o=(e[Lt](E)||"")[j](),l=(e[Lt](":once")||"")[j](),u=Boolean(isNaN(parseInt(l))?l:parseInt(l));if(null==s||o[ft]<1)return;const a=t[Ct](16),c=e._$(!0)["_"+wt]({[Tt]:a}),h="temp"._(),f=e[It](0);e[N]();const _=(o[_t](/^\(?\s*(\w+)/)||[]).$(1),g=(o[_t](/\,\s*(\w+)/)||[]).$(1),$=(o[_t](m)||[]).$(1),d=this.#s($,n,(t=>{const e=s[St](Dt(a))?.$i;s[Nt](Dt(a))[ut]((t=>t[N]())),s["_"+bt](c._$(!0),e),this.#t(s,n,{[$t]:!0})}));r[q](d)?d[ut](((t,e)=>{const i=c._$(!0);h["_"+bt](i);const r={[`${_}`]:t,[`${g}`]:e};"object"==typeof t&&null!=t?(t[Ut][ut]((e=>{this.#n(e,t,(()=>{if(u)return;const t=s[St](Dt(a))?.$i;s[Nt](Dt(a))[ut]((t=>t[N]())),s["_"+bt](c._$(!0),t),this.#t(s,n,{[$t]:!0})}))})),this.#u(i,r),this.#c(i,r,{[$t]:!0,[dt]:!0}),this.#g(i,r),this.#t(i,r,{[$t]:!0})):(this.#u(i,r),this.#c(i,r,{[$t]:!0,[dt]:!0}),this.#g(i,r))})):"object"==typeof d&&null!=d&&d[Ut][ut]((t=>{const e=c._$(!0);h["_"+bt](e),this.#n(t,d,(()=>{if(u)return;const t=s[St](Dt(a))?.$i;s[Nt](Dt(a))[ut]((t=>t[N]())),s["_"+bt](c._$(!0),t),this.#t(s,n,{[$t]:!0})}));const i=d[t],o={[`${_}`]:t,[`${g}`]:i};this.#u(e,o),this.#c(e,o,{[$t]:!0,[pt]:!0}),this.#$(e,o),this.#t(e,o,{[$t]:!0,[dt]:r[q](i)})})),s["_"+bt](h,f)};#g=(t,e={})=>{const n=(t[Lt](E)||"")[j](),i=(n[_t](d)||[]).$(1),r=(n[_t](p)||[]).$(1),s=e[r];t[Ft](E),t[Ot][mt]((e=>e[I]===t&&e[ht]===Node[yt]))[ut]((t=>{((t[R]||"")[_t](_)||[])[ut]((n=>{const o=(n[_t](f)||[]).$(1);if(null==o)return;const l=o[_t](g),u=o[_t]($),a=(l||[]).$(3),c=Number((l||[]).$(4));let h=(null!=l?l.$(2):o)[B](/\./),_=e,d=h.$(0),p=_[d];h[gt](),null!=l&&d===i||null!=u&&d===i?p=this.#s(o,e)||"":d===i?p=this.#o(h,_,d,p):d===r&&(p=this.#e(s,a,c)),null!=p&&this.#f(t,o,p)}))})),this.#t(t,e,{[$t]:!0})};#$=(t,e={})=>{const n=(t[Lt](E)||"")[j](),i=(n[_t](d)||[]).$(1),r=(n[_t](p)||[]).$(1);t[Ft](E),t[Ot][mt]((e=>e[I]===t&&e[ht]===Node[yt]))[ut]((t=>{((t[R]||"")[_t](_)||[])[ut]((n=>{let s=(n[_t](f)||[]).$(1);if(null==s)return;const o=s[_t](g),l=(o||[]).$(3),u=Number((o||[]).$(4));let a=(null!=o?o.$(2):s)[B](/\./),c=e,h=a.$(0),_=c[h];a[gt](),null!=o&&h===r?_=this.#s(s,e)||"":h===r?_=this.#o(a,c,h,_):null!=o&&h===i&&(_=this.#e(_,l,u)),null!=_&&this.#f(t,s,_)}))})),this.#t(t,e,{[$t]:!0})};#o(t,e,n,i){if(null!=i){for(;t[ft]>0;)i=i[t.$(0)],t[gt]();return i}}#f(t,e,n){const i=("{{\\s*?"+(e=e.__(/(\?|\.|\+|\*|\\|\%|\-|\(|\))/g,"\\$1"))+"\\s*?}}").$regexp("i");n=(t[R]||"").__(i,n)||"",t[R]=n}async#t(t,n={},i={}){const r=e.$init;return t==this.dom&&(this.#u(t,n),this.#c(t,n,i),this.#h(t,n,i)),r?(t[Rt](0)==this[C]&&(this[k][t.$i]=!1),await new Promise((e=>(t.$childAll[ut]((async t=>{const e=t[At];if(null!=$Lazy_Observer&&t["$$"+Et]("lazyload")&&$Lazy_Observer.observe(t),null!=$SVG_Observer&&t["$$"+Et]("svg")&&"SPAN"===t.tagName&&$SVG_Observer.observe(t),null!=t[Rt](0)&&null==e[w]&&null==e[L])if(e[T])this.#i(t,n,i);else{if(!e[E])return this.#r(t,n,i),this.#l(t,n),this.#u(t,n),this.#c(t,n,i),this.#h(t,n,i),await this.#t(t,n,i);this.#_(t,n,i)}})),t.class_("dom-temp"),t[Rt](0)==this[C]||t==this[C]?(this[k][t.$i]=!0,e(t)):null)))):t}}})(window,document,String,Number,Array,Object,Boolean,Image,JSON,RegExp,Element,DocumentFragment);class $listener{observer;constructor(t){t=t??{},this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&t.do instanceof Function&&t.do(e.target)}))})),"string"==typeof t.selector&&[].slice.call(document.querySelectorAll(t.selector)).forEach((t=>this.observe(t)))}observe(t){this.observer.observe(t)}unobserve(t){this.observer.unobserve(t)}} \ No newline at end of file diff --git a/src/*.ts b/src/*.ts index bc5b26f..73f3098 100644 Binary files a/src/*.ts and b/src/*.ts differ diff --git a/src/PDRenderKit.js b/src/PDRenderKit.js index 57ae263..c88ea0a 100644 Binary files a/src/PDRenderKit.js and b/src/PDRenderKit.js differ diff --git a/src/dom.ts b/src/dom.ts index 2dc7480..e58031f 100644 Binary files a/src/dom.ts and b/src/dom.ts differ diff --git a/static/js/index.js b/static/js/index.js index 06ef9fd..0506117 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -1,34 +1,47 @@ +// 導入 Markdown Viewer 的實現 import { viewer as MDViewer } from "https://cdn.jsdelivr.net/gh/pardnchiu/PDMarkdownKit@1.0.1/dist/PDMarkdownKit.js"; +// 等待 DOM 元素載入後,開始執行程式碼 document.addEventListener("DOMContentLoaded", async _ => { + // 初始化一個空字符串用於存儲 Markdown 文檔的內容 let pre = ""; + // 將 README.md 檔案的內容讀取並保存至 pre 字符串中 await fetch('./README.md') .then(response => response.text()) .then(data => { + // 將讀取到的 Markdown 文檔的內容保存至 pre 字符串中 pre = data; }) .catch(error => { + // 如果讀取文件時出錯,則將錯誤信息輸出到控制台中 console.error(error); }); + // 創建一個新的 PD 物件,並指定其 ID 和 next 函式的回調函數 const app = new PD({ id: "app", next: _ => { + // 創建一個新的 Markdown Viewer 的實現物件 const viewer = new MDViewer({ - delay: 50, - pre: pre + delay: 50, // 設定初始延遲時間為 50ms + pre: pre // 導入 Markdown 文檔的內容 }); + // 將 Markdown Viewer 的實現物件添加至 HTML 頁面的 body 元素中 document.body.appendChild(viewer.body); + // 啟動 Markdown Viewer 的初始函數以進行渲染 viewer.init(); + // 設定 Markdown Viewer 的實現物件的最大寬度為 1024px viewer.body.style.maxWidth = 1024 + "px"; + // 對 Markdown Viewer 的實現物件添加滾動事件,以進行類型切換 viewer.body.addEventListener("scroll", function () { + // 根據滾動的位置切換導航欄位的最小寬度 "nav".$.$$_class(this.scrollTop > 0, "min"); }); } }); -}) \ No newline at end of file +});