diff --git a/dist/toolbar.js b/dist/toolbar.js index 6b3548c..1c11d0e 100644 --- a/dist/toolbar.js +++ b/dist/toolbar.js @@ -1,4 +1,4 @@ -var toolbar=function(){"use strict";function k(){}function Q(t){return t()}function te(){return Object.create(null)}function M(t){t.forEach(Q)}function G(t){return typeof t=="function"}function L(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let J;function Ce(t,e){return J||(J=document.createElement("a")),J.href=e,t===J.href}function ne(t){return Object.keys(t).length===0}function m(t,e){t.appendChild(e)}function y(t,e,n){t.insertBefore(e,n||null)}function S(t){t.parentNode&&t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function C(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function N(t){return document.createTextNode(t)}function E(){return N(" ")}function K(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function o(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Ee(t){return Array.from(t.childNodes)}function X(t,e){e=""+e,t.data!==e&&(t.data=e)}function j(t,e,n){t.classList[n?"add":"remove"](e)}function Me(t){const e={};for(const n of t)e[n.name]=n.value;return e}let Z;function V(t){Z=t}function xe(){if(!Z)throw new Error("Function called outside component initialization");return Z}function ie(t){xe().$$.on_mount.push(t)}const T=[],re=[];let O=[];const oe=[],He=Promise.resolve();let Y=!1;function Le(){Y||(Y=!0,He.then(U))}function R(t){O.push(t)}const ee=new Set;let z=0;function U(){if(z!==0)return;const t=Z;do{try{for(;zt.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),O=e}const P=new Set;let x;function F(){x={r:0,c:[],p:x}}function I(){x.r||M(x.c),x=x.p}function _(t,e){t&&t.i&&(P.delete(t),t.i(e))}function $(t,e,n,i){if(t&&t.o){if(P.has(t))return;P.add(t),x.c.push(()=>{P.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function W(t){t&&t.c()}function B(t,e,n,i){const{fragment:r,after_update:l}=t.$$;r&&r.m(e,n),i||R(()=>{const u=t.$$.on_mount.map(Q).filter(G);t.$$.on_destroy?t.$$.on_destroy.push(...u):M(u),t.$$.on_mount=[]}),l.forEach(R)}function H(t,e){const n=t.$$;n.fragment!==null&&(Te(n.after_update),M(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Oe(t,e){t.$$.dirty[0]===-1&&(T.push(t),Le(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const g=h.length?h[0]:d;return s.ctx&&r(s.ctx[c],s.ctx[c]=g)&&(!s.skip_bound&&s.bound[c]&&s.bound[c](g),a&&Oe(t,c)),d}):[],s.update(),a=!0,M(s.before_update),s.fragment=i?i(s.ctx):!1,e.target){if(e.hydrate){const c=Ee(e.target);s.fragment&&s.fragment.l(c),c.forEach(S)}else s.fragment&&s.fragment.c();e.intro&&_(t.$$.fragment),B(t,e.target,e.anchor,e.customElement),U()}V(f)}let le;typeof HTMLElement=="function"&&(le=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(Q).filter(G);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){M(this.$$.on_disconnect)}$destroy(){H(this,1),this.$destroy=k}$on(t,e){if(!G(e))return k;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!ne(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class q{$destroy(){H(this,1),this.$destroy=k}$on(e,n){if(!G(n))return k;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!ne(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}class ze{constructor(e,n){this.callback=n,new MutationObserver(i=>{i.forEach(r=>{r.attributeName==="class"&&this.setStatus(r.target)})}).observe(e,{attributes:!0}),this.setStatus(e)}setStatus(e){return e.classList.contains("phpdebugbar-closed")?this.callback("closed"):this.callback("minimized")}}const D={get(t){return JSON.parse(localStorage.getItem(t))},set(t,e){localStorage.setItem(t,JSON.stringify(e))},has(t){return localStorage.getItem(t)!==null}};function se(t){let e,n=t[4]()+"";return{c(){e=v("span"),o(e,"class","breakpoints")},m(i,r){y(i,e,r),e.innerHTML=n},p:k,d(i){i&&S(e)}}}function ae(t){let e,n,i;return{c(){e=v("span"),n=N(t[0]),i=N(" px"),o(e,"class","screen_width")},m(r,l){y(r,e,l),m(e,n),m(e,i)},p(r,l){l&1&&X(n,r[0])},d(r){r&&S(e)}}}function Be(t){let e,n,i,r,l,u,p,f,s;R(t[6]);let a=(t[1]==="labels"||t[1]==="both")&&se(t),c=(t[1]==="width"||t[1]==="both")&&ae(t);return{c(){e=v("div"),n=C("svg"),i=C("path"),r=E(),l=v("span"),a&&a.c(),u=E(),c&&c.c(),o(i,"d","M1.25 8.75h12.5M5 13.13h5m-5.75-1.88h6.5c1.05 0 1.58 0 1.98-.2.35-.18.64-.47.82-.82.2-.4.2-.93.2-1.98V4.87c0-1.05 0-1.57-.2-1.97a1.87 1.87 0 0 0-.82-.82c-.4-.2-.93-.2-1.98-.2h-6.5c-1.05 0-1.58 0-1.98.2-.35.18-.64.47-.82.82-.2.4-.2.92-.2 1.98v3.37c0 1.05 0 1.58.2 1.98.18.35.47.64.82.82.4.2.93.2 1.98.2Z"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"fill","none"),o(n,"stroke","currentColor"),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"viewBox","0 0 15 15"),o(n,"class","cell_icon"),o(l,"class","cell_content cell_breakpoint_indicator"),o(e,"role",t[2]?"button":"none"),o(e,"title",p=t[1]==="width"?"Window width":"Current Breakpoint"),o(e,"class","cell")},m(d,h){y(d,e,h),m(e,n),m(n,i),m(e,r),m(e,l),a&&a.m(l,null),m(l,u),c&&c.m(l,null),f||(s=[K(window,"resize",t[6]),K(e,"click",t[3])],f=!0)},p(d,[h]){d[1]==="labels"||d[1]==="both"?a?a.p(d,h):(a=se(d),a.c(),a.m(l,u)):a&&(a.d(1),a=null),d[1]==="width"||d[1]==="both"?c?c.p(d,h):(c=ae(d),c.c(),c.m(l,null)):c&&(c.d(1),c=null),h&2&&p!==(p=d[1]==="width"?"Window width":"Current Breakpoint")&&o(e,"title",p)},i:k,o:k,d(d){d&&S(e),a&&a.d(),c&&c.d(),f=!1,M(s)}}}function Ae(t,e,n){let{breakpoints:i}=e,r=0,l=Object.keys(i).length>=1,u="width";l&&(u=D.get("statamic.toolbar.breakpoints.type")??"labels");function p(){if(l){switch(u){case"labels":n(1,u="both");break;case"both":n(1,u="width");break;default:n(1,u="labels")}D.set("statamic.toolbar.breakpoints.type",u)}}function f(){let a='.breakpoints::before { content: "\\2014" }';return Object.entries(i).forEach(function(c){a+=`@media (${c[1]}) { .breakpoints::before { content: "${c[0]}" } }`}),``}function s(){n(0,r=window.innerWidth)}return t.$$set=a=>{"breakpoints"in a&&n(5,i=a.breakpoints)},[r,u,l,p,f,i,s]}class Ne extends q{constructor(e){super(),A(this,e,Ae,Be,L,{breakpoints:5})}}function Ze(t){let e;return{c(){e=C("path"),o(e,"d","M1.51 7.95c-.08-.14-.13-.2-.15-.31a.73.73 0 0 1 0-.28c.02-.1.07-.17.15-.3.7-1.12 2.8-3.93 5.99-3.93 3.2 0 5.28 2.81 5.99 3.92.08.14.13.2.15.31.02.08.02.2 0 .28-.02.1-.07.17-.15.3-.7 1.12-2.8 3.93-5.99 3.93-3.19 0-5.28-2.81-5.99-3.92Z M7.5 9.38a1.87 1.87 0 1 0 0-3.75 1.87 1.87 0 0 0 0 3.75Z")},m(n,i){y(n,e,i)},d(n){n&&S(e)}}}function Ve(t){let e;return{c(){e=C("path"),o(e,"d","M6.71 3.18c.26-.03.52-.06.79-.06 3.2 0 5.28 2.82 5.99 3.93.08.14.13.2.15.31.02.08.02.2 0 .28-.02.1-.07.17-.15.3-.19.3-.48.72-.85 1.17M4.2 4.2a10 10 0 0 0-2.69 2.85c-.08.14-.13.2-.15.31a.73.73 0 0 0 0 .28c.02.1.07.17.15.3.7 1.12 2.8 3.93 5.99 3.93 1.29 0 2.4-.45 3.3-1.07M1.89 1.87l11.25 11.25M6.17 6.17a1.87 1.87 0 0 0 1.33 3.2c.52 0 .99-.2 1.33-.54")},m(n,i){y(n,e,i)},d(n){n&&S(e)}}}function Fe(t){let e,n,i,r,l;function u(s,a){return s[0]?Ve:Ze}let p=u(t),f=p(t);return{c(){e=v("div"),n=C("svg"),f.c(),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"fill","none"),o(n,"stroke","currentColor"),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"viewBox","0 0 15 15"),o(n,"class","cell_icon"),o(e,"role","button"),o(e,"tabindex","-1"),o(e,"title",i=t[0]?"Show Toolbar":"Hide Toolbar"),o(e,"class","cell")},m(s,a){y(s,e,a),m(e,n),f.m(n,null),r||(l=K(e,"click",t[1]),r=!0)},p(s,[a]){p!==(p=u(s))&&(f.d(1),f=p(s),f&&(f.c(),f.m(n,null))),a&1&&i!==(i=s[0]?"Show Toolbar":"Hide Toolbar")&&o(e,"title",i)},i:k,o:k,d(s){s&&S(e),f.d(),r=!1,l()}}}function Ie(t,e,n){let{callback:i}=e,r=!1;ie(()=>{D.has("statamic.toolbar.hidden")&&(n(0,r=D.get("statamic.toolbar.hidden")),setTimeout(()=>i(r),500))});function l(){n(0,r=!r),D.set("statamic.toolbar.hidden",r),i(r)}return t.$$set=u=>{"callback"in u&&n(2,i=u.callback)},[r,l,i]}class We extends q{constructor(e){super(),A(this,e,Ie,Fe,L,{callback:2})}}function qe(t){let e,n,i,r,l,u,p;return{c(){e=v("div"),n=C("svg"),i=C("path"),r=E(),l=v("span"),u=N(t[0]),o(i,"d","M8.75 1.42V4c0 .35 0 .53.07.66.06.12.15.21.27.27.13.07.31.07.66.07h2.58M10 8.13H5m5 2.5H5m1.25-5H5m3.75-4.38H5.5c-1.05 0-1.58 0-1.98.2-.35.18-.64.47-.82.82-.2.4-.2.93-.2 1.98v6.5c0 1.05 0 1.58.2 1.98.18.35.47.64.82.82.4.2.93.2 1.98.2h4c1.05 0 1.58 0 1.98-.2.35-.18.64-.47.82-.82.2-.4.2-.93.2-1.98V5L8.75 1.25Z"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"fill","none"),o(n,"stroke","currentColor"),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"viewBox","0 0 15 15"),o(n,"class","cell_icon"),o(l,"class","cell_content"),o(e,"title",p="Template: "+t[0]),o(e,"class","cell")},m(f,s){y(f,e,s),m(e,n),m(n,i),m(e,r),m(e,l),m(l,u)},p(f,[s]){s&1&&X(u,f[0]),s&1&&p!==(p="Template: "+f[0])&&o(e,"title",p)},i:k,o:k,d(f){f&&S(e)}}}function De(t,e,n){let{template:i}=e;return t.$$set=r=>{"template"in r&&n(0,i=r.template)},[i]}class Ge extends q{constructor(e){super(),A(this,e,De,qe,L,{template:0})}}function Je(t){let e,n,i;return{c(){e=v("a"),n=C("svg"),i=C("path"),o(i,"d","M13.13 13.13h-5m-6.57.3 3.47-1.33c.22-.08.33-.12.44-.18.09-.05.18-.1.26-.17.1-.07.18-.16.35-.32l7.04-7.05a1.77 1.77 0 1 0-2.5-2.5L3.58 8.93a3.9 3.9 0 0 0-.33.34l-.17.26c-.06.1-.1.22-.18.44l-1.34 3.47Zm0 0 1.29-3.34c.1-.24.14-.36.22-.41a.31.31 0 0 1 .23-.05c.1.02.19.1.37.29l1.41 1.41c.18.18.27.27.3.37 0 .08-.01.17-.06.23-.05.08-.17.13-.41.22l-3.35 1.29Z"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"fill","none"),o(n,"stroke","currentColor"),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"viewBox","0 0 15 15"),o(n,"class","cell_icon"),o(e,"href",t[0]),o(e,"target","_blank"),o(e,"rel","noreferrer"),o(e,"title","Edit this page"),o(e,"class","cell")},m(r,l){y(r,e,l),m(e,n),m(n,i)},p(r,[l]){l&1&&o(e,"href",r[0])},i:k,o:k,d(r){r&&S(e)}}}function Re(t,e,n){let{cp_link:i}=e;return t.$$set=r=>{"cp_link"in r&&n(0,i=r.cp_link)},[i]}class Ue extends q{constructor(e){super(),A(this,e,Re,Je,L,{cp_link:0})}}function Pe(t){let e,n,i,r,l,u,p;return{c(){e=v("div"),n=C("svg"),i=C("path"),r=E(),l=v("span"),u=N(t[0]),o(i,"d","M9.38 1.54a6.25 6.25 0 1 0 3.62 3m-2.38-.95h0M6.57 13.68V12.3c0-.07.03-.14.08-.2l1.55-1.81a.31.31 0 0 0-.08-.48L6.32 8.8a.31.31 0 0 1-.11-.11L5.04 6.64a.31.31 0 0 0-.3-.16l-3.45.3m11.84-3.03c0 1.38-1.26 2.5-2.5 3.75-1.26-1.25-2.5-2.37-2.5-3.75a2.5 2.5 0 0 1 5 0Zm-2.35-.16a.16.16 0 1 1-.31 0 .16.16 0 0 1 .31 0Z"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"fill","none"),o(n,"stroke","currentColor"),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"viewBox","0 0 15 15"),o(n,"class","cell_icon"),o(l,"class","cell_content"),o(e,"title",p="Site: "+t[0]),o(e,"class","cell")},m(f,s){y(f,e,s),m(e,n),m(n,i),m(e,r),m(e,l),m(l,u)},p(f,[s]){s&1&&X(u,f[0]),s&1&&p!==(p="Site: "+f[0])&&o(e,"title",p)},i:k,o:k,d(f){f&&S(e)}}}function Qe(t,e,n){let{site:i}=e;return t.$$set=r=>{"site"in r&&n(0,i=r.site)},[i]}class Ke extends q{constructor(e){super(),A(this,e,Qe,Pe,L,{site:0})}}function ce(t){let e,n;return e=new Ne({props:{breakpoints:t[0].breakpoints}}),{c(){W(e.$$.fragment)},m(i,r){B(e,i,r),n=!0},p(i,r){const l={};r&1&&(l.breakpoints=i[0].breakpoints),e.$set(l)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){$(e.$$.fragment,i),n=!1},d(i){H(e,i)}}}function fe(t){let e,n;return e=new Ke({props:{site:t[0].site}}),{c(){W(e.$$.fragment)},m(i,r){B(e,i,r),n=!0},p(i,r){const l={};r&1&&(l.site=i[0].site),e.$set(l)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){$(e.$$.fragment,i),n=!1},d(i){H(e,i)}}}function ue(t){let e,n;return e=new Ge({props:{template:t[0].template}}),{c(){W(e.$$.fragment)},m(i,r){B(e,i,r),n=!0},p(i,r){const l={};r&1&&(l.template=i[0].template),e.$set(l)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){$(e.$$.fragment,i),n=!1},d(i){H(e,i)}}}function de(t){let e,n;return e=new Ue({props:{cp_link:t[0].cp_link}}),{c(){W(e.$$.fragment)},m(i,r){B(e,i,r),n=!0},p(i,r){const l={};r&1&&(l.cp_link=i[0].cp_link),e.$set(l)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){$(e.$$.fragment,i),n=!1},d(i){H(e,i)}}}function pe(t){let e,n;return e=new We({props:{callback:t[4]}}),{c(){W(e.$$.fragment)},m(i,r){B(e,i,r),n=!0},p(i,r){const l={};r&2&&(l.callback=i[4]),e.$set(l)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){$(e.$$.fragment,i),n=!1},d(i){H(e,i)}}}function Xe(t){var me,be,_e,ge,ke;let e,n,i,r,l,u,p,f,s,a=((me=t[0])==null?void 0:me.breakpoints)&&ce(t),c=((be=t[0])==null?void 0:be.site)&&fe(t),d=((_e=t[0])==null?void 0:_e.template)&&ue(t),h=((ge=t[0])==null?void 0:ge.cp_link)&&de(t),g=((ke=t[0])==null?void 0:ke.visibility)&&pe(t);return{c(){e=v("div"),a&&a.c(),n=E(),c&&c.c(),i=E(),d&&d.c(),r=E(),h&&h.c(),l=E(),g&&g.c(),u=E(),p=v("style"),p.textContent=`@keyframes loaded { +var toolbar=function(){"use strict";var re=Object.defineProperty;var oe=(g,x,j)=>x in g?re(g,x,{enumerable:!0,configurable:!0,writable:!0,value:j}):g[x]=j;var E=(g,x,j)=>(oe(g,typeof x!="symbol"?x+"":x,j),j);function g(){}function x(e){return e()}function j(){return Object.create(null)}function H(e){e.forEach(x)}function rt(e){return typeof e=="function"}function A(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Q;function Ht(e,t){return e===t?!0:(Q||(Q=document.createElement("a")),Q.href=t,e===Q.href)}function At(e){return Object.keys(e).length===0}function p(e,t){e.appendChild(t)}function S(e,t,n){e.insertBefore(t,n||null)}function y(e){e.parentNode&&e.parentNode.removeChild(e)}function v(e){return document.createElement(e)}function C(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function J(e){return document.createTextNode(e)}function M(){return J(" ")}function tt(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function s(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Bt(e){return Array.from(e.childNodes)}function et(e,t){t=""+t,e.data!==t&&(e.data=t)}function B(e,t,n){e.classList.toggle(t,!!n)}function Nt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let W;function q(e){W=e}function Tt(){if(!W)throw new Error("Function called outside component initialization");return W}function ot(e){Tt().$$.on_mount.push(e)}const N=[],st=[];let T=[];const lt=[],zt=Promise.resolve();let nt=!1;function Pt(){nt||(nt=!0,zt.then(L))}function K(e){T.push(e)}const it=new Set;let z=0;function L(){if(z!==0)return;const e=W;do{try{for(;ze.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),T=t}const X=new Set;let O;function D(){O={r:0,c:[],p:O}}function R(){O.r||H(O.c),O=O.p}function m(e,t){e&&e.i&&(X.delete(e),e.i(t))}function k(e,t,n,i){if(e&&e.o){if(X.has(e))return;X.add(e),O.c.push(()=>{X.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function U(e){e&&e.c()}function P(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),K(()=>{const o=e.$$.on_mount.map(x).filter(rt);e.$$.on_destroy?e.$$.on_destroy.push(...o):H(o),e.$$.on_mount=[]}),r.forEach(K)}function V(e,t){const n=e.$$;n.fragment!==null&&(Zt(n.after_update),H(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function It(e,t){e.$$.dirty[0]===-1&&(N.push(e),Pt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const _=$.length?$[0]:h;return l.ctx&&r(l.ctx[d],l.ctx[d]=_)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](_),u&&It(e,d)),h}):[],l.update(),u=!0,H(l.before_update),l.fragment=i?i(l.ctx):!1,t.target){if(t.hydrate){const d=Bt(t.target);l.fragment&&l.fragment.l(d),d.forEach(y)}else l.fragment&&l.fragment.c();t.intro&&m(e.$$.fragment),P(e,t.target,t.anchor),L()}q(a)}let ct;typeof HTMLElement=="function"&&(ct=class extends HTMLElement{constructor(t,n,i){super();E(this,"$$ctor");E(this,"$$s");E(this,"$$c");E(this,"$$cn",!1);E(this,"$$d",{});E(this,"$$r",!1);E(this,"$$p_d",{});E(this,"$$l",{});E(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,i&&this.attachShadow({mode:"open"})}addEventListener(t,n,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const r=this.$$c.$on(t,n);this.$$l_u.set(n,r)}super.addEventListener(t,n,i)}removeEventListener(t,n,i){if(super.removeEventListener(t,n,i),this.$$c){const r=this.$$l_u.get(n);r&&(r(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let c;return{c:function(){c=v("slot"),o!=="default"&&s(c,"name",o)},m:function(l,u){S(l,c,u)},d:function(l){l&&y(c)}}}};if(await Promise.resolve(),!this.$$cn)return;const n={},i=Nt(this);for(const o of this.$$s)o in i&&(n[o]=[t(o)]);for(const o of this.attributes){const c=this.$$g_p(o.name);c in this.$$d||(this.$$d[c]=Y(c,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const r=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const c=Y(o,this.$$d[o],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,c)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const o in this.$$l)for(const c of this.$$l[o]){const f=this.$$c.$on(o,c);this.$$l_u.set(c,f)}this.$$l={}}}attributeChangedCallback(t,n,i){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Y(t,i,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function Y(e,t,n,i){var o;const r=(o=n[e])==null?void 0:o.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!n[e])return t;if(i==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function I(e,t,n,i,r,o){let c=class extends ct{constructor(){super(e,n,r),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(f=>(t[f].attribute||f).toLowerCase())}};return Object.keys(t).forEach(f=>{Object.defineProperty(c.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(a){var l;a=Y(f,a,t),this.$$d[f]=a,(l=this.$$c)==null||l.$set({[f]:a})}})}),i.forEach(f=>{Object.defineProperty(c.prototype,f,{get(){var a;return(a=this.$$c)==null?void 0:a[f]}})}),o&&(c=o(c)),e.element=c,c}class F{constructor(){E(this,"$$");E(this,"$$set")}$destroy(){V(this,1),this.$destroy=g}$on(t,n){if(!rt(n))return g;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!At(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ft="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ft);class Jt{constructor(t,n){this.callback=n,new MutationObserver(i=>{i.forEach(r=>{r.attributeName==="class"&&this.setStatus(r.target)})}).observe(t,{attributes:!0}),this.setStatus(t)}setStatus(t){return t.classList.contains("phpdebugbar-closed")?this.callback("closed"):this.callback("minimized")}}const G={get(e){return JSON.parse(localStorage.getItem(e))},set(e,t){localStorage.setItem(e,JSON.stringify(t))},has(e){return localStorage.getItem(e)!==null}};function at(e){let t,n=e[4]()+"";return{c(){t=v("span"),s(t,"class","breakpoints")},m(i,r){S(i,t,r),t.innerHTML=n},p:g,d(i){i&&y(t)}}}function ut(e){let t,n,i;return{c(){t=v("span"),n=J(e[0]),i=J(" px"),s(t,"class","screen_width")},m(r,o){S(r,t,o),p(t,n),p(t,i)},p(r,o){o&1&&et(n,r[0])},d(r){r&&y(t)}}}function Wt(e){let t,n,i,r,o,c,f,a,l;K(e[6]);let u=(e[1]==="labels"||e[1]==="both")&&at(e),d=(e[1]==="width"||e[1]==="both")&&ut(e);return{c(){t=v("div"),n=C("svg"),i=C("path"),r=M(),o=v("span"),u&&u.c(),c=M(),d&&d.c(),s(i,"d","M1.25 8.75h12.5M5 13.13h5m-5.75-1.88h6.5c1.05 0 1.58 0 1.98-.2.35-.18.64-.47.82-.82.2-.4.2-.93.2-1.98V4.87c0-1.05 0-1.57-.2-1.97a1.87 1.87 0 0 0-.82-.82c-.4-.2-.93-.2-1.98-.2h-6.5c-1.05 0-1.58 0-1.98.2-.35.18-.64.47-.82.82-.2.4-.2.92-.2 1.98v3.37c0 1.05 0 1.58.2 1.98.18.35.47.64.82.82.4.2.93.2 1.98.2Z"),s(n,"xmlns","http://www.w3.org/2000/svg"),s(n,"fill","none"),s(n,"stroke","currentColor"),s(n,"stroke-linecap","round"),s(n,"stroke-linejoin","round"),s(n,"viewBox","0 0 15 15"),s(n,"class","cell_icon"),s(o,"class","cell_content cell_breakpoint_indicator"),s(t,"role",e[2]?"button":"none"),s(t,"title",f=e[1]==="width"?"Window width":"Current Breakpoint"),s(t,"class","cell")},m(h,$){S(h,t,$),p(t,n),p(n,i),p(t,r),p(t,o),u&&u.m(o,null),p(o,c),d&&d.m(o,null),a||(l=[tt(window,"resize",e[6]),tt(t,"click",e[3])],a=!0)},p(h,[$]){h[1]==="labels"||h[1]==="both"?u?u.p(h,$):(u=at(h),u.c(),u.m(o,c)):u&&(u.d(1),u=null),h[1]==="width"||h[1]==="both"?d?d.p(h,$):(d=ut(h),d.c(),d.m(o,null)):d&&(d.d(1),d=null),$&2&&f!==(f=h[1]==="width"?"Window width":"Current Breakpoint")&&s(t,"title",f)},i:g,o:g,d(h){h&&y(t),u&&u.d(),d&&d.d(),a=!1,H(l)}}}function qt(e,t,n){let{breakpoints:i}=t,r=0,o=Object.keys(i).length>=1,c="width";o&&(c=G.get("statamic.toolbar.breakpoints.type")??"labels");function f(){if(o){switch(c){case"labels":n(1,c="both");break;case"both":n(1,c="width");break;default:n(1,c="labels")}G.set("statamic.toolbar.breakpoints.type",c)}}function a(){let u='.breakpoints::before { content: "\\2014" }';return Object.entries(i).forEach(function(d){u+=`@media (${d[1]}) { .breakpoints::before { content: "${d[0]}" } }`}),``}function l(){n(0,r=window.innerWidth)}return e.$$set=u=>{"breakpoints"in u&&n(5,i=u.breakpoints)},[r,c,o,f,a,i,l]}class ft extends F{constructor(t){super(),Z(this,t,qt,Wt,A,{breakpoints:5})}get breakpoints(){return this.$$.ctx[5]}set breakpoints(t){this.$$set({breakpoints:t}),L()}}I(ft,{breakpoints:{}},[],[],!0);function Dt(e){let t;return{c(){t=C("path"),s(t,"d","M1.51 7.95c-.08-.14-.13-.2-.15-.31a.73.73 0 0 1 0-.28c.02-.1.07-.17.15-.3.7-1.12 2.8-3.93 5.99-3.93 3.2 0 5.28 2.81 5.99 3.92.08.14.13.2.15.31.02.08.02.2 0 .28-.02.1-.07.17-.15.3-.7 1.12-2.8 3.93-5.99 3.93-3.19 0-5.28-2.81-5.99-3.92Z M7.5 9.38a1.87 1.87 0 1 0 0-3.75 1.87 1.87 0 0 0 0 3.75Z")},m(n,i){S(n,t,i)},d(n){n&&y(t)}}}function Rt(e){let t;return{c(){t=C("path"),s(t,"d","M6.71 3.18c.26-.03.52-.06.79-.06 3.2 0 5.28 2.82 5.99 3.93.08.14.13.2.15.31.02.08.02.2 0 .28-.02.1-.07.17-.15.3-.19.3-.48.72-.85 1.17M4.2 4.2a10 10 0 0 0-2.69 2.85c-.08.14-.13.2-.15.31a.73.73 0 0 0 0 .28c.02.1.07.17.15.3.7 1.12 2.8 3.93 5.99 3.93 1.29 0 2.4-.45 3.3-1.07M1.89 1.87l11.25 11.25M6.17 6.17a1.87 1.87 0 0 0 1.33 3.2c.52 0 .99-.2 1.33-.54")},m(n,i){S(n,t,i)},d(n){n&&y(t)}}}function Ut(e){let t,n,i,r,o;function c(l,u){return l[0]?Rt:Dt}let f=c(e),a=f(e);return{c(){t=v("div"),n=C("svg"),a.c(),s(n,"xmlns","http://www.w3.org/2000/svg"),s(n,"fill","none"),s(n,"stroke","currentColor"),s(n,"stroke-linecap","round"),s(n,"stroke-linejoin","round"),s(n,"viewBox","0 0 15 15"),s(n,"class","cell_icon"),s(t,"role","button"),s(t,"tabindex","-1"),s(t,"title",i=e[0]?"Show Toolbar":"Hide Toolbar"),s(t,"class","cell")},m(l,u){S(l,t,u),p(t,n),a.m(n,null),r||(o=tt(t,"click",e[1]),r=!0)},p(l,[u]){f!==(f=c(l))&&(a.d(1),a=f(l),a&&(a.c(),a.m(n,null))),u&1&&i!==(i=l[0]?"Show Toolbar":"Hide Toolbar")&&s(t,"title",i)},i:g,o:g,d(l){l&&y(t),a.d(),r=!1,o()}}}function Gt(e,t,n){let{callback:i}=t,r=!1;ot(()=>{G.has("statamic.toolbar.hidden")&&(n(0,r=G.get("statamic.toolbar.hidden")),setTimeout(()=>i(r),500))});function o(){n(0,r=!r),G.set("statamic.toolbar.hidden",r),i(r)}return e.$$set=c=>{"callback"in c&&n(2,i=c.callback)},[r,o,i]}class dt extends F{constructor(t){super(),Z(this,t,Gt,Ut,A,{callback:2})}get callback(){return this.$$.ctx[2]}set callback(t){this.$$set({callback:t}),L()}}I(dt,{callback:{}},[],[],!0);function Qt(e){let t,n,i,r,o,c,f;return{c(){t=v("div"),n=C("svg"),i=C("path"),r=M(),o=v("span"),c=J(e[0]),s(i,"d","M8.75 1.42V4c0 .35 0 .53.07.66.06.12.15.21.27.27.13.07.31.07.66.07h2.58M10 8.13H5m5 2.5H5m1.25-5H5m3.75-4.38H5.5c-1.05 0-1.58 0-1.98.2-.35.18-.64.47-.82.82-.2.4-.2.93-.2 1.98v6.5c0 1.05 0 1.58.2 1.98.18.35.47.64.82.82.4.2.93.2 1.98.2h4c1.05 0 1.58 0 1.98-.2.35-.18.64-.47.82-.82.2-.4.2-.93.2-1.98V5L8.75 1.25Z"),s(n,"xmlns","http://www.w3.org/2000/svg"),s(n,"fill","none"),s(n,"stroke","currentColor"),s(n,"stroke-linecap","round"),s(n,"stroke-linejoin","round"),s(n,"viewBox","0 0 15 15"),s(n,"class","cell_icon"),s(o,"class","cell_content"),s(t,"title",f="Template: "+e[0]),s(t,"class","cell")},m(a,l){S(a,t,l),p(t,n),p(n,i),p(t,r),p(t,o),p(o,c)},p(a,[l]){l&1&&et(c,a[0]),l&1&&f!==(f="Template: "+a[0])&&s(t,"title",f)},i:g,o:g,d(a){a&&y(t)}}}function Kt(e,t,n){let{template:i}=t;return e.$$set=r=>{"template"in r&&n(0,i=r.template)},[i]}class ht extends F{constructor(t){super(),Z(this,t,Kt,Qt,A,{template:0})}get template(){return this.$$.ctx[0]}set template(t){this.$$set({template:t}),L()}}I(ht,{template:{}},[],[],!0);function Xt(e){let t,n,i;return{c(){t=v("a"),n=C("svg"),i=C("path"),s(i,"d","M13.13 13.13h-5m-6.57.3 3.47-1.33c.22-.08.33-.12.44-.18.09-.05.18-.1.26-.17.1-.07.18-.16.35-.32l7.04-7.05a1.77 1.77 0 1 0-2.5-2.5L3.58 8.93a3.9 3.9 0 0 0-.33.34l-.17.26c-.06.1-.1.22-.18.44l-1.34 3.47Zm0 0 1.29-3.34c.1-.24.14-.36.22-.41a.31.31 0 0 1 .23-.05c.1.02.19.1.37.29l1.41 1.41c.18.18.27.27.3.37 0 .08-.01.17-.06.23-.05.08-.17.13-.41.22l-3.35 1.29Z"),s(n,"xmlns","http://www.w3.org/2000/svg"),s(n,"fill","none"),s(n,"stroke","currentColor"),s(n,"stroke-linecap","round"),s(n,"stroke-linejoin","round"),s(n,"viewBox","0 0 15 15"),s(n,"class","cell_icon"),s(t,"href",e[0]),s(t,"target","_blank"),s(t,"rel","noreferrer"),s(t,"title","Edit this page"),s(t,"class","cell")},m(r,o){S(r,t,o),p(t,n),p(n,i)},p(r,[o]){o&1&&s(t,"href",r[0])},i:g,o:g,d(r){r&&y(t)}}}function Yt(e,t,n){let{cp_link:i}=t;return e.$$set=r=>{"cp_link"in r&&n(0,i=r.cp_link)},[i]}class $t extends F{constructor(t){super(),Z(this,t,Yt,Xt,A,{cp_link:0})}get cp_link(){return this.$$.ctx[0]}set cp_link(t){this.$$set({cp_link:t}),L()}}I($t,{cp_link:{}},[],[],!0);function te(e){let t,n,i,r,o,c,f;return{c(){t=v("div"),n=C("svg"),i=C("path"),r=M(),o=v("span"),c=J(e[0]),s(i,"d","M9.38 1.54a6.25 6.25 0 1 0 3.62 3m-2.38-.95h0M6.57 13.68V12.3c0-.07.03-.14.08-.2l1.55-1.81a.31.31 0 0 0-.08-.48L6.32 8.8a.31.31 0 0 1-.11-.11L5.04 6.64a.31.31 0 0 0-.3-.16l-3.45.3m11.84-3.03c0 1.38-1.26 2.5-2.5 3.75-1.26-1.25-2.5-2.37-2.5-3.75a2.5 2.5 0 0 1 5 0Zm-2.35-.16a.16.16 0 1 1-.31 0 .16.16 0 0 1 .31 0Z"),s(n,"xmlns","http://www.w3.org/2000/svg"),s(n,"fill","none"),s(n,"stroke","currentColor"),s(n,"stroke-linecap","round"),s(n,"stroke-linejoin","round"),s(n,"viewBox","0 0 15 15"),s(n,"class","cell_icon"),s(o,"class","cell_content"),s(t,"title",f="Site: "+e[0]),s(t,"class","cell")},m(a,l){S(a,t,l),p(t,n),p(n,i),p(t,r),p(t,o),p(o,c)},p(a,[l]){l&1&&et(c,a[0]),l&1&&f!==(f="Site: "+a[0])&&s(t,"title",f)},i:g,o:g,d(a){a&&y(t)}}}function ee(e,t,n){let{site:i}=t;return e.$$set=r=>{"site"in r&&n(0,i=r.site)},[i]}class pt extends F{constructor(t){super(),Z(this,t,ee,te,A,{site:0})}get site(){return this.$$.ctx[0]}set site(t){this.$$set({site:t}),L()}}I(pt,{site:{}},[],[],!0);function bt(e){let t,n;return t=new ft({props:{breakpoints:e[0].breakpoints}}),{c(){U(t.$$.fragment)},m(i,r){P(t,i,r),n=!0},p(i,r){const o={};r&1&&(o.breakpoints=i[0].breakpoints),t.$set(o)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){V(t,i)}}}function mt(e){let t,n;return t=new pt({props:{site:e[0].site}}),{c(){U(t.$$.fragment)},m(i,r){P(t,i,r),n=!0},p(i,r){const o={};r&1&&(o.site=i[0].site),t.$set(o)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){V(t,i)}}}function _t(e){let t,n;return t=new ht({props:{template:e[0].template}}),{c(){U(t.$$.fragment)},m(i,r){P(t,i,r),n=!0},p(i,r){const o={};r&1&&(o.template=i[0].template),t.$set(o)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){V(t,i)}}}function gt(e){let t,n;return t=new $t({props:{cp_link:e[0].cp_link}}),{c(){U(t.$$.fragment)},m(i,r){P(t,i,r),n=!0},p(i,r){const o={};r&1&&(o.cp_link=i[0].cp_link),t.$set(o)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){V(t,i)}}}function kt(e){let t,n;return t=new dt({props:{callback:e[4]}}),{c(){U(t.$$.fragment)},m(i,r){P(t,i,r),n=!0},p(i,r){const o={};r&2&&(o.callback=i[4]),t.$set(o)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){V(t,i)}}}function ne(e){var vt,yt,Et,St,Ct;let t,n,i,r,o,c,f,a,l,u=((vt=e[0])==null?void 0:vt.breakpoints)&&bt(e),d=((yt=e[0])==null?void 0:yt.site)&&mt(e),h=((Et=e[0])==null?void 0:Et.template)&&_t(e),$=((St=e[0])==null?void 0:St.cp_link)&>(e),_=((Ct=e[0])==null?void 0:Ct.visibility)&&kt(e);return{c(){t=v("div"),u&&u.c(),n=M(),d&&d.c(),i=M(),h&&h.c(),r=M(),$&&$.c(),o=M(),_&&_.c(),c=M(),f=v("style"),f.textContent=`@keyframes loaded { from { opacity: 0; } @@ -96,4 +96,4 @@ var toolbar=function(){"use strict";function k(){}function Q(t){return t()}funct #toolbar.debugbarOpen, #toolbar.debugbarMinimized { height: 30px; bottom: 33px; -}`,this.c=k,Ce(p.src,f="./../css/toolbar.scss")||o(p,"src",f),o(e,"id","toolbar"),j(e,"isHidden",t[1]),j(e,"debugbarClosed",t[2]==="closed"),j(e,"debugbarMinimized",t[2]==="minimized")},m(b,w){y(b,e,w),a&&a.m(e,null),m(e,n),c&&c.m(e,null),m(e,i),d&&d.m(e,null),m(e,r),h&&h.m(e,null),m(e,l),g&&g.m(e,null),m(e,u),m(e,p),s=!0},p(b,[w]){var $e,we,ve,ye,Se;($e=b[0])!=null&&$e.breakpoints?a?(a.p(b,w),w&1&&_(a,1)):(a=ce(b),a.c(),_(a,1),a.m(e,n)):a&&(F(),$(a,1,1,()=>{a=null}),I()),(we=b[0])!=null&&we.site?c?(c.p(b,w),w&1&&_(c,1)):(c=fe(b),c.c(),_(c,1),c.m(e,i)):c&&(F(),$(c,1,1,()=>{c=null}),I()),(ve=b[0])!=null&&ve.template?d?(d.p(b,w),w&1&&_(d,1)):(d=ue(b),d.c(),_(d,1),d.m(e,r)):d&&(F(),$(d,1,1,()=>{d=null}),I()),(ye=b[0])!=null&&ye.cp_link?h?(h.p(b,w),w&1&&_(h,1)):(h=de(b),h.c(),_(h,1),h.m(e,l)):h&&(F(),$(h,1,1,()=>{h=null}),I()),(Se=b[0])!=null&&Se.visibility?g?(g.p(b,w),w&1&&_(g,1)):(g=pe(b),g.c(),_(g,1),g.m(e,u)):g&&(F(),$(g,1,1,()=>{g=null}),I()),(!s||w&2)&&j(e,"isHidden",b[1]),(!s||w&4)&&j(e,"debugbarClosed",b[2]==="closed"),(!s||w&4)&&j(e,"debugbarMinimized",b[2]==="minimized")},i(b){s||(_(a),_(c),_(d),_(h),_(g),s=!0)},o(b){$(a),$(c),$(d),$(h),$(g),s=!1},d(b){b&&S(e),a&&a.d(),c&&c.d(),d&&d.d(),h&&h.d(),g&&g.d()}}}function Ye(t,e,n){let{endpoint:i}=e,r=null,l=!1,u=null;ie(()=>{fetch(i+"?origin="+encodeURIComponent(document.location.href)).then(s=>s.json()).then(s=>n(0,r=s));const f=document.documentElement.querySelector(".phpdebugbar");f&&new ze(f,s=>n(2,u=s))});const p=f=>n(1,l=f);return t.$$set=f=>{"endpoint"in f&&n(3,i=f.endpoint)},[r,l,u,i,p]}class he extends le{constructor(e){super(),A(this,{target:this.shadowRoot,props:Me(this.attributes),customElement:!0},Ye,Xe,L,{endpoint:3},null),e&&(e.target&&y(e.target,this,e.anchor),e.props&&(this.$set(e.props),U()))}static get observedAttributes(){return["endpoint"]}get endpoint(){return this.$$.ctx[3]}set endpoint(e){this.$$set({endpoint:e}),U()}}return customElements.define("statamic-toolbar",he),he}(); +}`,Ht(f.src,a="./../css/toolbar.scss")||s(f,"src",a),s(t,"id","toolbar"),B(t,"isHidden",e[1]),B(t,"debugbarClosed",e[2]==="closed"),B(t,"debugbarMinimized",e[2]==="minimized")},m(b,w){S(b,t,w),u&&u.m(t,null),p(t,n),d&&d.m(t,null),p(t,i),h&&h.m(t,null),p(t,r),$&&$.m(t,null),p(t,o),_&&_.m(t,null),p(t,c),p(t,f),l=!0},p(b,[w]){var xt,Mt,jt,Lt,Ot;(xt=b[0])!=null&&xt.breakpoints?u?(u.p(b,w),w&1&&m(u,1)):(u=bt(b),u.c(),m(u,1),u.m(t,n)):u&&(D(),k(u,1,1,()=>{u=null}),R()),(Mt=b[0])!=null&&Mt.site?d?(d.p(b,w),w&1&&m(d,1)):(d=mt(b),d.c(),m(d,1),d.m(t,i)):d&&(D(),k(d,1,1,()=>{d=null}),R()),(jt=b[0])!=null&&jt.template?h?(h.p(b,w),w&1&&m(h,1)):(h=_t(b),h.c(),m(h,1),h.m(t,r)):h&&(D(),k(h,1,1,()=>{h=null}),R()),(Lt=b[0])!=null&&Lt.cp_link?$?($.p(b,w),w&1&&m($,1)):($=gt(b),$.c(),m($,1),$.m(t,o)):$&&(D(),k($,1,1,()=>{$=null}),R()),(Ot=b[0])!=null&&Ot.visibility?_?(_.p(b,w),w&1&&m(_,1)):(_=kt(b),_.c(),m(_,1),_.m(t,c)):_&&(D(),k(_,1,1,()=>{_=null}),R()),(!l||w&2)&&B(t,"isHidden",b[1]),(!l||w&4)&&B(t,"debugbarClosed",b[2]==="closed"),(!l||w&4)&&B(t,"debugbarMinimized",b[2]==="minimized")},i(b){l||(m(u),m(d),m(h),m($),m(_),l=!0)},o(b){k(u),k(d),k(h),k($),k(_),l=!1},d(b){b&&y(t),u&&u.d(),d&&d.d(),h&&h.d(),$&&$.d(),_&&_.d()}}}function ie(e,t,n){let{endpoint:i}=t,r=null,o=!1,c=null;ot(()=>{fetch(i+"?origin="+encodeURIComponent(document.location.href)).then(l=>l.json()).then(l=>n(0,r=l));const a=document.documentElement.querySelector(".phpdebugbar");a&&new Jt(a,l=>n(2,c=l))});const f=a=>n(1,o=a);return e.$$set=a=>{"endpoint"in a&&n(3,i=a.endpoint)},[r,o,c,i,f]}class wt extends F{constructor(t){super(),Z(this,t,ie,ne,A,{endpoint:3})}get endpoint(){return this.$$.ctx[3]}set endpoint(t){this.$$set({endpoint:t}),L()}}return customElements.define("statamic-toolbar",I(wt,{endpoint:{}},[],[],!0)),wt}(); diff --git a/package.json b/package.json index b03d233..8ac5647 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,12 @@ "lint:fix": "npx eslint resources/js/**/*.{js,svelte} --fix" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^2.4.6", - "eslint": "^8.51.0", - "eslint-plugin-svelte3": "^4.0.0", - "sass": "^1.69.3", - "svelte": "^3.59.2", - "svelte-preprocess": "^5.0.4", - "vite": "^4.4.11" + "@sveltejs/vite-plugin-svelte": "^3.0.2", + "eslint": "^8.56.0", + "eslint-plugin-svelte": "^2.35.1", + "sass": "^1.70.0", + "svelte": "^4.2.9", + "svelte-preprocess": "^5.1.3", + "vite": "^5.0.12" } } diff --git a/resources/js/Toolbar.svelte b/resources/js/Toolbar.svelte index 973f58b..4fc426a 100644 --- a/resources/js/Toolbar.svelte +++ b/resources/js/Toolbar.svelte @@ -1,3 +1,5 @@ + + diff --git a/vite.config.js b/vite.config.js index 2b2f50d..0933c49 100644 --- a/vite.config.js +++ b/vite.config.js @@ -14,10 +14,8 @@ export default defineConfig({ }, plugins: [ svelte({ - include: 'resources/js/Toolbar.svelte', compilerOptions: { customElement: true, - tag: 'statamic-toolbar', }, preprocess: sveltePreprocess({ scss: { @@ -25,11 +23,5 @@ export default defineConfig({ }, }), }), - svelte({ - exclude: 'resources/js/Toolbar.svelte', - compilerOptions: { - customElement: false, - }, - }), ], });