dev-process-kit 0.0.17 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/chunks/shared-B5lBiq5s.js +1 -0
- package/dist/chunks/shared-BDka-8DG.js +3720 -0
- package/dist/chunks/shared-BWk3i0ft.js +2774 -0
- package/dist/chunks/{shared-XCFMpX43.js → shared-BZK_cqqQ.js} +12 -12
- package/dist/chunks/{shared-3uutHtJD.js → shared-Bhrkz9uX.js} +22 -25
- package/dist/chunks/{shared-D7TEJdR2.js → shared-BqL8W-G6.js} +1 -1
- package/dist/chunks/shared-BqvHpTHr.js +572 -0
- package/dist/chunks/shared-CjW1DhGL.js +1 -0
- package/dist/chunks/{shared-B_MRyp8K.js → shared-CqjOqXJ3.js} +32 -50
- package/dist/chunks/shared-D1W4I3eq.js +4143 -0
- package/dist/chunks/{shared-C_Ru__JO.js → shared-D6pr-dx0.js} +1 -1
- package/dist/chunks/{shared-DG16QEdg.js → shared-DRzfRsiJ.js} +173 -203
- package/dist/chunks/{shared-Bnqz77V3.js → shared-XXW1oBnj.js} +15 -13
- package/dist/chunks/{shared-QJPpnJIO.js → shared-gytWODMC.js} +2 -2
- package/dist/chunks/shared-k9bZPE_p.js +49 -0
- package/dist/components.js +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/delegation-poker.js +1 -1
- package/dist/templates/event-storming.js +1 -1
- package/dist/templates/example-mapping.js +1 -1
- package/dist/templates/plain.js +1 -1
- package/dist/templates/prototype.js +1 -1
- package/dist/templates/slides.js +1 -1
- package/dist/templates/task-board.js +1 -1
- package/dist/templates/usm.js +1 -1
- package/dist/templates/whiteboard.js +1 -1
- package/package.json +1 -2
- package/dist/chunks/shared-B9XMvOh-.js +0 -1027
- package/dist/chunks/shared-BnGxP2qu.js +0 -2560
- package/dist/chunks/shared-CLSKGVCT.js +0 -572
- package/dist/chunks/shared-CjhDJ2vV.js +0 -2766
- package/dist/chunks/shared-CtHWU02m.js +0 -1
- package/dist/chunks/shared-D4K7KsfJ.js +0 -1
- package/dist/chunks/shared-DdefS1nG.js +0 -1
- package/dist/chunks/shared-DmOHk6B_.js +0 -3457
- package/dist/chunks/shared-OIF3QVAa.js +0 -30
- package/dist/chunks/shared-ml5h7U5L.js +0 -1
- package/dist/templates/grill.js +0 -1
|
@@ -0,0 +1,3720 @@
|
|
|
1
|
+
const At=globalThis,vn=At.ShadowRoot&&(At.ShadyCSS===void 0||At.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,xn=Symbol(),Gs=new WeakMap;let Vs=class{constructor(e,n,s){if(this._$cssResult$=!0,s!==xn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(vn&&e===void 0){const s=n!==void 0&&n.length===1;s&&(e=Gs.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Gs.set(n,e))}return e}toString(){return this.cssText}};const Ks=t=>new Vs(typeof t=="string"?t:t+"",void 0,xn),ue=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((s,r,i)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[i+1],t[0]);return new Vs(n,t,xn)},Ra=(t,e)=>{if(vn)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const s=document.createElement("style"),r=At.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=n.cssText,t.appendChild(s)}},Qs=vn?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const s of e.cssRules)n+=s.cssText;return Ks(n)})(t):t,{is:_a,defineProperty:Oa,getOwnPropertyDescriptor:La,getOwnPropertyNames:Pa,getOwnPropertySymbols:za,getPrototypeOf:Ma}=Object,Ct=globalThis,Zs=Ct.trustedTypes,Ia=Zs?Zs.emptyScript:"",Na=Ct.reactiveElementPolyfillSupport,et=(t,e)=>t,yn={toAttribute(t,e){switch(e){case Boolean:t=t?Ia:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},Ys=(t,e)=>!_a(t,e),Js={attribute:!0,type:String,converter:yn,reflect:!1,useDefault:!1,hasChanged:Ys};Symbol.metadata??=Symbol("metadata"),Ct.litPropertyMetadata??=new WeakMap;let Be=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=Js){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(e,n),!n.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(e,s,n);r!==void 0&&Oa(this.prototype,e,r)}}static getPropertyDescriptor(e,n,s){const{get:r,set:i}=La(this.prototype,e)??{get(){return this[n]},set(o){this[n]=o}};return{get:r,set(o){const a=r?.call(this);i?.call(this,o),this.requestUpdate(e,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Js}static _$Ei(){if(this.hasOwnProperty(et("elementProperties")))return;const e=Ma(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(et("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(et("properties"))){const n=this.properties,s=[...Pa(n),...za(n)];for(const r of s)this.createProperty(r,n[r])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[s,r]of n)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[n,s]of this.elementProperties){const r=this._$Eu(n,s);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const r of s)n.unshift(Qs(r))}else e!==void 0&&n.push(Qs(e));return n}static _$Eu(e,n){const s=n.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const s of n.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ra(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,n,s){this._$AK(e,s)}_$ET(e,n){const s=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,s);if(r!==void 0&&s.reflect===!0){const i=(s.converter?.toAttribute!==void 0?s.converter:yn).toAttribute(n,s.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,n){const s=this.constructor,r=s._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const i=s.getPropertyOptions(r),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:yn;this._$Em=r;const a=o.fromAttribute(n,i.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,n,s,r=!1,i){if(e!==void 0){const o=this.constructor;if(r===!1&&(i=this[e]),s??=o.getPropertyOptions(e),!((s.hasChanged??Ys)(i,n)||s.useDefault&&s.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,s))))return;this.C(e,n,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,n,{useDefault:s,reflect:r,wrapped:i},o){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??n??this[e]),i!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(n=void 0),this._$AL.set(e,n)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,i]of s){const{wrapped:o}=i,a=this[r];o!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,i,a)}}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(n)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(n)}willUpdate(e){}_$AE(e){this._$EO?.forEach(n=>n.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(n=>this._$ET(n,this[n])),this._$EM()}updated(e){}firstUpdated(e){}};Be.elementStyles=[],Be.shadowRootOptions={mode:"open"},Be[et("elementProperties")]=new Map,Be[et("finalized")]=new Map,Na?.({ReactiveElement:Be}),(Ct.reactiveElementVersions??=[]).push("2.1.2");const wn=globalThis,Xs=t=>t,Tt=wn.trustedTypes,er=Tt?Tt.createPolicy("lit-html",{createHTML:t=>t}):void 0,tr="$lit$",fe=`lit$${Math.random().toFixed(9).slice(2)}$`,nr="?"+fe,Da=`<${nr}>`,Se=document,tt=()=>Se.createComment(""),nt=t=>t===null||typeof t!="object"&&typeof t!="function",$n=Array.isArray,ja=t=>$n(t)||typeof t?.[Symbol.iterator]=="function",Sn=`[
|
|
2
|
+
\f\r]`,st=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,sr=/-->/g,rr=/>/g,Ae=RegExp(`>|${Sn}(?:([^\\s"'>=/]+)(${Sn}*=${Sn}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ir=/'/g,or=/"/g,ar=/^(?:script|style|textarea|title)$/i,lr=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),m=lr(1),qa=lr(2),K=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),cr=new WeakMap,Ce=Se.createTreeWalker(Se,129);function dr(t,e){if(!$n(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return er!==void 0?er.createHTML(e):e}const Ba=(t,e)=>{const n=t.length-1,s=[];let r,i=e===2?"<svg>":e===3?"<math>":"",o=st;for(let a=0;a<n;a++){const l=t[a];let d,c,p=-1,u=0;for(;u<l.length&&(o.lastIndex=u,c=o.exec(l),c!==null);)u=o.lastIndex,o===st?c[1]==="!--"?o=sr:c[1]!==void 0?o=rr:c[2]!==void 0?(ar.test(c[2])&&(r=RegExp("</"+c[2],"g")),o=Ae):c[3]!==void 0&&(o=Ae):o===Ae?c[0]===">"?(o=r??st,p=-1):c[1]===void 0?p=-2:(p=o.lastIndex-c[2].length,d=c[1],o=c[3]===void 0?Ae:c[3]==='"'?or:ir):o===or||o===ir?o=Ae:o===sr||o===rr?o=st:(o=Ae,r=void 0);const h=o===Ae&&t[a+1].startsWith("/>")?" ":"";i+=o===st?l+Da:p>=0?(s.push(d),l.slice(0,p)+tr+l.slice(p)+fe+h):l+fe+(p===-2?a:h)}return[dr(t,i+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let An=class Ca{constructor({strings:e,_$litType$:n},s){let r;this.parts=[];let i=0,o=0;const a=e.length-1,l=this.parts,[d,c]=Ba(e,n);if(this.el=Ca.createElement(d,s),Ce.currentNode=this.el.content,n===2||n===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=Ce.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const p of r.getAttributeNames())if(p.endsWith(tr)){const u=c[o++],h=r.getAttribute(p).split(fe),f=/([.?@])?(.*)/.exec(u);l.push({type:1,index:i,name:f[2],strings:h,ctor:f[1]==="."?Ua:f[1]==="?"?Fa:f[1]==="@"?Wa:Rt}),r.removeAttribute(p)}else p.startsWith(fe)&&(l.push({type:6,index:i}),r.removeAttribute(p));if(ar.test(r.tagName)){const p=r.textContent.split(fe),u=p.length-1;if(u>0){r.textContent=Tt?Tt.emptyScript:"";for(let h=0;h<u;h++)r.append(p[h],tt()),Ce.nextNode(),l.push({type:2,index:++i});r.append(p[u],tt())}}}else if(r.nodeType===8)if(r.data===nr)l.push({type:2,index:i});else{let p=-1;for(;(p=r.data.indexOf(fe,p+1))!==-1;)l.push({type:7,index:i}),p+=fe.length-1}i++}}static createElement(e,n){const s=Se.createElement("template");return s.innerHTML=e,s}};function He(t,e,n=t,s){if(e===K)return e;let r=s!==void 0?n._$Co?.[s]:n._$Cl;const i=nt(e)?void 0:e._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(t),r._$AT(t,n,s)),s!==void 0?(n._$Co??=[])[s]=r:n._$Cl=r),r!==void 0&&(e=He(t,r._$AS(t,e.values),r,s)),e}let Ha=class{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:n},parts:s}=this._$AD,r=(e?.creationScope??Se).importNode(n,!0);Ce.currentNode=r;let i=Ce.nextNode(),o=0,a=0,l=s[0];for(;l!==void 0;){if(o===l.index){let d;l.type===2?d=new Et(i,i.nextSibling,this,e):l.type===1?d=new l.ctor(i,l.name,l.strings,this,e):l.type===6&&(d=new Ga(i,this,e)),this._$AV.push(d),l=s[++a]}o!==l?.index&&(i=Ce.nextNode(),o++)}return Ce.currentNode=Se,r}p(e){let n=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,n),n+=s.strings.length-2):s._$AI(e[n])),n++}},Et=class Ta{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,n,s,r){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&e?.nodeType===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=He(this,e,n),nt(e)?e===k||e==null||e===""?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==K&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):ja(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==k&&nt(this._$AH)?this._$AA.nextSibling.data=e:this.T(Se.createTextNode(e)),this._$AH=e}$(e){const{values:n,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=An.createElement(dr(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(n);else{const i=new Ha(r,this),o=i.u(this.options);i.p(n),this.T(o),this._$AH=i}}_$AC(e){let n=cr.get(e.strings);return n===void 0&&cr.set(e.strings,n=new An(e)),n}k(e){$n(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let s,r=0;for(const i of e)r===n.length?n.push(s=new Ta(this.O(tt()),this.O(tt()),this,this.options)):s=n[r],s._$AI(i),r++;r<n.length&&(this._$AR(s&&s._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);e!==this._$AB;){const s=Xs(e).nextSibling;Xs(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}};class Rt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,s,r,i){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=k}_$AI(e,n=this,s,r){const i=this.strings;let o=!1;if(i===void 0)e=He(this,e,n,0),o=!nt(e)||e!==this._$AH&&e!==K,o&&(this._$AH=e);else{const a=e;let l,d;for(e=i[0],l=0;l<i.length-1;l++)d=He(this,a[s+l],n,l),d===K&&(d=this._$AH[l]),o||=!nt(d)||d!==this._$AH[l],d===k?e=k:e!==k&&(e+=(d??"")+i[l+1]),this._$AH[l]=d}o&&!r&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}let Ua=class extends Rt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},Fa=class extends Rt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},Wa=class extends Rt{constructor(e,n,s,r,i){super(e,n,s,r,i),this.type=5}_$AI(e,n=this){if((e=He(this,e,n,0)??k)===K)return;const s=this._$AH,r=e===k&&s!==k||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,i=e!==k&&(s===k||r);r&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}};class Ga{constructor(e,n,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){He(this,e)}}const Va={I:Et},Ka=wn.litHtmlPolyfillSupport;Ka?.(An,Et),(wn.litHtmlVersions??=[]).push("3.3.3");const Qa=(t,e,n)=>{const s=n?.renderBefore??e;let r=s._$litPart$;if(r===void 0){const i=n?.renderBefore??null;s._$litPart$=r=new Et(e.insertBefore(tt(),i),i,void 0,n??{})}return r._$AI(t),r},Cn=globalThis;let ge=class extends Be{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Qa(n,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return K}};ge._$litElement$=!0,ge.finalized=!0,Cn.litElementHydrateSupport?.({LitElement:ge});const Za=Cn.litElementPolyfillSupport;Za?.({LitElement:ge}),(Cn.litElementVersions??=[]).push("4.2.2");const me={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},rt=t=>(...e)=>({_$litDirective$:t,values:e});let _t=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,s){this._$Ct=e,this._$AM=n,this._$Ci=s}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}};const{I:Ya}=Va,pr=t=>t,Ja=t=>t.strings===void 0,hr=()=>document.createComment(""),it=(t,e,n)=>{const s=t._$AA.parentNode,r=e===void 0?t._$AB:e._$AA;if(n===void 0){const i=s.insertBefore(hr(),r),o=s.insertBefore(hr(),r);n=new Ya(i,o,t,t.options)}else{const i=n._$AB.nextSibling,o=n._$AM,a=o!==t;if(a){let l;n._$AQ?.(t),n._$AM=t,n._$AP!==void 0&&(l=t._$AU)!==o._$AU&&n._$AP(l)}if(i!==r||a){let l=n._$AA;for(;l!==i;){const d=pr(l).nextSibling;pr(s).insertBefore(l,r),l=d}}}return n},Te=(t,e,n=t)=>(t._$AI(e,n),t),Xa={},Tn=(t,e=Xa)=>t._$AH=e,el=t=>t._$AH,En=t=>{t._$AR(),t._$AA.remove()},Rn=rt(class extends _t{constructor(t){if(super(t),t.type!==me.PROPERTY&&t.type!==me.ATTRIBUTE&&t.type!==me.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Ja(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===K||e===k)return e;const n=t.element,s=t.name;if(t.type===me.PROPERTY){if(e===n[s])return K}else if(t.type===me.BOOLEAN_ATTRIBUTE){if(!!e===n.hasAttribute(s))return K}else if(t.type===me.ATTRIBUTE&&n.getAttribute(s)===e+"")return K;return Tn(t),e}});class Ot extends _t{constructor(e){if(super(e),this.it=k,e.type!==me.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===k||e==null)return this._t=void 0,this.it=e;if(e===K)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const n=[e];return n.raw=n,this._t={_$litType$:this.constructor.resultType,strings:n,values:[]}}}Ot.directiveName="unsafeHTML",Ot.resultType=1;const ur=rt(Ot),Lt=t=>{let e=t;for(;e!==null;){if(e instanceof Element){const n=e.getAttribute("lang");if(n!==null)return n}e=e instanceof ShadowRoot?e.host:e.parentNode}return null},_n=["en","ja"],fr="en",gr=t=>_n.some(e=>e===t),Pt=t=>{const e=(t??"").split("-")[0]?.toLowerCase()??"";return gr(e)?e:fr},mr=t=>Pt(Lt(t)),On="dpk-locale-change",kr=t=>typeof t=="string"&&gr(t)?t:null,tl=t=>t.preference??t.authored,nl=(t,e)=>t===e?null:t,zt=t=>e=>e==="ja"?t.ja:t.en;class Ln{#e;#t;#n=fr;constructor(e,n=()=>{}){this.#e=e,this.#t=n,e.addController(this)}get locale(){return this.#n}hostConnected(){this.#n=mr(this.#e),document.addEventListener(On,this.#r)}hostDisconnected(){document.removeEventListener(On,this.#r)}#r=()=>{const e=mr(this.#e);e!==this.#n&&(this.#n=e,this.#t(),this.#e.requestUpdate())}}const sl={paper:["#f6f7f9","#0e1014"],"paper-raised":["#ffffff","#171a20"],"paper-sunken":["#eff1f4","#0a0b0e"],"paper-inset":["#e7eaef","#22262e"],ink:["#11141b","#eceef3"],"ink-soft":["#464e5f","#a9b0bd"],"ink-faint":["#788195","#737b8b"],rule:["rgba(17, 24, 39, 0.08)","rgba(226, 232, 244, 0.08)"],"rule-strong":["rgba(17, 24, 39, 0.13)","rgba(226, 232, 244, 0.14)"],"rule-hover":["rgba(17, 24, 39, 0.24)","rgba(226, 232, 244, 0.26)"],accent:["#e04e1f","#f26a3d"],"accent-strong":["#c63f12","#dc5226"],"accent-bright":["#f0652f","#ff8a5e"],"accent-soft":["rgba(224, 78, 31, 0.08)","rgba(242, 106, 61, 0.14)"],"accent-ink":["#ffffff","#ffffff"],blue:["#3563d9","#7aa2f7"],"blue-strong":["#2a4fb3","#5b86e8"],"blue-soft":["rgba(53, 99, 217, 0.09)","rgba(122, 162, 247, 0.15)"],green:["#15894a","#4cc787"],"green-soft":["rgba(21, 137, 74, 0.09)","rgba(76, 199, 135, 0.14)"],amber:["#b27406","#e9ae45"],"amber-soft":["rgba(178, 116, 6, 0.1)","rgba(233, 174, 69, 0.15)"],violet:["#7549d6","#ab90f5"],"violet-soft":["rgba(117, 73, 214, 0.09)","rgba(171, 144, 245, 0.15)"],danger:["#c11d38","#f5707f"],"danger-soft":["rgba(214, 53, 80, 0.09)","rgba(245, 112, 127, 0.14)"],shade:["rgb(17, 24, 39)","rgb(0, 0, 0)"],"shade-1":["rgba(17, 24, 39, 0.06)","rgba(0, 0, 0, 0.32)"],"shade-2":["rgba(17, 24, 39, 0.08)","rgba(0, 0, 0, 0.38)"],"shade-3":["rgba(17, 24, 39, 0.13)","rgba(0, 0, 0, 0.5)"],highlight:["rgba(255, 255, 255, 0.9)","rgba(255, 255, 255, 0.05)"]},br=t=>Ks(Object.entries(sl).map(([e,[n,s]])=>`--dpk-${e}: ${t(n,s)};`).join(`
|
|
4
|
+
`)),Mt=ue`
|
|
5
|
+
:host {
|
|
6
|
+
/* Browsers without light-dark() stay light. */
|
|
7
|
+
${br(t=>t)}
|
|
8
|
+
--dpk-display: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
9
|
+
--dpk-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
10
|
+
--dpk-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
|
|
11
|
+
|
|
12
|
+
/* Shape + elevation scale, so every surface reads as one system. */
|
|
13
|
+
--dpk-radius-xs: 6px;
|
|
14
|
+
--dpk-radius-sm: 8px;
|
|
15
|
+
--dpk-radius: 10px;
|
|
16
|
+
--dpk-radius-lg: 14px;
|
|
17
|
+
--dpk-radius-xl: 20px;
|
|
18
|
+
--dpk-bevel: inset 0 1px 0 var(--dpk-highlight);
|
|
19
|
+
--dpk-shadow-xs: 0 1px 2px var(--dpk-shade-1);
|
|
20
|
+
--dpk-shadow-sm: 0 1px 2px var(--dpk-shade-1), 0 3px 8px -2px var(--dpk-shade-2);
|
|
21
|
+
--dpk-shadow:
|
|
22
|
+
0 1px 2px var(--dpk-shade-1), 0 6px 16px -4px var(--dpk-shade-2), 0 14px 32px -12px var(--dpk-shade-3);
|
|
23
|
+
--dpk-shadow-lg:
|
|
24
|
+
0 2px 4px var(--dpk-shade-1), 0 12px 28px -6px var(--dpk-shade-2), 0 32px 64px -20px var(--dpk-shade-3);
|
|
25
|
+
--dpk-focus: 0 0 0 1px var(--dpk-paper-raised), 0 0 0 3.5px color-mix(in srgb, var(--dpk-blue) 45%, transparent);
|
|
26
|
+
--dpk-control-h: 32px;
|
|
27
|
+
--dpk-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
|
|
28
|
+
--dpk-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
29
|
+
/* Frosted chrome: headers and toolbars that float over scrolling content. */
|
|
30
|
+
--dpk-glass: color-mix(in srgb, var(--dpk-paper-raised) 78%, transparent);
|
|
31
|
+
/* Working surface behind boards and canvases: a quiet dot lattice. */
|
|
32
|
+
--dpk-dots: radial-gradient(circle at 1px 1px, var(--dpk-rule-strong) 1px, transparent 0) 0 0 / 20px 20px;
|
|
33
|
+
|
|
34
|
+
color: var(--dpk-ink);
|
|
35
|
+
font-family: var(--dpk-body);
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
line-height: 1.5;
|
|
38
|
+
-webkit-font-smoothing: antialiased;
|
|
39
|
+
text-rendering: optimizeLegibility;
|
|
40
|
+
display: block;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@supports (color: light-dark(#000, #fff)) {
|
|
44
|
+
:host {
|
|
45
|
+
${br((t,e)=>`light-dark(${t}, ${e})`)}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
*,
|
|
50
|
+
*::before,
|
|
51
|
+
*::after {
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
h1,
|
|
56
|
+
h2,
|
|
57
|
+
h3,
|
|
58
|
+
h4 {
|
|
59
|
+
font-family: var(--dpk-display);
|
|
60
|
+
font-weight: 660;
|
|
61
|
+
margin: 0;
|
|
62
|
+
line-height: 1.2;
|
|
63
|
+
letter-spacing: -0.015em;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
button {
|
|
67
|
+
font: inherit;
|
|
68
|
+
color: inherit;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
::selection {
|
|
72
|
+
background: color-mix(in srgb, var(--dpk-blue) 22%, transparent);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.dpk-mono,
|
|
76
|
+
.dpk-num {
|
|
77
|
+
font-variant-numeric: tabular-nums;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.dpk-label {
|
|
81
|
+
font-family: var(--dpk-mono);
|
|
82
|
+
font-size: 10px;
|
|
83
|
+
font-weight: 550;
|
|
84
|
+
letter-spacing: 0.1em;
|
|
85
|
+
text-transform: uppercase;
|
|
86
|
+
color: var(--dpk-ink-faint);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (prefers-reduced-motion: reduce) {
|
|
90
|
+
*,
|
|
91
|
+
*::before,
|
|
92
|
+
*::after {
|
|
93
|
+
animation-duration: 1ms !important;
|
|
94
|
+
animation-iteration-count: 1 !important;
|
|
95
|
+
transition-duration: 1ms !important;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
`,Pn=ue`
|
|
99
|
+
.dpk-btn {
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
gap: 6px;
|
|
104
|
+
min-height: 30px;
|
|
105
|
+
padding: 0 12px;
|
|
106
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
107
|
+
border-radius: var(--dpk-radius-sm);
|
|
108
|
+
background: var(--dpk-paper-raised);
|
|
109
|
+
color: var(--dpk-ink);
|
|
110
|
+
font-size: 12.5px;
|
|
111
|
+
font-weight: 550;
|
|
112
|
+
line-height: 1;
|
|
113
|
+
white-space: nowrap;
|
|
114
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
transition:
|
|
117
|
+
background 160ms var(--dpk-ease),
|
|
118
|
+
border-color 160ms var(--dpk-ease),
|
|
119
|
+
box-shadow 160ms var(--dpk-ease),
|
|
120
|
+
color 160ms var(--dpk-ease),
|
|
121
|
+
transform 120ms var(--dpk-ease);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.dpk-btn:hover:not([disabled]) {
|
|
125
|
+
border-color: var(--dpk-rule-hover);
|
|
126
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.dpk-btn:active:not([disabled]) {
|
|
130
|
+
transform: translateY(1px) scale(0.985);
|
|
131
|
+
box-shadow: none;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.dpk-btn:focus-visible {
|
|
135
|
+
outline: none;
|
|
136
|
+
box-shadow: var(--dpk-focus);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.dpk-btn[disabled] {
|
|
140
|
+
opacity: 0.45;
|
|
141
|
+
box-shadow: none;
|
|
142
|
+
cursor: not-allowed;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.dpk-btn--accent {
|
|
146
|
+
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
147
|
+
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent) 55%, var(--dpk-accent-strong));
|
|
148
|
+
color: var(--dpk-accent-ink);
|
|
149
|
+
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
|
|
150
|
+
box-shadow:
|
|
151
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.22),
|
|
152
|
+
0 1px 2px color-mix(in srgb, var(--dpk-accent) 30%, transparent),
|
|
153
|
+
0 4px 12px -4px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.dpk-btn--accent:hover:not([disabled]) {
|
|
157
|
+
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
158
|
+
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent-bright) 40%, var(--dpk-accent));
|
|
159
|
+
box-shadow:
|
|
160
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
161
|
+
0 2px 4px color-mix(in srgb, var(--dpk-accent) 30%, transparent),
|
|
162
|
+
0 8px 20px -6px color-mix(in srgb, var(--dpk-accent) 65%, transparent);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Selection state, shared by every template's filter/nav controls. */
|
|
166
|
+
.dpk-btn--selected {
|
|
167
|
+
border-color: color-mix(in srgb, var(--dpk-blue-strong) 70%, transparent);
|
|
168
|
+
background: linear-gradient(180deg, var(--dpk-blue), var(--dpk-blue-strong));
|
|
169
|
+
color: #fff;
|
|
170
|
+
box-shadow:
|
|
171
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.2),
|
|
172
|
+
0 2px 8px -2px color-mix(in srgb, var(--dpk-blue) 60%, transparent);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.dpk-btn--selected:hover:not([disabled]) {
|
|
176
|
+
border-color: color-mix(in srgb, var(--dpk-blue-strong) 70%, transparent);
|
|
177
|
+
background: linear-gradient(180deg, var(--dpk-blue), var(--dpk-blue));
|
|
178
|
+
box-shadow:
|
|
179
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.22),
|
|
180
|
+
0 4px 12px -3px color-mix(in srgb, var(--dpk-blue) 65%, transparent);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.dpk-btn--ghost {
|
|
184
|
+
border-color: transparent;
|
|
185
|
+
background: transparent;
|
|
186
|
+
box-shadow: none;
|
|
187
|
+
color: var(--dpk-ink-soft);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.dpk-btn--ghost:hover:not([disabled]) {
|
|
191
|
+
background: var(--dpk-paper-inset);
|
|
192
|
+
border-color: transparent;
|
|
193
|
+
box-shadow: none;
|
|
194
|
+
color: var(--dpk-ink);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.dpk-icon-btn {
|
|
198
|
+
position: relative;
|
|
199
|
+
display: inline-flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
justify-content: center;
|
|
202
|
+
width: 26px;
|
|
203
|
+
height: 26px;
|
|
204
|
+
padding: 0;
|
|
205
|
+
border: 1px solid transparent;
|
|
206
|
+
border-radius: var(--dpk-radius-xs);
|
|
207
|
+
background: transparent;
|
|
208
|
+
color: var(--dpk-ink-faint);
|
|
209
|
+
font-size: 11px;
|
|
210
|
+
line-height: 1;
|
|
211
|
+
cursor: pointer;
|
|
212
|
+
transition:
|
|
213
|
+
background 160ms var(--dpk-ease),
|
|
214
|
+
color 160ms var(--dpk-ease),
|
|
215
|
+
transform 160ms var(--dpk-ease-spring);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.dpk-icon-btn:hover:not([disabled]) {
|
|
219
|
+
background: var(--dpk-paper-inset);
|
|
220
|
+
color: var(--dpk-ink);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.dpk-icon-btn:active:not([disabled]) {
|
|
224
|
+
transform: scale(0.92);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.dpk-icon-btn:focus-visible {
|
|
228
|
+
outline: none;
|
|
229
|
+
box-shadow: var(--dpk-focus);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.dpk-icon-btn[disabled] {
|
|
233
|
+
opacity: 0.35;
|
|
234
|
+
cursor: default;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.dpk-icon-btn[data-active='true'] {
|
|
238
|
+
background: var(--dpk-blue-soft);
|
|
239
|
+
color: var(--dpk-blue);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.dpk-icon-btn svg {
|
|
243
|
+
display: block;
|
|
244
|
+
width: 15px;
|
|
245
|
+
height: 15px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* Count badge for an icon-only control (comments on a card, drafts on the rail). */
|
|
249
|
+
.dpk-icon-badge {
|
|
250
|
+
position: absolute;
|
|
251
|
+
top: -5px;
|
|
252
|
+
right: -5px;
|
|
253
|
+
min-width: 16px;
|
|
254
|
+
height: 16px;
|
|
255
|
+
padding: 0 4px;
|
|
256
|
+
border: 1.5px solid var(--dpk-paper-raised);
|
|
257
|
+
border-radius: 999px;
|
|
258
|
+
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
259
|
+
color: var(--dpk-accent-ink);
|
|
260
|
+
font-family: var(--dpk-mono);
|
|
261
|
+
font-size: 9px;
|
|
262
|
+
font-weight: 650;
|
|
263
|
+
font-variant-numeric: tabular-nums;
|
|
264
|
+
line-height: 13px;
|
|
265
|
+
text-align: center;
|
|
266
|
+
box-shadow: 0 2px 6px -1px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
267
|
+
animation: dpk-pop 260ms var(--dpk-ease-spring);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@keyframes dpk-pop {
|
|
271
|
+
from {
|
|
272
|
+
transform: scale(0.4);
|
|
273
|
+
opacity: 0;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.dpk-input,
|
|
278
|
+
.dpk-textarea,
|
|
279
|
+
.dpk-select {
|
|
280
|
+
box-sizing: border-box;
|
|
281
|
+
width: 100%;
|
|
282
|
+
min-height: var(--dpk-control-h);
|
|
283
|
+
padding: 6px 10px;
|
|
284
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
285
|
+
border-radius: var(--dpk-radius-sm);
|
|
286
|
+
background: var(--dpk-paper-raised);
|
|
287
|
+
color: var(--dpk-ink);
|
|
288
|
+
font: inherit;
|
|
289
|
+
font-size: 12.5px;
|
|
290
|
+
box-shadow: inset 0 1px 2px var(--dpk-shade-1);
|
|
291
|
+
transition:
|
|
292
|
+
border-color 160ms var(--dpk-ease),
|
|
293
|
+
box-shadow 160ms var(--dpk-ease),
|
|
294
|
+
background 160ms var(--dpk-ease);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.dpk-input::placeholder,
|
|
298
|
+
.dpk-textarea::placeholder {
|
|
299
|
+
color: var(--dpk-ink-faint);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.dpk-input:hover,
|
|
303
|
+
.dpk-textarea:hover,
|
|
304
|
+
.dpk-select:hover {
|
|
305
|
+
border-color: var(--dpk-rule-hover);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.dpk-input:focus,
|
|
309
|
+
.dpk-textarea:focus,
|
|
310
|
+
.dpk-select:focus {
|
|
311
|
+
outline: none;
|
|
312
|
+
border-color: var(--dpk-blue);
|
|
313
|
+
box-shadow: var(--dpk-focus);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.dpk-select {
|
|
317
|
+
appearance: none;
|
|
318
|
+
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23878e9e' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
|
|
319
|
+
background-repeat: no-repeat;
|
|
320
|
+
background-position: right 8px center;
|
|
321
|
+
padding-right: 28px;
|
|
322
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
323
|
+
cursor: pointer;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.dpk-textarea {
|
|
327
|
+
resize: vertical;
|
|
328
|
+
min-height: 64px;
|
|
329
|
+
line-height: 1.55;
|
|
330
|
+
}
|
|
331
|
+
`,rl=ue`
|
|
332
|
+
.comment-pop {
|
|
333
|
+
box-sizing: border-box;
|
|
334
|
+
overflow: auto;
|
|
335
|
+
position: fixed;
|
|
336
|
+
inset: auto;
|
|
337
|
+
margin: 0;
|
|
338
|
+
display: grid;
|
|
339
|
+
/* One column as wide as the surface: a long label wraps or ellipsizes instead of widening it. */
|
|
340
|
+
grid-template-columns: minmax(0, 1fr);
|
|
341
|
+
gap: 10px;
|
|
342
|
+
padding: 14px;
|
|
343
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
344
|
+
border-radius: var(--dpk-radius-lg);
|
|
345
|
+
background: var(--dpk-paper-raised);
|
|
346
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
347
|
+
color: var(--dpk-ink);
|
|
348
|
+
font-size: 12.5px;
|
|
349
|
+
animation: dpk-pop-in 180ms var(--dpk-ease);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
@keyframes dpk-pop-in {
|
|
353
|
+
from {
|
|
354
|
+
opacity: 0;
|
|
355
|
+
transform: translateY(4px) scale(0.98);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.comment-pop .comment-target {
|
|
360
|
+
overflow-wrap: anywhere;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.comment-pop .comment-list {
|
|
364
|
+
list-style: none;
|
|
365
|
+
margin: 0;
|
|
366
|
+
padding: 0;
|
|
367
|
+
display: grid;
|
|
368
|
+
gap: 6px;
|
|
369
|
+
max-height: 140px;
|
|
370
|
+
overflow: auto;
|
|
371
|
+
font-size: 12px;
|
|
372
|
+
color: var(--dpk-ink-soft);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.comment-pop .comment-list li {
|
|
376
|
+
padding: 6px 10px;
|
|
377
|
+
border-radius: var(--dpk-radius-xs);
|
|
378
|
+
background: var(--dpk-accent-soft);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.comment-pop .dpk-textarea {
|
|
382
|
+
min-height: 54px;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/* What kind of comment: a segmented control over native radios. */
|
|
386
|
+
.comment-kinds {
|
|
387
|
+
display: flex;
|
|
388
|
+
gap: 2px;
|
|
389
|
+
min-width: 0;
|
|
390
|
+
margin: 0;
|
|
391
|
+
padding: 2px;
|
|
392
|
+
border: 1px solid var(--dpk-rule);
|
|
393
|
+
border-radius: var(--dpk-radius-sm);
|
|
394
|
+
background: var(--dpk-paper-sunken);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.comment-kinds legend {
|
|
398
|
+
position: absolute;
|
|
399
|
+
width: 1px;
|
|
400
|
+
height: 1px;
|
|
401
|
+
overflow: hidden;
|
|
402
|
+
clip-path: inset(50%);
|
|
403
|
+
white-space: nowrap;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.comment-kind {
|
|
407
|
+
position: relative;
|
|
408
|
+
flex: 1;
|
|
409
|
+
display: grid;
|
|
410
|
+
place-items: center;
|
|
411
|
+
padding: 4px 8px;
|
|
412
|
+
border-radius: var(--dpk-radius-xs);
|
|
413
|
+
color: var(--dpk-ink-soft);
|
|
414
|
+
font-weight: 550;
|
|
415
|
+
cursor: pointer;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.comment-kind input {
|
|
419
|
+
position: absolute;
|
|
420
|
+
inset: 0;
|
|
421
|
+
margin: 0;
|
|
422
|
+
opacity: 0;
|
|
423
|
+
cursor: pointer;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.comment-kind:has(input:checked) {
|
|
427
|
+
background: var(--dpk-paper-raised);
|
|
428
|
+
color: var(--dpk-ink);
|
|
429
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.comment-kind:has(input:focus-visible) {
|
|
433
|
+
outline: 2px solid var(--dpk-accent);
|
|
434
|
+
outline-offset: 1px;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.comment-kind-hint {
|
|
438
|
+
margin: -4px 0 0;
|
|
439
|
+
color: var(--dpk-ink-faint);
|
|
440
|
+
font-size: 11.5px;
|
|
441
|
+
line-height: 1.45;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.pop-actions {
|
|
445
|
+
display: flex;
|
|
446
|
+
gap: 4px;
|
|
447
|
+
align-items: center;
|
|
448
|
+
justify-content: flex-end;
|
|
449
|
+
}
|
|
450
|
+
`,vr=ue`
|
|
451
|
+
.dpk-prose {
|
|
452
|
+
overflow-wrap: anywhere;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.dpk-prose > :first-child {
|
|
456
|
+
margin-top: 0;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.dpk-prose > :last-child {
|
|
460
|
+
margin-bottom: 0;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.dpk-prose :is(p, ul, ol, pre, blockquote, table) {
|
|
464
|
+
margin: 0 0 0.6em;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.dpk-prose :is(h1, h2, h3, h4, h5, h6) {
|
|
468
|
+
margin: 0.8em 0 0.3em;
|
|
469
|
+
font-size: 1em;
|
|
470
|
+
font-weight: 650;
|
|
471
|
+
line-height: 1.4;
|
|
472
|
+
color: var(--dpk-ink);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.dpk-prose :is(ul, ol) {
|
|
476
|
+
padding-left: 1.3em;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.dpk-prose li + li {
|
|
480
|
+
margin-top: 0.15em;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/* A task list item: its checkbox is the marker, so it has no bullet of its own. */
|
|
484
|
+
.dpk-prose li:has(> input[type='checkbox']:first-child) {
|
|
485
|
+
margin-left: -1.3em;
|
|
486
|
+
list-style: none;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.dpk-prose li > input[type='checkbox']:first-child {
|
|
490
|
+
margin: 0 0.4em 0 0;
|
|
491
|
+
vertical-align: -0.1em;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.dpk-prose strong {
|
|
495
|
+
font-weight: 650;
|
|
496
|
+
color: var(--dpk-ink);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.dpk-prose a {
|
|
500
|
+
color: var(--dpk-blue);
|
|
501
|
+
text-decoration: underline;
|
|
502
|
+
text-underline-offset: 2px;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.dpk-prose code {
|
|
506
|
+
padding: 0.05em 0.3em;
|
|
507
|
+
border-radius: var(--dpk-radius-xs);
|
|
508
|
+
background: var(--dpk-paper-sunken);
|
|
509
|
+
font-family: var(--dpk-mono);
|
|
510
|
+
font-size: 0.9em;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.dpk-prose pre {
|
|
514
|
+
padding: 8px 10px;
|
|
515
|
+
border-radius: var(--dpk-radius-xs);
|
|
516
|
+
background: var(--dpk-paper-sunken);
|
|
517
|
+
overflow: auto;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.dpk-prose pre code {
|
|
521
|
+
padding: 0;
|
|
522
|
+
background: none;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.dpk-prose blockquote {
|
|
526
|
+
padding: 0.5em 0.8em;
|
|
527
|
+
border-radius: var(--dpk-radius-sm);
|
|
528
|
+
background: var(--dpk-paper-sunken);
|
|
529
|
+
color: var(--dpk-ink-soft);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/* A table wider than its box scrolls on its own instead of being clipped by it. */
|
|
533
|
+
.dpk-prose table {
|
|
534
|
+
display: block;
|
|
535
|
+
max-width: 100%;
|
|
536
|
+
overflow-x: auto;
|
|
537
|
+
border-collapse: collapse;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/* A cell breaks a word only once it runs out of room: the box's 'anywhere' would
|
|
541
|
+
let the table shrink a column to one letter rather than scroll. */
|
|
542
|
+
.dpk-prose :is(th, td) {
|
|
543
|
+
overflow-wrap: break-word;
|
|
544
|
+
padding: 2px 8px;
|
|
545
|
+
border: 1px solid var(--dpk-rule);
|
|
546
|
+
text-align: left;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.dpk-prose hr {
|
|
550
|
+
border: none;
|
|
551
|
+
border-top: 1px solid var(--dpk-rule);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.dpk-prose img {
|
|
555
|
+
max-width: 100%;
|
|
556
|
+
}
|
|
557
|
+
`,Ee=(t,e)=>t instanceof e?t:null;function zn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Re=zn();function xr(t){Re=t}var _e={exec:()=>null};function Ue(t){let e=[];return n=>{let s=Math.max(0,Math.min(3,n-1)),r=e[s];return r||(r=t(s),e[s]=r),r}}function w(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(M.caret,"$1"),n=n.replace(r,o),s},getRegex:()=>new RegExp(n,e)};return s}var il=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),M={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ue(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ue(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ue(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ue(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Ue(t=>new RegExp(`^ {0,${t}}(?:</?(?:${at})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Ue(t=>new RegExp(`^ {0,${t}}>`))},ol=/^(?:[ \t]*(?:\n|$))+/,al=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ll=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ot=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,cl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Mn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,yr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,wr=w(yr).replace(/bull/g,Mn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),dl=w(yr).replace(/bull/g,Mn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),In=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,pl=/^[^\n]+/,Nn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,hl=w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Nn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ul=w(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Mn).getRegex(),at="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Dn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,fl=w("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Dn).replace("tag",at).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$r=t=>w(In).replace("hr",ot).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",at).getRegex(),gl=$r(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),ml=$r(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),kl=w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ml).getRegex(),jn={blockquote:kl,code:al,def:hl,fences:ll,heading:cl,hr:ot,html:fl,lheading:wr,list:ul,newline:ol,paragraph:gl,table:_e,text:pl},Sr=w("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ot).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",at).getRegex(),bl={...jn,lheading:dl,table:Sr,paragraph:w(In).replace("hr",ot).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Sr).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",at).getRegex()},vl={...jn,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Dn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_e,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:w(In).replace("hr",ot).replace("heading",` *#{1,6} *[^
|
|
558
|
+
]`).replace("lheading",wr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},xl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ar=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,wl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ie=/[\p{P}\p{S}]/u,Fe=/[\s\p{P}\p{S}]/u,lt=/[^\s\p{P}\p{S}]/u,$l=w(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fe).getRegex(),Sl=/[\p{Pi}\p{Ps}"']/u,Cr=/(?!~)[\p{P}\p{S}]/u,Al=/(?!~)[\s\p{P}\p{S}]/u,Cl=/(?:[^\s\p{P}\p{S}]|~)/u,Tl=w(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",il?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Tr=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,El=w(Tr,"u").replace(/punct/g,ie).getRegex(),Rl=w(Tr,"u").replace(/punct/g,Cr).getRegex(),_l=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Ol=w(_l,"u").replace(/openQuote/g,Sl).replace(/punct/g,ie).getRegex(),Er="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ll=w(Er,"gu").replace(/notPunctSpace/g,lt).replace(/punctSpace/g,Fe).replace(/punct/g,ie).getRegex(),Pl=w(Er,"gu").replace(/notPunctSpace/g,Cl).replace(/punctSpace/g,Al).replace(/punct/g,Cr).getRegex(),zl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Ml=w(zl,"gu").replace(/notPunctSpace/g,lt).replace(/punctSpace/g,Fe).replace(/punct/g,ie).getRegex(),Il=w("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,lt).replace(/punctSpace/g,Fe).replace(/punct/g,ie).getRegex(),Nl="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Dl=w(Nl,"gu").replace(/notPunctSpace/g,lt).replace(/punctSpace/g,Fe).replace(/punct/g,ie).getRegex(),jl=w(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ie).getRegex(),ql="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Bl=w(ql,"gu").replace(/notPunctSpace/g,lt).replace(/punctSpace/g,Fe).replace(/punct/g,ie).getRegex(),Hl=w(/\\(punct)/,"gu").replace(/punct/g,ie).getRegex(),Ul=w(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Fl=w(Dn).replace("(?:-->|$)","-->").getRegex(),Wl=w("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Fl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Rr=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,It=w(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Rr).getRegex(),Gl=w(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",It).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vl=w(/^!?\[(label)\]\[(ref)\]/).replace("label",It).replace("ref",Nn).getRegex(),Kl=w(/^!?\[(ref)\](?:\[\])?/).replace("ref",Nn).getRegex(),_r=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Ql=w(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Rr).getRegex(),Zl=w("reflink|nolink(?!\\()","g").replace("reflink",w(/^!?\[(label)\]\[(ref)\]/).replace("label",Ql).replace("ref",_r).getRegex()).replace("nolink",w(/^!?\[(ref)\](?:\[\])?/).replace("ref",_r).getRegex()).getRegex(),Or=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Yl=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Jl=w(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Yl).getRegex(),qn={_backpedal:_e,anyPunctuation:Hl,autolink:Ul,blockSkip:Tl,br:Ar,code:yl,del:_e,delLDelim:_e,delRDelim:_e,emStrongLDelim:El,emStrongRDelimAst:Ll,emStrongRDelimUnd:Il,escape:xl,link:Gl,nolink:Kl,punctuation:$l,reflink:Vl,reflinkSearch:Zl,tag:Wl,text:wl,url:_e},Xl={...qn,emStrongLDelim:Ol,emStrongRDelimAst:Ml,emStrongRDelimUnd:Dl,link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",It).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",It).getRegex()},Bn={...qn,emStrongRDelimAst:Pl,emStrongLDelim:Rl,delLDelim:jl,delRDelim:Bl,url:w(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Jl).replace("protocol",Or).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:w(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",Or).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},ec={...Bn,br:w(Ar).replace("{2,}","*").getRegex(),text:w(Bn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Nt={normal:jn,gfm:bl,pedantic:vl},ct={normal:qn,gfm:Bn,breaks:ec,pedantic:Xl},tc={"&":"&","<":"<",">":">",'"':""","'":"'"},Lr=t=>tc[t];function W(t,e){if(e){if(M.escapeTest.test(t))return t.replace(M.escapeReplace,Lr)}else if(M.escapeTestNoEncode.test(t))return t.replace(M.escapeReplaceNoEncode,Lr);return t}function nc(t){return t.replace(M.numericCharacterReference,(e,n,s)=>{let r=n===void 0?Number.parseInt(s,16):Number.parseInt(n,10);return r===0||r>1114111||r>=55296&&r<=57343?"\uFFFD":String.fromCodePoint(r)})}function Pr(t){try{t=encodeURI(t).replace(M.percentDecode,"%")}catch{return null}return t}function zr(t,e){let n=t.replace(M.findPipe,(i,o,a)=>{let l=!1,d=o;for(;--d>=0&&a[d]==="\\";)l=!l;return l?"|":" |"}),s=n.split(M.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(M.slashPipe,"|");return s}function ke(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function Mr(t){let e=t.split(`
|
|
559
|
+
`),n=e.length-1;for(;n>=0&&M.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
|
|
560
|
+
`)}function Dt(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function Ir(t,e){if(t.indexOf(e[0])===-1&&t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function Nr(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function Dr(t,e,n,s,r){let i=e.href,o=e.title||null,a=t[1].replace(r.other.outputLinkReplace,"$1"),l=t[0].charAt(0)==="!";s.state.inLink=!0;let d=s.state.linkEmitted,c=s.state.inRawBlock;s.state.linkEmitted=!1;let p=s.inlineTokens(a),u=s.state.linkEmitted;if(s.state.linkEmitted=d,s.state.inLink=!1,!l){if(u){s.state.inRawBlock=c;return}s.state.linkEmitted=!0}return{type:l?"image":"link",raw:n,href:i,title:o,text:a,tokens:p}}function sc(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
|
|
561
|
+
`).map(i=>{let o=i.match(n.other.beginningSpace);if(o===null)return i;let[a]=o;return i.slice(Math.min(a.length,r.length))}).join(`
|
|
562
|
+
`)}function jr(t,e,n,s){if(!e.includes("<"))return!1;for(let r=0;r<e.length;r++){if(e[r]==="\\"){r++;continue}if(e[r]==="`"){let a=s.inline.code.exec(e.slice(r));if(a){r+=a[0].length-1;continue}}if(e[r]!=="<")continue;let i=t.slice(n+r),o=s.inline.tag.exec(i)||s.inline.autolink.exec(i);if(o){if(o[0].length>e.length-r)return!0;r+=o[0].length-1}}return!1}var jt=class{options;rules;lexer;constructor(t){this.options=t||Re}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=this.options.pedantic?e[0]:Mr(e[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],s=sc(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let s=ke(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceTabChar.test(s))&&(n=s.trim())}return{type:"heading",raw:ke(e[0],`
|
|
563
|
+
`),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:ke(e[0],`
|
|
564
|
+
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=ke(e[0],`
|
|
565
|
+
`).split(`
|
|
566
|
+
`),s="",r="",i=[];for(;n.length>0;){let o=!1,a=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))a.push(n[l]),o=!0;else if(!o)a.push(n[l]);else break;n=n.slice(l);let d=a.join(`
|
|
567
|
+
`),c=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
568
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
569
|
+
${d}`:d,r=r?`${r}
|
|
570
|
+
${c}`:c;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=p,n.length===0)break;let u=i.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let h=u,f=n.join(`
|
|
571
|
+
`),g=h.raw+`
|
|
572
|
+
`+f.replace(this.rules.other.blockquoteSetextReplace2,""),b=this.blockquote(g);i[i.length-1]=b;let x=g.substring(b.raw.length).replace(/^\n/,""),S=x?x.split(`
|
|
573
|
+
`).length:0,A=S?n.slice(0,-S):n;A.length>0&&(s=`${s}
|
|
574
|
+
${A.join(`
|
|
575
|
+
`)}`),r=r.substring(0,r.length-h.text.length)+b.text;break}else if(u?.type==="list"){let h=u,f=h.raw+`
|
|
576
|
+
`+n.join(`
|
|
577
|
+
`),g=this.list(f);i[i.length-1]=g,s=s.substring(0,s.length-u.raw.length)+g.raw,r=r.substring(0,r.length-h.raw.length)+g.raw,n=f.substring(i.at(-1).raw.length).split(`
|
|
578
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let i=this.rules.other.listItemRegex(n),o=!1;for(;t;){let l=!1,d="",c="";if(!(e=i.exec(t))||this.rules.block.hr.test(t))break;d=e[0],t=t.substring(d.length);let p=e[2].split(`
|
|
579
|
+
`,1)[0],u=e[1].length,h=this.options.pedantic?Nr(p,u):p.replace(this.rules.other.leadingSpaceTab,x=>Nr(x,u)),f=t.split(`
|
|
580
|
+
`,1)[0],g=!h.trim(),b=0;if(this.options.pedantic?(b=2,c=h.trimStart()):g?b=u+1:(b=h.search(this.rules.other.nonSpaceChar),b=b>4?1:b,c=h.slice(b),b+=u),g&&this.rules.other.blankLine.test(f)&&(d+=f+`
|
|
581
|
+
`,t=t.substring(f.length+1),l=!0),!l){let x=this.rules.other.nextBulletRegex(b),S=this.rules.other.hrRegex(b),A=this.rules.other.fencesBeginRegex(b),_=this.rules.other.headingBeginRegex(b),H=this.rules.other.htmlBeginRegex(b),L=this.rules.other.blockquoteBeginRegex(b);for(;t;){let V=t.split(`
|
|
582
|
+
`,1)[0],q;if(f=V,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),q=f):q=f.replace(this.rules.other.leadingSpaceTab,re=>re.replace(this.rules.other.tabCharGlobal," ")),A.test(f)||_.test(f)||H.test(f)||L.test(f)||x.test(f)||S.test(f))break;if(q.search(this.rules.other.nonSpaceChar)>=b||!f.trim())c+=`
|
|
583
|
+
`+q.slice(b);else{if(g||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(h)||_.test(h)||S.test(h))break;c+=`
|
|
584
|
+
`+f}g=!f.trim(),d+=V+`
|
|
585
|
+
`,t=t.substring(V.length+1),h=q.slice(b)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(o=!0)),r.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),r.raw+=d}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l of r.items)if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),!r.loose){let d=l.tokens.filter(p=>p.type==="space"),c=d.length>0&&d.some(p=>this.rules.other.anyLine.test(p.raw));r.loose=c}for(let l of r.items){let d=l.tokens[0];if(l.task&&(d?.type==="text"||d?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),d.raw=d.raw.replace(this.rules.other.listReplaceTask,""),d.text=d.text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}let c=this.rules.other.listTaskCheckbox.exec(l.raw);if(c){let p={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};l.checked=p.checked,r.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=p.raw+l.tokens[0].raw,l.tokens[0].text=p.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(p)):l.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):l.tokens.unshift(p)}}else l.task&&(l.task=!1)}if(r.loose)for(let l of r.items){l.loose=!0;for(let d of l.tokens)d.type==="text"&&(d.type="paragraph")}return r}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=Mr(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Ir(e[2],"()")!==-1)return;let n=Dt(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:ke(e[0],`
|
|
586
|
+
`),href:s,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=zr(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
587
|
+
`):[],i={type:"table",raw:ke(e[0],`
|
|
588
|
+
`),header:[],align:[],rows:[]};if(n.length===s.length){for(let o of s)this.rules.other.tableAlignRight.test(o)?i.align.push("right"):this.rules.other.tableAlignCenter.test(o)?i.align.push("center"):this.rules.other.tableAlignLeft.test(o)?i.align.push("left"):i.align.push(null);for(let o=0;o<n.length;o++)i.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:i.align[o]});for(let o of r)i.rows.push(zr(o,i.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:i.align[l]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:ke(e[0],`
|
|
589
|
+
`),depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
|
|
590
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(t);if(e){let n=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&jr(t,e[1],n,this.rules))return;let s=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let o=ke(s.slice(0,-1),"\\");if((s.length-o.length)%2===0)return}else{let o=Ir(e[2],"()");if(o===-2)return;if(o>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?r=r.slice(1):r=r.slice(1,-1)),Dr(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let s=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&jr(t,n[1],s,this.rules))return;let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[Dt(r)];if(!i){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return Dr(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,a=r,l=0,d=s[0][0],c=n===d,p=d==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*t.length+r);(s=p.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(o=[...i].length,s[3]||s[4]){a+=o;continue}else if(s[5]||s[6]){if(r%3&&!((r+o)%3)){l+=o;continue}if(c)break}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let u=[...s[0]][0].length,h=t.slice(0,r+s.index+u+o);if(Math.min(r,o)%2){let g=h.slice(1,-1);return{type:"em",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}let f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,a=r,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*t.length+r);(s=l.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(o=[...i].length,o!==r))continue;if(s[3]||s[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let d=[...s[0]][0].length,c=t.slice(0,r+s.index+d+o),p=c.slice(r,-r);return{type:"del",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,s;return e[2]==="@"?(n=e[1],s="mailto:"+n):(n=e[1],s=n),{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:n?e[0]:nc(e[0]),escaped:n}}}},Z=class Bs{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Re,this.options.tokenizer=this.options.tokenizer||new jt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let n={other:M,block:Nt.normal,inline:ct.normal};this.options.pedantic?(n.block=Nt.pedantic,n.inline=ct.pedantic):this.options.gfm&&(n.block=Nt.gfm,this.options.breaks?n.inline=ct.breaks:n.inline=ct.gfm),this.tokenizer.rules=n}static get rules(){return{block:Nt,inline:ct}}static lex(e,n){return new Bs(n).lex(e)}static lexInline(e,n){return new Bs(n).inlineTokens(e)}lex(e){e=e.replace(M.carriageReturn,`
|
|
591
|
+
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(M.tabCharGlobal," ").replace(M.spaceLine,""));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(a=>(i=a.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let a=n.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
|
|
592
|
+
`:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
593
|
+
`)?"":`
|
|
594
|
+
`)+i.raw,a.text+=`
|
|
595
|
+
`+i.text,this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
596
|
+
`)?"":`
|
|
597
|
+
`)+i.raw,a.text+=`
|
|
598
|
+
`+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let o=e;if(this.options.extensions?.startBlock){let a=1/0,l=e.slice(1),d;this.options.extensions.startBlock.forEach(c=>{d=c.call({lexer:this},l),typeof d=="number"&&d>=0&&(a=Math.min(a,d))}),a<1/0&&a>=0&&(o=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=n.at(-1);s&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
599
|
+
`)?"":`
|
|
600
|
+
`)+i.raw,a.text+=`
|
|
601
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i),s=o.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
602
|
+
`)?"":`
|
|
603
|
+
`)+i.raw,a.text+=`
|
|
604
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}linkInText(e){if(!e.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let s of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(s[0])&&e.charAt(s.index-1)!=="!")return!0;for(let s of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let r=s[0],i=r.lastIndexOf("[");if(!(r.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Dt(r.slice(i+1,-1))))&&!(i>1&&this.linkInText(r.slice(1,i-1))))return!0}return!1}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let s=this.state.linkParenPossible;this.state.linkParenPossible=s&&e.includes(")");try{return this.#e(e,n)}finally{this.state.linkParenPossible=s}}#e(e,n){let s=e;if(this.tokens.links&&e.includes("[")){let a=this.tokenizer.rules.inline.reflinkSearch,l=d=>{let c=d.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Dt(d.slice(c+1,-1))))return d;if(c>1&&d.charAt(0)!=="!"){let p=d.slice(1,c-1);if(this.linkInText(p))return"["+p.replace(a,l)+"]["+"a".repeat(d.length-c-2)+"]"}return"["+"a".repeat(d.length-2)+"]"};s=s.replace(a,l)}s=s.replace(this.tokenizer.rules.inline.anyPunctuation,a=>"+".repeat(a.length)),s=s.replace(this.tokenizer.rules.inline.blockSkip,(a,l,d)=>{let c=d?d.length:0;return a.slice(0,c)+"["+"a".repeat(a.length-c-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let r=!1,i="",o=1/0;for(;e;){if(e.length<o)o=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=""),r=!1;let a;if(this.options.extensions?.inline?.some(d=>(a=d.call({lexer:this},e,n))?(e=e.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let d=n.at(-1);a.type==="text"&&d?.type==="text"?(d.raw+=a.raw,d.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(e,s,i)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(e,s,i)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),n.push(a);continue}let l=e;if(this.options.extensions?.startInline){let d=1/0,c=e.slice(1),p;this.options.extensions.startInline.forEach(u=>{p=u.call({lexer:this},c),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(l=e.substring(0,d+1))}if(a=this.tokenizer.inlineText(l)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(i=a.raw.slice(-1)),r=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=a.raw,d.text+=a.text):n.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},qt=class{options;parser;constructor(t){this.options=t||Re}space(t){return""}code({text:t,lang:e,escaped:n}){let s=(e||"").match(M.notSpaceStart)?.[0],r=t?t.replace(M.endingNewline,"")+`
|
|
605
|
+
`:"";return s?'<pre><code class="language-'+W(s)+'">'+(n?r:W(r,!0))+`</code></pre>
|
|
606
|
+
`:"<pre><code>"+(n?r:W(r,!0))+`</code></pre>
|
|
607
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
608
|
+
${this.parser.parse(t)}</blockquote>
|
|
609
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
610
|
+
`}hr(t){return`<hr>
|
|
611
|
+
`}list(t){let e=t.ordered,n=t.start,s="";for(let o=0;o<t.items.length;o++){let a=t.items[o];s+=this.listitem(a)}let r=e?"ol":"ul",i=e&&n!==1?' start="'+n+'"':"";return"<"+r+i+`>
|
|
612
|
+
`+s+"</"+r+`>
|
|
613
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
614
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
615
|
+
`}table(t){let e="",n="";for(let r=0;r<t.header.length;r++)n+=this.tablecell(t.header[r]);e+=this.tablerow({text:n});let s="";for(let r=0;r<t.rows.length;r++){let i=t.rows[r];n="";for(let o=0;o<i.length;o++)n+=this.tablecell(i[o]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
616
|
+
<thead>
|
|
617
|
+
`+e+`</thead>
|
|
618
|
+
`+s+`</table>
|
|
619
|
+
`}tablerow({text:t}){return`<tr>
|
|
620
|
+
${t}</tr>
|
|
621
|
+
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
|
|
622
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${W(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:n,tokens:s,autolink:r}){let i=r?W(n,!0):this.parser.parseInline(s),o=Pr(t);if(o===null)return i;t=W(o,r);let a='<a href="'+t+'"';return e&&(a+=' title="'+W(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=Pr(t);if(r===null)return W(n);t=r;let i=`<img src="${W(t)}" alt="${W(n)}"`;return e&&(i+=` title="${W(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:W(t.text)}},Hn=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Y=class Hs{options;renderer;textRenderer;constructor(e){this.options=e||Re,this.options.renderer=this.options.renderer||new qt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Hn}static parse(e,n){return new Hs(n).parse(e)}static parseInline(e,n){return new Hs(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let o=r,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(o.type)){n+=a||"";continue}}let i=r;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let s="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){s+=a||"";continue}}let o=i;switch(o.type){case"escape":{s+=n.text(o);break}case"html":{s+=n.html(o);break}case"link":{s+=n.link(o);break}case"image":{s+=n.image(o);break}case"checkbox":{s+=n.checkbox(o);break}case"strong":{s+=n.strong(o);break}case"em":{s+=n.em(o);break}case"codespan":{s+=n.codespan(o);break}case"br":{s+=n.br(o);break}case"del":{s+=n.del(o);break}case"text":{s+=n.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}},dt=class{options;block;constructor(t){this.options=t||Re}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?Z.lex:Z.lexInline}provideParser(t=this.block){return t?Y.parse:Y.parseInline}},qr=class{defaults=zn();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Y;Renderer=qt;TextRenderer=Hn;Lexer=Z;Tokenizer=jt;Hooks=dt;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let s of t)switch(n=n.concat(e.call(this,s)),s.type){case"table":{let r=s;for(let i of r.header)n=n.concat(this.walkTokens(i.tokens,e));for(let i of r.rows)for(let o of i)n=n.concat(this.walkTokens(o.tokens,e));break}case"list":{let r=s;n=n.concat(this.walkTokens(r.items,e));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let o=r[i].flat(1/0);n=n.concat(this.walkTokens(o,e))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=e.renderers[r.name];i?e.renderers[r.name]=function(...o){let a=r.renderer.apply(this,o);return a===!1&&(a=i.apply(this,o)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[r.level];i?i.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),n.renderer){let r=this.defaults.renderer||new qt(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,a=n.renderer[o],l=r[o];r[o]=(...d)=>{let c=a.apply(r,d);return c===!1&&(c=l.apply(r,d)),c||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new jt(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,a=n.tokenizer[o],l=r[o];r[o]=(...d)=>{let c=a.apply(r,d);return c===!1&&(c=l.apply(r,d)),c}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new dt;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,a=n.hooks[o],l=r[o];dt.passThroughHooks.has(i)?r[o]=d=>{if(this.defaults.async&&dt.passThroughHooksRespectAsync.has(i))return(async()=>{let p=await a.call(r,d);return l.call(r,p)})();let c=a.call(r,d);return l.call(r,c)}:r[o]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await a.apply(r,d);return p===!1&&(p=await l.apply(r,d)),p})();let c=a.apply(r,d);return c===!1&&(c=l.apply(r,d)),c}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(o){let a=[];return a.push(i.call(this,o)),r&&(a=a.concat(r.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Z.lex(t,e??this.defaults)}parser(t,e){return Y.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let o=r.hooks?await r.hooks.preprocess(e):e,a=await(r.hooks?await r.hooks.provideLexer(t):t?Z.lex:Z.lexInline)(o,r),l=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(l,r.walkTokens));let d=await(r.hooks?await r.hooks.provideParser(t):t?Y.parse:Y.parseInline)(l,r);return r.hooks?await r.hooks.postprocess(d):d})().catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let o=(r.hooks?r.hooks.provideLexer(t):t?Z.lex:Z.lexInline)(e,r);r.hooks&&(o=r.hooks.processAllTokens(o)),r.walkTokens&&this.walkTokens(o,r.walkTokens);let a=(r.hooks?r.hooks.provideParser(t):t?Y.parse:Y.parseInline)(o,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(o){return i(o)}}}onError(t,e){return n=>{if(n.message+=`
|
|
623
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+W(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},Oe=new qr;function E(t,e){return Oe.parse(t,e)}E.options=E.setOptions=function(t){return Oe.setOptions(t),E.defaults=Oe.defaults,xr(E.defaults),E},E.getDefaults=zn,E.defaults=Re;function rc(...t){return Oe.use(...t),E.defaults=Oe.defaults,xr(E.defaults),E}E.use=rc,E.walkTokens=function(t,e){return Oe.walkTokens(t,e)},E.parseInline=Oe.parseInline,E.Parser=Y,E.parser=Y.parse,E.Renderer=qt,E.TextRenderer=Hn,E.Lexer=Z,E.lexer=Z.lex,E.Tokenizer=jt,E.Hooks=dt,E.parse=E,E.options,E.setOptions,E.walkTokens,E.parseInline,Y.parse,Z.lex;const ic={"&":"&","<":"<",">":">",'"':""","'":"'"},Le=t=>t.replace(/[&<>"']/g,e=>ic[e]??e),oc=new Set(["http","https","mailto"]),Br=t=>{const e=t.replace(/[\u0000- \u007f]/g,""),n=/^([a-z][a-z0-9+.-]*):/i.exec(e)?.[1];return n===void 0||oc.has(n.toLowerCase())},ac=t=>/^https?:/i.test(t.trim()),lc=new qr({gfm:!0,breaks:!0,renderer:{html({text:t}){return Le(t)},link({href:t,title:e,tokens:n}){const s=this.parser.parseInline(n);if(!Br(t))return s;const r=e?` title="${Le(e)}"`:"",i=ac(t)?' target="_blank" rel="noopener noreferrer"':"";return`<a href="${Le(t)}"${r}${i}>${s}</a>`},image({href:t,title:e,text:n}){if(!Br(t))return Le(n);const s=e?` title="${Le(e)}"`:"";return`<img src="${Le(t)}" alt="${Le(n)}"${s}>`}}}),Hr=t=>lc.parse(t,{async:!1}),cc=zt({en:{clickToEdit:"Click to edit",unset:"Not set",edit:"Edit"},ja:{clickToEdit:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u7DE8\u96C6",unset:"\u672A\u8A2D\u5B9A",edit:"\u7DE8\u96C6"}});class Ur extends ge{static{this.styles=[Mt,vr,ue`
|
|
624
|
+
/* One atomic box in both states, so the text can be edited where it sits:
|
|
625
|
+
while editing, the text stays (hidden) underneath and keeps sizing the
|
|
626
|
+
box, and the field lies over it. Starting an edit moves nothing; the
|
|
627
|
+
box grows only as the draft does. */
|
|
628
|
+
:host {
|
|
629
|
+
display: inline-block;
|
|
630
|
+
max-width: 100%;
|
|
631
|
+
vertical-align: baseline;
|
|
632
|
+
/* Inherit the surrounding type scale instead of forcing the chrome size:
|
|
633
|
+
an inline edit inside a 17px heading must look like a 17px heading.
|
|
634
|
+
Color comes along too, so an edit on a colored card stays legible. */
|
|
635
|
+
font-family: inherit;
|
|
636
|
+
font-size: inherit;
|
|
637
|
+
font-weight: inherit;
|
|
638
|
+
line-height: inherit;
|
|
639
|
+
color: inherit;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.box {
|
|
643
|
+
position: relative;
|
|
644
|
+
display: block;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/* No vertical padding or border: the box is exactly the lines of text.
|
|
648
|
+
The underline and ring are shadows, which never move the layout. */
|
|
649
|
+
.view {
|
|
650
|
+
display: block;
|
|
651
|
+
padding: 0 4px;
|
|
652
|
+
border-radius: var(--dpk-radius-xs);
|
|
653
|
+
white-space: pre-wrap;
|
|
654
|
+
overflow-wrap: anywhere;
|
|
655
|
+
cursor: text;
|
|
656
|
+
transition:
|
|
657
|
+
background 140ms var(--dpk-ease),
|
|
658
|
+
box-shadow 140ms var(--dpk-ease);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.view:hover {
|
|
662
|
+
background: var(--dpk-blue-soft);
|
|
663
|
+
box-shadow:
|
|
664
|
+
inset 0 -1px 0 var(--dpk-blue),
|
|
665
|
+
inset 0 0 0 1px color-mix(in srgb, var(--dpk-blue) 22%, transparent);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/* Formatted text keeps its own line breaks: a break in the source is a <br>. */
|
|
669
|
+
.view.dpk-prose {
|
|
670
|
+
white-space: normal;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.view[data-empty='true'] {
|
|
674
|
+
box-shadow: inset 0 -1px 0 var(--dpk-rule-strong);
|
|
675
|
+
color: var(--dpk-ink-faint);
|
|
676
|
+
font-style: italic;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.view[data-empty='true']:hover {
|
|
680
|
+
box-shadow: inset 0 -1px 0 var(--dpk-blue);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.view[aria-hidden='true'] {
|
|
684
|
+
visibility: hidden;
|
|
685
|
+
transition: none;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.field {
|
|
689
|
+
position: absolute;
|
|
690
|
+
inset: 0;
|
|
691
|
+
box-sizing: border-box;
|
|
692
|
+
width: 100%;
|
|
693
|
+
height: 100%;
|
|
694
|
+
min-width: 0;
|
|
695
|
+
margin: 0;
|
|
696
|
+
padding: 0 4px;
|
|
697
|
+
border: none;
|
|
698
|
+
border-radius: var(--dpk-radius-xs);
|
|
699
|
+
outline: none;
|
|
700
|
+
background: var(--dpk-paper-raised);
|
|
701
|
+
box-shadow:
|
|
702
|
+
inset 0 0 0 1px var(--dpk-blue),
|
|
703
|
+
var(--dpk-focus);
|
|
704
|
+
font: inherit;
|
|
705
|
+
line-height: inherit;
|
|
706
|
+
letter-spacing: inherit;
|
|
707
|
+
color: inherit;
|
|
708
|
+
white-space: pre-wrap;
|
|
709
|
+
overflow-wrap: anywhere;
|
|
710
|
+
overflow: hidden;
|
|
711
|
+
resize: none;
|
|
712
|
+
animation: dpk-inline-edit-in 140ms var(--dpk-ease) backwards;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.field::placeholder {
|
|
716
|
+
color: var(--dpk-ink-faint);
|
|
717
|
+
font-style: italic;
|
|
718
|
+
opacity: 1;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
@keyframes dpk-inline-edit-in {
|
|
722
|
+
from {
|
|
723
|
+
opacity: 0;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
:host([truncate]) .view {
|
|
728
|
+
overflow: hidden;
|
|
729
|
+
text-overflow: ellipsis;
|
|
730
|
+
white-space: pre;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/* Wrapped, it keeps --dpk-inline-edit-lines lines; the hidden text under a
|
|
734
|
+
field still sizes the box to the whole draft. */
|
|
735
|
+
:host([truncate][wrap]) .view:not([aria-hidden='true']) {
|
|
736
|
+
display: -webkit-box;
|
|
737
|
+
-webkit-box-orient: vertical;
|
|
738
|
+
-webkit-line-clamp: var(--dpk-inline-edit-lines, 3);
|
|
739
|
+
white-space: pre-wrap;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
/* seamless: no field chrome at all — the text is edited where it sits. */
|
|
743
|
+
:host([seamless]) .view,
|
|
744
|
+
:host([seamless]) .field {
|
|
745
|
+
padding: 0;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
:host([seamless]) .field {
|
|
749
|
+
border-radius: 0;
|
|
750
|
+
background: transparent;
|
|
751
|
+
box-shadow: none;
|
|
752
|
+
}
|
|
753
|
+
`]}static{this.properties={value:{type:String},placeholder:{type:String},multiline:{type:Boolean},wrap:{type:Boolean,reflect:!0},truncate:{type:Boolean,reflect:!0},seamless:{type:Boolean,reflect:!0},markdown:{type:Boolean},label:{type:String},editing:{state:!0}}}#e="";#t=0;#n=new Ln(this);connectedCallback(){super.connectedCallback(),this.#t+=1}constructor(){super(),this.value="",this.placeholder="",this.multiline=!1,this.wrap=!1,this.truncate=!1,this.seamless=!1,this.markdown=!1,this.label="",this.editing=!1,this.#e=""}startEditing(){this.#e=this.value,this.editing=!0}willUpdate(e){e.has("value")&&!this.editing&&(this.#e=this.value)}updated(){if(!this.editing)return;const e=this.renderRoot.querySelector(".field"),n=this.renderRoot,s=n instanceof ShadowRoot?n.activeElement:document.activeElement;e&&s!==e&&(e.focus(),e.setSelectionRange(0,e.value.length,"backward"),e.scrollLeft=0,e.scrollTop=0)}render(){const e=cc(this.#n.locale),n=this.placeholder||e.unset,{editing:s}=this,r=s?this.#e:this.value,i=r===""?n:s&&r.endsWith(`
|
|
754
|
+
`)?`${r}\u200B`:r;return this.markdown&&!s&&r!==""?m`<span class="box"
|
|
755
|
+
><div
|
|
756
|
+
class="view dpk-prose"
|
|
757
|
+
data-empty="false"
|
|
758
|
+
role="button"
|
|
759
|
+
tabindex="0"
|
|
760
|
+
title=${e.clickToEdit}
|
|
761
|
+
@click=${this.#s}
|
|
762
|
+
@keydown=${this.#i}
|
|
763
|
+
>
|
|
764
|
+
${ur(Hr(r))}
|
|
765
|
+
</div></span
|
|
766
|
+
>`:m`<span class="box"
|
|
767
|
+
><span
|
|
768
|
+
class="view"
|
|
769
|
+
data-empty=${String(r==="")}
|
|
770
|
+
aria-hidden=${s?"true":k}
|
|
771
|
+
role=${s?k:"button"}
|
|
772
|
+
tabindex=${s?k:"0"}
|
|
773
|
+
title=${s?k:this.truncate&&r!==""?r:e.clickToEdit}
|
|
774
|
+
@click=${this.#s}
|
|
775
|
+
@keydown=${this.#i}
|
|
776
|
+
>${i}</span
|
|
777
|
+
>${s?this.#r(this.label||this.placeholder||e.edit,n):k}</span
|
|
778
|
+
>`}#r(e,n){return this.multiline||this.wrap?m`<textarea
|
|
779
|
+
class="field"
|
|
780
|
+
rows="1"
|
|
781
|
+
.value=${Rn(this.#e)}
|
|
782
|
+
placeholder=${n}
|
|
783
|
+
aria-label=${e}
|
|
784
|
+
@input=${this.#o}
|
|
785
|
+
@keydown=${this.#a}
|
|
786
|
+
@blur=${this.#l}
|
|
787
|
+
></textarea>`:m`<input
|
|
788
|
+
class="field"
|
|
789
|
+
.value=${Rn(this.#e)}
|
|
790
|
+
placeholder=${n}
|
|
791
|
+
aria-label=${e}
|
|
792
|
+
@input=${this.#o}
|
|
793
|
+
@keydown=${this.#a}
|
|
794
|
+
@blur=${this.#l}
|
|
795
|
+
/>`}#s=e=>{e.composedPath().some(n=>n instanceof HTMLAnchorElement)||(e.stopPropagation(),!this.editing&&(this.#e=this.value,this.editing=!0))};#i=e=>{e.isComposing||this.editing||e.target instanceof HTMLAnchorElement||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.editing=!0)};#o=e=>{const n=Ee(e.target,HTMLInputElement)??Ee(e.target,HTMLTextAreaElement);n!==null&&(this.#e=n.value,this.requestUpdate())};#a=e=>{if(!e.isComposing){if(e.key==="Escape"){e.preventDefault(),this.#e=this.value,this.editing=!1;return}e.key==="Enter"&&(!this.multiline||this.wrap||e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.#c())}};#l=e=>{const n=e.currentTarget;if(!(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement))return;const s=this.#t,{selectionStart:r,selectionEnd:i}=n;queueMicrotask(()=>{!this.isConnected||!this.editing||(s!==this.#t?(n.focus(),n.setSelectionRange(r,i)):this.#c())})};#c=()=>{if(!this.editing)return;this.editing=!1;const n=(this.wrap?this.#e.replace(/\r?\n/g," "):this.#e).trim();n!==this.value&&this.dispatchEvent(new CustomEvent("dpk-commit",{detail:{value:n},bubbles:!0,composed:!0}))}}const dc=()=>{customElements.get("dpk-component-inline-edit")||customElements.define("dpk-component-inline-edit",Ur)},pc={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Un(t){return pc}let hc;function uc(t){return hc?.get(t)}let fc;function gc(t){return fc?.get(t)}let mc;function kc(t,e){return mc?.get(t)?.get(e)}function We(t){const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function R(t,e,n,s,r){const i=r&&"input"in r?r.input:n.value,o=r?.expected??t.expects??null,a=r?.received??We(i),l={kind:t.kind,type:t.type,input:i,expected:o,received:a,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${a}`,requirement:t.requirement,path:r?.path,issues:r?.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},d=t.kind==="schema",c=r?.message??t.message??kc(t.reference,l.lang)??(d?gc(l.lang):null)??s.message??uc(l.lang);c!==void 0&&(l.message=typeof c=="function"?c(l):c),d&&(n.typed=!1),n.issues?n.issues.push(l):n.issues=[l]}function bc(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function vc(t,e){return Object.prototype.hasOwnProperty.call(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Fn(t,e){const n=[...new Set(t)];return n.length>1?`(${n.join(` ${e} `)})`:n[0]??"never"}function I(t){return t["~standard"]={version:1,vendor:"valibot",validate:e=>t["~run"]({value:e},Un())},t}function xc(t){if(t.path){let e="";for(const n of t.path)if(typeof n.key=="string"||typeof n.key=="number")e?e+=`.${n.key}`:e+=n.key;else return null;return e}return null}var yc=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};const wc=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])$/u,$c=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])[T ](?:0\d|1\d|2[0-3])(?::[0-5]\d){2}(?:\.\d{1,9})?(?:Z| ?[+-](?:0\d|1\d|2[0-3])(?::?[0-5]\d)?)$/u;function Fr(t,e){return{kind:"validation",type:"check",reference:Fr,async:!1,expects:null,requirement:t,message:e,"~run"(n,s){return n.typed&&!this.requirement(n.value)&&R(this,"input",n,s),n}}}function Wr(t){return{kind:"validation",type:"finite",reference:Wr,async:!1,expects:null,requirement:Number.isFinite,message:t,"~run"(e,n){return e.typed&&!this.requirement(e.value)&&R(this,"finite",e,n),e}}}function Gr(t,e){const n=We(t);return{kind:"validation",type:"includes",reference:Gr,async:!1,expects:n,requirement:t,message:e,"~run"(s,r){return s.typed&&!s.value.includes(this.requirement)&&R(this,"content",s,r,{received:`!${n}`}),s}}}function Vr(t){return{kind:"validation",type:"integer",reference:Vr,async:!1,expects:null,requirement:Number.isInteger,message:t,"~run"(e,n){return e.typed&&!this.requirement(e.value)&&R(this,"integer",e,n),e}}}function Kr(t){return{kind:"validation",type:"iso_date",reference:Kr,async:!1,expects:null,requirement:wc,message:t,"~run"(e,n){return e.typed&&!this.requirement.test(e.value)&&R(this,"date",e,n),e}}}function Qr(t){return{kind:"validation",type:"iso_timestamp",reference:Qr,async:!1,expects:null,requirement:$c,message:t,"~run"(e,n){return e.typed&&!this.requirement.test(e.value)&&R(this,"timestamp",e,n),e}}}function $(t,e){return{kind:"validation",type:"min_length",reference:$,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(n,s){return n.typed&&n.value.length<this.requirement&&R(this,"length",n,s,{received:`${n.value.length}`}),n}}}function Zr(t,e){return{kind:"validation",type:"min_value",reference:Zr,async:!1,expects:`>=${t instanceof Date?t.toJSON():We(t)}`,requirement:t,message:e,"~run"(n,s){return n.typed&&!(n.value>=this.requirement)&&R(this,"value",n,s,{received:n.value instanceof Date?n.value.toJSON():We(n.value)}),n}}}function be(t,e){return{kind:"validation",type:"regex",reference:be,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(n,s){return n.typed&&!this.requirement.test(n.value)&&R(this,"format",n,s),n}}}function Wn(){return{kind:"transformation",type:"trim",reference:Wn,async:!1,"~run"(t){return t.value=t.value.trim(),t}}}function Yr(t){return{kind:"validation",type:"url",reference:Yr,async:!1,expects:null,requirement(e){try{return URL.canParse?URL.canParse(e):(new URL(e),!0)}catch{return!1}},message:t,"~run"(e,n){return e.typed&&!this.requirement(e.value)&&R(this,"URL",e,n),e}}}const Jr={abortEarly:!0};function Xr(t,e,n){return typeof t.fallback=="function"?t.fallback(e,n):t.fallback}function Bt(t,e,n){return typeof t.default=="function"?t.default(e,n):t.default}function Sc(t,e){return!t["~run"]({value:e},Jr).issues}function j(t,e){return I({kind:"schema",type:"array",reference:j,expects:"Array",async:!1,item:t,message:e,"~run"(n,s){const r=n.value;if(Array.isArray(r)){n.typed=!0,n.value=[];for(let i=0;i<r.length;i++){const o=r[i],a=this.item["~run"]({value:o},s);if(a.issues){const l={type:"array",origin:"value",input:r,key:i,value:o};for(const d of a.issues)d.path?d.path.unshift(l):d.path=[l],n.issues?.push(d);if(n.issues||(n.issues=a.issues),s.abortEarly){n.typed=!1;break}}a.typed||(n.typed=!1),n.value.push(a.value)}}else R(this,"type",n,s);return n}})}function Gn(t){return I({kind:"schema",type:"boolean",reference:Gn,expects:"boolean",async:!1,message:t,"~run"(e,n){return typeof e.value=="boolean"?e.typed=!0:R(this,"type",e,n),e}})}function U(t,e){return I({kind:"schema",type:"exact_optional",reference:U,expects:t.expects,async:!1,wrapped:t,default:e,"~run"(n,s){return this.wrapped["~run"](n,s)}})}function ei(t){return I({kind:"schema",type:"lazy",reference:ei,expects:"unknown",async:!1,getter:t,"~run"(e,n){return this.getter(e.value)["~run"](e,n)}})}function G(t,e){return I({kind:"schema",type:"literal",reference:G,expects:We(t),async:!1,literal:t,message:e,"~run"(n,s){return bc(n.value,this.literal)?n.typed=!0:R(this,"type",n,s),n}})}function ti(t,e){return I({kind:"schema",type:"nullable",reference:ti,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,"~run"(n,s){return n.value===null&&(this.default!==void 0&&(n.value=Bt(this,n,s)),n.value===null)?(n.typed=!0,n):this.wrapped["~run"](n,s)}})}function ni(t){return I({kind:"schema",type:"number",reference:ni,expects:"number",async:!1,message:t,"~run"(e,n){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:R(this,"type",e,n),e}})}function O(t,e){return I({kind:"schema",type:"object",reference:O,expects:"Object",async:!1,entries:t,message:e,"~run"(n,s){const r=n.value;if(r&&typeof r=="object"){n.typed=!0,n.value={};for(const i in this.entries){const o=this.entries[i];if(i in r||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const a=i in r?r[i]:Bt(o),l=o["~run"]({value:a},s);if(l.issues){const d={type:"object",origin:"value",input:r,key:i,value:a};for(const c of l.issues)c.path?c.path.unshift(d):c.path=[d],n.issues?.push(c);if(n.issues||(n.issues=l.issues),s.abortEarly){n.typed=!1;break}}l.typed||(n.typed=!1),n.value[i]=l.value}else if(o.fallback!==void 0)n.value[i]=Xr(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(R(this,"key",n,s,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]}),s.abortEarly))break}}else R(this,"type",n,s);return n}})}function N(t,e){return I({kind:"schema",type:"optional",reference:N,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,"~run"(n,s){return n.value===void 0&&(this.default!==void 0&&(n.value=Bt(this,n,s)),n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,s)}})}function Ht(t,e){return I({kind:"schema",type:"picklist",reference:Ht,expects:Fn(t.map(We),"|"),async:!1,options:t,message:e,"~run"(n,s){return this.options.includes(n.value)?n.typed=!0:R(this,"type",n,s),n}})}function Ge(t,e,n){return I({kind:"schema",type:"record",reference:Ge,expects:"Object",async:!1,key:t,value:e,message:n,"~run"(s,r){const i=s.value;if(i&&typeof i=="object"){s.typed=!0,s.value={};for(const o in i)if(vc(i,o)){const a=i[o],l=this.key["~run"]({value:o},r);if(l.issues){const c={type:"object",origin:"key",input:i,key:o,value:a};for(const p of l.issues)p.path=[c],s.issues?.push(p);if(s.issues||(s.issues=l.issues),r.abortEarly){s.typed=!1;break}}const d=this.value["~run"]({value:a},r);if(d.issues){const c={type:"object",origin:"value",input:i,key:o,value:a};for(const p of d.issues)p.path?p.path.unshift(c):p.path=[c],s.issues?.push(p);if(s.issues||(s.issues=d.issues),r.abortEarly){s.typed=!1;break}}(!l.typed||!d.typed)&&(s.typed=!1),l.typed&&(s.value[l.value]=d.value)}}else R(this,"type",s,r);return s}})}function P(t,e){return I({kind:"schema",type:"strict_object",reference:P,expects:"Object",async:!1,entries:t,message:e,"~run"(n,s){const r=n.value;if(r&&typeof r=="object"){n.typed=!0,n.value={};for(const i in this.entries){const o=this.entries[i];if(i in r||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const a=i in r?r[i]:Bt(o),l=o["~run"]({value:a},s);if(l.issues){const d={type:"object",origin:"value",input:r,key:i,value:a};for(const c of l.issues)c.path?c.path.unshift(d):c.path=[d],n.issues?.push(c);if(n.issues||(n.issues=l.issues),s.abortEarly){n.typed=!1;break}}l.typed||(n.typed=!1),n.value[i]=l.value}else if(o.fallback!==void 0)n.value[i]=Xr(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(R(this,"key",n,s,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]}),s.abortEarly))break}if(!n.issues||!s.abortEarly){for(const i in r)if(!Object.prototype.hasOwnProperty.call(this.entries,i)){R(this,"key",n,s,{input:i,expected:"never",path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]});break}}}else R(this,"type",n,s);return n}})}function v(t){return I({kind:"schema",type:"string",reference:v,expects:"string",async:!1,message:t,"~run"(e,n){return typeof e.value=="string"?e.typed=!0:R(this,"type",e,n),e}})}function si(t){let e;if(t)for(const n of t)if(e)for(const s of n.issues)e.push(s);else e=n.issues;return e}function Vn(t,e){return I({kind:"schema",type:"union",reference:Vn,expects:Fn(t.map(n=>n.expects),"|"),async:!1,options:t,message:e,"~run"(n,s){let r,i,o;for(const a of this.options){const l=a["~run"]({value:n.value},s);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{r=l;break}else o?o.push(l):o=[l]}if(r)return r;if(i){if(i.length===1)return i[0];R(this,"type",n,s,{issues:si(i)}),n.typed=!0}else{if(o?.length===1)return o[0];R(this,"type",n,s,{issues:si(o)})}return n}})}function ve(){return I({kind:"schema",type:"unknown",reference:ve,expects:"unknown",async:!1,"~run"(t){return t.typed=!0,t}})}function Ut(t,e,n){return I({kind:"schema",type:"variant",reference:Ut,expects:"Object",async:!1,key:t,options:e,message:n,"~run"(s,r){const i=s.value;if(i&&typeof i=="object"){let o,a=0,l=this.key,d=[];const c=(p,u)=>{for(const h of p.options){if(h.type==="variant")c(h,new Set(u).add(h.key));else{let f=!0,g=0;for(const b of u){const x=h.entries[b];if(b in i?x["~run"]({typed:!1,value:i[b]},Jr).issues:x.type!=="exact_optional"&&x.type!=="optional"&&x.type!=="nullish"){f=!1,l!==b&&(a<g||a===g&&b in i&&!(l in i))&&(a=g,l=b,d=[]),l===b&&d.push(h.entries[b].expects);break}g++}if(f){const b=h["~run"]({value:i},r);(!o||!o.typed&&b.typed)&&(o=b)}}if(o&&!o.issues)break}};if(c(this,new Set([this.key])),o)return o;R(this,"type",s,r,{input:i[l],expected:Fn(d,"|"),path:[{type:"object",origin:"value",input:i,key:l,value:i[l]}]})}else R(this,"type",s,r);return s}})}function Ft(t,e,n){const s=t["~run"]({value:e},Un());if(s.issues)throw new yc(s.issues);return s.value}function y(...t){return I({...t[0],pipe:t,"~run"(e,n){for(const s of t)if(s.kind!=="metadata"){if(e.issues&&(s.kind==="schema"||s.kind==="transformation")){e.typed=!1;break}(!e.issues||!n.abortEarly&&!n.abortPipeEarly)&&(e=s["~run"](e,n))}return e}})}function C(t,e,n){const s=t["~run"]({value:e},Un());return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}function Ac(t){let e="";for(const n of t){e&&(e+=`
|
|
796
|
+
`),e+=`\xD7 ${n.message}`;const s=xc(n);s&&(e+=`
|
|
797
|
+
\u2192 at ${s}`)}return e}const Wt=O({type:y(v(),$(1)),id:y(v(),$(1))}),Gt=y(v(),$(1),be(/^[A-Za-z0-9_-]+$/,'ids may only contain letters, digits, "_" and "-" (a "." builds a path)')),Cc=(t,e)=>{if(e===1)return t.includes(".")?null:[t];const n=t.split(".");return n.length===e&&n.every(s=>s.length>0)?n:null},Pe=O({id:y(v(),$(1)),type:y(v(),$(1)),target:Wt,payload:ve(),note:U(v()),createdAt:y(v(),$(1))}),Tc=(t,e,n,s={})=>{const r=O({id:y(v(),$(1)),type:G(t),target:Wt,payload:n,note:U(v()),createdAt:y(v(),$(1))}),i=o=>{const a=C(Pe,o);if(!a.success||a.output.type!==t)return null;const l=C(n,o.payload);return l.success?{id:a.output.id,type:t,target:a.output.target,payload:l.output,...a.output.note===void 0?{}:{note:a.output.note},createdAt:a.output.createdAt}:null};return{schema:r,mode:s.mode??"patch",targetType:e,actionType:t,payloadSchema:n,parse:i,...s.dedupeKey?{dedupeKey:s.dedupeKey}:{}}},Ec=(t,e)=>{const n=Vt(t,e.type);if(n===void 0)return null;const s=n.parse(e);return s===null?null:s},Rc=(t,e)=>{const n=C(t.payloadSchema,e.payload);if(!n.success)throw new Error(`invalid payload for action "${e.type}"`);return n.output},Vt=(t,e)=>Object.hasOwn(t,e)?t[e]:void 0,_c=t=>{throw new Error(`unhandled action: ${JSON.stringify(t)}`)},Oc=O({id:y(v(),$(1))}),Lc=t=>{const e=C(Oc,t.payload);return`${t.type}|${e.success?e.output.id:JSON.stringify(t.payload)}`},D=t=>`${t.type}:${t.id}`,pt=t=>{const e=t.indexOf(":");return e<=0?{type:"unknown",id:t}:{type:t.slice(0,e),id:t.slice(e+1)}},Kn=(t,e)=>typeof t=="string"?pt(t.includes(":")?t:`${e}:${t}`):{type:t.type,id:t.id},Pc=(t,e)=>t.type===e.type&&t.id===e.id,ri=t=>{const e=t.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return e.length>0?e:"item"},zc=(t,e)=>{const n=ri(t),s=new Set(e);if(!s.has(n))return n;for(let r=2;r<1e3;r+=1){const i=`${n}-${r}`;if(!s.has(i))return i}return`${n}-${Math.random().toString(36).slice(2,8)}`},ii=()=>{const t=globalThis.crypto;return t?.randomUUID?t.randomUUID():`a-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`},B="comment",ze=t=>{const[e]=t;return{path:e?.path?.map(n=>String(n.key)).join(".")??"",message:e?.message??"invalid action"}},oi=O({type:y(v(),$(1)),target:Vn([y(v(),$(1)),Wt]),payload:N(ve()),note:U(v()),id:U(y(v(),$(1))),createdAt:U(y(v(),$(1)))}),Mc=(t,e)=>{const n=C(oi,t);if(!n.success)return{ok:!1,issue:ze(n.issues)};const s=n.output,r=Kn(s.target,e.targetType),i={id:s.id??ii(),type:s.type,target:r,payload:s.payload??{},...s.note===void 0?{}:{note:s.note},createdAt:s.createdAt??new Date().toISOString()},o=C(e.schema,i);if(!o.success)return{ok:!1,issue:ze(o.issues)};const a=C(Pe,o.output);return a.success?{ok:!0,action:a.output}:{ok:!1,issue:ze(a.issues)}},Qn=(t,e)=>e.dedupeKey?e.dedupeKey(t):e.mode!=="patch"?null:`${t.type}|${D(t.target)}`,ai=(t,e,n)=>{const s=Qn(e,n);if(s===null)return[...t,e];const r=t.at(-1);return!r||Qn(r,n)!==s||!Ic(r,e)?[...t,e]:[...t.slice(0,-1),e]},Ic=(t,e)=>Pc(t.target,e.target),Zn=t=>JSON.stringify(t.map(e=>({id:e.id,type:e.type,target:e.target,payload:e.payload,...e.note===void 0?{}:{note:e.note},createdAt:e.createdAt})),null,2),li=O({id:y(v(),$(1)),type:G(B),target:O({type:y(v(),$(1)),id:y(v(),$(1))}),payload:O({body:y(v(),$(1))}),note:U(v()),createdAt:y(v(),$(1))}),Yn={schema:li,mode:"append",targetType:"page"},Nc=O({body:v()}),ht=t=>{const e=C(Nc,t.payload);return e.success?e.output.body:""},Jn="element",ci=y(v(),be(/^[A-Z][A-Z0-9_]*$/,"component action types are CONSTANT_CASE")),di=Ge(v(),ve()),Dc=O({type:G(Jn),id:y(v(),be(/^[^/]+\/.+/,"component references start with a provider id"))}),jc=O({id:y(v(),$(1)),type:ci,target:Dc,payload:di,note:U(v()),createdAt:y(v(),$(1))}),qc={schema:jc,mode:"sequence",targetType:Jn},Bc=P({type:ci,target:y(v(),be(/^element:[^/]+\/.+/)),payload:N(di,{})}),pi=P({id:y(v(),$(1)),title:y(v(),$(1)),summary:U(v()),tone:U(Ht(["create","update","delete","move","meta"])),stale:U(Ht(["unsupported-action-type","target-missing","constraint-violated"]))}),Xn=t=>{if(t.type!==Jn)return null;const e=t.id.indexOf("/");if(e<=0)return null;try{return decodeURIComponent(t.id.slice(0,e))}catch{return null}},ee=t=>t.type!==B&&Xn(t.target)!==null,Hc=(t,e)=>t.filter(n=>ee(n)&&Xn(n.target)===e),hi=(t,e)=>{const n=new Map(t.flatMap(s=>ee(s)?[[s.id,Xn(s.target)]]:[]));return new Map(e.flatMap(s=>s.results.flatMap(r=>n.get(r.id)===s.id?[[r.id,r]]:[])))},ui="data-dpk-grill",oe="grill",Kt="answer",es="data-grill-questions",ut={questions:[],rounds:[]},Uc=P({id:Gt,label:y(v(),$(1))}),fi=P({id:Gt,ref:N(y(v(),$(1))),title:y(v(),$(1)),description:N(v()),note:N(v()),options:N(j(Uc),[]),freeText:N(Gn(),!0)}),gi=Ut("kind",[P({kind:G("option"),optionId:y(v(),$(1))}),P({kind:G("free"),text:v()})]),mi=Ut("kind",[...gi.options,P({kind:G("clear")})]),Fc=P({...fi.entries,answer:N(gi)}),Wc=P({label:N(y(v(),$(1))),questions:j(Fc)}),Gc=P({questions:j(fi),history:N(j(Wc),[])}),ki=t=>{const e=new Set;return t.map((n,s)=>{if(e.has(n.id))throw new Error(`duplicate question id: ${n.id}`);e.add(n.id);const r=new Set;for(const i of n.options){if(r.has(i.id))throw new Error(`duplicate option id: ${i.id} in question ${n.id}`);r.add(i.id)}return{...n,ref:n.ref??`Q${s+1}`,description:n.description??null,note:n.note??null}})},bi=t=>({id:t.id,ref:t.ref,title:t.title,description:t.description,note:t.note,options:t.options,freeText:t.freeText}),Vc=t=>{const e=t.answer??null;if(e?.kind==="option"&&!t.options.some(n=>n.id===e.optionId))throw new Error(`unknown option id: ${e.optionId} in question ${t.id}`);return{...bi(t),answer:e}},Kc=t=>{const e=Ft(Gc,t);return{questions:ki(e.questions).map(bi),rounds:e.history.map((n,s)=>({label:n.label??`v${s+1}`,questions:ki(n.questions).map(Vc)}))}},Ve=(t,e)=>t.questions.find(n=>n.id===e),ts=(t,e)=>{const n=Ve(t,e);return n?`${n.ref} \xB7 ${n.title}`:e},Qt=(t,e)=>e?e.kind==="option"?t.options.find(n=>n.id===e.optionId)?.label??"":e.text.trim():"",Zt=(t,e)=>Qt(t,e)!=="",Qc=t=>{let e="";for(let n=t+1;n>0;n=Math.floor((n-1)/26))e=String.fromCharCode(97+(n-1)%26)+e;return e},vi=(t,e)=>({total:t.questions.length,answered:t.questions.filter(n=>Zt(n,e[n.id])).length}),Zc=(t,e,n)=>{const s=t.questions,r=s.findIndex(o=>o.id===n);return(r===-1?s:[...s.slice(r+1),...s.slice(0,r)]).find(o=>!Zt(o,e[o.id]))?.id??null},Yc=O({id:y(v(),$(1)),type:G(Kt),target:O({type:G(oe),id:Gt}),payload:mi,note:U(v()),createdAt:y(v(),$(1))}),Jc={schema:Yc,mode:"patch",targetType:oe},J=t=>t.type===Kt&&t.target.type===oe,Xc=(t,e)=>({type:Kt,target:{type:oe,id:t},payload:e}),xi=t=>{const e=C(mi,t.payload);return e.success?e.output:null},ed=(t,e)=>[...t.filter(n=>!(J(n)&&n.target.id===e.target.id)),e],yi=(t,e,n)=>{const s=Ve(t,n.target.id),r=xi(n);if(!s||!r)return null;const i=e[s.id];if(r.kind==="clear"){if(i===void 0)return e;const o={...e};return delete o[s.id],o}return r.kind==="option"&&!s.options.some(o=>o.id===r.optionId)||r.kind==="free"&&!s.freeText?null:i?.kind==="option"&&r.kind==="option"&&i.optionId===r.optionId||i?.kind==="free"&&r.kind==="free"&&i.text===r.text?e:{...e,[s.id]:r}},ns=Object.freeze({}),Yt=t=>{const e=t.startsWith("#")?t.slice(1):t;if(e.length===0)return ns;const n=new URLSearchParams(e.startsWith("?")?e.slice(1):e),s={};for(const[r,i]of n)r.length>0&&i.length>0&&(s[r]=i);return s},Ke=t=>{const e=new URLSearchParams;for(const s of Object.keys(t).sort((r,i)=>r<i?-1:r>i?1:0)){const r=t[s];r!=null&&r!==""&&e.set(s,r)}const n=e.toString();return n.length===0?"":`#${n}`},ss=(t,e,n=[])=>{const s={...t},r=Object.keys(e).map(i=>n.indexOf(i)).filter(i=>i>=0);if(r.length>0)for(const i of n.slice(Math.min(...r)+1))Object.hasOwn(e,i)||delete s[i];for(const[i,o]of Object.entries(e))o==null||o===""?delete s[i]:s[i]=o;return s},td=(t,e="json")=>`\`\`\`${e}
|
|
798
|
+
${t}
|
|
799
|
+
\`\`\``,nd=t=>JSON.stringify({type:t.type,target:t.target,payload:t.payload,...t.note===void 0?{}:{note:t.note}},null,2),rs=(t,e,n)=>{const{actions:s,state:r}=t,i=new Set(t.stale.map(p=>p.action.id)),o=s.filter(p=>!i.has(p.id)),a=o.filter(p=>p.type===B),l=o.filter(p=>p.type!==B&&!J(p)),d=t.grill.questions.filter(p=>Zt(p,t.answers[p.id])),c=[];if(c.push(`# Review draft \u2014 ${e.label}`),c.push(""),c.push(`- template: \`${e.name}\``),c.push(`- framework: \`dev-process-kit@${n}\``),c.push(`- navigation: \`${Ke(t.navigation)||"(none)"}\``),c.push(`- pending: ${l.length} change(s), ${a.length} comment(s)`+(d.length>0?`, ${d.length} answer(s)`:"")),t.stale.length>0&&c.push(`- stale (not applicable to the current base): ${t.stale.length}`),c.push(""),c.push("## How to apply"),c.push(""),c.push("These are patches against the base HTML, not a command log. Apply the requested end state to the meaning model, keep the stable ids of surviving concepts, and keep the base JSON free of any draft envelope."),l.some(ee)&&(c.push(""),c.push("Changes targeting `element:<id>/\u2026` belong to the component with that `id` (for example a diagram): apply them to that component's own JSON, following its documented action vocabulary.")),c.push(""),a.length>0){c.push(`## Comments (${a.length})`),c.push("");for(const[p,u]of a.entries()){const h=e.describe(u,r,t.base);c.push(`${p+1}. **${h.targetLabel}** \u2014 \`${D(u.target)}\``),c.push(` > ${ht(u).replace(/\n/g,`
|
|
800
|
+
> `)}`)}c.push("")}if(d.length>0){c.push(`## Answers (${d.length})`),c.push(""),c.push("The reader answered these questions from the `data-dpk-grill` block. Settle them in the page; when you ask the next round, move them into `history` with the answer as recorded."),c.push("");for(const[p,u]of d.entries()){const h=t.answers[u.id],f=h?.kind==="option"?` (option \`${h.optionId}\`)`:"";c.push(`${p+1}. **${ts(t.grill,u.id)}** \u2014 \`grill:${u.id}\``),c.push(` > ${Qt(u,h).replace(/\n/g,`
|
|
801
|
+
> `)}${f}`)}c.push("")}if(l.length>0){c.push(`## Requested changes (${l.length})`),c.push("");for(const[p,u]of l.entries()){const h=e.describe(u,r,t.base),f=h.summary?` \u2014 ${h.summary}`:"";c.push(`${p+1}. **${h.title}**${f}`),c.push(` target: \`${D(u.target)}\` (${u.target.type})`),c.push(` \`\`\`json
|
|
802
|
+
${nd(u).replace(/\n/g,`
|
|
803
|
+
`)}
|
|
804
|
+
\`\`\``)}c.push("")}if(l.length===0&&a.length===0&&d.length===0&&(c.push("_No pending draft actions._"),c.push("")),t.stale.length>0){c.push(`## Not applicable to the current base (${t.stale.length})`),c.push(""),c.push("These actions were made against an earlier base and no longer fit it. Do not apply them; mention them if they still matter. The reader can remove them from the review rail."),c.push("");for(const[p,{action:u,reason:h}]of t.stale.entries()){const f=e.describe(u,r,t.base),g=u.type===B?ht(u):f.title;c.push(`${p+1}. \`${u.type}\` on \`${D(u.target)}\` (${h}) \u2014 ${g}`)}c.push("")}return c.push("## Canonical draft (JSON)"),c.push(""),c.push(td(Zn(s))),c.push(""),c.join(`
|
|
805
|
+
`)},te="0.1.0",is=async t=>{try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const e=document.activeElement,n=document.createElement("textarea");try{return n.value=t,n.setAttribute("readonly",""),n.style.position="fixed",n.style.opacity="0",document.body.append(n),n.select(),document.execCommand("copy")}catch{return!1}finally{n.remove(),e instanceof HTMLElement&&e.focus()}},wi=zt({en:{heading:"Review notes",rejected:"Action rejected.",commentLabel:"Review comment",commentPlaceholder:"What the agent should fix, or what you noticed (handed to the agent as a review comment)",detach:"Detach",attachTo:t=>`Attach to this ${t}`,addNote:"Add to review",changesHeading:"Changes",commentsHeading:"Review comments",empty:"No draft actions yet.",emptyHint:"Comments and structural patches both land here, and survive reload via LocalStorage.",emptyChanges:"No changes yet.",emptyChangesHint:"What you edit, add or move on the page lands here and reaches the agent as a change.",emptyComments:"No review comments yet.",emptyCommentsHint:"Write what the agent should fix. Comments reach the agent with the changes and are not kept on the page.",sendToClaude:"Send to Claude",copy:"Copy changes & comments",copyTitle:"Copy the review to paste it to the agent",clear:"Clear all",deleteAction:"Delete this draft action",editComment:"Edit this comment",editLabel:"Edit the comment",saveEdit:"Save",cancelEdit:"Cancel",editHint:"Ctrl/Cmd + Enter to save, Esc to close",wholePage:"Whole page",comment:"Comment",sent:"Sent to Claude \u2713",copied:"Copied \u2713",copyFailed:"Could not copy"},ja:{heading:"\u30EC\u30D3\u30E5\u30FC\u30CE\u30FC\u30C8",rejected:"action \u3092\u53D7\u3051\u4ED8\u3051\u3089\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",commentLabel:"\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8",commentPlaceholder:"Agent \u306B\u76F4\u3057\u3066\u307B\u3057\u3044\u3053\u3068 / \u6C17\u3065\u304D\u3092\u66F8\u304F\uFF08\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8\u3068\u3057\u3066\u6E21\u308B\uFF09",detach:"\u7D10\u3065\u3051\u3092\u89E3\u9664",attachTo:t=>`\u3053\u306E ${t} \u306B\u7D10\u3065\u3051\u308B`,addNote:"\u30EC\u30D3\u30E5\u30FC\u306B\u8FFD\u52A0",changesHeading:"\u5909\u66F4",commentsHeading:"\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8",empty:"draft action \u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",emptyHint:"\u30B3\u30E1\u30F3\u30C8\u3082\u69CB\u9020\u306E\u5909\u66F4\u3082\u3053\u3053\u306B\u96C6\u307E\u308A\u3001LocalStorage \u306B\u6B8B\u308B\u306E\u3067\u30EA\u30ED\u30FC\u30C9\u3057\u3066\u3082\u6D88\u3048\u307E\u305B\u3093\u3002",emptyChanges:"\u5909\u66F4\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",emptyChangesHint:"\u30DA\u30FC\u30B8\u4E0A\u3067\u7DE8\u96C6\u30FB\u8FFD\u52A0\u30FB\u79FB\u52D5\u3057\u305F\u5185\u5BB9\u304C\u3053\u3053\u306B\u96C6\u307E\u308A\u3001\u5909\u66F4\u3068\u3057\u3066 Agent \u306B\u6E21\u308A\u307E\u3059\u3002",emptyComments:"\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",emptyCommentsHint:"Agent \u306B\u76F4\u3057\u3066\u307B\u3057\u3044\u3053\u3068\u3092\u66F8\u304D\u307E\u3059\u3002\u5909\u66F4\u3068\u4E00\u7DD2\u306B Agent \u306B\u6E21\u308A\u3001\u30DA\u30FC\u30B8\u306B\u306F\u6B8B\u308A\u307E\u305B\u3093\u3002",sendToClaude:"Claude \u306B\u9001\u308B",copy:"\u5909\u66F4\u30FB\u30B3\u30E1\u30F3\u30C8\u3092\u30B3\u30D4\u30FC",copyTitle:"Review \u3092\u30B3\u30D4\u30FC\u3057\u3066 Agent \u306B\u8CBC\u308A\u4ED8\u3051\u308B",clear:"\u3059\u3079\u3066\u30AF\u30EA\u30A2",deleteAction:"\u3053\u306E draft action \u3092\u524A\u9664",editComment:"\u3053\u306E\u30B3\u30E1\u30F3\u30C8\u3092\u7DE8\u96C6",editLabel:"\u30B3\u30E1\u30F3\u30C8\u3092\u7DE8\u96C6",saveEdit:"\u4FDD\u5B58",cancelEdit:"\u30AD\u30E3\u30F3\u30BB\u30EB",editHint:"Ctrl/Cmd + Enter \u3067\u4FDD\u5B58\u3001Esc \u3067\u9589\u3058\u308B",wholePage:"\u30DA\u30FC\u30B8\u5168\u4F53",comment:"\u30B3\u30E1\u30F3\u30C8",sent:"Claude \u306B\u9001\u308A\u307E\u3057\u305F \u2713",copied:"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F \u2713",copyFailed:"\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"}}),sd=()=>({body:"",editing:null,attachment:{kind:"page"},copy:{kind:"idle"},copyRequest:0,send:{kind:"idle"},sendRequest:0}),$i=t=>t.kind==="explicit"?{kind:t.resume}:t,Si=(t,e)=>{switch(e.kind){case"input":return{...t,body:e.body};case"attach":return{...t,attachment:{kind:e.current?"current":"page"}};case"clear-target":return{...t,attachment:$i(t.attachment)};case"edit-start":return{...t,editing:{id:e.id,body:e.body}};case"edit-input":return t.editing?{...t,editing:{...t.editing,body:e.body}}:t;case"edit-cancel":case"edited":return{...t,editing:null};case"target-requested":return{...t,attachment:{kind:"explicit",ref:e.ref,resume:t.attachment.kind==="explicit"?t.attachment.resume:t.attachment.kind}};case"submitted":return{...t,body:"",attachment:$i(t.attachment),copy:{kind:"idle"},copyRequest:t.copyRequest+1,send:{kind:"idle"},sendRequest:t.sendRequest+1};case"copy-started":return{...t,copy:{kind:"pending"},copyRequest:t.copyRequest+1,send:{kind:"idle"},sendRequest:t.sendRequest+1};case"copy-finished":return e.request!==t.copyRequest||t.copy.kind!=="pending"?t:{...t,copy:{kind:e.ok?"copied":"failed"}};case"send-started":return{...t,send:{kind:"pending"},sendRequest:t.sendRequest+1,copy:{kind:"idle"},copyRequest:t.copyRequest+1};case"send-finished":return e.request!==t.sendRequest||t.send.kind!=="pending"?t:{...t,send:e.outcome.ok?{kind:"sent"}:{kind:"failed",reason:e.outcome.reason}}}},rd=(t,e)=>{const n=t.body.trim();return n===""?null:{target:e,body:n}},id=t=>{if(!t.editing)return null;const e=t.editing.body.trim();return e===""?null:{id:t.editing.id,body:e}},od={en:"English",ja:"\u65E5\u672C\u8A9E"},z=zt({en:{review:"Review",reviewChanges:"Activity log",reviewComments:"Review comments",settings:"Settings",useLightTheme:"Switch to light theme",useDarkTheme:"Switch to dark theme",language:"Language",versionLabel:"dev-process-kit version (reloads the page)",versionPinned:"Pinned by the page",versionLatest:t=>`${t} (latest)`,resizeSidebar:"Resize sidebar",resizeSidebarHint:"Drag to resize. Double-click to reset",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",baseDataError:"Could not read the base data (showing an empty page)",memo:"Memo",supplements:"Supplements",openSupplements:"Open supplements",closeSupplements:"Close supplements",handoffTooLarge:"The review is too long to send. Copy it and paste it instead",handoffConsent:"Commenting needs your permission. Allow it, then send again",handoffForbidden:"This page cannot send to Claude. Copy the review and paste it instead",handoffClaudeUnavailable:"Could not reach the Claude session. Copy the review and paste it instead",handoffRateLimited:"Too many sends in a row. Wait a moment, then send again",handoffStorage:"Could not save the review. Copy it and paste it instead",handoffError:"Could not send. Copy the review and paste it instead",handoffLabel:"Hand the review to the agent",handoffSend:"Send to Claude",handoffSending:"Sending\u2026",handoffSent:"Sent to Claude \u2713",handoffCopy:"Copy changes & comments",handoffCopyTitle:"Copy the review to paste it to the agent",handoffCopied:"Copied \u2713",handoffCopyFailed:"Could not copy",changes:"Updates",changesUnread:t=>`Updates (${t} new)`,changesTitle:"Changes by version",changesCurrent:"This version",changesReadAll:"Mark all as read",changesNew:"New",changesShow:"Show",changesDismiss:"Dismiss",changesWaiting:t=>`${t} more`,changesSeeAll:"See all",changesError:"Could not read the change log",grill:"Questions",grillError:"Could not read the questions",grillGroup:"Question",grillProgress:(t,e)=>`${t} of ${e} answered`,grillAnswer:"Answer",grillAnswerFree:"Answer in your own words",grillAnswerClear:"Clear answer",grillQuoted:t=>`\u2192 \u201C${t}\u201D`,grillOpen:t=>`Open question ${t}`,grillFreeText:"Your own answer",grillFreeTextOf:t=>`Your own answer to ${t}`,grillFreeTextPlaceholder:"Type an answer\u2026 (\u2318/Ctrl+Enter for next)",grillRoundSelect:"Question round",grillCurrentRound:"Current questions",grillRoundOption:(t,e)=>`${t} (${e})`,grillPastRound:t=>`${t}: earlier questions, read-only`,grillUnanswered:"Not answered",grillNoQuestions:"No questions in this round."},ja:{review:"\u30EC\u30D3\u30E5\u30FC",reviewChanges:"\u64CD\u4F5C\u30ED\u30B0",reviewComments:"\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8",settings:"\u8A2D\u5B9A",useLightTheme:"\u30E9\u30A4\u30C8\u30C6\u30FC\u30DE\u306B\u3059\u308B",useDarkTheme:"\u30C0\u30FC\u30AF\u30C6\u30FC\u30DE\u306B\u3059\u308B",language:"\u8A00\u8A9E",versionLabel:"dev-process-kit \u306E\u30D0\u30FC\u30B8\u30E7\u30F3\uFF08\u30DA\u30FC\u30B8\u3092\u518D\u8AAD\u307F\u8FBC\u307F\u3057\u307E\u3059\uFF09",versionPinned:"\u30DA\u30FC\u30B8\u6307\u5B9A\u306E\u30D0\u30FC\u30B8\u30E7\u30F3",versionLatest:t=>`${t}\uFF08\u6700\u65B0\uFF09`,resizeSidebar:"\u30B5\u30A4\u30C9\u30D0\u30FC\u306E\u5E45\u3092\u5909\u66F4",resizeSidebarHint:"\u30C9\u30E9\u30C3\u30B0\u3067\u5E45\u3092\u5909\u66F4\u3002\u30C0\u30D6\u30EB\u30AF\u30EA\u30C3\u30AF\u3067\u5143\u306B\u623B\u3059",collapseSidebar:"\u30B5\u30A4\u30C9\u30D0\u30FC\u3092\u6298\u308A\u305F\u305F\u3080",expandSidebar:"\u30B5\u30A4\u30C9\u30D0\u30FC\u3092\u958B\u304F",baseDataError:"base data \u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\uFF08\u7A7A\u306E\u30DA\u30FC\u30B8\u3068\u3057\u3066\u8868\u793A\u4E2D\uFF09",memo:"\u30E1\u30E2",supplements:"\u88DC\u8DB3\u60C5\u5831",openSupplements:"\u88DC\u8DB3\u60C5\u5831\u3092\u958B\u304F",closeSupplements:"\u88DC\u8DB3\u60C5\u5831\u3092\u9589\u3058\u308B",handoffTooLarge:"Review \u304C\u9577\u3059\u304E\u3066\u9001\u308C\u307E\u305B\u3093\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffConsent:"\u30B3\u30E1\u30F3\u30C8\u306E\u8A31\u53EF\u304C\u5FC5\u8981\u3067\u3059\u3002\u8A31\u53EF\u3057\u3066\u304B\u3089\u3082\u3046\u4E00\u5EA6\u9001\u3063\u3066\u304F\u3060\u3055\u3044",handoffForbidden:"\u3053\u306E\u30DA\u30FC\u30B8\u304B\u3089\u306F\u9001\u308C\u307E\u305B\u3093\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffClaudeUnavailable:"Claude \u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306B\u5C4A\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffRateLimited:"\u9001\u4FE1\u304C\u7D9A\u3044\u3066\u3044\u307E\u3059\u3002\u5C11\u3057\u5F85\u3063\u3066\u304B\u3089\u9001\u3063\u3066\u304F\u3060\u3055\u3044",handoffStorage:"Review \u3092\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffError:"\u9001\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffLabel:"Review \u3092 Agent \u306B\u6E21\u3059",handoffSend:"Claude \u306B\u9001\u308B",handoffSending:"\u9001\u4FE1\u4E2D\u2026",handoffSent:"Claude \u306B\u9001\u308A\u307E\u3057\u305F \u2713",handoffCopy:"\u5909\u66F4\u30FB\u30B3\u30E1\u30F3\u30C8\u3092\u30B3\u30D4\u30FC",handoffCopyTitle:"Review \u3092\u30B3\u30D4\u30FC\u3057\u3066 Agent \u306B\u8CBC\u308A\u4ED8\u3051\u308B",handoffCopied:"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F \u2713",handoffCopyFailed:"\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F",changes:"\u66F4\u65B0\u306E\u304A\u77E5\u3089\u305B",changesUnread:t=>`\u66F4\u65B0\u306E\u304A\u77E5\u3089\u305B\uFF08\u65B0\u7740 ${t} \u4EF6\uFF09`,changesTitle:"\u7248\u3054\u3068\u306E\u5909\u66F4",changesCurrent:"\u3053\u306E\u7248",changesReadAll:"\u3059\u3079\u3066\u65E2\u8AAD\u306B\u3059\u308B",changesNew:"\u65B0\u7740",changesShow:"\u898B\u308B",changesDismiss:"\u9589\u3058\u308B",changesWaiting:t=>`\u307B\u304B ${t} \u4EF6`,changesSeeAll:"\u3059\u3079\u3066\u898B\u308B",changesError:"\u5909\u66F4\u306E\u4E00\u89A7\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F",grill:"\u8CEA\u554F",grillError:"\u8CEA\u554F\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F",grillGroup:"\u8CEA\u554F",grillProgress:(t,e)=>`\u56DE\u7B54\u6E08\u307F ${t} / ${e}`,grillAnswer:"\u56DE\u7B54",grillAnswerFree:"\u81EA\u7531\u8A18\u8FF0\u3067\u56DE\u7B54",grillAnswerClear:"\u56DE\u7B54\u3092\u30AF\u30EA\u30A2",grillQuoted:t=>`\u2192 \u300C${t}\u300D`,grillOpen:t=>`\u8CEA\u554F ${t} \u3092\u3072\u3089\u304F`,grillFreeText:"\u81EA\u7531\u8A18\u8FF0",grillFreeTextOf:t=>`${t} \u306E\u81EA\u7531\u8A18\u8FF0`,grillFreeTextPlaceholder:"\u56DE\u7B54\u3092\u5165\u529B\u2026\uFF08\u2318/Ctrl+Enter \u3067\u6B21\u3078\uFF09",grillRoundSelect:"\u8CEA\u554F\u306E\u30E9\u30A6\u30F3\u30C9",grillCurrentRound:"\u73FE\u5728\u306E\u8CEA\u554F",grillRoundOption:(t,e)=>`${t}\uFF08${e} \u554F\uFF09`,grillPastRound:t=>`${t}: \u904E\u53BB\u306E\u8CEA\u554F\uFF08\u95B2\u89A7\u306E\u307F\uFF09`,grillUnanswered:"\u672A\u56DE\u7B54",grillNoQuestions:"\u3053\u306E\u30E9\u30A6\u30F3\u30C9\u306B\u8CEA\u554F\u306F\u3042\u308A\u307E\u305B\u3093\u3002"}}),ad=4096,ld="reviews",Ai="Review from the page (dev-process-kit). Apply it to the base data and republish this artifact. Then answer with ArtifactComments `reply` in this thread: the reader sees only this thread, and the page never shows anything written to the database.",cd=t=>new TextEncoder().encode(t).length,dd=t=>t.replace(/[\u0000-\u0008\u000B-\u001F\u007F]/g,""),pd=t=>{const e=`${Ai}
|
|
806
|
+
|
|
807
|
+
${dd(t)}`;return cd(e)<=ad?e:null},hd=t=>`${Ai}
|
|
808
|
+
|
|
809
|
+
The brief is too long for a comment, so it is stored in this artifact's database: read the document \`${t}\` (\`brief\` is the review, \`draft\` the raw draft JSON).`,ud={consent_required:"consent",forbidden:"forbidden",not_granted:"forbidden",capability_disabled:"forbidden",capability_removed:"forbidden",claude_unavailable:"claude_unavailable",rate_limited:"rate_limited"},fd=t=>{const e=typeof t=="object"&&t!==null&&"code"in t?t.code:void 0;return(typeof e=="string"?ud[e]:void 0)??"error"},gd={too_large:"handoffTooLarge",consent:"handoffConsent",forbidden:"handoffForbidden",claude_unavailable:"handoffClaudeUnavailable",rate_limited:"handoffRateLimited",storage:"handoffStorage",error:"handoffError"},Ci=(t,e)=>z(e)[gd[t]],Ti=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,Ei=(t,e)=>{const{definition:n,state:s,navigation:r,derivation:i}=t,o=wi(t.locale),a=n.currentTarget?.(s,r)??null,l=e.attachment,d=l.kind==="explicit"?n.commentTargets(s,r).find(g=>g.value===l.ref):null,c=l.kind==="explicit"?{ref:l.ref,label:d?Ti(d):l.ref}:l.kind==="current"&&a?{ref:a.value,label:Ti(a)}:{ref:`page:${n.name}`,label:o.wholePage},p=new Map(i.stale.map(g=>[g.action.id,g.reason])),u=t.section??"all",f=i.actions.filter(g=>!J(g)||p.has(g.id)).map(g=>{const b=n.describe(g,s,i.base),x=g.type===B;return{kind:x?"comments":"changes",id:g.id,title:x?o.comment:b.title,targetLabel:b.targetLabel,tone:x?"comment":b.tone,text:{kind:x?"comment":"summary",body:x?ht(g):b.summary??""},code:x?null:n.serialize(g),stale:p.get(g.id)??null,edit:!x||t.editable!==!0?{kind:"none"}:e.editing?.id===g.id?{kind:"editing",body:e.editing.body,canSave:e.editing.body.trim().length>0}:{kind:"available"}}});return{body:e.body,target:c,attachment:l.kind==="explicit"?{kind:"explicit"}:a?{kind:"checkbox",checked:l.kind==="current",group:a.group??""}:{kind:"none"},canSubmit:e.body.trim().length>0,section:u,composer:u!=="changes",groups:["comments","changes"].filter(g=>u==="all"||u===g).map(g=>({kind:g,items:f.filter(b=>b.kind===g)})),hasDraft:i.actions.length>0,issues:t.issues.map(g=>`${g.path?`${g.path}: `:""}${g.message}`),send:t.sendable!==!0?"hidden":i.actions.length===0||e.send.kind==="pending"?"disabled":"ready",flash:e.send.kind==="sent"?o.sent:e.send.kind==="failed"?Ci(e.send.reason,t.locale):e.copy.kind==="copied"?o.copied:e.copy.kind==="failed"?o.copyFailed:""}},md=[Mt,Pn,ue`
|
|
810
|
+
:host {
|
|
811
|
+
display: flex;
|
|
812
|
+
flex-direction: column;
|
|
813
|
+
min-height: 0;
|
|
814
|
+
min-width: 0;
|
|
815
|
+
width: 100%;
|
|
816
|
+
background: var(--dpk-paper-raised);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
header {
|
|
820
|
+
position: relative;
|
|
821
|
+
z-index: 1;
|
|
822
|
+
display: flex;
|
|
823
|
+
align-items: center;
|
|
824
|
+
justify-content: space-between;
|
|
825
|
+
gap: 8px;
|
|
826
|
+
padding: 14px 16px 12px;
|
|
827
|
+
border-bottom: 1px solid var(--dpk-rule);
|
|
828
|
+
background: var(--dpk-glass);
|
|
829
|
+
backdrop-filter: blur(12px);
|
|
830
|
+
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
header h2 {
|
|
834
|
+
font-size: 13.5px;
|
|
835
|
+
font-weight: 660;
|
|
836
|
+
letter-spacing: -0.015em;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
.composer {
|
|
840
|
+
display: grid;
|
|
841
|
+
gap: 10px;
|
|
842
|
+
padding: 14px 16px 14px;
|
|
843
|
+
border-bottom: 1px solid var(--dpk-rule);
|
|
844
|
+
background: var(--dpk-paper-sunken);
|
|
845
|
+
box-shadow: inset 0 1px 3px var(--dpk-shade-1);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
.composer textarea {
|
|
849
|
+
min-height: 62px;
|
|
850
|
+
background: var(--dpk-paper-raised);
|
|
851
|
+
border-radius: var(--dpk-radius);
|
|
852
|
+
box-shadow:
|
|
853
|
+
var(--dpk-bevel),
|
|
854
|
+
inset 0 1px 2px var(--dpk-shade-1);
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/* Wraps on a narrow rail rather than pushing the add button out of it. */
|
|
858
|
+
.composer .row {
|
|
859
|
+
display: flex;
|
|
860
|
+
flex-wrap: wrap;
|
|
861
|
+
align-items: center;
|
|
862
|
+
gap: 8px;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.composer .attach {
|
|
866
|
+
display: inline-flex;
|
|
867
|
+
align-items: center;
|
|
868
|
+
gap: 7px;
|
|
869
|
+
font-size: 12px;
|
|
870
|
+
color: var(--dpk-ink-soft);
|
|
871
|
+
cursor: pointer;
|
|
872
|
+
transition: color 140ms var(--dpk-ease);
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
.composer .attach:hover {
|
|
876
|
+
color: var(--dpk-ink);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
.composer .attach input {
|
|
880
|
+
width: 14px;
|
|
881
|
+
height: 14px;
|
|
882
|
+
margin: 0;
|
|
883
|
+
accent-color: var(--dpk-accent);
|
|
884
|
+
cursor: pointer;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
.composer .chip {
|
|
888
|
+
display: inline-flex;
|
|
889
|
+
align-items: center;
|
|
890
|
+
gap: 6px;
|
|
891
|
+
padding: 3px 10px;
|
|
892
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
893
|
+
border-radius: 999px;
|
|
894
|
+
background: var(--dpk-paper-raised);
|
|
895
|
+
box-shadow: var(--dpk-shadow-xs);
|
|
896
|
+
font-size: 11.5px;
|
|
897
|
+
cursor: pointer;
|
|
898
|
+
transition:
|
|
899
|
+
border-color 140ms var(--dpk-ease),
|
|
900
|
+
box-shadow 140ms var(--dpk-ease),
|
|
901
|
+
transform 140ms var(--dpk-ease);
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
.composer .chip svg {
|
|
905
|
+
flex: none;
|
|
906
|
+
width: 12px;
|
|
907
|
+
height: 12px;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.composer .chip:hover {
|
|
911
|
+
border-color: color-mix(in srgb, var(--dpk-accent) 45%, var(--dpk-rule-strong));
|
|
912
|
+
box-shadow: var(--dpk-shadow-sm);
|
|
913
|
+
transform: translateY(-1px);
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
.target-line {
|
|
917
|
+
min-width: 0;
|
|
918
|
+
margin-right: auto;
|
|
919
|
+
overflow-wrap: anywhere;
|
|
920
|
+
padding: 3px 9px;
|
|
921
|
+
border-radius: 999px;
|
|
922
|
+
background: var(--dpk-paper-inset);
|
|
923
|
+
font-family: var(--dpk-mono);
|
|
924
|
+
font-size: 10px;
|
|
925
|
+
letter-spacing: 0.03em;
|
|
926
|
+
color: var(--dpk-ink-faint);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
.groups {
|
|
930
|
+
/* The page's hand-off dock may float over the bottom of the list. */
|
|
931
|
+
padding: 10px 12px calc(10px + var(--dpk-dock-clearance, 0px));
|
|
932
|
+
overflow: auto;
|
|
933
|
+
flex: 1;
|
|
934
|
+
min-height: 0;
|
|
935
|
+
display: grid;
|
|
936
|
+
grid-template-columns: minmax(0, 1fr);
|
|
937
|
+
gap: 14px;
|
|
938
|
+
align-content: start;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
.group {
|
|
942
|
+
display: grid;
|
|
943
|
+
grid-template-columns: minmax(0, 1fr);
|
|
944
|
+
gap: 8px;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
.group-head {
|
|
948
|
+
display: flex;
|
|
949
|
+
align-items: center;
|
|
950
|
+
gap: 6px;
|
|
951
|
+
margin: 0;
|
|
952
|
+
padding: 0 2px;
|
|
953
|
+
font-size: 11px;
|
|
954
|
+
font-weight: 650;
|
|
955
|
+
letter-spacing: 0.02em;
|
|
956
|
+
color: var(--dpk-ink-soft);
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
.group-count {
|
|
960
|
+
padding: 0 6px;
|
|
961
|
+
border-radius: 999px;
|
|
962
|
+
background: var(--dpk-paper-inset);
|
|
963
|
+
font-family: var(--dpk-mono);
|
|
964
|
+
font-size: 10px;
|
|
965
|
+
color: var(--dpk-ink-faint);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
.list {
|
|
969
|
+
list-style: none;
|
|
970
|
+
margin: 0;
|
|
971
|
+
padding: 0;
|
|
972
|
+
display: grid;
|
|
973
|
+
/* One unbroken comment must not widen the column every item shares. */
|
|
974
|
+
grid-template-columns: minmax(0, 1fr);
|
|
975
|
+
gap: 8px;
|
|
976
|
+
align-content: start;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
.item {
|
|
980
|
+
position: relative;
|
|
981
|
+
display: grid;
|
|
982
|
+
grid-template-columns: minmax(0, 1fr);
|
|
983
|
+
gap: 5px;
|
|
984
|
+
padding: 10px 12px 11px;
|
|
985
|
+
border: 1px solid var(--dpk-rule);
|
|
986
|
+
border-radius: var(--dpk-radius);
|
|
987
|
+
background: var(--dpk-paper-raised);
|
|
988
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
989
|
+
transition:
|
|
990
|
+
box-shadow 160ms var(--dpk-ease),
|
|
991
|
+
border-color 160ms var(--dpk-ease),
|
|
992
|
+
transform 160ms var(--dpk-ease);
|
|
993
|
+
animation: dpk-item-in 200ms var(--dpk-ease) backwards;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
@keyframes dpk-item-in {
|
|
997
|
+
from {
|
|
998
|
+
opacity: 0;
|
|
999
|
+
transform: translateY(3px);
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
.item:hover {
|
|
1004
|
+
border-color: var(--dpk-rule-hover);
|
|
1005
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
1006
|
+
transform: translateY(-1px);
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
.item[data-tone='comment'] {
|
|
1010
|
+
--tone: var(--dpk-accent);
|
|
1011
|
+
background: linear-gradient(var(--dpk-accent-soft), var(--dpk-accent-soft)), var(--dpk-paper-raised);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
.item[data-tone='create'] {
|
|
1015
|
+
--tone: var(--dpk-green);
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
.item[data-tone='update'] {
|
|
1019
|
+
--tone: var(--dpk-blue);
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
.item[data-tone='delete'] {
|
|
1023
|
+
--tone: var(--dpk-accent);
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
.item[data-tone='move'] {
|
|
1027
|
+
--tone: var(--dpk-violet);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.item[data-stale='true'] {
|
|
1031
|
+
opacity: 0.62;
|
|
1032
|
+
border-style: dashed;
|
|
1033
|
+
box-shadow: none;
|
|
1034
|
+
transform: none;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
.item-head {
|
|
1038
|
+
display: flex;
|
|
1039
|
+
align-items: center;
|
|
1040
|
+
gap: 7px;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.item-icon {
|
|
1044
|
+
display: inline-flex;
|
|
1045
|
+
flex: none;
|
|
1046
|
+
align-items: center;
|
|
1047
|
+
justify-content: center;
|
|
1048
|
+
width: 18px;
|
|
1049
|
+
height: 18px;
|
|
1050
|
+
border-radius: var(--dpk-radius-xs);
|
|
1051
|
+
background: color-mix(in srgb, var(--tone, var(--dpk-ink-faint)) 16%, transparent);
|
|
1052
|
+
color: var(--tone, var(--dpk-ink-faint));
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
.item-icon svg {
|
|
1056
|
+
display: block;
|
|
1057
|
+
width: 11px;
|
|
1058
|
+
height: 11px;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.item-title {
|
|
1062
|
+
font-size: 12.5px;
|
|
1063
|
+
font-weight: 600;
|
|
1064
|
+
letter-spacing: -0.005em;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
.stale-badge {
|
|
1068
|
+
padding: 1px 7px;
|
|
1069
|
+
border: 1px solid color-mix(in srgb, var(--dpk-amber) 40%, transparent);
|
|
1070
|
+
border-radius: 999px;
|
|
1071
|
+
background: var(--dpk-amber-soft);
|
|
1072
|
+
font-family: var(--dpk-mono);
|
|
1073
|
+
font-size: 9px;
|
|
1074
|
+
letter-spacing: 0.06em;
|
|
1075
|
+
text-transform: uppercase;
|
|
1076
|
+
color: var(--dpk-amber);
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.item-head .dpk-icon-btn {
|
|
1080
|
+
margin-left: auto;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
/* Edit and delete sit together at the end of the row. */
|
|
1084
|
+
.item-head .item-edit + .dpk-icon-btn {
|
|
1085
|
+
margin-left: -4px;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
.item-target {
|
|
1089
|
+
display: inline-flex;
|
|
1090
|
+
align-items: center;
|
|
1091
|
+
width: fit-content;
|
|
1092
|
+
padding: 1px 7px;
|
|
1093
|
+
border-radius: var(--dpk-radius-xs);
|
|
1094
|
+
background: var(--dpk-paper-sunken);
|
|
1095
|
+
font-family: var(--dpk-mono);
|
|
1096
|
+
font-size: 10px;
|
|
1097
|
+
color: var(--dpk-ink-faint);
|
|
1098
|
+
overflow-wrap: anywhere;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
.item-summary {
|
|
1102
|
+
font-size: 12px;
|
|
1103
|
+
color: var(--dpk-ink-soft);
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
.item-body {
|
|
1107
|
+
margin: 2px 0 0;
|
|
1108
|
+
font-size: 12.5px;
|
|
1109
|
+
white-space: pre-wrap;
|
|
1110
|
+
overflow-wrap: anywhere;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
.item-editor {
|
|
1114
|
+
display: grid;
|
|
1115
|
+
gap: 8px;
|
|
1116
|
+
margin-top: 2px;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
.item-editor textarea {
|
|
1120
|
+
min-height: 62px;
|
|
1121
|
+
background: var(--dpk-paper-raised);
|
|
1122
|
+
border-radius: var(--dpk-radius);
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
.item-editor-actions {
|
|
1126
|
+
display: flex;
|
|
1127
|
+
justify-content: flex-end;
|
|
1128
|
+
gap: 6px;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
.item-code {
|
|
1132
|
+
margin-top: 2px;
|
|
1133
|
+
padding: 5px 7px;
|
|
1134
|
+
border-radius: var(--dpk-radius-xs);
|
|
1135
|
+
background: var(--dpk-paper-sunken);
|
|
1136
|
+
font-family: var(--dpk-mono);
|
|
1137
|
+
font-size: 10px;
|
|
1138
|
+
color: var(--dpk-ink-faint);
|
|
1139
|
+
overflow-wrap: anywhere;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
.empty {
|
|
1143
|
+
flex: 1;
|
|
1144
|
+
min-height: 0;
|
|
1145
|
+
overflow: auto;
|
|
1146
|
+
padding: 14px 16px calc(14px + var(--dpk-dock-clearance, 0px));
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
.empty-box {
|
|
1150
|
+
display: grid;
|
|
1151
|
+
justify-items: center;
|
|
1152
|
+
gap: 6px;
|
|
1153
|
+
padding: 26px 16px;
|
|
1154
|
+
border: 1px dashed var(--dpk-rule-strong);
|
|
1155
|
+
border-radius: var(--dpk-radius-lg);
|
|
1156
|
+
background: var(--dpk-paper-sunken);
|
|
1157
|
+
text-align: center;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
.empty-box svg {
|
|
1161
|
+
width: 20px;
|
|
1162
|
+
height: 20px;
|
|
1163
|
+
color: var(--dpk-ink-faint);
|
|
1164
|
+
opacity: 0.7;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
.empty-box p {
|
|
1168
|
+
margin: 0;
|
|
1169
|
+
font-size: 12px;
|
|
1170
|
+
line-height: 1.6;
|
|
1171
|
+
color: var(--dpk-ink-soft);
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
.empty-box .empty-hint {
|
|
1175
|
+
max-width: 30ch;
|
|
1176
|
+
color: var(--dpk-ink-faint);
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
.issues {
|
|
1180
|
+
margin: 10px 12px 0;
|
|
1181
|
+
padding: 9px 11px 9px 13px;
|
|
1182
|
+
border: 1px solid color-mix(in srgb, var(--dpk-danger) 35%, transparent);
|
|
1183
|
+
border-radius: var(--dpk-radius-sm);
|
|
1184
|
+
background: linear-gradient(90deg, var(--dpk-danger) 0 3px, transparent 3px), var(--dpk-danger-soft);
|
|
1185
|
+
font-size: 11.5px;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
.issues strong {
|
|
1189
|
+
color: var(--dpk-danger);
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
.issues ul {
|
|
1193
|
+
margin: 4px 0 0;
|
|
1194
|
+
padding-left: 16px;
|
|
1195
|
+
color: var(--dpk-ink-soft);
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
footer {
|
|
1199
|
+
display: flex;
|
|
1200
|
+
flex-wrap: wrap;
|
|
1201
|
+
align-items: center;
|
|
1202
|
+
gap: 8px;
|
|
1203
|
+
padding: 12px 16px;
|
|
1204
|
+
border-top: 1px solid var(--dpk-rule);
|
|
1205
|
+
background: var(--dpk-glass);
|
|
1206
|
+
backdrop-filter: blur(12px);
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
.footer-actions {
|
|
1210
|
+
display: flex;
|
|
1211
|
+
align-items: center;
|
|
1212
|
+
gap: 6px;
|
|
1213
|
+
flex-wrap: wrap;
|
|
1214
|
+
margin-left: auto;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
.flash {
|
|
1218
|
+
font-family: var(--dpk-mono);
|
|
1219
|
+
font-size: 10px;
|
|
1220
|
+
letter-spacing: 0.04em;
|
|
1221
|
+
color: var(--dpk-green);
|
|
1222
|
+
}
|
|
1223
|
+
`],Ri=(t,e,n)=>{const s=new Map;for(let r=e;r<=n;r++)s.set(t[r],r);return s},Me=rt(class extends _t{constructor(t){if(super(t),t.type!==me.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,n){let s;n===void 0?n=e:e!==void 0&&(s=e);const r=[],i=[];let o=0;for(const a of t)r[o]=s?s(a,o):o,i[o]=n(a,o),o++;return{values:i,keys:r}}render(t,e,n){return this.dt(t,e,n).values}update(t,[e,n,s]){const r=el(t),{values:i,keys:o}=this.dt(e,n,s);if(!Array.isArray(r))return this.ut=o,i;const a=this.ut??=[],l=[];let d,c,p=0,u=r.length-1,h=0,f=i.length-1;for(;p<=u&&h<=f;)if(r[p]===null)p++;else if(r[u]===null)u--;else if(a[p]===o[h])l[h]=Te(r[p],i[h]),p++,h++;else if(a[u]===o[f])l[f]=Te(r[u],i[f]),u--,f--;else if(a[p]===o[f])l[f]=Te(r[p],i[f]),it(t,l[f+1],r[p]),p++,f--;else if(a[u]===o[h])l[h]=Te(r[u],i[h]),it(t,r[p],r[u]),u--,h++;else if(d===void 0&&(d=Ri(o,h,f),c=Ri(a,p,u)),d.has(a[p]))if(d.has(a[u])){const g=c.get(o[h]),b=g!==void 0?r[g]:null;if(b===null){const x=it(t,r[p]);Te(x,i[h]),l[h]=x}else l[h]=Te(b,i[h]),it(t,r[p],b),r[g]=null;h++}else En(r[u]),u--;else En(r[p]),p++;for(;h<=f;){const g=it(t,l[f+1]);Te(g,i[h]),l[h++]=g}for(;p<=u;){const g=r[p++];g!==null&&En(g)}return this.ut=o,Tn(t,l),K}});class os extends Ot{}os.directiveName="unsafeSVG",os.resultType=2;const kd=rt(os),_i=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]],Oi=[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]],Li=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]],Pi=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]],bd=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"}]],vd=[["path",{d:"M20 6 9 17l-5-5"}]],zi=[["path",{d:"m6 9 6 6 6-6"}]],xd=[["path",{d:"m15 18-6-6 6-6"}]],yd=[["path",{d:"m9 18 6-6-6-6"}]],Mi=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}],["path",{d:"M12 17h.01"}]],wd=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]],$d=[["circle",{cx:"9",cy:"12",r:"1"}],["circle",{cx:"9",cy:"5",r:"1"}],["circle",{cx:"9",cy:"19",r:"1"}],["circle",{cx:"15",cy:"12",r:"1"}],["circle",{cx:"15",cy:"5",r:"1"}],["circle",{cx:"15",cy:"19",r:"1"}]],Sd=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]],Ad=[["path",{d:"M15 3h6v6"}],["path",{d:"m21 3-7 7"}],["path",{d:"m3 21 7-7"}],["path",{d:"M9 21H3v-6"}]],Cd=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}],["path",{d:"M7 11h10"}],["path",{d:"M7 15h6"}],["path",{d:"M7 7h8"}]],Td=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]],Ed=[["path",{d:"m14 10 7-7"}],["path",{d:"M20 10h-6V4"}],["path",{d:"m3 21 7-7"}],["path",{d:"M4 14h6v6"}]],Rd=[["path",{d:"M5 12h14"}]],_d=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"}]],Od=[["path",{d:"M12 2v20"}],["path",{d:"m15 19-3 3-3-3"}],["path",{d:"m19 9 3 3-3 3"}],["path",{d:"M2 12h20"}],["path",{d:"m5 9-3 3 3 3"}],["path",{d:"m9 5 3-3 3 3"}]],Ld=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]],Pd=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]],zd=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}],["path",{d:"M12 7v5l4 2"}]],Md=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]],Id=[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]],Nd=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],Dd=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],jd=t=>t.replaceAll("&","&").replaceAll('"',"""),qd=t=>t.map(([e,n])=>`<${e}${Object.entries(n).map(([s,r])=>` ${s}="${jd(String(r))}"`).join("")}></${e}>`).join(""),T=t=>{const e=qd(t);return()=>m`<svg
|
|
1224
|
+
viewBox="0 0 24 24"
|
|
1225
|
+
fill="none"
|
|
1226
|
+
stroke="currentColor"
|
|
1227
|
+
stroke-width="2"
|
|
1228
|
+
stroke-linecap="round"
|
|
1229
|
+
stroke-linejoin="round"
|
|
1230
|
+
aria-hidden="true"
|
|
1231
|
+
focusable="false"
|
|
1232
|
+
>
|
|
1233
|
+
${kd(e)}
|
|
1234
|
+
</svg>`},Jt=T(Dd),Ii=T(Nd),as=T(Ld),Xt=T(Td),Bd=T(Cd),Hd=T(zd),Ud=T(Mi),Fd=T(Md),Ni=T(Sd),Wd=T(wd),Di=T(vd),ji=T(Pd),Gd=T(Rd),Vd=T($d),qi=T(Od),Kd=T(Pi),Qd=T(_i);T(Oi),T(Li);const Bi=T(xd),ft=T(yd),Zd=T(zi),Yd=T(Ad),Jd=T(Ed),Xd=T(Id),ep=T(_d),Hi=T(bd),tp=t=>{switch(t){case"comment":return Xt();case"create":return ji();case"update":return as();case"delete":return Ii();case"move":return qi();default:return Ni()}},np=(t,e,n,s=!1)=>m`
|
|
1235
|
+
${s?k:m`<header><h2>${sp(t,e.section)}</h2></header>`}
|
|
1236
|
+
${e.issues.length>0?m`<div class="issues" role="alert">
|
|
1237
|
+
<strong>${t.rejected}</strong>
|
|
1238
|
+
<ul>
|
|
1239
|
+
${e.issues.map(r=>m`<li>${r}</li>`)}
|
|
1240
|
+
</ul>
|
|
1241
|
+
</div>`:k}
|
|
1242
|
+
${e.composer?rp(t,e,n):k} ${ip(t,e,n)}
|
|
1243
|
+
<footer>
|
|
1244
|
+
${s||e.send==="hidden"?k:m`<button
|
|
1245
|
+
class="dpk-btn dpk-btn--accent"
|
|
1246
|
+
type="button"
|
|
1247
|
+
?disabled=${e.send==="disabled"}
|
|
1248
|
+
@click=${()=>n({kind:"send"})}
|
|
1249
|
+
>
|
|
1250
|
+
${t.sendToClaude}
|
|
1251
|
+
</button>`}
|
|
1252
|
+
<div class="footer-actions">
|
|
1253
|
+
${s?k:m`<button
|
|
1254
|
+
class=${e.send==="hidden"?"dpk-btn dpk-btn--accent":"dpk-btn"}
|
|
1255
|
+
type="button"
|
|
1256
|
+
title=${t.copyTitle}
|
|
1257
|
+
?disabled=${!e.hasDraft}
|
|
1258
|
+
@click=${()=>n({kind:"copy"})}
|
|
1259
|
+
>
|
|
1260
|
+
${t.copy}
|
|
1261
|
+
</button>`}
|
|
1262
|
+
<button
|
|
1263
|
+
class="dpk-btn dpk-btn--ghost"
|
|
1264
|
+
type="button"
|
|
1265
|
+
?disabled=${!e.hasDraft}
|
|
1266
|
+
@click=${()=>n({kind:"clear"})}
|
|
1267
|
+
>
|
|
1268
|
+
${t.clear}
|
|
1269
|
+
</button>
|
|
1270
|
+
</div>
|
|
1271
|
+
${e.flash?m`<span class="flash" role="status">${e.flash}</span>`:k}
|
|
1272
|
+
</footer>
|
|
1273
|
+
`,sp=(t,e)=>e==="changes"?t.changesHeading:e==="comments"?t.commentsHeading:t.heading,rp=(t,e,n)=>m`
|
|
1274
|
+
<div class="composer">
|
|
1275
|
+
<textarea
|
|
1276
|
+
class="dpk-textarea"
|
|
1277
|
+
aria-label=${t.commentLabel}
|
|
1278
|
+
placeholder=${t.commentPlaceholder}
|
|
1279
|
+
.value=${e.body}
|
|
1280
|
+
@input=${s=>{s.currentTarget instanceof HTMLTextAreaElement&&n({kind:"input",body:s.currentTarget.value})}}
|
|
1281
|
+
@keydown=${s=>{!s.isComposing&&s.key==="Enter"&&(s.metaKey||s.ctrlKey)&&(s.preventDefault(),n({kind:"submit"}))}}
|
|
1282
|
+
></textarea>
|
|
1283
|
+
${e.attachment.kind==="explicit"?m`<div class="row">
|
|
1284
|
+
<button class="chip" type="button" aria-label=${t.detach} @click=${()=>n({kind:"clear-target"})}>
|
|
1285
|
+
${e.target.label} ${Jt()}
|
|
1286
|
+
</button>
|
|
1287
|
+
</div>`:e.attachment.kind==="checkbox"?m`<div class="row">
|
|
1288
|
+
<label class="attach">
|
|
1289
|
+
<input
|
|
1290
|
+
type="checkbox"
|
|
1291
|
+
.checked=${e.attachment.checked}
|
|
1292
|
+
@change=${s=>{s.currentTarget instanceof HTMLInputElement&&n({kind:"attach",current:s.currentTarget.checked})}}
|
|
1293
|
+
/>
|
|
1294
|
+
<span>${t.attachTo(e.attachment.group)}</span>
|
|
1295
|
+
</label>
|
|
1296
|
+
</div>`:k}
|
|
1297
|
+
<div class="row">
|
|
1298
|
+
<span class="target-line">→ ${e.target.label}</span>
|
|
1299
|
+
<button
|
|
1300
|
+
class="dpk-btn dpk-btn--accent"
|
|
1301
|
+
type="button"
|
|
1302
|
+
?disabled=${!e.canSubmit}
|
|
1303
|
+
@click=${()=>n({kind:"submit"})}
|
|
1304
|
+
>
|
|
1305
|
+
${t.addNote}
|
|
1306
|
+
</button>
|
|
1307
|
+
</div>
|
|
1308
|
+
</div>
|
|
1309
|
+
`,ls=(t,e)=>m`<div class="empty">
|
|
1310
|
+
<div class="empty-box">
|
|
1311
|
+
${Xt()}
|
|
1312
|
+
<p>${t}</p>
|
|
1313
|
+
<p class="empty-hint">${e}</p>
|
|
1314
|
+
</div>
|
|
1315
|
+
</div>`,Ui=(t,e,n)=>m`<ul
|
|
1316
|
+
class="list"
|
|
1317
|
+
>
|
|
1318
|
+
${Me(e,s=>s.id,s=>op(t,s,n))}
|
|
1319
|
+
</ul>`,ip=(t,e,n)=>{const[s]=e.groups;return e.groups.length===1&&s?s.items.length>0?m`<div class="groups">${Ui(t,s.items,n)}</div>`:s.kind==="changes"?ls(t.emptyChanges,t.emptyChangesHint):ls(t.emptyComments,t.emptyCommentsHint):e.groups.every(r=>r.items.length===0)?ls(t.empty,t.emptyHint):m`<div class="groups">
|
|
1320
|
+
${e.groups.filter(r=>r.items.length>0).map(r=>m`<section class="group" data-kind=${r.kind}>
|
|
1321
|
+
<h3 class="group-head">
|
|
1322
|
+
${r.kind==="changes"?t.changesHeading:t.commentsHeading}
|
|
1323
|
+
<span class="group-count">${r.items.length}</span>
|
|
1324
|
+
</h3>
|
|
1325
|
+
${Ui(t,r.items,n)}
|
|
1326
|
+
</section>`)}
|
|
1327
|
+
</div>`},op=(t,e,n)=>m`
|
|
1328
|
+
<li class="item" data-tone=${e.tone} data-stale=${String(e.stale!==null)} data-id=${e.id}>
|
|
1329
|
+
<div class="item-head">
|
|
1330
|
+
<span class="item-icon">${tp(e.tone)}</span>
|
|
1331
|
+
<span class="item-title">${e.title}</span>
|
|
1332
|
+
${e.stale?m`<span class="stale-badge">${e.stale}</span>`:k}
|
|
1333
|
+
${e.edit.kind==="available"?m`<button
|
|
1334
|
+
class="dpk-icon-btn item-edit"
|
|
1335
|
+
type="button"
|
|
1336
|
+
aria-label=${t.editComment}
|
|
1337
|
+
title=${t.editComment}
|
|
1338
|
+
@click=${()=>n({kind:"edit-start",id:e.id,body:e.text.body})}
|
|
1339
|
+
>
|
|
1340
|
+
${as()}
|
|
1341
|
+
</button>`:k}
|
|
1342
|
+
<button
|
|
1343
|
+
class="dpk-icon-btn"
|
|
1344
|
+
type="button"
|
|
1345
|
+
aria-label=${t.deleteAction}
|
|
1346
|
+
@click=${()=>n({kind:"delete",id:e.id})}
|
|
1347
|
+
>
|
|
1348
|
+
${Jt()}
|
|
1349
|
+
</button>
|
|
1350
|
+
</div>
|
|
1351
|
+
<div class="item-target">${e.targetLabel}</div>
|
|
1352
|
+
${e.edit.kind==="editing"?ap(t,e.edit,n):e.text.kind==="comment"?m`<p class="item-body">${e.text.body}</p>`:e.text.body?m`<div class="item-summary">${e.text.body}</div>`:k}
|
|
1353
|
+
${e.code===null?k:m`<code class="item-code">${e.code}</code>`}
|
|
1354
|
+
</li>
|
|
1355
|
+
`,ap=(t,e,n)=>m`
|
|
1356
|
+
<div class="item-editor">
|
|
1357
|
+
<textarea
|
|
1358
|
+
class="dpk-textarea"
|
|
1359
|
+
aria-label=${t.editLabel}
|
|
1360
|
+
title=${t.editHint}
|
|
1361
|
+
.value=${e.body}
|
|
1362
|
+
@input=${s=>{s.currentTarget instanceof HTMLTextAreaElement&&n({kind:"edit-input",body:s.currentTarget.value})}}
|
|
1363
|
+
@keydown=${s=>{s.isComposing||(s.key==="Enter"&&(s.metaKey||s.ctrlKey)?(s.preventDefault(),n({kind:"edit-save"})):s.key==="Escape"&&(s.preventDefault(),s.stopPropagation(),n({kind:"edit-cancel"})))}}
|
|
1364
|
+
></textarea>
|
|
1365
|
+
<div class="row item-editor-actions">
|
|
1366
|
+
<button
|
|
1367
|
+
class="dpk-btn dpk-btn--ghost"
|
|
1368
|
+
type="button"
|
|
1369
|
+
data-dpk-text-discard
|
|
1370
|
+
@click=${()=>n({kind:"edit-cancel"})}
|
|
1371
|
+
>
|
|
1372
|
+
${t.cancelEdit}
|
|
1373
|
+
</button>
|
|
1374
|
+
<button
|
|
1375
|
+
class="dpk-btn dpk-btn--accent"
|
|
1376
|
+
type="button"
|
|
1377
|
+
?disabled=${!e.canSave}
|
|
1378
|
+
@click=${()=>n({kind:"edit-save"})}
|
|
1379
|
+
>
|
|
1380
|
+
${t.saveEdit}
|
|
1381
|
+
</button>
|
|
1382
|
+
</div>
|
|
1383
|
+
</div>
|
|
1384
|
+
`,lp=t=>t==="changes"||t==="comments"?t:"all";class Fi extends ge{static{this.styles=md}static{this.properties={definition:{attribute:!1},state:{attribute:!1},navigation:{attribute:!1},derivation:{attribute:!1},issues:{attribute:!1},pendingTarget:{attribute:!1},onDelete:{attribute:!1},onClear:{attribute:!1},onComment:{attribute:!1},onEditComment:{attribute:!1},exportBrief:{attribute:!1},sendToClaude:{attribute:!1},embedded:{type:Boolean},section:{type:String}}}#e=sd();#t=null;#n=new Ln(this);constructor(){super(),this.embedded=!1,this.definition=null,this.state=void 0,this.navigation={},this.derivation=null,this.issues=[],this.pendingTarget=null,this.section=null}willUpdate(e){e.has("pendingTarget")&&this.pendingTarget&&(this.#e=Si(this.#e,{kind:"target-requested",ref:this.pendingTarget}))}updated(e){e.has("pendingTarget")&&this.pendingTarget&&this.isConnected&&this.renderRoot.querySelector("textarea")?.focus();const n=this.#t;n&&(this.#t=null,[...this.renderRoot.querySelectorAll(".item")].find(r=>r.dataset.id===n.id)?.querySelector(n.kind==="editor"?".item-editor textarea":".item-edit")?.focus())}#r(){return!this.definition||!this.derivation?null:{definition:this.definition,state:this.state,navigation:this.navigation,derivation:this.derivation,issues:this.issues,sendable:this.sendToClaude!==void 0,editable:this.onEditComment!==void 0,locale:this.#n.locale,section:lp(this.section)}}render(){const e=this.#r();return e?np(wi(this.#n.locale),Ei(e,this.#e),this.#i,this.embedded):k}#s(e){this.#e=Si(this.#e,e),this.requestUpdate()}#i=e=>{switch(e.kind){case"delete":this.onDelete?.(e.id);return;case"clear":this.onClear?.();return;case"copy":this.#a();return;case"send":this.#o();return;case"edit-start":this.#t={kind:"editor",id:e.id},this.#s(e);return;case"edit-cancel":{const n=this.#e.editing;n&&(this.#t={kind:"edit-button",id:n.id}),this.#s(e);return}case"edit-save":{const n=id(this.#e);if(!n||!this.onEditComment||!this.onEditComment(n.id,n.body).ok)return;this.#t={kind:"edit-button",id:n.id},this.#s({kind:"edited"});return}case"submit":{const n=this.#r();if(!n||!this.onComment)return;const s=rd(this.#e,Ei(n,this.#e).target.ref);if(!s||!this.onComment(s.target,s.body).ok)return;this.#s({kind:"submitted"});return}default:this.#s(e)}};async#o(){const e=this.sendToClaude;if(!e||this.#e.send.kind==="pending")return;this.#s({kind:"send-started"});const n=this.#e.sendRequest,s=await e().catch(()=>({ok:!1,reason:"error"}));this.isConnected&&this.#s({kind:"send-finished",request:n,outcome:s})}async#a(){const e=this.#r();if(!e)return;this.#s({kind:"copy-started"});const n=this.#e.copyRequest;try{const s=this.exportBrief?.()??rs({...e.derivation,navigation:e.navigation,issues:e.issues},e.definition,te),r=await is(s);this.isConnected&&this.#s({kind:"copy-finished",request:n,ok:r})}catch{this.isConnected&&this.#s({kind:"copy-finished",request:n,ok:!1})}}}const cp=()=>{customElements.get("dpk-component-comment-panel")||customElements.define("dpk-component-comment-panel",Fi)},Qe=Math.min,ae=Math.max,en=Math.round,tn=Math.floor,le=t=>({x:t,y:t}),dp={left:"right",right:"left",bottom:"top",top:"bottom"};function pp(t,e,n){return ae(t,Qe(e,n))}function gt(t,e){return typeof t=="function"?t(e):t}function Ie(t){return t.split("-")[0]}function mt(t){return t.split("-")[1]}function Wi(t){return t==="x"?"y":"x"}function Gi(t){return t==="y"?"height":"width"}function ce(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Vi(t){return Wi(ce(t))}function hp(t,e,n){n===void 0&&(n=!1);const s=mt(t),r=Vi(t),i=Gi(r);let o=r==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=nn(o)),[o,nn(o)]}function up(t){const e=nn(t);return[cs(t),e,cs(e)]}function cs(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Ki=["left","right"],Qi=["right","left"],fp=["top","bottom"],gp=["bottom","top"];function mp(t,e,n){switch(t){case"top":case"bottom":return n?e?Qi:Ki:e?Ki:Qi;case"left":case"right":return e?fp:gp;default:return[]}}function kp(t,e,n,s){const r=mt(t);let i=mp(Ie(t),n==="start",s);return r&&(i=i.map(o=>o+"-"+r),e&&(i=i.concat(i.map(cs)))),i}function nn(t){const e=Ie(t);return dp[e]+t.slice(e.length)}function bp(t){var e,n,s,r;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(s=t.bottom)!=null?s:0,left:(r=t.left)!=null?r:0}}function vp(t){return typeof t!="number"?bp(t):{top:t,right:t,bottom:t,left:t}}function sn(t){const{x:e,y:n,width:s,height:r}=t;return{width:s,height:r,top:n,left:e,right:e+s,bottom:n+r,x:e,y:n}}function Zi(t,e,n){let{reference:s,floating:r}=t;const i=ce(e),o=Vi(e),a=Gi(o),l=Ie(e),d=i==="y",c=s.x+s.width/2-r.width/2,p=s.y+s.height/2-r.height/2,u=s[a]/2-r[a]/2;let h;switch(l){case"top":h={x:c,y:s.y-r.height};break;case"bottom":h={x:c,y:s.y+s.height};break;case"right":h={x:s.x+s.width,y:p};break;case"left":h={x:s.x-r.width,y:p};break;default:h={x:s.x,y:s.y}}const f=mt(e);return f&&(h[o]+=u*(f==="end"?1:-1)*(n&&d?-1:1)),h}async function xp(t,e){var n;e===void 0&&(e={});const{x:s,y:r,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:u=!1,padding:h=0}=gt(e,t),f=vp(h),b=a[u?p==="floating"?"reference":"floating":p],x=sn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),S=p==="floating"?{x:s,y:r,width:o.floating.width,height:o.floating.height}:o.reference,A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(A))&&await(i.getScale==null?void 0:i.getScale(A))||{x:1,y:1},H=sn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:A,strategy:l}):S);return{top:(x.top-H.top+f.top)/_.y,bottom:(H.bottom-x.bottom+f.bottom)/_.y,left:(x.left-H.left+f.left)/_.x,right:(H.right-x.right+f.right)/_.x}}const yp=50,wp=async(t,e,n)=>{const{placement:s="bottom",strategy:r="absolute",middleware:i=[],platform:o}=n,a=o.detectOverflow?o:{...o,detectOverflow:xp},l=await(o.isRTL==null?void 0:o.isRTL(e));let d=await o.getElementRects({reference:t,floating:e,strategy:r}),{x:c,y:p}=Zi(d,s,l),u=s,h=0;const f={};for(let g=0;g<i.length;g++){const b=i[g];if(!b)continue;const{name:x,fn:S}=b,{x:A,y:_,data:H,reset:L}=await S({x:c,y:p,initialPlacement:s,placement:u,strategy:r,middlewareData:f,rects:d,platform:a,elements:{reference:t,floating:e}});c=A??c,p=_??p,f[x]={...f[x],...H},L&&h<yp&&(h++,typeof L=="object"&&(L.placement&&(u=L.placement),L.rects&&(d=L.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:r}):L.rects),{x:c,y:p}=Zi(d,u,l)),g=-1)}return{x:c,y:p,placement:u,strategy:r,middlewareData:f}},$p=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,s;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:d}=e,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...b}=gt(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Ie(r),S=ce(a),A=Ie(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(d.floating)),H=u||(A||!g?[nn(a)]:up(a)),L=f!=="none";!u&&L&&H.push(...kp(a,g,f,_));const V=[a,...H],q=await l.detectOverflow(e,b),re=[];let X=((s=i.flip)==null?void 0:s.overflows)||[];if(c&&re.push(q[x]),p){const we=hp(r,o,_);re.push(q[we[0]],q[we[1]])}if(X=[...X,{placement:r,overflows:re}],!re.every(we=>we<=0)){var Us,Fs;const we=(((Us=i.flip)==null?void 0:Us.index)||0)+1,bn=V[we];if(bn&&(!(p==="alignment"?S!==ce(bn):!1)||X.every(Q=>ce(Q.placement)===S?Q.overflows[0]>0:!0)))return{data:{index:we,overflows:X},reset:{placement:bn}};let Xe=(Fs=X.filter($e=>$e.overflows[0]<=0).sort(($e,Q)=>$e.overflows[1]-Q.overflows[1])[0])==null?void 0:Fs.placement;if(!Xe)switch(h){case"bestFit":{var Ws;const $e=(Ws=X.filter(Q=>{if(L){const he=ce(Q.placement);return he===S||he==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(he=>he>0).reduce((he,Ea)=>he+Ea,0)]).sort((Q,he)=>Q[1]-he[1])[0])==null?void 0:Ws[0];$e&&(Xe=$e);break}case"initialPlacement":Xe=a;break}if(r!==Xe)return{reset:{placement:Xe}}}return{}}}},Sp=new Set(["left","top"]);async function Ap(t,e){const{placement:n,platform:s,elements:r}=t,i=await(s.isRTL==null?void 0:s.isRTL(r.floating)),o=Ie(n),a=mt(n),l=ce(n)==="y",d=Sp.has(o)?-1:1,c=i&&l?-1:1,p=gt(e,t);let{mainAxis:u,crossAxis:h,alignmentAxis:f}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof f=="number"&&(h=a==="end"?f*-1:f),l?{x:h*c,y:u*d}:{x:u*d,y:h*c}}const Cp=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,s;const{x:r,y:i,placement:o,middlewareData:a}=e,l=await Ap(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(s=a.arrow)!=null&&s.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:o}}}}},Tp=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:s,placement:r,platform:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:S=>{let{x:A,y:_}=S;return{x:A,y:_}}},...d}=gt(t,e),c={x:n,y:s},p=await i.detectOverflow(e,d),u=ce(r),h=Wi(u);let f=c[h],g=c[u];const b=(S,A)=>pp(A+p[S==="y"?"top":"left"],A,A-p[S==="y"?"bottom":"right"]);o&&(f=b(h,f)),a&&(g=b(u,g));const x=l.fn({...e,[h]:f,[u]:g});return{...x,data:{x:x.x-n,y:x.y-s,enabled:{[h]:o,[u]:a}}}}}},Ep=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:s,platform:r,elements:i}=e,{apply:o=()=>{},...a}=gt(t,e),l=await r.detectOverflow(e,a),d=Ie(n),c=mt(n),p=ce(n)==="y",{width:u,height:h}=s.floating;let f,g;d==="top"||d==="bottom"?(f=d,g=c===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(g=d,f=c==="end"?"top":"bottom");const b=h-l.top-l.bottom,x=u-l.left-l.right,S=Qe(h-l[f],b),A=Qe(u-l[g],x),_=e.middlewareData.shift,H=!_;let L=S,V=A;_!=null&&_.enabled.x&&(V=x),_!=null&&_.enabled.y&&(L=b),H&&!c&&(p?V=u-2*ae(l.left,l.right):L=h-2*ae(l.top,l.bottom)),await o({...e,availableWidth:V,availableHeight:L});const q=await r.getDimensions(i.floating);return u!==q.width||h!==q.height?{reset:{rects:!0}}:{}}}};function rn(){return typeof window<"u"}function Ze(t){return Yi(t)?(t.nodeName||"").toLowerCase():"#document"}function F(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function de(t){var e;return(e=(Yi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Yi(t){return rn()?t instanceof Node||t instanceof F(t).Node:!1}function ne(t){return rn()?t instanceof Element||t instanceof F(t).Element:!1}function xe(t){return rn()?t instanceof HTMLElement||t instanceof F(t).HTMLElement:!1}function Ji(t){return!rn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof F(t).ShadowRoot}function on(t){const{overflow:e,overflowX:n,overflowY:s,display:r}=se(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&r!=="inline"&&r!=="contents"}function Rp(t){return/^(table|td|th)$/.test(Ze(t))}function an(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const _p=/transform|translate|scale|rotate|perspective|filter/,Op=/paint|layout|strict|content/,Ne=t=>!!t&&t!=="none";let ds;function ps(t){const e=ne(t)?se(t):t;return Ne(e.transform)||Ne(e.translate)||Ne(e.scale)||Ne(e.rotate)||Ne(e.perspective)||!hs()&&(Ne(e.backdropFilter)||Ne(e.filter))||_p.test(e.willChange||"")||Op.test(e.contain||"")}function Lp(t){let e=De(t);for(;xe(e)&&!kt(e);){if(ps(e))return e;if(an(e))return null;e=De(e)}return null}function hs(){return ds==null&&(ds=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ds}function kt(t){return/^(html|body|#document)$/.test(Ze(t))}function se(t){return F(t).getComputedStyle(t)}function ln(t){return ne(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function De(t){if(Ze(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ji(t)&&t.host||de(t);return Ji(e)?e.host:e}function Xi(t){const e=De(t);return kt(e)?(t.ownerDocument||t).body:xe(e)&&on(e)?e:Xi(e)}function bt(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Xi(t),i=r===((s=t.ownerDocument)==null?void 0:s.body),o=F(r);if(i){const a=us(o);return e.concat(o,o.visualViewport||[],on(r)?r:[],a&&n?bt(a):[])}else return e.concat(r,bt(r,[],n))}function us(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function eo(t){const e=se(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const r=xe(t),i=r?t.offsetWidth:n,o=r?t.offsetHeight:s,a=en(n)!==i||en(s)!==o;return a&&(n=i,s=o),{width:n,height:s,$:a}}function fs(t){return ne(t)?t:t.contextElement}function Ye(t){const e=fs(t);if(!xe(e))return le(1);const n=e.getBoundingClientRect(),{width:s,height:r,$:i}=eo(e);let o=(i?en(n.width):n.width)/s,a=(i?en(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Pp=le(0);function to(t){const e=F(t);return!hs()||!e.visualViewport?Pp:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function zp(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===F(t)}function je(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=fs(t);let o=le(1);e&&(s?ne(s)&&(o=Ye(s)):o=Ye(t));const a=zp(i,n,s)?to(i):le(0);let l=(r.left+a.x)/o.x,d=(r.top+a.y)/o.y,c=r.width/o.x,p=r.height/o.y;if(i&&s){const u=F(i),h=ne(s)?F(s):s;let f=u,g=us(f);for(;g&&h!==f;){const b=Ye(g),x=g.getBoundingClientRect(),S=se(g),A=x.left+(g.clientLeft+parseFloat(S.paddingLeft))*b.x,_=x.top+(g.clientTop+parseFloat(S.paddingTop))*b.y;l*=b.x,d*=b.y,c*=b.x,p*=b.y,l+=A,d+=_,f=F(g),g=us(f)}}return sn({width:c,height:p,x:l,y:d})}function cn(t,e){const n=ln(t).scrollLeft;return e?e.left+n:je(de(t)).left+n}function no(t,e){const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-cn(t,n),r=n.top+e.scrollTop;return{x:s,y:r}}function Mp(t){let{elements:e,rect:n,offsetParent:s,strategy:r}=t;const i=r==="fixed",o=de(s),a=e?an(e.floating):!1;if(s===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},d=le(1);const c=le(0),p=xe(s);if((p||!i)&&((Ze(s)!=="body"||on(o))&&(l=ln(s)),p)){const h=je(s);d=Ye(s),c.x=h.x+s.clientLeft,c.y=h.y+s.clientTop}const u=o&&!p&&!i?no(o,l):le(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+c.x+u.x,y:n.y*d.y-l.scrollTop*d.y+c.y+u.y}}function Ip(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Np(t){const e=ln(t),n=t.ownerDocument.body,s=ae(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=ae(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+cn(t);const o=-e.scrollTop;return se(n).direction==="rtl"&&(i+=ae(t.clientWidth,n.clientWidth)-s),{width:s,height:r,x:i,y:o}}const Dp=25;function jp(t,e,n){n===void 0&&(n="viewport");const s=n==="layoutViewport",r=F(t),i=de(t),o=r.visualViewport;let a=i.clientWidth,l=i.clientHeight,d=0,c=0;if(o){const u=!hs()||e==="fixed";s?u||(d=-o.offsetLeft,c=-o.offsetTop):(a=o.width,l=o.height,u&&(d=o.offsetLeft,c=o.offsetTop))}if(cn(i)<=0){const u=i.ownerDocument,h=u.body,f=getComputedStyle(h),g=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,b=Math.abs(i.clientWidth-h.clientWidth-g),x=getComputedStyle(i).scrollbarGutter==="stable both-edges"?b/2:b;x<=Dp&&(a-=x)}return{width:a,height:l,x:d,y:c}}function qp(t,e){const n=je(t,!0,e==="fixed"),s=n.top+t.clientTop,r=n.left+t.clientLeft,i=Ye(t),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=r*i.x,d=s*i.y;return{width:o,height:a,x:l,y:d}}function so(t,e,n){let s;if(e==="viewport"||e==="layoutViewport")s=jp(t,n,e);else if(e==="document")s=Np(de(t));else if(ne(e))s=qp(e,n);else{const r=to(t);s={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return sn(s)}function Bp(t,e){const n=e.get(t);if(n)return n;let s=bt(t,[],!1).filter(a=>ne(a)&&Ze(a)!=="body"),r=null;const i=se(t).position==="fixed";let o=i?De(t):t;for(;ne(o)&&!kt(o);){const a=se(o),l=ps(o),d=r?r.position:i?"fixed":"";!l&&(d==="fixed"||d==="absolute"&&a.position==="static")?s=s.filter(p=>p!==o):r=a,o=De(o)}return e.set(t,s),s}function Hp(t){let{element:e,boundary:n,rootBoundary:s,strategy:r}=t;const o=[...n==="clippingAncestors"?an(e)?[]:Bp(e,this._c):[].concat(n),s],a=so(e,o[0],r);let l=a.top,d=a.right,c=a.bottom,p=a.left;for(let u=1;u<o.length;u++){const h=so(e,o[u],r);l=ae(h.top,l),d=Qe(h.right,d),c=Qe(h.bottom,c),p=ae(h.left,p)}return{width:d-p,height:c-l,x:p,y:l}}function Up(t){const{width:e,height:n}=eo(t);return{width:e,height:n}}function Fp(t,e,n){const s=xe(e),r=de(e),i=n==="fixed",o=je(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=le(0);if((s||!i)&&((Ze(e)!=="body"||on(r))&&(a=ln(e)),s)){const u=je(e,!0,i,e);l.x=u.x+e.clientLeft,l.y=u.y+e.clientTop}!s&&r&&(l.x=cn(r));const d=r&&!s&&!i?no(r,a):le(0),c=o.left+a.scrollLeft-l.x-d.x,p=o.top+a.scrollTop-l.y-d.y;return{x:c,y:p,width:o.width,height:o.height}}function gs(t){return se(t).position==="static"}function ro(t,e){if(!xe(t)||se(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return de(t)===n&&(n=n.ownerDocument.body),n}function io(t,e){const n=F(t);if(an(t))return n;if(!xe(t)){let r=De(t);for(;r&&!kt(r);){if(ne(r)&&!gs(r))return r;r=De(r)}return n}let s=ro(t,e);for(;s&&Rp(s)&&gs(s);)s=ro(s,e);return s&&kt(s)&&gs(s)&&!ps(s)?n:s||Lp(t)||n}const Wp=async function(t){const e=this.getOffsetParent||io,n=this.getDimensions,s=await n(t.floating);return{reference:Fp(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Gp(t){return se(t).direction==="rtl"}const Vp={convertOffsetParentRelativeRectToViewportRelativeRect:Mp,getDocumentElement:de,getClippingRect:Hp,getOffsetParent:io,getElementRects:Wp,getClientRects:Ip,getDimensions:Up,getScale:Ye,isElement:ne,isRTL:Gp};function oo(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Kp(t,e,n){let s=null,r;const i=de(t);function o(){var c;clearTimeout(r),(c=s)==null||c.disconnect(),s=null}function a(c,p){c===void 0&&(c=!1),p===void 0&&(p=1),o();const u=t.getBoundingClientRect(),{left:h,top:f,width:g,height:b}=u;if(c||e(),!g||!b)return;const x=tn(f),S=tn(i.clientWidth-(h+g)),A=tn(i.clientHeight-(f+b)),_=tn(h),L={rootMargin:-x+"px "+-S+"px "+-A+"px "+-_+"px",threshold:ae(0,Qe(1,p))||1};let V=!0;function q(re){const X=re[0].intersectionRatio;if(!oo(u,t.getBoundingClientRect()))return a();if(X!==p){if(!V)return a();X?a(!1,X):r=setTimeout(()=>{a(!1,1e-7)},1e3)}V=!1}try{s=new IntersectionObserver(q,{...L,root:i.ownerDocument})}catch{s=new IntersectionObserver(q,L)}s.observe(t)}const l=F(t),d=()=>a(n);return l.addEventListener("resize",d),a(!0),()=>{l.removeEventListener("resize",d),o()}}function Qp(t,e,n,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,d=fs(t),c=r||i?[...d?bt(d):[],...e?bt(e):[]]:[];c.forEach(x=>{r&&x.addEventListener("scroll",n),i&&x.addEventListener("resize",n)});const p=d&&a?Kp(d,n,i):null;let u=-1,h=null;o&&(h=new ResizeObserver(x=>{let[S]=x;S&&S.target===d&&h&&e&&(h.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var A;(A=h)==null||A.observe(e)})),n()}),d&&!l&&h.observe(d),e&&h.observe(e));let f,g=l?je(t):null;l&&b();function b(){const x=je(t);g&&!oo(g,x)&&n(),g=x,f=requestAnimationFrame(b)}return n(),()=>{var x;c.forEach(S=>{r&&S.removeEventListener("scroll",n),i&&S.removeEventListener("resize",n)}),p?.(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Zp=Cp,Yp=Tp,Jp=$p,Xp=Ep,eh=(t,e,n)=>{const s=new Map,r=n??{},i={...Vp,...r.platform,_c:s};return wp(t,e,{...r,platform:i})},th=(t,e)=>({top:e,bottom:e,right:t}),ao=(t,e,n,s={})=>{if(typeof t.showPopover!="function")return()=>{};try{t.showPopover()}catch{return()=>{}}let r=!0,i=0;const o=e instanceof Element?e:{getBoundingClientRect:()=>({x:e.right,y:e.top,left:e.right,right:e.right,top:e.top,bottom:e.bottom,width:0,height:e.bottom-e.top})};t.style.width=`${n.width}px`,t.style.maxHeight=`${n.height}px`;const l=Qp(o,t,()=>{const d=++i;eh(o,t,{strategy:"fixed",placement:s.placement??"bottom-end",middleware:[Zp(8),Jp({padding:8,fallbackAxisSideDirection:"end"}),Yp({padding:8}),Xp({padding:8,apply:({availableWidth:c,availableHeight:p})=>{!r||d!==i||(t.style.width=`${Math.max(0,Math.min(n.width,c))}px`,t.style.maxHeight=`${Math.max(0,Math.min(n.height,p))}px`)}})]}).then(({x:c,y:p})=>{!r||d!==i||!t.isConnected||(t.style.left=`${c}px`,t.style.top=`${p}px`)}).catch(()=>{})},{animationFrame:s.trackTransform??!1,elementResize:typeof ResizeObserver<"u",layoutShift:typeof IntersectionObserver<"u"});return()=>{r=!1,l()}},lo=t=>{if(!(!t||typeof t.hidePopover!="function"))try{t.hidePopover()}catch{}};class co{#e;#t=new Map;constructor(e){this.#e=e,e.addController(this)}hostConnected(){this.#e.requestUpdate()}hostUpdated(){for(const[e,n]of this.#t)e.isConnected||(n(),this.#t.delete(e))}hostDisconnected(){for(const e of this.#t.values())e();this.#t.clear()}open(e,n,s,r){this.#t.get(e)?.(),this.#t.set(e,ao(e,n,s,r))}}function ms(t,e,n){return n==null?Math.min(t,e):Math.min(Math.max(t,e),n)}const po=(t,e,n)=>{typeof window>"u"||Object.assign(window,{devProcessKit:{version:t,templates:e,versionParam:n}})},vt="dpk-version",ho="version",nh=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,dn=t=>nh.test(t),sh="https://cdn.jsdelivr.net/npm/dev-process-kit@",uo="https://data.jsdelivr.com/v1/packages/npm/dev-process-kit",ks=t=>{const e=new URLSearchParams(t),n=e.get(vt)??e.get(ho);return n!==null&&dn(n)?n:null},rh=(t,e)=>{const n=ks(t);return n===null||n===e?null:n},ih=(t,e)=>{if(!dn(t))throw new Error(`not an exact version: ${t}`);if(!/^[a-z0-9-]+(?:\/[a-z0-9-]+)*\.js$/.test(e))throw new Error(`not an entry path: ${e}`);return`${sh}${t}/dist/${e}`},oh=(t,e)=>{const n=new URL(t);return n.searchParams.delete(ho),e===null?n.searchParams.delete(vt):n.searchParams.set(vt,e),n.href},ah=O({tags:N(Ge(v(),ve()),{}),versions:j(O({version:v()}))}),lh=t=>{const e=Ft(ah,t),n=e.tags.latest;return{latest:typeof n=="string"&&dn(n)?n:null,versions:e.versions.map(s=>s.version).filter(dn)}},fo=t=>{const e=t.published?.versions??[],n=e.includes(t.current)?e:[t.current,...e],s=t.published?.latest??null;return{value:t.current,options:[...t.requested?[{value:"",label:t.text.pinned}]:[],...n.map(r=>({value:r,label:r===s&&r!==t.current?t.text.latest(r):r}))]}};let pn;const go=()=>(pn??=fetch(uo).then(async t=>{if(!t.ok)throw new Error(`${uo} answered ${t.status}`);return lh(await t.json())}),pn.catch(()=>{pn=void 0}),pn),mo=t=>{location.assign(oh(location.href,t))},ch=t=>import(t),dh=({entry:t,templates:e,register:n,importModule:s=ch})=>{const r=()=>{n(),po(te,e,vt)},i=typeof location>"u"?null:rh(location.search,te);if(i===null){r();return}s(ih(i,t)).then(()=>{ph()||uh(i)},o=>{console.error(`dev-process-kit@${i} could not be loaded; running ${te}`,o),r()})},ph=()=>{const t=Reflect.get(window,"devProcessKit");return typeof t=="object"&&t!==null&&"versionParam"in t},bs="dpk-version-fallback",hh=`
|
|
1385
|
+
.${bs} {
|
|
1386
|
+
flex: none;
|
|
1387
|
+
height: 24px;
|
|
1388
|
+
margin-left: auto;
|
|
1389
|
+
padding: 0 22px 0 10px;
|
|
1390
|
+
border: 1px solid var(--dpk-rule, #8884);
|
|
1391
|
+
border-radius: 999px;
|
|
1392
|
+
background: var(--dpk-paper-sunken, transparent)
|
|
1393
|
+
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23878e9e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>")
|
|
1394
|
+
no-repeat right 8px center;
|
|
1395
|
+
appearance: none;
|
|
1396
|
+
field-sizing: content;
|
|
1397
|
+
color: var(--dpk-ink-soft, inherit);
|
|
1398
|
+
font-family: var(--dpk-mono, ui-monospace, monospace);
|
|
1399
|
+
font-size: 10px;
|
|
1400
|
+
letter-spacing: 0.02em;
|
|
1401
|
+
cursor: pointer;
|
|
1402
|
+
}
|
|
1403
|
+
`,uh=t=>{const e=[...document.body.querySelectorAll("*")].filter(n=>n.localName.startsWith("dpk-template-")&&!n.querySelector(`:scope > .${bs}`));if(e.length!==0){document.head.append(Object.assign(document.createElement("style"),{textContent:hh}));for(const n of e)n.append(fh(n,t))}},fh=(t,e)=>{const n=z(Pt(Lt(t))),s=document.createElement("select");s.className=bs,s.slot="header",s.setAttribute("aria-label",n.versionLabel),s.title=n.versionLabel;const r=o=>{const a=fo({current:e,requested:ks(location.search)!==null,published:o,text:{pinned:n.versionPinned,latest:n.versionLatest}});s.replaceChildren(...a.options.map(l=>Object.assign(document.createElement("option"),{value:l.value,textContent:l.label}))),s.value=a.value},i=()=>{go().then(r,o=>console.warn(o))};return s.addEventListener("pointerenter",i,{once:!0}),s.addEventListener("focus",i,{once:!0}),s.addEventListener("change",()=>mo(s.value===""?null:s.value)),r(null),s};class ko{#e;constructor(e,n){this.#e=n,e.addController(this)}hostConnected(){document.addEventListener("pointerdown",this.#t,!0),document.addEventListener("keydown",this.#n)}hostDisconnected(){document.removeEventListener("pointerdown",this.#t,!0),document.removeEventListener("keydown",this.#n)}#t=e=>{e.button!==0||!this.#e.open()||this.#e.closesOn(e.composedPath())&&this.#e.dismiss()};#n=e=>{e.key!=="Escape"||e.isComposing||e.defaultPrevented||!this.#e.open()||this.#e.ownsEscape(e.composedPath())&&(e.preventDefault(),this.#e.dismiss())}}const gh=O({value:v()}),mh=t=>e=>{if(!(e instanceof CustomEvent))return;const n=C(gh,e.detail);n.success&&t(n.output.value)},vs=t=>e=>{const n=Ee(e.target,HTMLSelectElement);n!==null&&t(n.value)},kh=t=>e=>{const n=Ee(e.target,HTMLInputElement);n!==null&&t(n.value,n)},bh=t=>e=>{const n=Ee(e.target,HTMLInputElement);n!==null&&t(n.checked)},bo=(t,e,n)=>n.top<e.top?t+n.top-e.top:n.bottom<=e.bottom?t:t+Math.min(n.bottom-e.bottom,n.top-e.top),vo=(t,e,n)=>{const s=Math.min(n,e/4);return{top:t+s,bottom:t+e-s}},xs=(t,e,n=0)=>{const s=t.getBoundingClientRect();t.scrollTop=bo(t.scrollTop,vo(s.top+t.clientTop,t.clientHeight,n),e.getBoundingClientRect())},xo=(t,e,n=0)=>{const s=t.getBoundingClientRect(),r=e.getBoundingClientRect();t.scrollLeft=bo(t.scrollLeft,vo(s.left+t.clientLeft,t.clientWidth,n),{top:r.left,bottom:r.right})},yo="data-dpk-changes",vh=/^[^:\s]+:\S+$/,xh=P({id:N(y(v(),$(1))),title:y(v(),$(1)),body:N(v()),target:N(y(v(),be(vh,'target must be written "type:id"'))),navigate:N(y(v(),Gr("=",'navigate must be written "key=value"')))}),yh=j(xh),wh=y(v(),$(1)),wo=P({revision:wh,changes:yh}),$h=P({revisions:y(j(wo),$(1,"list at least one version"))}),Sh=(t,e)=>JSON.stringify([t,e]),xt=t=>[...t.earlier,t.latest],Ah=t=>{const e=t.changes.map((s,r)=>{const i=s.id??String(r);return{key:Sh(t.revision,i),id:i,revision:t.revision,title:s.title,body:s.body??null,target:s.target??null,navigate:s.navigate??null}});return new Set(e.map(s=>s.id)).size!==e.length?`change ids must be unique within version "${t.revision}"`:{revision:t.revision,entries:e}},Ch=t=>{const e=typeof t=="object"&&t!==null&&"revisions"in t,n=C(e?$h:wo,t);if(!n.success)return{ok:!1,error:Ac(n.issues)};const s=n.output,r="revisions"in s?s.revisions:[s],i=[];for(const a of r){if(i.some(d=>d.revision===a.revision))return{ok:!1,error:`version "${a.revision}" is listed twice`};const l=Ah(a);if(typeof l=="string")return{ok:!1,error:l};i.push(l)}const o=i.pop();return o?{ok:!0,log:{earlier:i,latest:o}}:{ok:!1,error:"list at least one version"}},Th=P({v:G(1),revision:v(),seen:j(v())}),Eh=P({v:G(2),since:v(),seen:Ge(v(),j(v()))}),$o=t=>{const e=C(Eh,t);if(e.success)return e.output;const n=C(Th,t);return n.success?{v:2,since:n.output.revision,seen:{[n.output.revision]:n.output.seen}}:null},ys={open:!1,fresh:new Set},So=t=>e=>t.told.has(e.revision)&&!t.seen.has(e.key),ws=(t,e)=>xt(t).flatMap(n=>n.entries.filter(So(e))),Ao=t=>t.target!==null||t.navigate!==null,Rh=(t,e)=>{const n=xt(t),s=e===null?-1:n.findIndex(o=>o.revision===e.since),r=e===null?[t.latest]:n.slice(Math.max(0,s)),i=new Set(r.flatMap(o=>{const a=new Set(e?.seen[o.revision]??[]);return o.entries.filter(l=>a.has(l.id)).map(l=>l.key)}));return{told:new Set(r.map(o=>o.revision)),seen:i,toasts:t.latest.entries.filter(o=>!i.has(o.key)).map(o=>o.key),list:ys}},$s=(t,e)=>new Set([...t.seen,...e]),_h=(t,e,n)=>{switch(n.kind){case"open-list":{const s=ws(t,e),r=new Set(s.map(o=>o.key)),i=s.filter(o=>!Ao(o)).map(o=>o.key);return{...e,seen:$s(e,i),toasts:[],list:{open:!0,fresh:r}}}case"close-list":return{...e,list:ys};case"close-toast":return{...e,toasts:e.toasts.filter(s=>s!==n.key)};case"jump":return{...e,seen:$s(e,[n.key]),toasts:e.toasts.filter(s=>s!==n.key),list:ys};case"read-all":return{...e,seen:$s(e,ws(t,e).map(s=>s.key)),toasts:[],list:{open:e.list.open,fresh:new Set}}}},Oh=(t,e)=>ws(t,e).length,Lh=(t,e)=>{const n=xt(t),s=n.findIndex(o=>e.told.has(o.revision)&&o.entries.some(So(e))),r=s===-1?n.length-1:s,i=n.slice(r).flatMap(o=>{const a=o.entries.filter(l=>e.seen.has(l.key)).map(l=>l.id);return a.length>0?[[o.revision,a]]:[]});return{v:2,since:n[r]?.revision??t.latest.revision,seen:Object.fromEntries(i)}},Ph=(t,e)=>t.target===null&&t.navigate===null?null:{navigate:t.navigate!==null?Yt(t.navigate):t.target!==null?e(pt(t.target)):null,target:t.target},Co=3,zh=t=>e=>({key:e.key,id:e.id,revision:e.revision,title:e.title,body:e.body,jumpable:Ao(e),fresh:t.list.fresh.has(e.key)}),Mh=(t,e)=>{const n=xt(t).map(i=>({revision:i.revision,latest:i===t.latest,cards:i.entries.map(zh(e))})).reverse(),s=new Map(n.flatMap(i=>i.cards.map(o=>[o.key,o]))),r=e.toasts.flatMap(i=>{const o=s.get(i);return o?[o]:[]});return{unread:Oh(t,e),open:e.list.open,groups:n,toasts:r.slice(0,Co),waiting:Math.max(0,r.length-Co)}},yt=t=>t==="light"||t==="dark"?t:null,To=t=>t.authored??t.environment,Eo=t=>t.preference??To(t),Ih=t=>{const e=Eo(t)==="dark"?"light":"dark";return e===To(t)?null:e},Ro=j(P({value:y(v(),be(/^element:.+/)),label:y(v(),$(1)),group:U(v())})),Nh=O({targets:Ro,providers:j(O({id:y(v(),$(1)),results:j(pi)}))}),Dh=P({target:y(v(),be(/^element:.+/)),body:y(v(),Wn(),$(1))}),_o=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,jh=(t,e,n)=>{const s=new Map(e.map(r=>[r.value,r]));return{...t,hasTarget:(r,i)=>t.hasTarget(r,i)||s.has(D(i)),commentTargets:(r,i)=>{const o=t.commentTargets(r,i),a=new Set(o.map(l=>l.value));return[...o,...e.filter(l=>!a.has(l.value))]},describe:(r,i,o)=>{if(ee(r)){const d=n.get(r.id),c=s.get(D(r.target));return{title:d?.title??r.type,...d?.summary===void 0?{}:{summary:d.summary},tone:d?.tone??"update",targetLabel:c?_o(c):r.target.id}}const a=t.describe(r,i,o),l=r.type==="comment"&&!t.hasTarget(i,r.target)?s.get(D(r.target)):void 0;return l===void 0?a:{...a,targetLabel:_o(l)}},serialize:r=>ee(r)?`${r.type} ${D(r.target)} ${JSON.stringify(r.payload)}`:t.serialize(r)}},Oo=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function Lo(t){return typeof Oo.Buffer<"u"&&Oo.Buffer.isBuffer(t)}function Po(t){if(!t||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function zo(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Mo(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const qh="[object RegExp]",Bh="[object String]",Hh="[object Number]",Uh="[object Boolean]",Fh="[object Symbol]",Wh="[object Date]",Gh="[object Map]",Vh="[object Set]",Kh="[object Array]",Qh="[object Function]",Zh="[object ArrayBuffer]",Ss="[object Object]",Yh="[object Error]",Jh="[object DataView]",Xh="[object Uint8Array]",eu="[object Uint8ClampedArray]",tu="[object Uint16Array]",nu="[object Uint32Array]",su="[object BigUint64Array]",ru="[object Int8Array]",iu="[object Int16Array]",ou="[object Int32Array]",au="[object BigInt64Array]",lu="[object Float32Array]",cu="[object Float64Array]";function du(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function pu(t,e,n){return wt(t,e,void 0,void 0,void 0,void 0,n)}function wt(t,e,n,s,r,i,o){const a=o(t,e,n,s,r,i);if(a!==void 0)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return $t(t,e,i,o)}return $t(t,e,i,o)}function $t(t,e,n,s){if(Object.is(t,e))return!0;let r=Mo(t),i=Mo(e);if(r==="[object Arguments]"&&(r=Ss),i==="[object Arguments]"&&(i=Ss),r!==i)return!1;switch(r){case Bh:return t.toString()===e.toString();case Hh:return du(t.valueOf(),e.valueOf());case Uh:case Wh:case Fh:return Object.is(t.valueOf(),e.valueOf());case qh:return t.source===e.source&&t.flags===e.flags;case Qh:return t===e}n=n??new Map;const o=n.get(t),a=n.get(e);if(o!=null&&a!=null)return o===e;n.set(t,e),n.set(e,t);try{switch(r){case Gh:if(t.size!==e.size)return!1;for(const[l,d]of t.entries())if(!e.has(l)||!wt(d,e.get(l),l,t,e,n,s))return!1;return!0;case Vh:{if(t.size!==e.size)return!1;const l=Array.from(t.values()),d=Array.from(e.values());for(let c=0;c<l.length;c++){const p=l[c],u=d.findIndex(h=>wt(p,h,void 0,t,e,n,s));if(u===-1)return!1;d.splice(u,1)}return!0}case Kh:case Xh:case eu:case tu:case nu:case su:case ru:case iu:case ou:case au:case lu:case cu:if(Lo(t)!==Lo(e)||t.length!==e.length)return!1;for(let l=0;l<t.length;l++)if(!wt(t[l],e[l],l,t,e,n,s))return!1;return!0;case Zh:return t.byteLength!==e.byteLength?!1:$t(new Uint8Array(t),new Uint8Array(e),n,s);case Jh:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:$t(new Uint8Array(t),new Uint8Array(e),n,s);case Yh:return t.name===e.name&&t.message===e.message;case Ss:{if(!($t(t.constructor,e.constructor,n,s)||Po(t)&&Po(e)))return!1;const l=[...Object.keys(t),...zo(t)],d=[...Object.keys(e),...zo(e)];if(l.length!==d.length)return!1;for(let c=0;c<l.length;c++){const p=l[c],u=t[p];if(!Object.hasOwn(e,p))return!1;const h=e[p];if(!wt(u,h,p,t,e,n,s))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function hu(){}function hn(t,e){return pu(t,e,hu)}const Io="page",No=t=>D(t),Do=(t,e,n,s=new Map,r=ut)=>{let i=e,o={};const a=[],l=[],d=[],c=[],p=new Map;for(const h of n){if(h.type===B)continue;if(ee(h)){const b=s.get(h.id);b===void 0||b.stale!==void 0?l.push({action:h,reason:b?.stale??"target-missing"}):a.push(h);continue}if(J(h)){const b=yi(r,o,h);b===null?l.push({action:h,reason:Ve(r,h.target.id)?"constraint-violated":"target-missing"}):b===o?d.push(h):(o=b,a.push(h));continue}const f=Vt(t.actions,h.type);if(!f){l.push({action:h,reason:"unsupported-action-type"});continue}const g=t.apply(i,h);if(g===null){l.push({action:h,reason:t.hasTarget(i,h.target)?"constraint-violated":"target-missing"});continue}if(f.mode!=="append"&&As(t,i,g)){d.push(h);continue}i=g,a.push(h)}for(const h of n){if(h.type!==B)continue;if(h.target.type!==Io&&!t.hasTarget(i,h.target)){l.push({action:h,reason:"target-missing"});continue}c.push(h);const f=No(h.target);p.set(f,[...p.get(f)??[],h])}const u=new Map(n.map((h,f)=>[h.id,f]));return l.sort((h,f)=>(u.get(h.action.id)??0)-(u.get(f.action.id)??0)),{base:e,state:i,actions:n,applied:a,stale:l,obsolete:d,comments:c,commentsByTarget:p,grill:r,answers:o}},As=(t,e,n)=>e===n?!0:t.canonicalState===void 0?hn(e,n):hn(t.canonicalState(e),t.canonicalState(n)),jo=t=>{const e=new Set(t.obsolete.map(n=>n.id));return t.actions.filter(n=>!e.has(n.id))},uu=(t,e,n,s)=>{let r=e;const i=s??qo(r).map(o=>o.id);for(const o of[...i].reverse())r=fu(t,r,n,o,s!==void 0)??r;return r},qo=t=>t.applied.filter(e=>!ee(e)&&!J(e)),fu=(t,e,n,s,r)=>{const i=qo(e),o=i.findIndex(u=>u.id===s),a=i[o];if(a===void 0)return null;const l=i.slice(0,o),d=[...r?gu(t,e.base,i,o):[],...mu(t,l,a)],c=new Set,p=d.filter(u=>{const h=u.join(" ");return c.has(h)?!1:(c.add(h),!0)}).sort((u,h)=>h.length-u.length);for(const u of p){const h=ku(t,e,n,u);if(h!==null)return h}return null},gu=(t,e,n,s)=>{const r=[];let i=e;for(const o of n.slice(0,s+1))r.push(i),i=t.apply(i,o)??i;return r.flatMap((o,a)=>As(t,o,i)?[n.slice(a,s+1).map(l=>l.id)]:[])},mu=(t,e,n)=>{const s=Bo(n),r=e.filter(l=>Bo(l).some(d=>s.includes(d))),i=Ho(t,n),o=r.filter(l=>Ho(t,l)===i),a=l=>l.map((d,c)=>[...l.slice(c).map(p=>p.id),n.id]);return[...a(r),...a(o),...r.map(l=>[l.id,n.id]),...r.map(l=>[l.id])]},Bo=t=>{const e=t.target.type===Io?[]:t.target.id.split("."),n=typeof t.payload=="object"&&t.payload!==null?Object.values(t.payload).filter(s=>typeof s=="string"&&s!==""):[];return[...e,...n]},Ho=(t,e)=>Vt(t.actions,e.type)?.mode,ku=(t,e,n,s)=>{const r=new Set(e.stale.map(o=>o.action.id)),i=new Set(s);for(;;){const o=n(e.actions.filter(l=>!i.has(l.id))),a=o.stale.filter(l=>!r.has(l.action.id)).map(l=>l.action);if(a.length===0)return As(t,o.state,e.state)?o:null;if(a.some(l=>l.type===B||ee(l)||J(l)))return null;for(const l of a)i.add(l.id)}},bu=(t,e,n)=>{const s=xi(n);if(s===null)return{title:n.type,tone:"meta"};if(s.kind==="clear")return{title:t.grillAnswerClear,tone:"delete"};if(s.kind==="option"){const r=Ve(e,n.target.id)?.options.find(i=>i.id===s.optionId);return{title:t.grillAnswer,tone:"update",summary:t.grillQuoted(r?.label??s.optionId)}}return{title:t.grillAnswerFree,tone:"update",summary:t.grillQuoted(s.text.slice(0,120))}},vu=(t,e)=>{const{grill:n}=e,s=z(e.locale);return{...t,hasTarget:(r,i)=>i.type===oe?Ve(n,i.id)!==void 0:t.hasTarget(r,i),commentTargets:(r,i)=>[...t.commentTargets(r,i),...n.questions.map(o=>({value:D({type:oe,id:o.id}),label:ts(n,o.id),group:s.grillGroup}))],describe:(r,i,o)=>{const a=ts(n,r.target.id);if(J(r)){const{title:d,summary:c,tone:p}=bu(s,n,r);return{title:d,tone:p,targetLabel:a,...c===void 0?{}:{summary:c}}}const l=t.describe(r,i,o);return r.target.type===oe?{...l,targetLabel:a}:l},serialize:r=>J(r)?`${r.type} ${D(r.target)} ${JSON.stringify(r.payload)}`:t.serialize(r)}},xu=O({v:G(1),template:y(v(),$(1)),actions:j(ve())});class Cs{constructor(e){this.storage=e}load(e,n){try{const s=this.storage.getItem(e);if(s===null)return[];const r=C(xu,JSON.parse(s));return!r.success||r.output.template!==n?[]:r.output.actions.flatMap(i=>{const o=C(Pe,i);return o.success?[o.output]:[]})}catch{return[]}}save(e,n,s){const r={v:1,template:n,actions:s};try{this.storage.setItem(e,JSON.stringify(r))}catch{}}clear(e){try{this.storage.removeItem(e)}catch{}}}class Ts{constructor(){this.store=new Map}load(e,n){return new Cs({getItem:s=>this.store.get(s)??null,setItem:(s,r)=>{this.store.set(s,r)},removeItem:s=>{this.store.delete(s)}}).load(e,n)}save(e,n,s){this.store.set(e,JSON.stringify({v:1,template:n,actions:s}))}clear(e){this.store.delete(e)}}const Es=()=>{try{if(typeof localStorage<"u")return new Cs(localStorage)}catch{}return new Ts},un=t=>`dev-process-kit:draft:${typeof location>"u"?"local":`${location.pathname}${location.search}`}:${t}`,yu=j(ve());class Uo{#e;#t;#n={targets:[],providers:[]};#r;#s=new Map;#i;#o;#a;#l;#c;#d=new Set;#g=[];#b=0;constructor(e){this.#e=e.definition,this.#r=e.grill??{grill:ut,locale:"en"},this.#t=this.#v(),this.#i=e.base,this.#c=e.storageKey??un(e.definition.name),this.#l=e.storage===void 0?Es():e.storage;const n=e.initialActions??this.#l?.load(this.#c,this.definition.name)??[];this.#o=Go(this.definition,n),this.#a=this.#p(this.#o),this.#h()&&this.#A()}get definition(){return this.#t}setComponentSnapshot(e){const n=Ft(Nh,e);if(!hn(n,this.#n)){this.#n=n,this.#m(),this.#a=this.#p(this.#o);for(const s of this.#d)s()}}setTemplate(e){this.#e=e,this.#m(),this.#a=this.#p(this.#o);for(const n of this.#d)n()}setGrill(e){this.#r=e,this.#m(),this.#a=this.#p(this.#o);for(const n of this.#d)n()}#m(){this.#s=hi(this.#o,this.#n.providers),this.#t=this.#v()}#v(){return vu(jh(this.#e,this.#n.targets,this.#s),this.#r)}#p(e){return Do(this.definition,this.#i,e,hi(e,this.#n.providers),this.#r.grill)}get base(){return this.#i}get actions(){return this.#o}get derivation(){return this.#a}get lastIssues(){return this.#g}get prunedCount(){return this.#b}descriptorFor(e,n){return Fo(this.definition,e,n)}dispatch(e){const n=this.#$(e,this.#a.state);if(!n.ok)return this.#u([n.issue]);const s=this.descriptorFor(n.action.type,n.action.target);return s?(this.#k(Wo(this.#o,n.action,s),[n.action.id]),{ok:!0,id:n.action.id}):this.#u([{path:"type",message:"unknown action type"}])}dispatchBatch(e){const n=C(yu,e);if(!n.success)return this.#u([ze(n.issues)]);const s=n.output;if(s.length===0)return{ok:!0,ids:[]};let r=this.#o,i=this.#a.state,o=this.#a.answers;const a=[];for(const l of s){const d=this.#$(l,i);if(!d.ok)return this.#u([d.issue]);const c=d.action,p=this.descriptorFor(c.type,c.target);if(!p)return this.#u([{path:"type",message:"unknown action type"}]);if((J(c)?yi(this.#r.grill,o,c)===null?null:i:c.type==="comment"||ee(c)?c.target.type==="page"||this.definition.hasTarget(i,c.target)?i:null:this.definition.apply(i,c))===null)return this.#u([{path:"target",message:"batch action is not applicable"}]);r=Wo(r,c,p);const h=this.#p(r);i=h.state,o=h.answers,a.push(c.id)}return this.#k(r,a),{ok:!0,ids:a}}#$(e,n){const s=C(oi,e);if(!s.success)return{ok:!1,issue:ze(s.issues)};const r=this.descriptorFor(s.output.type,typeof s.output.target=="string"?Kn(s.output.target,"page"):s.output.target);if(!r)return{ok:!1,issue:{path:"type",message:`unknown action type "${s.output.type}"`}};const i=Mc(s.output,r);if(!i.ok)return i;const o=this.definition.canonicalTarget?.(n,i.action.target)??i.action.target;return{ok:!0,action:{...i.action,target:o}}}#u(e){return this.#g=e,{ok:!1,issues:e}}editComment(e,n){const s=this.#o.find(a=>a.id===e);if(s?.type!==B)return this.#u([{path:"id",message:`no comment "${e}" in the draft`}]);if(ht(s)===n)return{ok:!0,id:e};const r=C(Yn.schema,{...s,payload:{body:n}});if(!r.success)return this.#u([ze(r.issues)]);const i=C(Pe,r.output);if(!i.success)return this.#u([ze(i.issues)]);const o=i.output;return this.#k(this.#o.map(a=>a===s?o:a),[]),{ok:!0,id:e}}removeAction(e){const n=this.#o.filter(s=>s.id!==e);n.length!==this.#o.length&&this.#k(n)}clearActions(){this.#o.length>0&&this.#k([])}replaceActions(e){this.#k(Go(this.definition,e))}setBase(e){this.#i=e,this.#k(this.#o)}subscribe(e){return this.#d.add(e),()=>{this.#d.delete(e)}}exportDraft(e){return{template:this.definition.name,frameworkVersion:e,exportedAt:new Date().toISOString(),actions:this.#o}}#k(e,n){this.#g=[],this.#o=e,this.#m(),this.#a=this.#p(this.#o),this.#h(n),this.#A();for(const s of this.#d)s()}#h(e){const n=this.#x(),s=uu(this.definition,this.#a,r=>this.#p(r),e);return s===this.#a?n:(this.#b+=this.#o.length-s.actions.length,this.#o=[...s.actions],this.#m(),this.#a=this.#p(this.#o),this.#x(),!0)}#x(){return this.#a.obsolete.length===0?!1:(this.#b+=this.#a.obsolete.length,this.#o=jo(this.#a),this.#m(),this.#a=this.#p(this.#o),!0)}#A(){this.#l?.save(this.#c,this.definition.name,this.#o)}}const Fo=(t,e,n)=>e==="comment"?Yn:e===Kt?Jc:n!==void 0&&ee({type:e,target:n})?qc:Vt(t.actions,e),Wo=(t,e,n)=>J(e)?ed(t,e):ai(t,e,n),Go=(t,e)=>e.flatMap(n=>{const s=C(Pe,n);if(!s.success)return[];const r=s.output,i=Fo(t,r.type,r.target);if(!i)return[];const o=C(i.schema,r);if(!o.success)return[];const a=C(Pe,o.output);return a.success?[a.output]:[]}),wu=()=>({status:{kind:"idle"},request:0}),$u=(t,e)=>{switch(e.kind){case"copy-started":return{status:{kind:"copying"},request:t.request+1};case"send-started":return{status:{kind:"sending"},request:t.request+1};case"copy-finished":return e.request!==t.request||t.status.kind!=="copying"?t:{...t,status:{kind:e.ok?"copied":"copy-failed"}};case"send-finished":return e.request!==t.request||t.status.kind!=="sending"?t:{...t,status:e.outcome.ok?{kind:"sent"}:{kind:"send-failed",reason:e.outcome.reason}};case"settled":return e.request===t.request?{...t,status:{kind:"idle"}}:t}},Su=(t,e)=>{if(t.actions===0||t.railOpen)return null;const n=z(t.locale),s=e.status;return{send:t.sendable?{label:s.kind==="sending"?n.handoffSending:s.kind==="sent"?n.handoffSent:n.handoffSend,disabled:s.kind==="sending"}:null,copy:s.kind==="copied"?{label:n.handoffCopied,status:"copied"}:s.kind==="copy-failed"?{label:n.handoffCopyFailed,status:"failed"}:{label:n.handoffCopy,status:"idle"},note:s.kind==="send-failed"?Ci(s.reason,t.locale):null}},Vo=t=>{const e=t.derivation();return{base:e.base,state:e.state,navigation:t.navigation(),actions:t.controller().actions,comments:e.comments,stale:e.stale,issues:t.issues(),grill:e.grill,answers:e.answers}},Au=t=>{const e=t.derivation();return{state:e.state,base:e.base,navigation:t.navigation(),actions:t.controller().actions,comments:e.comments,stale:e.stale,commentCount:n=>{const s=typeof n=="string"?n:D(n);return e.commentsByTarget.get(s)?.length??0},dispatch:n=>t.dispatch(n),dispatchBatch:n=>t.dispatchBatch(n),navigate:(n,s)=>t.navigate(n,s),hashFor:n=>t.hashFor(n),requestComment:n=>t.requestComment(n)}},Cu=(t,e)=>{const n=()=>Vo(t);return{version:te,template:t.definition.name,host:e,ready:t.ready,get base(){return t.controller().base},get state(){return t.derivation().state},get navigation(){return t.navigation()},get actions(){return t.controller().actions},get comments(){return t.derivation().comments},get stale(){return t.derivation().stale},get issues(){return t.issues()},dispatch:s=>t.dispatch(s),dispatchBatch:s=>t.dispatchBatch(s),comment:(s,r)=>t.dispatch({type:B,target:s,payload:{body:r}}),editComment:(s,r)=>t.editComment(s,r),removeAction:s=>t.removeAction(s),clearActions:()=>t.clearActions(),importDraft:s=>t.controller().replaceActions(s),navigate:(s,r)=>t.navigate(s,r),hashFor:s=>t.hashFor(s),snapshot:n,exportDraft:()=>t.controller().exportDraft(te),exportBrief:()=>rs(n(),t.controller().definition,te),subscribe:s=>t.subscribe(s)}},Rs=(t,e)=>({read(n){try{const s=t.getItem(n);return s===null?null:e(JSON.parse(s))}catch{return null}},write(n,s){try{return t.setItem(n,JSON.stringify(s)),!0}catch{return!1}},remove(n){try{t.removeItem(n)}catch{}}}),pe=t=>{const e=new Map;return Rs({getItem:n=>e.get(n)??null,setItem:(n,s)=>{e.set(n,s)},removeItem:n=>{e.delete(n)}},t)},Je=t=>{try{if(typeof localStorage<"u")return Rs(localStorage,t)}catch{}return pe(t)},Tu=t=>{try{if(typeof sessionStorage<"u")return Rs(sessionStorage,t)}catch{}return pe(t)},Eu=8e3,Ru=t=>t.localName==="script"&&t.getAttribute("type")==="application/json"&&t.hasAttribute(yo);class _u{#e;#t;#n=null;#r=null;#s=null;#i=null;#o="";#a=null;#l=new Map;#c=new Set;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}get view(){return this.#n&&this.#s?Mh(this.#n,this.#s):null}get error(){return this.#r}hostConnected(){!this.#g()&&!this.#b()&&this.#p(),document.addEventListener("pointerdown",this.#h,!0),document.addEventListener("keydown",this.#x)}hostUpdate(){!this.#g()&&this.#b()&&this.#$()}hostDisconnected(){this.#$(),document.removeEventListener("pointerdown",this.#h,!0),document.removeEventListener("keydown",this.#x);for(const e of this.#l.values())e.handle!==null&&clearTimeout(e.handle);this.#l.clear()}send(e){!this.#n||!this.#s||(this.#s=_h(this.#n,this.#s,e),this.#m(),this.#u(),this.#e.requestUpdate())}toggleList(){this.send({kind:this.#s?.list.open?"close-list":"open-list"})}show(e){const n=this.#n?xt(this.#n).flatMap(s=>s.entries).find(s=>s.key===e):void 0;n&&(this.send({kind:"jump",key:e}),this.#t.show(n))}pause(e){const n=this.#c.size>0;if(this.#c.add(e),n)return;const s=Date.now();for(const r of this.#l.values())r.handle!==null&&clearTimeout(r.handle),r.handle=null,r.remaining=Math.max(0,r.deadline-s)}resume(e){if(!(!this.#c.delete(e)||this.#c.size>0))for(const[n,s]of this.#l)this.#k(n,s)}#d(){return`${this.#t.storageKey()}:seen-changes`}#g(){return this.#n!==null||this.#r!==null}#b(){const e=[...this.#e.children].find(Ru);if(!e)return!1;let n;try{n=JSON.parse(e.textContent??"")}catch(r){return this.#v(r instanceof Error?r.message:String(r))}const s=Ch(n);return s.ok?(this.#n=s.log,this.#i=this.#t.persist()?Je($o):pe($o),this.#s=Rh(s.log,this.#i.read(this.#d())),this.#m(),this.#u(),this.#e.requestUpdate(),!0):this.#v(s.error)}#m(){if(!this.#n||!this.#s)return;const e=Lh(this.#n,this.#s),n=JSON.stringify(e);n!==this.#o&&(this.#o=n,this.#i?.write(this.#d(),e))}#v(e){return console.error("[dev-process-kit] invalid change log:",e),this.#r=e,this.#e.requestUpdate(),!0}#p(){this.#a=new MutationObserver(()=>{(this.#g()||this.#b())&&this.#$()}),this.#a.observe(this.#e,{childList:!0})}#$(){this.#a?.disconnect(),this.#a=null}#u(){const e=new Set(this.view?.toasts.map(n=>n.key)??[]);for(const[n,s]of this.#l)e.has(n)||(s.handle!==null&&clearTimeout(s.handle),this.#l.delete(n));for(const n of e){if(this.#l.has(n))continue;const s={handle:null,deadline:0,remaining:Eu};this.#l.set(n,s),this.#c.size===0&&this.#k(n,s)}}#k(e,n){n.deadline=Date.now()+n.remaining,n.handle=setTimeout(()=>{n.handle=null,this.send({kind:"close-toast",key:e})},n.remaining)}#h=e=>{!this.#s?.list.open||this.#t.inside(e.composedPath())||this.send({kind:"close-list"})};#x=e=>{e.key!=="Escape"||!this.#s?.list.open||this.send({kind:"close-list"})}}const fn="dpk-changes",Ou=(t,e,n)=>{const s=t.unread>0?e.changesUnread(t.unread):e.changes;return m`<button
|
|
1404
|
+
class="dpk-bell"
|
|
1405
|
+
type="button"
|
|
1406
|
+
aria-controls=${fn}
|
|
1407
|
+
aria-expanded=${t.open?"true":"false"}
|
|
1408
|
+
aria-label=${s}
|
|
1409
|
+
title=${s}
|
|
1410
|
+
@click=${n.toggleList}
|
|
1411
|
+
>
|
|
1412
|
+
${Hi()} ${t.unread>0?m`<span class="dpk-bell-badge" aria-hidden="true">${t.unread}</span>`:k}
|
|
1413
|
+
</button>`},Ko=(t,e,n)=>t.jumpable?m`<button class="dpk-btn dpk-btn--accent dpk-notice-show" type="button" @click=${()=>n.show(t.key)}>
|
|
1414
|
+
${e.changesShow}
|
|
1415
|
+
</button>`:k,Qo=(t,e,n,s)=>s==="list"||t.unread>0?m`<button
|
|
1416
|
+
class=${s==="list"?"dpk-btn dpk-changes-read-all":"dpk-toast-more dpk-changes-read-all"}
|
|
1417
|
+
type="button"
|
|
1418
|
+
aria-disabled=${t.unread>0?"false":"true"}
|
|
1419
|
+
@click=${n.readAll}
|
|
1420
|
+
>
|
|
1421
|
+
${e.changesReadAll}
|
|
1422
|
+
</button>`:k,Lu=(t,e,n)=>m`<section class="dpk-changes-group" data-revision=${t.revision}>
|
|
1423
|
+
<h3 class="dpk-changes-revision">
|
|
1424
|
+
<span>${t.revision}</span>
|
|
1425
|
+
${t.latest?m`<span class="dpk-changes-current">${e.changesCurrent}</span>`:k}
|
|
1426
|
+
</h3>
|
|
1427
|
+
<ol class="dpk-changes-list">
|
|
1428
|
+
${Me(t.cards,s=>s.key,s=>m`<li
|
|
1429
|
+
class="dpk-change"
|
|
1430
|
+
data-key=${s.id}
|
|
1431
|
+
data-revision=${s.revision}
|
|
1432
|
+
?data-fresh=${s.fresh}
|
|
1433
|
+
>
|
|
1434
|
+
<p class="dpk-change-title">
|
|
1435
|
+
${s.fresh?m`<span class="dpk-change-new">${e.changesNew}</span>`:k} ${s.title}
|
|
1436
|
+
</p>
|
|
1437
|
+
${s.body===null?k:m`<p class="dpk-change-body">${s.body}</p>`} ${Ko(s,e,n)}
|
|
1438
|
+
</li>`)}
|
|
1439
|
+
</ol>
|
|
1440
|
+
</section>`,Pu=(t,e,n)=>t.open?m`<div id=${fn} class="dpk-changes" popover="manual" role="dialog" aria-label=${e.changesTitle}>
|
|
1441
|
+
<div class="dpk-changes-head">
|
|
1442
|
+
<h2 class="dpk-changes-title">${e.changesTitle}</h2>
|
|
1443
|
+
${Qo(t,e,n,"list")}
|
|
1444
|
+
</div>
|
|
1445
|
+
${Me(t.groups,s=>s.revision,s=>Lu(s,e,n))}
|
|
1446
|
+
</div>`:k,zu=(t,e,n)=>m`<section
|
|
1447
|
+
class="dpk-toasts"
|
|
1448
|
+
aria-live="polite"
|
|
1449
|
+
aria-label=${e.changes}
|
|
1450
|
+
@pointerenter=${()=>n.pause("pointer")}
|
|
1451
|
+
@pointerleave=${()=>n.resume("pointer")}
|
|
1452
|
+
@focusin=${()=>n.pause("focus")}
|
|
1453
|
+
@focusout=${()=>n.resume("focus")}
|
|
1454
|
+
>
|
|
1455
|
+
${Me(t.toasts,s=>s.key,s=>m`<div class="dpk-toast" data-key=${s.id}>
|
|
1456
|
+
<span class="dpk-toast-icon" aria-hidden="true">${Hi()}</span>
|
|
1457
|
+
<div class="dpk-toast-text">
|
|
1458
|
+
<p class="dpk-change-title">${s.title}</p>
|
|
1459
|
+
${s.body===null?k:m`<p class="dpk-change-body">${s.body}</p>`}
|
|
1460
|
+
</div>
|
|
1461
|
+
${Ko(s,e,n)}
|
|
1462
|
+
<button
|
|
1463
|
+
class="dpk-toast-close"
|
|
1464
|
+
type="button"
|
|
1465
|
+
aria-label=${e.changesDismiss}
|
|
1466
|
+
title=${e.changesDismiss}
|
|
1467
|
+
@click=${()=>n.dismiss(s.key)}
|
|
1468
|
+
>
|
|
1469
|
+
${Jt()}
|
|
1470
|
+
</button>
|
|
1471
|
+
</div>`)}
|
|
1472
|
+
${t.toasts.length+t.waiting>1?m`<div class="dpk-toast-actions">
|
|
1473
|
+
${t.waiting>0?m`<button class="dpk-toast-more" type="button" @click=${n.openList}>
|
|
1474
|
+
${e.changesWaiting(t.waiting)} · ${e.changesSeeAll}
|
|
1475
|
+
</button>`:k}
|
|
1476
|
+
${Qo(t,e,n,"toasts")}
|
|
1477
|
+
</div>`:k}
|
|
1478
|
+
</section>`,_s=(t,e)=>typeof t=="object"&&t!==null&&e.every(n=>typeof Reflect.get(t,n)=="function"),Mu=t=>_s(t,["use"]),Iu=t=>_s(t,["anchorFor","canSendToClaude","sendToClaude"]),Nu=t=>_s(t,["collection"]),Zo=async(t,e)=>{try{return await t.use(e)}catch{return null}},Du=(t,e)=>({async canSend(){try{return await t.canSendToClaude()==="available"}catch{return!1}},async send({brief:n,draft:s,anchor:r}){let i=pd(n);if(i===null){if(e===null)return{ok:!1,reason:"too_large"};try{const o=e.collection(ld).doc();await o.set({brief:n,draft:s,createdAt:new Date().toISOString()}),i=hd(o.path)}catch{return{ok:!1,reason:"storage"}}}try{return await t.sendToClaude({anchor:await t.anchorFor(r),text:i}),{ok:!0}}catch(o){return{ok:!1,reason:fd(o)}}}}),ju=async t=>{if(!Mu(t))return null;const[e,n]=await Promise.all([Zo(t,"comments"),Zo(t,"db")]);return Iu(e)?Du(e,Nu(n)?n:null):null},qu=()=>Reflect.get(globalThis,"claude");class Bu{#e;#t;#n=null;#r=!1;constructor(e,n=qu){this.#e=e,this.#t=n,e.addController(this)}get available(){return this.#r}hostConnected(){this.#n??=ju(this.#t()),this.#s(),window.addEventListener("focus",this.#s)}hostDisconnected(){window.removeEventListener("focus",this.#s)}async send(e){const n=await this.#n;if(!n)return{ok:!1,reason:"forbidden"};const s=await n.send(e);return this.#s(),s}#s=async()=>{const e=await this.#n,n=e?await e.canSend():!1;n!==this.#r&&(this.#r=n,this.#e.requestUpdate())}}const Os="dev-process-kit:color-scheme",Hu="(prefers-color-scheme: dark)",Yo=()=>typeof matchMedia=="function"?matchMedia(Hu):null,Jo=()=>yt(document.documentElement.dataset.theme)??(Yo()?.matches===!0?"dark":"light");class Uu{#e;#t;#n=null;#r=null;#s="light";#i=null;#o=null;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#t()?Je(yt):pe(yt),this.#r=this.#n.read(Os)),this.#s=Jo(),this.#i=Yo(),this.#i?.addEventListener("change",this.#l),this.#o=new MutationObserver(this.#l),this.#o.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}hostDisconnected(){this.#i?.removeEventListener("change",this.#l),this.#i=null,this.#o?.disconnect(),this.#o=null}resolve(e){return Eo(this.#a(e))}toggle(e){this.#r=Ih(this.#a(e)),this.#r===null?this.#n?.remove(Os):this.#n?.write(Os,this.#r),this.#e.requestUpdate()}#a(e){return{preference:this.#r,authored:e,environment:this.#s}}#l=()=>{const e=Jo();e!==this.#s&&(this.#s=e,this.#e.requestUpdate())}}const Fu=(t,e)=>{const n=[],s=r=>{(r===t||r instanceof ShadowRoot)&&e?.(r);for(const i of r.children)i.hasAttribute("data-template")||(("commentTargets"in i||"elementActions"in i)&&n.push(i),s(i),i.shadowRoot&&s(i.shadowRoot))};return s(t),n},Xo=(t,e)=>{const n=new Map;for(const s of t)n.set(e(s),(n.get(e(s))??0)+1);return t.filter(s=>n.get(e(s))===1)},ea=t=>Xo(t.filter(e=>"elementActions"in e&&e.id.length>0),e=>e.id),ta=(t,e)=>{for(const n of ea(t)){const s=Hc(e,n.id),r=Reflect.get(n,"elementActions");Array.isArray(r)&&r.length===s.length&&s.every((o,a)=>{const l=r[a];return typeof l=="object"&&l!==null&&"id"in l&&l.id===o.id})||Reflect.set(n,"elementActions",s)}},Wu=t=>{const e=Reflect.get(t,"elementActionResults");return Array.isArray(e)?e.flatMap(n=>{const s=C(pi,n);return s.success?[s.output]:[]}):[]},Gu=t=>{const e=[];for(const n of t){if(!("commentTargets"in n))continue;const s=C(Ro,n.commentTargets);s.success&&e.push(...s.output)}return{targets:Xo(e,n=>n.value),providers:ea(t).map(n=>({id:n.id,results:Wu(n)}))}};function na(t){return t===null?1:t===void 0?2:0}function sa(t,e){const n=na(t),s=na(e);return n<s?-1:n>s?1:n!==0?0:t<e?-1:t>e?1:0}function Vu(t,e,n){return n==="asc"?sa(t,e):sa(e,t)}function Ku(t,e,n){return t.slice().sort((s,r)=>{const i=n.length;for(let o=0;o<e.length;o++){const a=i>o?n[o]:n[i-1],l=e[o],d=typeof l=="function",c=Vu(d?l(s):s[l],d?l(r):r[l],a);if(c!==0)return c}return 0})}function ra(t,e){return Ku(t,e,["asc"])}const Qu=5,Ls=4,ia=8,Zu=(t,e)=>{const n=e.badgeHeight,s=t.target.right+ia,r=t.target.left-ia,i=[];let o=0,a=s;for(let l=t.widths.length-1;l>=0;l-=1){const d=t.widths[l]??0;a!==s&&a-d<r&&(o+=1,a=s),i[l]={x:a-d,y:t.target.top-n/2-o*(n+Ls)},a-=d+Qu}return i},oa=(t,e)=>{const n=t.map(()=>[]),s=ra(t.map((i,o)=>({group:i,index:o})).filter(({group:i})=>i.gutter),[({group:i})=>i.target.top]);let r=Number.NEGATIVE_INFINITY;for(const{group:i,index:o}of s){let a=Math.max(i.target.top,r);n[o]=i.widths.map(l=>{const d={x:e.width-l,y:a};return a+=e.badgeHeight+Ls,d}),r=a}return{points:n,bottom:r-Ls}},Yu=(t,e)=>Math.max(0,oa(t,e).bottom),Ju=(t,e)=>{const n=oa(t,e),s=Math.max(e.height,n.bottom);return t.map((r,i)=>(r.gutter?n.points[i]??[]:Zu(r,e)).map((o,a)=>({x:ms(o.x,0,Math.max(0,e.width-(r.widths[a]??0))),y:ms(o.y,0,Math.max(0,s-e.badgeHeight))})))},Xu=t=>{const e=[t];for(const n of t.querySelectorAll("*"))n.shadowRoot&&e.push(n.shadowRoot);return e},ef=(t,e,n,s)=>{if(e.questions.length===0)return[];const r=new Map(e.questions.map(o=>[o.ref,o])),i=[];for(const o of Xu(t))for(const a of o.querySelectorAll(`[${es}]`)){const l=a.getAttribute(es)??"";for(const d of l.split(/\s+/)){const c=r.get(d);c&&i.push({index:i.length,target:a,questionId:c.id,ref:c.ref,title:c.title,answered:Zt(c,n[c.id]),open:c.id===s})}}return i},tf=(t,e)=>{const n=t.getRootNode(),s=n instanceof ShadowRoot?n.host:null,r=s?.shadowRoot?.querySelector(".diagram-canvas")??null;return r instanceof Element?r.getBoundingClientRect():s instanceof Element?s.getBoundingClientRect():e.getBoundingClientRect()},nf=(t,e)=>{const n=t.getBoundingClientRect(),s=t.getRootNode(),r=s instanceof ShadowRoot?s.host:null,i=new Map;for(const u of e){const h=t.querySelector(`[data-badge="${u.index}"]`);if(!h)continue;const f=i.get(u.target)??[];f.push(h),i.set(u.target,f)}const o=[];for(const[u,h]of i){const f=u.getBoundingClientRect(),g=tf(u,t),b=(f.width>0||f.height>0)&&f.bottom>n.top&&f.top<n.bottom&&f.right>n.left&&f.left<n.right&&f.bottom>g.top&&f.top<g.bottom;for(const x of h)x.dataset.visible=String(b);b&&o.push({buttons:h,group:{target:{left:f.left-n.left,top:f.top-n.top,right:f.right-n.left,bottom:f.bottom-n.top},widths:h.map(x=>x.offsetWidth),gutter:r?.contains(u)===!0}})}const a=o[0]?.buttons[0]?.offsetHeight??0,l=o.map(({group:u})=>u),d={width:t.clientWidth,height:t.clientHeight,badgeHeight:a},c=Yu(l,d);t.parentElement&&(t.parentElement.style.minHeight=c>0?`${Math.ceil(c)}px`:"");const p=Ju(l,{...d,height:Math.max(d.height,c)});o.forEach(({buttons:u},h)=>{u.forEach((f,g)=>{const b=p[h]?.[g];b&&(f.style.transform=`translate(${b.x}px, ${b.y}px)`)})})},aa={childList:!0,subtree:!0,attributes:!0,attributeFilter:[es]};class sf{#e;#t;#n=null;#r=!1;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}hostConnected(){document.addEventListener("scroll",this.#s,!0),window.addEventListener("resize",this.#s),this.#e.addEventListener("dpk-diagram-view",this.#s)}hostDisconnected(){document.removeEventListener("scroll",this.#s,!0),window.removeEventListener("resize",this.#s),this.#e.removeEventListener("dpk-diagram-view",this.#s),this.#n?.disconnect(),this.#n=null}hostUpdated(){if(this.#n?.disconnect(),!!this.#t.active()){this.#n??=new MutationObserver(()=>{this.#e.requestUpdate(),this.#s()}),this.#n.observe(this.#e,aa);for(const e of this.#e.querySelectorAll("*"))e.shadowRoot&&this.#n.observe(e.shadowRoot,aa);this.#s()}}#s=()=>{this.#r||!this.#t.active()||(this.#r=!0,requestAnimationFrame(()=>{this.#r=!1;const e=this.#t.layer();e&&nf(e,this.#t.bindings())}))}}const Ps=(t,e)=>e!==null&&Ve(t,e)?e:t.questions[0]?.id??null,rf=(t,e)=>e!=="current"&&t.rounds[e]!==void 0?e:"current",la=(t,e)=>t.options.map((n,s)=>({id:n.id,letter:Qc(s),label:n.label,checked:e?.kind==="option"&&e.optionId===n.id})),of=(t,e,n)=>{if(e.rounds.length===0)return[];const s=e.rounds.map((r,i)=>({value:String(i),label:t.grillRoundOption(r.label,r.questions.length),selected:n===i}));return[{value:"current",label:t.grillRoundOption(t.grillCurrentRound,e.questions.length),selected:n==="current"},...s.reverse()]},af=(t,e,n,s)=>{const r=vi(e,n),i=rf(e,s.round),o=of(t,e,i),a=t.grillProgress(r.answered,r.total),l=i==="current"?void 0:e.rounds[i];if(l!==void 0)return{progress:a,rounds:o,view:{kind:"past",note:t.grillPastRound(l.label),questions:l.questions.map(c=>{const p=Qt(c,c.answer);return{id:c.id,ref:c.ref,title:c.title,description:c.description,note:c.note,answered:p!=="",summary:p===""?t.grillUnanswered:p,choices:la(c,c.answer),freeText:c.answer?.kind==="free"?c.answer.text:null}})}};const d=Ps(e,s.open);return{progress:a,rounds:o,view:{kind:"current",questions:e.questions.map(c=>{const p=n[c.id],u=Qt(c,p);return{id:c.id,ref:c.ref,title:c.title,description:c.description,note:c.note,open:c.id===d,answered:u!=="",summary:u,choices:la(c,p),draft:p?.kind==="free"?p.text:"",freeSelected:p?.kind==="free",allowFreeText:c.freeText}})}}},lf=(t,e,n,s)=>m`
|
|
1479
|
+
<div class="dpk-grill">
|
|
1480
|
+
<header class="dpk-grill-head">
|
|
1481
|
+
<h2>${t.grill}</h2>
|
|
1482
|
+
<span class="dpk-grill-progress">${e.progress}</span>
|
|
1483
|
+
</header>
|
|
1484
|
+
${e.rounds.length===0?k:m`<div class="dpk-grill-rounds">
|
|
1485
|
+
<select
|
|
1486
|
+
class="dpk-grill-round"
|
|
1487
|
+
aria-label=${t.grillRoundSelect}
|
|
1488
|
+
@change=${r=>{const i=r.currentTarget;i instanceof HTMLSelectElement&&n.pickRound(i.value==="current"?"current":Number(i.value))}}
|
|
1489
|
+
>
|
|
1490
|
+
${e.rounds.map(r=>m`<option value=${r.value} ?selected=${r.selected}>${r.label}</option>`)}
|
|
1491
|
+
</select>
|
|
1492
|
+
</div>`}
|
|
1493
|
+
<div class="dpk-grill-list">
|
|
1494
|
+
${e.view.kind==="past"?m`<p class="dpk-grill-round-note">${e.view.note}</p>`:k}
|
|
1495
|
+
${e.view.questions.length===0?m`<p class="dpk-grill-empty">${t.grillNoQuestions}</p>`:e.view.kind==="current"?Me(e.view.questions,r=>r.id,r=>cf(t,r,n)):Me(e.view.questions,r=>r.id,pf)}
|
|
1496
|
+
</div>
|
|
1497
|
+
${s}
|
|
1498
|
+
</div>
|
|
1499
|
+
`,cf=(t,e,n)=>m`
|
|
1500
|
+
<section
|
|
1501
|
+
class="dpk-grill-question"
|
|
1502
|
+
data-question=${e.id}
|
|
1503
|
+
data-answered=${String(e.answered)}
|
|
1504
|
+
data-dpk-target=${D({type:oe,id:e.id})}
|
|
1505
|
+
>
|
|
1506
|
+
<button
|
|
1507
|
+
class="dpk-grill-heading"
|
|
1508
|
+
type="button"
|
|
1509
|
+
aria-expanded=${e.open?"true":"false"}
|
|
1510
|
+
aria-controls=${`dpk-grill-body-${e.id}`}
|
|
1511
|
+
@click=${()=>n.open(e.id)}
|
|
1512
|
+
>
|
|
1513
|
+
<span class="dpk-grill-ref">${e.ref}</span>
|
|
1514
|
+
<span class="dpk-grill-heading-text">
|
|
1515
|
+
<strong>${e.title}</strong>
|
|
1516
|
+
${!e.open&&e.answered?m`<span class="dpk-grill-summary">${e.summary}</span>`:k}
|
|
1517
|
+
</span>
|
|
1518
|
+
<span class="dpk-grill-chevron" aria-hidden="true">${ft()}</span>
|
|
1519
|
+
</button>
|
|
1520
|
+
${e.open?m`<div class="dpk-grill-body" id=${`dpk-grill-body-${e.id}`}>
|
|
1521
|
+
${e.description?m`<p class="dpk-grill-description">${e.description}</p>`:k}
|
|
1522
|
+
${e.note?m`<p class="dpk-grill-note">${e.note}</p>`:k}
|
|
1523
|
+
<div class="dpk-grill-choices" role="radiogroup" aria-label=${e.title}>
|
|
1524
|
+
${e.choices.map(s=>df(e.id,s,n))}
|
|
1525
|
+
${e.allowFreeText?m`<label class="dpk-grill-choice" data-free=${String(e.freeSelected)}>
|
|
1526
|
+
<input
|
|
1527
|
+
type="radio"
|
|
1528
|
+
name=${`dpk-grill-${e.id}`}
|
|
1529
|
+
value="__free"
|
|
1530
|
+
.checked=${e.freeSelected}
|
|
1531
|
+
@change=${()=>n.answer(e.id,{kind:"free",text:""})}
|
|
1532
|
+
/>
|
|
1533
|
+
<span class="dpk-grill-choice-text">${t.grillFreeText}</span>
|
|
1534
|
+
</label>`:k}
|
|
1535
|
+
</div>
|
|
1536
|
+
${e.allowFreeText?m`<textarea
|
|
1537
|
+
class="dpk-textarea dpk-grill-free"
|
|
1538
|
+
data-free-text=${e.id}
|
|
1539
|
+
aria-label=${t.grillFreeTextOf(e.ref)}
|
|
1540
|
+
placeholder=${t.grillFreeTextPlaceholder}
|
|
1541
|
+
.value=${e.draft}
|
|
1542
|
+
?hidden=${!e.freeSelected}
|
|
1543
|
+
@input=${s=>{const r=s.currentTarget;r instanceof HTMLTextAreaElement&&n.answer(e.id,{kind:"free",text:r.value})}}
|
|
1544
|
+
@keydown=${s=>{s.isComposing||!(s.metaKey||s.ctrlKey)||s.key!=="Enter"||(s.preventDefault(),n.next(e.id))}}
|
|
1545
|
+
></textarea>`:k}
|
|
1546
|
+
${e.answered||e.freeSelected?m`<button
|
|
1547
|
+
type="button"
|
|
1548
|
+
class="dpk-grill-clear"
|
|
1549
|
+
@click=${()=>n.answer(e.id,{kind:"clear"})}
|
|
1550
|
+
>
|
|
1551
|
+
${t.grillAnswerClear}
|
|
1552
|
+
</button>`:k}
|
|
1553
|
+
</div>`:k}
|
|
1554
|
+
</section>
|
|
1555
|
+
`,df=(t,e,n)=>m`
|
|
1556
|
+
<label class="dpk-grill-choice" data-choice=${e.id}>
|
|
1557
|
+
<input
|
|
1558
|
+
type="radio"
|
|
1559
|
+
name=${`dpk-grill-${t}`}
|
|
1560
|
+
value=${e.id}
|
|
1561
|
+
.checked=${e.checked}
|
|
1562
|
+
@change=${()=>n.answer(t,{kind:"option",optionId:e.id})}
|
|
1563
|
+
/>
|
|
1564
|
+
<span class="dpk-grill-choice-text">
|
|
1565
|
+
<span class="dpk-grill-letter">(${e.letter})</span>
|
|
1566
|
+
<span>${e.label}</span>
|
|
1567
|
+
</span>
|
|
1568
|
+
</label>
|
|
1569
|
+
`,pf=t=>m`
|
|
1570
|
+
<details class="dpk-grill-question" data-past data-question=${t.id} data-answered=${String(t.answered)}>
|
|
1571
|
+
<summary class="dpk-grill-heading">
|
|
1572
|
+
<span class="dpk-grill-ref">${t.ref}</span>
|
|
1573
|
+
<span class="dpk-grill-heading-text">
|
|
1574
|
+
<strong>${t.title}</strong>
|
|
1575
|
+
<span class="dpk-grill-summary">${t.summary}</span>
|
|
1576
|
+
</span>
|
|
1577
|
+
<span class="dpk-grill-chevron" aria-hidden="true">${ft()}</span>
|
|
1578
|
+
</summary>
|
|
1579
|
+
<div class="dpk-grill-body">
|
|
1580
|
+
${t.description?m`<p class="dpk-grill-description">${t.description}</p>`:k}
|
|
1581
|
+
${t.note?m`<p class="dpk-grill-note">${t.note}</p>`:k}
|
|
1582
|
+
${t.choices.length===0?k:m`<ul class="dpk-grill-past-choices">
|
|
1583
|
+
${t.choices.map(e=>m`<li class="dpk-grill-past-choice" data-checked=${String(e.checked)}>
|
|
1584
|
+
<span class="dpk-grill-letter">(${e.letter})</span>
|
|
1585
|
+
<span>${e.label}</span>
|
|
1586
|
+
</li>`)}
|
|
1587
|
+
</ul>`}
|
|
1588
|
+
${t.freeText===null?k:m`<p class="dpk-grill-past-choice" data-checked="true">${t.freeText}</p>`}
|
|
1589
|
+
</div>
|
|
1590
|
+
</details>
|
|
1591
|
+
`,hf=2400;class uf{#e=wu();#t=null;#n;constructor(e){this.#n=e,e.addController(this)}get state(){return this.#e}hostDisconnected(){this.#i()}async copy(e){this.#r({kind:"copy-started"});const n=this.#e.request,s=await is(e()).catch(()=>!1);this.#r({kind:"copy-finished",request:n,ok:s}),this.#s(n)}async send(e){if(this.#e.status.kind==="sending")return;this.#r({kind:"send-started"});const n=this.#e.request,s=await e().catch(()=>({ok:!1,reason:"error"}));this.#r({kind:"send-finished",request:n,outcome:s}),s.ok&&this.#s(n)}#r(e){(e.kind==="copy-started"||e.kind==="send-started")&&this.#i(),this.#e=$u(this.#e,e),this.#n.requestUpdate()}#s(e){e===this.#e.request&&(this.#i(),this.#t=setTimeout(()=>{this.#t=null,this.#r({kind:"settled",request:e})},hf))}#i(){this.#t!==null&&clearTimeout(this.#t),this.#t=null}}const zs="dev-process-kit:locale";class ff{#e;#t;#n;#r=null;#s=null;#i;#o;constructor(e,n,s){this.#e=e,this.#t=n,this.#n=s,e.addController(this)}get authored(){if(this.#i===void 0)return Pt(Lt(this.#e));const e=this.#e.parentNode;return Pt(this.#i??(e===null?null:Lt(e)))}get locale(){return this.#o??this.#a()}#a(){return tl({preference:this.#s,authored:this.authored})}hostConnected(){this.#r===null&&(this.#r=this.#t()?Je(kr):pe(kr),this.#s=this.#r.read(zs)),this.#i??=this.#e.getAttribute("lang"),this.#l()}pick(e){this.#s=nl(e,this.authored),this.#s===null?this.#r?.remove(zs):this.#r?.write(zs,this.#s),this.#l(),this.#e.requestUpdate()}#l(){const e=this.#s??this.#i??null;e===null?this.#e.removeAttribute("lang"):this.#e.getAttribute("lang")!==e&&this.#e.setAttribute("lang",e);const n=this.#a();if(n===this.#o)return;const s=this.#o===void 0;this.#o=n,this.#n(),(!s||this.#s!==null)&&document.dispatchEvent(new Event(On))}}const gf="(max-width: 760px)",mf=()=>typeof matchMedia=="function"?matchMedia(gf):null;class kf{#e;#t=null;#n=!1;constructor(e){this.#e=e,e.addController(this)}hostConnected(){this.#t=mf(),this.#n=this.#t?.matches===!0,this.#t?.addEventListener("change",this.#r)}hostDisconnected(){this.#t?.removeEventListener("change",this.#r),this.#t=null}get narrow(){return this.#n}#r=e=>{this.#n=e.matches,this.#e.requestUpdate()}}const ca=()=>Yt(typeof location>"u"?"":location.hash),bf=(t,e)=>{if(typeof history>"u")return;const n=`${location.pathname}${location.search}${Ke(t)}`;`${location.pathname}${location.search}${location.hash}`!==n&&(e?history.replaceState(null,"",n):history.pushState(null,"",n))};class vf{#e;#t=null;#n=0;constructor(e){this.#e=e}get orphans(){return this.#n}route(){const e=this.#e.renderRoot,n=Ee(e.querySelector('slot[name="preview"]'),HTMLSlotElement);if(n===null)return;this.#t!==n&&(this.#t=n,n.addEventListener("slotchange",this.#r));const s=new Set(Array.from(e.querySelectorAll("slot")).map(i=>i.getAttribute("name")??"")),r=n.assignedElements();for(const i of r){const o=i.getAttribute("data-preview-id");if(!o)continue;const a=`preview:${o}`;i.getAttribute("slot")!==a&&s.has(a)&&i.setAttribute("slot",a)}r.length!==this.#n&&(this.#n=r.length,queueMicrotask(()=>this.#e.requestUpdate()))}#r=()=>{queueMicrotask(()=>this.route())}}const da=(t,e)=>{const n=[],s=r=>{for(const i of r.querySelectorAll("*"))i.matches(e)&&n.push(i),i.shadowRoot&&s(i.shadowRoot)};return s(t),t instanceof Element&&t.shadowRoot&&s(t.shadowRoot),n},xf=(t,e)=>{const n=[];let s=t;for(;s;){const r=s instanceof Element&&s.assignedSlot?s.assignedSlot:s.parentNode;if(s=r instanceof ShadowRoot?r.host:r,!(s instanceof Element)||s===e)break;n.push(s)}return n},pa="data-dpk-target",yf=2800,ha=48,wf=t=>t.getClientRects().length>0,ua=(t,e)=>{const n=da(t,`[${pa}]`).filter(i=>(i.getAttribute(pa)??"").split(/\s+/).includes(e)),s=da(t,"[data-dpk-comment]").filter(i=>i.getAttribute("data-dpk-comment")===e),r=[...n,...s];return r.find(wf)??r[0]??null},fa=(t,e)=>{const n=getComputedStyle(t),s=e==="y"?n.overflowY:n.overflowX;return s!=="auto"&&s!=="scroll"?!1:e==="y"?t.scrollHeight>t.clientHeight:t.scrollWidth>t.clientWidth},$f=(t,e)=>{for(const n of xf(e,t))fa(n,"y")&&xs(n,e,ha),fa(n,"x")&&xo(n,e,ha)},ga="color-mix(in srgb, var(--dpk-accent) 45%, transparent)",qe={outline:"2px solid var(--dpk-accent)",outlineOffset:"3px"},ma={outline:"2px solid transparent",outlineOffset:"3px"},Sf=t=>t?[{...qe},{...qe,offset:.85},{...ma}]:[{...qe,boxShadow:`0 0 0 0 ${ga}`},{...qe,boxShadow:"0 0 0 14px transparent",offset:.3},{...qe,boxShadow:`0 0 0 0 ${ga}`,offset:.31},{...qe,boxShadow:"0 0 0 14px transparent",offset:.6},{...qe,offset:.85},{...ma}],St={filter:"drop-shadow(0 0 3px var(--dpk-accent)) drop-shadow(0 0 3px var(--dpk-accent))"},gn={filter:"drop-shadow(0 0 3px transparent) drop-shadow(0 0 3px transparent)"},Af=t=>t?[{...St},{...St,offset:.85},{...gn}]:[{...St},{...gn,offset:.3},{...St,offset:.31},{...gn,offset:.6},{...St,offset:.61},{...gn}],Cf=t=>{if(typeof t.animate!="function")return;const e=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,n=t instanceof SVGElement&&!(t instanceof SVGSVGElement);t.animate(n?Af(e):Sf(e),{duration:yf,easing:"ease-out"})},Tf=440,Ef=16;class Rf{#e;#t=null;constructor(e,n){this.#e=n,e.addController(this)}hostConnected(){window.addEventListener("keydown",this.#r)}hostUpdated(){const e=this.#e.surface(),n=this.#e.open()&&e!==null;if(n!==(this.#t!==null)){if(n){const s=this.#e.anchor()??{top:0,bottom:0,right:window.innerWidth},r=s instanceof Element?s.getBoundingClientRect().bottom:s.bottom,i=Math.max(0,window.innerHeight-r-Ef);this.#t=ao(e,s,{width:Tf,height:i},{placement:"bottom-end"});return}this.#n(),lo(e)}}hostDisconnected(){window.removeEventListener("keydown",this.#r),this.#n()}#n(){this.#t?.(),this.#t=null}#r=e=>{e.key!=="Escape"||e.defaultPrevented||e.isComposing||!this.#e.open()||this.#e.close()}}const mn="dpk-settings",ka={width:320,height:420},_f=(t,e,n)=>m`<button
|
|
1592
|
+
class="dpk-header-action dpk-settings-trigger"
|
|
1593
|
+
type="button"
|
|
1594
|
+
aria-controls=${mn}
|
|
1595
|
+
aria-haspopup="menu"
|
|
1596
|
+
aria-expanded=${t?"true":"false"}
|
|
1597
|
+
aria-label=${e.settings}
|
|
1598
|
+
data-tooltip=${e.settings}
|
|
1599
|
+
@click=${n.toggle}
|
|
1600
|
+
>
|
|
1601
|
+
${Fd()}
|
|
1602
|
+
</button>`,Of=(t,e,n)=>m`<div id=${mn} class="dpk-settings" popover="manual" role="menu" aria-label=${e.settings}>
|
|
1603
|
+
${t.items.map(s=>Lf(s,n))}
|
|
1604
|
+
${t.note===void 0?k:m`<p class="dpk-settings-note">${t.note}</p>`}
|
|
1605
|
+
</div>`,Lf=(t,e)=>m`<button
|
|
1606
|
+
class="dpk-settings-option"
|
|
1607
|
+
type="button"
|
|
1608
|
+
role="menuitemcheckbox"
|
|
1609
|
+
data-setting=${t.key}
|
|
1610
|
+
aria-checked=${t.on?"true":"false"}
|
|
1611
|
+
@click=${()=>e.flip(t.toggle)}
|
|
1612
|
+
>
|
|
1613
|
+
<span class="dpk-settings-check" aria-hidden="true">${t.on?Di():k}</span>
|
|
1614
|
+
<span class="dpk-settings-text">
|
|
1615
|
+
<span class="dpk-settings-name">${t.label}</span>
|
|
1616
|
+
${t.hint===void 0?k:m`<span class="dpk-settings-hint">${t.hint}</span>`}
|
|
1617
|
+
</span>
|
|
1618
|
+
</button>`,ye={min:180,max:560,step:16,largeStep:64},Pf={side:"left",defaultWidth:260},kn=t=>Math.round(Math.min(ye.max,Math.max(ye.min,t))),ba=t=>typeof t=="number"&&Number.isFinite(t)?kn(t):null,Ms=(t,e)=>t==="left"?e:-e,zf=(t,e)=>kn(t.startWidth+Ms(t.side,e-t.startX)),Mf=(t,e,{key:n,shiftKey:s})=>{const r=s?ye.largeStep:ye.step;switch(n){case"ArrowLeft":return kn(t+Ms(e,-r));case"ArrowRight":return kn(t+Ms(e,r));case"Home":return ye.min;case"End":return ye.max;default:return null}},va=t=>typeof t=="boolean"?t:null,If=t=>t==="left"?"right":"left",Nf=(t,e)=>e?{action:"expand",points:If(t)}:{action:"collapse",points:t},Df=t=>`dev-process-kit:sidebar-collapsed:${t}`;class jf{#e;#t;#n=null;#r="";#s=!1;#i=!1;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#t.persist()?Je(va):pe(va),this.#r=Df(this.#t.template()),this.#s=this.#n.read(this.#r)??!1)}get collapsed(){return this.#s}get drawerOpen(){return this.#i}toggleDrawer(){this.#i=!this.#i,this.#e.requestUpdate()}closeDrawer(){this.#i&&(this.#i=!1,this.#e.requestUpdate())}toggle(){this.#s=!this.#s,this.#s?this.#n?.write(this.#r,!0):this.#n?.remove(this.#r),this.#e.requestUpdate()}}const qf=t=>`dev-process-kit:sidebar-width:${t}`,Is={kind:"idle"};class Bf{constructor(e,n){this.#n=null,this.#r="",this.#s=null,this.#i=Is,this.handlers={pointerdown:s=>{s.button===0&&(s.preventDefault(),s.currentTarget instanceof Element&&s.currentTarget.setPointerCapture(s.pointerId),this.#i={kind:"dragging",pointerId:s.pointerId,side:this.#t.layout().side,startX:s.clientX,startWidth:this.width},this.#e.requestUpdate())},pointermove:s=>{const r=this.#i;r.kind!=="dragging"||r.pointerId!==s.pointerId||this.#a(zf(r,s.clientX))},pointerup:s=>this.#o(s),pointercancel:s=>this.#o(s),keydown:s=>{const r=Mf(this.width,this.#t.layout().side,s);r!==null&&(s.preventDefault(),this.#a(r),this.#l())},dblclick:()=>{this.#a(this.#t.layout().defaultWidth),this.#l()}},this.#e=e,this.#t=n,e.addController(this)}#e;#t;#n;#r;#s;#i;hostConnected(){this.#n===null&&(this.#n=this.#t.persist()?Je(ba):pe(ba),this.#r=qf(this.#t.template()),this.#s=this.#n.read(this.#r))}hostDisconnected(){this.#i=Is}get width(){return this.#s??this.#t.layout().defaultWidth}get dragging(){return this.#i.kind==="dragging"}#o(e){const n=this.#i;n.kind!=="dragging"||n.pointerId!==e.pointerId||(this.#i=Is,this.#l(),this.#e.requestUpdate())}#a(e){const n=e===this.#t.layout().defaultWidth?null:e;n!==this.#s&&(this.#s=n,this.#e.requestUpdate())}#l(){this.#s===null?this.#n?.remove(this.#r):this.#n?.write(this.#r,this.#s)}}const Hf=[Mt,Pn,ue`
|
|
1619
|
+
:host {
|
|
1620
|
+
display: block;
|
|
1621
|
+
min-height: 100%;
|
|
1622
|
+
background: var(--dpk-paper);
|
|
1623
|
+
color-scheme: light;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
/* The element stamps its resolved scheme; nested components inherit it. */
|
|
1627
|
+
:host([data-theme='dark']) {
|
|
1628
|
+
color-scheme: dark;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
.dpk-shell {
|
|
1632
|
+
display: grid;
|
|
1633
|
+
/* One column no wider than the host: a truncated title must not widen
|
|
1634
|
+
the page past a phone screen. */
|
|
1635
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1636
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
1637
|
+
min-height: 100%;
|
|
1638
|
+
max-height: 100%;
|
|
1639
|
+
/*
|
|
1640
|
+
* The fallback when the page gives the host no height: the viewport, less
|
|
1641
|
+
* the safe-area insets a Claude Artifact pads its root by. Without it the
|
|
1642
|
+
* shell grows with its content, leaving the page's own ground below a
|
|
1643
|
+
* short page and scrolling the header and the supplements away on a long one.
|
|
1644
|
+
* A host with a height still wins: the min/max-height above pin the shell
|
|
1645
|
+
* to it.
|
|
1646
|
+
*/
|
|
1647
|
+
height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
/* ------------------------------------------------------------- header */
|
|
1651
|
+
|
|
1652
|
+
.dpk-header {
|
|
1653
|
+
position: relative;
|
|
1654
|
+
z-index: 20;
|
|
1655
|
+
display: flex;
|
|
1656
|
+
flex-wrap: wrap;
|
|
1657
|
+
align-items: center;
|
|
1658
|
+
gap: 8px 14px;
|
|
1659
|
+
min-height: 44px;
|
|
1660
|
+
/* Right padding keeps the header content clear of the fixed review toggles. */
|
|
1661
|
+
padding: 6px 100px 6px 16px;
|
|
1662
|
+
border-bottom: 1px solid var(--dpk-rule);
|
|
1663
|
+
background: var(--dpk-glass);
|
|
1664
|
+
backdrop-filter: saturate(1.6) blur(14px);
|
|
1665
|
+
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
/* A hairline of the accent along the bottom edge, fading out to the right. */
|
|
1669
|
+
.dpk-header::after {
|
|
1670
|
+
content: '';
|
|
1671
|
+
position: absolute;
|
|
1672
|
+
left: 0;
|
|
1673
|
+
right: 0;
|
|
1674
|
+
bottom: -1px;
|
|
1675
|
+
height: 1px;
|
|
1676
|
+
background: linear-gradient(
|
|
1677
|
+
90deg,
|
|
1678
|
+
color-mix(in srgb, var(--dpk-accent) 70%, transparent),
|
|
1679
|
+
color-mix(in srgb, var(--dpk-accent) 0%, transparent) 38%
|
|
1680
|
+
);
|
|
1681
|
+
pointer-events: none;
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
/* Kit mark: a stack of pages, the single HTML page the agent wrote. */
|
|
1685
|
+
.dpk-brand {
|
|
1686
|
+
position: relative;
|
|
1687
|
+
flex: none;
|
|
1688
|
+
width: 32px;
|
|
1689
|
+
height: 32px;
|
|
1690
|
+
border-radius: 9px;
|
|
1691
|
+
background:
|
|
1692
|
+
radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 60%),
|
|
1693
|
+
linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
1694
|
+
box-shadow:
|
|
1695
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.3),
|
|
1696
|
+
inset 0 -1px 0 rgba(0, 0, 0, 0.12),
|
|
1697
|
+
0 4px 12px -4px color-mix(in srgb, var(--dpk-accent) 70%, transparent);
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
.dpk-brand::before,
|
|
1701
|
+
.dpk-brand::after {
|
|
1702
|
+
content: '';
|
|
1703
|
+
position: absolute;
|
|
1704
|
+
width: 12px;
|
|
1705
|
+
height: 15px;
|
|
1706
|
+
border-radius: 3px;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
.dpk-brand::before {
|
|
1710
|
+
left: 12px;
|
|
1711
|
+
top: 7px;
|
|
1712
|
+
background: rgba(255, 255, 255, 0.4);
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
.dpk-brand::after {
|
|
1716
|
+
left: 8px;
|
|
1717
|
+
top: 10px;
|
|
1718
|
+
background:
|
|
1719
|
+
linear-gradient(var(--dpk-accent), var(--dpk-accent)) 3px 4px / 6px 1.5px no-repeat,
|
|
1720
|
+
linear-gradient(var(--dpk-accent), var(--dpk-accent)) 3px 7.5px / 4px 1.5px no-repeat,
|
|
1721
|
+
#fff;
|
|
1722
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
/* The title takes what the header has left: the template's header content
|
|
1726
|
+
keeps its own width, and only a title too long for the rest ellipsizes.
|
|
1727
|
+
Header content with no room beside the title wraps to a row of its own
|
|
1728
|
+
rather than being squeezed. */
|
|
1729
|
+
.dpk-title {
|
|
1730
|
+
flex: 1 1 0%;
|
|
1731
|
+
display: flex;
|
|
1732
|
+
flex-direction: column;
|
|
1733
|
+
gap: 3px;
|
|
1734
|
+
min-width: min(160px, 100%);
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
.dpk-title h1 {
|
|
1738
|
+
font-size: 16px;
|
|
1739
|
+
font-weight: 680;
|
|
1740
|
+
letter-spacing: -0.02em;
|
|
1741
|
+
white-space: nowrap;
|
|
1742
|
+
overflow: hidden;
|
|
1743
|
+
text-overflow: ellipsis;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
.dpk-template-mark {
|
|
1747
|
+
align-self: flex-start;
|
|
1748
|
+
font-family: var(--dpk-mono);
|
|
1749
|
+
font-size: 9.5px;
|
|
1750
|
+
font-weight: 600;
|
|
1751
|
+
letter-spacing: 0.14em;
|
|
1752
|
+
line-height: 1;
|
|
1753
|
+
text-transform: uppercase;
|
|
1754
|
+
color: var(--dpk-accent);
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
.dpk-header-slot {
|
|
1758
|
+
flex: 0 1 auto;
|
|
1759
|
+
min-width: 0;
|
|
1760
|
+
display: flex;
|
|
1761
|
+
align-items: center;
|
|
1762
|
+
gap: 10px;
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
.dpk-header-meta {
|
|
1766
|
+
display: flex;
|
|
1767
|
+
align-items: center;
|
|
1768
|
+
gap: 0;
|
|
1769
|
+
margin-left: auto;
|
|
1770
|
+
padding: 3px;
|
|
1771
|
+
border-radius: 999px;
|
|
1772
|
+
border: 1px solid var(--dpk-rule);
|
|
1773
|
+
background: var(--dpk-paper-sunken);
|
|
1774
|
+
font-family: var(--dpk-mono);
|
|
1775
|
+
font-size: 10px;
|
|
1776
|
+
letter-spacing: 0.02em;
|
|
1777
|
+
color: var(--dpk-ink-faint);
|
|
1778
|
+
white-space: nowrap;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
.dpk-header-meta span {
|
|
1782
|
+
padding: 3px 9px;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
.dpk-header-meta span + span {
|
|
1786
|
+
border-left: 1px solid var(--dpk-rule);
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
.dpk-version-select {
|
|
1790
|
+
margin: -3px 0;
|
|
1791
|
+
padding: 3px 14px 3px 0;
|
|
1792
|
+
border: 0;
|
|
1793
|
+
border-radius: 4px;
|
|
1794
|
+
background: transparent
|
|
1795
|
+
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23878e9e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>")
|
|
1796
|
+
no-repeat right 2px center;
|
|
1797
|
+
appearance: none;
|
|
1798
|
+
/* As wide as the version shown, not the longest prerelease in the list. */
|
|
1799
|
+
field-sizing: content;
|
|
1800
|
+
color: inherit;
|
|
1801
|
+
font: inherit;
|
|
1802
|
+
letter-spacing: inherit;
|
|
1803
|
+
cursor: pointer;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
.dpk-version-select:hover {
|
|
1807
|
+
color: var(--dpk-ink-soft);
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
.dpk-version-select:focus-visible {
|
|
1811
|
+
outline: none;
|
|
1812
|
+
box-shadow: var(--dpk-focus);
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
.dpk-header-tools {
|
|
1816
|
+
display: flex;
|
|
1817
|
+
flex: none;
|
|
1818
|
+
align-items: center;
|
|
1819
|
+
gap: 2px;
|
|
1820
|
+
padding: 2px;
|
|
1821
|
+
border: 1px solid var(--dpk-rule);
|
|
1822
|
+
border-radius: 999px;
|
|
1823
|
+
background: var(--dpk-paper-sunken);
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
.dpk-lang-select {
|
|
1827
|
+
flex: none;
|
|
1828
|
+
height: 26px;
|
|
1829
|
+
padding: 0 24px 0 10px;
|
|
1830
|
+
border: 0;
|
|
1831
|
+
border-radius: 999px;
|
|
1832
|
+
background: transparent
|
|
1833
|
+
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23878e9e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>")
|
|
1834
|
+
no-repeat right 8px center;
|
|
1835
|
+
appearance: none;
|
|
1836
|
+
color: var(--dpk-ink-soft);
|
|
1837
|
+
font: inherit;
|
|
1838
|
+
font-size: 12px;
|
|
1839
|
+
font-weight: 520;
|
|
1840
|
+
cursor: pointer;
|
|
1841
|
+
transition:
|
|
1842
|
+
color 160ms var(--dpk-ease),
|
|
1843
|
+
background-color 160ms var(--dpk-ease);
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
.dpk-lang-select:hover {
|
|
1847
|
+
color: var(--dpk-ink);
|
|
1848
|
+
background-color: var(--dpk-paper-raised);
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
.dpk-lang-select:focus-visible {
|
|
1852
|
+
outline: none;
|
|
1853
|
+
box-shadow: var(--dpk-focus);
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
.dpk-theme-toggle {
|
|
1857
|
+
display: inline-flex;
|
|
1858
|
+
flex: none;
|
|
1859
|
+
align-items: center;
|
|
1860
|
+
justify-content: center;
|
|
1861
|
+
width: 26px;
|
|
1862
|
+
height: 26px;
|
|
1863
|
+
padding: 0;
|
|
1864
|
+
border: 0;
|
|
1865
|
+
border-radius: 999px;
|
|
1866
|
+
background: transparent;
|
|
1867
|
+
color: var(--dpk-ink-soft);
|
|
1868
|
+
cursor: pointer;
|
|
1869
|
+
transition:
|
|
1870
|
+
color 160ms var(--dpk-ease),
|
|
1871
|
+
background 160ms var(--dpk-ease),
|
|
1872
|
+
transform 300ms var(--dpk-ease-spring);
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
.dpk-theme-toggle svg {
|
|
1876
|
+
width: 14px;
|
|
1877
|
+
height: 14px;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
.dpk-theme-toggle:hover {
|
|
1881
|
+
color: var(--dpk-ink);
|
|
1882
|
+
background: var(--dpk-paper-raised);
|
|
1883
|
+
transform: rotate(-18deg);
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
.dpk-theme-toggle:focus-visible {
|
|
1887
|
+
outline: none;
|
|
1888
|
+
box-shadow: var(--dpk-focus);
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
/* ------------------------------------------------------------ changes */
|
|
1892
|
+
|
|
1893
|
+
.dpk-bell {
|
|
1894
|
+
position: relative;
|
|
1895
|
+
display: inline-flex;
|
|
1896
|
+
flex: none;
|
|
1897
|
+
align-items: center;
|
|
1898
|
+
justify-content: center;
|
|
1899
|
+
width: 26px;
|
|
1900
|
+
height: 26px;
|
|
1901
|
+
padding: 0;
|
|
1902
|
+
border: 0;
|
|
1903
|
+
border-radius: 999px;
|
|
1904
|
+
background: transparent;
|
|
1905
|
+
color: var(--dpk-ink-soft);
|
|
1906
|
+
cursor: pointer;
|
|
1907
|
+
transition:
|
|
1908
|
+
color 160ms var(--dpk-ease),
|
|
1909
|
+
background 160ms var(--dpk-ease);
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
.dpk-bell svg {
|
|
1913
|
+
width: 14px;
|
|
1914
|
+
height: 14px;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
.dpk-bell:hover,
|
|
1918
|
+
.dpk-bell[aria-expanded='true'] {
|
|
1919
|
+
color: var(--dpk-ink);
|
|
1920
|
+
background: var(--dpk-paper-raised);
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
.dpk-bell:focus-visible {
|
|
1924
|
+
outline: none;
|
|
1925
|
+
box-shadow: var(--dpk-focus);
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
.dpk-bell-badge {
|
|
1929
|
+
position: absolute;
|
|
1930
|
+
top: -5px;
|
|
1931
|
+
right: -5px;
|
|
1932
|
+
min-width: 16px;
|
|
1933
|
+
height: 16px;
|
|
1934
|
+
padding: 0 3px;
|
|
1935
|
+
border: 2px solid var(--dpk-paper);
|
|
1936
|
+
border-radius: 999px;
|
|
1937
|
+
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
1938
|
+
color: var(--dpk-accent-ink);
|
|
1939
|
+
font-family: var(--dpk-mono);
|
|
1940
|
+
font-size: 9px;
|
|
1941
|
+
font-weight: 650;
|
|
1942
|
+
font-variant-numeric: tabular-nums;
|
|
1943
|
+
line-height: 12px;
|
|
1944
|
+
text-align: center;
|
|
1945
|
+
animation: dpk-pop 260ms var(--dpk-ease-spring);
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
.dpk-changes {
|
|
1949
|
+
box-sizing: border-box;
|
|
1950
|
+
overflow: auto;
|
|
1951
|
+
position: fixed;
|
|
1952
|
+
inset: auto;
|
|
1953
|
+
margin: 0;
|
|
1954
|
+
padding: 12px;
|
|
1955
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
1956
|
+
border-radius: var(--dpk-radius-lg);
|
|
1957
|
+
background: var(--dpk-paper-raised);
|
|
1958
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
1959
|
+
color: var(--dpk-ink);
|
|
1960
|
+
font-size: 12.5px;
|
|
1961
|
+
animation: dpk-notice-in 180ms var(--dpk-ease);
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
.dpk-changes-head {
|
|
1965
|
+
display: flex;
|
|
1966
|
+
align-items: baseline;
|
|
1967
|
+
justify-content: space-between;
|
|
1968
|
+
gap: 8px;
|
|
1969
|
+
margin: 0 2px 10px;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
.dpk-changes-head {
|
|
1973
|
+
align-items: center;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
.dpk-changes-title {
|
|
1977
|
+
margin: 0;
|
|
1978
|
+
font-size: inherit;
|
|
1979
|
+
font-weight: 650;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
.dpk-changes-read-all.dpk-btn {
|
|
1983
|
+
flex: none;
|
|
1984
|
+
font-size: 11.5px;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
.dpk-changes-read-all[aria-disabled='true'] {
|
|
1988
|
+
opacity: 0.5;
|
|
1989
|
+
cursor: default;
|
|
1990
|
+
pointer-events: none;
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
.dpk-changes-group + .dpk-changes-group {
|
|
1994
|
+
margin-top: 14px;
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
.dpk-changes-revision {
|
|
1998
|
+
display: flex;
|
|
1999
|
+
align-items: center;
|
|
2000
|
+
gap: 6px;
|
|
2001
|
+
margin: 0 2px 6px;
|
|
2002
|
+
color: var(--dpk-ink-faint);
|
|
2003
|
+
font-family: var(--dpk-mono);
|
|
2004
|
+
font-size: 11px;
|
|
2005
|
+
font-weight: 500;
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
.dpk-changes-revision span:first-child {
|
|
2009
|
+
overflow: hidden;
|
|
2010
|
+
text-overflow: ellipsis;
|
|
2011
|
+
white-space: nowrap;
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
.dpk-changes-current {
|
|
2015
|
+
flex: none;
|
|
2016
|
+
padding: 1px 6px;
|
|
2017
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
2018
|
+
border-radius: 999px;
|
|
2019
|
+
color: var(--dpk-ink-soft);
|
|
2020
|
+
font-family: var(--dpk-body);
|
|
2021
|
+
font-size: 10px;
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
.dpk-changes-list {
|
|
2025
|
+
display: grid;
|
|
2026
|
+
gap: 6px;
|
|
2027
|
+
margin: 0;
|
|
2028
|
+
padding: 0;
|
|
2029
|
+
list-style: none;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
.dpk-change {
|
|
2033
|
+
display: grid;
|
|
2034
|
+
gap: 4px;
|
|
2035
|
+
padding: 9px 10px;
|
|
2036
|
+
border: 1px solid var(--dpk-rule);
|
|
2037
|
+
border-radius: var(--dpk-radius);
|
|
2038
|
+
background: var(--dpk-paper);
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
.dpk-change[data-fresh] {
|
|
2042
|
+
border-color: color-mix(in srgb, var(--dpk-accent) 35%, transparent);
|
|
2043
|
+
background: var(--dpk-accent-soft);
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
.dpk-change .dpk-notice-show {
|
|
2047
|
+
justify-self: end;
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
.dpk-change-title {
|
|
2051
|
+
margin: 0;
|
|
2052
|
+
font-weight: 600;
|
|
2053
|
+
line-height: 1.4;
|
|
2054
|
+
overflow-wrap: anywhere;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
.dpk-change-new {
|
|
2058
|
+
margin-right: 4px;
|
|
2059
|
+
padding: 1px 6px;
|
|
2060
|
+
border-radius: 999px;
|
|
2061
|
+
background: var(--dpk-accent);
|
|
2062
|
+
color: var(--dpk-accent-ink);
|
|
2063
|
+
font-size: 10px;
|
|
2064
|
+
font-weight: 650;
|
|
2065
|
+
vertical-align: 1px;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
.dpk-change-body {
|
|
2069
|
+
margin: 0;
|
|
2070
|
+
color: var(--dpk-ink-soft);
|
|
2071
|
+
line-height: 1.5;
|
|
2072
|
+
white-space: pre-line;
|
|
2073
|
+
overflow-wrap: anywhere;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
/* Below the review button, at the top right where the bell is. */
|
|
2077
|
+
.dpk-toasts {
|
|
2078
|
+
position: fixed;
|
|
2079
|
+
top: 64px;
|
|
2080
|
+
right: 16px;
|
|
2081
|
+
z-index: 70;
|
|
2082
|
+
display: grid;
|
|
2083
|
+
justify-items: end;
|
|
2084
|
+
gap: 8px;
|
|
2085
|
+
width: min(360px, calc(100vw - 32px));
|
|
2086
|
+
pointer-events: none;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
.dpk-toast {
|
|
2090
|
+
box-sizing: border-box;
|
|
2091
|
+
display: grid;
|
|
2092
|
+
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
2093
|
+
align-items: start;
|
|
2094
|
+
gap: 10px;
|
|
2095
|
+
width: 100%;
|
|
2096
|
+
padding: 10px 8px 10px 12px;
|
|
2097
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
2098
|
+
border-radius: var(--dpk-radius-lg);
|
|
2099
|
+
background: var(--dpk-paper-raised);
|
|
2100
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2101
|
+
color: var(--dpk-ink);
|
|
2102
|
+
font-size: 12.5px;
|
|
2103
|
+
pointer-events: auto;
|
|
2104
|
+
animation: dpk-notice-in 260ms var(--dpk-ease);
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
.dpk-toast-icon {
|
|
2108
|
+
display: inline-flex;
|
|
2109
|
+
padding-top: 2px;
|
|
2110
|
+
color: var(--dpk-accent);
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
.dpk-toast-icon svg {
|
|
2114
|
+
width: 14px;
|
|
2115
|
+
height: 14px;
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
.dpk-toast-text {
|
|
2119
|
+
display: grid;
|
|
2120
|
+
gap: 2px;
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
.dpk-toast .dpk-change-body {
|
|
2124
|
+
display: -webkit-box;
|
|
2125
|
+
overflow: hidden;
|
|
2126
|
+
-webkit-box-orient: vertical;
|
|
2127
|
+
-webkit-line-clamp: 2;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
.dpk-toast-close {
|
|
2131
|
+
display: inline-flex;
|
|
2132
|
+
align-items: center;
|
|
2133
|
+
justify-content: center;
|
|
2134
|
+
width: 22px;
|
|
2135
|
+
height: 22px;
|
|
2136
|
+
padding: 0;
|
|
2137
|
+
border: 0;
|
|
2138
|
+
border-radius: 999px;
|
|
2139
|
+
background: transparent;
|
|
2140
|
+
color: var(--dpk-ink-faint);
|
|
2141
|
+
cursor: pointer;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
.dpk-toast-close svg {
|
|
2145
|
+
width: 12px;
|
|
2146
|
+
height: 12px;
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
.dpk-toast-close:hover {
|
|
2150
|
+
color: var(--dpk-ink);
|
|
2151
|
+
background: var(--dpk-paper-sunken);
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
.dpk-toast-close:focus-visible {
|
|
2155
|
+
outline: none;
|
|
2156
|
+
box-shadow: var(--dpk-focus);
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
.dpk-toast-actions {
|
|
2160
|
+
display: flex;
|
|
2161
|
+
flex-wrap: wrap;
|
|
2162
|
+
justify-content: end;
|
|
2163
|
+
gap: 6px;
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
.dpk-toast-more {
|
|
2167
|
+
padding: 4px 10px;
|
|
2168
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
2169
|
+
border-radius: 999px;
|
|
2170
|
+
background: var(--dpk-paper-raised);
|
|
2171
|
+
color: var(--dpk-ink-soft);
|
|
2172
|
+
font: inherit;
|
|
2173
|
+
font-size: 11.5px;
|
|
2174
|
+
cursor: pointer;
|
|
2175
|
+
pointer-events: auto;
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
.dpk-toast-more:hover {
|
|
2179
|
+
color: var(--dpk-ink);
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
.dpk-toast-more:focus-visible {
|
|
2183
|
+
outline: none;
|
|
2184
|
+
box-shadow: var(--dpk-focus);
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
@keyframes dpk-notice-in {
|
|
2188
|
+
from {
|
|
2189
|
+
opacity: 0;
|
|
2190
|
+
transform: translateY(-6px) scale(0.98);
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
/* --------------------------------------------------------------- body */
|
|
2195
|
+
|
|
2196
|
+
/* Positioned: the sidebar drawer and a narrow screen's review open over it. */
|
|
2197
|
+
.dpk-body {
|
|
2198
|
+
position: relative;
|
|
2199
|
+
display: flex;
|
|
2200
|
+
min-height: 0;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
.dpk-sidebar {
|
|
2204
|
+
/* The element sets the template's or the reader's width; on a narrow
|
|
2205
|
+
screen a wide one still leaves the main column some room. */
|
|
2206
|
+
width: var(--dpk-sidebar-width);
|
|
2207
|
+
max-width: calc(100% - 120px);
|
|
2208
|
+
flex: 0 0 auto;
|
|
2209
|
+
border-right: 1px solid var(--dpk-rule);
|
|
2210
|
+
background: var(--dpk-paper-sunken);
|
|
2211
|
+
overflow: auto;
|
|
2212
|
+
padding: 18px 14px;
|
|
2213
|
+
scrollbar-width: thin;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
.dpk-sidebar[hidden] {
|
|
2217
|
+
display: none;
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
/*
|
|
2221
|
+
* A right-hand sidebar: a rail beside the main column rather than a list
|
|
2222
|
+
* before it. \`:where\` keeps these as weak as the rules above, so a
|
|
2223
|
+
* template can still restyle the rail (stacking it on a phone, say).
|
|
2224
|
+
*/
|
|
2225
|
+
:where(.dpk-body[data-sidebar-side='right']) .dpk-main {
|
|
2226
|
+
order: 1;
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar,
|
|
2230
|
+
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-resizer,
|
|
2231
|
+
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-toggle,
|
|
2232
|
+
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-strip {
|
|
2233
|
+
order: 2;
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar,
|
|
2237
|
+
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-strip {
|
|
2238
|
+
border-right: 0;
|
|
2239
|
+
border-left: 1px solid var(--dpk-rule);
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
/*
|
|
2243
|
+
* The fold button. Expanded, it sits on the sidebar's border near the top
|
|
2244
|
+
* and, like the resizer, takes no room of its own; folded, it is the only
|
|
2245
|
+
* thing left in a narrow strip where the sidebar was.
|
|
2246
|
+
*/
|
|
2247
|
+
.dpk-sidebar-toggle {
|
|
2248
|
+
position: relative;
|
|
2249
|
+
z-index: 7;
|
|
2250
|
+
display: inline-flex;
|
|
2251
|
+
flex: none;
|
|
2252
|
+
align-self: flex-start;
|
|
2253
|
+
align-items: center;
|
|
2254
|
+
justify-content: center;
|
|
2255
|
+
width: 22px;
|
|
2256
|
+
height: 22px;
|
|
2257
|
+
margin: 14px -11px 0;
|
|
2258
|
+
padding: 0;
|
|
2259
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
2260
|
+
border-radius: 999px;
|
|
2261
|
+
background: var(--dpk-paper-raised);
|
|
2262
|
+
color: var(--dpk-ink-soft);
|
|
2263
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
2264
|
+
cursor: pointer;
|
|
2265
|
+
transition:
|
|
2266
|
+
color 160ms var(--dpk-ease),
|
|
2267
|
+
border-color 160ms var(--dpk-ease),
|
|
2268
|
+
background 160ms var(--dpk-ease);
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
.dpk-sidebar-toggle svg {
|
|
2272
|
+
width: 13px;
|
|
2273
|
+
height: 13px;
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
.dpk-sidebar-toggle:hover {
|
|
2277
|
+
color: var(--dpk-accent);
|
|
2278
|
+
border-color: color-mix(in srgb, var(--dpk-accent) 45%, transparent);
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
.dpk-sidebar-toggle:focus-visible {
|
|
2282
|
+
outline: none;
|
|
2283
|
+
box-shadow: var(--dpk-focus);
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
.dpk-sidebar-strip {
|
|
2287
|
+
display: flex;
|
|
2288
|
+
flex: none;
|
|
2289
|
+
justify-content: center;
|
|
2290
|
+
width: 36px;
|
|
2291
|
+
padding-top: 14px;
|
|
2292
|
+
border-right: 1px solid var(--dpk-rule);
|
|
2293
|
+
background: var(--dpk-paper-sunken);
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
.dpk-sidebar-strip .dpk-sidebar-toggle {
|
|
2297
|
+
margin: 0;
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
/*
|
|
2301
|
+
* The sidebar's resizable edge: a hit area straddling its border that takes
|
|
2302
|
+
* no room of its own, with an accent line while hovered, focused or dragged.
|
|
2303
|
+
*/
|
|
2304
|
+
.dpk-sidebar-resizer {
|
|
2305
|
+
position: relative;
|
|
2306
|
+
z-index: 6;
|
|
2307
|
+
flex: none;
|
|
2308
|
+
width: 9px;
|
|
2309
|
+
/* Centred on the sidebar's border, whichever side that is. */
|
|
2310
|
+
margin: 0 -5px 0 -4px;
|
|
2311
|
+
cursor: col-resize;
|
|
2312
|
+
touch-action: none;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
.dpk-sidebar-resizer::after {
|
|
2316
|
+
content: '';
|
|
2317
|
+
position: absolute;
|
|
2318
|
+
top: 0;
|
|
2319
|
+
bottom: 0;
|
|
2320
|
+
left: 3px;
|
|
2321
|
+
width: 2px;
|
|
2322
|
+
border-radius: 1px;
|
|
2323
|
+
background: var(--dpk-accent);
|
|
2324
|
+
opacity: 0;
|
|
2325
|
+
transition: opacity 160ms var(--dpk-ease);
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
.dpk-sidebar-resizer:hover::after,
|
|
2329
|
+
.dpk-sidebar-resizer:focus-visible::after,
|
|
2330
|
+
.dpk-shell[data-resizing] .dpk-sidebar-resizer::after {
|
|
2331
|
+
opacity: 1;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
.dpk-sidebar-resizer:focus-visible {
|
|
2335
|
+
outline: none;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
/*
|
|
2339
|
+
* A phone-width screen has no room for a column beside the main one: the
|
|
2340
|
+
* sidebar is a drawer that the strip's button slides over the main column,
|
|
2341
|
+
* leaving a sliver of it to tap the drawer shut.
|
|
2342
|
+
*/
|
|
2343
|
+
.dpk-body[data-sidebar-drawer] > .dpk-sidebar {
|
|
2344
|
+
position: absolute;
|
|
2345
|
+
top: 0;
|
|
2346
|
+
bottom: 0;
|
|
2347
|
+
left: 36px;
|
|
2348
|
+
z-index: 25;
|
|
2349
|
+
width: min(var(--dpk-sidebar-width), calc(100% - 36px - 48px));
|
|
2350
|
+
max-width: none;
|
|
2351
|
+
box-shadow: var(--dpk-shadow-lg);
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
.dpk-body[data-sidebar-drawer][data-sidebar-side='right'] > .dpk-sidebar {
|
|
2355
|
+
left: auto;
|
|
2356
|
+
right: 36px;
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
.dpk-sidebar-scrim {
|
|
2360
|
+
position: absolute;
|
|
2361
|
+
inset: 0;
|
|
2362
|
+
z-index: 24;
|
|
2363
|
+
background: color-mix(in srgb, var(--dpk-ink) 16%, transparent);
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
/* While dragging, the cursor stays put and nothing underneath (text, preview frames) reacts. */
|
|
2367
|
+
.dpk-shell[data-resizing] {
|
|
2368
|
+
cursor: col-resize;
|
|
2369
|
+
user-select: none;
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
.dpk-shell[data-resizing] .dpk-main {
|
|
2373
|
+
pointer-events: none;
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
.dpk-main {
|
|
2377
|
+
flex: 1 1 0%;
|
|
2378
|
+
display: flex;
|
|
2379
|
+
flex-direction: column;
|
|
2380
|
+
min-width: 0;
|
|
2381
|
+
overflow: auto;
|
|
2382
|
+
/* A faint wash of the accent from the top left corner gives the ground some depth. */
|
|
2383
|
+
background:
|
|
2384
|
+
radial-gradient(
|
|
2385
|
+
ellipse 900px 360px at 0% 0%,
|
|
2386
|
+
color-mix(in srgb, var(--dpk-accent) 5%, transparent),
|
|
2387
|
+
transparent 70%
|
|
2388
|
+
),
|
|
2389
|
+
radial-gradient(
|
|
2390
|
+
ellipse 700px 320px at 100% 0%,
|
|
2391
|
+
color-mix(in srgb, var(--dpk-blue) 4%, transparent),
|
|
2392
|
+
transparent 70%
|
|
2393
|
+
),
|
|
2394
|
+
var(--dpk-paper);
|
|
2395
|
+
background-attachment: local;
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
.dpk-main-body {
|
|
2399
|
+
flex: 1 0 auto;
|
|
2400
|
+
display: grid;
|
|
2401
|
+
/* The column is as wide as the page, not as its widest unbreakable line. */
|
|
2402
|
+
grid-template-columns: minmax(0, 1fr);
|
|
2403
|
+
align-content: start;
|
|
2404
|
+
gap: 16px;
|
|
2405
|
+
min-width: 0;
|
|
2406
|
+
padding: 24px;
|
|
2407
|
+
animation: dpk-rise 420ms var(--dpk-ease) backwards;
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
/*
|
|
2411
|
+
* Scrolled to the end, the last of the content clears the hand-off dock
|
|
2412
|
+
* floating over the bottom right. \`--dpk-dock-clearance\` is how far up
|
|
2413
|
+
* that is; it reaches into components too, and a template's own floating
|
|
2414
|
+
* controls rise by it. \`:where\` lets a full-bleed template keep no padding.
|
|
2415
|
+
*/
|
|
2416
|
+
.dpk-shell:has(> .dpk-dock) {
|
|
2417
|
+
--dpk-dock-clearance: 64px;
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
:where(.dpk-shell:has(> .dpk-dock)) .dpk-main-body {
|
|
2421
|
+
padding-bottom: calc(24px + var(--dpk-dock-clearance));
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
:where(.dpk-shell:has(> .dpk-dock)) .dpk-sidebar {
|
|
2425
|
+
padding-bottom: calc(18px + var(--dpk-dock-clearance));
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
@keyframes dpk-rise {
|
|
2429
|
+
from {
|
|
2430
|
+
opacity: 0;
|
|
2431
|
+
transform: translateY(6px);
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
/*
|
|
2436
|
+
* Supplements. They sit at the end of the main column and stick to the
|
|
2437
|
+
* bottom of the scrollport as a bar the full width of the column, edge to
|
|
2438
|
+
* edge: always in reach and never stealing height from the preview. The bar
|
|
2439
|
+
* names each supplement; the one opened grows upward over the content and
|
|
2440
|
+
* shows whole; only one taller than the window scrolls, so its top stays
|
|
2441
|
+
* reachable.
|
|
2442
|
+
*/
|
|
2443
|
+
.dpk-supplements {
|
|
2444
|
+
position: sticky;
|
|
2445
|
+
bottom: 0;
|
|
2446
|
+
z-index: 5;
|
|
2447
|
+
margin-top: auto;
|
|
2448
|
+
/* A faint amber wash over the whole bar marks it as the author's aside. */
|
|
2449
|
+
border-top: 1px solid color-mix(in srgb, var(--dpk-amber) 28%, var(--dpk-rule-strong));
|
|
2450
|
+
background: color-mix(in srgb, color-mix(in srgb, var(--dpk-amber) 7%, var(--dpk-paper-raised)) 94%, transparent);
|
|
2451
|
+
backdrop-filter: blur(12px);
|
|
2452
|
+
box-shadow: 0 -8px 24px -18px color-mix(in srgb, var(--dpk-ink) 40%, transparent);
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
.dpk-supplements[hidden] {
|
|
2456
|
+
display: none;
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
.dpk-supplements-bar {
|
|
2460
|
+
display: flex;
|
|
2461
|
+
flex-wrap: wrap;
|
|
2462
|
+
align-items: center;
|
|
2463
|
+
gap: 2px;
|
|
2464
|
+
/* Clear of the hand-off dock at the bottom right while it is shown. */
|
|
2465
|
+
padding: 5px calc(16px + var(--dpk-dock-space, 0px)) 5px 10px;
|
|
2466
|
+
color: var(--dpk-ink-soft);
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
.dpk-supplements-toggle {
|
|
2470
|
+
flex: none;
|
|
2471
|
+
display: grid;
|
|
2472
|
+
place-items: center;
|
|
2473
|
+
width: 24px;
|
|
2474
|
+
height: 24px;
|
|
2475
|
+
margin-right: 2px;
|
|
2476
|
+
border: 0;
|
|
2477
|
+
border-radius: 7px;
|
|
2478
|
+
padding: 0;
|
|
2479
|
+
background: transparent;
|
|
2480
|
+
color: inherit;
|
|
2481
|
+
cursor: pointer;
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
.dpk-supplements-toggle:hover {
|
|
2485
|
+
color: var(--dpk-ink);
|
|
2486
|
+
background: color-mix(in srgb, var(--dpk-amber) 10%, transparent);
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
.dpk-supplements-toggle:focus-visible {
|
|
2490
|
+
outline: none;
|
|
2491
|
+
box-shadow: var(--dpk-focus);
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
.dpk-supplements-toggle svg {
|
|
2495
|
+
width: 14px;
|
|
2496
|
+
height: 14px;
|
|
2497
|
+
transition: transform 160ms var(--dpk-ease);
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
.dpk-supplements[data-open] .dpk-supplements-toggle svg {
|
|
2501
|
+
transform: rotate(90deg);
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
.dpk-supplement-tab {
|
|
2505
|
+
position: relative;
|
|
2506
|
+
border: 0;
|
|
2507
|
+
border-radius: 7px;
|
|
2508
|
+
padding: 4px 10px;
|
|
2509
|
+
background: transparent;
|
|
2510
|
+
font: inherit;
|
|
2511
|
+
font-size: 12.5px;
|
|
2512
|
+
font-weight: 600;
|
|
2513
|
+
color: inherit;
|
|
2514
|
+
cursor: pointer;
|
|
2515
|
+
user-select: none;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
/* A rule between neighbours reads the names as one row: ERD | Checklist | Sequence. */
|
|
2519
|
+
.dpk-supplement-tab + .dpk-supplement-tab::before {
|
|
2520
|
+
content: '';
|
|
2521
|
+
position: absolute;
|
|
2522
|
+
top: 25%;
|
|
2523
|
+
bottom: 25%;
|
|
2524
|
+
left: -1px;
|
|
2525
|
+
width: 1px;
|
|
2526
|
+
background: var(--dpk-rule-strong);
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
.dpk-supplement-tab:hover {
|
|
2530
|
+
color: var(--dpk-ink);
|
|
2531
|
+
background: color-mix(in srgb, var(--dpk-amber) 10%, transparent);
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
.dpk-supplement-tab[aria-expanded='true'] {
|
|
2535
|
+
color: var(--dpk-ink);
|
|
2536
|
+
background: color-mix(in srgb, var(--dpk-amber) 18%, transparent);
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
.dpk-supplement-tab:hover::before,
|
|
2540
|
+
.dpk-supplement-tab[aria-expanded='true']::before,
|
|
2541
|
+
.dpk-supplement-tab:hover + .dpk-supplement-tab::before,
|
|
2542
|
+
.dpk-supplement-tab[aria-expanded='true'] + .dpk-supplement-tab::before {
|
|
2543
|
+
visibility: hidden;
|
|
2544
|
+
}
|
|
2545
|
+
|
|
2546
|
+
.dpk-supplement-tab:focus-visible {
|
|
2547
|
+
outline: none;
|
|
2548
|
+
box-shadow: var(--dpk-focus);
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
.dpk-supplements-body {
|
|
2552
|
+
max-height: calc(100dvh - 120px);
|
|
2553
|
+
overflow: auto;
|
|
2554
|
+
overscroll-behavior: contain;
|
|
2555
|
+
padding: 4px calc(16px + var(--dpk-dock-space, 0px)) 16px 16px;
|
|
2556
|
+
font-size: 12.5px;
|
|
2557
|
+
line-height: 1.7;
|
|
2558
|
+
color: var(--dpk-ink-soft);
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
.dpk-supplements-body[hidden] {
|
|
2562
|
+
display: none;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
.dpk-supplements ::slotted(*) {
|
|
2566
|
+
display: block;
|
|
2567
|
+
max-width: 100%;
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
.dpk-orphans {
|
|
2571
|
+
margin-top: 16px;
|
|
2572
|
+
border: 1px dashed var(--dpk-rule-strong);
|
|
2573
|
+
border-radius: var(--dpk-radius);
|
|
2574
|
+
padding: 12px;
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
.dpk-banner {
|
|
2578
|
+
display: grid;
|
|
2579
|
+
gap: 4px;
|
|
2580
|
+
margin-bottom: 14px;
|
|
2581
|
+
border: 1px solid color-mix(in srgb, var(--dpk-danger) 35%, transparent);
|
|
2582
|
+
border-radius: var(--dpk-radius);
|
|
2583
|
+
background: linear-gradient(90deg, var(--dpk-danger) 0 3px, transparent 3px), var(--dpk-danger-soft);
|
|
2584
|
+
padding: 12px 14px 12px 17px;
|
|
2585
|
+
max-width: 900px;
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
.dpk-banner strong {
|
|
2589
|
+
font-size: 13px;
|
|
2590
|
+
color: var(--dpk-danger);
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
.dpk-banner code {
|
|
2594
|
+
font-family: var(--dpk-mono);
|
|
2595
|
+
font-size: 11px;
|
|
2596
|
+
color: var(--dpk-ink-soft);
|
|
2597
|
+
overflow-wrap: anywhere;
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
/* ------------------------------------------------------------- footer */
|
|
2601
|
+
|
|
2602
|
+
.dpk-footer {
|
|
2603
|
+
border-top: 1px solid var(--dpk-rule);
|
|
2604
|
+
padding: 10px 20px;
|
|
2605
|
+
display: flex;
|
|
2606
|
+
gap: 12px;
|
|
2607
|
+
align-items: center;
|
|
2608
|
+
background: var(--dpk-glass);
|
|
2609
|
+
backdrop-filter: blur(12px);
|
|
2610
|
+
font-size: 12px;
|
|
2611
|
+
color: var(--dpk-ink-faint);
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
/* --------------------------------------------------- floating review */
|
|
2615
|
+
|
|
2616
|
+
/* The review floats over the page from its toggles, as tall as the screen
|
|
2617
|
+
allows: the main column keeps its whole width while it is open. The
|
|
2618
|
+
popover positions it; this only shapes the surface. */
|
|
2619
|
+
.dpk-review {
|
|
2620
|
+
box-sizing: border-box;
|
|
2621
|
+
position: fixed;
|
|
2622
|
+
inset: auto;
|
|
2623
|
+
margin: 0;
|
|
2624
|
+
padding: 0;
|
|
2625
|
+
height: 100dvh;
|
|
2626
|
+
overflow: hidden;
|
|
2627
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
2628
|
+
border-radius: var(--dpk-radius-lg);
|
|
2629
|
+
background: var(--dpk-paper-raised);
|
|
2630
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2631
|
+
color: var(--dpk-ink);
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
.dpk-review:popover-open {
|
|
2635
|
+
display: flex;
|
|
2636
|
+
animation: dpk-review-in 180ms var(--dpk-ease);
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2639
|
+
@keyframes dpk-review-in {
|
|
2640
|
+
from {
|
|
2641
|
+
opacity: 0;
|
|
2642
|
+
transform: translateY(-6px);
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2646
|
+
.dpk-review > dpk-component-comment-panel {
|
|
2647
|
+
flex: 1 1 auto;
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
/* Review toggles: the changes and the review comments of the draft, each
|
|
2651
|
+
opening its own part of the review. Pinned to the top right corner, always
|
|
2652
|
+
in the same place. */
|
|
2653
|
+
.dpk-header-actions {
|
|
2654
|
+
position: fixed;
|
|
2655
|
+
top: 6px;
|
|
2656
|
+
right: 16px;
|
|
2657
|
+
z-index: 60;
|
|
2658
|
+
display: flex;
|
|
2659
|
+
gap: 6px;
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
.dpk-review-toggles {
|
|
2663
|
+
display: flex;
|
|
2664
|
+
gap: 6px;
|
|
2665
|
+
}
|
|
2666
|
+
|
|
2667
|
+
/* Each further button (the questions, the settings gear) widens what the header keeps clear of. */
|
|
2668
|
+
.dpk-shell:is(:has(.dpk-settings-trigger), :has(.dpk-review-toggles > :nth-child(3))) .dpk-header {
|
|
2669
|
+
padding-right: 138px;
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
.dpk-shell:has(.dpk-settings-trigger):has(.dpk-review-toggles > :nth-child(3)) .dpk-header {
|
|
2673
|
+
padding-right: 176px;
|
|
2674
|
+
}
|
|
2675
|
+
|
|
2676
|
+
.dpk-header-action {
|
|
2677
|
+
position: relative;
|
|
2678
|
+
display: inline-flex;
|
|
2679
|
+
align-items: center;
|
|
2680
|
+
justify-content: center;
|
|
2681
|
+
width: 32px;
|
|
2682
|
+
height: 32px;
|
|
2683
|
+
padding: 0;
|
|
2684
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
2685
|
+
border-radius: 10px;
|
|
2686
|
+
background: var(--dpk-paper-raised);
|
|
2687
|
+
color: var(--dpk-ink-soft);
|
|
2688
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
2689
|
+
cursor: pointer;
|
|
2690
|
+
transition:
|
|
2691
|
+
color 180ms var(--dpk-ease),
|
|
2692
|
+
background 180ms var(--dpk-ease),
|
|
2693
|
+
border-color 180ms var(--dpk-ease),
|
|
2694
|
+
box-shadow 180ms var(--dpk-ease),
|
|
2695
|
+
transform 220ms var(--dpk-ease-spring);
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
.dpk-header-action svg {
|
|
2699
|
+
width: 16px;
|
|
2700
|
+
height: 16px;
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2703
|
+
.dpk-header-action:hover {
|
|
2704
|
+
color: var(--dpk-ink);
|
|
2705
|
+
border-color: var(--dpk-rule-hover);
|
|
2706
|
+
transform: translateY(-1px);
|
|
2707
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow);
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
.dpk-header-action:active {
|
|
2711
|
+
transform: translateY(0) scale(0.95);
|
|
2712
|
+
box-shadow: var(--dpk-shadow-xs);
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
.dpk-header-action:focus-visible {
|
|
2716
|
+
outline: none;
|
|
2717
|
+
box-shadow: var(--dpk-focus);
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
.dpk-header-action[aria-pressed='true'],
|
|
2721
|
+
.dpk-header-action[aria-expanded='true'] {
|
|
2722
|
+
color: var(--dpk-accent-ink);
|
|
2723
|
+
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
2724
|
+
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
2725
|
+
box-shadow:
|
|
2726
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
2727
|
+
0 6px 16px -6px color-mix(in srgb, var(--dpk-accent) 70%, transparent);
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
.dpk-header-action[aria-pressed='true']:hover,
|
|
2731
|
+
.dpk-header-action[aria-expanded='true']:hover {
|
|
2732
|
+
box-shadow:
|
|
2733
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
2734
|
+
0 10px 22px -8px color-mix(in srgb, var(--dpk-accent) 80%, transparent);
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
.dpk-review-badge {
|
|
2738
|
+
position: absolute;
|
|
2739
|
+
top: -6px;
|
|
2740
|
+
right: -6px;
|
|
2741
|
+
min-width: 18px;
|
|
2742
|
+
height: 18px;
|
|
2743
|
+
padding: 0 4px;
|
|
2744
|
+
border: 2px solid var(--dpk-paper);
|
|
2745
|
+
border-radius: 999px;
|
|
2746
|
+
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
2747
|
+
color: var(--dpk-accent-ink);
|
|
2748
|
+
font-family: var(--dpk-mono);
|
|
2749
|
+
font-size: 9.5px;
|
|
2750
|
+
font-weight: 650;
|
|
2751
|
+
font-variant-numeric: tabular-nums;
|
|
2752
|
+
line-height: 14px;
|
|
2753
|
+
text-align: center;
|
|
2754
|
+
white-space: nowrap;
|
|
2755
|
+
box-shadow: 0 3px 8px -2px color-mix(in srgb, var(--dpk-accent) 60%, transparent);
|
|
2756
|
+
animation: dpk-pop 260ms var(--dpk-ease-spring);
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
@keyframes dpk-pop {
|
|
2760
|
+
from {
|
|
2761
|
+
transform: scale(0.4);
|
|
2762
|
+
opacity: 0;
|
|
2763
|
+
}
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
/* What an icon button does, named below it on hover or keyboard focus. */
|
|
2767
|
+
.dpk-header-action[data-tooltip]::after {
|
|
2768
|
+
content: attr(data-tooltip);
|
|
2769
|
+
position: absolute;
|
|
2770
|
+
top: calc(100% + 8px);
|
|
2771
|
+
right: 0;
|
|
2772
|
+
padding: 4px 8px;
|
|
2773
|
+
border-radius: var(--dpk-radius-sm);
|
|
2774
|
+
background: var(--dpk-ink);
|
|
2775
|
+
color: var(--dpk-paper);
|
|
2776
|
+
font-size: 11.5px;
|
|
2777
|
+
font-weight: 600;
|
|
2778
|
+
line-height: 1.4;
|
|
2779
|
+
white-space: nowrap;
|
|
2780
|
+
box-shadow: var(--dpk-shadow-sm);
|
|
2781
|
+
pointer-events: none;
|
|
2782
|
+
opacity: 0;
|
|
2783
|
+
transform: translateY(-2px);
|
|
2784
|
+
transition:
|
|
2785
|
+
opacity 120ms var(--dpk-ease),
|
|
2786
|
+
transform 120ms var(--dpk-ease);
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2789
|
+
.dpk-header-action[data-tooltip]:hover::after,
|
|
2790
|
+
.dpk-header-action[data-tooltip]:focus-visible::after {
|
|
2791
|
+
opacity: 1;
|
|
2792
|
+
transform: none;
|
|
2793
|
+
transition-delay: 250ms;
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
/* An open popover hangs where the labels would show, and names itself. */
|
|
2797
|
+
.dpk-header-actions:has([aria-pressed='true'], [aria-expanded='true']) .dpk-header-action::after {
|
|
2798
|
+
display: none;
|
|
2799
|
+
}
|
|
2800
|
+
|
|
2801
|
+
/* ----------------------------------------------------------- settings */
|
|
2802
|
+
|
|
2803
|
+
.dpk-settings {
|
|
2804
|
+
box-sizing: border-box;
|
|
2805
|
+
overflow: auto;
|
|
2806
|
+
position: fixed;
|
|
2807
|
+
inset: auto;
|
|
2808
|
+
margin: 0;
|
|
2809
|
+
padding: 6px;
|
|
2810
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
2811
|
+
border-radius: var(--dpk-radius-lg);
|
|
2812
|
+
background: var(--dpk-paper-raised);
|
|
2813
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2814
|
+
color: var(--dpk-ink);
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2817
|
+
.dpk-settings:popover-open {
|
|
2818
|
+
display: grid;
|
|
2819
|
+
align-content: start;
|
|
2820
|
+
gap: 2px;
|
|
2821
|
+
animation: dpk-review-in 180ms var(--dpk-ease);
|
|
2822
|
+
}
|
|
2823
|
+
|
|
2824
|
+
.dpk-settings-option {
|
|
2825
|
+
display: flex;
|
|
2826
|
+
align-items: flex-start;
|
|
2827
|
+
gap: 10px;
|
|
2828
|
+
width: 100%;
|
|
2829
|
+
padding: 8px;
|
|
2830
|
+
border: 0;
|
|
2831
|
+
border-radius: var(--dpk-radius-sm);
|
|
2832
|
+
background: none;
|
|
2833
|
+
color: var(--dpk-ink);
|
|
2834
|
+
font: inherit;
|
|
2835
|
+
text-align: left;
|
|
2836
|
+
cursor: pointer;
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
.dpk-settings-option:hover,
|
|
2840
|
+
.dpk-settings-option:focus-visible {
|
|
2841
|
+
outline: none;
|
|
2842
|
+
background: var(--dpk-paper-sunken);
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2845
|
+
.dpk-settings-check {
|
|
2846
|
+
flex: none;
|
|
2847
|
+
display: inline-grid;
|
|
2848
|
+
place-items: center;
|
|
2849
|
+
width: 16px;
|
|
2850
|
+
height: 16px;
|
|
2851
|
+
margin-top: 1px;
|
|
2852
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
2853
|
+
border-radius: 4px;
|
|
2854
|
+
background: var(--dpk-paper-raised);
|
|
2855
|
+
}
|
|
2856
|
+
|
|
2857
|
+
.dpk-settings-option[aria-checked='true'] .dpk-settings-check {
|
|
2858
|
+
border-color: var(--dpk-accent-strong);
|
|
2859
|
+
background: var(--dpk-accent-strong);
|
|
2860
|
+
color: var(--dpk-accent-ink);
|
|
2861
|
+
}
|
|
2862
|
+
|
|
2863
|
+
.dpk-settings-check svg {
|
|
2864
|
+
width: 12px;
|
|
2865
|
+
height: 12px;
|
|
2866
|
+
stroke-width: 3;
|
|
2867
|
+
}
|
|
2868
|
+
|
|
2869
|
+
.dpk-settings-text {
|
|
2870
|
+
display: grid;
|
|
2871
|
+
gap: 2px;
|
|
2872
|
+
min-width: 0;
|
|
2873
|
+
}
|
|
2874
|
+
|
|
2875
|
+
.dpk-settings-name {
|
|
2876
|
+
font-size: 13px;
|
|
2877
|
+
font-weight: 650;
|
|
2878
|
+
}
|
|
2879
|
+
|
|
2880
|
+
.dpk-settings-hint {
|
|
2881
|
+
color: var(--dpk-ink-soft);
|
|
2882
|
+
font-size: 11.5px;
|
|
2883
|
+
line-height: 1.45;
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2886
|
+
.dpk-settings-note {
|
|
2887
|
+
margin: 4px 8px;
|
|
2888
|
+
padding-top: 8px;
|
|
2889
|
+
border-top: 1px solid var(--dpk-rule);
|
|
2890
|
+
color: var(--dpk-ink-faint);
|
|
2891
|
+
font-size: 11px;
|
|
2892
|
+
line-height: 1.45;
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
/* ------------------------------------------------------ hand-off dock */
|
|
2896
|
+
|
|
2897
|
+
.dpk-dock {
|
|
2898
|
+
position: fixed;
|
|
2899
|
+
right: 16px;
|
|
2900
|
+
bottom: 16px;
|
|
2901
|
+
z-index: 60;
|
|
2902
|
+
display: flex;
|
|
2903
|
+
flex-direction: column;
|
|
2904
|
+
align-items: flex-end;
|
|
2905
|
+
gap: 8px;
|
|
2906
|
+
max-width: calc(100vw - 32px);
|
|
2907
|
+
animation: dpk-dock-in 260ms var(--dpk-ease) backwards;
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
@keyframes dpk-dock-in {
|
|
2911
|
+
from {
|
|
2912
|
+
transform: translateY(8px);
|
|
2913
|
+
opacity: 0;
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
.dpk-dock-actions {
|
|
2918
|
+
display: flex;
|
|
2919
|
+
gap: 6px;
|
|
2920
|
+
padding: 6px;
|
|
2921
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
2922
|
+
border-radius: var(--dpk-radius-lg);
|
|
2923
|
+
background: var(--dpk-glass);
|
|
2924
|
+
backdrop-filter: blur(12px);
|
|
2925
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
.dpk-dock-note {
|
|
2929
|
+
max-width: 320px;
|
|
2930
|
+
margin: 0;
|
|
2931
|
+
padding: 8px 12px;
|
|
2932
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
2933
|
+
border-radius: var(--dpk-radius);
|
|
2934
|
+
background: var(--dpk-paper-raised);
|
|
2935
|
+
box-shadow: var(--dpk-shadow);
|
|
2936
|
+
color: var(--dpk-ink-soft);
|
|
2937
|
+
font-size: 12px;
|
|
2938
|
+
line-height: 1.6;
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2941
|
+
/* ---------------------------------------------------------- questions */
|
|
2942
|
+
|
|
2943
|
+
/* The questions the page asks, in the review popover beside the changes and
|
|
2944
|
+
the review comments. The comment panel stays mounted (it holds the
|
|
2945
|
+
composer's unsent text) but steps aside. */
|
|
2946
|
+
.dpk-review[data-section='questions'] > dpk-component-comment-panel {
|
|
2947
|
+
display: none;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
.dpk-grill {
|
|
2951
|
+
display: flex;
|
|
2952
|
+
flex-direction: column;
|
|
2953
|
+
flex: 1 1 auto;
|
|
2954
|
+
min-width: 0;
|
|
2955
|
+
min-height: 0;
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
.dpk-grill-head {
|
|
2959
|
+
display: flex;
|
|
2960
|
+
align-items: center;
|
|
2961
|
+
justify-content: space-between;
|
|
2962
|
+
gap: 8px;
|
|
2963
|
+
padding: 14px 16px 12px;
|
|
2964
|
+
border-bottom: 1px solid var(--dpk-rule);
|
|
2965
|
+
background: var(--dpk-glass);
|
|
2966
|
+
backdrop-filter: blur(12px);
|
|
2967
|
+
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
2968
|
+
}
|
|
2969
|
+
|
|
2970
|
+
.dpk-grill-head h2 {
|
|
2971
|
+
margin: 0;
|
|
2972
|
+
font-size: 13.5px;
|
|
2973
|
+
font-weight: 660;
|
|
2974
|
+
letter-spacing: -0.015em;
|
|
2975
|
+
}
|
|
2976
|
+
|
|
2977
|
+
.dpk-grill-progress {
|
|
2978
|
+
font-family: var(--dpk-mono);
|
|
2979
|
+
font-size: 11px;
|
|
2980
|
+
font-variant-numeric: tabular-nums;
|
|
2981
|
+
color: var(--dpk-ink-faint);
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
/* With earlier rounds, a select of rounds: the current one first. */
|
|
2985
|
+
.dpk-grill-rounds {
|
|
2986
|
+
flex-shrink: 0;
|
|
2987
|
+
padding: 10px 10px 0;
|
|
2988
|
+
}
|
|
2989
|
+
|
|
2990
|
+
.dpk-grill-round {
|
|
2991
|
+
width: 100%;
|
|
2992
|
+
padding: 6px 24px 6px 9px;
|
|
2993
|
+
border: 1px solid var(--dpk-rule);
|
|
2994
|
+
border-radius: var(--dpk-radius-sm);
|
|
2995
|
+
appearance: none;
|
|
2996
|
+
background-color: var(--dpk-paper-sunken);
|
|
2997
|
+
background-image:
|
|
2998
|
+
linear-gradient(45deg, transparent 50%, currentColor 50%),
|
|
2999
|
+
linear-gradient(135deg, currentColor 50%, transparent 50%);
|
|
3000
|
+
background-position:
|
|
3001
|
+
calc(100% - 13px) 52%,
|
|
3002
|
+
calc(100% - 9px) 52%;
|
|
3003
|
+
background-size: 4px 4px;
|
|
3004
|
+
background-repeat: no-repeat;
|
|
3005
|
+
color: var(--dpk-ink);
|
|
3006
|
+
font: inherit;
|
|
3007
|
+
font-size: 11.5px;
|
|
3008
|
+
cursor: pointer;
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
.dpk-grill-round:focus-visible {
|
|
3012
|
+
outline: none;
|
|
3013
|
+
box-shadow: var(--dpk-focus);
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
.dpk-grill-round option {
|
|
3017
|
+
color: var(--dpk-ink);
|
|
3018
|
+
background: var(--dpk-paper-raised);
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
.dpk-grill-round-note {
|
|
3022
|
+
margin: 4px 0 2px;
|
|
3023
|
+
padding: 0 8px;
|
|
3024
|
+
font-size: 10.5px;
|
|
3025
|
+
line-height: 1.6;
|
|
3026
|
+
color: var(--dpk-ink-faint);
|
|
3027
|
+
}
|
|
3028
|
+
|
|
3029
|
+
.dpk-grill-list {
|
|
3030
|
+
flex: 1;
|
|
3031
|
+
min-height: 0;
|
|
3032
|
+
overflow: auto;
|
|
3033
|
+
overscroll-behavior: contain;
|
|
3034
|
+
padding: 2px 10px 12px;
|
|
3035
|
+
}
|
|
3036
|
+
|
|
3037
|
+
.dpk-grill-empty {
|
|
3038
|
+
margin: 0;
|
|
3039
|
+
padding: 22px 8px;
|
|
3040
|
+
text-align: center;
|
|
3041
|
+
font-size: 12px;
|
|
3042
|
+
color: var(--dpk-ink-faint);
|
|
3043
|
+
}
|
|
3044
|
+
|
|
3045
|
+
.dpk-grill-question {
|
|
3046
|
+
margin: 6px 0;
|
|
3047
|
+
border: 1px solid transparent;
|
|
3048
|
+
border-radius: var(--dpk-radius);
|
|
3049
|
+
transition:
|
|
3050
|
+
background 140ms var(--dpk-ease),
|
|
3051
|
+
border-color 140ms var(--dpk-ease);
|
|
3052
|
+
}
|
|
3053
|
+
|
|
3054
|
+
.dpk-grill-question:has(.dpk-grill-heading[aria-expanded='true']) {
|
|
3055
|
+
border-color: var(--dpk-rule);
|
|
3056
|
+
background: var(--dpk-paper-raised);
|
|
3057
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
3058
|
+
}
|
|
3059
|
+
|
|
3060
|
+
.dpk-grill-heading {
|
|
3061
|
+
display: flex;
|
|
3062
|
+
align-items: flex-start;
|
|
3063
|
+
gap: 9px;
|
|
3064
|
+
width: 100%;
|
|
3065
|
+
padding: 10px 8px;
|
|
3066
|
+
border: 0;
|
|
3067
|
+
border-radius: var(--dpk-radius-sm);
|
|
3068
|
+
background: none;
|
|
3069
|
+
text-align: left;
|
|
3070
|
+
cursor: pointer;
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3073
|
+
.dpk-grill-heading:hover {
|
|
3074
|
+
background: var(--dpk-paper-sunken);
|
|
3075
|
+
}
|
|
3076
|
+
|
|
3077
|
+
.dpk-grill-question:has(.dpk-grill-heading[aria-expanded='true']) .dpk-grill-heading:hover {
|
|
3078
|
+
background: none;
|
|
3079
|
+
}
|
|
3080
|
+
|
|
3081
|
+
.dpk-grill-ref {
|
|
3082
|
+
flex: 0 0 auto;
|
|
3083
|
+
display: grid;
|
|
3084
|
+
place-items: center;
|
|
3085
|
+
min-width: 30px;
|
|
3086
|
+
height: 22px;
|
|
3087
|
+
padding: 0 6px;
|
|
3088
|
+
border: 1px solid var(--dpk-rule-strong);
|
|
3089
|
+
border-radius: 999px;
|
|
3090
|
+
background: var(--dpk-paper-sunken);
|
|
3091
|
+
font-family: var(--dpk-mono);
|
|
3092
|
+
font-size: 10px;
|
|
3093
|
+
font-weight: 600;
|
|
3094
|
+
font-variant-numeric: tabular-nums;
|
|
3095
|
+
color: var(--dpk-ink-faint);
|
|
3096
|
+
box-shadow: inset 0 1px 2px var(--dpk-shade-1);
|
|
3097
|
+
transition:
|
|
3098
|
+
background 140ms var(--dpk-ease),
|
|
3099
|
+
color 140ms var(--dpk-ease),
|
|
3100
|
+
border-color 140ms var(--dpk-ease),
|
|
3101
|
+
box-shadow 140ms var(--dpk-ease);
|
|
3102
|
+
}
|
|
3103
|
+
|
|
3104
|
+
.dpk-grill-question[data-answered='true'] .dpk-grill-ref {
|
|
3105
|
+
border-color: transparent;
|
|
3106
|
+
background: linear-gradient(180deg, var(--dpk-green-soft), color-mix(in srgb, var(--dpk-green) 16%, transparent));
|
|
3107
|
+
color: var(--dpk-green);
|
|
3108
|
+
box-shadow: var(--dpk-bevel);
|
|
3109
|
+
}
|
|
3110
|
+
|
|
3111
|
+
.dpk-grill-question:has(.dpk-grill-heading[aria-expanded='true']) .dpk-grill-ref {
|
|
3112
|
+
border-color: transparent;
|
|
3113
|
+
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
3114
|
+
color: var(--dpk-accent-ink);
|
|
3115
|
+
box-shadow:
|
|
3116
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.24),
|
|
3117
|
+
0 2px 6px -2px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
3118
|
+
}
|
|
3119
|
+
|
|
3120
|
+
.dpk-grill-heading-text {
|
|
3121
|
+
flex: 1;
|
|
3122
|
+
min-width: 0;
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
.dpk-grill-heading-text strong {
|
|
3126
|
+
display: block;
|
|
3127
|
+
font-size: 12.5px;
|
|
3128
|
+
font-weight: 620;
|
|
3129
|
+
line-height: 1.6;
|
|
3130
|
+
letter-spacing: -0.005em;
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
.dpk-grill-summary {
|
|
3134
|
+
display: block;
|
|
3135
|
+
margin-top: 4px;
|
|
3136
|
+
font-size: 10.5px;
|
|
3137
|
+
line-height: 1.6;
|
|
3138
|
+
color: var(--dpk-green);
|
|
3139
|
+
white-space: nowrap;
|
|
3140
|
+
overflow: hidden;
|
|
3141
|
+
text-overflow: ellipsis;
|
|
3142
|
+
}
|
|
3143
|
+
|
|
3144
|
+
.dpk-grill-chevron {
|
|
3145
|
+
flex: 0 0 auto;
|
|
3146
|
+
width: 16px;
|
|
3147
|
+
color: var(--dpk-ink-faint);
|
|
3148
|
+
line-height: 22px;
|
|
3149
|
+
text-align: center;
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
.dpk-grill-chevron svg {
|
|
3153
|
+
display: block;
|
|
3154
|
+
width: 13px;
|
|
3155
|
+
height: 13px;
|
|
3156
|
+
margin: 4.5px auto 0;
|
|
3157
|
+
transition: transform 180ms var(--dpk-ease);
|
|
3158
|
+
}
|
|
3159
|
+
|
|
3160
|
+
.dpk-grill-heading[aria-expanded='true'] .dpk-grill-chevron svg {
|
|
3161
|
+
transform: rotate(90deg);
|
|
3162
|
+
color: var(--dpk-accent);
|
|
3163
|
+
}
|
|
3164
|
+
|
|
3165
|
+
.dpk-grill-body {
|
|
3166
|
+
padding: 2px 8px 14px 47px;
|
|
3167
|
+
animation: dpk-grill-open 180ms var(--dpk-ease) backwards;
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3170
|
+
@keyframes dpk-grill-open {
|
|
3171
|
+
from {
|
|
3172
|
+
opacity: 0;
|
|
3173
|
+
transform: translateY(-4px);
|
|
3174
|
+
}
|
|
3175
|
+
}
|
|
3176
|
+
|
|
3177
|
+
.dpk-grill-description {
|
|
3178
|
+
margin: 0 0 8px;
|
|
3179
|
+
font-size: 11.5px;
|
|
3180
|
+
line-height: 1.85;
|
|
3181
|
+
color: var(--dpk-ink-soft);
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3184
|
+
.dpk-grill-note {
|
|
3185
|
+
margin: 0 0 10px;
|
|
3186
|
+
padding: 7px 10px;
|
|
3187
|
+
border: 1px solid color-mix(in srgb, var(--dpk-amber) 30%, transparent);
|
|
3188
|
+
border-radius: var(--dpk-radius-sm);
|
|
3189
|
+
background: var(--dpk-amber-soft);
|
|
3190
|
+
font-size: 11px;
|
|
3191
|
+
line-height: 1.7;
|
|
3192
|
+
color: var(--dpk-ink-soft);
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3195
|
+
.dpk-grill-choices {
|
|
3196
|
+
display: grid;
|
|
3197
|
+
gap: 6px;
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
.dpk-grill-choice {
|
|
3201
|
+
position: relative;
|
|
3202
|
+
display: flex;
|
|
3203
|
+
align-items: flex-start;
|
|
3204
|
+
gap: 8px;
|
|
3205
|
+
padding: 8px 9px;
|
|
3206
|
+
border: 1px solid var(--dpk-rule);
|
|
3207
|
+
border-radius: var(--dpk-radius-sm);
|
|
3208
|
+
background: var(--dpk-paper);
|
|
3209
|
+
font-size: 11.5px;
|
|
3210
|
+
line-height: 1.7;
|
|
3211
|
+
cursor: pointer;
|
|
3212
|
+
overflow: hidden;
|
|
3213
|
+
transition:
|
|
3214
|
+
border-color 140ms var(--dpk-ease),
|
|
3215
|
+
background 140ms var(--dpk-ease),
|
|
3216
|
+
box-shadow 140ms var(--dpk-ease),
|
|
3217
|
+
transform 140ms var(--dpk-ease);
|
|
3218
|
+
}
|
|
3219
|
+
|
|
3220
|
+
.dpk-grill-choice:hover {
|
|
3221
|
+
border-color: var(--dpk-rule-hover);
|
|
3222
|
+
background: var(--dpk-paper-inset);
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
.dpk-grill-choice:has(input:checked) {
|
|
3226
|
+
border-color: color-mix(in srgb, var(--dpk-green) 45%, transparent);
|
|
3227
|
+
background: var(--dpk-green-soft);
|
|
3228
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dpk-green) 30%, transparent);
|
|
3229
|
+
}
|
|
3230
|
+
|
|
3231
|
+
.dpk-grill-choice[data-free] {
|
|
3232
|
+
border-style: dashed;
|
|
3233
|
+
}
|
|
3234
|
+
|
|
3235
|
+
.dpk-grill-choice[data-free='true'] {
|
|
3236
|
+
border-style: solid;
|
|
3237
|
+
}
|
|
3238
|
+
|
|
3239
|
+
.dpk-grill-choice input {
|
|
3240
|
+
flex: 0 0 auto;
|
|
3241
|
+
margin: 3px 0 0;
|
|
3242
|
+
accent-color: var(--dpk-green);
|
|
3243
|
+
}
|
|
3244
|
+
|
|
3245
|
+
.dpk-grill-choice-text {
|
|
3246
|
+
display: flex;
|
|
3247
|
+
gap: 7px;
|
|
3248
|
+
min-width: 0;
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3251
|
+
.dpk-grill-letter {
|
|
3252
|
+
flex: 0 0 auto;
|
|
3253
|
+
font-family: var(--dpk-mono);
|
|
3254
|
+
font-size: 10px;
|
|
3255
|
+
font-weight: 600;
|
|
3256
|
+
line-height: 1.9;
|
|
3257
|
+
color: var(--dpk-green);
|
|
3258
|
+
}
|
|
3259
|
+
|
|
3260
|
+
/* An earlier round: a disclosure per question, nothing to answer with. */
|
|
3261
|
+
.dpk-grill-question[data-past] > summary {
|
|
3262
|
+
list-style: none;
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
.dpk-grill-question[data-past] > summary::-webkit-details-marker {
|
|
3266
|
+
display: none;
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
.dpk-grill-question[data-past][open] {
|
|
3270
|
+
border-color: var(--dpk-rule);
|
|
3271
|
+
background: var(--dpk-paper-raised);
|
|
3272
|
+
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
3273
|
+
}
|
|
3274
|
+
|
|
3275
|
+
.dpk-grill-question[data-past][open] .dpk-grill-heading:hover {
|
|
3276
|
+
background: none;
|
|
3277
|
+
}
|
|
3278
|
+
|
|
3279
|
+
.dpk-grill-question[data-past][open] .dpk-grill-chevron svg {
|
|
3280
|
+
transform: rotate(90deg);
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3283
|
+
.dpk-grill-question[data-past][open] .dpk-grill-summary {
|
|
3284
|
+
display: none;
|
|
3285
|
+
}
|
|
3286
|
+
|
|
3287
|
+
.dpk-grill-question[data-past][data-answered='false'] .dpk-grill-summary {
|
|
3288
|
+
color: var(--dpk-ink-faint);
|
|
3289
|
+
}
|
|
3290
|
+
|
|
3291
|
+
.dpk-grill-past-choices {
|
|
3292
|
+
display: grid;
|
|
3293
|
+
gap: 6px;
|
|
3294
|
+
margin: 0;
|
|
3295
|
+
padding: 0;
|
|
3296
|
+
list-style: none;
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
.dpk-grill-past-choice {
|
|
3300
|
+
display: flex;
|
|
3301
|
+
gap: 7px;
|
|
3302
|
+
margin: 0;
|
|
3303
|
+
padding: 7px 9px;
|
|
3304
|
+
border: 1px solid var(--dpk-rule);
|
|
3305
|
+
border-radius: var(--dpk-radius-sm);
|
|
3306
|
+
font-size: 11.5px;
|
|
3307
|
+
line-height: 1.7;
|
|
3308
|
+
color: var(--dpk-ink-faint);
|
|
3309
|
+
}
|
|
3310
|
+
|
|
3311
|
+
.dpk-grill-past-choice[data-checked='true'] {
|
|
3312
|
+
border-color: color-mix(in srgb, var(--dpk-green) 45%, transparent);
|
|
3313
|
+
background: var(--dpk-green-soft);
|
|
3314
|
+
color: var(--dpk-ink);
|
|
3315
|
+
}
|
|
3316
|
+
|
|
3317
|
+
.dpk-grill-past-free {
|
|
3318
|
+
margin-top: 6px;
|
|
3319
|
+
white-space: pre-wrap;
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
.dpk-grill-free {
|
|
3323
|
+
margin-top: 7px;
|
|
3324
|
+
min-height: 76px;
|
|
3325
|
+
max-height: 240px;
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3328
|
+
.dpk-grill-clear {
|
|
3329
|
+
margin-top: 10px;
|
|
3330
|
+
padding: 0;
|
|
3331
|
+
border: 0;
|
|
3332
|
+
background: none;
|
|
3333
|
+
color: var(--dpk-ink-faint);
|
|
3334
|
+
font-size: 10.5px;
|
|
3335
|
+
text-decoration: underline;
|
|
3336
|
+
text-underline-offset: 3px;
|
|
3337
|
+
cursor: pointer;
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3340
|
+
.dpk-grill-clear:hover {
|
|
3341
|
+
color: var(--dpk-ink);
|
|
3342
|
+
}
|
|
3343
|
+
|
|
3344
|
+
/* The hand-off at the foot of the questions: the comment panel's own is hidden. */
|
|
3345
|
+
.dpk-grill-footer {
|
|
3346
|
+
flex-shrink: 0;
|
|
3347
|
+
display: grid;
|
|
3348
|
+
gap: 8px;
|
|
3349
|
+
padding: 10px 12px;
|
|
3350
|
+
border-top: 1px solid var(--dpk-rule);
|
|
3351
|
+
background: var(--dpk-paper-raised);
|
|
3352
|
+
box-shadow: 0 -6px 12px -10px var(--dpk-shade-2);
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3355
|
+
.dpk-grill-footer .dpk-dock-actions {
|
|
3356
|
+
padding: 0;
|
|
3357
|
+
border: 0;
|
|
3358
|
+
background: none;
|
|
3359
|
+
backdrop-filter: none;
|
|
3360
|
+
box-shadow: none;
|
|
3361
|
+
}
|
|
3362
|
+
|
|
3363
|
+
.dpk-grill-footer .dpk-dock-actions > .dpk-btn {
|
|
3364
|
+
flex: 1;
|
|
3365
|
+
min-width: 0;
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3368
|
+
.dpk-grill-footer .dpk-dock-note {
|
|
3369
|
+
max-width: none;
|
|
3370
|
+
box-shadow: none;
|
|
3371
|
+
}
|
|
3372
|
+
|
|
3373
|
+
/* --------------------------------------------------------- Q badges */
|
|
3374
|
+
|
|
3375
|
+
/* The badges are laid over the main column; the page marks what a question
|
|
3376
|
+
is about with \`data-grill-questions\`. */
|
|
3377
|
+
.dpk-main-body {
|
|
3378
|
+
position: relative;
|
|
3379
|
+
}
|
|
3380
|
+
|
|
3381
|
+
/* Badges on the author's own markup stand in a column of their own on the
|
|
3382
|
+
right, beside the line they mark, so they never cover its words. */
|
|
3383
|
+
.dpk-main-body[data-grill-gutter] {
|
|
3384
|
+
padding-right: 56px;
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3387
|
+
.dpk-grill-badges {
|
|
3388
|
+
position: absolute;
|
|
3389
|
+
inset: 0;
|
|
3390
|
+
z-index: 3;
|
|
3391
|
+
overflow: hidden;
|
|
3392
|
+
pointer-events: none;
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
.dpk-grill-badge {
|
|
3396
|
+
position: absolute;
|
|
3397
|
+
display: inline-flex;
|
|
3398
|
+
align-items: center;
|
|
3399
|
+
justify-content: center;
|
|
3400
|
+
min-width: 30px;
|
|
3401
|
+
height: 22px;
|
|
3402
|
+
padding: 0 7px;
|
|
3403
|
+
border: 2px solid var(--dpk-paper-raised);
|
|
3404
|
+
border-radius: 999px;
|
|
3405
|
+
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
3406
|
+
color: var(--dpk-accent-ink);
|
|
3407
|
+
font-family: var(--dpk-mono);
|
|
3408
|
+
font-size: 10px;
|
|
3409
|
+
font-weight: 650;
|
|
3410
|
+
font-variant-numeric: tabular-nums;
|
|
3411
|
+
box-shadow:
|
|
3412
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.28),
|
|
3413
|
+
0 2px 6px -2px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
3414
|
+
cursor: pointer;
|
|
3415
|
+
pointer-events: auto;
|
|
3416
|
+
transition:
|
|
3417
|
+
transform 160ms var(--dpk-ease-spring),
|
|
3418
|
+
box-shadow 160ms var(--dpk-ease),
|
|
3419
|
+
background 160ms var(--dpk-ease);
|
|
3420
|
+
}
|
|
3421
|
+
|
|
3422
|
+
.dpk-grill-badge[data-visible='false'] {
|
|
3423
|
+
visibility: hidden;
|
|
3424
|
+
}
|
|
3425
|
+
|
|
3426
|
+
.dpk-grill-badge:hover {
|
|
3427
|
+
transform: translateY(-1px) scale(1.06);
|
|
3428
|
+
box-shadow:
|
|
3429
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.3),
|
|
3430
|
+
0 4px 10px -2px color-mix(in srgb, var(--dpk-accent) 60%, transparent);
|
|
3431
|
+
}
|
|
3432
|
+
|
|
3433
|
+
.dpk-grill-badge[data-answered='true'] {
|
|
3434
|
+
background: linear-gradient(180deg, color-mix(in srgb, var(--dpk-green) 85%, white), var(--dpk-green));
|
|
3435
|
+
}
|
|
3436
|
+
|
|
3437
|
+
.dpk-grill-badge[aria-pressed='true'] {
|
|
3438
|
+
box-shadow:
|
|
3439
|
+
0 0 0 2px color-mix(in srgb, var(--dpk-accent) 45%, transparent),
|
|
3440
|
+
var(--dpk-shadow-sm);
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3443
|
+
.dpk-grill-badge:focus-visible {
|
|
3444
|
+
outline: none;
|
|
3445
|
+
box-shadow: var(--dpk-focus);
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
/* The template's name repeats the mark above the title; the title needs the room more. */
|
|
3449
|
+
@media (max-width: 1100px) {
|
|
3450
|
+
.dpk-header-meta > .dpk-meta-name {
|
|
3451
|
+
display: none;
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
@media (max-width: 720px) {
|
|
3456
|
+
/* The version select stays: it is the reader's only way to switch versions. */
|
|
3457
|
+
.dpk-header-meta > :not(.dpk-version) {
|
|
3458
|
+
display: none;
|
|
3459
|
+
}
|
|
3460
|
+
|
|
3461
|
+
/* On a phone the row may be narrower than the select: it gives up its width. */
|
|
3462
|
+
.dpk-header-meta {
|
|
3463
|
+
min-width: 0;
|
|
3464
|
+
max-width: 100%;
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
.dpk-header-meta > .dpk-version {
|
|
3468
|
+
display: flex;
|
|
3469
|
+
min-width: 0;
|
|
3470
|
+
}
|
|
3471
|
+
|
|
3472
|
+
.dpk-header-meta .dpk-version-select {
|
|
3473
|
+
width: 100%;
|
|
3474
|
+
min-width: 0;
|
|
3475
|
+
text-overflow: ellipsis;
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
/* The title takes the first row whole; the version select and tools wrap below it. */
|
|
3479
|
+
.dpk-title {
|
|
3480
|
+
flex: 1 0 100%;
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
.dpk-brand {
|
|
3484
|
+
display: none;
|
|
3485
|
+
}
|
|
3486
|
+
|
|
3487
|
+
/* The page's own content goes last, so a long one cannot push the version
|
|
3488
|
+
select and tools below it. */
|
|
3489
|
+
.dpk-header-slot {
|
|
3490
|
+
order: 1;
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3493
|
+
`],Ns="supplement",xa="memo",Uf=(t,e)=>[...t.children].filter(n=>n.getAttribute("slot")===Ns).map(n=>{const s=n.getAttribute("data-name")?.trim()??"";return{name:s===""?e:s,element:n}}),Ff=(t,e)=>`.dpk-supplements-body ::slotted(:not(:nth-child(${[...t.children].indexOf(e.element)+1}))) { display: none !important; }`,Wf={selected:null,open:!1},Gf=(t,e)=>t.open?e.find(n=>n.element===t.selected)??null:null,Vf=(t,e)=>({selected:e,open:!(t.open&&t.selected===e)}),Kf=(t,e)=>t.open?{...t,open:!1}:{selected:e.some(s=>s.element===t.selected)?t.selected:e[0]?.element??null,open:!0},Qf=30,Zf=Ge(v(),O({base:v(),value:v()})),ya=t=>{const e=C(Zf,t);return e.success?e.output:null},Yf=t=>t.key===void 0?JSON.stringify(["field",t.hosts,t.name,t.base]):JSON.stringify(["key",t.key,t.name]),Jf=(t,e,n)=>{const{[e]:s,...r}=t;if(n.value===n.base)return r;const i=Object.entries({...r,[e]:n});return Object.fromEntries(i.slice(Math.max(0,i.length-Qf)))},Xf=(t,e)=>{if(!(e in t))return t;const{[e]:n,...s}=t;return s},eg=(t,e,n)=>{const s=t[e];return s===void 0||s.base!==n||s.value===n?null:s.value},tg=new Set(["text","search","url","email","tel"]),wa=t=>t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&tg.has(t.type)?t:null,ng=(t,e)=>{const n=[];let s=e.getRootNode();for(;s instanceof ShadowRoot;){if(s.host===t)return n;n.unshift(s.host.localName),s=s.host.getRootNode()}return null},sg=t=>{let e=t;for(;e!==null;){const n=e.getAttribute("data-dpk-text-key");if(n!==null&&n!=="")return n;const s=e.getRootNode();e=e.parentElement??(s instanceof ShadowRoot?s.host:null)}},rg=t=>t.composedPath().find(e=>e instanceof Element&&e.hasAttribute("data-dpk-text-discard"))??null,ig=(t,e)=>{const n=[...e];for(let s=t.parentElement;s!==null;s=s.parentElement){const r=n.filter(i=>s.contains(i));if(r.length>0)return r}return[]},og=t=>t.getAttribute("aria-label")??(t.placeholder||t.name||t.localName),Ds=t=>typeof t=="string"?[t]:Array.isArray(t)?t.flatMap(Ds):typeof t=="object"&&t!==null?Object.values(t).flatMap(Ds):[],$a=t=>t.replace(/\s+/g," ").trim();class ag{#e;#t;#n=null;#r="";#s=new WeakMap;#i=new Set;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#t.persist()?Tu(ya):pe(ya),this.#r=this.#t.storageKey()),this.#e.addEventListener("focusin",this.#l),this.#e.addEventListener("input",this.#c),this.#e.addEventListener("click",this.#a,!0)}hostDisconnected(){this.#e.removeEventListener("focusin",this.#l),this.#e.removeEventListener("input",this.#c),this.#e.removeEventListener("click",this.#a,!0)}settle(e){const n=new Set(e.flatMap(Ds).map($a));this.#o([...this.#i].filter(s=>n.has($a(s.value))))}#o(e){for(const n of e){this.#i.delete(n);const s=this.#s.get(n);s!==void 0&&this.#g(Xf(this.#d(),s.id))}}#a=e=>{const n=rg(e);n!==null&&this.#o(ig(n,this.#i))};#l=e=>{const n=wa(e.composedPath()[0]);if(n===null||this.#i.has(n))return;const s=ng(this.#e,n);if(s===null)return;const r=sg(n),i=n.value,o=Yf({...r===void 0?{}:{key:r},hosts:s,name:og(n),base:i});this.#s.set(n,{id:o,base:i});const a=eg(this.#d(),o,i);a!==null&&queueMicrotask(()=>{if(n.value===i){n.value=a;try{n.setSelectionRange(a.length,a.length)}catch{}this.#i.add(n),n.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}})};#c=e=>{const n=wa(e.composedPath()[0]),s=n===null?void 0:this.#s.get(n);if(!(n===null||s===void 0)){for(const r of this.#i)r.isConnected||this.#i.delete(r);this.#i.add(n),this.#g(Jf(this.#d(),s.id,{base:s.base,value:n.value}))}};#d(){return this.#n?.read(this.#r)??{}}#g(e){Object.keys(e).length===0?this.#n?.remove(this.#r):this.#n?.write(this.#r,e)}}class lg{#e;#t;#n;#r=null;#s=!1;constructor(e,n={}){this.#e=e,this.#t=n.fetchVersions??go,this.#n=n.switchTo??mo,e.addController(this)}hostConnected(){}load(){this.#s||this.#r!==null||(this.#s=!0,this.#t().then(e=>{this.#r=e,this.#s=!1,this.#e.requestUpdate()},e=>{this.#s=!1,console.warn("dev-process-kit: could not list the published versions",e)}))}pick(e){e!==te&&this.#n(e===""?null:e)}render(e){const n=z(e),s=fo({current:te,requested:ks(location.search)!==null,published:this.#r,text:{pinned:n.versionPinned,latest:n.versionLatest}}),r=()=>this.load();return m`<span class="dpk-version"
|
|
3494
|
+
>dev-process-kit@<select
|
|
3495
|
+
class="dpk-version-select"
|
|
3496
|
+
aria-label=${n.versionLabel}
|
|
3497
|
+
title=${n.versionLabel}
|
|
3498
|
+
@pointerenter=${r}
|
|
3499
|
+
@focus=${r}
|
|
3500
|
+
@change=${vs(i=>this.pick(i))}
|
|
3501
|
+
>
|
|
3502
|
+
${s.options.map(i=>m`<option value=${i.value} ?selected=${i.value===s.value}>${i.label}</option>`)}
|
|
3503
|
+
</select></span
|
|
3504
|
+
>`}}const js=`script[type="application/json"]:not([${yo}]):not([${ui}])`,cg=`script[type="application/json"][${ui}]`,dg=30,Sa={width:360,height:480},qs="dpk-review",Aa=t=>{try{return t.matches(":popover-open")}catch{return!1}},pg=()=>new Promise(t=>requestAnimationFrame(()=>t()));class hg extends ge{static{this.styles=Hf}static{this.properties={storageKey:{type:String,attribute:"storage-key"},storage:{type:String},notes:{type:String},theme:{type:String},notesOpen:{state:!0},settingsOpen:{state:!0},reviewSection:{state:!0}}}#e=ut;#t=null;#n=null;#r="current";#s=null;#i=null;#o=[];#a={open:e=>this.#N(e),answer:(e,n)=>this.#he(e,n),next:e=>this.#V(e),pickRound:e=>{this.#r=e,this.#i=null,this.requestUpdate()}};#l=!1;#c=new vf(this);#d=Wf;#g=new Uu(this,()=>this.storage!=="off"&&this.storage!=="memory");#b=new Bu(this);#m=new uf(this);#v=new Bf(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",template:()=>this.definition.name,layout:()=>this.sidebarLayout});#p=new jf(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",template:()=>this.definition.name});#$=new kf(this);#u=new ag(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",storageKey:()=>`${this.storageKey??un(this.definition.name)}:unsent-text`});#k=null;#h=new _u(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",storageKey:()=>this.storageKey??un(this.definition.name),inside:e=>e.some(n=>n instanceof Element&&(n.id===fn||n.classList.contains("dpk-bell"))),show:e=>{this.#be(e)}});#x={toggleList:()=>this.#h.toggleList(),openList:()=>this.#h.send({kind:"open-list"}),show:e=>this.#h.show(e),dismiss:e=>this.#h.send({kind:"close-toast",key:e}),readAll:()=>this.#h.send({kind:"read-all"}),pause:e=>this.#h.pause(e),resume:e=>this.#h.resume(e)};#A=new co(this);#q={toggle:()=>{this.settingsOpen=!this.settingsOpen},flip:e=>{this.dispatch(e)}};constructor(){super(),this.settingsOpen=!1,new Rf(this,{surface:()=>this.renderRoot.querySelector(`#${qs}`),anchor:()=>this.renderRoot.querySelector(".dpk-header-actions"),open:()=>this.notesOpen,close:()=>{this.notesOpen=!1}}),new sf(this,{active:()=>this.#e.questions.length>0,layer:()=>this.renderRoot.querySelector(".dpk-grill-badges"),bindings:()=>this.#o}),new ko(this,{open:()=>this.settingsOpen,closesOn:e=>!e.some(n=>n instanceof Element&&(n.id===mn||n.matches(".dpk-settings-trigger"))),ownsEscape:()=>!0,dismiss:()=>{this.settingsOpen=!1}})}#P=!1;#ie=new lg(this);#B=new ff(this,()=>this.storage!=="off"&&this.storage!=="memory",()=>{this.#f?.setTemplate(this.definition),this.#f?.setGrill({grill:this.#e,locale:this.locale})});#z;#f;#y=ns;#M=null;#I=new Set;#R=null;#H;#C;#_;#O=[];#U;#oe=new Promise(e=>{this.#U=e});#F;get locale(){return this.#B.locale}get definition(){const e=this.locale;return this.#z?.locale!==e&&(this.#z={locale:e,value:this.definitionFor(e)}),this.#z.value}connectedCallback(){super.connectedCallback(),this.dataset.template=this.definition.name,this.#l||(this.#l=!0,this.notesOpen=this.notes==="on"||this.notes==="open"||this.notes==="comments"||this.notes==="changes"||this.notes==="questions",this.reviewSection=this.notes==="changes"||this.notes==="questions"?this.notes:"comments"),this.#W(),window.addEventListener("hashchange",this.#ee),this.addEventListener("click",this.#re),this.addEventListener("dpk-comment-targets-change",this.#w),this.addEventListener("dpk-comment-request",this.#te),this.addEventListener("dpk-comment-submit",this.#ne),this.addEventListener("dpk-element-action",this.#se),this.#_??=new MutationObserver(this.#w),this.#w()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("hashchange",this.#ee),this.removeEventListener("click",this.#re),this.#C?.disconnect(),this.#_?.disconnect(),this.removeEventListener("dpk-comment-targets-change",this.#w),this.removeEventListener("dpk-comment-request",this.#te),this.removeEventListener("dpk-comment-submit",this.#ne),this.removeEventListener("dpk-element-action",this.#se)}#W(e=0){if(this.#f){this.#G();return}if(this.childNodes.length===0&&e<2){queueMicrotask(()=>this.#W(e+1));return}this.#Ce()}#G(){this.#H||(this.#H=this.#f?.subscribe(()=>this.#Oe()))}willUpdate(){this.dataset.theme=this.#g.resolve(yt(this.theme))}updated(){this.#ze(),this.#Pe(),this.#ke(),this.#le(),this.#ue(),this.#P&&(this.#P=!1,this.renderRoot.querySelector(".dpk-sidebar-toggle")?.focus())}get api(){return this.#F??=this.#Ae(),this.#F}get controller(){if(!this.#f)throw new Error(`<${this.tagName.toLowerCase()}> is not initialized yet`);return this.#f}get derivation(){return this.controller.derivation}get navigation(){return this.#y}dispatch(e){const n=this.controller.dispatch(e);return n.ok&&this.#u.settle([e.payload,e.note]),n.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:n.issues},bubbles:!0,composed:!0})),this.#S()),n}dispatchBatch(e){const n=this.controller.dispatchBatch(e);return n.ok&&this.#u.settle(e.flatMap(s=>[s.payload,s.note])),n.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:n.issues},bubbles:!0,composed:!0})),this.#S()),n}editComment(e,n){const s=this.controller.editComment(e,n);return s.ok&&this.#u.settle([n]),s.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:s.issues},bubbles:!0,composed:!0})),this.#S()),s}removeAction(e){this.controller.removeAction(e)}clearActions(){this.controller.clearActions()}navigate(e,n={}){const s=Ke(this.#E());this.#y=ss(this.#y,e,this.definition.navigationHierarchy),this.#L(n.replace??!1);const r=Ke(this.#E());this.requestUpdate(),s!==r&&(this.#S(),this.dispatchEvent(new CustomEvent("dpk-navigate",{detail:{navigation:this.#y},bubbles:!0,composed:!0})))}hashFor(e){const n=this.#E();return Ke(this.definition.resolveNavigation(this.derivation.state,ss(n,e,this.definition.navigationHierarchy)))}requestComment(e){this.#M=typeof e=="string"?e:D(e),this.notesOpen=!0,this.reviewSection="comments",this.requestUpdate()}get canSendToClaude(){return this.#b.available}sendToClaude(){return this.#b.send({brief:this.api.exportBrief(),draft:Zn(this.derivation.actions),anchor:this})}renderReviewPanel(e){return m`<dpk-component-comment-panel
|
|
3505
|
+
.definition=${this.controller.definition}
|
|
3506
|
+
.state=${e.state}
|
|
3507
|
+
.navigation=${e.navigation}
|
|
3508
|
+
.derivation=${this.derivation}
|
|
3509
|
+
.issues=${this.controller.lastIssues}
|
|
3510
|
+
.exportBrief=${()=>this.api.exportBrief()}
|
|
3511
|
+
.sendToClaude=${this.canSendToClaude?()=>this.sendToClaude():void 0}
|
|
3512
|
+
.pendingTarget=${this.#M}
|
|
3513
|
+
.section=${this.#T==="questions"?null:this.#T}
|
|
3514
|
+
.onDelete=${n=>this.removeAction(n)}
|
|
3515
|
+
.onEditComment=${(n,s)=>this.editComment(n,s)}
|
|
3516
|
+
.onClear=${()=>this.clearActions()}
|
|
3517
|
+
.onComment=${(n,s)=>{const r=this.dispatch({type:B,target:n,payload:{body:s}});return r.ok&&(this.#M=null),r}}
|
|
3518
|
+
></dpk-component-comment-panel>`}renderChrome(e,n){const s=e.actions.length,r=e.actions.filter(g=>g.type===B).length,i=new Set(this.derivation.stale.map(g=>g.action.id)),o=e.actions.filter(g=>J(g)&&!i.has(g.id)).length,a=s-r-o,l=z(this.locale);this.#o=ef(this,this.#e,this.derivation.answers,this.notesOpen&&this.reviewSection==="questions"?Ps(this.#e,this.#n):null);const d=n.sidebarHidden===!0||!n.sidebar&&!this.hasSidebarContent(),c=this.sidebarLayout.side,p=this.#we,u=!d&&this.#D&&(p?!this.#p.drawerOpen:this.#p.collapsed),h=d?k:this.#$e(u,p),f=this.definition.title(e.state);return m`
|
|
3519
|
+
<div class="dpk-shell" ?data-resizing=${this.#v.dragging}>
|
|
3520
|
+
<header class="dpk-header">
|
|
3521
|
+
<span class="dpk-brand" aria-hidden="true"></span>
|
|
3522
|
+
<div class="dpk-title">
|
|
3523
|
+
<span class="dpk-template-mark">${this.definition.label}</span>
|
|
3524
|
+
<h1 title=${f}>${f}</h1>
|
|
3525
|
+
</div>
|
|
3526
|
+
<div class="dpk-header-slot">
|
|
3527
|
+
${n.header??k}
|
|
3528
|
+
<slot name="header"></slot>
|
|
3529
|
+
</div>
|
|
3530
|
+
<div class="dpk-header-meta">
|
|
3531
|
+
${this.#ie.render(this.locale)}
|
|
3532
|
+
<span class="dpk-meta-name">${this.definition.name}</span>
|
|
3533
|
+
</div>
|
|
3534
|
+
<div class="dpk-header-tools">
|
|
3535
|
+
${this.#ge()} ${this.#xe()} ${this.#ye()}
|
|
3536
|
+
</div>
|
|
3537
|
+
</header>
|
|
3538
|
+
<div class="dpk-body" data-sidebar-side=${c} ?data-sidebar-drawer=${p}>
|
|
3539
|
+
${c==="right"?h:k}
|
|
3540
|
+
<aside
|
|
3541
|
+
id="dpk-sidebar"
|
|
3542
|
+
class="dpk-sidebar"
|
|
3543
|
+
?hidden=${d||u}
|
|
3544
|
+
style=${`--dpk-sidebar-width: ${this.#v.width}px`}
|
|
3545
|
+
>
|
|
3546
|
+
${n.sidebar??k}
|
|
3547
|
+
<slot name="sidebar"></slot>
|
|
3548
|
+
</aside>
|
|
3549
|
+
${c==="left"?h:k}
|
|
3550
|
+
${p&&!u&&!d?m`<div class="dpk-sidebar-scrim" @click=${()=>this.#p.closeDrawer()}></div>`:k}
|
|
3551
|
+
<main class="dpk-main">
|
|
3552
|
+
<div
|
|
3553
|
+
class="dpk-main-body"
|
|
3554
|
+
?data-grill-gutter=${this.#o.some(g=>this.contains(g.target))}
|
|
3555
|
+
>
|
|
3556
|
+
${this.#R?m`<div class="dpk-banner" role="alert">
|
|
3557
|
+
<strong>${l.baseDataError}</strong>
|
|
3558
|
+
<code>${this.#R}</code>
|
|
3559
|
+
</div>`:k}
|
|
3560
|
+
${this.#t===null?k:m`<div class="dpk-banner" role="alert">
|
|
3561
|
+
<strong>${l.grillError}</strong>
|
|
3562
|
+
<code>${this.#t}</code>
|
|
3563
|
+
</div>`}
|
|
3564
|
+
${this.#h.error===null?k:m`<div class="dpk-banner" role="alert">
|
|
3565
|
+
<strong>${l.changesError}</strong>
|
|
3566
|
+
<code>${this.#h.error}</code>
|
|
3567
|
+
</div>`}
|
|
3568
|
+
${n.main??k}
|
|
3569
|
+
<slot name="main"></slot>
|
|
3570
|
+
<section class="dpk-orphans" ?hidden=${this.#c.orphans===0}>
|
|
3571
|
+
<p class="dpk-label">previews without metadata</p>
|
|
3572
|
+
<slot name="preview"></slot>
|
|
3573
|
+
</section>
|
|
3574
|
+
${this.#fe()}
|
|
3575
|
+
</div>
|
|
3576
|
+
${this.#Le(l)}
|
|
3577
|
+
</main>
|
|
3578
|
+
</div>
|
|
3579
|
+
${n.footer||this.hasFooterContent()?m`<footer class="dpk-footer">
|
|
3580
|
+
${n.footer??k}
|
|
3581
|
+
<slot name="footer"></slot>
|
|
3582
|
+
</footer>`:k}
|
|
3583
|
+
${this.#ae(e,a,r)} ${this.#de(e)}
|
|
3584
|
+
${this.#ve(s)} ${this.#me()}
|
|
3585
|
+
</div>
|
|
3586
|
+
`}#ae(e,n,s){const r=this.definition.settings?.(e.state),i=r!==void 0&&r.items.length>0,o=z(this.locale);return m`<div class="dpk-header-actions">
|
|
3587
|
+
${i?_f(this.settingsOpen,o,this.#q):k}
|
|
3588
|
+
${i&&this.settingsOpen?Of(r,o,this.#q):k}
|
|
3589
|
+
${this.#ce(n,s)}
|
|
3590
|
+
</div>`}#le(){const e=this.renderRoot.querySelector(`#${mn}`),n=this.renderRoot.querySelector(".dpk-header-actions");!e||!n||Aa(e)||this.#A.open(e,n,{width:ka.width,height:Math.min(ka.height,window.innerHeight-96)},{placement:"bottom-end"})}#ce(e,n){const s=z(this.locale),r=(a,l,d,c)=>{const p=this.notesOpen&&this.#T===a;return m`<button
|
|
3591
|
+
class="dpk-header-action dpk-review-toggle"
|
|
3592
|
+
type="button"
|
|
3593
|
+
data-section=${a}
|
|
3594
|
+
aria-controls=${qs}
|
|
3595
|
+
aria-pressed=${p?"true":"false"}
|
|
3596
|
+
aria-label=${`${l} (${c??0})`}
|
|
3597
|
+
data-tooltip=${l}
|
|
3598
|
+
@click=${()=>{this.notesOpen=!p,this.reviewSection=a}}
|
|
3599
|
+
>
|
|
3600
|
+
${d} ${c===null?k:m`<span class="dpk-review-badge">${c}</span>`}
|
|
3601
|
+
</button>`},i=a=>a>0?String(a):null,o=vi(this.#e,this.derivation.answers);return m`<div class="dpk-review-toggles" role="group" aria-label=${s.review}>
|
|
3602
|
+
${r("changes",s.reviewChanges,Hd(),i(e))}
|
|
3603
|
+
${o.total===0?k:r("questions",s.grill,Ud(),`${o.answered}/${o.total}`)}
|
|
3604
|
+
${r("comments",s.reviewComments,Xt(),i(n))}
|
|
3605
|
+
</div>`}#de(e){const n=z(this.locale),s=this.#T,r=s==="changes"?n.reviewChanges:s==="questions"?n.grill:n.reviewComments;return m`<div
|
|
3606
|
+
id=${qs}
|
|
3607
|
+
class="dpk-review"
|
|
3608
|
+
popover="manual"
|
|
3609
|
+
role="dialog"
|
|
3610
|
+
aria-label=${r}
|
|
3611
|
+
data-section=${s}
|
|
3612
|
+
>
|
|
3613
|
+
${s==="questions"?this.#pe(e.actions.length):k}
|
|
3614
|
+
${this.renderReviewPanel(e)}
|
|
3615
|
+
</div>`}get#T(){return this.reviewSection==="questions"&&this.#e.questions.length===0?"comments":this.reviewSection}#pe(e){const n=z(this.locale),s=af(n,this.#e,this.derivation.answers,{open:this.#n,round:this.#r}),r=this.#K(e,!1);return lf(n,s,this.#a,r?m`<footer class="dpk-grill-footer">${this.#Q(r)}</footer>`:k)}#N(e){this.notesOpen=!0,this.reviewSection="questions",this.#r="current",this.#n=e,this.#i=null,this.requestUpdate()}#he(e,n){this.dispatch(Xc(e,n)).ok&&(n.kind==="option"?this.#V(e):n.kind==="free"&&n.text===""&&(this.#s=e))}#V(e){const n=Zc(this.#e,this.derivation.answers,e);n!==null&&(this.#n=n,this.requestUpdate())}#ue(){if(!this.notesOpen||this.#T!=="questions")return;const e=this.#s;this.#s=null,e!==null&&this.renderRoot.querySelector(`[data-free-text="${e}"]`)?.focus();const n=Ps(this.#e,this.#n);if(this.#r!=="current"||n===null||n===this.#i)return;this.#i=n;const s=this.renderRoot.querySelector(`.dpk-grill [data-question="${n}"]`),r=s?.closest(".dpk-grill-list");s&&r&&xs(r,s)}#fe(){if(this.#o.length===0)return k;const e=z(this.locale);return m`<div class="dpk-grill-badges">
|
|
3616
|
+
${this.#o.map(n=>m`<button
|
|
3617
|
+
type="button"
|
|
3618
|
+
class="dpk-grill-badge"
|
|
3619
|
+
data-badge=${n.index}
|
|
3620
|
+
data-answered=${String(n.answered)}
|
|
3621
|
+
data-visible="false"
|
|
3622
|
+
aria-pressed=${n.open?"true":"false"}
|
|
3623
|
+
aria-label=${e.grillOpen(`${n.ref} \xB7 ${n.title}`)}
|
|
3624
|
+
title=${`${n.ref} \xB7 ${n.title}`}
|
|
3625
|
+
@click=${()=>this.#N(n.questionId)}
|
|
3626
|
+
>
|
|
3627
|
+
${n.ref}
|
|
3628
|
+
</button>`)}
|
|
3629
|
+
</div>`}#ge(){const e=this.#h.view;if(!e)return k;const n=z(this.locale);return m`${Ou(e,n,this.#x)}
|
|
3630
|
+
${Pu(e,n,this.#x)}`}#me(){const e=this.#h.view;return e?zu(e,z(this.locale),this.#x):k}#ke(){const e=this.renderRoot.querySelector(`#${fn}`),n=this.renderRoot.querySelector(".dpk-bell");!e||!n||Aa(e)||this.#A.open(e,n,{width:Sa.width,height:Math.min(Sa.height,window.innerHeight-96)})}async#be(e){const n={};this.#k=n;const s=this.derivation.state,r=e.target===null?null:this.definition.canonicalTarget?.(s,pt(e.target))??pt(e.target),i=Ph({...e,target:r&&D(r)},a=>this.definition.navigationFor?this.definition.navigationFor(s,a):null);if(!i||(i.navigate&&this.navigate(i.navigate),r===null))return;r.type===oe?this.#N(r.id):this.showTarget(r);const o=D(r);for(let a=0;a<dg;a+=1){if(await this.updateComplete,await pg(),this.#k!==n)return;const l=ua(this,o);if(!(l===null||l.getClientRects().length===0)){$f(this,l),Cf(l);return}}}showTarget(e){}#ve(e){const n=this.#K(e,this.notesOpen);if(!n)return k;const s=z(this.locale);return m`<div class="dpk-dock" role="group" aria-label=${s.handoffLabel}>
|
|
3631
|
+
${this.#Q(n)}
|
|
3632
|
+
</div>`}#K(e,n){return Su({actions:e,railOpen:n,sendable:this.canSendToClaude,locale:this.locale},this.#m.state)}#Q(e){const n=z(this.locale);return m`${e.note?m`<p class="dpk-dock-note" role="alert">${e.note}</p>`:k}
|
|
3633
|
+
<div class="dpk-dock-actions">
|
|
3634
|
+
${e.send?m`<button
|
|
3635
|
+
class="dpk-btn dpk-btn--accent"
|
|
3636
|
+
type="button"
|
|
3637
|
+
?disabled=${e.send.disabled}
|
|
3638
|
+
@click=${()=>{this.#m.send(()=>this.sendToClaude())}}
|
|
3639
|
+
>
|
|
3640
|
+
${e.send.label}
|
|
3641
|
+
</button>`:k}
|
|
3642
|
+
<button
|
|
3643
|
+
class=${e.send?"dpk-btn":"dpk-btn dpk-btn--accent"}
|
|
3644
|
+
type="button"
|
|
3645
|
+
data-status=${e.copy.status}
|
|
3646
|
+
title=${n.handoffCopyTitle}
|
|
3647
|
+
@click=${()=>{this.#m.copy(()=>this.api.exportBrief())}}
|
|
3648
|
+
>
|
|
3649
|
+
${e.copy.label}
|
|
3650
|
+
</button>
|
|
3651
|
+
</div>`}#xe(){const e=this.locale,n=z(e).language;return m`<select
|
|
3652
|
+
class="dpk-lang-select"
|
|
3653
|
+
aria-label=${n}
|
|
3654
|
+
title=${n}
|
|
3655
|
+
@change=${vs(s=>{const r=_n.find(i=>i===s);r!==void 0&&this.#B.pick(r)})}
|
|
3656
|
+
>
|
|
3657
|
+
${_n.map(s=>m`<option value=${s} lang=${s} ?selected=${s===e}>
|
|
3658
|
+
${od[s]}
|
|
3659
|
+
</option>`)}
|
|
3660
|
+
</select>`}#ye(){const e=this.dataset.theme==="dark",n=z(this.locale),s=e?n.useLightTheme:n.useDarkTheme;return m`<button
|
|
3661
|
+
class="dpk-theme-toggle"
|
|
3662
|
+
type="button"
|
|
3663
|
+
aria-label=${s}
|
|
3664
|
+
title=${s}
|
|
3665
|
+
@click=${()=>this.#g.toggle(yt(this.theme))}
|
|
3666
|
+
>
|
|
3667
|
+
${e?Xd():ep()}
|
|
3668
|
+
</button>`}get#D(){return this.sidebarLayout.collapsible!==!1}get#we(){return this.#$.narrow&&this.#D&&this.sidebarLayout.narrow!=="stack"}#$e(e,n){const s=this.#D?this.#Se(e,n):k;return e||n?m`<div class="dpk-sidebar-strip">${s}</div>`:this.sidebarLayout.side==="left"?m`${this.#Z()}${s}`:m`${s}${this.#Z()}`}#Se(e,n){const s=z(this.locale),r=Nf(this.sidebarLayout.side,e),i=r.action==="collapse"?s.collapseSidebar:s.expandSidebar;return m`<button
|
|
3669
|
+
class="dpk-sidebar-toggle"
|
|
3670
|
+
type="button"
|
|
3671
|
+
aria-controls="dpk-sidebar"
|
|
3672
|
+
aria-expanded=${e?"false":"true"}
|
|
3673
|
+
aria-label=${i}
|
|
3674
|
+
title=${i}
|
|
3675
|
+
@click=${()=>{this.#P=!0,n?this.#p.toggleDrawer():this.#p.toggle()}}
|
|
3676
|
+
>
|
|
3677
|
+
${r.points==="left"?Bi():ft()}
|
|
3678
|
+
</button>`}#Z(){const e=z(this.locale),n=this.#v.handlers;return m`<div
|
|
3679
|
+
class="dpk-sidebar-resizer"
|
|
3680
|
+
role="separator"
|
|
3681
|
+
tabindex="0"
|
|
3682
|
+
aria-orientation="vertical"
|
|
3683
|
+
aria-label=${e.resizeSidebar}
|
|
3684
|
+
aria-valuemin=${ye.min}
|
|
3685
|
+
aria-valuemax=${ye.max}
|
|
3686
|
+
aria-valuenow=${this.#v.width}
|
|
3687
|
+
title=${e.resizeSidebarHint}
|
|
3688
|
+
@pointerdown=${n.pointerdown}
|
|
3689
|
+
@pointermove=${n.pointermove}
|
|
3690
|
+
@pointerup=${n.pointerup}
|
|
3691
|
+
@pointercancel=${n.pointercancel}
|
|
3692
|
+
@keydown=${n.keydown}
|
|
3693
|
+
@dblclick=${n.dblclick}
|
|
3694
|
+
></div>`}render(){if(!this.#f)return k;const e=this.#J();return this.renderChrome(e,this.renderRegions(e))}get sidebarLayout(){return Pf}hasSidebarContent(){return this.querySelector('[slot="sidebar"]')!==null}hasFooterContent(){return this.querySelector('[slot="footer"]')!==null}context(){return this.#J()}#j(){return{definition:this.definition,controller:()=>this.controller,derivation:()=>this.derivation,ready:this.#oe,navigation:()=>this.#E(),issues:()=>this.controller.lastIssues,dispatch:e=>this.dispatch(e),dispatchBatch:e=>this.dispatchBatch(e),subscribe:e=>(this.#I.add(e),()=>{this.#I.delete(e)}),editComment:(e,n)=>this.editComment(e,n),removeAction:e=>this.removeAction(e),clearActions:()=>this.clearActions(),navigate:(e,n)=>this.navigate(e,n),hashFor:e=>this.hashFor(e),requestComment:e=>this.requestComment(e)}}#Ae(){return Cu(this.#j(),this)}#Y(){return Vo(this.#j())}#J(){return Au(this.#j())}#E(){return this.definition.resolveNavigation(this.derivation.state,this.#y)}#Ce(){const e=this.#Re();this.#e=this.#X(),this.#Te(),this.#y=ca();const n=this.storageKey;this.#f=new Uo({definition:this.definition,base:e,storage:this.#Ee(),grill:{grill:this.#e,locale:this.locale},...typeof n=="string"?{storageKey:n}:{}}),this.#G(),this.#w(),this.#L(!0),this.#U?.(),this.#_e(),this.requestUpdate()}#Te(){this.querySelector(`:scope > [slot="${xa}"]`)!==null&&console.warn(`[dev-process-kit] <${this.tagName.toLowerCase()}> no longer shows slot="${xa}"; slot each piece as slot="${Ns}" data-name="\u2026" instead.`)}#Ee(){return this.storage==="off"?null:this.storage==="memory"?new Ts:Es()}#Re(){const e=this.querySelector(js);if(!e?.textContent||e.textContent.trim().length===0)return console.warn(`[dev-process-kit] <${this.tagName.toLowerCase()}> has no base JSON; starting from an empty state.`),this.#R='no <script type="application/json"> child found',this.definition.emptyBase();try{return this.definition.parseBase(JSON.parse(e.textContent))}catch(n){return console.error("[dev-process-kit] invalid base data:",n),this.#R=n instanceof Error?n.message:String(n),this.definition.emptyBase()}}#X(){const e=this.querySelector(cg);if(this.#t=null,!e?.textContent||e.textContent.trim().length===0)return ut;try{return Kc(JSON.parse(e.textContent))}catch(n){return console.error("[dev-process-kit] invalid questions:",n),this.#t=n instanceof Error?n.message:String(n),ut}}#_e(){this.querySelector(js)||(this.#C=new MutationObserver(()=>{const e=this.querySelector(js);if(e){this.#C?.disconnect(),this.#C=void 0,this.#e=this.#X(),this.controller.setGrill({grill:this.#e,locale:this.locale});try{this.controller.setBase(this.definition.parseBase(JSON.parse(e.textContent??"null")))}catch(n){console.error("[dev-process-kit] invalid base data:",n)}}}),this.#C.observe(this,{childList:!0,subtree:!0}))}#S(){const e=this.#Y();for(const n of this.#I)n(e)}#Oe(){if(!this.isConnected){this.requestUpdate(),this.#S();return}this.#L(!0),ta(this.#O,this.controller.actions),queueMicrotask(this.#w),this.requestUpdate(),this.#S(),this.dispatchEvent(new CustomEvent("dpk-change",{detail:this.#Y(),bubbles:!0,composed:!0}))}#L(e){const n=this.#E();this.#y=n,bf(n,e)}#ee=()=>{this.#y=ca(),this.#L(!0),this.requestUpdate(),this.#S(),this.dispatchEvent(new CustomEvent("dpk-navigate",{detail:{navigation:this.#y},bubbles:!0,composed:!0}))};#w=()=>{this.#_?.disconnect(),this.#O=Fu(this,e=>{this.isConnected&&this.#_?.observe(e,{childList:!0,subtree:!0})}),this.#f&&(ta(this.#O,this.#f.actions),this.#f.setComponentSnapshot(Gu(this.#O)))};#te=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!this.#f)return;const n=e.detail;typeof n!="object"||n===null||!("target"in n)||typeof n.target!="string"||(this.#w(),!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(r=>r.value===n.target))||this.requestComment(n.target)};#ne=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#f)return;const n=C(Dh,e.detail);if(!n.success)return;this.#w();const{target:s,body:r}=n.output;if(!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(a=>a.value===s))return;this.dispatch({type:B,target:s,payload:{body:r}}).ok&&e.preventDefault()};#se=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#f)return;const n=C(Bc,e.detail);if(!n.success)return;this.#w();const{type:s,target:r,payload:i}=n.output;if(!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(l=>l.value===r))return;this.dispatch({type:s,target:r,payload:i}).ok&&e.preventDefault()};#re=e=>{for(const n of e.composedPath()){if(!(n instanceof Element))continue;if(n===this||n.hasAttribute("data-template"))break;const s=n.getAttribute("data-dpk-navigate");if(s!==null){e.preventDefault(),this.navigate(Yt(s.includes("=")?s:`step=${s}`));return}const r=n.getAttribute("data-dpk-comment");if(r!==null){e.preventDefault(),this.requestComment(r);return}}};#Le(e){const n=Uf(this,e.memo),s=Gf(this.#d,n),r=i=>{this.#d=i,this.requestUpdate()};return m`<div class="dpk-supplements" ?hidden=${n.length===0} ?data-open=${s!==null}>
|
|
3695
|
+
<div class="dpk-supplements-bar" role="group" aria-label=${e.supplements}>
|
|
3696
|
+
<button
|
|
3697
|
+
type="button"
|
|
3698
|
+
class="dpk-supplements-toggle"
|
|
3699
|
+
aria-expanded=${String(s!==null)}
|
|
3700
|
+
aria-controls="dpk-supplements-body"
|
|
3701
|
+
aria-label=${s===null?e.openSupplements:e.closeSupplements}
|
|
3702
|
+
@click=${()=>r(Kf(this.#d,n))}
|
|
3703
|
+
>
|
|
3704
|
+
${ft()}
|
|
3705
|
+
</button>
|
|
3706
|
+
${n.map(i=>m`<button
|
|
3707
|
+
type="button"
|
|
3708
|
+
class="dpk-supplement-tab"
|
|
3709
|
+
aria-expanded=${String(i===s)}
|
|
3710
|
+
aria-controls="dpk-supplements-body"
|
|
3711
|
+
@click=${()=>r(Vf(this.#d,i.element))}
|
|
3712
|
+
>
|
|
3713
|
+
${i.name}
|
|
3714
|
+
</button>`)}
|
|
3715
|
+
</div>
|
|
3716
|
+
<div class="dpk-supplements-body" id="dpk-supplements-body" ?hidden=${s===null}>
|
|
3717
|
+
<style .textContent=${s===null?"":Ff(this,s)}></style>
|
|
3718
|
+
<slot name=${Ns} @slotchange=${()=>this.requestUpdate()}></slot>
|
|
3719
|
+
</div>
|
|
3720
|
+
</div>`}#Pe(){const e=this.renderRoot.querySelector(".dpk-shell"),n=this.renderRoot.querySelector(".dpk-dock-actions");e&&(n?e.style.setProperty("--dpk-dock-space",`${n.offsetWidth+8}px`):e.style.removeProperty("--dpk-dock-space"))}#ze(){this.#c.route()}}export{vt as $,Xt as A,Vd as B,B as C,Fi as D,ns as E,te as F,Ni as G,qi as H,as as I,ji as J,Ii as K,jo as L,Ts as M,Yt as N,pt as O,Ec as P,ss as Q,Rc as R,Zn as S,hg as T,ri as U,D as V,Cs as W,Wt as X,Kn as Y,Mt as Z,po as _,Yn as a,ko as a$,zt as a0,rl as a1,ue as a2,k as a3,m as a4,Me as a5,Gd as a6,qa as a7,ms as a8,ge as a9,Vr as aA,Gt as aB,U as aC,Je as aD,pe as aE,mh as aF,vs as aG,bh as aH,hn as aI,Ee as aJ,th as aK,ua as aL,ra as aM,Fr as aN,Qr as aO,Cc as aP,Sc as aQ,Ge as aR,ur as aS,Hr as aT,T as aU,zi as aV,Oi as aW,Li as aX,Rn as aY,Bd as aZ,vr as a_,co as aa,Ln as ab,Yd as ac,Jd as ad,Ft as ae,P as af,N as ag,j as ah,v as ai,Ht as aj,y as ak,$ as al,ni as am,Ut as an,ve as ao,G as ap,Gn as aq,ft as ar,Zd as as,Vn as at,C as au,O as av,Wn as aw,ei as ax,ti as ay,Zr as az,Ur as b,lo as b0,rt as b1,_t as b2,Tn as b3,Bi as b4,Di as b5,Wd as b6,is as b7,Wr as b8,Kr as b9,Yr as ba,kh as bb,Mi as bc,xs as bd,xo as be,_i as bf,Pi as bg,Uo as c,ai as d,_c as e,rs as f,li as g,ht as h,No as i,Pn as j,ii as k,zc as l,Qn as m,Es as n,un as o,Tc as p,cp as q,dc as r,dh as s,Do as t,Pe as u,Lc as v,Ke as w,Qd as x,Kd as y,Jt as z};
|