mirror of
https://github.com/SoPat712/dotfiles.git
synced 2026-02-10 08:48:39 -05:00
vuetorrent update
This commit is contained in:
@@ -1 +0,0 @@
|
||||
import{aA as f}from"./index-135ae4c1.js";import{c as d,J as t}from"./vue-d2584a6d.js";function h(a,e,o=1){const{currentPage:n,currentPageSize:r,pageCount:u,isFirstPage:c,isLastPage:i,next:g,prev:l}=f({total:()=>t(a).length,page:o,pageSize:()=>t(e)===-1?t(a).length:t(e)}),p=d(()=>{const s=(n.value-1)*t(e),P=s+r.value;return t(a).slice(s,P)});return{currentPage:n,currentPageSize:r,pageCount:u,isFirstPage:c,isLastPage:i,next:g,prev:l,paginatedResults:p}}export{h as u};
|
||||
@@ -0,0 +1 @@
|
||||
import{u as f,__tla as __tla_0}from"./index-bUuJUL5l.js";import{c as d,E as t}from"./vue-BSryv7ps.js";let h;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{h=function(e,a,o=1){const{currentPage:n,currentPageSize:r,pageCount:u,isFirstPage:c,isLastPage:i,next:g,prev:l}=f({total:()=>t(e).length,page:o,pageSize:()=>t(a)===-1?t(e).length:t(a)}),p=d(()=>{const s=(n.value-1)*t(a),P=s+r.value;return t(e).slice(s,P)});return{currentPage:n,currentPageSize:r,pageCount:u,isFirstPage:c,isLastPage:i,next:g,prev:l,paginatedResults:p}}});export{h as u,__tla};
|
||||
1
qbit/vuetorrent/public/assets/CanvasPool-CW8lNMNV.js
Normal file
1
qbit/vuetorrent/public/assets/CanvasPool-CW8lNMNV.js
Normal file
@@ -0,0 +1 @@
|
||||
import{D as c,n,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";let C;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{class l{constructor(a){this._canvasPool=Object.create(null),this.canvasOptions=a||{},this.enableFullScreen=!1}_createCanvasAndContext(a,t){const s=c.get().createCanvas();s.width=a,s.height=t;const e=s.getContext("2d");return{canvas:s,context:e}}getOptimalCanvasAndContext(a,t,s=1){a=Math.ceil(a*s-1e-6),t=Math.ceil(t*s-1e-6),a=n(a),t=n(t);const e=(a<<17)+(t<<1);this._canvasPool[e]||(this._canvasPool[e]=[]);let o=this._canvasPool[e].pop();return o||(o=this._createCanvasAndContext(a,t)),o}returnCanvasAndContext(a){const{width:t,height:s}=a.canvas,e=(t<<17)+(s<<1);this._canvasPool[e].push(a)}clear(){this._canvasPool={}}}C=new l});export{C,__tla};
|
||||
1
qbit/vuetorrent/public/assets/Dashboard-C3XSp08G.css
Normal file
1
qbit/vuetorrent/public/assets/Dashboard-C3XSp08G.css
Normal file
@@ -0,0 +1 @@
|
||||
.gap[data-v-a2950234]{gap:8px}.gap[data-v-f6fdaf5d]{gap:8px 16px}#torrentList[data-v-8292d1aa]{background-color:unset}.gap[data-v-1e562e0e]{gap:8px 16px}#torrentList[data-v-2b24c5da]{background-color:unset}.gap[data-v-20bf1baa]{gap:8px}#torrentList[data-v-44c00880]{background-color:unset}#torrentList tbody tr[data-v-44c00880]:nth-child(odd){background-color:rgb(var(--v-theme-surface))}#torrentList tbody tr.selected[data-v-44c00880]{position:relative}#torrentList tbody tr.selected[data-v-44c00880]:nth-child(odd):after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.v-autocomplete .v-field:not(.v-field--focused) input{display:none}
|
||||
1
qbit/vuetorrent/public/assets/Dashboard-Dm_HpGRr.js
Normal file
1
qbit/vuetorrent/public/assets/Dashboard-Dm_HpGRr.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
.menu-scrollable[data-v-4e81b4b5]{max-height:500px;overflow:visible}.gap[data-v-08ef66f1]{gap:8px}.gap[data-v-60c9ae77]{gap:8px 16px}#torrentList[data-v-31f288a6]{background-color:unset}.gap[data-v-e5ea358f]{gap:8px 16px}#torrentList[data-v-e8f6336b]{background-color:unset}.gap[data-v-23c01601]{gap:8px}#torrentList[data-v-8832d38a]{background-color:unset}#torrentList tbody tr[data-v-8832d38a]:nth-child(odd){background-color:rgb(var(--v-theme-surface))}#torrentList tbody tr.selected[data-v-8832d38a]{position:relative}#torrentList tbody tr.selected[data-v-8832d38a]:nth-child(odd):after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}
|
||||
@@ -1 +0,0 @@
|
||||
import{g as w,ae as kt,a1 as d,a2 as T,a3 as i,ab as _,W as x,Z as p,a8 as R,a6 as f,m as a,a7 as H,af as et,ag as tt,F,K as Ue,d as O,r as ot,c as C,M as Se,x as at,u,Y as J,ao as $e,D as he,$ as nt,n as N,ap as lt,aq as rt,S as Fe,a5 as se,N as _e,P as Ce,a0 as Xe,w as Tt,q as $t,ar as Ct,A as We}from"./vue-d2584a6d.js";import{V as le,a as De,b as Ge,c as Ie,d as re,u as He,e as fe,f as Ke,g as be,h as ze,i as Q,j as qe,k as M,l as Z,m as Ye,n as Be,o as Vt,p as Oe,q as Ve,r as ve,s as Te,t as ee,v as st,w as wt,x as q,C as it,_ as X,y as U,z as we,A as St,B as Dt,T as L,D as dt,E as ut,F as It,G as Bt,H as B,I as je,J as Pt,K as Et,L as xt,R as Lt,M as K,N as Je,O as Ne,P as At,Q as Rt}from"./index-135ae4c1.js";import{_ as Qe}from"./dayjs-f7aba705.js";import"./faker-c43f92d4.js";import{d as ie}from"./dayjs.min-1969f9c6.js";import{ac as ct}from"./vuetify-e547ef1b.js";import{u as Mt}from"./ArrayPagination-26934cac.js";import{d as Ot}from"./index-fd06c5c5.js";const Nt={class:"d-flex"},Ut={key:2},Ft={key:3},Gt=w({__name:"RightClickMenuEntry",props:{text:{},icon:{},action:{type:Function},hidden:{type:Boolean},disabled:{type:Boolean},disabledText:{},disabledIcon:{},divider:{type:Boolean},children:{}},setup(h){return(e,l)=>{const t=kt("RightClickMenuEntry",!0);return e.hidden?R("",!0):(d(),T(re,{key:0,class:"px-3 pointer",disabled:e.disabled,onClick:e.action},{default:i(()=>[_("div",Nt,[e.disabled&&e.disabledIcon?(d(),T(le,{key:0,class:"mr-2"},{default:i(()=>[x(p(e.disabledIcon),1)]),_:1})):e.icon?(d(),T(le,{key:1,class:"mr-2"},{default:i(()=>[x(p(e.icon),1)]),_:1})):R("",!0),e.disabled&&e.disabledText?(d(),f("span",Ut,p(e.disabledText),1)):(d(),f("span",Ft,p(e.text),1)),a(De),!e.disabled&&e.children?(d(),T(le,{key:4},{default:i(()=>[x("mdi-chevron-right")]),_:1})):R("",!0)]),e.children?(d(),T(Ge,{key:0,activator:"parent","open-on-hover":!0,"open-on-click":!0,"close-delay":"0","open-delay":"0",location:"right"},{default:i(()=>[a(Ie,null,{default:i(()=>[(d(!0),f(F,null,H(e.children,n=>(d(),T(t,et(tt(n)),null,16))),256))]),_:1})]),_:1})):R("",!0)]),_:1},8,["disabled","onClick"]))}}}),Ht=w({__name:"RenameTorrentDialog",props:{guid:{},hash:{}},setup(h){const e=h,{isOpened:l}=He(e.guid),{t}=Ue(),n=fe(),r=O(),o=O(),s=O(!1),c=ot({newName:""}),v=[P=>!!P||t("dialogs.renameTorrent.required"),P=>P!==S.value||t("dialogs.renameTorrent.sameName")],k=C(()=>n.getTorrentByHash(e.hash)),S=C(()=>k.value?.name);async function A(){await o.value?.validate(),s.value&&(await n.renameTorrent(e.hash,c.newName),y())}const y=()=>{l.value=!1};return Se(()=>{c.newName=k.value?.name||""}),at(()=>{r.value?.select()}),(P,E)=>(d(),T(Ye,{modelValue:u(l),"onUpdate:modelValue":E[3]||(E[3]=V=>he(l)?l.value=V:null)},{default:i(()=>[a(Z,null,{default:i(()=>[a(Ke,null,{default:i(()=>[x(p(P.$t("dialogs.renameTorrent.title")),1)]),_:1}),a(be,null,{default:i(()=>[a(u(ze),{modelValue:s.value,"onUpdate:modelValue":E[1]||(E[1]=V=>s.value=V),ref_key:"form",ref:o,onSubmit:E[2]||(E[2]=J(()=>{},["prevent"]))},{default:i(()=>[S.value?(d(),T(Q,{key:0,"model-value":S.value,disabled:"",label:P.$t("dialogs.renameTorrent.oldName")},null,8,["model-value","label"])):R("",!0),a(Q,{modelValue:c.newName,"onUpdate:modelValue":E[0]||(E[0]=V=>c.newName=V),ref_key:"field",ref:r,rules:v,autofocus:"",label:P.$t("dialogs.renameTorrent.newName"),onKeydown:$e(A,["enter"])},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1}),a(qe,null,{default:i(()=>[a(De),a(M,{color:"error",onClick:y},{default:i(()=>[x(p(P.$t("common.cancel")),1)]),_:1}),a(M,{color:"accent",disabled:!s.value,onClick:A},{default:i(()=>[x(p(P.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),ne=-2,z=-1,Kt=w({__name:"ShareLimitDialog",props:{guid:{},hashes:{}},setup(h){const e=h,{isOpened:l}=He(e.guid),t=Be(),n=fe(),r=O(!1),o=O("global"),s=O(!1),c=O(0),v=O(!1),k=O(0),S=O(!1),A=O(0),y=C(()=>o.value!=="enabled");function P(){l.value=!1}async function E(){switch(o.value){case"global":await t.setShareLimit(e.hashes,ne,ne,ne);break;case"disabled":await t.setShareLimit(e.hashes,z,z,z);break;case"enabled":await t.setShareLimit(e.hashes,s.value?c.value:z,v.value?k.value:z,S.value?A.value:z);break}P()}return Se(async()=>{const V=n.getTorrentByHash(e.hashes[0]);if(!V)return P();const g=V.ratio_limit,D=V.seeding_time_limit,Y=V.inactive_seeding_time_limit;g===ne&&D===ne&&Y===ne?o.value="global":g===z&&D===z&&Y===z?o.value="disabled":(o.value="enabled",s.value=g>=0,c.value=s.value?g:0,v.value=D>=0,k.value=v.value?D:0,S.value=Y>=0,A.value=S.value?Y:0)}),(V,g)=>(d(),T(Ye,{modelValue:u(l),"onUpdate:modelValue":g[9]||(g[9]=D=>he(l)?l.value=D:null),"max-width":"500"},{default:i(()=>[a(Z,{title:V.$t("dialogs.share_limit.title")},{default:i(()=>[a(be,null,{default:i(()=>[a(ze,{modelValue:r.value,"onUpdate:modelValue":g[7]||(g[7]=D=>r.value=D),onSubmit:g[8]||(g[8]=J(()=>{},["prevent"])),onKeydown:$e(J(E,["prevent"]),["enter"])},{default:i(()=>[a(Vt,{modelValue:o.value,"onUpdate:modelValue":g[0]||(g[0]=D=>o.value=D)},{default:i(()=>[a(Oe,{label:V.$t("dialogs.share_limit.global"),value:"global"},null,8,["label"]),a(Oe,{label:V.$t("dialogs.share_limit.disabled"),value:"disabled"},null,8,["label"]),a(Oe,{label:V.$t("dialogs.share_limit.enabled"),value:"enabled"},null,8,["label"])]),_:1},8,["modelValue"]),a(Ve,null,{default:i(()=>[a(ve,{cols:"12",class:"d-flex align-center"},{default:i(()=>[_("span",null,[a(Te,{modelValue:s.value,"onUpdate:modelValue":g[1]||(g[1]=D=>s.value=D),disabled:y.value},null,8,["modelValue","disabled"])]),a(Q,{modelValue:c.value,"onUpdate:modelValue":g[2]||(g[2]=D=>c.value=D),disabled:y.value||!s.value,density:"compact","hide-details":"",label:V.$t("dialogs.share_limit.ratio_limit")},null,8,["modelValue","disabled","label"])]),_:1}),a(ve,{cols:"12",class:"d-flex align-center"},{default:i(()=>[_("span",null,[a(Te,{modelValue:v.value,"onUpdate:modelValue":g[3]||(g[3]=D=>v.value=D),disabled:y.value},null,8,["modelValue","disabled"])]),a(Q,{modelValue:k.value,"onUpdate:modelValue":g[4]||(g[4]=D=>k.value=D),disabled:y.value||!v.value,density:"compact","hide-details":"",label:V.$t("dialogs.share_limit.seeding_time_limit")},null,8,["modelValue","disabled","label"])]),_:1}),a(ve,{cols:"12",class:"d-flex align-center"},{default:i(()=>[_("span",null,[a(Te,{modelValue:S.value,"onUpdate:modelValue":g[5]||(g[5]=D=>S.value=D),disabled:y.value},null,8,["modelValue","disabled"])]),a(Q,{modelValue:A.value,"onUpdate:modelValue":g[6]||(g[6]=D=>A.value=D),disabled:y.value||!S.value,density:"compact","hide-details":"",label:V.$t("dialogs.share_limit.inactive_seeding_time_limit")},null,8,["modelValue","disabled","label"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1}),a(qe,null,{default:i(()=>[a(De),a(M,{color:"error",onClick:P},{default:i(()=>[x(p(V.$t("common.cancel")),1)]),_:1}),a(M,{color:"accent",disabled:!r.value,onClick:E},{default:i(()=>[x(p(V.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"]))}}),Ze=w({__name:"SpeedLimitDialog",props:{guid:{},hashes:{},mode:{}},setup(h){const e=h,{isOpened:l}=He(e.guid),t=Be(),n=fe(),r=O(!1),o=O(0);function s(){l.value=!1}async function c(){const v=Math.max(0,o.value)*1e3;switch(e.mode){case"download":await t.setDownloadLimit(v,e.hashes);break;case"upload":await t.setUploadLimit(v,e.hashes);break}s()}return Se(async()=>{const v=n.getTorrentByHash(e.hashes[0]);if(!v)return s();switch(e.mode){case"download":o.value=Math.max(0,Math.round(v.dl_limit/1e3));break;case"upload":o.value=Math.max(0,Math.round(v.up_limit/1e3));break}}),(v,k)=>(d(),T(Ye,{modelValue:u(l),"onUpdate:modelValue":k[3]||(k[3]=S=>he(l)?l.value=S:null)},{default:i(()=>[a(Z,{title:v.$t(`dialogs.speed_limit.${v.mode}`)},{default:i(()=>[a(be,null,{default:i(()=>[a(ze,{modelValue:r.value,"onUpdate:modelValue":k[1]||(k[1]=S=>r.value=S),onSubmit:k[2]||(k[2]=J(()=>{},["prevent"])),onKeydown:$e(J(c,["prevent"]),["enter"])},{default:i(()=>[a(Q,{modelValue:o.value,"onUpdate:modelValue":k[0]||(k[0]=S=>o.value=S),type:"number",autofocus:"",clearable:"",label:v.$t("dialogs.speed_limit.label"),"prepend-inner-icon":"mdi-speedometer",suffix:"kB/s",onKeydown:$e(J(c,["prevent"]),["enter"])},null,8,["modelValue","label","onKeydown"])]),_:1},8,["modelValue","onKeydown"])]),_:1}),a(qe,null,{default:i(()=>[a(De),a(M,{color:"error",onClick:s},{default:i(()=>[x(p(v.$t("common.cancel")),1)]),_:1}),a(M,{color:"accent",disabled:!r.value,onClick:c},{default:i(()=>[x(p(v.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"]))}}),Pe=h=>(lt("data-v-4e81b4b5"),h=h(),rt(),h),zt={class:"d-flex justify-space-around"},qt=Pe(()=>_("span",null,"Resume",-1)),Yt=Pe(()=>_("span",null,"Force Resume",-1)),jt=Pe(()=>_("span",null,"Pause",-1)),Xt=Pe(()=>_("span",null,"Delete",-1)),Wt=w({__name:"RightClickMenu",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(h,{emit:e}){const l=h,t=e,{t:n}=Ue(),r=nt(),o=ee(),s=st(),c=Be(),v=wt(),k=fe(),S=C({get:()=>l.modelValue,set:I=>t("update:modelValue",I)}),A=C(()=>o.selectedTorrents.length>1),y=C(()=>o.selectedTorrents),P=C(()=>y.value[0]),E=C(()=>k.getTorrentByHash(P.value)),V=C(()=>o.selectedTorrents.map(k.getTorrentByHash).filter(I=>!!I)),g=C(()=>[{name:""},...c.categories]);async function D(){await k.resumeTorrents(y)}async function Y(){await k.forceResumeTorrents(y)}async function Ee(){await k.pauseTorrents(y)}function xe(){s.createDialog(it,{hashes:[...o.selectedTorrents]})}function de(){s.createDialog(Qe,{hashes:[...o.selectedTorrents],mode:"dl"})}function j(){s.createDialog(Qe,{hashes:[...o.selectedTorrents],mode:"save"})}function te(){s.createDialog(Ht,{hash:o.selectedTorrents[0]})}async function Le(){await k.recheckTorrents(y)}async function ge(){await c.reannounceTorrents(y)}async function oe(){await c.toggleSeqDl(y)}async function Ae(){await c.toggleFLPiecePrio(y)}async function ue(){await c.toggleAutoTmm(y,!E.value?.auto_tmm)}function ye(I){return V.value.every(G=>G&&G.tags&&G.tags.includes(I))}async function Re(I){ye(I)?await k.removeTorrentTags(y.value,[I]):await k.addTorrentTags(y.value,[I])}async function W(I){await navigator.clipboard.writeText(I)}function ce(){s.createDialog(Ze,{hashes:y.value,mode:"download"})}function pe(){s.createDialog(Ze,{hashes:y.value,mode:"upload"})}function ae(){s.createDialog(Kt,{hashes:y.value})}async function ke(){y.value.forEach(I=>{k.exportTorrent(I).then(G=>{const m=window.URL.createObjectURL(G),b=document.createElement("a");b.href=m,b.style.opacity="0",b.setAttribute("download",`${I}.torrent`),document.body.appendChild(b),b.click(),document.body.removeChild(b)})})}const me=C(()=>[{text:n("dashboard.right_click.advanced.title"),icon:"mdi-head-cog",children:[{text:n("dashboard.right_click.advanced.download_path"),icon:"mdi-tray-arrow-down",action:de},{text:n("dashboard.right_click.advanced.save_path"),icon:"mdi-content-save",action:j},{text:n("dashboard.right_click.advanced.rename"),icon:"mdi-rename-box",hidden:A.value,action:te},{text:n("dashboard.right_click.advanced.recheck"),icon:"mdi-playlist-check",action:Le},{text:n("dashboard.right_click.advanced.reannounce"),icon:"mdi-bullhorn",action:ge},{text:n("dashboard.right_click.advanced.seq_dl"),icon:E.value?.seq_dl?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",action:oe},{text:n("dashboard.right_click.advanced.f_l_prio"),icon:E.value?.f_l_piece_prio?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",action:Ae},{text:n("dashboard.right_click.advanced.auto_tmm"),icon:E.value?.auto_tmm?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",action:ue}]},{text:n("dashboard.right_click.priority.title"),icon:"mdi-priority-high",hidden:!v.preferences.queueing_enabled,children:[{text:n("dashboard.right_click.priority.top"),icon:"mdi-priority-high",action:async()=>await k.setTorrentPriority(y.value,"topPrio")},{text:n("dashboard.right_click.priority.increase"),icon:"mdi-arrow-up",action:async()=>await k.setTorrentPriority(y.value,"increasePrio")},{text:n("dashboard.right_click.priority.decrease"),icon:"mdi-arrow-down",action:async()=>await k.setTorrentPriority(y.value,"decreasePrio")},{text:n("dashboard.right_click.priority.bottom"),icon:"mdi-priority-low",action:async()=>await k.setTorrentPriority(y.value,"bottomPrio")}]},{text:n("dashboard.right_click.tags.title"),icon:"mdi-tag",disabled:c.tags.length===0,disabledText:n("dashboard.right_click.tags.disabled_title"),disabledIcon:"mdi-tag-off",children:c.tags.map(I=>({text:I,icon:ye(I)?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",action:async()=>await Re(I)}))},{text:n("dashboard.right_click.category.title"),icon:"mdi-label",disabled:c.categories.length===0,disabledText:n("dashboard.right_click.category.disabled_title"),disabledIcon:"mdi-label-off",children:g.value.map(I=>({text:I.name===""?n("dashboard.right_click.category.clear"):I.name,action:async()=>await k.setTorrentCategory(y.value,I.name)}))},{text:n("dashboard.right_click.speed_limit.title"),icon:"mdi-speedometer-slow",children:[{text:n("dashboard.right_click.speed_limit.download"),icon:"mdi-download",action:ce},{text:n("dashboard.right_click.speed_limit.upload"),icon:"mdi-upload",action:pe},{text:n("dashboard.right_click.speed_limit.share"),icon:"mdi-account-group",action:ae}]},{text:n("dashboard.right_click.copy.title"),icon:"mdi-content-copy",hidden:A.value,children:[{text:n("dashboard.right_click.copy.name"),icon:"mdi-alphabetical-variant",action:async()=>E.value&&await W(E.value.name)},{text:n("dashboard.right_click.copy.hash"),icon:"mdi-pound",action:async()=>await W(P.value)},{text:n("dashboard.right_click.copy.magnet"),icon:"mdi-magnet",action:async()=>E.value&&await W(E.value.magnet)}]},{text:n("dashboard.right_click.export",o.selectedTorrents.length),icon:A.value?"mdi-download-multiple":"mdi-download",action:ke},{text:n("dashboard.right_click.info"),icon:"mdi-information",hidden:A.value,action:()=>r.push({name:"torrentDetail",params:{hash:P.value}})}]);return(I,G)=>S.value?(d(),T(Ge,{key:0,modelValue:S.value,"onUpdate:modelValue":G[0]||(G[0]=m=>S.value=m),activator:"parent","close-on-content-click":!0,transition:"slide-y-transition","scroll-strategy":"none"},{default:i(()=>[a(Ie,null,{default:i(()=>[a(re,null,{default:i(()=>[_("div",zt,[a(q,{location:"top"},{activator:i(({props:m})=>[a(M,N({density:"compact",variant:"plain",icon:"mdi-play"},m,{onClick:D}),null,16)]),default:i(()=>[qt]),_:1}),a(q,{location:"top"},{activator:i(({props:m})=>[a(M,N({density:"compact",variant:"plain",icon:"mdi-fast-forward"},m,{onClick:Y}),null,16)]),default:i(()=>[Yt]),_:1}),a(q,{location:"top"},{activator:i(({props:m})=>[a(M,N({density:"compact",variant:"plain",icon:"mdi-pause"},m,{onClick:Ee}),null,16)]),default:i(()=>[jt]),_:1}),a(q,{location:"top"},{activator:i(({props:m})=>[a(M,N({color:"red",density:"compact",variant:"plain",icon:"mdi-delete-forever"},m,{onClick:xe}),null,16)]),default:i(()=>[Xt]),_:1})])]),_:1}),(d(!0),f(F,null,H(me.value,m=>(d(),T(Gt,et(tt(m)),null,16))),256))]),_:1})]),_:1},8,["modelValue"])):R("",!0)}});const Jt=X(Wt,[["__scopeId","data-v-4e81b4b5"]]),Qt={class:"d-flex flex-column"},Zt={class:"text-caption text-grey"},eo={class:"text-caption text-grey"},pt=w({__name:"ItemAmount",props:{torrent:{},title:{},value:{},total:{}},setup(h){return(e,l)=>(d(),f("div",Qt,[_("div",Zt,p(e.$t(`torrent.properties.${e.title}`)),1),_("div",null,[x(p(e.torrent[e.value])+" ",1),_("span",eo," / "+p(e.torrent[e.total]),1)])]))}}),to={key:0,class:"d-flex flex-column"},oo={class:"text-caption text-grey"},ao={class:"d-flex flex-row gap"},no=w({__name:"ItemChip",props:{torrent:{},title:{},value:{},color:{}},setup(h){const e=h,l=U(),t=C(()=>{const r=e.torrent[e.value],o=typeof r;if(o==="string")return r.length>0?[r]:[];if(o==="object")return r}),n=C(()=>t.value.length<1);return(r,o)=>u(l).hideChipIfUnset&&n.value?R("",!0):(d(),f("div",to,[_("div",oo,p(r.$t(`torrent.properties.${r.title}`)),1),_("div",ao,[!t.value||n.value?(d(),T(we,{key:0,color:r.color.replace("$1",r.torrent[r.value]),variant:"flat"},{default:i(()=>[x(p(r.$t(`torrent.properties.empty_${r.value}`)),1)]),_:1},8,["color"])):(d(!0),f(F,{key:1},H(t.value,s=>(d(),T(we,{color:r.color.replace("$1",r.torrent.state),variant:"flat"},{default:i(()=>[x(p(s),1)]),_:2},1032,["color"]))),256))])]))}});const mt=X(no,[["__scopeId","data-v-08ef66f1"]]),lo={class:"d-flex flex-column"},ro={class:"text-caption text-grey"},so={class:"text-caption text-grey"},vt=w({__name:"ItemData",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>(d(),f("div",lo,[_("div",ro,p(l.$t(`torrent.properties.${l.title}`)),1),_("div",null,[x(p(u(St)(l.torrent[l.value],u(e).useBinarySize))+" ",1),_("span",so,p(u(Dt)(l.torrent[l.value],u(e).useBinarySize)),1)])]))}}),io={class:"d-flex flex-column"},uo={class:"text-caption text-grey"},co={key:0},po={key:1},ht=w({__name:"ItemDateTime",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>(d(),f("div",io,[_("div",uo,p(l.$t(`torrent.properties.${l.title}`)),1),_("div",null,[l.torrent[l.value]>0?(d(),f("span",co,p(u(ie)(l.torrent[l.value]*1e3).format(u(e).dateFormat??"DD/MM/YYYY, HH:mm:ss")),1)):(d(),f("span",po,p(l.$t("dashboard.not_complete")),1))])]))}}),mo={class:"d-flex flex-column"},vo={class:"text-caption text-grey"},ho={key:0},_o={key:1},_t=w({__name:"ItemDuration",props:{torrent:{},title:{},value:{}},setup(h){const e=h,l=C(()=>{const t=ie.duration(e.torrent[e.value],"seconds"),n=[t.years(),t.months(),t.days(),t.hours(),t.minutes(),t.seconds()],r=["Y","M","d","h","m","s"];let o=!1;return n.map((s,c)=>{if(o||s)return o=!0,`${s}${r[c]}`}).filter(s=>s).join(" ")});return(t,n)=>(d(),f("div",mo,[_("div",vo,p(t.$t(`torrent.properties.${t.title}`)),1),_("div",null,[t.torrent[t.value]>0?(d(),f("span",ho,p(l.value),1)):(d(),f("span",_o,p(t.$t("dashboard.not_complete")),1))])]))}}),fo={class:"d-flex flex-column"},bo={class:"text-caption text-grey"},ft=w({__name:"ItemPercent",props:{torrent:{},title:{},value:{}},setup(h){const e=h,l=C(()=>[L.UPLOADING,L.CHECKING_UP,L.FORCED_UP,L.ALLOCATING,L.DOWNLOADING,L.META_DL,L.CHECKING_DL,L.FORCED_DL,L.CHECKING_RESUME_DATA,L.MOVING].includes(e.torrent.state));return(t,n)=>(d(),f("div",fo,[_("div",bo,p(t.$t(`torrent.properties.${t.title}`)),1),a(ut,{"model-value":t.torrent[t.value],max:1,striped:l.value,height:20,color:`torrent-${t.torrent.state}`,rounded:"sm",style:{width:"10em"}},{default:i(()=>[x(p(u(dt)(t.torrent[t.value])),1)]),_:1},8,["model-value","striped","color"])]))}}),go={class:"d-flex flex-column"},yo={class:"text-caption text-grey"},bt=w({__name:"ItemRelativeTime",props:{torrent:{},title:{},value:{}},setup(h){return(e,l)=>(d(),f("div",go,[_("div",yo,p(e.$t(`torrent.properties.${e.title}`)),1),_("div",null,[_("span",null,p(u(ie)(e.torrent[e.value]*1e3).fromNow()),1)])]))}}),ko={class:"d-flex flex-column"},To={class:"text-caption text-grey"},$o={class:"text-caption text-grey"},gt=w({__name:"ItemSpeed",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>(d(),f("div",ko,[_("div",To,p(l.$t(`torrent.properties.${l.title}`)),1),_("div",null,[x(p(u(It)(l.torrent[l.value],u(e).useBitSpeed))+" ",1),_("span",$o,p(u(Bt)(l.torrent[l.value],u(e).useBitSpeed)),1)])]))}}),Co={class:"d-flex flex-column"},Vo={class:"text-caption text-grey"},yt=w({__name:"ItemText",props:{torrent:{},title:{},value:{}},setup(h){return(e,l)=>(d(),f("div",Co,[_("div",Vo,p(e.$t(`torrent.properties.${e.title}`)),1),_("div",null,p(e.torrent[e.value]),1)]))}}),wo={class:"d-flex gap flex-wrap"},So=w({__name:"GridTorrent",props:{torrent:{}},emits:["onTorrentClick"],setup(h){const e=h,l=ee(),t=U(),n=C(()=>(e.torrent.progress===1?t.doneGridProperties:t.busyGridProperties).filter(c=>c.active).sort((c,v)=>c.order-v.order)),r=s=>{switch(s){case B.AMOUNT:return pt;case B.CHIP:return mt;case B.DATA:return vt;case B.DATETIME:return ht;case B.DURATION:return _t;case B.PERCENT:return ft;case B.RELATIVE:return bt;case B.SPEED:return gt;case B.TEXT:default:return yt}},o=C(()=>l.isTorrentInSelection(e.torrent.hash));return(s,c)=>(d(),T(Z,{class:se(`sideborder ${s.torrent.state} pointer`),height:"100%",color:o.value?`torrent-${s.torrent.state}-darken-3`:void 0,onClick:c[0]||(c[0]=v=>s.$emit("onTorrentClick",v,s.torrent))},{default:i(()=>[a(Ke,{class:"text-wrap text-subtitle-1 pt-1 pb-0"},{default:i(()=>[x(p(s.torrent.name),1)]),_:1}),a(be,null,{default:i(()=>[_("div",wo,[(d(!0),f(F,null,H(n.value,v=>(d(),T(Fe(r(v.type)),N({torrent:s.torrent},v.props),null,16,["torrent"]))),256))])]),_:1})]),_:1},8,["class","color"]))}});const Do=X(So,[["__scopeId","data-v-60c9ae77"]]),Io={class:"d-flex align-center",style:{height:"100%",width:"100%"}},Bo=w({__name:"GridView",props:{paginatedTorrents:{}},emits:["onCheckboxClick","onTorrentClick","onTorrentDblClick","onTorrentRightClick","startPress","endPress"],setup(h){const e=ct(),l=ee();return(t,n)=>(d(),T(Ve,{id:"torrentList"},{default:i(()=>[(d(!0),f(F,null,H(t.paginatedTorrents,r=>(d(),T(ve,{cols:"12",lg:"3",md:"4",sm:"6",xl:"2",class:se([u(e).mobile?"pb-2":"pb-4","pt-0"]),onContextmenu:o=>t.$emit("onTorrentRightClick",o,r),onTouchcancel:n[1]||(n[1]=o=>t.$emit("endPress")),onTouchend:n[2]||(n[2]=o=>t.$emit("endPress")),onTouchmove:n[3]||(n[3]=o=>t.$emit("endPress")),onTouchstart:o=>t.$emit("startPress",o.touches.item(0),r),onDblclick:o=>t.$emit("onTorrentDblClick",r)},{default:i(()=>[_("div",Io,[a(je,null,{default:i(()=>[_e(a(M,{color:`torrent-${r.state}`,icon:u(l).isTorrentInSelection(r.hash)?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",class:"mr-2",variant:"text",onClick:o=>t.$emit("onCheckboxClick",r)},null,8,["color","icon","onClick"]),[[Ce,u(l).isSelectionMultiple]])]),_:2},1024),a(Do,{torrent:r,onOnTorrentClick:n[0]||(n[0]=(o,s)=>t.$emit("onTorrentClick",o,s))},null,8,["torrent"])])]),_:2},1032,["class","onContextmenu","onTouchstart","onDblclick"]))),256))]),_:1}))}});const Po=X(Bo,[["__scopeId","data-v-31f288a6"]]),Eo={class:"d-flex gap flex-wrap"},xo=w({__name:"ListTorrent",props:{torrent:{}},emits:["onTorrentClick"],setup(h){const e=h,l=ee(),t=U(),n=C(()=>(e.torrent.progress===1?t.doneTorrentProperties:t.busyTorrentProperties).filter(c=>c.active).sort((c,v)=>c.order-v.order)),r=s=>{switch(s){case B.AMOUNT:return pt;case B.CHIP:return mt;case B.DATA:return vt;case B.DATETIME:return ht;case B.DURATION:return _t;case B.PERCENT:return ft;case B.RELATIVE:return bt;case B.SPEED:return gt;case B.TEXT:default:return yt}},o=C(()=>l.isTorrentInSelection(e.torrent.hash));return(s,c)=>(d(),T(Z,{class:se(`sideborder ${s.torrent.state} pointer`),width:"100%",color:o.value?`torrent-${s.torrent.state}-darken-3`:void 0,onClick:c[0]||(c[0]=v=>s.$emit("onTorrentClick",v,s.torrent))},{default:i(()=>[a(Ke,{class:"text-wrap text-subtitle-1 pt-1 pb-0"},{default:i(()=>[x(p(s.torrent.name),1)]),_:1}),a(be,{class:"pa-2 pt-0"},{default:i(()=>[_("div",Eo,[(d(!0),f(F,null,H(n.value,v=>(d(),T(Fe(r(v.type)),N({torrent:s.torrent},v.props),null,16,["torrent"]))),256))])]),_:1})]),_:1},8,["class","color"]))}});const Lo=X(xo,[["__scopeId","data-v-e5ea358f"]]),Ao={class:"d-flex align-center"},Ro=w({__name:"ListView",props:{paginatedTorrents:{}},emits:["onCheckboxClick","onTorrentClick","onTorrentDblClick","onTorrentRightClick","startPress","endPress"],setup(h){const e=ct(),l=ee();return(t,n)=>(d(),T(Ie,{id:"torrentList",class:"pa-0"},{default:i(()=>[(d(!0),f(F,null,H(t.paginatedTorrents,r=>(d(),T(re,{id:`torrent-${r.hash}`,class:se([u(e).mobile?"mb-2":"mb-4","pa-0"]),onContextmenu:o=>t.$emit("onTorrentRightClick",o,r),onTouchcancel:n[1]||(n[1]=o=>t.$emit("endPress")),onTouchend:n[2]||(n[2]=o=>t.$emit("endPress")),onTouchmove:n[3]||(n[3]=o=>t.$emit("endPress")),onTouchstart:o=>t.$emit("startPress",o.touches.item(0),r),onDblclick:o=>t.$emit("onTorrentDblClick",r)},{default:i(()=>[_("div",Ao,[a(je,null,{default:i(()=>[_e(a(M,{color:`torrent-${r.state}`,icon:u(l).isTorrentInSelection(r.hash)?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",class:"mr-2",variant:"text",onClick:o=>t.$emit("onCheckboxClick",r)},null,8,["color","icon","onClick"]),[[Ce,u(l).isSelectionMultiple]])]),_:2},1024),a(Lo,{torrent:r,onOnTorrentClick:n[0]||(n[0]=(o,s)=>t.$emit("onTorrentClick",o,s))},null,8,["torrent"])])]),_:2},1032,["id","class","onContextmenu","onTouchstart","onDblclick"]))),256))]),_:1}))}});const Mo=X(Ro,[["__scopeId","data-v-e8f6336b"]]),Oo=w({__name:"ItemAmount",props:{torrent:{},title:{},value:{},total:{}},setup(h){return(e,l)=>(d(),f("td",null,p(e.torrent[e.value])+" / "+p(e.torrent[e.total]),1))}}),No={key:0,class:"d-flex flex-row gap"},Uo=w({__name:"ItemChip",props:{torrent:{},title:{},value:{},color:{}},setup(h){const e=h,l=U(),t=C(()=>{const r=e.torrent[e.value],o=typeof r;if(o==="string")return r.length>0?[r]:[];if(o==="object")return r}),n=C(()=>t.value.length<1);return(r,o)=>(d(),f("td",null,[u(l).hideChipIfUnset&&n.value?R("",!0):(d(),f("div",No,[!t.value||n.value?(d(),T(we,{key:0,color:r.color.replace("$1",r.torrent[r.value]),variant:"flat"},{default:i(()=>[x(p(r.$t(`torrent.properties.empty_${r.value}`)),1)]),_:1},8,["color"])):(d(!0),f(F,{key:1},H(t.value,s=>(d(),T(we,{color:r.color.replace("$1",r.torrent.state),variant:"flat"},{default:i(()=>[x(p(s),1)]),_:2},1032,["color"]))),256))]))]))}});const Fo=X(Uo,[["__scopeId","data-v-23c01601"]]),Go=w({__name:"ItemData",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>(d(),f("td",null,p(u(Pt)(l.torrent[l.value],u(e).useBinarySize)),1))}}),Ho={key:0},Ko={key:1},zo=w({__name:"ItemDateTime",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>l.torrent[l.value]>0?(d(),f("td",Ho,p(u(ie)(l.torrent[l.value]*1e3).format(u(e).dateFormat??"DD/MM/YYYY, HH:mm:ss")),1)):(d(),f("td",Ko,p(l.$t("dashboard.not_complete")),1))}}),qo={key:0},Yo={key:1},jo=w({__name:"ItemDuration",props:{torrent:{},title:{},value:{}},setup(h){const e=h,l=C(()=>{const t=ie.duration(e.torrent[e.value],"seconds"),n=[t.years(),t.months(),t.days(),t.hours(),t.minutes(),t.seconds()],r=["Y","M","d","h","m","s"];let o=!1;return n.map((s,c)=>{if(o||s)return o=!0,`${s}${r[c]}`}).filter(s=>s).join(" ")});return(t,n)=>t.torrent[t.value]>0?(d(),f("td",qo,p(l.value),1)):(d(),f("td",Yo,p(t.$t("dashboard.not_complete")),1))}}),Xo=w({__name:"ItemPercent",props:{torrent:{},title:{},value:{}},setup(h){const e=h,l=C(()=>[L.UPLOADING,L.CHECKING_UP,L.FORCED_UP,L.ALLOCATING,L.DOWNLOADING,L.META_DL,L.CHECKING_DL,L.FORCED_DL,L.CHECKING_RESUME_DATA,L.MOVING].includes(e.torrent.state));return(t,n)=>(d(),f("td",null,[a(ut,{"model-value":t.torrent[t.value],max:1,striped:l.value,height:20,color:`torrent-${t.torrent.state}`,rounded:"sm",style:{width:"10em"}},{default:i(()=>[x(p(u(dt)(t.torrent[t.value])),1)]),_:1},8,["model-value","striped","color"])]))}}),Wo=w({__name:"ItemRelativeTime",props:{torrent:{},title:{},value:{}},setup(h){return(e,l)=>(d(),f("td",null,p(u(ie)(e.torrent[e.value]*1e3).fromNow()),1))}}),Jo=w({__name:"ItemSpeed",props:{torrent:{},title:{},value:{}},setup(h){const e=U();return(l,t)=>(d(),f("td",null,p(u(Et)(l.torrent[l.value],u(e).useBitSpeed)),1))}}),Qo=w({__name:"ItemText",props:{torrent:{},title:{},value:{}},setup(h){return(e,l)=>(d(),f("td",null,p(e.torrent[e.value]),1))}}),Zo=w({__name:"TableTorrent",props:{torrent:{}},setup(h){const e=U(),l=C(()=>e.tableProperties.filter(n=>n.active).sort((n,r)=>n.order-r.order)),t=n=>{switch(n){case B.AMOUNT:return Oo;case B.CHIP:return Fo;case B.DATA:return Go;case B.DATETIME:return zo;case B.DURATION:return jo;case B.PERCENT:return Xo;case B.RELATIVE:return Wo;case B.SPEED:return Jo;case B.TEXT:default:return Qo}};return(n,r)=>(d(!0),f(F,null,H(l.value,o=>(d(),T(Fe(t(o.type)),N({torrent:n.torrent},o.props),null,16,["torrent"]))),256))}}),ea=h=>(lt("data-v-8832d38a"),h=h(),rt(),h),ta=ea(()=>_("th",{class:"px-1"},null,-1)),oa={key:0},aa={class:"text-left"},na={class:"text-left"},la=["onContextmenu","onTouchstart","onClick","onDblclick"],ra={key:0},sa=w({__name:"TableView",props:{paginatedTorrents:{}},emits:["onCheckboxClick","onTorrentClick","onTorrentDblClick","onTorrentRightClick","startPress","endPress"],setup(h){const e=ee(),l=U(),t=C(()=>l.tableProperties.filter(o=>o.active).sort((o,s)=>o.order-s.order));function n(o){return e.isTorrentInSelection(o.hash)}const r=o=>["pointer",n(o)?`bg-torrent-${o.state}-darken-3 selected`:""];return(o,s)=>(d(),T(xt,{id:"torrentList",class:"pa-0",density:"compact"},{default:i(()=>[_("thead",null,[_("tr",null,[ta,u(e).isSelectionMultiple?(d(),f("th",oa)):R("",!0),_("th",aa,p(o.$t("torrent.properties.name")),1),(d(!0),f(F,null,H(t.value,c=>(d(),f("th",na,p(o.$t(`torrent.properties.${c.props.title}`)),1))),256))])]),_("tbody",null,[(d(!0),f(F,null,H(o.paginatedTorrents,c=>_e((d(),f("tr",{class:se(r(c)),onContextmenu:v=>o.$emit("onTorrentRightClick",v,c),onTouchcancel:s[0]||(s[0]=v=>o.$emit("endPress")),onTouchend:s[1]||(s[1]=v=>o.$emit("endPress")),onTouchmove:s[2]||(s[2]=v=>o.$emit("endPress")),onTouchstart:v=>o.$emit("startPress",v.touches.item(0),c),onClick:v=>o.$emit("onTorrentClick",v,c),onDblclick:v=>o.$emit("onTorrentDblClick",c)},[_("td",{class:se(`pa-0 bg-torrent-${c.state}`)},null,2),u(e).isSelectionMultiple?(d(),f("td",ra,[a(Te,{"model-value":n(c),color:`torrent-${c.state}`,variant:"text",onClick:J(v=>o.$emit("onCheckboxClick",c),["stop"])},null,8,["model-value","color","onClick"])])):R("",!0),_("td",null,p(c.name),1),a(Zo,{torrent:c},null,8,["torrent"])],42,la)),[[Lt]])),256))])]),_:1}))}});const ia=X(sa,[["__scopeId","data-v-8832d38a"]]),da={class:"pt-4 px-1 px-sm-5"},ua={class:"pa-0",style:{width:"10em"}},ca={class:"text-uppercase",style:{float:"right","font-size":"0.8em"}},pa={class:"text-grey"},ma={key:0,class:"mt-5 text-xs-center"},va={class:"text-grey"},ha={key:1},_a={key:5},Va=w({__name:"Dashboard",setup(h){const{t:e}=Ue(),l=nt(),t=ee(),{currentPage:n,isSelectionMultiple:r,selectedTorrents:o,displayMode:s,torrentCountString:c}=Xe(t),v=st(),k=Be(),S=fe(),{filteredTorrents:A,sortOptions:y}=Xe(S),P=U(),E=[{value:"added_on",title:e("dashboard.sortBy.added_on")},{value:"amount_left",title:e("dashboard.sortBy.amount_left")},{value:"auto_tmm",title:e("dashboard.sortBy.auto_tmm")},{value:"availability",title:e("dashboard.sortBy.availability")},{value:"avg_download_speed",title:e("dashboard.sortBy.avg_download_speed")},{value:"avg_upload_speed",title:e("dashboard.sortBy.avg_upload_speed")},{value:"category",title:e("dashboard.sortBy.category")},{value:"completed",title:e("dashboard.sortBy.completed")},{value:"completion_on",title:e("dashboard.sortBy.completion_on")},{value:"content_path",title:e("dashboard.sortBy.content_path")},{value:"dl_limit",title:e("dashboard.sortBy.dl_limit")},{value:"dlspeed",title:e("dashboard.sortBy.dlspeed")},{value:"download_path",title:e("dashboard.sortBy.download_path")},{value:"downloaded",title:e("dashboard.sortBy.downloaded")},{value:"downloaded_session",title:e("dashboard.sortBy.downloaded_session")},{value:"eta",title:e("dashboard.sortBy.eta")},{value:"f_l_piece_prio",title:e("dashboard.sortBy.f_l_piece_prio")},{value:"force_start",title:e("dashboard.sortBy.force_start")},{value:"globalSpeed",title:e("dashboard.sortBy.globalSpeed")},{value:"globalVolume",title:e("dashboard.sortBy.globalVolume")},{value:"hash",title:e("dashboard.sortBy.hash")},{value:"infohash_v1",title:e("dashboard.sortBy.infohash_v1")},{value:"infohash_v2",title:e("dashboard.sortBy.infohash_v2")},{value:"last_activity",title:e("dashboard.sortBy.last_activity")},{value:"magnet_uri",title:e("dashboard.sortBy.magnet_uri")},{value:"max_ratio",title:e("dashboard.sortBy.max_ratio")},{value:"max_seeding_time",title:e("dashboard.sortBy.max_seeding_time")},{value:"name",title:e("dashboard.sortBy.name")},{value:"num_complete",title:e("dashboard.sortBy.num_complete")},{value:"num_incomplete",title:e("dashboard.sortBy.num_incomplete")},{value:"num_leechs",title:e("dashboard.sortBy.num_leechs")},{value:"num_seeds",title:e("dashboard.sortBy.num_seeds")},{value:"priority",title:e("dashboard.sortBy.priority")},{value:"progress",title:e("dashboard.sortBy.progress")},{value:"ratio",title:e("dashboard.sortBy.ratio")},{value:"ratio_limit",title:e("dashboard.sortBy.ratio_limit")},{value:"save_path",title:e("dashboard.sortBy.save_path")},{value:"seeding_time",title:e("dashboard.sortBy.seeding_time")},{value:"seeding_time_limit",title:e("dashboard.sortBy.seeding_time_limit")},{value:"seen_complete",title:e("dashboard.sortBy.seen_complete")},{value:"seq_dl",title:e("dashboard.sortBy.seq_dl")},{value:"size",title:e("dashboard.sortBy.size")},{value:"state",title:e("dashboard.sortBy.state")},{value:"super_seeding",title:e("dashboard.sortBy.super_seeding")},{value:"tags",title:e("dashboard.sortBy.tags")},{value:"time_active",title:e("dashboard.sortBy.time_active")},{value:"total_size",title:e("dashboard.sortBy.total_size")},{value:"tracker",title:e("dashboard.sortBy.tracker")},{value:"trackers_count",title:e("dashboard.sortBy.trackers_count")},{value:"up_limit",title:e("dashboard.sortBy.up_limit")},{value:"uploaded",title:e("dashboard.sortBy.uploaded")},{value:"uploaded_session",title:e("dashboard.sortBy.uploaded_session")},{value:"upspeed",title:e("dashboard.sortBy.upspeed")}].sort((m,b)=>m.title.localeCompare(b.title));E.splice(0,0,{value:"",title:e("dashboard.sortBy.default")});const V=O(!1),g=ot({isVisible:!1,offset:[0,0]}),D=C({get:()=>S.textFilter,set:Ot(m=>{S.textFilter=m??""},300)}),Y=C(()=>s.value===K.LIST),Ee=C(()=>s.value===K.GRID),xe=C(()=>s.value===K.TABLE),{paginatedResults:de,currentPage:j,pageCount:te}=Mt(A,P.paginationSize,n),Le=C(()=>!!S.textFilter&&S.textFilter.length>0),ge=C(()=>A.value.length<=o.value.length);function oe(m){V.value=m??!V.value,V.value&&We(()=>{document.getElementById("searchInput")?.focus()})}function Ae(){S.textFilter=""}function ue(){window.scrollTo({top:0,behavior:"smooth"})}function ye(){r.value&&t.unselectAllTorrents(),r.value=!r.value}function Re(){ge.value?t.unselectAllTorrents():t.selectTorrents(...A.value.map(m=>m.hash))}function W(m){r.value||l.push({name:"torrentDetail",params:{hash:m.hash}})}function ce(m){t.toggleSelect(m.hash)}function pe(m,b){m.shiftKey?t.spanTorrentSelection(b.hash):(Ne(m)||t.isSelectionMultiple)&&(t.isSelectionMultiple=!0,t.toggleSelect(b.hash))}async function ae(m,b){g.isVisible&&(g.isVisible=!1,await We()),g.isVisible=!0,g.offset=[m.pageX,m.pageY],r.value?o.value.length===0&&t.selectTorrent(b.hash):(t.unselectAllTorrents(),t.selectTorrent(b.hash))}const ke=O();function me(m,b){ke.value=setTimeout(()=>{ae(m,b)},500)}function I(){clearTimeout(ke.value)}function G(m){if(v.hasActiveDialog)return!1;const b=m.target;if(Ne(m)&&m.key==="a"&&b.tagName!=="INPUT")return t.unselectAllTorrents(),t.selectTorrents(...A.value.map($=>$.hash)),m.preventDefault(),!0;if(Ne(m)&&m.key==="f"){const $=document.getElementById("searchInput");if(document.activeElement!==$)return oe(!0),m.preventDefault(),!0}if(m.key==="Escape"){const $=document.getElementById("searchInput");return document.activeElement===$||V.value?oe(!1):(r.value=!1,t.unselectAllTorrents()),m.preventDefault(),!0}if(m.key==="Delete")return o.value.length===0?void 0:(v.createDialog(it,{hashes:o.value}),m.preventDefault(),!0);if(m.key==="/"){const $=document.getElementById("searchInput");return document.activeElement!==$&&!V.value&&(l.push({name:"searchEngine"}),m.preventDefault()),!0}}return Tt(()=>g.isVisible,m=>{!m&&!r.value&&t.unselectAllTorrents()}),Se(async()=>{await k.fetchCategories(),await k.fetchTags(),oe(Le.value)}),at(()=>{document.addEventListener("keydown",G),r.value=!1,ue()}),$t(()=>{document.removeEventListener("keydown",G)}),(m,b)=>(d(),f(F,null,[_("div",da,[a(Ve,{class:"ma-0 pa-0 mb-2"},{default:i(()=>[a(je,null,{default:i(()=>[_e(a(Z,{color:"transparent"},{default:i(()=>[a(Q,{id:"searchInput",modelValue:D.value,"onUpdate:modelValue":b[0]||(b[0]=$=>D.value=$),label:u(e)("dashboard.searchInputLabel"),clearable:"",density:"compact","hide-details":"","prepend-inner-icon":"mdi-magnify",rounded:"pill","single-line":"",style:{width:"200px"},variant:"solo","onClick:clear":b[1]||(b[1]=$=>Ae())},null,8,["modelValue","label"])]),_:1},512),[[Ce,V.value]])]),_:1}),a(q,{text:u(e)("dashboard.toggleSearchFilter"),location:"top"},{activator:i(({props:$})=>[a(M,N({icon:V.value?"mdi-chevron-left-circle":"mdi-text-box-search"},$,{variant:"plain",onClick:b[2]||(b[2]=Me=>oe())}),null,16,["icon"])]),_:1},8,["text"]),a(q,{text:u(e)("dashboard.toggleSelectMode"),location:"top"},{activator:i(({props:$})=>[a(M,N({icon:u(r)?"mdi-checkbox-marked":"mdi-checkbox-blank-outline"},$,{variant:"plain",onClick:ye}),null,16,["icon"])]),_:1},8,["text"]),a(Ge,null,{activator:i(({props:$})=>[a(q,{text:m.$t("dashboard.displayMode.title"),location:"top"},{activator:i(({props:Me})=>[a(M,N({icon:""},N($,Me),{variant:"plain"}),{default:i(()=>[u(s)===u(K).LIST?(d(),T(le,{key:0,icon:"mdi-view-list"})):R("",!0),u(s)===u(K).GRID?(d(),T(le,{key:1,icon:"mdi-view-grid"})):R("",!0),u(s)===u(K).TABLE?(d(),T(le,{key:2,icon:"mdi-table"})):R("",!0)]),_:2},1040)]),_:2},1032,["text"])]),default:i(()=>[a(Ie,null,{default:i(()=>[a(re,{title:m.$t("dashboard.displayMode.list"),"prepend-icon":"mdi-view-list",onClick:b[3]||(b[3]=$=>s.value=u(K).LIST)},null,8,["title"]),a(re,{title:m.$t("dashboard.displayMode.grid"),"prepend-icon":"mdi-view-grid",onClick:b[4]||(b[4]=$=>s.value=u(K).GRID)},null,8,["title"]),a(re,{title:m.$t("dashboard.displayMode.table"),"prepend-icon":"mdi-table",onClick:b[5]||(b[5]=$=>s.value=u(K).TABLE)},null,8,["title"])]),_:1})]),_:1}),a(q,{text:u(e)("dashboard.toggleSortOrder"),location:"top"},{activator:i(({props:$})=>[a(M,N({icon:u(y).reverseOrder?"mdi-arrow-up-thin":"mdi-arrow-down-thin"},$,{variant:"plain",onClick:b[6]||(b[6]=Me=>u(y).reverseOrder=!u(y).reverseOrder)}),null,16,["icon"])]),_:1},8,["text"]),_("div",ua,[a(At,{modelValue:u(y).sortBy,"onUpdate:modelValue":b[7]||(b[7]=$=>u(y).sortBy=$),items:u(E),label:u(e)("dashboard.sortLabel"),"auto-select-first":"",density:"compact","hide-details":"",variant:"solo-filled"},null,8,["modelValue","items","label"])]),a(ve,{class:"align-center justify-center"},{default:i(()=>[_("span",ca,p(u(c)),1)]),_:1})]),_:1}),a(Ve,{class:"ma-0 pa-0"},{default:i(()=>[a(Rt,null,{default:i(()=>[_e(a(Z,{color:"transparent"},{default:i(()=>[a(q,{text:u(e)("common.selectAll"),location:"bottom"},{activator:i(({props:$})=>[a(M,N({icon:ge.value?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",class:"text-grey",color:"transparent",style:{left:"-8px"}},$,{onClick:Re}),null,16,["icon"])]),_:1},8,["text"]),_("span",pa,p(u(e)("dashboard.selectAll")),1)]),_:1},512),[[Ce,u(r)]])]),_:1})]),_:1}),u(A).length===0?(d(),f("div",ma,[_("p",va,p(u(e)("common.emptyList")),1)])):R("",!0),u(P).isPaginationOnTop&&!u(P).isInfiniteScrollActive&&u(te)>1?(d(),f("div",ha,[a(Je,{modelValue:u(j),"onUpdate:modelValue":b[8]||(b[8]=$=>he(j)?j.value=$:null),length:u(te),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left",onInput:ue},null,8,["modelValue","length"])])):R("",!0),Y.value?(d(),T(Mo,{key:2,"paginated-torrents":u(de),onOnTorrentClick:pe,onOnTorrentDblClick:W,onOnCheckboxClick:ce,onOnTorrentRightClick:ae,onStartPress:me,onEndPress:I},null,8,["paginated-torrents"])):Ee.value?(d(),T(Po,{key:3,class:"mb-2","paginated-torrents":u(de),onOnTorrentClick:pe,onOnTorrentDblClick:W,onOnCheckboxClick:ce,onOnTorrentRightClick:ae,onStartPress:me,onEndPress:I},null,8,["paginated-torrents"])):xe.value?(d(),T(ia,{key:4,"paginated-torrents":u(de),onOnTorrentClick:pe,onOnTorrentDblClick:W,onOnCheckboxClick:ce,onOnTorrentRightClick:ae,onStartPress:me,onEndPress:I},null,8,["paginated-torrents"])):R("",!0),!u(P).isPaginationOnTop&&!u(P).isInfiniteScrollActive&&u(te)>1?(d(),f("div",_a,[a(Je,{modelValue:u(j),"onUpdate:modelValue":b[9]||(b[9]=$=>he(j)?j.value=$:null),length:u(te),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left",onInput:ue},null,8,["modelValue","length"])])):R("",!0)]),_("div",{style:Ct(`position: absolute; left: ${g.offset[0]}px; top: ${g.offset[1]}px;`)},[a(Jt,{modelValue:g.isVisible,"onUpdate:modelValue":b[10]||(b[10]=$=>g.isVisible=$)},null,8,["modelValue"])],4)],64))}});export{Va as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{g as v,K as b,$ as h,aa as q,r as x,d as C,x as k,a as S,a1 as K,a2 as T,a3 as s,m as e,W as m,Z as p,u as l,Y as f,ao as _,a9 as y}from"./vue-d2584a6d.js";import{_ as A}from"./PasswordField.vue_vue_type_script_setup_true_lang-f7d196be.js";import{aS as B,aT as F,f as L,aL as U,g as I,h as M,i as N,V as O,j as R,k as $,l as j}from"./index-135ae4c1.js";import"./faker-c43f92d4.js";import"./vuetify-e547ef1b.js";const G=v({__name:"Login",setup(D){const{t:a}=b(),V=h(),o=q(),u=B(),r=x({username:"",password:""}),c=C(!1),w={username:[d=>!!d||a("login.rules.username_required")],password:[d=>!!d||a("login.rules.password_required")]},i=async()=>{c.value&&(await u.login(r.username,r.password),u.isAuthenticated?(y.success(a("login.success")),g()):y.error(a("login.error")))},g=()=>{o.query.redirect?V.push(o.query.redirect):V.push({name:"dashboard"})};return k(async()=>{o.query.username&&o.query.password&&await u.login(o.query.username,o.query.password)}),S(()=>{u.isAuthenticated&&g()}),(d,t)=>(K(),T(F,{class:"mt-16"},{default:s(()=>[e(j,{class:"mx-auto",rounded:"lg","min-width":"250"},{default:s(()=>[e(L,null,{default:s(()=>[m(p(l(a)("login.title")),1)]),_:1}),e(U,null,{default:s(()=>[m(p(l(a)("login.subtitle")),1)]),_:1}),e(I,null,{default:s(()=>[e(M,{modelValue:c.value,"onUpdate:modelValue":t[2]||(t[2]=n=>c.value=n),onSubmit:f(i,["prevent"])},{default:s(()=>[e(N,{modelValue:r.username,"onUpdate:modelValue":t[0]||(t[0]=n=>r.username=n),label:l(a)("login.username"),autofocus:"",rules:w.username,onKeydown:_(f(i,["prevent"]),["enter"]),variant:"outlined"},{prepend:s(()=>[e(O,{color:"accent",icon:"mdi-account"})]),_:1},8,["modelValue","label","rules","onKeydown"]),e(A,{modelValue:r.password,"onUpdate:modelValue":t[1]||(t[1]=n=>r.password=n),label:l(a)("login.password"),rules:w.password,"prepend-icon":"mdi-lock",onKeydown:_(f(i,["prevent"]),["enter"]),variant:"outlined"},null,8,["modelValue","label","rules","onKeydown"])]),_:1},8,["modelValue"])]),_:1}),e(R,null,{default:s(()=>[e($,{variant:"elevated",block:"",color:"accent",onClick:i},{default:s(()=>[m(p(l(a)("login.submit")),1)]),_:1})]),_:1})]),_:1})]),_:1}))}});export{G as default};
|
||||
1
qbit/vuetorrent/public/assets/Login-Binyn48g.js
Normal file
1
qbit/vuetorrent/public/assets/Login-Binyn48g.js
Normal file
@@ -0,0 +1 @@
|
||||
import{g as v,G as b,r as h,d as C,x as q,a as x,I as k,J as S,K as s,T as K,S as T,m as e,L as m,M as p,u as l,N as f,P as _,U as y}from"./vue-BSryv7ps.js";import{_ as A,__tla as __tla_0}from"./PasswordField.vue_vue_type_script_setup_true_lang-CqQQlY6F.js";import{n as U,o as B,c as F,p as I,d as M,e as N,f as L,k as O,g as R,i as D,V as E,__tla as __tla_1}from"./index-bUuJUL5l.js";import"./vuetify-i5Qjiq6M.js";let z;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{z=v({__name:"Login",setup(G){const{t:a}=b(),w=K(),o=T(),u=U(),r=h({username:"",password:""}),c=C(!1),V={username:[d=>!!d||a("login.rules.username_required")],password:[d=>!!d||a("login.rules.password_required")]},i=async()=>{c.value&&(await u.login(r.username,r.password),u.isAuthenticated?(y.success(a("login.success")),g()):y.error(a("login.error")))},g=()=>{o.query.redirect?w.push(o.query.redirect):w.push({name:"dashboard"})};return q(async()=>{o.query.username&&o.query.password&&await u.login(o.query.username,o.query.password)}),x(()=>{u.isAuthenticated&&g()}),(d,n)=>(k(),S(B,{class:"fill-height"},{default:s(()=>[e(E,{class:"mx-auto",rounded:"lg","min-width":"250"},{default:s(()=>[e(F,null,{default:s(()=>[m(p(l(a)("login.title")),1)]),_:1}),e(I,null,{default:s(()=>[m(p(l(a)("login.subtitle")),1)]),_:1}),e(M,null,{default:s(()=>[e(N,{modelValue:c.value,"onUpdate:modelValue":n[2]||(n[2]=t=>c.value=t),onSubmit:f(i,["prevent"])},{default:s(()=>[e(L,{modelValue:r.username,"onUpdate:modelValue":n[0]||(n[0]=t=>r.username=t),id:"username",name:"username",label:l(a)("login.username"),autofocus:"",rules:V.username,onKeydown:_(f(i,["prevent"]),["enter"]),variant:"outlined"},{prepend:s(()=>[e(O,{color:"accent",icon:"mdi-account"})]),_:1},8,["modelValue","label","rules","onKeydown"]),e(A,{modelValue:r.password,"onUpdate:modelValue":n[1]||(n[1]=t=>r.password=t),id:"password",label:l(a)("login.password"),rules:V.password,"prepend-icon":"mdi-lock",onKeydown:_(f(i,["prevent"]),["enter"]),variant:"outlined"},null,8,["modelValue","label","rules","onKeydown"])]),_:1},8,["modelValue"])]),_:1}),e(R,null,{default:s(()=>[e(D,{variant:"elevated",block:"",color:"accent",onClick:i},{default:s(()=>[m(p(l(a)("login.submit")),1)]),_:1})]),_:1})]),_:1})]),_:1}))}})});export{z as default,__tla};
|
||||
1
qbit/vuetorrent/public/assets/Logs-2cs4ACjd.css
Normal file
1
qbit/vuetorrent/public/assets/Logs-2cs4ACjd.css
Normal file
@@ -0,0 +1 @@
|
||||
.v-theme--darkTheme .logtype-normal[data-v-1115081b]{color:#fff!important}.v-theme--darkTheme .logtype-info[data-v-1115081b]{color:#00bfff!important}.v-theme--darkTheme .logtype-warning[data-v-1115081b]{color:#ff8c00!important}.v-theme--darkTheme .logtype-critical[data-v-1115081b]{color:#c80000!important}.v-theme--lightTheme .logtype-normal[data-v-1115081b]{color:#000!important}.v-theme--lightTheme .logtype-info[data-v-1115081b]{color:#00f!important}.v-theme--lightTheme .logtype-warning[data-v-1115081b]{color:orange!important}.v-theme--lightTheme .logtype-critical[data-v-1115081b]{color:red!important}
|
||||
1
qbit/vuetorrent/public/assets/Logs-B5pHX84I.js
Normal file
1
qbit/vuetorrent/public/assets/Logs-B5pHX84I.js
Normal file
@@ -0,0 +1 @@
|
||||
import{u as z,__tla as __tla_0}from"./ArrayPagination-DuWOkPss.js";import{q as D,r as H,L as l,s as K,t as Q,v as R,w as J,x as f,i as X,y as m,z as Y,A as Z,B as c,f as ee,C as S,D as te,E as le,F as ae,h as se,G as oe,H as ne,I as ue,__tla as __tla_1}from"./index-bUuJUL5l.js";import{g as re,G as ie,d as T,c as g,H as de,V as me,I as r,W as C,m as e,K as a,T as ce,X as v,M as i,u as o,J as y,Q as w,O as V,F,Y as pe,Z as fe,L as b}from"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";let xe;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{let ge,ve,ye,Ve,_e,Le;ge={class:"pa-3"};ve={style:{"font-size":"1.6em !important"},class:"subtitle-1 ml-2"};ye={class:"d-flex justify-end"};Ve={class:"d-flex mr-8 overflow-hidden"};_e={class:"d-flex"};Le=re({__name:"Logs",setup(he){const B=ce(),{t:E}=ie(),_=D(),O=H(),L=T([{title:l[l.NORMAL],value:l.NORMAL},{title:l[l.INFO],value:l.INFO},{title:l[l.WARNING],value:l.WARNING},{title:l[l.CRITICAL],value:l.CRITICAL}]),u=T([l.NORMAL,l.INFO,l.WARNING,l.CRITICAL]),h=T(""),P=g(()=>_.logs),G=g(()=>P.value.filter(t=>u.value.includes(t.type))),I=g(()=>u.value.length>0),N=g(()=>u.value.length===L.value.length),{results:x}=K(G,h,t=>t.message),{paginatedResults:M,currentPage:d,pageCount:p}=z(x,30),k=()=>{B.push({name:"dashboard"})},U=t=>`logtype-${l[t?.type]?.toLowerCase()}`,$=t=>l[t.type],W=t=>ne(t.timestamp*1e3).format(O.dateFormat),j=()=>{N.value?u.value=[]:u.value=L.value.map(t=>t.value)},A=t=>{t.key==="Escape"&&k()};return de(async()=>{document.addEventListener("keydown",A),await _.cleanAndFetchLogs(),Q(_.fetchLogs,15e3)}),me(()=>{document.removeEventListener("keydown",A)}),(t,n)=>(r(),C("div",ge,[e(R,{"no-gutters":"",align:"center",justify:"center"},{default:a(()=>[e(f,null,{default:a(()=>[v("h1",ve,i(o(E)("logs.title")),1)]),_:1}),e(f,null,{default:a(()=>[v("div",ye,[e(X,{icon:"mdi-close",variant:"plain",onClick:k})])]),_:1})]),_:1}),e(J,null,{default:a(()=>[e(m,null,{default:a(()=>[e(R,null,{default:a(()=>[e(f,{cols:"6"},{default:a(()=>[e(Y,{modelValue:u.value,"onUpdate:modelValue":n[0]||(n[0]=s=>u.value=s),items:L.value,label:t.$t("logs.filters.type"),"hide-details":"",multiple:"",chips:""},{"prepend-item":a(()=>[e(m,{title:t.$t("common.selectAll"),onClick:j},{prepend:a(()=>[e(Z,{indeterminate:I.value&&!N.value,"model-value":I.value},null,8,["indeterminate","model-value"])]),_:1},8,["title"]),e(c)]),_:1},8,["modelValue","items","label"])]),_:1}),e(f,{cols:"6"},{default:a(()=>[e(ee,{modelValue:h.value,"onUpdate:modelValue":n[1]||(n[1]=s=>h.value=s),label:t.$t("logs.filters.query"),"hide-details":""},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e(c,{class:"my-3",thickness:"5"}),o(p)>1?(r(),y(m,{key:0},{default:a(()=>[e(S,{modelValue:o(d),"onUpdate:modelValue":n[2]||(n[2]=s=>w(d)?d.value=s:null),length:o(p),"prev-icon":"mdi-menu-left","next-icon":"mdi-menu-right"},null,8,["modelValue","length"])]),_:1})):V("",!0),e(c),(r(!0),C(F,null,pe(o(M),(s,q)=>(r(),C(F,null,[q>0?(r(),y(c,{key:0})):V("",!0),e(m,{class:"pa-0"},{default:a(()=>[e(te,{class:"p-0"},{default:a(()=>[e(le,{class:fe([U(s),"pa-0"])},{default:a(()=>[e(ae,{class:"text-no-wrap"},{default:a(()=>[v("div",Ve,"["+i(s.id)+"] "+i(s.message),1),e(se),v("div",_e,i(W(s)),1)]),_:2},1024),e(oe,{class:"wrap-word text-select"},{default:a(()=>[b(" ["+i($(s))+"] "+i(s.message),1)]),_:2},1024)]),_:2},1032,["class"])]),_:2},1024)]),_:2},1024)],64))),256)),o(x).length===0?(r(),y(m,{key:1},{default:a(()=>[b(i(t.$t("logs.emptyLogList")),1)]),_:1})):V("",!0),e(c),o(p)>1?(r(),y(m,{key:2},{default:a(()=>[e(S,{modelValue:o(d),"onUpdate:modelValue":n[3]||(n[3]=s=>w(d)?d.value=s:null),length:o(p),"prev-icon":"mdi-menu-left","next-icon":"mdi-menu-right"},null,8,["modelValue","length"])]),_:1})):V("",!0)]),_:1})]))}});xe=ue(Le,[["__scopeId","data-v-1115081b"]])});export{xe as default,__tla};
|
||||
@@ -1 +0,0 @@
|
||||
.v-theme--darkTheme .logtype-normal[data-v-77aed2b3]{color:#fff!important}.v-theme--darkTheme .logtype-info[data-v-77aed2b3]{color:gray!important}.v-theme--darkTheme .logtype-warning[data-v-77aed2b3]{color:#b8860b!important}.v-theme--darkTheme .logtype-critical[data-v-77aed2b3]{color:#c80000!important}.v-theme--lightTheme .logtype-normal[data-v-77aed2b3]{color:#000!important}.v-theme--lightTheme .logtype-info[data-v-77aed2b3]{color:gray!important}.v-theme--lightTheme .logtype-warning[data-v-77aed2b3]{color:#daa520!important}.v-theme--lightTheme .logtype-critical[data-v-77aed2b3]{color:red!important}
|
||||
@@ -1 +0,0 @@
|
||||
import{u as G}from"./ArrayPagination-26934cac.js";import{ay as P,y as K,az as l,av as H,ai as Q,q as b,c as Z,r as g,k as J,d,a1 as X,s as Y,a3 as c,i as ee,N as S,aw as te,ax as le,_ as ae}from"./index-135ae4c1.js";import"./faker-c43f92d4.js";import{g as se,$ as oe,K as ne,d as h,c as f,M as ue,I as ie,a1 as i,a6 as I,m as e,a3 as a,ab as F,Z as m,u as o,a2 as v,D as x,a8 as y,F as B,a7 as re,a5 as de,W as N}from"./vue-d2584a6d.js";import{d as me}from"./dayjs.min-1969f9c6.js";import"./vuetify-e547ef1b.js";const ce={class:"pa-3"},pe={style:{"font-size":"1.6em !important"},class:"subtitle-1 ml-2"},ge={class:"d-flex justify-end"},fe=se({__name:"Logs",setup(ve){const w=oe(),{t:O}=ne(),_=P(),$=K(),V=h([{title:l[l.NORMAL],value:l.NORMAL},{title:l[l.INFO],value:l.INFO},{title:l[l.WARNING],value:l.WARNING},{title:l[l.CRITICAL],value:l.CRITICAL}]),u=h([l.NORMAL,l.INFO,l.WARNING,l.CRITICAL]),L=h(""),M=f(()=>_.logs),U=f(()=>M.value.filter(t=>u.value.includes(t.type))),{results:C}=H(U,L,t=>t.message),T=f(()=>u.value.length>0),k=f(()=>u.value.length===V.value.length),{paginatedResults:E,currentPage:r,pageCount:p}=G(C,30),A=()=>{w.push({name:"dashboard"})},W=t=>`logtype-${l[t?.type]?.toLowerCase()}`,j=t=>l[t.type],q=t=>me(t.timestamp*1e3).format($.dateFormat),z=()=>{k.value?u.value=[]:u.value=V.value.map(t=>t.value)},R=t=>{t.key==="Escape"&&A()};return ue(async()=>{document.addEventListener("keydown",R),await _.cleanAndFetchLogs(),Q(_.fetchLogs,15e3)}),ie(()=>{document.removeEventListener("keydown",R)}),(t,n)=>(i(),I("div",ce,[e(b,{"no-gutters":"",align:"center",justify:"center"},{default:a(()=>[e(g,null,{default:a(()=>[F("h1",pe,m(o(O)("logs.title")),1)]),_:1}),e(g,null,{default:a(()=>[F("div",ge,[e(J,{icon:"mdi-close",variant:"plain",onClick:A})])]),_:1})]),_:1}),e(Z,null,{default:a(()=>[e(d,null,{default:a(()=>[e(b,null,{default:a(()=>[e(g,{cols:"6"},{default:a(()=>[e(X,{modelValue:u.value,"onUpdate:modelValue":n[0]||(n[0]=s=>u.value=s),items:V.value,label:t.$t("logs.filters.type"),"hide-details":"",multiple:"",chips:""},{"prepend-item":a(()=>[e(d,{title:t.$t("common.selectAll"),onClick:z},{prepend:a(()=>[e(Y,{indeterminate:T.value&&!k.value,"model-value":T.value},null,8,["indeterminate","model-value"])]),_:1},8,["title"]),e(c)]),_:1},8,["modelValue","items","label"])]),_:1}),e(g,{cols:"6"},{default:a(()=>[e(ee,{modelValue:L.value,"onUpdate:modelValue":n[1]||(n[1]=s=>L.value=s),label:t.$t("logs.filters.query"),"hide-details":""},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e(c,{class:"my-3",thickness:"5"}),o(p)>1?(i(),v(d,{key:0},{default:a(()=>[e(S,{modelValue:o(r),"onUpdate:modelValue":n[2]||(n[2]=s=>x(r)?r.value=s:null),length:o(p),"prev-icon":"mdi-menu-left","next-icon":"mdi-menu-right"},null,8,["modelValue","length"])]),_:1})):y("",!0),e(c),(i(!0),I(B,null,re(o(E),(s,D)=>(i(),I(B,null,[D>0?(i(),v(c,{key:0})):y("",!0),e(d,{class:de(W(s))},{default:a(()=>[e(te,null,{default:a(()=>[N(m(s.id)+") "+m(s.message),1)]),_:2},1024),e(le,null,{default:a(()=>[N(m(j(s))+" | "+m(q(s)),1)]),_:2},1024)]),_:2},1032,["class"])],64))),256)),o(C).length===0?(i(),v(d,{key:1},{default:a(()=>[N(m(t.$t("logs.emptyLogList")),1)]),_:1})):y("",!0),e(c),o(p)>1?(i(),v(d,{key:2},{default:a(()=>[e(S,{modelValue:o(r),"onUpdate:modelValue":n[3]||(n[3]=s=>x(r)?r.value=s:null),length:o(p),"prev-icon":"mdi-menu-left","next-icon":"mdi-menu-right"},null,8,["modelValue","length"])]),_:1})):y("",!0)]),_:1})]))}});const Ne=ae(fe,[["__scopeId","data-v-77aed2b3"]]);export{Ne as default};
|
||||
1
qbit/vuetorrent/public/assets/MagnetHandler-CQphCEKc.js
Normal file
1
qbit/vuetorrent/public/assets/MagnetHandler-CQphCEKc.js
Normal file
@@ -0,0 +1 @@
|
||||
import{l as a,m as r,_ as n,__tla as __tla_0}from"./index-bUuJUL5l.js";import{g as u,H as i,S as m,T as p}from"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";let l;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{l=u({__name:"MagnetHandler",setup(d){const o=m(),s=p();return i(async()=>{const e=decodeURIComponent(o.params.url);if(e.startsWith("magnet:")){const t=a();t.isFirstInit=!1,t.pushTorrentToQueue(e),r().createDialog(n,{})}await s.push({name:"dashboard"})}),()=>{}}})});export{l as default,__tla};
|
||||
@@ -1 +0,0 @@
|
||||
import{au as r,v as s,aR as n}from"./index-135ae4c1.js";import{g as u,aa as i,$ as m,M as p}from"./vue-d2584a6d.js";import"./faker-c43f92d4.js";import"./vuetify-e547ef1b.js";const l=u({__name:"MagnetHandler",setup(d){const o=i(),a=m();return p(async()=>{const e=decodeURIComponent(o.params.url);if(e.startsWith("magnet:")){const t=r();t.isFirstInit=!1,t.pushTorrentToQueue(e),s().createDialog(n,{})}await a.push({name:"dashboard"})}),()=>{}}});export{l as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{k as b,h as S,R as D,w as I,y as L,a as O,S as U,T as A,V as q,c as j,d as z,e as G,f as J,O as Q,P as W,g as X,i as B,j as Y,__tla as __tla_0}from"./index-bUuJUL5l.js";import{g as C,$ as Z,I as o,J as s,K as a,X as x,L as c,M as i,O as m,W as g,m as l,Y as F,a0 as K,a1 as N,F as E,a2 as ee,a3 as ae,a4 as oe,G as te,d as T,r as le,c as R,H as se,u as w,N as ne,P as re,Q as de}from"./vue-BSryv7ps.js";let ve,he;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{let ie,ue,me,ce;ie={class:"d-flex"};ue={key:2};me={key:3};ce=C({__name:"RightClickMenuEntry",props:{text:{},icon:{},action:{type:Function},hidden:{type:Boolean},disabled:{type:Boolean},disabledText:{},disabledIcon:{},children:{}},setup(f){const t=f,n=()=>{t.action&&t.action()};return(e,u)=>{const v=Z("RightClickMenuEntry",!0);return e.hidden?m("",!0):(o(),s(L,{key:0,class:"px-3",disabled:e.disabled,onClick:n},{default:a(()=>[x("div",ie,[e.disabled&&e.disabledIcon?(o(),s(b,{key:0,class:"mr-2"},{default:a(()=>[c(i(e.disabledIcon),1)]),_:1})):e.icon?(o(),s(b,{key:1,class:"mr-2"},{default:a(()=>[c(i(e.icon),1)]),_:1})):m("",!0),e.disabled&&e.disabledText?(o(),g("span",ue,i(e.disabledText),1)):(o(),g("span",me,i(e.text),1)),l(S),!e.disabled&&e.children?(o(),s(b,{key:4},{default:a(()=>[c("mdi-chevron-right")]),_:1})):m("",!0)]),e.children?(o(),s(D,{key:0,activator:"parent","open-on-hover":"","open-on-click":"","close-delay":"10","open-delay":"0",location:"right"},{default:a(()=>[l(I,null,{default:a(()=>[(o(!0),g(E,null,F(e.children,h=>(o(),s(v,K(N(h)),null,16))),256))]),_:1})]),_:1})):m("",!0)]),_:1},8,["disabled"]))}}});ve=C({__name:"RightClickMenu",props:ee({menuData:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(f){const t=ae(f,"modelValue");return(n,e)=>t.value?(o(),s(D,{key:0,modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=u=>t.value=u),activator:"parent","close-on-content-click":!0,transition:"slide-y-transition","scroll-strategy":"none"},{default:a(()=>[l(I,null,{default:a(()=>[oe(n.$slots,"top"),(o(!0),g(E,null,F(n.menuData,u=>(o(),s(ce,K(N(u)),null,16))),256))]),_:3})]),_:3},8,["modelValue"])):m("",!0)}});he=C({__name:"MoveTorrentDialog",props:{guid:{},hashes:{},mode:{}},setup(f){const t=f,{isOpened:n}=O(t.guid),{t:e}=te(),u=U(),v=A(),h=T(),_=T(),V=T(!1),y=le({newPath:""}),H=[r=>!!r||e("dialogs.moveTorrent.required")],M=R(()=>t.hashes.map(v.getTorrentByHash)),k=R(()=>{switch(t.mode){case"dl":return M.value[0]?.download_path;case"save":return M.value[0]?.savePath}});async function P(){await h.value?.validate(),V.value&&(await u.toggleAutoTmm(t.hashes,!1),await v.moveTorrents(t.mode,t.hashes,y.newPath),_.value?.saveValueToHistory(),$())}const $=()=>{n.value=!1};return se(()=>{y.newPath=k.value||""}),(r,d)=>(o(),s(Y,{modelValue:w(n),"onUpdate:modelValue":d[3]||(d[3]=p=>de(n)?n.value=p:null)},{default:a(()=>[l(q,null,{default:a(()=>[l(j,null,{default:a(()=>[c(i(r.$t(`dialogs.moveTorrent.${r.mode}.title`)),1)]),_:1}),l(z,null,{default:a(()=>[l(w(G),{modelValue:V.value,"onUpdate:modelValue":d[1]||(d[1]=p=>V.value=p),ref_key:"form",ref:h,onSubmit:d[2]||(d[2]=ne(()=>{},["prevent"]))},{default:a(()=>[k.value?(o(),s(J,{key:0,"model-value":k.value,disabled:"",label:r.$t("dialogs.moveTorrent.oldPath")},null,8,["model-value","label"])):m("",!0),l(Q,{modelValue:y.newPath,"onUpdate:modelValue":d[0]||(d[0]=p=>y.newPath=p),historyKey:w(W).TORRENT_PATH,ref_key:"field",ref:_,rules:H,autofocus:"",label:r.$t("dialogs.moveTorrent.newPath"),onKeydown:re(P,["enter"])},null,8,["modelValue","historyKey","label"])]),_:1},8,["modelValue"])]),_:1}),l(X,null,{default:a(()=>[l(S),l(B,{color:"error",onClick:$},{default:a(()=>[c(i(r.$t("common.cancel")),1)]),_:1}),l(B,{color:"accent",disabled:!V.value,onClick:P},{default:a(()=>[c(i(r.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}})});export{ve as _,he as a,__tla};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as o,__tla as __tla_0}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-CJmQtbIM.js";import"./vue-BSryv7ps.js";import{__tla as __tla_1}from"./index-bUuJUL5l.js";import"./vuetify-i5Qjiq6M.js";let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{});export{o as default,__tla};
|
||||
@@ -0,0 +1 @@
|
||||
import{g as I,G as S,d as u,r as h,H as B,A as g,I as F,J as T,K as n,m as l,L as m,M as f,u as V,N as D,O as x,P as M,Q as O}from"./vue-BSryv7ps.js";import{a as $,b as K,V as U,c as A,d as P,e as R,f as b,g as _,h as j,i as C,j as q,__tla as __tla_0}from"./index-bUuJUL5l.js";let J;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{J=I({__name:"MoveTorrentFileDialog",props:{guid:{},hash:{},isFolder:{type:Boolean},oldName:{}},setup(k){const o=k,{isOpened:r}=$(o.guid),{t:c}=S(),N=K(),p=u(),i=u(),d=u(!1),t=h({newName:""}),y=[e=>!!e||c("dialogs.moveTorrent.required")];async function v(){await p.value?.validate(),d.value&&(o.isFolder?await N.renameTorrentFolder(o.hash,o.oldName,t.newName):await N.renameTorrentFile(o.hash,o.oldName,t.newName),w())}const w=()=>{r.value=!1};return B(()=>{if(t.newName=o.oldName,o.isFolder)g(()=>i.value?.select());else{const e=t.newName.lastIndexOf("/"),a=t.newName.lastIndexOf(".");g(()=>{i.value?.setSelectionRange(e+1,a==-1?t.newName.length:a)})}}),(e,a)=>(F(),T(q,{modelValue:V(r),"onUpdate:modelValue":a[3]||(a[3]=s=>O(r)?r.value=s:null)},{default:n(()=>[l(U,null,{default:n(()=>[l(A,null,{default:n(()=>[m(f(V(c)("dialogs.moveTorrentFile.title",1+Number(e.isFolder))),1)]),_:1}),l(P,null,{default:n(()=>[l(V(R),{modelValue:d.value,"onUpdate:modelValue":a[1]||(a[1]=s=>d.value=s),ref_key:"form",ref:p,onSubmit:a[2]||(a[2]=D(()=>{},["prevent"]))},{default:n(()=>[e.oldName?(F(),T(b,{key:0,"model-value":e.oldName,disabled:"",label:e.$t("dialogs.moveTorrentFile.oldName")},null,8,["model-value","label"])):x("",!0),l(b,{modelValue:t.newName,"onUpdate:modelValue":a[0]||(a[0]=s=>t.newName=s),ref_key:"input",ref:i,rules:y,autofocus:"",label:e.$t("dialogs.moveTorrent.newPath"),onKeydown:M(v,["enter"])},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1}),l(_,null,{default:n(()=>[l(j),l(C,{color:"error",onClick:w},{default:n(()=>[m(f(e.$t("common.cancel")),1)]),_:1}),l(C,{color:"accent",disabled:!d.value,onClick:v},{default:n(()=>[m(f(e.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}})});export{J as _,__tla};
|
||||
@@ -0,0 +1 @@
|
||||
import{g as c,d as r,c as o,I as t,J as d,R as i,K as l,m}from"./vue-BSryv7ps.js";import{k as u,f,__tla as __tla_0}from"./index-bUuJUL5l.js";let _;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{_=c({__name:"PasswordField",props:{hideIcon:{type:Boolean},prependIcon:{}},setup(I){const e=r(!1);function a(){e.value=!e.value}const p=o(()=>e.value?"text":"password"),s=o(()=>e.value?"mdi-eye":"mdi-eye-off");return(n,v)=>(t(),d(f,{name:"password",type:p.value,"append-inner-icon":n.hideIcon?"":s.value,"onClick:appendInner":a},i({_:2},[n.prependIcon?{name:"prepend",fn:l(()=>[m(u,{color:"accent",icon:n.prependIcon},null,8,["icon"])]),key:"0"}:void 0]),1032,["type","append-inner-icon"]))}})});export{_,__tla};
|
||||
@@ -1 +0,0 @@
|
||||
import{g as s,d as r,c as o,a1 as t,a2 as i,au as d,a3 as l,m as u}from"./vue-d2584a6d.js";import{V as m,i as f}from"./index-135ae4c1.js";const h=s({__name:"PasswordField",props:{hideIcon:{type:Boolean},prependIcon:{}},setup(v){const e=r(!1);function a(){e.value=!e.value}const p=o(()=>e.value?"text":"password"),c=o(()=>e.value?"mdi-eye":"mdi-eye-off");return(n,y)=>(t(),i(f,{type:p.value,"append-inner-icon":n.hideIcon?"":c.value,"onClick:appendInner":a},d({_:2},[n.prependIcon?{name:"prepend",fn:l(()=>[u(m,{color:"accent",icon:n.prependIcon},null,8,["icon"])]),key:"0"}:void 0]),1032,["type","append-inner-icon"]))}});export{h as _};
|
||||
@@ -1 +0,0 @@
|
||||
import{g as K,$ as q,K as W,d as Y,r as Z,c as G,M as J,x as O,I as X,a1 as i,a6 as v,m as e,a3 as s,ab as r,Z as u,u as n,a2 as y,D as L,a8 as m,F as S,a7 as ee,a5 as te,W as x,Y as C}from"./vue-d2584a6d.js";import{u as se}from"./ArrayPagination-26934cac.js";import{au as le,v as ae,ah as ne,y as oe,av as ie,q as D,c as $,r as h,k as f,d as p,i as re,a2 as ue,a as N,N as F,a3 as de,aw as ce,ax as me,m as fe,l as pe,f as _e,ad as ve,ae as Ve,g as ge,_ as ke}from"./index-135ae4c1.js";import"./faker-c43f92d4.js";import{d as ye}from"./index-fd06c5c5.js";import"./vuetify-e547ef1b.js";const he={class:"pa-3"},Ae={class:"subtitle-1 ml-2",style:{"font-size":"1.6em !important"}},xe={class:"d-flex justify-end"},Ce={class:"d-flex flex-row align-center justify-center"},we={class:"d-flex"},be={key:0},Re={key:1},Te={class:"d-flex flex-column"},Le=["innerHTML"],Se=K({__name:"RssArticles",setup(De){const I=q(),{t:V}=W(),U=le(),B=ae(),o=ne(),M=oe(),_=Y(!1),g=Z({title:"",content:""}),A=G({get:()=>o.filters.title,set:ye(t=>{o.filters.title=t??""},300)}),k=ie(()=>o.articles.sort((t,a)=>Number(a.parsedDate)-Number(t.parsedDate)),()=>A.value,t=>t.title),{paginatedResults:j,currentPage:c,pageCount:w}=se(k.results,15);function E(t){const a=M.useIdForRssLinks?t.id:t.link;window.open(a,"_blank","noreferrer")}function H(t){t.description&&(g.title=t.title.trim(),g.content=t.description.trim(),_.value=!0)}function P(t){U.pushTorrentToQueue(t.torrentURL)}async function b(t){await o.markArticleAsRead(t.id)}async function Q(){await o.markAllAsRead()}function R(){I.push({name:"dashboard"})}function T(t){if(B.hasActiveDialog||_.value)return!1;t.key==="Escape"&&R()}return J(async()=>{await o.fetchFeeds()}),O(()=>{document.addEventListener("keydown",T)}),X(()=>{document.removeEventListener("keydown",T)}),(t,a)=>(i(),v("div",he,[e(D,{align:"center",justify:"center","no-gutters":""},{default:s(()=>[e(h,null,{default:s(()=>[r("h1",Ae,u(n(V)("rssArticles.title")),1)]),_:1}),e(h,null,{default:s(()=>[r("div",xe,[e(f,{icon:"mdi-close",variant:"plain",onClick:R})])]),_:1})]),_:1}),e($,null,{default:s(()=>[e(p,null,{default:s(()=>[e(D,null,{default:s(()=>[e(h,{cols:"12"},{default:s(()=>[e(re,{modelValue:A.value,"onUpdate:modelValue":a[0]||(a[0]=l=>A.value=l),label:t.$t("rssArticles.filters.title"),clearable:"","hide-details":""},null,8,["modelValue","label"])]),_:1}),e(h,{cols:"12"},{default:s(()=>[r("div",Ce,[e(ue,{modelValue:n(o).filters.unread,"onUpdate:modelValue":a[1]||(a[1]=l=>n(o).filters.unread=l),label:t.$t("rssArticles.filters.unread"),"hide-details":""},null,8,["modelValue","label"]),e(N),e(f,{text:t.$t("rssArticles.markAllAsRead"),color:"primary",onClick:Q},null,8,["text"])])]),_:1})]),_:1})]),_:1}),n(k).results.value.length?(i(),y(p,{key:0},{default:s(()=>[e(F,{modelValue:n(c),"onUpdate:modelValue":a[2]||(a[2]=l=>L(c)?c.value=l:null),length:n(w),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left"},null,8,["modelValue","length"])]),_:1})):m("",!0),e(p,null,{default:s(()=>[e($,null,{default:s(()=>[(i(!0),v(S,null,ee(n(j),(l,z)=>(i(),v(S,null,[z>0?(i(),y(de,{key:0,color:"white"})):m("",!0),e(p,{class:te({"rss-read":l.isRead}),onClick:d=>H(l),onContextmenu:d=>b(l)},{default:s(()=>[r("div",we,[r("div",null,[e(ce,{class:"wrap-anywhere",style:{"white-space":"unset"}},{default:s(()=>[x(u(l.title),1)]),_:2},1024),e(me,{class:"d-block"},{default:s(()=>[r("div",null,u(l.parsedDate.toLocaleString()),1),r("div",null,u(n(V)("rssArticles.item.feedName",{name:n(o).getFeedNames(l.id).join(" | ")})),1),l.author?(i(),v("div",be,u(n(V)("rssArticles.item.author",{author:l.author})),1)):m("",!0),l.category?(i(),v("div",Re,u(n(V)("rssArticles.item.category",{category:l.category})),1)):m("",!0)]),_:2},1024)]),e(N),r("div",Te,[e(f,{icon:"mdi-open-in-new",variant:"text",onClick:C(d=>E(l),["stop"])},null,8,["onClick"]),e(f,{color:"accent",icon:"mdi-check",variant:"text",onClick:C(d=>b(l),["stop"])},null,8,["onClick"]),e(f,{icon:"mdi-download",variant:"text",onClick:C(d=>P(l),["stop"])},null,8,["onClick"])])]),e(fe,{modelValue:_.value,"onUpdate:modelValue":a[4]||(a[4]=d=>_.value=d)},{default:s(()=>[e(pe,null,{default:s(()=>[e(_e,null,{default:s(()=>[e(ve,{color:"transparent"},{default:s(()=>[e(Ve,null,{default:s(()=>[x(u(g.title),1)]),_:1}),e(f,{icon:"mdi-close",onClick:a[3]||(a[3]=d=>_.value=!1)})]),_:1})]),_:1}),e(ge,null,{default:s(()=>[r("div",{class:"description-container",innerHTML:g.content},null,8,Le)]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:2},1032,["class","onClick","onContextmenu"])],64))),256)),n(k).results.value.length===0?(i(),y(p,{key:0},{default:s(()=>[x(u(t.$t("common.emptyList")),1)]),_:1})):m("",!0)]),_:1})]),_:1}),n(k).results.value.length?(i(),y(p,{key:1},{default:s(()=>[e(F,{modelValue:n(c),"onUpdate:modelValue":a[5]||(a[5]=l=>L(c)?c.value=l:null),length:n(w),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left"},null,8,["modelValue","length"])]),_:1})):m("",!0)]),_:1})]))}});const Me=ke(Se,[["__scopeId","data-v-87c5959f"]]);export{Me as default};
|
||||
1
qbit/vuetorrent/public/assets/RssArticles-CIWwO8pI.js
Normal file
1
qbit/vuetorrent/public/assets/RssArticles-CIWwO8pI.js
Normal file
@@ -0,0 +1 @@
|
||||
import{g as z,G as K,d as W,r as X,c as Y,H as Z,x as G,V as J,I as r,W as v,m as e,K as s,T as O,X as i,M as u,u as o,J as h,Q as R,O as c,F as S,Y as q,Z as ee,L as b,N as x}from"./vue-BSryv7ps.js";import{u as te,__tla as __tla_0}from"./ArrayPagination-DuWOkPss.js";import{l as le,m as se,U as ne,r as oe,s as ae,v as $,w as D,j as re,x as y,i as m,y as f,f as ie,W as ue,h as N,C as I,B as de,X as ce,Y as me,V as fe,c as pe,Z as ve,$ as Ve,d as _e,I as ge,__tla as __tla_1}from"./index-bUuJUL5l.js";import{d as ke}from"./index-BIiPWG4K.js";import"./vuetify-i5Qjiq6M.js";let Be;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{let he,ye,Ce,be,xe,Ae,we,Te,Le,Re;he={class:"pa-3"};ye={class:"subtitle-1 ml-2",style:{"font-size":"1.6em !important"}};Ce={class:"d-flex justify-end"};be={class:"d-flex flex-row align-center justify-center"};xe={class:"d-flex"};Ae={key:0};we={key:1};Te={class:"d-flex flex-column"};Le=["innerHTML"];Re=z({__name:"RssArticles",setup(Se){const U=O(),{t:V}=K(),B=le(),F=se(),a=ne(),M=oe(),p=W(!1),_=X({title:"",content:""}),C=Y({get:()=>a.filters.title,set:ke(l=>{a.filters.title=l??""},300)}),g=ae(()=>a.articles.sort((l,n)=>Number(n.parsedDate)-Number(l.parsedDate)),()=>C.value,l=>l.title),{paginatedResults:j,currentPage:d,pageCount:A}=te(g.results,15);function E(l){const n=M.useIdForRssLinks?l.id:l.link;window.open(n,"_blank","noreferrer")}function H(l){l.description&&(_.title=l.title.trim(),_.content=l.description.trim(),p.value=!0)}function Q(l){B.pushTorrentToQueue(l.torrentURL)}async function w(l){await a.markArticleAsRead(l.id)}function T(){U.push({name:"dashboard"})}function L(l){if(F.hasActiveDialog||p.value)return!1;l.key==="Escape"&&T()}return Z(async()=>{await a.fetchFeeds()}),G(()=>{document.addEventListener("keydown",L)}),J(()=>{document.removeEventListener("keydown",L)}),(l,n)=>(r(),v("div",he,[e($,{align:"center",justify:"center","no-gutters":""},{default:s(()=>[e(y,null,{default:s(()=>[i("h1",ye,u(o(V)("rssArticles.title")),1)]),_:1}),e(y,null,{default:s(()=>[i("div",Ce,[e(m,{icon:"mdi-close",variant:"plain",onClick:T})])]),_:1})]),_:1}),e(D,null,{default:s(()=>[e(f,null,{default:s(()=>[e($,null,{default:s(()=>[e(y,{cols:"12"},{default:s(()=>[e(ie,{modelValue:C.value,"onUpdate:modelValue":n[0]||(n[0]=t=>C.value=t),label:l.$t("rssArticles.filters.title"),clearable:"","hide-details":""},null,8,["modelValue","label"])]),_:1}),e(y,{cols:"12"},{default:s(()=>[i("div",be,[e(ue,{modelValue:o(a).filters.unread,"onUpdate:modelValue":n[1]||(n[1]=t=>o(a).filters.unread=t),label:l.$t("rssArticles.filters.unread"),"hide-details":""},null,8,["modelValue","label"]),e(N),e(m,{disabled:o(a).unreadArticles.length===0,text:l.$t("rssArticles.markAllAsRead"),color:"primary",onClick:n[2]||(n[2]=t=>o(a).markAllAsRead())},null,8,["disabled","text"])])]),_:1})]),_:1})]),_:1}),o(g).results.value.length?(r(),h(f,{key:0},{default:s(()=>[e(I,{modelValue:o(d),"onUpdate:modelValue":n[3]||(n[3]=t=>R(d)?d.value=t:null),length:o(A),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left"},null,8,["modelValue","length"])]),_:1})):c("",!0),e(f,null,{default:s(()=>[e(D,null,{default:s(()=>[(r(!0),v(S,null,q(o(j),(t,P)=>(r(),v(S,null,[P>0?(r(),h(de,{key:0,color:"white"})):c("",!0),e(f,{class:ee({"rss-read":t.isRead}),onClick:k=>H(t),onContextmenu:k=>w(t)},{default:s(()=>[i("div",xe,[i("div",null,[e(ce,{class:"wrap-anywhere",style:{"white-space":"unset"}},{default:s(()=>[b(u(t.title),1)]),_:2},1024),e(me,{class:"d-block"},{default:s(()=>[i("div",null,u(t.parsedDate.toLocaleString()),1),i("div",null,u(o(V)("rssArticles.item.feedName",{name:o(a).getFeedNames(t.id).join(" | ")})),1),t.author?(r(),v("div",Ae,u(o(V)("rssArticles.item.author",{author:t.author})),1)):c("",!0),t.category?(r(),v("div",we,u(o(V)("rssArticles.item.category",{category:t.category})),1)):c("",!0)]),_:2},1024)]),e(N),i("div",Te,[e(m,{icon:"mdi-open-in-new",variant:"text",onClick:x(k=>E(t),["stop"])},null,8,["onClick"]),e(m,{color:"accent",icon:"mdi-check",variant:"text",onClick:x(k=>w(t),["stop"])},null,8,["onClick"]),e(m,{icon:"mdi-download",variant:"text",onClick:x(k=>Q(t),["stop"])},null,8,["onClick"])])])]),_:2},1032,["class","onClick","onContextmenu"])],64))),256)),o(g).results.value.length===0?(r(),h(f,{key:0},{default:s(()=>[b(u(l.$t("common.emptyList")),1)]),_:1})):c("",!0)]),_:1})]),_:1}),o(g).results.value.length?(r(),h(f,{key:1},{default:s(()=>[e(I,{modelValue:o(d),"onUpdate:modelValue":n[4]||(n[4]=t=>R(d)?d.value=t:null),length:o(A),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left"},null,8,["modelValue","length"])]),_:1})):c("",!0)]),_:1}),e(re,{modelValue:p.value,"onUpdate:modelValue":n[6]||(n[6]=t=>p.value=t)},{default:s(()=>[e(fe,null,{default:s(()=>[e(pe,null,{default:s(()=>[e(ve,{color:"transparent"},{default:s(()=>[e(Ve,null,{default:s(()=>[b(u(_.title),1)]),_:1}),e(m,{icon:"mdi-close",onClick:n[5]||(n[5]=t=>p.value=!1)})]),_:1})]),_:1}),e(_e,null,{default:s(()=>[i("div",{class:"description-container",innerHTML:_.content},null,8,Le)]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}});Be=ge(Re,[["__scopeId","data-v-77fbfd3e"]])});export{Be as default,__tla};
|
||||
@@ -1 +0,0 @@
|
||||
.rss-read.v-theme--darkTheme[data-v-87c5959f]{color:#b6b6b6!important}.rss-read.v-theme--lightTheme[data-v-87c5959f]{color:gray!important}.description-container[data-v-87c5959f]{border:solid red 5px}.description-container img{max-width:100%;height:auto}
|
||||
1
qbit/vuetorrent/public/assets/RssArticles-pvDBA3Tz.css
Normal file
1
qbit/vuetorrent/public/assets/RssArticles-pvDBA3Tz.css
Normal file
@@ -0,0 +1 @@
|
||||
.rss-read.v-theme--darkTheme[data-v-77fbfd3e]{color:#b6b6b6!important}.rss-read.v-theme--lightTheme[data-v-77fbfd3e]{color:gray!important}.description-container[data-v-77fbfd3e]{border:solid red 5px}.description-container img{max-width:100%;height:auto}
|
||||
1
qbit/vuetorrent/public/assets/SearchEngine-BYYedXLi.js
Normal file
1
qbit/vuetorrent/public/assets/SearchEngine-BYYedXLi.js
Normal file
@@ -0,0 +1 @@
|
||||
import{g as Y,G as W,d as h,I as S,J as $,K as l,m as e,X as C,M as m,n as se,L as E,u as p,N as B,Q as ie,_ as oe,c as A,H as re,q as ue,W as H,T as ce,F as de,Y as fe,P as ge}from"./vue-BSryv7ps.js";import{a as me,J as X,V as j,c as pe,h as M,i as c,j as F,d as Q,e as ve,f as Z,g as O,K as ee,A as he,k as ye,l as Ve,m as ke,r as be,s as Ee,v as T,w as Se,x as b,o as we,M as Ce,N as _e,y as G,O as Pe,P as Te,z as J,B as $e,Q as Me,__tla as __tla_0}from"./index-bUuJUL5l.js";import"./vuetify-i5Qjiq6M.js";let ze;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{let Ne,Ie,De,Ue,qe;Ne=["href","title"];Ie=Y({__name:"PluginManagerDialog",props:{guid:{}},setup(R){const N=R,{isOpened:t}=me(N.guid),{t:y}=W(),d=X(),f=[{title:y("dialogs.pluginManager.headers.enabled"),key:"enabled",sortable:!1},{title:y("dialogs.pluginManager.headers.name"),key:"fullName"},{title:y("dialogs.pluginManager.headers.version"),key:"version"},{title:y("dialogs.pluginManager.headers.url"),key:"url"},{title:y("dialogs.pluginManager.headers.actions"),key:"actions"}],V=h(!1),k=h(!1),w=h(!1),v=h(!1),u=h("");async function I(r){await d.toggleSearchPlugin(r),await d.fetchSearchPlugins()}async function _(){k.value=!0,await d.updatePlugins().then(()=>new Promise(r=>setTimeout(r,2e3))),await d.fetchSearchPlugins(),k.value=!1}async function D(){P(),V.value=!0,await d.installSearchPlugin(u.value),u.value="",setTimeout(()=>{d.fetchSearchPlugins().then(()=>{V.value=!1})},1e3)}async function U(r){V.value=!0,await d.uninstallSearchPlugin(r.name),await d.fetchSearchPlugins(),V.value=!1}const i=()=>{t.value=!1};function P(){w.value=!1}return(r,g)=>(S(),$(F,{modelValue:p(t),"onUpdate:modelValue":g[4]||(g[4]=n=>ie(t)?t.value=n:null)},{default:l(()=>[e(j,null,{default:l(()=>[e(pe,{class:"d-flex"},{default:l(()=>[C("div",null,m(r.$t("dialogs.pluginManager.title")),1),e(M),e(c,{text:r.$t("dialogs.pluginManager.update"),color:"accent",class:"mr-2",loading:k.value,onClick:_},null,8,["text","loading"]),e(F,{modelValue:w.value,"onUpdate:modelValue":g[3]||(g[3]=n=>w.value=n)},{activator:l(({props:n})=>[e(c,se(n,{color:"primary"}),{default:l(()=>[E(m(r.$t("dialogs.pluginManager.install.activator")),1)]),_:2},1040)]),default:l(()=>[e(j,{title:r.$t("dialogs.pluginManager.install.title")},{default:l(()=>[e(Q,null,{default:l(()=>[e(p(ve),{modelValue:v.value,"onUpdate:modelValue":g[1]||(g[1]=n=>v.value=n),onSubmit:g[2]||(g[2]=B(()=>{},["prevent"]))},{default:l(()=>[e(Z,{modelValue:u.value,"onUpdate:modelValue":g[0]||(g[0]=n=>u.value=n),autofocus:"",label:r.$t("dialogs.pluginManager.install.label")},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1}),e(O,null,{default:l(()=>[e(M),e(c,{color:"error",onClick:P},{default:l(()=>[E(m(r.$t("common.cancel")),1)]),_:1}),e(c,{color:"accent",onClick:D},{default:l(()=>[E(m(r.$t("common.ok")),1)]),_:1})]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1}),e(Q,null,{default:l(()=>[e(ee,{headers:f,"items-per-page":"-1",items:p(d).searchPlugins,"sort-by":[{key:"fullName",order:"asc"}],loading:V.value},{"item.enabled":l(({item:n})=>[e(he,{"model-value":n.enabled,onClick:q=>I(n)},null,8,["model-value","onClick"])]),"item.url":l(({item:n})=>[C("a",{href:n.url,title:n.name},m(n.url),9,Ne)]),"item.actions":l(({item:n})=>[e(ye,{color:"red",icon:"mdi-delete",onClick:q=>U(n)},null,8,["onClick"])]),tfoot:l(()=>[]),_:1},8,["items","loading"])]),_:1}),e(O,null,{default:l(()=>[e(M),e(c,{color:"accent",onClick:i},{default:l(()=>[E(m(r.$t("common.close")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});De={class:"pa-3"};Ue={style:{"font-size":"1.6em !important"},class:"subtitle-1 ml-2"};qe={class:"d-flex justify-end"};ze=Y({__name:"SearchEngine",setup(R){const N=ce(),{t}=W(),y=Ve(),d=ke(),f=X(),V=be(),k=h(),w=h(!1),v=h(0),{searchData:u}=oe(f),I=[{title:t("searchEngine.headers.fileName"),key:"fileName"},{title:t("searchEngine.headers.fileSize"),key:"fileSize"},{title:t("searchEngine.headers.nbSeeders"),key:"nbSeeders"},{title:t("searchEngine.headers.nbLeechers"),key:"nbLeechers"},{title:t("searchEngine.headers.siteUrl"),key:"siteUrl"},{title:"",key:"actions",sortable:!1}],_=[{title:t("searchEngine.filters.category.movies"),value:"movies"},{title:t("searchEngine.filters.category.tv"),value:"tv"},{title:t("searchEngine.filters.category.music"),value:"music"},{title:t("searchEngine.filters.category.games"),value:"games"},{title:t("searchEngine.filters.category.anime"),value:"anime"},{title:t("searchEngine.filters.category.software"),value:"software"},{title:t("searchEngine.filters.category.pictures"),value:"pictures"},{title:t("searchEngine.filters.category.books"),value:"books"}];_.sort((a,o)=>a.title.localeCompare(o.title));const D=[{title:t("searchEngine.filters.category.all"),value:"all"},..._],U=A(()=>{const a=[{title:t("searchEngine.filters.plugins.all"),value:"all"},{title:t("searchEngine.filters.plugins.enabled"),value:"enabled"}];return f.searchPlugins.filter(o=>o.enabled).forEach(o=>{a.push({title:o.name,value:o.name})}),a}),i=A(()=>u.value[v.value]??{}),{results:P}=Ee(()=>i.value.results,()=>i.value.filters?.title,a=>a.fileName);function r(){f.createNewTab(),v.value=u.value.length-1,k.value?.focus()}function g(){u.value.length!==1&&(f.deleteTab(i.value.uniqueId),v.value=Math.min(v.value,u.value.length-1))}function n(a){y.pushTorrentToQueue(a.fileUrl)}function q(a){window.open(a.descrLink,"_blank","noreferrer")}async function z(){await f.runNewSearch(i.value),i.value.timer=setInterval(()=>ae(i.value),1e3),k.value?.saveValueToHistory()}async function L(a){await f.stopSearch(a),a.timer&&clearInterval(a.timer)}function le(){u.value.forEach(L)}async function ae(a){await f.refreshResults(a)==="Stopped"&&await L(a)}const K=()=>{N.push({name:"dashboard"})};function te(){d.createDialog(Ie)}function x(a){if(d.hasActiveDialog||w.value)return!1;a.key==="Escape"&&K()}return re(async()=>{document.addEventListener("keydown",x),u.value.length===0?f.createNewTab():u.value.forEach(a=>{a.id&&a.id!==0&&(a.timer=setInterval(()=>f.refreshResults(a),1e3))}),await f.fetchSearchPlugins()}),ue(()=>{document.removeEventListener("keydown",x),u.value.forEach(a=>{a.timer&&clearInterval(a.timer)})}),(a,o)=>(S(),H("div",De,[e(T,{"no-gutters":"",align:"center",justify:"center"},{default:l(()=>[e(b,null,{default:l(()=>[C("h1",Ue,m(p(t)("searchEngine.title")),1)]),_:1}),e(b,null,{default:l(()=>[C("div",qe,[e(c,{icon:"mdi-stop",variant:"plain",color:"error",onClick:le}),e(c,{icon:"mdi-toy-brick",variant:"plain",color:"primary",onClick:te}),e(c,{icon:"mdi-close",variant:"plain",onClick:K})])]),_:1})]),_:1}),e(T,{class:"ma-0 pa-0"},{default:l(()=>[e(we,{class:"d-flex align-center justify-center ma-0 pa-0 bg-primary",fluid:""},{default:l(()=>[e(Ce,{modelValue:v.value,"onUpdate:modelValue":o[0]||(o[0]=s=>v.value=s),class:"overflow-auto","bg-color":"primary","show-arrows":""},{default:l(()=>[(S(!0),H(de,null,fe(p(u),s=>(S(),$(_e,{key:s.uniqueId},{default:l(()=>[C("h4",null,m(!s.query||s.query.length===0?a.$t("searchEngine.tabHeaderEmpty"):s.query),1)]),_:2},1024))),128))]),_:1},8,["modelValue"]),e(M),e(c,{icon:"mdi-plus-circle-outline",variant:"plain",color:"accent",onClick:r}),e(c,{icon:"mdi-minus-circle-outline",variant:"plain",color:"error",disabled:p(u).length===1,onClick:g},null,8,["disabled"])]),_:1})]),_:1}),e(Se,null,{default:l(()=>[e(G,null,{default:l(()=>[e(T,{class:"mt-1"},{default:l(()=>[e(b,{cols:"12",md:"6"},{default:l(()=>[e(Pe,{modelValue:i.value.query,"onUpdate:modelValue":o[1]||(o[1]=s=>i.value.query=s),"history-key":p(Te).SEARCH_ENGINE_QUERY,ref_key:"queryInput",ref:k,autofocus:"",density:"compact","hide-details":"",clearable:"",label:a.$t("searchEngine.query"),onKeydown:ge(B(z,["prevent"]),["enter"])},null,8,["modelValue","history-key","label","onKeydown"])]),_:1}),e(b,{cols:"6",sm:"5",md:"2"},{default:l(()=>[e(J,{modelValue:i.value.filters.category,"onUpdate:modelValue":o[2]||(o[2]=s=>i.value.filters.category=s),height:"1",variant:"outlined",density:"compact","hide-details":"",items:D,label:a.$t("searchEngine.filters.category.label")},null,8,["modelValue","label"])]),_:1}),e(b,{cols:"6",sm:"5",md:"2"},{default:l(()=>[e(J,{modelValue:i.value.filters.plugin,"onUpdate:modelValue":o[3]||(o[3]=s=>i.value.filters.plugin=s),flat:"",density:"compact","hide-details":"",variant:"outlined",items:U.value,label:a.$t("searchEngine.filters.plugins.label")},null,8,["modelValue","items","label"])]),_:1}),e(b,{cols:"12",sm:"2",class:"d-flex align-center justify-center"},{default:l(()=>[i.value.id===0?(S(),$(c,{key:0,color:"accent",flat:"",class:"mx-auto px-4",onClick:z},{default:l(()=>[E(m(a.$t("searchEngine.runSearch")),1)]),_:1})):(S(),$(c,{key:1,color:"warning",flat:"",class:"mx-auto px-4",onClick:o[4]||(o[4]=s=>L(i.value))},{default:l(()=>[E(m(a.$t("searchEngine.stopSearch")),1)]),_:1}))]),_:1})]),_:1})]),_:1}),e($e,{class:"my-3"}),e(G,{class:"text-select"},{default:l(()=>[e(ee,{headers:I,items:p(P),"footer-props":{itemsPerPageOptions:[10,25,50,100,-1]},"items-per-page":i.value.itemsPerPage},{top:l(()=>[e(T,null,{default:l(()=>[e(b,{cols:"12"},{default:l(()=>[e(Z,{modelValue:i.value.filters.title,"onUpdate:modelValue":o[5]||(o[5]=s=>i.value.filters.title=s),density:"compact","hide-details":"",label:a.$t("searchEngine.filters.title.label")},null,8,["modelValue","label"])]),_:1})]),_:1})]),"item.fileSize":l(({item:s})=>[E(m(p(Me)(s.fileSize,p(V).useBinarySize)),1)]),"item.actions":l(({item:s})=>[e(c,{icon:"mdi-open-in-new",variant:"flat",density:"compact",onClick:B(ne=>q(s),["stop"])},null,8,["onClick"]),e(c,{icon:"mdi-download",variant:"flat",density:"compact",onClick:ne=>n(s)},null,8,["onClick"])]),_:1},8,["items","items-per-page"])]),_:1})]),_:1})]))}})});export{ze as default,__tla};
|
||||
@@ -1 +0,0 @@
|
||||
import{g as Y,K as G,d as h,a1 as S,a2 as M,a3 as a,m as e,ab as C,Z as m,n as te,W as E,u as v,Y as J,D as ne,$ as se,a0 as ie,c as K,M as oe,q as re,a6 as j,F as ue,a7 as ce,ao as de}from"./vue-d2584a6d.js";import{u as fe,aB as W,l as A,f as ge,a as D,k as c,m as F,g as H,h as me,i as Z,j as x,ag as X,s as ve,V as pe,au as he,v as ye,y as Ve,av as ke,q as $,c as be,r as b,af as Ee,ar as Se,as as we,d as O,aC as Ce,aD as _e,a1 as Q,a3 as Te,J as Pe}from"./index-135ae4c1.js";import"./faker-c43f92d4.js";import"./vuetify-e547ef1b.js";const $e=["href","title"],Me=Y({__name:"PluginManagerDialog",props:{guid:{}},setup(R){const I=R,{isOpened:t}=fe(I.guid),{t:y}=G(),d=W(),f=[{title:y("dialogs.pluginManager.headers.enabled"),key:"enabled",sortable:!1},{title:y("dialogs.pluginManager.headers.name"),key:"fullName"},{title:y("dialogs.pluginManager.headers.version"),key:"version"},{title:y("dialogs.pluginManager.headers.url"),key:"url"},{title:y("dialogs.pluginManager.headers.actions"),key:"actions"}],V=h(!1),k=h(!1),w=h(!1),p=h(!1),u=h("");async function N(r){await d.toggleSearchPlugin(r),await d.fetchSearchPlugins()}async function _(){k.value=!0,await d.updatePlugins().then(()=>new Promise(r=>setTimeout(r,2e3))),await d.fetchSearchPlugins(),k.value=!1}async function U(){T(),V.value=!0,await d.installSearchPlugin(u.value),u.value="",setTimeout(()=>{d.fetchSearchPlugins().then(()=>{V.value=!1})},1e3)}async function q(r){V.value=!0,await d.uninstallSearchPlugin(r.name),await d.fetchSearchPlugins(),V.value=!1}const s=()=>{t.value=!1};function T(){w.value=!1}return(r,g)=>(S(),M(F,{modelValue:v(t),"onUpdate:modelValue":g[4]||(g[4]=n=>ne(t)?t.value=n:null)},{default:a(()=>[e(A,null,{default:a(()=>[e(ge,{class:"d-flex"},{default:a(()=>[C("div",null,m(r.$t("dialogs.pluginManager.title")),1),e(D),e(c,{text:r.$t("dialogs.pluginManager.update"),color:"accent",class:"mr-2",loading:k.value,onClick:_},null,8,["text","loading"]),e(F,{modelValue:w.value,"onUpdate:modelValue":g[3]||(g[3]=n=>w.value=n)},{activator:a(({props:n})=>[e(c,te(n,{color:"primary"}),{default:a(()=>[E(m(r.$t("dialogs.pluginManager.install.activator")),1)]),_:2},1040)]),default:a(()=>[e(A,{title:r.$t("dialogs.pluginManager.install.title")},{default:a(()=>[e(H,null,{default:a(()=>[e(v(me),{modelValue:p.value,"onUpdate:modelValue":g[1]||(g[1]=n=>p.value=n),onSubmit:g[2]||(g[2]=J(()=>{},["prevent"]))},{default:a(()=>[e(Z,{modelValue:u.value,"onUpdate:modelValue":g[0]||(g[0]=n=>u.value=n),autofocus:"",label:r.$t("dialogs.pluginManager.install.label")},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1}),e(x,null,{default:a(()=>[e(D),e(c,{color:"error",onClick:T},{default:a(()=>[E(m(r.$t("common.cancel")),1)]),_:1}),e(c,{color:"accent",onClick:U},{default:a(()=>[E(m(r.$t("common.ok")),1)]),_:1})]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1}),e(H,null,{default:a(()=>[e(X,{headers:f,"items-per-page":"-1",items:v(d).searchPlugins,"sort-by":[{key:"fullName",order:"asc"}],loading:V.value},{"item.enabled":a(({item:n})=>[e(ve,{"model-value":n.enabled,onClick:P=>N(n)},null,8,["model-value","onClick"])]),"item.url":a(({item:n})=>[C("a",{href:n.url,title:n.name},m(n.url),9,$e)]),"item.actions":a(({item:n})=>[e(pe,{color:"red",icon:"mdi-delete",onClick:P=>q(n)},null,8,["onClick"])]),tfoot:a(()=>[]),_:1},8,["items","loading"])]),_:1}),e(x,null,{default:a(()=>[e(D),e(c,{color:"accent",onClick:s},{default:a(()=>[E(m(r.$t("common.close")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),De={class:"pa-3"},Ie={style:{"font-size":"1.6em !important"},class:"subtitle-1 ml-2"},Ne={class:"d-flex justify-end"},ze=Y({__name:"SearchEngine",setup(R){const I=se(),{t}=G(),y=he(),d=ye(),f=W(),V=Ve(),k=h(),w=h(!1),p=h(0),{searchData:u}=ie(f),N=[{title:t("searchEngine.headers.fileName"),key:"fileName"},{title:t("searchEngine.headers.fileSize"),key:"fileSize"},{title:t("searchEngine.headers.nbSeeders"),key:"nbSeeders"},{title:t("searchEngine.headers.nbLeechers"),key:"nbLeechers"},{title:t("searchEngine.headers.siteUrl"),key:"siteUrl"},{title:"",key:"actions",sortable:!1}],_=[{title:t("searchEngine.filters.category.movies"),value:"movies"},{title:t("searchEngine.filters.category.tv"),value:"tv"},{title:t("searchEngine.filters.category.music"),value:"music"},{title:t("searchEngine.filters.category.games"),value:"games"},{title:t("searchEngine.filters.category.anime"),value:"anime"},{title:t("searchEngine.filters.category.software"),value:"software"},{title:t("searchEngine.filters.category.pictures"),value:"pictures"},{title:t("searchEngine.filters.category.books"),value:"books"}];_.sort((l,i)=>l.title.localeCompare(i.title));const U=[{title:t("searchEngine.filters.category.all"),value:"all"},..._],q=K(()=>{const l=[{title:t("searchEngine.filters.plugins.all"),value:"all"},{title:t("searchEngine.filters.plugins.enabled"),value:"enabled"}];return f.searchPlugins.filter(i=>i.enabled).forEach(i=>{l.push({title:i.name,value:i.name})}),l}),s=K(()=>u.value[p.value]??{}),{results:T}=ke(()=>s.value.results,()=>s.value.filters?.title,l=>l.fileName);function r(){f.createNewTab(),p.value=u.value.length-1,k.value?.focus()}function g(){u.value.length!==1&&(f.deleteTab(s.value.uniqueId),p.value=Math.min(p.value,u.value.length-1))}function n(l){y.pushTorrentToQueue(l.fileUrl)}async function P(){await f.runNewSearch(s.value),s.value.timer=setInterval(()=>ae(s.value),1e3),k.value?.saveValueToHistory()}async function B(l){await f.stopSearch(l),l.timer&&clearInterval(l.timer)}function ee(){u.value.forEach(B)}async function ae(l){await f.refreshResults(l)==="Stopped"&&await B(l)}const L=()=>{I.push({name:"dashboard"})};function le(){d.createDialog(Me)}function z(l){if(d.hasActiveDialog||w.value)return!1;l.key==="Escape"&&L()}return oe(async()=>{document.addEventListener("keydown",z),u.value.length===0?f.createNewTab():u.value.forEach(l=>{l.id&&l.id!==0&&(l.timer=setInterval(()=>f.refreshResults(l),1e3))}),await f.fetchSearchPlugins()}),re(()=>{document.removeEventListener("keydown",z),u.value.forEach(l=>{l.timer&&clearInterval(l.timer)})}),(l,i)=>(S(),j("div",De,[e($,{"no-gutters":"",align:"center",justify:"center"},{default:a(()=>[e(b,null,{default:a(()=>[C("h1",Ie,m(v(t)("searchEngine.title")),1)]),_:1}),e(b,null,{default:a(()=>[C("div",Ne,[e(c,{icon:"mdi-stop",variant:"plain",color:"error",onClick:ee}),e(c,{icon:"mdi-toy-brick",variant:"plain",color:"primary",onClick:le}),e(c,{icon:"mdi-close",variant:"plain",onClick:L})])]),_:1})]),_:1}),e($,{class:"ma-0 pa-0"},{default:a(()=>[e(Ee,{class:"d-flex align-center justify-center ma-0 pa-0 bg-primary",fluid:""},{default:a(()=>[e(Se,{modelValue:p.value,"onUpdate:modelValue":i[0]||(i[0]=o=>p.value=o),class:"overflow-auto","bg-color":"primary","show-arrows":""},{default:a(()=>[(S(!0),j(ue,null,ce(v(u),o=>(S(),M(we,{key:o.uniqueId},{default:a(()=>[C("h4",null,m(!o.query||o.query.length===0?l.$t("searchEngine.tabHeaderEmpty"):o.query),1)]),_:2},1024))),128))]),_:1},8,["modelValue"]),e(D),e(c,{icon:"mdi-plus-circle-outline",variant:"plain",color:"accent",onClick:r}),e(c,{icon:"mdi-minus-circle-outline",variant:"plain",color:"error",disabled:v(u).length===1,onClick:g},null,8,["disabled"])]),_:1})]),_:1}),e(be,null,{default:a(()=>[e(O,null,{default:a(()=>[e($,{class:"mt-1"},{default:a(()=>[e(b,{cols:"12",md:"6"},{default:a(()=>[e(Ce,{modelValue:s.value.query,"onUpdate:modelValue":i[1]||(i[1]=o=>s.value.query=o),"history-key":v(_e).SEARCH_ENGINE_QUERY,ref_key:"queryInput",ref:k,autofocus:"",density:"compact","hide-details":"",clearable:"",label:l.$t("searchEngine.query"),onKeydown:de(J(P,["prevent"]),["enter"])},null,8,["modelValue","history-key","label","onKeydown"])]),_:1}),e(b,{cols:"6",sm:"5",md:"2"},{default:a(()=>[e(Q,{modelValue:s.value.filters.category,"onUpdate:modelValue":i[2]||(i[2]=o=>s.value.filters.category=o),height:"1",variant:"outlined",density:"compact","hide-details":"",items:U,label:l.$t("searchEngine.filters.category.label")},null,8,["modelValue","label"])]),_:1}),e(b,{cols:"6",sm:"5",md:"2"},{default:a(()=>[e(Q,{modelValue:s.value.filters.plugin,"onUpdate:modelValue":i[3]||(i[3]=o=>s.value.filters.plugin=o),flat:"",density:"compact","hide-details":"",variant:"outlined",items:q.value,label:l.$t("searchEngine.filters.plugins.label")},null,8,["modelValue","items","label"])]),_:1}),e(b,{cols:"12",sm:"2",class:"d-flex align-center justify-center"},{default:a(()=>[s.value.id===0?(S(),M(c,{key:0,color:"accent",flat:"",class:"mx-auto px-4",onClick:P},{default:a(()=>[E(m(l.$t("searchEngine.runSearch")),1)]),_:1})):(S(),M(c,{key:1,color:"warning",flat:"",class:"mx-auto px-4",onClick:i[4]||(i[4]=o=>B(s.value))},{default:a(()=>[E(m(l.$t("searchEngine.stopSearch")),1)]),_:1}))]),_:1})]),_:1})]),_:1}),e(Te,{class:"my-3"}),e(O,null,{default:a(()=>[e(X,{headers:N,items:v(T),"footer-props":{itemsPerPageOptions:[10,25,50,100,-1]},"items-per-page":s.value.itemsPerPage},{top:a(()=>[e($,null,{default:a(()=>[e(b,{cols:"12"},{default:a(()=>[e(Z,{modelValue:s.value.filters.title,"onUpdate:modelValue":i[5]||(i[5]=o=>s.value.filters.title=o),density:"compact","hide-details":"",label:l.$t("searchEngine.filters.title.label")},null,8,["modelValue","label"])]),_:1})]),_:1})]),"item.fileSize":a(({item:o})=>[E(m(v(Pe)(o.fileSize,v(V).useBinarySize)),1)]),"item.actions":a(({item:o})=>[e(c,{icon:"mdi-download",variant:"flat",density:"compact",onClick:Ue=>n(o)},null,8,["onClick"])]),_:1},8,["items","items-per-page"])]),_:1})]),_:1})]))}});export{ze as default};
|
||||
1
qbit/vuetorrent/public/assets/Settings-C_A4tDZg.js
Normal file
1
qbit/vuetorrent/public/assets/Settings-C_A4tDZg.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
.scrollable-col[data-v-8013deca]{@media (min-width: 600px){max-height:calc(100vh - 200px)}@media (max-width: 599px){max-height:calc(60vh - 200px)}overflow-y:auto}.gap[data-v-1eb1c7d2]{margin-bottom:8px}.gap[data-v-1eb1c7d2]:last-child{margin-bottom:unset}td .dnd-handle[data-v-63969f1b]{cursor:move}
|
||||
.scrollable-col[data-v-d359259e]{@media (min-width: 600px){max-height:calc(100vh - 200px)}@media (max-width: 599px){max-height:calc(60vh - 200px)}overflow-y:auto}.gap[data-v-1eb1c7d2]{margin-bottom:8px}.gap[data-v-1eb1c7d2]:last-child{margin-bottom:unset}td .dnd-handle[data-v-63969f1b]{cursor:move}
|
||||
File diff suppressed because one or more lines are too long
311
qbit/vuetorrent/public/assets/SharedSystems-Do60oLa7.js
Normal file
311
qbit/vuetorrent/public/assets/SharedSystems-Do60oLa7.js
Normal file
@@ -0,0 +1,311 @@
|
||||
import{l as Re,j as g,m as Ge,o as Be,E as u,p as b,q as Ue,s as N,F as q,t as Ae,k as m,S as p,d as G,w as K,v as Ie,b as z,B as k,h as B,u as C,i as _,R as w,x as Fe,a as De,C as S,y as Y,z as Ee,G as Oe,H as ze,I as J,e as X,J as Le,P as He,c as We,D as Q,K as Ve,L as je,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{b as $e,S as Z,G as ee,f as te,U as re,T as L,h as H,B as Ne,i as qe,R as se,__tla as __tla_1}from"./colorToUniform-DavgjoLv.js";let Rt,T,Pt,Gt,Ct,Bt,st,wt,M,Mt,kt,Tt,St;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{const ae=class U extends $e{constructor(e){e={...U.defaultOptions,...e},super(e),this.enabled=!0,this._state=Z.for2d(),this.padding=e.padding,typeof e.antialias=="boolean"?this.antialias=e.antialias?"on":"off":this.antialias=e.antialias,this.resolution=e.resolution,this.blendRequired=e.blendRequired,this.addResource("uTexture",0,1)}apply(e,t,r,a){e.applyFilter(this,t,r,a)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(e){const{gpu:t,gl:r,...a}=e;let n,i;return t&&(n=ee.from(t)),r&&(i=te.from(r)),new U({gpuProgram:n,glProgram:i,...a})}};ae.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1};let Ke=ae;var Ye=`in vec2 vMaskCoord;
|
||||
in vec2 vTextureCoord;
|
||||
|
||||
uniform sampler2D uTexture;
|
||||
uniform sampler2D uMaskTexture;
|
||||
|
||||
uniform float uAlpha;
|
||||
uniform vec4 uMaskClamp;
|
||||
|
||||
out vec4 finalColor;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
float clip = step(3.5,
|
||||
step(uMaskClamp.x, vMaskCoord.x) +
|
||||
step(uMaskClamp.y, vMaskCoord.y) +
|
||||
step(vMaskCoord.x, uMaskClamp.z) +
|
||||
step(vMaskCoord.y, uMaskClamp.w));
|
||||
|
||||
// TODO look into why this is needed
|
||||
float npmAlpha = uAlpha;
|
||||
vec4 original = texture(uTexture, vTextureCoord);
|
||||
vec4 masky = texture(uMaskTexture, vMaskCoord);
|
||||
float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);
|
||||
|
||||
original *= (alphaMul * masky.r * uAlpha * clip);
|
||||
|
||||
finalColor = original;
|
||||
}
|
||||
`,Je=`in vec2 aPosition;
|
||||
|
||||
out vec2 vTextureCoord;
|
||||
out vec2 vMaskCoord;
|
||||
|
||||
|
||||
uniform vec4 uInputSize;
|
||||
uniform vec4 uOutputFrame;
|
||||
uniform vec4 uOutputTexture;
|
||||
uniform mat3 uFilterMatrix;
|
||||
|
||||
vec4 filterVertexPosition( vec2 aPosition )
|
||||
{
|
||||
vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;
|
||||
|
||||
position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
|
||||
position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;
|
||||
|
||||
return vec4(position, 0.0, 1.0);
|
||||
}
|
||||
|
||||
vec2 filterTextureCoord( vec2 aPosition )
|
||||
{
|
||||
return aPosition * (uOutputFrame.zw * uInputSize.zw);
|
||||
}
|
||||
|
||||
vec2 getFilterCoord( vec2 aPosition )
|
||||
{
|
||||
return ( uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy;
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = filterVertexPosition(aPosition);
|
||||
vTextureCoord = filterTextureCoord(aPosition);
|
||||
vMaskCoord = getFilterCoord(aPosition);
|
||||
}
|
||||
`,W=`struct GlobalFilterUniforms {
|
||||
uInputSize:vec4<f32>,
|
||||
uInputPixel:vec4<f32>,
|
||||
uInputClamp:vec4<f32>,
|
||||
uOutputFrame:vec4<f32>,
|
||||
uGlobalFrame:vec4<f32>,
|
||||
uOutputTexture:vec4<f32>,
|
||||
};
|
||||
|
||||
struct MaskUniforms {
|
||||
uFilterMatrix:mat3x3<f32>,
|
||||
uMaskClamp:vec4<f32>,
|
||||
uAlpha:f32,
|
||||
};
|
||||
|
||||
|
||||
@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;
|
||||
@group(0) @binding(1) var uTexture: texture_2d<f32>;
|
||||
@group(0) @binding(2) var uSampler : sampler;
|
||||
|
||||
@group(1) @binding(0) var<uniform> filterUniforms : MaskUniforms;
|
||||
@group(1) @binding(1) var uMaskTexture: texture_2d<f32>;
|
||||
|
||||
struct VSOutput {
|
||||
@builtin(position) position: vec4<f32>,
|
||||
@location(0) uv : vec2<f32>,
|
||||
@location(1) filterUv : vec2<f32>,
|
||||
};
|
||||
|
||||
fn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>
|
||||
{
|
||||
var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;
|
||||
|
||||
position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;
|
||||
position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;
|
||||
|
||||
return vec4(position, 0.0, 1.0);
|
||||
}
|
||||
|
||||
fn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
|
||||
{
|
||||
return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);
|
||||
}
|
||||
|
||||
fn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
|
||||
{
|
||||
return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw);
|
||||
}
|
||||
|
||||
fn getFilterCoord(aPosition:vec2<f32> ) -> vec2<f32>
|
||||
{
|
||||
return ( filterUniforms.uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy;
|
||||
}
|
||||
|
||||
fn getSize() -> vec2<f32>
|
||||
{
|
||||
|
||||
|
||||
return gfu.uGlobalFrame.zw;
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn mainVertex(
|
||||
@location(0) aPosition : vec2<f32>,
|
||||
) -> VSOutput {
|
||||
return VSOutput(
|
||||
filterVertexPosition(aPosition),
|
||||
filterTextureCoord(aPosition),
|
||||
getFilterCoord(aPosition)
|
||||
);
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn mainFragment(
|
||||
@location(0) uv: vec2<f32>,
|
||||
@location(1) filterUv: vec2<f32>,
|
||||
@builtin(position) position: vec4<f32>
|
||||
) -> @location(0) vec4<f32> {
|
||||
|
||||
var maskClamp = filterUniforms.uMaskClamp;
|
||||
|
||||
var clip = step(3.5,
|
||||
step(maskClamp.x, filterUv.x) +
|
||||
step(maskClamp.y, filterUv.y) +
|
||||
step(filterUv.x, maskClamp.z) +
|
||||
step(filterUv.y, maskClamp.w));
|
||||
|
||||
var mask = textureSample(uMaskTexture, uSampler, filterUv);
|
||||
var source = textureSample(uTexture, uSampler, uv);
|
||||
|
||||
var npmAlpha = 0.0;
|
||||
|
||||
var alphaMul = 1.0 - npmAlpha * (1.0 - mask.a);
|
||||
|
||||
var a = (alphaMul * mask.r) * clip;
|
||||
|
||||
return vec4(source.rgb, source.a) * a;
|
||||
}`;class Xe extends Ke{constructor(e){const{sprite:t,...r}=e,a=new Re(t.texture),n=new re({uFilterMatrix:{value:new g,type:"mat3x3<f32>"},uMaskClamp:{value:a.uClampFrame,type:"vec4<f32>"},uAlpha:{value:1,type:"f32"}}),i=ee.from({vertex:{source:W,entryPoint:"mainVertex"},fragment:{source:W,entryPoint:"mainFragment"}}),l=te.from({vertex:Je,fragment:Ye,name:"mask-filter"});super({...r,gpuProgram:i,glProgram:l,resources:{filterUniforms:n,uMaskTexture:t.texture.source}}),this.sprite=t,this._textureMatrix=a}apply(e,t,r,a){this._textureMatrix.texture=this.sprite.texture,e.calculateSpriteMatrix(this.resources.filterUniforms.uniforms.uFilterMatrix,this.sprite).prepend(this._textureMatrix.mapCoord),this.resources.uMaskTexture=this.sprite.texture.source,e.applyFilter(this,t,r,a)}}class ne{constructor(e,t){this.state=Z.for2d(),this._batches=Object.create(null),this._geometries=Object.create(null),this.renderer=e,this._adaptor=t,this._adaptor.init(this)}buildStart(e){if(!this._batches[e.uid]){const t=new Ge;this._batches[e.uid]=t,this._geometries[t.uid]=new Be}this._activeBatch=this._batches[e.uid],this._activeGeometry=this._geometries[this._activeBatch.uid],this._activeBatch.begin()}addToBatch(e){this._activeBatch.add(e)}break(e){this._activeBatch.break(e)}buildEnd(e){const t=this._activeBatch,r=this._activeGeometry;t.finish(e),r.indexBuffer.setDataWithSize(t.indexBuffer,t.indexSize,!0),r.buffers[0].setDataWithSize(t.attributeBuffer.float32View,t.attributeSize,!1)}upload(e){const t=this._batches[e.uid],r=this._geometries[t.uid];t.dirty&&(t.dirty=!1,r.buffers[0].update(t.attributeSize*4))}execute(e){if(e.action==="startBatch"){const t=e.batcher,r=this._geometries[t.uid];this._adaptor.start(this,r)}this._adaptor.execute(this,e)}destroy(){this.state=null,this.renderer=null,this._adaptor.destroy(),this._adaptor=null;for(const e in this._batches)this._batches[e].destroy();this._batches=null;for(const e in this._geometries)this._geometries[e].destroy();this._geometries=null}}ne.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"batch"};Tt={name:"texture-bit",vertex:{header:`
|
||||
|
||||
struct TextureUniforms {
|
||||
uTextureMatrix:mat3x3<f32>,
|
||||
}
|
||||
|
||||
@group(2) @binding(2) var<uniform> textureUniforms : TextureUniforms;
|
||||
`,main:`
|
||||
uv = (textureUniforms.uTextureMatrix * vec3(uv, 1.0)).xy;
|
||||
`},fragment:{header:`
|
||||
@group(2) @binding(0) var uTexture: texture_2d<f32>;
|
||||
@group(2) @binding(1) var uSampler: sampler;
|
||||
|
||||
|
||||
`,main:`
|
||||
outColor = textureSample(uTexture, uSampler, vUV);
|
||||
`}};kt={name:"texture-bit",vertex:{header:`
|
||||
uniform mat3 uTextureMatrix;
|
||||
`,main:`
|
||||
uv = (uTextureMatrix * vec3(uv, 1.0)).xy;
|
||||
`},fragment:{header:`
|
||||
uniform sampler2D uTexture;
|
||||
|
||||
|
||||
`,main:`
|
||||
outColor = texture(uTexture, vUV);
|
||||
`}};function Qe(s,e){const t=s.root,r=s.instructionSet;r.reset(),e.batch.buildStart(r),e.blendMode.buildStart(),e.colorMask.buildStart(),t.sortableChildren&&t.sortChildren(),ie(t,r,e,!0),e.batch.buildEnd(r),e.blendMode.buildEnd(r)}function P(s,e,t){s.globalDisplayStatus<7||!s.includeInBuild||(s.sortableChildren&&s.sortChildren(),s.isSimple?Ze(s,e,t):ie(s,e,t,!1))}function Ze(s,e,t){if(s.renderPipeId&&(t.blendMode.setBlendMode(s,s.groupBlendMode,e),s.didViewUpdate=!1,t[s.renderPipeId].addRenderable(s,e)),!s.isRenderGroupRoot){const r=s.children,a=r.length;for(let n=0;n<a;n++)P(r[n],e,t)}}function ie(s,e,t,r){if(!r&&s.isRenderGroupRoot)t.renderGroup.addRenderGroup(s.renderGroup,e);else{for(let i=0;i<s.effects.length;i++){const l=s.effects[i];t[l.pipe].push(l,s,e)}const a=s.renderPipeId;a&&(t.blendMode.setBlendMode(s,s.groupBlendMode,e),s.didViewUpdate=!1,t[a].addRenderable(s,e));const n=s.children;if(n.length)for(let i=0;i<n.length;i++)P(n[i],e,t);for(let i=s.effects.length-1;i>=0;i--){const l=s.effects[i];t[l.pipe].pop(l,s,e)}}}const et=new N;class tt extends q{constructor(){super({filters:[new Xe({sprite:new Ae(m.EMPTY)})]})}get sprite(){return this.filters[0].sprite}set sprite(e){this.filters[0].sprite=e}}class oe{constructor(e){this._activeMaskStage=[],this._renderer=e}push(e,t,r){const a=this._renderer;if(a.renderPipes.batch.break(r),r.add({renderPipeId:"alphaMask",action:"pushMaskBegin",mask:e,canBundle:!1,maskedContainer:t}),e.renderMaskToTexture){const n=e.mask;n.includeInBuild=!0,P(n,r,a.renderPipes),n.includeInBuild=!1}a.renderPipes.batch.break(r),r.add({renderPipeId:"alphaMask",action:"pushMaskEnd",mask:e,maskedContainer:t,canBundle:!1})}pop(e,t,r){this._renderer.renderPipes.batch.break(r),r.add({renderPipeId:"alphaMask",action:"popMaskEnd",mask:e,canBundle:!1})}execute(e){const t=this._renderer,r=e.mask.renderMaskToTexture;if(e.action==="pushMaskBegin"){const a=b.get(tt);if(r){e.mask.mask.measurable=!0;const n=Ue(e.mask.mask,!0,et);e.mask.mask.measurable=!1,n.ceil();const i=L.getOptimalTexture(n.width,n.height,1,!1);t.renderTarget.push(i,!0),t.globalUniforms.push({offset:n,worldColor:4294967295});const l=a.sprite;l.texture=i,l.worldTransform.tx=n.minX,l.worldTransform.ty=n.minY,this._activeMaskStage.push({filterEffect:a,maskedContainer:e.maskedContainer,filterTexture:i})}else a.sprite=e.mask.mask,this._activeMaskStage.push({filterEffect:a,maskedContainer:e.maskedContainer})}else if(e.action==="pushMaskEnd"){const a=this._activeMaskStage[this._activeMaskStage.length-1];r&&(t.renderTarget.pop(),t.globalUniforms.pop()),t.filter.push({renderPipeId:"filter",action:"pushFilter",container:a.maskedContainer,filterEffect:a.filterEffect,canBundle:!1})}else if(e.action==="popMaskEnd"){t.filter.pop();const a=this._activeMaskStage.pop();r&&L.returnTexture(a.filterTexture),b.return(a.filterEffect)}}destroy(){this._renderer=null,this._activeMaskStage=null}}oe.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"alphaMask"};class le{constructor(e){this._colorStack=[],this._colorStackIndex=0,this._currentColor=0,this._renderer=e}buildStart(){this._colorStack[0]=15,this._colorStackIndex=1,this._currentColor=15}push(e,t,r){this._renderer.renderPipes.batch.break(r);const n=this._colorStack;n[this._colorStackIndex]=n[this._colorStackIndex-1]&e.mask;const i=this._colorStack[this._colorStackIndex];i!==this._currentColor&&(this._currentColor=i,r.add({renderPipeId:"colorMask",colorMask:i,canBundle:!1})),this._colorStackIndex++}pop(e,t,r){this._renderer.renderPipes.batch.break(r);const n=this._colorStack;this._colorStackIndex--;const i=n[this._colorStackIndex-1];i!==this._currentColor&&(this._currentColor=i,r.add({renderPipeId:"colorMask",colorMask:i,canBundle:!1}))}execute(e){this._renderer.colorMask.setMask(e.colorMask)}destroy(){this._colorStack=null}}le.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"colorMask"};class ue{constructor(e){this._maskStackHash={},this._maskHash=new WeakMap,this._renderer=e}push(e,t,r){var a;const n=e,i=this._renderer;i.renderPipes.batch.break(r),i.renderPipes.blendMode.setBlendMode(n.mask,"none",r),r.add({renderPipeId:"stencilMask",action:"pushMaskBegin",mask:e,canBundle:!1});const l=n.mask;l.includeInBuild=!0,this._maskHash.has(n)||this._maskHash.set(n,{instructionsStart:0,instructionsLength:0});const o=this._maskHash.get(n);o.instructionsStart=r.instructionSize,P(l,r,i.renderPipes),l.includeInBuild=!1,i.renderPipes.batch.break(r),r.add({renderPipeId:"stencilMask",action:"pushMaskEnd",mask:e,canBundle:!1});const d=r.instructionSize-o.instructionsStart-1;o.instructionsLength=d;const c=i.renderTarget.renderTarget.uid;(a=this._maskStackHash)[c]??(a[c]=0)}pop(e,t,r){const a=e,n=this._renderer;n.renderPipes.batch.break(r),n.renderPipes.blendMode.setBlendMode(a.mask,"none",r),r.add({renderPipeId:"stencilMask",action:"popMaskBegin",canBundle:!1});const i=this._maskHash.get(e);for(let l=0;l<i.instructionsLength;l++)r.instructions[r.instructionSize++]=r.instructions[i.instructionsStart++];r.add({renderPipeId:"stencilMask",action:"popMaskEnd",canBundle:!1})}execute(e){var t;const r=this._renderer,a=r.renderTarget.renderTarget.uid;let n=(t=this._maskStackHash)[a]??(t[a]=0);e.action==="pushMaskBegin"?(r.renderTarget.ensureDepthStencil(),r.stencil.setStencilMode(p.RENDERING_MASK_ADD,n),n++,r.colorMask.setMask(0)):e.action==="pushMaskEnd"?(r.stencil.setStencilMode(p.MASK_ACTIVE,n),r.colorMask.setMask(15)):e.action==="popMaskBegin"?(r.colorMask.setMask(0),n!==0?r.stencil.setStencilMode(p.RENDERING_MASK_REMOVE,n):(r.renderTarget.clear(null,G.STENCIL),r.stencil.setStencilMode(p.DISABLED,n)),n--):e.action==="popMaskEnd"&&(r.stencil.setStencilMode(p.MASK_ACTIVE,n),r.colorMask.setMask(15)),this._maskStackHash[a]=n}destroy(){this._renderer=null,this._maskStackHash=null,this._maskHash=null}}ue.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"stencilMask"};Mt=function(s,e){for(const t in s.attributes){const r=s.attributes[t],a=e[t];a?(r.location??(r.location=a.location),r.format??(r.format=a.format),r.offset??(r.offset=a.offset),r.instance??(r.instance=a.instance)):K(`Attribute ${t} is not present in the shader, but is present in the geometry. Unable to infer attribute details.`)}rt(s)};function rt(s){const{buffers:e,attributes:t}=s,r={},a={};for(const n in e){const i=e[n];r[i.uid]=0,a[i.uid]=0}for(const n in t){const i=t[n];r[i.buffer.uid]+=H(i.format).stride}for(const n in t){const i=t[n];i.stride??(i.stride=r[i.buffer.uid]),i.start??(i.start=a[i.buffer.uid]),a[i.buffer.uid]+=H(i.format).stride}}T=[];T[p.NONE]=void 0;T[p.DISABLED]={stencilWriteMask:0,stencilReadMask:0};T[p.RENDERING_MASK_ADD]={stencilFront:{compare:"equal",passOp:"increment-clamp"},stencilBack:{compare:"equal",passOp:"increment-clamp"}};T[p.RENDERING_MASK_REMOVE]={stencilFront:{compare:"equal",passOp:"decrement-clamp"},stencilBack:{compare:"equal",passOp:"decrement-clamp"}};T[p.MASK_ACTIVE]={stencilWriteMask:0,stencilFront:{compare:"equal",passOp:"keep"},stencilBack:{compare:"equal",passOp:"keep"}};Ct=class{constructor(e){this._syncFunctionHash=Object.create(null),this._adaptor=e,this._systemCheck()}_systemCheck(){if(!Ie())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}ensureUniformGroup(e){const t=this.getUniformGroupData(e);e.buffer||(e.buffer=new z({data:new Float32Array(t.layout.size/4),usage:k.UNIFORM|k.COPY_DST}))}getUniformGroupData(e){return this._syncFunctionHash[e._signature]||this._initUniformGroup(e)}_initUniformGroup(e){const t=e._signature;let r=this._syncFunctionHash[t];if(!r){const a=Object.keys(e.uniformStructures).map(l=>e.uniformStructures[l]),n=this._adaptor.createUboElements(a),i=this._generateUboSync(n.uboElements);r=this._syncFunctionHash[t]={layout:n,syncFunction:i}}return this._syncFunctionHash[t]}_generateUboSync(e){return this._adaptor.generateUboSync(e)}syncUniformGroup(e,t,r){const a=this.getUniformGroupData(e);return e.buffer||(e.buffer=new z({data:new Float32Array(a.layout.size/4),usage:k.UNIFORM|k.COPY_DST})),t||(t=e.buffer.data),r||(r=0),a.syncFunction(e.uniforms,t,r),!0}updateUniformGroup(e){if(e.isStatic&&!e._dirtyId)return!1;e._dirtyId=0;const t=this.syncUniformGroup(e);return e.buffer.update(),t}destroy(){this._syncFunctionHash=null}};M=[{type:"mat3x3<f32>",test:s=>s.value.a!==void 0,ubo:`
|
||||
var matrix = uv[name].toArray(true);
|
||||
data[offset] = matrix[0];
|
||||
data[offset + 1] = matrix[1];
|
||||
data[offset + 2] = matrix[2];
|
||||
data[offset + 4] = matrix[3];
|
||||
data[offset + 5] = matrix[4];
|
||||
data[offset + 6] = matrix[5];
|
||||
data[offset + 8] = matrix[6];
|
||||
data[offset + 9] = matrix[7];
|
||||
data[offset + 10] = matrix[8];
|
||||
`,uniform:`
|
||||
gl.uniformMatrix3fv(ud[name].location, false, uv[name].toArray(true));
|
||||
`},{type:"vec4<f32>",test:s=>s.type==="vec4<f32>"&&s.size===1&&s.value.width!==void 0,ubo:`
|
||||
v = uv[name];
|
||||
data[offset] = v.x;
|
||||
data[offset + 1] = v.y;
|
||||
data[offset + 2] = v.width;
|
||||
data[offset + 3] = v.height;
|
||||
`,uniform:`
|
||||
cv = ud[name].value;
|
||||
v = uv[name];
|
||||
if (cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) {
|
||||
cv[0] = v.x;
|
||||
cv[1] = v.y;
|
||||
cv[2] = v.width;
|
||||
cv[3] = v.height;
|
||||
gl.uniform4f(ud[name].location, v.x, v.y, v.width, v.height);
|
||||
}
|
||||
`},{type:"vec2<f32>",test:s=>s.type==="vec2<f32>"&&s.size===1&&s.value.x!==void 0,ubo:`
|
||||
v = uv[name];
|
||||
data[offset] = v.x;
|
||||
data[offset + 1] = v.y;
|
||||
`,uniform:`
|
||||
cv = ud[name].value;
|
||||
v = uv[name];
|
||||
if (cv[0] !== v.x || cv[1] !== v.y) {
|
||||
cv[0] = v.x;
|
||||
cv[1] = v.y;
|
||||
gl.uniform2f(ud[name].location, v.x, v.y);
|
||||
}
|
||||
`},{type:"vec4<f32>",test:s=>s.type==="vec4<f32>"&&s.size===1&&s.value.red!==void 0,ubo:`
|
||||
v = uv[name];
|
||||
data[offset] = v.red;
|
||||
data[offset + 1] = v.green;
|
||||
data[offset + 2] = v.blue;
|
||||
data[offset + 3] = v.alpha;
|
||||
`,uniform:`
|
||||
cv = ud[name].value;
|
||||
v = uv[name];
|
||||
if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) {
|
||||
cv[0] = v.red;
|
||||
cv[1] = v.green;
|
||||
cv[2] = v.blue;
|
||||
cv[3] = v.alpha;
|
||||
gl.uniform4f(ud[name].location, v.red, v.green, v.blue, v.alpha);
|
||||
}
|
||||
`},{type:"vec3<f32>",test:s=>s.type==="vec3<f32>"&&s.size===1&&s.value.red!==void 0,ubo:`
|
||||
v = uv[name];
|
||||
data[offset] = v.red;
|
||||
data[offset + 1] = v.green;
|
||||
data[offset + 2] = v.blue;
|
||||
`,uniform:`
|
||||
cv = ud[name].value;
|
||||
v = uv[name];
|
||||
if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue) {
|
||||
cv[0] = v.red;
|
||||
cv[1] = v.green;
|
||||
cv[2] = v.blue;
|
||||
gl.uniform3f(ud[name].location, v.red, v.green, v.blue);
|
||||
}
|
||||
`}];wt=function(s,e,t,r){const a=[`
|
||||
var v = null;
|
||||
var v2 = null;
|
||||
var t = 0;
|
||||
var index = 0;
|
||||
var name = null;
|
||||
var arrayOffset = null;
|
||||
`];let n=0;for(let l=0;l<s.length;l++){const o=s[l],d=o.data.name;let c=!1,h=0;for(let f=0;f<M.length;f++)if(M[f].test(o.data)){h=o.offset/4,a.push(`name = "${d}";`,`offset += ${h-n};`,M[f][e]||M[f].ubo),c=!0;break}if(!c)if(o.data.size>1)h=o.offset/4,a.push(t(o,h-n));else{const f=r[o.data.type];h=o.offset/4,a.push(`
|
||||
v = uv.${d};
|
||||
offset += ${h-n};
|
||||
${f};
|
||||
`)}n=h}const i=a.join(`
|
||||
`);return new Function("uv","data","offset",i)};function v(s,e){return`
|
||||
for (let i = 0; i < ${s*e}; i++) {
|
||||
data[offset + (((i / ${s})|0) * 4) + (i % ${s})] = v[i];
|
||||
}
|
||||
`}st={f32:`
|
||||
data[offset] = v;`,i32:`
|
||||
data[offset] = v;`,"vec2<f32>":`
|
||||
data[offset] = v[0];
|
||||
data[offset + 1] = v[1];`,"vec3<f32>":`
|
||||
data[offset] = v[0];
|
||||
data[offset + 1] = v[1];
|
||||
data[offset + 2] = v[2];`,"vec4<f32>":`
|
||||
data[offset] = v[0];
|
||||
data[offset + 1] = v[1];
|
||||
data[offset + 2] = v[2];
|
||||
data[offset + 3] = v[3];`,"mat2x2<f32>":`
|
||||
data[offset] = v[0];
|
||||
data[offset + 1] = v[1];
|
||||
data[offset + 4] = v[2];
|
||||
data[offset + 5] = v[3];`,"mat3x3<f32>":`
|
||||
data[offset] = v[0];
|
||||
data[offset + 1] = v[1];
|
||||
data[offset + 2] = v[2];
|
||||
data[offset + 4] = v[3];
|
||||
data[offset + 5] = v[4];
|
||||
data[offset + 6] = v[5];
|
||||
data[offset + 8] = v[6];
|
||||
data[offset + 9] = v[7];
|
||||
data[offset + 10] = v[8];`,"mat4x4<f32>":`
|
||||
for (let i = 0; i < 16; i++) {
|
||||
data[offset + i] = v[i];
|
||||
}`,"mat3x2<f32>":v(3,2),"mat4x2<f32>":v(4,2),"mat2x3<f32>":v(2,3),"mat4x3<f32>":v(4,3),"mat2x4<f32>":v(2,4),"mat3x4<f32>":v(3,4)};St={...st,"mat2x2<f32>":`
|
||||
data[offset] = v[0];
|
||||
data[offset + 1] = v[1];
|
||||
data[offset + 2] = v[2];
|
||||
data[offset + 3] = v[3];
|
||||
`};function at(s,e,t,r,a,n){const i=n?1:-1;return s.identity(),s.a=1/r*2,s.d=i*(1/a*2),s.tx=-1-e*s.a,s.ty=-i-t*s.d,s}const x=new Map;function de(s,e){if(!x.has(s)){const t=new m({source:new B({resource:s,...e})}),r=()=>{x.get(s)===t&&x.delete(s)};t.once("destroy",r),t.source.once("destroy",r),x.set(s,t)}return x.get(s)}function nt(s){const e=s.colorTexture.source.resource;return globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement&&document.body.contains(e)}const ce=class he{constructor(e={}){if(this.uid=C("renderTarget"),this.colorTextures=[],this.dirtyId=0,this.isRoot=!1,this._size=new Float32Array(2),e={...he.defaultOptions,...e},this.stencil=e.stencil,this.depth=e.depth,this.isRoot=e.isRoot,typeof e.colorTextures=="number")for(let t=0;t<e.colorTextures;t++)this.colorTextures.push(new _({width:e.width,height:e.height,resolution:e.resolution,antialias:e.antialias}));else{this.colorTextures=[...e.colorTextures.map(r=>r.source)];const t=this.colorTexture.source;this.resize(t.width,t.height,t._resolution)}this.colorTexture.source.on("resize",this.onSourceResize,this),(e.depthStencilTexture||this.stencil)&&(e.depthStencilTexture instanceof m||e.depthStencilTexture instanceof _?this.depthStencilTexture=e.depthStencilTexture.source:this.ensureDepthStencilTexture())}get size(){const e=this._size;return e[0]=this.pixelWidth,e[1]=this.pixelHeight,e}get width(){return this.colorTexture.source.width}get height(){return this.colorTexture.source.height}get pixelWidth(){return this.colorTexture.source.pixelWidth}get pixelHeight(){return this.colorTexture.source.pixelHeight}get resolution(){return this.colorTexture.source._resolution}get colorTexture(){return this.colorTextures[0]}onSourceResize(e){this.resize(e.width,e.height,e._resolution,!0)}ensureDepthStencilTexture(){this.depthStencilTexture||(this.depthStencilTexture=new _({width:this.width,height:this.height,resolution:this.resolution,format:"depth24plus-stencil8",autoGenerateMipmaps:!1,antialias:!1,mipLevelCount:1}))}resize(e,t,r=this.resolution,a=!1){this.dirtyId++,this.colorTextures.forEach((n,i)=>{a&&i===0||n.source.resize(e,t,r)}),this.depthStencilTexture&&this.depthStencilTexture.source.resize(e,t,r)}destroy(){this.colorTexture.source.off("resize",this.onSourceResize,this),this.depthStencilTexture&&(this.depthStencilTexture.destroy(),delete this.depthStencilTexture)}};ce.defaultOptions={width:0,height:0,resolution:1,colorTextures:1,stencil:!1,depth:!1,antialias:!1,isRoot:!1};let A=ce;Pt=class{constructor(e){this.rootViewPort=new w,this.viewport=new w,this.onRenderTargetChange=new Fe("onRenderTargetChange"),this.projectionMatrix=new g,this.defaultClearColor=[0,0,0,0],this._renderSurfaceToRenderTargetHash=new Map,this._gpuRenderTargetHash=Object.create(null),this._renderTargetStack=[],this._renderer=e}finishRenderPass(){this.adaptor.finishRenderPass(this.renderTarget)}renderStart({target:e,clear:t,clearColor:r,frame:a}){this._renderTargetStack.length=0,this.push(e,t,r,a),this.rootViewPort.copyFrom(this.viewport),this.rootRenderTarget=this.renderTarget,this.renderingToScreen=nt(this.rootRenderTarget)}bind(e,t=!0,r,a){const n=this.getRenderTarget(e),i=this.renderTarget!==n;this.renderTarget=n,this.renderSurface=e;const l=this.getGpuRenderTarget(n);(n.pixelWidth!==l.width||n.pixelHeight!==l.height)&&(this.adaptor.resizeGpuRenderTarget(n),l.width=n.pixelWidth,l.height=n.pixelHeight);const o=n.colorTexture,d=this.viewport,c=o.pixelWidth,h=o.pixelHeight;if(!a&&e instanceof m&&(a=e.frame),a){const f=o._resolution;d.x=a.x*f+.5|0,d.y=a.y*f+.5|0,d.width=a.width*f+.5|0,d.height=a.height*f+.5|0}else d.x=0,d.y=0,d.width=c,d.height=h;return at(this.projectionMatrix,0,0,d.width/o.resolution,d.height/o.resolution,!n.isRoot),this.adaptor.startRenderPass(n,t,r,d),i&&this.onRenderTargetChange.emit(n),n}clear(e,t=G.ALL,r){t&&(e&&(e=this.getRenderTarget(e)),this.adaptor.clear(e||this.renderTarget,t,r,this.viewport))}contextChange(){this._gpuRenderTargetHash=Object.create(null)}push(e,t=G.ALL,r,a){const n=this.bind(e,t,r,a);return this._renderTargetStack.push({renderTarget:n,frame:a}),n}pop(){this._renderTargetStack.pop();const e=this._renderTargetStack[this._renderTargetStack.length-1];this.bind(e.renderTarget,!1,null,e.frame)}getRenderTarget(e){return e.isTexture&&(e=e.source),this._renderSurfaceToRenderTargetHash.get(e)??this._initRenderTarget(e)}copyToTexture(e,t,r,a,n){r.x<0&&(a.width+=r.x,n.x-=r.x,r.x=0),r.y<0&&(a.height+=r.y,n.y-=r.y,r.y=0);const{pixelWidth:i,pixelHeight:l}=e;return a.width=Math.min(a.width,i-r.x),a.height=Math.min(a.height,l-r.y),this.adaptor.copyToTexture(e,t,r,a,n)}ensureDepthStencil(){this.renderTarget.stencil||(this.renderTarget.stencil=!0,this.adaptor.startRenderPass(this.renderTarget,!1,null,this.viewport))}destroy(){this._renderer=null,this._renderSurfaceToRenderTargetHash.forEach((e,t)=>{e!==t&&e.destroy()}),this._renderSurfaceToRenderTargetHash.clear(),this._gpuRenderTargetHash=Object.create(null)}_initRenderTarget(e){let t=null;return B.test(e)&&(e=de(e)),e instanceof A?t=e:e instanceof _&&(t=new A({colorTextures:[e]}),B.test(e.source.resource)&&(t.isRoot=!0),e.on("destroy",()=>{t.destroy()})),this._renderSurfaceToRenderTargetHash.set(e,t),t}getGpuRenderTarget(e){return this._gpuRenderTargetHash[e.uid]||(this._gpuRenderTargetHash[e.uid]=this.adaptor.initGpuRenderTarget(e))}};Rt=class extends De{constructor({buffer:e,offset:t,size:r}){super(),this.uid=C("buffer"),this._resourceType="bufferResource",this._touched=0,this._resourceId=C("resource"),this._bufferResource=!0,this.buffer=e,this.offset=t|0,this.size=r,this.buffer.on("change",this.onBufferChange,this)}onBufferChange(){this._resourceId=C("resource"),this.emit("change",this)}destroy(e=!1){e&&this.buffer.destroy(),this.buffer=null}};class fe{constructor(e){this._renderer=e}addRenderable(e,t){this._renderer.renderPipes.batch.break(t),t.add(e)}execute(e){e.isRenderable&&e.render(this._renderer)}destroy(){this._renderer=null}}fe.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"customRender"};function pe(s,e){const t=s.instructionSet,r=t.instructions;for(let a=0;a<t.instructionSize;a++){const n=r[a];e[n.renderPipeId].execute(n)}}class me{constructor(e){this._renderer=e}addRenderGroup(e,t){this._renderer.renderPipes.batch.break(t),t.add(e)}execute(e){e.isRenderable&&(this._renderer.globalUniforms.push({worldTransformMatrix:e.worldTransform,worldColor:e.worldColorAlpha}),pe(e,this._renderer.renderPipes),this._renderer.globalUniforms.pop())}destroy(){this._renderer=null}}me.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"renderGroup"};function ge(s,e=[]){e.push(s);for(let t=0;t<s.renderGroupChildren.length;t++)ge(s.renderGroupChildren[t],e);return e}const it=new S;function ve(s,e=!1){ot(s);const t=s.childrenToUpdate,r=s.updateTick;s.updateTick++;for(const a in t){const n=t[a],i=n.list,l=n.index;for(let o=0;o<l;o++)xe(i[o],r,0);n.index=0}if(e)for(let a=0;a<s.renderGroupChildren.length;a++)ve(s.renderGroupChildren[a],e)}function ot(s){const e=s.root;let t;if(s.renderGroupParent){const r=s.renderGroupParent;s.worldTransform.appendFrom(e.relativeGroupTransform,r.worldTransform),s.worldColor=Y(e.groupColor,r.worldColor),t=e.groupAlpha*r.worldAlpha}else s.worldTransform.copyFrom(e.localTransform),s.worldColor=e.localColor,t=e.localAlpha;t=t<0?0:t>1?1:t,s.worldAlpha=t,s.worldColorAlpha=s.worldColor+((t*255|0)<<24)}function xe(s,e,t){if(e===s.updateTick)return;s.updateTick=e,s.didChange=!1;const r=s.localTransform;s.updateLocalTransform();const a=s.parent;if(a&&!a.isRenderGroupRoot?(t=t|s._updateFlags,s.relativeGroupTransform.appendFrom(r,a.relativeGroupTransform),t&&V(s,a,t)):(t=s._updateFlags,s.relativeGroupTransform.copyFrom(r),t&&V(s,it,t)),!s.isRenderGroupRoot){const n=s.children,i=n.length;for(let o=0;o<i;o++)xe(n[o],e,t);const l=s.renderGroup;s.renderPipeId&&!l.structureDidChange&&l.updateRenderable(s)}}function V(s,e,t){if(t&Ee){s.groupColor=Y(s.localColor,e.groupColor);let r=s.localAlpha*e.groupAlpha;r=r<0?0:r>1?1:r,s.groupAlpha=r,s.groupColorAlpha=s.groupColor+((r*255|0)<<24)}t&Oe&&(s.groupBlendMode=s.localBlendMode==="inherit"?e.groupBlendMode:s.localBlendMode),t&ze&&(s.globalDisplayStatus=s.localDisplayStatus&e.globalDisplayStatus),s._updateFlags=0}function lt(s,e){const{list:t,index:r}=s.childrenRenderablesToUpdate;let a=!1;for(let n=0;n<r;n++){const i=t[n];if(a=e[i.renderPipeId].validateRenderable(i),a)break}return s.structureDidChange=a,a}const ut=new g;class be{constructor(e){this._renderer=e}render({container:e,transform:t}){e.isRenderGroup=!0;const r=e.parent,a=e.renderGroup.renderGroupParent;e.parent=null,e.renderGroup.renderGroupParent=null;const n=this._renderer,i=ge(e.renderGroup,[]);let l=ut;t&&(l=l.copyFrom(e.renderGroup.localTransform),e.renderGroup.localTransform.copyFrom(t));const o=n.renderPipes;for(let d=0;d<i.length;d++){const c=i[d];c.runOnRender(),c.instructionSet.renderPipes=o,c.structureDidChange||lt(c,o),ve(c),c.structureDidChange?(c.structureDidChange=!1,Qe(c,o)):dt(c),c.childrenRenderablesToUpdate.index=0,n.renderPipes.batch.upload(c.instructionSet)}n.globalUniforms.start({worldTransformMatrix:t?e.renderGroup.localTransform:e.renderGroup.worldTransform,worldColor:e.renderGroup.worldColorAlpha}),pe(e.renderGroup,o),o.uniformBatch&&o.uniformBatch.renderEnd(),t&&e.renderGroup.localTransform.copyFrom(l),e.parent=r,e.renderGroup.renderGroupParent=a}destroy(){this._renderer=null}}be.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"renderGroup"};function dt(s){const{list:e,index:t}=s.childrenRenderablesToUpdate;for(let r=0;r<t;r++){const a=e[r];a.didViewUpdate&&s.updateRenderable(a)}}class _e{constructor(e){this._gpuSpriteHash=Object.create(null),this._renderer=e}addRenderable(e,t){const r=this._getGpuSprite(e);e._didSpriteUpdate&&this._updateBatchableSprite(e,r),this._renderer.renderPipes.batch.addToBatch(r)}updateRenderable(e){const t=this._gpuSpriteHash[e.uid];e._didSpriteUpdate&&this._updateBatchableSprite(e,t),t.batcher.updateElement(t)}validateRenderable(e){const t=e._texture,r=this._getGpuSprite(e);return r.texture._source!==t._source?!r.batcher.checkAndUpdateTexture(r,t):!1}destroyRenderable(e){const t=this._gpuSpriteHash[e.uid];b.return(t),this._gpuSpriteHash[e.uid]=null}_updateBatchableSprite(e,t){e._didSpriteUpdate=!1,t.bounds=e.bounds,t.texture=e._texture}_getGpuSprite(e){return this._gpuSpriteHash[e.uid]||this._initGPUSprite(e)}_initGPUSprite(e){const t=b.get(Ne);return t.renderable=e,t.texture=e._texture,t.bounds=e.bounds,t.roundPixels=this._renderer._roundPixels|e._roundPixels,this._gpuSpriteHash[e.uid]=t,e._didSpriteUpdate=!1,e.on("destroyed",()=>{this.destroyRenderable(e)}),t}destroy(){for(const e in this._gpuSpriteHash)b.return(this._gpuSpriteHash[e]);this._gpuSpriteHash=null,this._renderer=null}}_e.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"sprite"};const I=class ye{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new J(0),this.color=this._backgroundColor,this.alpha=1}init(e){e={...ye.defaultOptions,...e},this.clearBeforeRender=e.clearBeforeRender,this.color=e.background||e.backgroundColor||this._backgroundColor,this.alpha=e.backgroundAlpha,this._backgroundColor.setAlpha(e.backgroundAlpha)}get color(){return this._backgroundColor}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get colorRgba(){return this._backgroundColor.toArray()}destroy(){}};I.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"background",priority:0};I.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0};let ct=I;const y={};X.handle(u.BlendMode,s=>{if(!s.name)throw new Error("BlendMode extension must have a name property");y[s.name]=s.ref},s=>{delete y[s.name]});class Te{constructor(e){this._isAdvanced=!1,this._filterHash=Object.create(null),this._renderer=e}setBlendMode(e,t,r){if(this._activeBlendMode===t){this._isAdvanced&&this._renderableList.push(e);return}this._activeBlendMode=t,this._isAdvanced&&this._endAdvancedBlendMode(r),this._isAdvanced=!!y[t],this._isAdvanced&&(this._beginAdvancedBlendMode(r),this._renderableList.push(e))}_beginAdvancedBlendMode(e){this._renderer.renderPipes.batch.break(e);const t=this._activeBlendMode;if(!y[t]){K(`Unable to assign BlendMode: '${t}'. You may want to include: import 'pixi.js/advanced-blend-modes'`);return}this._filterHash[t]||(this._filterHash[t]=new q({filters:[new y[t]]}));const r={renderPipeId:"filter",action:"pushFilter",renderables:[],filterEffect:this._filterHash[t],canBundle:!1};this._renderableList=r.renderables,e.add(r)}_endAdvancedBlendMode(e){this._renderableList=null,this._renderer.renderPipes.batch.break(e),e.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}buildStart(){this._isAdvanced=!1}buildEnd(e){this._isAdvanced&&this._endAdvancedBlendMode(e)}destroy(){this._renderer=null,this._renderableList=null;for(const e in this._filterHash)this._filterHash[e].destroy();this._filterHash=null}}Te.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"blendMode"};const R={png:"image/png",jpg:"image/jpeg",webp:"image/webp"},F=class ke{constructor(e){this._renderer=e}_normalizeOptions(e,t={}){return e instanceof S||e instanceof m?{target:e,...t}:{...t,...e}}async image(e){const t=new Image;return t.src=await this.base64(e),t}async base64(e){e=this._normalizeOptions(e,ke.defaultImageOptions);const{format:t,quality:r}=e,a=this.canvas(e);if(a.toBlob!==void 0)return new Promise((n,i)=>{a.toBlob(l=>{if(!l){i(new Error("ICanvas.toBlob failed!"));return}const o=new FileReader;o.onload=()=>n(o.result),o.onerror=i,o.readAsDataURL(l)},R[t],r)});if(a.toDataURL!==void 0)return a.toDataURL(R[t],r);if(a.convertToBlob!==void 0){const n=await a.convertToBlob({type:R[t],quality:r});return new Promise((i,l)=>{const o=new FileReader;o.onload=()=>i(o.result),o.onerror=l,o.readAsDataURL(n)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e){e=this._normalizeOptions(e);const t=e.target,r=this._renderer;if(t instanceof m)return r.texture.generateCanvas(t);const a=r.textureGenerator.generateTexture(e),n=r.texture.generateCanvas(a);return a.destroy(),n}pixels(e){e=this._normalizeOptions(e);const t=e.target,r=this._renderer,a=t instanceof m?t:r.textureGenerator.generateTexture(e),n=r.texture.getPixels(a);return t instanceof S&&a.destroy(),n}texture(e){return e=this._normalizeOptions(e),e.target instanceof m?e.target:this._renderer.textureGenerator.generateTexture(e)}download(e){e=this._normalizeOptions(e);const t=this.canvas(e),r=document.createElement("a");r.download=e.filename??"image.png",r.href=t.toDataURL("image/png"),document.body.appendChild(r),r.click(),document.body.removeChild(r)}log(e){const t=e.width??200;e=this._normalizeOptions(e);const r=this.canvas(e),a=r.toDataURL();console.log(`[Pixi Texture] ${r.width}px ${r.height}px`);const n=["font-size: 1px;",`padding: ${t}px 300px;`,`background: url(${a}) no-repeat;`,"background-size: contain;"].join(" ");console.log("%c ",n)}destroy(){this._renderer=null}};F.extension={type:[u.WebGLSystem,u.WebGPUSystem],name:"extract"};F.defaultImageOptions={format:"png",quality:1};let ht=F;class ft extends m{static create(e){return new m({source:new _(e)})}resize(e,t,r){return this.source.resize(e,t,r),this}}const pt=new w,mt=new N,gt=[0,0,0,0];class Me{constructor(e){this._renderer=e}generateTexture(e){e instanceof S&&(e={target:e,frame:void 0,textureSourceOptions:{},resolution:void 0});const t=e.resolution||this._renderer.resolution,r=e.antialias||this._renderer.view.antialias,a=e.target;let n=e.clearColor;n?n=Array.isArray(n)&&n.length===4?n:J.shared.setValue(n).toArray():n=gt;const i=e.frame?.copyTo(pt)||Le(a,mt).rectangle;i.width=Math.max(i.width,1/t)|0,i.height=Math.max(i.height,1/t)|0;const l=ft.create({...e.textureSourceOptions,width:i.width,height:i.height,resolution:t,antialias:r}),o=g.shared.translate(-i.x,-i.y);return this._renderer.render({container:a,transform:o,target:l,clearColor:n}),l}destroy(){this._renderer=null}}Me.extension={type:[u.WebGLSystem,u.WebGPUSystem],name:"textureGenerator"};class Ce{constructor(e){this._stackIndex=0,this._globalUniformDataStack=[],this._uniformsPool=[],this._activeUniforms=[],this._bindGroupPool=[],this._activeBindGroups=[],this._renderer=e}reset(){this._stackIndex=0;for(let e=0;e<this._activeUniforms.length;e++)this._uniformsPool.push(this._activeUniforms[e]);for(let e=0;e<this._activeBindGroups.length;e++)this._bindGroupPool.push(this._activeBindGroups[e]);this._activeUniforms.length=0,this._activeBindGroups.length=0}start(e){this.reset(),this.push(e)}bind({size:e,projectionMatrix:t,worldTransformMatrix:r,worldColor:a,offset:n}){const i=this._renderer.renderTarget.renderTarget,l=this._stackIndex?this._globalUniformDataStack[this._stackIndex-1]:{projectionData:i,worldTransformMatrix:new g,worldColor:4294967295,offset:new He},o={projectionMatrix:t||this._renderer.renderTarget.projectionMatrix,resolution:e||i.size,worldTransformMatrix:r||l.worldTransformMatrix,worldColor:a||l.worldColor,offset:n||l.offset,bindGroup:null},d=this._uniformsPool.pop()||this._createUniforms();this._activeUniforms.push(d);const c=d.uniforms;c.uProjectionMatrix=o.projectionMatrix,c.uResolution=o.resolution,c.uWorldTransformMatrix.copyFrom(o.worldTransformMatrix),c.uWorldTransformMatrix.tx-=o.offset.x,c.uWorldTransformMatrix.ty-=o.offset.y,qe(o.worldColor,c.uWorldColorAlpha,0),d.update();let h;this._renderer.renderPipes.uniformBatch?h=this._renderer.renderPipes.uniformBatch.getUniformBindGroup(d,!1):(h=this._bindGroupPool.pop()||new We,this._activeBindGroups.push(h),h.setResource(d,0)),o.bindGroup=h,this._currentGlobalUniformData=o}push(e){this.bind(e),this._globalUniformDataStack[this._stackIndex++]=this._currentGlobalUniformData}pop(){this._currentGlobalUniformData=this._globalUniformDataStack[--this._stackIndex-1],this._renderer.type===se.WEBGL&&this._currentGlobalUniformData.bindGroup.resources[0].update()}get bindGroup(){return this._currentGlobalUniformData.bindGroup}get uniformGroup(){return this._currentGlobalUniformData.bindGroup.resources[0]}_createUniforms(){return new re({uProjectionMatrix:{value:new g,type:"mat3x3<f32>"},uWorldTransformMatrix:{value:new g,type:"mat3x3<f32>"},uWorldColorAlpha:{value:new Float32Array(4),type:"vec4<f32>"},uResolution:{value:[0,0],type:"vec2<f32>"}},{isStatic:!0})}destroy(){this._renderer=null}}Ce.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"globalUniforms"};let j=!1;const $="8.0.4";function vt(s){if(!j){if(Q.get().getNavigator().userAgent.toLowerCase().indexOf("chrome")>-1){const e=[`%c %c %c %c %c PixiJS %c v${$} (${s}) http://www.pixijs.com/
|
||||
|
||||
`,"background: #E72264; padding:5px 0;","background: #6CA2EA; padding:5px 0;","background: #B5D33D; padding:5px 0;","background: #FED23F; padding:5px 0;","color: #FFFFFF; background: #E72264; padding:5px 0;","color: #E72264; background: #FFFFFF; padding:5px 0;"];globalThis.console.log(...e)}else globalThis.console&&globalThis.console.log(`PixiJS ${$} - ${s} - http://www.pixijs.com/`);j=!0}}class D{constructor(e){this._renderer=e}init(e){if(e.hello){let t=this._renderer.name;this._renderer.type===se.WEBGL&&(t+=` ${this._renderer.context.webGLVersion}`),vt(t)}}}D.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"hello",priority:-2};D.defaultOptions={hello:!1};const E=class we{constructor(e){this._renderer=e,this.count=0,this.checkCount=0}init(e){e={...we.defaultOptions,...e},this.checkCountMax=e.textureGCCheckCountMax,this.maxIdle=e.textureGCAMaxIdle,this.active=e.textureGCActive}postrender(){this._renderer.renderingToScreen&&(this.count++,this.active&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this._renderer.texture.managedTextures;for(let t=0;t<e.length;t++){const r=e[t];r.autoGarbageCollect&&r.resource&&r._touched>-1&&this.count-r._touched>this.maxIdle&&(r._touched=-1,r.unload())}}destroy(){this._renderer=null}};E.extension={type:[u.WebGLSystem,u.WebGPUSystem],name:"textureGC"};E.defaultOptions={textureGCActive:!0,textureGCAMaxIdle:60*60,textureGCCheckCountMax:600};let Se=E;X.add(Se);const O=class Pe{get resolution(){return this.texture.source._resolution}set resolution(e){this.texture.source.resize(this.texture.source.width,this.texture.source.height,e)}init(e){e={...Pe.defaultOptions,...e},e.view&&(Ve(je,"ViewSystem.view has been renamed to ViewSystem.canvas"),e.canvas=e.view),this.screen=new w(0,0,e.width,e.height),this.canvas=e.canvas||Q.get().createCanvas(),this.antialias=!!e.antialias,this.texture=de(this.canvas,e),this.renderTarget=new A({colorTextures:[this.texture],depth:!!e.depth,isRoot:!0}),this.texture.source.transparent=e.backgroundAlpha<1,this.multiView=!!e.multiView,this.autoDensity&&(this.canvas.style.width=`${this.texture.width}px`,this.canvas.style.height=`${this.texture.height}px`),this.resolution=e.resolution}resize(e,t,r){this.texture.source.resize(e,t,r),this.screen.width=this.texture.frame.width,this.screen.height=this.texture.frame.height,this.autoDensity&&(this.canvas.style.width=`${e}px`,this.canvas.style.height=`${t}px`)}destroy(e=!1){(typeof e=="boolean"?e:!!e?.removeView)&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)}};O.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"view",priority:0};O.defaultOptions={width:800,height:600,autoDensity:!1,antialias:!1};let xt=O;Gt=[ct,Ce,D,xt,be,Se,Me,ht];Bt=[Te,ne,_e,me,oe,ue,le,fe]});export{Rt as B,T as G,Pt as R,Gt as S,Ct as U,Bt as a,st as b,wt as c,M as d,Mt as e,kt as f,Tt as t,St as u,__tla};
|
||||
@@ -1,2 +0,0 @@
|
||||
import{u as rt,n as oe,l as ae,f as _e,g as ce,h as Ye,i as ke,j as Te,a as te,k as A,m as be,y as he,aE as K,J,D as Ve,c as Q,d as W,aw as ze,V as le,b as it,aF as st,v as Ue,ai as Je,aj as ut,r as S,e as Fe,aG as dt,aH as X,aI as Z,q as I,a2 as pe,K as ee,ax as Ne,z as de,_ as Ce,A as ct,B as mt,T as ft,aJ as vt,aK as pt,aL as _t,aM as gt,aN as yt,a3 as Ie,aO as ht,aP as Ae,af as Qe,a7 as Xe,aQ as Ge,a0 as Ke,aq as wt,C as Dt,ar as $t,as as se,at as ue}from"./index-135ae4c1.js";import{d as V,a as kt,J as Tt,g as j,K as ne,r as Be,M as Se,A as ge,a1 as u,a2 as F,a3 as t,m as e,W as y,Z as l,u as o,Y as Oe,a8 as x,ao as Ze,D as bt,ab as c,n as ye,a6 as $,a7 as R,F as U,ae as Vt,a0 as Nt,c as E,w as me,x as Le,a4 as je,au as Ft,I as Re,a5 as xe,aa as Ct,$ as St,q as Ot}from"./vue-d2584a6d.js";import"./faker-c43f92d4.js";import{_ as Pt}from"./dayjs-f7aba705.js";import{d as He}from"./dayjs.min-1969f9c6.js";import{an as At}from"./vuetify-e547ef1b.js";var $e=(w=>(w[w.MISSING=0]="MISSING",w[w.DOWNLOADING=1]="DOWNLOADING",w[w.DOWNLOADED=2]="DOWNLOADED",w))($e||{}),Y=(w=>(w[w.DISABLED=0]="DISABLED",w[w.NOT_YET_CONTACTED=1]="NOT_YET_CONTACTED",w[w.WORKING=2]="WORKING",w[w.UPDATING=3]="UPDATING",w[w.NOT_WORKING=4]="NOT_WORKING",w))(Y||{});const It={pdf:"mdi-file-pdf-box",png:"mdi-file-image",jpg:"mdi-file-image",jpeg:"mdi-file-image",tiff:"mdi-file-image",doc:"mdi-file-document",docx:"mdi-file-document",txt:"mdi-file-document",nfo:"mdi-information-variant-box",mp3:"mdi-music",wav:"mdi-music",flac:"mdi-music",avi:"mdi-movie",mp4:"mdi-movie",mkv:"mdi-movie",mov:"mdi-movie",wmv:"mdi-movie",srt:"mdi-subtitles",idx:"mdi-subtitles",sub:"mdi-subtitles",rar:"mdi-folder-zip",zip:"mdi-folder-zip",gz:"mdi-folder-zip","7z":"mdi-folder-zip",exe:"mdi-application",msi:"mdi-application",dmg:"mdi-application",deb:"mdi-application",iso:"mdi-application",jar:"mdi-application"};function xt(w){const a=w.split(".").pop()?.toLowerCase()||"";return It[a]||"mdi-file"}function qe(){return{type:"root",name:"",fullName:"",id:"",children:[]}}function zt(w){const a=V(qe());return kt(()=>{const d=qe(),r=Tt(w)??[];for(const m of r){let h=d;m.name.replace("\\","/").split("/").reduce((p,s)=>{const i=p===""?s:p+"/"+s;if(m.name.replace("\\","/").split("/").pop()===s){const b={type:"file",name:s,fullName:i,id:m.index,availability:m.availability,index:m.index,is_seed:m.is_seed,priority:m.priority,progress:m.progress,size:m.size};h.children.push(b)}else{const b=h.children.find(T=>T.name===s);if(b)h=b;else{const T={type:"folder",name:s,fullName:i,id:i,children:[]};h.children.push(T),h=T}}return i},"")}a.value=d}),{tree:a}}const et=j({__name:"MoveTorrentFileDialog",props:{guid:{},hash:{},isFolder:{type:Boolean},oldName:{}},setup(w){const a=w,{isOpened:d}=rt(a.guid),{t:r}=ne(),m=oe(),h=V(),p=V(),s=V(!1),i=Be({newName:""}),b=[g=>!!g||r("dialogs.moveTorrent.required")];async function T(){await h.value?.validate(),s.value&&(a.isFolder?await m.renameTorrentFolder(a.hash,a.oldName,i.newName):await m.renameTorrentFile(a.hash,a.oldName,i.newName),P())}const P=()=>{d.value=!1};return Se(()=>{if(i.newName=a.oldName,a.isFolder)ge(()=>p.value?.select());else{const g=i.newName.lastIndexOf("/"),N=i.newName.lastIndexOf(".");ge(()=>{p.value?.setSelectionRange(g+1,N==-1?i.newName.length:N)})}}),(g,N)=>(u(),F(be,{modelValue:o(d),"onUpdate:modelValue":N[3]||(N[3]=O=>bt(d)?d.value=O:null)},{default:t(()=>[e(ae,null,{default:t(()=>[e(_e,null,{default:t(()=>[y(l(o(r)("dialogs.moveTorrentFile.title",1+Number(g.isFolder))),1)]),_:1}),e(ce,null,{default:t(()=>[e(o(Ye),{modelValue:s.value,"onUpdate:modelValue":N[1]||(N[1]=O=>s.value=O),ref_key:"form",ref:h,onSubmit:N[2]||(N[2]=Oe(()=>{},["prevent"]))},{default:t(()=>[g.oldName?(u(),F(ke,{key:0,"model-value":g.oldName,disabled:"",label:g.$t("dialogs.moveTorrentFile.oldName")},null,8,["model-value","label"])):x("",!0),e(ke,{modelValue:i.newName,"onUpdate:modelValue":N[0]||(N[0]=O=>i.newName=O),ref_key:"input",ref:p,rules:b,autofocus:"",label:g.$t("dialogs.moveTorrent.newPath"),onKeydown:Ze(T,["enter"])},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1}),e(Te,null,{default:t(()=>[e(te),e(A,{color:"error",onClick:P},{default:t(()=>[y(l(g.$t("common.cancel")),1)]),_:1}),e(A,{color:"accent",disabled:!s.value,onClick:T},{default:t(()=>[y(l(g.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),Ut={class:"mr-2"},Bt={class:"mr-2"},Lt={class:"mr-4"},Rt={class:"ml-2"},Et=j({__name:"FileNode",props:{node:{}},emits:["renameFile","setFilePriority"],setup(w){const{t:a}=ne(),d=he(),r=[{name:a("constants.file_priority.max"),icon:"mdi-priority-high",value:K.MAXIMAL},{name:a("constants.file_priority.high"),icon:"mdi-arrow-up",value:K.HIGH},{name:a("constants.file_priority.normal"),icon:"mdi-arrow-down",value:K.NORMAL},{name:a("constants.file_priority.unwanted"),icon:"mdi-priority-low",value:K.DO_NOT_DOWNLOAD}];function m(h){return r.find(p=>p.value===h.priority)?.name||""}return(h,p)=>(u(),F(W,{title:h.node.name,value:h.node.index,"prepend-icon":o(xt)(h.node.name)},{append:t(()=>[c("span",Ut,"[ "+l(o(J)(h.node.size,o(d).useBinarySize))+" ]",1),c("span",Bt,l(o(Ve)(h.node.progress)),1),c("span",Lt,"[ "+l(m(h.node))+" ]",1),e(it,{"open-on-hover":"","open-on-click":"","open-delay":"0","close-delay":"0"},{activator:t(({props:s})=>[e(A,ye(s,{class:"mr-2",color:"accent",size:"x-small",icon:"mdi-trending-up"}),null,16)]),default:t(()=>[e(Q,null,{default:t(()=>[(u(),$(U,null,R(r,s=>e(W,{onClick:i=>h.$emit("setFilePriority",h.node,s.value)},{default:t(()=>[e(ze,null,{default:t(()=>[e(le,null,{default:t(()=>[y(l(s.icon),1)]),_:2},1024),c("span",Rt,l(s.name),1)]),_:2},1024)]),_:2},1032,["onClick"])),64))]),_:1})]),_:1}),e(A,{color:"accent",size:"x-small",icon:"mdi-pencil",onClick:p[0]||(p[0]=Oe(s=>h.$emit("renameFile",h.node),["stop"]))})]),_:1},8,["title","value","prepend-icon"]))}}),Wt={class:"mr-2"},Mt=j({__name:"FolderNode",props:{node:{}},emits:["renameFolder","renameFile","setFilePriority"],setup(w){const{t:a}=ne();function d(r){let m=0,h=0;for(const s of r.children)s.type==="file"?m++:s.type==="folder"&&h++;const p=[];return m>0&&p.push(a("torrentDetail.content.fileInfo",m)),h>0&&p.push(a("torrentDetail.content.folderInfo",h)),p.join(", ")}return(r,m)=>{const h=Vt("FolderNode",!0);return u(),F(st,{value:r.node.type==="root"?"(root)":r.node.fullName},{activator:t(({props:p})=>[e(W,ye(p,{"prepend-icon":r.node.type==="root"?"mdi-file-tree":"mdi-folder",title:r.node.type==="root"?r.$t("torrentDetail.content.rootNode"):r.node.name,value:r.node.type==="root"?"(root)":r.node.fullName}),{append:t(({isActive:s})=>[c("span",Wt,l(d(r.node)),1),r.node.type==="folder"?(u(),F(A,{key:0,color:"accent",size:"x-small",icon:"mdi-pencil",onClick:m[0]||(m[0]=Oe(i=>r.$emit("renameFolder",r.node),["stop"]))})):x("",!0),e(le,{icon:s?"mdi-chevron-up":"mdi-chevron-down"},null,8,["icon"])]),_:2},1040,["prepend-icon","title","value"])]),default:t(()=>[(u(!0),$(U,null,R(r.node.children,p=>(u(),$(U,null,[p.type==="folder"?(u(),F(h,{key:0,node:p,onRenameFolder:m[1]||(m[1]=s=>r.$emit("renameFolder",s)),onRenameFile:m[2]||(m[2]=s=>r.$emit("renameFile",s)),onSetFilePriority:m[3]||(m[3]=(s,i)=>r.$emit("setFilePriority",s,i))},null,8,["node"])):x("",!0),p.type==="file"?(u(),F(Et,{key:1,node:p,onRenameFile:m[4]||(m[4]=s=>r.$emit("renameFile",s)),onSetFilePriority:m[5]||(m[5]=(s,i)=>r.$emit("setFilePriority",s,i))},null,8,["node"])):x("",!0)],64))),256))]),_:1},8,["value"])}}}),Gt=j({__name:"RootNode",props:{root:{}},emits:["renameFolder","renameFile","setFilePriority"],setup(w){return(a,d)=>(u(),F(Q,{density:"compact","select-strategy":"classic"},{default:t(()=>[e(Mt,{node:a.root,onRenameFolder:d[0]||(d[0]=r=>a.$emit("renameFolder",r)),onRenameFile:d[1]||(d[1]=r=>a.$emit("renameFile",r)),onSetFilePriority:d[2]||(d[2]=(r,m)=>a.$emit("setFilePriority",r,m))},null,8,["node"])]),_:1}))}}),Kt=j({__name:"Content",props:{torrent:{},isActive:{type:Boolean}},setup(w){const a=w,d=Ue(),r=oe(),{fileContentInterval:m}=Nt(he()),{pause:h,resume:p}=Je(_,m,{immediate:!1,immediateCallback:!0}),s=V(!1),i=V(!1),b=V([]),{tree:T}=zt(b),P=V(["(root)"]),g=V(""),N=Be({hash:"",isFolder:!1,oldName:""}),O=E({get:()=>b.value.filter(f=>f.priority!==K.DO_NOT_DOWNLOAD).map(f=>f.index),async set(f){const L=b.value.filter(D=>D.priority!==K.DO_NOT_DOWNLOAD).map(D=>D.index),M=L.filter(D=>!f.includes(D)).map(D=>b.value.find(C=>C.index===D)).filter(D=>D&&D.priority!==K.DO_NOT_DOWNLOAD).map(D=>D.index),k=f.filter(D=>!L.includes(D)).map(D=>b.value.find(C=>C.index===D)).filter(D=>D&&D.priority===K.DO_NOT_DOWNLOAD).map(D=>D.index);M.length&&await r.setTorrentFilePriority(a.torrent.hash,M,K.DO_NOT_DOWNLOAD),k.length&&await r.setTorrentFilePriority(a.torrent.hash,k,K.NORMAL),await _()}});async function z(f){N.hash=a.torrent.hash,N.isFolder=f.type==="folder",N.oldName=f.fullName,g.value=d.createDialog(et,N)}async function v(f,L){await r.setTorrentFilePriority(a.torrent.hash,[f.index],L),await _()}async function _(){s.value||(s.value=!0,i.value=!0,await ge(),b.value=await r.fetchFiles(a.torrent.hash),i.value=!1,s.value=!1,await ge())}return me(()=>a.isActive,f=>{f?(p(),_()):h()}),me(()=>d.isDialogOpened(g.value),f=>{f||_()}),Le(()=>{p()}),(f,L)=>(u(),F(ae,{loading:i.value,flat:""},{default:t(()=>[e(Gt,{opened:P.value,"onUpdate:opened":L[0]||(L[0]=M=>P.value=M),selected:O.value,"onUpdate:selected":L[1]||(L[1]=M=>O.value=M),root:o(T),onRenameFolder:z,onRenameFile:z,onSetFilePriority:v},null,8,["opened","selected","root"])]),_:1},8,["loading"]))}}),jt={class:"pl-4"},Ht={class:"pr-4"},q=j({__name:"InfoBase",props:{compact:{type:Boolean}},setup(w){return(a,d)=>(u(),F(S,{cols:"12",sm:"6",lg:"3"},{default:t(()=>[e(ut,{rounded:"xl",class:"d-flex align-center py-2 border"},{default:t(()=>[c("div",jt,[je(a.$slots,"title")]),e(te),c("div",Ht,[je(a.$slots,"text")])]),_:3})]),_:3}))}}),qt={key:0,class:"d-flex gap"},Yt=j({__name:"Info",props:{torrent:{},isActive:{type:Boolean}},setup(w){const a=w,d=oe(),r=Fe(),m=he(),h=E({get:()=>a.torrent.auto_tmm,set:v=>d.toggleAutoTmm([a.torrent.hash],v)}),p=E({get:()=>a.torrent.f_l_piece_prio,set:()=>d.toggleFLPiecePrio([a.torrent.hash])}),s=E({get:()=>a.torrent.forced,set:v=>{v?r.forceResumeTorrents([a.torrent.hash]):r.resumeTorrents([a.torrent.hash])}}),i=E({get:()=>a.torrent.seq_dl,set:()=>d.toggleSeqDl([a.torrent.hash])}),b=E({get:()=>a.torrent.super_seeding,set:v=>d.setSuperSeeding([a.torrent.hash],v)}),T=[{title:"added_on",text:"added_on"},{title:"completed_on",text:"completed_on"},{title:"last_activity",text:"last_activity"},{title:"seen_complete",text:"seen_complete"}],P=[{title:"ratio_time_limit",text:"ratio_time_limit"},{title:"seeding_time",text:"seeding_time"},{title:"time_active",text:"time_active"}],g=[{title:"downloaded",text:"downloaded"},{title:"downloaded_session",text:"downloaded_session"},{title:"uploaded",text:"uploaded"},{title:"uploaded_session",text:"uploaded_session"},{title:"size",text:"size"},{title:"total_size",text:"total_size"},{title:"amount_left",text:"amount_left"},{title:"global_volume",text:"globalVolume"}],N=[{title:"download_limit",text:"dl_limit"},{title:"download_speed",text:"dlspeed"},{title:"upload_limit",text:"up_limit"},{title:"upload_speed",text:"upspeed"},{title:"avg_download_speed",text:"avgDownloadSpeed"},{title:"avg_upload_speed",text:"avgUploadSpeed"},{title:"global_speed",text:"globalSpeed"}],O=[{title:"available_peers",text:"available_peers"},{title:"available_seeds",text:"available_seeds"},{title:"num_leechs",text:"num_leechs"},{title:"num_seeds",text:"num_seeds"},{title:"ratio",text:"ratio"},{title:"ratio_limit",text:"ratio_limit"},{title:"availability",text:"availability"},{title:"eta",text:"eta"},{title:"category",text:"category"},{title:"state",text:"stateString"},{title:"trackers_count",text:"trackers_count"},{title:"priority",text:"priority"}],z=[{title:"content_path",text:"content_path"},{title:"download_path",text:"download_path"},{title:"hash",text:"hash"},{title:"infohash_v1",text:"infohash_v1"},{title:"infohash_v2",text:"infohash_v2"},{title:"magnet",text:"magnet"},{title:"name",text:"name"},{title:"save_path",text:"savePath"},{title:"tracker",text:"tracker"}];return(v,_)=>(u(),F(Q,null,{default:t(()=>[e(W,null,{default:t(()=>[e(dt,null,{default:t(()=>[e(X,{title:v.$t("torrentDetail.info.datetime_values")},{default:t(()=>[e(Z,null,{default:t(()=>[e(I,null,{default:t(()=>[(u(),$(U,null,R(T,f=>e(q,null,Ft({title:t(()=>[y(l(v.$t(`torrent.properties.${f.title}`)),1)]),_:2},[v.torrent[f.text]>0?{name:"text",fn:t(()=>[y(l(o(He)(v.torrent[f.text]*1e3).format(o(m).dateFormat??"DD/MM/YYYY, HH:mm:ss")),1)]),key:"0"}:{name:"text",fn:t(()=>[y(l(v.$t("common.NA")),1)]),key:"1"}]),1024)),64))]),_:1})]),_:1})]),_:1},8,["title"]),e(X,{title:v.$t("torrentDetail.info.duration_values")},{default:t(()=>[e(Z,null,{default:t(()=>[e(I,null,{default:t(()=>[(u(),$(U,null,R(P,f=>e(q,null,{title:t(()=>[y(l(v.$t(`torrent.properties.${f.title}`)),1)]),text:t(()=>[y(l(o(He).duration(v.torrent[f.text],"s").humanize()),1)]),_:2},1024)),64))]),_:1})]),_:1})]),_:1},8,["title"]),e(X,{title:v.$t("torrentDetail.info.boolean_values")},{default:t(()=>[e(Z,null,{default:t(()=>[e(I,null,{default:t(()=>[e(q,null,{title:t(()=>[e(pe,{modelValue:h.value,"onUpdate:modelValue":_[0]||(_[0]=f=>h.value=f),"hide-details":"",density:"compact",label:v.$t("torrent.properties.auto_tmm")},null,8,["modelValue","label"])]),_:1}),e(q,null,{title:t(()=>[e(pe,{modelValue:p.value,"onUpdate:modelValue":_[1]||(_[1]=f=>p.value=f),"hide-details":"",density:"compact",label:v.$t("torrent.properties.f_l_piece_prio")},null,8,["modelValue","label"])]),_:1}),e(q,null,{title:t(()=>[e(pe,{modelValue:s.value,"onUpdate:modelValue":_[2]||(_[2]=f=>s.value=f),"hide-details":"",density:"compact",label:v.$t("torrent.properties.forced")},null,8,["modelValue","label"])]),_:1}),e(q,null,{title:t(()=>[e(pe,{modelValue:i.value,"onUpdate:modelValue":_[3]||(_[3]=f=>i.value=f),"hide-details":"",density:"compact",label:v.$t("torrent.properties.seq_dl")},null,8,["modelValue","label"])]),_:1}),e(q,null,{title:t(()=>[e(pe,{modelValue:b.value,"onUpdate:modelValue":_[4]||(_[4]=f=>b.value=f),"hide-details":"",density:"compact",label:v.$t("torrent.properties.super_seeding")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1})]),_:1},8,["title"]),e(X,{title:v.$t("torrentDetail.info.data_values")},{default:t(()=>[e(Z,null,{default:t(()=>[e(I,null,{default:t(()=>[(u(),$(U,null,R(g,f=>e(q,null,{title:t(()=>[y(l(v.$t(`torrent.properties.${f.title}`)),1)]),text:t(()=>[y(l(o(J)(v.torrent[f.text],o(m).useBinarySize)),1)]),_:2},1024)),64))]),_:1})]),_:1})]),_:1},8,["title"]),e(X,{title:v.$t("torrentDetail.info.speed_values")},{default:t(()=>[e(Z,null,{default:t(()=>[e(I,null,{default:t(()=>[(u(),$(U,null,R(N,f=>e(q,null,{title:t(()=>[y(l(v.$t(`torrent.properties.${f.title}`)),1)]),text:t(()=>[y(l(o(ee)(v.torrent[f.text],o(m).useBitSpeed)),1)]),_:2},1024)),64))]),_:1})]),_:1})]),_:1},8,["title"]),e(X,{title:v.$t("torrentDetail.info.text_values")},{default:t(()=>[e(Z,null,{default:t(()=>[e(I,null,{default:t(()=>[(u(),$(U,null,R(O,f=>e(q,null,{title:t(()=>[y(l(v.$t(`torrent.properties.${f.title}`)),1)]),text:t(()=>[y(l(v.torrent[f.text]),1)]),_:2},1024)),64))]),_:1})]),_:1})]),_:1},8,["title"]),e(X,{title:v.$t("torrentDetail.info.long_text_values")},{default:t(()=>[e(Z,null,{default:t(()=>[e(Q,null,{default:t(()=>[(u(),$(U,null,R(z,f=>e(W,{title:v.$t(`torrent.properties.${f.title}`)},{default:t(()=>[e(Ne,null,{default:t(()=>[y(l(v.torrent[f.text]),1)]),_:2},1024)]),_:2},1032,["title"])),64)),e(W,{title:v.$t("torrent.properties.tags")},{default:t(()=>[v.torrent.tags?.length?(u(),$("div",qt,[(u(!0),$(U,null,R(v.torrent.tags,f=>(u(),F(de,{variant:"flat",color:"tag"},{default:t(()=>[y(l(f),1)]),_:2},1024))),256))])):(u(),F(Ne,{key:1},{default:t(()=>[y(l(v.$t("torrent.properties.empty_tags")),1)]),_:1}))]),_:1},8,["title"])]),_:1})]),_:1})]),_:1},8,["title"])]),_:1})]),_:1})]),_:1}))}});const Jt=Ce(Yt,[["__scopeId","data-v-bb1329d2"]]),Qt=["href"],Xt={key:1},Zt={class:"my-1"},el={class:"mr-2"},tl={key:0},ll={key:2},al={key:0},ol={key:1},nl={key:2},rl={key:3},il={key:4},sl={key:0},ul=j({__name:"Overview",props:{torrent:{},isActive:{type:Boolean}},setup(w){const a=w,{t:d}=ne(),r=At(),m=Ue(),h=oe(),p=Fe(),s=he(),i=V(),b=V(""),T=V(0),P=V([]),g=V(0),N=V(0),O=V(""),z=V(0),v=V(0),_=V(0),f=V(0),L=E(()=>`torrent-${a.torrent.state}`),M=E(()=>`${parseInt(ct(z.value,!0))} ${mt(z.value,!0)}`),k=E(()=>a.torrent.state===ft.META_DL),D=E(()=>!k.value&&_.value>0&&_.value<s.canvasRenderThreshold),C=E(()=>D.value&&_.value<s.canvasRefreshThreshold);async function we(){const n=await p.getTorrentProperties(a.torrent.hash);b.value=n.comment,T.value=n.dl_speed_avg,_.value=n.pieces_num,v.value=n.pieces_have,z.value=n.piece_size,f.value=n.up_speed_avg}async function H(){P.value=await h.fetchFiles(a.torrent.hash),N.value=P.value.length;const n=P.value.filter(G=>G.priority!==K.DO_NOT_DOWNLOAD);g.value=n.length,g.value===1&&(O.value=n[0].name)}async function Ee(){if(!i.value)return;const n=await h.fetchPieceState(a.torrent.hash);i.value.width=n.length||-1;const G=i.value.getContext("2d");G.clearRect(0,0,i.value.width,i.value.height);let B="",re=1;for(let ie=0;ie<n.length;++ie){const Pe=n[ie];let fe="";if(Pe===$e.DOWNLOADING)fe=r.current.value.colors["torrent-downloading"];else if(Pe===$e.DOWNLOADED)fe=r.current.value.colors["torrent-pausedUP"];else if(Pe===$e.MISSING){const ot=P.value.filter(ve=>ve.priority!==K.DO_NOT_DOWNLOAD).map(ve=>ve.piece_range);for(const[ve,nt]of ot)if(ie>ve&&ie<nt){fe=r.current.value.colors["torrent-pausedDL"];break}}if(fe===B){++re;continue}B!==""&&(G.fillStyle=B,G.fillRect(ie-re,0,re,i.value.height)),re=1,B=fe}B!==""&&(G.fillStyle=B,G.fillRect(n.length-re,0,re,i.value.height))}async function tt(){await navigator.clipboard.writeText(a.torrent.hash)}function De(n){m.createDialog(Pt,{hashes:[a.torrent.hash],mode:n})}function We(){m.createDialog(et,{hash:a.torrent.hash,isFolder:!1,oldName:O.value})}const{resume:lt,pause:at}=Je(async()=>{await H(),C.value&&await Ee()},s.fileContentInterval,{immediate:!0,immediateCallback:!0});me(()=>a.isActive,n=>{n?lt():at()}),me(()=>a.torrent,async()=>{await we()});function Me(n){if(m.hasActiveDialog)return!1;if(n.key==="d")return n.preventDefault(),De("dl"),!0;if(n.key==="s")return n.preventDefault(),De("save"),!0;if(n.key==="f"&&g.value===1)return n.preventDefault(),We(),!0}return Le(()=>{document.addEventListener("keydown",Me)}),Re(()=>{document.removeEventListener("keydown",Me)}),(n,G)=>n.torrent?(u(),F(ae,{key:0},{default:t(()=>[e(_e,{class:"text-wrap"},{default:t(()=>[y(l(n.torrent.name),1)]),_:1}),e(_t,null,{default:t(()=>[c("div",null,[(u(!0),$(U,null,R(o(pt)(b.value),B=>(u(),$("span",null,[o(vt)(B)?(u(),$("a",{key:0,target:"_blank",href:B},l(B),9,Qt)):(u(),$("span",Xt,l(B),1))]))),256))]),c("div",Zt,[c("span",el,l(n.torrent.hash),1),e(A,{variant:"outlined",rounded:"",onClick:tt},{default:t(()=>[y(l(n.$t("torrentDetail.overview.copy_hash")),1)]),_:1})])]),_:1}),e(ce,null,{default:t(()=>[e(I,null,{default:t(()=>[e(S,{cols:"12",md:"6"},{default:t(()=>[e(I,null,{default:t(()=>[e(S,{cols:"4"},{default:t(()=>[e(gt,{color:L.value,indeterminate:k.value,size:100,"model-value":n.torrent?.progress*100,width:15},{default:t(()=>[k.value?(u(),$("span",tl,l(n.$t("torrentDetail.overview.fetchingMetadata")),1)):n.torrent.progress===1?(u(),F(le,{key:1,icon:"mdi-check",size:"x-large"})):(u(),$("span",ll,l(o(Ve)(n.torrent.progress)),1))]),_:1},8,["color","indeterminate","model-value"])]),_:1}),e(S,{cols:"8",class:"d-flex flex-column align-center justify-center"},{default:t(()=>[k.value?(u(),$("div",al,[c("span",null,l(n.$t("torrentDetail.overview.waitingForMetadata")),1)])):D.value?(u(),$("div",ol,[c("canvas",{ref_key:"canvas",ref:i,width:"0",height:"10"},null,512)])):x("",!0),!k.value&&!D.value?(u(),$("div",nl,[c("span",null,l(n.$t("torrentDetail.overview.canvasRenderDisabled")),1)])):!k.value&&!C.value?(u(),$("div",rl,[c("span",null,l(n.$t("torrentDetail.overview.canvasRefreshDisabled")),1)])):x("",!0),_.value>0?(u(),$("div",il,[c("span",null,l(o(d)("torrentDetail.overview.pieceCount",{owned:v.value,total:_.value,pieceSize:M.value})),1)])):x("",!0),c("div",null,[e(le,{icon:"mdi-arrow-down"}),y(" "+l(o(ee)(n.torrent.dlspeed,o(s).useBitSpeed))+" ",1),e(le,{icon:"mdi-arrow-up"}),y(" "+l(o(ee)(n.torrent.upspeed,o(s).useBitSpeed)),1)])]),_:1})]),_:1}),e(I,null,{default:t(()=>[e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrent.properties.download_path"))+":",1),c("div",null,l(n.torrent.download_path),1),e(A,{icon:"mdi-pencil",color:"accent",size:"x-small",onClick:G[0]||(G[0]=B=>De("dl"))})]),_:1}),e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrentDetail.overview.fileCount"))+":",1),c("div",null,l(g.value)+" / "+l(N.value),1),g.value===1?(u(),$("div",sl,l(O.value),1)):x("",!0),g.value===1?(u(),F(A,{key:1,icon:"mdi-pencil",color:"accent",size:"x-small",onClick:We})):x("",!0)]),_:1})]),_:1}),e(I,null,{default:t(()=>[e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrent.properties.save_path"))+":",1),c("div",null,l(n.torrent.savePath),1),e(A,{icon:"mdi-pencil",color:"accent",size:"x-small",onClick:G[1]||(G[1]=B=>De("save"))})]),_:1}),e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrent.properties.content_path"))+":",1),c("div",null,l(n.torrent.content_path),1)]),_:1})]),_:1})]),_:1}),e(S,{cols:"12",md:"6"},{default:t(()=>[e(I,null,{default:t(()=>[e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrent.properties.state"))+":",1),e(de,{variant:"flat",color:L.value},{default:t(()=>[y(l(n.$t(`torrent.state.${n.torrent.state}`)),1)]),_:1},8,["color"])]),_:1}),e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrent.properties.category"))+":",1),e(de,{variant:"flat",color:"category"},{default:t(()=>[y(l(n.torrent.category.length?n.torrent.category:n.$t("navbar.side.filters.uncategorized")),1)]),_:1})]),_:1})]),_:1}),e(I,null,{default:t(()=>[e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrent.properties.tracker"))+":",1),e(de,{variant:"flat",color:"tracker"},{default:t(()=>[y(l(n.torrent.tracker?o(yt)(n.torrent.tracker):n.$t("navbar.side.filters.untracked")),1)]),_:1})]),_:1}),e(S,{cols:"6",class:"d-flex flex-wrap chipgap"},{default:t(()=>[c("div",null,l(n.$t("torrent.properties.tags"))+":",1),n.torrent.tags?(u(!0),$(U,{key:0},R(n.torrent.tags,B=>(u(),F(de,{key:B,variant:"flat",color:"tag"},{default:t(()=>[y(l(B),1)]),_:2},1024))),128)):x("",!0),!n.torrent.tags||n.torrent.tags.length===0?(u(),F(de,{key:1,variant:"flat",color:"tag"},{default:t(()=>[y(l(n.$t("navbar.side.filters.untagged")),1)]),_:1})):x("",!0)]),_:1})]),_:1}),e(I,null,{default:t(()=>[e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrentDetail.overview.selectedFileSize"))+":",1),c("div",null,l(o(J)(n.torrent.size,o(s).useBinarySize))+" / "+l(o(J)(n.torrent.total_size,o(s).useBinarySize)),1)]),_:1}),e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrentDetail.overview.ratio"))+":",1),c("div",null,l(n.torrent.ratio),1)]),_:1})]),_:1}),e(I,null,{default:t(()=>[e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrentDetail.overview.downloaded"))+":",1),c("div",null,l(o(J)(n.torrent.downloaded,o(s).useBinarySize)),1)]),_:1}),e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrentDetail.overview.uploaded"))+":",1),c("div",null,l(o(J)(n.torrent.uploaded,o(s).useBinarySize)),1)]),_:1})]),_:1}),e(I,null,{default:t(()=>[e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrentDetail.overview.dlSpeedAverage"))+":",1),c("div",null,l(o(ee)(T.value,o(s).useBitSpeed)),1)]),_:1}),e(S,{cols:"6"},{default:t(()=>[c("div",null,l(n.$t("torrentDetail.overview.upSpeedAverage"))+":",1),c("div",null,l(o(ee)(f.value,o(s).useBitSpeed)),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):x("",!0)}});const dl=Ce(ul,[["__scopeId","data-v-0d43f850"]]),cl={class:"d-flex"},ml={key:0},fl=["alt","src","title"],vl=["title"],pl={class:"text-subtitle-2 text-grey"},_l=["title"],gl={class:"d-flex flex-column"},yl={class:"text-h5"},hl=j({__name:"Peers",props:{torrent:{},isActive:{type:Boolean}},setup(w){const a=w,{t:d}=ne(),r=oe(),m=he(),h=V(!1),p=V([]),s=V(""),i=V(null),b=V(!1);async function T(){h.value=!0,p.value=Object.entries((await r.getTorrentPeers(a.torrent.hash)).peers).map(([z,v])=>({...v,host:z})),h.value=!1}async function P(){s.value.length&&(await r.addTorrentPeers(a.torrent.hash,s.value.split(`
|
||||
`)),await T(),g())}function g(){b.value=!1,s.value=""}async function N(z){await r.banPeers([z.host]),await T()}async function O(z){z??a.isActive?(await T(),i.value=setInterval(T,5e3)):(clearInterval(i.value),i.value=null)}return Se(O),Re(()=>O(!1)),me(()=>a.isActive,O),(z,v)=>(u(),F(Q,null,{default:t(()=>[(u(!0),$(U,null,R(p.value,(_,f)=>(u(),$(U,null,[f>0?(u(),F(Ie,{key:0,color:"white"})):x("",!0),e(W,null,{default:t(()=>[c("div",cl,[c("div",null,[e(ze,{class:"overflow-visible text-select"},{default:t(()=>[_.country_code?(u(),$("span",ml,[o(ht)?(u(),$("img",{key:0,alt:o(Ae)(_.country_code).char,src:o(Ae)(_.country_code).url,title:_.country,style:{"max-width":"32px"}},null,8,fl)):(u(),$("span",{key:1,title:_.country},l(o(Ae)(_.country_code).char),9,vl))])):x("",!0),c("span",null,l(_.ip),1),c("span",pl," :"+l(_.port),1)]),_:2},1024),e(Ne,{class:"d-block"},{default:t(()=>[c("div",null,[y(" Flags: "),c("span",{class:"cursor-help",title:_.flags_desc},l(_.flags),9,_l)]),c("div",null,"Progress: "+l(o(Ve)(_.progress)),1),c("div",null,[e(le,{icon:"mdi-arrow-down",color:"download"}),y(" "+l(o(ee)(_.dl_speed,o(m).useBitSpeed))+" ",1),e(le,{icon:"mdi-arrow-up",color:"upload"}),y(" "+l(o(ee)(_.up_speed,o(m).useBitSpeed)),1)]),c("div",null,l(o(J)(_.downloaded,o(m).useBinarySize))+" | "+l(o(J)(_.uploaded,o(m).useBinarySize)),1),c("div",null,"Relevance: "+l(o(Ve)(_.relevance)),1)]),_:2},1024)]),e(te),c("div",gl,[e(A,{color:"red",icon:"mdi-cancel",variant:"text",onClick:L=>N(_)},null,8,["onClick"])])])]),_:2},1024)],64))),256)),p.value.length===0?(u(),F(W,{key:0},{default:t(()=>[y(l(z.$t("torrentDetail.peers.emptyList")),1)]),_:1})):x("",!0),e(W,null,{default:t(()=>[c("div",{class:xe(["d-flex gap py-5",z.$vuetify.display.mobile?"flex-column":"justify-space-evenly"])},[e(be,{modelValue:b.value,"onUpdate:modelValue":v[1]||(v[1]=_=>b.value=_),"max-width":"750px"},{activator:t(({props:_})=>[e(A,ye(_,{variant:"flat",text:o(d)("torrentDetail.peers.addPeers.title"),color:"accent"}),null,16,["text"])]),default:t(()=>[e(ae,null,{default:t(()=>[e(_e,null,{default:t(()=>[c("span",yl,l(o(d)("torrentDetail.peers.addPeers.title")),1)]),_:1}),e(ce,null,{default:t(()=>[e(Qe,null,{default:t(()=>[e(I,null,{default:t(()=>[e(S,{cols:"12"},{default:t(()=>[e(Xe,{modelValue:s.value,"onUpdate:modelValue":v[0]||(v[0]=_=>s.value=_),label:o(d)("torrentDetail.peers.addPeers.newPeers"),placeholder:o(d)("torrentDetail.peers.addPeers.newPeersPlaceholder"),hint:o(d)("torrentDetail.peers.addPeers.newPeersHint")},null,8,["modelValue","label","placeholder","hint"])]),_:1})]),_:1})]),_:1})]),_:1}),e(Te,null,{default:t(()=>[e(te),e(A,{color:"error",onClick:g},{default:t(()=>[y(l(o(d)("common.cancel")),1)]),_:1}),e(A,{color:"accent",onClick:P},{default:t(()=>[y(l(o(d)("common.ok")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],2)]),_:1})]),_:1}))}});const wl=Ce(hl,[["__scopeId","data-v-04aee0ca"]]),Dl=j({__name:"TagsAndCategories",props:{torrent:{},isActive:{type:Boolean}},setup(w){const a=w,d=oe(),r=Fe(),m=E(()=>d.categories.map(i=>i.name).indexOf(a.torrent.category)),h=E(()=>d.tags.filter(i=>a.torrent.tags?.includes(i)));async function p(i){a.torrent.category===i?await r.setTorrentCategory([a.torrent.hash],""):await r.setTorrentCategory([a.torrent.hash],i)}async function s(i){a.torrent.tags?.includes(i)?await r.removeTorrentTags([a.torrent.hash],[i]):await r.addTorrentTags([a.torrent.hash],[i])}return Se(async()=>{await d.fetchCategories(),await d.fetchTags()}),(i,b)=>(u(),F(ae,null,{default:t(()=>[e(ce,null,{default:t(()=>[e(I,null,{default:t(()=>[e(S,{cols:"12",md:"6"},{default:t(()=>[e(Ge,{"model-value":h.value,multiple:""},{default:t(()=>[e(Q,null,{default:t(()=>[e(Ke,null,{default:t(()=>[y(l(i.$t("torrentDetail.tagsAndCategories.tags")),1)]),_:1}),(u(!0),$(U,null,R(o(d).tags,T=>(u(),F(W,{title:T,variant:i.torrent.tags?.includes(T)?"tonal":void 0,"base-color":i.torrent.tags?.includes(T)?"accent":void 0,onClick:P=>s(T)},null,8,["title","variant","base-color","onClick"]))),256))]),_:1})]),_:1},8,["model-value"])]),_:1}),e(S,{cols:"12",md:"6"},{default:t(()=>[e(Ge,{"model-value":m.value},{default:t(()=>[e(Q,null,{default:t(()=>[e(Ke,null,{default:t(()=>[y(l(i.$t("torrentDetail.tagsAndCategories.categories")),1)]),_:1}),(u(!0),$(U,null,R(o(d).categories,T=>(u(),F(W,{title:T.name,variant:T.name===a.torrent.category?"tonal":void 0,"base-color":T.name===a.torrent.category?"accent":void 0,onClick:P=>p(T.name)},null,8,["title","variant","base-color","onClick"]))),256))]),_:1})]),_:1},8,["model-value"])]),_:1})]),_:1})]),_:1})]),_:1}))}}),$l={class:"d-flex"},kl={key:0},Tl={key:1},bl={key:2},Vl={key:3},Nl={key:0,class:"d-flex flex-column"},Fl={class:"text-h5"},Cl={class:"text-h5"},Sl=j({__name:"Trackers",props:{torrent:{},isActive:{type:Boolean}},setup(w){const a=w,{t:d}=ne(),r=oe();function m(k){switch(k){case Y.DISABLED:return d("constants.trackerStatus.disabled");case Y.NOT_YET_CONTACTED:return d("constants.trackerStatus.not_yet_contacted");case Y.WORKING:return d("constants.trackerStatus.working");case Y.UPDATING:return d("constants.trackerStatus.updating");case Y.NOT_WORKING:return d("constants.trackerStatus.not_working");default:return""}}function h(k){return typeof k=="number"?k===-1?"N/A":k.valueOf():!k||k.num_peers===-1||k?.num_seeds===-1||k?.num_leeches===-1?"N/A":d("torrentDetail.trackers.peersValue",{peers:k.num_peers,seeds:k.num_seeds,leeches:k.num_leeches})}const p=V(!1),s=V([]),i=V(""),b=V(null),T=V(!1),P=[k=>!!k||d("torrentDetail.trackers.editTracker.newUrlRequired")],g=Be({isVisible:!1,isFormValid:!1,oldUrl:"",newUrl:""});function N(k){g.isVisible=!0,g.oldUrl=k.url,g.newUrl=k.url,ge(()=>{document.getElementById("input")?.select()})}async function O(){p.value=!0,s.value=(await r.getTorrentTrackers(a.torrent.hash)).map(k=>({...k,isSelectable:k.tier!==-1})),p.value=!1}async function z(){i.value.length&&(await r.addTorrentTrackers(a.torrent.hash,i.value),await O(),v())}function v(){T.value=!1,i.value=""}async function _(){g.isFormValid&&(await r.editTorrentTracker(a.torrent.hash,g.oldUrl,g.newUrl),g.isVisible=!1,await O())}async function f(k){await r.removeTorrentTrackers(a.torrent.hash,[k.url]),await O()}async function L(){await r.reannounceTorrents([a.torrent.hash])}async function M(k){k??a.isActive?(await O(),b.value=setInterval(O,5e3)):(clearInterval(b.value),b.value=null)}return Se(M),Re(()=>M(!1)),me(()=>a.isActive,M),(k,D)=>(u(),F(Q,null,{default:t(()=>[(u(!0),$(U,null,R(s.value,(C,we)=>(u(),$(U,null,[we===3?(u(),F(Ie,{key:0,color:"white",thickness:"5"})):we>0?(u(),F(Ie,{key:1,class:"mx-5",color:"white"})):x("",!0),e(W,null,{default:t(()=>[c("div",$l,[c("div",{class:xe(`tracker-${o(Y)[C.status].toLowerCase()}`)},[e(ze,{class:"text-break text-wrap"},{default:t(()=>[y(l(C.url),1)]),_:2},1024),e(Ne,{class:"d-block"},{default:t(()=>[C.msg?(u(),$("div",kl,l(C.msg),1)):(u(),$("div",Tl,l(m(C.status)),1)),C.tier>=0?(u(),$("div",bl,l(o(d)("torrentDetail.trackers.tier",C.tier)),1)):x("",!0),C.status!==o(Y).NOT_WORKING?(u(),$("div",Vl,[c("div",null,l(h(C)),1),c("div",null,"Downloads: "+l(h(C.num_downloaded)),1)])):x("",!0)]),_:2},1024)],2),e(te),C.tier>=0?(u(),$("div",Nl,[e(be,{modelValue:g.isVisible,"onUpdate:modelValue":D[4]||(D[4]=H=>g.isVisible=H),"max-width":"750px"},{activator:t(({props:H})=>[e(A,ye(H,{icon:"mdi-pencil",variant:"text",onClick:Ee=>N(C)}),null,16,["onClick"])]),default:t(()=>[e(ae,null,{default:t(()=>[e(_e,null,{default:t(()=>[c("span",Fl,l(o(d)("torrentDetail.trackers.editTracker.title")),1)]),_:1}),e(ce,null,{default:t(()=>[e(o(Ye),{modelValue:g.isFormValid,"onUpdate:modelValue":D[1]||(D[1]=H=>g.isFormValid=H),onSubmit:D[2]||(D[2]=Oe(()=>{},["prevent"]))},{default:t(()=>[e(o(ke),{"model-value":g.oldUrl,disabled:"",label:k.$t("torrentDetail.trackers.editTracker.oldUrl")},null,8,["model-value","label"]),e(o(ke),{modelValue:g.newUrl,"onUpdate:modelValue":D[0]||(D[0]=H=>g.newUrl=H),id:"input",rules:P,label:k.$t("torrentDetail.trackers.editTracker.newUrl"),autofocus:"",onKeydown:Ze(_,["enter"])},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1}),e(Te,null,{default:t(()=>[e(te),e(A,{color:"error",disabled:!g.isFormValid,onClick:D[3]||(D[3]=H=>g.isVisible=!1)},{default:t(()=>[y(l(o(d)("common.cancel")),1)]),_:1},8,["disabled"]),e(A,{color:"accent",onClick:_},{default:t(()=>[y(l(o(d)("common.ok")),1)]),_:1})]),_:1})]),_:1})]),_:2},1032,["modelValue"]),e(A,{color:"red",icon:"mdi-delete",variant:"text",onClick:H=>f(C)},null,8,["onClick"])])):x("",!0)])]),_:2},1024)],64))),256)),e(W,null,{default:t(()=>[c("div",{class:xe(["d-flex gap py-5",k.$vuetify.display.mobile?"flex-column":"justify-space-evenly"])},[e(be,{modelValue:T.value,"onUpdate:modelValue":D[6]||(D[6]=C=>T.value=C),"max-width":"750px"},{activator:t(({props:C})=>[e(A,ye(C,{variant:"flat",text:o(d)("torrentDetail.trackers.addTrackers.title"),color:"accent"}),null,16,["text"])]),default:t(()=>[e(ae,null,{default:t(()=>[e(_e,null,{default:t(()=>[c("span",Cl,l(o(d)("torrentDetail.trackers.addTrackers.title")),1)]),_:1}),e(ce,null,{default:t(()=>[e(Qe,null,{default:t(()=>[e(I,null,{default:t(()=>[e(S,{cols:"12"},{default:t(()=>[e(Xe,{modelValue:i.value,"onUpdate:modelValue":D[5]||(D[5]=C=>i.value=C),label:o(d)("torrentDetail.trackers.addTrackers.newTrackers"),hint:o(d)("torrentDetail.trackers.addTrackers.newTrackersHint")},null,8,["modelValue","label","hint"])]),_:1})]),_:1})]),_:1})]),_:1}),e(Te,null,{default:t(()=>[e(te),e(A,{color:"error",onClick:v},{default:t(()=>[y(l(o(d)("common.cancel")),1)]),_:1}),e(A,{color:"accent",onClick:z},{default:t(()=>[y(l(o(d)("common.ok")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(A,{variant:"flat",disabled:s.value.length===3,text:o(d)("torrentDetail.trackers.reannounce"),color:"primary",onClick:L},null,8,["disabled","text"])],2)]),_:1})]),_:1}))}});const Ol=Ce(Sl,[["__scopeId","data-v-ed947913"]]),Pl={class:"pa-3"},Al={style:{"font-size":"1.6em !important"},class:"subtitle-1 ml-2"},Il={class:"d-flex justify-end"},El=j({__name:"TorrentDetail",setup(w){const a=Ct(),d=St(),{t:r}=ne(),m=Ue(),h=Fe(),p=V("overview"),s=E(()=>a.params.hash),i=E(()=>h.getTorrentByHash(s.value)),b=()=>{d.push({name:"dashboard"})};function T(P){if(m.hasActiveDialog)return!1;if(P.key==="Delete")return m.createDialog(Dt,{hashes:[s.value]}),P.preventDefault(),!0;P.key==="Escape"&&b()}return Le(()=>{document.addEventListener("keydown",T)}),Ot(()=>{document.removeEventListener("keydown",T)}),(P,g)=>(u(),$("div",Pl,[e(I,{"no-gutters":"",align:"center",justify:"center"},{default:t(()=>[e(S,null,{default:t(()=>[c("h1",Al,l(o(r)("torrentDetail.title")),1)]),_:1}),e(S,null,{default:t(()=>[c("div",Il,[e(A,{icon:"mdi-close",variant:"plain",onClick:b})])]),_:1})]),_:1}),e(I,{class:"ma-0 pa-0"},{default:t(()=>[e($t,{modelValue:p.value,"onUpdate:modelValue":g[0]||(g[0]=N=>p.value=N),"bg-color":"primary",grow:"","show-arrows":""},{default:t(()=>[e(se,{value:"overview"},{default:t(()=>[y(l(o(r)("torrentDetail.tabs.overview")),1)]),_:1}),e(se,{value:"info"},{default:t(()=>[y(l(o(r)("torrentDetail.tabs.info")),1)]),_:1}),e(se,{value:"trackers"},{default:t(()=>[y(l(o(r)("torrentDetail.tabs.trackers")),1)]),_:1}),e(se,{value:"peers"},{default:t(()=>[y(l(o(r)("torrentDetail.tabs.peers")),1)]),_:1}),e(se,{value:"content"},{default:t(()=>[y(l(o(r)("torrentDetail.tabs.content")),1)]),_:1}),e(se,{value:"tagsAndCategories"},{default:t(()=>[y(l(o(r)("torrentDetail.tabs.tagsAndCategories")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1}),i.value?(u(),F(wt,{key:0,modelValue:p.value,"onUpdate:modelValue":g[1]||(g[1]=N=>p.value=N),touch:!1},{default:t(()=>[e(ue,{value:"overview"},{default:t(()=>[e(dl,{torrent:i.value,"is-active":p.value==="overview"},null,8,["torrent","is-active"])]),_:1}),e(ue,{value:"info"},{default:t(()=>[e(Jt,{torrent:i.value,"is-active":p.value==="info"},null,8,["torrent","is-active"])]),_:1}),e(ue,{value:"trackers"},{default:t(()=>[e(Ol,{torrent:i.value,"is-active":p.value==="trackers"},null,8,["torrent","is-active"])]),_:1}),e(ue,{value:"peers"},{default:t(()=>[e(wl,{torrent:i.value,"is-active":p.value==="peers"},null,8,["torrent","is-active"])]),_:1}),e(ue,{value:"content"},{default:t(()=>[e(Kt,{torrent:i.value,"is-active":p.value==="content"},null,8,["torrent","is-active"])]),_:1}),e(ue,{value:"tagsAndCategories"},{default:t(()=>[e(Dl,{torrent:i.value,"is-active":p.value==="tagsAndCategories"},null,8,["torrent","is-active"])]),_:1})]),_:1},8,["modelValue"])):x("",!0)]))}});export{El as default};
|
||||
1
qbit/vuetorrent/public/assets/TorrentDetail-CRgleE6R.css
Normal file
1
qbit/vuetorrent/public/assets/TorrentDetail-CRgleE6R.css
Normal file
@@ -0,0 +1 @@
|
||||
.spacer[data-v-68d0ffb7]{margin-left:8px;margin-right:16px}.v-theme--darkTheme .selected[data-v-68d0ffb7]{background-color:rgb(var(--v-theme-surface));filter:brightness(135%)}.v-theme--lightTheme .selected[data-v-68d0ffb7]{background-color:rgb(var(--v-theme-surface));filter:brightness(75%)}#_tree-root{font-size:medium;list-style-type:none}#_tree-root div.v-virtual-scroll__item{padding-top:8px}#_tree-root div.v-virtual-scroll__item:first-child{padding-top:0}#_tree-root div.v-virtual-scroll__item:last-child{padding-bottom:8px}.gap[data-v-074ad8b6]{gap:8px}canvas[data-v-212dd1f4]{height:100%;width:100%}.chipgap[data-v-aeeb04ab]{gap:4px}.gap[data-v-ceb5c391]{gap:8px}.cursor-help[data-v-ceb5c391]{cursor:help}.gap[data-v-ed947913]{gap:8px}.v-theme--darkTheme .tracker-disabled[data-v-ed947913]{color:#c6c6c6}.v-theme--darkTheme .tracker-not_yet_contacted[data-v-ed947913]{color:orange}.v-theme--darkTheme .tracker-working[data-v-ed947913]{color:#90ee90}.v-theme--darkTheme .tracker-not_working[data-v-ed947913]{color:#f08080}.v-theme--darkTheme .tracker-updating[data-v-ed947913]{color:#add8e6}.v-theme--lightTheme .tracker-disabled[data-v-ed947913]{color:gray}.v-theme--lightTheme .tracker-not_yet_contacted[data-v-ed947913]{color:orange}.v-theme--lightTheme .tracker-working[data-v-ed947913]{color:green}.v-theme--lightTheme .tracker-not_working[data-v-ed947913]{color:red}.v-theme--lightTheme .tracker-updating[data-v-ed947913]{color:#1e90ff}
|
||||
13
qbit/vuetorrent/public/assets/TorrentDetail-DUzghTWr.js
Normal file
13
qbit/vuetorrent/public/assets/TorrentDetail-DUzghTWr.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
.gap[data-v-bb1329d2]{gap:8px}canvas[data-v-0d43f850]{height:100%;width:100%}.chipgap[data-v-0d43f850]{gap:4px}.gap[data-v-04aee0ca]{gap:8px}.cursor-help[data-v-04aee0ca]{cursor:help}.gap[data-v-ed947913]{gap:8px}.v-theme--darkTheme .tracker-disabled[data-v-ed947913]{color:#c6c6c6}.v-theme--darkTheme .tracker-not_yet_contacted[data-v-ed947913]{color:orange}.v-theme--darkTheme .tracker-working[data-v-ed947913]{color:#90ee90}.v-theme--darkTheme .tracker-not_working[data-v-ed947913]{color:#f08080}.v-theme--darkTheme .tracker-updating[data-v-ed947913]{color:#add8e6}.v-theme--lightTheme .tracker-disabled[data-v-ed947913]{color:gray}.v-theme--lightTheme .tracker-not_yet_contacted[data-v-ed947913]{color:orange}.v-theme--lightTheme .tracker-working[data-v-ed947913]{color:green}.v-theme--lightTheme .tracker-not_working[data-v-ed947913]{color:red}.v-theme--lightTheme .tracker-updating[data-v-ed947913]{color:#1e90ff}
|
||||
156
qbit/vuetorrent/public/assets/WebGLRenderer-C3gVMANR.js
Normal file
156
qbit/vuetorrent/public/assets/WebGLRenderer-C3gVMANR.js
Normal file
@@ -0,0 +1,156 @@
|
||||
import{M as j,E as l,B as T,D as y,w as m,N as Ae,k as E,i as K,S as v,R as L,h as Be,d as x,j as $,e as p,A as Ne,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{S as C,j as U,k as z,m as Y,n as G,b as R,h as q,f as Ie,U as P,o as Z,R as De,__tla as __tla_1}from"./colorToUniform-DavgjoLv.js";import{b as Q,__tla as __tla_2}from"./batchSamplersUniformGroup-CKlXTtMl.js";import{e as ye,G as Ce,c as Ue,b as Ge,U as Pe,R as Oe,B as J,d as A,f as Fe,S as Me,a as Le,__tla as __tla_3}from"./SharedSystems-Do60oLa7.js";import{__tla as __tla_4}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Bt9E0pwX.js";import{__tla as __tla_5}from"./index-bUuJUL5l.js";import"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";import{__tla as __tla_6}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-CJmQtbIM.js";let Ht;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})()]).then(async()=>{class ee{constructor(){this._didUpload=!1,this._tempState=C.for2d()}init(e){const r=U({name:"batch",bits:[z,Y(j),G]});this._shader=new R({glProgram:r,resources:{batchSamplers:Q}}),e.renderer.runners.contextChange.add(this)}contextChange(){this._didUpload=!1}start(e,r){const s=e.renderer;s.shader.bind(this._shader,this._didUpload),s.shader.updateUniformGroup(s.globalUniforms.uniformGroup),s.geometry.bind(r,this._shader.glProgram)}execute(e,r){const s=e.renderer;this._didUpload=!0,this._tempState.blendMode=r.blendMode,s.state.set(this._tempState);const n=r.textures.textures;for(let i=0;i<n.length;i++)s.texture.bind(n[i],i);s.geometry.draw("triangle-list",r.size,r.start)}destroy(){this._shader.destroy(!0),this._shader=null}}ee.extension={type:[l.WebGLPipesAdaptor],name:"batch"};var g=(t=>(t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t))(g||{});class He{constructor(e,r){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.type=r}}class te{constructor(e){this._gpuBuffers=Object.create(null),this._boundBufferBases=Object.create(null),this._renderer=e}destroy(){this._renderer=null,this._gl=null,this._gpuBuffers=null,this._boundBufferBases=null}contextChange(){this._gpuBuffers=Object.create(null),this._gl=this._renderer.gl}getGlBuffer(e){return this._gpuBuffers[e.uid]||this.createGLBuffer(e)}bind(e){const{_gl:r}=this,s=this.getGlBuffer(e);r.bindBuffer(s.type,s.buffer)}bindBufferBase(e,r){const{_gl:s}=this;if(this._boundBufferBases[r]!==e){const n=this.getGlBuffer(e);this._boundBufferBases[r]=e,s.bindBufferBase(s.UNIFORM_BUFFER,r,n.buffer)}}bindBufferRange(e,r,s){const{_gl:n}=this;s=s||0;const i=this.getGlBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,r||0,i.buffer,s*256,256)}updateBuffer(e){const{_gl:r}=this,s=this.getGlBuffer(e);if(e._updateID===s.updateID)return s;s.updateID=e._updateID,r.bindBuffer(s.type,s.buffer);const n=e.data;if(s.byteLength>=e.data.byteLength)r.bufferSubData(s.type,0,n,0,e._updateSize/n.BYTES_PER_ELEMENT);else{const i=e.descriptor.usage&T.STATIC?r.STATIC_DRAW:r.DYNAMIC_DRAW;s.byteLength=n.byteLength,r.bufferData(s.type,n,i)}return s}destroyAll(){const e=this._gl;for(const r in this._gpuBuffers)e.deleteBuffer(this._gpuBuffers[r].buffer);this._gpuBuffers=Object.create(null)}onBufferDestroy(e,r){const s=this._gpuBuffers[e.uid],n=this._gl;r||n.deleteBuffer(s.buffer),this._gpuBuffers[e.uid]=null}createGLBuffer(e){const{_gl:r}=this;let s=g.ARRAY_BUFFER;e.descriptor.usage&T.INDEX?s=g.ELEMENT_ARRAY_BUFFER:e.descriptor.usage&T.UNIFORM&&(s=g.UNIFORM_BUFFER);const n=new He(r.createBuffer(),s);return this._gpuBuffers[e.uid]=n,e.on("destroy",this.onBufferDestroy,this),n}}te.extension={type:[l.WebGLSystem],name:"buffer"};const O=class re{constructor(e){this.supports={uint32Indices:!0,uniformBufferObject:!0,vertexArrayObject:!0,srgbTextures:!0,nonPowOf2wrapping:!0,msaa:!0,nonPowOf2mipmaps:!0},this._renderer=e,this.extensions=Object.create(null),this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this._renderer.gl=e}init(e){if(e={...re.defaultOptions,...e},e.context)this.initFromContext(e.context);else{const r=this._renderer.background.alpha<1,s=e.premultipliedAlpha??!0,n=e.antialias&&!this._renderer.backBuffer.useBackBuffer;this.createContext(e.preferWebGLVersion,{alpha:r,premultipliedAlpha:s,antialias:n,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference??"default"})}}initFromContext(e){this.gl=e,this.webGLVersion=e instanceof y.get().getWebGL2RenderingContext()?2:1,this.getExtensions(),this.validateContext(e),this._renderer.runners.contextChange.emit(e);const r=this._renderer.view.canvas;r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}createContext(e,r){let s;const n=this._renderer.view.canvas;if(e===2&&(s=n.getContext("webgl2",r)),!s&&(s=n.getContext("webgl",r),!s))throw new Error("This browser does not support WebGL. Try using the canvas renderer");this.gl=s,this.initFromContext(this.gl)}getExtensions(){const{gl:e}=this,r={anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc"),rgtc:e.getExtension("EXT_texture_compression_rgtc"),loseContext:e.getExtension("WEBGL_lose_context")};this.webGLVersion===1?this.extensions={...r,drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear"),vertexAttribDivisorANGLE:e.getExtension("ANGLE_instanced_arrays"),srgb:e.getExtension("EXT_sRGB")}:this.extensions={...r,colorBufferFloat:e.getExtension("EXT_color_buffer_float")}}handleContextLost(e){e.preventDefault(),this._contextLossForced&&(this._contextLossForced=!1,setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext?.restoreContext()},0))}handleContextRestored(){this._renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this._renderer.view.canvas;this._renderer=null,e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext?.loseContext()}forceContextLoss(){this.extensions.loseContext?.loseContext(),this._contextLossForced=!0}validateContext(e){const r=e.getContextAttributes();r&&!r.stencil&&m("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const s=this.supports,n=this.webGLVersion===2,i=this.extensions;s.uint32Indices=n||!!i.uint32ElementIndex,s.uniformBufferObject=n,s.vertexArrayObject=n||!!i.vertexArrayObject,s.srgbTextures=n||!!i.srgb,s.nonPowOf2wrapping=n,s.nonPowOf2mipmaps=n,s.msaa=n,s.uint32Indices||m("Provided WebGL context does not support 32 index buffer, large scenes may not render correctly")}};O.extension={type:[l.WebGLSystem],name:"context"};O.defaultOptions={context:null,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:void 0,preferWebGLVersion:2};let we=O;var I=(t=>(t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t))(I||{}),se=(t=>(t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t))(se||{}),f=(t=>(t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT",t))(f||{});const H={uint8x2:f.UNSIGNED_BYTE,uint8x4:f.UNSIGNED_BYTE,sint8x2:f.BYTE,sint8x4:f.BYTE,unorm8x2:f.UNSIGNED_BYTE,unorm8x4:f.UNSIGNED_BYTE,snorm8x2:f.BYTE,snorm8x4:f.BYTE,uint16x2:f.UNSIGNED_SHORT,uint16x4:f.UNSIGNED_SHORT,sint16x2:f.SHORT,sint16x4:f.SHORT,unorm16x2:f.UNSIGNED_SHORT,unorm16x4:f.UNSIGNED_SHORT,snorm16x2:f.SHORT,snorm16x4:f.SHORT,float16x2:f.HALF_FLOAT,float16x4:f.HALF_FLOAT,float32:f.FLOAT,float32x2:f.FLOAT,float32x3:f.FLOAT,float32x4:f.FLOAT,uint32:f.UNSIGNED_INT,uint32x2:f.UNSIGNED_INT,uint32x3:f.UNSIGNED_INT,uint32x4:f.UNSIGNED_INT,sint32:f.INT,sint32x2:f.INT,sint32x3:f.INT,sint32x4:f.INT};function ke(t){return H[t]??H.float32}const Ve={"point-list":0,"line-list":1,"line-strip":3,"triangle-list":4,"triangle-strip":5};class ne{constructor(e){this._geometryVaoHash=Object.create(null),this._renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0}contextChange(){const e=this.gl=this._renderer.gl;if(!this._renderer.context.supports.vertexArrayObject)throw new Error("[PixiJS] Vertex Array Objects are not supported on this device");const r=this._renderer.context.extensions.vertexArrayObject;r&&(e.createVertexArray=()=>r.createVertexArrayOES(),e.bindVertexArray=n=>r.bindVertexArrayOES(n),e.deleteVertexArray=n=>r.deleteVertexArrayOES(n));const s=this._renderer.context.extensions.vertexAttribDivisorANGLE;s&&(e.drawArraysInstanced=(n,i,a,o)=>{s.drawArraysInstancedANGLE(n,i,a,o)},e.drawElementsInstanced=(n,i,a,o,c)=>{s.drawElementsInstancedANGLE(n,i,a,o,c)},e.vertexAttribDivisor=(n,i)=>s.vertexAttribDivisorANGLE(n,i)),this._activeGeometry=null,this._activeVao=null,this._geometryVaoHash=Object.create(null)}bind(e,r){const s=this.gl;this._activeGeometry=e;const n=this.getVao(e,r);this._activeVao!==n&&(this._activeVao=n,s.bindVertexArray(n)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,r=this._renderer.buffer;for(let s=0;s<e.buffers.length;s++){const n=e.buffers[s];r.updateBuffer(n)}}checkCompatibility(e,r){const s=e.attributes,n=r._attributeData;for(const i in n)if(!s[i])throw new Error(`shader and geometry incompatible, geometry missing the "${i}" attribute`)}getSignature(e,r){const s=e.attributes,n=r._attributeData,i=["g",e.uid];for(const a in s)n[a]&&i.push(a,n[a].location);return i.join("-")}getVao(e,r){return this._geometryVaoHash[e.uid]?.[r._key]||this.initGeometryVao(e,r)}initGeometryVao(e,r,s=!0){const n=this._renderer.gl,i=this._renderer.buffer;this._renderer.shader._getProgramData(r),this.checkCompatibility(e,r);const a=this.getSignature(e,r);this._geometryVaoHash[e.uid]||(this._geometryVaoHash[e.uid]=Object.create(null),e.on("destroy",this.onGeometryDestroy,this));const o=this._geometryVaoHash[e.uid];let c=o[a];if(c)return o[r._key]=c,c;ye(e,r._attributeData);const u=e.buffers;c=n.createVertexArray(),n.bindVertexArray(c);for(let _=0;_<u.length;_++){const h=u[_];i.bind(h)}return this.activateVao(e,r),o[r._key]=c,o[a]=c,n.bindVertexArray(null),c}onGeometryDestroy(e,r){const s=this._geometryVaoHash[e.uid],n=this.gl;if(s){if(r)for(const i in s)this._activeVao!==s[i]&&this.unbind(),n.deleteVertexArray(s[i]);this._geometryVaoHash[e.uid]=null}}destroyAll(e=!1){const r=this.gl;for(const s in this._geometryVaoHash){if(e)for(const n in this._geometryVaoHash[s]){const i=this._geometryVaoHash[s];this._activeVao!==i&&this.unbind(),r.deleteVertexArray(i[n])}this._geometryVaoHash[s]=null}}activateVao(e,r){const s=this._renderer.gl,n=this._renderer.buffer,i=e.attributes;e.indexBuffer&&n.bind(e.indexBuffer);let a=null;for(const o in i){const c=i[o],u=c.buffer,_=n.getGlBuffer(u);if(r._attributeData[o]){a!==_&&(n.bind(u),a=_);const h=c.location;s.enableVertexAttribArray(h);const d=q(c.format);if(s.vertexAttribPointer(h,d.size,ke(c.format),d.normalised,c.stride,c.offset),c.instance)if(this.hasInstance)s.vertexAttribDivisor(h,1);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(e,r,s,n){const{gl:i}=this._renderer,a=this._activeGeometry,o=Ve[a.topology||e];if(n||(n=a.instanceCount),a.indexBuffer){const c=a.indexBuffer.data.BYTES_PER_ELEMENT,u=c===2?i.UNSIGNED_SHORT:i.UNSIGNED_INT;n>1?i.drawElementsInstanced(o,r||a.indexBuffer.data.length,u,(s||0)*c,n):i.drawElements(o,r||a.indexBuffer.data.length,u,(s||0)*c)}else n>1?i.drawArraysInstanced(o,s||0,r||a.getSize(),n):i.drawArrays(o,s||0,r||a.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this._renderer=null,this.gl=null,this._activeVao=null,this._activeGeometry=null}}ne.extension={type:[l.WebGLSystem],name:"geometry"};const Xe=new Ae({attributes:{aPosition:[-1,-1,3,-1,-1,3]}}),F=class ie{constructor(e){this.useBackBuffer=!1,this._useBackBufferThisRender=!1,this._renderer=e}init(e={}){const{useBackBuffer:r,antialias:s}={...ie.defaultOptions,...e};this.useBackBuffer=r,this._antialias=s,this._renderer.context.supports.msaa||(m("antialiasing, is not supported on when using the back buffer"),this._antialias=!1),this._state=C.for2d();const n=new Ie({vertex:`
|
||||
attribute vec2 aPosition;
|
||||
out vec2 vUv;
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(aPosition, 0.0, 1.0);
|
||||
|
||||
vUv = (aPosition + 1.0) / 2.0;
|
||||
|
||||
// flip dem UVs
|
||||
vUv.y = 1.0 - vUv.y;
|
||||
}`,fragment:`
|
||||
in vec2 vUv;
|
||||
out vec4 finalColor;
|
||||
|
||||
uniform sampler2D uTexture;
|
||||
|
||||
void main() {
|
||||
finalColor = texture(uTexture, vUv);
|
||||
}`,name:"big-triangle"});this._bigTriangleShader=new R({glProgram:n,resources:{uTexture:E.WHITE.source}})}renderStart(e){const r=this._renderer.renderTarget.getRenderTarget(e.target);if(this._useBackBufferThisRender=this.useBackBuffer&&!!r.isRoot,this._useBackBufferThisRender){const s=this._renderer.renderTarget.getRenderTarget(e.target);this._targetTexture=s.colorTexture,e.target=this._getBackBufferTexture(s.colorTexture)}}renderEnd(){this._presentBackBuffer()}_presentBackBuffer(){const e=this._renderer;e.renderTarget.finishRenderPass(),this._useBackBufferThisRender&&(e.renderTarget.bind(this._targetTexture,!1),this._bigTriangleShader.resources.uTexture=this._backBufferTexture.source,e.encoder.draw({geometry:Xe,shader:this._bigTriangleShader,state:this._state}))}_getBackBufferTexture(e){return this._backBufferTexture=this._backBufferTexture||new E({source:new K({width:e.width,height:e.height,resolution:e._resolution,antialias:this._antialias})}),this._backBufferTexture.source.resize(e.width,e.height,e._resolution),this._backBufferTexture}destroy(){this._backBufferTexture&&(this._backBufferTexture.destroy(),this._backBufferTexture=null)}};F.extension={type:[l.WebGLSystem],name:"backBuffer",priority:1};F.defaultOptions={useBackBuffer:!1};let We=F;class ae{constructor(e){this._colorMaskCache=15,this._renderer=e}setMask(e){this._colorMaskCache!==e&&(this._colorMaskCache=e,this._renderer.gl.colorMask(!!(e&8),!!(e&4),!!(e&2),!!(e&1)))}}ae.extension={type:[l.WebGLSystem],name:"colorMask"};class oe{constructor(e){this.commandFinished=Promise.resolve(),this._renderer=e}setGeometry(e,r){this._renderer.geometry.bind(e,r.glProgram)}finishRenderPass(){}draw(e){const r=this._renderer,{geometry:s,shader:n,state:i,skipSync:a,topology:o,size:c,start:u,instanceCount:_}=e;r.shader.bind(n,a),r.geometry.bind(s,r.shader._activeProgram),i&&r.state.set(i),r.geometry.draw(o,c,u,_??s.instanceCount)}destroy(){this._renderer=null}}oe.extension={type:[l.WebGLSystem],name:"encoder"};class je{constructor(){this.width=-1,this.height=-1,this.msaa=!1,this.msaaRenderBuffer=[]}}class ce{constructor(e){this._stencilCache={enabled:!1,stencilReference:0,stencilMode:v.NONE},this._renderTargetStencilState=Object.create(null),e.renderTarget.onRenderTargetChange.add(this)}contextChange(e){this._gl=e,this._comparisonFuncMapping={always:e.ALWAYS,never:e.NEVER,equal:e.EQUAL,"not-equal":e.NOTEQUAL,less:e.LESS,"less-equal":e.LEQUAL,greater:e.GREATER,"greater-equal":e.GEQUAL},this._stencilOpsMapping={keep:e.KEEP,zero:e.ZERO,replace:e.REPLACE,invert:e.INVERT,"increment-clamp":e.INCR,"decrement-clamp":e.DECR,"increment-wrap":e.INCR_WRAP,"decrement-wrap":e.DECR_WRAP}}onRenderTargetChange(e){if(this._activeRenderTarget===e)return;this._activeRenderTarget=e;let r=this._renderTargetStencilState[e.uid];r||(r=this._renderTargetStencilState[e.uid]={stencilMode:v.DISABLED,stencilReference:0}),this.setStencilMode(r.stencilMode,r.stencilReference)}setStencilMode(e,r){const s=this._renderTargetStencilState[this._activeRenderTarget.uid],n=this._gl,i=Ce[e],a=this._stencilCache;if(s.stencilMode=e,s.stencilReference=r,e===v.DISABLED){this._stencilCache.enabled&&(this._stencilCache.enabled=!1,n.disable(n.STENCIL_TEST));return}this._stencilCache.enabled||(this._stencilCache.enabled=!0,n.enable(n.STENCIL_TEST)),(e!==a.stencilMode||a.stencilReference!==r)&&(a.stencilMode=e,a.stencilReference=r,n.stencilFunc(this._comparisonFuncMapping[i.stencilBack.compare],r,255),n.stencilOp(n.KEEP,n.KEEP,this._stencilOpsMapping[i.stencilBack.passOp]))}}ce.extension={type:[l.WebGLSystem],name:"stencil"};const ue={f32:4,"vec2<f32>":8,"vec3<f32>":12,"vec4<f32>":16,"mat2x2<f32>":16*2,"mat3x3<f32>":16*3,"mat4x4<f32>":16*4};function Ke(t){const e=t.map(i=>({data:i,offset:0,size:0}));let r=0,s=0,n=0;for(let i=0;i<e.length;i++){const a=e[i];if(r=ue[a.data.type],!r)throw new Error(`Unknown type ${a.data.type}`);if(a.data.size>1&&(r=Math.max(r,16)*a.data.size),a.size=r,s%r!==0&&s<16){const o=s%r%16;s+=o,n+=o}s+r>16?(n=Math.ceil(n/16)*16,a.offset=n,n+=r,s=r):(a.offset=n,s+=r,n+=r)}return n=Math.ceil(n/16)*16,{uboElements:e,size:n}}function $e(t,e){const r=Math.max(ue[t.data.type]/16,1),s=t.data.value.length/t.data.size,n=(4-s%4)%4;return`
|
||||
v = uv.${t.data.name};
|
||||
offset += ${e};
|
||||
|
||||
arrayOffset = offset;
|
||||
|
||||
t = 0;
|
||||
|
||||
for(var i=0; i < ${t.data.size*r}; i++)
|
||||
{
|
||||
for(var j = 0; j < ${s}; j++)
|
||||
{
|
||||
data[arrayOffset++] = v[t++];
|
||||
}
|
||||
${n!==0?`arrayOffset += ${n};`:""}
|
||||
}
|
||||
`}function ze(t){return Ue(t,"uboStd40",$e,Ge)}class _e extends Pe{constructor(){super({createUboElements:Ke,generateUboSync:ze})}}_e.extension={type:[l.WebGLSystem],name:"ubo"};class Ye{constructor(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new L}init(e,r){this._renderer=e,this._renderTargetSystem=r,e.runners.contextChange.add(this)}contextChange(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new L}copyToTexture(e,r,s,n,i){const a=this._renderTargetSystem,o=this._renderer,c=a.getGpuRenderTarget(e),u=o.gl;return this.finishRenderPass(e),u.bindFramebuffer(u.FRAMEBUFFER,c.resolveTargetFramebuffer),o.texture.bind(r,0),u.copyTexSubImage2D(u.TEXTURE_2D,0,i.x,i.y,s.x,s.y,n.width,n.height),r}startRenderPass(e,r=!0,s,n){const i=this._renderTargetSystem,a=e.colorTexture,o=i.getGpuRenderTarget(e);let c=n.y;e.isRoot&&(c=a.pixelHeight-n.height),e.colorTextures.forEach(h=>{this._renderer.texture.unbind(h)});const u=this._renderer.gl;u.bindFramebuffer(u.FRAMEBUFFER,o.framebuffer);const _=this._viewPortCache;(_.x!==n.x||_.y!==c||_.width!==n.width||_.height!==n.height)&&(_.x=n.x,_.y=c,_.width=n.width,_.height=n.height,u.viewport(n.x,c,n.width,n.height)),!o.depthStencilRenderBuffer&&(e.stencil||e.depth)&&this._initStencil(o),this.clear(e,r,s)}finishRenderPass(e){const s=this._renderTargetSystem.getGpuRenderTarget(e);if(!s.msaa)return;const n=this._renderer.gl;n.bindFramebuffer(n.FRAMEBUFFER,s.resolveTargetFramebuffer),n.bindFramebuffer(n.READ_FRAMEBUFFER,s.framebuffer),n.blitFramebuffer(0,0,s.width,s.height,0,0,s.width,s.height,n.COLOR_BUFFER_BIT,n.NEAREST),n.bindFramebuffer(n.FRAMEBUFFER,s.framebuffer)}initGpuRenderTarget(e){const s=this._renderer.gl,n=new je;return Be.test(e.colorTexture.resource)?(n.framebuffer=null,n):(this._initColor(e,n),s.bindFramebuffer(s.FRAMEBUFFER,null),n)}clear(e,r,s){if(!r)return;const n=this._renderTargetSystem;typeof r=="boolean"&&(r=r?x.ALL:x.NONE);const i=this._renderer.gl;if(r&x.COLOR){s??(s=n.defaultClearColor);const a=this._clearColorCache,o=s;(a[0]!==o[0]||a[1]!==o[1]||a[2]!==o[2]||a[3]!==o[3])&&(a[0]=o[0],a[1]=o[1],a[2]=o[2],a[3]=o[3],i.clearColor(o[0],o[1],o[2],o[3]))}i.clear(r)}resizeGpuRenderTarget(e){if(e.isRoot)return;const s=this._renderTargetSystem.getGpuRenderTarget(e);this._resizeColor(e,s),e.stencil&&this._resizeStencil(s)}_initColor(e,r){const s=this._renderer,n=s.gl,i=n.createFramebuffer();if(r.resolveTargetFramebuffer=i,n.bindFramebuffer(n.FRAMEBUFFER,i),r.width=e.colorTexture.source.pixelWidth,r.height=e.colorTexture.source.pixelHeight,e.colorTextures.forEach((a,o)=>{const c=a.source;c.antialias&&(s.context.supports.msaa?r.msaa=!0:m("[RenderTexture] Antialiasing on textures is not supported in WebGL1")),s.texture.bindSource(c,0);const _=s.texture.getGlSource(c).texture;n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+o,3553,_,0)}),r.msaa){const a=n.createFramebuffer();r.framebuffer=a,n.bindFramebuffer(n.FRAMEBUFFER,a),e.colorTextures.forEach((o,c)=>{const u=n.createRenderbuffer();r.msaaRenderBuffer[c]=u})}else r.framebuffer=i;this._resizeColor(e,r)}_resizeColor(e,r){const s=e.colorTexture.source;if(r.width=s.pixelWidth,r.height=s.pixelHeight,e.colorTextures.forEach((n,i)=>{i!==0&&n.source.resize(s.width,s.height,s._resolution)}),r.msaa){const n=this._renderer,i=n.gl,a=r.framebuffer;i.bindFramebuffer(i.FRAMEBUFFER,a),e.colorTextures.forEach((o,c)=>{const u=o.source;n.texture.bindSource(u,0);const h=n.texture.getGlSource(u).internalFormat,d=r.msaaRenderBuffer[c];i.bindRenderbuffer(i.RENDERBUFFER,d),i.renderbufferStorageMultisample(i.RENDERBUFFER,4,h,u.pixelWidth,u.pixelHeight),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+c,i.RENDERBUFFER,d)})}}_initStencil(e){if(e.framebuffer===null)return;const r=this._renderer.gl,s=r.createRenderbuffer();e.depthStencilRenderBuffer=s,r.bindRenderbuffer(r.RENDERBUFFER,s),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,s),this._resizeStencil(e)}_resizeStencil(e){const r=this._renderer.gl;r.bindRenderbuffer(r.RENDERBUFFER,e.depthStencilRenderBuffer),e.msaa?r.renderbufferStorageMultisample(r.RENDERBUFFER,4,r.DEPTH24_STENCIL8,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,this._renderer.context.webGLVersion===2?r.DEPTH24_STENCIL8:r.DEPTH_STENCIL,e.width,e.height)}}class fe extends Oe{constructor(e){super(e),this.adaptor=new Ye,this.adaptor.init(e,this)}}fe.extension={type:[l.WebGLSystem],name:"renderTarget"};function qe(t,e){const r=[],s=[`
|
||||
var g = s.groups;
|
||||
var sS = r.shader;
|
||||
var p = s.glProgram;
|
||||
var ugS = r.uniformGroup;
|
||||
var resources;
|
||||
`];let n=!1,i=0,a=0;const o=e._getProgramData(t.glProgram);for(const u in t.groups){const _=t.groups[u];r.push(`
|
||||
resources = g[${u}].resources;
|
||||
`);for(const h in _.resources){const d=_.resources[h];if(d instanceof P)d.ubo?r.push(`
|
||||
sS.bindUniformBlock(
|
||||
resources[${h}],
|
||||
sS._uniformBindMap[${u}[${h}],
|
||||
${i++}
|
||||
);
|
||||
`):r.push(`
|
||||
ugS.updateUniformGroup(resources[${h}], p, sD);
|
||||
`);else if(d instanceof J)r.push(`
|
||||
sS.bindUniformBlock(
|
||||
resources[${h}],
|
||||
sS._uniformBindMap[${u}[${h}],
|
||||
${i++}
|
||||
);
|
||||
`);else if(d instanceof K){const xe=t._uniformBindMap[u][h],M=o.uniformData[xe];M&&(n||(n=!0,s.push(`
|
||||
var tS = r.texture;
|
||||
`)),e._gl.uniform1i(M.location,a),r.push(`
|
||||
tS.bind(resources[${h}], ${a});
|
||||
`),a++)}}}const c=[...s,...r].join(`
|
||||
`);return new Function("r","s","sD",c)}class Ze{constructor(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBlockBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBlockBindings=null,this.program=null}}function w(t,e,r){const s=t.createShader(e);return t.shaderSource(s,r),t.compileShader(s),s}function B(t){const e=new Array(t);for(let r=0;r<e.length;r++)e[r]=!1;return e}function he(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return B(2*e);case"bvec3":return B(3*e);case"bvec4":return B(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}let b=null;const k={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"},Qe={float:"float32",vec2:"float32x2",vec3:"float32x3",vec4:"float32x4",int:"sint32",ivec2:"sint32x2",ivec3:"sint32x3",ivec4:"sint32x4",uint:"uint32",uvec2:"uint32x2",uvec3:"uint32x3",uvec4:"uint32x4",bool:"uint32",bvec2:"uint32x2",bvec3:"uint32x3",bvec4:"uint32x4"};function le(t,e){if(!b){const r=Object.keys(k);b={};for(let s=0;s<r.length;++s){const n=r[s];b[t[n]]=k[n]}}return b[e]}function Je(t,e){const r=le(t,e);return Qe[r]||"float32"}function et(t,e,r=!1){const s={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let a=0;a<n;a++){const o=e.getActiveAttrib(t,a);if(o.name.startsWith("gl_"))continue;const c=Je(e,o.type);s[o.name]={location:0,format:c,stride:q(c).stride,offset:0,instance:!1,start:0}}const i=Object.keys(s);if(r){i.sort((a,o)=>a>o?1:-1);for(let a=0;a<i.length;a++)s[i[a]].location=a,e.bindAttribLocation(t,a,i[a]);e.linkProgram(t)}else for(let a=0;a<i.length;a++)s[i[a]].location=e.getAttribLocation(t,i[a]);return s}function tt(t,e){if(!e.ACTIVE_UNIFORM_BLOCKS)return{};const r={},s=e.getProgramParameter(t,e.ACTIVE_UNIFORM_BLOCKS);for(let n=0;n<s;n++){const i=e.getActiveUniformBlockName(t,n),a=e.getUniformBlockIndex(t,i),o=e.getActiveUniformBlockParameter(t,n,e.UNIFORM_BLOCK_DATA_SIZE);r[i]={name:i,index:a,size:o}}return r}function rt(t,e){const r={},s=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let n=0;n<s;n++){const i=e.getActiveUniform(t,n),a=i.name.replace(/\[.*?\]$/,""),o=!!i.name.match(/\[.*?\]$/),c=le(e,i.type);r[a]={name:a,index:n,type:c,size:i.size,isArray:o,value:he(c,i.size)}}return r}function V(t,e){const r=t.getShaderSource(e).split(`
|
||||
`).map((u,_)=>`${_}: ${u}`),s=t.getShaderInfoLog(e),n=s.split(`
|
||||
`),i={},a=n.map(u=>parseFloat(u.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(u=>u&&!i[u]?(i[u]=!0,!0):!1),o=[""];a.forEach(u=>{r[u-1]=`%c${r[u-1]}%c`,o.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const c=r.join(`
|
||||
`);o[0]=c,console.error(s),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function st(t,e,r,s){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||V(t,r),t.getShaderParameter(s,t.COMPILE_STATUS)||V(t,s),console.error("PixiJS Error: Could not initialize shader."),t.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}function nt(t,e){const r=w(t,t.VERTEX_SHADER,e.vertex),s=w(t,t.FRAGMENT_SHADER,e.fragment),n=t.createProgram();t.attachShader(n,r),t.attachShader(n,s);const i=e.transformFeedbackVaryings;i&&(typeof t.transformFeedbackVaryings!="function"?m("TransformFeedback is not supported but TransformFeedbackVaryings are given."):t.transformFeedbackVaryings(n,i.names,i.bufferMode==="separate"?t.SEPARATE_ATTRIBS:t.INTERLEAVED_ATTRIBS)),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)||st(t,n,r,s),e._attributeData=et(n,t,!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertex)),e._uniformData=rt(n,t),e._uniformBlockData=tt(n,t),t.deleteShader(r),t.deleteShader(s);const a={};for(const c in e._uniformData){const u=e._uniformData[c];a[c]={location:t.getUniformLocation(n,c),value:he(u.type,u.size)}}return new Ze(n,a)}const S={textureCount:0,blockIndex:0};class de{constructor(e){this._activeProgram=null,this._programDataHash=Object.create(null),this._nextIndex=0,this._boundUniformsIdsToIndexHash=Object.create(null),this._boundIndexToUniformsHash=Object.create(null),this._shaderSyncFunctions=Object.create(null),this._renderer=e}contextChange(e){this._gl=e,this._maxBindings=e.MAX_UNIFORM_BUFFER_BINDINGS?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0,this._programDataHash=Object.create(null),this._boundUniformsIdsToIndexHash=Object.create(null),this._boundIndexToUniformsHash=Object.create(null),this._activeProgram=null}bind(e,r){if(this._setProgram(e.glProgram),r)return;S.textureCount=0,S.blockIndex=0;let s=this._shaderSyncFunctions[e.glProgram._key];s||(s=this._shaderSyncFunctions[e.glProgram._key]=this._generateShaderSync(e,this)),s(this._renderer,e,S)}updateUniformGroup(e){this._renderer.uniformGroup.updateUniformGroup(e,this._activeProgram,S)}bindUniformBlock(e,r,s=0){const n=this._renderer.buffer,i=this._getProgramData(this._activeProgram),a=e._bufferResource;a&&this._renderer.ubo.updateUniformGroup(e),n.updateBuffer(e.buffer);let o=this._boundUniformsIdsToIndexHash[e.uid];if(o===void 0){const _=this._nextIndex++%this._maxBindings,h=this._boundIndexToUniformsHash[_];h&&(this._boundUniformsIdsToIndexHash[h.uid]=void 0),o=this._boundUniformsIdsToIndexHash[e.uid]=_,this._boundIndexToUniformsHash[_]=e,a?n.bindBufferRange(e.buffer,_,e.offset):n.bindBufferBase(e.buffer,_)}const c=this._gl,u=this._activeProgram._uniformBlockData[r].index;i.uniformBlockBindings[s]!==o&&(i.uniformBlockBindings[s]=o,c.uniformBlockBinding(i.program,u,o))}_setProgram(e){if(this._activeProgram===e)return;this._activeProgram=e;const r=this._getProgramData(e);this._gl.useProgram(r.program)}_getProgramData(e){return this._programDataHash[e._key]||this._createProgramData(e)}_createProgramData(e){const r=e._key;return this._programDataHash[r]=nt(this._gl,e),this._programDataHash[r]}destroy(){for(const e of Object.keys(this._programDataHash))this._programDataHash[e].destroy(),this._programDataHash[e]=null;this._programDataHash=null,this._boundUniformsIdsToIndexHash=null}_generateShaderSync(e,r){return qe(e,r)}}de.extension={type:[l.WebGLSystem],name:"shader"};const it={f32:`if (cv !== v) {
|
||||
cu.value = v;
|
||||
gl.uniform1f(location, v);
|
||||
}`,"vec2<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
gl.uniform2f(location, v[0], v[1]);
|
||||
}`,"vec3<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
cv[2] = v[2];
|
||||
gl.uniform3f(location, v[0], v[1], v[2]);
|
||||
}`,"vec4<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
cv[2] = v[2];
|
||||
cv[3] = v[3];
|
||||
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
|
||||
}`,i32:`if (cv !== v) {
|
||||
cu.value = v;
|
||||
gl.uniform1i(location, v);
|
||||
}`,"vec2<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
gl.uniform2i(location, v[0], v[1]);
|
||||
}`,"vec3<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
cv[2] = v[2];
|
||||
gl.uniform3i(location, v[0], v[1], v[2]);
|
||||
}`,"vec4<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
cv[2] = v[2];
|
||||
cv[3] = v[3];
|
||||
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
||||
}`,u32:`if (cv !== v) {
|
||||
cu.value = v;
|
||||
gl.uniform1ui(location, v);
|
||||
}`,"vec2<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
gl.uniform2ui(location, v[0], v[1]);
|
||||
}`,"vec3<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
cv[2] = v[2];
|
||||
gl.uniform3ui(location, v[0], v[1], v[2]);
|
||||
}`,"vec4<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
cv[2] = v[2];
|
||||
cv[3] = v[3];
|
||||
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
|
||||
}`,bool:`if (cv !== v) {
|
||||
cu.value = v;
|
||||
gl.uniform1i(location, v);
|
||||
}`,"vec2<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
gl.uniform2i(location, v[0], v[1]);
|
||||
}`,"vec3<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
cv[2] = v[2];
|
||||
gl.uniform3i(location, v[0], v[1], v[2]);
|
||||
}`,"vec4<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
||||
cv[0] = v[0];
|
||||
cv[1] = v[1];
|
||||
cv[2] = v[2];
|
||||
cv[3] = v[3];
|
||||
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
||||
}`,"mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);"},at={f32:"gl.uniform1fv(location, v);","vec2<f32>":"gl.uniform2fv(location, v);","vec3<f32>":"gl.uniform3fv(location, v);","vec4<f32>":"gl.uniform4fv(location, v);","mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);",i32:"gl.uniform1iv(location, v);","vec2<i32>":"gl.uniform2iv(location, v);","vec3<i32>":"gl.uniform3iv(location, v);","vec4<i32>":"gl.uniform4iv(location, v);",u32:"gl.uniform1iv(location, v);","vec2<u32>":"gl.uniform2iv(location, v);","vec3<u32>":"gl.uniform3iv(location, v);","vec4<u32>":"gl.uniform4iv(location, v);",bool:"gl.uniform1iv(location, v);","vec2<bool>":"gl.uniform2iv(location, v);","vec3<bool>":"gl.uniform3iv(location, v);","vec4<bool>":"gl.uniform4iv(location, v);"};function ot(t,e){const r=[`
|
||||
var v = null;
|
||||
var cv = null;
|
||||
var cu = null;
|
||||
var t = 0;
|
||||
var gl = renderer.gl;
|
||||
var name = null;
|
||||
`];for(const s in t.uniforms){if(!e[s]){t.uniforms[s]instanceof P?t.uniforms[s].ubo?r.push(`
|
||||
renderer.shader.bindUniformBlock(uv.${s}, "${s}");
|
||||
`):r.push(`
|
||||
renderer.shader.updateUniformGroup(uv.${s});
|
||||
`):t.uniforms[s]instanceof J&&r.push(`
|
||||
renderer.shader.bindBufferResource(uv.${s}, "${s}");
|
||||
`);continue}const n=t.uniformStructures[s];let i=!1;for(let a=0;a<A.length;a++){const o=A[a];if(n.type===o.type&&o.test(n)){r.push(`name = "${s}";`,A[a].uniform),i=!0;break}}if(!i){const o=(n.size===1?it:at)[n.type].replace("location",`ud["${s}"].location`);r.push(`
|
||||
cu = ud["${s}"];
|
||||
cv = cu.value;
|
||||
v = uv["${s}"];
|
||||
${o};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
|
||||
`))}class me{constructor(e){this._cache={},this._uniformGroupSyncHash={},this._renderer=e,this.gl=null,this._cache={}}contextChange(e){this.gl=e}updateUniformGroup(e,r,s){const n=this._renderer.shader._getProgramData(r);(!e.isStatic||e._dirtyId!==n.uniformDirtyGroups[e.uid])&&(n.uniformDirtyGroups[e.uid]=e._dirtyId,this._getUniformSyncFunction(e,r)(n.uniformData,e.uniforms,this._renderer,s))}_getUniformSyncFunction(e,r){return this._uniformGroupSyncHash[e._signature]?.[r._key]||this._createUniformSyncFunction(e,r)}_createUniformSyncFunction(e,r){const s=this._uniformGroupSyncHash[e._signature]||(this._uniformGroupSyncHash[e._signature]={}),n=this._getSignature(e,r._uniformData,"u");return this._cache[n]||(this._cache[n]=this._generateUniformsSync(e,r._uniformData)),s[r._key]=this._cache[n],s[r._key]}_generateUniformsSync(e,r){return ot(e,r)}_getSignature(e,r,s){const n=e.uniforms,i=[`${s}-`];for(const a in n)i.push(a),r[a]&&i.push(r[a].type);return i.join("-")}destroy(){this._renderer=null,this._cache=null}}me.extension={type:[l.WebGLSystem],name:"uniformGroup"};function ct(t){const e={};return e.normal=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e.add=[t.ONE,t.ONE],e.multiply=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e.screen=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e.none=[0,0],e["normal-npm"]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e["add-npm"]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e["screen-npm"]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e.erase=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e}const ut=0,_t=1,ft=2,ht=3,lt=4,dt=5,Ee=class D{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode="none",this._blendEq=!1,this.map=[],this.map[ut]=this.setBlend,this.map[_t]=this.setOffset,this.map[ft]=this.setCullFace,this.map[ht]=this.setDepthTest,this.map[lt]=this.setFrontFace,this.map[dt]=this.setDepthMask,this.checks=[],this.defaultState=C.for2d()}contextChange(e){this.gl=e,this.blendModesMap=ct(e),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let r=this.stateId^e.data,s=0;for(;r;)r&1&&this.map[s].call(this,!!(e.data&1<<s)),r=r>>1,s++;this.stateId=e.data}for(let r=0;r<this.checks.length;r++)this.checks[r](this,e)}forceState(e){e=e||this.defaultState;for(let r=0;r<this.map.length;r++)this.map[r].call(this,!!(e.data&1<<r));for(let r=0;r<this.checks.length;r++)this.checks[r](this,e);this.stateId=e.data}setBlend(e){this._updateCheck(D._checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this._updateCheck(D._checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(this.blendModesMap[e]||(e="normal"),e===this.blendMode)return;this.blendMode=e;const r=this.blendModesMap[e],s=this.gl;r.length===2?s.blendFunc(r[0],r[1]):s.blendFuncSeparate(r[0],r[1],r[2],r[3]),r.length===6?(this._blendEq=!0,s.blendEquationSeparate(r[4],r[5])):this._blendEq&&(this._blendEq=!1,s.blendEquationSeparate(s.FUNC_ADD,s.FUNC_ADD))}setPolygonOffset(e,r){this.gl.polygonOffset(e,r)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode="",this.setBlendMode("normal")}_updateCheck(e,r){const s=this.checks.indexOf(e);r&&s===-1?this.checks.push(e):!r&&s!==-1&&this.checks.splice(s,1)}static _checkBlendMode(e,r){e.setBlendMode(r.blendMode)}static _checkPolygonOffset(e,r){e.setPolygonOffset(1,r.polygonOffset)}destroy(){this.gl=null,this.checks.length=0}};Ee.extension={type:[l.WebGLSystem],name:"state"};let mt=Ee;class Et{constructor(e){this.target=se.TEXTURE_2D,this.texture=e,this.width=-1,this.height=-1,this.type=f.UNSIGNED_BYTE,this.internalFormat=I.RGBA,this.format=I.RGBA,this.samplerType=0}}const bt={id:"image",upload(t,e,r){e.width===t.width||e.height===t.height?r.texSubImage2D(r.TEXTURE_2D,0,0,0,e.format,e.type,t.resource):r.texImage2D(e.target,0,e.internalFormat,t.width,t.height,0,e.format,e.type,t.resource),e.width=t.width,e.height=t.height}},St={"bc1-rgba-unorm":!0,"bc1-rgba-unorm-srgb":!0,"bc2-rgba-unorm":!0,"bc2-rgba-unorm-srgb":!0,"bc3-rgba-unorm":!0,"bc3-rgba-unorm-srgb":!0,"bc4-r-unorm":!0,"bc4-r-snorm":!0,"bc5-rg-unorm":!0,"bc5-rg-snorm":!0,"bc6h-rgb-ufloat":!0,"bc6h-rgb-float":!0,"bc7-rgba-unorm":!0,"bc7-rgba-unorm-srgb":!0,"etc2-rgb8unorm":!0,"etc2-rgb8unorm-srgb":!0,"etc2-rgb8a1unorm":!0,"etc2-rgb8a1unorm-srgb":!0,"etc2-rgba8unorm":!0,"etc2-rgba8unorm-srgb":!0,"eac-r11unorm":!0,"eac-r11snorm":!0,"eac-rg11unorm":!0,"eac-rg11snorm":!0,"astc-4x4-unorm":!0,"astc-4x4-unorm-srgb":!0,"astc-5x4-unorm":!0,"astc-5x4-unorm-srgb":!0,"astc-5x5-unorm":!0,"astc-5x5-unorm-srgb":!0,"astc-6x5-unorm":!0,"astc-6x5-unorm-srgb":!0,"astc-6x6-unorm":!0,"astc-6x6-unorm-srgb":!0,"astc-8x5-unorm":!0,"astc-8x5-unorm-srgb":!0,"astc-8x6-unorm":!0,"astc-8x6-unorm-srgb":!0,"astc-8x8-unorm":!0,"astc-8x8-unorm-srgb":!0,"astc-10x5-unorm":!0,"astc-10x5-unorm-srgb":!0,"astc-10x6-unorm":!0,"astc-10x6-unorm-srgb":!0,"astc-10x8-unorm":!0,"astc-10x8-unorm-srgb":!0,"astc-10x10-unorm":!0,"astc-10x10-unorm-srgb":!0,"astc-12x10-unorm":!0,"astc-12x10-unorm-srgb":!0,"astc-12x12-unorm":!0,"astc-12x12-unorm-srgb":!0},gt={id:"compressed",upload(t,e,r){r.pixelStorei(r.UNPACK_ALIGNMENT,4);let s=t.pixelWidth,n=t.pixelHeight;const i=!!St[t.format];for(let a=0;a<t.resource.length;a++){const o=t.resource[a];i?r.compressedTexImage2D(r.TEXTURE_2D,a,e.internalFormat,s,n,0,o):r.texImage2D(r.TEXTURE_2D,a,e.internalFormat,s,n,0,e.format,e.type,o),s=Math.max(s>>1,1),n=Math.max(n>>1,1)}}},be={id:"image",upload(t,e,r,s){const n=t.alphaMode==="premultiply-alpha-on-upload";r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n);const i=e.width,a=e.height,o=t.pixelWidth,c=t.pixelHeight,u=t.resourceWidth,_=t.resourceHeight;u<o||_<c?((i!==o||a!==c)&&r.texImage2D(e.target,0,e.internalFormat,o,c,0,e.format,e.type,null),s===2?r.texSubImage2D(r.TEXTURE_2D,0,0,0,u,_,e.format,e.type,t.resource):r.texSubImage2D(r.TEXTURE_2D,0,0,0,e.format,e.type,t.resource)):i===o||a===c?r.texSubImage2D(r.TEXTURE_2D,0,0,0,e.format,e.type,t.resource):s===2?r.texImage2D(e.target,0,e.internalFormat,o,c,0,e.format,e.type,t.resource):r.texImage2D(e.target,0,e.internalFormat,e.format,e.type,t.resource),e.width=o,e.height=c}},pt={id:"video",upload(t,e,r,s){if(!t.isValid){r.texImage2D(e.target,0,e.internalFormat,1,1,0,e.format,e.type,null);return}be.upload(t,e,r,s)}},X={linear:9729,nearest:9728},Rt={linear:{linear:9987,nearest:9985},nearest:{linear:9986,nearest:9984}},N={"clamp-to-edge":33071,repeat:10497,"mirror-repeat":33648},Tt={never:512,less:513,equal:514,"less-equal":515,greater:516,"not-equal":517,"greater-equal":518,always:519};function W(t,e,r,s,n,i,a,o){const c=i;if(!o||t.addressModeU!=="repeat"||t.addressModeV!=="repeat"||t.addressModeW!=="repeat"){const u=N[a?"clamp-to-edge":t.addressModeU],_=N[a?"clamp-to-edge":t.addressModeV],h=N[a?"clamp-to-edge":t.addressModeW];e[n](c,e.TEXTURE_WRAP_S,u),e[n](c,e.TEXTURE_WRAP_T,_),e.TEXTURE_WRAP_R&&e[n](c,e.TEXTURE_WRAP_R,h)}if((!o||t.magFilter!=="linear")&&e[n](c,e.TEXTURE_MAG_FILTER,X[t.magFilter]),r){if(!o||t.mipmapFilter!=="linear"){const u=Rt[t.minFilter][t.mipmapFilter];e[n](c,e.TEXTURE_MIN_FILTER,u)}}else e[n](c,e.TEXTURE_MIN_FILTER,X[t.minFilter]);if(s&&t.maxAnisotropy>1){const u=Math.min(t.maxAnisotropy,e.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));e[n](c,s.TEXTURE_MAX_ANISOTROPY_EXT,u)}t.compare&&e[n](c,e.TEXTURE_COMPARE_FUNC,Tt[t.compare])}function vt(t){return{r8unorm:t.RED,r8snorm:t.RED,r8uint:t.RED,r8sint:t.RED,r16uint:t.RED,r16sint:t.RED,r16float:t.RED,rg8unorm:t.RG,rg8snorm:t.RG,rg8uint:t.RG,rg8sint:t.RG,r32uint:t.RED,r32sint:t.RED,r32float:t.RED,rg16uint:t.RG,rg16sint:t.RG,rg16float:t.RG,rgba8unorm:t.RGBA,"rgba8unorm-srgb":t.RGBA,rgba8snorm:t.RGBA,rgba8uint:t.RGBA,rgba8sint:t.RGBA,bgra8unorm:t.RGBA,"bgra8unorm-srgb":t.RGBA,rgb9e5ufloat:t.RGB,rgb10a2unorm:t.RGBA,rg11b10ufloat:t.RGB,rg32uint:t.RG,rg32sint:t.RG,rg32float:t.RG,rgba16uint:t.RGBA,rgba16sint:t.RGBA,rgba16float:t.RGBA,rgba32uint:t.RGBA,rgba32sint:t.RGBA,rgba32float:t.RGBA,stencil8:t.STENCIL_INDEX8,depth16unorm:t.DEPTH_COMPONENT,depth24plus:t.DEPTH_COMPONENT,"depth24plus-stencil8":t.DEPTH_STENCIL,depth32float:t.DEPTH_COMPONENT,"depth32float-stencil8":t.DEPTH_STENCIL}}function xt(t,e){let r={},s=t.RGBA;return t instanceof y.get().getWebGL2RenderingContext()?(r={"rgba8unorm-srgb":t.SRGB8_ALPHA8,"bgra8unorm-srgb":t.SRGB8_ALPHA8},s=t.RGBA8):e.srgb&&(r={"rgba8unorm-srgb":e.srgb.SRGB8_ALPHA8_EXT,"bgra8unorm-srgb":e.srgb.SRGB8_ALPHA8_EXT}),{r8unorm:t.R8,r8snorm:t.R8_SNORM,r8uint:t.R8UI,r8sint:t.R8I,r16uint:t.R16UI,r16sint:t.R16I,r16float:t.R16F,rg8unorm:t.RG8,rg8snorm:t.RG8_SNORM,rg8uint:t.RG8UI,rg8sint:t.RG8I,r32uint:t.R32UI,r32sint:t.R32I,r32float:t.R32F,rg16uint:t.RG16UI,rg16sint:t.RG16I,rg16float:t.RG16F,rgba8unorm:t.RGBA,...r,rgba8snorm:t.RGBA8_SNORM,rgba8uint:t.RGBA8UI,rgba8sint:t.RGBA8I,bgra8unorm:s,rgb9e5ufloat:t.RGB9_E5,rgb10a2unorm:t.RGB10_A2,rg11b10ufloat:t.R11F_G11F_B10F,rg32uint:t.RG32UI,rg32sint:t.RG32I,rg32float:t.RG32F,rgba16uint:t.RGBA16UI,rgba16sint:t.RGBA16I,rgba16float:t.RGBA16F,rgba32uint:t.RGBA32UI,rgba32sint:t.RGBA32I,rgba32float:t.RGBA32F,stencil8:t.STENCIL_INDEX8,depth16unorm:t.DEPTH_COMPONENT16,depth24plus:t.DEPTH_COMPONENT24,"depth24plus-stencil8":t.DEPTH24_STENCIL8,depth32float:t.DEPTH_COMPONENT32F,"depth32float-stencil8":t.DEPTH32F_STENCIL8,...e.s3tc?{"bc1-rgba-unorm":e.s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT,"bc2-rgba-unorm":e.s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT,"bc3-rgba-unorm":e.s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{},...e.s3tc_sRGB?{"bc1-rgba-unorm-srgb":e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,"bc2-rgba-unorm-srgb":e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,"bc3-rgba-unorm-srgb":e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}:{},...e.rgtc?{"bc4-r-unorm":e.rgtc.COMPRESSED_RED_RGTC1_EXT,"bc4-r-snorm":e.rgtc.COMPRESSED_SIGNED_RED_RGTC1_EXT,"bc5-rg-unorm":e.rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT,"bc5-rg-snorm":e.rgtc.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}:{},...e.bptc?{"bc6h-rgb-float":e.bptc.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,"bc6h-rgb-ufloat":e.bptc.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,"bc7-rgba-unorm":e.bptc.COMPRESSED_RGBA_BPTC_UNORM_EXT,"bc7-rgba-unorm-srgb":e.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT}:{},...e.etc?{"etc2-rgb8unorm":e.etc.COMPRESSED_RGB8_ETC2,"etc2-rgb8unorm-srgb":e.etc.COMPRESSED_SRGB8_ETC2,"etc2-rgb8a1unorm":e.etc.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgb8a1unorm-srgb":e.etc.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgba8unorm":e.etc.COMPRESSED_RGBA8_ETC2_EAC,"etc2-rgba8unorm-srgb":e.etc.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,"eac-r11unorm":e.etc.COMPRESSED_R11_EAC,"eac-rg11unorm":e.etc.COMPRESSED_SIGNED_RG11_EAC}:{},...e.astc?{"astc-4x4-unorm":e.astc.COMPRESSED_RGBA_ASTC_4x4_KHR,"astc-4x4-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,"astc-5x4-unorm":e.astc.COMPRESSED_RGBA_ASTC_5x4_KHR,"astc-5x4-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,"astc-5x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_5x5_KHR,"astc-5x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,"astc-6x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_6x5_KHR,"astc-6x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,"astc-6x6-unorm":e.astc.COMPRESSED_RGBA_ASTC_6x6_KHR,"astc-6x6-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,"astc-8x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_8x5_KHR,"astc-8x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,"astc-8x6-unorm":e.astc.COMPRESSED_RGBA_ASTC_8x6_KHR,"astc-8x6-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,"astc-8x8-unorm":e.astc.COMPRESSED_RGBA_ASTC_8x8_KHR,"astc-8x8-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,"astc-10x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x5_KHR,"astc-10x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,"astc-10x6-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x6_KHR,"astc-10x6-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,"astc-10x8-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x8_KHR,"astc-10x8-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,"astc-10x10-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x10_KHR,"astc-10x10-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,"astc-12x10-unorm":e.astc.COMPRESSED_RGBA_ASTC_12x10_KHR,"astc-12x10-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,"astc-12x12-unorm":e.astc.COMPRESSED_RGBA_ASTC_12x12_KHR,"astc-12x12-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR}:{}}}function At(t){return{r8unorm:t.UNSIGNED_BYTE,r8snorm:t.BYTE,r8uint:t.UNSIGNED_BYTE,r8sint:t.BYTE,r16uint:t.UNSIGNED_SHORT,r16sint:t.SHORT,r16float:t.HALF_FLOAT,rg8unorm:t.UNSIGNED_BYTE,rg8snorm:t.BYTE,rg8uint:t.UNSIGNED_BYTE,rg8sint:t.BYTE,r32uint:t.UNSIGNED_INT,r32sint:t.INT,r32float:t.FLOAT,rg16uint:t.UNSIGNED_SHORT,rg16sint:t.SHORT,rg16float:t.HALF_FLOAT,rgba8unorm:t.UNSIGNED_BYTE,"rgba8unorm-srgb":t.UNSIGNED_BYTE,rgba8snorm:t.BYTE,rgba8uint:t.UNSIGNED_BYTE,rgba8sint:t.BYTE,bgra8unorm:t.UNSIGNED_BYTE,"bgra8unorm-srgb":t.UNSIGNED_BYTE,rgb9e5ufloat:t.UNSIGNED_INT_5_9_9_9_REV,rgb10a2unorm:t.UNSIGNED_INT_2_10_10_10_REV,rg11b10ufloat:t.UNSIGNED_INT_10F_11F_11F_REV,rg32uint:t.UNSIGNED_INT,rg32sint:t.INT,rg32float:t.FLOAT,rgba16uint:t.UNSIGNED_SHORT,rgba16sint:t.SHORT,rgba16float:t.HALF_FLOAT,rgba32uint:t.UNSIGNED_INT,rgba32sint:t.INT,rgba32float:t.FLOAT,stencil8:t.UNSIGNED_BYTE,depth16unorm:t.UNSIGNED_SHORT,depth24plus:t.UNSIGNED_INT,"depth24plus-stencil8":t.UNSIGNED_INT_24_8,depth32float:t.FLOAT,"depth32float-stencil8":t.FLOAT_32_UNSIGNED_INT_24_8_REV}}const Bt=4;class Se{constructor(e){this.managedTextures=[],this._glTextures=Object.create(null),this._glSamplers=Object.create(null),this._boundTextures=[],this._activeTextureLocation=-1,this._boundSamplers=Object.create(null),this._uploads={image:be,buffer:bt,video:pt,compressed:gt},this._useSeparateSamplers=!1,this._renderer=e}contextChange(e){this._gl=e,this._mapFormatToInternalFormat||(this._mapFormatToInternalFormat=xt(e,this._renderer.context.extensions),this._mapFormatToType=At(e),this._mapFormatToFormat=vt(e)),this._glTextures=Object.create(null),this._glSamplers=Object.create(null),this._boundSamplers=Object.create(null);for(let r=0;r<16;r++)this.bind(E.EMPTY,r)}initSource(e){this.bind(e)}bind(e,r=0){const s=e.source;e?(this.bindSource(s,r),this._useSeparateSamplers&&this._bindSampler(s.style,r)):(this.bindSource(null,r),this._useSeparateSamplers&&this._bindSampler(null,r))}bindSource(e,r=0){const s=this._gl;if(e._touched=this._renderer.textureGC.count,this._boundTextures[r]!==e){this._boundTextures[r]=e,this._activateLocation(r),e=e||E.EMPTY.source;const n=this.getGlSource(e);s.bindTexture(n.target,n.texture)}}_bindSampler(e,r=0){const s=this._gl;if(!e){this._boundSamplers[r]=null,s.bindSampler(r,null);return}const n=this._getGlSampler(e);this._boundSamplers[r]!==n&&(this._boundSamplers[r]=n,s.bindSampler(r,n))}unbind(e){const r=e.source,s=this._boundTextures,n=this._gl;for(let i=0;i<s.length;i++)if(s[i]===r){this._activateLocation(i);const a=this.getGlSource(r);n.bindTexture(a.target,null),s[i]=null}}_activateLocation(e){this._activeTextureLocation!==e&&(this._activeTextureLocation=e,this._gl.activeTexture(this._gl.TEXTURE0+e))}_initSource(e){const r=this._gl,s=new Et(r.createTexture());if(s.type=this._mapFormatToType[e.format],s.internalFormat=this._mapFormatToInternalFormat[e.format],s.format=this._mapFormatToFormat[e.format],e.autoGenerateMipmaps&&(this._renderer.context.supports.nonPowOf2mipmaps||e.isPowerOfTwo)){const n=Math.max(e.width,e.height);e.mipLevelCount=Math.floor(Math.log2(n))+1}return this._glTextures[e.uid]=s,this.managedTextures.includes(e)||(e.on("update",this.onSourceUpdate,this),e.on("resize",this.onSourceUpdate,this),e.on("styleChange",this.onStyleChange,this),e.on("destroy",this.onSourceDestroy,this),e.on("unload",this.onSourceUnload,this),e.on("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.push(e)),this.onSourceUpdate(e),this.updateStyle(e,!1),s}onStyleChange(e){this.updateStyle(e,!1)}updateStyle(e,r){const s=this._gl,n=this.getGlSource(e);s.bindTexture(s.TEXTURE_2D,n.texture),this._boundTextures[this._activeTextureLocation]=e,W(e.style,s,e.mipLevelCount>1,this._renderer.context.extensions.anisotropicFiltering,"texParameteri",s.TEXTURE_2D,!this._renderer.context.supports.nonPowOf2wrapping&&!e.isPowerOfTwo,r)}onSourceUnload(e){const r=this._glTextures[e.uid];r&&(this.unbind(e),this._glTextures[e.uid]=null,this._gl.deleteTexture(r.texture))}onSourceUpdate(e){const r=this._gl,s=this.getGlSource(e);r.bindTexture(r.TEXTURE_2D,s.texture),this._boundTextures[this._activeTextureLocation]=e,this._uploads[e.uploadMethodId]?this._uploads[e.uploadMethodId].upload(e,s,r,this._renderer.context.webGLVersion):r.texImage2D(r.TEXTURE_2D,0,r.RGBA,e.pixelWidth,e.pixelHeight,0,r.RGBA,r.UNSIGNED_BYTE,null),e.autoGenerateMipmaps&&e.mipLevelCount>1&&this.onUpdateMipmaps(e,!1)}onUpdateMipmaps(e,r=!0){r&&this.bindSource(e,0);const s=this.getGlSource(e);this._gl.generateMipmap(s.target)}onSourceDestroy(e){e.off("destroy",this.onSourceDestroy,this),e.off("update",this.onSourceUpdate,this),e.off("resize",this.onSourceUpdate,this),e.off("unload",this.onSourceUnload,this),e.off("styleChange",this.onStyleChange,this),e.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(e),1),this.onSourceUnload(e)}_initSampler(e){const r=this._gl,s=this._gl.createSampler();return this._glSamplers[e._resourceId]=s,W(e,r,this._boundTextures[this._activeTextureLocation].mipLevelCount>1,this._renderer.context.extensions.anisotropicFiltering,"samplerParameteri",s,!1,!0),this._glSamplers[e._resourceId]}_getGlSampler(e){return this._glSamplers[e._resourceId]||this._initSampler(e)}getGlSource(e){return this._glTextures[e.uid]||this._initSource(e)}generateCanvas(e){const{pixels:r,width:s,height:n}=this.getPixels(e),i=y.get().createCanvas();i.width=s,i.height=n;const a=i.getContext("2d");if(a){const o=a.createImageData(s,n);o.data.set(r),a.putImageData(o,0,0)}return i}getPixels(e){const r=e.source.resolution,s=e.frame,n=Math.max(Math.round(s.width*r),1),i=Math.max(Math.round(s.height*r),1),a=new Uint8Array(Bt*n*i),o=this._renderer,c=o.renderTarget.getRenderTarget(e),u=o.renderTarget.getGpuRenderTarget(c),_=o.gl;return _.bindFramebuffer(_.FRAMEBUFFER,u.resolveTargetFramebuffer),_.readPixels(Math.round(s.x*r),Math.round(s.y*r),n,i,_.RGBA,_.UNSIGNED_BYTE,a),{pixels:new Uint8ClampedArray(a.buffer),width:n,height:i}}destroy(){this.managedTextures.slice().forEach(e=>this.onSourceDestroy(e)),this.managedTextures=null,this._renderer=null}}Se.extension={type:[l.WebGLSystem],name:"texture"};class ge{init(){const e=new P({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uTransformMatrix:{value:new $,type:"mat3x3<f32>"},uRound:{value:0,type:"f32"}}),r=U({name:"graphics",bits:[z,Y(j),Z,G]});this.shader=new R({glProgram:r,resources:{localUniforms:e,batchSamplers:Q}})}execute(e,r){const s=r.context,n=s.customShader||this.shader,i=e.renderer,a=i.graphicsContext,{geometry:o,instructions:c}=a.getContextRenderData(s);n.groups[0]=i.globalUniforms.bindGroup,i.shader.bind(n),i.geometry.bind(o,n.glProgram);const u=c.instructions;for(let _=0;_<c.instructionSize;_++){const h=u[_];if(h.size){for(let d=0;d<h.textures.textures.length;d++)i.texture.bind(h.textures.textures[d],d);i.geometry.draw("triangle-list",h.size,h.start)}}}destroy(){this.shader.destroy(!0),this.shader=null}}ge.extension={type:[l.WebGLPipesAdaptor],name:"graphics"};class pe{init(){const e=U({name:"mesh",bits:[Z,Fe,G]});this._shader=new R({glProgram:e,resources:{uTexture:E.EMPTY.source,textureUniforms:{uTextureMatrix:{type:"mat3x3<f32>",value:new $}}}})}execute(e,r){const s=e.renderer;let n=r._shader;if(n){if(!n.glProgram){m("Mesh shader has no glProgram",r.shader);return}}else{n=this._shader;const i=r.texture,a=i.source;n.resources.uTexture=a,n.resources.uSampler=a.style,n.resources.textureUniforms.uniforms.uTextureMatrix=i.textureMatrix.mapCoord}n.groups[100]=s.globalUniforms.bindGroup,n.groups[101]=e.localUniformsBindGroup,s.encoder.draw({geometry:r._geometry,shader:n,state:r.state})}destroy(){this._shader.destroy(!0),this._shader=null}}pe.extension={type:[l.WebGLPipesAdaptor],name:"mesh"};const Nt=[...Me,_e,We,we,te,Se,fe,ne,me,de,oe,mt,ce,ae],It=[...Le],Dt=[ee,pe,ge],Re=[],Te=[],ve=[];p.handleByNamedList(l.WebGLSystem,Re);p.handleByNamedList(l.WebGLPipes,Te);p.handleByNamedList(l.WebGLPipesAdaptor,ve);p.add(...Nt,...It,...Dt);Ht=class extends Ne{constructor(){const e={name:"webgl",type:De.WEBGL,systems:Re,renderPipes:Te,renderPipeAdaptors:ve};super(e)}}});export{Ht as WebGLRenderer,__tla};
|
||||
41
qbit/vuetorrent/public/assets/WebGPURenderer-D9yoqJyb.js
Normal file
41
qbit/vuetorrent/public/assets/WebGPURenderer-D9yoqJyb.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import{M as R,g as E,E as l,f as ie,S as P,B as S,b as ne,c as A,d as b,h as oe,i as ae,D as ue,j as k,k as M,w as ce,e as G,A as de,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{S as D,c as T,a as z,g as L,r as C,b as v,d as he,U as pe,l as le,e as fe,R as ge,__tla as __tla_1}from"./colorToUniform-DavgjoLv.js";import{c as me,u as _e,U as be,B as ye,G as xe,e as Ge,R as Be,t as Se,S as Pe,a as Te,__tla as __tla_2}from"./SharedSystems-Do60oLa7.js";import{C as w,__tla as __tla_3}from"./CanvasPool-CW8lNMNV.js";import{__tla as __tla_4}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Bt9E0pwX.js";import{__tla as __tla_5}from"./index-bUuJUL5l.js";import"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";import{__tla as __tla_6}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-CJmQtbIM.js";let Qe;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})()]).then(async()=>{const y=D.for2d();class O{init(){const e=T({name:"batch",bits:[z,L(R),C]});this._shader=new v({gpuProgram:e,groups:{}})}start(e,t){const r=e.renderer,s=r.encoder,i=this._shader.gpuProgram;this._geometry=t,s.setGeometry(t),y.blendMode="normal",r.pipeline.getPipeline(t,i,y);const n=r.globalUniforms.bindGroup;s.resetBindGroup(1),s.setBindGroup(0,n,i)}execute(e,t){const r=this._shader.gpuProgram,s=e.renderer,i=s.encoder;if(!t.bindGroup){const u=t.textures;t.bindGroup=E(u.textures,u.count)}y.blendMode=t.blendMode;const n=s.bindGroup.getBindGroup(t.bindGroup,r,1),o=s.pipeline.getPipeline(this._geometry,r,y);t.bindGroup._touch(s.textureGC.count),i.setPipeline(o),i.renderPassEncoder.setBindGroup(1,n),i.renderPassEncoder.drawIndexed(t.size,1,t.start)}destroy(){this._shader.destroy(!0),this._shader=null}}O.extension={type:[l.WebGPUPipesAdaptor],name:"batch"};class H{constructor(e){this._hash=Object.create(null),this._renderer=e}contextChange(e){this._gpu=e}getBindGroup(e,t,r){return e._updateKey(),this._hash[e._key]||this._createBindGroup(e,t,r)}_createBindGroup(e,t,r){const s=this._gpu.device,i=t.layout[r],n=[],o=this._renderer;for(const f in i){const h=e.resources[f]??e.resources[i[f]];let p;if(h._resourceType==="uniformGroup"){const d=h;o.ubo.updateUniformGroup(d);const g=d.buffer;p={buffer:o.buffer.getGPUBuffer(g),offset:0,size:g.descriptor.size}}else if(h._resourceType==="buffer"){const d=h;p={buffer:o.buffer.getGPUBuffer(d),offset:0,size:d.descriptor.size}}else if(h._resourceType==="bufferResource"){const d=h;p={buffer:o.buffer.getGPUBuffer(d.buffer),offset:d.offset,size:d.size}}else if(h._resourceType==="textureSampler"){const d=h;p=o.texture.getGpuSampler(d)}else if(h._resourceType==="textureSource"){const d=h;p=o.texture.getGpuSource(d).createView({})}n.push({binding:i[f],resource:p})}const u=o.shader.getProgramData(t).bindGroups[r],c=s.createBindGroup({layout:u,entries:n});return this._hash[e._key]=c,c}destroy(){for(const e of Object.keys(this._hash))this._hash[e]=null;this._hash=null,this._renderer=null}}H.extension={type:[l.WebGPUSystem],name:"bindGroup"};class F{constructor(){this._gpuBuffers=Object.create(null),this._managedBuffers=[]}contextChange(e){this._gpu=e}getGPUBuffer(e){return this._gpuBuffers[e.uid]||this.createGPUBuffer(e)}updateBuffer(e){const t=this._gpuBuffers[e.uid]||this.createGPUBuffer(e),r=e.data;return e._updateID&&r&&(e._updateID=0,this._gpu.device.queue.writeBuffer(t,0,r.buffer,0,(e._updateSize||r.byteLength)+3&-4)),t}destroyAll(){for(const e in this._gpuBuffers)this._gpuBuffers[e].destroy();this._gpuBuffers={}}createGPUBuffer(e){this._gpuBuffers[e.uid]||(e.on("update",this.updateBuffer,this),e.on("change",this.onBufferChange,this),e.on("destroy",this.onBufferDestroy,this));const t=this._gpu.device.createBuffer(e.descriptor);return e._updateID=0,e.data&&(ie(e.data.buffer,t.getMappedRange()),t.unmap()),this._gpuBuffers[e.uid]=t,this._managedBuffers.push(e),t}onBufferChange(e){this._gpuBuffers[e.uid].destroy(),e._updateID=0,this._gpuBuffers[e.uid]=this.createGPUBuffer(e)}onBufferDestroy(e){this._managedBuffers.splice(this._managedBuffers.indexOf(e),1),this._destroyBuffer(e)}destroy(){this._managedBuffers.forEach(e=>this._destroyBuffer(e)),this._managedBuffers=null,this._gpuBuffers=null}_destroyBuffer(e){this._gpuBuffers[e.uid].destroy(),e.off("update",this.updateBuffer,this),e.off("change",this.onBufferChange,this),e.off("destroy",this.onBufferDestroy,this),this._gpuBuffers[e.uid]=null}}F.extension={type:[l.WebGPUSystem],name:"buffer"};class Ce{constructor({minUniformOffsetAlignment:e}){this._minUniformOffsetAlignment=256,this.byteIndex=0,this._minUniformOffsetAlignment=e,this.data=new Float32Array(65535)}clear(){this.byteIndex=0}addEmptyGroup(e){if(e>this._minUniformOffsetAlignment/4)throw new Error(`UniformBufferBatch: array is too large: ${e*4}`);const t=this.byteIndex;let r=t+e*4;if(r=Math.ceil(r/this._minUniformOffsetAlignment)*this._minUniformOffsetAlignment,r>this.data.length*4)throw new Error("UniformBufferBatch: ubo batch got too big");return this.byteIndex=r,t}addGroup(e){const t=this.addEmptyGroup(e.length);for(let r=0;r<e.length;r++)this.data[t/4+r]=e[r];return t}destroy(){this._buffer.destroy(),this._buffer=null,this.data=null}}class I{constructor(e){this._colorMaskCache=15,this._renderer=e}setMask(e){this._colorMaskCache!==e&&(this._colorMaskCache=e,this._renderer.pipeline.setColorMask(e))}destroy(){this._renderer=null,this._colorMaskCache=null}}I.extension={type:[l.WebGPUSystem],name:"colorMask"};class U{constructor(e){this._renderer=e}async init(e){return this._initPromise?this._initPromise:(this._initPromise=this._createDeviceAndAdaptor(e).then(t=>{this.gpu=t,this._renderer.runners.contextChange.emit(this.gpu)}),this._initPromise)}contextChange(e){this._renderer.gpu=e}async _createDeviceAndAdaptor(e){const t=await navigator.gpu.requestAdapter({powerPreference:e.powerPreference,forceFallbackAdapter:e.forceFallbackAdapter}),r=["texture-compression-bc","texture-compression-astc","texture-compression-etc2"].filter(i=>t.features.has(i)),s=await t.requestDevice({requiredFeatures:r});return{adapter:t,device:s}}destroy(){this.gpu=null,this._renderer=null}}U.extension={type:[l.WebGPUSystem],name:"device"};U.defaultOptions={powerPreference:void 0,forceFallbackAdapter:!1};class W{constructor(e){this._boundBindGroup=Object.create(null),this._boundVertexBuffer=Object.create(null),this._renderer=e}renderStart(){this.commandFinished=new Promise(e=>{this._resolveCommandFinished=e}),this.commandEncoder=this._renderer.gpu.device.createCommandEncoder()}beginRenderPass(e){this.endRenderPass(),this._clearCache(),this.renderPassEncoder=this.commandEncoder.beginRenderPass(e.descriptor)}endRenderPass(){this.renderPassEncoder&&this.renderPassEncoder.end(),this.renderPassEncoder=null}setViewport(e){this.renderPassEncoder.setViewport(e.x,e.y,e.width,e.height,0,1)}setPipelineFromGeometryProgramAndState(e,t,r,s){const i=this._renderer.pipeline.getPipeline(e,t,r,s);this.setPipeline(i)}setPipeline(e){this._boundPipeline!==e&&(this._boundPipeline=e,this.renderPassEncoder.setPipeline(e))}_setVertexBuffer(e,t){this._boundVertexBuffer[e]!==t&&(this._boundVertexBuffer[e]=t,this.renderPassEncoder.setVertexBuffer(e,this._renderer.buffer.updateBuffer(t)))}_setIndexBuffer(e){if(this._boundIndexBuffer===e)return;this._boundIndexBuffer=e;const t=e.data.BYTES_PER_ELEMENT===2?"uint16":"uint32";this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(e),t)}resetBindGroup(e){this._boundBindGroup[e]=null}setBindGroup(e,t,r){if(this._boundBindGroup[e]===t)return;this._boundBindGroup[e]=t,t._touch(this._renderer.textureGC.count);const s=this._renderer.bindGroup.getBindGroup(t,r,e);this.renderPassEncoder.setBindGroup(e,s)}setGeometry(e){for(const t in e.attributes){const r=e.attributes[t];this._setVertexBuffer(r.location,r.buffer)}e.indexBuffer&&this._setIndexBuffer(e.indexBuffer)}_setShaderBindGroups(e,t){for(const r in e.groups){const s=e.groups[r];t||this._syncBindGroup(s),this.setBindGroup(r,s,e.gpuProgram)}}_syncBindGroup(e){for(const t in e.resources){const r=e.resources[t];r.isUniformGroup&&this._renderer.ubo.updateUniformGroup(r)}}draw(e){const{geometry:t,shader:r,state:s,topology:i,size:n,start:o,instanceCount:u,skipSync:c}=e;this.setPipelineFromGeometryProgramAndState(t,r.gpuProgram,s,i),this.setGeometry(t),this._setShaderBindGroups(r,c),t.indexBuffer?this.renderPassEncoder.drawIndexed(n||t.indexBuffer.data.length,u||t.instanceCount,o||0):this.renderPassEncoder.draw(n||t.getSize(),u||t.instanceCount,o||0)}finishRenderPass(){this.renderPassEncoder&&(this.renderPassEncoder.end(),this.renderPassEncoder=null)}postrender(){this.finishRenderPass(),this._gpu.device.queue.submit([this.commandEncoder.finish()]),this._resolveCommandFinished(),this.commandEncoder=null}restoreRenderPass(){const e=this._renderer.renderTarget.adaptor.getDescriptor(this._renderer.renderTarget.renderTarget,!1,[0,0,0,1]);this.renderPassEncoder=this.commandEncoder.beginRenderPass(e);const t=this._boundPipeline,r={...this._boundVertexBuffer},s=this._boundIndexBuffer,i={...this._boundBindGroup};this._clearCache();const n=this._renderer.renderTarget.viewport;this.renderPassEncoder.setViewport(n.x,n.y,n.width,n.height,0,1),this.setPipeline(t);for(const o in r)this._setVertexBuffer(o,r[o]);for(const o in i)this.setBindGroup(o,i[o],null);this._setIndexBuffer(s)}_clearCache(){for(let e=0;e<16;e++)this._boundBindGroup[e]=null,this._boundVertexBuffer[e]=null;this._boundIndexBuffer=null,this._boundPipeline=null}destroy(){this._renderer=null,this._gpu=null,this._boundBindGroup=null,this._boundVertexBuffer=null,this._boundIndexBuffer=null,this._boundPipeline=null}contextChange(e){this._gpu=e}}W.extension={type:[l.WebGPUSystem],name:"encoder",priority:1};class V{constructor(e){this._renderTargetStencilState=Object.create(null),this._renderer=e,e.renderTarget.onRenderTargetChange.add(this)}onRenderTargetChange(e){let t=this._renderTargetStencilState[e.uid];t||(t=this._renderTargetStencilState[e.uid]={stencilMode:P.DISABLED,stencilReference:0}),this._activeRenderTarget=e,this.setStencilMode(t.stencilMode,t.stencilReference)}setStencilMode(e,t){const r=this._renderTargetStencilState[this._activeRenderTarget.uid];r.stencilMode=e,r.stencilReference=t;const s=this._renderer;s.pipeline.setStencilMode(e),s.encoder.renderPassEncoder.setStencilReference(t)}destroy(){this._renderer.renderTarget.onRenderTargetChange.remove(this),this._renderer=null,this._activeRenderTarget=null,this._renderTargetStencilState=null}}V.extension={type:[l.WebGPUSystem],name:"stencil"};const x={i32:{align:4,size:4},u32:{align:4,size:4},f32:{align:4,size:4},f16:{align:2,size:2},"vec2<i32>":{align:8,size:8},"vec2<u32>":{align:8,size:8},"vec2<f32>":{align:8,size:8},"vec2<f16>":{align:4,size:4},"vec3<i32>":{align:16,size:12},"vec3<u32>":{align:16,size:12},"vec3<f32>":{align:16,size:12},"vec3<f16>":{align:8,size:6},"vec4<i32>":{align:16,size:16},"vec4<u32>":{align:16,size:16},"vec4<f32>":{align:16,size:16},"vec4<f16>":{align:8,size:8},"mat2x2<f32>":{align:8,size:16},"mat2x2<f16>":{align:4,size:8},"mat3x2<f32>":{align:8,size:24},"mat3x2<f16>":{align:4,size:12},"mat4x2<f32>":{align:8,size:32},"mat4x2<f16>":{align:4,size:16},"mat2x3<f32>":{align:16,size:32},"mat2x3<f16>":{align:8,size:16},"mat3x3<f32>":{align:16,size:48},"mat3x3<f16>":{align:8,size:24},"mat4x3<f32>":{align:16,size:64},"mat4x3<f16>":{align:8,size:32},"mat2x4<f32>":{align:16,size:32},"mat2x4<f16>":{align:8,size:16},"mat3x4<f32>":{align:16,size:48},"mat3x4<f16>":{align:8,size:24},"mat4x4<f32>":{align:16,size:64},"mat4x4<f16>":{align:8,size:32}};function ve(a){const e=a.map(r=>({data:r,offset:0,size:0}));let t=0;for(let r=0;r<e.length;r++){const s=e[r];let i=x[s.data.type].size;const n=x[s.data.type].align;if(!x[s.data.type])throw new Error(`[Pixi.js] WebGPU UniformBuffer: Unknown type ${s.data.type}`);s.data.size>1&&(i=Math.max(i,n)*s.data.size),t=Math.ceil(t/n)*n,s.size=i,s.offset=t,t+=i}return t=Math.ceil(t/16)*16,{uboElements:e,size:t}}function Ue(a,e){const{size:t,align:r}=x[a.data.type],s=(r-t)/4;return`
|
||||
v = uv.${a.data.name};
|
||||
${e!==0?`offset += ${e};`:""}
|
||||
|
||||
arrayOffset = offset;
|
||||
|
||||
t = 0;
|
||||
|
||||
for(var i=0; i < ${a.data.size*(t/4)}; i++)
|
||||
{
|
||||
for(var j = 0; j < ${t/4}; j++)
|
||||
{
|
||||
data[arrayOffset++] = v[t++];
|
||||
}
|
||||
${s!==0?`arrayOffset += ${s};`:""}
|
||||
}
|
||||
`}function Me(a){return me(a,"uboWgsl",Ue,_e)}class j extends be{constructor(){super({createUboElements:ve,generateUboSync:Me})}}j.extension={type:[l.WebGPUSystem],name:"ubo"};const _=128;class N{constructor(e){this._bindGroupHash=Object.create(null),this._buffers=[],this._bindGroups=[],this._bufferResources=[],this._renderer=e,this._batchBuffer=new Ce({minUniformOffsetAlignment:_});const t=256/_;for(let r=0;r<t;r++){let s=S.UNIFORM|S.COPY_DST;r===0&&(s|=S.COPY_SRC),this._buffers.push(new ne({data:this._batchBuffer.data,usage:s}))}}renderEnd(){this._uploadBindGroups(),this._resetBindGroups()}_resetBindGroups(){for(const e in this._bindGroupHash)this._bindGroupHash[e]=null;this._batchBuffer.clear()}getUniformBindGroup(e,t){if(!t&&this._bindGroupHash[e.uid])return this._bindGroupHash[e.uid];this._renderer.ubo.ensureUniformGroup(e);const r=e.buffer.data,s=this._batchBuffer.addEmptyGroup(r.length);return this._renderer.ubo.syncUniformGroup(e,this._batchBuffer.data,s/4),this._bindGroupHash[e.uid]=this._getBindGroup(s/_),this._bindGroupHash[e.uid]}getUboResource(e){this._renderer.ubo.updateUniformGroup(e);const t=e.buffer.data,r=this._batchBuffer.addGroup(t);return this._getBufferResource(r/_)}getArrayBindGroup(e){const t=this._batchBuffer.addGroup(e);return this._getBindGroup(t/_)}getArrayBufferResource(e){const r=this._batchBuffer.addGroup(e)/_;return this._getBufferResource(r)}_getBufferResource(e){if(!this._bufferResources[e]){const t=this._buffers[e%2];this._bufferResources[e]=new ye({buffer:t,offset:(e/2|0)*256,size:_})}return this._bufferResources[e]}_getBindGroup(e){if(!this._bindGroups[e]){const t=new A({0:this._getBufferResource(e)});this._bindGroups[e]=t}return this._bindGroups[e]}_uploadBindGroups(){const e=this._renderer.buffer,t=this._buffers[0];t.update(this._batchBuffer.byteIndex),e.updateBuffer(t);const r=this._renderer.gpu.device.createCommandEncoder();for(let s=1;s<this._buffers.length;s++){const i=this._buffers[s];r.copyBufferToBuffer(e.getGPUBuffer(t),_,e.getGPUBuffer(i),0,this._batchBuffer.byteIndex)}this._renderer.gpu.device.queue.submit([r.finish()])}destroy(){for(let e=0;e<this._bindGroups.length;e++)this._bindGroups[e].destroy();this._bindGroups=null,this._bindGroupHash=null;for(let e=0;e<this._buffers.length;e++)this._buffers[e].destroy();this._buffers=null;for(let e=0;e<this._bufferResources.length;e++)this._bufferResources[e].destroy();this._bufferResources=null,this._batchBuffer.destroy(),this._bindGroupHash=null,this._renderer=null}}N.extension={type:[l.WebGPUPipes],name:"uniformBatch"};const we={"point-list":0,"line-list":1,"line-strip":2,"triangle-list":3,"triangle-strip":4};function Re(a,e,t,r,s){return a<<24|e<<16|t<<10|r<<5|s}function Ee(a,e,t,r){return t<<6|a<<3|r<<1|e}class K{constructor(e){this._moduleCache=Object.create(null),this._bufferLayoutsCache=Object.create(null),this._pipeCache=Object.create(null),this._pipeStateCaches=Object.create(null),this._colorMask=15,this._multisampleCount=1,this._renderer=e}contextChange(e){this._gpu=e,this.setStencilMode(P.DISABLED),this._updatePipeHash()}setMultisampleCount(e){this._multisampleCount!==e&&(this._multisampleCount=e,this._updatePipeHash())}setRenderTarget(e){this._multisampleCount=e.msaaSamples,this._depthStencilAttachment=e.descriptor.depthStencilAttachment?1:0,this._updatePipeHash()}setColorMask(e){this._colorMask!==e&&(this._colorMask=e,this._updatePipeHash())}setStencilMode(e){this._stencilMode!==e&&(this._stencilMode=e,this._stencilState=xe[e],this._updatePipeHash())}setPipeline(e,t,r,s){const i=this.getPipeline(e,t,r);s.setPipeline(i)}getPipeline(e,t,r,s){e._layoutKey||(Ge(e,t.attributeData),this._generateBufferKey(e)),s=s||e.topology;const i=Re(e._layoutKey,t._layoutKey,r.data,r._blendModeId,we[s]);return this._pipeCache[i]?this._pipeCache[i]:(this._pipeCache[i]=this._createPipeline(e,t,r,s),this._pipeCache[i])}_createPipeline(e,t,r,s){const i=this._gpu.device,n=this._createVertexBufferLayouts(e),o=this._renderer.state.getColorTargets(r);o[0].writeMask=this._stencilMode===P.RENDERING_MASK_ADD?0:this._colorMask;const u=this._renderer.shader.getProgramData(t).pipeline,c={vertex:{module:this._getModule(t.vertex.source),entryPoint:t.vertex.entryPoint,buffers:n},fragment:{module:this._getModule(t.fragment.source),entryPoint:t.fragment.entryPoint,targets:o},primitive:{topology:s,cullMode:r.cullMode},layout:u,multisample:{count:this._multisampleCount},label:"PIXI Pipeline"};return this._depthStencilAttachment&&(c.depthStencil={...this._stencilState,format:"depth24plus-stencil8",depthWriteEnabled:r.depthTest,depthCompare:r.depthTest?"less":"always"}),i.createRenderPipeline(c)}_getModule(e){return this._moduleCache[e]||this._createModule(e)}_createModule(e){const t=this._gpu.device;return this._moduleCache[e]=t.createShaderModule({code:e}),this._moduleCache[e]}_generateBufferKey(e){const t=[];let r=0;const s=Object.keys(e.attributes).sort();for(let n=0;n<s.length;n++){const o=e.attributes[s[n]];t[r++]=o.location,t[r++]=o.offset,t[r++]=o.format,t[r++]=o.stride}const i=t.join("");return e._layoutKey=he(i,"geometry"),e._layoutKey}_createVertexBufferLayouts(e){if(this._bufferLayoutsCache[e._layoutKey])return this._bufferLayoutsCache[e._layoutKey];const t=[];return e.buffers.forEach(r=>{const s={arrayStride:0,stepMode:"vertex",attributes:[]},i=s.attributes;for(const n in e.attributes){const o=e.attributes[n];o.buffer===r&&(s.arrayStride=o.stride,s.stepMode=o.instance?"instance":"vertex",i.push({shaderLocation:o.location,offset:o.offset,format:o.format}))}i.length&&t.push(s)}),this._bufferLayoutsCache[e._layoutKey]=t,t}_updatePipeHash(){const e=Ee(this._stencilMode,this._multisampleCount,this._colorMask,this._depthStencilAttachment);this._pipeStateCaches[e]||(this._pipeStateCaches[e]=Object.create(null)),this._pipeCache=this._pipeStateCaches[e]}destroy(){this._renderer=null,this._bufferLayoutsCache=null}}K.extension={type:[l.WebGPUSystem],name:"pipeline"};class Ae{constructor(){this.contexts=[],this.msaaTextures=[],this.msaaSamples=1}}class ke{init(e,t){this._renderer=e,this._renderTargetSystem=t}copyToTexture(e,t,r,s,i){const n=this._renderer,o=this._getGpuColorTexture(e),u=n.texture.getGpuSource(t.source);return n.encoder.commandEncoder.copyTextureToTexture({texture:o,origin:r},{texture:u,origin:i},s),t}startRenderPass(e,t=!0,r,s){const n=this._renderTargetSystem.getGpuRenderTarget(e),o=this.getDescriptor(e,t,r);n.descriptor=o,this._renderer.pipeline.setRenderTarget(n),this._renderer.encoder.beginRenderPass(n),this._renderer.encoder.setViewport(s)}finishRenderPass(){this._renderer.encoder.endRenderPass()}_getGpuColorTexture(e){const t=this._renderTargetSystem.getGpuRenderTarget(e);return t.contexts[0]?t.contexts[0].getCurrentTexture():this._renderer.texture.getGpuSource(e.colorTextures[0].source)}getDescriptor(e,t,r){typeof t=="boolean"&&(t=t?b.ALL:b.NONE);const s=this._renderTargetSystem,i=s.getGpuRenderTarget(e),n=e.colorTextures.map((c,f)=>{const h=i.contexts[f];let p,d;h?p=h.getCurrentTexture().createView():p=this._renderer.texture.getGpuSource(c).createView({mipLevelCount:1}),i.msaaTextures[f]&&(d=p,p=this._renderer.texture.getTextureView(i.msaaTextures[f]));const g=t&b.COLOR?"clear":"load";return r??(r=s.defaultClearColor),{view:p,resolveTarget:d,clearValue:r,storeOp:"store",loadOp:g}});let o;if((e.stencil||e.depth)&&!e.depthStencilTexture&&(e.ensureDepthStencilTexture(),e.depthStencilTexture.source.sampleCount=i.msaa?4:1),e.depthStencilTexture){const c=t&b.STENCIL?"clear":"load",f=t&b.DEPTH?"clear":"load";o={view:this._renderer.texture.getGpuSource(e.depthStencilTexture.source).createView(),stencilStoreOp:"store",stencilLoadOp:c,depthClearValue:1,depthLoadOp:f,depthStoreOp:"store"}}return{colorAttachments:n,depthStencilAttachment:o}}clear(e,t=!0,r,s){if(!t)return;const{gpu:i,encoder:n}=this._renderer,o=i.device;if(n.commandEncoder===null){const c=o.createCommandEncoder(),f=this.getDescriptor(e,t,r),h=c.beginRenderPass(f);h.setViewport(s.x,s.y,s.width,s.height,0,1),h.end();const p=c.finish();o.queue.submit([p])}else this.startRenderPass(e,t,r,s)}initGpuRenderTarget(e){e.isRoot=!0;const t=new Ae;return e.colorTextures.forEach((r,s)=>{if(oe.test(r.resource)){const i=r.resource.getContext("webgpu"),n=r.transparent?"premultiplied":"opaque";try{i.configure({device:this._renderer.gpu.device,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC,format:"bgra8unorm",alphaMode:n})}catch(o){console.error(o)}t.contexts[s]=i}if(t.msaa=r.source.antialias,r.source.antialias){const i=new ae({width:0,height:0,sampleCount:4});t.msaaTextures[s]=i}}),t.msaa&&(t.msaaSamples=4,e.depthStencilTexture&&(e.depthStencilTexture.source.sampleCount=4)),t}ensureDepthStencilTexture(e){const t=this._renderTargetSystem.getGpuRenderTarget(e);e.depthStencilTexture&&t.msaa&&(e.depthStencilTexture.source.sampleCount=4)}resizeGpuRenderTarget(e){const t=this._renderTargetSystem.getGpuRenderTarget(e);t.width=e.width,t.height=e.height,t.msaa&&e.colorTextures.forEach((r,s)=>{t.msaaTextures[s]?.resize(r.source.width,r.source.height,r.source._resolution)})}}class q extends Be{constructor(e){super(e),this.adaptor=new ke,this.adaptor.init(e,this)}}q.extension={type:[l.WebGPUSystem],name:"renderTarget"};class Y{constructor(){this._gpuProgramData=Object.create(null)}contextChange(e){this._gpu=e}getProgramData(e){return this._gpuProgramData[e._layoutKey]||this._createGPUProgramData(e)}_createGPUProgramData(e){const t=this._gpu.device,r=e.gpuLayout.map(i=>t.createBindGroupLayout({entries:i})),s={bindGroupLayouts:r};return this._gpuProgramData[e._layoutKey]={bindGroups:r,pipeline:t.createPipelineLayout(s)},this._gpuProgramData[e._layoutKey]}destroy(){this._gpu=null,this._gpuProgramData=null}}Y.extension={type:[l.WebGPUSystem],name:"shader"};const m={};m.normal={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"}};m.add={alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one",operation:"add"}};m.multiply={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"dst",dstFactor:"one-minus-src-alpha",operation:"add"}};m.screen={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src",operation:"add"}};m.overlay={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src",operation:"add"}};m.none={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"zero",dstFactor:"zero",operation:"add"}};m["normal-npm"]={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"}};m["add-npm"]={alpha:{srcFactor:"one",dstFactor:"one",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one",operation:"add"}};m["screen-npm"]={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one-minus-src",operation:"add"}};m.erase={alpha:{srcFactor:"zero",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"zero",dstFactor:"one-minus-src",operation:"add"}};class ${constructor(){this.defaultState=new D,this.defaultState.blend=!0}contextChange(e){this.gpu=e}getColorTargets(e){return[{format:"bgra8unorm",writeMask:0,blend:m[e.blendMode]||m.normal}]}destroy(){this.gpu=null}}$.extension={type:[l.WebGPUSystem],name:"state"};const De={type:"image",upload(a,e,t){const r=a.resource,s=(a.pixelWidth|0)*(a.pixelHeight|0),i=r.byteLength/s;t.device.queue.writeTexture({texture:e},r,{offset:0,rowsPerImage:a.pixelHeight,bytesPerRow:a.pixelHeight*i},{width:a.pixelWidth,height:a.pixelHeight,depthOrArrayLayers:1})}},X={"bc1-rgba-unorm":{blockBytes:8,blockWidth:4,blockHeight:4},"bc2-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"bc3-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"bc7-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"etc1-rgb-unorm":{blockBytes:8,blockWidth:4,blockHeight:4},"etc2-rgba8unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"astc-4x4-unorm":{blockBytes:16,blockWidth:4,blockHeight:4}},ze={blockBytes:4,blockWidth:1,blockHeight:1},Le={type:"compressed",upload(a,e,t){let r=a.pixelWidth,s=a.pixelHeight;const i=X[a.format]||ze;for(let n=0;n<a.resource.length;n++){const o=a.resource[n],u=Math.ceil(r/i.blockWidth)*i.blockBytes;t.device.queue.writeTexture({texture:e,mipLevel:n},o,{offset:0,bytesPerRow:u},{width:Math.ceil(r/i.blockWidth)*i.blockWidth,height:Math.ceil(s/i.blockHeight)*i.blockHeight,depthOrArrayLayers:1}),r=Math.max(r>>1,1),s=Math.max(s>>1,1)}}},Z={type:"image",upload(a,e,t){const r=a.resource;if(!r)return;const s=Math.min(e.width,a.resourceWidth||a.pixelWidth),i=Math.min(e.height,a.resourceHeight||a.pixelHeight),n=a.alphaMode==="premultiply-alpha-on-upload";t.device.queue.copyExternalImageToTexture({source:r},{texture:e,premultipliedAlpha:n},{width:s,height:i})}},Oe={type:"video",upload(a,e,t){Z.upload(a,e,t)}};class He{constructor(e){this.device=e,this.sampler=e.createSampler({minFilter:"linear"}),this.pipelines={}}_getMipmapPipeline(e){let t=this.pipelines[e];return t||(this.mipmapShaderModule||(this.mipmapShaderModule=this.device.createShaderModule({code:`
|
||||
var<private> pos : array<vec2<f32>, 3> = array<vec2<f32>, 3>(
|
||||
vec2<f32>(-1.0, -1.0), vec2<f32>(-1.0, 3.0), vec2<f32>(3.0, -1.0));
|
||||
|
||||
struct VertexOutput {
|
||||
@builtin(position) position : vec4<f32>,
|
||||
@location(0) texCoord : vec2<f32>,
|
||||
};
|
||||
|
||||
@vertex
|
||||
fn vertexMain(@builtin(vertex_index) vertexIndex : u32) -> VertexOutput {
|
||||
var output : VertexOutput;
|
||||
output.texCoord = pos[vertexIndex] * vec2<f32>(0.5, -0.5) + vec2<f32>(0.5);
|
||||
output.position = vec4<f32>(pos[vertexIndex], 0.0, 1.0);
|
||||
return output;
|
||||
}
|
||||
|
||||
@group(0) @binding(0) var imgSampler : sampler;
|
||||
@group(0) @binding(1) var img : texture_2d<f32>;
|
||||
|
||||
@fragment
|
||||
fn fragmentMain(@location(0) texCoord : vec2<f32>) -> @location(0) vec4<f32> {
|
||||
return textureSample(img, imgSampler, texCoord);
|
||||
}
|
||||
`})),t=this.device.createRenderPipeline({layout:"auto",vertex:{module:this.mipmapShaderModule,entryPoint:"vertexMain"},fragment:{module:this.mipmapShaderModule,entryPoint:"fragmentMain",targets:[{format:e}]}}),this.pipelines[e]=t),t}generateMipmap(e){const t=this._getMipmapPipeline(e.format);if(e.dimension==="3d"||e.dimension==="1d")throw new Error("Generating mipmaps for non-2d textures is currently unsupported!");let r=e;const s=e.depthOrArrayLayers||1,i=e.usage&GPUTextureUsage.RENDER_ATTACHMENT;if(!i){const u={size:{width:Math.ceil(e.width/2),height:Math.ceil(e.height/2),depthOrArrayLayers:s},format:e.format,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC|GPUTextureUsage.RENDER_ATTACHMENT,mipLevelCount:e.mipLevelCount-1};r=this.device.createTexture(u)}const n=this.device.createCommandEncoder({}),o=t.getBindGroupLayout(0);for(let u=0;u<s;++u){let c=e.createView({baseMipLevel:0,mipLevelCount:1,dimension:"2d",baseArrayLayer:u,arrayLayerCount:1}),f=i?1:0;for(let h=1;h<e.mipLevelCount;++h){const p=r.createView({baseMipLevel:f++,mipLevelCount:1,dimension:"2d",baseArrayLayer:u,arrayLayerCount:1}),d=n.beginRenderPass({colorAttachments:[{view:p,storeOp:"store",loadOp:"clear",clearValue:{r:0,g:0,b:0,a:0}}]}),g=this.device.createBindGroup({layout:o,entries:[{binding:0,resource:this.sampler},{binding:1,resource:c}]});d.setPipeline(t),d.setBindGroup(0,g),d.draw(3,1,0,0),d.end(),c=p}}if(!i){const u={width:Math.ceil(e.width/2),height:Math.ceil(e.height/2),depthOrArrayLayers:s};for(let c=1;c<e.mipLevelCount;++c)n.copyTextureToTexture({texture:r,mipLevel:c-1},{texture:e,mipLevel:c},u),u.width=Math.ceil(u.width/2),u.height=Math.ceil(u.height/2)}return this.device.queue.submit([n.finish()]),i||r.destroy(),e}}class J{constructor(e){this.managedTextures=[],this._gpuSources=Object.create(null),this._gpuSamplers=Object.create(null),this._bindGroupHash=Object.create(null),this._textureViewHash=Object.create(null),this._uploads={image:Z,buffer:De,video:Oe,compressed:Le},this._renderer=e}contextChange(e){this._gpu=e}initSource(e){if(e.autoGenerateMipmaps){const u=Math.max(e.pixelWidth,e.pixelHeight);e.mipLevelCount=Math.floor(Math.log2(u))+1}let t=GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST;e.uploadMethodId!=="compressed"&&(t|=GPUTextureUsage.RENDER_ATTACHMENT,t|=GPUTextureUsage.COPY_SRC);const r=X[e.format]||{blockBytes:4,blockWidth:1,blockHeight:1},s=Math.ceil(e.pixelWidth/r.blockWidth)*r.blockWidth,i=Math.ceil(e.pixelHeight/r.blockHeight)*r.blockHeight,n={label:e.label,size:{width:s,height:i},format:e.format,sampleCount:e.sampleCount,mipLevelCount:e.mipLevelCount,dimension:e.dimension,usage:t},o=this._gpu.device.createTexture(n);return this._gpuSources[e.uid]=o,this.managedTextures.includes(e)||(e.on("update",this.onSourceUpdate,this),e.on("resize",this.onSourceResize,this),e.on("destroy",this.onSourceDestroy,this),e.on("unload",this.onSourceUnload,this),e.on("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.push(e)),this.onSourceUpdate(e),o}onSourceUpdate(e){const t=this.getGpuSource(e);t&&(this._uploads[e.uploadMethodId]&&this._uploads[e.uploadMethodId].upload(e,t,this._gpu),e.autoGenerateMipmaps&&e.mipLevelCount>1&&this.onUpdateMipmaps(e))}onSourceUnload(e){const t=this._gpuSources[e.uid];t&&(this._gpuSources[e.uid]=null,t.destroy())}onUpdateMipmaps(e){this._mipmapGenerator||(this._mipmapGenerator=new He(this._gpu.device));const t=this.getGpuSource(e);this._mipmapGenerator.generateMipmap(t)}onSourceDestroy(e){e.off("update",this.onSourceUpdate,this),e.off("unload",this.onSourceUnload,this),e.off("destroy",this.onSourceDestroy,this),e.off("resize",this.onSourceResize,this),e.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(e),1),this.onSourceUnload(e)}onSourceResize(e){const t=this._gpuSources[e.uid];t?(t.width!==e.pixelWidth||t.height!==e.pixelHeight)&&(this._textureViewHash[e.uid]=null,this._bindGroupHash[e.uid]=null,this.onSourceUnload(e),this.initSource(e)):this.initSource(e)}_initSampler(e){return this._gpuSamplers[e._resourceId]=this._gpu.device.createSampler(e),this._gpuSamplers[e._resourceId]}getGpuSampler(e){return this._gpuSamplers[e._resourceId]||this._initSampler(e)}getGpuSource(e){return this._gpuSources[e.uid]||this.initSource(e)}getTextureBindGroup(e){return this._bindGroupHash[e.uid]??this._createTextureBindGroup(e)}_createTextureBindGroup(e){const t=e.source,r=t.uid;return this._bindGroupHash[r]=new A({0:t,1:t.style}),this._bindGroupHash[r]}getTextureView(e){const t=e.source;return this._textureViewHash[t.uid]??this._createTextureView(t)}_createTextureView(e){return this._textureViewHash[e.uid]=this.getGpuSource(e).createView(),this._textureViewHash[e.uid]}generateCanvas(e){const t=this._renderer,r=t.gpu.device.createCommandEncoder(),s=ue.get().createCanvas();s.width=e.source.pixelWidth,s.height=e.source.pixelHeight;const i=s.getContext("webgpu");return i.configure({device:t.gpu.device,usage:GPUTextureUsage.COPY_DST|GPUTextureUsage.COPY_SRC,format:navigator.gpu.getPreferredCanvasFormat(),alphaMode:"premultiplied"}),r.copyTextureToTexture({texture:t.texture.getGpuSource(e.source),origin:{x:0,y:0}},{texture:i.getCurrentTexture()},{width:s.width,height:s.height}),t.gpu.device.queue.submit([r.finish()]),s}getPixels(e){const t=this.generateCanvas(e),r=w.getOptimalCanvasAndContext(t.width,t.height),s=r.context;s.drawImage(t,0,0);const{width:i,height:n}=t,o=s.getImageData(0,0,i,n),u=new Uint8ClampedArray(o.data.buffer);return w.returnCanvasAndContext(r),{pixels:u,width:i,height:n}}destroy(){this.managedTextures.slice().forEach(e=>this.onSourceDestroy(e)),this.managedTextures=null;for(const e of Object.keys(this._bindGroupHash)){const t=Number(e);this._bindGroupHash[t]?.destroy(),this._bindGroupHash[t]=null}this._gpu=null,this._mipmapGenerator=null,this._gpuSources=null,this._bindGroupHash=null,this._textureViewHash=null,this._gpuSamplers=null}}J.extension={type:[l.WebGPUSystem],name:"texture"};class Q{init(){const e=new pe({uTransformMatrix:{value:new k,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),t=T({name:"graphics",bits:[z,L(R),le,C]});this.shader=new v({gpuProgram:t,resources:{localUniforms:e}})}execute(e,t){const r=t.context,s=r.customShader||this.shader,i=e.renderer,n=i.graphicsContext,{geometry:o,instructions:u}=n.getContextRenderData(r),c=i.encoder;c.setPipelineFromGeometryProgramAndState(o,s.gpuProgram,e.state),c.setGeometry(o);const f=i.globalUniforms.bindGroup;c.setBindGroup(0,f,s.gpuProgram);const h=i.renderPipes.uniformBatch.getUniformBindGroup(s.resources.localUniforms,!0);c.setBindGroup(2,h,s.gpuProgram);const p=u.instructions;for(let d=0;d<u.instructionSize;d++){const g=p[d];if(s.groups[1]=g.bindGroup,!g.gpuBindGroup){const B=g.textures;g.bindGroup=E(B.textures,B.count),g.gpuBindGroup=i.bindGroup.getBindGroup(g.bindGroup,s.gpuProgram,1)}c.setBindGroup(1,g.bindGroup,s.gpuProgram),c.renderPassEncoder.drawIndexed(g.size,1,g.start)}}destroy(){this.shader.destroy(!0),this.shader=null}}Q.extension={type:[l.WebGPUPipesAdaptor],name:"graphics"};class ee{init(){const e=T({name:"mesh",bits:[fe,Se,C]});this._shader=new v({gpuProgram:e,resources:{uTexture:M.EMPTY._source,uSampler:M.EMPTY._source.style,textureUniforms:{uTextureMatrix:{type:"mat3x3<f32>",value:new k}}}})}execute(e,t){const r=e.renderer;let s=t._shader;if(!s)s=this._shader,s.resources.uTexture=t.texture.source,s.resources.uSampler=t.texture.source.style,s.resources.textureUniforms.uniforms.uTextureMatrix=t.texture.textureMatrix.mapCoord;else if(!s.gpuProgram){ce("Mesh shader has no gpuProgram",t.shader);return}const i=s.gpuProgram;if(i.autoAssignGlobalUniforms&&(s.groups[0]=r.globalUniforms.bindGroup),i.autoAssignLocalUniforms){const n=e.localUniforms;s.groups[1]=r.renderPipes.uniformBatch.getUniformBindGroup(n,!0)}r.encoder.draw({geometry:t._geometry,shader:s,state:t.state})}destroy(){this._shader.destroy(!0),this._shader=null}}ee.extension={type:[l.WebGPUPipesAdaptor],name:"mesh"};const Fe=[...Pe,j,W,U,F,J,q,Y,$,K,I,V,H],Ie=[...Te,N],We=[O,ee,Q],te=[],re=[],se=[];G.handleByNamedList(l.WebGPUSystem,te);G.handleByNamedList(l.WebGPUPipes,re);G.handleByNamedList(l.WebGPUPipesAdaptor,se);G.add(...Fe,...Ie,...We);Qe=class extends de{constructor(){const e={name:"webgpu",type:ge.WEBGPU,systems:te,renderPipes:re,renderPipeAdaptors:se};super(e)}}});export{Qe as WebGPURenderer,__tla};
|
||||
@@ -0,0 +1 @@
|
||||
import{M as e,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{U as o,__tla as __tla_1}from"./colorToUniform-DavgjoLv.js";let i;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{const t=new Int32Array(e);for(let r=0;r<e;r++)t[r]=r;i=new o({uTextures:{value:t,type:"i32",size:e}},{isStatic:!0})});export{i as b,__tla};
|
||||
1
qbit/vuetorrent/public/assets/browserAll-BUJjaa7x.js
Normal file
1
qbit/vuetorrent/public/assets/browserAll-BUJjaa7x.js
Normal file
@@ -0,0 +1 @@
|
||||
import{P as m,r as J,E as w,T as B,U as Q,a as ee,w as y,e as z,C as Z,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{__tla as __tla_1}from"./webworkerAll-D8hnRv3W.js";import{__tla as __tla_2}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Bt9E0pwX.js";import{__tla as __tla_3}from"./index-bUuJUL5l.js";import"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";import{__tla as __tla_4}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-CJmQtbIM.js";import{__tla as __tla_5}from"./colorToUniform-DavgjoLv.js";import{__tla as __tla_6}from"./CanvasPool-CW8lNMNV.js";import{__tla as __tla_7}from"./batchSamplersUniformGroup-CKlXTtMl.js";Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})(),(()=>{try{return __tla_7}catch{}})()]).then(async()=>{class M{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=M.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new m,this.page=new m,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,n,s){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}var O=/iPhone/i,C=/iPod/i,S=/iPad/i,U=/\biOS-universal(?:.+)Mac\b/i,k=/\bAndroid(?:.+)Mobile\b/i,H=/Android/i,b=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,A=/Silk/i,g=/Windows Phone/i,X=/\bWindows(?:.+)ARM\b/i,R=/BlackBerry/i,F=/BB10/i,Y=/Opera Mini/i,K=/\b(CriOS|Chrome)(?:.+)Mobile/i,$=/Mobile(?:.+)Firefox\b/i,G=function(o){return typeof o<"u"&&o.platform==="MacIntel"&&typeof o.maxTouchPoints=="number"&&o.maxTouchPoints>1&&typeof MSStream>"u"};function te(o){return function(e){return e.test(o)}}function W(o){var e={userAgent:"",platform:"",maxTouchPoints:0};!o&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof o=="string"?e.userAgent=o:o&&o.userAgent&&(e={userAgent:o.userAgent,platform:o.platform,maxTouchPoints:o.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var n=te(t),s={apple:{phone:n(O)&&!n(g),ipod:n(C),tablet:!n(O)&&(n(S)||G(e))&&!n(g),universal:n(U),device:(n(O)||n(C)||n(S)||n(U)||G(e))&&!n(g)},amazon:{phone:n(b),tablet:!n(b)&&n(A),device:n(b)||n(A)},android:{phone:!n(g)&&n(b)||!n(g)&&n(k),tablet:!n(g)&&!n(b)&&!n(k)&&(n(A)||n(H)),device:!n(g)&&(n(b)||n(A)||n(k)||n(H))||n(/\bokhttp\b/i)},windows:{phone:n(g),tablet:n(X),device:n(g)||n(X)},other:{blackberry:n(R),blackberry10:n(F),opera:n(Y),firefox:n($),chrome:n(K),device:n(R)||n(F)||n(Y)||n($)||n(K)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}const ie=W.default??W,ne=ie(globalThis.navigator),se=9,I=100,oe=0,re=0,j=2,N=1,ae=-1e3,he=-1e3,le=2;class V{constructor(e,t=ne){this._mobileInfo=t,this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this._pool=[],this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._hookDiv=null,(t.tablet||t.phone)&&this._createTouchHook();const i=document.createElement("div");i.style.width=`${I}px`,i.style.height=`${I}px`,i.style.position="absolute",i.style.top=`${oe}px`,i.style.left=`${re}px`,i.style.zIndex=j.toString(),this._div=i,this._renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}_createTouchHook(){const e=document.createElement("button");e.style.width=`${N}px`,e.style.height=`${N}px`,e.style.position="absolute",e.style.top=`${ae}px`,e.style.left=`${he}px`,e.style.zIndex=le.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}_destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}_activate(){this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this._renderer.runners.postrender.add(this),this._renderer.view.canvas.parentNode?.appendChild(this._div))}_deactivate(){!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this._renderer.runners.postrender.remove(this),this._div.parentNode?.removeChild(this._div))}_updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this._addChild(e),e._renderId=this._renderId);const t=e.children;if(t)for(let i=0;i<t.length;i++)this._updateAccessibleObjects(t[i])}init(e){this.debug=e?.debug??this.debug,this._renderer.runners.postrender.remove(this)}postrender(){const e=performance.now();if(this._mobileInfo.android.device&&e<this._androidUpdateCount||(this._androidUpdateCount=e+this._androidUpdateFrequency,!this._renderer.renderingToScreen||!this._renderer.view.canvas))return;this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered);const{x:t,y:i,width:n,height:s}=this._renderer.view.canvas.getBoundingClientRect(),{width:r,height:a,resolution:c}=this._renderer,p=n/r*c,h=s/a*c;let l=this._div;l.style.left=`${t}px`,l.style.top=`${i}px`,l.style.width=`${r}px`,l.style.height=`${a}px`;for(let d=0;d<this._children.length;d++){const u=this._children[d];if(u._renderId!==this._renderId)u._accessibleActive=!1,J(this._children,d,1),this._div.removeChild(u._accessibleDiv),this._pool.push(u._accessibleDiv),u._accessibleDiv=null,d--;else{l=u._accessibleDiv;let v=u.hitArea;const _=u.worldTransform;u.hitArea?(l.style.left=`${(_.tx+v.x*_.a)*p}px`,l.style.top=`${(_.ty+v.y*_.d)*h}px`,l.style.width=`${v.width*_.a*p}px`,l.style.height=`${v.height*_.d*h}px`):(v=u.getBounds().rectangle,this._capHitArea(v),l.style.left=`${v.x*p}px`,l.style.top=`${v.y*h}px`,l.style.width=`${v.width*p}px`,l.style.height=`${v.height*h}px`,l.title!==u.accessibleTitle&&u.accessibleTitle!==null&&(l.title=u.accessibleTitle||""),l.getAttribute("aria-label")!==u.accessibleHint&&u.accessibleHint!==null&&l.setAttribute("aria-label",u.accessibleHint||"")),(u.accessibleTitle!==l.title||u.tabIndex!==l.tabIndex)&&(l.title=u.accessibleTitle||"",l.tabIndex=u.tabIndex,this.debug&&this._updateDebugHTML(l))}}this._renderId++}_updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}_capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:t,height:i}=this._renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}_addChild(e){let t=this._pool.pop();t||(t=document.createElement("button"),t.style.width=`${I}px`,t.style.height=`${I}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=j.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`container ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this._updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.container=e,this._children.push(e),this._div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){const{container:i}=e.target,n=this._renderer.events.rootBoundary,s=Object.assign(new M(n),{target:i});n.rootTarget=this._renderer.lastObjectRendered,t.forEach(r=>n.dispatchEvent(s,r))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===se&&this._activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this._deactivate()}destroy(){this._destroyTouchHook(),this._div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this._pool=null,this._children=null,this._renderer=null}}V.extension={type:[w.WebGLSystem,w.WebGPUSystem],name:"accessibility"};const ue={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,_renderId:-1};class de{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this._tickerAdded||!this.domElement||(B.system.add(this._tickerUpdate,this,Q.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&(B.system.remove(this._tickerUpdate,this),this._tickerAdded=!1)}pointerMoved(){this._didMove=!0}_update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events._rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}_tickerUpdate(e){this._deltaTime+=e.deltaTime,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this._update())}}const E=new de;class D extends M{constructor(){super(...arguments),this.client=new m,this.movement=new m,this.offset=new m,this.global=new m,this.screen=new m}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,i){return e.worldTransform.applyInverse(i||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,i,n,s,r,a,c,p,h,l,d,u,v,_){throw new Error("Method not implemented.")}}class f extends D{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class T extends D{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}T.DOM_DELTA_PIXEL=0;T.DOM_DELTA_LINE=1;T.DOM_DELTA_PAGE=2;const ce=2048,pe=new m,P=new m;class ve{constructor(e){this.dispatch=new ee,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel)}addEventMapping(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort((i,n)=>i.priority-n.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const t=this.mappingTable[e.type];if(t)for(let i=0,n=t.length;i<n;i++)t[i].fn(e);else y(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){E.pauseUpdate=!0;const n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive",s=this[n](this.rootTarget,this.rootTarget.eventMode,pe.set(e,t),this.hitTestFn,this.hitPruneFn);return s&&s[0]}propagate(e,t){if(!e.target)return;const i=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let n=0,s=i.length-1;n<s;n++)if(e.currentTarget=i[n],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let n=i.length-2;n>=0;n--)if(e.currentTarget=i[n],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,i=this._allInteractiveElements){if(i.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const n=Array.isArray(t)?t:[t];for(let s=i.length-1;s>=0;s--)n.forEach(r=>{e.currentTarget=i[s],this.notifyTarget(e,r)})}propagationPath(e){const t=[e];for(let i=0;i<ce&&e!==this.rootTarget&&e.parent;i++){if(!e.parent)throw new Error("Cannot find propagation path to disconnected target");t.push(e.parent),e=e.parent}return t.reverse(),t}hitTestMoveRecursive(e,t,i,n,s,r=!1){let a=!1;if(this._interactivePrune(e))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(E.pauseUpdate=!1),e.interactiveChildren&&e.children){const h=e.children;for(let l=h.length-1;l>=0;l--){const d=h[l],u=this.hitTestMoveRecursive(d,this._isInteractive(t)?t:d.eventMode,i,n,s,r||s(e,i));if(u){if(u.length>0&&!u[u.length-1].parent)continue;const v=e.isInteractive();(u.length>0||v)&&(v&&this._allInteractiveElements.push(e),u.push(e)),this._hitElements.length===0&&(this._hitElements=u),a=!0}}}const c=this._isInteractive(t),p=e.isInteractive();return p&&p&&this._allInteractiveElements.push(e),r||this._hitElements.length>0?null:a?this._hitElements:c&&!s(e,i)&&n(e,i)?p?[e]:[]:null}hitTestRecursive(e,t,i,n,s){if(this._interactivePrune(e)||s(e,i))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(E.pauseUpdate=!1),e.interactiveChildren&&e.children){const c=e.children,p=i;for(let h=c.length-1;h>=0;h--){const l=c[h],d=this.hitTestRecursive(l,this._isInteractive(t)?t:l.eventMode,p,n,s);if(d){if(d.length>0&&!d[d.length-1].parent)continue;const u=e.isInteractive();return(d.length>0||u)&&d.push(e),d}}}const r=this._isInteractive(t),a=e.isInteractive();return r&&n(e,i)?a?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!e||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,P),!e.hitArea.contains(P.x,P.y)))return!0;if(e.effects&&e.effects.length)for(let i=0;i<e.effects.length;i++){const n=e.effects[i];if(n.containsPoint&&!n.containsPoint(t,this.hitTestFn))return!0}return!1}hitTestFn(e,t){return e.hitArea?!0:e?.containsPoint?(e.worldTransform.applyInverse(t,P),e.containsPoint(P)):!1}notifyTarget(e,t){t=t??e.type;const i=`on${t}`;e.currentTarget[i]?.(e);const n=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this._notifyListeners(e,n),e.eventPhase===e.AT_TARGET&&this._notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){const n=t.button===2;this.dispatchEvent(t,n?"rightdown":"mousedown")}const i=this.trackingData(e.pointerId);i.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const i=t.pointerType==="mouse"||t.pointerType==="pen",n=this.trackingData(e.pointerId),s=this.findMountedTarget(n.overTargets);if(n.overTargets?.length>0&&s!==t.target){const c=e.type==="mousemove"?"mouseout":"pointerout",p=this.createPointerEvent(e,c,s);if(this.dispatchEvent(p,"pointerout"),i&&this.dispatchEvent(p,"mouseout"),!t.composedPath().includes(s)){const h=this.createPointerEvent(e,"pointerleave",s);for(h.eventPhase=h.AT_TARGET;h.target&&!t.composedPath().includes(h.target);)h.currentTarget=h.target,this.notifyTarget(h),i&&this.notifyTarget(h,"mouseleave"),h.target=h.target.parent;this.freeEvent(h)}this.freeEvent(p)}if(s!==t.target){const c=e.type==="mousemove"?"mouseover":"pointerover",p=this.clonePointerEvent(t,c);this.dispatchEvent(p,"pointerover"),i&&this.dispatchEvent(p,"mouseover");let h=s?.parent;for(;h&&h!==this.rootTarget.parent&&h!==t.target;)h=h.parent;if(!h||h===this.rootTarget.parent){const d=this.clonePointerEvent(t,"pointerenter");for(d.eventPhase=d.AT_TARGET;d.target&&d.target!==s&&d.target!==this.rootTarget.parent;)d.currentTarget=d.target,this.notifyTarget(d),i&&this.notifyTarget(d,"mouseenter"),d.target=d.target.parent;this.freeEvent(d)}this.freeEvent(p)}const r=[],a=this.enableGlobalMoveEvents??!0;this.moveOnAll?r.push("pointermove"):this.dispatchEvent(t,"pointermove"),a&&r.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?r.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),a&&r.push("globaltouchmove")),i&&(this.moveOnAll?r.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),a&&r.push("globalmousemove"),this.cursor=t.target?.cursor),r.length>0&&this.all(t,r),this._allInteractiveElements.length=0,this._hitElements.length=0,n.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.createPointerEvent(e),n=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),n&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=i.target?.cursor);const s=this.clonePointerEvent(i,"pointerenter");for(s.eventPhase=s.AT_TARGET;s.target&&s.target!==this.rootTarget.parent;)s.currentTarget=s.target,this.notifyTarget(s),n&&this.notifyTarget(s,"mouseenter"),s.target=s.target.parent;t.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(s)}mapPointerOut(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId);if(t.overTargets){const i=e.pointerType==="mouse"||e.pointerType==="pen",n=this.findMountedTarget(t.overTargets),s=this.createPointerEvent(e,"pointerout",n);this.dispatchEvent(s),i&&this.dispatchEvent(s,"mouseout");const r=this.createPointerEvent(e,"pointerleave",n);for(r.eventPhase=r.AT_TARGET;r.target&&r.target!==this.rootTarget.parent;)r.currentTarget=r.target,this.notifyTarget(r),i&&this.notifyTarget(r,"mouseleave"),r.target=r.target.parent;t.overTargets=null,this.freeEvent(s),this.freeEvent(r)}this.cursor=null}mapPointerUp(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=performance.now(),i=this.createPointerEvent(e);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const a=i.button===2;this.dispatchEvent(i,a?"rightup":"mouseup")}const n=this.trackingData(e.pointerId),s=this.findMountedTarget(n.pressTargetsByButton[e.button]);let r=s;if(s&&!i.composedPath().includes(s)){let a=s;for(;a&&!i.composedPath().includes(a);){if(i.currentTarget=a,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const c=i.button===2;this.notifyTarget(i,c?"rightupoutside":"mouseupoutside")}a=a.parent}delete n.pressTargetsByButton[e.button],r=a}if(r){const a=this.clonePointerEvent(i,"click");a.target=r,a.path=null,n.clicksByButton[e.button]||(n.clicksByButton[e.button]={clickCount:0,target:a.target,timeStamp:t});const c=n.clicksByButton[e.button];if(c.target===a.target&&t-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=a.target,c.timeStamp=t,a.detail=c.clickCount,a.pointerType==="mouse"){const p=a.button===2;this.dispatchEvent(a,p?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(i)}mapPointerUpOutside(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.findMountedTarget(t.pressTargetsByButton[e.button]),n=this.createPointerEvent(e);if(i){let s=i;for(;s;)n.currentTarget=s,this.notifyTarget(n,"pointerupoutside"),n.pointerType==="touch"?this.notifyTarget(n,"touchendoutside"):(n.pointerType==="mouse"||n.pointerType==="pen")&&this.notifyTarget(n,n.button===2?"rightupoutside":"mouseupoutside"),s=s.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(n)}mapWheel(e){if(!(e instanceof T)){y("EventBoundary cannot map a non-wheel event as a wheel event");return}const t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let i=1;i<e.length&&e[i].parent===t;i++)t=e[i];return t}createPointerEvent(e,t,i){const n=this.allocateEvent(f);return this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,n.target=i??this.hitTest(n.global.x,n.global.y)??this._hitElements[0],typeof t=="string"&&(n.type=t),n}createWheelEvent(e){const t=this.allocateEvent(T);return this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e,t.target=this.hitTest(t.global.x,t.global.y),t}clonePointerEvent(e,t){const i=this.allocateEvent(f);return i.nativeEvent=e.nativeEvent,i.originalEvent=e.originalEvent,this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.target=e.target,i.path=e.composedPath().slice(),i.type=t??i.type,i}copyWheelData(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}copyPointerData(e,t){e instanceof f&&t instanceof f&&(t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist)}copyMouseData(e,t){e instanceof D&&t instanceof D&&(t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.copyFrom(e.client),t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.copyFrom(e.movement),t.screen.copyFrom(e.screen),t.shiftKey=e.shiftKey,t.global.copyFrom(e.global))}copyData(e,t){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.which=e.which,t.layer.copyFrom(e.layer),t.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);const t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=null,t.target=null,t}freeEvent(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");const t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}_notifyListeners(e,t){const i=e.currentTarget._events[t];if(i&&e.currentTarget.isInteractive())if("fn"in i)i.once&&e.currentTarget.removeListener(t,i.fn,void 0,!0),i.fn.call(i.context,e);else for(let n=0,s=i.length;n<s&&!e.propagationImmediatelyStopped;n++)i[n].once&&e.currentTarget.removeListener(t,i[n].fn,void 0,!0),i[n].fn.call(i[n].context,e)}}const fe=1,ge={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},L=class x{constructor(e){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=e,this.rootBoundary=new ve(null),E.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new f(null),this._rootWheelEvent=new T(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy({...x.defaultEventFeatures},{set:(t,i,n)=>(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=n),t[i]=n,!0)}),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerOverOut=this._onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{canvas:t,resolution:i}=this.renderer;this.setTargetElement(t),this.resolution=i,x._defaultEventMode=e.eventMode??"passive",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null,this._currentCursor=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this._currentCursor===e)return;this._currentCursor=e;const i=this.cursorStyles[e];if(i)switch(typeof i){case"string":t&&(this.domElement.style.cursor=i);break;case"function":i(e);break;case"object":t&&Object.assign(this.domElement.style,i);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this._rootPointerEvent}_onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this._normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let i=0,n=t.length;i<n;i++){const s=t[i],r=this._bootstrapEvent(this._rootPointerEvent,s);this.rootBoundary.mapEvent(r)}this.setCursor(this.rootBoundary.cursor)}_onPointerMove(e){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,E.pointerMoved();const t=this._normalizeToPointerData(e);for(let i=0,n=t.length;i<n;i++){const s=this._bootstrapEvent(this._rootPointerEvent,t[i]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}_onPointerUp(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=e.target;e.composedPath&&e.composedPath().length>0&&(t=e.composedPath()[0]);const i=t!==this.domElement?"outside":"",n=this._normalizeToPointerData(e);for(let s=0,r=n.length;s<r;s++){const a=this._bootstrapEvent(this._rootPointerEvent,n[s]);a.type+=i,this.rootBoundary.mapEvent(a)}this.setCursor(this.rootBoundary.cursor)}_onPointerOverOut(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this._normalizeToPointerData(e);for(let i=0,n=t.length;i<n;i++){const s=this._bootstrapEvent(this._rootPointerEvent,t[i]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}onWheel(e){if(!this.features.wheel)return;const t=this.normalizeWheelEvent(e);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(t)}setTargetElement(e){this._removeEvents(),this.domElement=e,E.domElement=e,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;E.addTickerListener();const e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming="none",e.msTouchAction="none"):this.supportsPointerEvents&&(e.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this._onPointerMove,!0),this.domElement.addEventListener("pointerdown",this._onPointerDown,!0),this.domElement.addEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this._onPointerOverOut,!0),globalThis.addEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this._onPointerMove,!0),this.domElement.addEventListener("mousedown",this._onPointerDown,!0),this.domElement.addEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this._onPointerOverOut,!0),globalThis.addEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this._onPointerDown,!0),this.domElement.addEventListener("touchend",this._onPointerUp,!0),this.domElement.addEventListener("touchmove",this._onPointerMove,!0))),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this._eventsAdded=!0}_removeEvents(){if(!this._eventsAdded||!this.domElement)return;E.removeTickerListener();const e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming="",e.msTouchAction=""):this.supportsPointerEvents&&(e.touchAction="")),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this._onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this._onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this._onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this._onPointerMove,!0),this.domElement.removeEventListener("mousedown",this._onPointerDown,!0),this.domElement.removeEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this._onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this._onPointerDown,!0),this.domElement.removeEventListener("touchend",this._onPointerUp,!0),this.domElement.removeEventListener("touchmove",this._onPointerMove,!0))),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this._eventsAdded=!1}mapPositionToPoint(e,t,i){const n=this.domElement.isConnected?this.domElement.getBoundingClientRect():{x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0},s=1/this.resolution;e.x=(t-n.left)*(this.domElement.width/n.width)*s,e.y=(i-n.top)*(this.domElement.height/n.height)*s}_normalizeToPointerData(e){const t=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(let i=0,n=e.changedTouches.length;i<n;i++){const s=e.changedTouches[i];typeof s.button>"u"&&(s.button=0),typeof s.buttons>"u"&&(s.buttons=1),typeof s.isPrimary>"u"&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof s.width>"u"&&(s.width=s.radiusX||1),typeof s.height>"u"&&(s.height=s.radiusY||1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="touch"),typeof s.pointerId>"u"&&(s.pointerId=s.identifier||0),typeof s.pressure>"u"&&(s.pressure=s.force||.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),typeof s.layerX>"u"&&(s.layerX=s.offsetX=s.clientX),typeof s.layerY>"u"&&(s.layerY=s.offsetY=s.clientY),s.isNormalized=!0,s.type=e.type,t.push(s)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const i=e;typeof i.isPrimary>"u"&&(i.isPrimary=!0),typeof i.width>"u"&&(i.width=1),typeof i.height>"u"&&(i.height=1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="mouse"),typeof i.pointerId>"u"&&(i.pointerId=fe),typeof i.pressure>"u"&&(i.pressure=.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),i.isNormalized=!0,t.push(i)}else t.push(e);return t}normalizeWheelEvent(e){const t=this._rootWheelEvent;return this._transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}_bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this._transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=ge[e.type]||e.type),e}_transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};L.extension={name:"events",type:[w.WebGLSystem,w.CanvasSystem,w.WebGPUSystem],priority:-1};L.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let q=L;const me={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,get interactive(){return this.eventMode==="dynamic"||this.eventMode==="static"},set interactive(o){this.eventMode=o?"static":"passive"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??q.defaultEventMode},set eventMode(o){this._internalEventMode=o},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(o,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,n=typeof t=="object"?t.signal:void 0,s=typeof t=="object"?t.once===!0:!1,r=typeof e=="function"?void 0:e;o=i?`${o}capture`:o;const a=typeof e=="function"?e:e.handleEvent,c=this;n&&n.addEventListener("abort",()=>{c.off(o,a,r)}),s?c.once(o,a,r):c.on(o,a,r)},removeEventListener(o,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,n=typeof e=="function"?void 0:e;o=i?`${o}capture`:o,e=typeof e=="function"?e:e.handleEvent,this.off(o,e,n)},dispatchEvent(o){if(!(o instanceof M))throw new Error("Container cannot propagate events outside of the Federated Events API");return o.defaultPrevented=!1,o.path=null,o.target=this,o.manager.dispatchEvent(o),!o.defaultPrevented}};z.add(V);Z.mixin(ue);z.add(q);Z.mixin(me)});
|
||||
257
qbit/vuetorrent/public/assets/colorToUniform-DavgjoLv.js
Normal file
257
qbit/vuetorrent/public/assets/colorToUniform-DavgjoLv.js
Normal file
@@ -0,0 +1,257 @@
|
||||
import{D as ft,u as K,a as dt,c as T,i as mt,k as ht,n as X,w as pt,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";let de,C,H,te,ee,Et,ne,at,re,V,L,nt,ie,St,me,oe,se,le,ae,ce,fe,ue;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{const $=Object.create(null),q=Object.create(null);V=function(o,t){let e=q[o];return e===void 0&&($[t]===void 0&&($[t]=1),q[o]=e=$[t]++),e};let M;function gt(){return(!M||M?.isContextLost())&&(M=ft.get().createCanvas().getContext("webgl",{})),M}let S;function xt(){if(!S){S="mediump";const o=gt();o&&o.getShaderPrecisionFormat&&(S=o.getShaderPrecisionFormat(o.FRAGMENT_SHADER,o.HIGH_FLOAT).precision?"highp":"mediump")}return S}function vt(o,t,e){return t?o:e?(o=o.replace("out vec4 finalColor;",""),`
|
||||
|
||||
#ifdef GL_ES // This checks if it is WebGL1
|
||||
#define in varying
|
||||
#define finalColor gl_FragColor
|
||||
#define texture texture2D
|
||||
#endif
|
||||
${o}
|
||||
`):`
|
||||
|
||||
#ifdef GL_ES // This checks if it is WebGL1
|
||||
#define in attribute
|
||||
#define out varying
|
||||
#endif
|
||||
${o}
|
||||
`}function bt(o,t,e){const r=e?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(o.substring(0,9)!=="precision"){let n=e?t.requestedFragmentPrecision:t.requestedVertexPrecision;return n==="highp"&&r!=="highp"&&(n="mediump"),`precision ${n} float;
|
||||
${o}`}else if(r!=="highp"&&o.substring(0,15)==="precision highp")return o.replace("precision highp","precision mediump");return o}function Pt(o,t){return t?`#version 300 es
|
||||
${o}`:o}const yt={},_t={};function Gt(o,{name:t="pixi-program"},e=!0){t=t.replace(/\s+/g,"-"),t+=e?"-fragment":"-vertex";const r=e?yt:_t;return r[t]?(r[t]++,t+=`-${r[t]}`):r[t]=1,o.indexOf("#define SHADER_NAME")!==-1?o:`${`#define SHADER_NAME ${t}`}
|
||||
${o}`}function Mt(o,t){return t?o.replace("#version 300 es",""):o}const U={stripVersion:Mt,ensurePrecision:bt,addProgramDefines:vt,setProgramName:Gt,insertVersion:Pt},A=Object.create(null),ot=class N{constructor(t){t={...N.defaultOptions,...t};const e=t.fragment.indexOf("#version 300 es")!==-1,r={stripVersion:e,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:xt()},setProgramName:{name:t.name},addProgramDefines:e,insertVersion:e};let n=t.fragment,s=t.vertex;Object.keys(U).forEach(a=>{const i=r[a];n=U[a](n,i,!0),s=U[a](s,i,!1)}),this.fragment=n,this.vertex=s,this._key=V(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null}static from(t){const e=`${t.vertex}:${t.fragment}`;return A[e]||(A[e]=new N(t)),A[e]}};ot.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};nt=ot;const Y={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};St=function(o){return Y[o]??Y.float32};const Ct={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"};function Tt({source:o,entryPoint:t}){const e={},r=o.indexOf(`fn ${t}`);if(r!==-1){const n=o.indexOf("->",r);if(n!==-1){const s=o.substring(r,n),a=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|$)/g;let i;for(;(i=a.exec(s))!==null;){const u=Ct[i[3]]??"float32";e[i[2]]={location:parseInt(i[1],10),format:u,stride:St(u).stride,offset:0,instance:!1,start:0}}}}return e}function w(o){const t=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,e=/@group\((\d+)\)/,r=/@binding\((\d+)\)/,n=/var(<[^>]+>)? (\w+)/,s=/:\s*(\w+)/,a=/struct\s+(\w+)\s*{([^}]+)}/g,i=/(\w+)\s*:\s*([\w\<\>]+)/g,u=/struct\s+(\w+)/,f=o.match(t)?.map(l=>({group:parseInt(l.match(e)[1],10),binding:parseInt(l.match(r)[1],10),name:l.match(n)[2],isUniform:l.match(n)[1]==="<uniform>",type:l.match(s)[1]}));if(!f)return{groups:[],structs:[]};const c=o.match(a)?.map(l=>{const d=l.match(u)[1],p=l.match(i).reduce((g,x)=>{const[v,b]=x.split(":");return g[v.trim()]=b.trim(),g},{});return p?{name:d,members:p}:null}).filter(({name:l})=>f.some(d=>d.type===l))??[];return{groups:f,structs:c}}var P=(o=>(o[o.VERTEX=1]="VERTEX",o[o.FRAGMENT=2]="FRAGMENT",o[o.COMPUTE=4]="COMPUTE",o))(P||{});function $t({groups:o}){const t=[];for(let e=0;e<o.length;e++){const r=o[e];t[r.group]||(t[r.group]=[]),r.isUniform?t[r.group].push({binding:r.binding,visibility:P.VERTEX|P.FRAGMENT,buffer:{type:"uniform"}}):r.type==="sampler"?t[r.group].push({binding:r.binding,visibility:P.FRAGMENT,sampler:{type:"filtering"}}):r.type==="texture_2d"&&t[r.group].push({binding:r.binding,visibility:P.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}})}return t}function Ut({groups:o}){const t=[];for(let e=0;e<o.length;e++){const r=o[e];t[r.group]||(t[r.group]={}),t[r.group][r.name]=r.binding}return t}function At(o,t){const e=new Set,r=new Set,n=[...o.structs,...t.structs].filter(a=>e.has(a.name)?!1:(e.add(a.name),!0)),s=[...o.groups,...t.groups].filter(a=>{const i=`${a.name}-${a.binding}`;return r.has(i)?!1:(r.add(i),!0)});return{structs:n,groups:s}}const E=Object.create(null);C=class{constructor(t){this._layoutKey=0;const{fragment:e,vertex:r,layout:n,gpuLayout:s,name:a}=t;if(this.name=a,this.fragment=e,this.vertex=r,e.source===r.source){const i=w(e.source);this.structsAndGroups=i}else{const i=w(r.source),u=w(e.source);this.structsAndGroups=At(i,u)}this.layout=n??Ut(this.structsAndGroups),this.gpuLayout=s??$t(this.structsAndGroups),this.autoAssignGlobalUniforms=this.layout[0]?.globalUniforms!==void 0,this.autoAssignLocalUniforms=this.layout[1]?.localUniforms!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:t,fragment:e}=this,r=t.source+e.source+t.entryPoint+e.entryPoint;this._layoutKey=V(r,"program")}get attributeData(){return this._attributeData??(this._attributeData=Tt(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null}static from(t){const e=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return E[e]||(E[e]=new C(t)),E[e]}};function wt(o,t){switch(o){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*t);case"vec3<f32>":return new Float32Array(3*t);case"vec4<f32>":return new Float32Array(4*t);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const st=class it{constructor(t,e){this._touched=0,this.uid=K("uniform"),this._resourceType="uniformGroup",this._resourceId=K("resource"),this.isUniformGroup=!0,this._dirtyId=0,e={...it.defaultOptions,...e},this.uniformStructures=t;const r={};for(const n in t){const s=t[n];s.name=n,s.size=s.size??1,s.value??(s.value=wt(s.type,s.size)),r[n]=s.value}this.uniforms=r,this._dirtyId=1,this.ubo=e.ubo,this.isStatic=e.isStatic,this._signature=V(Object.keys(r).map(n=>`${n}-${t[n].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};st.defaultOptions={ubo:!1,isStatic:!1};Et=st;H=(o=>(o[o.WEBGL=1]="WEBGL",o[o.WEBGPU=2]="WEBGPU",o[o.BOTH=3]="BOTH",o))(H||{});at=class extends dt{constructor(t){super(),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[];let{gpuProgram:e,glProgram:r,groups:n,resources:s,compatibleRenderers:a,groupMap:i}=t;this.gpuProgram=e,this.glProgram=r,a===void 0&&(a=0,e&&(a|=H.WEBGPU),r&&(a|=H.WEBGL)),this.compatibleRenderers=a;const u={};if(!s&&!n&&(s={}),s&&n)throw new Error("[Shader] Cannot have both resources and groups");if(!e&&n&&!i)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!e&&n&&i)for(const f in i)for(const c in i[f]){const l=i[f][c];u[l]={group:f,binding:c,name:l}}else if(e&&n&&!i){const f=e.structsAndGroups.groups;i={},f.forEach(c=>{i[c.group]=i[c.group]||{},i[c.group][c.binding]=c.name,u[c.name]=c})}else if(s){if(e){const f=e.structsAndGroups.groups;i={},f.forEach(c=>{i[c.group]=i[c.group]||{},i[c.group][c.binding]=c.name,u[c.name]=c})}else{i={},n={99:new T},this._ownedBindGroups.push(n[99]);let f=0;for(const c in s)u[c]={group:99,binding:f,name:c},i[99]=i[99]||{},i[99][f]=c,f++}n={};for(const f in s){const c=f;let l=s[f];!l.source&&!l._resourceType&&(l=new Et(l));const d=u[c];d&&(n[d.group]||(n[d.group]=new T,this._ownedBindGroups.push(n[d.group])),n[d.group].setResource(l,d.binding))}}this.groups=n,this._uniformBindMap=i,this.resources=this._buildResourceAccessor(n,u)}addResource(t,e,r){var n,s;(n=this._uniformBindMap)[e]||(n[e]={}),(s=this._uniformBindMap[e])[r]||(s[r]=t),this.groups[e]||(this.groups[e]=new T,this._ownedBindGroups.push(this.groups[e]))}_buildResourceAccessor(t,e){const r={};for(const n in e){const s=e[n];Object.defineProperty(r,s.name,{get(){return t[s.group].getResource(s.binding)},set(a){t[s.group].setResource(a,s.binding)}})}return r}destroy(t=!1){this.emit("destroy",this),t&&(this.gpuProgram?.destroy(),this.glProgram?.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(e=>{e.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null}static from(t){const{gpu:e,gl:r,...n}=t;let s,a;return e&&(s=C.from(e)),r&&(a=nt.from(r)),new at({gpuProgram:s,glProgram:a,...n})}};const Ft={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8},F=0,z=1,O=2,B=3,R=4,j=5,W=class ut{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<F)}set blend(t){!!(this.data&1<<F)!==t&&(this.data^=1<<F)}get offsets(){return!!(this.data&1<<z)}set offsets(t){!!(this.data&1<<z)!==t&&(this.data^=1<<z)}set cullMode(t){if(t==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=t==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<O)}set culling(t){!!(this.data&1<<O)!==t&&(this.data^=1<<O)}get depthTest(){return!!(this.data&1<<B)}set depthTest(t){!!(this.data&1<<B)!==t&&(this.data^=1<<B)}get depthMask(){return!!(this.data&1<<j)}set depthMask(t){!!(this.data&1<<j)!==t&&(this.data^=1<<j)}get clockwiseFrontFace(){return!!(this.data&1<<R)}set clockwiseFrontFace(t){!!(this.data&1<<R)!==t&&(this.data^=1<<R)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=Ft[t]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new ut;return t.depthTest=!1,t.blend=!0,t}};W.default2d=W.for2d();let zt;te=W;zt=0;class Ot{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1}createTexture(t,e,r){const n=new mt({...this.textureOptions,width:t,height:e,resolution:1,antialias:r,autoGarbageCollect:!0});return new ht({source:n,label:`texturePool_${zt++}`})}getOptimalTexture(t,e,r=1,n){let s=Math.ceil(t*r-1e-6),a=Math.ceil(e*r-1e-6);s=X(s),a=X(a);const i=(s<<17)+(a<<1)+(n?1:0);this._texturePool[i]||(this._texturePool[i]=[]);let u=this._texturePool[i].pop();return u||(u=this.createTexture(s,a,n)),u.source._resolution=r,u.source.width=s/r,u.source.height=a/r,u.source.pixelWidth=s,u.source.pixelHeight=a,u.frame.x=0,u.frame.y=0,u.frame.width=t,u.frame.height=e,u.updateUvs(),this._poolKeyHash[u.uid]=i,u}getSameSizeTexture(t,e=!1){const r=t.source;return this.getOptimalTexture(t.width,t.height,r._resolution,e)}returnTexture(t){const e=this._poolKeyHash[t.uid];this._texturePool[e].push(t)}clear(t){if(t=t!==!1,t)for(const e in this._texturePool){const r=this._texturePool[e];if(r)for(let n=0;n<r.length;n++)r[n].destroy(!0)}this._texturePool={}}}ee=new Ot;function Z(o,t,e){if(o)for(const r in o){const n=r.toLocaleLowerCase(),s=t[n];if(s){let a=o[r];r==="header"&&(a=a.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),e&&s.push(`//----${e}----//`),s.push(a)}else pt(`${r} placement hook does not exist in shader`)}}const Bt=/\{\{(.*?)\}\}/g;function J(o){const t={};return(o.match(Bt)?.map(r=>r.replace(/[{()}]/g,""))??[]).forEach(r=>{t[r]=[]}),t}function Q(o,t){let e;const r=/@in\s+([^;]+);/g;for(;(e=r.exec(o))!==null;)t.push(e[1])}function tt(o,t,e=!1){const r=[];Q(t,r),o.forEach(i=>{i.header&&Q(i.header,r)});const n=r;e&&n.sort();const s=n.map((i,u)=>` @location(${u}) ${i},`).join(`
|
||||
`);let a=t.replace(/@in\s+[^;]+;\s*/g,"");return a=a.replace("{{in}}",`
|
||||
${s}
|
||||
`),a}function et(o,t){let e;const r=/@out\s+([^;]+);/g;for(;(e=r.exec(o))!==null;)t.push(e[1])}function Rt(o){const e=/\b(\w+)\s*:/g.exec(o);return e?e[1]:""}function jt(o){const t=/@.*?\s+/g;return o.replace(t,"")}function It(o,t){const e=[];et(t,e),o.forEach(u=>{u.header&&et(u.header,e)});let r=0;const n=e.sort().map(u=>u.indexOf("builtin")>-1?u:`@location(${r++}) ${u}`).join(`,
|
||||
`),s=e.sort().map(u=>` var ${jt(u)};`).join(`
|
||||
`),a=`return VSOutput(
|
||||
${e.sort().map(u=>` ${Rt(u)}`).join(`,
|
||||
`)});`;let i=t.replace(/@out\s+[^;]+;\s*/g,"");return i=i.replace("{{struct}}",`
|
||||
${n}
|
||||
`),i=i.replace("{{start}}",`
|
||||
${s}
|
||||
`),i=i.replace("{{return}}",`
|
||||
${a}
|
||||
`),i}function rt(o,t){let e=o;for(const r in t){const n=t[r];n.join(`
|
||||
`).length?e=e.replace(`{{${r}}}`,`//-----${r} START-----//
|
||||
${n.join(`
|
||||
`)}
|
||||
//----${r} FINISH----//`):e=e.replace(`{{${r}}}`,"")}return e}const h=Object.create(null),I=new Map;let Dt=0;function kt({template:o,bits:t}){const e=ct(o,t);if(h[e])return h[e];const{vertex:r,fragment:n}=Nt(o,t);return h[e]=lt(r,n,t),h[e]}function Lt({template:o,bits:t}){const e=ct(o,t);return h[e]||(h[e]=lt(o.vertex,o.fragment,t)),h[e]}function Nt(o,t){const e=t.map(a=>a.vertex).filter(a=>!!a),r=t.map(a=>a.fragment).filter(a=>!!a);let n=tt(e,o.vertex,!0);n=It(e,n);const s=tt(r,o.fragment,!0);return{vertex:n,fragment:s}}function ct(o,t){return t.map(e=>(I.has(e)||I.set(e,Dt++),I.get(e))).sort((e,r)=>e-r).join("-")+o.vertex+o.fragment}function lt(o,t,e){const r=J(o),n=J(t);return e.forEach(s=>{Z(s.vertex,r,s.name),Z(s.fragment,n,s.name)}),{vertex:rt(o,r),fragment:rt(t,n)}}const Ht=`
|
||||
@in aPosition: vec2<f32>;
|
||||
@in aUV: vec2<f32>;
|
||||
|
||||
@out @builtin(position) vPosition: vec4<f32>;
|
||||
@out vUV : vec2<f32>;
|
||||
@out vColor : vec4<f32>;
|
||||
|
||||
{{header}}
|
||||
|
||||
struct VSOutput {
|
||||
{{struct}}
|
||||
};
|
||||
|
||||
@vertex
|
||||
fn main( {{in}} ) -> VSOutput {
|
||||
|
||||
var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
|
||||
var modelMatrix = mat3x3<f32>(
|
||||
1.0, 0.0, 0.0,
|
||||
0.0, 1.0, 0.0,
|
||||
0.0, 0.0, 1.0
|
||||
);
|
||||
var position = aPosition;
|
||||
var uv = aUV;
|
||||
|
||||
{{start}}
|
||||
|
||||
vColor = vec4<f32>(1., 1., 1., 1.);
|
||||
|
||||
{{main}}
|
||||
|
||||
vUV = uv;
|
||||
|
||||
var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;
|
||||
|
||||
vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);
|
||||
|
||||
vColor *= globalUniforms.uWorldColorAlpha;
|
||||
|
||||
{{end}}
|
||||
|
||||
{{return}}
|
||||
};
|
||||
`,Wt=`
|
||||
@in vUV : vec2<f32>;
|
||||
@in vColor : vec4<f32>;
|
||||
|
||||
{{header}}
|
||||
|
||||
@fragment
|
||||
fn main(
|
||||
{{in}}
|
||||
) -> @location(0) vec4<f32> {
|
||||
|
||||
{{start}}
|
||||
|
||||
var outColor:vec4<f32>;
|
||||
|
||||
{{main}}
|
||||
|
||||
return outColor * vColor;
|
||||
};
|
||||
`,Vt=`
|
||||
in vec2 aPosition;
|
||||
in vec2 aUV;
|
||||
|
||||
out vec4 vColor;
|
||||
out vec2 vUV;
|
||||
|
||||
{{header}}
|
||||
|
||||
void main(void){
|
||||
|
||||
mat3 worldTransformMatrix = uWorldTransformMatrix;
|
||||
mat3 modelMatrix = mat3(
|
||||
1.0, 0.0, 0.0,
|
||||
0.0, 1.0, 0.0,
|
||||
0.0, 0.0, 1.0
|
||||
);
|
||||
vec2 position = aPosition;
|
||||
vec2 uv = aUV;
|
||||
|
||||
{{start}}
|
||||
|
||||
vColor = vec4(1.);
|
||||
|
||||
{{main}}
|
||||
|
||||
vUV = uv;
|
||||
|
||||
mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;
|
||||
|
||||
gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
||||
|
||||
vColor *= uWorldColorAlpha;
|
||||
|
||||
{{end}}
|
||||
}
|
||||
`,Kt=`
|
||||
|
||||
in vec4 vColor;
|
||||
in vec2 vUV;
|
||||
|
||||
out vec4 finalColor;
|
||||
|
||||
{{header}}
|
||||
|
||||
void main(void) {
|
||||
|
||||
{{start}}
|
||||
|
||||
vec4 outColor;
|
||||
|
||||
{{main}}
|
||||
|
||||
finalColor = outColor * vColor;
|
||||
}
|
||||
`,Xt={name:"global-uniforms-bit",vertex:{header:`
|
||||
struct GlobalUniforms {
|
||||
uProjectionMatrix:mat3x3<f32>,
|
||||
uWorldTransformMatrix:mat3x3<f32>,
|
||||
uWorldColorAlpha: vec4<f32>,
|
||||
uResolution: vec2<f32>,
|
||||
}
|
||||
|
||||
@group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
|
||||
`}},qt={name:"global-uniforms-bit",vertex:{header:`
|
||||
uniform mat3 uProjectionMatrix;
|
||||
uniform mat3 uWorldTransformMatrix;
|
||||
uniform vec4 uWorldColorAlpha;
|
||||
uniform vec2 uResolution;
|
||||
`}};re=function({bits:o,name:t}){const e=kt({template:{fragment:Wt,vertex:Ht},bits:[Xt,...o]});return C.from({name:t,vertex:{source:e.vertex,entryPoint:"main"},fragment:{source:e.fragment,entryPoint:"main"}})};oe=function({bits:o,name:t}){return new nt({name:t,...Lt({template:{vertex:Vt,fragment:Kt},bits:[qt,...o]})})};let D;ne={name:"color-bit",vertex:{header:`
|
||||
@in aColor: vec4<f32>;
|
||||
`,main:`
|
||||
vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
|
||||
`}};se={name:"color-bit",vertex:{header:`
|
||||
in vec4 aColor;
|
||||
`,main:`
|
||||
vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
|
||||
`}};D={};function Yt(o){const t=[];if(o===1)t.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),t.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let e=0;for(let r=0;r<o;r++)t.push(`@group(1) @binding(${e++}) var textureSource${r+1}: texture_2d<f32>;`),t.push(`@group(1) @binding(${e++}) var textureSampler${r+1}: sampler;`)}return t.join(`
|
||||
`)}function Zt(o){const t=[];if(o===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let e=0;e<o;e++)e===o-1?t.push(" default:{"):t.push(` case ${e}:{`),t.push(` outColor = textureSampleGrad(textureSource${e+1}, textureSampler${e+1}, vUV, uvDx, uvDy);`),t.push(" break;}");t.push("}")}return t.join(`
|
||||
`)}ie=function(o){return D[o]||(D[o]={name:"texture-batch-bit",vertex:{header:`
|
||||
@in aTextureIdAndRound: vec2<u32>;
|
||||
@out @interpolate(flat) vTextureId : u32;
|
||||
`,main:`
|
||||
vTextureId = aTextureIdAndRound.y;
|
||||
`,end:`
|
||||
if(aTextureIdAndRound.x == 1)
|
||||
{
|
||||
vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
|
||||
}
|
||||
`},fragment:{header:`
|
||||
@in @interpolate(flat) vTextureId: u32;
|
||||
|
||||
${Yt(16)}
|
||||
`,main:`
|
||||
var uvDx = dpdx(vUV);
|
||||
var uvDy = dpdy(vUV);
|
||||
|
||||
${Zt(16)}
|
||||
`}}),D[o]};const k={};function Jt(o){const t=[];for(let e=0;e<o;e++)e>0&&t.push("else"),e<o-1&&t.push(`if(vTextureId < ${e}.5)`),t.push("{"),t.push(` outColor = texture(uTextures[${e}], vUV);`),t.push("}");return t.join(`
|
||||
`)}ae=function(o){return k[o]||(k[o]={name:"texture-batch-bit",vertex:{header:`
|
||||
in vec2 aTextureIdAndRound;
|
||||
out float vTextureId;
|
||||
|
||||
`,main:`
|
||||
vTextureId = aTextureIdAndRound.y;
|
||||
`,end:`
|
||||
if(aTextureIdAndRound.x == 1.)
|
||||
{
|
||||
gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
|
||||
}
|
||||
`},fragment:{header:`
|
||||
in float vTextureId;
|
||||
|
||||
uniform sampler2D uTextures[${o}];
|
||||
|
||||
`,main:`
|
||||
|
||||
${Jt(16)}
|
||||
`}}),k[o]};ue={name:"round-pixels-bit",vertex:{header:`
|
||||
fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
|
||||
{
|
||||
return (floor((position * 0.5 + 0.5) * targetSize) / targetSize) * 2.0 - 1.0;
|
||||
}
|
||||
`}};ce={name:"round-pixels-bit",vertex:{header:`
|
||||
vec2 roundPixels(vec2 position, vec2 targetSize)
|
||||
{
|
||||
return (floor((position * 0.5 + 0.5) * targetSize) / targetSize) * 2.0 - 1.0;
|
||||
}
|
||||
`}};L={name:"local-uniform-bit",vertex:{header:`
|
||||
|
||||
struct LocalUniforms {
|
||||
uTransformMatrix:mat3x3<f32>,
|
||||
uColor:vec4<f32>,
|
||||
uRound:f32,
|
||||
}
|
||||
|
||||
@group(1) @binding(0) var<uniform> localUniforms : LocalUniforms;
|
||||
`,main:`
|
||||
vColor *= localUniforms.uColor;
|
||||
modelMatrix *= localUniforms.uTransformMatrix;
|
||||
`,end:`
|
||||
if(localUniforms.uRound == 1)
|
||||
{
|
||||
vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
|
||||
}
|
||||
`}};le={...L,vertex:{...L.vertex,header:L.vertex.header.replace("group(1)","group(2)")}};fe={name:"local-uniform-bit",vertex:{header:`
|
||||
|
||||
uniform mat3 uTransformMatrix;
|
||||
uniform vec4 uColor;
|
||||
uniform float uRound;
|
||||
`,main:`
|
||||
vColor *= uColor;
|
||||
modelMatrix = uTransformMatrix;
|
||||
`,end:`
|
||||
if(uRound == 1.)
|
||||
{
|
||||
gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
|
||||
}
|
||||
`}};de=class{constructor(){this.vertexSize=4,this.indexSize=6,this.location=0,this.batcher=null,this.batch=null,this.roundPixels=0}get blendMode(){return this.renderable.groupBlendMode}packAttributes(t,e,r,n){const s=this.renderable,a=this.texture,i=s.groupTransform,u=i.a,f=i.b,c=i.c,l=i.d,d=i.tx,p=i.ty,g=this.bounds,x=g.maxX,v=g.minX,b=g.maxY,y=g.minY,m=a.uvs,_=s.groupColorAlpha,G=n<<16|this.roundPixels&65535;t[r+0]=u*v+c*y+d,t[r+1]=l*y+f*v+p,t[r+2]=m.x0,t[r+3]=m.y0,e[r+4]=_,e[r+5]=G,t[r+6]=u*x+c*y+d,t[r+7]=l*y+f*x+p,t[r+8]=m.x1,t[r+9]=m.y1,e[r+10]=_,e[r+11]=G,t[r+12]=u*x+c*b+d,t[r+13]=l*b+f*x+p,t[r+14]=m.x2,t[r+15]=m.y2,e[r+16]=_,e[r+17]=G,t[r+18]=u*v+c*b+d,t[r+19]=l*b+f*v+p,t[r+20]=m.x3,t[r+21]=m.y3,e[r+22]=_,e[r+23]=G}packIndex(t,e,r){t[e]=r+0,t[e+1]=r+1,t[e+2]=r+2,t[e+3]=r+0,t[e+4]=r+2,t[e+5]=r+3}reset(){this.renderable=null,this.texture=null,this.batcher=null,this.batch=null,this.bounds=null}};me=function(o,t,e){const r=(o>>24&255)/255;t[e++]=(o&255)/255*r,t[e++]=(o>>8&255)/255*r,t[e++]=(o>>16&255)/255*r,t[e++]=r}});export{de as B,C as G,H as R,te as S,ee as T,Et as U,ne as a,at as b,re as c,V as d,L as e,nt as f,ie as g,St as h,me as i,oe as j,se as k,le as l,ae as m,ce as n,fe as o,ue as r,__tla};
|
||||
@@ -1 +0,0 @@
|
||||
import{g as J,K as L,d as j,r as Q,c as K,M as X,a1 as E,a2 as A,a3 as x,m as k,W as B,Z as F,u as _,Y as tt,a8 as et,ao as st,D as nt,at as R,ad as U}from"./vue-d2584a6d.js";import{u as rt,n as ot,e as it,f as at,g as ut,h as dt,i as lt,aC as ht,aD as mt,j as ct,a as ft,k as I,l as $t,m as vt}from"./index-135ae4c1.js";import"./faker-c43f92d4.js";import{d as W}from"./dayjs.min-1969f9c6.js";const kt=J({__name:"MoveTorrentDialog",props:{guid:{},hashes:{},mode:{}},setup(H){const D=H,{isOpened:h}=rt(D.guid),{t:a}=L(),g=ot(),f=it(),b=j(),V=j(),S=j(!1),r=Q({newPath:""}),m=[o=>!!o||a("dialogs.moveTorrent.required")],M=K(()=>D.hashes.map(f.getTorrentByHash)),$=K(()=>{switch(D.mode){case"dl":return M.value[0]?.download_path;case"save":return M.value[0]?.savePath}});async function w(){await b.value?.validate(),S.value&&(await g.toggleAutoTmm(D.hashes,!1),await f.moveTorrents(D.mode,D.hashes,r.newPath),V.value?.saveValueToHistory(),y())}const y=()=>{h.value=!1};return X(()=>{r.newPath=$.value||""}),(o,l)=>(E(),A(vt,{modelValue:_(h),"onUpdate:modelValue":l[3]||(l[3]=d=>nt(h)?h.value=d:null)},{default:x(()=>[k($t,null,{default:x(()=>[k(at,null,{default:x(()=>[B(F(o.$t(`dialogs.moveTorrent.${o.mode}.title`)),1)]),_:1}),k(ut,null,{default:x(()=>[k(_(dt),{modelValue:S.value,"onUpdate:modelValue":l[1]||(l[1]=d=>S.value=d),ref_key:"form",ref:b,onSubmit:l[2]||(l[2]=tt(()=>{},["prevent"]))},{default:x(()=>[$.value?(E(),A(lt,{key:0,"model-value":$.value,disabled:"",label:o.$t("dialogs.moveTorrent.oldPath")},null,8,["model-value","label"])):et("",!0),k(ht,{modelValue:r.newPath,"onUpdate:modelValue":l[0]||(l[0]=d=>r.newPath=d),historyKey:_(mt).TORRENT_PATH,ref_key:"field",ref:V,rules:m,autofocus:"",label:o.$t("dialogs.moveTorrent.newPath"),onKeydown:st(w,["enter"])},null,8,["modelValue","historyKey","label"])]),_:1},8,["modelValue"])]),_:1}),k(ct,null,{default:x(()=>[k(ft),k(I,{color:"error",onClick:y},{default:x(()=>[B(F(o.$t("common.cancel")),1)]),_:1}),k(I,{color:"accent",disabled:!S.value,onClick:w},{default:x(()=>[B(F(o.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});var Z={exports:{}};(function(H,D){(function(h,a){H.exports=a()})(R,function(){var h,a,g=1e3,f=6e4,b=36e5,V=864e5,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,r=31536e6,m=2628e6,M=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,$={years:r,months:m,days:V,hours:b,minutes:f,seconds:g,milliseconds:1,weeks:6048e5},w=function(s){return s instanceof P},y=function(s,e,t){return new P(s,t,e.$l)},o=function(s){return a.p(s)+"s"},l=function(s){return s<0},d=function(s){return l(s)?Math.ceil(s):Math.floor(s)},C=function(s){return Math.abs(s)},Y=function(s,e){return s?l(s)?{negative:!0,format:""+C(s)+e}:{negative:!1,format:""+s+e}:{negative:!1,format:""}},P=function(){function s(t,n,u){var i=this;if(this.$d={},this.$l=u,t===void 0&&(this.$ms=0,this.parseFromMilliseconds()),n)return y(t*$[o(n)],this);if(typeof t=="number")return this.$ms=t,this.parseFromMilliseconds(),this;if(typeof t=="object")return Object.keys(t).forEach(function(T){i.$d[o(T)]=t[T]}),this.calMilliseconds(),this;if(typeof t=="string"){var c=t.match(M);if(c){var v=c.slice(2).map(function(T){return T!=null?Number(T):0});return this.$d.years=v[0],this.$d.months=v[1],this.$d.weeks=v[2],this.$d.days=v[3],this.$d.hours=v[4],this.$d.minutes=v[5],this.$d.seconds=v[6],this.calMilliseconds(),this}}return this}var e=s.prototype;return e.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(n,u){return n+(t.$d[u]||0)*$[u]},0)},e.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=d(t/r),t%=r,this.$d.months=d(t/m),t%=m,this.$d.days=d(t/V),t%=V,this.$d.hours=d(t/b),t%=b,this.$d.minutes=d(t/f),t%=f,this.$d.seconds=d(t/g),t%=g,this.$d.milliseconds=t},e.toISOString=function(){var t=Y(this.$d.years,"Y"),n=Y(this.$d.months,"M"),u=+this.$d.days||0;this.$d.weeks&&(u+=7*this.$d.weeks);var i=Y(u,"D"),c=Y(this.$d.hours,"H"),v=Y(this.$d.minutes,"M"),T=this.$d.seconds||0;this.$d.milliseconds&&(T+=this.$d.milliseconds/1e3,T=Math.round(1e3*T)/1e3);var N=Y(T,"S"),z=t.negative||n.negative||i.negative||c.negative||v.negative||N.negative,G=c.format||v.format||N.format?"T":"",O=(z?"-":"")+"P"+t.format+n.format+i.format+G+c.format+v.format+N.format;return O==="P"||O==="-P"?"P0D":O},e.toJSON=function(){return this.toISOString()},e.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",u={Y:this.$d.years,YY:a.s(this.$d.years,2,"0"),YYYY:a.s(this.$d.years,4,"0"),M:this.$d.months,MM:a.s(this.$d.months,2,"0"),D:this.$d.days,DD:a.s(this.$d.days,2,"0"),H:this.$d.hours,HH:a.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:a.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:a.s(this.$d.seconds,2,"0"),SSS:a.s(this.$d.milliseconds,3,"0")};return n.replace(S,function(i,c){return c||String(u[i])})},e.as=function(t){return this.$ms/$[o(t)]},e.get=function(t){var n=this.$ms,u=o(t);return u==="milliseconds"?n%=1e3:n=u==="weeks"?d(n/$[u]):this.$d[u],n||0},e.add=function(t,n,u){var i;return i=n?t*$[o(n)]:w(t)?t.$ms:y(t,this).$ms,y(this.$ms+i*(u?-1:1),this)},e.subtract=function(t,n){return this.add(t,n,!0)},e.locale=function(t){var n=this.clone();return n.$l=t,n},e.clone=function(){return y(this.$ms,this)},e.humanize=function(t){return h().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},e.valueOf=function(){return this.asMilliseconds()},e.milliseconds=function(){return this.get("milliseconds")},e.asMilliseconds=function(){return this.as("milliseconds")},e.seconds=function(){return this.get("seconds")},e.asSeconds=function(){return this.as("seconds")},e.minutes=function(){return this.get("minutes")},e.asMinutes=function(){return this.as("minutes")},e.hours=function(){return this.get("hours")},e.asHours=function(){return this.as("hours")},e.days=function(){return this.get("days")},e.asDays=function(){return this.as("days")},e.weeks=function(){return this.get("weeks")},e.asWeeks=function(){return this.as("weeks")},e.months=function(){return this.get("months")},e.asMonths=function(){return this.as("months")},e.years=function(){return this.get("years")},e.asYears=function(){return this.as("years")},s}(),p=function(s,e,t){return s.add(e.years()*t,"y").add(e.months()*t,"M").add(e.days()*t,"d").add(e.hours()*t,"h").add(e.minutes()*t,"m").add(e.seconds()*t,"s").add(e.milliseconds()*t,"ms")};return function(s,e,t){h=t,a=t().$utils(),t.duration=function(i,c){var v=t.locale();return y(i,{$l:v},c)},t.isDuration=w;var n=e.prototype.add,u=e.prototype.subtract;e.prototype.add=function(i,c){return w(i)?p(this,i,1):n.bind(this)(i,c)},e.prototype.subtract=function(i,c){return w(i)?p(this,i,-1):u.bind(this)(i,c)}}})})(Z);var yt=Z.exports;const pt=U(yt);var q={exports:{}};(function(H,D){(function(h,a){H.exports=a()})(R,function(){return function(h,a,g){h=h||{};var f=a.prototype,b={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function V(r,m,M,$){return f.fromToBase(r,m,M,$)}g.en.relativeTime=b,f.fromToBase=function(r,m,M,$,w){for(var y,o,l,d=M.$locale().relativeTime||b,C=h.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],Y=C.length,P=0;P<Y;P+=1){var p=C[P];p.d&&(y=$?g(r).diff(M,p.d,!0):M.diff(r,p.d,!0));var s=(h.rounding||Math.round)(Math.abs(y));if(l=y>0,s<=p.r||!p.r){s<=1&&P>0&&(p=C[P-1]);var e=d[p.l];w&&(s=w(""+s)),o=typeof e=="string"?e.replace("%d",s):e(s,m,p.l,l);break}}if(m)return o;var t=l?d.future:d.past;return typeof t=="function"?t(o):t.replace("%s",o)},f.to=function(r,m){return V(r,m,this,!0)},f.from=function(r,m){return V(r,m,this)};var S=function(r){return r.$u?g.utc():g()};f.toNow=function(r){return this.to(S(this),r)},f.fromNow=function(r){return this.from(S(this),r)}}})})(q);var gt=q.exports;const Mt=U(gt),wt={thresholds:[{l:"s",r:1},{l:"m",r:1},{l:"mm",r:59,d:"minute"},{l:"h",r:1},{l:"hh",r:23,d:"hour"},{l:"d",r:1},{l:"dd",r:29,d:"day"},{l:"M",r:1},{l:"MM",r:11,d:"month"},{l:"y",r:1},{l:"yy",d:"year"}],rounding:Math.floor};W.extend(pt);W.extend(Mt,wt);export{kt as _};
|
||||
@@ -1 +0,0 @@
|
||||
import{at as Q,ad as K}from"./vue-d2584a6d.js";var E={exports:{}};(function(V,X){(function(W,k){V.exports=k()})(Q,function(){var W=1e3,k=6e4,N=36e5,A="millisecond",S="second",w="minute",O="hour",M="day",T="week",m="month",U="quarter",v="year",_="date",J="Invalid Date",q=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,B=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,G={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var n=["th","st","nd","rd"],t=s%100;return"["+s+(n[(t-20)%10]||n[t]||n[0])+"]"}},I=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},P={s:I,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+I(r,2,"0")+":"+I(e,2,"0")},m:function s(n,t){if(n.date()<t.date())return-s(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(r,m),i=t-e<0,u=n.clone().add(r+(i?-1:1),m);return+(-(r+(t-e)/(i?e-u:u-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:m,y:v,w:T,d:M,D:_,h:O,m:w,s:S,ms:A,Q:U}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},x="en",D={};D[x]=G;var Z="$isDayjsObject",F=function(s){return s instanceof C||!(!s||!s[Z])},j=function s(n,t,r){var e;if(!n)return x;if(typeof n=="string"){var i=n.toLowerCase();D[i]&&(e=i),t&&(D[i]=t,e=i);var u=n.split("-");if(!e&&u.length>1)return s(u[0])}else{var o=n.name;D[o]=n,e=o}return!r&&e&&(x=e),e||!r&&x},f=function(s,n){if(F(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new C(t)},a=P;a.l=j,a.i=F,a.w=function(s,n){return f(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var C=function(){function s(t){this.$L=j(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[Z]=!0}var n=s.prototype;return n.parse=function(t){this.$d=function(r){var e=r.date,i=r.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var u=e.match(q);if(u){var o=u[2]-1||0,c=(u[7]||"0").substring(0,3);return i?new Date(Date.UTC(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)):new Date(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)}}return new Date(e)}(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return a},n.isValid=function(){return this.$d.toString()!==J},n.isSame=function(t,r){var e=f(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return f(t)<this.startOf(r)},n.isBefore=function(t,r){return this.endOf(r)<f(t)},n.$g=function(t,r,e){return a.u(t)?this[r]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,r){var e=this,i=!!a.u(r)||r,u=a.p(t),o=function(p,$){var y=a.w(e.$u?Date.UTC(e.$y,$,p):new Date(e.$y,$,p),e);return i?y:y.endOf(M)},c=function(p,$){return a.w(e.toDate()[p].apply(e.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice($)),e)},h=this.$W,d=this.$M,l=this.$D,b="set"+(this.$u?"UTC":"");switch(u){case v:return i?o(1,0):o(31,11);case m:return i?o(1,d):o(0,d+1);case T:var g=this.$locale().weekStart||0,Y=(h<g?h+7:h)-g;return o(i?l-Y:l+(6-Y),d);case M:case _:return c(b+"Hours",0);case O:return c(b+"Minutes",1);case w:return c(b+"Seconds",2);case S:return c(b+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,r){var e,i=a.p(t),u="set"+(this.$u?"UTC":""),o=(e={},e[M]=u+"Date",e[_]=u+"Date",e[m]=u+"Month",e[v]=u+"FullYear",e[O]=u+"Hours",e[w]=u+"Minutes",e[S]=u+"Seconds",e[A]=u+"Milliseconds",e)[i],c=i===M?this.$D+(r-this.$W):r;if(i===m||i===v){var h=this.clone().set(_,1);h.$d[o](c),h.init(),this.$d=h.set(_,Math.min(this.$D,h.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},n.set=function(t,r){return this.clone().$set(t,r)},n.get=function(t){return this[a.p(t)]()},n.add=function(t,r){var e,i=this;t=Number(t);var u=a.p(r),o=function(d){var l=f(i);return a.w(l.date(l.date()+Math.round(d*t)),i)};if(u===m)return this.set(m,this.$M+t);if(u===v)return this.set(v,this.$y+t);if(u===M)return o(1);if(u===T)return o(7);var c=(e={},e[w]=k,e[O]=N,e[S]=W,e)[u]||1,h=this.$d.getTime()+t*c;return a.w(h,this)},n.subtract=function(t,r){return this.add(-1*t,r)},n.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||J;var i=t||"YYYY-MM-DDTHH:mm:ssZ",u=a.z(this),o=this.$H,c=this.$m,h=this.$M,d=e.weekdays,l=e.months,b=e.meridiem,g=function($,y,H,L){return $&&($[y]||$(r,i))||H[y].slice(0,L)},Y=function($){return a.s(o%12||12,$,"0")},p=b||function($,y,H){var L=$<12?"AM":"PM";return H?L.toLowerCase():L};return i.replace(B,function($,y){return y||function(H){switch(H){case"YY":return String(r.$y).slice(-2);case"YYYY":return a.s(r.$y,4,"0");case"M":return h+1;case"MM":return a.s(h+1,2,"0");case"MMM":return g(e.monthsShort,h,l,3);case"MMMM":return g(l,h);case"D":return r.$D;case"DD":return a.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return g(e.weekdaysMin,r.$W,d,2);case"ddd":return g(e.weekdaysShort,r.$W,d,3);case"dddd":return d[r.$W];case"H":return String(o);case"HH":return a.s(o,2,"0");case"h":return Y(1);case"hh":return Y(2);case"a":return p(o,c,!0);case"A":return p(o,c,!1);case"m":return String(c);case"mm":return a.s(c,2,"0");case"s":return String(r.$s);case"ss":return a.s(r.$s,2,"0");case"SSS":return a.s(r.$ms,3,"0");case"Z":return u}return null}($)||u.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,r,e){var i,u=this,o=a.p(r),c=f(t),h=(c.utcOffset()-this.utcOffset())*k,d=this-c,l=function(){return a.m(u,c)};switch(o){case v:i=l()/12;break;case m:i=l();break;case U:i=l()/3;break;case T:i=(d-h)/6048e5;break;case M:i=(d-h)/864e5;break;case O:i=d/N;break;case w:i=d/k;break;case S:i=d/W;break;default:i=d}return e?i:a.a(i)},n.daysInMonth=function(){return this.endOf(m).$D},n.$locale=function(){return D[this.$L]},n.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),i=j(t,r,!0);return i&&(e.$L=i),e},n.clone=function(){return a.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},s}(),z=C.prototype;return f.prototype=z,[["$ms",A],["$s",S],["$m",w],["$H",O],["$W",M],["$M",m],["$y",v],["$D",_]].forEach(function(s){z[s[1]]=function(n){return this.$g(n,s[0],s[1])}}),f.extend=function(s,n){return s.$i||(s(n,C,f),s.$i=!0),f},f.locale=j,f.isDayjs=F,f.unix=function(s){return f(1e3*s)},f.en=D[x],f.Ls=D,f.p={},f})})(E);var R=E.exports;const et=K(R);export{et as d};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
5
qbit/vuetorrent/public/assets/index-B-0i0kz8.css
Normal file
5
qbit/vuetorrent/public/assets/index-B-0i0kz8.css
Normal file
File diff suppressed because one or more lines are too long
1
qbit/vuetorrent/public/assets/index-BIiPWG4K.js
Normal file
1
qbit/vuetorrent/public/assets/index-BIiPWG4K.js
Normal file
@@ -0,0 +1 @@
|
||||
import{B as g,D as B}from"./vue-BSryv7ps.js";var F="Expected a function",S=NaN,M="[object Symbol]",N=/^\s+|\s+$/g,W=/^[-+]0x[0-9a-f]+$/i,A=/^0b[01]+$/i,D=/^0o[0-7]+$/i,R=parseInt,_=typeof g=="object"&&g&&g.Object===Object&&g,G=typeof self=="object"&&self&&self.Object===Object&&self,P=_||G||Function("return this")(),H=Object.prototype,U=H.toString,X=Math.max,q=Math.min,T=function(){return P.Date.now()};function z(e,t,i){var a,s,l,c,r,f,u=0,x=!1,d=!1,y=!0;if(typeof e!="function")throw new TypeError(F);t=E(t)||0,v(i)&&(x=!!i.leading,d="maxWait"in i,l=d?X(E(i.maxWait)||0,t):l,y="trailing"in i?!!i.trailing:y);function p(n){var o=a,m=s;return a=s=void 0,u=n,c=e.apply(m,o),c}function k(n){return u=n,r=setTimeout(b,t),x?p(n):c}function C(n){var o=n-f,m=n-u,h=t-o;return d?q(h,l-m):h}function I(n){var o=n-f,m=n-u;return f===void 0||o>=t||o<0||d&&m>=l}function b(){var n=T();if(I(n))return O(n);r=setTimeout(b,C(n))}function O(n){return r=void 0,y&&a?p(n):(a=s=void 0,c)}function L(){r!==void 0&&clearTimeout(r),u=0,a=f=s=r=void 0}function $(){return r===void 0?c:O(T())}function j(){var n=T(),o=I(n);if(a=arguments,s=this,f=n,o){if(r===void 0)return k(f);if(d)return r=setTimeout(b,t),p(f)}return r===void 0&&(r=setTimeout(b,t)),c}return j.cancel=L,j.flush=$,j}function v(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function J(e){return!!e&&typeof e=="object"}function K(e){return typeof e=="symbol"||J(e)&&U.call(e)==M}function E(e){if(typeof e=="number")return e;if(K(e))return S;if(v(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=v(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(N,"");var i=A.test(e);return i||D.test(e)?R(e.slice(2),i?2:8):W.test(e)?S:+e}var Q=z;const Y=B(Q);export{Y as d};
|
||||
748
qbit/vuetorrent/public/assets/index-bUuJUL5l.js
Normal file
748
qbit/vuetorrent/public/assets/index-bUuJUL5l.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{at as g,ad as F}from"./vue-d2584a6d.js";var M="Expected a function",S=0/0,N="[object Symbol]",W=/^\s+|\s+$/g,A=/^[-+]0x[0-9a-f]+$/i,B=/^0b[01]+$/i,R=/^0o[0-7]+$/i,_=parseInt,D=typeof g=="object"&&g&&g.Object===Object&&g,G=typeof self=="object"&&self&&self.Object===Object&&self,P=D||G||Function("return this")(),H=Object.prototype,U=H.toString,X=Math.max,q=Math.min,T=function(){return P.Date.now()};function z(e,t,i){var a,s,l,c,r,f,u=0,x=!1,d=!1,y=!0;if(typeof e!="function")throw new TypeError(M);t=E(t)||0,v(i)&&(x=!!i.leading,d="maxWait"in i,l=d?X(E(i.maxWait)||0,t):l,y="trailing"in i?!!i.trailing:y);function p(n){var o=a,m=s;return a=s=void 0,u=n,c=e.apply(m,o),c}function k(n){return u=n,r=setTimeout(b,t),x?p(n):c}function C(n){var o=n-f,m=n-u,h=t-o;return d?q(h,l-m):h}function I(n){var o=n-f,m=n-u;return f===void 0||o>=t||o<0||d&&m>=l}function b(){var n=T();if(I(n))return O(n);r=setTimeout(b,C(n))}function O(n){return r=void 0,y&&a?p(n):(a=s=void 0,c)}function L(){r!==void 0&&clearTimeout(r),u=0,a=f=s=r=void 0}function $(){return r===void 0?c:O(T())}function j(){var n=T(),o=I(n);if(a=arguments,s=this,f=n,o){if(r===void 0)return k(f);if(d)return r=setTimeout(b,t),p(f)}return r===void 0&&(r=setTimeout(b,t)),c}return j.cancel=L,j.flush=$,j}function v(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function J(e){return!!e&&typeof e=="object"}function K(e){return typeof e=="symbol"||J(e)&&U.call(e)==N}function E(e){if(typeof e=="number")return e;if(K(e))return S;if(v(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=v(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(W,"");var i=B.test(e);return i||R.test(e)?_(e.slice(2),i?2:8):A.test(e)?S:+e}var Q=z;const Y=F(Q);export{Y as d};
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
const t=[{name:"First torrent"},{name:"Second torrent"}];export{t as default};
|
||||
56
qbit/vuetorrent/public/assets/vue-BSryv7ps.js
Normal file
56
qbit/vuetorrent/public/assets/vue-BSryv7ps.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,5 +0,0 @@
|
||||
import{w as N,o as Kt,e as Zt,F as lt,i as _t,C as Xt,r as E,c as g,a as me,t as ft,b as dt,u as G,d as F,f as C,p as _,s as P,g as Jt,h as qt,j as mt,k as Qt,l as en,m as T,n as tn,q as gt,v as nn,x as rn,y as on,z as sn,A as an}from"./vue-d2584a6d.js";const un={badge:"Badge",open:"Open",close:"Close",confirmEdit:{ok:"OK",cancel:"Cancel"},dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{itemsSelected:"{0} selected",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action",otp:"Please enter OTP character {0}"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},timePicker:{am:"AM",pm:"PM"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"}},cn={af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1};function ln(e,t){let n;function r(){n=Zt(),n.run(()=>t.length?t(()=>{n?.stop(),r()}):t())}N(e,o=>{o&&!n?r():o||(n?.stop(),n=void 0)},{immediate:!0}),Kt(()=>{n?.stop()})}const D=typeof window<"u",Jr=D&&"IntersectionObserver"in window,fn=D&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),qr=D&&"EyeDropper"in window;function Re(e,t,n){dn(e,t),t.set(e,n)}function dn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mn(e,t,n){var r=ht(e,t,"set");return gn(e,r,n),n}function gn(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function I(e,t){var n=ht(e,t,"get");return hn(e,n)}function ht(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function hn(e,t){return t.get?t.get.call(e):t.value}function pt(e,t,n){const r=t.length-1;if(r<0)return e===void 0?n:e;for(let o=0;o<r;o++){if(e==null)return n;e=e[t[o]]}return e==null||e[t[r]]===void 0?n:e[t[r]]}function pn(e,t){if(e===t)return!0;if(e instanceof Date&&t instanceof Date&&e.getTime()!==t.getTime()||e!==Object(e)||t!==Object(t))return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>pn(e[r],t[r]))}function we(e,t,n){return e==null||!t||typeof t!="string"?n:e[t]!==void 0?e[t]:(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),pt(e,t.split("."),n))}function Qr(e,t,n){if(t===!0)return e===void 0?n:e;if(t==null||typeof t=="boolean")return n;if(e!==Object(e)){if(typeof t!="function")return n;const o=t(e,n);return typeof o>"u"?n:o}if(typeof t=="string")return we(e,t,n);if(Array.isArray(t))return pt(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function yt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function ne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(!(e==null||e===""))return isNaN(+e)?String(e):isFinite(+e)?`${Number(e)}${t}`:void 0}function Le(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ne(e){if(e&&"$el"in e){const t=e.$el;return t?.nodeType===Node.TEXT_NODE?t.nextElementSibling:t}return e}const eo=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16}),to=Object.freeze({enter:"Enter",tab:"Tab",delete:"Delete",esc:"Escape",space:"Space",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",end:"End",home:"Home",del:"Delete",backspace:"Backspace",insert:"Insert",pageup:"PageUp",pagedown:"PageDown",shift:"Shift"});function no(e){return Object.keys(e)}function ve(e,t){return t.every(n=>e.hasOwnProperty(n))}function yn(e,t){const n={},r=new Set(Object.keys(e));for(const o of t)r.has(o)&&(n[o]=e[o]);return n}function Be(e,t,n){const r=Object.create(null),o=Object.create(null);for(const s in e)t.some(a=>a instanceof RegExp?a.test(s):a===s)&&!n?.some(a=>a===s)?r[s]=e[s]:o[s]=e[s];return[r,o]}function vn(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}function ro(e,t){const n={};return t.forEach(r=>n[r]=e[r]),n}const vt=/^on[^a-z]/,Fe=e=>vt.test(e),bn=["onAfterscriptexecute","onAnimationcancel","onAnimationend","onAnimationiteration","onAnimationstart","onAuxclick","onBeforeinput","onBeforescriptexecute","onChange","onClick","onCompositionend","onCompositionstart","onCompositionupdate","onContextmenu","onCopy","onCut","onDblclick","onFocusin","onFocusout","onFullscreenchange","onFullscreenerror","onGesturechange","onGestureend","onGesturestart","onGotpointercapture","onInput","onKeydown","onKeypress","onKeyup","onLostpointercapture","onMousedown","onMousemove","onMouseout","onMouseover","onMouseup","onMousewheel","onPaste","onPointercancel","onPointerdown","onPointerenter","onPointerleave","onPointermove","onPointerout","onPointerover","onPointerup","onReset","onSelect","onSubmit","onTouchcancel","onTouchend","onTouchmove","onTouchstart","onTransitioncancel","onTransitionend","onTransitionrun","onTransitionstart","onWheel"],wn=["ArrowUp","ArrowDown","ArrowRight","ArrowLeft","Enter","Escape","Tab"," "];function oo(e){return e.isComposing&&wn.includes(e.key)}function so(e){const[t,n]=Be(e,[vt]),r=vn(t,bn),[o,s]=Be(n,["class","style","id",/^data-/]);return Object.assign(o,t),Object.assign(s,r),[o,s]}function ao(e){return e==null?[]:Array.isArray(e)?e:[e]}function io(e,t){let n=0;const r=function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];clearTimeout(n),n=setTimeout(()=>e(...s),G(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function Sn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(t,Math.min(n,e))}function uo(e){const t=e.toString().trim();return t.includes(".")?t.length-t.indexOf(".")-1:0}function Ve(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+n.repeat(Math.max(0,t-e.length))}function Ye(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function Dn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const n=[];let r=0;for(;r<e.length;)n.push(e.substr(r,t)),r+=t;return n}function co(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;if(e<t)return`${e} B`;const n=t===1024?["Ki","Mi","Gi"]:["k","M","G"];let r=-1;for(;Math.abs(e)>=t&&r<n.length-1;)e/=t,++r;return`${e.toFixed(1)} ${n[r]}B`}function A(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const o in e)r[o]=e[o];for(const o in t){const s=e[o],a=t[o];if(Le(s)&&Le(a)){r[o]=A(s,a,n);continue}if(Array.isArray(s)&&Array.isArray(a)&&n){r[o]=n(s,a);continue}r[o]=a}return r}function xn(e){return e.map(t=>t.type===lt?xn(t.children):t).flat()}function L(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(L.cache.has(e))return L.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return L.cache.set(e,t),t}L.cache=new Map;function ie(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>ie(e,n)).flat(1);if(Array.isArray(t.children))return t.children.map(n=>ie(e,n)).flat(1);if(t.component){if(Object.getOwnPropertySymbols(t.component.provides).includes(e))return[t.component];if(t.component.subTree)return ie(e,t.component.subTree).flat(1)}return[]}var re=new WeakMap,W=new WeakMap;class lo{constructor(t){Re(this,re,{writable:!0,value:[]}),Re(this,W,{writable:!0,value:0}),this.size=t}push(t){I(this,re)[I(this,W)]=t,mn(this,W,(I(this,W)+1)%this.size)}values(){return I(this,re).slice(I(this,W)).concat(I(this,re).slice(0,I(this,W)))}}function fo(e){return"touches"in e?{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}:{clientX:e.clientX,clientY:e.clientY}}function mo(e){const t=E({}),n=g(e);return me(()=>{for(const r in n.value)t[r]=n.value[r]},{flush:"sync"}),ft(t)}function Se(e,t){return e.includes(t)}function bt(e){return e[2].toLowerCase()+e.slice(3)}const go=()=>[Function,Array];function ho(e,t){return t="on"+dt(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function po(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(Array.isArray(e))for(const o of e)o(...n);else typeof e=="function"&&e(...n)}function An(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(r=>`${r}${t?':not([tabindex="-1"])':""}:not([disabled])`).join(", ");return[...e.querySelectorAll(n)]}function Cn(e,t,n){let r,o=e.indexOf(document.activeElement);const s=t==="next"?1:-1;do o+=s,r=e[o];while((!r||r.offsetParent==null||!(n?.(r)??!0))&&o<e.length&&o>=0);return r}function Mn(e,t){const n=An(e);if(!t)(e===document.activeElement||!e.contains(document.activeElement))&&n[0]?.focus();else if(t==="first")n[0]?.focus();else if(t==="last")n.at(-1)?.focus();else if(typeof t=="number")n[t]?.focus();else{const r=Cn(n,t);r?r.focus():Mn(e,t==="next"?"first":"last")}}function yo(e){return e==null||typeof e=="string"&&e.trim()===""}function vo(){}function bo(e,t){if(!(D&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function Fn(e){return e.some(t=>_t(t)?t.type===Xt?!1:t.type!==lt||Fn(t.children):!0)?e:null}const wt=["top","bottom"],On=["start","end","left","right"];function wo(e,t){let[n,r]=e.split(" ");return r||(r=Se(wt,n)?"start":Se(On,n)?"top":"center"),{side:He(n,t),align:He(r,t)}}function He(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function So(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function Do(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function xo(e){return{side:e.align,align:e.side}}function Ao(e){return Se(wt,e.side)?"y":"x"}class ue{constructor(t){let{x:n,y:r,width:o,height:s}=t;this.x=n,this.y=r,this.width=o,this.height=s}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function Co(e,t){return{x:{before:Math.max(0,t.left-e.left),after:Math.max(0,e.right-t.right)},y:{before:Math.max(0,t.top-e.top),after:Math.max(0,e.bottom-t.bottom)}}}function Mo(e){return Array.isArray(e)?new ue({x:e[0],y:e[1],width:0,height:0}):e.getBoundingClientRect()}function Fo(e){const t=e.getBoundingClientRect(),n=getComputedStyle(e),r=n.transform;if(r){let o,s,a,i,c;if(r.startsWith("matrix3d("))o=r.slice(9,-1).split(/, /),s=+o[0],a=+o[5],i=+o[12],c=+o[13];else if(r.startsWith("matrix("))o=r.slice(7,-1).split(/, /),s=+o[0],a=+o[3],i=+o[4],c=+o[5];else return new ue(t);const u=n.transformOrigin,f=t.x-i-(1-s)*parseFloat(u),d=t.y-c-(1-a)*parseFloat(u.slice(u.indexOf(" ")+1)),m=s?t.width/s:e.offsetWidth+1,p=a?t.height/a:e.offsetHeight+1;return new ue({x:f,y:d,width:m,height:p})}else return new ue(t)}function Oo(e,t,n){if(typeof e.animate>"u")return{finished:Promise.resolve()};let r;try{r=e.animate(t,n)}catch{return{finished:Promise.resolve()}}return typeof r.finished>"u"&&(r.finished=new Promise(o=>{r.onfinish=()=>{o(r)}})),r}const ce=new WeakMap;function Eo(e,t){Object.keys(t).forEach(n=>{if(Fe(n)){const r=bt(n),o=ce.get(e);if(t[n]==null)o?.forEach(s=>{const[a,i]=s;a===r&&(e.removeEventListener(r,i),o.delete(s))});else if(!o||![...o].some(s=>s[0]===r&&s[1]===t[n])){e.addEventListener(r,t[n]);const s=o||new Set;s.add([r,t[n]]),ce.has(e)||ce.set(e,s)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function To(e,t){Object.keys(t).forEach(n=>{if(Fe(n)){const r=bt(n),o=ce.get(e);o?.forEach(s=>{const[a,i]=s;a===r&&(e.removeEventListener(r,i),o.delete(s))})}else e.removeAttribute(n)})}const z=2.4,je=.2126729,We=.7151522,ze=.072175,En=.55,Tn=.58,kn=.57,Pn=.62,oe=.03,Ue=1.45,$n=5e-4,In=1.25,Rn=1.25,Ge=.078,Ke=12.82051282051282,se=.06,Ze=.001;function _e(e,t){const n=(e.r/255)**z,r=(e.g/255)**z,o=(e.b/255)**z,s=(t.r/255)**z,a=(t.g/255)**z,i=(t.b/255)**z;let c=n*je+r*We+o*ze,u=s*je+a*We+i*ze;if(c<=oe&&(c+=(oe-c)**Ue),u<=oe&&(u+=(oe-u)**Ue),Math.abs(u-c)<$n)return 0;let f;if(u>c){const d=(u**En-c**Tn)*In;f=d<Ze?0:d<Ge?d-d*Ke*se:d-se}else{const d=(u**Pn-c**kn)*Rn;f=d>-Ze?0:d>-Ge?d-d*Ke*se:d+se}return f*100}function ko(e){}function Po(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const fe=.20689655172413793,Ln=e=>e>fe**3?Math.cbrt(e):e/(3*fe**2)+4/29,Nn=e=>e>fe?e**3:3*fe**2*(e-4/29);function St(e){const t=Ln,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function Dt(e){const t=Nn,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const Bn=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],Vn=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,Yn=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],Hn=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function xt(e){const t=Array(3),n=Vn,r=Bn;for(let o=0;o<3;++o)t[o]=Math.round(Sn(n(r[o][0]*e[0]+r[o][1]*e[1]+r[o][2]*e[2]))*255);return{r:t[0],g:t[1],b:t[2]}}function Oe(e){let{r:t,g:n,b:r}=e;const o=[0,0,0],s=Hn,a=Yn;t=s(t/255),n=s(n/255),r=s(r/255);for(let i=0;i<3;++i)o[i]=a[i][0]*t+a[i][1]*n+a[i][2]*r;return o}function jn(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function $o(e){return jn(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const Xe=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,Wn={rgb:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),rgba:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),hsl:(e,t,n,r)=>Je({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>Je({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>B({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>B({h:e,s:t,v:n,a:r})};function k(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&Xe.test(e)){const{groups:t}=e.match(Xe),{fn:n,values:r}=t,o=r.split(/,\s*/).map(s=>s.endsWith("%")&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(s)/100:parseFloat(s));return Wn[n](...o)}else if(typeof e=="string"){let t=e.startsWith("#")?e.slice(1):e;return[3,4].includes(t.length)?t=t.split("").map(n=>n+n).join(""):[6,8].includes(t.length),Mt(t)}else if(typeof e=="object"){if(ve(e,["r","g","b"]))return e;if(ve(e,["h","s","l"]))return B(At(e));if(ve(e,["h","s","v"]))return B(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
|
||||
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function B(e){const{h:t,s:n,v:r,a:o}=e,s=i=>{const c=(i+t/60)%6;return r-r*n*Math.max(Math.min(c,4-c,1),0)},a=[s(5),s(3),s(1)].map(i=>Math.round(i*255));return{r:a[0],g:a[1],b:a[2],a:o}}function Je(e){return B(At(e))}function zn(e){if(!e)return{h:0,s:1,v:1,a:1};const t=e.r/255,n=e.g/255,r=e.b/255,o=Math.max(t,n,r),s=Math.min(t,n,r);let a=0;o!==s&&(o===t?a=60*(0+(n-r)/(o-s)):o===n?a=60*(2+(r-t)/(o-s)):o===r&&(a=60*(4+(t-n)/(o-s)))),a<0&&(a=a+360);const i=o===0?0:(o-s)/o,c=[a,i,o];return{h:c[0],s:c[1],v:c[2],a:e.a}}function Io(e){const{h:t,s:n,v:r,a:o}=e,s=r-r*n/2,a=s===1||s===0?0:(r-s)/Math.min(s,1-s);return{h:t,s:a,l:s,a:o}}function At(e){const{h:t,s:n,l:r,a:o}=e,s=r+n*Math.min(r,1-r),a=s===0?0:2-2*r/s;return{h:t,s:a,v:s,a:o}}function Un(e){let{r:t,g:n,b:r,a:o}=e;return o===void 0?`rgb(${t}, ${n}, ${r})`:`rgba(${t}, ${n}, ${r}, ${o})`}function Ro(e){return Un(B(e))}function ae(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function Ct(e){let{r:t,g:n,b:r,a:o}=e;return`#${[ae(t),ae(n),ae(r),o!==void 0?ae(Math.round(o*255)):""].join("")}`}function Mt(e){e=Gn(e);let[t,n,r,o]=Dn(e,2).map(s=>parseInt(s,16));return o=o===void 0?o:o/255,{r:t,g:n,b:r,a:o}}function Lo(e){const t=Mt(e);return zn(t)}function No(e){return Ct(B(e))}function Gn(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(t=>t+t).join("")),e.length!==6&&(e=Ve(Ve(e,6),8,"F")),e}function Kn(e,t){const n=St(Oe(e));return n[0]=n[0]+t*10,xt(Dt(n))}function Zn(e,t){const n=St(Oe(e));return n[0]=n[0]-t*10,xt(Dt(n))}function De(e){const t=k(e);return Oe(t)[1]}function Bo(e,t){const n=De(e),r=De(t),o=Math.max(n,r),s=Math.min(n,r);return(o+.05)/(s+.05)}function _n(e){const t=Math.abs(_e(k(0),k(e)));return Math.abs(_e(k(16777215),k(e)))>Math.min(t,50)?"#fff":"#000"}function V(e,t){return n=>Object.keys(e).reduce((r,o)=>{const a=typeof e[o]=="object"&&e[o]!=null&&!Array.isArray(e[o])?e[o]:{type:e[o]};return n&&o in n?r[o]={...a,default:n[o]}:r[o]=a,t&&!r[o].source&&(r[o].source=t),r},{})}const Xn=V({class:[String,Array],style:{type:[String,Array,Object],default:null}},"component"),K=Symbol.for("vuetify:defaults");function Jn(e){return F(e)}function Ee(){const e=C(K);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function Vo(e,t){const n=Ee(),r=F(e),o=g(()=>{if(G(t?.disabled))return n.value;const a=G(t?.scoped),i=G(t?.reset),c=G(t?.root);if(r.value==null&&!(a||i||c))return n.value;let u=A(r.value,{prev:n.value});if(a)return u;if(i||c){const f=Number(i||1/0);for(let d=0;d<=f&&!(!u||!("prev"in u));d++)u=u.prev;return u&&typeof c=="string"&&c in u&&(u=A(A(u,{prev:u}),u[c])),u}return u.prev?A(u.prev,u):u});return _(K,o),o}function qn(e,t){return typeof e.props?.[t]<"u"||typeof e.props?.[L(t)]<"u"}function Qn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ee();const r=O("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const o=g(()=>n.value?.[e._as??t]),s=new Proxy(e,{get(c,u){const f=Reflect.get(c,u);return u==="class"||u==="style"?[o.value?.[u],f].filter(d=>d!=null):typeof u=="string"&&!qn(r.vnode,u)?o.value?.[u]??n.value?.global?.[u]??f:f}}),a=P();me(()=>{if(o.value){const c=Object.entries(o.value).filter(u=>{let[f]=u;return f.startsWith(f[0].toUpperCase())});a.value=c.length?Object.fromEntries(c):void 0}else a.value=void 0});function i(){const c=nr(K,r);_(K,g(()=>a.value?A(c?.value??{},a.value):c?.value))}return{props:s,provideSubDefaults:i}}function te(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=V(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return yn(r,t)},e.props._as=String,e.setup=function(r,o){const s=Ee();if(!s.value)return e._setup(r,o);const{props:a,provideSubDefaults:i}=Qn(r,r._as??e.name,s),c=e._setup(a,o);return i(),c}}return e}function Ft(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?te:Jt)(t)}function Yo(e,t){return t.props=e,t}function Ho(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return Ft()({name:n??dt(qt(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},...Xn()},setup(r,o){let{slots:s}=o;return()=>mt(r.tag,{class:[e,r.class],style:r.style},s.default?.())}})}function jo(e){if(typeof e.getRootNode!="function"){for(;e.parentNode;)e=e.parentNode;return e!==document?null:document}const t=e.getRootNode();return t!==document&&t.getRootNode({composed:!0})!==document?null:t}const Wo="cubic-bezier(0.4, 0, 0.2, 1)",zo="cubic-bezier(0.0, 0, 0.2, 1)",Uo="cubic-bezier(0.4, 0, 1, 1)";function Go(e,t,n){return Object.keys(e).filter(r=>Fe(r)&&r.endsWith(t)).reduce((r,o)=>(r[o.slice(0,-t.length)]=s=>e[o](s,n(s)),r),{})}function O(e,t){const n=Qt();if(!n)throw new Error(`[Vuetify] ${e} ${t||"must be called from inside a setup function"}`);return n}function er(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=O(e).type;return L(t?.aliasName||t?.name)}let Ot=0,le=new WeakMap;function Te(){const e=O("getUid");if(le.has(e))return le.get(e);{const t=Ot++;return le.set(e,t),t}}Te.reset=()=>{Ot=0,le=new WeakMap};function Ko(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?tr(e):Et(e))return e;e=e.parentElement}return document.scrollingElement}function Zo(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(Et(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function Et(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"&&e.scrollHeight>e.clientHeight}function tr(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function nr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}function _o(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function Xo(e){const t=O("useRender");t.render=e}function rr(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:d=>d,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:d=>d;const s=O("useProxiedModel"),a=F(e[t]!==void 0?e[t]:n),i=L(t),u=i!==t?g(()=>(e[t],!!((s.vnode.props?.hasOwnProperty(t)||s.vnode.props?.hasOwnProperty(i))&&(s.vnode.props?.hasOwnProperty(`onUpdate:${t}`)||s.vnode.props?.hasOwnProperty(`onUpdate:${i}`))))):g(()=>(e[t],!!(s.vnode.props?.hasOwnProperty(t)&&s.vnode.props?.hasOwnProperty(`onUpdate:${t}`))));ln(()=>!u.value,()=>{N(()=>e[t],d=>{a.value=d})});const f=g({get(){const d=e[t];return r(u.value?d:a.value)},set(d){const m=o(d),p=en(u.value?e[t]:a.value);p===m||r(p)===d||(a.value=m,s?.emit(`update:${t}`,m))}});return Object.defineProperty(f,"externalValue",{get:()=>u.value?e[t]:a.value}),f}const qe="$vuetify.",Qe=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[+r])),Tt=(e,t,n)=>function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];if(!r.startsWith(qe))return Qe(r,s);const i=r.replace(qe,""),c=e.value&&n.value[e.value],u=t.value&&n.value[t.value];let f=we(c,i,null);return f||(`${r}${e.value}`,f=we(u,i,null)),f||(f=r),typeof f!="string"&&(f=r),Qe(f,s)};function kt(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function be(e,t,n){const r=rr(e,t,e[t]??n.value);return r.value=e[t]??n.value,N(n,o=>{e[t]==null&&(r.value=n.value)}),r}function Pt(e){return t=>{const n=be(t,"locale",e.current),r=be(t,"fallback",e.fallback),o=be(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:o,t:Tt(n,r,o),n:kt(n,r),provide:Pt({current:n,fallback:r,messages:o})}}}function or(e){const t=P(e?.locale??"en"),n=P(e?.fallback??"en"),r=F({en:un,...e?.messages});return{name:"vuetify",current:t,fallback:n,messages:r,t:Tt(t,n,r),n:kt(t,n),provide:Pt({current:t,fallback:n,messages:r})}}const Z=Symbol.for("vuetify:locale");function sr(e){return e.name!=null}function ar(e){const t=e?.adapter&&sr(e?.adapter)?e?.adapter:or(e),n=ur(t,e);return{...t,...n}}function ir(){const e=C(Z);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function Jo(e){const t=C(Z);if(!t)throw new Error("[Vuetify] Could not find injected locale instance");const n=t.provide(e),r=cr(n,t.rtl,e),o={...n,...r};return _(Z,o),o}function ur(e,t){const n=F(t?.rtl??cn),r=g(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:g(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function cr(e,t,n){const r=g(()=>n.rtl??t.value[e.current.value]??!1);return{isRtl:r,rtl:t,rtlClasses:g(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function qo(){const e=C(Z);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const xe={"001":1,AD:1,AE:6,AF:6,AG:0,AI:1,AL:1,AM:1,AN:1,AR:1,AS:0,AT:1,AU:1,AX:1,AZ:1,BA:1,BD:0,BE:1,BG:1,BH:6,BM:1,BN:1,BR:0,BS:0,BT:0,BW:0,BY:1,BZ:0,CA:0,CH:1,CL:1,CM:1,CN:1,CO:0,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:0,DO:0,DZ:6,EC:1,EE:1,EG:6,ES:1,ET:0,FI:1,FJ:1,FO:1,FR:1,GB:1,"GB-alt-variant":0,GE:1,GF:1,GP:1,GR:1,GT:0,GU:0,HK:0,HN:0,HR:1,HU:1,ID:0,IE:1,IL:0,IN:0,IQ:6,IR:6,IS:1,IT:1,JM:0,JO:6,JP:0,KE:0,KG:1,KH:0,KR:0,KW:6,KZ:1,LA:0,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MH:0,MK:1,MM:0,MN:1,MO:0,MQ:1,MT:0,MV:5,MX:0,MY:1,MZ:0,NI:0,NL:1,NO:1,NP:0,NZ:1,OM:6,PA:0,PE:0,PH:0,PK:0,PL:1,PR:0,PT:0,PY:0,QA:6,RE:1,RO:1,RS:1,RU:1,SA:0,SD:6,SE:1,SG:0,SI:1,SK:1,SM:1,SV:0,SY:6,TH:0,TJ:1,TM:1,TR:1,TT:0,TW:0,UA:1,UM:0,US:0,UY:1,UZ:1,VA:1,VE:0,VI:0,VN:1,WS:0,XK:1,YE:0,ZA:0,ZW:0};function lr(e,t){const n=[];let r=[];const o=$t(e),s=It(e),a=(o.getDay()-xe[t.slice(-2).toUpperCase()]+7)%7,i=(s.getDay()-xe[t.slice(-2).toUpperCase()]+7)%7;for(let c=0;c<a;c++){const u=new Date(o);u.setDate(u.getDate()-(a-c)),r.push(u)}for(let c=1;c<=s.getDate();c++){const u=new Date(e.getFullYear(),e.getMonth(),c);r.push(u),r.length===7&&(n.push(r),r=[])}for(let c=1;c<7-i;c++){const u=new Date(s);u.setDate(u.getDate()+c),r.push(u)}return r.length>0&&n.push(r),n}function $t(e){return new Date(e.getFullYear(),e.getMonth(),1)}function It(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function fr(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const dr=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function Rt(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(dr.test(e))return fr(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const et=new Date(2e3,0,2);function mr(e){const t=xe[e.slice(-2).toUpperCase()];return yt(7).map(n=>{const r=new Date(et);return r.setDate(et.getDate()+t+n),new Intl.DateTimeFormat(e,{weekday:"narrow"}).format(r)})}function gr(e,t,n,r){const o=Rt(e)??new Date,s=r?.[t];if(typeof s=="function")return s(o,t,n);let a={};switch(t){case"fullDateWithWeekday":a={weekday:"long",day:"numeric",month:"long",year:"numeric"};break;case"normalDateWithWeekday":a={weekday:"short",day:"numeric",month:"short"};break;case"keyboardDate":a={day:"2-digit",month:"2-digit",year:"numeric"};break;case"monthAndDate":a={month:"long",day:"numeric"};break;case"monthAndYear":a={month:"long",year:"numeric"};break;case"month":a={month:"long"};break;case"monthShort":a={month:"short"};break;case"dayOfMonth":a={day:"numeric"};break;case"shortDate":a={year:"2-digit",month:"numeric",day:"numeric"};break;case"year":a={year:"numeric"};break;default:a=s??{timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(n,a).format(o)}function hr(e,t){const n=e.toJsDate(t),r=n.getFullYear(),o=Ye(String(n.getMonth()+1),2,"0"),s=Ye(String(n.getDate()),2,"0");return`${r}-${o}-${s}`}function pr(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function yr(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function vr(e,t){const n=new Date(e);return n.setMonth(n.getMonth()+t),n}function br(e){return e.getFullYear()}function wr(e){return e.getMonth()}function Sr(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function Dr(e){return new Date(e.getFullYear(),0,1)}function xr(e){return new Date(e.getFullYear(),11,31)}function Ar(e,t){return Ae(e,t[0])&&Mr(e,t[1])}function Cr(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function Ae(e,t){return e.getTime()>t.getTime()}function Mr(e,t){return e.getTime()<t.getTime()}function tt(e,t){return e.getTime()===t.getTime()}function Fr(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Or(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Er(e,t,n){const r=new Date(e),o=new Date(t);return n==="month"?r.getMonth()-o.getMonth()+(r.getFullYear()-o.getFullYear())*12:Math.floor((r.getTime()-o.getTime())/(1e3*60*60*24))}function Tr(e,t){const n=new Date(e);return n.setMonth(t),n}function kr(e,t){const n=new Date(e);return n.setFullYear(t),n}function Pr(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function $r(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class Ir{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return Rt(t)}toJsDate(t){return t}toISO(t){return hr(this,t)}parseISO(t){return pr(t)}addDays(t,n){return yr(t,n)}addMonths(t,n){return vr(t,n)}getWeekArray(t){return lr(t,this.locale)}startOfMonth(t){return $t(t)}endOfMonth(t){return It(t)}format(t,n){return gr(t,n,this.locale,this.formats)}isEqual(t,n){return tt(t,n)}isValid(t){return Cr(t)}isWithinRange(t,n){return Ar(t,n)}isAfter(t,n){return Ae(t,n)}isBefore(t,n){return!Ae(t,n)&&!tt(t,n)}isSameDay(t,n){return Fr(t,n)}isSameMonth(t,n){return Or(t,n)}setMonth(t,n){return Tr(t,n)}setYear(t,n){return kr(t,n)}getDiff(t,n,r){return Er(t,n,r)}getWeekdays(){return mr(this.locale)}getYear(t){return br(t)}getMonth(t){return wr(t)}getNextMonth(t){return Sr(t)}startOfDay(t){return Pr(t)}endOfDay(t){return $r(t)}startOfYear(t){return Dr(t)}endOfYear(t){return xr(t)}}const Lt=Symbol.for("vuetify:date-options"),nt=Symbol.for("vuetify:date-adapter");function Rr(e,t){const n=A({adapter:Ir,locale:{af:"af-ZA",bg:"bg-BG",ca:"ca-ES",ckb:"",cs:"cs-CZ",de:"de-DE",el:"el-GR",en:"en-US",et:"et-EE",fa:"fa-IR",fi:"fi-FI",hr:"hr-HR",hu:"hu-HU",he:"he-IL",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",lt:"lt-LT",nl:"nl-NL",no:"no-NO",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",srCyrl:"sr-SP",srLatn:"sr-SP",sv:"sv-SE",th:"th-TH",tr:"tr-TR",az:"az-AZ",uk:"uk-UA",vi:"vi-VN",zhHans:"zh-CN",zhHant:"zh-TW"}},e);return{options:n,instance:Nt(n,t)}}function Nt(e,t){const n=E(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return N(t.current,r=>{n.locale=e.locale[r]??r??n.locale}),n}function Qo(){const e=C(Lt);if(!e)throw new Error("[Vuetify] Could not find injected date options");const t=ir();return Nt(e,t)}function es(e,t){const n=e.toJsDate(t);let r=e.getYear(n),o=e.startOfYear(n);if(n<o)r=r-1,o=e.startOfYear(e.setYear(n,r));else{const i=e.startOfYear(e.setYear(n,r+1));n>=i&&(r=r+1,o=i)}const s=Math.abs(n.getTime()-o.getTime()),a=Math.ceil(s/(1e3*60*60*24));return Math.floor(a/7)+1}const ts=["sm","md","lg","xl","xxl"],Ce=Symbol.for("vuetify:display"),rt={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},Lr=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rt;return A(rt,e)};function ot(e){return D&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function st(e){return D&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function at(e){const t=D&&!e?window.navigator.userAgent:"ssr";function n(l){return!!t.match(l)}const r=n(/android/i),o=n(/iphone|ipad|ipod/i),s=n(/cordova/i),a=n(/electron/i),i=n(/chrome/i),c=n(/edge/i),u=n(/firefox/i),f=n(/opera/i),d=n(/win/i),m=n(/mac/i),p=n(/linux/i);return{android:r,ios:o,cordova:s,electron:a,chrome:i,edge:c,firefox:u,opera:f,win:d,mac:m,linux:p,touch:fn,ssr:t==="ssr"}}function Nr(e,t){const{thresholds:n,mobileBreakpoint:r}=Lr(e),o=P(st(t)),s=P(at(t)),a=E({}),i=P(ot(t));function c(){o.value=st(),i.value=ot()}function u(){c(),s.value=at()}return me(()=>{const f=i.value<n.sm,d=i.value<n.md&&!f,m=i.value<n.lg&&!(d||f),p=i.value<n.xl&&!(m||d||f),l=i.value<n.xxl&&!(p||m||d||f),h=i.value>=n.xxl,w=f?"xs":d?"sm":m?"md":p?"lg":l?"xl":"xxl",Y=typeof r=="number"?r:n[r],H=i.value<Y;a.xs=f,a.sm=d,a.md=m,a.lg=p,a.xl=l,a.xxl=h,a.smAndUp=!f,a.mdAndUp=!(f||d),a.lgAndUp=!(f||d||m),a.xlAndUp=!(f||d||m||p),a.smAndDown=!(m||p||l||h),a.mdAndDown=!(p||l||h),a.lgAndDown=!(l||h),a.xlAndDown=!h,a.name=w,a.height=o.value,a.width=i.value,a.mobile=H,a.mobileBreakpoint=r,a.platform=s.value,a.thresholds=n}),D&&window.addEventListener("resize",c,{passive:!0}),{...ft(a),update:u,ssr:!!t}}const ns=V({mobileBreakpoint:[Number,String]},"display");function rs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:er();const n=C(Ce);if(!n)throw new Error("Could not find Vuetify display injection");const r=g(()=>{if(!e.mobileBreakpoint)return n.mobile.value;const s=typeof e.mobileBreakpoint=="number"?e.mobileBreakpoint:n.thresholds.value[e.mobileBreakpoint];return n.width.value<s}),o=g(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:o,mobile:r}}const Br={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar",eyeDropper:"mdi-eyedropper"},Vr={component:e=>mt(Vt,{...e,class:"mdi"})},Yr=[String,Function,Object,Array],Me=Symbol.for("vuetify:icons"),ge=V({icon:{type:Yr},tag:{type:String,required:!0}},"icon"),it=Ft()({name:"VComponentIcon",props:ge(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return T(e.tag,null,{default:()=>[e.icon?T(r,null,null):n.default?.()]})}}}),Bt=te({name:"VSvgIcon",inheritAttrs:!1,props:ge(),setup(e,t){let{attrs:n}=t;return()=>T(e.tag,tn(n,{style:null}),{default:()=>[T("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(r=>Array.isArray(r)?T("path",{d:r[0],"fill-opacity":r[1]},null):T("path",{d:r},null)):T("path",{d:e.icon},null)])]})}}),os=te({name:"VLigatureIcon",props:ge(),setup(e){return()=>T(e.tag,null,{default:()=>[e.icon]})}}),Vt=te({name:"VClassIcon",props:ge(),setup(e){return()=>T(e.tag,{class:e.icon},null)}}),Hr={svg:{component:Bt},class:{component:Vt}};function jr(e){return A({defaultSet:"mdi",sets:{...Hr,mdi:Vr},aliases:{...Br,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z"}},e)}const ss=e=>{const t=C(Me);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:g(()=>{const r=G(e);if(!r)return{component:it};let o=r;if(typeof o=="string"&&(o=o.trim(),o.startsWith("$")&&(o=t.aliases?.[o.slice(1)])),!o)throw new Error(`Could not find aliased icon "${r}"`);if(Array.isArray(o))return{component:Bt,icon:o};if(typeof o!="string")return{component:it,icon:o};const s=Object.keys(t.sets).find(c=>typeof o=="string"&&o.startsWith(`${c}:`)),a=s?o.slice(s.length+1):o;return{component:t.sets[s??t.defaultSet].component,icon:a}})}},ee=Symbol.for("vuetify:theme"),as=V({theme:String},"theme"),Q={defaultTheme:"light",variations:{colors:[],lighten:0,darken:0},themes:{light:{dark:!1,colors:{background:"#FFFFFF",surface:"#FFFFFF","surface-bright":"#FFFFFF","surface-variant":"#424242","on-surface-variant":"#EEEEEE",primary:"#1867C0","primary-darken-1":"#1F5592",secondary:"#48A9A6","secondary-darken-1":"#018786",error:"#B00020",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#000000","border-opacity":.12,"high-emphasis-opacity":.87,"medium-emphasis-opacity":.6,"disabled-opacity":.38,"idle-opacity":.04,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.12,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-bright":"#ccbfd6","surface-variant":"#a3a3a3","on-surface-variant":"#424242",primary:"#2196F3","primary-darken-1":"#277CC1",secondary:"#54B6B2","secondary-darken-1":"#48A9A6",error:"#CF6679",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#FFFFFF","border-opacity":.12,"high-emphasis-opacity":1,"medium-emphasis-opacity":.7,"disabled-opacity":.5,"idle-opacity":.1,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.16,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}}};function Wr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Q;if(!e)return{...Q,isDisabled:!0};const t={};for(const[n,r]of Object.entries(e.themes??{})){const o=r.dark||n==="dark"?Q.themes?.dark:Q.themes?.light;t[n]=A(o,r)}return A(Q,{...e,themes:t})}function zr(e){const t=Wr(e),n=F(t.defaultTheme),r=F(t.themes),o=g(()=>{const f={};for(const[d,m]of Object.entries(r.value)){const p=f[d]={...m,colors:{...m.colors}};if(t.variations)for(const l of t.variations.colors){const h=p.colors[l];if(h)for(const w of["lighten","darken"]){const Y=w==="lighten"?Kn:Zn;for(const H of yt(t.variations[w],1))p.colors[`${l}-${w}-${H}`]=Ct(Y(k(h),H))}}for(const l of Object.keys(p.colors)){if(/^on-[a-z]/.test(l)||p.colors[`on-${l}`])continue;const h=`on-${l}`,w=k(p.colors[l]);p.colors[h]=_n(w)}}return f}),s=g(()=>o.value[n.value]),a=g(()=>{const f=[];s.value.dark&&R(f,":root",["color-scheme: dark"]),R(f,":root",ut(s.value));for(const[l,h]of Object.entries(o.value))R(f,`.v-theme--${l}`,[`color-scheme: ${h.dark?"dark":"normal"}`,...ut(h)]);const d=[],m=[],p=new Set(Object.values(o.value).flatMap(l=>Object.keys(l.colors)));for(const l of p)/^on-[a-z]/.test(l)?R(m,`.${l}`,[`color: rgb(var(--v-theme-${l})) !important`]):(R(d,`.bg-${l}`,[`--v-theme-overlay-multiplier: var(--v-theme-${l}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${l})) !important`,`color: rgb(var(--v-theme-on-${l})) !important`]),R(m,`.text-${l}`,[`color: rgb(var(--v-theme-${l})) !important`]),R(m,`.border-${l}`,[`--v-border-color: var(--v-theme-${l})`]));return f.push(...d,...m),f.map((l,h)=>h===0?l:` ${l}`).join("")});function i(){return{style:[{children:a.value,id:"vuetify-theme-stylesheet",nonce:t.cspNonce||!1}]}}function c(f){if(t.isDisabled)return;const d=f._context.provides.usehead;if(d)if(d.push){const m=d.push(i);D&&N(a,()=>{m.patch(i)})}else D?(d.addHeadObjs(g(i)),me(()=>d.updateDOM())):d.addHeadObjs(i());else{let p=function(){if(typeof document<"u"&&!m){const l=document.createElement("style");l.type="text/css",l.id="vuetify-theme-stylesheet",t.cspNonce&&l.setAttribute("nonce",t.cspNonce),m=l,document.head.appendChild(m)}m&&(m.innerHTML=a.value)},m=D?document.getElementById("vuetify-theme-stylesheet"):null;D?N(a,p,{immediate:!0}):p()}}const u=g(()=>t.isDisabled?void 0:`v-theme--${n.value}`);return{install:c,isDisabled:t.isDisabled,name:n,themes:r,current:s,computedThemes:o,themeClasses:u,styles:a,global:{name:n,current:s}}}function is(e){O("provideTheme");const t=C(ee,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=g(()=>e.theme??t.name.value),r=g(()=>t.themes.value[n.value]),o=g(()=>t.isDisabled?void 0:`v-theme--${n.value}`),s={...t,name:n,current:r,themeClasses:o};return _(ee,s),s}function us(){O("useTheme");const e=C(ee,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function R(e,t,n){e.push(`${t} {
|
||||
`,...n.map(r=>` ${r};
|
||||
`),`}
|
||||
`)}function ut(e){const t=e.dark?2:1,n=e.dark?1:2,r=[];for(const[o,s]of Object.entries(e.colors)){const a=k(s);r.push(`--v-theme-${o}: ${a.r},${a.g},${a.b}`),o.startsWith("on-")||r.push(`--v-theme-${o}-overlay-multiplier: ${De(s)>.18?t:n}`)}for(const[o,s]of Object.entries(e.variables)){const a=typeof s=="string"&&s.startsWith("#")?k(s):void 0,i=a?`${a.r}, ${a.g}, ${a.b}`:void 0;r.push(`--v-${o}: ${i??s}`)}return r}function Ur(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=F(),r=F();if(D){const o=new ResizeObserver(s=>{e?.(s,o),s.length&&(t==="content"?r.value=s[0].contentRect:r.value=s[0].target.getBoundingClientRect())});gt(()=>{o.disconnect()}),N(n,(s,a)=>{a&&(o.unobserve(Ne(a)),r.value=void 0),s&&o.observe(Ne(s))},{flush:"post"})}return{resizeRef:n,contentRect:nn(r)}}const de=Symbol.for("vuetify:layout"),Yt=Symbol.for("vuetify:layout-item"),ct=1e3,cs=V({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),ls=V({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function fs(){const e=C(de);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function ds(e){const t=C(de);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${Te()}`,r=O("useLayoutItem");_(Yt,{id:n});const o=P(!1);on(()=>o.value=!0),sn(()=>o.value=!1);const{layoutItemStyles:s,layoutItemScrimStyles:a}=t.register(r,{...e,active:g(()=>o.value?!1:e.active.value),id:n});return gt(()=>t.unregister(n)),{layoutItemStyles:s,layoutRect:t.layoutRect,layoutItemScrimStyles:a}}const Gr=(e,t,n,r)=>{let o={top:0,left:0,right:0,bottom:0};const s=[{id:"",layer:{...o}}];for(const a of e){const i=t.get(a),c=n.get(a),u=r.get(a);if(!i||!c||!u)continue;const f={...o,[i.value]:parseInt(o[i.value],10)+(u.value?parseInt(c.value,10):0)};s.push({id:a,layer:f}),o=f}return s};function ms(e){const t=C(de,null),n=g(()=>t?t.rootZIndex.value-100:ct),r=F([]),o=E(new Map),s=E(new Map),a=E(new Map),i=E(new Map),c=E(new Map),{resizeRef:u,contentRect:f}=Ur(),d=g(()=>{const v=new Map,x=e.overlaps??[];for(const y of x.filter(S=>S.includes(":"))){const[S,b]=y.split(":");if(!r.value.includes(S)||!r.value.includes(b))continue;const j=o.get(S),$=o.get(b),X=s.get(S),J=s.get(b);!j||!$||!X||!J||(v.set(b,{position:j.value,amount:parseInt(X.value,10)}),v.set(S,{position:$.value,amount:-parseInt(J.value,10)}))}return v}),m=g(()=>{const v=[...new Set([...a.values()].map(y=>y.value))].sort((y,S)=>y-S),x=[];for(const y of v){const S=r.value.filter(b=>a.get(b)?.value===y);x.push(...S)}return Gr(x,o,s,i)}),p=g(()=>!Array.from(c.values()).some(v=>v.value)),l=g(()=>m.value[m.value.length-1].layer),h=g(()=>({"--v-layout-left":ne(l.value.left),"--v-layout-right":ne(l.value.right),"--v-layout-top":ne(l.value.top),"--v-layout-bottom":ne(l.value.bottom),...p.value?void 0:{transition:"none"}})),w=g(()=>m.value.slice(1).map((v,x)=>{let{id:y}=v;const{layer:S}=m.value[x],b=s.get(y),j=o.get(y);return{id:y,...S,size:Number(b.value),position:j.value}})),Y=v=>w.value.find(x=>x.id===v),H=O("createLayout"),ke=P(!1);rn(()=>{ke.value=!0}),_(de,{register:(v,x)=>{let{id:y,order:S,position:b,layoutSize:j,elementSize:$,active:X,disableTransitions:J,absolute:Wt}=x;a.set(y,S),o.set(y,b),s.set(y,j),i.set(y,X),J&&c.set(y,J);const Pe=ie(Yt,H?.vnode).indexOf(v);Pe>-1?r.value.splice(Pe,0,y):r.value.push(y);const $e=g(()=>w.value.findIndex(q=>q.id===y)),he=g(()=>n.value+m.value.length*2-$e.value*2),zt=g(()=>{const q=b.value==="left"||b.value==="right",pe=b.value==="right",Gt=b.value==="bottom",Ie={[b.value]:0,zIndex:he.value,transform:`translate${q?"X":"Y"}(${(X.value?0:-110)*(pe||Gt?-1:1)}%)`,position:Wt.value||n.value!==ct?"absolute":"fixed",...p.value?void 0:{transition:"none"}};if(!ke.value)return Ie;const M=w.value[$e.value];if(!M)throw new Error(`[Vuetify] Could not find layout item "${y}"`);const ye=d.value.get(y);return ye&&(M[ye.position]+=ye.amount),{...Ie,height:q?`calc(100% - ${M.top}px - ${M.bottom}px)`:$.value?`${$.value}px`:void 0,left:pe?void 0:`${M.left}px`,right:pe?`${M.right}px`:void 0,top:b.value!=="bottom"?`${M.top}px`:void 0,bottom:b.value!=="top"?`${M.bottom}px`:void 0,width:q?$.value?`${$.value}px`:void 0:`calc(100% - ${M.left}px - ${M.right}px)`}}),Ut=g(()=>({zIndex:he.value-1}));return{layoutItemStyles:zt,layoutItemScrimStyles:Ut,zIndex:he}},unregister:v=>{a.delete(v),o.delete(v),s.delete(v),i.delete(v),c.delete(v),r.value=r.value.filter(x=>x!==v)},mainRect:l,mainStyles:h,getLayoutItem:Y,items:w,layoutRect:f,rootZIndex:n});const Ht=g(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),jt=g(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:Ht,layoutStyles:jt,getLayoutItem:Y,items:w,layoutRect:f,layoutRef:u}}function Kr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,r=A(t,n),{aliases:o={},components:s={},directives:a={}}=r,i=Jn(r.defaults),c=Nr(r.display,r.ssr),u=zr(r.theme),f=jr(r.icons),d=ar(r.locale),m=Rr(r.date,d);return{install:l=>{for(const h in a)l.directive(h,a[h]);for(const h in s)l.component(h,s[h]);for(const h in o)l.component(h,te({...o[h],name:h,aliasName:o[h].name}));if(u.install(l),l.provide(K,i),l.provide(Ce,c),l.provide(ee,u),l.provide(Me,f),l.provide(Z,d),l.provide(Lt,m.options),l.provide(nt,m.instance),D&&r.ssr)if(l.$nuxt)l.$nuxt.hook("app:suspense:resolve",()=>{c.update()});else{const{mount:h}=l;l.mount=function(){const w=h(...arguments);return an(()=>c.update()),l.mount=h,w}}Te.reset(),l.mixin({computed:{$vuetify(){return E({defaults:U.call(this,K),display:U.call(this,Ce),theme:U.call(this,ee),icons:U.call(this,Me),locale:U.call(this,Z),date:U.call(this,nt)})}}})},defaults:i,display:c,theme:u,icons:f,locale:d,date:m}}const Zr="3.4.4";Kr.version=Zr;function U(e){const t=this.$,n=t.parent?.provides??t.vnode.appContext?.provides;if(n&&e in n)return n[e]}export{Mn as $,rr as A,ln as B,ds as C,pn as D,Te as E,ao as F,ie as G,Se as H,Yr as I,ss as J,xn as K,Ur as L,wo as M,ho as N,D as O,Le as P,eo as Q,Ho as R,Jr as S,ir as T,so as U,bo as V,vn as W,go as X,te as Y,Po as Z,Qr as _,cs as a,_o as a0,So as a1,Do as a2,xo as a3,Zo as a4,ue as a5,Ao as a6,Co as a7,Et as a8,Ne as a9,yt as aA,to as aB,qr as aC,Ro as aD,Un as aE,Bo as aF,oo as aG,we as aH,yo as aI,Yo as aJ,ko as aK,Go as aL,ts as aM,Qo as aN,es as aO,co as aP,Jo as aQ,fs as aR,lo as aS,He as aT,ro as aU,Vt as aV,it as aW,os as aX,Bt as aY,Kr as aZ,Eo as aa,To as ab,rs as ac,jo as ad,Ko as ae,An as af,Cn as ag,Fe as ah,yn as ai,po as aj,io as ak,Fn as al,vo as am,us as an,Be as ao,ns as ap,no as aq,fo as ar,No as as,ve as at,B as au,Io as av,zn as aw,At as ax,Lo as ay,uo as az,as as b,is as c,ms as d,Xo as e,Oo as f,Ft as g,zo as h,Uo as i,Mo as j,Vo as k,ne as l,Xn as m,Fo as n,O as o,V as p,er as q,mo as r,Wo as s,jn as t,qo as u,$o as v,k as w,_n as x,Sn as y,ls as z};
|
||||
5
qbit/vuetorrent/public/assets/vuetify-i5Qjiq6M.js
Normal file
5
qbit/vuetorrent/public/assets/vuetify-i5Qjiq6M.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import{w as B,o as Kt,e as _t,F as lt,i as Zt,C as Xt,r as F,c as h,a as de,t as ft,b as dt,u as G,d as T,f as M,p as Z,s as I,g as Qt,h as Jt,j as mt,k as qt,l as en,m as E,n as tn,q as gt,v as nn,x as rn,y as on,z as sn,A as an}from"./vue-BSryv7ps.js";function un(e,t){let n;function r(){n=_t(),n.run(()=>t.length?t(()=>{n?.stop(),r()}):t())}B(e,o=>{o&&!n?r():o||(n?.stop(),n=void 0)},{immediate:!0}),Kt(()=>{n?.stop()})}const D=typeof window<"u",co=D&&"IntersectionObserver"in window,cn=D&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),lo=D&&"EyeDropper"in window;function $e(e,t,n){ln(e,t),t.set(e,n)}function ln(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fn(e,t,n){var r=ht(e,t,"set");return dn(e,r,n),n}function dn(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function R(e,t){var n=ht(e,t,"get");return mn(e,n)}function ht(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function mn(e,t){return t.get?t.get.call(e):t.value}function pt(e,t,n){const r=t.length-1;if(r<0)return e===void 0?n:e;for(let o=0;o<r;o++){if(e==null)return n;e=e[t[o]]}return e==null||e[t[r]]===void 0?n:e[t[r]]}function gn(e,t){if(e===t)return!0;if(e instanceof Date&&t instanceof Date&&e.getTime()!==t.getTime()||e!==Object(e)||t!==Object(t))return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>gn(e[r],t[r]))}function be(e,t,n){return e==null||!t||typeof t!="string"?n:e[t]!==void 0?e[t]:(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),pt(e,t.split("."),n))}function fo(e,t,n){if(t===!0)return e===void 0?n:e;if(t==null||typeof t=="boolean")return n;if(e!==Object(e)){if(typeof t!="function")return n;const o=t(e,n);return typeof o>"u"?n:o}if(typeof t=="string")return be(e,t,n);if(Array.isArray(t))return pt(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function yt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function te(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(!(e==null||e===""))return isNaN(+e)?String(e):isFinite(+e)?`${Number(e)}${t}`:void 0}function Re(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Le(e){if(e&&"$el"in e){const t=e.$el;return t?.nodeType===Node.TEXT_NODE?t.nextElementSibling:t}return e}const mo=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16}),go=Object.freeze({enter:"Enter",tab:"Tab",delete:"Delete",esc:"Escape",space:"Space",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",end:"End",home:"Home",del:"Delete",backspace:"Backspace",insert:"Insert",pageup:"PageUp",pagedown:"PageDown",shift:"Shift"});function ho(e){return Object.keys(e)}function ye(e,t){return t.every(n=>e.hasOwnProperty(n))}function hn(e,t){const n={},r=new Set(Object.keys(e));for(const o of t)r.has(o)&&(n[o]=e[o]);return n}function Ne(e,t,n){const r=Object.create(null),o=Object.create(null);for(const s in e)t.some(a=>a instanceof RegExp?a.test(s):a===s)&&!n?.some(a=>a===s)?r[s]=e[s]:o[s]=e[s];return[r,o]}function pn(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}function po(e,t){const n={};return t.forEach(r=>n[r]=e[r]),n}const vt=/^on[^a-z]/,Ae=e=>vt.test(e),yn=["onAfterscriptexecute","onAnimationcancel","onAnimationend","onAnimationiteration","onAnimationstart","onAuxclick","onBeforeinput","onBeforescriptexecute","onChange","onClick","onCompositionend","onCompositionstart","onCompositionupdate","onContextmenu","onCopy","onCut","onDblclick","onFocusin","onFocusout","onFullscreenchange","onFullscreenerror","onGesturechange","onGestureend","onGesturestart","onGotpointercapture","onInput","onKeydown","onKeypress","onKeyup","onLostpointercapture","onMousedown","onMousemove","onMouseout","onMouseover","onMouseup","onMousewheel","onPaste","onPointercancel","onPointerdown","onPointerenter","onPointerleave","onPointermove","onPointerout","onPointerover","onPointerup","onReset","onSelect","onSubmit","onTouchcancel","onTouchend","onTouchmove","onTouchstart","onTransitioncancel","onTransitionend","onTransitionrun","onTransitionstart","onWheel"],vn=["ArrowUp","ArrowDown","ArrowRight","ArrowLeft","Enter","Escape","Tab"," "];function yo(e){return e.isComposing&&vn.includes(e.key)}function vo(e){const[t,n]=Ne(e,[vt]),r=pn(t,yn),[o,s]=Ne(n,["class","style","id",/^data-/]);return Object.assign(o,t),Object.assign(s,r),[o,s]}function bo(e){return e==null?[]:Array.isArray(e)?e:[e]}function wo(e,t){let n=0;const r=function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];clearTimeout(n),n=setTimeout(()=>e(...s),G(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function bn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(t,Math.min(n,e))}function Do(e){const t=e.toString().trim();return t.includes(".")?t.length-t.indexOf(".")-1:0}function Be(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+n.repeat(Math.max(0,t-e.length))}function He(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function wn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const n=[];let r=0;for(;r<e.length;)n.push(e.substr(r,t)),r+=t;return n}function So(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;if(e<t)return`${e} B`;const n=t===1024?["Ki","Mi","Gi"]:["k","M","G"];let r=-1;for(;Math.abs(e)>=t&&r<n.length-1;)e/=t,++r;return`${e.toFixed(1)} ${n[r]}B`}function x(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const o in e)r[o]=e[o];for(const o in t){const s=e[o],a=t[o];if(Re(s)&&Re(a)){r[o]=x(s,a,n);continue}if(Array.isArray(s)&&Array.isArray(a)&&n){r[o]=n(s,a);continue}r[o]=a}return r}function Dn(e){return e.map(t=>t.type===lt?Dn(t.children):t).flat()}function N(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(N.cache.has(e))return N.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return N.cache.set(e,t),t}N.cache=new Map;function ae(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>ae(e,n)).flat(1);if(Array.isArray(t.children))return t.children.map(n=>ae(e,n)).flat(1);if(t.component){if(Object.getOwnPropertySymbols(t.component.provides).includes(e))return[t.component];if(t.component.subTree)return ae(e,t.component.subTree).flat(1)}return[]}var ne=new WeakMap,j=new WeakMap;class xo{constructor(t){$e(this,ne,{writable:!0,value:[]}),$e(this,j,{writable:!0,value:0}),this.size=t}push(t){R(this,ne)[R(this,j)]=t,fn(this,j,(R(this,j)+1)%this.size)}values(){return R(this,ne).slice(R(this,j)).concat(R(this,ne).slice(0,R(this,j)))}}function Co(e){return"touches"in e?{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}:{clientX:e.clientX,clientY:e.clientY}}function Mo(e){const t=F({}),n=h(e);return de(()=>{for(const r in n.value)t[r]=n.value[r]},{flush:"sync"}),ft(t)}function we(e,t){return e.includes(t)}function bt(e){return e[2].toLowerCase()+e.slice(3)}const Ao=()=>[Function,Array];function To(e,t){return t="on"+dt(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function Oo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(Array.isArray(e))for(const o of e)o(...n);else typeof e=="function"&&e(...n)}function Sn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(r=>`${r}${t?':not([tabindex="-1"])':""}:not([disabled])`).join(", ");return[...e.querySelectorAll(n)]}function xn(e,t,n){let r,o=e.indexOf(document.activeElement);const s=t==="next"?1:-1;do o+=s,r=e[o];while((!r||r.offsetParent==null||!(n?.(r)??!0))&&o<e.length&&o>=0);return r}function Cn(e,t){const n=Sn(e);if(!t)(e===document.activeElement||!e.contains(document.activeElement))&&n[0]?.focus();else if(t==="first")n[0]?.focus();else if(t==="last")n.at(-1)?.focus();else if(typeof t=="number")n[t]?.focus();else{const r=xn(n,t);r?r.focus():Cn(e,t==="next"?"first":"last")}}function Fo(e){return e==null||typeof e=="string"&&e.trim()===""}function Eo(){}function ko(e,t){if(!(D&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function Mn(e){return e.some(t=>Zt(t)?t.type===Xt?!1:t.type!==lt||Mn(t.children):!0)?e:null}function Po(e,t){if(!D||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function Io(e,t){const n=e.clientX,r=e.clientY,o=t.getBoundingClientRect(),s=o.left,a=o.top,i=o.right,u=o.bottom;return n>=s&&n<=i&&r>=a&&r<=u}const wt=["top","bottom"],An=["start","end","left","right"];function $o(e,t){let[n,r]=e.split(" ");return r||(r=we(wt,n)?"start":we(An,n)?"top":"center"),{side:Ve(n,t),align:Ve(r,t)}}function Ve(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function Ro(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function Lo(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function No(e){return{side:e.align,align:e.side}}function Bo(e){return we(wt,e.side)?"y":"x"}class ie{constructor(t){let{x:n,y:r,width:o,height:s}=t;this.x=n,this.y=r,this.width=o,this.height=s}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function Ho(e,t){return{x:{before:Math.max(0,t.left-e.left),after:Math.max(0,e.right-t.right)},y:{before:Math.max(0,t.top-e.top),after:Math.max(0,e.bottom-t.bottom)}}}function Vo(e){return Array.isArray(e)?new ie({x:e[0],y:e[1],width:0,height:0}):e.getBoundingClientRect()}function Yo(e){const t=e.getBoundingClientRect(),n=getComputedStyle(e),r=n.transform;if(r){let o,s,a,i,u;if(r.startsWith("matrix3d("))o=r.slice(9,-1).split(/, /),s=+o[0],a=+o[5],i=+o[12],u=+o[13];else if(r.startsWith("matrix("))o=r.slice(7,-1).split(/, /),s=+o[0],a=+o[3],i=+o[4],u=+o[5];else return new ie(t);const c=n.transformOrigin,f=t.x-i-(1-s)*parseFloat(c),l=t.y-u-(1-a)*parseFloat(c.slice(c.indexOf(" ")+1)),m=s?t.width/s:e.offsetWidth+1,p=a?t.height/a:e.offsetHeight+1;return new ie({x:f,y:l,width:m,height:p})}else return new ie(t)}function Wo(e,t,n){if(typeof e.animate>"u")return{finished:Promise.resolve()};let r;try{r=e.animate(t,n)}catch{return{finished:Promise.resolve()}}return typeof r.finished>"u"&&(r.finished=new Promise(o=>{r.onfinish=()=>{o(r)}})),r}const ue=new WeakMap;function jo(e,t){Object.keys(t).forEach(n=>{if(Ae(n)){const r=bt(n),o=ue.get(e);if(t[n]==null)o?.forEach(s=>{const[a,i]=s;a===r&&(e.removeEventListener(r,i),o.delete(s))});else if(!o||![...o].some(s=>s[0]===r&&s[1]===t[n])){e.addEventListener(r,t[n]);const s=o||new Set;s.add([r,t[n]]),ue.has(e)||ue.set(e,s)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function zo(e,t){Object.keys(t).forEach(n=>{if(Ae(n)){const r=bt(n),o=ue.get(e);o?.forEach(s=>{const[a,i]=s;a===r&&(e.removeEventListener(r,i),o.delete(s))})}else e.removeAttribute(n)})}const z=2.4,Ye=.2126729,We=.7151522,je=.072175,Tn=.55,On=.58,Fn=.57,En=.62,re=.03,ze=1.45,kn=5e-4,Pn=1.25,In=1.25,Ue=.078,Ge=12.82051282051282,oe=.06,Ke=.001;function _e(e,t){const n=(e.r/255)**z,r=(e.g/255)**z,o=(e.b/255)**z,s=(t.r/255)**z,a=(t.g/255)**z,i=(t.b/255)**z;let u=n*Ye+r*We+o*je,c=s*Ye+a*We+i*je;if(u<=re&&(u+=(re-u)**ze),c<=re&&(c+=(re-c)**ze),Math.abs(c-u)<kn)return 0;let f;if(c>u){const l=(c**Tn-u**On)*Pn;f=l<Ke?0:l<Ue?l-l*Ge*oe:l-oe}else{const l=(c**En-u**Fn)*In;f=l>-Ke?0:l>-Ue?l-l*Ge*oe:l+oe}return f*100}function Uo(e){}function Go(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const le=.20689655172413793,$n=e=>e>le**3?Math.cbrt(e):e/(3*le**2)+4/29,Rn=e=>e>le?e**3:3*le**2*(e-4/29);function Dt(e){const t=$n,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function St(e){const t=Rn,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const Ln=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],Nn=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,Bn=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],Hn=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function xt(e){const t=Array(3),n=Nn,r=Ln;for(let o=0;o<3;++o)t[o]=Math.round(bn(n(r[o][0]*e[0]+r[o][1]*e[1]+r[o][2]*e[2]))*255);return{r:t[0],g:t[1],b:t[2]}}function Te(e){let{r:t,g:n,b:r}=e;const o=[0,0,0],s=Hn,a=Bn;t=s(t/255),n=s(n/255),r=s(r/255);for(let i=0;i<3;++i)o[i]=a[i][0]*t+a[i][1]*n+a[i][2]*r;return o}function Vn(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function Ko(e){return Vn(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const Ze=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,Yn={rgb:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),rgba:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),hsl:(e,t,n,r)=>Xe({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>Xe({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>H({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>H({h:e,s:t,v:n,a:r})};function k(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&Ze.test(e)){const{groups:t}=e.match(Ze),{fn:n,values:r}=t,o=r.split(/,\s*/).map(s=>s.endsWith("%")&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(s)/100:parseFloat(s));return Yn[n](...o)}else if(typeof e=="string"){let t=e.startsWith("#")?e.slice(1):e;return[3,4].includes(t.length)?t=t.split("").map(n=>n+n).join(""):[6,8].includes(t.length),At(t)}else if(typeof e=="object"){if(ye(e,["r","g","b"]))return e;if(ye(e,["h","s","l"]))return H(Ct(e));if(ye(e,["h","s","v"]))return H(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
|
||||
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function H(e){const{h:t,s:n,v:r,a:o}=e,s=i=>{const u=(i+t/60)%6;return r-r*n*Math.max(Math.min(u,4-u,1),0)},a=[s(5),s(3),s(1)].map(i=>Math.round(i*255));return{r:a[0],g:a[1],b:a[2],a:o}}function Xe(e){return H(Ct(e))}function Wn(e){if(!e)return{h:0,s:1,v:1,a:1};const t=e.r/255,n=e.g/255,r=e.b/255,o=Math.max(t,n,r),s=Math.min(t,n,r);let a=0;o!==s&&(o===t?a=60*(0+(n-r)/(o-s)):o===n?a=60*(2+(r-t)/(o-s)):o===r&&(a=60*(4+(t-n)/(o-s)))),a<0&&(a=a+360);const i=o===0?0:(o-s)/o,u=[a,i,o];return{h:u[0],s:u[1],v:u[2],a:e.a}}function _o(e){const{h:t,s:n,v:r,a:o}=e,s=r-r*n/2,a=s===1||s===0?0:(r-s)/Math.min(s,1-s);return{h:t,s:a,l:s,a:o}}function Ct(e){const{h:t,s:n,l:r,a:o}=e,s=r+n*Math.min(r,1-r),a=s===0?0:2-2*r/s;return{h:t,s:a,v:s,a:o}}function jn(e){let{r:t,g:n,b:r,a:o}=e;return o===void 0?`rgb(${t}, ${n}, ${r})`:`rgba(${t}, ${n}, ${r}, ${o})`}function Zo(e){return jn(H(e))}function se(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function Mt(e){let{r:t,g:n,b:r,a:o}=e;return`#${[se(t),se(n),se(r),o!==void 0?se(Math.round(o*255)):""].join("")}`}function At(e){e=zn(e);let[t,n,r,o]=wn(e,2).map(s=>parseInt(s,16));return o=o===void 0?o:o/255,{r:t,g:n,b:r,a:o}}function Xo(e){const t=At(e);return Wn(t)}function Qo(e){return Mt(H(e))}function zn(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(t=>t+t).join("")),e.length!==6&&(e=Be(Be(e,6),8,"F")),e}function Un(e,t){const n=Dt(Te(e));return n[0]=n[0]+t*10,xt(St(n))}function Gn(e,t){const n=Dt(Te(e));return n[0]=n[0]-t*10,xt(St(n))}function De(e){const t=k(e);return Te(t)[1]}function Jo(e,t){const n=De(e),r=De(t),o=Math.max(n,r),s=Math.min(n,r);return(o+.05)/(s+.05)}function Kn(e){const t=Math.abs(_e(k(0),k(e)));return Math.abs(_e(k(16777215),k(e)))>Math.min(t,50)?"#fff":"#000"}function V(e,t){return n=>Object.keys(e).reduce((r,o)=>{const a=typeof e[o]=="object"&&e[o]!=null&&!Array.isArray(e[o])?e[o]:{type:e[o]};return n&&o in n?r[o]={...a,default:n[o]}:r[o]=a,t&&!r[o].source&&(r[o].source=t),r},{})}const _n=V({class:[String,Array],style:{type:[String,Array,Object],default:null}},"component"),K=Symbol.for("vuetify:defaults");function Zn(e){return T(e)}function Oe(){const e=M(K);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function qo(e,t){const n=Oe(),r=T(e),o=h(()=>{if(G(t?.disabled))return n.value;const a=G(t?.scoped),i=G(t?.reset),u=G(t?.root);if(r.value==null&&!(a||i||u))return n.value;let c=x(r.value,{prev:n.value});if(a)return c;if(i||u){const f=Number(i||1/0);for(let l=0;l<=f&&!(!c||!("prev"in c));l++)c=c.prev;return c&&typeof u=="string"&&u in c&&(c=x(x(c,{prev:c}),c[u])),c}return c.prev?x(c.prev,c):c});return Z(K,o),o}function Xn(e,t){return typeof e.props?.[t]<"u"||typeof e.props?.[N(t)]<"u"}function Qn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Oe();const r=O("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const o=h(()=>n.value?.[e._as??t]),s=new Proxy(e,{get(u,c){const f=Reflect.get(u,c);return c==="class"||c==="style"?[o.value?.[c],f].filter(l=>l!=null):typeof c=="string"&&!Xn(r.vnode,c)?o.value?.[c]??n.value?.global?.[c]??f:f}}),a=I();de(()=>{if(o.value){const u=Object.entries(o.value).filter(c=>{let[f]=c;return f.startsWith(f[0].toUpperCase())});a.value=u.length?Object.fromEntries(u):void 0}else a.value=void 0});function i(){const u=er(K,r);Z(K,h(()=>a.value?x(u?.value??{},a.value):u?.value))}return{props:s,provideSubDefaults:i}}function ee(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=V(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return hn(r,t)},e.props._as=String,e.setup=function(r,o){const s=Oe();if(!s.value)return e._setup(r,o);const{props:a,provideSubDefaults:i}=Qn(r,r._as??e.name,s),u=e._setup(a,o);return i(),u}}return e}function Tt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?ee:Qt)(t)}function es(e,t){return t.props=e,t}function ts(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return Tt()({name:n??dt(Jt(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},..._n()},setup(r,o){let{slots:s}=o;return()=>mt(r.tag,{class:[e,r.class],style:r.style},s.default?.())}})}function ns(e){if(typeof e.getRootNode!="function"){for(;e.parentNode;)e=e.parentNode;return e!==document?null:document}const t=e.getRootNode();return t!==document&&t.getRootNode({composed:!0})!==document?null:t}const rs="cubic-bezier(0.4, 0, 0.2, 1)",os="cubic-bezier(0.0, 0, 0.2, 1)",ss="cubic-bezier(0.4, 0, 1, 1)";function as(e,t,n){return Object.keys(e).filter(r=>Ae(r)&&r.endsWith(t)).reduce((r,o)=>(r[o.slice(0,-t.length)]=s=>e[o](s,n(s)),r),{})}function O(e,t){const n=qt();if(!n)throw new Error(`[Vuetify] ${e} ${t||"must be called from inside a setup function"}`);return n}function Jn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=O(e).type;return N(t?.aliasName||t?.name)}let Ot=0,ce=new WeakMap;function Fe(){const e=O("getUid");if(ce.has(e))return ce.get(e);{const t=Ot++;return ce.set(e,t),t}}Fe.reset=()=>{Ot=0,ce=new WeakMap};function is(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?qn(e):Ft(e))return e;e=e.parentElement}return document.scrollingElement}function us(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(Ft(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function Ft(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"&&e.scrollHeight>e.clientHeight}function qn(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function er(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}function cs(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function ls(e){const t=O("useRender");t.render=e}function tr(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:l=>l,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:l=>l;const s=O("useProxiedModel"),a=T(e[t]!==void 0?e[t]:n),i=N(t),c=i!==t?h(()=>(e[t],!!((s.vnode.props?.hasOwnProperty(t)||s.vnode.props?.hasOwnProperty(i))&&(s.vnode.props?.hasOwnProperty(`onUpdate:${t}`)||s.vnode.props?.hasOwnProperty(`onUpdate:${i}`))))):h(()=>(e[t],!!(s.vnode.props?.hasOwnProperty(t)&&s.vnode.props?.hasOwnProperty(`onUpdate:${t}`))));un(()=>!c.value,()=>{B(()=>e[t],l=>{a.value=l})});const f=h({get(){const l=e[t];return r(c.value?l:a.value)},set(l){const m=o(l),p=en(c.value?e[t]:a.value);p===m||r(p)===l||(a.value=m,s?.emit(`update:${t}`,m))}});return Object.defineProperty(f,"externalValue",{get:()=>c.value?e[t]:a.value}),f}const nr={badge:"Badge",open:"Open",close:"Close",confirmEdit:{ok:"OK",cancel:"Cancel"},dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{itemsSelected:"{0} selected",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more",today:"Today"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action",otp:"Please enter OTP character {0}"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},timePicker:{am:"AM",pm:"PM",title:"Select Time"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"}},Qe="$vuetify.",Je=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[+r])),Et=(e,t,n)=>function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];if(!r.startsWith(Qe))return Je(r,s);const i=r.replace(Qe,""),u=e.value&&n.value[e.value],c=t.value&&n.value[t.value];let f=be(u,i,null);return f||(`${r}${e.value}`,f=be(c,i,null)),f||(f=r),typeof f!="string"&&(f=r),Je(f,s)};function kt(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function ve(e,t,n){const r=tr(e,t,e[t]??n.value);return r.value=e[t]??n.value,B(n,o=>{e[t]==null&&(r.value=n.value)}),r}function Pt(e){return t=>{const n=ve(t,"locale",e.current),r=ve(t,"fallback",e.fallback),o=ve(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:o,t:Et(n,r,o),n:kt(n,r),provide:Pt({current:n,fallback:r,messages:o})}}}function rr(e){const t=I(e?.locale??"en"),n=I(e?.fallback??"en"),r=T({en:nr,...e?.messages});return{name:"vuetify",current:t,fallback:n,messages:r,t:Et(t,n,r),n:kt(t,n),provide:Pt({current:t,fallback:n,messages:r})}}const _=Symbol.for("vuetify:locale");function or(e){return e.name!=null}function sr(e){const t=e?.adapter&&or(e?.adapter)?e?.adapter:rr(e),n=ur(t,e);return{...t,...n}}function ar(){const e=M(_);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function fs(e){const t=M(_);if(!t)throw new Error("[Vuetify] Could not find injected locale instance");const n=t.provide(e),r=cr(n,t.rtl,e),o={...n,...r};return Z(_,o),o}function ir(){return{af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,km:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1}}function ur(e,t){const n=T(t?.rtl??ir()),r=h(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:h(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function cr(e,t,n){const r=h(()=>n.rtl??t.value[e.current.value]??!1);return{isRtl:r,rtl:t,rtlClasses:h(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function ds(){const e=M(_);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const Se={"001":1,AD:1,AE:6,AF:6,AG:0,AI:1,AL:1,AM:1,AN:1,AR:1,AS:0,AT:1,AU:1,AX:1,AZ:1,BA:1,BD:0,BE:1,BG:1,BH:6,BM:1,BN:1,BR:0,BS:0,BT:0,BW:0,BY:1,BZ:0,CA:0,CH:1,CL:1,CM:1,CN:1,CO:0,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:0,DO:0,DZ:6,EC:1,EE:1,EG:6,ES:1,ET:0,FI:1,FJ:1,FO:1,FR:1,GB:1,"GB-alt-variant":0,GE:1,GF:1,GP:1,GR:1,GT:0,GU:0,HK:0,HN:0,HR:1,HU:1,ID:0,IE:1,IL:0,IN:0,IQ:6,IR:6,IS:1,IT:1,JM:0,JO:6,JP:0,KE:0,KG:1,KH:0,KR:0,KW:6,KZ:1,LA:0,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MH:0,MK:1,MM:0,MN:1,MO:0,MQ:1,MT:0,MV:5,MX:0,MY:1,MZ:0,NI:0,NL:1,NO:1,NP:0,NZ:1,OM:6,PA:0,PE:0,PH:0,PK:0,PL:1,PR:0,PT:0,PY:0,QA:6,RE:1,RO:1,RS:1,RU:1,SA:0,SD:6,SE:1,SG:0,SI:1,SK:1,SM:1,SV:0,SY:6,TH:0,TJ:1,TM:1,TR:1,TT:0,TW:0,UA:1,UM:0,US:0,UY:1,UZ:1,VA:1,VE:0,VI:0,VN:1,WS:0,XK:1,YE:0,ZA:0,ZW:0};function lr(e,t){const n=[];let r=[];const o=It(e),s=$t(e),a=(o.getDay()-Se[t.slice(-2).toUpperCase()]+7)%7,i=(s.getDay()-Se[t.slice(-2).toUpperCase()]+7)%7;for(let u=0;u<a;u++){const c=new Date(o);c.setDate(c.getDate()-(a-u)),r.push(c)}for(let u=1;u<=s.getDate();u++){const c=new Date(e.getFullYear(),e.getMonth(),u);r.push(c),r.length===7&&(n.push(r),r=[])}for(let u=1;u<7-i;u++){const c=new Date(s);c.setDate(c.getDate()+u),r.push(c)}return r.length>0&&n.push(r),n}function fr(e){const t=new Date(e);for(;t.getDay()!==0;)t.setDate(t.getDate()-1);return t}function dr(e){const t=new Date(e);for(;t.getDay()!==6;)t.setDate(t.getDate()+1);return t}function It(e){return new Date(e.getFullYear(),e.getMonth(),1)}function $t(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function mr(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const gr=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function Rt(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(gr.test(e))return mr(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const qe=new Date(2e3,0,2);function hr(e){const t=Se[e.slice(-2).toUpperCase()];return yt(7).map(n=>{const r=new Date(qe);return r.setDate(qe.getDate()+t+n),new Intl.DateTimeFormat(e,{weekday:"narrow"}).format(r)})}function pr(e,t,n,r){const o=Rt(e)??new Date,s=r?.[t];if(typeof s=="function")return s(o,t,n);let a={};switch(t){case"fullDateWithWeekday":a={weekday:"long",day:"numeric",month:"long",year:"numeric"};break;case"hours12h":a={hour:"numeric",hour12:!0};break;case"normalDateWithWeekday":a={weekday:"short",day:"numeric",month:"short"};break;case"keyboardDate":a={day:"2-digit",month:"2-digit",year:"numeric"};break;case"monthAndDate":a={month:"long",day:"numeric"};break;case"monthAndYear":a={month:"long",year:"numeric"};break;case"month":a={month:"long"};break;case"monthShort":a={month:"short"};break;case"dayOfMonth":return new Intl.NumberFormat(n).format(o.getDate());case"shortDate":a={year:"2-digit",month:"numeric",day:"numeric"};break;case"weekdayShort":a={weekday:"short"};break;case"year":a={year:"numeric"};break;default:a=s??{timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(n,a).format(o)}function yr(e,t){const n=e.toJsDate(t),r=n.getFullYear(),o=He(String(n.getMonth()+1),2,"0"),s=He(String(n.getDate()),2,"0");return`${r}-${o}-${s}`}function vr(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function br(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function wr(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function Dr(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function Sr(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function xr(e,t){const n=new Date(e);return n.setMonth(n.getMonth()+t),n}function Cr(e){return e.getFullYear()}function Mr(e){return e.getMonth()}function Ar(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function Tr(e){return e.getHours()}function Or(e){return e.getMinutes()}function Fr(e){return new Date(e.getFullYear(),0,1)}function Er(e){return new Date(e.getFullYear(),11,31)}function kr(e,t){return xe(e,t[0])&&Ir(e,t[1])}function Pr(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function xe(e,t){return e.getTime()>t.getTime()}function Ir(e,t){return e.getTime()<t.getTime()}function et(e,t){return e.getTime()===t.getTime()}function $r(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Rr(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Lr(e,t,n){const r=new Date(e),o=new Date(t);switch(n){case"years":return r.getFullYear()-o.getFullYear();case"quarters":return Math.floor((r.getMonth()-o.getMonth()+(r.getFullYear()-o.getFullYear())*12)/4);case"months":return r.getMonth()-o.getMonth()+(r.getFullYear()-o.getFullYear())*12;case"weeks":return Math.floor((r.getTime()-o.getTime())/(1e3*60*60*24*7));case"days":return Math.floor((r.getTime()-o.getTime())/(1e3*60*60*24));case"hours":return Math.floor((r.getTime()-o.getTime())/(1e3*60*60));case"minutes":return Math.floor((r.getTime()-o.getTime())/(1e3*60));case"seconds":return Math.floor((r.getTime()-o.getTime())/1e3);default:return r.getTime()-o.getTime()}}function Nr(e,t){const n=new Date(e);return n.setHours(t),n}function Br(e,t){const n=new Date(e);return n.setMinutes(t),n}function Hr(e,t){const n=new Date(e);return n.setMonth(t),n}function Vr(e,t){const n=new Date(e);return n.setFullYear(t),n}function Yr(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function Wr(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class jr{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return Rt(t)}toJsDate(t){return t}toISO(t){return yr(this,t)}parseISO(t){return vr(t)}addMinutes(t,n){return br(t,n)}addHours(t,n){return wr(t,n)}addDays(t,n){return Dr(t,n)}addWeeks(t,n){return Sr(t,n)}addMonths(t,n){return xr(t,n)}getWeekArray(t){return lr(t,this.locale)}startOfWeek(t){return fr(t)}endOfWeek(t){return dr(t)}startOfMonth(t){return It(t)}endOfMonth(t){return $t(t)}format(t,n){return pr(t,n,this.locale,this.formats)}isEqual(t,n){return et(t,n)}isValid(t){return Pr(t)}isWithinRange(t,n){return kr(t,n)}isAfter(t,n){return xe(t,n)}isBefore(t,n){return!xe(t,n)&&!et(t,n)}isSameDay(t,n){return $r(t,n)}isSameMonth(t,n){return Rr(t,n)}setMinutes(t,n){return Br(t,n)}setHours(t,n){return Nr(t,n)}setMonth(t,n){return Hr(t,n)}setYear(t,n){return Vr(t,n)}getDiff(t,n,r){return Lr(t,n,r)}getWeekdays(){return hr(this.locale)}getYear(t){return Cr(t)}getMonth(t){return Mr(t)}getNextMonth(t){return Ar(t)}getHours(t){return Tr(t)}getMinutes(t){return Or(t)}startOfDay(t){return Yr(t)}endOfDay(t){return Wr(t)}startOfYear(t){return Fr(t)}endOfYear(t){return Er(t)}}const Lt=Symbol.for("vuetify:date-options"),tt=Symbol.for("vuetify:date-adapter");function zr(e,t){const n=x({adapter:jr,locale:{af:"af-ZA",bg:"bg-BG",ca:"ca-ES",ckb:"",cs:"cs-CZ",de:"de-DE",el:"el-GR",en:"en-US",et:"et-EE",fa:"fa-IR",fi:"fi-FI",hr:"hr-HR",hu:"hu-HU",he:"he-IL",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",lt:"lt-LT",nl:"nl-NL",no:"no-NO",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",srCyrl:"sr-SP",srLatn:"sr-SP",sv:"sv-SE",th:"th-TH",tr:"tr-TR",az:"az-AZ",uk:"uk-UA",vi:"vi-VN",zhHans:"zh-CN",zhHant:"zh-TW"}},e);return{options:n,instance:Nt(n,t)}}function Nt(e,t){const n=F(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return B(t.current,r=>{n.locale=e.locale[r]??r??n.locale}),n}function ms(){const e=M(Lt);if(!e)throw new Error("[Vuetify] Could not find injected date options");const t=ar();return Nt(e,t)}function gs(e,t){const n=e.toJsDate(t);let r=n.getFullYear(),o=new Date(r,0,1);if(n<o)r=r-1,o=new Date(r,0,1);else{const i=new Date(r+1,0,1);n>=i&&(r=r+1,o=i)}const s=Math.abs(n.getTime()-o.getTime()),a=Math.ceil(s/(1e3*60*60*24));return Math.floor(a/7)+1}const hs=["sm","md","lg","xl","xxl"],Ce=Symbol.for("vuetify:display"),nt={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},Ur=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nt;return x(nt,e)};function rt(e){return D&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function ot(e){return D&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function st(e){const t=D&&!e?window.navigator.userAgent:"ssr";function n(d){return!!t.match(d)}const r=n(/android/i),o=n(/iphone|ipad|ipod/i),s=n(/cordova/i),a=n(/electron/i),i=n(/chrome/i),u=n(/edge/i),c=n(/firefox/i),f=n(/opera/i),l=n(/win/i),m=n(/mac/i),p=n(/linux/i);return{android:r,ios:o,cordova:s,electron:a,chrome:i,edge:u,firefox:c,opera:f,win:l,mac:m,linux:p,touch:cn,ssr:t==="ssr"}}function Gr(e,t){const{thresholds:n,mobileBreakpoint:r}=Ur(e),o=I(ot(t)),s=I(st(t)),a=F({}),i=I(rt(t));function u(){o.value=ot(),i.value=rt()}function c(){u(),s.value=st()}return de(()=>{const f=i.value<n.sm,l=i.value<n.md&&!f,m=i.value<n.lg&&!(l||f),p=i.value<n.xl&&!(m||l||f),d=i.value<n.xxl&&!(p||m||l||f),g=i.value>=n.xxl,y=f?"xs":l?"sm":m?"md":p?"lg":d?"xl":"xxl",P=typeof r=="number"?r:n[r],Y=i.value<P;a.xs=f,a.sm=l,a.md=m,a.lg=p,a.xl=d,a.xxl=g,a.smAndUp=!f,a.mdAndUp=!(f||l),a.lgAndUp=!(f||l||m),a.xlAndUp=!(f||l||m||p),a.smAndDown=!(m||p||d||g),a.mdAndDown=!(p||d||g),a.lgAndDown=!(d||g),a.xlAndDown=!g,a.name=y,a.height=o.value,a.width=i.value,a.mobile=Y,a.mobileBreakpoint=r,a.platform=s.value,a.thresholds=n}),D&&window.addEventListener("resize",u,{passive:!0}),{...ft(a),update:c,ssr:!!t}}const ps=V({mobileBreakpoint:[Number,String]},"display");function ys(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jn();const n=M(Ce);if(!n)throw new Error("Could not find Vuetify display injection");const r=h(()=>{if(!e.mobileBreakpoint)return n.mobile.value;const s=typeof e.mobileBreakpoint=="number"?e.mobileBreakpoint:n.thresholds.value[e.mobileBreakpoint];return n.width.value<s}),o=h(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:o,mobile:r}}const Kr=Symbol.for("vuetify:goto");function _r(){return{container:void 0,duration:300,layout:!1,offset:0,easing:"easeInOutCubic",patterns:{linear:e=>e,easeInQuad:e=>e**2,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e**2:-1+(4-2*e)*e,easeInCubic:e=>e**3,easeOutCubic:e=>--e**3+1,easeInOutCubic:e=>e<.5?4*e**3:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e**4,easeOutQuart:e=>1- --e**4,easeInOutQuart:e=>e<.5?8*e**4:1-8*--e**4,easeInQuint:e=>e**5,easeOutQuint:e=>1+--e**5,easeInOutQuint:e=>e<.5?16*e**5:1+16*--e**5}}}function Zr(e,t){return{rtl:t.isRtl,options:x(_r(),e)}}const Xr={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar",treeviewCollapse:"mdi-menu-down",treeviewExpand:"mdi-menu-right",eyeDropper:"mdi-eyedropper"},Qr={component:e=>mt(Ht,{...e,class:"mdi"})},Jr=[String,Function,Object,Array],Me=Symbol.for("vuetify:icons"),me=V({icon:{type:Jr},tag:{type:String,required:!0}},"icon"),at=Tt()({name:"VComponentIcon",props:me(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return E(e.tag,null,{default:()=>[e.icon?E(r,null,null):n.default?.()]})}}}),Bt=ee({name:"VSvgIcon",inheritAttrs:!1,props:me(),setup(e,t){let{attrs:n}=t;return()=>E(e.tag,tn(n,{style:null}),{default:()=>[E("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(r=>Array.isArray(r)?E("path",{d:r[0],"fill-opacity":r[1]},null):E("path",{d:r},null)):E("path",{d:e.icon},null)])]})}}),vs=ee({name:"VLigatureIcon",props:me(),setup(e){return()=>E(e.tag,null,{default:()=>[e.icon]})}}),Ht=ee({name:"VClassIcon",props:me(),setup(e){return()=>E(e.tag,{class:e.icon},null)}});function qr(){return{svg:{component:Bt},class:{component:Ht}}}function eo(e){const t=qr(),n=e?.defaultSet??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=Qr),x({defaultSet:n,sets:t,aliases:{...Xr,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z"}},e)}const bs=e=>{const t=M(Me);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:h(()=>{const r=G(e);if(!r)return{component:at};let o=r;if(typeof o=="string"&&(o=o.trim(),o.startsWith("$")&&(o=t.aliases?.[o.slice(1)])),!o)throw new Error(`Could not find aliased icon "${r}"`);if(Array.isArray(o))return{component:Bt,icon:o};if(typeof o!="string")return{component:at,icon:o};const s=Object.keys(t.sets).find(u=>typeof o=="string"&&o.startsWith(`${u}:`)),a=s?o.slice(s.length+1):o;return{component:t.sets[s??t.defaultSet].component,icon:a}})}},q=Symbol.for("vuetify:theme"),ws=V({theme:String},"theme");function it(){return{defaultTheme:"light",variations:{colors:[],lighten:0,darken:0},themes:{light:{dark:!1,colors:{background:"#FFFFFF",surface:"#FFFFFF","surface-bright":"#FFFFFF","surface-light":"#EEEEEE","surface-variant":"#424242","on-surface-variant":"#EEEEEE",primary:"#1867C0","primary-darken-1":"#1F5592",secondary:"#48A9A6","secondary-darken-1":"#018786",error:"#B00020",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#000000","border-opacity":.12,"high-emphasis-opacity":.87,"medium-emphasis-opacity":.6,"disabled-opacity":.38,"idle-opacity":.04,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.12,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-bright":"#ccbfd6","surface-light":"#424242","surface-variant":"#a3a3a3","on-surface-variant":"#424242",primary:"#2196F3","primary-darken-1":"#277CC1",secondary:"#54B6B2","secondary-darken-1":"#48A9A6",error:"#CF6679",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#FFFFFF","border-opacity":.12,"high-emphasis-opacity":1,"medium-emphasis-opacity":.7,"disabled-opacity":.5,"idle-opacity":.1,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.16,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}}}}function to(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:it();const t=it();if(!e)return{...t,isDisabled:!0};const n={};for(const[r,o]of Object.entries(e.themes??{})){const s=o.dark||r==="dark"?t.themes?.dark:t.themes?.light;n[r]=x(s,o)}return x(t,{...e,themes:n})}function no(e){const t=to(e),n=T(t.defaultTheme),r=T(t.themes),o=h(()=>{const f={};for(const[l,m]of Object.entries(r.value)){const p=f[l]={...m,colors:{...m.colors}};if(t.variations)for(const d of t.variations.colors){const g=p.colors[d];if(g)for(const y of["lighten","darken"]){const P=y==="lighten"?Un:Gn;for(const Y of yt(t.variations[y],1))p.colors[`${d}-${y}-${Y}`]=Mt(P(k(g),Y))}}for(const d of Object.keys(p.colors)){if(/^on-[a-z]/.test(d)||p.colors[`on-${d}`])continue;const g=`on-${d}`,y=k(p.colors[d]);p.colors[g]=Kn(y)}}return f}),s=h(()=>o.value[n.value]),a=h(()=>{const f=[];s.value?.dark&&L(f,":root",["color-scheme: dark"]),L(f,":root",ut(s.value));for(const[d,g]of Object.entries(o.value))L(f,`.v-theme--${d}`,[`color-scheme: ${g.dark?"dark":"normal"}`,...ut(g)]);const l=[],m=[],p=new Set(Object.values(o.value).flatMap(d=>Object.keys(d.colors)));for(const d of p)/^on-[a-z]/.test(d)?L(m,`.${d}`,[`color: rgb(var(--v-theme-${d})) !important`]):(L(l,`.bg-${d}`,[`--v-theme-overlay-multiplier: var(--v-theme-${d}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${d})) !important`,`color: rgb(var(--v-theme-on-${d})) !important`]),L(m,`.text-${d}`,[`color: rgb(var(--v-theme-${d})) !important`]),L(m,`.border-${d}`,[`--v-border-color: var(--v-theme-${d})`]));return f.push(...l,...m),f.map((d,g)=>g===0?d:` ${d}`).join("")});function i(){return{style:[{children:a.value,id:"vuetify-theme-stylesheet",nonce:t.cspNonce||!1}]}}function u(f){if(t.isDisabled)return;const l=f._context.provides.usehead;if(l)if(l.push){const m=l.push(i);D&&B(a,()=>{m.patch(i)})}else D?(l.addHeadObjs(h(i)),de(()=>l.updateDOM())):l.addHeadObjs(i());else{let p=function(){if(typeof document<"u"&&!m){const d=document.createElement("style");d.type="text/css",d.id="vuetify-theme-stylesheet",t.cspNonce&&d.setAttribute("nonce",t.cspNonce),m=d,document.head.appendChild(m)}m&&(m.innerHTML=a.value)},m=D?document.getElementById("vuetify-theme-stylesheet"):null;D?B(a,p,{immediate:!0}):p()}}const c=h(()=>t.isDisabled?void 0:`v-theme--${n.value}`);return{install:u,isDisabled:t.isDisabled,name:n,themes:r,current:s,computedThemes:o,themeClasses:c,styles:a,global:{name:n,current:s}}}function Ds(e){O("provideTheme");const t=M(q,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=h(()=>e.theme??t.name.value),r=h(()=>t.themes.value[n.value]),o=h(()=>t.isDisabled?void 0:`v-theme--${n.value}`),s={...t,name:n,current:r,themeClasses:o};return Z(q,s),s}function Ss(){O("useTheme");const e=M(q,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function L(e,t,n){e.push(`${t} {
|
||||
`,...n.map(r=>` ${r};
|
||||
`),`}
|
||||
`)}function ut(e){const t=e.dark?2:1,n=e.dark?1:2,r=[];for(const[o,s]of Object.entries(e.colors)){const a=k(s);r.push(`--v-theme-${o}: ${a.r},${a.g},${a.b}`),o.startsWith("on-")||r.push(`--v-theme-${o}-overlay-multiplier: ${De(s)>.18?t:n}`)}for(const[o,s]of Object.entries(e.variables)){const a=typeof s=="string"&&s.startsWith("#")?k(s):void 0,i=a?`${a.r}, ${a.g}, ${a.b}`:void 0;r.push(`--v-${o}: ${i??s}`)}return r}function ro(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=T(),r=T();if(D){const o=new ResizeObserver(s=>{e?.(s,o),s.length&&(t==="content"?r.value=s[0].contentRect:r.value=s[0].target.getBoundingClientRect())});gt(()=>{o.disconnect()}),B(n,(s,a)=>{a&&(o.unobserve(Le(a)),r.value=void 0),s&&o.observe(Le(s))},{flush:"post"})}return{resizeRef:n,contentRect:nn(r)}}const fe=Symbol.for("vuetify:layout"),Vt=Symbol.for("vuetify:layout-item"),ct=1e3,xs=V({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),Cs=V({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function Ms(){const e=M(fe);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function As(e){const t=M(fe);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${Fe()}`,r=O("useLayoutItem");Z(Vt,{id:n});const o=I(!1);on(()=>o.value=!0),sn(()=>o.value=!1);const{layoutItemStyles:s,layoutItemScrimStyles:a}=t.register(r,{...e,active:h(()=>o.value?!1:e.active.value),id:n});return gt(()=>t.unregister(n)),{layoutItemStyles:s,layoutRect:t.layoutRect,layoutItemScrimStyles:a}}const oo=(e,t,n,r)=>{let o={top:0,left:0,right:0,bottom:0};const s=[{id:"",layer:{...o}}];for(const a of e){const i=t.get(a),u=n.get(a),c=r.get(a);if(!i||!u||!c)continue;const f={...o,[i.value]:parseInt(o[i.value],10)+(c.value?parseInt(u.value,10):0)};s.push({id:a,layer:f}),o=f}return s};function Ts(e){const t=M(fe,null),n=h(()=>t?t.rootZIndex.value-100:ct),r=T([]),o=F(new Map),s=F(new Map),a=F(new Map),i=F(new Map),u=F(new Map),{resizeRef:c,contentRect:f}=ro(),l=h(()=>{const b=new Map,C=e.overlaps??[];for(const v of C.filter(S=>S.includes(":"))){const[S,w]=v.split(":");if(!r.value.includes(S)||!r.value.includes(w))continue;const W=o.get(S),$=o.get(w),X=s.get(S),Q=s.get(w);!W||!$||!X||!Q||(b.set(w,{position:W.value,amount:parseInt(X.value,10)}),b.set(S,{position:$.value,amount:-parseInt(Q.value,10)}))}return b}),m=h(()=>{const b=[...new Set([...a.values()].map(v=>v.value))].sort((v,S)=>v-S),C=[];for(const v of b){const S=r.value.filter(w=>a.get(w)?.value===v);C.push(...S)}return oo(C,o,s,i)}),p=h(()=>!Array.from(u.values()).some(b=>b.value)),d=h(()=>m.value[m.value.length-1].layer),g=h(()=>({"--v-layout-left":te(d.value.left),"--v-layout-right":te(d.value.right),"--v-layout-top":te(d.value.top),"--v-layout-bottom":te(d.value.bottom),...p.value?void 0:{transition:"none"}})),y=h(()=>m.value.slice(1).map((b,C)=>{let{id:v}=b;const{layer:S}=m.value[C],w=s.get(v),W=o.get(v);return{id:v,...S,size:Number(w.value),position:W.value}})),P=b=>y.value.find(C=>C.id===b),Y=O("createLayout"),Ee=I(!1);rn(()=>{Ee.value=!0}),Z(fe,{register:(b,C)=>{let{id:v,order:S,position:w,layoutSize:W,elementSize:$,active:X,disableTransitions:Q,absolute:jt}=C;a.set(v,S),o.set(v,w),s.set(v,W),i.set(v,X),Q&&u.set(v,Q);const ke=ae(Vt,Y?.vnode).indexOf(b);ke>-1?r.value.splice(ke,0,v):r.value.push(v);const Pe=h(()=>y.value.findIndex(J=>J.id===v)),ge=h(()=>n.value+m.value.length*2-Pe.value*2),zt=h(()=>{const J=w.value==="left"||w.value==="right",he=w.value==="right",Gt=w.value==="bottom",Ie={[w.value]:0,zIndex:ge.value,transform:`translate${J?"X":"Y"}(${(X.value?0:-110)*(he||Gt?-1:1)}%)`,position:jt.value||n.value!==ct?"absolute":"fixed",...p.value?void 0:{transition:"none"}};if(!Ee.value)return Ie;const A=y.value[Pe.value];if(!A)throw new Error(`[Vuetify] Could not find layout item "${v}"`);const pe=l.value.get(v);return pe&&(A[pe.position]+=pe.amount),{...Ie,height:J?`calc(100% - ${A.top}px - ${A.bottom}px)`:$.value?`${$.value}px`:void 0,left:he?void 0:`${A.left}px`,right:he?`${A.right}px`:void 0,top:w.value!=="bottom"?`${A.top}px`:void 0,bottom:w.value!=="top"?`${A.bottom}px`:void 0,width:J?$.value?`${$.value}px`:void 0:`calc(100% - ${A.left}px - ${A.right}px)`}}),Ut=h(()=>({zIndex:ge.value-1}));return{layoutItemStyles:zt,layoutItemScrimStyles:Ut,zIndex:ge}},unregister:b=>{a.delete(b),o.delete(b),s.delete(b),i.delete(b),u.delete(b),r.value=r.value.filter(C=>C!==b)},mainRect:d,mainStyles:g,getLayoutItem:P,items:y,layoutRect:f,rootZIndex:n});const Yt=h(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),Wt=h(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:Yt,layoutStyles:Wt,getLayoutItem:P,items:y,layoutRect:f,layoutRef:c}}function so(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,r=x(t,n),{aliases:o={},components:s={},directives:a={}}=r,i=Zn(r.defaults),u=Gr(r.display,r.ssr),c=no(r.theme),f=eo(r.icons),l=sr(r.locale),m=zr(r.date,l),p=Zr(r.goTo,l);return{install:g=>{for(const y in a)g.directive(y,a[y]);for(const y in s)g.component(y,s[y]);for(const y in o)g.component(y,ee({...o[y],name:y,aliasName:o[y].name}));if(c.install(g),g.provide(K,i),g.provide(Ce,u),g.provide(q,c),g.provide(Me,f),g.provide(_,l),g.provide(Lt,m.options),g.provide(tt,m.instance),g.provide(Kr,p),D&&r.ssr)if(g.$nuxt)g.$nuxt.hook("app:suspense:resolve",()=>{u.update()});else{const{mount:y}=g;g.mount=function(){const P=y(...arguments);return an(()=>u.update()),g.mount=y,P}}Fe.reset(),g.mixin({computed:{$vuetify(){return F({defaults:U.call(this,K),display:U.call(this,Ce),theme:U.call(this,q),icons:U.call(this,Me),locale:U.call(this,_),date:U.call(this,tt)})}}})},defaults:i,display:u,theme:c,icons:f,locale:l,date:m,goTo:p}}const ao="3.5.13";so.version=ao;function U(e){const t=this.$,n=t.parent?.provides??t.vnode.appContext?.provides;if(n&&e in n)return n[e]}export{Sn as $,bn as A,Cs as B,tr as C,un as D,As as E,gn as F,Fe as G,bo as H,ae as I,we as J,Jr as K,bs as L,Dn as M,ro as N,$o as O,To as P,D as Q,Re as R,co as S,mo as T,ts as U,ar as V,Ao as W,vo as X,ko as Y,pn as Z,ps as _,Ss as a,so as a$,ee as a0,Go as a1,fo as a2,Cn as a3,cs as a4,Ro as a5,Lo as a6,No as a7,us as a8,ie as a9,Xo as aA,Do as aB,yt as aC,go as aD,lo as aE,Zo as aF,jn as aG,Jo as aH,yo as aI,be as aJ,Fo as aK,es as aL,Uo as aM,as as aN,hs as aO,ms as aP,gs as aQ,So as aR,fs as aS,Ms as aT,xo as aU,Ve as aV,po as aW,Ht as aX,at as aY,vs as aZ,Bt as a_,Bo as aa,Ho as ab,Ft as ac,Po as ad,Le as ae,jo as af,zo as ag,ns as ah,is as ai,Io as aj,xn as ak,Ae as al,hn as am,Oo as an,wo as ao,Mn as ap,Eo as aq,Ne as ar,ho as as,Co as at,Qo as au,ye as av,H as aw,_o as ax,Wn as ay,Ct as az,xs as b,ws as c,Ds as d,Ts as e,ds as f,Tt as g,ls as h,Wo as i,os as j,ss as k,Vo as l,_n as m,Yo as n,qo as o,V as p,te as q,Mo as r,rs as s,Vn as t,ys as u,Ko as v,k as w,Kn as x,Jn as y,O as z};
|
||||
162
qbit/vuetorrent/public/assets/webworkerAll-D8hnRv3W.js
Normal file
162
qbit/vuetorrent/public/assets/webworkerAll-D8hnRv3W.js
Normal file
@@ -0,0 +1,162 @@
|
||||
import{E as S,U as wt,T as pe,O as Q,j as z,N as Ae,c as We,w as $,k as A,P as yt,s as Ue,K as M,L as R,b as Z,B as O,D as H,a as ze,Q as ge,V as me,W as Ie,I,X as Tt,R as j,Y as vt,Z as k,p as F,_ as Ct,$ as Bt,a0 as J,a1 as Ft,M as xe,a2 as Pt,a3 as se,n as _e,e as P,a4 as kt,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{U as V,T as U,R as ae,S as Ge,i as oe,b as He,c as Le,j as Oe,e as Mt,r as De,o as Rt,n as Ee,a as At,g as Wt,k as Ut,m as zt,B as $e,__tla as __tla_1}from"./colorToUniform-DavgjoLv.js";import{C as E,__tla as __tla_2}from"./CanvasPool-CW8lNMNV.js";import{b as It,__tla as __tla_3}from"./batchSamplersUniformGroup-CKlXTtMl.js";import{__tla as __tla_4}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Bt9E0pwX.js";import{__tla as __tla_5}from"./index-bUuJUL5l.js";import"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";import{__tla as __tla_6}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-CJmQtbIM.js";let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})()]).then(async()=>{class Ve{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let t,r;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,r=globalThis.innerHeight;else{const{clientWidth:i,clientHeight:n}=this._resizeTo;t=i,r=n}this.renderer.resize(t,r),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}Ve.extension=S.Application;class Ye{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,wt.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?pe.shared:new pe,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}Ye.extension=S.Application;class Xe{constructor(e){this._renderer=e}push(e,t,r){this._renderer.renderPipes.batch.break(r),r.add({renderPipeId:"filter",canBundle:!1,action:"pushFilter",container:t,filterEffect:e})}pop(e,t,r){this._renderer.renderPipes.batch.break(r),r.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}execute(e){e.action==="pushFilter"?this._renderer.filter.push(e):e.action==="popFilter"&&this._renderer.filter.pop()}destroy(){this._renderer=null}}Xe.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"filter"};const Gt=new z;function Ht(s,e){return e.clear(),je(s,e),e.isValid||e.set(0,0,0,0),s.isRenderGroupRoot?e.applyMatrix(s.renderGroup.localTransform):e.applyMatrix(s.renderGroup.worldTransform),e}function je(s,e){if(s.localDisplayStatus!==7||!s.measurable)return;const t=!!s.effects.length;let r=e;if((s.isRenderGroupRoot||t)&&(r=Q.get().clear()),s.boundsArea)e.addRect(s.boundsArea,s.worldTransform);else{if(s.renderPipeId){const n=s.bounds;r.addFrame(n.minX,n.minY,n.maxX,n.maxY,s.groupTransform)}const i=s.children;for(let n=0;n<i.length;n++)je(i[n],r)}if(t){let i=!1;for(let n=0;n<s.effects.length;n++)s.effects[n].addBounds&&(i||(i=!0,r.applyMatrix(s.renderGroup.worldTransform)),s.effects[n].addBounds(r,!0));i&&(r.applyMatrix(s.renderGroup.worldTransform.copyTo(Gt).invert()),e.addBounds(r,s.relativeGroupTransform)),e.addBounds(r),Q.return(r)}else s.isRenderGroupRoot&&(e.addBounds(r,s.relativeGroupTransform),Q.return(r))}function Lt(s,e){e.clear();const t=e.matrix;for(let r=0;r<s.length;r++){const i=s[r];i.globalDisplayStatus<7||(e.matrix=i.worldTransform,i.addBounds(e))}return e.matrix=t,e}const Ot=new Ae({attributes:{aPosition:{buffer:new Float32Array([0,0,1,0,1,1,0,1]),location:0,format:"float32x2",stride:2*4,offset:0}},indexBuffer:new Uint32Array([0,1,2,0,2,3])});class Ke{constructor(e){this._filterStackIndex=0,this._filterStack=[],this._filterGlobalUniforms=new V({uInputSize:{value:new Float32Array(4),type:"vec4<f32>"},uInputPixel:{value:new Float32Array(4),type:"vec4<f32>"},uInputClamp:{value:new Float32Array(4),type:"vec4<f32>"},uOutputFrame:{value:new Float32Array(4),type:"vec4<f32>"},uGlobalFrame:{value:new Float32Array(4),type:"vec4<f32>"},uOutputTexture:{value:new Float32Array(4),type:"vec4<f32>"}}),this._globalFilterBindGroup=new We({}),this.renderer=e}get activeBackTexture(){return this._activeFilterData?.backTexture}push(e){const t=this.renderer,r=e.filterEffect.filters;this._filterStack[this._filterStackIndex]||(this._filterStack[this._filterStackIndex]=this._getFilterData());const i=this._filterStack[this._filterStackIndex];if(this._filterStackIndex++,r.length===0){i.skip=!0;return}const n=i.bounds;e.renderables?Lt(e.renderables,n):e.filterEffect.filterArea?(n.clear(),n.addRect(e.filterEffect.filterArea),n.applyMatrix(e.container.worldTransform)):Ht(e.container,n);const a=t.renderTarget.rootRenderTarget.colorTexture.source;let o=a._resolution,c=0,h=a.antialias,l=!1,d=!1;for(let f=0;f<r.length;f++){const u=r[f];if(o=Math.min(o,u.resolution),c+=u.padding,u.antialias!=="inherit"&&(u.antialias==="on"?h=!0:h=!1),!!!(u.compatibleRenderers&t.type)){d=!1;break}if(u.blendRequired&&!(t.backBuffer?.useBackBuffer??!0)){$("Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options."),d=!1;break}d=u.enabled||d,l=l||u.blendRequired}if(!d){i.skip=!0;return}if(n.scale(o).fit(t.renderTarget.rootViewPort).scale(1/o).pad(c).ceil(),!n.isPositive){i.skip=!0;return}i.skip=!1,i.bounds=n,i.blendRequired=l,i.container=e.container,i.filterEffect=e.filterEffect,i.previousRenderSurface=t.renderTarget.renderSurface,i.inputTexture=U.getOptimalTexture(n.width,n.height,o,h),t.renderTarget.bind(i.inputTexture,!0),t.globalUniforms.push({offset:n})}pop(){const e=this.renderer;this._filterStackIndex--;const t=this._filterStack[this._filterStackIndex];if(t.skip)return;this._activeFilterData=t;const r=t.inputTexture,i=t.bounds;let n=A.EMPTY;if(e.renderTarget.finishRenderPass(),t.blendRequired){const o=this._filterStackIndex>0?this._filterStack[this._filterStackIndex-1].bounds:null,c=e.renderTarget.getRenderTarget(t.previousRenderSurface);n=this.getBackTexture(c,i,o)}t.backTexture=n;const a=t.filterEffect.filters;if(this._globalFilterBindGroup.setResource(r.source.style,2),this._globalFilterBindGroup.setResource(n.source,3),e.globalUniforms.pop(),a.length===1)a[0].apply(this,r,t.previousRenderSurface,!1),U.returnTexture(r);else{let o=t.inputTexture,c=U.getOptimalTexture(i.width,i.height,o.source._resolution,!1),h=0;for(h=0;h<a.length-1;++h){a[h].apply(this,o,c,!0);const d=o;o=c,c=d}a[h].apply(this,o,t.previousRenderSurface,!1),U.returnTexture(o),U.returnTexture(c)}t.blendRequired&&U.returnTexture(n)}getBackTexture(e,t,r){const i=e.colorTexture.source._resolution,n=U.getOptimalTexture(t.width,t.height,i,!1);let a=t.minX,o=t.minY;r&&(a-=r.minX,o-=r.minY),a=Math.floor(a*i),o=Math.floor(o*i);const c=Math.ceil(t.width*i),h=Math.ceil(t.height*i);return this.renderer.renderTarget.copyToTexture(e,n,{x:a,y:o},{width:c,height:h},{x:0,y:0}),n}applyFilter(e,t,r,i){const n=this.renderer,a=this._filterStack[this._filterStackIndex],o=a.bounds,c=yt.shared,l=a.previousRenderSurface===r;let d=this.renderer.renderTarget.rootRenderTarget.colorTexture.source._resolution,f=this._filterStackIndex-1;for(;f>0&&this._filterStack[f].skip;)--f;f>0&&(d=this._filterStack[f].inputTexture.source._resolution);const u=this._filterGlobalUniforms,p=u.uniforms,m=p.uOutputFrame,x=p.uInputSize,_=p.uInputPixel,b=p.uInputClamp,w=p.uGlobalFrame,y=p.uOutputTexture;if(l){let v=this._filterStackIndex;for(;v>0;){v--;const T=this._filterStack[this._filterStackIndex-1];if(!T.skip){c.x=T.bounds.minX,c.y=T.bounds.minY;break}}m[0]=o.minX-c.x,m[1]=o.minY-c.y}else m[0]=0,m[1]=0;m[2]=t.frame.width,m[3]=t.frame.height,x[0]=t.source.width,x[1]=t.source.height,x[2]=1/x[0],x[3]=1/x[1],_[0]=t.source.pixelWidth,_[1]=t.source.pixelHeight,_[2]=1/_[0],_[3]=1/_[1],b[0]=.5*_[2],b[1]=.5*_[3],b[2]=t.frame.width*x[2]-.5*_[2],b[3]=t.frame.height*x[3]-.5*_[3];const C=this.renderer.renderTarget.rootRenderTarget.colorTexture;w[0]=c.x*d,w[1]=c.y*d,w[2]=C.source.width*d,w[3]=C.source.height*d;const B=this.renderer.renderTarget.getRenderTarget(r);if(n.renderTarget.bind(r,!!i),r instanceof A?(y[0]=r.frame.width,y[1]=r.frame.height):(y[0]=B.width,y[1]=B.height),y[2]=B.isRoot?-1:1,u.update(),n.renderPipes.uniformBatch){const v=n.renderPipes.uniformBatch.getUboResource(u);this._globalFilterBindGroup.setResource(v,0)}else this._globalFilterBindGroup.setResource(u,0);this._globalFilterBindGroup.setResource(t.source,1),this._globalFilterBindGroup.setResource(t.source.style,2),e.groups[0]=this._globalFilterBindGroup,n.encoder.draw({geometry:Ot,shader:e,state:e._state,topology:"triangle-list"}),n.type===ae.WEBGL&&n.renderTarget.finishRenderPass()}_getFilterData(){return{skip:!1,inputTexture:null,bounds:new Ue,container:null,filterEffect:null,blendRequired:!1,previousRenderSurface:null}}calculateSpriteMatrix(e,t){const r=this._activeFilterData,i=e.set(r.inputTexture._source.width,0,0,r.inputTexture._source.height,r.bounds.minX,r.bounds.minY),n=t.worldTransform.copyTo(z.shared);return n.invert(),i.prepend(n),i.scale(1/t.texture.frame.width,1/t.texture.frame.height),i.translate(t.anchor.x,t.anchor.y),i}}Ke.extension={type:[S.WebGLSystem,S.WebGPUSystem],name:"filter"};const Ne=class qe extends Ae{constructor(...e){let t=e[0]??{};t instanceof Float32Array&&(M(R,"use new MeshGeometry({ positions, uvs, indices }) instead"),t={positions:t,uvs:e[1],indices:e[2]}),t={...qe.defaultOptions,...t};const r=t.positions||new Float32Array([0,0,1,0,1,1,0,1]),i=t.uvs||new Float32Array([0,0,1,0,1,1,0,1]),n=t.indices||new Uint32Array([0,1,2,0,2,3]),a=t.shrinkBuffersToFit,o=new Z({data:r,label:"attribute-mesh-positions",shrinkToFit:a,usage:O.VERTEX|O.COPY_DST}),c=new Z({data:i,label:"attribute-mesh-uvs",shrinkToFit:a,usage:O.VERTEX|O.COPY_DST}),h=new Z({data:n,label:"index-mesh-buffer",shrinkToFit:a,usage:O.INDEX|O.COPY_DST});super({attributes:{aPosition:{buffer:o,format:"float32x2",stride:2*4,offset:0},aUV:{buffer:c,format:"float32x2",stride:2*4,offset:0}},indexBuffer:h,topology:t.topology}),this.batchMode="auto"}get positions(){return this.attributes.aPosition.buffer.data}set positions(e){this.attributes.aPosition.buffer.data=e}get uvs(){return this.attributes.aUV.buffer.data}set uvs(e){this.attributes.aUV.buffer.data=e}get indices(){return this.indexBuffer.data}set indices(e){this.indexBuffer.data=e}};Ne.defaultOptions={topology:"triangle-list",shrinkBuffersToFit:!1};let ce=Ne;const Dt=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function K(s){const e=typeof s.fontSize=="number"?`${s.fontSize}px`:s.fontSize;let t=s.fontFamily;Array.isArray(s.fontFamily)||(t=s.fontFamily.split(","));for(let r=t.length-1;r>=0;r--){let i=t[r].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&!Dt.includes(i)&&(i=`"${i}"`),t[r]=i}return`${s.fontStyle} ${s.fontVariant} ${s.fontWeight} ${e} ${t.join(",")}`}const ee={willReadFrequently:!0},W=class g{static get experimentalLetterSpacingSupported(){let e=g._experimentalLetterSpacingSupported;if(e!==void 0){const t=H.get().getCanvasRenderingContext2D().prototype;e=g._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,r,i,n,a,o,c,h){this.text=e,this.style=t,this.width=r,this.height=i,this.lines=n,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=c,this.fontProperties=h}static measureText(e=" ",t,r=g._canvas,i=t.wordWrap){const n=`${e}:${t.styleKey}`;if(g._measurementCache[n])return g._measurementCache[n];const a=K(t),o=g.measureFont(a);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const c=g.__context;c.font=a;const l=(i?g._wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),d=new Array(l.length);let f=0;for(let b=0;b<l.length;b++){const w=g._measureText(l[b],t.letterSpacing,c);d[b]=w,f=Math.max(f,w)}const u=t._stroke?.width||0;let p=f+u;t.dropShadow&&(p+=t.dropShadow.distance);const m=t.lineHeight||o.fontSize+u;let x=Math.max(m,o.fontSize+u*2)+(l.length-1)*(m+t.leading);return t.dropShadow&&(x+=t.dropShadow.distance),new g(e,t,p,x,l,d,m+t.leading,f,o)}static _measureText(e,t,r){let i=!1;g.experimentalLetterSpacingSupported&&(g.experimentalLetterSpacing?(r.letterSpacing=`${t}px`,r.textLetterSpacing=`${t}px`,i=!0):(r.letterSpacing="0px",r.textLetterSpacing="0px"));let n=r.measureText(e).width;return n>0&&(i?n-=t:n+=(g.graphemeSegmenter(e).length-1)*t),n}static _wordWrap(e,t,r=g._canvas){const i=r.getContext("2d",ee);let n=0,a="",o="";const c=Object.create(null),{letterSpacing:h,whiteSpace:l}=t,d=g._collapseSpaces(l),f=g._collapseNewlines(l);let u=!d;const p=t.wordWrapWidth+h,m=g._tokenize(e);for(let x=0;x<m.length;x++){let _=m[x];if(g._isNewline(_)){if(!f){o+=g._addLine(a),u=!d,a="",n=0;continue}_=" "}if(d){const w=g.isBreakingSpace(_),y=g.isBreakingSpace(a[a.length-1]);if(w&&y)continue}const b=g._getFromCache(_,h,c,i);if(b>p)if(a!==""&&(o+=g._addLine(a),a="",n=0),g.canBreakWords(_,t.breakWords)){const w=g.wordWrapSplit(_);for(let y=0;y<w.length;y++){let C=w[y],B=C,v=1;for(;w[y+v];){const L=w[y+v];if(!g.canBreakChars(B,L,_,y,t.breakWords))C+=L;else break;B=L,v++}y+=v-1;const T=g._getFromCache(C,h,c,i);T+n>p&&(o+=g._addLine(a),u=!1,a="",n=0),a+=C,n+=T}}else{a.length>0&&(o+=g._addLine(a),a="",n=0);const w=x===m.length-1;o+=g._addLine(_,!w),u=!1,a="",n=0}else b+n>p&&(u=!1,o+=g._addLine(a),a="",n=0),(a.length>0||!g.isBreakingSpace(_)||u)&&(a+=_,n+=b)}return o+=g._addLine(a,!1),o}static _addLine(e,t=!0){return e=g._trimRight(e),e=t?`${e}
|
||||
`:e,e}static _getFromCache(e,t,r,i){let n=r[e];return typeof n!="number"&&(n=g._measureText(e,t,i)+t,r[e]=n),n}static _collapseSpaces(e){return e==="normal"||e==="pre-line"}static _collapseNewlines(e){return e==="normal"}static _trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const r=e[t];if(!g.isBreakingSpace(r))break;e=e.slice(0,-1)}return e}static _isNewline(e){return typeof e!="string"?!1:g._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:g._breakingSpaces.includes(e.charCodeAt(0))}static _tokenize(e){const t=[];let r="";if(typeof e!="string")return t;for(let i=0;i<e.length;i++){const n=e[i],a=e[i+1];if(g.isBreakingSpace(n,a)||g._isNewline(n)){r!==""&&(t.push(r),r=""),t.push(n);continue}r+=n}return r!==""&&t.push(r),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,r,i,n){return!0}static wordWrapSplit(e){return g.graphemeSegmenter(e)}static measureFont(e){if(g._fonts[e])return g._fonts[e];const t=g._context;t.font=e;const r=t.measureText(g.METRICS_STRING+g.BASELINE_SYMBOL),i={ascent:r.actualBoundingBoxAscent,descent:r.actualBoundingBoxDescent,fontSize:r.actualBoundingBoxAscent+r.actualBoundingBoxDescent};return g._fonts[e]=i,i}static clearMetrics(e=""){e?delete g._fonts[e]:g._fonts={}}static get _canvas(){if(!g.__canvas){let e;try{const t=new OffscreenCanvas(0,0);if(t.getContext("2d",ee)?.measureText)return g.__canvas=t,t;e=H.get().createCanvas()}catch{e=H.get().createCanvas()}e.width=e.height=10,g.__canvas=e}return g.__canvas}static get _context(){return g.__context||(g.__context=g._canvas.getContext("2d",ee)),g.__context}};W.METRICS_STRING="|\xc9q\xc5";W.BASELINE_SYMBOL="M";W.BASELINE_MULTIPLIER=1.4;W.HEIGHT_MULTIPLIER=2;W.graphemeSegmenter=(()=>{if(typeof Intl?.Segmenter=="function"){const s=new Intl.Segmenter;return e=>[...s.segment(e)].map(t=>t.segment)}return s=>[...s]})();W.experimentalLetterSpacing=!1;W._fonts={};W._newlines=[10,13];W._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];W._measurementCache={};let G=W;const be=["_fontFamily","_fontStyle","_fontSize","_fontVariant","_fontWeight","_breakWords","_align","_leading","_letterSpacing","_lineHeight","_textBaseline","_whiteSpace","_wordWrap","_wordWrapWidth","_padding","_cssOverrides","_trim"];function Qe(s){const e=[];let t=0;for(let r=0;r<be.length;r++){const i=be[r];e[t++]=s[i]}return t=Ze(s._fill,e,t),t=Et(s._stroke,e,t),e.join("-")}function Ze(s,e,t){return s&&(e[t++]=s.color,e[t++]=s.alpha,e[t++]=s.fill?.uid),t}function Et(s,e,t){return s&&(t=Ze(s,e,t),e[t++]=s.width,e[t++]=s.alignment,e[t++]=s.cap,e[t++]=s.join,e[t++]=s.miterLimit),t}const le=class D extends ze{constructor(e={}){super(),$t(e);const t={...D.defaultTextStyle,...e};for(const r in t){const i=r;this[i]=t[r]}this.update()}get align(){return this._align}set align(e){this._align=e,this.update()}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords=e,this.update()}get dropShadow(){return this._dropShadow}set dropShadow(e){e!==null&&typeof e=="object"?this._dropShadow={...D.defaultDropShadow,...e}:this._dropShadow=e?{...D.defaultDropShadow}:null,this.update()}get fontFamily(){return this._fontFamily}set fontFamily(e){this._fontFamily=e,this.update()}get fontSize(){return this._fontSize}set fontSize(e){typeof e=="string"?this._fontSize=parseInt(e,10):this._fontSize=e,this.update()}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle=e,this.update()}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant=e,this.update()}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight=e,this.update()}get leading(){return this._leading}set leading(e){this._leading=e,this.update()}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing=e,this.update()}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight=e,this.update()}get padding(){return this._padding}set padding(e){this._padding=e,this.update()}get trim(){return this._trim}set trim(e){this._trim=e,this.update()}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline=e,this.update()}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace=e,this.update()}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap=e,this.update()}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth=e,this.update()}get fill(){return this._originalFill}set fill(e){e!==this._originalFill&&(this._originalFill=e,this._fill=ge(e===0?"black":e,me.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(e){e!==this._originalStroke&&(this._originalStroke=e,this._stroke=ge(e,me.defaultStrokeStyle),this.update())}_generateKey(){return this._styleKey=Qe(this),this._styleKey}update(){this._styleKey=null,this.emit("update",this)}reset(){const e=D.defaultTextStyle;for(const t in e)this[t]=e[t]}get styleKey(){return this._styleKey||this._generateKey()}clone(){return new D({align:this.align,breakWords:this.breakWords,dropShadow:this.dropShadow,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,textBaseline:this.textBaseline,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth})}destroy(e=!1){if(this.removeAllListeners(),typeof e=="boolean"?e:e?.texture){const r=typeof e=="boolean"?e:e?.textureSource;this._fill?.texture&&this._fill.texture.destroy(r),this._originalFill?.texture&&this._originalFill.texture.destroy(r),this._stroke?.texture&&this._stroke.texture.destroy(r),this._originalStroke?.texture&&this._originalStroke.texture.destroy(r)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}};le.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};le.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let N=le;function $t(s){const e=s;if(typeof e.dropShadow=="boolean"&&e.dropShadow){const t=N.defaultDropShadow;s.dropShadow={alpha:e.dropShadowAlpha??t.alpha,angle:e.dropShadowAngle??t.angle,blur:e.dropShadowBlur??t.blur,color:e.dropShadowColor??t.color,distance:e.dropShadowDistance??t.distance}}if(e.strokeThickness){M(R,"strokeThickness is now a part of stroke");const t=e.stroke;s.stroke={color:t,width:e.strokeThickness}}if(Array.isArray(e.fill)){M(R,"gradient fill is now a fill pattern: `new FillGradient(...)`");const t=new Ie(0,0,0,s.fontSize*1.7),r=e.fill.map(i=>I.shared.setValue(i).toNumber());r.forEach((i,n)=>{const a=e.fillGradientStops[n]??n/r.length;t.addColorStop(a,i)}),s.fill={fill:t}}}function q(s,e){if(s.texture===A.WHITE&&!s.fill)return I.shared.setValue(s.color).toHex();if(s.fill){if(s.fill instanceof Tt){const t=s.fill,r=e.createPattern(t.texture.source.resource,"repeat"),i=t.transform.copyTo(z.shared);return i.scale(t.texture.frame.width,t.texture.frame.height),r.setTransform(i),r}else if(s.fill instanceof Ie){const t=s.fill;if(t.type==="linear"){const r=e.createLinearGradient(t.x0,t.y0,t.x1,t.y1);return t.gradientStops.forEach(i=>{r.addColorStop(i.offset,I.shared.setValue(i.color).toHex())}),r}}}else{const t=e.createPattern(s.texture.source.resource,"repeat"),r=s.matrix.copyTo(z.shared);return r.scale(s.texture.frame.width,s.texture.frame.height),t.setTransform(r),t}return $("FillStyle not recognised",s),"red"}class Je extends ze{constructor(){super(...arguments),this.chars=Object.create(null),this.lineHeight=0,this.fontFamily="",this.fontMetrics={fontSize:0,ascent:0,descent:0},this.baseLineOffset=0,this.distanceField={type:"none",range:0},this.pages=[],this.baseMeasurementFontSize=100,this.baseRenderedFontSize=100}get font(){return M(R,"BitmapFont.font is deprecated, please use BitmapFont.fontFamily instead."),this.fontFamily}get pageTextures(){return M(R,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}get size(){return M(R,"BitmapFont.size is deprecated, please use BitmapFont.fontMetrics.fontSize instead."),this.fontMetrics.fontSize}get distanceFieldRange(){return M(R,"BitmapFont.distanceFieldRange is deprecated, please use BitmapFont.distanceField.range instead."),this.distanceField.range}get distanceFieldType(){return M(R,"BitmapFont.distanceFieldType is deprecated, please use BitmapFont.distanceField.type instead."),this.distanceField.type}destroy(e=!1){this.emit("destroy",this),this.removeAllListeners();for(const t in this.chars)this.chars[t].texture.destroy();this.chars=null,e&&(this.pages.forEach(t=>t.texture.destroy(!0)),this.pages=null)}}function et(s){if(s==="")return[];typeof s=="string"&&(s=[s]);const e=[];for(let t=0,r=s.length;t<r;t++){const i=s[t];if(Array.isArray(i)){if(i.length!==2)throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${i.length}.`);if(i[0].length===0||i[1].length===0)throw new Error("[BitmapFont]: Invalid character delimiter.");const n=i[0].charCodeAt(0),a=i[1].charCodeAt(0);if(a<n)throw new Error("[BitmapFont]: Invalid character range.");for(let o=n,c=a;o<=c;o++)e.push(String.fromCharCode(o))}else e.push(...Array.from(i))}if(e.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return e}class Se extends Je{constructor(e){super(),this.resolution=1,this.pages=[],this._padding=4,this._measureCache=Object.create(null),this._currentChars=[],this._currentX=0,this._currentY=0,this._currentPageIndex=-1,this._skipKerning=!1;const t=e,r=t.style.clone();t.overrideFill&&(r._fill.color=16777215,r._fill.alpha=1,r._fill.texture=A.WHITE,r._fill.fill=null);const i=r.fontSize;r.fontSize=this.baseMeasurementFontSize;const n=K(r);t.overrideSize?r._stroke&&(r._stroke.width*=this.baseRenderedFontSize/i):r.fontSize=this.baseRenderedFontSize=i,this._style=r,this._skipKerning=t.skipKerning??!1,this.resolution=t.resolution??1,this._padding=t.padding??4,this.fontMetrics=G.measureFont(n),this.lineHeight=r.lineHeight||this.fontMetrics.fontSize||r.fontSize}ensureCharacters(e){const t=et(e).filter(m=>!this._currentChars.includes(m)).filter((m,x,_)=>_.indexOf(m)===x);if(!t.length)return;this._currentChars=[...this._currentChars,...t];let r;this._currentPageIndex===-1?r=this._nextPage():r=this.pages[this._currentPageIndex];let{canvas:i,context:n}=r.canvasAndContext,a=r.texture.source;const o=this._style;let c=this._currentX,h=this._currentY;const l=this.baseRenderedFontSize/this.baseMeasurementFontSize,d=this._padding*l,f=o.fontStyle==="italic"?2:1;let u=0,p=!1;for(let m=0;m<t.length;m++){const x=t[m],_=G.measureText(x,o,i,!1);_.lineHeight=_.height;const b=f*_.width*l,w=_.height*l,y=b+d*2,C=w+d*2;if(p=!1,x!==`
|
||||
`&&x!=="\r"&&x!==" "&&x!==" "&&(p=!0,u=Math.ceil(Math.max(C,u))),c+y>512&&(h+=u,u=C,c=0,h+u>512)){a.update();const v=this._nextPage();i=v.canvasAndContext.canvas,n=v.canvasAndContext.context,a=v.texture.source,h=0}const B=b/l-(o.dropShadow?.distance??0)-(o._stroke?.width??0);if(this.chars[x]={id:x.codePointAt(0),xOffset:-this._padding,yOffset:-this._padding,xAdvance:B,kerning:{}},p){this._drawGlyph(n,_,c+d,h+d,l,o);const v=a.width*l,T=a.height*l,L=new j(c/v*a.width,h/T*a.height,y/v*a.width,C/T*a.height);this.chars[x].texture=new A({source:a,frame:L}),c+=Math.ceil(y)}}a.update(),this._currentX=c,this._currentY=h,this._skipKerning&&this._applyKerning(t,n)}get pageTextures(){return M(R,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}_applyKerning(e,t){const r=this._measureCache;for(let i=0;i<e.length;i++){const n=e[i];for(let a=0;a<this._currentChars.length;a++){const o=this._currentChars[a];let c=r[n];c||(c=r[n]=t.measureText(n).width);let h=r[o];h||(h=r[o]=t.measureText(o).width);let l=t.measureText(n+o).width,d=l-(c+h);d&&(this.chars[n].kerning[o]=d),l=t.measureText(n+o).width,d=l-(c+h),d&&(this.chars[o].kerning[n]=d)}}}_nextPage(){this._currentPageIndex++;const e=this.resolution,t=E.getOptimalCanvasAndContext(512,512,e);this._setupContext(t.context,this._style,e);const r=e*(this.baseRenderedFontSize/this.baseMeasurementFontSize),i=new A({source:new vt({resource:t.canvas,resolution:r,alphaMode:"premultiply-alpha-on-upload"})}),n={canvasAndContext:t,texture:i};return this.pages[this._currentPageIndex]=n,n}_setupContext(e,t,r){t.fontSize=this.baseRenderedFontSize,e.scale(r,r),e.font=K(t),t.fontSize=this.baseMeasurementFontSize,e.textBaseline=t.textBaseline;const i=t._stroke,n=i?.width??0;if(i&&(e.lineWidth=n,e.lineJoin=i.join,e.miterLimit=i.miterLimit,e.strokeStyle=q(i,e)),t._fill&&(e.fillStyle=q(t._fill,e)),t.dropShadow){const a=t.dropShadow,o=I.shared.setValue(a.color).toArray(),c=a.blur*r,h=a.distance*r;e.shadowColor=`rgba(${o[0]*255},${o[1]*255},${o[2]*255},${a.alpha})`,e.shadowBlur=c,e.shadowOffsetX=Math.cos(a.angle)*h,e.shadowOffsetY=Math.sin(a.angle)*h}else e.shadowColor="black",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0}_drawGlyph(e,t,r,i,n,a){const o=t.text,c=t.fontProperties,l=(a._stroke?.width??0)*n,d=r+l/2,f=i-l/2,u=c.descent*n,p=t.lineHeight*n;a.stroke&&l&&e.strokeText(o,d,f+p-u),a._fill&&e.fillText(o,d,f+p-u)}destroy(){super.destroy();for(let e=0;e<this.pages.length;e++){const{canvasAndContext:t,texture:r}=this.pages[e];E.returnCanvasAndContext(t),r.destroy(!0)}this.pages=null}}function tt(s,e,t){const r={width:0,height:0,offsetY:0,scale:e.fontSize/t.baseMeasurementFontSize,lines:[{width:0,charPositions:[],spaceWidth:0,spacesIndex:[],chars:[]}]};r.offsetY=t.baseLineOffset;let i=r.lines[0],n=null,a=!0;const o={spaceWord:!1,width:0,start:0,index:0,positions:[],chars:[]},c=u=>{const p=i.width;for(let m=0;m<o.index;m++){const x=u.positions[m];i.chars.push(u.chars[m]),i.charPositions.push(x+p)}i.width+=u.width,a=!1,o.width=0,o.index=0,o.chars.length=0},h=()=>{let u=i.chars.length-1,p=i.chars[u];for(;p===" ";)i.width-=t.chars[p].xAdvance,p=i.chars[--u];r.width=Math.max(r.width,i.width),i={width:0,charPositions:[],chars:[],spaceWidth:0,spacesIndex:[]},a=!0,r.lines.push(i),r.height+=t.lineHeight},l=t.baseMeasurementFontSize/e.fontSize,d=e.letterSpacing*l,f=e.wordWrapWidth*l;for(let u=0;u<s.length+1;u++){let p;const m=u===s.length;m||(p=s[u]);const x=t.chars[p]||t.chars[" "];if(/(?:\s)/.test(p)||p==="\r"||p===`
|
||||
`||m){if(!a&&e.wordWrap&&i.width+o.width-d>f?(h(),c(o),m||i.charPositions.push(0)):(o.start=i.width,c(o),m||i.charPositions.push(0)),p==="\r"||p===`
|
||||
`)i.width!==0&&h();else if(!m){const y=x.xAdvance+(x.kerning[n]||0)+d;i.width+=y,i.spaceWidth=y,i.spacesIndex.push(i.charPositions.length),i.chars.push(p)}}else{const w=x.kerning[n]||0,y=x.xAdvance+w+d;o.positions[o.index++]=o.width+w,o.chars.push(p),o.width+=y}n=p}return h(),e.align==="center"?Vt(r):e.align==="right"?Yt(r):e.align==="justify"&&Xt(r),r}function Vt(s){for(let e=0;e<s.lines.length;e++){const t=s.lines[e],r=s.width/2-t.width/2;for(let i=0;i<t.charPositions.length;i++)t.charPositions[i]+=r}}function Yt(s){for(let e=0;e<s.lines.length;e++){const t=s.lines[e],r=s.width-t.width;for(let i=0;i<t.charPositions.length;i++)t.charPositions[i]+=r}}function Xt(s){const e=s.width;for(let t=0;t<s.lines.length;t++){const r=s.lines[t];let i=0,n=r.spacesIndex[i++],a=0;const o=r.spacesIndex.length,h=(e-r.width)/o;for(let l=0;l<r.charPositions.length;l++)l===n&&(n=r.spacesIndex[i++],a+=h),r.charPositions[l]+=a}}class jt{constructor(){this.ALPHA=[["a","z"],["A","Z"]," "],this.NUMERIC=[["0","9"]],this.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],this.ASCII=[[" ","~"]],this.defaultOptions={chars:this.ALPHANUMERIC,resolution:1,padding:4,skipKerning:!1}}getFont(e,t){let r=`${t.fontFamily}-bitmap`,i=!0;if(t._fill.fill&&(r+=t._fill.fill.uid,i=!1),!k.has(r)){const a=new Se({style:t,overrideFill:i,overrideSize:!0,...this.defaultOptions});a.once("destroy",()=>k.remove(r)),k.set(r,a)}const n=k.get(r);return n.ensureCharacters?.(e),n}getLayout(e,t){const r=this.getFont(e,t);return tt(e.split(""),t,r)}measureText(e,t){return this.getLayout(e,t)}install(...e){let t=e[0];typeof t=="string"&&(t={name:t,style:e[1],chars:e[2]?.chars,resolution:e[2]?.resolution,padding:e[2]?.padding,skipKerning:e[2]?.skipKerning},M(R,"BitmapFontManager.install(name, style, options) is deprecated, use BitmapFontManager.install({name, style, ...options})"));const r=t?.name;if(!r)throw new Error("[BitmapFontManager] Property `name` is required.");t={...this.defaultOptions,...t};const i=t.style,n=i instanceof N?i:new N(i),a=n._fill.fill!==null&&n._fill.fill!==void 0,o=new Se({style:n,overrideFill:a,skipKerning:t.skipKerning,padding:t.padding,resolution:t.resolution,overrideSize:!1}),c=et(t.chars);return o.ensureCharacters(c.join("")),k.set(`${r}-bitmap`,o),o.once("destroy",()=>k.remove(`${r}-bitmap`)),o}uninstall(e){const t=`${e}-bitmap`,r=k.get(t);r&&(k.remove(t),r.destroy())}}const ne=new jt;function Kt(s){const e=s._stroke,t=s._fill,i=[`div { ${[`color: ${I.shared.setValue(t.color).toHex()}`,`font-size: ${s.fontSize}px`,`font-family: ${s.fontFamily}`,`font-weight: ${s.fontWeight}`,`font-style: ${s.fontStyle}`,`font-variant: ${s.fontVariant}`,`letter-spacing: ${s.letterSpacing}px`,`text-align: ${s.align}`,`padding: ${s.padding}px`,`white-space: ${s.whiteSpace==="pre"&&s.wordWrap?"pre-wrap":s.whiteSpace}`,...s.lineHeight?[`line-height: ${s.lineHeight}px`]:[],...s.wordWrap?[`word-wrap: ${s.breakWords?"break-all":"break-word"}`,`max-width: ${s.wordWrapWidth}px`]:[],...e?[it(e)]:[],...s.dropShadow?[rt(s.dropShadow)]:[],...s.cssOverrides].join(";")} }`];return Nt(s.tagStyles,i),i.join(" ")}function rt(s){const e=I.shared.setValue(s.color).setAlpha(s.alpha).toHexa(),t=Math.round(Math.cos(s.angle)*s.distance),r=Math.round(Math.sin(s.angle)*s.distance),i=`${t}px ${r}px`;return s.blur>0?`text-shadow: ${i} ${s.blur}px ${e}`:`text-shadow: ${i} ${e}`}function it(s){return[`-webkit-text-stroke-width: ${s.width}px`,`-webkit-text-stroke-color: ${I.shared.setValue(s.color).toHex()}`,`text-stroke-width: ${s.width}px`,`text-stroke-color: ${I.shared.setValue(s.color).toHex()}`,"paint-order: stroke"].join(";")}const we={fontSize:"font-size: {{VALUE}}px",fontFamily:"font-family: {{VALUE}}",fontWeight:"font-weight: {{VALUE}}",fontStyle:"font-style: {{VALUE}}",fontVariant:"font-variant: {{VALUE}}",letterSpacing:"letter-spacing: {{VALUE}}px",align:"text-align: {{VALUE}}",padding:"padding: {{VALUE}}px",whiteSpace:"white-space: {{VALUE}}",lineHeight:"line-height: {{VALUE}}px",wordWrapWidth:"max-width: {{VALUE}}px"},ye={fill:s=>`color: ${I.shared.setValue(s).toHex()}`,breakWords:s=>`word-wrap: ${s?"break-all":"break-word"}`,stroke:it,dropShadow:rt};function Nt(s,e){for(const t in s){const r=s[t],i=[];for(const n in r)ye[n]?i.push(ye[n](r[n])):we[n]&&i.push(we[n].replace("{{VALUE}}",r[n]));e.push(`${t} { ${i.join(";")} }`)}}class he extends N{constructor(e={}){super(e),this._cssOverrides=[],this.cssOverrides??(this.cssOverrides=e.cssOverrides),this.tagStyles=e.tagStyles??{}}set cssOverrides(e){this._cssOverrides=e instanceof Array?e:[e],this.update()}get cssOverrides(){return this._cssOverrides}_generateKey(){return this._styleKey=Qe(this)+this._cssOverrides.join("-"),this._styleKey}update(){this._cssStyle=null,super.update()}clone(){return new he({align:this.align,breakWords:this.breakWords,dropShadow:this.dropShadow,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,cssOverrides:this.cssOverrides})}get cssStyle(){return this._cssStyle||(this._cssStyle=Kt(this)),this._cssStyle}addOverride(...e){const t=e.filter(r=>!this.cssOverrides.includes(r));t.length>0&&(this.cssOverrides.push(...t),this.update())}removeOverride(...e){const t=e.filter(r=>this.cssOverrides.includes(r));t.length>0&&(this.cssOverrides=this.cssOverrides.filter(r=>!t.includes(r)),this.update())}set fill(e){typeof e!="string"&&typeof e!="number"&&$("[HTMLTextStyle] only color fill is not supported by HTMLText"),super.fill=e}set stroke(e){e&&typeof e!="string"&&typeof e!="number"&&$("[HTMLTextStyle] only color stroke is not supported by HTMLText"),super.stroke=e}}const Te="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml";class st{constructor(){this.svgRoot=document.createElementNS(Te,"svg"),this.foreignObject=document.createElementNS(Te,"foreignObject"),this.domElement=document.createElementNS(ve,"div"),this.styleElement=document.createElementNS(ve,"style"),this.image=new Image;const{foreignObject:e,svgRoot:t,styleElement:r,domElement:i}=this;e.setAttribute("width","10000"),e.setAttribute("height","10000"),e.style.overflow="hidden",t.appendChild(e),e.appendChild(r),e.appendChild(i)}}let Ce;function qt(s,e,t,r){r=r||Ce||(Ce=new st);const{domElement:i,styleElement:n,svgRoot:a}=r;i.innerHTML=`<style>${e.cssStyle}</style><div>${s}</div>`,i.setAttribute("style","transform-origin: top left; display: inline-block"),t&&(n.textContent=t),document.body.appendChild(a);const o=i.getBoundingClientRect();a.remove();const c=G.measureFont(e.fontStyle).descent;return{width:o.width,height:o.height+c}}class nt{constructor(e,t){this.state=Ge.for2d(),this._graphicsBatchesHash=Object.create(null),this.renderer=e,this._adaptor=t,this._adaptor.init()}validateRenderable(e){const t=e.context,r=!!this._graphicsBatchesHash[e.uid],i=this.renderer.graphicsContext.updateGpuContext(t);return!!(i.isBatchable||r!==i.isBatchable)}addRenderable(e,t){const r=this.renderer.graphicsContext.updateGpuContext(e.context);e._didGraphicsUpdate&&(e._didGraphicsUpdate=!1,this._rebuild(e)),r.isBatchable?this._addToBatcher(e,t):(this.renderer.renderPipes.batch.break(t),t.add(e))}updateRenderable(e){const t=this._graphicsBatchesHash[e.uid];if(t)for(let r=0;r<t.length;r++){const i=t[r];i.batcher.updateElement(i)}}destroyRenderable(e){this._graphicsBatchesHash[e.uid]&&this._removeBatchForRenderable(e.uid)}execute(e){if(!e.isRenderable)return;const t=this.renderer,r=e.context;if(!t.graphicsContext.getGpuContext(r).batches.length)return;const n=r.customShader||this._adaptor.shader;this.state.blendMode=e.groupBlendMode;const a=n.resources.localUniforms.uniforms;a.uTransformMatrix=e.groupTransform,a.uRound=t._roundPixels|e._roundPixels,oe(e.groupColorAlpha,a.uColor,0),this._adaptor.execute(this,e)}_rebuild(e){const t=!!this._graphicsBatchesHash[e.uid],r=this.renderer.graphicsContext.updateGpuContext(e.context);t&&this._removeBatchForRenderable(e.uid),r.isBatchable&&this._initBatchesForRenderable(e),e.batched=r.isBatchable}_addToBatcher(e,t){const r=this.renderer.renderPipes.batch,i=this._getBatchesForRenderable(e);for(let n=0;n<i.length;n++){const a=i[n];r.addToBatch(a,t)}}_getBatchesForRenderable(e){return this._graphicsBatchesHash[e.uid]||this._initBatchesForRenderable(e)}_initBatchesForRenderable(e){const t=e.context,r=this.renderer.graphicsContext.getGpuContext(t),i=this.renderer._roundPixels|e._roundPixels,n=r.batches.map(a=>{const o=F.get(Ct);return a.copyTo(o),o.renderable=e,o.roundPixels=i,o});return this._graphicsBatchesHash[e.uid]=n,e.on("destroyed",()=>{this.destroyRenderable(e)}),n}_removeBatchForRenderable(e){this._graphicsBatchesHash[e].forEach(t=>{F.return(t)}),this._graphicsBatchesHash[e]=null}destroy(){this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null;for(const e in this._graphicsBatchesHash)this._removeBatchForRenderable(e);this._graphicsBatchesHash=null}}nt.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"graphics"};const at=class ot extends ce{constructor(...e){super({});let t=e[0]??{};typeof t=="number"&&(M(R,"PlaneGeometry constructor changed please use { width, height, verticesX, verticesY } instead"),t={width:t,height:e[1],verticesX:e[2],verticesY:e[3]}),this.build(t)}build(e){e={...ot.defaultOptions,...e},this.verticesX=this.verticesX??e.verticesX,this.verticesY=this.verticesY??e.verticesY,this.width=this.width??e.width,this.height=this.height??e.height;const t=this.verticesX*this.verticesY,r=[],i=[],n=[],a=this.verticesX-1,o=this.verticesY-1,c=this.width/a,h=this.height/o;for(let d=0;d<t;d++){const f=d%this.verticesX,u=d/this.verticesX|0;r.push(f*c,u*h),i.push(f/a,u/o)}const l=a*o;for(let d=0;d<l;d++){const f=d%a,u=d/a|0,p=u*this.verticesX+f,m=u*this.verticesX+f+1,x=(u+1)*this.verticesX+f,_=(u+1)*this.verticesX+f+1;n.push(p,m,x,m,_,x)}this.buffers[0].data=new Float32Array(r),this.buffers[1].data=new Float32Array(i),this.indexBuffer.data=new Uint32Array(n),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()}};at.defaultOptions={width:100,height:100,verticesX:10,verticesY:10};let Qt=at;class de{constructor(){this.batcher=null,this.batch=null,this.roundPixels=0,this._uvUpdateId=-1,this._textureMatrixUpdateId=-1}get blendMode(){return this.mesh.groupBlendMode}reset(){this.mesh=null,this.texture=null,this.batcher=null,this.batch=null}packIndex(e,t,r){const i=this.geometry.indices;for(let n=0;n<i.length;n++)e[t++]=i[n]+r}packAttributes(e,t,r,i){const n=this.mesh,a=this.geometry,o=n.groupTransform,c=i<<16|this.roundPixels&65535,h=o.a,l=o.b,d=o.c,f=o.d,u=o.tx,p=o.ty,m=a.positions,x=a.getBuffer("aUV"),_=x.data;let b=_;const w=this.texture.textureMatrix;w.isSimple||(b=this._transformedUvs,(this._textureMatrixUpdateId!==w._updateID||this._uvUpdateId!==x._updateID)&&((!b||b.length<_.length)&&(b=this._transformedUvs=new Float32Array(_.length)),this._textureMatrixUpdateId=w._updateID,this._uvUpdateId=x._updateID,w.multiplyUvs(_,b)));const y=n.groupColorAlpha;for(let C=0;C<m.length;C+=2){const B=m[C],v=m[C+1];e[r]=h*B+d*v+u,e[r+1]=l*B+f*v+p,e[r+2]=b[C],e[r+3]=b[C+1],t[r+4]=y,t[r+5]=c,r+=6}}get vertexSize(){return this.geometry.positions.length/2}get indexSize(){return this.geometry.indices.length}}class ct{constructor(e,t){this.localUniforms=new V({uTransformMatrix:{value:new z,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),this.localUniformsBindGroup=new We({0:this.localUniforms}),this._meshDataHash=Object.create(null),this._gpuBatchableMeshHash=Object.create(null),this.renderer=e,this._adaptor=t,this._adaptor.init()}validateRenderable(e){const t=this._getMeshData(e),r=t.batched,i=e.batched;if(t.batched=i,r!==i)return!0;if(i){const n=e._geometry;if(n.indices.length!==t.indexSize||n.positions.length!==t.vertexSize)return t.indexSize=n.indices.length,t.vertexSize=n.positions.length,!0;const a=this._getBatchableMesh(e),o=e.texture;if(a.texture._source!==o._source&&a.texture._source!==o._source)return!a.batcher.checkAndUpdateTexture(a,o)}return!1}addRenderable(e,t){const r=this.renderer.renderPipes.batch,{batched:i}=this._getMeshData(e);if(i){const n=this._getBatchableMesh(e);n.texture=e._texture,n.geometry=e._geometry,r.addToBatch(n)}else r.break(t),t.add({renderPipeId:"mesh",mesh:e})}updateRenderable(e){if(e.batched){const t=this._gpuBatchableMeshHash[e.uid];t.texture=e._texture,t.geometry=e._geometry,t.batcher.updateElement(t)}}destroyRenderable(e){this._meshDataHash[e.uid]=null;const t=this._gpuBatchableMeshHash[e.uid];F.return(t),this._gpuBatchableMeshHash[e.uid]=null}execute({mesh:e}){if(!e.isRenderable)return;e.state.blendMode=e.groupBlendMode;const t=this.localUniforms;t.uniforms.uTransformMatrix=e.groupTransform,t.uniforms.uRound=this.renderer._roundPixels|e._roundPixels,t.update(),oe(e.groupColorAlpha,t.uniforms.uColor,0),this._adaptor.execute(this,e)}_getMeshData(e){return this._meshDataHash[e.uid]||this._initMeshData(e)}_initMeshData(e){return this._meshDataHash[e.uid]={batched:e.batched,indexSize:e._geometry.indices?.length,vertexSize:e._geometry.positions?.length},e.on("destroyed",()=>{this.destroyRenderable(e)}),this._meshDataHash[e.uid]}_getBatchableMesh(e){return this._gpuBatchableMeshHash[e.uid]||this._initBatchableMesh(e)}_initBatchableMesh(e){const t=F.get(de);return t.mesh=e,t.texture=e._texture,t.roundPixels=this.renderer._roundPixels|e._roundPixels,this._gpuBatchableMeshHash[e.uid]=t,t.mesh=e,t}destroy(){for(const e in this._gpuBatchableMeshHash)this._gpuBatchableMeshHash[e]&&F.return(this._gpuBatchableMeshHash[e]);this._gpuBatchableMeshHash=null,this._meshDataHash=null,this.localUniforms=null,this.localUniformsBindGroup=null,this._adaptor.destroy(),this._adaptor=null,this.renderer=null}}ct.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"mesh"};const lt=class ht extends Qt{constructor(e={}){e={...ht.defaultOptions,...e},super({width:e.width,height:e.height,verticesX:4,verticesY:4}),this.update(e)}update(e){this.width=e.width??this.width,this.height=e.height??this.height,this._originalWidth=e.originalWidth??this._originalWidth,this._originalHeight=e.originalHeight??this._originalHeight,this._leftWidth=e.leftWidth??this._leftWidth,this._rightWidth=e.rightWidth??this._rightWidth,this._topHeight=e.topHeight??this._topHeight,this._bottomHeight=e.bottomHeight??this._bottomHeight,this.updateUvs(),this.updatePositions()}updatePositions(){const e=this.positions,t=this._leftWidth+this._rightWidth,r=this.width>t?1:this.width/t,i=this._topHeight+this._bottomHeight,n=this.height>i?1:this.height/i,a=Math.min(r,n);e[9]=e[11]=e[13]=e[15]=this._topHeight*a,e[17]=e[19]=e[21]=e[23]=this.height-this._bottomHeight*a,e[25]=e[27]=e[29]=e[31]=this.height,e[2]=e[10]=e[18]=e[26]=this._leftWidth*a,e[4]=e[12]=e[20]=e[28]=this.width-this._rightWidth*a,e[6]=e[14]=e[22]=e[30]=this.width,this.getBuffer("aPosition").update()}updateUvs(){const e=this.uvs;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1;const t=1/this._originalWidth,r=1/this._originalHeight;e[2]=e[10]=e[18]=e[26]=t*this._leftWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[4]=e[12]=e[20]=e[28]=1-t*this._rightWidth,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.getBuffer("aUV").update()}};lt.defaultOptions={width:100,height:100,leftWidth:10,topHeight:10,rightWidth:10,bottomHeight:10,originalWidth:100,originalHeight:100};let Zt=lt;class dt{constructor(e){this._gpuSpriteHash=Object.create(null),this._renderer=e}addRenderable(e,t){const r=this._getGpuSprite(e);e._didSpriteUpdate&&this._updateBatchableSprite(e,r),this._renderer.renderPipes.batch.addToBatch(r)}updateRenderable(e){const t=this._gpuSpriteHash[e.uid];e._didSpriteUpdate&&this._updateBatchableSprite(e,t),t.batcher.updateElement(t)}validateRenderable(e){const t=e._texture,r=this._getGpuSprite(e);return r.texture._source!==t._source?!r.batcher.checkAndUpdateTexture(r,t):!1}destroyRenderable(e){const t=this._gpuSpriteHash[e.uid];F.return(t),this._gpuSpriteHash[e.uid]=null}_updateBatchableSprite(e,t){e._didSpriteUpdate=!1,t.geometry.update(e),t.texture=e._texture}_getGpuSprite(e){return this._gpuSpriteHash[e.uid]||this._initGPUSprite(e)}_initGPUSprite(e){const t=new de;return t.geometry=new Zt,t.mesh=e,t.texture=e._texture,t.roundPixels=this._renderer._roundPixels|e._roundPixels,this._gpuSpriteHash[e.uid]=t,e.on("destroyed",()=>{this.destroyRenderable(e)}),t}destroy(){for(const e in this._gpuSpriteHash)this._gpuSpriteHash[e].geometry.destroy();this._gpuSpriteHash=null,this._renderer=null}}dt.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"nineSliceSprite"};const Jt={name:"tiling-bit",vertex:{header:`
|
||||
struct TilingUniforms {
|
||||
uMapCoord:mat3x3<f32>,
|
||||
uClampFrame:vec4<f32>,
|
||||
uClampOffset:vec2<f32>,
|
||||
uTextureTransform:mat3x3<f32>,
|
||||
uSizeAnchor:vec4<f32>
|
||||
};
|
||||
|
||||
@group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
|
||||
@group(2) @binding(1) var uTexture: texture_2d<f32>;
|
||||
@group(2) @binding(2) var uSampler: sampler;
|
||||
`,main:`
|
||||
uv = (tilingUniforms.uTextureTransform * vec3(uv, 1.0)).xy;
|
||||
|
||||
position = (position - tilingUniforms.uSizeAnchor.zw) * tilingUniforms.uSizeAnchor.xy;
|
||||
`},fragment:{header:`
|
||||
struct TilingUniforms {
|
||||
uMapCoord:mat3x3<f32>,
|
||||
uClampFrame:vec4<f32>,
|
||||
uClampOffset:vec2<f32>,
|
||||
uTextureTransform:mat3x3<f32>,
|
||||
uSizeAnchor:vec4<f32>
|
||||
};
|
||||
|
||||
@group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
|
||||
@group(2) @binding(1) var uTexture: texture_2d<f32>;
|
||||
@group(2) @binding(2) var uSampler: sampler;
|
||||
`,main:`
|
||||
|
||||
var coord = vUV + ceil(tilingUniforms.uClampOffset - vUV);
|
||||
coord = (tilingUniforms.uMapCoord * vec3(coord, 1.0)).xy;
|
||||
var unclamped = coord;
|
||||
coord = clamp(coord, tilingUniforms.uClampFrame.xy, tilingUniforms.uClampFrame.zw);
|
||||
|
||||
var bias = 0.;
|
||||
|
||||
if(unclamped.x == coord.x && unclamped.y == coord.y)
|
||||
{
|
||||
bias = -32.;
|
||||
}
|
||||
|
||||
outColor = textureSampleBias(uTexture, uSampler, coord, bias);
|
||||
`}},er={name:"tiling-bit",vertex:{header:`
|
||||
uniform mat3 uTextureTransform;
|
||||
uniform vec4 uSizeAnchor;
|
||||
|
||||
`,main:`
|
||||
uv = (uTextureTransform * vec3(aUV, 1.0)).xy;
|
||||
|
||||
position = (position - uSizeAnchor.zw) * uSizeAnchor.xy;
|
||||
`},fragment:{header:`
|
||||
uniform sampler2D uTexture;
|
||||
uniform mat3 uMapCoord;
|
||||
uniform vec4 uClampFrame;
|
||||
uniform vec2 uClampOffset;
|
||||
`,main:`
|
||||
|
||||
vec2 coord = vUV + ceil(uClampOffset - vUV);
|
||||
coord = (uMapCoord * vec3(coord, 1.0)).xy;
|
||||
vec2 unclamped = coord;
|
||||
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
|
||||
|
||||
outColor = texture(uTexture, coord, unclamped == coord ? 0.0 : -32.0);// lod-bias very negative to force lod 0
|
||||
|
||||
`}};let te,re;class tr extends He{constructor(){te??(te=Le({name:"tiling-sprite-shader",bits:[Mt,Jt,De]})),re??(re=Oe({name:"tiling-sprite-shader",bits:[Rt,er,Ee]}));const e=new V({uMapCoord:{value:new z,type:"mat3x3<f32>"},uClampFrame:{value:new Float32Array([0,0,1,1]),type:"vec4<f32>"},uClampOffset:{value:new Float32Array([0,0]),type:"vec2<f32>"},uTextureTransform:{value:new z,type:"mat3x3<f32>"},uSizeAnchor:{value:new Float32Array([100,100,.5,.5]),type:"vec4<f32>"}});super({glProgram:re,gpuProgram:te,resources:{localUniforms:new V({uTransformMatrix:{value:new z,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),tilingUniforms:e,uTexture:A.EMPTY.source,uSampler:A.EMPTY.source.style}})}updateUniforms(e,t,r,i,n,a){const o=this.resources.tilingUniforms,c=a.width,h=a.height,l=a.textureMatrix,d=o.uniforms.uTextureTransform;d.set(r.a*c/e,r.b*c/t,r.c*h/e,r.d*h/t,r.tx/e,r.ty/t),d.invert(),o.uniforms.uMapCoord=l.mapCoord,o.uniforms.uClampFrame=l.uClampFrame,o.uniforms.uClampOffset=l.uClampOffset,o.uniforms.uTextureTransform=d,o.uniforms.uSizeAnchor[0]=e,o.uniforms.uSizeAnchor[1]=t,o.uniforms.uSizeAnchor[2]=i,o.uniforms.uSizeAnchor[3]=n,a&&(this.resources.uTexture=a.source,this.resources.uSampler=a.source.style)}}class rr extends ce{constructor(){super({positions:new Float32Array([0,0,1,0,1,1,0,1]),uvs:new Float32Array([0,0,1,0,1,1,0,1]),indices:new Uint32Array([0,1,2,0,2,3])})}}function ir(s,e){const t=s.anchor.x,r=s.anchor.y;e[0]=-t*s.width,e[1]=-r*s.height,e[2]=(1-t)*s.width,e[3]=-r*s.height,e[4]=(1-t)*s.width,e[5]=(1-r)*s.height,e[6]=-t*s.width,e[7]=(1-r)*s.height}function sr(s,e,t,r){let i=0;const n=s.length/(e||2),a=r.a,o=r.b,c=r.c,h=r.d,l=r.tx,d=r.ty;for(t*=e;i<n;){const f=s[t],u=s[t+1];s[t]=a*f+c*u+l,s[t+1]=o*f+h*u+d,t+=e,i++}}function nr(s,e){const t=s.texture,r=t.frame.width,i=t.frame.height;let n=0,a=0;s._applyAnchorToTexture&&(n=s.anchor.x,a=s.anchor.y),e[0]=e[6]=-n,e[2]=e[4]=1-n,e[1]=e[3]=-a,e[5]=e[7]=1-a;const o=z.shared;o.copyFrom(s._tileTransform.matrix),o.tx/=s.width,o.ty/=s.height,o.invert(),o.scale(s.width/r,s.height/i),sr(e,2,0,o)}const Y=new rr;class ut{constructor(e){this._tilingSpriteDataHash=Object.create(null),this._renderer=e}validateRenderable(e){const t=this._getTilingSpriteData(e),r=t.canBatch;this._updateCanBatch(e);const i=t.canBatch;if(i&&i===r){const{batchableMesh:n}=t;if(n.texture._source!==e.texture._source)return!n.batcher.checkAndUpdateTexture(n,e.texture)}return r!==i}addRenderable(e,t){const r=this._renderer.renderPipes.batch;this._updateCanBatch(e);const i=this._getTilingSpriteData(e),{geometry:n,canBatch:a}=i;if(a){i.batchableMesh||(i.batchableMesh=new de);const o=i.batchableMesh;e._didTilingSpriteUpdate&&(e._didTilingSpriteUpdate=!1,this._updateBatchableMesh(e),o.geometry=n,o.mesh=e,o.texture=e._texture),o.roundPixels=this._renderer._roundPixels|e._roundPixels,r.addToBatch(o)}else r.break(t),i.shader||(i.shader=new tr),this.updateRenderable(e),t.add(e)}execute(e){const{shader:t}=this._tilingSpriteDataHash[e.uid];t.groups[0]=this._renderer.globalUniforms.bindGroup;const r=t.resources.localUniforms.uniforms;r.uTransformMatrix=e.groupTransform,r.uRound=this._renderer._roundPixels|e._roundPixels,oe(e.groupColorAlpha,r.uColor,0),this._renderer.encoder.draw({geometry:Y,shader:t,state:Ge.default2d})}updateRenderable(e){const t=this._getTilingSpriteData(e),{canBatch:r}=t;if(r){const{batchableMesh:i}=t;e._didTilingSpriteUpdate&&this._updateBatchableMesh(e),i.batcher.updateElement(i)}else if(e._didTilingSpriteUpdate){const{shader:i}=t;i.updateUniforms(e.width,e.height,e._tileTransform.matrix,e.anchor.x,e.anchor.y,e.texture)}e._didTilingSpriteUpdate=!1}destroyRenderable(e){const t=this._getTilingSpriteData(e);t.batchableMesh=null,t.shader?.destroy(),this._tilingSpriteDataHash[e.uid]=null}_getTilingSpriteData(e){return this._tilingSpriteDataHash[e.uid]||this._initTilingSpriteData(e)}_initTilingSpriteData(e){const t=new ce({indices:Y.indices,positions:Y.positions.slice(),uvs:Y.uvs.slice()});return this._tilingSpriteDataHash[e.uid]={canBatch:!0,renderable:e,geometry:t},e.on("destroyed",()=>{this.destroyRenderable(e)}),this._tilingSpriteDataHash[e.uid]}_updateBatchableMesh(e){const t=this._getTilingSpriteData(e),{geometry:r}=t,i=e.texture.source.style;i.addressMode!=="repeat"&&(i.addressMode="repeat",i.update()),nr(e,r.uvs),ir(e,r.positions)}destroy(){for(const e in this._tilingSpriteDataHash)this.destroyRenderable(this._tilingSpriteDataHash[e].renderable);this._tilingSpriteDataHash=null,this._renderer=null}_updateCanBatch(e){const t=this._getTilingSpriteData(e),r=e.texture;let i=!0;return this._renderer.type===ae.WEBGL&&(i=this._renderer.context.supports.nonPowOf2wrapping),t.canBatch=r.textureMatrix.isSimple&&(i||r.source.isPowerOfTwo),t.canBatch}}ut.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"tilingSprite"};const ie={test(s){return typeof s=="string"&&s.startsWith("info face=")},parse(s){const e=s.match(/^[a-z]+\s+.+$/gm),t={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const d in e){const f=e[d].match(/^[a-z]+/gm)[0],u=e[d].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),p={};for(const m in u){const x=u[m].split("="),_=x[0],b=x[1].replace(/"/gm,""),w=parseFloat(b),y=isNaN(w)?b:w;p[_]=y}t[f].push(p)}const r={chars:{},pages:[],lineHeight:0,fontSize:0,fontFamily:"",distanceField:null,baseLineOffset:0},[i]=t.info,[n]=t.common,[a]=t.distanceField??[];a&&(r.distanceField={range:parseInt(a.distanceRange,10),type:a.fieldType}),r.fontSize=parseInt(i.size,10),r.fontFamily=i.face,r.lineHeight=parseInt(n.lineHeight,10);const o=t.page;for(let d=0;d<o.length;d++)r.pages.push({id:parseInt(o[d].id,10)||0,file:o[d].file});const c={};r.baseLineOffset=r.lineHeight-parseInt(n.base,10);const h=t.char;for(let d=0;d<h.length;d++){const f=h[d],u=parseInt(f.id,10);let p=f.letter??f.char??String.fromCharCode(u);p==="space"&&(p=" "),c[u]=p,r.chars[p]={id:u,page:parseInt(f.page,10)||0,x:parseInt(f.x,10),y:parseInt(f.y,10),width:parseInt(f.width,10),height:parseInt(f.height,10),xOffset:parseInt(f.xoffset,10),yOffset:parseInt(f.yoffset,10),xAdvance:parseInt(f.xadvance,10),kerning:{}}}const l=t.kerning||[];for(let d=0;d<l.length;d++){const f=parseInt(l[d].first,10),u=parseInt(l[d].second,10),p=parseInt(l[d].amount,10);r.chars[c[u]].kerning[c[f]]=p}return r}},Be={test(s){const e=s;return typeof e!="string"&&"getElementsByTagName"in e&&e.getElementsByTagName("page").length&&e.getElementsByTagName("info")[0].getAttribute("face")!==null},parse(s){const e={chars:{},pages:[],lineHeight:0,fontSize:0,fontFamily:"",distanceField:null,baseLineOffset:0},t=s.getElementsByTagName("info")[0],r=s.getElementsByTagName("common")[0],i=s.getElementsByTagName("distanceField")[0];i&&(e.distanceField={type:i.getAttribute("fieldType"),range:parseInt(i.getAttribute("distanceRange"),10)});const n=s.getElementsByTagName("page"),a=s.getElementsByTagName("char"),o=s.getElementsByTagName("kerning");e.fontSize=parseInt(t.getAttribute("size"),10),e.fontFamily=t.getAttribute("face"),e.lineHeight=parseInt(r.getAttribute("lineHeight"),10);for(let h=0;h<n.length;h++)e.pages.push({id:parseInt(n[h].getAttribute("id"),10)||0,file:n[h].getAttribute("file")});const c={};e.baseLineOffset=e.lineHeight-parseInt(r.getAttribute("base"),10);for(let h=0;h<a.length;h++){const l=a[h],d=parseInt(l.getAttribute("id"),10);let f=l.getAttribute("letter")??l.getAttribute("char")??String.fromCharCode(d);f==="space"&&(f=" "),c[d]=f,e.chars[f]={id:d,page:parseInt(l.getAttribute("page"),10)||0,x:parseInt(l.getAttribute("x"),10),y:parseInt(l.getAttribute("y"),10),width:parseInt(l.getAttribute("width"),10),height:parseInt(l.getAttribute("height"),10),xOffset:parseInt(l.getAttribute("xoffset"),10),yOffset:parseInt(l.getAttribute("yoffset"),10),xAdvance:parseInt(l.getAttribute("xadvance"),10),kerning:{}}}for(let h=0;h<o.length;h++){const l=parseInt(o[h].getAttribute("first"),10),d=parseInt(o[h].getAttribute("second"),10),f=parseInt(o[h].getAttribute("amount"),10);e.chars[c[d]].kerning[c[l]]=f}return e}},Fe={test(s){return typeof s=="string"&&s.includes("<font>")?Be.test(H.get().parseXML(s)):!1},parse(s){return Be.parse(H.get().parseXML(s))}};class ft extends Je{constructor(e,t){super();const{textures:r,data:i}=e;Object.keys(i.pages).forEach(n=>{const a=i.pages[parseInt(n,10)],o=r[a.id];this.pages.push({texture:o})}),Object.keys(i.chars).forEach(n=>{const a=i.chars[n],o=r[a.page].source,c=new j(a.x,a.y,a.width,a.height),h=new A({source:o,frame:c});this.chars[n]={id:n.codePointAt(0),xOffset:a.xOffset,yOffset:a.yOffset,xAdvance:a.xAdvance,kerning:a.kerning??{},texture:h}}),this.baseRenderedFontSize=i.fontSize,this.baseMeasurementFontSize=i.fontSize,this.fontMetrics={ascent:0,descent:0,fontSize:i.fontSize},this.baseLineOffset=i.baseLineOffset,this.lineHeight=i.lineHeight,this.fontFamily=i.fontFamily,this.distanceField=i.distanceField??{type:"none",range:0},this.url=t}destroy(){super.destroy();for(let e=0;e<this.pages.length;e++){const{texture:t}=this.pages[e];t.destroy(!0)}this.pages=null}static install(e){ne.install(e)}static uninstall(e){ne.uninstall(e)}}const ar=[".xml",".fnt"],or={extension:S.CacheParser,test:s=>s instanceof ft,getCacheableAssets(s,e){const t={};return s.forEach(r=>{t[r]=e}),t[`${e.fontFamily}-bitmap`]=e,t}},cr={extension:{type:S.LoadParser,priority:Bt.Normal},test(s){return ar.includes(J.extname(s).toLowerCase())},async testParse(s){return ie.test(s)||Fe.test(s)},async parse(s,e,t){const r=ie.test(s)?ie.parse(s):Fe.parse(s),{src:i}=e,{pages:n}=r,a=[];for(let l=0;l<n.length;++l){const d=n[l].file;let f=J.join(J.dirname(i),d);f=Ft(f,i),a.push(f)}const o=await t.load(a),c=a.map(l=>o[l]);return new ft({data:r,textures:c},i)},async load(s,e){return await (await H.get().fetch(s)).text()},async unload(s,e,t){await Promise.all(s.pages.map(r=>t.unload(r.texture.source._sourceOrigin))),s.destroy()}},lr={name:"local-uniform-msdf-bit",vertex:{header:`
|
||||
struct LocalUniforms {
|
||||
uColor:vec4<f32>,
|
||||
uTransformMatrix:mat3x3<f32>,
|
||||
uDistance: f32,
|
||||
uRound:f32,
|
||||
}
|
||||
|
||||
@group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
|
||||
`,main:`
|
||||
vColor *= localUniforms.uColor;
|
||||
modelMatrix *= localUniforms.uTransformMatrix;
|
||||
`,end:`
|
||||
if(localUniforms.uRound == 1)
|
||||
{
|
||||
vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
|
||||
}
|
||||
`},fragment:{header:`
|
||||
struct LocalUniforms {
|
||||
uColor:vec4<f32>,
|
||||
uTransformMatrix:mat3x3<f32>,
|
||||
uDistance: f32
|
||||
}
|
||||
|
||||
@group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
|
||||
`,main:`
|
||||
outColor = vColor * calculateMSDFAlpha(outColor, localUniforms.uDistance);
|
||||
`}},hr={name:"local-uniform-msdf-bit",vertex:{header:`
|
||||
uniform mat3 uTransformMatrix;
|
||||
uniform vec4 uColor;
|
||||
uniform float uRound;
|
||||
`,main:`
|
||||
vColor *= uColor;
|
||||
modelMatrix *= uTransformMatrix;
|
||||
`,end:`
|
||||
if(uRound == 1.)
|
||||
{
|
||||
gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
|
||||
}
|
||||
`},fragment:{header:`
|
||||
uniform float uDistance;
|
||||
`,main:`
|
||||
outColor = vColor * calculateMSDFAlpha(outColor, uDistance);
|
||||
`}},dr={name:"msdf-bit",fragment:{header:`
|
||||
fn calculateMSDFAlpha(msdfColor:vec4<f32>, distance:f32) -> f32 {
|
||||
|
||||
// MSDF
|
||||
var median = msdfColor.r + msdfColor.g + msdfColor.b -
|
||||
min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
|
||||
max(msdfColor.r, max(msdfColor.g, msdfColor.b));
|
||||
|
||||
// SDF
|
||||
median = min(median, msdfColor.a);
|
||||
|
||||
var screenPxDistance = distance * (median - 0.5);
|
||||
var alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);
|
||||
if (median < 0.01) {
|
||||
alpha = 0.0;
|
||||
} else if (median > 0.99) {
|
||||
alpha = 1.0;
|
||||
}
|
||||
|
||||
return alpha;
|
||||
}
|
||||
`}},ur={name:"msdf-bit",fragment:{header:`
|
||||
float calculateMSDFAlpha(vec4 msdfColor, float distance) {
|
||||
|
||||
// MSDF
|
||||
float median = msdfColor.r + msdfColor.g + msdfColor.b -
|
||||
min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
|
||||
max(msdfColor.r, max(msdfColor.g, msdfColor.b));
|
||||
|
||||
// SDF
|
||||
median = min(median, msdfColor.a);
|
||||
|
||||
float screenPxDistance = distance * (median - 0.5);
|
||||
float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);
|
||||
|
||||
if (median < 0.01) {
|
||||
alpha = 0.0;
|
||||
} else if (median > 0.99) {
|
||||
alpha = 1.0;
|
||||
}
|
||||
|
||||
return alpha;
|
||||
}
|
||||
`}};class fr extends He{constructor(){const e=new V({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uTransformMatrix:{value:new z,type:"mat3x3<f32>"},uDistance:{value:4,type:"f32"},uRound:{value:0,type:"f32"}}),t=Le({name:"sdf-shader",bits:[At,Wt(xe),lr,dr,De]}),r=Oe({name:"sdf-shader",bits:[Ut,zt(xe),hr,ur,Ee]});super({glProgram:r,gpuProgram:t,resources:{localUniforms:e,batchSamplers:It}})}}class pt{constructor(e){this._gpuBitmapText={},this._renderer=e}validateRenderable(e){const t=this._getGpuBitmapText(e);return e._didTextUpdate&&(e._didTextUpdate=!1,this._updateContext(e,t)),this._renderer.renderPipes.graphics.validateRenderable(t)}addRenderable(e,t){const r=this._getGpuBitmapText(e);Pe(e,r),e._didTextUpdate&&(e._didTextUpdate=!1,this._updateContext(e,r)),this._renderer.renderPipes.graphics.addRenderable(r,t),r.context.customShader&&this._updateDistanceField(e)}destroyRenderable(e){this._destroyRenderableByUid(e.uid)}_destroyRenderableByUid(e){F.return(this._gpuBitmapText[e]),this._gpuBitmapText[e]=null}updateRenderable(e){const t=this._getGpuBitmapText(e);Pe(e,t),this._renderer.renderPipes.graphics.updateRenderable(t),t.context.customShader&&this._updateDistanceField(e)}_updateContext(e,t){const{context:r}=t,i=ne.getFont(e.text,e._style);r.clear(),i.distanceField.type!=="none"&&(r.customShader||(this._sdfShader||(this._sdfShader=new fr),r.customShader=this._sdfShader));const n=Array.from(e.text),a=e._style;let o=(a._stroke?.width||0)/2;o+=i.baseLineOffset;const c=tt(n,a,i);let h=0;const l=a.padding,d=c.scale;r.translate(-e._anchor._x*c.width-l,-e._anchor._y*(c.height+c.offsetY)-l).scale(d,d);const f=a._fill.color;for(let u=0;u<c.lines.length;u++){const p=c.lines[u];for(let m=0;m<p.charPositions.length;m++){const x=n[h++],_=i.chars[x];_?.texture&&r.texture(_.texture,f||"black",Math.round(p.charPositions[m]+_.xOffset),Math.round(o+_.yOffset))}o+=i.lineHeight}}_getGpuBitmapText(e){return this._gpuBitmapText[e.uid]||this.initGpuText(e)}initGpuText(e){const t=F.get(Pt);return this._gpuBitmapText[e.uid]=t,this._updateContext(e,t),e.on("destroyed",()=>{this.destroyRenderable(e)}),this._gpuBitmapText[e.uid]}_updateDistanceField(e){const t=this._getGpuBitmapText(e).context,r=e._style.fontFamily,i=k.get(`${r}-bitmap`),{a:n,b:a,c:o,d:c}=e.groupTransform,h=Math.sqrt(n*n+a*a),l=Math.sqrt(o*o+c*c),d=(Math.abs(h)+Math.abs(l))/2,f=i.baseRenderedFontSize/e._style.fontSize,u=e.resolution??this._renderer.resolution,p=d*i.distanceField.range*(1/f)*u;t.customShader.resources.localUniforms.uniforms.uDistance=p}destroy(){for(const e in this._gpuBitmapText)this._destroyRenderableByUid(e);this._gpuBitmapText=null,this._sdfShader?.destroy(!0),this._sdfShader=null,this._renderer=null}}pt.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"bitmapText"};function Pe(s,e){e.groupTransform=s.groupTransform,e.groupColorAlpha=s.groupColorAlpha,e.groupColor=s.groupColor,e.groupBlendMode=s.groupBlendMode,e.globalDisplayStatus=s.globalDisplayStatus,e.groupTransform=s.groupTransform,e.localDisplayStatus=s.localDisplayStatus,e.groupAlpha=s.groupAlpha,e._roundPixels=s._roundPixels}class gt{constructor(e){this._gpuText=Object.create(null),this._renderer=e}validateRenderable(e){const t=this._getGpuText(e),r=e._getKey();return t.textureNeedsUploading?(t.textureNeedsUploading=!1,!0):t.currentKey!==r}addRenderable(e){const r=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),this._renderer.renderPipes.batch.addToBatch(r)}updateRenderable(e){const r=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),r.batcher.updateElement(r)}destroyRenderable(e){this._destroyRenderableById(e.uid)}_destroyRenderableById(e){const t=this._gpuText[e];this._renderer.htmlText.decreaseReferenceCount(t.currentKey),F.return(t.batchableSprite),this._gpuText[e]=null}_updateText(e){const t=e._getKey(),r=this._getGpuText(e),i=r.batchableSprite;r.currentKey!==t&&this._updateGpuText(e).catch(a=>{console.error(a)}),e._didTextUpdate=!1;const n=e._style.padding;se(i.bounds,e._anchor,i.texture,n)}async _updateGpuText(e){e._didTextUpdate=!1;const t=this._getGpuText(e);if(t.generatingTexture)return;const r=e._getKey();this._renderer.htmlText.decreaseReferenceCount(t.currentKey),t.generatingTexture=!0,t.currentKey=r;const i=e.resolution??this._renderer.resolution,n=await this._renderer.htmlText.getManagedTexture(e.text,i,e._style,e._getKey()),a=t.batchableSprite;a.texture=t.texture=n,t.generatingTexture=!1,t.textureNeedsUploading=!0,e.onViewUpdate();const o=e._style.padding;se(a.bounds,e._anchor,a.texture,o)}_getGpuText(e){return this._gpuText[e.uid]||this.initGpuText(e)}initGpuText(e){const t={texture:A.EMPTY,currentKey:"--",batchableSprite:F.get($e),textureNeedsUploading:!1,generatingTexture:!1},r=t.batchableSprite;return r.renderable=e,r.texture=A.EMPTY,r.bounds={minX:0,maxX:1,minY:0,maxY:0},r.roundPixels=this._renderer._roundPixels|e._roundPixels,this._gpuText[e.uid]=t,e.on("destroyed",()=>{this.destroyRenderable(e)}),t}destroy(){for(const e in this._gpuText)this._destroyRenderableById(e);this._gpuText=null,this._renderer=null}}gt.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"htmlText"};function pr(){const{userAgent:s}=H.get().getNavigator();return/^((?!chrome|android).)*safari/i.test(s)}const gr=new Ue;function mt(s,e,t,r){const i=gr;i.minX=0,i.minY=0,i.maxX=s.width/r|0,i.maxY=s.height/r|0;const n=U.getOptimalTexture(i.width,i.height,r,!1);return n.source.uploadMethodId="image",n.source.resource=s,n.source.alphaMode="premultiply-alpha-on-upload",n.frame.width=e/r,n.frame.height=t/r,n.source.emit("update",n.source),n.updateUvs(),n}function mr(s,e){const t=e.fontFamily,r=[],i={},n=/font-family:([^;"\s]+)/g,a=s.match(n);function o(c){i[c]||(r.push(c),i[c]=!0)}if(Array.isArray(t))for(let c=0;c<t.length;c++)o(t[c]);else o(t);a&&a.forEach(c=>{const h=c.split(":")[1].trim();o(h)});for(const c in e.tagStyles){const h=e.tagStyles[c].fontFamily;o(h)}return r}async function xr(s){const t=await (await H.get().fetch(s)).blob(),r=new FileReader;return await new Promise((n,a)=>{r.onloadend=()=>n(r.result),r.onerror=a,r.readAsDataURL(t)})}async function ke(s,e){const t=await xr(e);return`@font-face {
|
||||
font-family: "${s.fontFamily}";
|
||||
src: url('${t}');
|
||||
font-weight: ${s.fontWeight};
|
||||
font-style: ${s.fontStyle};
|
||||
}`}const X=new Map;async function _r(s,e,t){const r=s.filter(i=>k.has(`${i}-and-url`)).map((i,n)=>{if(!X.has(i)){const{url:a}=k.get(`${i}-and-url`);n===0?X.set(i,ke(e,a)):X.set(i,ke({fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:i},a))}return X.get(i)});return(await Promise.all(r)).join(`
|
||||
`)}function br(s,e,t,r,i){const{domElement:n,styleElement:a,svgRoot:o}=i;n.innerHTML=`<style>${e.cssStyle}</style><div>${s}</div>`,n.setAttribute("style",`transform: scale(${t});transform-origin: top left; display: inline-block`),a.textContent=r;const{width:c,height:h}=i.image;return o.setAttribute("width",c.toString()),o.setAttribute("height",h.toString()),new XMLSerializer().serializeToString(o)}function Sr(s,e){const t=E.getOptimalCanvasAndContext(s.width,s.height,e),{context:r}=t;return r.clearRect(0,0,s.width,s.height),r.drawImage(s,0,0),E.returnCanvasAndContext(t),t.canvas}function wr(s,e,t){return new Promise(async r=>{t&&await new Promise(i=>setTimeout(i,100)),s.onload=()=>{r()},s.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(e)}`,s.crossOrigin="anonymous"})}class ue{constructor(e){this._activeTextures={},this._renderer=e,this._createCanvas=e.type===ae.WEBGPU}getTexture(e){return this._buildTexturePromise(e.text,e.resolution,e.style)}getManagedTexture(e,t,r,i){if(this._activeTextures[i])return this._increaseReferenceCount(i),this._activeTextures[i].promise;const n=this._buildTexturePromise(e,t,r).then(a=>(this._activeTextures[i].texture=a,a));return this._activeTextures[i]={texture:null,promise:n,usageCount:1},n}async _buildTexturePromise(e,t,r){const i=F.get(st),n=mr(e,r),a=await _r(n,r,he.defaultTextStyle),o=qt(e,r,a,i),c=Math.ceil(Math.ceil(Math.max(1,o.width)+r.padding*2)*t),h=Math.ceil(Math.ceil(Math.max(1,o.height)+r.padding*2)*t),l=i.image;l.width=c|0,l.height=h|0;const d=br(e,r,t,a,i);await wr(l,d,pr()&&n.length>0);let f=l;this._createCanvas&&(f=Sr(l,t));const u=mt(f,l.width,l.height,t);return this._createCanvas&&this._renderer.texture.initSource(u.source),F.return(i),u}_increaseReferenceCount(e){this._activeTextures[e].usageCount++}decreaseReferenceCount(e){const t=this._activeTextures[e];t&&(t.usageCount--,t.usageCount===0&&(t.texture?this._cleanUp(t):t.promise.then(r=>{t.texture=r,this._cleanUp(t)}).catch(()=>{$("HTMLTextSystem: Failed to clean texture")}),this._activeTextures[e]=null))}_cleanUp(e){U.returnTexture(e.texture),e.texture.source.resource=null,e.texture.source.uploadMethodId="unknown"}getReferenceCount(e){return this._activeTextures[e].usageCount}destroy(){this._activeTextures=null}}ue.extension={type:[S.WebGLSystem,S.WebGPUSystem,S.CanvasSystem],name:"htmlText"};ue.defaultFontOptions={fontFamily:"Arial",fontStyle:"normal",fontWeight:"normal"};class xt{constructor(e){this._gpuText=Object.create(null),this._renderer=e}validateRenderable(e){const t=this._getGpuText(e),r=e._getKey();if(t.currentKey!==r){const i=e.resolution??this._renderer.resolution,{width:n,height:a}=this._renderer.canvasText.getTextureSize(e.text,i,e._style);return!(this._renderer.canvasText.getReferenceCount(t.currentKey)===1&&n===t.texture._source.width&&a===t.texture._source.height)}return!1}addRenderable(e,t){const i=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),this._renderer.renderPipes.batch.addToBatch(i)}updateRenderable(e){const r=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),r.batcher.updateElement(r)}destroyRenderable(e){this._destroyRenderableById(e.uid)}_destroyRenderableById(e){const t=this._gpuText[e];this._renderer.canvasText.decreaseReferenceCount(t.currentKey),F.return(t.batchableSprite),this._gpuText[e]=null}_updateText(e){const t=e._getKey(),r=this._getGpuText(e),i=r.batchableSprite;r.currentKey!==t&&this._updateGpuText(e),e._didTextUpdate=!1;const n=e._style.padding;se(i.bounds,e._anchor,i.texture,n)}_updateGpuText(e){const t=this._getGpuText(e),r=t.batchableSprite;t.texture&&this._renderer.canvasText.decreaseReferenceCount(t.currentKey);const i=e.resolution??this._renderer.resolution;t.texture=r.texture=this._renderer.canvasText.getTexture(e.text,i,e._style,e._getKey()),t.currentKey=e._getKey(),r.texture=t.texture}_getGpuText(e){return this._gpuText[e.uid]||this.initGpuText(e)}initGpuText(e){const t={texture:null,currentKey:"--",batchableSprite:F.get($e)};return t.batchableSprite.renderable=e,t.batchableSprite.bounds={minX:0,maxX:1,minY:0,maxY:0},t.batchableSprite.roundPixels=this._renderer._roundPixels|e._roundPixels,this._gpuText[e.uid]=t,this._updateText(e),e.on("destroyed",()=>{this.destroyRenderable(e)}),t}destroy(){for(const e in this._gpuText)this._destroyRenderableById(e);this._gpuText=null,this._renderer=null}}xt.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"text"};function Me(s,e,t){for(let r=0,i=4*t*e;r<e;++r,i+=4)if(s[i+3]!==0)return!1;return!0}function Re(s,e,t,r,i){const n=4*e;for(let a=r,o=r*n+4*t;a<=i;++a,o+=n)if(s[o+3]!==0)return!1;return!0}function yr(s,e=1){const{width:t,height:r}=s,i=s.getContext("2d",{willReadFrequently:!0});if(i===null)throw new TypeError("Failed to get canvas 2D context");const a=i.getImageData(0,0,t,r).data;let o=0,c=0,h=t-1,l=r-1;for(;c<r&&Me(a,t,c);)++c;if(c===r)return j.EMPTY;for(;Me(a,t,l);)--l;for(;Re(a,t,o,c,l);)++o;for(;Re(a,t,h,c,l);)--h;return++h,++l,new j(o/e,c/e,(h-o)/e,(l-c)/e)}class _t{constructor(){this._activeTextures={}}getTextureSize(e,t,r){const i=G.measureText(e||" ",r);let n=Math.ceil(Math.ceil(Math.max(1,i.width)+r.padding*2)*t),a=Math.ceil(Math.ceil(Math.max(1,i.height)+r.padding*2)*t);return n=Math.ceil(n-1e-6),a=Math.ceil(a-1e-6),n=_e(n),a=_e(a),{width:n,height:a}}getTexture(e,t,r,i){if(this._activeTextures[i])return this._increaseReferenceCount(i),this._activeTextures[i].texture;const n=G.measureText(e||" ",r),a=Math.ceil(Math.ceil(Math.max(1,n.width)+r.padding*2)*t),o=Math.ceil(Math.ceil(Math.max(1,n.height)+r.padding*2)*t),c=E.getOptimalCanvasAndContext(a,o),{canvas:h}=c;this.renderTextToCanvas(e,r,t,c);const l=mt(h,a,o,t);if(r.trim){const d=yr(h,t);l.frame.copyFrom(d),l.updateUvs()}return this._activeTextures[i]={canvasAndContext:c,texture:l,usageCount:1},l}_increaseReferenceCount(e){this._activeTextures[e].usageCount++}decreaseReferenceCount(e){const t=this._activeTextures[e];if(t.usageCount--,t.usageCount===0){E.returnCanvasAndContext(t.canvasAndContext),U.returnTexture(t.texture);const r=t.texture.source;r.resource=null,r.uploadMethodId="unknown",r.alphaMode="no-premultiply-alpha",this._activeTextures[e]=null}}getReferenceCount(e){return this._activeTextures[e].usageCount}renderTextToCanvas(e,t,r,i){const{canvas:n,context:a}=i,o=K(t),c=G.measureText(e||" ",t),h=c.lines,l=c.lineHeight,d=c.lineWidths,f=c.maxLineWidth,u=c.fontProperties,p=n.height;if(a.resetTransform(),a.scale(r,r),a.clearRect(0,0,c.width+4,c.height+4),t._stroke?.width){const b=t._stroke;a.lineWidth=b.width,a.miterLimit=b.miterLimit,a.lineJoin=b.join,a.lineCap=b.cap}a.font=o;let m,x;const _=t.dropShadow?2:1;for(let b=0;b<_;++b){const w=t.dropShadow&&b===0,y=w?Math.ceil(Math.max(1,p)+t.padding*2):0,C=y*r;if(w){a.fillStyle="black",a.strokeStyle="black";const T=t.dropShadow,L=T.color,bt=T.alpha;a.shadowColor=I.shared.setValue(L).setAlpha(bt).toRgbaString();const St=T.blur*r,fe=T.distance*r;a.shadowBlur=St,a.shadowOffsetX=Math.cos(T.angle)*fe,a.shadowOffsetY=Math.sin(T.angle)*fe+C}else a.globalAlpha=t._fill?.alpha??1,a.fillStyle=t._fill?q(t._fill,a):null,t._stroke?.width&&(a.strokeStyle=q(t._stroke,a)),a.shadowColor="black";let B=(l-u.fontSize)/2;l-u.fontSize<0&&(B=0);const v=t._stroke?.width??0;for(let T=0;T<h.length;T++)m=v/2,x=v/2+T*l+u.ascent+B,t.align==="right"?m+=f-d[T]:t.align==="center"&&(m+=(f-d[T])/2),t._stroke&&this._drawLetterSpacing(h[T],t,i,m+t.padding,x+t.padding-y,!0),t._fill!==void 0&&this._drawLetterSpacing(h[T],t,i,m+t.padding,x+t.padding-y)}}_drawLetterSpacing(e,t,r,i,n,a=!1){const{context:o}=r,c=t.letterSpacing;let h=!1;if(G.experimentalLetterSpacingSupported&&(G.experimentalLetterSpacing?(o.letterSpacing=`${c}px`,o.textLetterSpacing=`${c}px`,h=!0):(o.letterSpacing="0px",o.textLetterSpacing="0px")),c===0||h){a?o.strokeText(e,i,n):o.fillText(e,i,n);return}let l=i;const d=G.graphemeSegmenter(e);let f=o.measureText(e).width,u=0;for(let p=0;p<d.length;++p){const m=d[p];a?o.strokeText(m,l,n):o.fillText(m,l,n);let x="";for(let _=p+1;_<d.length;++_)x+=d[_];u=o.measureText(x).width,l+=f-u+c,f=u}}destroy(){this._activeTextures=null}}_t.extension={type:[S.WebGLSystem,S.WebGPUSystem,S.CanvasSystem],name:"canvasText"};P.add(Ve);P.add(Ye);P.add(nt);P.add(kt);P.add(ct);P.add(_t);P.add(xt);P.add(pt,cr,or);P.add(ue);P.add(gt);P.add(ut);P.add(dt);P.add(Ke);P.add(Xe)});export{__tla};
|
||||
@@ -2,28 +2,31 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||
<meta name="viewport" content="initial-scale=1, viewport-fit=cover, width=device-width" />
|
||||
<meta name="description" content="VueTorrent" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<link rel="icon" href="./favicon.ico" sizes="any" />
|
||||
<link rel="icon" href="./icon.svg" type="image/svg+xml" />
|
||||
<link rel="apple-touch-icon" href="./apple-touch-icon.png" />
|
||||
<link rel="icon" href="favicon.ico" sizes="any" />
|
||||
<link rel="icon" href="icon.svg" type="image/svg+xml" />
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
|
||||
<meta name="theme-color" content="#000" />
|
||||
<title>VueTorrent</title>
|
||||
<script type="module" crossorigin src="./assets/index-135ae4c1.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/vue-d2584a6d.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/faker-c43f92d4.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/vuetify-e547ef1b.js">
|
||||
<link rel="stylesheet" href="./assets/index-6e88811a.css">
|
||||
<link rel="manifest" href="./manifest.webmanifest" crossorigin="use-credentials"><script id="vite-plugin-pwa:register-sw" src="./registerSW.js"></script></head>
|
||||
|
||||
<!-- PWA setup -->
|
||||
<link rel="manifest" href="manifest.webmanifest" crossorigin="use-credentials" />
|
||||
<script src="registerSW.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-bUuJUL5l.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/vue-BSryv7ps.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/vuetify-i5Qjiq6M.js">
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-B-0i0kz8.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but Vuetorrent doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
|
||||
<div style="padding-top: calc(env(safe-area-inset-top) * 0.5)" id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1 +1,22 @@
|
||||
{"name":"VueTorrent","short_name":"VueTorrent","start_url":".","display":"standalone","background_color":"#000","lang":"en","scope":"./","theme_color":"#597566","icons":[{"src":"./icon-192.png","type":"image/png","sizes":"192x192"},{"src":"./icon-512.png","type":"image/png","sizes":"512x512"}]}
|
||||
{
|
||||
"name": "VueTorrent",
|
||||
"short_name": "VueTorrent",
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"background_color": "#000",
|
||||
"lang": "en",
|
||||
"scope": "./",
|
||||
"theme_color": "#597566",
|
||||
"icons": [
|
||||
{
|
||||
"src": "./icon-192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "./icon-512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('./sw.js', { scope: './' })})}
|
||||
"serviceWorker"in navigator&&window.addEventListener("load",(async()=>{await navigator.serviceWorker.register("sw.js")}))
|
||||
|
||||
@@ -1 +1 @@
|
||||
if(!self.define){let s,e={};const o=(o,l)=>(o=new URL(o+".js",l).href,e[o]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=o,s.onload=e,document.head.appendChild(s)}else s=o,importScripts(o),e()})).then((()=>{let s=e[o];if(!s)throw new Error(`Module ${o} didn’t register its module`);return s})));self.define=(l,r)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let i={};const a=s=>o(s,n),t={module:{uri:n},exports:i,require:a};e[n]=Promise.all(l.map((s=>t[s]||a(s)))).then((s=>(r(...s),i)))}}define(["./workbox-fa446783"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"apple-touch-icon.png",revision:"eed821a5bbfee3a20aab9c51c4977743"},{url:"assets/ArrayPagination-26934cac.js",revision:null},{url:"assets/Dashboard-e1ea0c85.css",revision:null},{url:"assets/Dashboard-e667d93a.js",revision:null},{url:"assets/dayjs-f7aba705.js",revision:null},{url:"assets/dayjs.min-1969f9c6.js",revision:null},{url:"assets/faker-c43f92d4.js",revision:null},{url:"assets/index-135ae4c1.js",revision:null},{url:"assets/index-6e88811a.css",revision:null},{url:"assets/index-fd06c5c5.js",revision:null},{url:"assets/Login-4fd3fce4.js",revision:null},{url:"assets/Logs-a45762d4.css",revision:null},{url:"assets/Logs-c238f379.js",revision:null},{url:"assets/MagnetHandler-d77b3bb6.js",revision:null},{url:"assets/materialdesignicons-webfont-28c8f97f.woff",revision:null},{url:"assets/materialdesignicons-webfont-31010194.woff2",revision:null},{url:"assets/PasswordField.vue_vue_type_script_setup_true_lang-f7d196be.js",revision:null},{url:"assets/roboto-cyrillic-400-normal-495d38d4.woff2",revision:null},{url:"assets/roboto-cyrillic-400-normal-adba67d2.woff",revision:null},{url:"assets/roboto-cyrillic-ext-400-normal-0a32035a.woff",revision:null},{url:"assets/roboto-cyrillic-ext-400-normal-b7ef2cd1.woff2",revision:null},{url:"assets/roboto-greek-400-normal-076b9dc1.woff",revision:null},{url:"assets/roboto-greek-400-normal-daf51ab5.woff2",revision:null},{url:"assets/roboto-latin-400-normal-a9fdbefa.woff",revision:null},{url:"assets/roboto-latin-400-normal-f6734f81.woff2",revision:null},{url:"assets/roboto-latin-ext-400-normal-3c23eb02.woff2",revision:null},{url:"assets/roboto-latin-ext-400-normal-c2b94086.woff",revision:null},{url:"assets/roboto-mono-cyrillic-400-normal-8c367f2f.woff2",revision:null},{url:"assets/roboto-mono-cyrillic-400-normal-f32fcdb5.woff",revision:null},{url:"assets/roboto-mono-cyrillic-ext-400-normal-ae7d87eb.woff",revision:null},{url:"assets/roboto-mono-cyrillic-ext-400-normal-eef02d41.woff2",revision:null},{url:"assets/roboto-mono-greek-400-normal-3355834d.woff",revision:null},{url:"assets/roboto-mono-greek-400-normal-53a8927b.woff2",revision:null},{url:"assets/roboto-mono-latin-400-normal-7295944e.woff2",revision:null},{url:"assets/roboto-mono-latin-400-normal-d5d7d67f.woff",revision:null},{url:"assets/roboto-mono-latin-ext-400-normal-20f2c9c1.woff",revision:null},{url:"assets/roboto-mono-latin-ext-400-normal-820adbd1.woff2",revision:null},{url:"assets/roboto-mono-vietnamese-400-normal-9a7a0360.woff",revision:null},{url:"assets/roboto-vietnamese-400-normal-77b24796.woff2",revision:null},{url:"assets/roboto-vietnamese-400-normal-d2390f1a.woff",revision:null},{url:"assets/RssArticles-1fe4e4bd.js",revision:null},{url:"assets/RssArticles-cd150368.css",revision:null},{url:"assets/SearchEngine-b38d96d6.js",revision:null},{url:"assets/Settings-af9c84ca.js",revision:null},{url:"assets/Settings-cac9dd1a.css",revision:null},{url:"assets/TorrentDetail-85e789b3.js",revision:null},{url:"assets/TorrentDetail-cad7bace.css",revision:null},{url:"assets/torrents-f1a47456.js",revision:null},{url:"assets/vue-d2584a6d.js",revision:null},{url:"assets/vuetify-e547ef1b.js",revision:null},{url:"favicon.ico",revision:"621ef878b9a700bd2249dad60d9f1141"},{url:"icon-192.png",revision:"1a475d65497c0b3609661246d8639ff4"},{url:"icon-512.png",revision:"fa311af470073dfeb0673806ae3e0e2f"},{url:"icon.svg",revision:"1a5efa1aa226aa0533605b7e84667ecd"},{url:"index.html",revision:"b595f6f4165d802b703cd2526fac0ff9"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.ico",revision:"621ef878b9a700bd2249dad60d9f1141"},{url:"icon.svg",revision:"1a5efa1aa226aa0533605b7e84667ecd"},{url:"icon-192.png",revision:"1a475d65497c0b3609661246d8639ff4"},{url:"icon-512.png",revision:"fa311af470073dfeb0673806ae3e0e2f"},{url:"robots.txt",revision:"b6216d61c03e6ce0c9aea6ca7808f7ca"},{url:"manifest.webmanifest",revision:"112d2a686dfcb44742c79ee217315d5c"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
|
||||
self.addEventListener("install",(()=>{})),self.addEventListener("fetch",(()=>{}))
|
||||
@@ -1 +0,0 @@
|
||||
define(["exports"],(function(t){"use strict";try{self["workbox:core:7.0.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.0.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:i})}catch(t){a=Promise.reject(t)}const h=r&&r.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a=()=>(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c);function h(t,e,n){let o;if("string"==typeof t){const s=new URL(t,location.href);o=new i((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)o=new r(t,e,n);else if("function"==typeof t)o=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=t}return a().registerRoute(o),o}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter((t=>t&&t.length>0)).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.0.0"]&&_()}catch(t){}function p(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class y{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class g{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let R;async function m(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,c=function(){if(void 0===R){const t=new Response("");if("body"in t)try{new Response(t.body),R=!0}catch(t){R=!1}R=!1}return R}()?i.body:await i.blob();return new Response(c,o)}function v(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class q{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const U=new Set;try{self["workbox:strategies:7.0.0"]&&_()}catch(t){}function L(t){return"string"==typeof t?new Request(t):t}class b{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new q,this.R=[],this.m=[...t.plugins],this.v=new Map;for(const t of this.m)this.v.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=L(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=L(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=L(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const c=await this.q(e);if(!c)return!1;const{cacheName:a,matchOptions:h}=this.l,u=await self.caches.open(a),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=v(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===v(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?c.clone():c)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of U)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:a,oldResponse:f,newResponse:c.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=L(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.v.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.R.push(t),t}async doneWaiting(){let t;for(;t=this.R.shift();)await t}destroy(){this.p.resolve(null)}async q(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class C{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new b(this,{event:e,request:s,params:n}),r=this.U(i,s,e);return[r,this.L(r,i,s,e)]}async U(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this._(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async L(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class E extends C{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this.C=!1!==t.fallbackToNetwork,this.plugins.push(E.copyRedirectedCacheableResponsesPlugin)}async _(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.O(t,e):await this.N(t,e))}async N(t,e){let n;const i=e.params||{};if(!this.C)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&o&&"no-cors"!==t.mode&&(this.k(),await e.cachePut(t,n.clone()))}return n}async O(t,e){this.k();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}k(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==E.copyRedirectedCacheableResponsesPlugin&&(n===E.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(E.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}E.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},E.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await m(t):t};class O{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.K=new Map,this.P=new Map,this.T=new Map,this.l=new E({cacheName:f(t),plugins:[...e,new g({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.W||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.W=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=p(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.K.has(i)&&this.K.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.K.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.T.has(t)&&this.T.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.T.set(t,n.integrity)}if(this.K.set(i,t),this.P.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return d(t,(async()=>{const e=new y;this.strategy.plugins.push(e);for(const[e,s]of this.K){const n=this.T.get(s),i=this.P.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return d(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.K.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.K}getCachedURLs(){return[...this.K.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.K.get(e.href)}getIntegrityForCacheKey(t){return this.T.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let x;const N=()=>(x||(x=new O),x);class k extends i{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}t.NavigationRoute=class extends i{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super((t=>this.j(t)),t),this.M=e,this.S=s}j({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.S)if(t.test(s))return!1;return!!this.M.some((t=>t.test(s)))}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const e=f();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(e).then((t=>{})))}))},t.clientsClaim=function(){self.addEventListener("activate",(()=>self.clients.claim()))},t.createHandlerBoundToURL=function(t){return N().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){N().precache(t)}(t),function(t){const e=N();h(new k(e,t))}(e)},t.registerRoute=h}));
|
||||
@@ -1 +1 @@
|
||||
2.4.0
|
||||
2.7.3
|
||||
@@ -101,8 +101,6 @@ set -g @resurrect-strategy-vim 'session'
|
||||
# for neovim
|
||||
set -g @resurrect-strategy-nvim 'session'
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
set -g default-command "reattach-to-user-namespace -l $SHELL"
|
||||
|
||||
|
||||
set -g status-position top
|
||||
|
||||
|
||||
Submodule tmux/.tmux/plugins/tmux-resurrect deleted from cff343cf9e
@@ -140,13 +140,10 @@ bindkey -M menuselect '\t' menu-complete "$terminfo[kcbt]" reverse-menu-complete
|
||||
|
||||
eval "$(atuin init zsh)"
|
||||
eval "$(atuin init zsh)"
|
||||
export PATH="/opt/homebrew/opt/binutils/bin:$PATH"
|
||||
export ET_NO_TELEMETRY=FALSE
|
||||
export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"
|
||||
export PATH="$HOME/.pyenv/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
eval "$(fzf --zsh)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
|
||||
export PATH=$PATH:/Users/joshp/.spicetify
|
||||
export DISPLAY=:0
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
eval "$(pyenv init --path)"
|
||||
|
||||
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
|
||||
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
|
||||
export PATH=$PATH:/Users/joshp/.spicetify
|
||||
|
||||
Reference in New Issue
Block a user