dev-process-kit 0.0.13 → 0.0.15
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-CirHYajF.js → shared-BJvnqK51.js} +1 -1
- package/dist/chunks/{shared-0MFKKPnB.js → shared-BS9TMOvt.js} +11 -11
- package/dist/chunks/{shared-Cd8A5TjZ.js → shared-BYoX4LxS.js} +174 -157
- package/dist/chunks/shared-B_nvELQt.js +572 -0
- package/dist/chunks/{shared-C1KQ5iU8.js → shared-Bp3FCPZj.js} +15 -21
- package/dist/chunks/shared-BtEAASxQ.js +1049 -0
- package/dist/chunks/shared-CBRj9Yll.js +2692 -0
- package/dist/chunks/{shared-DjmQsa0n.js → shared-CLabLKYD.js} +1 -1
- package/dist/chunks/{shared-B2YRwZ0P.js → shared-CRpGBd1Z.js} +139 -128
- package/dist/chunks/{shared-D7poXZ0z.js → shared-CVI7znpk.js} +6 -5
- package/dist/chunks/{shared-DklLt1Sc.js → shared-CeM-gXAw.js} +1 -1
- package/dist/chunks/{shared-CQG0dnvb.js → shared-D0PnnUir.js} +5 -4
- package/dist/chunks/shared-DsUcMhpJ.js +1104 -0
- package/dist/chunks/{shared-DrMSORn-.js → shared-m1HXI5YR.js} +176 -168
- 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/grill.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 -1
- package/dist/chunks/shared-B4Mwapvi.js +0 -1043
- package/dist/chunks/shared-BDUe3aT-.js +0 -1
- package/dist/chunks/shared-CSC14I4g.js +0 -2370
- package/dist/chunks/shared-DO0pUSjw.js +0 -571
- package/dist/chunks/shared-DxAiavwJ.js +0 -1102
- package/dist/chunks/shared-aDPp8Vry.js +0 -1
|
@@ -1,2370 +0,0 @@
|
|
|
1
|
-
const qe=globalThis,dt=qe.ShadowRoot&&(qe.ShadyCSS===void 0||qe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,pt=Symbol(),ws=new WeakMap;let $s=class{constructor(e,s,n){if(this._$cssResult$=!0,n!==pt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o;const s=this.t;if(dt&&e===void 0){const n=s!==void 0&&s.length===1;n&&(e=ws.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ws.set(s,e))}return e}toString(){return this.cssText}};const Ss=t=>new $s(typeof t=="string"?t:t+"",void 0,pt),B=(t,...e)=>{const s=t.length===1?t[0]:e.reduce((n,r,i)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[i+1],t[0]);return new $s(s,t,pt)},Yr=(t,e)=>{if(dt)t.adoptedStyleSheets=e.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(const s of e){const n=document.createElement("style"),r=qe.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=s.cssText,t.appendChild(n)}},As=dt?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const n of e.cssRules)s+=n.cssText;return Ss(s)})(t):t,{is:Qr,defineProperty:Xr,getOwnPropertyDescriptor:ei,getOwnPropertyNames:ti,getOwnPropertySymbols:si,getPrototypeOf:ni}=Object,Ne=globalThis,Cs=Ne.trustedTypes,ri=Cs?Cs.emptyScript:"",ii=Ne.reactiveElementPolyfillSupport,xe=(t,e)=>t,ht={toAttribute(t,e){switch(e){case Boolean:t=t?ri:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},Ts=(t,e)=>!Qr(t,e),Es={attribute:!0,type:String,converter:ht,reflect:!1,useDefault:!1,hasChanged:Ts};Symbol.metadata??=Symbol("metadata"),Ne.litPropertyMetadata??=new WeakMap;let le=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,s=Es){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(e,n,s);r!==void 0&&Xr(this.prototype,e,r)}}static getPropertyDescriptor(e,s,n){const{get:r,set:i}=ei(this.prototype,e)??{get(){return this[s]},set(a){this[s]=a}};return{get:r,set(a){const o=r?.call(this);i?.call(this,a),this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Es}static _$Ei(){if(this.hasOwnProperty(xe("elementProperties")))return;const e=ni(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(xe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(xe("properties"))){const s=this.properties,n=[...ti(s),...si(s)];for(const r of n)this.createProperty(r,s[r])}const e=this[Symbol.metadata];if(e!==null){const s=litPropertyMetadata.get(e);if(s!==void 0)for(const[n,r]of s)this.elementProperties.set(n,r)}this._$Eh=new Map;for(const[s,n]of this.elementProperties){const r=this._$Eu(s,n);r!==void 0&&this._$Eh.set(r,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const r of n)s.unshift(As(r))}else e!==void 0&&s.push(As(e));return s}static _$Eu(e,s){const n=s.attribute;return n===!1?void 0:typeof n=="string"?n: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,s=this.constructor.elementProperties;for(const n of s.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Yr(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,s,n){this._$AK(e,n)}_$ET(e,s){const n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&n.reflect===!0){const i=(n.converter?.toAttribute!==void 0?n.converter:ht).toAttribute(s,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,s){const n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const i=n.getPropertyOptions(r),a=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:ht;this._$Em=r;const o=a.fromAttribute(s,i.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(e,s,n,r=!1,i){if(e!==void 0){const a=this.constructor;if(r===!1&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??Ts)(i,s)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,s,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??s??this[e]),i!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(s=void 0),this._$AL.set(e,s)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}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 n=this.constructor.elementProperties;if(n.size>0)for(const[r,i]of n){const{wrapped:a}=i,o=this[r];a!==!0||this._$AL.has(r)||o===void 0||this.C(r,void 0,i,o)}}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(s)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(s)}willUpdate(e){}_$AE(e){this._$EO?.forEach(s=>s.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(s=>this._$ET(s,this[s])),this._$EM()}updated(e){}firstUpdated(e){}};le.elementStyles=[],le.shadowRootOptions={mode:"open"},le[xe("elementProperties")]=new Map,le[xe("finalized")]=new Map,ii?.({ReactiveElement:le}),(Ne.reactiveElementVersions??=[]).push("2.1.2");const ut=globalThis,_s=t=>t,De=ut.trustedTypes,Rs=De?De.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ls="$lit$",H=`lit$${Math.random().toFixed(9).slice(2)}$`,zs="?"+H,ai=`<${zs}>`,Y=document,ve=()=>Y.createComment(""),ye=t=>t===null||typeof t!="object"&&typeof t!="function",ft=Array.isArray,oi=t=>ft(t)||typeof t?.[Symbol.iterator]=="function",gt=`[
|
|
2
|
-
\f\r]`,we=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ps=/-->/g,Os=/>/g,Q=RegExp(`>|${gt}(?:([^\\s"'>=/]+)(${gt}*=${gt}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ms=/'/g,js=/"/g,Is=/^(?:script|style|textarea|title)$/i,qs=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),k=qs(1),li=qs(2),O=Symbol.for("lit-noChange"),g=Symbol.for("lit-nothing"),Ns=new WeakMap,X=Y.createTreeWalker(Y,129);function Ds(t,e){if(!ft(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Rs!==void 0?Rs.createHTML(e):e}const ci=(t,e)=>{const s=t.length-1,n=[];let r,i=e===2?"<svg>":e===3?"<math>":"",a=we;for(let o=0;o<s;o++){const l=t[o];let c,p,d=-1,h=0;for(;h<l.length&&(a.lastIndex=h,p=a.exec(l),p!==null);)h=a.lastIndex,a===we?p[1]==="!--"?a=Ps:p[1]!==void 0?a=Os:p[2]!==void 0?(Is.test(p[2])&&(r=RegExp("</"+p[2],"g")),a=Q):p[3]!==void 0&&(a=Q):a===Q?p[0]===">"?(a=r??we,d=-1):p[1]===void 0?d=-2:(d=a.lastIndex-p[2].length,c=p[1],a=p[3]===void 0?Q:p[3]==='"'?js:Ms):a===js||a===Ms?a=Q:a===Ps||a===Os?a=we:(a=Q,r=void 0);const u=a===Q&&t[o+1].startsWith("/>")?" ":"";i+=a===we?l+ai:d>=0?(n.push(c),l.slice(0,d)+Ls+l.slice(d)+H+u):l+H+(d===-2?o:u)}return[Ds(t,i+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]};let mt=class Wr{constructor({strings:e,_$litType$:s},n){let r;this.parts=[];let i=0,a=0;const o=e.length-1,l=this.parts,[c,p]=ci(e,s);if(this.el=Wr.createElement(c,n),X.currentNode=this.el.content,s===2||s===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(r=X.nextNode())!==null&&l.length<o;){if(r.nodeType===1){if(r.hasAttributes())for(const d of r.getAttributeNames())if(d.endsWith(Ls)){const h=p[a++],u=r.getAttribute(d).split(H),f=/([.?@])?(.*)/.exec(h);l.push({type:1,index:i,name:f[2],strings:u,ctor:f[1]==="."?pi:f[1]==="?"?hi:f[1]==="@"?ui:Be}),r.removeAttribute(d)}else d.startsWith(H)&&(l.push({type:6,index:i}),r.removeAttribute(d));if(Is.test(r.tagName)){const d=r.textContent.split(H),h=d.length-1;if(h>0){r.textContent=De?De.emptyScript:"";for(let u=0;u<h;u++)r.append(d[u],ve()),X.nextNode(),l.push({type:2,index:++i});r.append(d[h],ve())}}}else if(r.nodeType===8)if(r.data===zs)l.push({type:2,index:i});else{let d=-1;for(;(d=r.data.indexOf(H,d+1))!==-1;)l.push({type:7,index:i}),d+=H.length-1}i++}}static createElement(e,s){const n=Y.createElement("template");return n.innerHTML=e,n}};function ce(t,e,s=t,n){if(e===O)return e;let r=n!==void 0?s._$Co?.[n]:s._$Cl;const i=ye(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,s,n)),n!==void 0?(s._$Co??=[])[n]=r:s._$Cl=r),r!==void 0&&(e=ce(t,r._$AS(t,e.values),r,n)),e}let di=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:s},parts:n}=this._$AD,r=(e?.creationScope??Y).importNode(s,!0);X.currentNode=r;let i=X.nextNode(),a=0,o=0,l=n[0];for(;l!==void 0;){if(a===l.index){let c;l.type===2?c=new Ue(i,i.nextSibling,this,e):l.type===1?c=new l.ctor(i,l.name,l.strings,this,e):l.type===6&&(c=new fi(i,this,e)),this._$AV.push(c),l=n[++o]}a!==l?.index&&(i=X.nextNode(),a++)}return X.currentNode=Y,r}p(e){let s=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,s),s+=n.strings.length-2):n._$AI(e[s])),s++}},Ue=class Zr{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,n,r){this.type=2,this._$AH=g,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=ce(this,e,s),ye(e)?e===g||e==null||e===""?(this._$AH!==g&&this._$AR(),this._$AH=g):e!==this._$AH&&e!==O&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):oi(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!==g&&ye(this._$AH)?this._$AA.nextSibling.data=e:this.T(Y.createTextNode(e)),this._$AH=e}$(e){const{values:s,_$litType$:n}=e,r=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=mt.createElement(Ds(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(s);else{const i=new di(r,this),a=i.u(this.options);i.p(s),this.T(a),this._$AH=i}}_$AC(e){let s=Ns.get(e.strings);return s===void 0&&Ns.set(e.strings,s=new mt(e)),s}k(e){ft(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let n,r=0;for(const i of e)r===s.length?s.push(n=new Zr(this.O(ve()),this.O(ve()),this,this.options)):n=s[r],n._$AI(i),r++;r<s.length&&(this._$AR(n&&n._$AB.nextSibling,r),s.length=r)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){const n=_s(e).nextSibling;_s(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}};class Be{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,n,r,i){this.type=1,this._$AH=g,this._$AN=void 0,this.element=e,this.name=s,this._$AM=r,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=g}_$AI(e,s=this,n,r){const i=this.strings;let a=!1;if(i===void 0)e=ce(this,e,s,0),a=!ye(e)||e!==this._$AH&&e!==O,a&&(this._$AH=e);else{const o=e;let l,c;for(e=i[0],l=0;l<i.length-1;l++)c=ce(this,o[n+l],s,l),c===O&&(c=this._$AH[l]),a||=!ye(c)||c!==this._$AH[l],c===g?e=g:e!==g&&(e+=(c??"")+i[l+1]),this._$AH[l]=c}a&&!r&&this.j(e)}j(e){e===g?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}let pi=class extends Be{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===g?void 0:e}},hi=class extends Be{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==g)}},ui=class extends Be{constructor(e,s,n,r,i){super(e,s,n,r,i),this.type=5}_$AI(e,s=this){if((e=ce(this,e,s,0)??g)===O)return;const n=this._$AH,r=e===g&&n!==g||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==g&&(n===g||r);r&&this.element.removeEventListener(this.name,this,n),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 fi{constructor(e,s,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){ce(this,e)}}const gi={I:Ue},mi=ut.litHtmlPolyfillSupport;mi?.(mt,Ue),(ut.litHtmlVersions??=[]).push("3.3.3");const ki=(t,e,s)=>{const n=s?.renderBefore??e;let r=n._$litPart$;if(r===void 0){const i=s?.renderBefore??null;n._$litPart$=r=new Ue(e.insertBefore(ve(),i),i,void 0,s??{})}return r._$AI(t),r},kt=globalThis;let F=class extends le{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 s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ki(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return O}};F._$litElement$=!0,F.finalized=!0,kt.litElementHydrateSupport?.({LitElement:F});const bi=kt.litElementPolyfillSupport;bi?.({LitElement:F}),(kt.litElementVersions??=[]).push("4.2.2");const K={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},$e=t=>(...e)=>({_$litDirective$:t,values:e});let He=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,n){this._$Ct=e,this._$AM=s,this._$Ci=n}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};const{I:xi}=gi,Us=t=>t,vi=t=>t.strings===void 0,Bs=()=>document.createComment(""),Se=(t,e,s)=>{const n=t._$AA.parentNode,r=e===void 0?t._$AB:e._$AA;if(s===void 0){const i=n.insertBefore(Bs(),r),a=n.insertBefore(Bs(),r);s=new xi(i,a,t,t.options)}else{const i=s._$AB.nextSibling,a=s._$AM,o=a!==t;if(o){let l;s._$AQ?.(t),s._$AM=t,s._$AP!==void 0&&(l=t._$AU)!==a._$AU&&s._$AP(l)}if(i!==r||o){let l=s._$AA;for(;l!==i;){const c=Us(l).nextSibling;Us(n).insertBefore(l,r),l=c}}}return s},ee=(t,e,s=t)=>(t._$AI(e,s),t),yi={},bt=(t,e=yi)=>t._$AH=e,wi=t=>t._$AH,xt=t=>{t._$AR(),t._$AA.remove()},vt=$e(class extends He{constructor(t){if(super(t),t.type!==K.PROPERTY&&t.type!==K.ATTRIBUTE&&t.type!==K.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!vi(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===O||e===g)return e;const s=t.element,n=t.name;if(t.type===K.PROPERTY){if(e===s[n])return O}else if(t.type===K.BOOLEAN_ATTRIBUTE){if(!!e===s.hasAttribute(n))return O}else if(t.type===K.ATTRIBUTE&&s.getAttribute(n)===e+"")return O;return bt(t),e}});class Fe extends He{constructor(e){if(super(e),this.it=g,e.type!==K.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===g||e==null)return this._t=void 0,this.it=e;if(e===O)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 s=[e];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}Fe.directiveName="unsafeHTML",Fe.resultType=1;const Hs=$e(Fe),Ke=t=>{let e=t;for(;e!==null;){if(e instanceof Element){const s=e.getAttribute("lang");if(s!==null)return s}e=e instanceof ShadowRoot?e.host:e.parentNode}return null},yt=["en","ja"],Fs="en",Ks=t=>yt.some(e=>e===t),We=t=>{const e=(t??"").split("-")[0]?.toLowerCase()??"";return Ks(e)?e:Fs},Ws=t=>We(Ke(t)),wt="dpk-locale-change",Zs=t=>typeof t=="string"&&Ks(t)?t:null,$i=t=>t.preference??t.authored,Si=(t,e)=>t===e?null:t,Ze=t=>e=>e==="ja"?t.ja:t.en;class $t{#e;#r;#n=Fs;constructor(e,s=()=>{}){this.#e=e,this.#r=s,e.addController(this)}get locale(){return this.#n}hostConnected(){this.#n=Ws(this.#e),document.addEventListener(wt,this.#i)}hostDisconnected(){document.removeEventListener(wt,this.#i)}#i=()=>{const e=Ws(this.#e);e!==this.#n&&(this.#n=e,this.#r(),this.#e.requestUpdate())}}const Ai={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)"]},Vs=t=>Ss(Object.entries(Ai).map(([e,[s,n]])=>`--dpk-${e}: ${t(s,n)};`).join(`
|
|
4
|
-
`)),Ve=B`
|
|
5
|
-
:host {
|
|
6
|
-
/* Browsers without light-dark() stay light. */
|
|
7
|
-
${Vs(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
|
-
${Vs((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
|
-
`,St=B`
|
|
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
|
-
`,Ci=B`
|
|
332
|
-
.comment-pop {
|
|
333
|
-
box-sizing: border-box;
|
|
334
|
-
overflow: auto;
|
|
335
|
-
position: fixed;
|
|
336
|
-
inset: auto;
|
|
337
|
-
margin: 0;
|
|
338
|
-
display: grid;
|
|
339
|
-
gap: 10px;
|
|
340
|
-
padding: 14px;
|
|
341
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
342
|
-
border-radius: var(--dpk-radius-lg);
|
|
343
|
-
background: var(--dpk-paper-raised);
|
|
344
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
345
|
-
color: var(--dpk-ink);
|
|
346
|
-
font-size: 12.5px;
|
|
347
|
-
animation: dpk-pop-in 180ms var(--dpk-ease);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
@keyframes dpk-pop-in {
|
|
351
|
-
from {
|
|
352
|
-
opacity: 0;
|
|
353
|
-
transform: translateY(4px) scale(0.98);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.comment-pop .comment-list {
|
|
358
|
-
list-style: none;
|
|
359
|
-
margin: 0;
|
|
360
|
-
padding: 0;
|
|
361
|
-
display: grid;
|
|
362
|
-
gap: 6px;
|
|
363
|
-
max-height: 140px;
|
|
364
|
-
overflow: auto;
|
|
365
|
-
font-size: 12px;
|
|
366
|
-
color: var(--dpk-ink-soft);
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.comment-pop .comment-list li {
|
|
370
|
-
padding: 6px 10px;
|
|
371
|
-
border-radius: var(--dpk-radius-xs);
|
|
372
|
-
background: var(--dpk-accent-soft);
|
|
373
|
-
border-left: 2px solid var(--dpk-accent);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.comment-pop .dpk-textarea {
|
|
377
|
-
min-height: 54px;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.pop-actions {
|
|
381
|
-
display: flex;
|
|
382
|
-
gap: 4px;
|
|
383
|
-
align-items: center;
|
|
384
|
-
justify-content: flex-end;
|
|
385
|
-
}
|
|
386
|
-
`,Gs=B`
|
|
387
|
-
.dpk-prose {
|
|
388
|
-
overflow-wrap: anywhere;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.dpk-prose > :first-child {
|
|
392
|
-
margin-top: 0;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.dpk-prose > :last-child {
|
|
396
|
-
margin-bottom: 0;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.dpk-prose :is(p, ul, ol, pre, blockquote, table) {
|
|
400
|
-
margin: 0 0 0.6em;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.dpk-prose :is(h1, h2, h3, h4, h5, h6) {
|
|
404
|
-
margin: 0.8em 0 0.3em;
|
|
405
|
-
font-size: 1em;
|
|
406
|
-
font-weight: 650;
|
|
407
|
-
line-height: 1.4;
|
|
408
|
-
color: var(--dpk-ink);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.dpk-prose :is(ul, ol) {
|
|
412
|
-
padding-left: 1.3em;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
.dpk-prose li + li {
|
|
416
|
-
margin-top: 0.15em;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
/* A task list item: its checkbox is the marker, so it has no bullet of its own. */
|
|
420
|
-
.dpk-prose li:has(> input[type='checkbox']:first-child) {
|
|
421
|
-
margin-left: -1.3em;
|
|
422
|
-
list-style: none;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.dpk-prose li > input[type='checkbox']:first-child {
|
|
426
|
-
margin: 0 0.4em 0 0;
|
|
427
|
-
vertical-align: -0.1em;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
.dpk-prose strong {
|
|
431
|
-
font-weight: 650;
|
|
432
|
-
color: var(--dpk-ink);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.dpk-prose a {
|
|
436
|
-
color: var(--dpk-blue);
|
|
437
|
-
text-decoration: underline;
|
|
438
|
-
text-underline-offset: 2px;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.dpk-prose code {
|
|
442
|
-
padding: 0.05em 0.3em;
|
|
443
|
-
border-radius: var(--dpk-radius-xs);
|
|
444
|
-
background: var(--dpk-paper-sunken);
|
|
445
|
-
font-family: var(--dpk-mono);
|
|
446
|
-
font-size: 0.9em;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
.dpk-prose pre {
|
|
450
|
-
padding: 8px 10px;
|
|
451
|
-
border-radius: var(--dpk-radius-xs);
|
|
452
|
-
background: var(--dpk-paper-sunken);
|
|
453
|
-
overflow: auto;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.dpk-prose pre code {
|
|
457
|
-
padding: 0;
|
|
458
|
-
background: none;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.dpk-prose blockquote {
|
|
462
|
-
padding-left: 0.8em;
|
|
463
|
-
border-left: 2px solid var(--dpk-rule-strong);
|
|
464
|
-
color: var(--dpk-ink-soft);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
/* A table wider than its box scrolls on its own instead of being clipped by it. */
|
|
468
|
-
.dpk-prose table {
|
|
469
|
-
display: block;
|
|
470
|
-
max-width: 100%;
|
|
471
|
-
overflow-x: auto;
|
|
472
|
-
border-collapse: collapse;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/* A cell breaks a word only once it runs out of room: the box's 'anywhere' would
|
|
476
|
-
let the table shrink a column to one letter rather than scroll. */
|
|
477
|
-
.dpk-prose :is(th, td) {
|
|
478
|
-
overflow-wrap: break-word;
|
|
479
|
-
padding: 2px 8px;
|
|
480
|
-
border: 1px solid var(--dpk-rule);
|
|
481
|
-
text-align: left;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
.dpk-prose hr {
|
|
485
|
-
border: none;
|
|
486
|
-
border-top: 1px solid var(--dpk-rule);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
.dpk-prose img {
|
|
490
|
-
max-width: 100%;
|
|
491
|
-
}
|
|
492
|
-
`,de=(t,e)=>t instanceof e?t:null;function At(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var te=At();function Js(t){te=t}var se={exec:()=>null};function pe(t){let e=[];return s=>{let n=Math.max(0,Math.min(3,s-1)),r=e[n];return r||(r=t(n),e[n]=r),r}}function b(t,e=""){let s=typeof t=="string"?t:t.source,n={replace:(r,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(E.caret,"$1"),s=s.replace(r,a),n},getRegex:()=>new RegExp(s,e)};return n}var Ti=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),E={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:pe(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:pe(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:pe(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:pe(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:pe(t=>new RegExp(`^ {0,${t}}(?:</?(?:${Ce})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:pe(t=>new RegExp(`^ {0,${t}}>`))},Ei=/^(?:[ \t]*(?:\n|$))+/,_i=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ri=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ae=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Li=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ct=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ys=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Qs=b(Ys).replace(/bull/g,Ct).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(),zi=b(Ys).replace(/bull/g,Ct).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(),Tt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Pi=/^[^\n]+/,Et=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Oi=b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Et).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Mi=b(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ct).getRegex(),Ce="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",_t=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ji=b("^ {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",_t).replace("tag",Ce).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xs=t=>b(Tt).replace("hr",Ae).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",Ce).getRegex(),Ii=Xs(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),qi=Xs(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ni=b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",qi).getRegex(),Rt={blockquote:Ni,code:_i,def:Oi,fences:Ri,heading:Li,hr:Ae,html:ji,lheading:Qs,list:Mi,newline:Ei,paragraph:Ii,table:se,text:Pi},en=b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ae).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",Ce).getRegex(),Di={...Rt,lheading:zi,table:en,paragraph:b(Tt).replace("hr",Ae).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",en).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",Ce).getRegex()},Ui={...Rt,html:b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_t).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:se,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b(Tt).replace("hr",Ae).replace("heading",` *#{1,6} *[^
|
|
493
|
-
]`).replace("lheading",Qs).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Bi=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Hi=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,tn=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Fi=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,U=/[\p{P}\p{S}]/u,he=/[\s\p{P}\p{S}]/u,Te=/[^\s\p{P}\p{S}]/u,Ki=b(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,he).getRegex(),Wi=/[\p{Pi}\p{Ps}"']/u,sn=/(?!~)[\p{P}\p{S}]/u,Zi=/(?!~)[\s\p{P}\p{S}]/u,Vi=/(?:[^\s\p{P}\p{S}]|~)/u,Gi=b(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ti?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),nn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ji=b(nn,"u").replace(/punct/g,U).getRegex(),Yi=b(nn,"u").replace(/punct/g,sn).getRegex(),Qi=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Xi=b(Qi,"u").replace(/openQuote/g,Wi).replace(/punct/g,U).getRegex(),rn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ea=b(rn,"gu").replace(/notPunctSpace/g,Te).replace(/punctSpace/g,he).replace(/punct/g,U).getRegex(),ta=b(rn,"gu").replace(/notPunctSpace/g,Vi).replace(/punctSpace/g,Zi).replace(/punct/g,sn).getRegex(),sa="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",na=b(sa,"gu").replace(/notPunctSpace/g,Te).replace(/punctSpace/g,he).replace(/punct/g,U).getRegex(),ra=b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Te).replace(/punctSpace/g,he).replace(/punct/g,U).getRegex(),ia="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",aa=b(ia,"gu").replace(/notPunctSpace/g,Te).replace(/punctSpace/g,he).replace(/punct/g,U).getRegex(),oa=b(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,U).getRegex(),la="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ca=b(la,"gu").replace(/notPunctSpace/g,Te).replace(/punctSpace/g,he).replace(/punct/g,U).getRegex(),da=b(/\\(punct)/,"gu").replace(/punct/g,U).getRegex(),pa=b(/^<(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(),ha=b(_t).replace("(?:-->|$)","-->").getRegex(),ua=b("^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",ha).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),an=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Ge=b(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",an).getRegex(),fa=b(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Ge).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ga=b(/^!?\[(label)\]\[(ref)\]/).replace("label",Ge).replace("ref",Et).getRegex(),ma=b(/^!?\[(ref)\](?:\[\])?/).replace("ref",Et).getRegex(),on=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,ka=b(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",an).getRegex(),ba=b("reflink|nolink(?!\\()","g").replace("reflink",b(/^!?\[(label)\]\[(ref)\]/).replace("label",ka).replace("ref",on).getRegex()).replace("nolink",b(/^!?\[(ref)\](?:\[\])?/).replace("ref",on).getRegex()).getRegex(),ln=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,xa=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,va=b(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,xa).getRegex(),Lt={_backpedal:se,anyPunctuation:da,autolink:pa,blockSkip:Gi,br:tn,code:Hi,del:se,delLDelim:se,delRDelim:se,emStrongLDelim:Ji,emStrongRDelimAst:ea,emStrongRDelimUnd:ra,escape:Bi,link:fa,nolink:ma,punctuation:Ki,reflink:ga,reflinkSearch:ba,tag:ua,text:Fi,url:se},ya={...Lt,emStrongLDelim:Xi,emStrongRDelimAst:na,emStrongRDelimUnd:aa,link:b(/^!?\[(label)\]\((.*?)\)/).replace("label",Ge).getRegex(),reflink:b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ge).getRegex()},zt={...Lt,emStrongRDelimAst:ta,emStrongLDelim:Yi,delLDelim:oa,delRDelim:ca,url:b(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",va).replace("protocol",ln).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:b(/^(?:[^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",ln).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},wa={...zt,br:b(tn).replace("{2,}","*").getRegex(),text:b(zt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Je={normal:Rt,gfm:Di,pedantic:Ui},Ee={normal:Lt,gfm:zt,breaks:wa,pedantic:ya},$a={"&":"&","<":"<",">":">",'"':""","'":"'"},cn=t=>$a[t];function z(t,e){if(e){if(E.escapeTest.test(t))return t.replace(E.escapeReplace,cn)}else if(E.escapeTestNoEncode.test(t))return t.replace(E.escapeReplaceNoEncode,cn);return t}function Sa(t){return t.replace(E.numericCharacterReference,(e,s,n)=>{let r=s===void 0?Number.parseInt(n,16):Number.parseInt(s,10);return r===0||r>1114111||r>=55296&&r<=57343?"\uFFFD":String.fromCodePoint(r)})}function dn(t){try{t=encodeURI(t).replace(E.percentDecode,"%")}catch{return null}return t}function pn(t,e){let s=t.replace(E.findPipe,(i,a,o)=>{let l=!1,c=a;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),n=s.split(E.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(E.slashPipe,"|");return n}function W(t,e,s){let n=t.length;if(n===0)return"";let r=0;for(;r<n&&t.charAt(n-r-1)===e;)r++;return t.slice(0,n-r)}function hn(t){let e=t.split(`
|
|
494
|
-
`),s=e.length-1;for(;s>=0&&E.blankLine.test(e[s]);)s--;return e.length-s<=2?t:e.slice(0,s+1).join(`
|
|
495
|
-
`)}function Ye(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function un(t,e){if(t.indexOf(e[0])===-1&&t.indexOf(e[1])===-1)return-1;let s=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])s++;else if(t[n]===e[1]&&(s--,s<0))return n;return s>0?-2:-1}function fn(t,e=0){let s=e,n="";for(let r of t)if(r===" "){let i=4-s%4;n+=" ".repeat(i),s+=i}else n+=r,s++;return n}function gn(t,e,s,n,r){let i=e.href,a=e.title||null,o=t[1].replace(r.other.outputLinkReplace,"$1"),l=t[0].charAt(0)==="!";n.state.inLink=!0;let c=n.state.linkEmitted,p=n.state.inRawBlock;n.state.linkEmitted=!1;let d=n.inlineTokens(o),h=n.state.linkEmitted;if(n.state.linkEmitted=c,n.state.inLink=!1,!l){if(h){n.state.inRawBlock=p;return}n.state.linkEmitted=!0}return{type:l?"image":"link",raw:s,href:i,title:a,text:o,tokens:d}}function Aa(t,e,s){let n=t.match(s.other.indentCodeCompensation);if(n===null)return e;let r=n[1];return e.split(`
|
|
496
|
-
`).map(i=>{let a=i.match(s.other.beginningSpace);if(a===null)return i;let[o]=a;return i.slice(Math.min(o.length,r.length))}).join(`
|
|
497
|
-
`)}function mn(t,e,s,n){if(!e.includes("<"))return!1;for(let r=0;r<e.length;r++){if(e[r]==="\\"){r++;continue}if(e[r]==="`"){let o=n.inline.code.exec(e.slice(r));if(o){r+=o[0].length-1;continue}}if(e[r]!=="<")continue;let i=t.slice(s+r),a=n.inline.tag.exec(i)||n.inline.autolink.exec(i);if(a){if(a[0].length>e.length-r)return!0;r+=a[0].length-1}}return!1}var Qe=class{options;rules;lexer;constructor(t){this.options=t||te}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 s=this.options.pedantic?e[0]:hn(e[0]),n=s.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:s,codeBlockStyle:"indented",text:n}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let s=e[0],n=Aa(s,e[3]||"",this.rules);return{type:"code",raw:s,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let s=e[2].trim();if(this.rules.other.endingHash.test(s)){let n=W(s,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceTabChar.test(n))&&(s=n.trim())}return{type:"heading",raw:W(e[0],`
|
|
498
|
-
`),depth:e[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:W(e[0],`
|
|
499
|
-
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let s=W(e[0],`
|
|
500
|
-
`).split(`
|
|
501
|
-
`),n="",r="",i=[];for(;s.length>0;){let a=!1,o=[],l;for(l=0;l<s.length;l++)if(this.rules.other.blockquoteStart.test(s[l]))o.push(s[l]),a=!0;else if(!a)o.push(s[l]);else break;s=s.slice(l);let c=o.join(`
|
|
502
|
-
`),p=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
503
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
504
|
-
${c}`:c,r=r?`${r}
|
|
505
|
-
${p}`:p;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,i,!0),this.lexer.state.top=d,s.length===0)break;let h=i.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let u=h,f=s.join(`
|
|
506
|
-
`),y=u.raw+`
|
|
507
|
-
`+f.replace(this.rules.other.blockquoteSetextReplace2,""),x=this.blockquote(y);i[i.length-1]=x;let R=y.substring(x.raw.length).replace(/^\n/,""),me=R?R.split(`
|
|
508
|
-
`).length:0,ke=me?s.slice(0,-me):s;ke.length>0&&(n=`${n}
|
|
509
|
-
${ke.join(`
|
|
510
|
-
`)}`),r=r.substring(0,r.length-u.text.length)+x.text;break}else if(h?.type==="list"){let u=h,f=u.raw+`
|
|
511
|
-
`+s.join(`
|
|
512
|
-
`),y=this.list(f);i[i.length-1]=y,n=n.substring(0,n.length-h.raw.length)+y.raw,r=r.substring(0,r.length-u.raw.length)+y.raw,s=f.substring(i.at(-1).raw.length).split(`
|
|
513
|
-
`);continue}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let s=e[1].trim(),n=s.length>1,r={type:"list",raw:"",ordered:n,start:n?+s.slice(0,-1):"",loose:!1,items:[]};s=n?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=n?s:"[*+-]");let i=this.rules.other.listItemRegex(s),a=!1;for(;t;){let l=!1,c="",p="";if(!(e=i.exec(t))||this.rules.block.hr.test(t))break;c=e[0],t=t.substring(c.length);let d=e[2].split(`
|
|
514
|
-
`,1)[0],h=e[1].length,u=this.options.pedantic?fn(d,h):d.replace(this.rules.other.leadingSpaceTab,R=>fn(R,h)),f=t.split(`
|
|
515
|
-
`,1)[0],y=!u.trim(),x=0;if(this.options.pedantic?(x=2,p=u.trimStart()):y?x=h+1:(x=u.search(this.rules.other.nonSpaceChar),x=x>4?1:x,p=u.slice(x),x+=h),y&&this.rules.other.blankLine.test(f)&&(c+=f+`
|
|
516
|
-
`,t=t.substring(f.length+1),l=!0),!l){let R=this.rules.other.nextBulletRegex(x),me=this.rules.other.hrRegex(x),ke=this.rules.other.fencesBeginRegex(x),ys=this.rules.other.headingBeginRegex(x),Vr=this.rules.other.htmlBeginRegex(x),Gr=this.rules.other.blockquoteBeginRegex(x);for(;t;){let ct=t.split(`
|
|
517
|
-
`,1)[0],be;if(f=ct,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),be=f):be=f.replace(this.rules.other.leadingSpaceTab,Jr=>Jr.replace(this.rules.other.tabCharGlobal," ")),ke.test(f)||ys.test(f)||Vr.test(f)||Gr.test(f)||R.test(f)||me.test(f))break;if(be.search(this.rules.other.nonSpaceChar)>=x||!f.trim())p+=`
|
|
518
|
-
`+be.slice(x);else{if(y||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ke.test(u)||ys.test(u)||me.test(u))break;p+=`
|
|
519
|
-
`+f}y=!f.trim(),c+=ct+`
|
|
520
|
-
`,t=t.substring(ct.length+1),u=be.slice(x)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0)),r.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),r.raw+=c}let o=r.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.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 c=l.tokens.filter(d=>d.type==="space"),p=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));r.loose=p}for(let l of r.items){let c=l.tokens[0];if(l.task&&(c?.type==="text"||c?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(l.raw);if(p){let d={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};l.checked=d.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=d.raw+l.tokens[0].raw,l.tokens[0].text=d.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(d)):l.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):l.tokens.unshift(d)}}else l.task&&(l.task=!1)}if(r.loose)for(let l of r.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return r}}html(t){let e=this.rules.block.html.exec(t);if(e){let s=hn(e[0]);return{type:"html",block:!0,raw:s,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:s}}}def(t){let e=this.rules.block.def.exec(t);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&un(e[2],"()")!==-1)return;let s=Ye(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=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:s,raw:W(e[0],`
|
|
521
|
-
`),href:n,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let s=pn(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
522
|
-
`):[],i={type:"table",raw:W(e[0],`
|
|
523
|
-
`),header:[],align:[],rows:[]};if(s.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<s.length;a++)i.header.push({text:s[a],tokens:this.lexer.inline(s[a]),header:!0,align:i.align[a]});for(let a of r)i.rows.push(pn(a,i.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:i.align[l]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let s=e[1].trim();return{type:"heading",raw:W(e[0],`
|
|
524
|
-
`),depth:e[2].charAt(0)==="="?1:2,text:s,tokens:this.lexer.inline(s)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let s=e[1].charAt(e[1].length-1)===`
|
|
525
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:s,tokens:this.lexer.inline(s)}}}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 s=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&mn(t,e[1],s,this.rules))return;let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=W(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=un(e[2],"()");if(a===-2)return;if(a>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[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(n)?r=r.slice(1):r=r.slice(1,-1)),gn(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 s;if((s=this.rules.inline.reflink.exec(t))||(s=this.rules.inline.nolink.exec(t))){let n=s[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&mn(t,s[1],n,this.rules))return;let r=(s[2]||s[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[Ye(r)];if(!i){let a=s[0].charAt(0);return{type:"text",raw:a,text:a}}return gn(s,i,s[0],this.lexer,this.rules)}}emStrong(t,e,s=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&s.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!s||this.rules.inline.punctuation.exec(s))){let r=[...n[0]].length-1,i,a,o=r,l=0,c=n[0][0],p=s===c,d=c==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*t.length+r);(n=d.exec(e))!==null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(a=[...i].length,n[3]||n[4]){o+=a;continue}else if(n[5]||n[6]){if(r%3&&!((r+a)%3)){l+=a;continue}if(p)break}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let h=[...n[0]][0].length,u=t.slice(0,r+n.index+h+a);if(Math.min(r,a)%2){let y=u.slice(1,-1);return{type:"em",raw:u,text:y,tokens:this.lexer.inlineTokens(y)}}let f=u.slice(2,-2);return{type:"strong",raw:u,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let s=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(s),r=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return n&&r&&(s=s.substring(1,s.length-1)),{type:"codespan",raw:e[0],text:s}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,s=""){let n=this.rules.inline.delLDelim.exec(t);if(n&&(!n[1]||!s||this.rules.inline.punctuation.exec(s))){let r=[...n[0]].length-1,i,a,o=r,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*t.length+r);(n=l.exec(e))!==null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i||(a=[...i].length,a!==r))continue;if(n[3]||n[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let c=[...n[0]][0].length,p=t.slice(0,r+n.index+c+a),d=p.slice(r,-r);return{type:"del",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let s,n;return e[2]==="@"?(s=e[1],n="mailto:"+s):(s=e[1],n=s),{type:"link",raw:e[0],text:s,href:n,autolink:!0,tokens:[{type:"text",raw:s,text:s}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let s,n;if(e[2]==="@")s=e[0],n="mailto:"+s;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);s=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:s,href:n,autolink:!0,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let s=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:s?e[0]:Sa(e[0]),escaped:s}}}},j=class xs{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||te,this.options.tokenizer=this.options.tokenizer||new Qe,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 s={other:E,block:Je.normal,inline:Ee.normal};this.options.pedantic?(s.block=Je.pedantic,s.inline=Ee.pedantic):this.options.gfm&&(s.block=Je.gfm,this.options.breaks?s.inline=Ee.breaks:s.inline=Ee.gfm),this.tokenizer.rules=s}static get rules(){return{block:Je,inline:Ee}}static lex(e,s){return new xs(s).lex(e)}static lexInline(e,s){return new xs(s).inlineTokens(e)}lex(e){e=e.replace(E.carriageReturn,`
|
|
526
|
-
`),this.blockTokens(e,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let n=this.inlineQueue[s];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,s=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(E.tabCharGlobal," ").replace(E.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(o=>(i=o.call({lexer:this},e,s))?(e=e.substring(i.raw.length),s.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let o=s.at(-1);i.raw.length===1&&o!==void 0?o.raw+=`
|
|
527
|
-
`:s.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let o=s.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
528
|
-
`)?"":`
|
|
529
|
-
`)+i.raw,o.text+=`
|
|
530
|
-
`+i.text,this.inlineQueue.at(-1).src=o.text):s.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let o=s.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
531
|
-
`)?"":`
|
|
532
|
-
`)+i.raw,o.text+=`
|
|
533
|
-
`+i.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},s.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),s.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let o=1/0,l=e.slice(1),c;this.options.extensions.startBlock.forEach(p=>{c=p.call({lexer:this},l),typeof c=="number"&&c>=0&&(o=Math.min(o,c))}),o<1/0&&o>=0&&(a=e.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let o=s.at(-1);n&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
|
|
534
|
-
`)?"":`
|
|
535
|
-
`)+i.raw,o.text+=`
|
|
536
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):s.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let o=s.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
537
|
-
`)?"":`
|
|
538
|
-
`)+i.raw,o.text+=`
|
|
539
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):s.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,s}inline(e,s=[]){return this.inlineQueue.push({src:e,tokens:s}),s}linkInText(e){if(!e.includes("["))return!1;let s=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(s.test(n[0])&&e.charAt(n.index-1)!=="!")return!0;for(let n of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let r=n[0],i=r.lastIndexOf("[");if(!(r.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Ye(r.slice(i+1,-1))))&&!(i>1&&this.linkInText(r.slice(1,i-1))))return!0}return!1}inlineTokens(e,s=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(")");try{return this.#e(e,s)}finally{this.state.linkParenPossible=n}}#e(e,s){let n=e;if(this.tokens.links&&e.includes("[")){let o=this.tokenizer.rules.inline.reflinkSearch,l=c=>{let p=c.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Ye(c.slice(p+1,-1))))return c;if(p>1&&c.charAt(0)!=="!"){let d=c.slice(1,p-1);if(this.linkInText(d))return"["+d.replace(o,l)+"]["+"a".repeat(c.length-p-2)+"]"}return"["+"a".repeat(c.length-2)+"]"};n=n.replace(o,l)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,o=>"+".repeat(o.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(o,l,c)=>{let p=c?c.length:0;return o.slice(0,p)+"["+"a".repeat(o.length-p-2)+"]"}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=""),r=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},e,s))?(e=e.substring(o.raw.length),s.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let c=s.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):s.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),s.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),s.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),s.push(o);continue}let l=e;if(this.options.extensions?.startInline){let c=1/0,p=e.slice(1),d;this.options.extensions.startInline.forEach(h=>{d=h.call({lexer:this},p),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(i=o.raw.slice(-1)),r=!0;let c=s.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):s.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return s}infiniteLoopError(e){let s="Infinite loop on byte: "+e;if(this.options.silent)console.error(s);else throw new Error(s)}},Xe=class{options;parser;constructor(t){this.options=t||te}space(t){return""}code({text:t,lang:e,escaped:s}){let n=(e||"").match(E.notSpaceStart)?.[0],r=t?t.replace(E.endingNewline,"")+`
|
|
540
|
-
`:"";return n?'<pre><code class="language-'+z(n)+'">'+(s?r:z(r,!0))+`</code></pre>
|
|
541
|
-
`:"<pre><code>"+(s?r:z(r,!0))+`</code></pre>
|
|
542
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
543
|
-
${this.parser.parse(t)}</blockquote>
|
|
544
|
-
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
545
|
-
`}hr(t){return`<hr>
|
|
546
|
-
`}list(t){let e=t.ordered,s=t.start,n="";for(let a=0;a<t.items.length;a++){let o=t.items[a];n+=this.listitem(o)}let r=e?"ol":"ul",i=e&&s!==1?' start="'+s+'"':"";return"<"+r+i+`>
|
|
547
|
-
`+n+"</"+r+`>
|
|
548
|
-
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
549
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
550
|
-
`}table(t){let e="",s="";for(let r=0;r<t.header.length;r++)s+=this.tablecell(t.header[r]);e+=this.tablerow({text:s});let n="";for(let r=0;r<t.rows.length;r++){let i=t.rows[r];s="";for(let a=0;a<i.length;a++)s+=this.tablecell(i[a]);n+=this.tablerow({text:s})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
551
|
-
<thead>
|
|
552
|
-
`+e+`</thead>
|
|
553
|
-
`+n+`</table>
|
|
554
|
-
`}tablerow({text:t}){return`<tr>
|
|
555
|
-
${t}</tr>
|
|
556
|
-
`}tablecell(t){let e=this.parser.parseInline(t.tokens),s=t.header?"th":"td";return(t.align?`<${s} align="${t.align}">`:`<${s}>`)+e+`</${s}>
|
|
557
|
-
`}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>${z(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:s,tokens:n,autolink:r}){let i=r?z(s,!0):this.parser.parseInline(n),a=dn(t);if(a===null)return i;t=z(a,r);let o='<a href="'+t+'"';return e&&(o+=' title="'+z(e)+'"'),o+=">"+i+"</a>",o}image({href:t,title:e,text:s,tokens:n}){n&&(s=this.parser.parseInline(n,this.parser.textRenderer));let r=dn(t);if(r===null)return z(s);t=r;let i=`<img src="${z(t)}" alt="${z(s)}"`;return e&&(i+=` title="${z(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:z(t.text)}},Pt=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}},I=class vs{options;renderer;textRenderer;constructor(e){this.options=e||te,this.options.renderer=this.options.renderer||new Xe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Pt}static parse(e,s){return new vs(s).parse(e)}static parseInline(e,s){return new vs(s).parseInline(e)}parse(e){this.renderer.parser=this;let s="";for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let a=r,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){s+=o||"";continue}}let i=r;switch(i.type){case"space":{s+=this.renderer.space(i);break}case"hr":{s+=this.renderer.hr(i);break}case"heading":{s+=this.renderer.heading(i);break}case"code":{s+=this.renderer.code(i);break}case"table":{s+=this.renderer.table(i);break}case"blockquote":{s+=this.renderer.blockquote(i);break}case"list":{s+=this.renderer.list(i);break}case"checkbox":{s+=this.renderer.checkbox(i);break}case"html":{s+=this.renderer.html(i);break}case"def":{s+=this.renderer.def(i);break}case"paragraph":{s+=this.renderer.paragraph(i);break}case"text":{s+=this.renderer.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}parseInline(e,s=this.renderer){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){n+=o||"";continue}}let a=i;switch(a.type){case"escape":{n+=s.text(a);break}case"html":{n+=s.html(a);break}case"link":{n+=s.link(a);break}case"image":{n+=s.image(a);break}case"checkbox":{n+=s.checkbox(a);break}case"strong":{n+=s.strong(a);break}case"em":{n+=s.em(a);break}case"codespan":{n+=s.codespan(a);break}case"br":{n+=s.br(a);break}case"del":{n+=s.del(a);break}case"text":{n+=s.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}},_e=class{options;block;constructor(t){this.options=t||te}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?j.lex:j.lexInline}provideParser(t=this.block){return t?I.parse:I.parseInline}},kn=class{defaults=At();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=I;Renderer=Xe;TextRenderer=Pt;Lexer=j;Tokenizer=Qe;Hooks=_e;constructor(...t){this.use(...t)}walkTokens(t,e){let s=[];for(let n of t)switch(s=s.concat(e.call(this,n)),n.type){case"table":{let r=n;for(let i of r.header)s=s.concat(this.walkTokens(i.tokens,e));for(let i of r.rows)for(let a of i)s=s.concat(this.walkTokens(a.tokens,e));break}case"list":{let r=n;s=s.concat(this.walkTokens(r.items,e));break}default:{let r=n;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let a=r[i].flat(1/0);s=s.concat(this.walkTokens(a,e))}):r.tokens&&(s=s.concat(this.walkTokens(r.tokens,e)))}}return s}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(s=>{let n={...s};if(n.async=this.defaults.async||n.async||!1,s.extensions&&(s.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(...a){let o=r.renderer.apply(this,a);return o===!1&&(o=i.apply(this,a)),o}: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)}),n.extensions=e),s.renderer){let r=this.defaults.renderer||new Xe(this.defaults);for(let i in s.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,o=s.renderer[a],l=r[a];r[a]=(...c)=>{let p=o.apply(r,c);return p===!1&&(p=l.apply(r,c)),p||""}}n.renderer=r}if(s.tokenizer){let r=this.defaults.tokenizer||new Qe(this.defaults);for(let i in s.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,o=s.tokenizer[a],l=r[a];r[a]=(...c)=>{let p=o.apply(r,c);return p===!1&&(p=l.apply(r,c)),p}}n.tokenizer=r}if(s.hooks){let r=this.defaults.hooks||new _e;for(let i in s.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,o=s.hooks[a],l=r[a];_e.passThroughHooks.has(i)?r[a]=c=>{if(this.defaults.async&&_e.passThroughHooksRespectAsync.has(i))return(async()=>{let d=await o.call(r,c);return l.call(r,d)})();let p=o.call(r,c);return l.call(r,p)}:r[a]=(...c)=>{if(this.defaults.async)return(async()=>{let d=await o.apply(r,c);return d===!1&&(d=await l.apply(r,c)),d})();let p=o.apply(r,c);return p===!1&&(p=l.apply(r,c)),p}}n.hooks=r}if(s.walkTokens){let r=this.defaults.walkTokens,i=s.walkTokens;n.walkTokens=function(a){let o=[];return o.push(i.call(this,a)),r&&(o=o.concat(r.call(this,a))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return j.lex(t,e??this.defaults)}parser(t,e){return I.parse(t,e??this.defaults)}parseMarkdown(t){return(e,s)=>{let n={...s},r={...this.defaults,...n},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&n.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 a=r.hooks?await r.hooks.preprocess(e):e,o=await(r.hooks?await r.hooks.provideLexer(t):t?j.lex:j.lexInline)(a,r),l=r.hooks?await r.hooks.processAllTokens(o):o;r.walkTokens&&await Promise.all(this.walkTokens(l,r.walkTokens));let c=await(r.hooks?await r.hooks.provideParser(t):t?I.parse:I.parseInline)(l,r);return r.hooks?await r.hooks.postprocess(c):c})().catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let a=(r.hooks?r.hooks.provideLexer(t):t?j.lex:j.lexInline)(e,r);r.hooks&&(a=r.hooks.processAllTokens(a)),r.walkTokens&&this.walkTokens(a,r.walkTokens);let o=(r.hooks?r.hooks.provideParser(t):t?I.parse:I.parseInline)(a,r);return r.hooks&&(o=r.hooks.postprocess(o)),o}catch(a){return i(a)}}}onError(t,e){return s=>{if(s.message+=`
|
|
558
|
-
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+z(s.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(s);throw s}}},ne=new kn;function $(t,e){return ne.parse(t,e)}$.options=$.setOptions=function(t){return ne.setOptions(t),$.defaults=ne.defaults,Js($.defaults),$},$.getDefaults=At,$.defaults=te;function Ca(...t){return ne.use(...t),$.defaults=ne.defaults,Js($.defaults),$}$.use=Ca,$.walkTokens=function(t,e){return ne.walkTokens(t,e)},$.parseInline=ne.parseInline,$.Parser=I,$.parser=I.parse,$.Renderer=Xe,$.TextRenderer=Pt,$.Lexer=j,$.lexer=j.lex,$.Tokenizer=Qe,$.Hooks=_e,$.parse=$,$.options,$.setOptions,$.walkTokens,$.parseInline,I.parse,j.lex;const Ta={"&":"&","<":"<",">":">",'"':""","'":"'"},re=t=>t.replace(/[&<>"']/g,e=>Ta[e]??e),Ea=new Set(["http","https","mailto"]),bn=t=>{const e=t.replace(/[\u0000- \u007f]/g,""),s=/^([a-z][a-z0-9+.-]*):/i.exec(e)?.[1];return s===void 0||Ea.has(s.toLowerCase())},_a=t=>/^https?:/i.test(t.trim()),Ra=new kn({gfm:!0,breaks:!0,renderer:{html({text:t}){return re(t)},link({href:t,title:e,tokens:s}){const n=this.parser.parseInline(s);if(!bn(t))return n;const r=e?` title="${re(e)}"`:"",i=_a(t)?' target="_blank" rel="noopener noreferrer"':"";return`<a href="${re(t)}"${r}${i}>${n}</a>`},image({href:t,title:e,text:s}){if(!bn(t))return re(s);const n=e?` title="${re(e)}"`:"";return`<img src="${re(t)}" alt="${re(s)}"${n}>`}}}),xn=t=>Ra.parse(t,{async:!1}),La=Ze({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 vn extends F{static{this.styles=[Ve,Gs,B`
|
|
559
|
-
/* One atomic box in both states, so the text can be edited where it sits:
|
|
560
|
-
while editing, the text stays (hidden) underneath and keeps sizing the
|
|
561
|
-
box, and the field lies over it. Starting an edit moves nothing; the
|
|
562
|
-
box grows only as the draft does. */
|
|
563
|
-
:host {
|
|
564
|
-
display: inline-block;
|
|
565
|
-
max-width: 100%;
|
|
566
|
-
vertical-align: baseline;
|
|
567
|
-
/* Inherit the surrounding type scale instead of forcing the chrome size:
|
|
568
|
-
an inline edit inside a 17px heading must look like a 17px heading.
|
|
569
|
-
Color comes along too, so an edit on a colored card stays legible. */
|
|
570
|
-
font-family: inherit;
|
|
571
|
-
font-size: inherit;
|
|
572
|
-
font-weight: inherit;
|
|
573
|
-
line-height: inherit;
|
|
574
|
-
color: inherit;
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
.box {
|
|
578
|
-
position: relative;
|
|
579
|
-
display: block;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
/* No vertical padding or border: the box is exactly the lines of text.
|
|
583
|
-
The underline and ring are shadows, which never move the layout. */
|
|
584
|
-
.view {
|
|
585
|
-
display: block;
|
|
586
|
-
padding: 0 4px;
|
|
587
|
-
border-radius: var(--dpk-radius-xs);
|
|
588
|
-
white-space: pre-wrap;
|
|
589
|
-
overflow-wrap: anywhere;
|
|
590
|
-
cursor: text;
|
|
591
|
-
transition:
|
|
592
|
-
background 140ms var(--dpk-ease),
|
|
593
|
-
box-shadow 140ms var(--dpk-ease);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
.view:hover {
|
|
597
|
-
background: var(--dpk-blue-soft);
|
|
598
|
-
box-shadow:
|
|
599
|
-
inset 0 -1px 0 var(--dpk-blue),
|
|
600
|
-
inset 0 0 0 1px color-mix(in srgb, var(--dpk-blue) 22%, transparent);
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
/* Formatted text keeps its own line breaks: a break in the source is a <br>. */
|
|
604
|
-
.view.dpk-prose {
|
|
605
|
-
white-space: normal;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
.view[data-empty='true'] {
|
|
609
|
-
box-shadow: inset 0 -1px 0 var(--dpk-rule-strong);
|
|
610
|
-
color: var(--dpk-ink-faint);
|
|
611
|
-
font-style: italic;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
.view[data-empty='true']:hover {
|
|
615
|
-
box-shadow: inset 0 -1px 0 var(--dpk-blue);
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
.view[aria-hidden='true'] {
|
|
619
|
-
visibility: hidden;
|
|
620
|
-
transition: none;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
.field {
|
|
624
|
-
position: absolute;
|
|
625
|
-
inset: 0;
|
|
626
|
-
box-sizing: border-box;
|
|
627
|
-
width: 100%;
|
|
628
|
-
height: 100%;
|
|
629
|
-
min-width: 0;
|
|
630
|
-
margin: 0;
|
|
631
|
-
padding: 0 4px;
|
|
632
|
-
border: none;
|
|
633
|
-
border-radius: var(--dpk-radius-xs);
|
|
634
|
-
outline: none;
|
|
635
|
-
background: var(--dpk-paper-raised);
|
|
636
|
-
box-shadow:
|
|
637
|
-
inset 0 0 0 1px var(--dpk-blue),
|
|
638
|
-
var(--dpk-focus);
|
|
639
|
-
font: inherit;
|
|
640
|
-
line-height: inherit;
|
|
641
|
-
letter-spacing: inherit;
|
|
642
|
-
color: inherit;
|
|
643
|
-
white-space: pre-wrap;
|
|
644
|
-
overflow-wrap: anywhere;
|
|
645
|
-
overflow: hidden;
|
|
646
|
-
resize: none;
|
|
647
|
-
animation: dpk-inline-edit-in 140ms var(--dpk-ease) backwards;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
.field::placeholder {
|
|
651
|
-
color: var(--dpk-ink-faint);
|
|
652
|
-
font-style: italic;
|
|
653
|
-
opacity: 1;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
@keyframes dpk-inline-edit-in {
|
|
657
|
-
from {
|
|
658
|
-
opacity: 0;
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
:host([truncate]) .view {
|
|
663
|
-
overflow: hidden;
|
|
664
|
-
text-overflow: ellipsis;
|
|
665
|
-
white-space: pre;
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
/* Wrapped, it keeps --dpk-inline-edit-lines lines; the hidden text under a
|
|
669
|
-
field still sizes the box to the whole draft. */
|
|
670
|
-
:host([truncate][wrap]) .view:not([aria-hidden='true']) {
|
|
671
|
-
display: -webkit-box;
|
|
672
|
-
-webkit-box-orient: vertical;
|
|
673
|
-
-webkit-line-clamp: var(--dpk-inline-edit-lines, 3);
|
|
674
|
-
white-space: pre-wrap;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
/* seamless: no field chrome at all — the text is edited where it sits. */
|
|
678
|
-
:host([seamless]) .view,
|
|
679
|
-
:host([seamless]) .field {
|
|
680
|
-
padding: 0;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
:host([seamless]) .field {
|
|
684
|
-
border-radius: 0;
|
|
685
|
-
background: transparent;
|
|
686
|
-
box-shadow: none;
|
|
687
|
-
}
|
|
688
|
-
`]}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="";#r=0;#n=new $t(this);connectedCallback(){super.connectedCallback(),this.#r+=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"),s=this.renderRoot,n=s instanceof ShadowRoot?s.activeElement:document.activeElement;e&&n!==e&&(e.focus(),e.setSelectionRange(0,e.value.length,"backward"),e.scrollLeft=0,e.scrollTop=0)}render(){const e=La(this.#n.locale),s=this.placeholder||e.unset,{editing:n}=this,r=n?this.#e:this.value,i=r===""?s:n&&r.endsWith(`
|
|
689
|
-
`)?`${r}\u200B`:r;return this.markdown&&!n&&r!==""?k`<span class="box"
|
|
690
|
-
><div
|
|
691
|
-
class="view dpk-prose"
|
|
692
|
-
data-empty="false"
|
|
693
|
-
role="button"
|
|
694
|
-
tabindex="0"
|
|
695
|
-
title=${e.clickToEdit}
|
|
696
|
-
@click=${this.#s}
|
|
697
|
-
@keydown=${this.#t}
|
|
698
|
-
>
|
|
699
|
-
${Hs(xn(r))}
|
|
700
|
-
</div></span
|
|
701
|
-
>`:k`<span class="box"
|
|
702
|
-
><span
|
|
703
|
-
class="view"
|
|
704
|
-
data-empty=${String(r==="")}
|
|
705
|
-
aria-hidden=${n?"true":g}
|
|
706
|
-
role=${n?g:"button"}
|
|
707
|
-
tabindex=${n?g:"0"}
|
|
708
|
-
title=${n?g:this.truncate&&r!==""?r:e.clickToEdit}
|
|
709
|
-
@click=${this.#s}
|
|
710
|
-
@keydown=${this.#t}
|
|
711
|
-
>${i}</span
|
|
712
|
-
>${n?this.#i(this.label||this.placeholder||e.edit,s):g}</span
|
|
713
|
-
>`}#i(e,s){return this.multiline||this.wrap?k`<textarea
|
|
714
|
-
class="field"
|
|
715
|
-
rows="1"
|
|
716
|
-
.value=${vt(this.#e)}
|
|
717
|
-
placeholder=${s}
|
|
718
|
-
aria-label=${e}
|
|
719
|
-
@input=${this.#a}
|
|
720
|
-
@keydown=${this.#l}
|
|
721
|
-
@blur=${this.#o}
|
|
722
|
-
></textarea>`:k`<input
|
|
723
|
-
class="field"
|
|
724
|
-
.value=${vt(this.#e)}
|
|
725
|
-
placeholder=${s}
|
|
726
|
-
aria-label=${e}
|
|
727
|
-
@input=${this.#a}
|
|
728
|
-
@keydown=${this.#l}
|
|
729
|
-
@blur=${this.#o}
|
|
730
|
-
/>`}#s=e=>{e.composedPath().some(s=>s instanceof HTMLAnchorElement)||(e.stopPropagation(),!this.editing&&(this.#e=this.value,this.editing=!0))};#t=e=>{e.isComposing||this.editing||e.target instanceof HTMLAnchorElement||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.editing=!0)};#a=e=>{const s=de(e.target,HTMLInputElement)??de(e.target,HTMLTextAreaElement);s!==null&&(this.#e=s.value,this.requestUpdate())};#l=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.#d())}};#o=e=>{const s=e.currentTarget;if(!(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement))return;const n=this.#r,{selectionStart:r,selectionEnd:i}=s;queueMicrotask(()=>{!this.isConnected||!this.editing||(n!==this.#r?(s.focus(),s.setSelectionRange(r,i)):this.#d())})};#d=()=>{if(!this.editing)return;this.editing=!1;const s=(this.wrap?this.#e.replace(/\r?\n/g," "):this.#e).trim();s!==this.value&&this.dispatchEvent(new CustomEvent("dpk-commit",{detail:{value:s},bubbles:!0,composed:!0}))}}const za=()=>{customElements.get("dpk-component-inline-edit")||customElements.define("dpk-component-inline-edit",vn)},Pa={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Ot(t){return Pa}let Oa;function Ma(t){return Oa?.get(t)}let ja;function Ia(t){return ja?.get(t)}let qa;function Na(t,e){return qa?.get(t)?.get(e)}function Re(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 A(t,e,s,n,r){const i=r&&"input"in r?r.input:s.value,a=r?.expected??t.expects??null,o=r?.received??Re(i),l={kind:t.kind,type:t.type,input:i,expected:a,received:o,message:`Invalid ${e}: ${a?`Expected ${a} but r`:"R"}eceived ${o}`,requirement:t.requirement,path:r?.path,issues:r?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=t.kind==="schema",p=r?.message??t.message??Na(t.reference,l.lang)??(c?Ia(l.lang):null)??n.message??Ma(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),c&&(s.typed=!1),s.issues?s.issues.push(l):s.issues=[l]}function Da(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function Ua(t,e){return Object.prototype.hasOwnProperty.call(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Mt(t,e){const s=[...new Set(t)];return s.length>1?`(${s.join(` ${e} `)})`:s[0]??"never"}function _(t){return t["~standard"]={version:1,vendor:"valibot",validate:e=>t["~run"]({value:e},Ot())},t}var Ba=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function yn(t,e){return{kind:"validation",type:"check",reference:yn,async:!1,expects:null,requirement:t,message:e,"~run"(s,n){return s.typed&&!this.requirement(s.value)&&A(this,"input",s,n),s}}}function wn(t){return{kind:"validation",type:"finite",reference:wn,async:!1,expects:null,requirement:Number.isFinite,message:t,"~run"(e,s){return e.typed&&!this.requirement(e.value)&&A(this,"finite",e,s),e}}}function $n(t){return{kind:"validation",type:"integer",reference:$n,async:!1,expects:null,requirement:Number.isInteger,message:t,"~run"(e,s){return e.typed&&!this.requirement(e.value)&&A(this,"integer",e,s),e}}}function w(t,e){return{kind:"validation",type:"min_length",reference:w,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(s,n){return s.typed&&s.value.length<this.requirement&&A(this,"length",s,n,{received:`${s.value.length}`}),s}}}function Sn(t,e){return{kind:"validation",type:"min_value",reference:Sn,async:!1,expects:`>=${t instanceof Date?t.toJSON():Re(t)}`,requirement:t,message:e,"~run"(s,n){return s.typed&&!(s.value>=this.requirement)&&A(this,"value",s,n,{received:s.value instanceof Date?s.value.toJSON():Re(s.value)}),s}}}function ie(t,e){return{kind:"validation",type:"regex",reference:ie,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(s,n){return s.typed&&!this.requirement.test(s.value)&&A(this,"format",s,n),s}}}function jt(){return{kind:"transformation",type:"trim",reference:jt,async:!1,"~run"(t){return t.value=t.value.trim(),t}}}function An(t){return{kind:"validation",type:"url",reference:An,async:!1,expects:null,requirement(e){try{return URL.canParse?URL.canParse(e):(new URL(e),!0)}catch{return!1}},message:t,"~run"(e,s){return e.typed&&!this.requirement(e.value)&&A(this,"URL",e,s),e}}}const Cn={abortEarly:!0};function Tn(t,e,s){return typeof t.fallback=="function"?t.fallback(e,s):t.fallback}function et(t,e,s){return typeof t.default=="function"?t.default(e,s):t.default}function Ha(t,e){return!t["~run"]({value:e},Cn).issues}function Z(t,e){return _({kind:"schema",type:"array",reference:Z,expects:"Array",async:!1,item:t,message:e,"~run"(s,n){const r=s.value;if(Array.isArray(r)){s.typed=!0,s.value=[];for(let i=0;i<r.length;i++){const a=r[i],o=this.item["~run"]({value:a},n);if(o.issues){const l={type:"array",origin:"value",input:r,key:i,value:a};for(const c of o.issues)c.path?c.path.unshift(l):c.path=[l],s.issues?.push(c);if(s.issues||(s.issues=o.issues),n.abortEarly){s.typed=!1;break}}o.typed||(s.typed=!1),s.value.push(o.value)}}else A(this,"type",s,n);return s}})}function En(t){return _({kind:"schema",type:"boolean",reference:En,expects:"boolean",async:!1,message:t,"~run"(e,s){return typeof e.value=="boolean"?e.typed=!0:A(this,"type",e,s),e}})}function P(t,e){return _({kind:"schema",type:"exact_optional",reference:P,expects:t.expects,async:!1,wrapped:t,default:e,"~run"(s,n){return this.wrapped["~run"](s,n)}})}function _n(t){return _({kind:"schema",type:"lazy",reference:_n,expects:"unknown",async:!1,getter:t,"~run"(e,s){return this.getter(e.value)["~run"](e,s)}})}function ue(t,e){return _({kind:"schema",type:"literal",reference:ue,expects:Re(t),async:!1,literal:t,message:e,"~run"(s,n){return Da(s.value,this.literal)?s.typed=!0:A(this,"type",s,n),s}})}function Rn(t,e){return _({kind:"schema",type:"nullable",reference:Rn,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,"~run"(s,n){return s.value===null&&(this.default!==void 0&&(s.value=et(this,s,n)),s.value===null)?(s.typed=!0,s):this.wrapped["~run"](s,n)}})}function Ln(t){return _({kind:"schema",type:"number",reference:Ln,expects:"number",async:!1,message:t,"~run"(e,s){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:A(this,"type",e,s),e}})}function T(t,e){return _({kind:"schema",type:"object",reference:T,expects:"Object",async:!1,entries:t,message:e,"~run"(s,n){const r=s.value;if(r&&typeof r=="object"){s.typed=!0,s.value={};for(const i in this.entries){const a=this.entries[i];if(i in r||(a.type==="exact_optional"||a.type==="optional"||a.type==="nullish")&&a.default!==void 0){const o=i in r?r[i]:et(a),l=a["~run"]({value:o},n);if(l.issues){const c={type:"object",origin:"value",input:r,key:i,value:o};for(const p of l.issues)p.path?p.path.unshift(c):p.path=[c],s.issues?.push(p);if(s.issues||(s.issues=l.issues),n.abortEarly){s.typed=!1;break}}l.typed||(s.typed=!1),s.value[i]=l.value}else if(a.fallback!==void 0)s.value[i]=Tn(a);else if(a.type!=="exact_optional"&&a.type!=="optional"&&a.type!=="nullish"&&(A(this,"key",s,n,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]}),n.abortEarly))break}}else A(this,"type",s,n);return s}})}function Le(t,e){return _({kind:"schema",type:"optional",reference:Le,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,"~run"(s,n){return s.value===void 0&&(this.default!==void 0&&(s.value=et(this,s,n)),s.value===void 0)?(s.typed=!0,s):this.wrapped["~run"](s,n)}})}function tt(t,e){return _({kind:"schema",type:"picklist",reference:tt,expects:Mt(t.map(Re),"|"),async:!1,options:t,message:e,"~run"(s,n){return this.options.includes(s.value)?s.typed=!0:A(this,"type",s,n),s}})}function st(t,e,s){return _({kind:"schema",type:"record",reference:st,expects:"Object",async:!1,key:t,value:e,message:s,"~run"(n,r){const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const a in i)if(Ua(i,a)){const o=i[a],l=this.key["~run"]({value:a},r);if(l.issues){const p={type:"object",origin:"key",input:i,key:a,value:o};for(const d of l.issues)d.path=[p],n.issues?.push(d);if(n.issues||(n.issues=l.issues),r.abortEarly){n.typed=!1;break}}const c=this.value["~run"]({value:o},r);if(c.issues){const p={type:"object",origin:"value",input:i,key:a,value:o};for(const d of c.issues)d.path?d.path.unshift(p):d.path=[p],n.issues?.push(d);if(n.issues||(n.issues=c.issues),r.abortEarly){n.typed=!1;break}}(!l.typed||!c.typed)&&(n.typed=!1),l.typed&&(n.value[l.value]=c.value)}}else A(this,"type",n,r);return n}})}function fe(t,e){return _({kind:"schema",type:"strict_object",reference:fe,expects:"Object",async:!1,entries:t,message:e,"~run"(s,n){const r=s.value;if(r&&typeof r=="object"){s.typed=!0,s.value={};for(const i in this.entries){const a=this.entries[i];if(i in r||(a.type==="exact_optional"||a.type==="optional"||a.type==="nullish")&&a.default!==void 0){const o=i in r?r[i]:et(a),l=a["~run"]({value:o},n);if(l.issues){const c={type:"object",origin:"value",input:r,key:i,value:o};for(const p of l.issues)p.path?p.path.unshift(c):p.path=[c],s.issues?.push(p);if(s.issues||(s.issues=l.issues),n.abortEarly){s.typed=!1;break}}l.typed||(s.typed=!1),s.value[i]=l.value}else if(a.fallback!==void 0)s.value[i]=Tn(a);else if(a.type!=="exact_optional"&&a.type!=="optional"&&a.type!=="nullish"&&(A(this,"key",s,n,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]}),n.abortEarly))break}if(!s.issues||!n.abortEarly){for(const i in r)if(!Object.prototype.hasOwnProperty.call(this.entries,i)){A(this,"key",s,n,{input:i,expected:"never",path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]});break}}}else A(this,"type",s,n);return s}})}function m(t){return _({kind:"schema",type:"string",reference:m,expects:"string",async:!1,message:t,"~run"(e,s){return typeof e.value=="string"?e.typed=!0:A(this,"type",e,s),e}})}function zn(t){let e;if(t)for(const s of t)if(e)for(const n of s.issues)e.push(n);else e=s.issues;return e}function It(t,e){return _({kind:"schema",type:"union",reference:It,expects:Mt(t.map(s=>s.expects),"|"),async:!1,options:t,message:e,"~run"(s,n){let r,i,a;for(const o of this.options){const l=o["~run"]({value:s.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{r=l;break}else a?a.push(l):a=[l]}if(r)return r;if(i){if(i.length===1)return i[0];A(this,"type",s,n,{issues:zn(i)}),s.typed=!0}else{if(a?.length===1)return a[0];A(this,"type",s,n,{issues:zn(a)})}return s}})}function V(){return _({kind:"schema",type:"unknown",reference:V,expects:"unknown",async:!1,"~run"(t){return t.typed=!0,t}})}function Pn(t,e,s){return _({kind:"schema",type:"variant",reference:Pn,expects:"Object",async:!1,key:t,options:e,message:s,"~run"(n,r){const i=n.value;if(i&&typeof i=="object"){let a,o=0,l=this.key,c=[];const p=(d,h)=>{for(const u of d.options){if(u.type==="variant")p(u,new Set(h).add(u.key));else{let f=!0,y=0;for(const x of h){const R=u.entries[x];if(x in i?R["~run"]({typed:!1,value:i[x]},Cn).issues:R.type!=="exact_optional"&&R.type!=="optional"&&R.type!=="nullish"){f=!1,l!==x&&(o<y||o===y&&x in i&&!(l in i))&&(o=y,l=x,c=[]),l===x&&c.push(u.entries[x].expects);break}y++}if(f){const x=u["~run"]({value:i},r);(!a||!a.typed&&x.typed)&&(a=x)}}if(a&&!a.issues)break}};if(p(this,new Set([this.key])),a)return a;A(this,"type",n,r,{input:i[l],expected:Mt(c,"|"),path:[{type:"object",origin:"value",input:i,key:l,value:i[l]}]})}else A(this,"type",n,r);return n}})}function qt(t,e,s){const n=t["~run"]({value:e},Ot());if(n.issues)throw new Ba(n.issues);return n.value}function v(...t){return _({...t[0],pipe:t,"~run"(e,s){for(const n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!s.abortEarly&&!s.abortPipeEarly)&&(e=n["~run"](e,s))}return e}})}function S(t,e,s){const n=t["~run"]({value:e},Ot());return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const nt=T({type:v(m(),w(1)),id:v(m(),w(1))}),Fa=v(m(),w(1),ie(/^[A-Za-z0-9_-]+$/,'ids may only contain letters, digits, "_" and "-" (a "." builds a path)')),Ka=(t,e)=>{if(e===1)return t.includes(".")?null:[t];const s=t.split(".");return s.length===e&&s.every(n=>n.length>0)?s:null},ae=T({id:v(m(),w(1)),type:v(m(),w(1)),target:nt,payload:V(),note:P(m()),createdAt:v(m(),w(1))}),Wa=(t,e,s,n={})=>{const r=T({id:v(m(),w(1)),type:ue(t),target:nt,payload:s,note:P(m()),createdAt:v(m(),w(1))}),i=a=>{const o=S(ae,a);if(!o.success||o.output.type!==t)return null;const l=S(s,a.payload);return l.success?{id:o.output.id,type:t,target:o.output.target,payload:l.output,...o.output.note===void 0?{}:{note:o.output.note},createdAt:o.output.createdAt}:null};return{schema:r,mode:n.mode??"patch",targetType:e,actionType:t,payloadSchema:s,parse:i,...n.dedupeKey?{dedupeKey:n.dedupeKey}:{}}},Za=(t,e)=>{const s=rt(t,e.type);if(s===void 0)return null;const n=s.parse(e);return n===null?null:n},Va=(t,e)=>{const s=S(t.payloadSchema,e.payload);if(!s.success)throw new Error(`invalid payload for action "${e.type}"`);return s.output},rt=(t,e)=>Object.hasOwn(t,e)?t[e]:void 0,Ga=t=>{throw new Error(`unhandled action: ${JSON.stringify(t)}`)},Ja=T({id:v(m(),w(1))}),Ya=t=>{const e=S(Ja,t.payload);return`${t.type}|${e.success?e.output.id:JSON.stringify(t.payload)}`},M=t=>`${t.type}:${t.id}`,On=t=>{const e=t.indexOf(":");return e<=0?{type:"unknown",id:t}:{type:t.slice(0,e),id:t.slice(e+1)}},Nt=(t,e)=>typeof t=="string"?On(t.includes(":")?t:`${e}:${t}`):{type:t.type,id:t.id},Qa=(t,e)=>t.type===e.type&&t.id===e.id,Mn=t=>{const e=t.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return e.length>0?e:"item"},Xa=(t,e)=>{const s=Mn(t),n=new Set(e);if(!n.has(s))return s;for(let r=2;r<1e3;r+=1){const i=`${s}-${r}`;if(!n.has(i))return i}return`${s}-${Math.random().toString(36).slice(2,8)}`},jn=()=>{const t=globalThis.crypto;return t?.randomUUID?t.randomUUID():`a-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`},L="comment",oe=t=>{const[e]=t;return{path:e?.path?.map(s=>String(s.key)).join(".")??"",message:e?.message??"invalid action"}},In=T({type:v(m(),w(1)),target:It([v(m(),w(1)),nt]),payload:Le(V()),note:P(m()),id:P(v(m(),w(1))),createdAt:P(v(m(),w(1)))}),eo=(t,e)=>{const s=S(In,t);if(!s.success)return{ok:!1,issue:oe(s.issues)};const n=s.output,r=Nt(n.target,e.targetType),i={id:n.id??jn(),type:n.type,target:r,payload:n.payload??{},...n.note===void 0?{}:{note:n.note},createdAt:n.createdAt??new Date().toISOString()},a=S(e.schema,i);if(!a.success)return{ok:!1,issue:oe(a.issues)};const o=S(ae,a.output);return o.success?{ok:!0,action:o.output}:{ok:!1,issue:oe(o.issues)}},Dt=(t,e)=>e.dedupeKey?e.dedupeKey(t):e.mode!=="patch"?null:`${t.type}|${M(t.target)}`,Ut=(t,e,s)=>{const n=Dt(e,s);if(n===null)return[...t,e];const r=t.at(-1);return!r||Dt(r,s)!==n||!to(r,e)?[...t,e]:[...t.slice(0,-1),e]},to=(t,e)=>Qa(t.target,e.target),Bt=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),qn=T({id:v(m(),w(1)),type:ue(L),target:T({type:v(m(),w(1)),id:v(m(),w(1))}),payload:T({body:v(m(),w(1))}),note:P(m()),createdAt:v(m(),w(1))}),Ht={schema:qn,mode:"append",targetType:"page"},so=T({body:m()}),ze=t=>{const e=S(so,t.payload);return e.success?e.output.body:""},Ft="element",Nn=v(m(),ie(/^[A-Z][A-Z0-9_]*$/,"component action types are CONSTANT_CASE")),Dn=st(m(),V()),no=T({type:ue(Ft),id:v(m(),ie(/^[^/]+\/.+/,"component references start with a provider id"))}),ro=T({id:v(m(),w(1)),type:Nn,target:no,payload:Dn,note:P(m()),createdAt:v(m(),w(1))}),io={schema:ro,mode:"sequence",targetType:Ft},ao=fe({type:Nn,target:v(m(),ie(/^element:[^/]+\/.+/)),payload:Le(Dn,{})}),Un=fe({id:v(m(),w(1)),title:v(m(),w(1)),summary:P(m()),tone:P(tt(["create","update","delete","move","meta"])),stale:P(tt(["unsupported-action-type","target-missing","constraint-violated"]))}),Kt=t=>{if(t.type!==Ft)return null;const e=t.id.indexOf("/");if(e<=0)return null;try{return decodeURIComponent(t.id.slice(0,e))}catch{return null}},q=t=>t.type!==L&&Kt(t.target)!==null,oo=(t,e)=>t.filter(s=>q(s)&&Kt(s.target)===e),Bn=(t,e)=>{const s=new Map(t.flatMap(n=>q(n)?[[n.id,Kt(n.target)]]:[]));return new Map(e.flatMap(n=>n.results.flatMap(r=>s.get(r.id)===n.id?[[r.id,r]]:[])))},Wt=Object.freeze({}),Zt=t=>{const e=t.startsWith("#")?t.slice(1):t;if(e.length===0)return Wt;const s=new URLSearchParams(e.startsWith("?")?e.slice(1):e),n={};for(const[r,i]of s)r.length>0&&i.length>0&&(n[r]=i);return n},ge=t=>{const e=new URLSearchParams;for(const n of Object.keys(t).sort((r,i)=>r<i?-1:r>i?1:0)){const r=t[n];r!=null&&r!==""&&e.set(n,r)}const s=e.toString();return s.length===0?"":`#${s}`},Vt=(t,e,s=[])=>{const n={...t},r=Object.keys(e).map(i=>s.indexOf(i)).filter(i=>i>=0);if(r.length>0)for(const i of s.slice(Math.min(...r)+1))Object.hasOwn(e,i)||delete n[i];for(const[i,a]of Object.entries(e))a==null||a===""?delete n[i]:n[i]=a;return n},lo=(t,e="json")=>`\`\`\`${e}
|
|
731
|
-
${t}
|
|
732
|
-
\`\`\``,co=t=>JSON.stringify({type:t.type,target:t.target,payload:t.payload,...t.note===void 0?{}:{note:t.note}},null,2),Gt=(t,e,s)=>{const{actions:n,state:r}=t,i=new Set(t.stale.map(p=>p.action.id)),a=n.filter(p=>!i.has(p.id)),o=a.filter(p=>p.type===L),l=a.filter(p=>p.type!==L),c=[];if(c.push(`# Review draft \u2014 ${e.label}`),c.push(""),c.push(`- template: \`${e.name}\``),c.push(`- framework: \`dev-process-kit@${s}\``),c.push(`- navigation: \`${ge(t.navigation)||"(none)"}\``),c.push(`- pending: ${l.length} change(s), ${o.length} comment(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(q)&&(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(""),o.length>0){c.push(`## Comments (${o.length})`),c.push("");for(const[p,d]of o.entries()){const h=e.describe(d,r,t.base);c.push(`${p+1}. **${h.targetLabel}** \u2014 \`${M(d.target)}\``),c.push(` > ${ze(d).replace(/\n/g,`
|
|
733
|
-
> `)}`)}c.push("")}if(l.length>0){c.push(`## Requested changes (${l.length})`),c.push("");for(const[p,d]of l.entries()){const h=e.describe(d,r,t.base),u=h.summary?` \u2014 ${h.summary}`:"";c.push(`${p+1}. **${h.title}**${u}`),c.push(` target: \`${M(d.target)}\` (${d.target.type})`),c.push(` \`\`\`json
|
|
734
|
-
${co(d).replace(/\n/g,`
|
|
735
|
-
`)}
|
|
736
|
-
\`\`\``)}c.push("")}if(l.length===0&&o.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:d,reason:h}]of t.stale.entries()){const u=e.describe(d,r,t.base),f=d.type===L?ze(d):u.title;c.push(`${p+1}. \`${d.type}\` on \`${M(d.target)}\` (${h}) \u2014 ${f}`)}c.push("")}return c.push("## Canonical draft (JSON)"),c.push(""),c.push(lo(Bt(n))),c.push(""),c.join(`
|
|
737
|
-
`)},N="0.0.13",Jt=async t=>{try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const e=document.activeElement,s=document.createElement("textarea");try{return s.value=t,s.setAttribute("readonly",""),s.style.position="fixed",s.style.opacity="0",document.body.append(s),s.select(),document.execCommand("copy")}catch{return!1}finally{s.remove(),e instanceof HTMLElement&&e.focus()}},Hn=Ze({en:{heading:"Review notes",rejected:"Action rejected.",commentLabel:"Review comment",commentPlaceholder:"What should change, or what you noticed (passed to the agent as an instruction)",detach:"Detach",attachTo:t=>`Attach to this ${t}`,addNote:"Add note",empty:"No draft actions yet.",emptyHint:"Comments and structural patches both land here, and survive reload via LocalStorage.",sendToClaude:"Send to Claude",copy:"Copy changes & comments",copyTitle:"Copy the review to paste it to the agent",clear:"Clear",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 cancel",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:"\u5909\u66F4\u3057\u305F\u3044\u3053\u3068 / \u6C17\u3065\u304D\u3092\u66F8\u304F\uFF08Agent \u3078\u306E\u6307\u793A\u3068\u3057\u3066\u6E21\u308B\uFF09",detach:"\u7D10\u3065\u3051\u3092\u89E3\u9664",attachTo:t=>`\u3053\u306E ${t} \u306B\u7D10\u3065\u3051\u308B`,addNote:"\u30CE\u30FC\u30C8\u3092\u8FFD\u52A0",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",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:"\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\u30AD\u30E3\u30F3\u30BB\u30EB",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"}}),po=()=>({body:"",editing:null,attachment:{kind:"page"},copy:{kind:"idle"},copyRequest:0,send:{kind:"idle"},sendRequest:0}),Fn=t=>t.kind==="explicit"?{kind:t.resume}:t,Kn=(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:Fn(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:Fn(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}}}},ho=(t,e)=>{const s=t.body.trim();return s===""?null:{target:e,body:s}},uo=t=>{if(!t.editing)return null;const e=t.editing.body.trim();return e===""?null:{id:t.editing.id,body:e}},fo={en:"English",ja:"\u65E5\u672C\u8A9E"},D=Ze({en:{review:"Review",reviewToggle:"Review / comments",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",draftCount:(t,e)=>`${t} ${t===1?"change":"changes"} \xB7 ${e} ${e===1?"note":"notes"}`,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"},ja:{review:"\u30EC\u30D3\u30E5\u30FC",reviewToggle:"\u30EC\u30D3\u30E5\u30FC / \u30B3\u30E1\u30F3\u30C8",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",draftCount:(t,e)=>`\u5909\u66F4 ${t} \xB7 \u30B3\u30E1\u30F3\u30C8 ${e}`,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"}}),go=4096,mo="reviews",Wn="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.",ko=t=>new TextEncoder().encode(t).length,bo=t=>t.replace(/[\u0000-\u0008\u000B-\u001F\u007F]/g,""),xo=t=>{const e=`${Wn}
|
|
738
|
-
|
|
739
|
-
${bo(t)}`;return ko(e)<=go?e:null},vo=t=>`${Wn}
|
|
740
|
-
|
|
741
|
-
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).`,yo={consent_required:"consent",forbidden:"forbidden",not_granted:"forbidden",capability_disabled:"forbidden",capability_removed:"forbidden",claude_unavailable:"claude_unavailable",rate_limited:"rate_limited"},wo=t=>{const e=typeof t=="object"&&t!==null&&"code"in t?t.code:void 0;return(typeof e=="string"?yo[e]:void 0)??"error"},$o={too_large:"handoffTooLarge",consent:"handoffConsent",forbidden:"handoffForbidden",claude_unavailable:"handoffClaudeUnavailable",rate_limited:"handoffRateLimited",storage:"handoffStorage",error:"handoffError"},Yt=(t,e)=>D(e)[$o[t]],Zn=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,Vn=(t,e)=>{const{definition:s,state:n,navigation:r,derivation:i}=t,a=Hn(t.locale),o=s.currentTarget?.(n,r)??null,l=e.attachment,c=l.kind==="explicit"?s.commentTargets(n,r).find(h=>h.value===l.ref):null,p=l.kind==="explicit"?{ref:l.ref,label:c?Zn(c):l.ref}:l.kind==="current"&&o?{ref:o.value,label:Zn(o)}:{ref:`page:${s.name}`,label:a.wholePage},d=new Map(i.stale.map(h=>[h.action.id,h.reason]));return{body:e.body,target:p,attachment:l.kind==="explicit"?{kind:"explicit"}:o?{kind:"checkbox",checked:l.kind==="current",group:o.group??""}:{kind:"none"},canSubmit:e.body.trim().length>0,items:i.actions.map(h=>{const u=s.describe(h,n,i.base),f=h.type==="comment";return{id:h.id,title:f?a.comment:u.title,targetLabel:u.targetLabel,tone:f?"comment":u.tone,text:{kind:f?"comment":"summary",body:f?ze(h):u.summary??""},code:f?null:s.serialize(h),stale:d.get(h.id)??null,edit:!f||t.editable!==!0?{kind:"none"}:e.editing?.id===h.id?{kind:"editing",body:e.editing.body,canSave:e.editing.body.trim().length>0}:{kind:"available"}}}),issues:t.issues.map(h=>`${h.path?`${h.path}: `:""}${h.message}`),send:t.sendable!==!0?"hidden":i.actions.length===0||e.send.kind==="pending"?"disabled":"ready",flash:e.send.kind==="sent"?a.sent:e.send.kind==="failed"?Yt(e.send.reason,t.locale):e.copy.kind==="copied"?a.copied:e.copy.kind==="failed"?a.copyFailed:""}},So=[Ve,St,B`
|
|
742
|
-
:host {
|
|
743
|
-
display: flex;
|
|
744
|
-
flex-direction: column;
|
|
745
|
-
min-height: 0;
|
|
746
|
-
min-width: 0;
|
|
747
|
-
width: 100%;
|
|
748
|
-
background: var(--dpk-paper-raised);
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
header {
|
|
752
|
-
position: relative;
|
|
753
|
-
z-index: 1;
|
|
754
|
-
display: flex;
|
|
755
|
-
align-items: center;
|
|
756
|
-
justify-content: space-between;
|
|
757
|
-
gap: 8px;
|
|
758
|
-
padding: 14px 16px 12px;
|
|
759
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
760
|
-
background: var(--dpk-glass);
|
|
761
|
-
backdrop-filter: blur(12px);
|
|
762
|
-
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
header h2 {
|
|
766
|
-
font-size: 13.5px;
|
|
767
|
-
font-weight: 660;
|
|
768
|
-
letter-spacing: -0.015em;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
.composer {
|
|
772
|
-
display: grid;
|
|
773
|
-
gap: 10px;
|
|
774
|
-
padding: 14px 16px 14px;
|
|
775
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
776
|
-
background: var(--dpk-paper-sunken);
|
|
777
|
-
box-shadow: inset 0 1px 3px var(--dpk-shade-1);
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
.composer textarea {
|
|
781
|
-
min-height: 62px;
|
|
782
|
-
background: var(--dpk-paper-raised);
|
|
783
|
-
border-radius: var(--dpk-radius);
|
|
784
|
-
box-shadow:
|
|
785
|
-
var(--dpk-bevel),
|
|
786
|
-
inset 0 1px 2px var(--dpk-shade-1);
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
/* Wraps on a narrow rail rather than pushing the add button out of it. */
|
|
790
|
-
.composer .row {
|
|
791
|
-
display: flex;
|
|
792
|
-
flex-wrap: wrap;
|
|
793
|
-
align-items: center;
|
|
794
|
-
gap: 8px;
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
.composer .attach {
|
|
798
|
-
display: inline-flex;
|
|
799
|
-
align-items: center;
|
|
800
|
-
gap: 7px;
|
|
801
|
-
font-size: 12px;
|
|
802
|
-
color: var(--dpk-ink-soft);
|
|
803
|
-
cursor: pointer;
|
|
804
|
-
transition: color 140ms var(--dpk-ease);
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
.composer .attach:hover {
|
|
808
|
-
color: var(--dpk-ink);
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
.composer .attach input {
|
|
812
|
-
width: 14px;
|
|
813
|
-
height: 14px;
|
|
814
|
-
margin: 0;
|
|
815
|
-
accent-color: var(--dpk-accent);
|
|
816
|
-
cursor: pointer;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
.composer .chip {
|
|
820
|
-
display: inline-flex;
|
|
821
|
-
align-items: center;
|
|
822
|
-
gap: 6px;
|
|
823
|
-
padding: 3px 10px;
|
|
824
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
825
|
-
border-radius: 999px;
|
|
826
|
-
background: var(--dpk-paper-raised);
|
|
827
|
-
box-shadow: var(--dpk-shadow-xs);
|
|
828
|
-
font-size: 11.5px;
|
|
829
|
-
cursor: pointer;
|
|
830
|
-
transition:
|
|
831
|
-
border-color 140ms var(--dpk-ease),
|
|
832
|
-
box-shadow 140ms var(--dpk-ease),
|
|
833
|
-
transform 140ms var(--dpk-ease);
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
.composer .chip svg {
|
|
837
|
-
flex: none;
|
|
838
|
-
width: 12px;
|
|
839
|
-
height: 12px;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
.composer .chip:hover {
|
|
843
|
-
border-color: color-mix(in srgb, var(--dpk-accent) 45%, var(--dpk-rule-strong));
|
|
844
|
-
box-shadow: var(--dpk-shadow-sm);
|
|
845
|
-
transform: translateY(-1px);
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
.target-line {
|
|
849
|
-
min-width: 0;
|
|
850
|
-
margin-right: auto;
|
|
851
|
-
overflow-wrap: anywhere;
|
|
852
|
-
padding: 3px 9px;
|
|
853
|
-
border-radius: 999px;
|
|
854
|
-
background: var(--dpk-paper-inset);
|
|
855
|
-
font-family: var(--dpk-mono);
|
|
856
|
-
font-size: 10px;
|
|
857
|
-
letter-spacing: 0.03em;
|
|
858
|
-
color: var(--dpk-ink-faint);
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
.list {
|
|
862
|
-
list-style: none;
|
|
863
|
-
margin: 0;
|
|
864
|
-
/* The page's hand-off dock may float over the bottom of the list. */
|
|
865
|
-
padding: 10px 12px calc(10px + var(--dpk-dock-clearance, 0px));
|
|
866
|
-
overflow: auto;
|
|
867
|
-
flex: 1;
|
|
868
|
-
min-height: 0;
|
|
869
|
-
display: grid;
|
|
870
|
-
/* One unbroken comment must not widen the column every item shares. */
|
|
871
|
-
grid-template-columns: minmax(0, 1fr);
|
|
872
|
-
gap: 8px;
|
|
873
|
-
align-content: start;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
.item {
|
|
877
|
-
position: relative;
|
|
878
|
-
display: grid;
|
|
879
|
-
grid-template-columns: minmax(0, 1fr);
|
|
880
|
-
gap: 5px;
|
|
881
|
-
padding: 10px 12px 11px 16px;
|
|
882
|
-
border: 1px solid var(--dpk-rule);
|
|
883
|
-
border-radius: var(--dpk-radius);
|
|
884
|
-
background: var(--dpk-paper-raised);
|
|
885
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
886
|
-
transition:
|
|
887
|
-
box-shadow 160ms var(--dpk-ease),
|
|
888
|
-
border-color 160ms var(--dpk-ease),
|
|
889
|
-
transform 160ms var(--dpk-ease);
|
|
890
|
-
animation: dpk-item-in 200ms var(--dpk-ease) backwards;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
@keyframes dpk-item-in {
|
|
894
|
-
from {
|
|
895
|
-
opacity: 0;
|
|
896
|
-
transform: translateY(3px);
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
.item:hover {
|
|
901
|
-
border-color: var(--dpk-rule-hover);
|
|
902
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
903
|
-
transform: translateY(-1px);
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
.item::before {
|
|
907
|
-
content: '';
|
|
908
|
-
position: absolute;
|
|
909
|
-
left: 0;
|
|
910
|
-
top: 10px;
|
|
911
|
-
bottom: 10px;
|
|
912
|
-
width: 3px;
|
|
913
|
-
border-radius: 0 2px 2px 0;
|
|
914
|
-
background: var(--tone, var(--dpk-ink-faint));
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
.item[data-tone='comment'] {
|
|
918
|
-
--tone: var(--dpk-accent);
|
|
919
|
-
background: linear-gradient(90deg, var(--dpk-accent-soft), transparent 55%), var(--dpk-paper-raised);
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
.item[data-tone='create'] {
|
|
923
|
-
--tone: var(--dpk-green);
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
.item[data-tone='update'] {
|
|
927
|
-
--tone: var(--dpk-blue);
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
.item[data-tone='delete'] {
|
|
931
|
-
--tone: var(--dpk-accent);
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
.item[data-tone='move'] {
|
|
935
|
-
--tone: var(--dpk-violet);
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
.item[data-stale='true'] {
|
|
939
|
-
opacity: 0.62;
|
|
940
|
-
border-style: dashed;
|
|
941
|
-
box-shadow: none;
|
|
942
|
-
transform: none;
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
.item-head {
|
|
946
|
-
display: flex;
|
|
947
|
-
align-items: center;
|
|
948
|
-
gap: 7px;
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
.item-icon {
|
|
952
|
-
display: inline-flex;
|
|
953
|
-
flex: none;
|
|
954
|
-
align-items: center;
|
|
955
|
-
justify-content: center;
|
|
956
|
-
width: 18px;
|
|
957
|
-
height: 18px;
|
|
958
|
-
border-radius: var(--dpk-radius-xs);
|
|
959
|
-
background: color-mix(in srgb, var(--tone, var(--dpk-ink-faint)) 16%, transparent);
|
|
960
|
-
color: var(--tone, var(--dpk-ink-faint));
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
.item-icon svg {
|
|
964
|
-
display: block;
|
|
965
|
-
width: 11px;
|
|
966
|
-
height: 11px;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
.item-title {
|
|
970
|
-
font-size: 12.5px;
|
|
971
|
-
font-weight: 600;
|
|
972
|
-
letter-spacing: -0.005em;
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
.stale-badge {
|
|
976
|
-
padding: 1px 7px;
|
|
977
|
-
border: 1px solid color-mix(in srgb, var(--dpk-amber) 40%, transparent);
|
|
978
|
-
border-radius: 999px;
|
|
979
|
-
background: var(--dpk-amber-soft);
|
|
980
|
-
font-family: var(--dpk-mono);
|
|
981
|
-
font-size: 9px;
|
|
982
|
-
letter-spacing: 0.06em;
|
|
983
|
-
text-transform: uppercase;
|
|
984
|
-
color: var(--dpk-amber);
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
.item-head .dpk-icon-btn {
|
|
988
|
-
margin-left: auto;
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
/* Edit and delete sit together at the end of the row. */
|
|
992
|
-
.item-head .item-edit + .dpk-icon-btn {
|
|
993
|
-
margin-left: -4px;
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
.item-target {
|
|
997
|
-
display: inline-flex;
|
|
998
|
-
align-items: center;
|
|
999
|
-
width: fit-content;
|
|
1000
|
-
padding: 1px 7px;
|
|
1001
|
-
border-radius: var(--dpk-radius-xs);
|
|
1002
|
-
background: var(--dpk-paper-sunken);
|
|
1003
|
-
font-family: var(--dpk-mono);
|
|
1004
|
-
font-size: 10px;
|
|
1005
|
-
color: var(--dpk-ink-faint);
|
|
1006
|
-
overflow-wrap: anywhere;
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
.item-summary {
|
|
1010
|
-
font-size: 12px;
|
|
1011
|
-
color: var(--dpk-ink-soft);
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
.item-body {
|
|
1015
|
-
margin: 2px 0 0;
|
|
1016
|
-
padding-left: 9px;
|
|
1017
|
-
border-left: 2px solid var(--dpk-accent);
|
|
1018
|
-
font-size: 12.5px;
|
|
1019
|
-
white-space: pre-wrap;
|
|
1020
|
-
overflow-wrap: anywhere;
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
.item-editor {
|
|
1024
|
-
display: grid;
|
|
1025
|
-
gap: 8px;
|
|
1026
|
-
margin-top: 2px;
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
.item-editor textarea {
|
|
1030
|
-
min-height: 62px;
|
|
1031
|
-
background: var(--dpk-paper-raised);
|
|
1032
|
-
border-radius: var(--dpk-radius);
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
.item-editor-actions {
|
|
1036
|
-
display: flex;
|
|
1037
|
-
justify-content: flex-end;
|
|
1038
|
-
gap: 6px;
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
.item-code {
|
|
1042
|
-
margin-top: 2px;
|
|
1043
|
-
padding: 5px 7px;
|
|
1044
|
-
border-radius: var(--dpk-radius-xs);
|
|
1045
|
-
background: var(--dpk-paper-sunken);
|
|
1046
|
-
font-family: var(--dpk-mono);
|
|
1047
|
-
font-size: 10px;
|
|
1048
|
-
color: var(--dpk-ink-faint);
|
|
1049
|
-
overflow-wrap: anywhere;
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
.empty {
|
|
1053
|
-
padding: 4px;
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
.empty-box {
|
|
1057
|
-
display: grid;
|
|
1058
|
-
justify-items: center;
|
|
1059
|
-
gap: 6px;
|
|
1060
|
-
padding: 26px 16px;
|
|
1061
|
-
border: 1px dashed var(--dpk-rule-strong);
|
|
1062
|
-
border-radius: var(--dpk-radius-lg);
|
|
1063
|
-
background: var(--dpk-paper-sunken);
|
|
1064
|
-
text-align: center;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
.empty-box svg {
|
|
1068
|
-
width: 20px;
|
|
1069
|
-
height: 20px;
|
|
1070
|
-
color: var(--dpk-ink-faint);
|
|
1071
|
-
opacity: 0.7;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
.empty-box p {
|
|
1075
|
-
margin: 0;
|
|
1076
|
-
font-size: 12px;
|
|
1077
|
-
line-height: 1.6;
|
|
1078
|
-
color: var(--dpk-ink-soft);
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
.empty-box .empty-hint {
|
|
1082
|
-
max-width: 30ch;
|
|
1083
|
-
color: var(--dpk-ink-faint);
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
.issues {
|
|
1087
|
-
margin: 10px 12px 0;
|
|
1088
|
-
padding: 9px 11px 9px 13px;
|
|
1089
|
-
border: 1px solid color-mix(in srgb, var(--dpk-danger) 35%, transparent);
|
|
1090
|
-
border-radius: var(--dpk-radius-sm);
|
|
1091
|
-
background: linear-gradient(90deg, var(--dpk-danger) 0 3px, transparent 3px), var(--dpk-danger-soft);
|
|
1092
|
-
font-size: 11.5px;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
.issues strong {
|
|
1096
|
-
color: var(--dpk-danger);
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
.issues ul {
|
|
1100
|
-
margin: 4px 0 0;
|
|
1101
|
-
padding-left: 16px;
|
|
1102
|
-
color: var(--dpk-ink-soft);
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
footer {
|
|
1106
|
-
display: flex;
|
|
1107
|
-
flex-wrap: wrap;
|
|
1108
|
-
align-items: center;
|
|
1109
|
-
gap: 8px;
|
|
1110
|
-
padding: 12px 16px;
|
|
1111
|
-
border-top: 1px solid var(--dpk-rule);
|
|
1112
|
-
background: var(--dpk-glass);
|
|
1113
|
-
backdrop-filter: blur(12px);
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
.footer-actions {
|
|
1117
|
-
display: flex;
|
|
1118
|
-
align-items: center;
|
|
1119
|
-
gap: 6px;
|
|
1120
|
-
flex-wrap: wrap;
|
|
1121
|
-
margin-left: auto;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
.flash {
|
|
1125
|
-
font-family: var(--dpk-mono);
|
|
1126
|
-
font-size: 10px;
|
|
1127
|
-
letter-spacing: 0.04em;
|
|
1128
|
-
color: var(--dpk-green);
|
|
1129
|
-
}
|
|
1130
|
-
`],Gn=(t,e,s)=>{const n=new Map;for(let r=e;r<=s;r++)n.set(t[r],r);return n},Jn=$e(class extends He{constructor(t){if(super(t),t.type!==K.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let n;s===void 0?s=e:e!==void 0&&(n=e);const r=[],i=[];let a=0;for(const o of t)r[a]=n?n(o,a):a,i[a]=s(o,a),a++;return{values:i,keys:r}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,n]){const r=wi(t),{values:i,keys:a}=this.dt(e,s,n);if(!Array.isArray(r))return this.ut=a,i;const o=this.ut??=[],l=[];let c,p,d=0,h=r.length-1,u=0,f=i.length-1;for(;d<=h&&u<=f;)if(r[d]===null)d++;else if(r[h]===null)h--;else if(o[d]===a[u])l[u]=ee(r[d],i[u]),d++,u++;else if(o[h]===a[f])l[f]=ee(r[h],i[f]),h--,f--;else if(o[d]===a[f])l[f]=ee(r[d],i[f]),Se(t,l[f+1],r[d]),d++,f--;else if(o[h]===a[u])l[u]=ee(r[h],i[u]),Se(t,r[d],r[h]),h--,u++;else if(c===void 0&&(c=Gn(a,u,f),p=Gn(o,d,h)),c.has(o[d]))if(c.has(o[h])){const y=p.get(a[u]),x=y!==void 0?r[y]:null;if(x===null){const R=Se(t,r[d]);ee(R,i[u]),l[u]=R}else l[u]=ee(x,i[u]),Se(t,r[d],x),r[y]=null;u++}else xt(r[h]),h--;else xt(r[d]),d++;for(;u<=f;){const y=Se(t,l[f+1]);ee(y,i[u]),l[u++]=y}for(;d<=h;){const y=r[d++];y!==null&&xt(y)}return this.ut=a,bt(t,l),O}});class Qt extends Fe{}Qt.directiveName="unsafeSVG",Qt.resultType=2;const Ao=$e(Qt),Yn=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]],Qn=[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]],Xn=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]],er=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]],Co=[["path",{d:"M20 6 9 17l-5-5"}]],To=[["path",{d:"m6 9 6 6 6-6"}]],Eo=[["path",{d:"m15 18-6-6 6-6"}]],_o=[["path",{d:"m9 18 6-6-6-6"}]],Ro=[["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"}]],Lo=[["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"}]],zo=[["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"}]],Po=[["path",{d:"M15 3h6v6"}],["path",{d:"m21 3-7 7"}],["path",{d:"m3 21 7-7"}],["path",{d:"M9 21H3v-6"}]],Oo=[["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"}]],Mo=[["path",{d:"m14 10 7-7"}],["path",{d:"M20 10h-6V4"}],["path",{d:"m3 21 7-7"}],["path",{d:"M4 14h6v6"}]],jo=[["path",{d:"M5 12h14"}]],Io=[["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"}]],qo=[["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"}]],No=[["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"}]],Do=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]],Uo=[["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"}]],Bo=[["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"}]],Ho=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],Fo=t=>t.replaceAll("&","&").replaceAll('"',"""),Ko=t=>t.map(([e,s])=>`<${e}${Object.entries(s).map(([n,r])=>` ${n}="${Fo(String(r))}"`).join("")}></${e}>`).join(""),C=t=>{const e=Ko(t);return()=>k`<svg
|
|
1131
|
-
viewBox="0 0 24 24"
|
|
1132
|
-
fill="none"
|
|
1133
|
-
stroke="currentColor"
|
|
1134
|
-
stroke-width="2"
|
|
1135
|
-
stroke-linecap="round"
|
|
1136
|
-
stroke-linejoin="round"
|
|
1137
|
-
aria-hidden="true"
|
|
1138
|
-
focusable="false"
|
|
1139
|
-
>
|
|
1140
|
-
${Ao(e)}
|
|
1141
|
-
</svg>`},Xt=C(Ho),tr=C(Bo),es=C(No),ts=C(Oo),sr=C(zo),Wo=C(Ro),Zo=C(Co),nr=C(Do),Vo=C(jo),Go=C(Lo),rr=C(qo),Jo=C(er),Yo=C(Yn);C(Qn),C(Xn);const ir=C(Eo),ss=C(_o),Qo=C(To),Xo=C(Po),el=C(Mo),tl=C(Uo),sl=C(Io),nl=t=>{switch(t){case"comment":return ts();case"create":return nr();case"update":return es();case"delete":return tr();case"move":return rr();default:return sr()}},rl=(t,e,s,n=!1)=>k`
|
|
1142
|
-
${n?g:k`<header><h2>${t.heading}</h2></header>`}
|
|
1143
|
-
${e.issues.length>0?k`<div class="issues" role="alert">
|
|
1144
|
-
<strong>${t.rejected}</strong>
|
|
1145
|
-
<ul>
|
|
1146
|
-
${e.issues.map(r=>k`<li>${r}</li>`)}
|
|
1147
|
-
</ul>
|
|
1148
|
-
</div>`:g}
|
|
1149
|
-
<div class="composer">
|
|
1150
|
-
<textarea
|
|
1151
|
-
class="dpk-textarea"
|
|
1152
|
-
aria-label=${t.commentLabel}
|
|
1153
|
-
placeholder=${t.commentPlaceholder}
|
|
1154
|
-
.value=${e.body}
|
|
1155
|
-
@input=${r=>{r.currentTarget instanceof HTMLTextAreaElement&&s({kind:"input",body:r.currentTarget.value})}}
|
|
1156
|
-
@keydown=${r=>{!r.isComposing&&r.key==="Enter"&&(r.metaKey||r.ctrlKey)&&(r.preventDefault(),s({kind:"submit"}))}}
|
|
1157
|
-
></textarea>
|
|
1158
|
-
${e.attachment.kind==="explicit"?k`<div class="row">
|
|
1159
|
-
<button class="chip" type="button" aria-label=${t.detach} @click=${()=>s({kind:"clear-target"})}>
|
|
1160
|
-
${e.target.label} ${Xt()}
|
|
1161
|
-
</button>
|
|
1162
|
-
</div>`:e.attachment.kind==="checkbox"?k`<div class="row">
|
|
1163
|
-
<label class="attach">
|
|
1164
|
-
<input
|
|
1165
|
-
type="checkbox"
|
|
1166
|
-
.checked=${e.attachment.checked}
|
|
1167
|
-
@change=${r=>{r.currentTarget instanceof HTMLInputElement&&s({kind:"attach",current:r.currentTarget.checked})}}
|
|
1168
|
-
/>
|
|
1169
|
-
<span>${t.attachTo(e.attachment.group)}</span>
|
|
1170
|
-
</label>
|
|
1171
|
-
</div>`:g}
|
|
1172
|
-
<div class="row">
|
|
1173
|
-
<span class="target-line">→ ${e.target.label}</span>
|
|
1174
|
-
<button
|
|
1175
|
-
class="dpk-btn dpk-btn--accent"
|
|
1176
|
-
type="button"
|
|
1177
|
-
?disabled=${!e.canSubmit}
|
|
1178
|
-
@click=${()=>s({kind:"submit"})}
|
|
1179
|
-
>
|
|
1180
|
-
${t.addNote}
|
|
1181
|
-
</button>
|
|
1182
|
-
</div>
|
|
1183
|
-
</div>
|
|
1184
|
-
<ul class="list">
|
|
1185
|
-
${e.items.length===0?k`<li class="empty">
|
|
1186
|
-
<div class="empty-box">
|
|
1187
|
-
${ts()}
|
|
1188
|
-
<p>${t.empty}</p>
|
|
1189
|
-
<p class="empty-hint">${t.emptyHint}</p>
|
|
1190
|
-
</div>
|
|
1191
|
-
</li>`:Jn(e.items,r=>r.id,r=>il(t,r,s))}
|
|
1192
|
-
</ul>
|
|
1193
|
-
<footer>
|
|
1194
|
-
${n||e.send==="hidden"?g:k`<button
|
|
1195
|
-
class="dpk-btn dpk-btn--accent"
|
|
1196
|
-
type="button"
|
|
1197
|
-
?disabled=${e.send==="disabled"}
|
|
1198
|
-
@click=${()=>s({kind:"send"})}
|
|
1199
|
-
>
|
|
1200
|
-
${t.sendToClaude}
|
|
1201
|
-
</button>`}
|
|
1202
|
-
<div class="footer-actions">
|
|
1203
|
-
${n?g:k`<button
|
|
1204
|
-
class=${e.send==="hidden"?"dpk-btn dpk-btn--accent":"dpk-btn"}
|
|
1205
|
-
type="button"
|
|
1206
|
-
title=${t.copyTitle}
|
|
1207
|
-
?disabled=${e.items.length===0}
|
|
1208
|
-
@click=${()=>s({kind:"copy"})}
|
|
1209
|
-
>
|
|
1210
|
-
${t.copy}
|
|
1211
|
-
</button>`}
|
|
1212
|
-
<button
|
|
1213
|
-
class="dpk-btn dpk-btn--ghost"
|
|
1214
|
-
type="button"
|
|
1215
|
-
?disabled=${e.items.length===0}
|
|
1216
|
-
@click=${()=>s({kind:"clear"})}
|
|
1217
|
-
>
|
|
1218
|
-
${t.clear}
|
|
1219
|
-
</button>
|
|
1220
|
-
</div>
|
|
1221
|
-
${e.flash?k`<span class="flash" role="status">${e.flash}</span>`:g}
|
|
1222
|
-
</footer>
|
|
1223
|
-
`,il=(t,e,s)=>k`
|
|
1224
|
-
<li class="item" data-tone=${e.tone} data-stale=${String(e.stale!==null)} data-id=${e.id}>
|
|
1225
|
-
<div class="item-head">
|
|
1226
|
-
<span class="item-icon">${nl(e.tone)}</span>
|
|
1227
|
-
<span class="item-title">${e.title}</span>
|
|
1228
|
-
${e.stale?k`<span class="stale-badge">${e.stale}</span>`:g}
|
|
1229
|
-
${e.edit.kind==="available"?k`<button
|
|
1230
|
-
class="dpk-icon-btn item-edit"
|
|
1231
|
-
type="button"
|
|
1232
|
-
aria-label=${t.editComment}
|
|
1233
|
-
title=${t.editComment}
|
|
1234
|
-
@click=${()=>s({kind:"edit-start",id:e.id,body:e.text.body})}
|
|
1235
|
-
>
|
|
1236
|
-
${es()}
|
|
1237
|
-
</button>`:g}
|
|
1238
|
-
<button
|
|
1239
|
-
class="dpk-icon-btn"
|
|
1240
|
-
type="button"
|
|
1241
|
-
aria-label=${t.deleteAction}
|
|
1242
|
-
@click=${()=>s({kind:"delete",id:e.id})}
|
|
1243
|
-
>
|
|
1244
|
-
${Xt()}
|
|
1245
|
-
</button>
|
|
1246
|
-
</div>
|
|
1247
|
-
<div class="item-target">${e.targetLabel}</div>
|
|
1248
|
-
${e.edit.kind==="editing"?al(t,e.edit,s):e.text.kind==="comment"?k`<p class="item-body">${e.text.body}</p>`:e.text.body?k`<div class="item-summary">${e.text.body}</div>`:g}
|
|
1249
|
-
${e.code===null?g:k`<code class="item-code">${e.code}</code>`}
|
|
1250
|
-
</li>
|
|
1251
|
-
`,al=(t,e,s)=>k`
|
|
1252
|
-
<div class="item-editor">
|
|
1253
|
-
<textarea
|
|
1254
|
-
class="dpk-textarea"
|
|
1255
|
-
aria-label=${t.editLabel}
|
|
1256
|
-
title=${t.editHint}
|
|
1257
|
-
.value=${e.body}
|
|
1258
|
-
@input=${n=>{n.currentTarget instanceof HTMLTextAreaElement&&s({kind:"edit-input",body:n.currentTarget.value})}}
|
|
1259
|
-
@keydown=${n=>{n.isComposing||(n.key==="Enter"&&(n.metaKey||n.ctrlKey)?(n.preventDefault(),s({kind:"edit-save"})):n.key==="Escape"&&(n.preventDefault(),n.stopPropagation(),s({kind:"edit-cancel"})))}}
|
|
1260
|
-
></textarea>
|
|
1261
|
-
<div class="row item-editor-actions">
|
|
1262
|
-
<button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>s({kind:"edit-cancel"})}>
|
|
1263
|
-
${t.cancelEdit}
|
|
1264
|
-
</button>
|
|
1265
|
-
<button
|
|
1266
|
-
class="dpk-btn dpk-btn--accent"
|
|
1267
|
-
type="button"
|
|
1268
|
-
?disabled=${!e.canSave}
|
|
1269
|
-
@click=${()=>s({kind:"edit-save"})}
|
|
1270
|
-
>
|
|
1271
|
-
${t.saveEdit}
|
|
1272
|
-
</button>
|
|
1273
|
-
</div>
|
|
1274
|
-
</div>
|
|
1275
|
-
`;class ar extends F{static{this.styles=So}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}}}#e=po();#r=null;#n=new $t(this);constructor(){super(),this.embedded=!1,this.definition=null,this.state=void 0,this.navigation={},this.derivation=null,this.issues=[],this.pendingTarget=null}willUpdate(e){e.has("pendingTarget")&&this.pendingTarget&&(this.#e=Kn(this.#e,{kind:"target-requested",ref:this.pendingTarget}))}updated(e){e.has("pendingTarget")&&this.pendingTarget&&this.isConnected&&this.renderRoot.querySelector("textarea")?.focus();const s=this.#r;s&&(this.#r=null,[...this.renderRoot.querySelectorAll(".item")].find(r=>r.dataset.id===s.id)?.querySelector(s.kind==="editor"?".item-editor textarea":".item-edit")?.focus())}#i(){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}}render(){const e=this.#i();return e?rl(Hn(this.#n.locale),Vn(e,this.#e),this.#t,this.embedded):g}#s(e){this.#e=Kn(this.#e,e),this.requestUpdate()}#t=e=>{switch(e.kind){case"delete":this.onDelete?.(e.id);return;case"clear":this.onClear?.();return;case"copy":this.#l();return;case"send":this.#a();return;case"edit-start":this.#r={kind:"editor",id:e.id},this.#s(e);return;case"edit-cancel":{const s=this.#e.editing;s&&(this.#r={kind:"edit-button",id:s.id}),this.#s(e);return}case"edit-save":{const s=uo(this.#e);if(!s||!this.onEditComment||!this.onEditComment(s.id,s.body).ok)return;this.#r={kind:"edit-button",id:s.id},this.#s({kind:"edited"});return}case"submit":{const s=this.#i();if(!s||!this.onComment)return;const n=ho(this.#e,Vn(s,this.#e).target.ref);if(!n||!this.onComment(n.target,n.body).ok)return;this.#s({kind:"submitted"});return}default:this.#s(e)}};async#a(){const e=this.sendToClaude;if(!e||this.#e.send.kind==="pending")return;this.#s({kind:"send-started"});const s=this.#e.sendRequest,n=await e().catch(()=>({ok:!1,reason:"error"}));this.isConnected&&this.#s({kind:"send-finished",request:s,outcome:n})}async#l(){const e=this.#i();if(!e)return;this.#s({kind:"copy-started"});const s=this.#e.copyRequest;try{const n=this.exportBrief?.()??Gt({...e.derivation,navigation:e.navigation,issues:e.issues},e.definition,N),r=await Jt(n);this.isConnected&&this.#s({kind:"copy-finished",request:s,ok:r})}catch{this.isConnected&&this.#s({kind:"copy-finished",request:s,ok:!1})}}}const ol=()=>{customElements.get("dpk-component-comment-panel")||customElements.define("dpk-component-comment-panel",ar)},or=(t,e,s)=>{typeof window>"u"||Object.assign(window,{devProcessKit:{version:t,templates:e,versionParam:s}})},Pe="dpk-version",lr="version",ll=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,it=t=>ll.test(t),cl="https://cdn.jsdelivr.net/npm/dev-process-kit@",cr="https://data.jsdelivr.com/v1/packages/npm/dev-process-kit",ns=t=>{const e=new URLSearchParams(t),s=e.get(Pe)??e.get(lr);return s!==null&&it(s)?s:null},dl=(t,e)=>{const s=ns(t);return s===null||s===e?null:s},pl=(t,e)=>{if(!it(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`${cl}${t}/dist/${e}`},hl=(t,e)=>{const s=new URL(t);return s.searchParams.delete(lr),e===null?s.searchParams.delete(Pe):s.searchParams.set(Pe,e),s.href},ul=T({tags:Le(st(m(),V()),{}),versions:Z(T({version:m()}))}),fl=t=>{const e=qt(ul,t),s=e.tags.latest;return{latest:typeof s=="string"&&it(s)?s:null,versions:e.versions.map(n=>n.version).filter(it)}},dr=t=>{const e=t.published?.versions??[],s=e.includes(t.current)?e:[t.current,...e],n=t.published?.latest??null;return{value:t.current,options:[...t.requested?[{value:"",label:t.text.pinned}]:[],...s.map(r=>({value:r,label:r===n&&r!==t.current?t.text.latest(r):r}))]}};let at;const pr=()=>(at??=fetch(cr).then(async t=>{if(!t.ok)throw new Error(`${cr} answered ${t.status}`);return fl(await t.json())}),at.catch(()=>{at=void 0}),at),hr=t=>{location.assign(hl(location.href,t))},gl=t=>import(t),ml=({entry:t,templates:e,register:s,importModule:n=gl})=>{const r=()=>{s(),or(N,e,Pe)},i=typeof location>"u"?null:dl(location.search,N);if(i===null){r();return}n(pl(i,t)).then(()=>{kl()||xl(i)},a=>{console.error(`dev-process-kit@${i} could not be loaded; running ${N}`,a),r()})},kl=()=>{const t=Reflect.get(window,"devProcessKit");return typeof t=="object"&&t!==null&&"versionParam"in t},rs="dpk-version-fallback",bl=`
|
|
1276
|
-
.${rs} {
|
|
1277
|
-
flex: none;
|
|
1278
|
-
height: 24px;
|
|
1279
|
-
margin-left: auto;
|
|
1280
|
-
padding: 0 22px 0 10px;
|
|
1281
|
-
border: 1px solid var(--dpk-rule, #8884);
|
|
1282
|
-
border-radius: 999px;
|
|
1283
|
-
background: var(--dpk-paper-sunken, transparent)
|
|
1284
|
-
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>")
|
|
1285
|
-
no-repeat right 8px center;
|
|
1286
|
-
appearance: none;
|
|
1287
|
-
field-sizing: content;
|
|
1288
|
-
color: var(--dpk-ink-soft, inherit);
|
|
1289
|
-
font-family: var(--dpk-mono, ui-monospace, monospace);
|
|
1290
|
-
font-size: 10px;
|
|
1291
|
-
letter-spacing: 0.02em;
|
|
1292
|
-
cursor: pointer;
|
|
1293
|
-
}
|
|
1294
|
-
`,xl=t=>{const e=[...document.body.querySelectorAll("*")].filter(s=>s.localName.startsWith("dpk-template-")&&!s.querySelector(`:scope > .${rs}`));if(e.length!==0){document.head.append(Object.assign(document.createElement("style"),{textContent:bl}));for(const s of e)s.append(vl(s,t))}},vl=(t,e)=>{const s=D(We(Ke(t))),n=document.createElement("select");n.className=rs,n.slot="header",n.setAttribute("aria-label",s.versionLabel),n.title=s.versionLabel;const r=a=>{const o=dr({current:e,requested:ns(location.search)!==null,published:a,text:{pinned:s.versionPinned,latest:s.versionLatest}});n.replaceChildren(...o.options.map(l=>Object.assign(document.createElement("option"),{value:l.value,textContent:l.label}))),n.value=o.value},i=()=>{pr().then(r,a=>console.warn(a))};return n.addEventListener("pointerenter",i,{once:!0}),n.addEventListener("focus",i,{once:!0}),n.addEventListener("change",()=>hr(n.value===""?null:n.value)),r(null),n},yl=T({value:m()}),wl=t=>e=>{if(!(e instanceof CustomEvent))return;const s=S(yl,e.detail);s.success&&t(s.output.value)},is=t=>e=>{const s=de(e.target,HTMLSelectElement);s!==null&&t(s.value)},$l=t=>e=>{const s=de(e.target,HTMLInputElement);s!==null&&t(s.checked)},Oe=t=>t==="light"||t==="dark"?t:null,ur=t=>t.authored??t.environment,fr=t=>t.preference??ur(t),Sl=t=>{const e=fr(t)==="dark"?"light":"dark";return e===ur(t)?null:e},gr=Z(fe({value:v(m(),ie(/^element:.+/)),label:v(m(),w(1)),group:P(m())})),Al=T({targets:gr,providers:Z(T({id:v(m(),w(1)),results:Z(Un)}))}),Cl=fe({target:v(m(),ie(/^element:.+/)),body:v(m(),jt(),w(1))}),mr=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,kr=(t,e,s)=>{const n=new Map(e.map(r=>[r.value,r]));return{...t,hasTarget:(r,i)=>t.hasTarget(r,i)||n.has(M(i)),commentTargets:(r,i)=>{const a=t.commentTargets(r,i),o=new Set(a.map(l=>l.value));return[...a,...e.filter(l=>!o.has(l.value))]},describe:(r,i,a)=>{if(q(r)){const c=s.get(r.id),p=n.get(M(r.target));return{title:c?.title??r.type,...c?.summary===void 0?{}:{summary:c.summary},tone:c?.tone??"update",targetLabel:p?mr(p):r.target.id}}const o=t.describe(r,i,a),l=r.type==="comment"&&!t.hasTarget(i,r.target)?n.get(M(r.target)):void 0;return l===void 0?o:{...o,targetLabel:mr(l)}},serialize:r=>q(r)?`${r.type} ${M(r.target)} ${JSON.stringify(r.payload)}`:t.serialize(r)}},br=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function xr(t){return typeof br.Buffer<"u"&&br.Buffer.isBuffer(t)}function vr(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 yr(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function wr(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Tl="[object RegExp]",El="[object String]",_l="[object Number]",Rl="[object Boolean]",Ll="[object Symbol]",zl="[object Date]",Pl="[object Map]",Ol="[object Set]",Ml="[object Array]",jl="[object Function]",Il="[object ArrayBuffer]",as="[object Object]",ql="[object Error]",Nl="[object DataView]",Dl="[object Uint8Array]",Ul="[object Uint8ClampedArray]",Bl="[object Uint16Array]",Hl="[object Uint32Array]",Fl="[object BigUint64Array]",Kl="[object Int8Array]",Wl="[object Int16Array]",Zl="[object Int32Array]",Vl="[object BigInt64Array]",Gl="[object Float32Array]",Jl="[object Float64Array]";function Yl(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function Ql(t,e,s){return Me(t,e,void 0,void 0,void 0,void 0,s)}function Me(t,e,s,n,r,i,a){const o=a(t,e,s,n,r,i);if(o!==void 0)return o;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 je(t,e,i,a)}return je(t,e,i,a)}function je(t,e,s,n){if(Object.is(t,e))return!0;let r=wr(t),i=wr(e);if(r==="[object Arguments]"&&(r=as),i==="[object Arguments]"&&(i=as),r!==i)return!1;switch(r){case El:return t.toString()===e.toString();case _l:return Yl(t.valueOf(),e.valueOf());case Rl:case zl:case Ll:return Object.is(t.valueOf(),e.valueOf());case Tl:return t.source===e.source&&t.flags===e.flags;case jl:return t===e}s=s??new Map;const a=s.get(t),o=s.get(e);if(a!=null&&o!=null)return a===e;s.set(t,e),s.set(e,t);try{switch(r){case Pl:if(t.size!==e.size)return!1;for(const[l,c]of t.entries())if(!e.has(l)||!Me(c,e.get(l),l,t,e,s,n))return!1;return!0;case Ol:{if(t.size!==e.size)return!1;const l=Array.from(t.values()),c=Array.from(e.values());for(let p=0;p<l.length;p++){const d=l[p],h=c.findIndex(u=>Me(d,u,void 0,t,e,s,n));if(h===-1)return!1;c.splice(h,1)}return!0}case Ml:case Dl:case Ul:case Bl:case Hl:case Fl:case Kl:case Wl:case Zl:case Vl:case Gl:case Jl:if(xr(t)!==xr(e)||t.length!==e.length)return!1;for(let l=0;l<t.length;l++)if(!Me(t[l],e[l],l,t,e,s,n))return!1;return!0;case Il:return t.byteLength!==e.byteLength?!1:je(new Uint8Array(t),new Uint8Array(e),s,n);case Nl:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:je(new Uint8Array(t),new Uint8Array(e),s,n);case ql:return t.name===e.name&&t.message===e.message;case as:{if(!(je(t.constructor,e.constructor,s,n)||vr(t)&&vr(e)))return!1;const l=[...Object.keys(t),...yr(t)],c=[...Object.keys(e),...yr(e)];if(l.length!==c.length)return!1;for(let p=0;p<l.length;p++){const d=l[p],h=t[d];if(!Object.hasOwn(e,d))return!1;const u=e[d];if(!Me(h,u,d,t,e,s,n))return!1}return!0}default:return!1}}finally{s.delete(t),s.delete(e)}}function Xl(){}function ot(t,e){return Ql(t,e,Xl)}const $r="page",Sr=t=>M(t),Ar=(t,e,s,n=new Map)=>{let r=e;const i=[],a=[],o=[],l=[],c=new Map;for(const d of s){if(d.type===L)continue;if(q(d)){const f=n.get(d.id);f===void 0||f.stale!==void 0?a.push({action:d,reason:f?.stale??"target-missing"}):i.push(d);continue}const h=rt(t.actions,d.type);if(!h){a.push({action:d,reason:"unsupported-action-type"});continue}const u=t.apply(r,d);if(u===null){a.push({action:d,reason:t.hasTarget(r,d.target)?"constraint-violated":"target-missing"});continue}if(h.mode!=="append"&&os(t,r,u)){o.push(d);continue}r=u,i.push(d)}for(const d of s){if(d.type!==L)continue;if(d.target.type!==$r&&!t.hasTarget(r,d.target)){a.push({action:d,reason:"target-missing"});continue}l.push(d);const h=Sr(d.target);c.set(h,[...c.get(h)??[],d])}const p=new Map(s.map((d,h)=>[d.id,h]));return a.sort((d,h)=>(p.get(d.action.id)??0)-(p.get(h.action.id)??0)),{base:e,state:r,actions:s,applied:i,stale:a,obsolete:o,comments:l,commentsByTarget:c}},os=(t,e,s)=>e===s?!0:t.canonicalState===void 0?ot(e,s):ot(t.canonicalState(e),t.canonicalState(s)),Cr=t=>{const e=new Set(t.obsolete.map(s=>s.id));return t.actions.filter(s=>!e.has(s.id))},ec=(t,e,s,n)=>{let r=e;const i=n??Tr(r).map(a=>a.id);for(const a of[...i].reverse())r=tc(t,r,s,a,n!==void 0)??r;return r},Tr=t=>t.applied.filter(e=>!q(e)),tc=(t,e,s,n,r)=>{const i=Tr(e),a=i.findIndex(h=>h.id===n),o=i[a];if(o===void 0)return null;const l=i.slice(0,a),c=[...r?sc(t,e.base,i,a):[],...nc(t,l,o)],p=new Set,d=c.filter(h=>{const u=h.join(" ");return p.has(u)?!1:(p.add(u),!0)}).sort((h,u)=>u.length-h.length);for(const h of d){const u=rc(t,e,s,h);if(u!==null)return u}return null},sc=(t,e,s,n)=>{const r=[];let i=e;for(const a of s.slice(0,n+1))r.push(i),i=t.apply(i,a)??i;return r.flatMap((a,o)=>os(t,a,i)?[s.slice(o,n+1).map(l=>l.id)]:[])},nc=(t,e,s)=>{const n=Er(s),r=e.filter(l=>Er(l).some(c=>n.includes(c))),i=_r(t,s),a=r.filter(l=>_r(t,l)===i),o=l=>l.map((c,p)=>[...l.slice(p).map(d=>d.id),s.id]);return[...o(r),...o(a),...r.map(l=>[l.id,s.id]),...r.map(l=>[l.id])]},Er=t=>{const e=t.target.type===$r?[]:t.target.id.split("."),s=typeof t.payload=="object"&&t.payload!==null?Object.values(t.payload).filter(n=>typeof n=="string"&&n!==""):[];return[...e,...s]},_r=(t,e)=>rt(t.actions,e.type)?.mode,rc=(t,e,s,n)=>{const r=new Set(e.stale.map(a=>a.action.id)),i=new Set(n);for(;;){const a=s(e.actions.filter(l=>!i.has(l.id))),o=a.stale.filter(l=>!r.has(l.action.id)).map(l=>l.action);if(o.length===0)return os(t,a.state,e.state)?a:null;if(o.some(l=>l.type===L||q(l)))return null;for(const l of o)i.add(l.id)}},ic=T({v:ue(1),template:v(m(),w(1)),actions:Z(V())});class ls{constructor(e){this.storage=e}load(e,s){try{const n=this.storage.getItem(e);if(n===null)return[];const r=S(ic,JSON.parse(n));return!r.success||r.output.template!==s?[]:r.output.actions.flatMap(i=>{const a=S(ae,i);return a.success?[a.output]:[]})}catch{return[]}}save(e,s,n){const r={v:1,template:s,actions:n};try{this.storage.setItem(e,JSON.stringify(r))}catch{}}clear(e){try{this.storage.removeItem(e)}catch{}}}class cs{constructor(){this.store=new Map}load(e,s){return new ls({getItem:n=>this.store.get(n)??null,setItem:(n,r)=>{this.store.set(n,r)},removeItem:n=>{this.store.delete(n)}}).load(e,s)}save(e,s,n){this.store.set(e,JSON.stringify({v:1,template:s,actions:n}))}clear(e){this.store.delete(e)}}const ds=()=>{try{if(typeof localStorage<"u")return new ls(localStorage)}catch{}return new cs},ps=t=>`dev-process-kit:draft:${typeof location>"u"?"local":`${location.pathname}${location.search}`}:${t}`,ac=Z(V());class Rr{#e;#r;#n={targets:[],providers:[]};#i=new Map;#s;#t;#a;#l;#o;#d=new Set;#v=[];#x=0;constructor(e){this.#e=e.definition,this.#r=kr(e.definition,[],this.#i),this.#s=e.base,this.#o=e.storageKey??ps(e.definition.name),this.#l=e.storage===void 0?ds():e.storage;const s=e.initialActions??this.#l?.load(this.#o,this.definition.name)??[];this.#t=zr(this.definition,s),this.#a=this.#c(this.#t),this.#k()&&this.#m()}get definition(){return this.#r}setComponentSnapshot(e){const s=qt(Al,e);if(!ot(s,this.#n)){this.#n=s,this.#f(),this.#a=this.#c(this.#t);for(const n of this.#d)n()}}setTemplate(e){this.#e=e,this.#f(),this.#a=this.#c(this.#t);for(const s of this.#d)s()}#f(){this.#i=Bn(this.#t,this.#n.providers),this.#r=kr(this.#e,this.#n.targets,this.#i)}#c(e){return Ar(this.definition,this.#s,e,Bn(e,this.#n.providers))}get base(){return this.#s}get actions(){return this.#t}get derivation(){return this.#a}get lastIssues(){return this.#v}get prunedCount(){return this.#x}descriptorFor(e,s){return Lr(this.definition,e,s)}dispatch(e){const s=this.#h(e,this.#a.state);if(!s.ok)return this.#p([s.issue]);const n=this.descriptorFor(s.action.type,s.action.target);return n?(this.#u(Ut(this.#t,s.action,n),[s.action.id]),{ok:!0,id:s.action.id}):this.#p([{path:"type",message:"unknown action type"}])}dispatchBatch(e){const s=S(ac,e);if(!s.success)return this.#p([oe(s.issues)]);const n=s.output;if(n.length===0)return{ok:!0,ids:[]};let r=this.#t,i=this.#a.state;const a=[];for(const o of n){const l=this.#h(o,i);if(!l.ok)return this.#p([l.issue]);const c=l.action,p=this.descriptorFor(c.type,c.target);if(!p)return this.#p([{path:"type",message:"unknown action type"}]);if((c.type==="comment"||q(c)?c.target.type==="page"||this.definition.hasTarget(i,c.target)?i:null:this.definition.apply(i,c))===null)return this.#p([{path:"target",message:"batch action is not applicable"}]);r=Ut(r,c,p),i=this.#c(r).state,a.push(c.id)}return this.#u(r,a),{ok:!0,ids:a}}#h(e,s){const n=S(In,e);if(!n.success)return{ok:!1,issue:oe(n.issues)};const r=this.descriptorFor(n.output.type,typeof n.output.target=="string"?Nt(n.output.target,"page"):n.output.target);if(!r)return{ok:!1,issue:{path:"type",message:`unknown action type "${n.output.type}"`}};const i=eo(n.output,r);if(!i.ok)return i;const a=this.definition.canonicalTarget?.(s,i.action.target)??i.action.target;return{ok:!0,action:{...i.action,target:a}}}#p(e){return this.#v=e,{ok:!1,issues:e}}editComment(e,s){const n=this.#t.find(o=>o.id===e);if(n?.type!==L)return this.#p([{path:"id",message:`no comment "${e}" in the draft`}]);if(ze(n)===s)return{ok:!0,id:e};const r=S(Ht.schema,{...n,payload:{body:s}});if(!r.success)return this.#p([oe(r.issues)]);const i=S(ae,r.output);if(!i.success)return this.#p([oe(i.issues)]);const a=i.output;return this.#u(this.#t.map(o=>o===n?a:o),[]),{ok:!0,id:e}}removeAction(e){const s=this.#t.filter(n=>n.id!==e);s.length!==this.#t.length&&this.#u(s)}clearActions(){this.#t.length>0&&this.#u([])}replaceActions(e){this.#u(zr(this.definition,e))}setBase(e){this.#s=e,this.#u(this.#t)}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.#t}}#u(e,s){this.#v=[],this.#t=e,this.#f(),this.#a=this.#c(this.#t),this.#k(s),this.#m();for(const n of this.#d)n()}#k(e){const s=this.#y(),n=ec(this.definition,this.#a,r=>this.#c(r),e);return n===this.#a?s:(this.#x+=this.#t.length-n.actions.length,this.#t=[...n.actions],this.#f(),this.#a=this.#c(this.#t),this.#y(),!0)}#y(){return this.#a.obsolete.length===0?!1:(this.#x+=this.#a.obsolete.length,this.#t=Cr(this.#a),this.#f(),this.#a=this.#c(this.#t),!0)}#m(){this.#l?.save(this.#o,this.definition.name,this.#t)}}const Lr=(t,e,s)=>e==="comment"?Ht:s!==void 0&&q({type:e,target:s})?io:rt(t.actions,e),zr=(t,e)=>e.flatMap(s=>{const n=S(ae,s);if(!n.success)return[];const r=n.output,i=Lr(t,r.type,r.target);if(!i)return[];const a=S(i.schema,r);if(!a.success)return[];const o=S(ae,a.output);return o.success?[o.output]:[]}),oc=()=>({status:{kind:"idle"},request:0}),lc=(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}},cc=(t,e)=>{if(t.actions===0||t.railOpen)return null;const s=D(t.locale),n=e.status;return{send:t.sendable?{label:n.kind==="sending"?s.handoffSending:n.kind==="sent"?s.handoffSent:s.handoffSend,disabled:n.kind==="sending"}:null,copy:n.kind==="copied"?{label:s.handoffCopied,status:"copied"}:n.kind==="copy-failed"?{label:s.handoffCopyFailed,status:"failed"}:{label:s.handoffCopy,status:"idle"},note:n.kind==="send-failed"?Yt(n.reason,t.locale):null}},Pr=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()}},dc=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:s=>{const n=typeof s=="string"?s:M(s);return e.commentsByTarget.get(n)?.length??0},dispatch:s=>t.dispatch(s),dispatchBatch:s=>t.dispatchBatch(s),navigate:(s,n)=>t.navigate(s,n),hashFor:s=>t.hashFor(s),requestComment:s=>t.requestComment(s)}},pc=(t,e)=>{const s=()=>Pr(t);return{version:N,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:n=>t.dispatch(n),dispatchBatch:n=>t.dispatchBatch(n),comment:(n,r)=>t.dispatch({type:L,target:n,payload:{body:r}}),editComment:(n,r)=>t.editComment(n,r),removeAction:n=>t.removeAction(n),clearActions:()=>t.clearActions(),importDraft:n=>t.controller().replaceActions(n),navigate:(n,r)=>t.navigate(n,r),hashFor:n=>t.hashFor(n),snapshot:s,exportDraft:()=>t.controller().exportDraft(N),exportBrief:()=>Gt(s(),t.controller().definition,N),subscribe:n=>t.subscribe(n)}},hs=(t,e)=>typeof t=="object"&&t!==null&&e.every(s=>typeof Reflect.get(t,s)=="function"),hc=t=>hs(t,["use"]),uc=t=>hs(t,["anchorFor","canSendToClaude","sendToClaude"]),fc=t=>hs(t,["collection"]),Or=async(t,e)=>{try{return await t.use(e)}catch{return null}},gc=(t,e)=>({async canSend(){try{return await t.canSendToClaude()==="available"}catch{return!1}},async send({brief:s,draft:n,anchor:r}){let i=xo(s);if(i===null){if(e===null)return{ok:!1,reason:"too_large"};try{const a=e.collection(mo).doc();await a.set({brief:s,draft:n,createdAt:new Date().toISOString()}),i=vo(a.path)}catch{return{ok:!1,reason:"storage"}}}try{return await t.sendToClaude({anchor:await t.anchorFor(r),text:i}),{ok:!0}}catch(a){return{ok:!1,reason:wo(a)}}}}),mc=async t=>{if(!hc(t))return null;const[e,s]=await Promise.all([Or(t,"comments"),Or(t,"db")]);return uc(e)?gc(e,fc(s)?s:null):null},kc=()=>Reflect.get(globalThis,"claude");class bc{#e;#r;#n=null;#i=!1;constructor(e,s=kc){this.#e=e,this.#r=s,e.addController(this)}get available(){return this.#i}hostConnected(){this.#n??=mc(this.#r()),this.#s(),window.addEventListener("focus",this.#s)}hostDisconnected(){window.removeEventListener("focus",this.#s)}async send(e){const s=await this.#n;if(!s)return{ok:!1,reason:"forbidden"};const n=await s.send(e);return this.#s(),n}#s=async()=>{const e=await this.#n,s=e?await e.canSend():!1;s!==this.#i&&(this.#i=s,this.#e.requestUpdate())}}const us=(t,e)=>({read(s){try{const n=t.getItem(s);return n===null?null:e(JSON.parse(n))}catch{return null}},write(s,n){try{return t.setItem(s,JSON.stringify(n)),!0}catch{return!1}},remove(s){try{t.removeItem(s)}catch{}}}),G=t=>{const e=new Map;return us({getItem:s=>e.get(s)??null,setItem:(s,n)=>{e.set(s,n)},removeItem:s=>{e.delete(s)}},t)},Ie=t=>{try{if(typeof localStorage<"u")return us(localStorage,t)}catch{}return G(t)},xc=t=>{try{if(typeof sessionStorage<"u")return us(sessionStorage,t)}catch{}return G(t)},fs="dev-process-kit:color-scheme",vc="(prefers-color-scheme: dark)",Mr=()=>typeof matchMedia=="function"?matchMedia(vc):null,jr=()=>Oe(document.documentElement.dataset.theme)??(Mr()?.matches===!0?"dark":"light");class yc{#e;#r;#n=null;#i=null;#s="light";#t=null;#a=null;constructor(e,s){this.#e=e,this.#r=s,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#r()?Ie(Oe):G(Oe),this.#i=this.#n.read(fs)),this.#s=jr(),this.#t=Mr(),this.#t?.addEventListener("change",this.#o),this.#a=new MutationObserver(this.#o),this.#a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}hostDisconnected(){this.#t?.removeEventListener("change",this.#o),this.#t=null,this.#a?.disconnect(),this.#a=null}resolve(e){return fr(this.#l(e))}toggle(e){this.#i=Sl(this.#l(e)),this.#i===null?this.#n?.remove(fs):this.#n?.write(fs,this.#i),this.#e.requestUpdate()}#l(e){return{preference:this.#i,authored:e,environment:this.#s}}#o=()=>{const e=jr();e!==this.#s&&(this.#s=e,this.#e.requestUpdate())}}const wc=(t,e)=>{const s=[],n=r=>{(r===t||r instanceof ShadowRoot)&&e?.(r);for(const i of r.children)i.hasAttribute("data-template")||(("commentTargets"in i||"elementActions"in i)&&s.push(i),n(i),i.shadowRoot&&n(i.shadowRoot))};return n(t),s},Ir=(t,e)=>{const s=new Map;for(const n of t)s.set(e(n),(s.get(e(n))??0)+1);return t.filter(n=>s.get(e(n))===1)},qr=t=>Ir(t.filter(e=>"elementActions"in e&&e.id.length>0),e=>e.id),Nr=(t,e)=>{for(const s of qr(t)){const n=oo(e,s.id),r=Reflect.get(s,"elementActions");Array.isArray(r)&&r.length===n.length&&n.every((a,o)=>{const l=r[o];return typeof l=="object"&&l!==null&&"id"in l&&l.id===a.id})||Reflect.set(s,"elementActions",n)}},$c=t=>{const e=Reflect.get(t,"elementActionResults");return Array.isArray(e)?e.flatMap(s=>{const n=S(Un,s);return n.success?[n.output]:[]}):[]},Sc=t=>{const e=[];for(const s of t){if(!("commentTargets"in s))continue;const n=S(gr,s.commentTargets);n.success&&e.push(...n.output)}return{targets:Ir(e,s=>s.value),providers:qr(t).map(s=>({id:s.id,results:$c(s)}))}},Ac=2400;class Cc{#e=oc();#r=null;#n;constructor(e){this.#n=e,e.addController(this)}get state(){return this.#e}hostDisconnected(){this.#t()}async copy(e){this.#i({kind:"copy-started"});const s=this.#e.request,n=await Jt(e()).catch(()=>!1);this.#i({kind:"copy-finished",request:s,ok:n}),this.#s(s)}async send(e){if(this.#e.status.kind==="sending")return;this.#i({kind:"send-started"});const s=this.#e.request,n=await e().catch(()=>({ok:!1,reason:"error"}));this.#i({kind:"send-finished",request:s,outcome:n}),n.ok&&this.#s(s)}#i(e){(e.kind==="copy-started"||e.kind==="send-started")&&this.#t(),this.#e=lc(this.#e,e),this.#n.requestUpdate()}#s(e){e===this.#e.request&&(this.#t(),this.#r=setTimeout(()=>{this.#r=null,this.#i({kind:"settled",request:e})},Ac))}#t(){this.#r!==null&&clearTimeout(this.#r),this.#r=null}}const gs="dev-process-kit:locale";class Tc{#e;#r;#n;#i=null;#s=null;#t;#a;constructor(e,s,n){this.#e=e,this.#r=s,this.#n=n,e.addController(this)}get authored(){if(this.#t===void 0)return We(Ke(this.#e));const e=this.#e.parentNode;return We(this.#t??(e===null?null:Ke(e)))}get locale(){return this.#a??this.#l()}#l(){return $i({preference:this.#s,authored:this.authored})}hostConnected(){this.#i===null&&(this.#i=this.#r()?Ie(Zs):G(Zs),this.#s=this.#i.read(gs)),this.#t??=this.#e.getAttribute("lang"),this.#o()}pick(e){this.#s=Si(e,this.authored),this.#s===null?this.#i?.remove(gs):this.#i?.write(gs,this.#s),this.#o(),this.#e.requestUpdate()}#o(){const e=this.#s??this.#t??null;e===null?this.#e.removeAttribute("lang"):this.#e.getAttribute("lang")!==e&&this.#e.setAttribute("lang",e);const s=this.#l();if(s===this.#a)return;const n=this.#a===void 0;this.#a=s,this.#n(),(!n||this.#s!==null)&&document.dispatchEvent(new Event(wt))}}const Ec="(max-width: 760px)",_c=()=>typeof matchMedia=="function"?matchMedia(Ec):null;class Rc{#e;#r=null;#n=!1;constructor(e){this.#e=e,e.addController(this)}hostConnected(){this.#r=_c(),this.#n=this.#r?.matches===!0,this.#r?.addEventListener("change",this.#i)}hostDisconnected(){this.#r?.removeEventListener("change",this.#i),this.#r=null}get narrow(){return this.#n}#i=e=>{this.#n=e.matches,this.#e.requestUpdate()}}const Dr=()=>Zt(typeof location>"u"?"":location.hash),Lc=(t,e)=>{if(typeof history>"u")return;const s=`${location.pathname}${location.search}${ge(t)}`;`${location.pathname}${location.search}${location.hash}`!==s&&(e?history.replaceState(null,"",s):history.pushState(null,"",s))};class zc{#e;#r=null;#n=0;constructor(e){this.#e=e}get orphans(){return this.#n}route(){const e=this.#e.renderRoot,s=de(e.querySelector('slot[name="preview"]'),HTMLSlotElement);if(s===null)return;this.#r!==s&&(this.#r=s,s.addEventListener("slotchange",this.#i));const n=new Set(Array.from(e.querySelectorAll("slot")).map(i=>i.getAttribute("name")??"")),r=s.assignedElements();for(const i of r){const a=i.getAttribute("data-preview-id");if(!a)continue;const o=`preview:${a}`;i.getAttribute("slot")!==o&&n.has(o)&&i.setAttribute("slot",o)}r.length!==this.#n&&(this.#n=r.length,queueMicrotask(()=>this.#e.requestUpdate()))}#i=()=>{queueMicrotask(()=>this.route())}}const J={min:180,max:560,step:16,largeStep:64},Pc={side:"left",defaultWidth:260},lt=t=>Math.round(Math.min(J.max,Math.max(J.min,t))),Ur=t=>typeof t=="number"&&Number.isFinite(t)?lt(t):null,ms=(t,e)=>t==="left"?e:-e,Oc=(t,e)=>lt(t.startWidth+ms(t.side,e-t.startX)),Mc=(t,e,{key:s,shiftKey:n})=>{const r=n?J.largeStep:J.step;switch(s){case"ArrowLeft":return lt(t+ms(e,-r));case"ArrowRight":return lt(t+ms(e,r));case"Home":return J.min;case"End":return J.max;default:return null}},Br=t=>typeof t=="boolean"?t:null,jc=t=>t==="left"?"right":"left",Ic=(t,e)=>e?{action:"expand",points:jc(t)}:{action:"collapse",points:t},qc=t=>`dev-process-kit:sidebar-collapsed:${t}`;class Nc{#e;#r;#n=null;#i="";#s=!1;#t=!1;constructor(e,s){this.#e=e,this.#r=s,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#r.persist()?Ie(Br):G(Br),this.#i=qc(this.#r.template()),this.#s=this.#n.read(this.#i)??!1)}get collapsed(){return this.#s}get drawerOpen(){return this.#t}toggleDrawer(){this.#t=!this.#t,this.#e.requestUpdate()}closeDrawer(){this.#t&&(this.#t=!1,this.#e.requestUpdate())}toggle(){this.#s=!this.#s,this.#s?this.#n?.write(this.#i,!0):this.#n?.remove(this.#i),this.#e.requestUpdate()}}const Dc=t=>`dev-process-kit:sidebar-width:${t}`,ks={kind:"idle"};class Uc{constructor(e,s){this.#n=null,this.#i="",this.#s=null,this.#t=ks,this.handlers={pointerdown:n=>{n.button===0&&(n.preventDefault(),n.currentTarget instanceof Element&&n.currentTarget.setPointerCapture(n.pointerId),this.#t={kind:"dragging",pointerId:n.pointerId,side:this.#r.layout().side,startX:n.clientX,startWidth:this.width},this.#e.requestUpdate())},pointermove:n=>{const r=this.#t;r.kind!=="dragging"||r.pointerId!==n.pointerId||this.#l(Oc(r,n.clientX))},pointerup:n=>this.#a(n),pointercancel:n=>this.#a(n),keydown:n=>{const r=Mc(this.width,this.#r.layout().side,n);r!==null&&(n.preventDefault(),this.#l(r),this.#o())},dblclick:()=>{this.#l(this.#r.layout().defaultWidth),this.#o()}},this.#e=e,this.#r=s,e.addController(this)}#e;#r;#n;#i;#s;#t;hostConnected(){this.#n===null&&(this.#n=this.#r.persist()?Ie(Ur):G(Ur),this.#i=Dc(this.#r.template()),this.#s=this.#n.read(this.#i))}hostDisconnected(){this.#t=ks}get width(){return this.#s??this.#r.layout().defaultWidth}get dragging(){return this.#t.kind==="dragging"}#a(e){const s=this.#t;s.kind!=="dragging"||s.pointerId!==e.pointerId||(this.#t=ks,this.#o(),this.#e.requestUpdate())}#l(e){const s=e===this.#r.layout().defaultWidth?null:e;s!==this.#s&&(this.#s=s,this.#e.requestUpdate())}#o(){this.#s===null?this.#n?.remove(this.#i):this.#n?.write(this.#i,this.#s)}}const Bc=[Ve,St,B`
|
|
1295
|
-
:host {
|
|
1296
|
-
display: block;
|
|
1297
|
-
min-height: 100%;
|
|
1298
|
-
background: var(--dpk-paper);
|
|
1299
|
-
color-scheme: light;
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
/* The element stamps its resolved scheme; nested components inherit it. */
|
|
1303
|
-
:host([data-theme='dark']) {
|
|
1304
|
-
color-scheme: dark;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
.dpk-shell {
|
|
1308
|
-
display: grid;
|
|
1309
|
-
/* One column no wider than the host: a truncated title must not widen
|
|
1310
|
-
the page past a phone screen. */
|
|
1311
|
-
grid-template-columns: minmax(0, 1fr);
|
|
1312
|
-
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
1313
|
-
min-height: 100%;
|
|
1314
|
-
max-height: 100%;
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
/* ------------------------------------------------------------- header */
|
|
1318
|
-
|
|
1319
|
-
.dpk-header {
|
|
1320
|
-
position: relative;
|
|
1321
|
-
z-index: 20;
|
|
1322
|
-
display: flex;
|
|
1323
|
-
flex-wrap: wrap;
|
|
1324
|
-
align-items: center;
|
|
1325
|
-
gap: 8px 14px;
|
|
1326
|
-
min-height: 60px;
|
|
1327
|
-
/* Right padding keeps the header content clear of the fixed review button. */
|
|
1328
|
-
padding: 10px 72px 10px 16px;
|
|
1329
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
1330
|
-
background: var(--dpk-glass);
|
|
1331
|
-
backdrop-filter: saturate(1.6) blur(14px);
|
|
1332
|
-
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
/* A hairline of the accent along the bottom edge, fading out to the right. */
|
|
1336
|
-
.dpk-header::after {
|
|
1337
|
-
content: '';
|
|
1338
|
-
position: absolute;
|
|
1339
|
-
left: 0;
|
|
1340
|
-
right: 0;
|
|
1341
|
-
bottom: -1px;
|
|
1342
|
-
height: 1px;
|
|
1343
|
-
background: linear-gradient(
|
|
1344
|
-
90deg,
|
|
1345
|
-
color-mix(in srgb, var(--dpk-accent) 70%, transparent),
|
|
1346
|
-
color-mix(in srgb, var(--dpk-accent) 0%, transparent) 38%
|
|
1347
|
-
);
|
|
1348
|
-
pointer-events: none;
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
/* Kit mark: a stack of pages, the single HTML page the agent wrote. */
|
|
1352
|
-
.dpk-brand {
|
|
1353
|
-
position: relative;
|
|
1354
|
-
flex: none;
|
|
1355
|
-
width: 32px;
|
|
1356
|
-
height: 32px;
|
|
1357
|
-
border-radius: 9px;
|
|
1358
|
-
background:
|
|
1359
|
-
radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 60%),
|
|
1360
|
-
linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
1361
|
-
box-shadow:
|
|
1362
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.3),
|
|
1363
|
-
inset 0 -1px 0 rgba(0, 0, 0, 0.12),
|
|
1364
|
-
0 4px 12px -4px color-mix(in srgb, var(--dpk-accent) 70%, transparent);
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
.dpk-brand::before,
|
|
1368
|
-
.dpk-brand::after {
|
|
1369
|
-
content: '';
|
|
1370
|
-
position: absolute;
|
|
1371
|
-
width: 12px;
|
|
1372
|
-
height: 15px;
|
|
1373
|
-
border-radius: 3px;
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
.dpk-brand::before {
|
|
1377
|
-
left: 12px;
|
|
1378
|
-
top: 7px;
|
|
1379
|
-
background: rgba(255, 255, 255, 0.4);
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
.dpk-brand::after {
|
|
1383
|
-
left: 8px;
|
|
1384
|
-
top: 10px;
|
|
1385
|
-
background:
|
|
1386
|
-
linear-gradient(var(--dpk-accent), var(--dpk-accent)) 3px 4px / 6px 1.5px no-repeat,
|
|
1387
|
-
linear-gradient(var(--dpk-accent), var(--dpk-accent)) 3px 7.5px / 4px 1.5px no-repeat,
|
|
1388
|
-
#fff;
|
|
1389
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
/* The title takes what the header has left: the template's header content
|
|
1393
|
-
keeps its own width, and only a title too long for the rest ellipsizes.
|
|
1394
|
-
Header content with no room beside the title wraps to a row of its own
|
|
1395
|
-
rather than being squeezed. */
|
|
1396
|
-
.dpk-title {
|
|
1397
|
-
flex: 1 1 0%;
|
|
1398
|
-
display: flex;
|
|
1399
|
-
flex-direction: column;
|
|
1400
|
-
gap: 3px;
|
|
1401
|
-
min-width: min(160px, 100%);
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
.dpk-title h1 {
|
|
1405
|
-
font-size: 16px;
|
|
1406
|
-
font-weight: 680;
|
|
1407
|
-
letter-spacing: -0.02em;
|
|
1408
|
-
white-space: nowrap;
|
|
1409
|
-
overflow: hidden;
|
|
1410
|
-
text-overflow: ellipsis;
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
.dpk-template-mark {
|
|
1414
|
-
align-self: flex-start;
|
|
1415
|
-
font-family: var(--dpk-mono);
|
|
1416
|
-
font-size: 9.5px;
|
|
1417
|
-
font-weight: 600;
|
|
1418
|
-
letter-spacing: 0.14em;
|
|
1419
|
-
line-height: 1;
|
|
1420
|
-
text-transform: uppercase;
|
|
1421
|
-
color: var(--dpk-accent);
|
|
1422
|
-
}
|
|
1423
|
-
|
|
1424
|
-
.dpk-header-slot {
|
|
1425
|
-
flex: 0 1 auto;
|
|
1426
|
-
min-width: 0;
|
|
1427
|
-
display: flex;
|
|
1428
|
-
align-items: center;
|
|
1429
|
-
gap: 10px;
|
|
1430
|
-
}
|
|
1431
|
-
|
|
1432
|
-
.dpk-header-meta {
|
|
1433
|
-
display: flex;
|
|
1434
|
-
align-items: center;
|
|
1435
|
-
gap: 0;
|
|
1436
|
-
margin-left: auto;
|
|
1437
|
-
padding: 3px;
|
|
1438
|
-
border-radius: 999px;
|
|
1439
|
-
border: 1px solid var(--dpk-rule);
|
|
1440
|
-
background: var(--dpk-paper-sunken);
|
|
1441
|
-
font-family: var(--dpk-mono);
|
|
1442
|
-
font-size: 10px;
|
|
1443
|
-
letter-spacing: 0.02em;
|
|
1444
|
-
color: var(--dpk-ink-faint);
|
|
1445
|
-
white-space: nowrap;
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
.dpk-header-meta span {
|
|
1449
|
-
padding: 3px 9px;
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
.dpk-header-meta span + span {
|
|
1453
|
-
border-left: 1px solid var(--dpk-rule);
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
.dpk-version-select {
|
|
1457
|
-
margin: -3px 0;
|
|
1458
|
-
padding: 3px 14px 3px 0;
|
|
1459
|
-
border: 0;
|
|
1460
|
-
border-radius: 4px;
|
|
1461
|
-
background: transparent
|
|
1462
|
-
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>")
|
|
1463
|
-
no-repeat right 2px center;
|
|
1464
|
-
appearance: none;
|
|
1465
|
-
/* As wide as the version shown, not the longest prerelease in the list. */
|
|
1466
|
-
field-sizing: content;
|
|
1467
|
-
color: inherit;
|
|
1468
|
-
font: inherit;
|
|
1469
|
-
letter-spacing: inherit;
|
|
1470
|
-
cursor: pointer;
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
.dpk-version-select:hover {
|
|
1474
|
-
color: var(--dpk-ink-soft);
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
.dpk-version-select:focus-visible {
|
|
1478
|
-
outline: none;
|
|
1479
|
-
box-shadow: var(--dpk-focus);
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
.dpk-header-meta .dpk-meta-count {
|
|
1483
|
-
margin-left: 2px;
|
|
1484
|
-
border-left: 0;
|
|
1485
|
-
border-radius: 999px;
|
|
1486
|
-
background: var(--dpk-paper-raised);
|
|
1487
|
-
color: var(--dpk-ink-soft);
|
|
1488
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
.dpk-header-meta .dpk-meta-count[data-active='true'] {
|
|
1492
|
-
background: var(--dpk-accent-soft);
|
|
1493
|
-
color: var(--dpk-accent);
|
|
1494
|
-
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dpk-accent) 25%, transparent);
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
.dpk-header-tools {
|
|
1498
|
-
display: flex;
|
|
1499
|
-
flex: none;
|
|
1500
|
-
align-items: center;
|
|
1501
|
-
gap: 2px;
|
|
1502
|
-
padding: 3px;
|
|
1503
|
-
border: 1px solid var(--dpk-rule);
|
|
1504
|
-
border-radius: 999px;
|
|
1505
|
-
background: var(--dpk-paper-sunken);
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
.dpk-lang-select {
|
|
1509
|
-
flex: none;
|
|
1510
|
-
height: 26px;
|
|
1511
|
-
padding: 0 24px 0 10px;
|
|
1512
|
-
border: 0;
|
|
1513
|
-
border-radius: 999px;
|
|
1514
|
-
background: transparent
|
|
1515
|
-
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>")
|
|
1516
|
-
no-repeat right 8px center;
|
|
1517
|
-
appearance: none;
|
|
1518
|
-
color: var(--dpk-ink-soft);
|
|
1519
|
-
font: inherit;
|
|
1520
|
-
font-size: 12px;
|
|
1521
|
-
font-weight: 520;
|
|
1522
|
-
cursor: pointer;
|
|
1523
|
-
transition:
|
|
1524
|
-
color 160ms var(--dpk-ease),
|
|
1525
|
-
background-color 160ms var(--dpk-ease);
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
.dpk-lang-select:hover {
|
|
1529
|
-
color: var(--dpk-ink);
|
|
1530
|
-
background-color: var(--dpk-paper-raised);
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
.dpk-lang-select:focus-visible {
|
|
1534
|
-
outline: none;
|
|
1535
|
-
box-shadow: var(--dpk-focus);
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
.dpk-theme-toggle {
|
|
1539
|
-
display: inline-flex;
|
|
1540
|
-
flex: none;
|
|
1541
|
-
align-items: center;
|
|
1542
|
-
justify-content: center;
|
|
1543
|
-
width: 26px;
|
|
1544
|
-
height: 26px;
|
|
1545
|
-
padding: 0;
|
|
1546
|
-
border: 0;
|
|
1547
|
-
border-radius: 999px;
|
|
1548
|
-
background: transparent;
|
|
1549
|
-
color: var(--dpk-ink-soft);
|
|
1550
|
-
cursor: pointer;
|
|
1551
|
-
transition:
|
|
1552
|
-
color 160ms var(--dpk-ease),
|
|
1553
|
-
background 160ms var(--dpk-ease),
|
|
1554
|
-
transform 300ms var(--dpk-ease-spring);
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
.dpk-theme-toggle svg {
|
|
1558
|
-
width: 14px;
|
|
1559
|
-
height: 14px;
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
.dpk-theme-toggle:hover {
|
|
1563
|
-
color: var(--dpk-ink);
|
|
1564
|
-
background: var(--dpk-paper-raised);
|
|
1565
|
-
transform: rotate(-18deg);
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
.dpk-theme-toggle:focus-visible {
|
|
1569
|
-
outline: none;
|
|
1570
|
-
box-shadow: var(--dpk-focus);
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
/* --------------------------------------------------------------- body */
|
|
1574
|
-
|
|
1575
|
-
/* Positioned: the sidebar drawer and a narrow screen's review open over it. */
|
|
1576
|
-
.dpk-body {
|
|
1577
|
-
position: relative;
|
|
1578
|
-
display: flex;
|
|
1579
|
-
min-height: 0;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
.dpk-sidebar {
|
|
1583
|
-
/* The element sets the template's or the reader's width; on a narrow
|
|
1584
|
-
screen a wide one still leaves the main column some room. */
|
|
1585
|
-
width: var(--dpk-sidebar-width);
|
|
1586
|
-
max-width: calc(100% - 120px);
|
|
1587
|
-
flex: 0 0 auto;
|
|
1588
|
-
border-right: 1px solid var(--dpk-rule);
|
|
1589
|
-
background: var(--dpk-paper-sunken);
|
|
1590
|
-
overflow: auto;
|
|
1591
|
-
padding: 18px 14px;
|
|
1592
|
-
scrollbar-width: thin;
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
.dpk-sidebar[hidden] {
|
|
1596
|
-
display: none;
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
/*
|
|
1600
|
-
* A right-hand sidebar: a rail beside the main column rather than a list
|
|
1601
|
-
* before it. \`:where\` keeps these as weak as the rules above, so a
|
|
1602
|
-
* template can still restyle the rail (stacking it on a phone, say).
|
|
1603
|
-
*/
|
|
1604
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-main {
|
|
1605
|
-
order: 1;
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar,
|
|
1609
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-resizer,
|
|
1610
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-toggle,
|
|
1611
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-strip {
|
|
1612
|
-
order: 2;
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar,
|
|
1616
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-strip {
|
|
1617
|
-
border-right: 0;
|
|
1618
|
-
border-left: 1px solid var(--dpk-rule);
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
/*
|
|
1622
|
-
* The fold button. Expanded, it sits on the sidebar's border near the top
|
|
1623
|
-
* and, like the resizer, takes no room of its own; folded, it is the only
|
|
1624
|
-
* thing left in a narrow strip where the sidebar was.
|
|
1625
|
-
*/
|
|
1626
|
-
.dpk-sidebar-toggle {
|
|
1627
|
-
position: relative;
|
|
1628
|
-
z-index: 7;
|
|
1629
|
-
display: inline-flex;
|
|
1630
|
-
flex: none;
|
|
1631
|
-
align-self: flex-start;
|
|
1632
|
-
align-items: center;
|
|
1633
|
-
justify-content: center;
|
|
1634
|
-
width: 22px;
|
|
1635
|
-
height: 22px;
|
|
1636
|
-
margin: 14px -11px 0;
|
|
1637
|
-
padding: 0;
|
|
1638
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
1639
|
-
border-radius: 999px;
|
|
1640
|
-
background: var(--dpk-paper-raised);
|
|
1641
|
-
color: var(--dpk-ink-soft);
|
|
1642
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
1643
|
-
cursor: pointer;
|
|
1644
|
-
transition:
|
|
1645
|
-
color 160ms var(--dpk-ease),
|
|
1646
|
-
border-color 160ms var(--dpk-ease),
|
|
1647
|
-
background 160ms var(--dpk-ease);
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
|
-
.dpk-sidebar-toggle svg {
|
|
1651
|
-
width: 13px;
|
|
1652
|
-
height: 13px;
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
.dpk-sidebar-toggle:hover {
|
|
1656
|
-
color: var(--dpk-accent);
|
|
1657
|
-
border-color: color-mix(in srgb, var(--dpk-accent) 45%, transparent);
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
.dpk-sidebar-toggle:focus-visible {
|
|
1661
|
-
outline: none;
|
|
1662
|
-
box-shadow: var(--dpk-focus);
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
.dpk-sidebar-strip {
|
|
1666
|
-
display: flex;
|
|
1667
|
-
flex: none;
|
|
1668
|
-
justify-content: center;
|
|
1669
|
-
width: 36px;
|
|
1670
|
-
padding-top: 14px;
|
|
1671
|
-
border-right: 1px solid var(--dpk-rule);
|
|
1672
|
-
background: var(--dpk-paper-sunken);
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
.dpk-sidebar-strip .dpk-sidebar-toggle {
|
|
1676
|
-
margin: 0;
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
/*
|
|
1680
|
-
* The sidebar's resizable edge: a hit area straddling its border that takes
|
|
1681
|
-
* no room of its own, with an accent line while hovered, focused or dragged.
|
|
1682
|
-
*/
|
|
1683
|
-
.dpk-sidebar-resizer {
|
|
1684
|
-
position: relative;
|
|
1685
|
-
z-index: 6;
|
|
1686
|
-
flex: none;
|
|
1687
|
-
width: 9px;
|
|
1688
|
-
/* Centred on the sidebar's border, whichever side that is. */
|
|
1689
|
-
margin: 0 -5px 0 -4px;
|
|
1690
|
-
cursor: col-resize;
|
|
1691
|
-
touch-action: none;
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
.dpk-sidebar-resizer::after {
|
|
1695
|
-
content: '';
|
|
1696
|
-
position: absolute;
|
|
1697
|
-
top: 0;
|
|
1698
|
-
bottom: 0;
|
|
1699
|
-
left: 3px;
|
|
1700
|
-
width: 2px;
|
|
1701
|
-
border-radius: 1px;
|
|
1702
|
-
background: var(--dpk-accent);
|
|
1703
|
-
opacity: 0;
|
|
1704
|
-
transition: opacity 160ms var(--dpk-ease);
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
.dpk-sidebar-resizer:hover::after,
|
|
1708
|
-
.dpk-sidebar-resizer:focus-visible::after,
|
|
1709
|
-
.dpk-shell[data-resizing] .dpk-sidebar-resizer::after {
|
|
1710
|
-
opacity: 1;
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
.dpk-sidebar-resizer:focus-visible {
|
|
1714
|
-
outline: none;
|
|
1715
|
-
}
|
|
1716
|
-
|
|
1717
|
-
/*
|
|
1718
|
-
* A phone-width screen has no room for a column beside the main one: the
|
|
1719
|
-
* sidebar is a drawer that the strip's button slides over the main column,
|
|
1720
|
-
* leaving a sliver of it to tap the drawer shut.
|
|
1721
|
-
*/
|
|
1722
|
-
.dpk-body[data-sidebar-drawer] > .dpk-sidebar {
|
|
1723
|
-
position: absolute;
|
|
1724
|
-
top: 0;
|
|
1725
|
-
bottom: 0;
|
|
1726
|
-
left: 36px;
|
|
1727
|
-
z-index: 25;
|
|
1728
|
-
width: min(var(--dpk-sidebar-width), calc(100% - 36px - 48px));
|
|
1729
|
-
max-width: none;
|
|
1730
|
-
box-shadow: var(--dpk-shadow-lg);
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
.dpk-body[data-sidebar-drawer][data-sidebar-side='right'] > .dpk-sidebar {
|
|
1734
|
-
left: auto;
|
|
1735
|
-
right: 36px;
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1738
|
-
.dpk-sidebar-scrim {
|
|
1739
|
-
position: absolute;
|
|
1740
|
-
inset: 0;
|
|
1741
|
-
z-index: 24;
|
|
1742
|
-
background: color-mix(in srgb, var(--dpk-ink) 16%, transparent);
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
/* While dragging, the cursor stays put and nothing underneath (text, preview frames) reacts. */
|
|
1746
|
-
.dpk-shell[data-resizing] {
|
|
1747
|
-
cursor: col-resize;
|
|
1748
|
-
user-select: none;
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
.dpk-shell[data-resizing] .dpk-main {
|
|
1752
|
-
pointer-events: none;
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
.dpk-main {
|
|
1756
|
-
flex: 1 1 0%;
|
|
1757
|
-
display: flex;
|
|
1758
|
-
flex-direction: column;
|
|
1759
|
-
min-width: 0;
|
|
1760
|
-
overflow: auto;
|
|
1761
|
-
/* A faint wash of the accent from the top left corner gives the ground some depth. */
|
|
1762
|
-
background:
|
|
1763
|
-
radial-gradient(
|
|
1764
|
-
ellipse 900px 360px at 0% 0%,
|
|
1765
|
-
color-mix(in srgb, var(--dpk-accent) 5%, transparent),
|
|
1766
|
-
transparent 70%
|
|
1767
|
-
),
|
|
1768
|
-
radial-gradient(
|
|
1769
|
-
ellipse 700px 320px at 100% 0%,
|
|
1770
|
-
color-mix(in srgb, var(--dpk-blue) 4%, transparent),
|
|
1771
|
-
transparent 70%
|
|
1772
|
-
),
|
|
1773
|
-
var(--dpk-paper);
|
|
1774
|
-
background-attachment: local;
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
.dpk-main-body {
|
|
1778
|
-
flex: 1 0 auto;
|
|
1779
|
-
display: grid;
|
|
1780
|
-
/* The column is as wide as the page, not as its widest unbreakable line. */
|
|
1781
|
-
grid-template-columns: minmax(0, 1fr);
|
|
1782
|
-
align-content: start;
|
|
1783
|
-
gap: 16px;
|
|
1784
|
-
min-width: 0;
|
|
1785
|
-
padding: 24px;
|
|
1786
|
-
animation: dpk-rise 420ms var(--dpk-ease) backwards;
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
/*
|
|
1790
|
-
* Scrolled to the end, the last of the content clears the hand-off dock
|
|
1791
|
-
* floating over the bottom right. \`--dpk-dock-clearance\` is how far up
|
|
1792
|
-
* that is; it reaches into components too, and a template's own floating
|
|
1793
|
-
* controls rise by it. \`:where\` lets a full-bleed template keep no padding.
|
|
1794
|
-
*/
|
|
1795
|
-
.dpk-shell:has(> .dpk-dock) {
|
|
1796
|
-
--dpk-dock-clearance: 64px;
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
:where(.dpk-shell:has(> .dpk-dock)) .dpk-main-body {
|
|
1800
|
-
padding-bottom: calc(24px + var(--dpk-dock-clearance));
|
|
1801
|
-
}
|
|
1802
|
-
|
|
1803
|
-
:where(.dpk-shell:has(> .dpk-dock)) .dpk-sidebar {
|
|
1804
|
-
padding-bottom: calc(18px + var(--dpk-dock-clearance));
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
@keyframes dpk-rise {
|
|
1808
|
-
from {
|
|
1809
|
-
opacity: 0;
|
|
1810
|
-
transform: translateY(6px);
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
/*
|
|
1815
|
-
* Author memo. It sits at the end of the main column and sticks to the
|
|
1816
|
-
* bottom of the scrollport as a bar the full width of the column, edge to
|
|
1817
|
-
* edge: always in reach and never stealing height from the preview. Opened,
|
|
1818
|
-
* it grows upward over the content and shows the memo whole; only a memo
|
|
1819
|
-
* taller than the window scrolls, so its top stays reachable.
|
|
1820
|
-
*/
|
|
1821
|
-
.dpk-memo {
|
|
1822
|
-
position: sticky;
|
|
1823
|
-
bottom: 0;
|
|
1824
|
-
z-index: 5;
|
|
1825
|
-
margin-top: auto;
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
.dpk-memo[hidden] {
|
|
1829
|
-
display: none;
|
|
1830
|
-
}
|
|
1831
|
-
|
|
1832
|
-
.dpk-memo-fold {
|
|
1833
|
-
/* A faint amber wash over the whole note marks it as the author's aside. */
|
|
1834
|
-
border-top: 1px solid color-mix(in srgb, var(--dpk-amber) 28%, var(--dpk-rule-strong));
|
|
1835
|
-
background: color-mix(in srgb, color-mix(in srgb, var(--dpk-amber) 7%, var(--dpk-paper-raised)) 94%, transparent);
|
|
1836
|
-
backdrop-filter: blur(12px);
|
|
1837
|
-
box-shadow: 0 -8px 24px -18px color-mix(in srgb, var(--dpk-ink) 40%, transparent);
|
|
1838
|
-
}
|
|
1839
|
-
|
|
1840
|
-
.dpk-memo-bar {
|
|
1841
|
-
display: flex;
|
|
1842
|
-
align-items: center;
|
|
1843
|
-
gap: 6px;
|
|
1844
|
-
/* Clear of the hand-off dock at the bottom right while it is shown. */
|
|
1845
|
-
padding: 8px calc(16px + var(--dpk-dock-space, 0px)) 8px 16px;
|
|
1846
|
-
font-size: 12.5px;
|
|
1847
|
-
font-weight: 600;
|
|
1848
|
-
color: var(--dpk-ink-soft);
|
|
1849
|
-
cursor: pointer;
|
|
1850
|
-
list-style: none;
|
|
1851
|
-
user-select: none;
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
.dpk-memo-bar::-webkit-details-marker {
|
|
1855
|
-
display: none;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
.dpk-memo-bar:hover {
|
|
1859
|
-
color: var(--dpk-ink);
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
.dpk-memo-bar:focus-visible {
|
|
1863
|
-
outline: none;
|
|
1864
|
-
box-shadow: var(--dpk-focus);
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
.dpk-memo-bar svg {
|
|
1868
|
-
width: 14px;
|
|
1869
|
-
height: 14px;
|
|
1870
|
-
transition: transform 160ms var(--dpk-ease);
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
.dpk-memo-fold[open] .dpk-memo-bar svg {
|
|
1874
|
-
transform: rotate(90deg);
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
.dpk-memo-body {
|
|
1878
|
-
max-height: calc(100dvh - 120px);
|
|
1879
|
-
overflow: auto;
|
|
1880
|
-
overscroll-behavior: contain;
|
|
1881
|
-
padding: 0 calc(16px + var(--dpk-dock-space, 0px)) 16px 16px;
|
|
1882
|
-
font-size: 12.5px;
|
|
1883
|
-
line-height: 1.7;
|
|
1884
|
-
color: var(--dpk-ink-soft);
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
.dpk-memo ::slotted(*) {
|
|
1888
|
-
display: block;
|
|
1889
|
-
max-width: 100%;
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
.dpk-orphans {
|
|
1893
|
-
margin-top: 16px;
|
|
1894
|
-
border: 1px dashed var(--dpk-rule-strong);
|
|
1895
|
-
border-radius: var(--dpk-radius);
|
|
1896
|
-
padding: 12px;
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
.dpk-banner {
|
|
1900
|
-
display: grid;
|
|
1901
|
-
gap: 4px;
|
|
1902
|
-
margin-bottom: 14px;
|
|
1903
|
-
border: 1px solid color-mix(in srgb, var(--dpk-danger) 35%, transparent);
|
|
1904
|
-
border-radius: var(--dpk-radius);
|
|
1905
|
-
background: linear-gradient(90deg, var(--dpk-danger) 0 3px, transparent 3px), var(--dpk-danger-soft);
|
|
1906
|
-
padding: 12px 14px 12px 17px;
|
|
1907
|
-
max-width: 900px;
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
.dpk-banner strong {
|
|
1911
|
-
font-size: 13px;
|
|
1912
|
-
color: var(--dpk-danger);
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
.dpk-banner code {
|
|
1916
|
-
font-family: var(--dpk-mono);
|
|
1917
|
-
font-size: 11px;
|
|
1918
|
-
color: var(--dpk-ink-soft);
|
|
1919
|
-
overflow-wrap: anywhere;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
.dpk-notes {
|
|
1923
|
-
flex: 0 0 auto;
|
|
1924
|
-
width: 360px;
|
|
1925
|
-
border-left: 1px solid var(--dpk-rule);
|
|
1926
|
-
background: var(--dpk-paper-raised);
|
|
1927
|
-
box-shadow: -12px 0 32px -24px var(--dpk-shade-3);
|
|
1928
|
-
overflow: hidden;
|
|
1929
|
-
display: flex;
|
|
1930
|
-
animation: dpk-slide-in 260ms var(--dpk-ease) backwards;
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
@keyframes dpk-slide-in {
|
|
1934
|
-
from {
|
|
1935
|
-
opacity: 0;
|
|
1936
|
-
transform: translateX(16px);
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
|
-
.dpk-notes[hidden] {
|
|
1941
|
-
display: none;
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
/*
|
|
1945
|
-
* Where a column of its own would leave the main column too little room,
|
|
1946
|
-
* the review opens over the main column's edge instead; on a phone it
|
|
1947
|
-
* takes the screen, below the review button that closes it.
|
|
1948
|
-
*/
|
|
1949
|
-
@media (max-width: 1100px) {
|
|
1950
|
-
.dpk-body:has(> .dpk-sidebar:not([hidden])) > .dpk-notes {
|
|
1951
|
-
position: absolute;
|
|
1952
|
-
top: 0;
|
|
1953
|
-
right: 0;
|
|
1954
|
-
bottom: 0;
|
|
1955
|
-
z-index: 30;
|
|
1956
|
-
max-width: 100%;
|
|
1957
|
-
box-shadow: var(--dpk-shadow-lg);
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
@media (max-width: 860px) {
|
|
1962
|
-
.dpk-notes {
|
|
1963
|
-
position: absolute;
|
|
1964
|
-
top: 0;
|
|
1965
|
-
right: 0;
|
|
1966
|
-
bottom: 0;
|
|
1967
|
-
z-index: 30;
|
|
1968
|
-
max-width: 100%;
|
|
1969
|
-
box-shadow: var(--dpk-shadow-lg);
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
|
-
@media (max-width: 760px) {
|
|
1974
|
-
.dpk-notes,
|
|
1975
|
-
.dpk-body:has(> .dpk-sidebar:not([hidden])) > .dpk-notes {
|
|
1976
|
-
position: fixed;
|
|
1977
|
-
inset: 0;
|
|
1978
|
-
z-index: 50;
|
|
1979
|
-
width: auto;
|
|
1980
|
-
padding-top: 60px;
|
|
1981
|
-
border-left: 0;
|
|
1982
|
-
}
|
|
1983
|
-
}
|
|
1984
|
-
|
|
1985
|
-
/* ------------------------------------------------------------- footer */
|
|
1986
|
-
|
|
1987
|
-
.dpk-footer {
|
|
1988
|
-
border-top: 1px solid var(--dpk-rule);
|
|
1989
|
-
padding: 10px 20px;
|
|
1990
|
-
display: flex;
|
|
1991
|
-
gap: 12px;
|
|
1992
|
-
align-items: center;
|
|
1993
|
-
background: var(--dpk-glass);
|
|
1994
|
-
backdrop-filter: blur(12px);
|
|
1995
|
-
font-size: 12px;
|
|
1996
|
-
color: var(--dpk-ink-faint);
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
|
-
/* --------------------------------------------------- floating review */
|
|
2000
|
-
|
|
2001
|
-
/* Review toggle: pinned to the top right corner, always in the same place. */
|
|
2002
|
-
.dpk-fab {
|
|
2003
|
-
position: fixed;
|
|
2004
|
-
top: 12px;
|
|
2005
|
-
right: 16px;
|
|
2006
|
-
z-index: 60;
|
|
2007
|
-
display: inline-flex;
|
|
2008
|
-
align-items: center;
|
|
2009
|
-
justify-content: center;
|
|
2010
|
-
width: 36px;
|
|
2011
|
-
height: 36px;
|
|
2012
|
-
padding: 0;
|
|
2013
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2014
|
-
border-radius: 11px;
|
|
2015
|
-
background: var(--dpk-paper-raised);
|
|
2016
|
-
color: var(--dpk-ink-soft);
|
|
2017
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
2018
|
-
cursor: pointer;
|
|
2019
|
-
transition:
|
|
2020
|
-
color 180ms var(--dpk-ease),
|
|
2021
|
-
background 180ms var(--dpk-ease),
|
|
2022
|
-
border-color 180ms var(--dpk-ease),
|
|
2023
|
-
box-shadow 180ms var(--dpk-ease),
|
|
2024
|
-
transform 220ms var(--dpk-ease-spring);
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
.dpk-fab:hover {
|
|
2028
|
-
color: var(--dpk-ink);
|
|
2029
|
-
border-color: var(--dpk-rule-hover);
|
|
2030
|
-
transform: translateY(-1px);
|
|
2031
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow);
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
.dpk-fab:active {
|
|
2035
|
-
transform: translateY(0) scale(0.95);
|
|
2036
|
-
box-shadow: var(--dpk-shadow-xs);
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
.dpk-fab:focus-visible {
|
|
2040
|
-
outline: none;
|
|
2041
|
-
box-shadow: var(--dpk-focus);
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
.dpk-fab[aria-expanded='true'] {
|
|
2045
|
-
color: var(--dpk-accent-ink);
|
|
2046
|
-
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
2047
|
-
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
2048
|
-
box-shadow:
|
|
2049
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
2050
|
-
0 6px 16px -6px color-mix(in srgb, var(--dpk-accent) 70%, transparent);
|
|
2051
|
-
}
|
|
2052
|
-
|
|
2053
|
-
.dpk-fab[aria-expanded='true']:hover {
|
|
2054
|
-
box-shadow:
|
|
2055
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
2056
|
-
0 10px 22px -8px color-mix(in srgb, var(--dpk-accent) 80%, transparent);
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
.dpk-fab-icon {
|
|
2060
|
-
position: relative;
|
|
2061
|
-
display: block;
|
|
2062
|
-
width: 16px;
|
|
2063
|
-
height: 12px;
|
|
2064
|
-
border: 1.6px solid currentColor;
|
|
2065
|
-
border-radius: 4px;
|
|
2066
|
-
}
|
|
2067
|
-
|
|
2068
|
-
.dpk-fab-icon::after {
|
|
2069
|
-
content: '';
|
|
2070
|
-
position: absolute;
|
|
2071
|
-
left: 2px;
|
|
2072
|
-
bottom: -4px;
|
|
2073
|
-
border-left: 3.5px solid transparent;
|
|
2074
|
-
border-right: 3.5px solid transparent;
|
|
2075
|
-
border-top: 4px solid currentColor;
|
|
2076
|
-
}
|
|
2077
|
-
|
|
2078
|
-
.dpk-fab-badge {
|
|
2079
|
-
position: absolute;
|
|
2080
|
-
top: -6px;
|
|
2081
|
-
right: -6px;
|
|
2082
|
-
min-width: 18px;
|
|
2083
|
-
height: 18px;
|
|
2084
|
-
padding: 0 4px;
|
|
2085
|
-
border: 2px solid var(--dpk-paper);
|
|
2086
|
-
border-radius: 999px;
|
|
2087
|
-
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
2088
|
-
color: var(--dpk-accent-ink);
|
|
2089
|
-
font-family: var(--dpk-mono);
|
|
2090
|
-
font-size: 9.5px;
|
|
2091
|
-
font-weight: 650;
|
|
2092
|
-
font-variant-numeric: tabular-nums;
|
|
2093
|
-
line-height: 14px;
|
|
2094
|
-
text-align: center;
|
|
2095
|
-
box-shadow: 0 3px 8px -2px color-mix(in srgb, var(--dpk-accent) 60%, transparent);
|
|
2096
|
-
animation: dpk-pop 260ms var(--dpk-ease-spring);
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
|
-
@keyframes dpk-pop {
|
|
2100
|
-
from {
|
|
2101
|
-
transform: scale(0.4);
|
|
2102
|
-
opacity: 0;
|
|
2103
|
-
}
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
/* ------------------------------------------------------ hand-off dock */
|
|
2107
|
-
|
|
2108
|
-
.dpk-dock {
|
|
2109
|
-
position: fixed;
|
|
2110
|
-
right: 16px;
|
|
2111
|
-
bottom: 16px;
|
|
2112
|
-
z-index: 60;
|
|
2113
|
-
display: flex;
|
|
2114
|
-
flex-direction: column;
|
|
2115
|
-
align-items: flex-end;
|
|
2116
|
-
gap: 8px;
|
|
2117
|
-
max-width: calc(100vw - 32px);
|
|
2118
|
-
animation: dpk-dock-in 260ms var(--dpk-ease) backwards;
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
@keyframes dpk-dock-in {
|
|
2122
|
-
from {
|
|
2123
|
-
transform: translateY(8px);
|
|
2124
|
-
opacity: 0;
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
.dpk-dock-actions {
|
|
2129
|
-
display: flex;
|
|
2130
|
-
gap: 6px;
|
|
2131
|
-
padding: 6px;
|
|
2132
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2133
|
-
border-radius: var(--dpk-radius-lg);
|
|
2134
|
-
background: var(--dpk-glass);
|
|
2135
|
-
backdrop-filter: blur(12px);
|
|
2136
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2137
|
-
}
|
|
2138
|
-
|
|
2139
|
-
.dpk-dock-note {
|
|
2140
|
-
max-width: 320px;
|
|
2141
|
-
margin: 0;
|
|
2142
|
-
padding: 8px 12px;
|
|
2143
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2144
|
-
border-radius: var(--dpk-radius);
|
|
2145
|
-
background: var(--dpk-paper-raised);
|
|
2146
|
-
box-shadow: var(--dpk-shadow);
|
|
2147
|
-
color: var(--dpk-ink-soft);
|
|
2148
|
-
font-size: 12px;
|
|
2149
|
-
line-height: 1.6;
|
|
2150
|
-
}
|
|
2151
|
-
|
|
2152
|
-
/* The template's name repeats the mark above the title; the title needs the room more. */
|
|
2153
|
-
@media (max-width: 1100px) {
|
|
2154
|
-
.dpk-header-meta > .dpk-meta-name {
|
|
2155
|
-
display: none;
|
|
2156
|
-
}
|
|
2157
|
-
}
|
|
2158
|
-
|
|
2159
|
-
@media (max-width: 720px) {
|
|
2160
|
-
/* The version select stays: it is the reader's only way to switch
|
|
2161
|
-
versions; so do the counts, the review's progress at a glance. */
|
|
2162
|
-
.dpk-header-meta > :not(.dpk-version, .dpk-meta-count) {
|
|
2163
|
-
display: none;
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
/* On a phone the row may be narrower than both: the counts stay whole and
|
|
2167
|
-
the version select gives up its width instead. */
|
|
2168
|
-
.dpk-header-meta {
|
|
2169
|
-
min-width: 0;
|
|
2170
|
-
max-width: 100%;
|
|
2171
|
-
}
|
|
2172
|
-
|
|
2173
|
-
.dpk-header-meta > .dpk-version {
|
|
2174
|
-
display: flex;
|
|
2175
|
-
min-width: 0;
|
|
2176
|
-
}
|
|
2177
|
-
|
|
2178
|
-
.dpk-header-meta .dpk-version-select {
|
|
2179
|
-
width: 100%;
|
|
2180
|
-
min-width: 0;
|
|
2181
|
-
text-overflow: ellipsis;
|
|
2182
|
-
}
|
|
2183
|
-
|
|
2184
|
-
.dpk-header-meta > .dpk-meta-count {
|
|
2185
|
-
flex: none;
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
|
-
/* The title takes the first row whole; the version select and tools wrap below it. */
|
|
2189
|
-
.dpk-title {
|
|
2190
|
-
flex: 1 0 100%;
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
.dpk-brand {
|
|
2194
|
-
display: none;
|
|
2195
|
-
}
|
|
2196
|
-
|
|
2197
|
-
/* The page's own content goes last, so a long one cannot push the version
|
|
2198
|
-
select and tools below it. */
|
|
2199
|
-
.dpk-header-slot {
|
|
2200
|
-
order: 1;
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
`],Hc=30,Fc=st(m(),T({base:m(),value:m()})),Hr=t=>{const e=S(Fc,t);return e.success?e.output:null},Kc=t=>t.key===void 0?JSON.stringify(["field",t.hosts,t.name,t.base]):JSON.stringify(["key",t.key,t.name]),Wc=(t,e,s)=>{const{[e]:n,...r}=t;if(s.value===s.base)return r;const i=Object.entries({...r,[e]:s});return Object.fromEntries(i.slice(Math.max(0,i.length-Hc)))},Zc=(t,e)=>{if(!(e in t))return t;const{[e]:s,...n}=t;return n},Vc=(t,e,s)=>{const n=t[e];return n===void 0||n.base!==s||n.value===s?null:n.value},Gc=new Set(["text","search","url","email","tel"]),Fr=t=>t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&Gc.has(t.type)?t:null,Jc=(t,e)=>{const s=[];let n=e.getRootNode();for(;n instanceof ShadowRoot;){if(n.host===t)return s;s.unshift(n.host.localName),n=n.host.getRootNode()}return null},Yc=t=>{let e=t;for(;e!==null;){const s=e.getAttribute("data-dpk-text-key");if(s!==null&&s!=="")return s;const n=e.getRootNode();e=e.parentElement??(n instanceof ShadowRoot?n.host:null)}},Qc=t=>t.getAttribute("aria-label")??(t.placeholder||t.name||t.localName),bs=t=>typeof t=="string"?[t]:Array.isArray(t)?t.flatMap(bs):typeof t=="object"&&t!==null?Object.values(t).flatMap(bs):[],Kr=t=>t.replace(/\s+/g," ").trim();class Xc{#e;#r;#n=null;#i="";#s=new WeakMap;#t=new Set;constructor(e,s){this.#e=e,this.#r=s,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#r.persist()?xc(Hr):G(Hr),this.#i=this.#r.storageKey()),this.#e.addEventListener("focusin",this.#a),this.#e.addEventListener("input",this.#l)}hostDisconnected(){this.#e.removeEventListener("focusin",this.#a),this.#e.removeEventListener("input",this.#l)}settle(e){const s=new Set(e.flatMap(bs).map(Kr));for(const n of this.#t){if(!s.has(Kr(n.value)))continue;this.#t.delete(n);const r=this.#s.get(n);r!==void 0&&this.#d(Zc(this.#o(),r.id))}}#a=e=>{const s=Fr(e.composedPath()[0]);if(s===null||this.#t.has(s))return;const n=Jc(this.#e,s);if(n===null)return;const r=Yc(s),i=s.value,a=Kc({...r===void 0?{}:{key:r},hosts:n,name:Qc(s),base:i});this.#s.set(s,{id:a,base:i});const o=Vc(this.#o(),a,i);o!==null&&queueMicrotask(()=>{if(s.value===i){s.value=o;try{s.setSelectionRange(o.length,o.length)}catch{}this.#t.add(s),s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}})};#l=e=>{const s=Fr(e.composedPath()[0]),n=s===null?void 0:this.#s.get(s);if(!(s===null||n===void 0)){for(const r of this.#t)r.isConnected||this.#t.delete(r);this.#t.add(s),this.#d(Wc(this.#o(),n.id,{base:n.base,value:s.value}))}};#o(){return this.#n?.read(this.#i)??{}}#d(e){Object.keys(e).length===0?this.#n?.remove(this.#i):this.#n?.write(this.#i,e)}}class ed{#e;#r;#n;#i=null;#s=!1;constructor(e,s={}){this.#e=e,this.#r=s.fetchVersions??pr,this.#n=s.switchTo??hr,e.addController(this)}hostConnected(){}load(){this.#s||this.#i!==null||(this.#s=!0,this.#r().then(e=>{this.#i=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!==N&&this.#n(e===""?null:e)}render(e){const s=D(e),n=dr({current:N,requested:ns(location.search)!==null,published:this.#i,text:{pinned:s.versionPinned,latest:s.versionLatest}}),r=()=>this.load();return k`<span class="dpk-version"
|
|
2204
|
-
>dev-process-kit@<select
|
|
2205
|
-
class="dpk-version-select"
|
|
2206
|
-
aria-label=${s.versionLabel}
|
|
2207
|
-
title=${s.versionLabel}
|
|
2208
|
-
@pointerenter=${r}
|
|
2209
|
-
@focus=${r}
|
|
2210
|
-
@change=${is(i=>this.pick(i))}
|
|
2211
|
-
>
|
|
2212
|
-
${n.options.map(i=>k`<option value=${i.value} ?selected=${i.value===n.value}>${i.label}</option>`)}
|
|
2213
|
-
</select></span
|
|
2214
|
-
>`}}class td extends F{static{this.styles=Bc}static{this.properties={storageKey:{type:String,attribute:"storage-key"},storage:{type:String},notes:{type:String},theme:{type:String},notesOpen:{state:!0}}}#e=!1;#r=new zc(this);#n=new yc(this,()=>this.storage!=="off"&&this.storage!=="memory");#i=new bc(this);#s=new Cc(this);#t=new Uc(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",template:()=>this.definition.name,layout:()=>this.sidebarLayout});#a=new Nc(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",template:()=>this.definition.name});#l=new Rc(this);#o=new Xc(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",storageKey:()=>`${this.storageKey??ps(this.definition.name)}:unsent-text`});#d=!1;#v=new ed(this);#x=new Tc(this,()=>this.storage!=="off"&&this.storage!=="memory",()=>this.#c?.setTemplate(this.definition));#f;#c;#h=Wt;#p=null;#u=new Set;#k=null;#y;#m;#$;#S=[];#E;#D=new Promise(e=>{this.#E=e});#_;get locale(){return this.#x.locale}get definition(){const e=this.locale;return this.#f?.locale!==e&&(this.#f={locale:e,value:this.definitionFor(e)}),this.#f.value}connectedCallback(){super.connectedCallback(),this.dataset.template=this.definition.name,this.#e||(this.#e=!0,this.notesOpen=this.notes==="on"||this.notes==="open"),this.#R(),window.addEventListener("hashchange",this.#M),this.addEventListener("click",this.#N),this.addEventListener("dpk-comment-targets-change",this.#g),this.addEventListener("dpk-comment-request",this.#j),this.addEventListener("dpk-comment-submit",this.#I),this.addEventListener("dpk-element-action",this.#q),this.#$??=new MutationObserver(this.#g),this.#g()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("hashchange",this.#M),this.removeEventListener("click",this.#N),this.#m?.disconnect(),this.#$?.disconnect(),this.removeEventListener("dpk-comment-targets-change",this.#g),this.removeEventListener("dpk-comment-request",this.#j),this.removeEventListener("dpk-comment-submit",this.#I),this.removeEventListener("dpk-element-action",this.#q)}#R(e=0){if(this.#c){this.#L();return}if(this.childNodes.length===0&&e<2){queueMicrotask(()=>this.#R(e+1));return}this.#V()}#L(){this.#y||(this.#y=this.#c?.subscribe(()=>this.#Q()))}willUpdate(){this.dataset.theme=this.#n.resolve(Oe(this.theme))}updated(){this.#ee(),this.#X(),this.#d&&(this.#d=!1,this.renderRoot.querySelector(".dpk-sidebar-toggle")?.focus())}get api(){return this.#_??=this.#Z(),this.#_}get controller(){if(!this.#c)throw new Error(`<${this.tagName.toLowerCase()}> is not initialized yet`);return this.#c}get derivation(){return this.controller.derivation}get navigation(){return this.#h}dispatch(e){const s=this.controller.dispatch(e);return s.ok&&this.#o.settle([e.payload,e.note]),s.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:s.issues},bubbles:!0,composed:!0})),this.#b()),s}dispatchBatch(e){const s=this.controller.dispatchBatch(e);return s.ok&&this.#o.settle(e.flatMap(n=>[n.payload,n.note])),s.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:s.issues},bubbles:!0,composed:!0})),this.#b()),s}editComment(e,s){const n=this.controller.editComment(e,s);return n.ok&&this.#o.settle([s]),n.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:n.issues},bubbles:!0,composed:!0})),this.#b()),n}removeAction(e){this.controller.removeAction(e)}clearActions(){this.controller.clearActions()}navigate(e,s={}){const n=ge(this.#w());this.#h=Vt(this.#h,e,this.definition.navigationHierarchy),this.#A(s.replace??!1);const r=ge(this.#w());this.requestUpdate(),n!==r&&(this.#b(),this.dispatchEvent(new CustomEvent("dpk-navigate",{detail:{navigation:this.#h},bubbles:!0,composed:!0})))}hashFor(e){const s=this.#w();return ge(this.definition.resolveNavigation(this.derivation.state,Vt(s,e,this.definition.navigationHierarchy)))}requestComment(e){this.#p=typeof e=="string"?e:M(e),this.notesOpen=!0,this.requestUpdate()}get integratedReview(){return!1}get canSendToClaude(){return this.#i.available}sendToClaude(){return this.#i.send({brief:this.api.exportBrief(),draft:Bt(this.derivation.actions),anchor:this})}renderReviewPanel(e){return k`<dpk-component-comment-panel
|
|
2215
|
-
.definition=${this.controller.definition}
|
|
2216
|
-
.state=${e.state}
|
|
2217
|
-
.navigation=${e.navigation}
|
|
2218
|
-
.derivation=${this.derivation}
|
|
2219
|
-
.issues=${this.controller.lastIssues}
|
|
2220
|
-
.exportBrief=${()=>this.api.exportBrief()}
|
|
2221
|
-
.sendToClaude=${this.canSendToClaude?()=>this.sendToClaude():void 0}
|
|
2222
|
-
.pendingTarget=${this.#p}
|
|
2223
|
-
.embedded=${this.integratedReview}
|
|
2224
|
-
.onDelete=${s=>this.removeAction(s)}
|
|
2225
|
-
.onEditComment=${(s,n)=>this.editComment(s,n)}
|
|
2226
|
-
.onClear=${()=>this.clearActions()}
|
|
2227
|
-
.onComment=${(s,n)=>{const r=this.dispatch({type:L,target:s,payload:{body:n}});return r.ok&&(this.#p=null),r}}
|
|
2228
|
-
></dpk-component-comment-panel>`}renderChrome(e,s){const n=e.actions.length,r=e.actions.filter(u=>u.type===L).length,i=n-r,a=D(this.locale),o=s.sidebarHidden===!0||!s.sidebar&&!this.hasSidebarContent(),l=this.sidebarLayout.side,c=this.#F,p=!o&&this.#C&&(c?!this.#a.drawerOpen:this.#a.collapsed),d=o?g:this.#K(p,c),h=this.definition.title(e.state);return k`
|
|
2229
|
-
<div class="dpk-shell" ?data-resizing=${this.#t.dragging}>
|
|
2230
|
-
<header class="dpk-header">
|
|
2231
|
-
<span class="dpk-brand" aria-hidden="true"></span>
|
|
2232
|
-
<div class="dpk-title">
|
|
2233
|
-
<span class="dpk-template-mark">${this.definition.label}</span>
|
|
2234
|
-
<h1 title=${h}>${h}</h1>
|
|
2235
|
-
</div>
|
|
2236
|
-
<div class="dpk-header-slot">
|
|
2237
|
-
${s.header??g}
|
|
2238
|
-
<slot name="header"></slot>
|
|
2239
|
-
</div>
|
|
2240
|
-
<div class="dpk-header-meta">
|
|
2241
|
-
${this.#v.render(this.locale)}
|
|
2242
|
-
<span class="dpk-meta-name">${this.definition.name}</span>
|
|
2243
|
-
<span class="dpk-meta-count" data-active=${n>0?"true":"false"}>
|
|
2244
|
-
${a.draftCount(i,r)}
|
|
2245
|
-
</span>
|
|
2246
|
-
</div>
|
|
2247
|
-
<div class="dpk-header-tools">${this.#B()} ${this.#H()}</div>
|
|
2248
|
-
</header>
|
|
2249
|
-
<div class="dpk-body" data-sidebar-side=${l} ?data-sidebar-drawer=${c}>
|
|
2250
|
-
${l==="right"?d:g}
|
|
2251
|
-
<aside
|
|
2252
|
-
id="dpk-sidebar"
|
|
2253
|
-
class="dpk-sidebar"
|
|
2254
|
-
?hidden=${o||p}
|
|
2255
|
-
style=${`--dpk-sidebar-width: ${this.#t.width}px`}
|
|
2256
|
-
>
|
|
2257
|
-
${s.sidebar??g}
|
|
2258
|
-
<slot name="sidebar"></slot>
|
|
2259
|
-
</aside>
|
|
2260
|
-
${l==="left"?d:g}
|
|
2261
|
-
${c&&!p&&!o?k`<div class="dpk-sidebar-scrim" @click=${()=>this.#a.closeDrawer()}></div>`:g}
|
|
2262
|
-
<main class="dpk-main">
|
|
2263
|
-
<div class="dpk-main-body">
|
|
2264
|
-
${this.#k?k`<div class="dpk-banner" role="alert">
|
|
2265
|
-
<strong>${a.baseDataError}</strong>
|
|
2266
|
-
<code>${this.#k}</code>
|
|
2267
|
-
</div>`:g}
|
|
2268
|
-
${s.main??g}
|
|
2269
|
-
<slot name="main"></slot>
|
|
2270
|
-
<section class="dpk-orphans" ?hidden=${this.#r.orphans===0}>
|
|
2271
|
-
<p class="dpk-label">previews without metadata</p>
|
|
2272
|
-
<slot name="preview"></slot>
|
|
2273
|
-
</section>
|
|
2274
|
-
</div>
|
|
2275
|
-
<div class="dpk-memo" ?hidden=${!this.hasMemoContent()}>
|
|
2276
|
-
<details class="dpk-memo-fold">
|
|
2277
|
-
<summary class="dpk-memo-bar">${ss()} ${a.memo}</summary>
|
|
2278
|
-
<div class="dpk-memo-body"><slot name="memo"></slot></div>
|
|
2279
|
-
</details>
|
|
2280
|
-
</div>
|
|
2281
|
-
</main>
|
|
2282
|
-
${this.integratedReview?g:k`<aside class="dpk-notes" ?hidden=${!this.notesOpen}>${this.renderReviewPanel(e)}</aside>`}
|
|
2283
|
-
</div>
|
|
2284
|
-
${s.footer||this.hasFooterContent()?k`<footer class="dpk-footer">
|
|
2285
|
-
${s.footer??g}
|
|
2286
|
-
<slot name="footer"></slot>
|
|
2287
|
-
</footer>`:g}
|
|
2288
|
-
${this.integratedReview?g:k`<button
|
|
2289
|
-
class="dpk-fab"
|
|
2290
|
-
type="button"
|
|
2291
|
-
aria-expanded=${this.notesOpen?"true":"false"}
|
|
2292
|
-
title=${a.reviewToggle}
|
|
2293
|
-
@click=${()=>{this.notesOpen=!this.notesOpen}}
|
|
2294
|
-
>
|
|
2295
|
-
<span class="dpk-fab-icon" aria-hidden="true"></span>
|
|
2296
|
-
<span
|
|
2297
|
-
class="dpk-label"
|
|
2298
|
-
style="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"
|
|
2299
|
-
>
|
|
2300
|
-
${a.review}
|
|
2301
|
-
</span>
|
|
2302
|
-
${n>0?k`<span class="dpk-fab-badge">${n}</span>`:g}
|
|
2303
|
-
</button>`}
|
|
2304
|
-
${this.integratedReview?g:this.#U(n)}
|
|
2305
|
-
</div>
|
|
2306
|
-
`}#U(e){const s=cc({actions:e,railOpen:this.notesOpen,sendable:this.canSendToClaude,locale:this.locale},this.#s.state);if(!s)return g;const n=D(this.locale);return k`<div class="dpk-dock" role="group" aria-label=${n.handoffLabel}>
|
|
2307
|
-
${s.note?k`<p class="dpk-dock-note" role="alert">${s.note}</p>`:g}
|
|
2308
|
-
<div class="dpk-dock-actions">
|
|
2309
|
-
${s.send?k`<button
|
|
2310
|
-
class="dpk-btn dpk-btn--accent"
|
|
2311
|
-
type="button"
|
|
2312
|
-
?disabled=${s.send.disabled}
|
|
2313
|
-
@click=${()=>{this.#s.send(()=>this.sendToClaude())}}
|
|
2314
|
-
>
|
|
2315
|
-
${s.send.label}
|
|
2316
|
-
</button>`:g}
|
|
2317
|
-
<button
|
|
2318
|
-
class=${s.send?"dpk-btn":"dpk-btn dpk-btn--accent"}
|
|
2319
|
-
type="button"
|
|
2320
|
-
data-status=${s.copy.status}
|
|
2321
|
-
title=${n.handoffCopyTitle}
|
|
2322
|
-
@click=${()=>{this.#s.copy(()=>this.api.exportBrief())}}
|
|
2323
|
-
>
|
|
2324
|
-
${s.copy.label}
|
|
2325
|
-
</button>
|
|
2326
|
-
</div>
|
|
2327
|
-
</div>`}#B(){const e=this.locale,s=D(e).language;return k`<select
|
|
2328
|
-
class="dpk-lang-select"
|
|
2329
|
-
aria-label=${s}
|
|
2330
|
-
title=${s}
|
|
2331
|
-
@change=${is(n=>{const r=yt.find(i=>i===n);r!==void 0&&this.#x.pick(r)})}
|
|
2332
|
-
>
|
|
2333
|
-
${yt.map(n=>k`<option value=${n} lang=${n} ?selected=${n===e}>
|
|
2334
|
-
${fo[n]}
|
|
2335
|
-
</option>`)}
|
|
2336
|
-
</select>`}#H(){const e=this.dataset.theme==="dark",s=D(this.locale),n=e?s.useLightTheme:s.useDarkTheme;return k`<button
|
|
2337
|
-
class="dpk-theme-toggle"
|
|
2338
|
-
type="button"
|
|
2339
|
-
aria-label=${n}
|
|
2340
|
-
title=${n}
|
|
2341
|
-
@click=${()=>this.#n.toggle(Oe(this.theme))}
|
|
2342
|
-
>
|
|
2343
|
-
${e?tl():sl()}
|
|
2344
|
-
</button>`}get#C(){return this.sidebarLayout.collapsible!==!1}get#F(){return this.#l.narrow&&this.#C&&this.sidebarLayout.narrow!=="stack"}#K(e,s){const n=this.#C?this.#W(e,s):g;return e||s?k`<div class="dpk-sidebar-strip">${n}</div>`:this.sidebarLayout.side==="left"?k`${this.#z()}${n}`:k`${n}${this.#z()}`}#W(e,s){const n=D(this.locale),r=Ic(this.sidebarLayout.side,e),i=r.action==="collapse"?n.collapseSidebar:n.expandSidebar;return k`<button
|
|
2345
|
-
class="dpk-sidebar-toggle"
|
|
2346
|
-
type="button"
|
|
2347
|
-
aria-controls="dpk-sidebar"
|
|
2348
|
-
aria-expanded=${e?"false":"true"}
|
|
2349
|
-
aria-label=${i}
|
|
2350
|
-
title=${i}
|
|
2351
|
-
@click=${()=>{this.#d=!0,s?this.#a.toggleDrawer():this.#a.toggle()}}
|
|
2352
|
-
>
|
|
2353
|
-
${r.points==="left"?ir():ss()}
|
|
2354
|
-
</button>`}#z(){const e=D(this.locale),s=this.#t.handlers;return k`<div
|
|
2355
|
-
class="dpk-sidebar-resizer"
|
|
2356
|
-
role="separator"
|
|
2357
|
-
tabindex="0"
|
|
2358
|
-
aria-orientation="vertical"
|
|
2359
|
-
aria-label=${e.resizeSidebar}
|
|
2360
|
-
aria-valuemin=${J.min}
|
|
2361
|
-
aria-valuemax=${J.max}
|
|
2362
|
-
aria-valuenow=${this.#t.width}
|
|
2363
|
-
title=${e.resizeSidebarHint}
|
|
2364
|
-
@pointerdown=${s.pointerdown}
|
|
2365
|
-
@pointermove=${s.pointermove}
|
|
2366
|
-
@pointerup=${s.pointerup}
|
|
2367
|
-
@pointercancel=${s.pointercancel}
|
|
2368
|
-
@keydown=${s.keydown}
|
|
2369
|
-
@dblclick=${s.dblclick}
|
|
2370
|
-
></div>`}render(){if(!this.#c)return g;const e=this.#O();return this.renderChrome(e,this.renderRegions(e))}get sidebarLayout(){return Pc}hasSidebarContent(){return this.querySelector('[slot="sidebar"]')!==null}hasMemoContent(){return this.querySelector('[slot="memo"]')!==null}hasFooterContent(){return this.querySelector('[slot="footer"]')!==null}context(){return this.#O()}#T(){return{definition:this.definition,controller:()=>this.controller,derivation:()=>this.derivation,ready:this.#D,navigation:()=>this.#w(),issues:()=>this.controller.lastIssues,dispatch:e=>this.dispatch(e),dispatchBatch:e=>this.dispatchBatch(e),subscribe:e=>(this.#u.add(e),()=>{this.#u.delete(e)}),editComment:(e,s)=>this.editComment(e,s),removeAction:e=>this.removeAction(e),clearActions:()=>this.clearActions(),navigate:(e,s)=>this.navigate(e,s),hashFor:e=>this.hashFor(e),requestComment:e=>this.requestComment(e)}}#Z(){return pc(this.#T(),this)}#P(){return Pr(this.#T())}#O(){return dc(this.#T())}#w(){return this.definition.resolveNavigation(this.derivation.state,this.#h)}#V(){const e=this.#J();this.#h=Dr();const s=this.storageKey;this.#c=new Rr({definition:this.definition,base:e,storage:this.#G(),...typeof s=="string"?{storageKey:s}:{}}),this.#L(),this.#g(),this.#A(!0),this.#E?.(),this.#Y(),this.requestUpdate()}#G(){return this.storage==="off"?null:this.storage==="memory"?new cs:ds()}#J(){const e=this.querySelector('script[type="application/json"]');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.#k='no <script type="application/json"> child found',this.definition.emptyBase();try{return this.definition.parseBase(JSON.parse(e.textContent))}catch(s){return console.error("[dev-process-kit] invalid base data:",s),this.#k=s instanceof Error?s.message:String(s),this.definition.emptyBase()}}#Y(){this.querySelector('script[type="application/json"]')||(this.#m=new MutationObserver(()=>{const e=this.querySelector('script[type="application/json"]');if(e){this.#m?.disconnect(),this.#m=void 0;try{this.controller.setBase(this.definition.parseBase(JSON.parse(e.textContent??"null")))}catch(s){console.error("[dev-process-kit] invalid base data:",s)}}}),this.#m.observe(this,{childList:!0,subtree:!0}))}#b(){const e=this.#P();for(const s of this.#u)s(e)}#Q(){if(!this.isConnected){this.requestUpdate(),this.#b();return}this.#A(!0),Nr(this.#S,this.controller.actions),queueMicrotask(this.#g),this.requestUpdate(),this.#b(),this.dispatchEvent(new CustomEvent("dpk-change",{detail:this.#P(),bubbles:!0,composed:!0}))}#A(e){const s=this.#w();this.#h=s,Lc(s,e)}#M=()=>{this.#h=Dr(),this.#A(!0),this.requestUpdate(),this.#b(),this.dispatchEvent(new CustomEvent("dpk-navigate",{detail:{navigation:this.#h},bubbles:!0,composed:!0}))};#g=()=>{this.#$?.disconnect(),this.#S=wc(this,e=>{this.isConnected&&this.#$?.observe(e,{childList:!0,subtree:!0})}),this.#c&&(Nr(this.#S,this.#c.actions),this.#c.setComponentSnapshot(Sc(this.#S)))};#j=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!this.#c)return;const s=e.detail;typeof s!="object"||s===null||!("target"in s)||typeof s.target!="string"||(this.#g(),!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(r=>r.value===s.target))||this.requestComment(s.target)};#I=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#c)return;const s=S(Cl,e.detail);if(!s.success)return;this.#g();const{target:n,body:r}=s.output;if(!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(o=>o.value===n))return;this.dispatch({type:L,target:n,payload:{body:r}}).ok&&e.preventDefault()};#q=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#c)return;const s=S(ao,e.detail);if(!s.success)return;this.#g();const{type:n,target:r,payload:i}=s.output;if(!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(l=>l.value===r))return;this.dispatch({type:n,target:r,payload:i}).ok&&e.preventDefault()};#N=e=>{for(const s of e.composedPath()){if(!(s instanceof Element))continue;if(s===this||s.hasAttribute("data-template"))break;const n=s.getAttribute("data-dpk-navigate");if(n!==null){e.preventDefault(),this.navigate(Zt(n.includes("=")?n:`step=${n}`));return}const r=s.getAttribute("data-dpk-comment");if(r!==null){e.preventDefault(),this.requestComment(r);return}}};#X(){const e=this.renderRoot.querySelector(".dpk-shell"),s=this.renderRoot.querySelector(".dpk-dock-actions");e&&(s?e.style.setProperty("--dpk-dock-space",`${s.offsetWidth+8}px`):e.style.removeProperty("--dpk-dock-space"))}#ee(){this.#r.route()}}export{Pe as $,ts as A,Go as B,L as C,ar as D,Wt as E,N as F,sr as G,rr as H,es as I,nr as J,tr as K,Cr as L,cs as M,Zt as N,On as O,Za as P,Vt as Q,Va as R,Bt as S,td as T,Mn as U,M as V,ls as W,nt as X,Nt as Y,Ve as Z,or as _,Ht as a,wn as a$,Ze as a0,Ci as a1,B as a2,g as a3,k as a4,Jn as a5,Vo as a6,li as a7,F as a8,$t as a9,P as aA,Ie as aB,G as aC,wl as aD,is as aE,$l as aF,ot as aG,de as aH,Yt as aI,Jt as aJ,yn as aK,Ka as aL,Ha as aM,Hs as aN,xn as aO,C as aP,Qn as aQ,Xn as aR,vt as aS,Gs as aT,$e as aU,He as aV,bt as aW,ir as aX,Zo as aY,Wo as aZ,An as a_,Xo as aa,el as ab,qt as ac,fe as ad,Le as ae,Z as af,m as ag,tt as ah,v as ai,w as aj,Ln as ak,Pn as al,V as am,ue as an,En as ao,ss as ap,Qo as aq,It as ar,S as as,T as at,_n as au,jt as av,Sn as aw,$n as ax,Rn as ay,Fa as az,vn as b,Yn as b0,er as b1,Rr as c,Ut as d,Ga as e,Gt as f,qn as g,ze as h,Sr as i,St as j,jn as k,Xa as l,Dt as m,ds as n,ps as o,Wa as p,ol as q,za as r,ml as s,Ar as t,ae as u,Ya as v,ge as w,Yo as x,Jo as y,Xt as z};
|