From 05f0cef20f7bd6e3397ad8303ca17bcd44b014ea Mon Sep 17 00:00:00 2001 From: "Nate Hopkins (hopsoft)" Date: Wed, 6 Sep 2023 13:54:58 -0600 Subject: [PATCH] Version bump --- app/assets/builds/@turbo-boost/elements.js | 47 +++++-------------- .../builds/@turbo-boost/elements.js.map | 8 ++-- .../@turbo-boost/elements.metafile.json | 2 +- lib/turbo_boost/elements/version.rb | 2 +- package.json | 8 ++-- yarn.lock | 42 ++++++++--------- 6 files changed, 44 insertions(+), 65 deletions(-) diff --git a/app/assets/builds/@turbo-boost/elements.js b/app/assets/builds/@turbo-boost/elements.js index 1a5f8ef..afb11ce 100644 --- a/app/assets/builds/@turbo-boost/elements.js +++ b/app/assets/builds/@turbo-boost/elements.js @@ -1,4 +1,4 @@ -var Fe=Object.defineProperty,We=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,ce=(e,t,o)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,l=(e,t)=>{for(var o in t||(t={}))Je.call(t,o)&&ce(e,o,t[o]);if(ue)for(var o of ue(t))Ge.call(t,o)&&ce(e,o,t[o]);return e},p=(e,t)=>We(e,Xe(t)),Ve=class{get element(){return document.querySelector('meta[name="turbo-boost"]')}get token(){return this.element.getAttribute("content")}get busy(){return this.element.dataset.busy==="true"}set busy(e){return this.element.dataset.busy=!!e}},d=new Ve,u={start:"turbo-boost:command:start",success:"turbo-boost:command:success",finish:"turbo-boost:command:finish",abort:"turbo-boost:command:abort",clientError:"turbo-boost:command:client-error",serverError:"turbo-boost:command:server-error"},v={stateLoad:"turbo-boost:state:load",stateChange:"turbo-boost:state:change"},g=l(l({},u),v);function h(e,t,o={}){return new Promise(r=>{o=o||{},o.detail=o.detail||{},t=t||document;let n=new CustomEvent(e,p(l({},o),{bubbles:!0}));t.dispatchEvent(n),r(n)})}var W;function q(e,t=null){if(!e||typeof e!="object")return e;let o=new Proxy(e,{deleteProperty(r,n){return delete r[n],h(v.stateChange,d.element,{detail:{state:W}}),!0},set(r,n,i,s){return r[n]=q(i,this),h(v.stateChange,d.element,{detail:{state:W}}),!0}});if(Array.isArray(e))e.forEach((r,n)=>e[n]=q(r,o));else if(typeof e=="object")for(let[r,n]of Object.entries(e))e[r]=q(n,o);return t||(W=o),o}var Ue=q,U,k,$,he;function pe(){if(!d.element)return T();let e=atob(d.element.dataset.state);$={},k=Ue(JSON.parse(e)),U=l({},k),delete d.element.dataset.clientStateChange,setTimeout(()=>h(v.stateLoad,d.element,{detail:{state:k}}))}function T(){clearTimeout(he),he=setTimeout(pe,10)}U||pe();addEventListener("DOMContentLoaded",T);addEventListener("load",T);addEventListener("turbo:load",T);addEventListener("turbo:frame-load",T);addEventListener(u.success,T);addEventListener(v.stateChange,e=>{$={};for(let[t,o]of Object.entries(k))U[t]!==o&&($[t]=o);d.element.dataset.clientStateChange=!0,d.element.dataset.state=btoa(JSON.stringify(k))});var M={events:v,get current(){return k},get delta(){return $},get payloadChunks(){return btoa(JSON.stringify($)).match(/.{1,2000}/g)}};function Ke(e){let t="=0&&n>=0){let i=e.slice(e.indexOf(">",r)+1,n);document.documentElement.innerHTML=i}}function Qe(e){document.body.insertAdjacentHTML("beforeend",e)}var O={append:Qe,replaceDocument:Ke},P={};function Ye(e){P[e.id]=e}function Ze(e){delete P[e]}var fe={add:Ye,remove:Ze,get commands(){return[...Object.values(P)]},get length(){return Object.keys(P).length}};function ve(e){e.detail.endedAt=Date.now(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>h(u.finish,e.target,{detail:e.detail}),25)}addEventListener(u.serverError,ve);addEventListener(u.success,ve);addEventListener(u.finish,e=>fe.remove(e.detail.id),!0);var K={events:u},J={};addEventListener("turbo:before-fetch-request",e=>{let t=e.target.closest("turbo-frame"),{fetchOptions:o}=e.detail;if(d.busy){let r=["text/vnd.turbo-boost.html",o.headers.Accept];r=r.filter(n=>n&&n.trim().length>0).join(", "),o.headers.Accept=r,o.headers["TurboBoost-Token"]=d.token}M.payloadChunks.forEach((r,n)=>{o.headers[`TurboBoost-State-${n.toString().padStart(4,"0")}`]=r})});addEventListener("turbo:before-fetch-response",e=>{let t=e.target.closest("turbo-frame"),{fetchResponse:o}=e.detail;if(t&&(J[t.id]=t.src),o.header("TurboBoost")){if(o.statusCode<200||o.statusCode>399){let r=`Server returned a ${o.statusCode} status code! TurboBoost Commands require 2XX-3XX status codes.`;h(K.events.clientError,document,{detail:p(l({},e.detail),{error:r})},!0)}o.header("TurboBoost")==="Append"&&(e.preventDefault(),o.responseText.then(r=>O.append(r)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboBoostSrc=J[t.id]||t.src||t.dataset.turboBoostSrc,delete J[t.id]});var et={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",commandAttribute:"data-turbo-command",confirmAttribute:"data-turbo-confirm"},c=l({},et),ye={method:e=>Promise.resolve(confirm(e))},tt=e=>e.detail.driver==="method",ot=e=>{if(e.detail.driver!=="form")return!1;let t=e.target,o=t.closest("turbo-frame"),r=t.closest(`[${c.frameAttribute}]`);return!!(o||r)},rt=e=>tt(e)||ot(e);document.addEventListener(u.start,async e=>{let t=e.target.getAttribute(c.confirmAttribute);!t||(e.detail.confirmation=!0,rt(e))||await ye.method(t)||e.preventDefault()});var nt=ye,b=[],G;function it(e,t){let o=b.find(r=>r.name===e);return o&&b.splice(b.indexOf(o),1),b=[{name:e,selectors:t},...b],document.removeEventListener(e,G,!0),document.addEventListener(e,G,!0),l({},b.find(r=>r.name===e))}function st(e){return b.find(t=>t.selectors.find(o=>Array.from(document.querySelectorAll(o)).find(r=>r===e)))}function lt(e,t){let o=st(t);return o&&o.name===e}var f={register:it,isRegisteredForElement:lt,get events(){return[...b]},set handler(e){G=e}};function at(e){return e.closest(`[${c.commandAttribute}]`)}function dt(e){return e.closest("turbo-frame[src]")||e.closest("turbo-frame[data-turbo-frame-src]")||e.closest("turbo-frame")}function ut(e,t={}){if(e.tagName.toLowerCase()!=="select")return t.value=e.value||null;if(!e.multiple)return t.value=e.options[e.selectedIndex].value;t.values=Array.from(e.options).reduce((o,r)=>(r.selected&&o.push(r.value),o),[])}function ct(e){let t=Array.from(e.attributes).reduce((o,r)=>{let n=r.value;return o[r.name]=n,o},{});return t.tag=e.tagName,t.checked=!!e.checked,t.disabled=!!e.disabled,ut(e,t),delete t.class,delete t.action,delete t.href,delete t[c.commandAttribute],delete t[c.frameAttribute],t}var Q={buildAttributePayload:ct,findClosestCommand:at,findClosestFrameWithSource:dt};function ht(e,t={}){t.token=d.token;let o=document.createElement("input");o.type="hidden",o.name="turbo_boost_command",o.value=JSON.stringify(t),e.appendChild(o)}var mt={invokeCommand:ht};function gt(e,t={}){let o=document.createElement("a");o.href=e;let r=new URL(o);return r.searchParams.set("turbo_boost_command",JSON.stringify(t)),r}var Y={build:gt};function bt(e,t){let o=t.src;t=l({},t),delete t.src,e.src=Y.build(o,t)}var me={invokeCommand:bt};function pt(e,t={}){let o=t.src;t=l({},t),delete t.src,delete t.href,e.setAttribute("href",Y.build(o,t))}var ft={invokeCommand:pt};function vt(e){let t=e.target;h(K.events.abort,document,{detail:p(l({},e.detail),{xhr:t})})}function V(e){let t=e.target;t.getResponseHeader("TurboBoost")==="Append"||t.getResponseHeader("Content-Type").startsWith("text/vnd.turbo-boost.html")?O.append(t.responseText):O.replaceDocument(t.responseText);let o=`Server returned a ${t.status} status code! TurboBoost Commands require 2XX-3XX status codes.`;h(K.events.clientError,document,{detail:p(l({},e.detail),{error:o,xhr:t})},!0)}function yt(e){let t=e.target;if(t.status<200||t.status>399)return V(e);let o=t.responseText;t.getResponseHeader("TurboBoost")==="Append"||t.getResponseHeader("Content-Type").startsWith("text/vnd.turbo-boost.html")?O.append(t.responseText):O.replaceDocument(t.responseText)}function Et(e){let t=e.src;e=l({},e),delete e.src;try{let o=new XMLHttpRequest;o.open("GET",Y.build(t,e),!0),o.setRequestHeader("Accept","text/vnd.turbo-boost.html, text/html, application/xhtml+xml"),o.setRequestHeader("TurboBoost-Token",d.token),M.payloadChunks.forEach((r,n)=>o.setRequestHeader(`TurboBoost-State-${n.toString().padStart(4,"0")}`,r)),o.addEventListener("abort",vt),o.addEventListener("error",V),o.addEventListener("load",yt),o.send()}catch(o){let r=`Unexpected error sending HTTP request! ${o.message}`;V(o,{detail:{message:r}})}}var wt={invokeCommand:Et};function X(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboBoostSrc||location.href}function kt(e){let t=Q.findClosestFrameWithSource(e),{turboFrame:o,turboMethod:r}=e.dataset;return e.tagName.toLowerCase()==="form"?{name:"form",reason:"Element is a form.",frame:t,src:e.action,invokeCommand:mt.invokeCommand}:r&&r.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeCommand:ft.invokeCommand}:o&&o!=="_self"?(t=document.getElementById(o),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:X(e,t),invokeCommand:me.invokeCommand}):(!o||o==="_self")&&t?{name:"frame",reason:"element does NOT target a frame or targets _self and is contained by a frame",frame:t,src:X(e,t),invokeCommand:me.invokeCommand}:{name:"window",reason:"element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)",frame:null,src:X(e),invokeCommand:wt.invokeCommand}}var ge={find:kt},N="unknown",Ee={debug:Object.values(g),info:Object.values(g),warn:[g.abort,g.clientError,g.serverError],error:[g.clientError,g.serverError],unknown:[]};Object.values(g).forEach(e=>{addEventListener(e,t=>{if(Ee[N].includes(t.type)){let{target:o,detail:r}=t;console[N](t.type,{target:o,detail:r})}})});var Tt={get level(){return N},set level(e){return Object.keys(Ee).includes(e)||(e="unknown"),N=e}};function xt(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var Lt={v4:xt};function be(e,t){return{id:e,name:t.getAttribute(c.commandAttribute),elementId:t.id.length>0?t.id:null,elementAttributes:Q.buildAttributePayload(t),startedAt:Date.now()}}async function St(e){let t,o={};try{if(t=Q.findClosestCommand(e.target),!t||!f.isRegisteredForElement(e.type,t))return;let r=`turbo-command-${Lt.v4()}`,n=ge.find(t),i=p(l({},be(r,t)),{driver:n.name,frameId:n.frame?n.frame.id:null,src:n.src}),s=await h(u.start,t,{cancelable:!0,detail:i});if(s.defaultPrevented||s.detail.confirmation&&e.defaultPrevented)return h(u.abort,t,{detail:{message:`An event handler for '${u.start}' prevented default behavior and blocked command invocation!`,source:s}});switch(n=ge.find(t),i=p(l({},be(r,t)),{driver:n.name,frameId:n.frame?n.frame.id:null,src:n.src}),fe.add(i),["frame","window"].includes(n.name)&&e.preventDefault(),d.busy=!0,setTimeout(()=>d.busy=!1,10),n.name){case"method":return n.invokeCommand(t,i);case"form":return n.invokeCommand(t,i);case"frame":return n.invokeCommand(n.frame,i);case"window":return n.invokeCommand(i)}}catch(r){h(u.clientError,t,{detail:p(l({},o),{error:r})})}}self.TurboBoost=self.TurboBoost||{};self.TurboBoost=p(l({},self.TurboBoost),{stateEvents:v,get state(){return M.current},get stateDelta(){return M.delta}});self.TurboBoost.Commands||(f.handler=St,f.register("click",[`[${c.commandAttribute}]`]),f.register("submit",[`form[${c.commandAttribute}]`]),f.register("change",[`input[${c.commandAttribute}]`,`select[${c.commandAttribute}]`,`textarea[${c.commandAttribute}]`]),self.TurboBoost.Commands={confirmation:nt,logger:Tt,schema:c,events:u,registerEventDelegate:f.register,get eventDelegates(){return f.events}});var Qt=self.TurboBoost.Commands;var Ct=Object.defineProperty,At=Object.defineProperties,$t=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,ke=(e,t,o)=>t in e?Ct(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,x=(e,t)=>{for(var o in t||(t={}))Ot.call(t,o)&&ke(e,o,t[o]);if(we)for(var o of we(t))Dt.call(t,o)&&ke(e,o,t[o]);return e},L=(e,t)=>At(e,$t(t)),m=(e,t)=>()=>(e&&(t=e(e=0)),t);function Bt(e){let t=document.createElement("template");return t.innerHTML=e,t}function se(e,t){t=t||document.body;let o=Bt(e).content.cloneNode(!0).querySelector("*");return t.appendChild(o)}function Z(e,t={}){if(!e)return;re(e);let{outline:o,outlineOffset:r}=t;o=o||"dashed 3px red",r=r||"0px",e.originalStyles=e.originalStyles||{display:e.style.display,minHeight:e.style.minHeight,minWidth:e.style.minWidth,outline:e.style.outline,outlineOffset:e.style.outlineOffset},getComputedStyle(e).display.match(/^inline$/i)&&e.offsetWidth===0&&e.offsetHeight===0&&(e.style.display="inline-block",e.style.minHeight="2px",e.style.minWidth="2px"),e.style.outline=o,e.style.outlineOffset=r,e.dataset.turboBoostHighlight=!0}function re(e){if(e){if(e.originalStyles){for(let[t,o]of Object.entries(e.originalStyles))o?e.style[t]=o:e.style[t]="";delete e.originalStyles}delete e.dataset.turboBoostHighlight}}function ee(e){if(!e)return{};let t=e.getBoundingClientRect(),o=e.offsetWidth,r=e.offsetHeight,n=t.top+window.scrollY,i=t.left+window.scrollX,s=i+o,C=n+r;return{top:n,left:i,right:s,bottom:C,width:o,height:r}}function D(e){try{e()}catch(t){}}var le=m(()=>{}),$e,Ht=m(()=>{$e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.labelElement.addEventListener("click",e=>{e.preventDefault(),this.toggle()}),this.checkboxElement.addEventListener("change",e=>this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}toggle(){this.checked?this.uncheck():this.check()}check(){this.checkboxElement.checked=!0,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}uncheck(){this.checkboxElement.checked=!1,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}get name(){return this.getAttribute("name")}get checked(){return this.checkboxElement.checked}get checkboxElement(){return this.shadowRoot.querySelector("input")}get labelElement(){return this.shadowRoot.querySelector("label")}get html(){return` +var De=Object.defineProperty,Be=Object.defineProperties,He=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,ie=(e,t,o)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,l=(e,t)=>{for(var o in t||(t={}))Re.call(t,o)&&ie(e,o,t[o]);if(se)for(var o of se(t))je.call(t,o)&&ie(e,o,t[o]);return e},p=(e,t)=>Be(e,He(t)),Me=class{get element(){return document.querySelector('meta[name="turbo-boost"]')}get token(){return this.element.getAttribute("content")}get busy(){return this.element.dataset.busy==="true"}set busy(e){return this.element.dataset.busy=!!e}},u=new Me,c={start:"turbo-boost:command:start",success:"turbo-boost:command:success",finish:"turbo-boost:command:finish",abort:"turbo-boost:command:abort",clientError:"turbo-boost:command:client-error",serverError:"turbo-boost:command:server-error"},f={stateLoad:"turbo-boost:state:load",stateChange:"turbo-boost:state:change"},h=l(l({},c),f);function m(e,t,o={}){return new Promise(r=>{o=o||{},o.detail=o.detail||{},t=t||document;let n=new CustomEvent(e,p(l({},o),{bubbles:!0}));t.dispatchEvent(n),r(n)})}var N;function R(e,t=null){if(!e||typeof e!="object")return e;let o=new Proxy(e,{deleteProperty(r,n){return delete r[n],m(f.stateChange,u.element,{detail:{state:N}}),!0},set(r,n,s,i){return r[n]=R(s,this),m(f.stateChange,u.element,{detail:{state:N}}),!0}});if(Array.isArray(e))e.forEach((r,n)=>e[n]=R(r,o));else if(typeof e=="object")for(let[r,n]of Object.entries(e))e[r]=R(n,o);return t||(N=o),o}var qe=R,W,E,C,le;function ce(){if(!u.element)return w();let e=atob(u.element.dataset.state);C={},E=qe(JSON.parse(e)),W=l({},E),delete u.element.dataset.clientStateChange,setTimeout(()=>m(f.stateLoad,u.element,{detail:{state:E}}))}function w(){clearTimeout(le),le=setTimeout(ce,10)}W||ce();addEventListener("DOMContentLoaded",w);addEventListener("load",w);addEventListener("turbo:load",w);addEventListener("turbo:frame-load",w);addEventListener(c.success,w);addEventListener(f.stateChange,e=>{C={};for(let[t,o]of Object.entries(E))W[t]!==o&&(C[t]=o);u.element.dataset.clientStateChange=!0,u.element.dataset.state=btoa(JSON.stringify(E))});var j={events:f,get current(){return E},get delta(){return C},get payloadChunks(){return btoa(JSON.stringify(C)).match(/.{1,2000}/g)}};function Pe(e){let t="=0&&n>=0){let s=e.slice(e.indexOf(">",r)+1,n);document.documentElement.innerHTML=s}}function Ne(e){document.body.insertAdjacentHTML("beforeend",e)}var A={append:Ne,replaceDocument:Pe},M={};function Ie(e){M[e.id]=e}function ze(e){delete M[e]}var me={add:Ie,remove:ze,get commands(){return[...Object.values(M)]},get length(){return Object.keys(M).length}};function he(e){e.detail.endedAt=Date.now(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>m(c.finish,e.target,{detail:e.detail}),25)}addEventListener(c.serverError,he);addEventListener(c.success,he);addEventListener(c.finish,e=>me.remove(e.detail.id),!0);var X={events:c},z={};addEventListener("turbo:before-fetch-request",e=>{let t=e.target.closest("turbo-frame"),{fetchOptions:o}=e.detail;if(u.busy){let r=["text/vnd.turbo-boost.html",o.headers.Accept];r=r.filter(n=>n&&n.trim().length>0).join(", "),o.headers.Accept=r,o.headers["TurboBoost-Token"]=u.token}j.payloadChunks.forEach((r,n)=>{o.headers[`TurboBoost-State-${n.toString().padStart(4,"0")}`]=r})});addEventListener("turbo:before-fetch-response",e=>{let t=e.target.closest("turbo-frame"),{fetchResponse:o}=e.detail;if(t&&(z[t.id]=t.src),o.header("TurboBoost")){if(o.statusCode<200||o.statusCode>399){let r=`Server returned a ${o.statusCode} status code! TurboBoost Commands require 2XX-3XX status codes.`;m(X.events.clientError,document,{detail:p(l({},e.detail),{error:r})},!0)}o.header("TurboBoost")==="Append"&&(e.preventDefault(),o.responseText.then(r=>A.append(r)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboBoostSrc=z[t.id]||t.src||t.dataset.turboBoostSrc,delete z[t.id]});var _e={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",commandAttribute:"data-turbo-command",confirmAttribute:"data-turbo-confirm",turboSubmitStartEvent:"turbo:submit-start"},d=l({},_e),ge={method:e=>Promise.resolve(confirm(e))},Fe=e=>e.detail.driver==="method",We=e=>{if(e.detail.driver!=="form")return!1;let t=e.target,o=t.closest("turbo-frame"),r=t.closest(`[${d.frameAttribute}]`);return!!(o||r)},Xe=e=>Fe(e)||We(e);document.addEventListener(c.start,async e=>{let t=e.target.getAttribute(d.confirmAttribute);!t||(e.detail.confirmation=!0,Xe(e))||await ge.method(t)||e.preventDefault()});var Je=ge,b=[],_;function Ge(e,t){let o=b.find(r=>r.name===e);return o&&b.splice(b.indexOf(o),1),b=[{name:e,selectors:t},...b],document.removeEventListener(e,_,!0),document.addEventListener(e,_,!0),l({},b.find(r=>r.name===e))}function Ue(e){return b.find(t=>t.selectors.find(o=>Array.from(document.querySelectorAll(o)).find(r=>r===e)))}function Ve(e,t){let o=Ue(t);return o&&o.name===e}var g={register:Ge,isRegisteredForElement:Ve,get events(){return[...b]},set handler(e){_=e}};function Ke(e){return e.closest(`[${d.commandAttribute}]`)}function Ye(e){return e.closest("turbo-frame[src]")||e.closest("turbo-frame[data-turbo-frame-src]")||e.closest("turbo-frame")}function Qe(e,t={}){if(e.tagName.toLowerCase()!=="select")return t.value=e.value||null;if(!e.multiple)return t.value=e.options[e.selectedIndex].value;t.values=Array.from(e.options).reduce((o,r)=>(r.selected&&o.push(r.value),o),[])}function Ze(e){let t=Array.from(e.attributes).reduce((o,r)=>{let n=r.value;return o[r.name]=n,o},{});return t.tag=e.tagName,t.checked=!!e.checked,t.disabled=!!e.disabled,Qe(e,t),delete t.class,delete t.action,delete t.href,delete t[d.commandAttribute],delete t[d.frameAttribute],t}var J={buildAttributePayload:Ze,findClosestCommand:Ke,findClosestFrameWithSource:Ye};function et(e){var t;if((e==null?void 0:e.formElement)instanceof HTMLFormElement&&(e==null?void 0:e.body)instanceof URLSearchParams&&((t=e==null?void 0:e.fetchRequest)==null?void 0:t.body)instanceof URLSearchParams){e.formData=new FormData(e.formElement);for(let[o,r]of e.formData.entries())e.fetchRequest.body.set(o,r),e.body.set(o,r);return e}}function tt(e,t={},o={}){t.token=u.token;let r=e.querySelector('input[name="turbo_boost_command"]')||document.createElement("input");r.type="hidden",r.name="turbo_boost_command",r.value=JSON.stringify(t),e.appendChild(r),et(o.detail.formSubmission)}var ot={invokeCommand:tt};function rt(e,t={}){let o=document.createElement("a");o.href=e;let r=new URL(o);return r.searchParams.set("turbo_boost_command",JSON.stringify(t)),r}var G={build:rt};function nt(e,t){let o=t.src;t=l({},t),delete t.src,e.src=G.build(o,t)}var ae={invokeCommand:nt};function st(e,t={}){let o=t.src;t=l({},t),delete t.src,delete t.href,e.setAttribute("href",G.build(o,t))}var it={invokeCommand:st};function lt(e){let t=e.target;m(X.events.abort,document,{detail:p(l({},e.detail),{xhr:t})})}function F(e){let t=e.target;t.getResponseHeader("TurboBoost")==="Append"||t.getResponseHeader("Content-Type").startsWith("text/vnd.turbo-boost.html")?A.append(t.responseText):A.replaceDocument(t.responseText);let o=`Server returned a ${t.status} status code! TurboBoost Commands require 2XX-3XX status codes.`;m(X.events.clientError,document,{detail:p(l({},e.detail),{error:o,xhr:t})},!0)}function at(e){let t=e.target;if(t.status<200||t.status>399)return F(e);let o=t.responseText;t.getResponseHeader("TurboBoost")==="Append"||t.getResponseHeader("Content-Type").startsWith("text/vnd.turbo-boost.html")?A.append(t.responseText):A.replaceDocument(t.responseText)}function dt(e){let t=e.src;e=l({},e),delete e.src;try{let o=new XMLHttpRequest;o.open("GET",G.build(t,e),!0),o.setRequestHeader("Accept","text/vnd.turbo-boost.html, text/html, application/xhtml+xml"),o.setRequestHeader("TurboBoost-Token",u.token),j.payloadChunks.forEach((r,n)=>o.setRequestHeader(`TurboBoost-State-${n.toString().padStart(4,"0")}`,r)),o.addEventListener("abort",lt),o.addEventListener("error",F),o.addEventListener("load",at),o.send()}catch(o){let r=`Unexpected error sending HTTP request! ${o.message}`;F(o,{detail:{message:r}})}}var ut={invokeCommand:dt};function I(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboBoostSrc||location.href}function ct(e){let t=J.findClosestFrameWithSource(e),{turboFrame:o,turboMethod:r}=e.dataset;return e.tagName.toLowerCase()==="form"?{name:"form",reason:"Element is a form.",frame:t,src:e.action,invokeCommand:ot.invokeCommand}:r&&r.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeCommand:it.invokeCommand}:o&&o!=="_self"?(t=document.getElementById(o),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:I(e,t),invokeCommand:ae.invokeCommand}):(!o||o==="_self")&&t?{name:"frame",reason:"element does NOT target a frame or targets _self and is contained by a frame",frame:t,src:I(e,t),invokeCommand:ae.invokeCommand}:{name:"window",reason:"element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)",frame:null,src:I(e),invokeCommand:ut.invokeCommand}}var de={find:ct},q="unknown",be={debug:Object.values(h),info:Object.values(h),warn:[h.abort,h.clientError,h.serverError],error:[h.clientError,h.serverError],unknown:[]};Object.values(h).forEach(e=>{addEventListener(e,t=>{if(be[q].includes(t.type)){let{target:o,detail:r}=t;console[q](t.type,{target:o,detail:r})}})});var mt={get level(){return q},set level(e){return Object.keys(be).includes(e)||(e="unknown"),q=e}};function ht(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var gt={v4:ht};function ue(e,t){return{id:e,name:t.getAttribute(d.commandAttribute),elementId:t.id.length>0?t.id:null,elementAttributes:J.buildAttributePayload(t),startedAt:Date.now()}}async function bt(e){let t,o={};try{if(t=J.findClosestCommand(e.target),!t||!g.isRegisteredForElement(e.type,t))return;let r=`turbo-command-${gt.v4()}`,n=de.find(t),s=p(l({},ue(r,t)),{driver:n.name,frameId:n.frame?n.frame.id:null,src:n.src}),i=await m(c.start,t,{cancelable:!0,detail:s});if(i.defaultPrevented||i.detail.confirmation&&e.defaultPrevented)return m(c.abort,t,{detail:{message:`An event handler for '${c.start}' prevented default behavior and blocked command invocation!`,source:i}});switch(n=de.find(t),s=p(l({},ue(r,t)),{driver:n.name,frameId:n.frame?n.frame.id:null,src:n.src}),me.add(s),["frame","window"].includes(n.name)&&e.preventDefault(),u.busy=!0,setTimeout(()=>u.busy=!1,10),n.name){case"method":return n.invokeCommand(t,s);case"form":return n.invokeCommand(t,s,e);case"frame":return n.invokeCommand(n.frame,s);case"window":return n.invokeCommand(s)}}catch(r){m(c.clientError,t,{detail:p(l({},o),{error:r})})}}self.TurboBoost=self.TurboBoost||{};self.TurboBoost=p(l({},self.TurboBoost),{stateEvents:f,get state(){return j.current},get stateDelta(){return j.delta}});self.TurboBoost.Commands||(g.handler=bt,g.register("click",[`[${d.commandAttribute}]`]),g.register("submit",[`form[${d.commandAttribute}]`]),g.register(d.turboSubmitStartEvent,[`form[${d.commandAttribute}]`]),g.register("change",[`input[${d.commandAttribute}]`,`select[${d.commandAttribute}]`,`textarea[${d.commandAttribute}]`]),self.TurboBoost.Commands={confirmation:Je,logger:mt,schema:d,events:c,registerEventDelegate:g.register,get eventDelegates(){return g.events}});var Nt=self.TurboBoost.Commands;var pt=Object.defineProperty,ft=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,fe=(e,t,o)=>t in e?pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,T=(e,t)=>{for(var o in t||(t={}))yt.call(t,o)&&fe(e,o,t[o]);if(pe)for(var o of pe(t))Et.call(t,o)&&fe(e,o,t[o]);return e},k=(e,t)=>ft(e,vt(t));function wt(e){let t=document.createElement("template");return t.innerHTML=e,t}function ee(e,t){t=t||document.body;let o=wt(e).content.cloneNode(!0).querySelector("*");return t.appendChild(o)}function U(e,t={}){if(!e)return;Q(e);let{outline:o,outlineOffset:r}=t;o=o||"dashed 3px red",r=r||"0px",e.originalStyles=e.originalStyles||{display:e.style.display,minHeight:e.style.minHeight,minWidth:e.style.minWidth,outline:e.style.outline,outlineOffset:e.style.outlineOffset},getComputedStyle(e).display.match(/^inline$/i)&&e.offsetWidth===0&&e.offsetHeight===0&&(e.style.display="inline-block",e.style.minHeight="2px",e.style.minWidth="2px"),e.style.outline=o,e.style.outlineOffset=r,e.dataset.turboBoostHighlight=!0}function Q(e){if(e){if(e.originalStyles){for(let[t,o]of Object.entries(e.originalStyles))o?e.style[t]=o:e.style[t]="";delete e.originalStyles}delete e.dataset.turboBoostHighlight}}function V(e){if(!e)return{};let t=e.getBoundingClientRect(),o=e.offsetWidth,r=e.offsetHeight,n=t.top+window.scrollY,s=t.left+window.scrollX,i=s+o,L=n+r;return{top:n,left:s,right:i,bottom:L,width:o,height:r}}function $(e){try{e()}catch(t){}}var Tt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.labelElement.addEventListener("click",e=>{e.preventDefault(),this.toggle()}),this.checkboxElement.addEventListener("change",e=>this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}toggle(){this.checked?this.uncheck():this.check()}check(){this.checkboxElement.checked=!0,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}uncheck(){this.checkboxElement.checked=!1,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}get name(){return this.getAttribute("name")}get checked(){return this.checkboxElement.checked}get checkboxElement(){return this.shadowRoot.querySelector("input")}get labelElement(){return this.shadowRoot.querySelector("label")}get html(){return`
@@ -21,7 +21,7 @@ var Fe=Object.defineProperty,We=Object.defineProperties,Xe=Object.getOwnProperty label { color: black; } - `}}}),Oe,Rt=m(()=>{le(),Oe=class extends HTMLElement{constructor(){super(),this.enabledDevtools={},this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.shadowRoot.querySelector("button").addEventListener("click",()=>this.dispatchEvent(new CustomEvent("turbo-boost:devtools-close",{bubbles:!0}))),this.addEventListener("change",e=>{let t=e.target,{checked:o,name:r}=t;o?this.enableDevtool(r):this.disableDevtool(r)})}enableDevtool(e){this.enabledDevtools[e]||(this.enabledDevtools[e]=!0,this.dispatchEvent(new CustomEvent("turbo-boost:devtool-enable",{bubbles:!0,detail:{name:e}})))}disableDevtool(e){this.enabledDevtools[e]&&(delete this.enabledDevtools[e],this.dispatchEvent(new CustomEvent("turbo-boost:devtool-disable",{bubbles:!0,detail:{name:e}})))}close(){this.devtoolElements.forEach(e=>{e.checked&&e.uncheck()}),this.remove()}get devtoolElements(){return this.querySelectorAll('[slot="devtool"]')}get closeElement(){return this.querySelector("button")}get html(){return` + `}},kt=class extends HTMLElement{constructor(){super(),this.enabledDevtools={},this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.shadowRoot.querySelector("button").addEventListener("click",()=>this.dispatchEvent(new CustomEvent("turbo-boost:devtools-close",{bubbles:!0}))),this.addEventListener("change",e=>{let t=e.target,{checked:o,name:r}=t;o?this.enableDevtool(r):this.disableDevtool(r)})}enableDevtool(e){this.enabledDevtools[e]||(this.enabledDevtools[e]=!0,this.dispatchEvent(new CustomEvent("turbo-boost:devtool-enable",{bubbles:!0,detail:{name:e}})))}disableDevtool(e){this.enabledDevtools[e]&&(delete this.enabledDevtools[e],this.dispatchEvent(new CustomEvent("turbo-boost:devtool-disable",{bubbles:!0,detail:{name:e}})))}close(){this.devtoolElements.forEach(e=>{e.checked&&e.uncheck()}),this.remove()}get devtoolElements(){return this.querySelectorAll('[slot="devtool"]')}get closeElement(){return this.querySelector("button")}get html(){return`
@@ -89,7 +89,7 @@ var Fe=Object.defineProperty,We=Object.defineProperties,Xe=Object.getOwnProperty button:hover { opacity: 1; } - `}}}),De,jt=m(()=>{De=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html}connectedCallback(){let e=localStorage.getItem(`turbo-boost-devtools-${location.href}-${this.id}-transform`);e&&(this.style.transform=e)}disconnectedCallback(){this.id!=="undefined"&&this.id!==""&&localStorage.setItem(`turbo-boost-devtools-${location.href}-${this.id}-transform`,this.style.transform)}get color(){return this.getAttribute("color")||"darkslategray"}get backgroundColor(){return this.getAttribute("background-color")||"gainsboro"}get position(){return this.getAttribute("position")||"top"}get html(){return` + `}},xt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html}connectedCallback(){let e=localStorage.getItem(`turbo-boost-devtools-${location.href}-${this.id}-transform`);e&&(this.style.transform=e)}disconnectedCallback(){this.id!=="undefined"&&this.id!==""&&localStorage.setItem(`turbo-boost-devtools-${location.href}-${this.id}-transform`,this.style.transform)}get color(){return this.getAttribute("color")||"darkslategray"}get backgroundColor(){return this.getAttribute("background-color")||"gainsboro"}get position(){return this.getAttribute("position")||"top"}get html(){return`
@@ -183,59 +183,38 @@ var Fe=Object.defineProperty,We=Object.defineProperties,Xe=Object.getOwnProperty slot[name="content-bottom"] { color: red; } - `}}});function qt(e){return e.global&&self[e.global]||document.querySelector(`[src='${e.src}']`)?!0:y.includes(e)}function Mt(e){if(qt(e))return;y.push(e);let{src:t,integrity:o}=e,r=document.createElement("script");r.setAttribute("src",t),r.setAttribute("crossorigin","anonymous"),r.setAttribute("referrerpolicy","no-referrer"),o&&r.setAttribute("integrity",o),document.head.appendChild(r)}function Be(e){if(!y.includes(e))return;y.splice(y.indexOf(e),1);let{src:t}=e,o=document.querySelector(`script[src='${t}']`);o&&o.remove(),e.global&&self[e.global]&&(self[e.global]=null)}function Pt(){[...y].forEach(e=>Be(e))}var y,Te,S,Nt=m(()=>{y=[],Te={LeaderLine:{src:"https://cdnjs.cloudflare.com/ajax/libs/leader-line/1.0.7/leader-line.min.js",integrity:"sha512-0dNdzMjpT6pJdFGF1DwybFCfm3K/lzHhxaMXC/92J9/DZujHlqYFqmhTOAoD0o+LkeEsVK2ar/ESs7/Q2B6wJg==",global:"LeaderLine"},PlainDraggable:{src:"https://cdn.jsdelivr.net/npm/plain-draggable@2.5.14/plain-draggable.min.js",global:"PlainDraggable"}},S=L(x({},Te),{add:Mt,remove:Be,removeAll:Pt})});function He(){if(a)try{new PlainDraggable(a)}catch(e){setTimeout(He,200)}}function ne(){je()||(a.close(),a.dispatchEvent(new CustomEvent("turbo-boost:devtools-stop",{bubbles:!0})),a=null,S.removeAll())}function Re(){_()||(S.add(S.LeaderLine),S.add(S.PlainDraggable),a=se(""),setTimeout(He,200),a.dispatchEvent(new CustomEvent("turbo-boost:devtools-start",{bubbles:!0})))}function It(){let e=a?Object.keys(a.enabledDevtools):[];ne(),Re(),a.devtoolElements.forEach(t=>{e.includes(t.name)&&t.check()})}function _(){return!!a}function je(){return!_()}function qe(){clearTimeout(xe),xe=setTimeout(It,25)}function B(){_()&&qe()}function zt(e,t){if(a)return se(` + `}},x=[],Lt={LeaderLine:{src:"https://cdnjs.cloudflare.com/ajax/libs/leader-line/1.0.7/leader-line.min.js",integrity:"sha512-0dNdzMjpT6pJdFGF1DwybFCfm3K/lzHhxaMXC/92J9/DZujHlqYFqmhTOAoD0o+LkeEsVK2ar/ESs7/Q2B6wJg==",global:"LeaderLine"},PlainDraggable:{src:"https://cdn.jsdelivr.net/npm/plain-draggable@2.5.14/plain-draggable.min.js",global:"PlainDraggable"}};function St(e){return e.global&&self[e.global]||document.querySelector(`[src='${e.src}']`)?!0:x.includes(e)}function Ct(e){if(St(e))return;x.push(e);let{src:t,integrity:o}=e,r=document.createElement("script");r.setAttribute("src",t),r.setAttribute("crossorigin","anonymous"),r.setAttribute("referrerpolicy","no-referrer"),o&&r.setAttribute("integrity",o),document.head.appendChild(r)}function ye(e){if(!x.includes(e))return;x.splice(x.indexOf(e),1);let{src:t}=e,o=document.querySelector(`script[src='${t}']`);o&&o.remove(),e.global&&self[e.global]&&(self[e.global]=null)}function At(){[...x].forEach(e=>ye(e))}var O=k(T({},Lt),{add:Ct,remove:ye,removeAll:At});customElements.define("turbo-boost-devtool",Tt);customElements.define("turbo-boost-devtool-supervisor",kt);customElements.define("turbo-boost-devtool-tooltip",xt);var a;function Ee(){if(a)try{new PlainDraggable(a)}catch(e){setTimeout(Ee,200)}}function te(){Te()||(a.close(),a.dispatchEvent(new CustomEvent("turbo-boost:devtools-stop",{bubbles:!0})),a=null,O.removeAll())}function we(){P()||(O.add(O.LeaderLine),O.add(O.PlainDraggable),a=ee(""),setTimeout(Ee,200),a.dispatchEvent(new CustomEvent("turbo-boost:devtools-start",{bubbles:!0})))}function $t(){let e=a?Object.keys(a.enabledDevtools):[];te(),we(),a.devtoolElements.forEach(t=>{e.includes(t.name)&&t.check()})}function P(){return!!a}function Te(){return!P()}var ve;function ke(){clearTimeout(ve),ve=setTimeout($t,25)}function D(){P()&&ke()}addEventListener("turbo:load",D);addEventListener("turbo-frame:load",D);addEventListener("turbo-boost:devtools-connect",D);addEventListener("turbo-boost:devtools-close",te);window.TurboBoost&&(addEventListener(TurboBoost.Commands.events.success,D),addEventListener(TurboBoost.Commands.events.finish,D));function Ot(e,t){if(a)return ee(` ${t} - `,a)}function _t(e){return a?a.enabledDevtools[e]:!1}var a,xe,I,Me=m(()=>{le(),Ht(),Rt(),jt(),Nt(),customElements.define("turbo-boost-devtool",$e),customElements.define("turbo-boost-devtool-supervisor",Oe),customElements.define("turbo-boost-devtool-tooltip",De),addEventListener("turbo:load",B),addEventListener("turbo-frame:load",B),addEventListener("turbo-boost:devtools-connect",B),addEventListener("turbo-boost:devtools-close",ne),window.TurboBoost&&(addEventListener(TurboBoost.Commands.events.success,B),addEventListener(TurboBoost.Commands.events.finish,B)),I={enabled:_t,register:zt,start:Re,stop:ne,restart:qe,get started(){return _()},get stopped(){return je()}}});function te(e,t,o,r={}){let{backgroundColor:n,color:i,position:s,id:C}=r;return i=i||"white",s=s||"top",se(` - + `,a)}function Dt(e){return a?a.enabledDevtools[e]:!1}var Z={enabled:Dt,register:Ot,start:we,stop:te,restart:ke,get started(){return P()},get stopped(){return Te()}};function K(e,t,o,r={}){let{backgroundColor:n,color:s,position:i,id:L}=r;return s=s||"white",i=i||"top",ee(` +
${e}
${t}
${o}
- `)}var oe,H,Ft=m(()=>{Me(),le(),H=class{constructor(e){this.delegate=e;let t,o=()=>{clearTimeout(t),t=setTimeout(this.hide({active:!1}),25)};this.eventListeners["turbo-boost:devtool-enable"]=r=>{let{name:n}=r.detail;n===this.delegate.name&&(Z(this.delegate.triggerElement,{outline:"3px dashed blueviolet",outlineOffset:"2px"}),this.hide({active:!1}),this.active&&this.show())},this.eventListeners["turbo-boost:devtool-disable"]=r=>{let{name:n}=r.detail;n===this.delegate.name&&re(this.delegate.triggerElement)},this.eventListeners.click=r=>{r.target.closest("turbo-boost-devtool-tooltip")||o()},this.eventListeners["turbo:load"]=o,this.eventListeners["turbo-frame:load"]=o,window.TurboBoost&&(this.eventListeners[TurboBoost.Commands.events.finish]=o),this.registerEventListeners()}registerEventListeners(){Object.entries(this.eventListeners).forEach(([e,t])=>{addEventListener(e,t)})}unregisterEventListeners(){Object.entries(this.eventListeners).forEach(([e,t])=>{removeEventListener(e,t)})}get eventListeners(){return this._eventListeners||(this._eventListeners={})}show(){if(!this.enabled||this.active)return;this.active=!0,this.hide({active:!0}),Z(this.delegate.targetElement,{outline:"3px dashed darkcyan",outlineOffset:"-2px"}),Z(this.delegate.morphElement,{outline:"3px dashed chocolate",outlineOffset:"3px"}),this.renderingTooltip=this.createRenderingTooltip(),this.targetTooltip=this.createTargetTooltip(),this.triggerTooltip=this.createTriggerTooltip(this.targetTooltip,this.renderingTooltip),document.querySelectorAll(".leader-line").forEach(t=>t.style.zIndex=1e5);let e={morph:{partial:this.delegate.triggerElement.renders,id:this.delegate.triggerElement.morphs,status:this.delegate.morphElement?"OK":"Not Found"},trigger:{partial:null,id:null,status:"Not Found"},target:{partial:null,id:null,status:"Not Found"}};this.delegate.triggerElement&&(e.trigger={partial:this.delegate.triggerElement.partial,id:this.delegate.triggerElement.id,status:"OK"},e.target.id=this.delegate.triggerElement.controls),this.delegate.targetElement&&(e.target={partial:this.delegate.targetElement.partial,dom_id:this.delegate.targetElement.id,status:"OK"}),console.table(e)}hide({active:e=!1}){document.querySelectorAll("turbo-boost-devtool-tooltip").forEach(t=>{D(()=>t.line.remove()),D(()=>t.drag.remove()),D(()=>t.lineToRendering.remove()),D(()=>t.lineToTarget.remove()),D(()=>t.remove())}),document.querySelectorAll("[data-turbo-boost-highlight]").forEach(t=>{t.tagName.match(/turbo-boost-toggle-trigger/i)||re(t)}),this.active=e}get active(){return oe===this.delegate}set active(e){e?oe=this.delegate:oe=null}get enabled(){return I.enabled(this.delegate.name)}static register(e,t){I.register(e,t)}createRenderingTooltip(){if(!this.delegate.triggerElement.renders)return console.debug("Unable to create the rendering tooltip! The trigger element must set the 'renders' attribute.");if(!this.delegate.triggerElement.morphs)return console.debug(`Unable to create the rendering tooltip! The trigger element specified the 'morphs' attrbiute but no element matches the DOM id: '${this.triggerElement.morphs}'`);let e=` + `)}var Y,oe=class{constructor(e){this.delegate=e;let t,o=()=>{clearTimeout(t),t=setTimeout(this.hide({active:!1}),25)};this.eventListeners["turbo-boost:devtool-enable"]=r=>{let{name:n}=r.detail;n===this.delegate.name&&(U(this.delegate.triggerElement,{outline:"3px dashed blueviolet",outlineOffset:"2px"}),this.hide({active:!1}),this.active&&this.show())},this.eventListeners["turbo-boost:devtool-disable"]=r=>{let{name:n}=r.detail;n===this.delegate.name&&Q(this.delegate.triggerElement)},this.eventListeners.click=r=>{r.target.closest("turbo-boost-devtool-tooltip")||o()},this.eventListeners["turbo:load"]=o,this.eventListeners["turbo-frame:load"]=o,window.TurboBoost&&(this.eventListeners[TurboBoost.Commands.events.finish]=o),this.registerEventListeners()}registerEventListeners(){Object.entries(this.eventListeners).forEach(([e,t])=>{addEventListener(e,t)})}unregisterEventListeners(){Object.entries(this.eventListeners).forEach(([e,t])=>{removeEventListener(e,t)})}get eventListeners(){return this._eventListeners||(this._eventListeners={})}show(){if(!this.enabled||this.active)return;this.active=!0,this.hide({active:!0}),U(this.delegate.targetElement,{outline:"3px dashed darkcyan",outlineOffset:"-2px"}),U(this.delegate.morphElement,{outline:"3px dashed chocolate",outlineOffset:"3px"}),this.renderingTooltip=this.createRenderingTooltip(),this.targetTooltip=this.createTargetTooltip(),this.triggerTooltip=this.createTriggerTooltip(this.targetTooltip,this.renderingTooltip),document.querySelectorAll(".leader-line").forEach(t=>t.style.zIndex=1e5);let e={morph:{partial:this.delegate.triggerElement.renders,id:this.delegate.triggerElement.morphs,status:this.delegate.morphElement?"OK":"Not Found"},trigger:{partial:null,id:null,status:"Not Found"},target:{partial:null,id:null,status:"Not Found"}};this.delegate.triggerElement&&(e.trigger={partial:this.delegate.triggerElement.partial,id:this.delegate.triggerElement.id,status:"OK"},e.target.id=this.delegate.triggerElement.controls),this.delegate.targetElement&&(e.target={partial:this.delegate.targetElement.partial,dom_id:this.delegate.targetElement.id,status:"OK"}),console.table(e)}hide({active:e=!1}){document.querySelectorAll("turbo-boost-devtool-tooltip").forEach(t=>{$(()=>t.line.remove()),$(()=>t.drag.remove()),$(()=>t.lineToRendering.remove()),$(()=>t.lineToTarget.remove()),$(()=>t.remove())}),document.querySelectorAll("[data-turbo-boost-highlight]").forEach(t=>{t.tagName.match(/turbo-boost-toggle-trigger/i)||Q(t)}),this.active=e}get active(){return Y===this.delegate}set active(e){e?Y=this.delegate:Y=null}get enabled(){return Z.enabled(this.delegate.name)}static register(e,t){Z.register(e,t)}createRenderingTooltip(){if(!this.delegate.triggerElement.renders)return console.debug("Unable to create the rendering tooltip! The trigger element must set the 'renders' attribute.");if(!this.delegate.triggerElement.morphs)return console.debug(`Unable to create the rendering tooltip! The trigger element specified the 'morphs' attrbiute but no element matches the DOM id: '${this.triggerElement.morphs}'`);let e=` RENDERING - <${this.delegate.triggerElement.tagName.toLowerCase()}> `,t=` partial: ${this.delegate.triggerElement.renders||"unknown"}
morphs: ${this.delegate.triggerElement.morphs||"unknown"}
- `,o=te(e,t,` + `,o=K(e,t,`
The TRIGGER toggles the TARGET then renders the partial & morphs the element.
- `,{id:`${this.delegate.id}-rendering`,backgroundColor:"lightyellow",color:"chocolate"}),r=ee(this.delegate.morphElement),n=Math.ceil(r.top+r.height/2-o.offsetHeight/2),i=Math.ceil(r.left+r.width+100);return o.style.top=`${n}px`,o.style.left=`${i}px`,o.line=new LeaderLine(o,this.delegate.morphElement,L(x({},this.leaderLineOptions),{color:"chocolate"})),o.drag=new PlainDraggable(o),o}createTargetTooltip(){var e,t;if(!this.delegate.targetElement)return console.debug(`Unable to create the target tooltip! No element matches the DOM id: '${this.delegate.triggerElement.controls}'`);let o=` + `,{id:`${this.delegate.id}-rendering`,backgroundColor:"lightyellow",color:"chocolate"}),r=V(this.delegate.morphElement),n=Math.ceil(r.top+r.height/2-o.offsetHeight/2),s=Math.ceil(r.left+r.width+100);return o.style.top=`${n}px`,o.style.left=`${s}px`,o.line=new LeaderLine(o,this.delegate.morphElement,k(T({},this.leaderLineOptions),{color:"chocolate"})),o.drag=new PlainDraggable(o),o}createTargetTooltip(){var e,t;if(!this.delegate.targetElement)return console.debug(`Unable to create the target tooltip! No element matches the DOM id: '${this.delegate.triggerElement.controls}'`);let o=` TARGET - <${this.delegate.targetElement.tagName.toLowerCase()}> - `,r=te(o,((e=this.delegate.targetTooltipData)==null?void 0:e.subtitle)||"",((t=this.delegate.targetTooltipData)==null?void 0:t.content)||"",{id:`${this.delegate.id}-target`,backgroundColor:"lightcyan",color:"darkcyan",position:"bottom"}),n=ee(this.delegate.targetElement),i=Math.ceil(n.top+r.offsetHeight),s=Math.ceil(n.left+n.width+r.offsetWidth/3);return r.style.top=`${i}px`,r.style.left=`${s}px`,r.line=new LeaderLine(r,this.delegate.targetElement,L(x({},this.leaderLineOptions),{color:"darkcyan"})),r.drag=new PlainDraggable(r),r}createTriggerTooltip(e,t){var o,r;if(!this.delegate.triggerElement)return;let n=` + `,r=K(o,((e=this.delegate.targetTooltipData)==null?void 0:e.subtitle)||"",((t=this.delegate.targetTooltipData)==null?void 0:t.content)||"",{id:`${this.delegate.id}-target`,backgroundColor:"lightcyan",color:"darkcyan",position:"bottom"}),n=V(this.delegate.targetElement),s=Math.ceil(n.top+r.offsetHeight),i=Math.ceil(n.left+n.width+r.offsetWidth/3);return r.style.top=`${s}px`,r.style.left=`${i}px`,r.line=new LeaderLine(r,this.delegate.targetElement,k(T({},this.leaderLineOptions),{color:"darkcyan"})),r.drag=new PlainDraggable(r),r}createTriggerTooltip(e,t){var o,r;if(!this.delegate.triggerElement)return;let n=` TRIGGER - <${this.delegate.triggerElement.tagName.toLowerCase()}> - `,i=te(n,((o=this.delegate.triggerTooltipData)==null?void 0:o.subtitle)||"",((r=this.delegate.triggerTooltipData)==null?void 0:r.content)||"",{id:`${this.delegate.id}-trigger`,backgroundColor:"lavender",color:"blueviolet"}),s=ee(this.delegate.triggerElement),C=Math.ceil(s.top-i.offsetHeight*2),_e=Math.ceil(s.left+s.width+i.offsetWidth/3);return i.style.top=`${C}px`,i.style.left=`${_e}px`,i.line=new LeaderLine(this.delegate.triggerElement,i,L(x({},this.leaderLineOptions),{color:"blueviolet"})),e&&(i.lineToTarget=new LeaderLine(i,e,L(x({},this.leaderLineOptions),{color:"blueviolet",middleLabel:this.delegate.targetLineLabel,size:2.1})),e.drag.onMove=()=>{var A,de;e.line.position(),(A=i.lineToTarget)==null||A.position(),(de=i.lineToRendering)==null||de.position()}),t&&(i.lineToRendering=new LeaderLine(i,t,L(x({},this.leaderLineOptions),{color:"blueviolet",middleLabel:this.delegate.renderingLineLabel,size:2.1})),t.drag.onMove=()=>{var A;t.line.position(),i.lineToTarget&&i.lineToTarget.position(),(A=i.lineToRendering)==null||A.position()}),i.drag=new PlainDraggable(i),i.drag.onMove=()=>{i.line.position(),i.lineToTarget&&i.lineToTarget.position(),i.lineToRendering&&i.lineToRendering.position()},i}get leaderLineOptions(){return{dash:{animation:!0},dropShadow:{opacity:.3},endPlug:"arrow3",endPlugSize:1.7,size:3,startPlug:"disc",startPlugSize:1}}}}),Wt={};function Le(e){Object.defineProperties(e,{targetTooltipData:{get(){return{subtitle:` - identifier: ${e.identifier}
- query: ${e.query} - `,content:` -
- - element log -
- ${e.targetElementLog.queue.slice(-10).map(t=>`
${t}
`).join("")} - `}}},triggerTooltipData:{get(){return{subtitle:` - identifier: ${this.identifier}
- only: ${this.getAttribute("only")||""}
- url: ${this.getAttribute("url")||location.href}
- debounce (client-side): ${this.debounce}
- ignore-inner-updates: ${this.hasAttribute("ignore-inner-updates")} - `,content:` -
- - element log -
- ${e.triggerElementLog.queue.slice(-10).map(t=>`
${t}
`).join("")} - `}}}})}function Xt(){document.addEventListener("turbo-boost:devtools-start",()=>H.register("updates-for","updates-for")),window.CableReady.devtools=F,document.addEventListener("turbo:load",()=>{document.querySelectorAll("updates-for").forEach(e=>{z(e,"updates-for","updates"),Le(e),e.initializeDevtool()}),document.querySelectorAll("cable-ready-updates-for").forEach(e=>{z(e,"updates-for","updates"),Le(e),e.initializeDevtool()}),CableReady.devtools.start()})}var Jt=m(()=>{ie(),ie(),Xt()});function z(e,t,o){Object.assign(e,{initializeDevtool(){let r=()=>this.devtool.show();addEventListener("turbo-boost:devtools-start",()=>{this.devtool=new H(this),this.addEventListener("mouseenter",r)}),addEventListener("turbo-boost:devtools-stop",()=>{this.removeEventListener("mouseenter",r),this.removeDevtool()}),this.dispatchEvent(new CustomEvent("turbo-boost:devtools-connect",{bubbles:!0}))},hideDevtool(){var r;(r=this.devtool)==null||r.hide({active:!1})},removeDevtool(){this.devtool.hide({active:!1}),this.devtool.unregisterEventListeners(),delete this.devtool},name:t,targetLineLabel:o}),["triggerElement","morphElement","targetElement"].filter(r=>e[r]===void 0).forEach(r=>{Object.defineProperty(e,r,{get(){return e}})})}var Se,Ce,Ae,F,ie=m(()=>{Me(),Ft(),{restart:Se,start:Ce,stop:Ae}=I,(async()=>window.CableReady&&await Promise.resolve().then(()=>(Jt(),Wt)))(),F={restart:Se,start:Ce,stop:Ae}});ie();var E=class extends HTMLElement{constructor(t){super(),this.devtool="unknown",this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=t||""}connectedCallback(){this.ensureId()}ensureId(){this.id.trim().length||(this.id=`${this.tagName}-${this.uuidv4()}`.toLowerCase())}uuidv4(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}get viewStack(){let t=this.getAttribute("view-stack");return t?JSON.parse(t):[]}get partial(){return this.viewStack[0]}};var Gt=` + `,s=K(n,((o=this.delegate.triggerTooltipData)==null?void 0:o.subtitle)||"",((r=this.delegate.triggerTooltipData)==null?void 0:r.content)||"",{id:`${this.delegate.id}-trigger`,backgroundColor:"lavender",color:"blueviolet"}),i=V(this.delegate.triggerElement),L=Math.ceil(i.top-s.offsetHeight*2),Oe=Math.ceil(i.left+i.width+s.offsetWidth/3);return s.style.top=`${L}px`,s.style.left=`${Oe}px`,s.line=new LeaderLine(this.delegate.triggerElement,s,k(T({},this.leaderLineOptions),{color:"blueviolet"})),e&&(s.lineToTarget=new LeaderLine(s,e,k(T({},this.leaderLineOptions),{color:"blueviolet",middleLabel:this.delegate.targetLineLabel,size:2.1})),e.drag.onMove=()=>{var S,ne;e.line.position(),(S=s.lineToTarget)==null||S.position(),(ne=s.lineToRendering)==null||ne.position()}),t&&(s.lineToRendering=new LeaderLine(s,t,k(T({},this.leaderLineOptions),{color:"blueviolet",middleLabel:this.delegate.renderingLineLabel,size:2.1})),t.drag.onMove=()=>{var S;t.line.position(),s.lineToTarget&&s.lineToTarget.position(),(S=s.lineToRendering)==null||S.position()}),s.drag=new PlainDraggable(s),s.drag.onMove=()=>{s.line.position(),s.lineToTarget&&s.lineToTarget.position(),s.lineToRendering&&s.lineToRendering.position()},s}get leaderLineOptions(){return{dash:{animation:!0},dropShadow:{opacity:.3},endPlug:"arrow3",endPlugSize:1.7,size:3,startPlug:"disc",startPlugSize:1}}},{restart:Bt,start:Ht,stop:Rt}=Z;function xe(e,t,o){Object.assign(e,{initializeDevtool(){let r=()=>this.devtool.show();addEventListener("turbo-boost:devtools-start",()=>{this.devtool=new oe(this),this.addEventListener("mouseenter",r)}),addEventListener("turbo-boost:devtools-stop",()=>{this.removeEventListener("mouseenter",r),this.removeDevtool()}),this.dispatchEvent(new CustomEvent("turbo-boost:devtools-connect",{bubbles:!0}))},hideDevtool(){var r;(r=this.devtool)==null||r.hide({active:!1})},removeDevtool(){this.devtool.hide({active:!1}),this.devtool.unregisterEventListeners(),delete this.devtool},name:t,targetLineLabel:o}),["triggerElement","morphElement","targetElement"].filter(r=>e[r]===void 0).forEach(r=>{Object.defineProperty(e,r,{get(){return e}})})}var Le={restart:Bt,start:Ht,stop:Rt};var v=class extends HTMLElement{constructor(t){super(),this.devtool="unknown",this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=t||""}connectedCallback(){this.ensureId()}ensureId(){this.id.trim().length||(this.id=`${this.tagName}-${this.uuidv4()}`.toLowerCase())}uuidv4(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}get viewStack(){let t=this.getAttribute("view-stack");return t?JSON.parse(t):[]}get partial(){return this.viewStack[0]}};var jt=` -`,Pe=100,ae=400,w=class extends E{constructor(){super(Gt)}showBusyElement(){clearTimeout(this.showBusyElementTimeout),clearTimeout(this.hideBusyElementTimeout),this.busyElement&&(this.busyStartedAt=Date.now()+Pe,this.showBusyElementTimeout=setTimeout(()=>{this.busySlotElement.hidden=!1,this.defaultSlotElement.hidden=!0},Pe))}hideBusyElement(){if(clearTimeout(this.showBusyElementTimeout),clearTimeout(this.hideBusyElementTimeout),!this.busyElement)return;let t=ae-(Date.now()-this.busyStartedAt);t<0&&(t=0),delete this.busyStartedAt,this.hideBusyElementTimeout=setTimeout(()=>{this.busySlotElement.hidden=!0,this.defaultSlotElement.hidden=!1},t)}get busyElement(){return this.querySelector(':scope > [slot="busy"]')}get busySlotElement(){return this.shadowRoot.querySelector('slot[name="busy"]')}get defaultSlotElement(){return this.shadowRoot.querySelector("slot:not([name])")}get busy(){return this.getAttribute("busy")==="true"}set busy(t){t=!!t,this.busy!==t&&(this.setAttribute("busy",t),t?this.showBusyElement():this.hideBusyElement())}get busyStartedAt(){return this.dataset.busyStartedAt?Number(this.dataset.busyStartedAt):0}set busyStartedAt(t){this.dataset.busyStartedAt=t}};var R=class extends w{connectedCallback(){super.connectedCallback(),this.mouseenterHandler=this.onMouseenter.bind(this),this.addEventListener("mouseenter",this.mouseenterHandler),this.collapseHandler=this.collapse.bind(this),this.collapseNowHandler=this.collapseNow.bind(this),this.collapseOn.forEach(t=>{let o=t.split("@"),r=o[0];o.length>1?(o[1].match(/^self|window$/)?self:self[o[1]]).addEventListener(r,this.collapseNowHandler):this.addEventListener(r,this.collapseHandler)})}disconnectedCallback(){this.removeEventListener("mouseenter",this.mouseenterHandler),this.collapseOn.forEach(t=>{let o=t.split("@"),r=o[0];o.length>1?(o[1].match(/^self|window$/)?self:self[o[1]]).removeEventListener(r,this.collapseNowHandler):this.removeEventListener(r,this.collapseHandler)})}cacheHTML(){}renderCachedHTML(){}onMouseenter(){clearTimeout(this.collapseTimeout)}collapse(t=250){if(clearTimeout(this.collapseTimeout),!this.busy){if(typeof t!="number"&&(t=250),t>0)return this.collapseTimeout=setTimeout(()=>this.collapse(0),t);this.innerHTML="";try{this.expanded=!1,this.triggerElement.hideDevtool()}catch(o){}}}collapseNow(t){t.target.closest("turbo-boost-devtool-tooltip")||this.collapse(0)}collapseMatches(){document.querySelectorAll(this.collapseSelector).forEach(t=>{t.id!==this.id&&t.collapse&&t.collapse(0)})}get collapseSelector(){return this.triggerElement.collapseSelector||this.getAttribute("collapse-selector")}get focusSelector(){return this.getAttribute("focus-selector")}get triggerElement(){return document.getElementById(this.labeledBy)}get triggerElements(){return document.querySelectorAll(`[aria-controls="${this.id}"]`)}get labeledBy(){return this.getAttribute("aria-labeledby")}set labeledBy(t){return this.setAttribute("aria-labeledby",t)}get collapseOn(){let t=this.getAttribute("collapse-on");return t?JSON.parse(t):[]}get expanded(){return this.triggerElement?this.triggerElement.expanded:!1}set expanded(t){this.triggerElements.forEach(o=>o.expanded=t)}get busy(){return this.triggerElement&&this.triggerElement.busy}};var Ne;function Vt(e){["bold","bullet","code","heading1","href","italic","number","quote","strike"].forEach(o=>e.deactivateAttribute(o))}function Ut(e){if(e.value.length===0)return;let t=e.editor,o=[];for(;o[0]!==t.getSelectedRange()[0]&&o[1]!==t.getSelectedRange()[1];)o=t.getSelectedRange(),t.moveCursorInDirection("forward");t.insertString(" "),t.moveCursorInDirection("forward"),t.setSelectedRange([o[1],t.getSelectedRange()[1]]),Vt(t),t.setSelectedRange([t.getSelectedRange()[1],t.getSelectedRange()[1]])}function Kt(e){clearTimeout(Ne),Ne=setTimeout(()=>{if(!e)return;e.focus();let t=e.closest("trix-editor");try{t?Ut(t):e.selectionStart=e.selectionEnd=e.value.length}catch(o){}finally{e.scrollIntoView({block:"center",behavior:"smooth"})}},100)}var Ie=e=>Kt(e);document.addEventListener("turbo-boost:devtools-start",()=>H.register("toggle","toggles"));var ze,j=class extends w{constructor(){super(),z(this,"toggle","toggles")}connectedCallback(){super.connectedCallback();let{start:t}=TurboBoost.Commands.events;this.commandStartHandler=this.onCommandStart.bind(this),this.addEventListener(t,this.commandStartHandler);let{before:o}=TurboBoost.Streams.invokeEvents;this.beforeInvokeHandler=this.onBeforeInvoke.bind(this),addEventListener(o,this.beforeInvokeHandler),this.initializeDevtool()}disconnectedCallback(){setTimeout(()=>{let{start:t}=TurboBoost.Commands.events;this.removeEventListener(t,this.commandStartHandler);let{before:o}=TurboBoost.Streams.invokeEvents;removeEventListener(o,this.beforeInvokeHandler),this.removeDevtool()},1e3)}onCommandStart(t){ze=this.focusSelector,this.targetElement.labeledBy=this.id,this.targetElement.collapseMatches(),this.busy=!0}onBeforeInvoke(t){if(t.detail.method!=="morph"||t.target.id!==this.morphs)return;let o=`turbo-boost-toggle-target[aria-labeledby="${this.id}"]`;if(!t.target.querySelector(o))return;let r=Date.now()-this.busyStartedAt,n=ae-r;n<10&&(n=10),t.detail.invoke={delay:n},setTimeout(()=>{this.busy=!1,this.morphToggleTriggerElements.forEach(i=>i.busy=!1)},n-10),setTimeout(()=>Ie(this.targetElement.querySelector(ze)),n+100)}get sharedViews(){if(!this.targetElement)return[];if(!this.targetElement.viewStack)return[];let t=(o,r)=>(this.targetElement.viewStack.includes(r)&&o.push(r),o);return this.viewStack.reduce(t.bind(this),[])}get renders(){return this.getAttribute("renders")}get morphs(){return this.getAttribute("morphs")}get morphToggleTriggerElements(){return Array.from(this.morphElement.querySelectorAll("turbo-boost-toggle-trigger"))}get controls(){return this.getAttribute("aria-controls")}get collapseSelector(){return this.getAttribute("collapse-selector")}get focusSelector(){return this.getAttribute("focus-selector")||this.targetElement.focusSelector}get remember(){return this.getAttribute("remember")==="true"}set remember(t){return this.setAttribute("remember",!!t)}get expanded(){return this.getAttribute("aria-expanded")==="true"}set expanded(t){this.setAttribute("aria-expanded",!!t)}get collapsed(){return!this.expanded}get command(){return this.dataset.turboCommand}get renderingLineLabel(){return"renders & morphs"}get morphElement(){return this.morphs?document.getElementById(this.morphs):null}get targetElement(){return this.controls?document.getElementById(this.controls):null}get triggerTooltipData(){let t=this.triggerElement.viewStack.reverse().map((o,r)=>this.triggerElement.sharedViews.includes(o)?`
${r+1}. ${o}
`:`
${r+1}. ${o}
`,this).join("");return{subtitle:` +`,Se=100,re=400,y=class extends v{constructor(){super(jt)}showBusyElement(){clearTimeout(this.showBusyElementTimeout),clearTimeout(this.hideBusyElementTimeout),this.busyElement&&(this.busyStartedAt=Date.now()+Se,this.showBusyElementTimeout=setTimeout(()=>{this.busySlotElement.hidden=!1,this.defaultSlotElement.hidden=!0},Se))}hideBusyElement(){if(clearTimeout(this.showBusyElementTimeout),clearTimeout(this.hideBusyElementTimeout),!this.busyElement)return;let t=re-(Date.now()-this.busyStartedAt);t<0&&(t=0),delete this.busyStartedAt,this.hideBusyElementTimeout=setTimeout(()=>{this.busySlotElement.hidden=!0,this.defaultSlotElement.hidden=!1},t)}get busyElement(){return this.querySelector(':scope > [slot="busy"]')}get busySlotElement(){return this.shadowRoot.querySelector('slot[name="busy"]')}get defaultSlotElement(){return this.shadowRoot.querySelector("slot:not([name])")}get busy(){return this.getAttribute("busy")==="true"}set busy(t){t=!!t,this.busy!==t&&(this.setAttribute("busy",t),t?this.showBusyElement():this.hideBusyElement())}get busyStartedAt(){return this.dataset.busyStartedAt?Number(this.dataset.busyStartedAt):0}set busyStartedAt(t){this.dataset.busyStartedAt=t}};var B=class extends y{connectedCallback(){super.connectedCallback(),this.mouseenterHandler=this.onMouseenter.bind(this),this.addEventListener("mouseenter",this.mouseenterHandler),this.collapseHandler=this.collapse.bind(this),this.collapseNowHandler=this.collapseNow.bind(this),this.collapseOn.forEach(t=>{let o=t.split("@"),r=o[0];o.length>1?(o[1].match(/^self|window$/)?self:self[o[1]]).addEventListener(r,this.collapseNowHandler):this.addEventListener(r,this.collapseHandler)})}disconnectedCallback(){this.removeEventListener("mouseenter",this.mouseenterHandler),this.collapseOn.forEach(t=>{let o=t.split("@"),r=o[0];o.length>1?(o[1].match(/^self|window$/)?self:self[o[1]]).removeEventListener(r,this.collapseNowHandler):this.removeEventListener(r,this.collapseHandler)})}cacheHTML(){}renderCachedHTML(){}onMouseenter(){clearTimeout(this.collapseTimeout)}collapse(t=250){if(clearTimeout(this.collapseTimeout),!this.busy){if(typeof t!="number"&&(t=250),t>0)return this.collapseTimeout=setTimeout(()=>this.collapse(0),t);this.innerHTML="";try{this.expanded=!1,this.triggerElement.hideDevtool()}catch(o){}}}collapseNow(t){t.target.closest("turbo-boost-devtool-tooltip")||this.collapse(0)}collapseMatches(){document.querySelectorAll(this.collapseSelector).forEach(t=>{t.id!==this.id&&t.collapse&&t.collapse(0)})}get collapseSelector(){return this.triggerElement.collapseSelector||this.getAttribute("collapse-selector")}get focusSelector(){return this.getAttribute("focus-selector")}get triggerElement(){return document.getElementById(this.labeledBy)}get triggerElements(){return document.querySelectorAll(`[aria-controls="${this.id}"]`)}get labeledBy(){return this.getAttribute("aria-labeledby")}set labeledBy(t){return this.setAttribute("aria-labeledby",t)}get collapseOn(){let t=this.getAttribute("collapse-on");return t?JSON.parse(t):[]}get expanded(){return this.triggerElement?this.triggerElement.expanded:!1}set expanded(t){this.triggerElements.forEach(o=>o.expanded=t)}get busy(){return this.triggerElement&&this.triggerElement.busy}};var Ce;function Mt(e){["bold","bullet","code","heading1","href","italic","number","quote","strike"].forEach(o=>e.deactivateAttribute(o))}function qt(e){if(e.value.length===0)return;let t=e.editor,o=[];for(;o[0]!==t.getSelectedRange()[0]&&o[1]!==t.getSelectedRange()[1];)o=t.getSelectedRange(),t.moveCursorInDirection("forward");t.insertString(" "),t.moveCursorInDirection("forward"),t.setSelectedRange([o[1],t.getSelectedRange()[1]]),Mt(t),t.setSelectedRange([t.getSelectedRange()[1],t.getSelectedRange()[1]])}function Pt(e){clearTimeout(Ce),Ce=setTimeout(()=>{if(!e)return;e.focus();let t=e.closest("trix-editor");try{t?qt(t):e.selectionStart=e.selectionEnd=e.value.length}catch(o){}finally{e.scrollIntoView({block:"center",behavior:"smooth"})}},100)}var Ae=e=>Pt(e);document.addEventListener("turbo-boost:devtools-start",()=>oe.register("toggle","toggles"));var $e,H=class extends y{constructor(){super(),xe(this,"toggle","toggles")}connectedCallback(){super.connectedCallback();let{start:t}=TurboBoost.Commands.events;this.commandStartHandler=this.onCommandStart.bind(this),this.addEventListener(t,this.commandStartHandler);let{before:o}=TurboBoost.Streams.invokeEvents;this.beforeInvokeHandler=this.onBeforeInvoke.bind(this),addEventListener(o,this.beforeInvokeHandler),this.initializeDevtool()}disconnectedCallback(){setTimeout(()=>{let{start:t}=TurboBoost.Commands.events;this.removeEventListener(t,this.commandStartHandler);let{before:o}=TurboBoost.Streams.invokeEvents;removeEventListener(o,this.beforeInvokeHandler),this.removeDevtool()},1e3)}onCommandStart(t){$e=this.focusSelector,this.targetElement.labeledBy=this.id,this.targetElement.collapseMatches(),this.busy=!0}onBeforeInvoke(t){if(t.detail.method!=="morph"||t.target.id!==this.morphs)return;let o=`turbo-boost-toggle-target[aria-labeledby="${this.id}"]`;if(!t.target.querySelector(o))return;let r=Date.now()-this.busyStartedAt,n=re-r;n<10&&(n=10),t.detail.invoke={delay:n},setTimeout(()=>{this.busy=!1,this.morphToggleTriggerElements.forEach(s=>s.busy=!1)},n-10),setTimeout(()=>Ae(this.targetElement.querySelector($e)),n+100)}get sharedViews(){if(!this.targetElement)return[];if(!this.targetElement.viewStack)return[];let t=(o,r)=>(this.targetElement.viewStack.includes(r)&&o.push(r),o);return this.viewStack.reduce(t.bind(this),[])}get renders(){return this.getAttribute("renders")}get morphs(){return this.getAttribute("morphs")}get morphToggleTriggerElements(){return Array.from(this.morphElement.querySelectorAll("turbo-boost-toggle-trigger"))}get controls(){return this.getAttribute("aria-controls")}get collapseSelector(){return this.getAttribute("collapse-selector")}get focusSelector(){return this.getAttribute("focus-selector")||this.targetElement.focusSelector}get remember(){return this.getAttribute("remember")==="true"}set remember(t){return this.setAttribute("remember",!!t)}get expanded(){return this.getAttribute("aria-expanded")==="true"}set expanded(t){this.setAttribute("aria-expanded",!!t)}get collapsed(){return!this.expanded}get command(){return this.dataset.turboCommand}get renderingLineLabel(){return"renders & morphs"}get morphElement(){return this.morphs?document.getElementById(this.morphs):null}get targetElement(){return this.controls?document.getElementById(this.controls):null}get triggerTooltipData(){let t=this.triggerElement.viewStack.reverse().map((o,r)=>this.triggerElement.sharedViews.includes(o)?`
${r+1}. ${o}
`:`
${r+1}. ${o}
`,this).join("");return{subtitle:` id: ${this.triggerElement.id}
aria-controls: ${this.triggerElement.controls}
aria-expanded: ${this.triggerElement.expanded}
@@ -254,5 +233,5 @@ var Fe=Object.defineProperty,We=Object.defineProperties,Xe=Object.getOwnProperty View Stack
${t} - `}}};customElements.define("turbo-boost",E);customElements.define("turbo-boost-toggle-target",R);customElements.define("turbo-boost-toggle-trigger",j);self.TurboBoost=self.TurboBoost||{};self.TurboBoost.devtools=F;self.TurboBoost.Elements={};var ko=self.TurboBoost.Elements;export{ko as default}; + `}}};customElements.define("turbo-boost",v);customElements.define("turbo-boost-toggle-target",B);customElements.define("turbo-boost-toggle-trigger",H);self.TurboBoost=self.TurboBoost||{};self.TurboBoost.devtools=Le;self.TurboBoost.Elements={};var uo=self.TurboBoost.Elements;export{uo as default}; //# sourceMappingURL=elements.js.map diff --git a/app/assets/builds/@turbo-boost/elements.js.map b/app/assets/builds/@turbo-boost/elements.js.map index 6c581c2..15165c1 100644 --- a/app/assets/builds/@turbo-boost/elements.js.map +++ b/app/assets/builds/@turbo-boost/elements.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../../../../node_modules/@turbo-boost/commands/app/assets/builds/@turbo-boost/commands.js", "../../../../node_modules/@turbo-boost/devtools/src/utils/dom.js", "../../../../node_modules/@turbo-boost/devtools/src/elements/devtool_element.js", "../../../../node_modules/@turbo-boost/devtools/src/elements/supervisor_element.js", "../../../../node_modules/@turbo-boost/devtools/src/elements/tooltip_element.js", "../../../../node_modules/@turbo-boost/devtools/src/dependencies.js", "../../../../node_modules/@turbo-boost/devtools/src/supervisor.js", "../../../../node_modules/@turbo-boost/devtools/src/devtool.js", "../../../../node_modules/@turbo-boost/devtools/src/delegates/cable_ready.js", "../../../../node_modules/@turbo-boost/devtools/src/index.js", "../../../javascript/elements/turbo_boost_element/index.js", "../../../javascript/elements/toggle_elements/toggle_element/index.js", "../../../javascript/elements/toggle_elements/target_element/index.js", "../../../javascript/elements/toggle_elements/trigger_element/focus.js", "../../../javascript/elements/toggle_elements/trigger_element/index.js", "../../../javascript/elements/index.js", "../../../javascript/index.js"], - "sourcesContent": ["var Z=Object.defineProperty,ee=Object.defineProperties;var te=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var _=(e,t,r)=>t in e?Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t)=>{for(var r in t||(t={}))re.call(t,r)&&_(e,r,t[r]);if(X)for(var r of X(t))oe.call(t,r)&&_(e,r,t[r]);return e},u=(e,t)=>ee(e,te(t));var O=class{get element(){return document.querySelector('meta[name=\"turbo-boost\"]')}get token(){return this.element.getAttribute(\"content\")}get busy(){return this.element.dataset.busy===\"true\"}set busy(t){return this.element.dataset.busy=!!t}},a=new O;var i={start:\"turbo-boost:command:start\",success:\"turbo-boost:command:success\",finish:\"turbo-boost:command:finish\",abort:\"turbo-boost:command:abort\",clientError:\"turbo-boost:command:client-error\",serverError:\"turbo-boost:command:server-error\"},l={stateLoad:\"turbo-boost:state:load\",stateChange:\"turbo-boost:state:change\"},f=s(s({},i),l);function d(e,t,r={}){return new Promise(o=>{r=r||{},r.detail=r.detail||{},t=t||document;let n=new CustomEvent(e,u(s({},r),{bubbles:!0}));t.dispatchEvent(n),o(n)})}var B;function k(e,t=null){if(!e||typeof e!=\"object\")return e;let r=new Proxy(e,{deleteProperty(o,n){return delete o[n],d(l.stateChange,a.element,{detail:{state:B}}),!0},set(o,n,c,A){return o[n]=k(c,this),d(l.stateChange,a.element,{detail:{state:B}}),!0}});if(Array.isArray(e))e.forEach((o,n)=>e[n]=k(o,r));else if(typeof e==\"object\")for(let[o,n]of Object.entries(e))e[o]=k(n,r);return t||(B=r),r}var F=k;var D,g,C,N;function J(){if(!a.element)return E();let e=atob(a.element.dataset.state);C={},g=F(JSON.parse(e)),D=s({},g),delete a.element.dataset.clientStateChange,setTimeout(()=>d(l.stateLoad,a.element,{detail:{state:g}}))}function E(){clearTimeout(N),N=setTimeout(J,10)}D||J();addEventListener(\"DOMContentLoaded\",E);addEventListener(\"load\",E);addEventListener(\"turbo:load\",E);addEventListener(\"turbo:frame-load\",E);addEventListener(i.success,E);addEventListener(l.stateChange,e=>{C={};for(let[t,r]of Object.entries(g))D[t]!==r&&(C[t]=r);a.element.dataset.clientStateChange=!0,a.element.dataset.state=btoa(JSON.stringify(g))});var h={events:l,get current(){return g},get delta(){return C},get payloadChunks(){return btoa(JSON.stringify(C)).match(/.{1,2000}/g)}};function ne(e){let t=\"=0&&n>=0){let c=e.slice(e.indexOf(\">\",o)+1,n);document.documentElement.innerHTML=c}}function se(e){document.body.insertAdjacentHTML(\"beforeend\",e)}var v={append:se,replaceDocument:ne};var L={};function ae(e){L[e.id]=e}function ie(e){delete L[e]}var S={add:ae,remove:ie,get commands(){return[...Object.values(L)]},get length(){return Object.keys(L).length}};function M(e){e.detail.endedAt=Date.now(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>d(i.finish,e.target,{detail:e.detail}),25)}addEventListener(i.serverError,M);addEventListener(i.success,M);addEventListener(i.finish,e=>S.remove(e.detail.id),!0);var T={events:i};var R={};addEventListener(\"turbo:before-fetch-request\",e=>{let t=e.target.closest(\"turbo-frame\"),{fetchOptions:r}=e.detail;if(a.busy){let o=[\"text/vnd.turbo-boost.html\",r.headers.Accept];o=o.filter(n=>n&&n.trim().length>0).join(\", \"),r.headers.Accept=o,r.headers[\"TurboBoost-Token\"]=a.token}h.payloadChunks.forEach((o,n)=>{r.headers[`TurboBoost-State-${n.toString().padStart(4,\"0\")}`]=o})});addEventListener(\"turbo:before-fetch-response\",e=>{let t=e.target.closest(\"turbo-frame\"),{fetchResponse:r}=e.detail;if(t&&(R[t.id]=t.src),r.header(\"TurboBoost\")){if(r.statusCode<200||r.statusCode>399){let o=`Server returned a ${r.statusCode} status code! TurboBoost Commands require 2XX-3XX status codes.`;d(T.events.clientError,document,{detail:u(s({},e.detail),{error:o})},!0)}r.header(\"TurboBoost\")===\"Append\"&&(e.preventDefault(),r.responseText.then(o=>v.append(o)))}});addEventListener(\"turbo:frame-load\",e=>{let t=e.target.closest(\"turbo-frame\");t.dataset.turboBoostSrc=R[t.id]||t.src||t.dataset.turboBoostSrc,delete R[t.id]});var de={frameAttribute:\"data-turbo-frame\",methodAttribute:\"data-turbo-method\",commandAttribute:\"data-turbo-command\",confirmAttribute:\"data-turbo-confirm\"},m=s({},de);var j={method:e=>Promise.resolve(confirm(e))},me=e=>e.detail.driver===\"method\",ue=e=>{if(e.detail.driver!==\"form\")return!1;let t=e.target,r=t.closest(\"turbo-frame\"),o=t.closest(`[${m.frameAttribute}]`);return!!(r||o)},ce=e=>me(e)||ue(e);document.addEventListener(i.start,async e=>{let t=e.target.getAttribute(m.confirmAttribute);if(!t||(e.detail.confirmation=!0,ce(e)))return;await j.method(t)||e.preventDefault()});var W=j;var b=[],$;function le(e,t){let r=b.find(o=>o.name===e);return r&&b.splice(b.indexOf(r),1),b=[{name:e,selectors:t},...b],document.removeEventListener(e,$,!0),document.addEventListener(e,$,!0),s({},b.find(o=>o.name===e))}function fe(e){return b.find(t=>t.selectors.find(r=>Array.from(document.querySelectorAll(r)).find(o=>o===e)))}function be(e,t){let r=fe(t);return r&&r.name===e}var p={register:le,isRegisteredForElement:be,get events(){return[...b]},set handler(e){$=e}};function pe(e){return e.closest(`[${m.commandAttribute}]`)}function he(e){return e.closest(\"turbo-frame[src]\")||e.closest(\"turbo-frame[data-turbo-frame-src]\")||e.closest(\"turbo-frame\")}function ve(e,t={}){if(e.tagName.toLowerCase()!==\"select\")return t.value=e.value||null;if(!e.multiple)return t.value=e.options[e.selectedIndex].value;t.values=Array.from(e.options).reduce((r,o)=>(o.selected&&r.push(o.value),r),[])}function ge(e){let t=Array.from(e.attributes).reduce((r,o)=>{let n=o.value;return r[o.name]=n,r},{});return t.tag=e.tagName,t.checked=!!e.checked,t.disabled=!!e.disabled,ve(e,t),delete t.class,delete t.action,delete t.href,delete t[m.commandAttribute],delete t[m.frameAttribute],t}var y={buildAttributePayload:ge,findClosestCommand:pe,findClosestFrameWithSource:he};function Ee(e,t={}){t.token=a.token;let r=document.createElement(\"input\");r.type=\"hidden\",r.name=\"turbo_boost_command\",r.value=JSON.stringify(t),e.appendChild(r)}var U={invokeCommand:Ee};function xe(e,t={}){let r=document.createElement(\"a\");r.href=e;let o=new URL(r);return o.searchParams.set(\"turbo_boost_command\",JSON.stringify(t)),o}var x={build:xe};function Ce(e,t){let r=t.src;t=s({},t),delete t.src,e.src=x.build(r,t)}var H={invokeCommand:Ce};function Te(e,t={}){let r=t.src;t=s({},t),delete t.src,delete t.href,e.setAttribute(\"href\",x.build(r,t))}var V={invokeCommand:Te};function ye(e){let t=e.target;d(T.events.abort,document,{detail:u(s({},e.detail),{xhr:t})})}function P(e){let t=e.target;t.getResponseHeader(\"TurboBoost\")===\"Append\"||t.getResponseHeader(\"Content-Type\").startsWith(\"text/vnd.turbo-boost.html\")?v.append(t.responseText):v.replaceDocument(t.responseText);let o=`Server returned a ${t.status} status code! TurboBoost Commands require 2XX-3XX status codes.`;d(T.events.clientError,document,{detail:u(s({},e.detail),{error:o,xhr:t})},!0)}function Ae(e){let t=e.target;if(t.status<200||t.status>399)return P(e);let r=t.responseText;t.getResponseHeader(\"TurboBoost\")===\"Append\"||t.getResponseHeader(\"Content-Type\").startsWith(\"text/vnd.turbo-boost.html\")?v.append(t.responseText):v.replaceDocument(t.responseText)}function ke(e){let t=e.src;e=s({},e),delete e.src;try{let r=new XMLHttpRequest;r.open(\"GET\",x.build(t,e),!0),r.setRequestHeader(\"Accept\",\"text/vnd.turbo-boost.html, text/html, application/xhtml+xml\"),r.setRequestHeader(\"TurboBoost-Token\",a.token),h.payloadChunks.forEach((o,n)=>r.setRequestHeader(`TurboBoost-State-${n.toString().padStart(4,\"0\")}`,o)),r.addEventListener(\"abort\",ye),r.addEventListener(\"error\",P),r.addEventListener(\"load\",Ae),r.send()}catch(r){let o=`Unexpected error sending HTTP request! ${r.message}`;P(r,{detail:{message:o}})}}var G={invokeCommand:ke};function q(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboBoostSrc||location.href}function Le(e){let t=y.findClosestFrameWithSource(e),{turboFrame:r,turboMethod:o}=e.dataset;return e.tagName.toLowerCase()===\"form\"?{name:\"form\",reason:\"Element is a form.\",frame:t,src:e.action,invokeCommand:U.invokeCommand}:o&&o.length>0?{name:\"method\",reason:\"Element defines data-turbo-method.\",frame:t,src:e.href,invokeCommand:V.invokeCommand}:r&&r!==\"_self\"?(t=document.getElementById(r),{name:\"frame\",reason:\"element targets a frame that is not _self\",frame:t,src:q(e,t),invokeCommand:H.invokeCommand}):(!r||r===\"_self\")&&t?{name:\"frame\",reason:\"element does NOT target a frame or targets _self and is contained by a frame\",frame:t,src:q(e,t),invokeCommand:H.invokeCommand}:{name:\"window\",reason:\"element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)\",frame:null,src:q(e),invokeCommand:G.invokeCommand}}var I={find:Le};var w=\"unknown\",z={debug:Object.values(f),info:Object.values(f),warn:[f.abort,f.clientError,f.serverError],error:[f.clientError,f.serverError],unknown:[]};Object.values(f).forEach(e=>{addEventListener(e,t=>{if(z[w].includes(t.type)){let{target:r,detail:o}=t;console[w](t.type,{target:r,detail:o})}})});var K={get level(){return w},set level(e){return Object.keys(z).includes(e)||(e=\"unknown\"),w=e}};function Se(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var Q={v4:Se};function Y(e,t){return{id:e,name:t.getAttribute(m.commandAttribute),elementId:t.id.length>0?t.id:null,elementAttributes:y.buildAttributePayload(t),startedAt:Date.now()}}async function we(e){let t,r={};try{if(t=y.findClosestCommand(e.target),!t||!p.isRegisteredForElement(e.type,t))return;let o=`turbo-command-${Q.v4()}`,n=I.find(t),c=u(s({},Y(o,t)),{driver:n.name,frameId:n.frame?n.frame.id:null,src:n.src}),A=await d(i.start,t,{cancelable:!0,detail:c});if(A.defaultPrevented||A.detail.confirmation&&e.defaultPrevented)return d(i.abort,t,{detail:{message:`An event handler for '${i.start}' prevented default behavior and blocked command invocation!`,source:A}});switch(n=I.find(t),c=u(s({},Y(o,t)),{driver:n.name,frameId:n.frame?n.frame.id:null,src:n.src}),S.add(c),[\"frame\",\"window\"].includes(n.name)&&e.preventDefault(),a.busy=!0,setTimeout(()=>a.busy=!1,10),n.name){case\"method\":return n.invokeCommand(t,c);case\"form\":return n.invokeCommand(t,c);case\"frame\":return n.invokeCommand(n.frame,c);case\"window\":return n.invokeCommand(c)}}catch(o){d(i.clientError,t,{detail:u(s({},r),{error:o})})}}self.TurboBoost=self.TurboBoost||{};self.TurboBoost=u(s({},self.TurboBoost),{stateEvents:l,get state(){return h.current},get stateDelta(){return h.delta}});self.TurboBoost.Commands||(p.handler=we,p.register(\"click\",[`[${m.commandAttribute}]`]),p.register(\"submit\",[`form[${m.commandAttribute}]`]),p.register(\"change\",[`input[${m.commandAttribute}]`,`select[${m.commandAttribute}]`,`textarea[${m.commandAttribute}]`]),self.TurboBoost.Commands={confirmation:W,logger:K,schema:m,events:i,registerEventDelegate:p.register,get eventDelegates(){return p.events}});var Qt=self.TurboBoost.Commands;export{Qt as default};\n//# sourceMappingURL=commands.js.map\n", "export function template (html) {\n let template = document.createElement('template')\n template.innerHTML = html\n return template\n}\n\nexport function appendHTML (html, parent) {\n parent = parent || document.body\n const clone = template(html).content.cloneNode(true)\n const child = clone.querySelector('*')\n return parent.appendChild(child)\n}\n\nexport function addHighlight (element, options = {}) {\n if (!element) return\n removeHighlight(element)\n let { outline, outlineOffset } = options\n\n outline = outline || 'dashed 3px red'\n outlineOffset = outlineOffset || '0px'\n\n element.originalStyles = element.originalStyles || {\n display: element.style.display,\n minHeight: element.style.minHeight,\n minWidth: element.style.minWidth,\n outline: element.style.outline,\n outlineOffset: element.style.outlineOffset\n }\n\n if (\n getComputedStyle(element).display.match(/^inline$/i) &&\n element.offsetWidth === 0 &&\n element.offsetHeight === 0\n ) {\n element.style.display = 'inline-block'\n element.style.minHeight = '2px'\n element.style.minWidth = '2px'\n }\n element.style.outline = outline\n element.style.outlineOffset = outlineOffset\n element.dataset.turboBoostHighlight = true\n}\n\nexport function removeHighlight (element) {\n if (!element) return\n if (element.originalStyles) {\n for (const [key, value] of Object.entries(element.originalStyles))\n value ? (element.style[key] = value) : (element.style[key] = '')\n delete element.originalStyles\n }\n delete element.dataset.turboBoostHighlight\n}\n\nexport function coordinates (element) {\n if (!element) return {}\n const rect = element.getBoundingClientRect()\n const width = element.offsetWidth\n const height = element.offsetHeight\n const top = rect.top + window.scrollY\n const left = rect.left + window.scrollX\n const right = left + width\n const bottom = top + height\n return { top, left, right, bottom, width, height }\n}\n\nexport function attempt (callback) {\n try {\n callback()\n } catch {}\n}\n", "export default class DevtoolElement extends HTMLElement {\n constructor () {\n super()\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n this.labelElement.addEventListener('click', event => {\n event.preventDefault()\n this.toggle()\n })\n this.checkboxElement.addEventListener('change', event =>\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n )\n }\n\n toggle () {\n this.checked ? this.uncheck() : this.check()\n }\n\n check () {\n this.checkboxElement.checked = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n }\n\n uncheck () {\n this.checkboxElement.checked = false\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n }\n\n get name () {\n return this.getAttribute('name')\n }\n\n get checked () {\n return this.checkboxElement.checked\n }\n\n get checkboxElement () {\n return this.shadowRoot.querySelector('input')\n }\n\n get labelElement () {\n return this.shadowRoot.querySelector('label')\n }\n\n get html () {\n return `\n \n
\n \n \n
\n `\n }\n\n get stylesheet () {\n return `\n :host, :host * {\n cursor: pointer;\n }\n\n div {\n display: flex;\n margin-right: 10px;\n }\n\n input:checked + label{\n font-weight: bold;\n }\n\n label {\n color: black;\n }\n `\n }\n}\n", "import { appendHTML } from '../utils/dom.js'\n\nexport default class SupervisorElement extends HTMLElement {\n constructor () {\n super()\n this.enabledDevtools = {}\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n this.shadowRoot.querySelector('button').addEventListener('click', () =>\n this.dispatchEvent(\n new CustomEvent('turbo-boost:devtools-close', {\n bubbles: true\n })\n )\n )\n\n this.addEventListener('change', event => {\n const devtoolElement = event.target\n const { checked, name } = devtoolElement\n checked ? this.enableDevtool(name) : this.disableDevtool(name)\n })\n }\n\n enableDevtool (name) {\n if (this.enabledDevtools[name]) return\n this.enabledDevtools[name] = true\n this.dispatchEvent(\n new CustomEvent('turbo-boost:devtool-enable', {\n bubbles: true,\n detail: { name: name }\n })\n )\n }\n\n disableDevtool (name) {\n if (!this.enabledDevtools[name]) return\n delete this.enabledDevtools[name]\n this.dispatchEvent(\n new CustomEvent('turbo-boost:devtool-disable', {\n bubbles: true,\n detail: { name: name }\n })\n )\n }\n\n close () {\n this.devtoolElements.forEach(el => {\n if (el.checked) el.uncheck()\n })\n this.remove()\n }\n\n get devtoolElements () {\n return this.querySelectorAll('[slot=\"devtool\"]')\n }\n\n get closeElement () {\n return this.querySelector('button')\n }\n\n get html () {\n return `\n \n
\n \n \n \n
\n `\n }\n\n get stylesheet () {\n return `\n :host {\n background-color: gainsboro;\n border-radius: 5px;\n bottom: 20px;\n display: block;\n filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));\n left: 50%;\n outline-offset: 1px;\n outline: solid 2px black;\n padding: 5px 10px;\n position: fixed;\n transform: translateX(-50%);\n z-index: 8999;\n }\n\n * {\n -webkit-user-select: none;\n font-family: helvetica, sans-serif;\n font-size: 1rem;\n user-select: none;\n }\n\n img {\n align-self: center;\n cursor: grab;\n height: 25px;\n margin-left: -5px;\n vertical-align: middle;\n }\n\n div {\n display: flex;\n gap: 0 5px;\n position: relative;\n }\n\n [slot=\"devtool\"] {\n align-self: center;\n }\n\n button {\n align-self: center;\n background-color: darkgray;\n border-radius: 50%;\n border: none;\n color: black;\n cursor: pointer;\n font-size: 10px;\n height: 18px;\n line-height: 18px;\n margin-right: -5px;\n opacity: 0.5;\n outline: solid 1px black;\n padding: 0 2px;\n width: 18px;\n }\n\n button:hover {\n opacity: 1;\n }\n `\n }\n}\n", "export default class TooltipElement extends HTMLElement {\n constructor () {\n super()\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n }\n\n connectedCallback () {\n const savedTransform = localStorage.getItem(\n `turbo-boost-devtools-${location.href}-${this.id}-transform`\n )\n\n if (savedTransform) {\n this.style.transform = savedTransform\n }\n }\n\n disconnectedCallback () {\n if (this.id !== 'undefined' && this.id !== '') {\n localStorage.setItem(\n `turbo-boost-devtools-${location.href}-${this.id}-transform`,\n this.style.transform\n )\n }\n }\n\n get color () {\n return this.getAttribute('color') || 'darkslategray'\n }\n\n get backgroundColor () {\n return this.getAttribute('background-color') || 'gainsboro'\n }\n\n get position () {\n return this.getAttribute('position') || 'top'\n }\n\n get html () {\n return `\n \n
\n
\n \n \n
\n \n \n \n \n
\n `\n }\n\n get stylesheet () {\n return `\n :host {\n display: block;\n position: absolute;\n z-index: 8999;\n }\n\n * {\n color: ${this.color}\n font-size: 1rem;\n }\n\n [role=\"container\"] {\n background-color: ${this.backgroundColor};\n border-radius: 15px;\n filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));\n font-family: monospace;\n min-height: 30px;\n min-width: 100px;\n opacity: 0.9;\n outline-offset: 1px;\n outline: dashed 3px ${this.color};\n padding: 12px;\n position: relative;\n white-space: nowrap;\n }\n\n [role=\"title\"] {\n display: flex;\n }\n\n [role=\"title\"] slot[name=\"title\"] {\n color: ${this.color};\n display: block;\n flex-grow: 1;\n font-weight: bold;\n }\n\n [role=\"title\"] img {\n height: 25px;\n vertical-align: middle;\n }\n\n slot[name=\"subtitle\"] {\n border-bottom: dotted 1px ${this.color};\n border-top: dotted 1px ${this.color};\n color: ${this.color};\n display: block;\n font-size: 0.8rem;\n font-weight: lighter;\n margin-bottom: 12px;\n margin-top: 8px;\n padding-bottom: 4px;\n padding-top: 4px;\n width: 100%;\n }\n\n slot[name=\"content-top\"],\n slot[name=\"content\"],\n slot[name=\"content-bottom\"] {\n display: block;\n font-weight: normal;\n }\n\n slot[name=\"content-top\"] {\n color: ${this.color};\n margin-bottom: 8px;\n }\n\n slot[name=\"content\"],\n slot[name=\"content-bottom\"] {\n opacity: 0.7;\n padding-left: 12px;\n }\n\n slot[name=\"content\"] {\n color: ${this.color};\n }\n\n slot[name=\"content-bottom\"] {\n color: red;\n }\n `\n }\n}\n", "const added = []\n\nconst dependencies = {\n LeaderLine: {\n src:\n 'https://cdnjs.cloudflare.com/ajax/libs/leader-line/1.0.7/leader-line.min.js',\n integrity:\n 'sha512-0dNdzMjpT6pJdFGF1DwybFCfm3K/lzHhxaMXC/92J9/DZujHlqYFqmhTOAoD0o+LkeEsVK2ar/ESs7/Q2B6wJg==',\n global: 'LeaderLine'\n },\n\n PlainDraggable: {\n src:\n 'https://cdn.jsdelivr.net/npm/plain-draggable@2.5.14/plain-draggable.min.js',\n global: 'PlainDraggable'\n }\n}\n\nfunction exists (dependency) {\n if (dependency.global && self[dependency.global]) return true\n if (document.querySelector(`[src='${dependency.src}']`)) return true\n return added.includes(dependency)\n}\n\nfunction add (dependency) {\n if (exists(dependency)) return\n added.push(dependency)\n\n const { src, integrity } = dependency\n const script = document.createElement('script')\n script.setAttribute('src', src)\n script.setAttribute('crossorigin', 'anonymous')\n script.setAttribute('referrerpolicy', 'no-referrer')\n if (integrity) script.setAttribute('integrity', integrity)\n document.head.appendChild(script)\n}\n\nfunction remove (dependency) {\n if (!added.includes(dependency)) return\n added.splice(added.indexOf(dependency), 1)\n\n const { src } = dependency\n const el = document.querySelector(`script[src='${src}']`)\n if (el) el.remove()\n if (dependency.global && self[dependency.global])\n self[dependency.global] = null\n}\n\nfunction removeAll () {\n ;[...added].forEach(dependency => remove(dependency))\n}\n\nexport default { ...dependencies, add, remove, removeAll }\n", "import { appendHTML } from './utils/dom'\nimport DevtoolElement from './elements/devtool_element'\nimport SupervisorElement from './elements/supervisor_element'\nimport TooltipElement from './elements/tooltip_element'\nimport dependencies from './dependencies'\n\ncustomElements.define('turbo-boost-devtool', DevtoolElement)\ncustomElements.define('turbo-boost-devtool-supervisor', SupervisorElement)\ncustomElements.define('turbo-boost-devtool-tooltip', TooltipElement)\n\nlet supervisorElement\n\nfunction makeDraggable () {\n if (!supervisorElement) return\n try {\n new PlainDraggable(supervisorElement)\n } catch {\n setTimeout(makeDraggable, 200)\n }\n}\n\nfunction stop () {\n if (stopped()) return\n supervisorElement.close()\n supervisorElement.dispatchEvent(\n new CustomEvent('turbo-boost:devtools-stop', {\n bubbles: true\n })\n )\n supervisorElement = null\n dependencies.removeAll()\n}\n\nfunction start () {\n if (started()) return\n dependencies.add(dependencies.LeaderLine)\n dependencies.add(dependencies.PlainDraggable)\n supervisorElement = appendHTML(\n ''\n )\n setTimeout(makeDraggable, 200)\n supervisorElement.dispatchEvent(\n new CustomEvent('turbo-boost:devtools-start', {\n bubbles: true\n })\n )\n}\n\nfunction restart () {\n const enabledList = supervisorElement\n ? Object.keys(supervisorElement.enabledDevtools)\n : []\n\n stop()\n start()\n\n supervisorElement.devtoolElements.forEach(el => {\n if (enabledList.includes(el.name)) el.check()\n })\n}\n\nfunction started () {\n return !!supervisorElement\n}\n\nfunction stopped () {\n return !started()\n}\n\nlet restartTimeout\nfunction debouncedRestart () {\n clearTimeout(restartTimeout)\n restartTimeout = setTimeout(restart, 25)\n}\n\nfunction autoRestart () {\n if (started()) debouncedRestart()\n}\n\naddEventListener('turbo:load', autoRestart)\naddEventListener('turbo-frame:load', autoRestart)\naddEventListener('turbo-boost:devtools-connect', autoRestart)\naddEventListener('turbo-boost:devtools-close', stop)\n\nif (window.TurboBoost) {\n addEventListener(TurboBoost.Commands.events.success, autoRestart)\n addEventListener(TurboBoost.Commands.events.finish, autoRestart)\n}\n\nfunction register (name, label) {\n if (!supervisorElement) return\n return appendHTML(\n `\n \n ${label}\n \n `,\n supervisorElement\n )\n}\n\nfunction enabled (name) {\n if (!supervisorElement) return false\n return supervisorElement.enabledDevtools[name]\n}\n\nexport default {\n enabled,\n register,\n start,\n stop,\n restart: debouncedRestart,\n get started () {\n return started()\n },\n get stopped () {\n return stopped()\n }\n}\n", "// Icons courtesy of https://feathericons.com/\nimport supervisor from './supervisor'\nimport {\n appendHTML,\n addHighlight,\n attempt,\n coordinates,\n removeHighlight\n} from './utils/dom.js'\n\nfunction appendTooltip (title, subtitle, content, options = {}) {\n let { backgroundColor, color, position, id } = options\n color = color || 'white'\n position = position || 'top'\n return appendHTML(`\n \n
${title}
\n
${subtitle}
\n ${content}\n
\n `)\n}\n\nlet activeTarget\n\nexport default class Devtool {\n constructor (delegate) {\n this.delegate = delegate\n\n let hideTimeout\n const debouncedHide = () => {\n clearTimeout(hideTimeout)\n hideTimeout = setTimeout(this.hide({ active: false }), 25)\n }\n\n this.eventListeners['turbo-boost:devtool-enable'] = event => {\n // LeaderLine.positionByWindowResize = false\n const { name } = event.detail\n if (name !== this.delegate.name) return\n\n addHighlight(this.delegate.triggerElement, {\n outline: '3px dashed blueviolet',\n outlineOffset: '2px'\n })\n\n this.hide({ active: false })\n if (this.active) this.show()\n }\n\n this.eventListeners['turbo-boost:devtool-disable'] = event => {\n const { name } = event.detail\n if (name === this.delegate.name)\n removeHighlight(this.delegate.triggerElement)\n }\n\n this.eventListeners['click'] = event => {\n if (event.target.closest('turbo-boost-devtool-tooltip')) return\n debouncedHide()\n }\n\n this.eventListeners['turbo:load'] = debouncedHide\n this.eventListeners['turbo-frame:load'] = debouncedHide\n if (window.TurboBoost) {\n this.eventListeners[TurboBoost.Commands.events.finish] = debouncedHide\n }\n\n this.registerEventListeners()\n }\n\n registerEventListeners () {\n Object.entries(this.eventListeners).forEach(([type, listener]) => {\n addEventListener(type, listener)\n })\n }\n\n unregisterEventListeners () {\n Object.entries(this.eventListeners).forEach(([type, listener]) => {\n removeEventListener(type, listener)\n })\n }\n\n get eventListeners () {\n return this._eventListeners || (this._eventListeners = {})\n }\n\n show () {\n if (!this.enabled) return\n\n if (this.active) return\n this.active = true\n\n this.hide({ active: true })\n\n addHighlight(this.delegate.targetElement, {\n outline: '3px dashed darkcyan',\n outlineOffset: '-2px'\n })\n\n addHighlight(this.delegate.morphElement, {\n outline: '3px dashed chocolate',\n outlineOffset: '3px'\n })\n\n this.renderingTooltip = this.createRenderingTooltip()\n this.targetTooltip = this.createTargetTooltip()\n this.triggerTooltip = this.createTriggerTooltip(\n this.targetTooltip,\n this.renderingTooltip\n )\n\n document\n .querySelectorAll('.leader-line')\n .forEach(el => (el.style.zIndex = 100000))\n\n const data = {\n morph: {\n partial: this.delegate.triggerElement.renders,\n id: this.delegate.triggerElement.morphs,\n status: this.delegate.morphElement ? 'OK' : 'Not Found'\n },\n trigger: { partial: null, id: null, status: 'Not Found' },\n target: { partial: null, id: null, status: 'Not Found' }\n }\n\n if (this.delegate.triggerElement) {\n data.trigger = {\n partial: this.delegate.triggerElement.partial,\n id: this.delegate.triggerElement.id,\n status: 'OK'\n }\n data.target.id = this.delegate.triggerElement.controls\n }\n\n if (this.delegate.targetElement)\n data.target = {\n partial: this.delegate.targetElement.partial,\n dom_id: this.delegate.targetElement.id,\n status: 'OK'\n }\n\n console.table(data)\n }\n\n hide ({ active: active = false }) {\n document\n .querySelectorAll('turbo-boost-devtool-tooltip')\n .forEach(tooltip => {\n attempt(() => tooltip.line.remove())\n attempt(() => tooltip.drag.remove())\n attempt(() => tooltip.lineToRendering.remove())\n attempt(() => tooltip.lineToTarget.remove())\n attempt(() => tooltip.remove())\n })\n\n document.querySelectorAll('[data-turbo-boost-highlight]').forEach(el => {\n if (!el.tagName.match(/turbo-boost-toggle-trigger/i)) removeHighlight(el)\n })\n\n this.active = active\n }\n\n get active () {\n return activeTarget === this.delegate\n }\n\n set active (value) {\n if (value) activeTarget = this.delegate\n else activeTarget = null\n }\n\n get enabled () {\n return supervisor.enabled(this.delegate.name)\n }\n\n static register (name, label) {\n supervisor.register(name, label)\n }\n\n createRenderingTooltip () {\n if (!this.delegate.triggerElement.renders)\n return console.debug(\n `Unable to create the rendering tooltip! The trigger element must set the 'renders' attribute.`\n )\n\n if (!this.delegate.triggerElement.morphs)\n return console.debug(\n `Unable to create the rendering tooltip! The trigger element specified the 'morphs' attrbiute but no element matches the DOM id: '${this.triggerElement.morphs}'`\n )\n\n const title = `\n \n RENDERING - <${this.delegate.triggerElement.tagName.toLowerCase()}>\n `\n const subtitle = `\n partial: ${this.delegate.triggerElement.renders || 'unknown'}
\n morphs: ${this.delegate.triggerElement.morphs || 'unknown'}
\n `\n const content = `\n
\n The TRIGGER toggles the TARGET then renders the partial & morphs the element.
\n
\n `\n const tooltip = appendTooltip(title, subtitle, content, {\n id: `${this.delegate.id}-rendering`,\n backgroundColor: 'lightyellow',\n color: 'chocolate'\n })\n\n const coords = coordinates(this.delegate.morphElement)\n const top = Math.ceil(\n coords.top + coords.height / 2 - tooltip.offsetHeight / 2\n )\n const left = Math.ceil(coords.left + coords.width + 100)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(tooltip, this.delegate.morphElement, {\n ...this.leaderLineOptions,\n color: 'chocolate'\n })\n\n tooltip.drag = new PlainDraggable(tooltip)\n return tooltip\n }\n\n createTargetTooltip () {\n if (!this.delegate.targetElement)\n return console.debug(\n `Unable to create the target tooltip! No element matches the DOM id: '${this.delegate.triggerElement.controls}'`\n )\n\n const title = `\n \n TARGET - <${this.delegate.targetElement.tagName.toLowerCase()}>\n `\n\n const tooltip = appendTooltip(\n title,\n this.delegate.targetTooltipData?.subtitle || '',\n this.delegate.targetTooltipData?.content || '',\n {\n id: `${this.delegate.id}-target`,\n backgroundColor: 'lightcyan',\n color: 'darkcyan',\n position: 'bottom'\n }\n )\n\n const coords = coordinates(this.delegate.targetElement)\n const top = Math.ceil(coords.top + tooltip.offsetHeight)\n const left = Math.ceil(coords.left + coords.width + tooltip.offsetWidth / 3)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(tooltip, this.delegate.targetElement, {\n ...this.leaderLineOptions,\n color: 'darkcyan'\n })\n\n tooltip.drag = new PlainDraggable(tooltip)\n return tooltip\n }\n\n createTriggerTooltip (targetTooltip, renderingTooltip) {\n if (!this.delegate.triggerElement) return\n const title = `\n \n TRIGGER - <${this.delegate.triggerElement.tagName.toLowerCase()}>\n `\n\n const tooltip = appendTooltip(\n title,\n this.delegate.triggerTooltipData?.subtitle || '',\n this.delegate.triggerTooltipData?.content || '',\n {\n id: `${this.delegate.id}-trigger`,\n backgroundColor: 'lavender',\n color: 'blueviolet'\n }\n )\n\n const coords = coordinates(this.delegate.triggerElement)\n const top = Math.ceil(coords.top - tooltip.offsetHeight * 2)\n const left = Math.ceil(coords.left + coords.width + tooltip.offsetWidth / 3)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(this.delegate.triggerElement, tooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet'\n })\n\n if (targetTooltip) {\n tooltip.lineToTarget = new LeaderLine(tooltip, targetTooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet',\n middleLabel: this.delegate.targetLineLabel,\n size: 2.1\n })\n\n targetTooltip.drag.onMove = () => {\n targetTooltip.line.position()\n tooltip.lineToTarget?.position()\n tooltip.lineToRendering?.position()\n }\n }\n\n if (renderingTooltip) {\n tooltip.lineToRendering = new LeaderLine(tooltip, renderingTooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet',\n middleLabel: this.delegate.renderingLineLabel,\n size: 2.1\n })\n\n renderingTooltip.drag.onMove = () => {\n renderingTooltip.line.position()\n if (tooltip.lineToTarget) tooltip.lineToTarget.position()\n tooltip.lineToRendering?.position()\n }\n }\n\n tooltip.drag = new PlainDraggable(tooltip)\n tooltip.drag.onMove = () => {\n tooltip.line.position()\n if (tooltip.lineToTarget) tooltip.lineToTarget.position()\n if (tooltip.lineToRendering) tooltip.lineToRendering.position()\n }\n\n return tooltip\n }\n\n get leaderLineOptions () {\n return {\n dash: { animation: true },\n dropShadow: { opacity: 0.3 },\n endPlug: 'arrow3',\n endPlugSize: 1.7,\n size: 3,\n startPlug: 'disc',\n startPlugSize: 1\n }\n }\n}\n", "import devtools from '..'\nimport { Devtool, decorateElementWithDevtool } from '..'\n\nfunction defineTooltipData (element) {\n Object.defineProperties(element, {\n targetTooltipData: {\n get () {\n return {\n subtitle: `\n identifier: ${element.identifier}
\n query: ${element.query}\n `,\n content: `\n
\n \n element log\n
\n ${element.targetElementLog.queue\n .slice(-10)\n .map(logEntry => `
${logEntry}
`)\n .join('')}\n `\n }\n }\n },\n\n triggerTooltipData: {\n get () {\n return {\n subtitle: `\n identifier: ${this.identifier}
\n only: ${this.getAttribute('only') || ''}
\n url: ${this.getAttribute('url') || location.href}
\n debounce (client-side): ${this.debounce}
\n ignore-inner-updates: ${this.hasAttribute(\n 'ignore-inner-updates'\n )}\n `,\n content: `\n
\n \n element log\n
\n ${element.triggerElementLog.queue\n .slice(-10)\n .map(logEntry => `
${logEntry}
`)\n .join('')}\n `\n }\n }\n }\n })\n}\n\nfunction initialize () {\n document.addEventListener('turbo-boost:devtools-start', () =>\n Devtool.register('updates-for', 'updates-for')\n )\n\n window.CableReady.devtools = devtools\n\n document.addEventListener('turbo:load', () => {\n document.querySelectorAll('updates-for').forEach(element => {\n decorateElementWithDevtool(element, 'updates-for', 'updates')\n defineTooltipData(element)\n element.initializeDevtool()\n })\n\n document.querySelectorAll('cable-ready-updates-for').forEach(element => {\n decorateElementWithDevtool(element, 'updates-for', 'updates')\n defineTooltipData(element)\n element.initializeDevtool()\n })\n\n CableReady.devtools.start()\n })\n}\n\ninitialize()\n", "import supervisor from './supervisor'\nimport Devtool from './devtool'\n\nconst { restart, start, stop } = supervisor\n\nfunction decorateElementWithDevtool (element, name, label) {\n Object.assign(element, {\n initializeDevtool () {\n const mouseenter = () => this.devtool.show()\n\n addEventListener('turbo-boost:devtools-start', () => {\n this.devtool = new Devtool(this)\n this.addEventListener('mouseenter', mouseenter)\n })\n\n addEventListener('turbo-boost:devtools-stop', () => {\n this.removeEventListener('mouseenter', mouseenter)\n this.removeDevtool()\n })\n\n this.dispatchEvent(\n new CustomEvent('turbo-boost:devtools-connect', { bubbles: true })\n )\n },\n hideDevtool () {\n this.devtool?.hide({ active: false })\n },\n removeDevtool () {\n this.devtool.hide({ active: false })\n this.devtool.unregisterEventListeners()\n delete this.devtool\n },\n name,\n targetLineLabel: label\n })\n\n // the element references below are defaults that are placed on the receiver if not present\n const properties = ['triggerElement', 'morphElement', 'targetElement']\n\n properties\n .filter(property => {\n return element[property] === undefined\n })\n .forEach(property => {\n Object.defineProperty(element, property, {\n get () {\n return element\n }\n })\n })\n}\n\n;(async () => {\n // we cannot detect customElements.get(\"cable-ready-updates-for\") because they are lazily initialized\n if (window.CableReady) await import('./delegates/cable_ready.js')\n})()\n\nexport { Devtool, decorateElementWithDevtool }\n\nexport default { restart, start, stop }\n", "export default class TurboBoostElement extends HTMLElement {\n constructor(html) {\n super()\n this.devtool = 'unknown'\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = html || ''\n }\n\n connectedCallback() {\n this.ensureId()\n }\n\n ensureId() {\n if (this.id.trim().length) return\n this.id = `${this.tagName}-${this.uuidv4()}`.toLowerCase()\n }\n\n // SEE: https://stackoverflow.com/questions/105034/how-do-i-create-a-guid-uuid\n uuidv4() {\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>\n (c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)\n )\n }\n\n get viewStack() {\n const value = this.getAttribute('view-stack')\n if (!value) return []\n return JSON.parse(value)\n }\n\n get partial() {\n return this.viewStack[0]\n }\n}\n", "import TurboBoostElement from '../../turbo_boost_element'\n\nconst html = `\n \n \n \n \n`\n\nexport const busyDelay = 100 // milliseconds - time to wait before showing busy element\nexport const busyDuration = 400 // milliseconds - minimum time that busy element is shown\n\nexport default class ToggleElement extends TurboBoostElement {\n constructor() {\n super(html)\n }\n\n // TODO: Should we timeout after a theoretical max wait time?\n // The idea being that a server error occurred and the toggle failed.\n showBusyElement() {\n clearTimeout(this.showBusyElementTimeout)\n clearTimeout(this.hideBusyElementTimeout)\n\n if (!this.busyElement) return\n\n this.busyStartedAt = Date.now() + busyDelay\n this.showBusyElementTimeout = setTimeout(() => {\n this.busySlotElement.hidden = false\n this.defaultSlotElement.hidden = true\n }, busyDelay)\n }\n\n hideBusyElement() {\n clearTimeout(this.showBusyElementTimeout)\n clearTimeout(this.hideBusyElementTimeout)\n\n if (!this.busyElement) return\n\n let delay = busyDuration - (Date.now() - this.busyStartedAt)\n if (delay < 0) delay = 0\n\n delete this.busyStartedAt\n this.hideBusyElementTimeout = setTimeout(() => {\n this.busySlotElement.hidden = true\n this.defaultSlotElement.hidden = false\n }, delay)\n }\n\n get busyElement() {\n return this.querySelector(':scope > [slot=\"busy\"]')\n }\n\n get busySlotElement() {\n return this.shadowRoot.querySelector('slot[name=\"busy\"]')\n }\n\n get defaultSlotElement() {\n return this.shadowRoot.querySelector('slot:not([name])')\n }\n\n // indicates if an rpc call is active/busy\n get busy() {\n return this.getAttribute('busy') === 'true'\n }\n\n // indicates if an rpc call is active/busy\n set busy(value) {\n value = !!value\n if (this.busy === value) return\n this.setAttribute('busy', value)\n if (value) this.showBusyElement()\n else this.hideBusyElement()\n }\n\n get busyStartedAt() {\n if (!this.dataset.busyStartedAt) return 0\n return Number(this.dataset.busyStartedAt)\n }\n\n set busyStartedAt(value) {\n this.dataset.busyStartedAt = value\n }\n}\n", "import ToggleElement from '../toggle_element'\n\nexport default class ToggleTargetElement extends ToggleElement {\n connectedCallback() {\n super.connectedCallback()\n\n this.mouseenterHandler = this.onMouseenter.bind(this)\n this.addEventListener('mouseenter', this.mouseenterHandler)\n\n this.collapseHandler = this.collapse.bind(this)\n this.collapseNowHandler = this.collapseNow.bind(this)\n\n this.collapseOn.forEach(entry => {\n const parts = entry.split('@')\n const name = parts[0]\n\n if (parts.length > 1) {\n const target = parts[1].match(/^self|window$/) ? self : self[parts[1]]\n target.addEventListener(name, this.collapseNowHandler)\n } else {\n this.addEventListener(name, this.collapseHandler)\n }\n })\n }\n\n disconnectedCallback() {\n this.removeEventListener('mouseenter', this.mouseenterHandler)\n\n this.collapseOn.forEach(entry => {\n const parts = entry.split('@')\n const name = parts[0]\n\n if (parts.length > 1) {\n const target = parts[1].match(/^self|window$/) ? self : self[parts[1]]\n target.removeEventListener(name, this.collapseNowHandler)\n } else {\n this.removeEventListener(name, this.collapseHandler)\n }\n })\n }\n\n // TODO: get cached content working properly\n // perhaps use a mechanic other than morph\n\n // TODO: implement cache (similar to Turbo Drive restoration visit)\n cacheHTML() {\n // this.cachedHTML = this.innerHTML\n }\n\n // TODO: implement cache (similar to Turbo Drive restoration visit)\n renderCachedHTML() {\n // if (!this.cachedHTML) return\n // this.innerHTML = this.cachedHTML\n }\n\n onMouseenter() {\n clearTimeout(this.collapseTimeout)\n }\n\n collapse(delay = 250) {\n clearTimeout(this.collapseTimeout)\n if (this.busy) return\n if (typeof delay !== 'number') delay = 250\n\n if (delay > 0) return (this.collapseTimeout = setTimeout(() => this.collapse(0), delay))\n\n this.innerHTML = ''\n try {\n this.expanded = false\n this.triggerElement.hideDevtool()\n } catch {}\n }\n\n collapseNow(event) {\n if (event.target.closest('turbo-boost-devtool-tooltip')) return\n this.collapse(0)\n }\n\n collapseMatches() {\n document.querySelectorAll(this.collapseSelector).forEach(el => {\n if (el.id === this.id) return\n if (el.collapse) el.collapse(0)\n })\n }\n\n get collapseSelector() {\n return this.triggerElement.collapseSelector || this.getAttribute('collapse-selector')\n }\n\n get focusSelector() {\n return this.getAttribute('focus-selector')\n }\n\n // the active trigger\n get triggerElement() {\n return document.getElementById(this.labeledBy)\n }\n\n // all triggers\n get triggerElements() {\n return document.querySelectorAll(`[aria-controls=\"${this.id}\"]`)\n }\n\n // the dom id of the active trigger\n get labeledBy() {\n return this.getAttribute('aria-labeledby')\n }\n\n set labeledBy(value) {\n return this.setAttribute('aria-labeledby', value)\n }\n\n get collapseOn() {\n const value = this.getAttribute('collapse-on')\n if (!value) return []\n return JSON.parse(value)\n }\n\n get expanded() {\n return this.triggerElement ? this.triggerElement.expanded : false\n }\n\n set expanded(value) {\n this.triggerElements.forEach(el => (el.expanded = value))\n }\n\n get busy() {\n return this.triggerElement && this.triggerElement.busy\n }\n}\n", "let focusTimeout\n\nfunction deactivateTrixAttributes(editor) {\n const attributes = ['bold', 'bullet', 'code', 'heading1', 'href', 'italic', 'number', 'quote', 'strike']\n attributes.forEach(name => editor.deactivateAttribute(name))\n}\n\nfunction focusTrixEditorElement(element) {\n if (element.value.length === 0) return\n\n const editor = element.editor\n\n // move cursor to the end\n let lastRange = []\n while (lastRange[0] !== editor.getSelectedRange()[0] && lastRange[1] !== editor.getSelectedRange()[1]) {\n lastRange = editor.getSelectedRange()\n editor.moveCursorInDirection('forward')\n }\n\n // insert an empty char and select it\n editor.insertString(' ')\n editor.moveCursorInDirection('forward')\n editor.setSelectedRange([lastRange[1], editor.getSelectedRange()[1]])\n\n // deactivate all trix features for the selection\n deactivateTrixAttributes(editor)\n\n // move cursor to end and collapse the selection\n editor.setSelectedRange([editor.getSelectedRange()[1], editor.getSelectedRange()[1]])\n}\n\nfunction debouncedFocus(element) {\n clearTimeout(focusTimeout)\n\n focusTimeout = setTimeout(() => {\n if (!element) return\n\n element.focus()\n const trixEditorElement = element.closest('trix-editor')\n\n try {\n if (trixEditorElement) {\n focusTrixEditorElement(trixEditorElement)\n } else {\n element.selectionStart = element.selectionEnd = element.value.length\n }\n } catch (_) {\n } finally {\n element.scrollIntoView({ block: 'center', behavior: 'smooth' })\n }\n }, 100)\n}\n\nexport default element => debouncedFocus(element)\n", "import { Devtool, decorateElementWithDevtool } from '@turbo-boost/devtools'\n\nimport ToggleElement, { busyDuration } from '../toggle_element'\nimport focus from './focus'\n\ndocument.addEventListener('turbo-boost:devtools-start', () => Devtool.register('toggle', 'toggles'))\n\nlet currentFocusSelector\n\nexport default class ToggleTriggerElement extends ToggleElement {\n constructor() {\n super()\n\n decorateElementWithDevtool(this, 'toggle', 'toggles')\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n const { start: commandStartEvent } = TurboBoost.Commands.events\n this.commandStartHandler = this.onCommandStart.bind(this)\n this.addEventListener(commandStartEvent, this.commandStartHandler)\n\n const { before: beforeInvokeEvent } = TurboBoost.Streams.invokeEvents\n this.beforeInvokeHandler = this.onBeforeInvoke.bind(this)\n addEventListener(beforeInvokeEvent, this.beforeInvokeHandler)\n\n // fires after receiving the toggle morph Turbo Stream but before it is executed\n // this.addEventListener(TurboBoost.Commands.events.success, event => {\n // // TODO: imlement cache, this.targetElement.cacheHTML()\n // })\n\n this.initializeDevtool()\n }\n\n disconnectedCallback() {\n // delay cleanup because the trigger may have been morphed out of the DOM,\n // but it's needed to apply behavior like focus etc...\n setTimeout(() => {\n const { start: commandStartEvent } = TurboBoost.Commands.events\n this.removeEventListener(commandStartEvent, this.commandStartHandler)\n\n const { before: beforeInvokeEvent } = TurboBoost.Streams.invokeEvents\n removeEventListener(beforeInvokeEvent, this.beforeInvokeHandler)\n\n this.removeDevtool()\n }, 1000)\n }\n\n onCommandStart(event) {\n currentFocusSelector = this.focusSelector\n this.targetElement.labeledBy = this.id\n this.targetElement.collapseMatches()\n this.busy = true\n // TODO: implement cache - this.targetElement.renderCachedHTML()\n }\n\n // runs before an invoke turbo stream is executed\n onBeforeInvoke(event) {\n // return early if we're not the element responsible for this invoke\n if (event.detail.method !== 'morph') return\n if (event.target.id !== this.morphs) return\n const selector = `turbo-boost-toggle-target[aria-labeledby=\"${this.id}\"]`\n if (!event.target.querySelector(selector)) return\n\n // ensure the busy element is shown long enough for a good user experience\n // we accomplish this by modifying the event.detail with invoke instructions i.e. { delay }\n // SEE: the TurboBoost Streams library for details on how this works\n const duration = Date.now() - this.busyStartedAt\n let delay = busyDuration - duration\n if (delay < 10) delay = 10\n event.detail.invoke = { delay }\n\n // runs before the morph is executed\n setTimeout(() => {\n this.busy = false\n this.morphToggleTriggerElements.forEach(el => (el.busy = false))\n }, delay - 10)\n\n // runs after the morph is executed\n setTimeout(() => focus(this.targetElement.querySelector(currentFocusSelector)), delay + 100)\n }\n\n // a list of views shared between the trigger and target\n get sharedViews() {\n if (!this.targetElement) return []\n if (!this.targetElement.viewStack) return []\n const reducer = (memo, view) => {\n if (this.targetElement.viewStack.includes(view)) memo.push(view)\n return memo\n }\n return this.viewStack.reduce(reducer.bind(this), [])\n }\n\n // the partial to render\n get renders() {\n return this.getAttribute('renders')\n }\n\n // the renderered partial's top wrapping dom_id\n get morphs() {\n return this.getAttribute('morphs')\n }\n\n // all toggle elements contained by the `morphElement`\n get morphToggleTriggerElements() {\n return Array.from(this.morphElement.querySelectorAll('turbo-boost-toggle-trigger'))\n }\n\n // the target's dom_id\n get controls() {\n return this.getAttribute('aria-controls')\n }\n\n get collapseSelector() {\n return this.getAttribute('collapse-selector')\n }\n\n get focusSelector() {\n return this.getAttribute('focus-selector') || this.targetElement.focusSelector\n }\n\n // indicates if the toggle state should be remembered across requests\n get remember() {\n return this.getAttribute('remember') === 'true'\n }\n\n set remember(value) {\n return this.setAttribute('remember', !!value)\n }\n\n // indicates if the target is expanded\n get expanded() {\n return this.getAttribute('aria-expanded') === 'true'\n }\n\n set expanded(value) {\n this.setAttribute('aria-expanded', !!value)\n }\n\n // indicates if the target is expanded\n get collapsed() {\n return !this.expanded\n }\n\n // ------ DevToolDelegate ------\n get command() {\n return this.dataset.turboCommand\n }\n\n get renderingLineLabel() {\n return 'renders & morphs'\n }\n\n // the morph element\n get morphElement() {\n if (!this.morphs) return null\n return document.getElementById(this.morphs)\n }\n\n // the target element\n get targetElement() {\n if (!this.controls) return null\n return document.getElementById(this.controls)\n }\n\n get triggerTooltipData() {\n let content = this.triggerElement.viewStack\n .reverse()\n .map((view, index) => {\n return this.triggerElement.sharedViews.includes(view)\n ? `
${index + 1}. ${view}
`\n : `
${index + 1}. ${view}
`\n }, this)\n .join('')\n\n return {\n subtitle: `\n id: ${this.triggerElement.id}
\n aria-controls: ${this.triggerElement.controls}
\n aria-expanded: ${this.triggerElement.expanded}
\n remember: ${this.triggerElement.remember}
\n `,\n content: `\n
\n \n View Stack\n
\n ${content}\n `\n }\n }\n\n get targetTooltipData() {\n let content = this.targetElement.viewStack\n .reverse()\n .map((view, index) => {\n return this.triggerElement.sharedViews.includes(view)\n ? `
${index + 1}. ${view}
`\n : `
${index + 1}. ${view}
`\n }, this)\n .join('')\n\n return {\n subtitle: `id: ${this.targetElement.id}
\n aria-labeled-by: ${this.targetElement.labeledBy}
\n`,\n content: `\n
\n \n View Stack\n
\n ${content}\n `\n }\n }\n}\n", "import TurboBoostElement from './turbo_boost_element'\nimport ToggleTargetElement from './toggle_elements/target_element'\nimport ToggleTriggerElement from './toggle_elements/trigger_element'\n\n// Valid custom element names: https://html.spec.whatwg.org/#valid-custom-element-name\n\ncustomElements.define('turbo-boost', TurboBoostElement)\ncustomElements.define('turbo-boost-toggle-target', ToggleTargetElement)\ncustomElements.define('turbo-boost-toggle-trigger', ToggleTriggerElement)\n", "import '@turbo-boost/commands'\nimport devtools from '@turbo-boost/devtools'\nimport './elements'\n\nself.TurboBoost = self.TurboBoost || {}\nself.TurboBoost.devtools = devtools\nself.TurboBoost.Elements = {}\n\nexport default self.TurboBoost.Elements\n"], - "mappings": "AAAA,IAAIA,GAAE,OAAO,eAAeC,GAAG,OAAO,iBAAqBC,GAAG,OAAO,0BAA8BC,GAAE,OAAO,sBAA0BC,GAAG,OAAO,UAAU,eAAeC,GAAG,OAAO,UAAU,qBAAyBC,GAAE,CAAC,EAAE,EAAEC,IAAI,KAAK,EAAEP,GAAE,EAAE,EAAE,CAAC,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,MAAMO,CAAC,CAAC,EAAE,EAAE,CAAC,EAAEA,EAAEC,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQD,KAAK,IAAI,EAAE,CAAC,GAAGH,GAAG,KAAK,EAAEG,C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X,CACF,CAEA,IAAI,mBAAoB,CACtB,IAAIA,EAAU,KAAK,cAAc,UAC9B,QAAQ,EACR,IAAI,CAACF,EAAMG,IACH,KAAK,eAAe,YAAY,SAASH,CAAI,EAChD,uBAAuBG,EAAQ,CAAC,KAAKH,CAAI,SACzC,8BAA8BG,EAAQ,CAAC,KAAKH,CAAI,SACnD,IAAI,EACN,KAAK,EAAE,EAEV,MAAO,CACL,SAAU,cAAc,KAAK,cAAc,EAAE;AAAA,gCACnB,KAAK,cAAc,SAAS;AAAA,EAEtD,QAAS;AAAA;AAAA;AAAA;AAAA;AAAA,QAKPE,CAAO;AAAA,KAEX,CACF,CACF,EClNA,eAAe,OAAO,cAAeE,CAAiB,EACtD,eAAe,OAAO,4BAA6BC,CAAmB,EACtE,eAAe,OAAO,6BAA8BC,CAAoB,ECJxE,KAAK,WAAa,KAAK,YAAc,CAAC,EACtC,KAAK,WAAW,SAAWC,EAC3B,KAAK,WAAW,SAAW,CAAC,EAE5B,IAAOC,GAAQ,KAAK,WAAW", - "names": ["Z", "ee", "te", "X", "re", "oe", "_", "r", "s", "u", "O", "t", "a", "i", "l", "f", "d", "o", "B", "k", "c", "A", "F", "D", "g", "C", "N", "J", "E", "h", "ne", "se", "v", "L", "ae", "ie", "S", "M", "T", "R", "de", "m", "j", "me", "ue", "ce", "W", "$", "le", "fe", "be", "p", "pe", "he", "ve", "ge", "y", "Ee", "U", "xe", "x", "Ce", "H", "Te", "V", "ye", "P", "Ae", "ke", "G", "q", "Le", "I", "w", "z", "K", "Se", "Q", "Y", "we", "template", "html", "appendHTML", "parent", "child", "addHighlight", "element", "options", "removeHighlight", "outline", "outlineOffset", "key", "value", "coordinates", "rect", "width", "height", "top", "left", "right", "bottom", "attempt", "callback", "e", "init_dom", "__esmMin", "DevtoolElement", "init_devtool_element", "event", "SupervisorElement", "init_supervisor_element", "devtoolElement", "checked", "name", "el", "TooltipElement", "init_tooltip_element", "savedTransform", "exists", "dependency", "added", "add", "src", "integrity", "script", "remove", "removeAll", "dependencies", "dependencies_default", "init_dependencies", "__spreadProps", "__spreadValues", "makeDraggable", "supervisorElement", "stop", "stopped", "start", "started", "restart", "enabledList", "debouncedRestart", "restartTimeout", "autoRestart", "register", "label", "enabled", "supervisor_default", "init_supervisor", "appendTooltip", "title", "subtitle", "content", "backgroundColor", "color", "position", "id", "activeTarget", "Devtool", "init_devtool", "delegate", "hideTimeout", "debouncedHide", "type", "listener", "data", "active", "tooltip", "coords", "_a", "_b", "targetTooltip", "renderingTooltip", "cable_ready_exports", "defineTooltipData", "logEntry", "initialize", "src_default", "decorateElementWithDevtool", "init_cable_ready", "init_src", "mouseenter", "property", "Q", "ut", "O", "TurboBoostElement", "html", "c", "value", "html", "busyDelay", "busyDuration", "ToggleElement", "TurboBoostElement", "delay", "value", "ToggleTargetElement", "ToggleElement", "entry", "parts", "name", "delay", "e", "event", "el", "value", "focusTimeout", "deactivateTrixAttributes", "editor", "name", "focusTrixEditorElement", "element", "lastRange", "debouncedFocus", "trixEditorElement", "_", "focus_default", "g", "currentFocusSelector", "ToggleTriggerElement", "ToggleElement", "M", "commandStartEvent", "beforeInvokeEvent", "event", "selector", "duration", "delay", "busyDuration", "el", "focus_default", "reducer", "memo", "view", "value", "content", "index", "TurboBoostElement", "ToggleTargetElement", "ToggleTriggerElement", "V", "javascript_default"] + "sources": ["../../../../node_modules/@turbo-boost/commands/app/javascript/meta.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/events.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/state/observable.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/state/index.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/renderer.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/activity.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/lifecycle.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/turbo.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/schema.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/confirmation.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/delegates.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/elements.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/drivers/form.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/urls.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/drivers/frame.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/drivers/method.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/drivers/window.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/drivers/index.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/logger.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/uuids.js", "../../../../node_modules/@turbo-boost/commands/app/javascript/index.js", "../../../../node_modules/@turbo-boost/devtools/src/utils/dom.js", "../../../../node_modules/@turbo-boost/devtools/src/elements/devtool_element.js", "../../../../node_modules/@turbo-boost/devtools/src/elements/supervisor_element.js", "../../../../node_modules/@turbo-boost/devtools/src/elements/tooltip_element.js", "../../../../node_modules/@turbo-boost/devtools/src/dependencies.js", "../../../../node_modules/@turbo-boost/devtools/src/supervisor.js", "../../../../node_modules/@turbo-boost/devtools/src/devtool.js", "../../../../node_modules/@turbo-boost/devtools/src/index.js", "../../../javascript/elements/turbo_boost_element/index.js", "../../../javascript/elements/toggle_elements/toggle_element/index.js", "../../../javascript/elements/toggle_elements/target_element/index.js", "../../../javascript/elements/toggle_elements/trigger_element/focus.js", "../../../javascript/elements/toggle_elements/trigger_element/index.js", "../../../javascript/elements/index.js", "../../../javascript/index.js"], + "sourcesContent": ["class Meta {\n get element() {\n return document.querySelector('meta[name=\"turbo-boost\"]')\n }\n\n get token() {\n return this.element.getAttribute('content')\n }\n\n get busy() {\n return this.element.dataset.busy === 'true'\n }\n\n set busy(value) {\n return (this.element.dataset.busy = !!value)\n }\n}\n\nexport default new Meta()\n", "export const commandEvents = {\n start: 'turbo-boost:command:start',\n success: 'turbo-boost:command:success',\n finish: 'turbo-boost:command:finish',\n abort: 'turbo-boost:command:abort',\n clientError: 'turbo-boost:command:client-error',\n serverError: 'turbo-boost:command:server-error'\n}\n\nexport const stateEvents = {\n stateLoad: 'turbo-boost:state:load',\n stateChange: 'turbo-boost:state:change'\n}\n\nexport const allEvents = { ...commandEvents, ...stateEvents }\n\nexport function dispatch(name, target, options = {}) {\n return new Promise(resolve => {\n options = options || {}\n options.detail = options.detail || {}\n target = target || document\n const evt = new CustomEvent(name, { ...options, bubbles: true })\n target.dispatchEvent(evt)\n resolve(evt)\n })\n}\n", "import meta from '../meta'\nimport { dispatch, stateEvents as events } from '../events'\n\nlet head\n\nfunction observable(object, parent = null) {\n if (!object || typeof object !== 'object') return object\n\n const proxy = new Proxy(object, {\n deleteProperty(target, key) {\n delete target[key]\n dispatch(events.stateChange, meta.element, { detail: { state: head } })\n return true\n },\n\n set(target, key, value, receiver) {\n target[key] = observable(value, this)\n dispatch(events.stateChange, meta.element, { detail: { state: head } })\n return true\n }\n })\n\n if (Array.isArray(object)) {\n object.forEach((value, index) => (object[index] = observable(value, proxy)))\n } else if (typeof object === 'object') {\n for (const [key, value] of Object.entries(object)) object[key] = observable(value, proxy)\n }\n\n if (!parent) head = proxy\n return proxy\n}\n\nexport default observable\n", "import meta from '../meta'\nimport observable from './observable'\nimport { dispatch, commandEvents, stateEvents } from '../events'\n\nlet loadedState, currentState, changedState\nlet loadStateTimeout\n\nfunction loadState() {\n if (!meta.element) return loadStateLater()\n const json = atob(meta.element.dataset.state)\n changedState = {}\n currentState = observable(JSON.parse(json))\n loadedState = { ...currentState }\n delete meta.element.dataset.clientStateChange\n setTimeout(() =>\n dispatch(stateEvents.stateLoad, meta.element, {\n detail: { state: currentState }\n })\n )\n}\n\nfunction loadStateLater() {\n clearTimeout(loadStateTimeout)\n loadStateTimeout = setTimeout(loadState, 10)\n}\n\nif (!loadedState) loadState()\n\naddEventListener('DOMContentLoaded', loadStateLater)\naddEventListener('load', loadStateLater)\naddEventListener('turbo:load', loadStateLater)\naddEventListener('turbo:frame-load', loadStateLater)\naddEventListener(commandEvents.success, loadStateLater)\n\naddEventListener(stateEvents.stateChange, event => {\n changedState = {}\n for (const [key, value] of Object.entries(currentState))\n if (loadedState[key] !== value) changedState[key] = value\n meta.element.dataset.clientStateChange = true\n meta.element.dataset.state = btoa(JSON.stringify(currentState))\n})\n\nexport default {\n events: stateEvents,\n\n get current() {\n return currentState\n },\n\n get delta() {\n return changedState\n },\n\n // The UI state changes are split into chunks and sent to the server in an HTTP request header.\n // Max size for an HTTP header is around 4k or 4,000 bytes.\n // A Base64 character is an 8-bit-padded ASCII character... or 1 byte\n //\n // SEE: lib/state.rb - for info on how `state` is serialized/deserialized\n get payloadChunks() {\n return btoa(JSON.stringify(changedState)).match(/.{1,2000}/g)\n }\n}\n", "function replaceDocument(content) {\n const head = '= 0 && tailIndex >= 0) {\n const html = content.slice(content.indexOf('>', headIndex) + 1, tailIndex)\n document.documentElement.innerHTML = html\n }\n}\n\nfunction append(content) {\n document.body.insertAdjacentHTML('beforeend', content)\n}\n\nexport default { append, replaceDocument }\n", "const active = {}\n\nfunction add(payload) {\n active[payload.id] = payload\n}\n\nfunction remove(id) {\n delete active[id]\n}\n\nexport default {\n add,\n remove,\n get commands() {\n return [...Object.values(active)]\n },\n get length() {\n return Object.keys(active).length\n }\n}\n", "import activity from './activity'\nimport { dispatch, commandEvents } from './events'\n\nfunction finish(event) {\n event.detail.endedAt = Date.now()\n event.detail.milliseconds = event.detail.endedAt - event.detail.startedAt\n setTimeout(() => dispatch(commandEvents.finish, event.target, { detail: event.detail }), 25)\n}\n\n// TODO: forward source event to finish (error or success)\naddEventListener(commandEvents.serverError, finish)\naddEventListener(commandEvents.success, finish)\naddEventListener(commandEvents.finish, event => activity.remove(event.detail.id), true)\n\nexport default { events: commandEvents }\n", "import meta from './meta'\nimport state from './state'\nimport renderer from './renderer'\nimport { dispatch } from './events'\nimport lifecycle from './lifecycle'\n\nconst frameSources = {}\n\n// fires before making a turbo HTTP request\naddEventListener('turbo:before-fetch-request', event => {\n const frame = event.target.closest('turbo-frame')\n const { fetchOptions } = event.detail\n\n // command invoked and busy\n if (meta.busy) {\n let acceptHeaders = ['text/vnd.turbo-boost.html', fetchOptions.headers['Accept']]\n acceptHeaders = acceptHeaders.filter(entry => entry && entry.trim().length > 0).join(', ')\n fetchOptions.headers['Accept'] = acceptHeaders\n fetchOptions.headers['TurboBoost-Token'] = meta.token\n }\n\n // always send state\n state.payloadChunks.forEach((chunk, i) => {\n fetchOptions.headers[`TurboBoost-State-${i.toString().padStart(4, '0')}`] = chunk\n })\n})\n\n// fires after receiving a turbo HTTP response\naddEventListener('turbo:before-fetch-response', event => {\n const frame = event.target.closest('turbo-frame')\n const { fetchResponse: response } = event.detail\n\n if (frame) frameSources[frame.id] = frame.src\n\n if (response.header('TurboBoost')) {\n if (response.statusCode < 200 || response.statusCode > 399) {\n const error = `Server returned a ${response.statusCode} status code! TurboBoost Commands require 2XX-3XX status codes.`\n dispatch(lifecycle.events.clientError, document, { detail: { ...event.detail, error } }, true)\n }\n\n if (response.header('TurboBoost') === 'Append') {\n event.preventDefault()\n response.responseText.then(content => renderer.append(content))\n }\n }\n})\n\n// fires when a frame element is navigated and finishes loading\naddEventListener('turbo:frame-load', event => {\n const frame = event.target.closest('turbo-frame')\n frame.dataset.turboBoostSrc = frameSources[frame.id] || frame.src || frame.dataset.turboBoostSrc\n delete frameSources[frame.id]\n})\n", "const schema = {\n // attributes\n frameAttribute: 'data-turbo-frame',\n methodAttribute: 'data-turbo-method',\n commandAttribute: 'data-turbo-command',\n confirmAttribute: 'data-turbo-confirm',\n\n // events\n turboSubmitStartEvent: 'turbo:submit-start'\n}\n\nexport default { ...schema }\n", "import { commandEvents } from './events'\nimport schema from './schema'\n\nconst confirmation = {\n method: message => Promise.resolve(confirm(message))\n}\n\nconst isTurboMethod = event => event.detail.driver === 'method'\n\nconst isTurboForm = event => {\n if (event.detail.driver !== 'form') return false\n\n const element = event.target\n const frame = element.closest('turbo-frame')\n const target = element.closest(`[${schema.frameAttribute}]`)\n return !!(frame || target)\n}\n\nconst shouldDelegate = event => isTurboMethod(event) || isTurboForm(event)\n\ndocument.addEventListener(commandEvents.start, async event => {\n const message = event.target.getAttribute(schema.confirmAttribute)\n if (!message) return\n\n event.detail.confirmation = true\n\n if (shouldDelegate(event)) return // delegate confirmation handling to Turbo\n\n const proceed = await confirmation.method(message)\n if (!proceed) event.preventDefault()\n})\n\nexport default confirmation\n", "let events = []\nlet eventListener\n\nfunction register(eventName, selectors) {\n const match = events.find(evt => evt.name === eventName)\n if (match) events.splice(events.indexOf(match), 1)\n events = [{ name: eventName, selectors }, ...events]\n\n document.removeEventListener(eventName, eventListener, true)\n document.addEventListener(eventName, eventListener, true)\n\n return { ...events.find(evt => evt.name === eventName) }\n}\n\nfunction getRegisteredEventForElement(element) {\n return events.find(evt =>\n evt.selectors.find(selector => Array.from(document.querySelectorAll(selector)).find(el => el === element))\n )\n}\n\nfunction isRegisteredForElement(eventName, element) {\n const evt = getRegisteredEventForElement(element)\n return evt && evt.name === eventName\n}\n\nexport default {\n register,\n isRegisteredForElement,\n get events() {\n return [...events]\n },\n set handler(fn) {\n eventListener = fn\n }\n}\n", "import schema from './schema'\nimport lifecycle from './lifecycle'\n\nfunction findClosestCommand(element) {\n return element.closest(`[${schema.commandAttribute}]`)\n}\n\nfunction findClosestFrameWithSource(element) {\n return (\n element.closest('turbo-frame[src]') ||\n element.closest('turbo-frame[data-turbo-frame-src]') ||\n element.closest('turbo-frame')\n )\n}\n\nfunction assignElementValueToPayload(element, payload = {}) {\n if (element.tagName.toLowerCase() !== 'select') return (payload.value = element.value || null)\n\n if (!element.multiple) return (payload.value = element.options[element.selectedIndex].value)\n\n payload.values = Array.from(element.options).reduce((memo, option) => {\n if (option.selected) memo.push(option.value)\n return memo\n }, [])\n}\n\nfunction buildAttributePayload(element) {\n const payload = Array.from(element.attributes).reduce((memo, attr) => {\n let value = attr.value\n memo[attr.name] = value\n return memo\n }, {})\n\n payload.tag = element.tagName\n payload.checked = !!element.checked\n payload.disabled = !!element.disabled\n assignElementValueToPayload(element, payload)\n\n // reduce payload size to keep URL length smaller\n delete payload.class\n delete payload.action\n delete payload.href\n delete payload[schema.commandAttribute]\n delete payload[schema.frameAttribute]\n\n return payload\n}\n\nexport default {\n buildAttributePayload,\n findClosestCommand,\n findClosestFrameWithSource\n}\n", "import meta from '../meta'\n\nfunction updateFormSubmission(formSubmission) {\n const shouldUpdate =\n formSubmission?.formElement instanceof HTMLFormElement &&\n formSubmission?.body instanceof URLSearchParams &&\n formSubmission?.fetchRequest?.body instanceof URLSearchParams\n\n if (!shouldUpdate) return\n\n formSubmission.formData = new FormData(formSubmission.formElement)\n for (const [key, value] of formSubmission.formData.entries()) {\n formSubmission.fetchRequest.body.set(key, value)\n formSubmission.body.set(key, value)\n }\n\n return formSubmission\n}\n\nfunction invokeCommand(form, payload = {}, event = {}) {\n payload.token = meta.token\n const input = form.querySelector('input[name=\"turbo_boost_command\"]') || document.createElement('input')\n input.type = 'hidden'\n input.name = 'turbo_boost_command'\n input.value = JSON.stringify(payload)\n form.appendChild(input)\n updateFormSubmission(event.detail.formSubmission)\n}\n\nexport default { invokeCommand }\n", "function build(urlString, payload = {}) {\n const a = document.createElement('a')\n a.href = urlString\n const url = new URL(a)\n url.searchParams.set('turbo_boost_command', JSON.stringify(payload))\n return url\n}\n\nexport default { build }\n", "import urls from '../urls'\n\nfunction invokeCommand(frame, payload) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n frame.src = urls.build(src, payload)\n}\n\nexport default { invokeCommand }\n", "import urls from '../urls'\n\nfunction invokeCommand(element, payload = {}) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n delete payload.href\n element.setAttribute('href', urls.build(src, payload))\n}\n\nexport default { invokeCommand }\n", "import meta from '../meta'\nimport state from '../state'\nimport { dispatch } from '../events'\nimport lifecycle from '../lifecycle'\nimport urls from '../urls'\nimport renderer from '../renderer'\n\nfunction aborted(event) {\n const xhr = event.target\n dispatch(lifecycle.events.abort, document, {\n detail: { ...event.detail, xhr }\n })\n}\n\nfunction errored(event) {\n const xhr = event.target\n\n const append =\n xhr.getResponseHeader('TurboBoost') === 'Append' ||\n xhr.getResponseHeader('Content-Type').startsWith('text/vnd.turbo-boost.html')\n append ? renderer.append(xhr.responseText) : renderer.replaceDocument(xhr.responseText)\n\n const error = `Server returned a ${xhr.status} status code! TurboBoost Commands require 2XX-3XX status codes.`\n\n dispatch(lifecycle.events.clientError, document, { detail: { ...event.detail, error, xhr } }, true)\n}\n\nfunction loaded(event) {\n const xhr = event.target\n if (xhr.status < 200 || xhr.status > 399) return errored(event)\n const content = xhr.responseText\n const append =\n xhr.getResponseHeader('TurboBoost') === 'Append' ||\n xhr.getResponseHeader('Content-Type').startsWith('text/vnd.turbo-boost.html')\n append ? renderer.append(xhr.responseText) : renderer.replaceDocument(xhr.responseText)\n}\n\nfunction invokeCommand(payload) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n\n try {\n const xhr = new XMLHttpRequest()\n xhr.open('GET', urls.build(src, payload), true)\n xhr.setRequestHeader('Accept', 'text/vnd.turbo-boost.html, text/html, application/xhtml+xml')\n xhr.setRequestHeader('TurboBoost-Token', meta.token)\n state.payloadChunks.forEach((chunk, i) =>\n xhr.setRequestHeader(`TurboBoost-State-${i.toString().padStart(4, '0')}`, chunk)\n )\n\n xhr.addEventListener('abort', aborted)\n xhr.addEventListener('error', errored)\n xhr.addEventListener('load', loaded)\n xhr.send()\n } catch (ex) {\n const message = `Unexpected error sending HTTP request! ${ex.message}`\n errored(ex, { detail: { message } })\n }\n}\n\nexport default { invokeCommand }\n", "import elements from '../elements'\nimport formDriver from './form'\nimport frameDriver from './frame'\nimport methodDriver from './method'\nimport windowDriver from './window'\n\nfunction src(element, frame) {\n frame = frame || { dataset: {} }\n return element.href || frame.src || frame.dataset.turboBoostSrc || location.href\n}\n\nfunction find(element) {\n let frame = elements.findClosestFrameWithSource(element)\n\n const { turboFrame, turboMethod } = element.dataset\n\n if (element.tagName.toLowerCase() === 'form')\n return {\n name: 'form',\n reason: 'Element is a form.',\n frame,\n src: element.action,\n invokeCommand: formDriver.invokeCommand\n }\n\n if (turboMethod && turboMethod.length > 0)\n return {\n name: 'method',\n reason: 'Element defines data-turbo-method.',\n frame,\n src: element.href,\n invokeCommand: methodDriver.invokeCommand\n }\n\n // element targets a frame that is not _self\n if (turboFrame && turboFrame !== '_self') {\n frame = document.getElementById(turboFrame)\n return {\n name: 'frame',\n reason: 'element targets a frame that is not _self',\n frame,\n src: src(element, frame),\n invokeCommand: frameDriver.invokeCommand\n }\n }\n\n // element does NOT target a frame or targets _self and is contained by a frame\n if ((!turboFrame || turboFrame === '_self') && frame)\n return {\n name: 'frame',\n reason: 'element does NOT target a frame or targets _self and is contained by a frame',\n frame,\n src: src(element, frame),\n invokeCommand: frameDriver.invokeCommand\n }\n\n // element matches one or more of the following conditions\n // - targets _top\n // - does NOT target a frame\n // - is NOT contained by a frame\n return {\n name: 'window',\n reason:\n 'element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)',\n frame: null,\n src: src(element),\n invokeCommand: windowDriver.invokeCommand\n }\n}\n\nexport default { find }\n", "import { allEvents as events } from './events'\n\nlet currentLevel = 'unknown'\n\nconst logLevels = {\n debug: Object.values(events),\n info: Object.values(events),\n warn: [events.abort, events.clientError, events.serverError],\n error: [events.clientError, events.serverError],\n unknown: []\n}\n\nObject.values(events).forEach(name => {\n addEventListener(name, event => {\n if (logLevels[currentLevel].includes(event.type)) {\n const { target, detail } = event\n console[currentLevel](event.type, { target, detail })\n }\n })\n})\n\nexport default {\n get level() {\n return currentLevel\n },\n set level(value) {\n if (!Object.keys(logLevels).includes(value)) value = 'unknown'\n return (currentLevel = value)\n }\n}\n", "function v4() {\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>\n (c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)\n )\n}\n\nexport default { v4 }\n", "import './turbo'\nimport schema from './schema'\nimport { dispatch, commandEvents, stateEvents } from './events'\nimport activity from './activity'\nimport confirmation from './confirmation'\nimport delegates from './delegates'\nimport drivers from './drivers'\nimport meta from './meta'\nimport elements from './elements'\nimport lifecycle from './lifecycle'\nimport logger from './logger'\nimport state from './state'\nimport urls from './urls'\nimport uuids from './uuids'\n\nfunction buildCommandPayload(id, element) {\n return {\n id, // uniquely identifies the command\n name: element.getAttribute(schema.commandAttribute),\n elementId: element.id.length > 0 ? element.id : null,\n elementAttributes: elements.buildAttributePayload(element),\n startedAt: Date.now()\n }\n}\n\nasync function invokeCommand(event) {\n let element\n let payload = {}\n\n try {\n element = elements.findClosestCommand(event.target)\n if (!element) return\n if (!delegates.isRegisteredForElement(event.type, element)) return\n\n const commandId = `turbo-command-${uuids.v4()}`\n let driver = drivers.find(element)\n let payload = {\n ...buildCommandPayload(commandId, element),\n driver: driver.name,\n frameId: driver.frame ? driver.frame.id : null,\n src: driver.src\n }\n\n const startEvent = await dispatch(commandEvents.start, element, {\n cancelable: true,\n detail: payload\n })\n\n if (startEvent.defaultPrevented || (startEvent.detail.confirmation && event.defaultPrevented))\n return dispatch(commandEvents.abort, element, {\n detail: {\n message: `An event handler for '${commandEvents.start}' prevented default behavior and blocked command invocation!`,\n source: startEvent\n }\n })\n\n // the element and thus the driver may have changed based on the start event handler(s)\n driver = drivers.find(element)\n payload = {\n ...buildCommandPayload(commandId, element),\n driver: driver.name,\n frameId: driver.frame ? driver.frame.id : null,\n src: driver.src\n }\n\n activity.add(payload)\n\n if (['frame', 'window'].includes(driver.name)) event.preventDefault()\n\n meta.busy = true\n setTimeout(() => (meta.busy = false), 10)\n\n switch (driver.name) {\n case 'method':\n return driver.invokeCommand(element, payload)\n case 'form':\n return driver.invokeCommand(element, payload, event)\n case 'frame':\n return driver.invokeCommand(driver.frame, payload)\n case 'window':\n return driver.invokeCommand(payload)\n }\n } catch (error) {\n dispatch(commandEvents.clientError, element, {\n detail: { ...payload, error }\n })\n }\n}\n\nself.TurboBoost = self.TurboBoost || {}\n\nself.TurboBoost = {\n ...self.TurboBoost,\n\n stateEvents,\n\n get state() {\n return state.current\n },\n\n get stateDelta() {\n return state.delta\n }\n}\n\nif (!self.TurboBoost.Commands) {\n // wire things up and setup defaults for event delegation\n delegates.handler = invokeCommand\n delegates.register('click', [`[${schema.commandAttribute}]`])\n delegates.register('submit', [`form[${schema.commandAttribute}]`])\n delegates.register(schema.turboSubmitStartEvent, [`form[${schema.commandAttribute}]`])\n delegates.register('change', [\n `input[${schema.commandAttribute}]`,\n `select[${schema.commandAttribute}]`,\n `textarea[${schema.commandAttribute}]`\n ])\n\n self.TurboBoost.Commands = {\n confirmation,\n logger,\n schema,\n events: commandEvents,\n registerEventDelegate: delegates.register,\n get eventDelegates() {\n return delegates.events\n }\n }\n}\n\nexport default self.TurboBoost.Commands\n", "export function template (html) {\n let template = document.createElement('template')\n template.innerHTML = html\n return template\n}\n\nexport function appendHTML (html, parent) {\n parent = parent || document.body\n const clone = template(html).content.cloneNode(true)\n const child = clone.querySelector('*')\n return parent.appendChild(child)\n}\n\nexport function addHighlight (element, options = {}) {\n if (!element) return\n removeHighlight(element)\n let { outline, outlineOffset } = options\n\n outline = outline || 'dashed 3px red'\n outlineOffset = outlineOffset || '0px'\n\n element.originalStyles = element.originalStyles || {\n display: element.style.display,\n minHeight: element.style.minHeight,\n minWidth: element.style.minWidth,\n outline: element.style.outline,\n outlineOffset: element.style.outlineOffset\n }\n\n if (\n getComputedStyle(element).display.match(/^inline$/i) &&\n element.offsetWidth === 0 &&\n element.offsetHeight === 0\n ) {\n element.style.display = 'inline-block'\n element.style.minHeight = '2px'\n element.style.minWidth = '2px'\n }\n element.style.outline = outline\n element.style.outlineOffset = outlineOffset\n element.dataset.turboBoostHighlight = true\n}\n\nexport function removeHighlight (element) {\n if (!element) return\n if (element.originalStyles) {\n for (const [key, value] of Object.entries(element.originalStyles))\n value ? (element.style[key] = value) : (element.style[key] = '')\n delete element.originalStyles\n }\n delete element.dataset.turboBoostHighlight\n}\n\nexport function coordinates (element) {\n if (!element) return {}\n const rect = element.getBoundingClientRect()\n const width = element.offsetWidth\n const height = element.offsetHeight\n const top = rect.top + window.scrollY\n const left = rect.left + window.scrollX\n const right = left + width\n const bottom = top + height\n return { top, left, right, bottom, width, height }\n}\n\nexport function attempt (callback) {\n try {\n callback()\n } catch {}\n}\n", "export default class DevtoolElement extends HTMLElement {\n constructor () {\n super()\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n this.labelElement.addEventListener('click', event => {\n event.preventDefault()\n this.toggle()\n })\n this.checkboxElement.addEventListener('change', event =>\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n )\n }\n\n toggle () {\n this.checked ? this.uncheck() : this.check()\n }\n\n check () {\n this.checkboxElement.checked = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n }\n\n uncheck () {\n this.checkboxElement.checked = false\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n }\n\n get name () {\n return this.getAttribute('name')\n }\n\n get checked () {\n return this.checkboxElement.checked\n }\n\n get checkboxElement () {\n return this.shadowRoot.querySelector('input')\n }\n\n get labelElement () {\n return this.shadowRoot.querySelector('label')\n }\n\n get html () {\n return `\n \n
\n \n \n
\n `\n }\n\n get stylesheet () {\n return `\n :host, :host * {\n cursor: pointer;\n }\n\n div {\n display: flex;\n margin-right: 10px;\n }\n\n input:checked + label{\n font-weight: bold;\n }\n\n label {\n color: black;\n }\n `\n }\n}\n", "import { appendHTML } from '../utils/dom.js'\n\nexport default class SupervisorElement extends HTMLElement {\n constructor () {\n super()\n this.enabledDevtools = {}\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n this.shadowRoot.querySelector('button').addEventListener('click', () =>\n this.dispatchEvent(\n new CustomEvent('turbo-boost:devtools-close', {\n bubbles: true\n })\n )\n )\n\n this.addEventListener('change', event => {\n const devtoolElement = event.target\n const { checked, name } = devtoolElement\n checked ? this.enableDevtool(name) : this.disableDevtool(name)\n })\n }\n\n enableDevtool (name) {\n if (this.enabledDevtools[name]) return\n this.enabledDevtools[name] = true\n this.dispatchEvent(\n new CustomEvent('turbo-boost:devtool-enable', {\n bubbles: true,\n detail: { name: name }\n })\n )\n }\n\n disableDevtool (name) {\n if (!this.enabledDevtools[name]) return\n delete this.enabledDevtools[name]\n this.dispatchEvent(\n new CustomEvent('turbo-boost:devtool-disable', {\n bubbles: true,\n detail: { name: name }\n })\n )\n }\n\n close () {\n this.devtoolElements.forEach(el => {\n if (el.checked) el.uncheck()\n })\n this.remove()\n }\n\n get devtoolElements () {\n return this.querySelectorAll('[slot=\"devtool\"]')\n }\n\n get closeElement () {\n return this.querySelector('button')\n }\n\n get html () {\n return `\n \n
\n \n \n \n
\n `\n }\n\n get stylesheet () {\n return `\n :host {\n background-color: gainsboro;\n border-radius: 5px;\n bottom: 20px;\n display: block;\n filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));\n left: 50%;\n outline-offset: 1px;\n outline: solid 2px black;\n padding: 5px 10px;\n position: fixed;\n transform: translateX(-50%);\n z-index: 8999;\n }\n\n * {\n -webkit-user-select: none;\n font-family: helvetica, sans-serif;\n font-size: 1rem;\n user-select: none;\n }\n\n img {\n align-self: center;\n cursor: grab;\n height: 25px;\n margin-left: -5px;\n vertical-align: middle;\n }\n\n div {\n display: flex;\n gap: 0 5px;\n position: relative;\n }\n\n [slot=\"devtool\"] {\n align-self: center;\n }\n\n button {\n align-self: center;\n background-color: darkgray;\n border-radius: 50%;\n border: none;\n color: black;\n cursor: pointer;\n font-size: 10px;\n height: 18px;\n line-height: 18px;\n margin-right: -5px;\n opacity: 0.5;\n outline: solid 1px black;\n padding: 0 2px;\n width: 18px;\n }\n\n button:hover {\n opacity: 1;\n }\n `\n }\n}\n", "export default class TooltipElement extends HTMLElement {\n constructor () {\n super()\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n }\n\n connectedCallback () {\n const savedTransform = localStorage.getItem(\n `turbo-boost-devtools-${location.href}-${this.id}-transform`\n )\n\n if (savedTransform) {\n this.style.transform = savedTransform\n }\n }\n\n disconnectedCallback () {\n if (this.id !== 'undefined' && this.id !== '') {\n localStorage.setItem(\n `turbo-boost-devtools-${location.href}-${this.id}-transform`,\n this.style.transform\n )\n }\n }\n\n get color () {\n return this.getAttribute('color') || 'darkslategray'\n }\n\n get backgroundColor () {\n return this.getAttribute('background-color') || 'gainsboro'\n }\n\n get position () {\n return this.getAttribute('position') || 'top'\n }\n\n get html () {\n return `\n \n
\n
\n \n \n
\n \n \n \n \n
\n `\n }\n\n get stylesheet () {\n return `\n :host {\n display: block;\n position: absolute;\n z-index: 8999;\n }\n\n * {\n color: ${this.color}\n font-size: 1rem;\n }\n\n [role=\"container\"] {\n background-color: ${this.backgroundColor};\n border-radius: 15px;\n filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));\n font-family: monospace;\n min-height: 30px;\n min-width: 100px;\n opacity: 0.9;\n outline-offset: 1px;\n outline: dashed 3px ${this.color};\n padding: 12px;\n position: relative;\n white-space: nowrap;\n }\n\n [role=\"title\"] {\n display: flex;\n }\n\n [role=\"title\"] slot[name=\"title\"] {\n color: ${this.color};\n display: block;\n flex-grow: 1;\n font-weight: bold;\n }\n\n [role=\"title\"] img {\n height: 25px;\n vertical-align: middle;\n }\n\n slot[name=\"subtitle\"] {\n border-bottom: dotted 1px ${this.color};\n border-top: dotted 1px ${this.color};\n color: ${this.color};\n display: block;\n font-size: 0.8rem;\n font-weight: lighter;\n margin-bottom: 12px;\n margin-top: 8px;\n padding-bottom: 4px;\n padding-top: 4px;\n width: 100%;\n }\n\n slot[name=\"content-top\"],\n slot[name=\"content\"],\n slot[name=\"content-bottom\"] {\n display: block;\n font-weight: normal;\n }\n\n slot[name=\"content-top\"] {\n color: ${this.color};\n margin-bottom: 8px;\n }\n\n slot[name=\"content\"],\n slot[name=\"content-bottom\"] {\n opacity: 0.7;\n padding-left: 12px;\n }\n\n slot[name=\"content\"] {\n color: ${this.color};\n }\n\n slot[name=\"content-bottom\"] {\n color: red;\n }\n `\n }\n}\n", "const added = []\n\nconst dependencies = {\n LeaderLine: {\n src:\n 'https://cdnjs.cloudflare.com/ajax/libs/leader-line/1.0.7/leader-line.min.js',\n integrity:\n 'sha512-0dNdzMjpT6pJdFGF1DwybFCfm3K/lzHhxaMXC/92J9/DZujHlqYFqmhTOAoD0o+LkeEsVK2ar/ESs7/Q2B6wJg==',\n global: 'LeaderLine'\n },\n\n PlainDraggable: {\n src:\n 'https://cdn.jsdelivr.net/npm/plain-draggable@2.5.14/plain-draggable.min.js',\n global: 'PlainDraggable'\n }\n}\n\nfunction exists (dependency) {\n if (dependency.global && self[dependency.global]) return true\n if (document.querySelector(`[src='${dependency.src}']`)) return true\n return added.includes(dependency)\n}\n\nfunction add (dependency) {\n if (exists(dependency)) return\n added.push(dependency)\n\n const { src, integrity } = dependency\n const script = document.createElement('script')\n script.setAttribute('src', src)\n script.setAttribute('crossorigin', 'anonymous')\n script.setAttribute('referrerpolicy', 'no-referrer')\n if (integrity) script.setAttribute('integrity', integrity)\n document.head.appendChild(script)\n}\n\nfunction remove (dependency) {\n if (!added.includes(dependency)) return\n added.splice(added.indexOf(dependency), 1)\n\n const { src } = dependency\n const el = document.querySelector(`script[src='${src}']`)\n if (el) el.remove()\n if (dependency.global && self[dependency.global])\n self[dependency.global] = null\n}\n\nfunction removeAll () {\n ;[...added].forEach(dependency => remove(dependency))\n}\n\nexport default { ...dependencies, add, remove, removeAll }\n", "import { appendHTML } from './utils/dom'\nimport DevtoolElement from './elements/devtool_element'\nimport SupervisorElement from './elements/supervisor_element'\nimport TooltipElement from './elements/tooltip_element'\nimport dependencies from './dependencies'\n\ncustomElements.define('turbo-boost-devtool', DevtoolElement)\ncustomElements.define('turbo-boost-devtool-supervisor', SupervisorElement)\ncustomElements.define('turbo-boost-devtool-tooltip', TooltipElement)\n\nlet supervisorElement\n\nfunction makeDraggable () {\n if (!supervisorElement) return\n try {\n new PlainDraggable(supervisorElement)\n } catch {\n setTimeout(makeDraggable, 200)\n }\n}\n\nfunction stop () {\n if (stopped()) return\n supervisorElement.close()\n supervisorElement.dispatchEvent(\n new CustomEvent('turbo-boost:devtools-stop', {\n bubbles: true\n })\n )\n supervisorElement = null\n dependencies.removeAll()\n}\n\nfunction start () {\n if (started()) return\n dependencies.add(dependencies.LeaderLine)\n dependencies.add(dependencies.PlainDraggable)\n supervisorElement = appendHTML(\n ''\n )\n setTimeout(makeDraggable, 200)\n supervisorElement.dispatchEvent(\n new CustomEvent('turbo-boost:devtools-start', {\n bubbles: true\n })\n )\n}\n\nfunction restart () {\n const enabledList = supervisorElement\n ? Object.keys(supervisorElement.enabledDevtools)\n : []\n\n stop()\n start()\n\n supervisorElement.devtoolElements.forEach(el => {\n if (enabledList.includes(el.name)) el.check()\n })\n}\n\nfunction started () {\n return !!supervisorElement\n}\n\nfunction stopped () {\n return !started()\n}\n\nlet restartTimeout\nfunction debouncedRestart () {\n clearTimeout(restartTimeout)\n restartTimeout = setTimeout(restart, 25)\n}\n\nfunction autoRestart () {\n if (started()) debouncedRestart()\n}\n\naddEventListener('turbo:load', autoRestart)\naddEventListener('turbo-frame:load', autoRestart)\naddEventListener('turbo-boost:devtools-connect', autoRestart)\naddEventListener('turbo-boost:devtools-close', stop)\n\nif (window.TurboBoost) {\n addEventListener(TurboBoost.Commands.events.success, autoRestart)\n addEventListener(TurboBoost.Commands.events.finish, autoRestart)\n}\n\nfunction register (name, label) {\n if (!supervisorElement) return\n return appendHTML(\n `\n \n ${label}\n \n `,\n supervisorElement\n )\n}\n\nfunction enabled (name) {\n if (!supervisorElement) return false\n return supervisorElement.enabledDevtools[name]\n}\n\nexport default {\n enabled,\n register,\n start,\n stop,\n restart: debouncedRestart,\n get started () {\n return started()\n },\n get stopped () {\n return stopped()\n }\n}\n", "// Icons courtesy of https://feathericons.com/\nimport supervisor from './supervisor'\nimport {\n appendHTML,\n addHighlight,\n attempt,\n coordinates,\n removeHighlight\n} from './utils/dom.js'\n\nfunction appendTooltip (title, subtitle, content, options = {}) {\n let { backgroundColor, color, position, id } = options\n color = color || 'white'\n position = position || 'top'\n return appendHTML(`\n \n
${title}
\n
${subtitle}
\n ${content}\n
\n `)\n}\n\nlet activeTarget\n\nexport default class Devtool {\n constructor (delegate) {\n this.delegate = delegate\n\n let hideTimeout\n const debouncedHide = () => {\n clearTimeout(hideTimeout)\n hideTimeout = setTimeout(this.hide({ active: false }), 25)\n }\n\n this.eventListeners['turbo-boost:devtool-enable'] = event => {\n // LeaderLine.positionByWindowResize = false\n const { name } = event.detail\n if (name !== this.delegate.name) return\n\n addHighlight(this.delegate.triggerElement, {\n outline: '3px dashed blueviolet',\n outlineOffset: '2px'\n })\n\n this.hide({ active: false })\n if (this.active) this.show()\n }\n\n this.eventListeners['turbo-boost:devtool-disable'] = event => {\n const { name } = event.detail\n if (name === this.delegate.name)\n removeHighlight(this.delegate.triggerElement)\n }\n\n this.eventListeners['click'] = event => {\n if (event.target.closest('turbo-boost-devtool-tooltip')) return\n debouncedHide()\n }\n\n this.eventListeners['turbo:load'] = debouncedHide\n this.eventListeners['turbo-frame:load'] = debouncedHide\n if (window.TurboBoost) {\n this.eventListeners[TurboBoost.Commands.events.finish] = debouncedHide\n }\n\n this.registerEventListeners()\n }\n\n registerEventListeners () {\n Object.entries(this.eventListeners).forEach(([type, listener]) => {\n addEventListener(type, listener)\n })\n }\n\n unregisterEventListeners () {\n Object.entries(this.eventListeners).forEach(([type, listener]) => {\n removeEventListener(type, listener)\n })\n }\n\n get eventListeners () {\n return this._eventListeners || (this._eventListeners = {})\n }\n\n show () {\n if (!this.enabled) return\n\n if (this.active) return\n this.active = true\n\n this.hide({ active: true })\n\n addHighlight(this.delegate.targetElement, {\n outline: '3px dashed darkcyan',\n outlineOffset: '-2px'\n })\n\n addHighlight(this.delegate.morphElement, {\n outline: '3px dashed chocolate',\n outlineOffset: '3px'\n })\n\n this.renderingTooltip = this.createRenderingTooltip()\n this.targetTooltip = this.createTargetTooltip()\n this.triggerTooltip = this.createTriggerTooltip(\n this.targetTooltip,\n this.renderingTooltip\n )\n\n document\n .querySelectorAll('.leader-line')\n .forEach(el => (el.style.zIndex = 100000))\n\n const data = {\n morph: {\n partial: this.delegate.triggerElement.renders,\n id: this.delegate.triggerElement.morphs,\n status: this.delegate.morphElement ? 'OK' : 'Not Found'\n },\n trigger: { partial: null, id: null, status: 'Not Found' },\n target: { partial: null, id: null, status: 'Not Found' }\n }\n\n if (this.delegate.triggerElement) {\n data.trigger = {\n partial: this.delegate.triggerElement.partial,\n id: this.delegate.triggerElement.id,\n status: 'OK'\n }\n data.target.id = this.delegate.triggerElement.controls\n }\n\n if (this.delegate.targetElement)\n data.target = {\n partial: this.delegate.targetElement.partial,\n dom_id: this.delegate.targetElement.id,\n status: 'OK'\n }\n\n console.table(data)\n }\n\n hide ({ active: active = false }) {\n document\n .querySelectorAll('turbo-boost-devtool-tooltip')\n .forEach(tooltip => {\n attempt(() => tooltip.line.remove())\n attempt(() => tooltip.drag.remove())\n attempt(() => tooltip.lineToRendering.remove())\n attempt(() => tooltip.lineToTarget.remove())\n attempt(() => tooltip.remove())\n })\n\n document.querySelectorAll('[data-turbo-boost-highlight]').forEach(el => {\n if (!el.tagName.match(/turbo-boost-toggle-trigger/i)) removeHighlight(el)\n })\n\n this.active = active\n }\n\n get active () {\n return activeTarget === this.delegate\n }\n\n set active (value) {\n if (value) activeTarget = this.delegate\n else activeTarget = null\n }\n\n get enabled () {\n return supervisor.enabled(this.delegate.name)\n }\n\n static register (name, label) {\n supervisor.register(name, label)\n }\n\n createRenderingTooltip () {\n if (!this.delegate.triggerElement.renders)\n return console.debug(\n `Unable to create the rendering tooltip! The trigger element must set the 'renders' attribute.`\n )\n\n if (!this.delegate.triggerElement.morphs)\n return console.debug(\n `Unable to create the rendering tooltip! The trigger element specified the 'morphs' attrbiute but no element matches the DOM id: '${this.triggerElement.morphs}'`\n )\n\n const title = `\n \n RENDERING - <${this.delegate.triggerElement.tagName.toLowerCase()}>\n `\n const subtitle = `\n partial: ${this.delegate.triggerElement.renders || 'unknown'}
\n morphs: ${this.delegate.triggerElement.morphs || 'unknown'}
\n `\n const content = `\n
\n The TRIGGER toggles the TARGET then renders the partial & morphs the element.
\n
\n `\n const tooltip = appendTooltip(title, subtitle, content, {\n id: `${this.delegate.id}-rendering`,\n backgroundColor: 'lightyellow',\n color: 'chocolate'\n })\n\n const coords = coordinates(this.delegate.morphElement)\n const top = Math.ceil(\n coords.top + coords.height / 2 - tooltip.offsetHeight / 2\n )\n const left = Math.ceil(coords.left + coords.width + 100)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(tooltip, this.delegate.morphElement, {\n ...this.leaderLineOptions,\n color: 'chocolate'\n })\n\n tooltip.drag = new PlainDraggable(tooltip)\n return tooltip\n }\n\n createTargetTooltip () {\n if (!this.delegate.targetElement)\n return console.debug(\n `Unable to create the target tooltip! No element matches the DOM id: '${this.delegate.triggerElement.controls}'`\n )\n\n const title = `\n \n TARGET - <${this.delegate.targetElement.tagName.toLowerCase()}>\n `\n\n const tooltip = appendTooltip(\n title,\n this.delegate.targetTooltipData?.subtitle || '',\n this.delegate.targetTooltipData?.content || '',\n {\n id: `${this.delegate.id}-target`,\n backgroundColor: 'lightcyan',\n color: 'darkcyan',\n position: 'bottom'\n }\n )\n\n const coords = coordinates(this.delegate.targetElement)\n const top = Math.ceil(coords.top + tooltip.offsetHeight)\n const left = Math.ceil(coords.left + coords.width + tooltip.offsetWidth / 3)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(tooltip, this.delegate.targetElement, {\n ...this.leaderLineOptions,\n color: 'darkcyan'\n })\n\n tooltip.drag = new PlainDraggable(tooltip)\n return tooltip\n }\n\n createTriggerTooltip (targetTooltip, renderingTooltip) {\n if (!this.delegate.triggerElement) return\n const title = `\n \n TRIGGER - <${this.delegate.triggerElement.tagName.toLowerCase()}>\n `\n\n const tooltip = appendTooltip(\n title,\n this.delegate.triggerTooltipData?.subtitle || '',\n this.delegate.triggerTooltipData?.content || '',\n {\n id: `${this.delegate.id}-trigger`,\n backgroundColor: 'lavender',\n color: 'blueviolet'\n }\n )\n\n const coords = coordinates(this.delegate.triggerElement)\n const top = Math.ceil(coords.top - tooltip.offsetHeight * 2)\n const left = Math.ceil(coords.left + coords.width + tooltip.offsetWidth / 3)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(this.delegate.triggerElement, tooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet'\n })\n\n if (targetTooltip) {\n tooltip.lineToTarget = new LeaderLine(tooltip, targetTooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet',\n middleLabel: this.delegate.targetLineLabel,\n size: 2.1\n })\n\n targetTooltip.drag.onMove = () => {\n targetTooltip.line.position()\n tooltip.lineToTarget?.position()\n tooltip.lineToRendering?.position()\n }\n }\n\n if (renderingTooltip) {\n tooltip.lineToRendering = new LeaderLine(tooltip, renderingTooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet',\n middleLabel: this.delegate.renderingLineLabel,\n size: 2.1\n })\n\n renderingTooltip.drag.onMove = () => {\n renderingTooltip.line.position()\n if (tooltip.lineToTarget) tooltip.lineToTarget.position()\n tooltip.lineToRendering?.position()\n }\n }\n\n tooltip.drag = new PlainDraggable(tooltip)\n tooltip.drag.onMove = () => {\n tooltip.line.position()\n if (tooltip.lineToTarget) tooltip.lineToTarget.position()\n if (tooltip.lineToRendering) tooltip.lineToRendering.position()\n }\n\n return tooltip\n }\n\n get leaderLineOptions () {\n return {\n dash: { animation: true },\n dropShadow: { opacity: 0.3 },\n endPlug: 'arrow3',\n endPlugSize: 1.7,\n size: 3,\n startPlug: 'disc',\n startPlugSize: 1\n }\n }\n}\n", "import supervisor from './supervisor'\nimport Devtool from './devtool'\n\nconst { restart, start, stop } = supervisor\n\nfunction decorateElementWithDevtool (element, name, label) {\n Object.assign(element, {\n initializeDevtool () {\n const mouseenter = () => this.devtool.show()\n\n addEventListener('turbo-boost:devtools-start', () => {\n this.devtool = new Devtool(this)\n this.addEventListener('mouseenter', mouseenter)\n })\n\n addEventListener('turbo-boost:devtools-stop', () => {\n this.removeEventListener('mouseenter', mouseenter)\n this.removeDevtool()\n })\n\n this.dispatchEvent(\n new CustomEvent('turbo-boost:devtools-connect', { bubbles: true })\n )\n },\n hideDevtool () {\n this.devtool?.hide({ active: false })\n },\n removeDevtool () {\n this.devtool.hide({ active: false })\n this.devtool.unregisterEventListeners()\n delete this.devtool\n },\n name,\n targetLineLabel: label\n })\n\n // the element references below are defaults that are placed on the receiver if not present\n const properties = ['triggerElement', 'morphElement', 'targetElement']\n\n properties\n .filter(property => {\n return element[property] === undefined\n })\n .forEach(property => {\n Object.defineProperty(element, property, {\n get () {\n return element\n }\n })\n })\n}\n\n//;(async () => {\n// // we cannot detect customElements.get(\"cable-ready-updates-for\") because they are lazily initialized\n// if (window.CableReady) await import('./delegates/cable_ready.js')\n//})()\n\nexport { Devtool, decorateElementWithDevtool }\n\nexport default { restart, start, stop }\n", "export default class TurboBoostElement extends HTMLElement {\n constructor(html) {\n super()\n this.devtool = 'unknown'\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = html || ''\n }\n\n connectedCallback() {\n this.ensureId()\n }\n\n ensureId() {\n if (this.id.trim().length) return\n this.id = `${this.tagName}-${this.uuidv4()}`.toLowerCase()\n }\n\n // SEE: https://stackoverflow.com/questions/105034/how-do-i-create-a-guid-uuid\n uuidv4() {\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>\n (c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)\n )\n }\n\n get viewStack() {\n const value = this.getAttribute('view-stack')\n if (!value) return []\n return JSON.parse(value)\n }\n\n get partial() {\n return this.viewStack[0]\n }\n}\n", "import TurboBoostElement from '../../turbo_boost_element'\n\nconst html = `\n \n \n \n \n`\n\nexport const busyDelay = 100 // milliseconds - time to wait before showing busy element\nexport const busyDuration = 400 // milliseconds - minimum time that busy element is shown\n\nexport default class ToggleElement extends TurboBoostElement {\n constructor() {\n super(html)\n }\n\n // TODO: Should we timeout after a theoretical max wait time?\n // The idea being that a server error occurred and the toggle failed.\n showBusyElement() {\n clearTimeout(this.showBusyElementTimeout)\n clearTimeout(this.hideBusyElementTimeout)\n\n if (!this.busyElement) return\n\n this.busyStartedAt = Date.now() + busyDelay\n this.showBusyElementTimeout = setTimeout(() => {\n this.busySlotElement.hidden = false\n this.defaultSlotElement.hidden = true\n }, busyDelay)\n }\n\n hideBusyElement() {\n clearTimeout(this.showBusyElementTimeout)\n clearTimeout(this.hideBusyElementTimeout)\n\n if (!this.busyElement) return\n\n let delay = busyDuration - (Date.now() - this.busyStartedAt)\n if (delay < 0) delay = 0\n\n delete this.busyStartedAt\n this.hideBusyElementTimeout = setTimeout(() => {\n this.busySlotElement.hidden = true\n this.defaultSlotElement.hidden = false\n }, delay)\n }\n\n get busyElement() {\n return this.querySelector(':scope > [slot=\"busy\"]')\n }\n\n get busySlotElement() {\n return this.shadowRoot.querySelector('slot[name=\"busy\"]')\n }\n\n get defaultSlotElement() {\n return this.shadowRoot.querySelector('slot:not([name])')\n }\n\n // indicates if an rpc call is active/busy\n get busy() {\n return this.getAttribute('busy') === 'true'\n }\n\n // indicates if an rpc call is active/busy\n set busy(value) {\n value = !!value\n if (this.busy === value) return\n this.setAttribute('busy', value)\n if (value) this.showBusyElement()\n else this.hideBusyElement()\n }\n\n get busyStartedAt() {\n if (!this.dataset.busyStartedAt) return 0\n return Number(this.dataset.busyStartedAt)\n }\n\n set busyStartedAt(value) {\n this.dataset.busyStartedAt = value\n }\n}\n", "import ToggleElement from '../toggle_element'\n\nexport default class ToggleTargetElement extends ToggleElement {\n connectedCallback() {\n super.connectedCallback()\n\n this.mouseenterHandler = this.onMouseenter.bind(this)\n this.addEventListener('mouseenter', this.mouseenterHandler)\n\n this.collapseHandler = this.collapse.bind(this)\n this.collapseNowHandler = this.collapseNow.bind(this)\n\n this.collapseOn.forEach(entry => {\n const parts = entry.split('@')\n const name = parts[0]\n\n if (parts.length > 1) {\n const target = parts[1].match(/^self|window$/) ? self : self[parts[1]]\n target.addEventListener(name, this.collapseNowHandler)\n } else {\n this.addEventListener(name, this.collapseHandler)\n }\n })\n }\n\n disconnectedCallback() {\n this.removeEventListener('mouseenter', this.mouseenterHandler)\n\n this.collapseOn.forEach(entry => {\n const parts = entry.split('@')\n const name = parts[0]\n\n if (parts.length > 1) {\n const target = parts[1].match(/^self|window$/) ? self : self[parts[1]]\n target.removeEventListener(name, this.collapseNowHandler)\n } else {\n this.removeEventListener(name, this.collapseHandler)\n }\n })\n }\n\n // TODO: get cached content working properly\n // perhaps use a mechanic other than morph\n\n // TODO: implement cache (similar to Turbo Drive restoration visit)\n cacheHTML() {\n // this.cachedHTML = this.innerHTML\n }\n\n // TODO: implement cache (similar to Turbo Drive restoration visit)\n renderCachedHTML() {\n // if (!this.cachedHTML) return\n // this.innerHTML = this.cachedHTML\n }\n\n onMouseenter() {\n clearTimeout(this.collapseTimeout)\n }\n\n collapse(delay = 250) {\n clearTimeout(this.collapseTimeout)\n if (this.busy) return\n if (typeof delay !== 'number') delay = 250\n\n if (delay > 0) return (this.collapseTimeout = setTimeout(() => this.collapse(0), delay))\n\n this.innerHTML = ''\n try {\n this.expanded = false\n this.triggerElement.hideDevtool()\n } catch {}\n }\n\n collapseNow(event) {\n if (event.target.closest('turbo-boost-devtool-tooltip')) return\n this.collapse(0)\n }\n\n collapseMatches() {\n document.querySelectorAll(this.collapseSelector).forEach(el => {\n if (el.id === this.id) return\n if (el.collapse) el.collapse(0)\n })\n }\n\n get collapseSelector() {\n return this.triggerElement.collapseSelector || this.getAttribute('collapse-selector')\n }\n\n get focusSelector() {\n return this.getAttribute('focus-selector')\n }\n\n // the active trigger\n get triggerElement() {\n return document.getElementById(this.labeledBy)\n }\n\n // all triggers\n get triggerElements() {\n return document.querySelectorAll(`[aria-controls=\"${this.id}\"]`)\n }\n\n // the dom id of the active trigger\n get labeledBy() {\n return this.getAttribute('aria-labeledby')\n }\n\n set labeledBy(value) {\n return this.setAttribute('aria-labeledby', value)\n }\n\n get collapseOn() {\n const value = this.getAttribute('collapse-on')\n if (!value) return []\n return JSON.parse(value)\n }\n\n get expanded() {\n return this.triggerElement ? this.triggerElement.expanded : false\n }\n\n set expanded(value) {\n this.triggerElements.forEach(el => (el.expanded = value))\n }\n\n get busy() {\n return this.triggerElement && this.triggerElement.busy\n }\n}\n", "let focusTimeout\n\nfunction deactivateTrixAttributes(editor) {\n const attributes = ['bold', 'bullet', 'code', 'heading1', 'href', 'italic', 'number', 'quote', 'strike']\n attributes.forEach(name => editor.deactivateAttribute(name))\n}\n\nfunction focusTrixEditorElement(element) {\n if (element.value.length === 0) return\n\n const editor = element.editor\n\n // move cursor to the end\n let lastRange = []\n while (lastRange[0] !== editor.getSelectedRange()[0] && lastRange[1] !== editor.getSelectedRange()[1]) {\n lastRange = editor.getSelectedRange()\n editor.moveCursorInDirection('forward')\n }\n\n // insert an empty char and select it\n editor.insertString(' ')\n editor.moveCursorInDirection('forward')\n editor.setSelectedRange([lastRange[1], editor.getSelectedRange()[1]])\n\n // deactivate all trix features for the selection\n deactivateTrixAttributes(editor)\n\n // move cursor to end and collapse the selection\n editor.setSelectedRange([editor.getSelectedRange()[1], editor.getSelectedRange()[1]])\n}\n\nfunction debouncedFocus(element) {\n clearTimeout(focusTimeout)\n\n focusTimeout = setTimeout(() => {\n if (!element) return\n\n element.focus()\n const trixEditorElement = element.closest('trix-editor')\n\n try {\n if (trixEditorElement) {\n focusTrixEditorElement(trixEditorElement)\n } else {\n element.selectionStart = element.selectionEnd = element.value.length\n }\n } catch (_) {\n } finally {\n element.scrollIntoView({ block: 'center', behavior: 'smooth' })\n }\n }, 100)\n}\n\nexport default element => debouncedFocus(element)\n", "import { Devtool, decorateElementWithDevtool } from '@turbo-boost/devtools'\n\nimport ToggleElement, { busyDuration } from '../toggle_element'\nimport focus from './focus'\n\ndocument.addEventListener('turbo-boost:devtools-start', () => Devtool.register('toggle', 'toggles'))\n\nlet currentFocusSelector\n\nexport default class ToggleTriggerElement extends ToggleElement {\n constructor() {\n super()\n\n decorateElementWithDevtool(this, 'toggle', 'toggles')\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n const { start: commandStartEvent } = TurboBoost.Commands.events\n this.commandStartHandler = this.onCommandStart.bind(this)\n this.addEventListener(commandStartEvent, this.commandStartHandler)\n\n const { before: beforeInvokeEvent } = TurboBoost.Streams.invokeEvents\n this.beforeInvokeHandler = this.onBeforeInvoke.bind(this)\n addEventListener(beforeInvokeEvent, this.beforeInvokeHandler)\n\n // fires after receiving the toggle morph Turbo Stream but before it is executed\n // this.addEventListener(TurboBoost.Commands.events.success, event => {\n // // TODO: imlement cache, this.targetElement.cacheHTML()\n // })\n\n this.initializeDevtool()\n }\n\n disconnectedCallback() {\n // delay cleanup because the trigger may have been morphed out of the DOM,\n // but it's needed to apply behavior like focus etc...\n setTimeout(() => {\n const { start: commandStartEvent } = TurboBoost.Commands.events\n this.removeEventListener(commandStartEvent, this.commandStartHandler)\n\n const { before: beforeInvokeEvent } = TurboBoost.Streams.invokeEvents\n removeEventListener(beforeInvokeEvent, this.beforeInvokeHandler)\n\n this.removeDevtool()\n }, 1000)\n }\n\n onCommandStart(event) {\n currentFocusSelector = this.focusSelector\n this.targetElement.labeledBy = this.id\n this.targetElement.collapseMatches()\n this.busy = true\n // TODO: implement cache - this.targetElement.renderCachedHTML()\n }\n\n // runs before an invoke turbo stream is executed\n onBeforeInvoke(event) {\n // return early if we're not the element responsible for this invoke\n if (event.detail.method !== 'morph') return\n if (event.target.id !== this.morphs) return\n const selector = `turbo-boost-toggle-target[aria-labeledby=\"${this.id}\"]`\n if (!event.target.querySelector(selector)) return\n\n // ensure the busy element is shown long enough for a good user experience\n // we accomplish this by modifying the event.detail with invoke instructions i.e. { delay }\n // SEE: the TurboBoost Streams library for details on how this works\n const duration = Date.now() - this.busyStartedAt\n let delay = busyDuration - duration\n if (delay < 10) delay = 10\n event.detail.invoke = { delay }\n\n // runs before the morph is executed\n setTimeout(() => {\n this.busy = false\n this.morphToggleTriggerElements.forEach(el => (el.busy = false))\n }, delay - 10)\n\n // runs after the morph is executed\n setTimeout(() => focus(this.targetElement.querySelector(currentFocusSelector)), delay + 100)\n }\n\n // a list of views shared between the trigger and target\n get sharedViews() {\n if (!this.targetElement) return []\n if (!this.targetElement.viewStack) return []\n const reducer = (memo, view) => {\n if (this.targetElement.viewStack.includes(view)) memo.push(view)\n return memo\n }\n return this.viewStack.reduce(reducer.bind(this), [])\n }\n\n // the partial to render\n get renders() {\n return this.getAttribute('renders')\n }\n\n // the renderered partial's top wrapping dom_id\n get morphs() {\n return this.getAttribute('morphs')\n }\n\n // all toggle elements contained by the `morphElement`\n get morphToggleTriggerElements() {\n return Array.from(this.morphElement.querySelectorAll('turbo-boost-toggle-trigger'))\n }\n\n // the target's dom_id\n get controls() {\n return this.getAttribute('aria-controls')\n }\n\n get collapseSelector() {\n return this.getAttribute('collapse-selector')\n }\n\n get focusSelector() {\n return this.getAttribute('focus-selector') || this.targetElement.focusSelector\n }\n\n // indicates if the toggle state should be remembered across requests\n get remember() {\n return this.getAttribute('remember') === 'true'\n }\n\n set remember(value) {\n return this.setAttribute('remember', !!value)\n }\n\n // indicates if the target is expanded\n get expanded() {\n return this.getAttribute('aria-expanded') === 'true'\n }\n\n set expanded(value) {\n this.setAttribute('aria-expanded', !!value)\n }\n\n // indicates if the target is expanded\n get collapsed() {\n return !this.expanded\n }\n\n // ------ DevToolDelegate ------\n get command() {\n return this.dataset.turboCommand\n }\n\n get renderingLineLabel() {\n return 'renders & morphs'\n }\n\n // the morph element\n get morphElement() {\n if (!this.morphs) return null\n return document.getElementById(this.morphs)\n }\n\n // the target element\n get targetElement() {\n if (!this.controls) return null\n return document.getElementById(this.controls)\n }\n\n get triggerTooltipData() {\n let content = this.triggerElement.viewStack\n .reverse()\n .map((view, index) => {\n return this.triggerElement.sharedViews.includes(view)\n ? `
${index + 1}. ${view}
`\n : `
${index + 1}. ${view}
`\n }, this)\n .join('')\n\n return {\n subtitle: `\n id: ${this.triggerElement.id}
\n aria-controls: ${this.triggerElement.controls}
\n aria-expanded: ${this.triggerElement.expanded}
\n remember: ${this.triggerElement.remember}
\n `,\n content: `\n
\n \n View Stack\n
\n ${content}\n `\n }\n }\n\n get targetTooltipData() {\n let content = this.targetElement.viewStack\n .reverse()\n .map((view, index) => {\n return this.triggerElement.sharedViews.includes(view)\n ? `
${index + 1}. ${view}
`\n : `
${index + 1}. ${view}
`\n }, this)\n .join('')\n\n return {\n subtitle: `id: ${this.targetElement.id}
\n aria-labeled-by: ${this.targetElement.labeledBy}
\n`,\n content: `\n
\n \n View Stack\n
\n ${content}\n `\n }\n }\n}\n", "import TurboBoostElement from './turbo_boost_element'\nimport ToggleTargetElement from './toggle_elements/target_element'\nimport ToggleTriggerElement from './toggle_elements/trigger_element'\n\n// Valid custom element names: https://html.spec.whatwg.org/#valid-custom-element-name\n\ncustomElements.define('turbo-boost', TurboBoostElement)\ncustomElements.define('turbo-boost-toggle-target', ToggleTargetElement)\ncustomElements.define('turbo-boost-toggle-trigger', ToggleTriggerElement)\n", "import '@turbo-boost/commands'\nimport devtools from '@turbo-boost/devtools'\nimport './elements'\n\nself.TurboBoost = self.TurboBoost || {}\nself.TurboBoost.devtools = devtools\nself.TurboBoost.Elements = {}\n\nexport default self.TurboBoost.Elements\n"], + "mappings": "6aAAMA,GAAN,KAAW,CACT,IAAI,SAAU,CACZ,OAAO,SAAS,cAAc,0BAA0B,CAC1D,CAEA,IAAI,OAAQ,CACV,OAAO,KAAK,QAAQ,aAAa,SAAS,CAC5C,CAEA,IAAI,MAAO,CACT,OAAO,KAAK,QAAQ,QAAQ,OAAS,MACvC,CAEA,IAAI,KAAKC,EAAO,CACd,OAAQ,KA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B,KAAK,eAAe,QAAQ;AAAA,yBACjC,KAAK,eAAe,QAAQ;AAAA,MAE/C,QAAS;AAAA;AAAA;AAAA;AAAA;AAAA,QAKPE,CAAO;AAAA,KAEX,CACF,CAEA,IAAI,mBAAoB,CACtB,IAAIA,EAAU,KAAK,cAAc,UAC9B,QAAQ,EACR,IAAI,CAACF,EAAMG,IACH,KAAK,eAAe,YAAY,SAASH,CAAI,EAChD,uBAAuBG,EAAQ,CAAC,KAAKH,CAAI,SACzC,8BAA8BG,EAAQ,CAAC,KAAKH,CAAI,SACnD,IAAI,EACN,KAAK,EAAE,EAEV,MAAO,CACL,SAAU,cAAc,KAAK,cAAc,EAAE;AAAA,gCACnB,KAAK,cAAc,SAAS;AAAA,EAEtD,QAAS;AAAA;AAAA;AAAA;AAAA;AAAA,QAKPE,CAAO;AAAA,KAEX,CACF,CACF,EClNA,eAAe,OAAO,cAAeE,CAAiB,EACtD,eAAe,OAAO,4BAA6BC,CAAmB,EACtE,eAAe,OAAO,6BAA8BC,CAAoB,ECJxE,KAAK,WAAa,KAAK,YAAc,CAAC,EACtC,KAAK,WAAW,SAAWC,GAC3B,KAAK,WAAW,SAAW,CAAC,EAE5B,IAAOC,GAAQ,KAAK,WAAW", + "names": ["Meta", "value", "meta_default", "commandEvents", "stateEvents", "allEvents", "__spreadValues", "dispatch", "name", "target", "options", "resolve", "evt", "__spreadProps", "head", "observable", "object", "parent", "proxy", "key", "receiver", "index", "observable_default", "loadedState", "currentState", "changedState", "loadStateTimeout", "loadState", "loadStateLater", "json", "event", "state_default", "replaceDocument", "content", "tail", "headIndex", "tailIndex", "html", "append", "renderer_default", "active", "add", "payload", "remove", "id", "activity_default", "finish", "lifecycle_default", "frameSources", "frame", "fetchOptions", "acceptHeaders", "entry", "chunk", "i", "response", "error", "schema", "schema_default", "confirmation", "message", "isTurboMethod", "isTurboForm", "element", "shouldDelegate", "confirmation_default", "events", "eventListener", "register", "eventName", "selectors", "match", "getRegisteredEventForElement", "selector", "el", "isRegisteredForElement", "delegates_default", "fn", "findClosestCommand", "findClosestFrameWithSource", "assignElementValueToPayload", "memo", "option", "buildAttributePayload", "attr", "elements_default", "updateFormSubmission", "formSubmission", "_a", "invokeCommand", "form", "input", "form_default", "build", "urlString", "a", "url", "urls_default", "src", "frame_default", "method_default", "aborted", "xhr", "errored", "loaded", "ex", "window_default", "find", "turboFrame", "turboMethod", "drivers_default", "currentLevel", "logLevels", "detail", "logger_default", "v4", "c", "uuids_default", "buildCommandPayload", "commandId", "driver", "startEvent", "javascript_default", "template", "html", "appendHTML", "parent", "child", "addHighlight", "element", "options", "removeHighlight", "outline", "outlineOffset", "key", "value", "coordinates", "rect", "width", "height", "top", "left", "right", "bottom", "attempt", "callback", "e", "DevtoolElement", "event", "SupervisorElement", "devtoolElement", "checked", "name", "el", "TooltipElement", "savedTransform", "added", "dependencies", "exists", "dependency", "add", "src", "integrity", "script", "remove", "removeAll", "dependencies_default", "__spreadProps", "__spreadValues", "supervisorElement", "makeDraggable", "stop", "stopped", "start", "started", "restart", "enabledList", "restartTimeout", "debouncedRestart", "autoRestart", "register", "label", "enabled", "supervisor_default", "appendTooltip", "title", "subtitle", "content", "backgroundColor", "color", "position", "id", "activeTarget", "Devtool", "delegate", "hideTimeout", "debouncedHide", "type", "listener", "data", "active", "tooltip", "coords", "_a", "_b", "targetTooltip", "renderingTooltip", "decorateElementWithDevtool", "mouseenter", "property", "src_default", "TurboBoostElement", "html", "c", "value", "html", "busyDelay", "busyDuration", "ToggleElement", "TurboBoostElement", "delay", "value", "ToggleTargetElement", "ToggleElement", "entry", "parts", "name", "delay", "e", "event", "el", "value", "focusTimeout", "deactivateTrixAttributes", "editor", "name", "focusTrixEditorElement", "element", "lastRange", "debouncedFocus", "trixEditorElement", "_", "focus_default", "y", "currentFocusSelector", "ToggleTriggerElement", "ToggleElement", "kt", "commandStartEvent", "beforeInvokeEvent", "event", "selector", "duration", "delay", "busyDuration", "el", "focus_default", "reducer", "memo", "view", "value", "content", "index", "TurboBoostElement", "ToggleTargetElement", "ToggleTriggerElement", "Lt", "javascript_default"] } diff --git a/app/assets/builds/@turbo-boost/elements.metafile.json b/app/assets/builds/@turbo-boost/elements.metafile.json index ae54a7f..7e4dfef 100644 --- a/app/assets/builds/@turbo-boost/elements.metafile.json +++ b/app/assets/builds/@turbo-boost/elements.metafile.json @@ -1 +1 @@ -{"inputs":{"node_modules/@turbo-boost/commands/app/assets/builds/@turbo-boost/commands.js":{"bytes":11151,"imports":[],"format":"esm"},"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js":{"bytes":21880,"imports":[],"format":"esm"},"app/javascript/elements/turbo_boost_element/index.js":{"bytes":844,"imports":[],"format":"esm"},"app/javascript/elements/toggle_elements/toggle_element/index.js":{"bytes":2193,"imports":[{"path":"app/javascript/elements/turbo_boost_element/index.js","kind":"import-statement","original":"../../turbo_boost_element"}],"format":"esm"},"app/javascript/elements/toggle_elements/target_element/index.js":{"bytes":3370,"imports":[{"path":"app/javascript/elements/toggle_elements/toggle_element/index.js","kind":"import-statement","original":"../toggle_element"}],"format":"esm"},"app/javascript/elements/toggle_elements/trigger_element/focus.js":{"bytes":1585,"imports":[],"format":"esm"},"app/javascript/elements/toggle_elements/trigger_element/index.js":{"bytes":7168,"imports":[{"path":"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js","kind":"import-statement","original":"@turbo-boost/devtools"},{"path":"app/javascript/elements/toggle_elements/toggle_element/index.js","kind":"import-statement","original":"../toggle_element"},{"path":"app/javascript/elements/toggle_elements/trigger_element/focus.js","kind":"import-statement","original":"./focus"}],"format":"esm"},"app/javascript/elements/index.js":{"bytes":481,"imports":[{"path":"app/javascript/elements/turbo_boost_element/index.js","kind":"import-statement","original":"./turbo_boost_element"},{"path":"app/javascript/elements/toggle_elements/target_element/index.js","kind":"import-statement","original":"./toggle_elements/target_element"},{"path":"app/javascript/elements/toggle_elements/trigger_element/index.js","kind":"import-statement","original":"./toggle_elements/trigger_element"}],"format":"esm"},"app/javascript/index.js":{"bytes":244,"imports":[{"path":"node_modules/@turbo-boost/commands/app/assets/builds/@turbo-boost/commands.js","kind":"import-statement","original":"@turbo-boost/commands"},{"path":"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js","kind":"import-statement","original":"@turbo-boost/devtools"},{"path":"app/javascript/elements/index.js","kind":"import-statement","original":"./elements"}],"format":"esm"}},"outputs":{"app/assets/builds/@turbo-boost/elements.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":97900},"app/assets/builds/@turbo-boost/elements.js":{"imports":[],"exports":["default"],"entryPoint":"app/javascript/index.js","inputs":{"node_modules/@turbo-boost/commands/app/assets/builds/@turbo-boost/commands.js":{"bytesInOutput":11085},"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js":{"bytesInOutput":21828},"app/javascript/elements/turbo_boost_element/index.js":{"bytesInOutput":541},"app/javascript/elements/toggle_elements/toggle_element/index.js":{"bytesInOutput":1284},"app/javascript/elements/toggle_elements/target_element/index.js":{"bytesInOutput":2040},"app/javascript/elements/toggle_elements/trigger_element/focus.js":{"bytesInOutput":768},"app/javascript/elements/toggle_elements/trigger_element/index.js":{"bytesInOutput":4297},"app/javascript/elements/index.js":{"bytesInOutput":146},"app/javascript/index.js":{"bytesInOutput":123}},"bytes":42172}}} \ No newline at end of file +{"inputs":{"node_modules/@turbo-boost/commands/app/assets/builds/@turbo-boost/commands.js":{"bytes":11697,"imports":[],"format":"esm"},"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js":{"bytes":19335,"imports":[],"format":"esm"},"app/javascript/elements/turbo_boost_element/index.js":{"bytes":844,"imports":[],"format":"esm"},"app/javascript/elements/toggle_elements/toggle_element/index.js":{"bytes":2193,"imports":[{"path":"app/javascript/elements/turbo_boost_element/index.js","kind":"import-statement","original":"../../turbo_boost_element"}],"format":"esm"},"app/javascript/elements/toggle_elements/target_element/index.js":{"bytes":3370,"imports":[{"path":"app/javascript/elements/toggle_elements/toggle_element/index.js","kind":"import-statement","original":"../toggle_element"}],"format":"esm"},"app/javascript/elements/toggle_elements/trigger_element/focus.js":{"bytes":1585,"imports":[],"format":"esm"},"app/javascript/elements/toggle_elements/trigger_element/index.js":{"bytes":7168,"imports":[{"path":"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js","kind":"import-statement","original":"@turbo-boost/devtools"},{"path":"app/javascript/elements/toggle_elements/toggle_element/index.js","kind":"import-statement","original":"../toggle_element"},{"path":"app/javascript/elements/toggle_elements/trigger_element/focus.js","kind":"import-statement","original":"./focus"}],"format":"esm"},"app/javascript/elements/index.js":{"bytes":481,"imports":[{"path":"app/javascript/elements/turbo_boost_element/index.js","kind":"import-statement","original":"./turbo_boost_element"},{"path":"app/javascript/elements/toggle_elements/target_element/index.js","kind":"import-statement","original":"./toggle_elements/target_element"},{"path":"app/javascript/elements/toggle_elements/trigger_element/index.js","kind":"import-statement","original":"./toggle_elements/trigger_element"}],"format":"esm"},"app/javascript/index.js":{"bytes":244,"imports":[{"path":"node_modules/@turbo-boost/commands/app/assets/builds/@turbo-boost/commands.js","kind":"import-statement","original":"@turbo-boost/commands"},{"path":"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js","kind":"import-statement","original":"@turbo-boost/devtools"},{"path":"app/javascript/elements/index.js","kind":"import-statement","original":"./elements"}],"format":"esm"}},"outputs":{"app/assets/builds/@turbo-boost/elements.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":107124},"app/assets/builds/@turbo-boost/elements.js":{"imports":[],"exports":["default"],"entryPoint":"app/javascript/index.js","inputs":{"node_modules/@turbo-boost/commands/app/assets/builds/@turbo-boost/commands.js":{"bytesInOutput":11631},"node_modules/@turbo-boost/devtools/dist/@turbo-boost/devtools.js":{"bytesInOutput":19271},"app/javascript/elements/turbo_boost_element/index.js":{"bytesInOutput":541},"app/javascript/elements/toggle_elements/toggle_element/index.js":{"bytesInOutput":1284},"app/javascript/elements/toggle_elements/target_element/index.js":{"bytesInOutput":2040},"app/javascript/elements/toggle_elements/trigger_element/focus.js":{"bytesInOutput":768},"app/javascript/elements/toggle_elements/trigger_element/index.js":{"bytesInOutput":4299},"app/javascript/elements/index.js":{"bytesInOutput":146},"app/javascript/index.js":{"bytesInOutput":124}},"bytes":40164}}} \ No newline at end of file diff --git a/lib/turbo_boost/elements/version.rb b/lib/turbo_boost/elements/version.rb index b12544f..f2d51a8 100644 --- a/lib/turbo_boost/elements/version.rb +++ b/lib/turbo_boost/elements/version.rb @@ -2,6 +2,6 @@ module TurboBoost module Elements - VERSION = "0.0.16" + VERSION = "0.0.17" end end diff --git a/package.json b/package.json index 545cd40..8226369 100644 --- a/package.json +++ b/package.json @@ -18,16 +18,16 @@ "author": "Nate Hopkins (hopsoft) ", "license": "MIT", "dependencies": { - "@turbo-boost/commands": ">= 0.0.13", - "@turbo-boost/devtools": "^0.0.3" + "@turbo-boost/commands": ">= 0.0.14", + "@turbo-boost/devtools": "^0.0.4" }, "peerDependencies": { "@hotwired/turbo-rails": ">= 7.2" }, "devDependencies": { "esbuild": "^0.19.0", - "eslint": "^8.32.0", - "prettier": "^3.0.0" + "eslint": "^8.48.0", + "prettier": "^3.0.3" }, "scripts": { "build": "bin/standardize && node bin/build.mjs", diff --git a/yarn.lock b/yarn.lock index bcea6af..0a9b362 100644 --- a/yarn.lock +++ b/yarn.lock @@ -144,10 +144,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@^8.47.0": - version "8.47.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.47.0.tgz#5478fdf443ff8158f9de171c704ae45308696c7d" - integrity sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og== +"@eslint/js@8.48.0": + version "8.48.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.48.0.tgz#642633964e217905436033a2bd08bf322849b7fb" + integrity sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw== "@humanwhocodes/config-array@^0.11.10": version "0.11.10" @@ -189,15 +189,15 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@turbo-boost/commands@>= 0.0.13": - version "0.0.13" - resolved "https://registry.yarnpkg.com/@turbo-boost/commands/-/commands-0.0.13.tgz#7ff4393ded1ea5dc486a07a6e37ee1ab94705e23" - integrity sha512-88hr/llVEYq5GagRoIyoZMYFfrVynhuiV+hWKbtrSfms8JL3Sa1uMARqnvDUk9rdGSN3xcMButsinzrSxG9OmA== +"@turbo-boost/commands@>= 0.0.14": + version "0.0.14" + resolved "https://registry.yarnpkg.com/@turbo-boost/commands/-/commands-0.0.14.tgz#9f9160326e92484d35018da2a7bafc6885443b82" + integrity sha512-OYe1hnFffHFDG6YTz964YZaSXCSaWMygD8Nuj7AaKZzoedMKWw6KlAwF1liYtLwIi1DB3/RapI0mzVIu2AywZQ== -"@turbo-boost/devtools@^0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@turbo-boost/devtools/-/devtools-0.0.3.tgz#2d9bf3796d5c642f24af8aab50af72b61fa11532" - integrity sha512-b9rbEUsQ+fnfz+llWZXCDmIv+sIsu6dPbs/bIOsD3D7oASmllFuOVhfCfIZKxeDp3E/bCwF2mFNrmV4r7DbOHQ== +"@turbo-boost/devtools@^0.0.4": + version "0.0.4" + resolved "https://registry.yarnpkg.com/@turbo-boost/devtools/-/devtools-0.0.4.tgz#5fc2b09dbbacb0c6d6608fd068100fc0fb47e7f8" + integrity sha512-92SuX7BVWrwFVU1UVyqYS0rhc4V6xKpGhD9OfCNGa2M+bpihRobl9XLl3dHYjOfsLbDKYB2jll64XkLgMF08Mw== acorn-jsx@^5.3.2: version "5.3.2" @@ -353,15 +353,15 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.32.0: - version "8.47.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.47.0.tgz#c95f9b935463fb4fad7005e626c7621052e90806" - integrity sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q== +eslint@^8.48.0: + version "8.48.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.48.0.tgz#bf9998ba520063907ba7bfe4c480dc8be03c2155" + integrity sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.2" - "@eslint/js" "^8.47.0" + "@eslint/js" "8.48.0" "@humanwhocodes/config-array" "^0.11.10" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -687,10 +687,10 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.2.tgz#78fcecd6d870551aa5547437cdae39d4701dca5b" - integrity sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ== +prettier@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643" + integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== punycode@^2.1.0: version "2.3.0"