wicked-studio 0.14.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +6 -4
  2. package/dist/assets/KnowledgeGraph-Cpm46tEp.js +1 -0
  3. package/dist/assets/WickedSansA-Regular-CGPJLyb8.woff2 +0 -0
  4. package/dist/assets/WickedSansA-SemiBold-Bk9KXUaV.woff2 +0 -0
  5. package/dist/assets/favicon-BJA6hF2f.svg +1 -0
  6. package/dist/assets/index-BRBwWQMH.css +32 -0
  7. package/dist/assets/index-CVrWDGRP.js +1097 -0
  8. package/dist/assets/wicked-studio-lettering-small-CBwSGqop.svg +2 -0
  9. package/dist/assets/wicked-studio-wordmark-small-gF5xn6IC.svg +2 -0
  10. package/dist/editors/wicked-apps/editor.json +45 -0
  11. package/dist/editors/wicked-apps/icon.svg +1 -0
  12. package/dist/editors/wicked-apps/index.html +151 -0
  13. package/dist/editors/wicked-deck/editor.json +1 -1
  14. package/dist/editors/wicked-deck/index.html +12 -8
  15. package/dist/editors/wicked-doc/editor.json +1 -1
  16. package/dist/editors/wicked-doc/index.html +12 -8
  17. package/dist/editors/wicked-insights/editor.json +1 -1
  18. package/dist/editors/wicked-insights/index.html +1 -1
  19. package/dist/editors/wicked-page/editor.json +1 -1
  20. package/dist/editors/wicked-page/index.html +12 -8
  21. package/dist/editors/wicked-video/editor.json +1 -1
  22. package/dist/editors/wicked-video/index.html +1 -1
  23. package/dist/fonts/LICENSE-WickedSans.txt +97 -0
  24. package/dist/index.html +3 -2
  25. package/dist/testid-inventory.json +10850 -6700
  26. package/package.json +2 -2
  27. package/dist/assets/WickedSans-Regular-fb698rcD.woff2 +0 -0
  28. package/dist/assets/WickedSans-SemiBold-CD53n1AC.woff2 +0 -0
  29. package/dist/assets/index-BUZ_-Syk.css +0 -32
  30. package/dist/assets/index-u4O_7N-b.js +0 -986
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="wicked-editor" content="wicked-page">
6
- <meta name="wicked-editor-version" content="0.14.1">
6
+ <meta name="wicked-editor-version" content="0.15.0">
7
7
  <title>Document</title>
8
8
  <style>
9
9
  /* The plugin's own chrome takes the host's tokens (`host.hello.theme` / `host.theme`), with plain
@@ -45,7 +45,7 @@
45
45
  </style>
46
46
  </head>
47
47
  <body data-size="pane">
48
- <script>var wickedEditor=(function(K){"use strict";var on=Object.defineProperty;var rn=(K,N,W)=>N in K?on(K,N,{enumerable:!0,configurable:!0,writable:!0,value:W}):K[N]=W;var lt=(K,N,W)=>rn(K,typeof N!="symbol"?N+"":N,W);const N=/^slide-(\d+)-([a-z-]+)-(\d+)$/,W=/^section-(\d+)$/,ct={heading:"heading",paragraph:"paragraph","list-item":"list item",quote:"quote",caption:"caption",cell:"table cell",link:"link",button:"button",image:"image",block:"block",text:"line"},dt=/^[A-Za-z]{2,}(?:[-_ ][A-Za-z]{2,})*$/;function ee(n,o){const s=N.exec(n);if(s!==null){const l=Number(s[1]),f=ct[s[2]??""]??(s[2]??"").replace(/-+/g," "),c=Number(s[3]);return o==="deck"?`slide ${l+1}’s ${f==="heading"&&c===1?"title":`${f} ${c}`}`:l===0?`${f} ${c}`:`${f} ${c} in section ${l+1}`}const r=W.exec(n);return r!==null?o==="deck"?`slide ${Number(r[1])+1}`:`section ${Number(r[1])+1}`:dt.test(n)?`the ${n.replace(/[-_]+/g," ").toLowerCase()}`:"this part"}function ut(n,o){const s=Object.entries(o).filter(([,r])=>!r.composite&&r.text!=="");return n.map(r=>{const l=r.reqId.trim();if(l==="")return{...r,wid:null};const f=s.find(([,c])=>pt(c.text,l));return{...r,wid:f===void 0?null:f[0]}})}const Pe=/[A-Za-z0-9_-]/,Xe=/[A-Za-z0-9]/;function pt(n,o){const s=n.toLowerCase(),r=o.toLowerCase();if(r==="")return!1;for(let l=s.indexOf(r);l!==-1;l=s.indexOf(r,l+1)){const f=s.charAt(l-1),c=s.charAt(l+r.length),h=Pe.test(f)||f==="."&&Xe.test(s.charAt(l-2)),x=Pe.test(c)||c==="."&&Xe.test(s.charAt(l+r.length+1));if(!h&&!x)return!0}return!1}function ft(n,o){const s=n.filter(l=>l.wid!==null).length,r=o>n.length?` (the first ${n.length} of ${o})`:"";return`${s} of ${n.length} named in this document${r}`}const ht={"Alt+J":{verb:"navigate",what:"next card or row"},"Alt+K":{verb:"navigate",what:"previous card or row"},"Alt+/":{verb:"navigate",what:"the keyboard shortcuts overlay"},"Alt+P":{verb:"navigate",what:"peek at the top item that needs you"},"Alt+G":{verb:"navigate",what:"jump to the top item that needs you"},"Alt+B":{verb:"navigate",what:"back to where you were"},"Alt+T":{verb:"navigate",what:"the run’s evidence timeline"},"Alt+U":{verb:"navigate",what:"the run’s unit list"},"Alt+A":{verb:"approve",what:"approve the open gate"},"Alt+R":{verb:"decide",what:"reject the open gate"},"Alt+X":{verb:"decide",what:"select a gate for batch resolution"},"Alt+N":{verb:"compose",what:"compose a steer note"}},yt=new Set(["Escape","Mod+K","Tab","Shift+Tab"]);function Ye(n){if(yt.has(n))return!0;const o=ht[mt(n)];return o!==void 0&&o.verb==="navigate"}function mt(n){const o=/^alt\+(.)$/i.exec(n);return o===null?n:`Alt+${o[1].toUpperCase()}`}function gt(n,o,s){return{left:n.left-(s.scrollX-o.scrollX),top:n.top-(s.scrollY-o.scrollY),width:n.width,height:n.height}}const vt=/^[A-Za-z0-9_.:-]{1,100}$/;function L(n){return typeof n=="number"&&isFinite(n)}function bt(n){if(typeof n!="object"||n===null)return!1;const o=n;return o.section!==void 0&&(typeof o.section!="string"||!vt.test(o.section))?!1:typeof o.text=="string"&&typeof o.composite=="boolean"}function wt(n){if(typeof n!="object"||n===null)return!1;const o=n;return L(o.x)&&L(o.y)&&L(o.width)&&L(o.height)&&L(o.top)&&L(o.left)&&L(o.right)&&L(o.bottom)}function kt(n){if(typeof n!="object"||n===null)return null;const o=n;if(o.v!==1)return null;const s=o.type;if(s==="wid-inventory"){const r=o.widMap,l=o.scrollX,f=o.scrollY;if(typeof r!="object"||r===null||!L(l)||!L(f))return null;const c={};for(const[D,S]of Object.entries(r)){if(!wt(S))return null;c[D]=S}const h=o.blocks;if(h===void 0)return{v:1,type:"wid-inventory",widMap:c,scrollX:l,scrollY:f};if(typeof h!="object"||h===null)return null;const x={};for(const[D,S]of Object.entries(h)){if(!bt(S))return null;x[D]={text:S.text,composite:S.composite,...S.cut===!0?{cut:!0}:{},...S.section!==void 0?{section:S.section}:{}}}return{v:1,type:"wid-inventory",widMap:c,scrollX:l,scrollY:f,blocks:x}}if(s==="scroll-state"){const r=o.scrollX,l=o.scrollY;return!L(r)||!L(l)?null:{v:1,type:"scroll-state",scrollX:r,scrollY:l}}if(s==="scroll-ack"){const r=o.wid;if(typeof r!="string"||r==="")return null;const l=o.scrollX,f=o.scrollY,c=o.seq;return{v:1,type:"scroll-ack",wid:r,...L(l)&&L(f)?{scrollX:l,scrollY:f}:{},...typeof c=="number"&&Number.isInteger(c)&&c>0?{seq:c}:{}}}if(s==="wid-click"){const r=o.wid;return typeof r!="string"||r===""?null:{v:1,type:"wid-click",wid:r}}if(s==="wid-hover"){const r=o.wid;return r!==null&&(typeof r!="string"||r==="")?null:{v:1,type:"wid-hover",wid:r}}return null}const xt=Object.freeze({v:1,type:"request-inventory"});function At(n,o){return o===void 0?{v:1,type:"scroll-to-wid",wid:n}:{v:1,type:"scroll-to-wid",wid:n,seq:o}}const Et="request-inventory";function $t(n){return n.includes(Et)}const Ct=`
48
+ <script>var wickedEditor=(function(z){"use strict";var En=Object.defineProperty;var Cn=(z,K,J)=>K in z?En(z,K,{enumerable:!0,configurable:!0,writable:!0,value:J}):z[K]=J;var bt=(z,K,J)=>Cn(z,typeof K!="symbol"?K+"":K,J);const K=/^slide-(\d+)-([a-z-]+)-(\d+)$/,J=/^section-(\d+)$/,wt={heading:"heading",paragraph:"paragraph","list-item":"list item",quote:"quote",caption:"caption",cell:"table cell",link:"link",button:"button",image:"image",block:"block",text:"line"},kt=/^[A-Za-z]{2,}(?:[-_ ][A-Za-z]{2,})*$/;function ne(e,n){const r=K.exec(e);if(r!==null){const i=Number(r[1]),l=wt[r[2]??""]??(r[2]??"").replace(/-+/g," "),a=Number(r[3]);return n==="deck"?`slide ${i+1}’s ${l==="heading"&&a===1?"title":`${l} ${a}`}`:i===0?`${l} ${a}`:`${l} ${a} in section ${i+1}`}const s=J.exec(e);return s!==null?n==="deck"?`slide ${Number(s[1])+1}`:`section ${Number(s[1])+1}`:kt.test(e)?`the ${e.replace(/[-_]+/g," ").toLowerCase()}`:"this part"}function xt(e,n){const r=Object.entries(n).filter(([,s])=>!s.composite&&s.text!=="");return e.map(s=>{const i=s.reqId.trim();if(i==="")return{...s,wid:null};const l=r.find(([,a])=>At(a.text,i));return{...s,wid:l===void 0?null:l[0]}})}const Xe=/[A-Za-z0-9_-]/,Ye=/[A-Za-z0-9]/;function At(e,n){const r=e.toLowerCase(),s=n.toLowerCase();if(s==="")return!1;for(let i=r.indexOf(s);i!==-1;i=r.indexOf(s,i+1)){const l=r.charAt(i-1),a=r.charAt(i+s.length),u=Xe.test(l)||l==="."&&Ye.test(r.charAt(i-2)),w=Xe.test(a)||a==="."&&Ye.test(r.charAt(i+s.length+1));if(!u&&!w)return!0}return!1}function Et(e,n){const r=e.filter(i=>i.wid!==null).length,s=n>e.length?` (the first ${e.length} of ${n})`:"";return`${r} of ${e.length} named in this document${s}`}const Ct={"Alt+J":{verb:"navigate",what:"next card or row"},"Alt+K":{verb:"navigate",what:"previous card or row"},"Alt+/":{verb:"navigate",what:"the keyboard shortcuts overlay"},"Alt+P":{verb:"navigate",what:"peek at the top item that needs you"},"Alt+G":{verb:"navigate",what:"jump to the top item that needs you"},"Alt+B":{verb:"navigate",what:"back to where you were"},"Alt+T":{verb:"navigate",what:"the run’s evidence timeline"},"Alt+U":{verb:"navigate",what:"the run’s unit list"},"Alt+A":{verb:"approve",what:"approve the open gate"},"Alt+R":{verb:"decide",what:"reject the open gate"},"Alt+X":{verb:"decide",what:"select a gate for batch resolution"},"Alt+N":{verb:"compose",what:"compose a steer note"}},St=new Set(["Escape","Mod+K","Tab","Shift+Tab"]);function He(e){if(St.has(e))return!0;const n=Ct[$t(e)];return n!==void 0&&n.verb==="navigate"}function $t(e){const n=/^alt\+(.)$/i.exec(e);return n===null?e:`Alt+${n[1].toUpperCase()}`}function Tt(e,n,r){return{left:e.left-(r.scrollX-n.scrollX),top:e.top-(r.scrollY-n.scrollY),width:e.width,height:e.height}}const Ot=/^[A-Za-z0-9_.:-]{1,100}$/;function j(e){return typeof e=="number"&&isFinite(e)}function Lt(e){if(typeof e!="object"||e===null)return!1;const n=e;return n.section!==void 0&&(typeof n.section!="string"||!Ot.test(n.section))?!1:typeof n.text=="string"&&typeof n.composite=="boolean"}function Rt(e){if(typeof e!="object"||e===null)return!1;const n=e;return j(n.x)&&j(n.y)&&j(n.width)&&j(n.height)&&j(n.top)&&j(n.left)&&j(n.right)&&j(n.bottom)}function Mt(e){if(typeof e!="object"||e===null)return null;const n=e;if(n.v!==1)return null;const r=n.type;if(r==="wid-inventory"){const s=n.widMap,i=n.scrollX,l=n.scrollY;if(typeof s!="object"||s===null||!j(i)||!j(l))return null;const a={};for(const[C,v]of Object.entries(s)){if(!Rt(v))return null;a[C]=v}const u=n.blocks;if(u===void 0)return{v:1,type:"wid-inventory",widMap:a,scrollX:i,scrollY:l};if(typeof u!="object"||u===null)return null;const w={};for(const[C,v]of Object.entries(u)){if(!Lt(v))return null;w[C]={text:v.text,composite:v.composite,...v.cut===!0?{cut:!0}:{},...v.section!==void 0?{section:v.section}:{}}}return{v:1,type:"wid-inventory",widMap:a,scrollX:i,scrollY:l,blocks:w}}if(r==="scroll-state"){const s=n.scrollX,i=n.scrollY;return!j(s)||!j(i)?null:{v:1,type:"scroll-state",scrollX:s,scrollY:i}}if(r==="scroll-ack"){const s=n.wid;if(typeof s!="string"||s==="")return null;const i=n.scrollX,l=n.scrollY,a=n.seq;return{v:1,type:"scroll-ack",wid:s,...j(i)&&j(l)?{scrollX:i,scrollY:l}:{},...typeof a=="number"&&Number.isInteger(a)&&a>0?{seq:a}:{}}}if(r==="wid-click"){const s=n.wid;return typeof s!="string"||s===""?null:{v:1,type:"wid-click",wid:s}}if(r==="wid-hover"){const s=n.wid;return s!==null&&(typeof s!="string"||s==="")?null:{v:1,type:"wid-hover",wid:s}}return null}const Ft=Object.freeze({v:1,type:"request-inventory"});function jt(e,n){return n===void 0?{v:1,type:"scroll-to-wid",wid:e}:{v:1,type:"scroll-to-wid",wid:e,seq:n}}const _t="request-inventory";function Bt(e){return e.includes(_t)}const Dt=`
49
49
  (function () {
50
50
  if (window.__wickedInstrumentBridge) return;
51
51
  window.__wickedInstrumentBridge = 1;
@@ -123,18 +123,22 @@
123
123
  post(inventory());
124
124
  }
125
125
  })();
126
- `;function St(n){const o=`<script>${Ct}<\/script>`;return/<\/body>/i.test(n)?n.replace(/<\/body>/i,()=>`${o}</body>`):`${n}${o}`}const H=String.raw`\s*-?(?:\d+(?:\.\d+)?|\.\d+)%?\s*`,Tt=new RegExp(`^(?:#(?:[0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})|rgba?\\((?:${H},){2}${H}(?:,${H})?\\)|hsla?\\(\\s*-?\\d+(?:\\.\\d+)?(?:deg)?\\s*,${H},${H}(?:,${H})?\\)|var\\(--wi-[a-z0-9-]{1,40}\\)|revert-layer)$`,"i");function Ot(n,o=new Set){if(!Tt.test(n))return!1;const s=/^var\((--wi-[a-z0-9-]+)\)$/i.exec(n);return s===null||o.has(s[1].toLowerCase())}const Lt=[["--wi-bg","Background"],["--wi-surface","Surface"],["--wi-card-bg","Card"],["--wi-primary","Primary"],["--wi-secondary","Secondary"],["--wi-accent","Accent"],["--wi-text","Text"],["--wi-text-secondary","Secondary text"],["--wi-muted","Muted"],["--wi-border","Border"]],Ae="revert-layer";function Mt(n){const o=new Map;for(const l of n.matchAll(/(--wi-[a-z-]{1,40})\s*:\s*([^;}{]{1,80})/gi))o.set(l[1].toLowerCase(),l[2].trim());const s=new Set,r=[];for(const[l,f]of Lt){const c=o.get(l);if(c===void 0)continue;const h=c.startsWith("#")?c.toLowerCase():c;!Ot(h)||s.has(h.toLowerCase())||(s.add(h.toLowerCase()),r.push({token:l,value:h,label:f}))}return r}const te="wicked.editor",ne=1,We=n=>typeof n=="object"&&n!==null&&!Array.isArray(n),Bt=["card","options","full"];function Ft(n){return n==="inline"?"card":n==="pane"?"options":"full"}function _t(n){return n==="card"?"inline":n==="options"?"pane":"full"}function Rt(n){const o=We(n)?n:{},s=o.size==="inline"||o.size==="full"?o.size:"pane",r=o.protocol===2?2:1,l=r===2&&typeof o.tab=="string"?o.tab:null,f=r===2&&Bt.includes(o.surface)?o.surface:Ft(s),c=f==="options"&&l===null?"full":f,h=r===2&&(o.mode==="simple"||o.mode==="advanced")?o.mode:null;return{protocol:r,surface:c,tab:l,mode:h,size:s}}function zt(n,o,s){return{editor:n,version:o,protocol:[1,2],surfaces:s}}function Dt(n,o){const s=document.querySelector('meta[name="wicked-editor-version"]')?.getAttribute("content")??"0.0.0";parent.postMessage({p:te,v:ne,type:"plugin.ready",payload:zt(n,s,o)},"*")}function qt(n,o,s){const r=n.metaKey||n.ctrlKey;let l=null;if(n.key==="Escape")l="Escape";else if(r&&!n.altKey&&n.key.toLowerCase()==="k")l="Mod+K";else if(n.altKey&&!r&&/^Key[A-Z]$/.test(n.code)&&Ye(`Alt+${n.code.slice(3)}`))l=`Alt+${n.code.slice(3)}`;else if(n.key==="Tab"){const f=Array.from(o.querySelectorAll("button, input, select, textarea, [tabindex]")).filter(h=>h.tabIndex>=0&&!h.matches(":disabled")&&h.closest("[hidden]")===null),c=f.indexOf(n.target);(n.shiftKey?c<=0:c===-1||c===f.length-1)&&(l=n.shiftKey?"Shift+Tab":"Tab")}return l===null?!1:(n.preventDefault(),n.stopPropagation(),s(l),!0)}class Kt{constructor(o,s){lt(this,"revs",new Map);this.port=o,this.h=s}reply(o,s){this.port.postMessage({p:te,v:ne,re:o,ok:!0,payload:s})}refuse(o,s,r){this.port.postMessage({p:te,v:ne,re:o,ok:!1,error:{code:s,message:r}})}bump(o){const s=(this.revs.get(o)??0)+1;return this.revs.set(o,s),s}values(o,s){this.port.postMessage({p:te,v:ne,type:"options.values",payload:{tab:o,rev:this.bump(o),values:s}})}height(o){this.port.postMessage({p:te,v:ne,type:"ui.height",payload:{px:Math.round(o)}})}dispatch(o){const s=We(o.payload)?o.payload:{},r=typeof o.id=="string"?o.id:null;switch(o.type){case"host.surface":{const l=s.surface;return(l==="card"||l==="options"||l==="full")&&this.h.surface?.(l,s.mode==="simple"||s.mode==="advanced"?s.mode:null),!0}case"host.mode":{if(r===null)return!0;const l=s.mode;return l!=="simple"&&l!=="advanced"?(this.refuse(r,"bad_request","mode is simple or advanced"),!0):(this.reply(r,{mode:this.h.mode?.(l)??l}),!0)}case"host.action":{if(r===null)return!0;const l=s.id;return typeof l!="string"||this.h.action===void 0?(this.reply(r,{handled:!1}),!0):(Promise.resolve(this.h.action(l)).then(f=>this.reply(r,{handled:f.handled===!0,...typeof f.status=="string"?{status:f.status.slice(0,120)}:{}}),()=>this.reply(r,{handled:!1})),!0)}case"host.tab":return typeof s.tab=="string"&&this.h.tab?.(s.tab),!0;case"host.selection":return Array.isArray(s.anchors)&&this.h.selection?.(s.anchors),!0;case"options.changed":{if(r===null)return!0;const l=s.tab,f=s.id;return typeof l!="string"||typeof f!="string"||this.h.optionsChanged===void 0?(this.refuse(r,"unsupported","no controls here"),!0):(Promise.resolve(this.h.optionsChanged(l,f,s.value)).then(c=>this.reply(r,{applied:c.applied,rev:this.bump(l),values:c.values,...c.reason!==void 0?{reason:c.reason.slice(0,120)}:{}}),c=>this.refuse(r,"unavailable",c instanceof Error?c.message.slice(0,120):"failed")),!0)}default:return!1}}}const ce=[{name:"corporate-light",display_name:"Corporate Light",colors:{background:"#FFFFFF",surface:"#F8FAFC",primary:"#1E3A5F",secondary:"#2563EB",accent:"#0891B2",text_primary:"#1E293B",text_secondary:"#64748B",text_muted:"#94A3B8",border:"#E2E8F0"},fonts:{heading:"Calibri",body:"Calibri",mono:"Consolas"}},{name:"midnight-purple",display_name:"Midnight Purple",colors:{background:"#0A0A0F",surface:"#13091D",primary:"#A100FF",secondary:"#6B2FA0",accent:"#F59E0B",text_primary:"#FFFFFF",text_secondary:"#A0A0B0",text_muted:"#6B6B80",border:"#2A2A3D"},fonts:{heading:"Calibri",body:"Calibri",mono:"Consolas"}},{name:"warm-dark",display_name:"Warm Dark",colors:{background:"#1A1A2E",surface:"#16213E",primary:"#FF6B6B",secondary:"#C44569",accent:"#FFD93D",text_primary:"#F8F8F2",text_secondary:"#B0B0C0",text_muted:"#6B6B80",border:"#2D2D44"},fonts:{heading:"Calibri",body:"Calibri",mono:"Consolas"}}],He=["Inter","Roboto","Source Sans 3","IBM Plex Sans","Calibri","Georgia","system-ui"],Nt=[["background","Background"],["surface","Surface"],["primary","Primary"],["accent","Accent"],["text_primary","Text"]],Ee=n=>({name:n.name,colors:{...n.colors},fonts:{...n.fonts}});function jt(n,o){n.replaceChildren(),n.classList.add("plugin-style"),n.onkeydown=g=>{o.key!==void 0&&qt(g,n,o.key)};const s=document.createElement("style");s.textContent=`.plugin-style{padding:16px;box-sizing:border-box;color:var(--ink-high);background:var(--surface-base);font:13px var(--font-sans,system-ui)}
126
+ `;function Nt(e){const n=`<script>${Dt}<\/script>`;return/<\/body>/i.test(e)?e.replace(/<\/body>/i,()=>`${n}</body>`):`${e}${n}`}const V=String.raw`\s*-?(?:\d+(?:\.\d+)?|\.\d+)%?\s*`,qt=new RegExp(`^(?:#(?:[0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})|rgba?\\((?:${V},){2}${V}(?:,${V})?\\)|hsla?\\(\\s*-?\\d+(?:\\.\\d+)?(?:deg)?\\s*,${V},${V}(?:,${V})?\\)|var\\(--wi-[a-z0-9-]{1,40}\\)|revert-layer)$`,"i");function It(e,n=new Set){if(!qt.test(e))return!1;const r=/^var\((--wi-[a-z0-9-]+)\)$/i.exec(e);return r===null||n.has(r[1].toLowerCase())}const Pt=[["--wi-bg","Background"],["--wi-surface","Surface"],["--wi-card-bg","Card"],["--wi-primary","Primary"],["--wi-secondary","Secondary"],["--wi-accent","Accent"],["--wi-text","Text"],["--wi-text-secondary","Secondary text"],["--wi-muted","Muted"],["--wi-border","Border"]],Ce="revert-layer";function zt(e){const n=new Map;for(const i of e.matchAll(/(--wi-[a-z-]{1,40})\s*:\s*([^;}{]{1,80})/gi))n.set(i[1].toLowerCase(),i[2].trim());const r=new Set,s=[];for(const[i,l]of Pt){const a=n.get(i);if(a===void 0)continue;const u=a.startsWith("#")?a.toLowerCase():a;!It(u)||r.has(u.toLowerCase())||(r.add(u.toLowerCase()),s.push({token:i,value:u,label:l}))}return s}const oe="wicked.editor",re=1,Je=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Kt=["card","options","full"];function Ut(e){return e==="inline"?"card":e==="pane"?"options":"full"}function Wt(e){return e==="card"?"inline":e==="options"?"pane":"full"}function Xt(e){const n=Je(e)?e:{},r=n.size==="inline"||n.size==="full"?n.size:"pane",s=n.protocol===2?2:1,i=s===2&&typeof n.tab=="string"?n.tab:null,l=s===2&&Kt.includes(n.surface)?n.surface:Ut(r),a=l==="options"&&i===null?"full":l,u=s===2&&(n.mode==="simple"||n.mode==="advanced")?n.mode:null;return{protocol:s,surface:a,tab:i,mode:u,size:r}}function Yt(e,n,r){return{editor:e,version:n,protocol:[1,2],surfaces:r}}function Ht(e,n){const r=document.querySelector('meta[name="wicked-editor-version"]')?.getAttribute("content")??"0.0.0";parent.postMessage({p:oe,v:re,type:"plugin.ready",payload:Yt(e,r,n)},"*")}function Jt(e,n,r){const s=e.metaKey||e.ctrlKey;let i=null;if(e.key==="Escape")i="Escape";else if(s&&!e.altKey&&e.key.toLowerCase()==="k")i="Mod+K";else if(e.altKey&&!s&&/^Key[A-Z]$/.test(e.code)&&He(`Alt+${e.code.slice(3)}`))i=`Alt+${e.code.slice(3)}`;else if(e.key==="Tab"){const l=Array.from(n.querySelectorAll("button, input, select, textarea, [tabindex]")).filter(u=>u.tabIndex>=0&&!u.matches(":disabled")&&u.closest("[hidden]")===null),a=l.indexOf(e.target);(e.shiftKey?a<=0:a===-1||a===l.length-1)&&(i=e.shiftKey?"Shift+Tab":"Tab")}return i===null?!1:(e.preventDefault(),e.stopPropagation(),r(i),!0)}class Vt{constructor(n,r){bt(this,"revs",new Map);this.port=n,this.h=r}reply(n,r){this.port.postMessage({p:oe,v:re,re:n,ok:!0,payload:r})}refuse(n,r,s){this.port.postMessage({p:oe,v:re,re:n,ok:!1,error:{code:r,message:s}})}bump(n){const r=(this.revs.get(n)??0)+1;return this.revs.set(n,r),r}values(n,r){this.port.postMessage({p:oe,v:re,type:"options.values",payload:{tab:n,rev:this.bump(n),values:r}})}height(n){this.port.postMessage({p:oe,v:re,type:"ui.height",payload:{px:Math.round(n)}})}dispatch(n){const r=Je(n.payload)?n.payload:{},s=typeof n.id=="string"?n.id:null;switch(n.type){case"host.surface":{const i=r.surface;return(i==="card"||i==="options"||i==="full")&&this.h.surface?.(i,r.mode==="simple"||r.mode==="advanced"?r.mode:null),!0}case"host.mode":{if(s===null)return!0;const i=r.mode;return i!=="simple"&&i!=="advanced"?(this.refuse(s,"bad_request","mode is simple or advanced"),!0):(this.reply(s,{mode:this.h.mode?.(i)??i}),!0)}case"host.action":{if(s===null)return!0;const i=r.id;return typeof i!="string"||this.h.action===void 0?(this.reply(s,{handled:!1}),!0):(Promise.resolve(this.h.action(i)).then(l=>this.reply(s,{handled:l.handled===!0,...typeof l.status=="string"?{status:l.status.slice(0,120)}:{}}),()=>this.reply(s,{handled:!1})),!0)}case"host.tab":return typeof r.tab=="string"&&this.h.tab?.(r.tab),!0;case"host.selection":return Array.isArray(r.anchors)&&this.h.selection?.(r.anchors),!0;case"options.changed":{if(s===null)return!0;const i=r.tab,l=r.id;return typeof i!="string"||typeof l!="string"||this.h.optionsChanged===void 0?(this.refuse(s,"unsupported","no controls here"),!0):(Promise.resolve(this.h.optionsChanged(i,l,r.value)).then(a=>this.reply(s,{applied:a.applied,rev:this.bump(i),values:a.values,...a.reason!==void 0?{reason:a.reason.slice(0,120)}:{}}),a=>this.refuse(s,"unavailable",a instanceof Error?a.message.slice(0,120):"failed")),!0)}default:return!1}}}const ue=[{name:"corporate-light",display_name:"Corporate Light",colors:{background:"#FFFFFF",surface:"#F8FAFC",primary:"#1E3A5F",secondary:"#2563EB",accent:"#0891B2",text_primary:"#1E293B",text_secondary:"#64748B",text_muted:"#94A3B8",border:"#E2E8F0"},fonts:{heading:"Calibri",body:"Calibri",mono:"Consolas"}},{name:"midnight-purple",display_name:"Midnight Purple",colors:{background:"#0A0A0F",surface:"#13091D",primary:"#A100FF",secondary:"#6B2FA0",accent:"#F59E0B",text_primary:"#FFFFFF",text_secondary:"#A0A0B0",text_muted:"#6B6B80",border:"#2A2A3D"},fonts:{heading:"Calibri",body:"Calibri",mono:"Consolas"}},{name:"warm-dark",display_name:"Warm Dark",colors:{background:"#1A1A2E",surface:"#16213E",primary:"#FF6B6B",secondary:"#C44569",accent:"#FFD93D",text_primary:"#F8F8F2",text_secondary:"#B0B0C0",text_muted:"#6B6B80",border:"#2D2D44"},fonts:{heading:"Calibri",body:"Calibri",mono:"Consolas"}}],Ve=["Inter","Roboto","Source Sans 3","IBM Plex Sans","Calibri","Georgia","system-ui"],Zt=[["background","Background"],["surface","Surface"],["primary","Primary"],["accent","Accent"],["text_primary","Text"]],Se=e=>({name:e.name,colors:{...e.colors},fonts:{...e.fonts}});function Gt(e,n){e.replaceChildren(),e.classList.add("plugin-style"),e.onkeydown=g=>{n.key!==void 0&&Jt(g,e,n.key)};const r=document.createElement("style");r.textContent=`.plugin-style{padding:16px;box-sizing:border-box;color:var(--ink-high);background:var(--surface-base);font:13px var(--font-sans,system-ui)}
127
127
  .plugin-style h2{font-size:16px;margin:0 0 12px}.plugin-style .theme-cards{display:grid;gap:8px;margin-bottom:18px}
128
128
  .plugin-style button,.plugin-style input,.plugin-style select{font:inherit;color:var(--ink-high);background:var(--surface-card);border:1px solid var(--border);border-radius:4px}
129
129
  .plugin-style button{padding:8px;text-align:left;cursor:pointer}.plugin-style button:focus-visible,.plugin-style input:focus-visible,.plugin-style select:focus-visible{outline:2px solid var(--accent)}
130
130
  .plugin-style .ps-swatches{display:flex;width:100%;height:16px;margin-bottom:6px;border:1px solid var(--border)}.plugin-style .ps-swatches span{flex:1}
131
131
  .plugin-style label{display:flex;align-items:center;gap:8px;margin:10px 0}.plugin-style label>span:first-child{flex:1}.plugin-style input[type=color]{width:36px;height:30px;padding:2px}.plugin-style input[type=text]{width:80px;padding:5px}.plugin-style select{max-width:170px;padding:5px}
132
- .plugin-style p{line-height:1.5;color:var(--ink-body)}.plugin-style [role=status]{min-height:1.5em}.plugin-style :disabled{opacity:.6;cursor:default}`,n.append(s);const r=document.createElement("h2");r.textContent="Style",n.append(r);const l=document.createElement("div");l.className="theme-cards",n.append(l);const f=document.createElement("p");f.setAttribute("role","status"),f.setAttribute("aria-live","polite");let c=!1;const h=[],x=()=>Ee(o.tokens()??ce[0]),D=[],S=[],F=()=>{const g=x();for(const{key:y,picker:k,hex:A}of D)A.value=g.colors[y],k.value=/^#[0-9a-f]{6}$/i.test(g.colors[y])?g.colors[y]:"";for(const{key:y,select:k}of S)k.value=He.includes(g.fonts[y])?g.fonts[y]:"system-ui";for(const y of Array.from(l.querySelectorAll("button")))y.setAttribute("aria-pressed",String(y.dataset.theme===g.name))},U=async g=>{if(!c){c=!0,h.forEach(y=>{y.disabled=!0}),f.textContent="Applying theme…";try{const y=await o.apply(g);f.textContent=y.ok?"Theme applied.":`Theme was not applied: ${y.reason}`}catch(y){f.textContent=`Theme was not applied: ${y instanceof Error?y.message:"unavailable"}`}finally{c=!1,h.forEach(y=>{y.disabled=!1}),F()}}};for(const g of ce){const y=document.createElement("button");y.type="button",y.dataset.theme=g.name;const k=document.createElement("span");k.className="ps-swatches",k.setAttribute("aria-hidden","true");for(const v of["background","surface","primary","secondary","accent"]){const b=document.createElement("span");b.style.backgroundColor=g.colors[v],k.append(b)}const A=document.createElement("span");A.textContent=g.display_name,y.append(k,A),y.addEventListener("click",()=>{U(Ee(g))}),l.append(y),h.push(y)}for(const[g,y]of Nt){const k=document.createElement("label"),A=document.createElement("span");A.textContent=y;const v=document.createElement("input");v.type="color",v.setAttribute("aria-label",y);const b=document.createElement("input");b.type="text",b.maxLength=7,b.setAttribute("aria-label",`${y} hex`);const M=Z=>{if(!/^#[0-9a-f]{6}$/i.test(Z)){f.textContent="Enter a six-digit hex colour: a # and six digits or letters a to f.",F();return}const _=x();_.name="custom",_.colors[g]=Z,U(_)};v.addEventListener("change",()=>M(v.value)),b.addEventListener("change",()=>M(b.value)),k.append(A,v,b),n.append(k),h.push(v,b),D.push({key:g,picker:v,hex:b})}for(const g of["heading","body"]){const y=document.createElement("label"),k=document.createElement("span");k.textContent=g==="heading"?"Heading font":"Body font";const A=document.createElement("select");A.setAttribute("aria-label",k.textContent);for(const v of He){const b=document.createElement("option");b.value=v,b.textContent=v,A.append(b)}A.addEventListener("change",()=>{const v=x();v.name="custom",v.fonts[g]=A.value,U(v)}),y.append(k,A),n.append(y),h.push(A),S.push({key:g,select:A})}const re=document.createElement("p");return re.textContent="Match a website or a PDF: the host's Match button under this tab",n.append(re,f),F(),{refresh:F}}function It(n){const o=new DOMParser().parseFromString(n,"text/html"),s=Array.from(o.querySelectorAll("style")).map(h=>h.textContent??"").join(`
133
- `),r=new Map;for(const h of s.matchAll(/(--wi-[a-z-]+)\s*:\s*([^;}{]+)/gi))r.set(h[1].toLowerCase(),h[2].trim());if(r.size===0)return null;const l=Ee(ce[0]),f={background:"--wi-bg",surface:"--wi-surface",primary:"--wi-primary",secondary:"--wi-secondary",accent:"--wi-accent",text_primary:"--wi-text",text_secondary:"--wi-text-secondary",text_muted:"--wi-muted",border:"--wi-border"};for(const h of Object.keys(f)){const x=r.get(f[h]);x!==void 0&&/^(#(?:[0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})|(?:rgb|hsl)a?\([0-9.,%\s]+\))$/i.test(x)&&(l.colors[h]=x)}for(const h of["heading","body","mono"]){const x=r.get(`--wi-font-${h}`);x!==void 0&&(l.fonts[h]=x.split(",")[0].trim().replace(/^['"]|['"]$/g,""))}const c=ce.find(h=>JSON.stringify(h.colors)===JSON.stringify(l.colors)&&JSON.stringify(h.fonts)===JSON.stringify(l.fonts));return l.name=c?.name??"custom",l}const oe="wicked.editor",de=1,Pt=[[390,"Phone"],[820,"Tablet"],[1280,"Desktop"]],$e=34,Xt=[0,250,750,1500],Yt=`
132
+ .plugin-style p{line-height:1.5;color:var(--ink-body)}.plugin-style [role=status]{min-height:1.5em}.plugin-style :disabled{opacity:.6;cursor:default}`,e.append(r);const s=document.createElement("h2");s.textContent="Style",e.append(s);const i=document.createElement("div");i.className="theme-cards",e.append(i);const l=document.createElement("p");l.setAttribute("role","status"),l.setAttribute("aria-live","polite");let a=!1;const u=[],w=()=>Se(n.tokens()??ue[0]),C=[],v=[],A=()=>{const g=w();for(const{key:m,picker:x,hex:S}of C)S.value=g.colors[m],x.value=/^#[0-9a-f]{6}$/i.test(g.colors[m])?g.colors[m]:"";for(const{key:m,select:x}of v)x.value=Ve.includes(g.fonts[m])?g.fonts[m]:"system-ui";for(const m of Array.from(i.querySelectorAll("button")))m.setAttribute("aria-pressed",String(m.dataset.theme===g.name))},F=async g=>{if(!a){a=!0,u.forEach(m=>{m.disabled=!0}),l.textContent="Applying theme…";try{const m=await n.apply(g);l.textContent=m.ok?"Theme applied.":`Theme was not applied: ${m.reason}`}catch(m){l.textContent=`Theme was not applied: ${m instanceof Error?m.message:"unavailable"}`}finally{a=!1,u.forEach(m=>{m.disabled=!1}),A()}}};for(const g of ue){const m=document.createElement("button");m.type="button",m.dataset.theme=g.name;const x=document.createElement("span");x.className="ps-swatches",x.setAttribute("aria-hidden","true");for(const y of["background","surface","primary","secondary","accent"]){const k=document.createElement("span");k.style.backgroundColor=g.colors[y],x.append(k)}const S=document.createElement("span");S.textContent=g.display_name,m.append(x,S),m.addEventListener("click",()=>{F(Se(g))}),i.append(m),u.push(m)}for(const[g,m]of Zt){const x=document.createElement("label"),S=document.createElement("span");S.textContent=m;const y=document.createElement("input");y.type="color",y.setAttribute("aria-label",m);const k=document.createElement("input");k.type="text",k.maxLength=7,k.setAttribute("aria-label",`${m} hex`);const L=Z=>{if(!/^#[0-9a-f]{6}$/i.test(Z)){l.textContent="Enter a six-digit hex colour: a # and six digits or letters a to f.",A();return}const D=w();D.name="custom",D.colors[g]=Z,F(D)};y.addEventListener("change",()=>L(y.value)),k.addEventListener("change",()=>L(k.value)),x.append(S,y,k),e.append(x),u.push(y,k),C.push({key:g,picker:y,hex:k})}for(const g of["heading","body"]){const m=document.createElement("label"),x=document.createElement("span");x.textContent=g==="heading"?"Heading font":"Body font";const S=document.createElement("select");S.setAttribute("aria-label",x.textContent);for(const y of Ve){const k=document.createElement("option");k.value=y,k.textContent=y,S.append(k)}S.addEventListener("change",()=>{const y=w();y.name="custom",y.fonts[g]=S.value,F(y)}),m.append(x,S),e.append(m),u.push(S),v.push({key:g,select:S})}const B=document.createElement("p");return B.textContent="Match a website or a PDF: the host's Match button under this tab",e.append(B,l),A(),{refresh:A}}function Qt(e){const n=new DOMParser().parseFromString(e,"text/html"),r=Array.from(n.querySelectorAll("style")).map(u=>u.textContent??"").join(`
133
+ `),s=new Map;for(const u of r.matchAll(/(--wi-[a-z-]+)\s*:\s*([^;}{]+)/gi))s.set(u[1].toLowerCase(),u[2].trim());if(s.size===0)return null;const i=Se(ue[0]),l={background:"--wi-bg",surface:"--wi-surface",primary:"--wi-primary",secondary:"--wi-secondary",accent:"--wi-accent",text_primary:"--wi-text",text_secondary:"--wi-text-secondary",text_muted:"--wi-muted",border:"--wi-border"};for(const u of Object.keys(l)){const w=s.get(l[u]);w!==void 0&&/^(#(?:[0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})|(?:rgb|hsl)a?\([0-9.,%\s]+\))$/i.test(w)&&(i.colors[u]=w)}for(const u of["heading","body","mono"]){const w=s.get(`--wi-font-${u}`);w!==void 0&&(i.fonts[u]=w.split(",")[0].trim().replace(/^['"]|['"]$/g,""))}const a=ue.find(u=>JSON.stringify(u.colors)===JSON.stringify(i.colors)&&JSON.stringify(u.fonts)===JSON.stringify(i.fonts));return i.name=a?.name??"custom",i}const en=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),I=(e,n)=>e>>>n|e<<32-n;function Ze(e){const n=new TextEncoder().encode(e),r=n.length*8,s=new Uint8Array(Math.ceil((n.length+9)/64)*64);s.set(n),s[n.length]=128;const i=new DataView(s.buffer);i.setUint32(s.length-8,Math.floor(r/4294967296)),i.setUint32(s.length-4,r>>>0);const l=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);for(let C=0;C<s.length;C+=64){for(let y=0;y<16;y++)a[y]=i.getUint32(C+y*4);for(let y=16;y<64;y++){const k=I(a[y-15],7)^I(a[y-15],18)^a[y-15]>>>3,L=I(a[y-2],17)^I(a[y-2],19)^a[y-2]>>>10;a[y]=a[y-16]+k+a[y-7]+L>>>0}let[v,A,F,B,g,m,x,S]=[l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7]];for(let y=0;y<64;y++){const k=S+(I(g,6)^I(g,11)^I(g,25))+(g&m^~g&x)+en[y]+a[y]>>>0,L=(I(v,2)^I(v,13)^I(v,22))+(v&A^v&F^A&F)>>>0;S=x,x=m,m=g,g=B+k>>>0,B=F,F=A,A=v,v=k+L>>>0}l[0]=l[0]+v>>>0,l[1]=l[1]+A>>>0,l[2]=l[2]+F>>>0,l[3]=l[3]+B>>>0,l[4]=l[4]+g>>>0,l[5]=l[5]+m>>>0,l[6]=l[6]+x>>>0,l[7]=l[7]+S>>>0}const u=new DataView(new ArrayBuffer(32));l.forEach((C,v)=>u.setUint32(v*4,C));let w="";for(let C=0;C<32;C++)w+=String.fromCharCode(u.getUint8(C));return btoa(w)}const Ge="WebRTC is not available in an editor frame",tn=["RTCPeerConnection","webkitRTCPeerConnection","mozRTCPeerConnection","RTCDataChannel","RTCIceTransport","RTCDtlsTransport","RTCSctpTransport","RTCRtpSender","RTCRtpReceiver","RTCRtpTransceiver","RTCIceCandidate","RTCSessionDescription","RTCCertificate"],$e='(function(w,o){if(typeof w!=="object"||w===null||w.window!==w)throw '+JSON.stringify(Ge)+";var n="+JSON.stringify(tn)+",k=o.getOwnPropertyNames(w),i,d;for(i=0;i!==k.length;i++)if(/^(webkit|moz)?RTC/.test(k[i])&&(d=o.getOwnPropertyDescriptor(w,k[i]))&&d.configurable)n.push(k[i]);for(i=0;i!==n.length;i++){o.defineProperty(w,n[i],{value:void 0,writable:false,configurable:false});if(w[n[i]]!==void 0)throw "+JSON.stringify(Ge)+`}})(window,({}).constructor);
134
+ `,se=/[\n\r\u2028\u2029]/,Qe=/\s/,et=/[\w$\\\u0080-\uFFFF]/;function nn(e,n){if(n>=e.length)return!0;const r=e[n];if(r==='"'||r==="'"||r==="{"||r==="~"||/[0-9]/.test(r))return!0;if(r==="!")return e[n+1]!=="=";if(r===".")return/[0-9]/.test(e[n+1]??"");if(r==="\\")return!0;if(r==="+"||r==="-")return e[n+1]===r;if(!et.test(r))return!1;let s=n;for(;s<e.length&&et.test(e[s])&&!Qe.test(e[s]);)s++;const i=e.slice(n,s);return i!=="in"&&i!=="instanceof"}function on(e){const n=e.length;let r=0,s=0,i=!1,l=!1;if(e.startsWith("#!")){for(;r<n&&!se.test(e[r]);)r++;s=r,i=!0}let a=!1,u=!0,w=!0;const C=()=>{for(;;){for(;r<n&&Qe.test(e[r]);)se.test(e[r])&&(a=!0,u=!0),r++;if(w&&u&&e.startsWith("-->",r)){for(;r<n&&!se.test(e[r]);)r++;continue}if(e.startsWith("/*",r)){const v=e.indexOf("*/",r+2);if(v<0)return!1;se.test(e.slice(r,v))&&(a=!0,u=!0),r=v+2}else if(e.startsWith("//",r)||w&&e.startsWith("<!--",r))for(;r<n&&!se.test(e[r]);)r++;else return!0}};for(;C();){const v=e[r];if(v!=='"'&&v!=="'")break;w=!1;let A=r+1,F=!1;for(;A<n;){const g=e[A];if(g==="\\"){A+=2;continue}if(g===v){F=!0,A+=1;break}if(g===`
135
+ `||g==="\r")break;A+=1}if(!F)break;u=!1;const B=A;if(r=A,a=!1,!C())break;if(e[r]===";")r+=1,u=!1,s=r,l=!1;else if(e.startsWith("<!--",r)){s=B,l=!0,i=!1;break}else if((a||r>=n)&&nn(e,r))s=B,l=!0;else break;i=!1}return{at:s,afterHashbang:i,semicolon:l}}function rn(e){const{at:n,afterHashbang:r,semicolon:s}=on(e);return e.slice(0,n)+(s?";":"")+(r?`
136
+ `:"")+$e+e.slice(n)}const sn=new Set(["application/ecmascript","application/javascript","application/x-ecmascript","application/x-javascript","text/ecmascript","text/javascript","text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-ecmascript","text/x-javascript"]),tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";function an(e){if(e.namespaceURI===tt?e.hasAttribute("href")||e.hasAttribute("xlink:href"):e.hasAttribute("src"))return!1;const n=e.namespaceURI===tt?null:e.getAttribute("language"),r=e.hasAttribute("type")?e.getAttribute("type"):n!==null&&n!==""?`text/${n}`:"";return r===""||r.toLowerCase()==="module"?!0:sn.has(r.replace(/^[\t\n\f\r ]+|[\t\n\f\r ]+$/g,"").toLowerCase())}function ot(e){const n=Array.from(e.querySelectorAll("script"));for(const r of Array.from(e.querySelectorAll("template")))r.namespaceURI===nt&&n.push(...ot(r.content));return n}function rt(e){const n=Array.from(e.querySelectorAll("meta[http-equiv]")).filter(r=>r.getAttribute("http-equiv").trim().toLowerCase()==="content-security-policy");for(const r of Array.from(e.querySelectorAll("template")))r.namespaceURI===nt&&n.push(...rt(r.content));return n}function ln(e){return e.doctype===null?"":new XMLSerializer().serializeToString(e.doctype)}function cn(e){const n=new DOMParser().parseFromString(e,"text/html"),r=new Set([Ze($e)]);for(const a of ot(n)){if(!an(a))continue;const u=rn((a.textContent??"").replace(/\r\n?/g,`
137
+ `));a.textContent=u,r.add(Ze(u))}for(const a of rt(n)){const u=(a.getAttribute("content")??"").split(";").map(w=>w.trim()).filter(w=>w!==""&&!/^script-src(-elem|-attr)?(\s|$)/i.test(w));a.setAttribute("content",[...u,"script-src 'unsafe-inline'"].join("; "))}const s=n.createElement("meta");s.setAttribute("http-equiv","Content-Security-Policy"),s.setAttribute("content",`script-src ${[...r].map(a=>`'sha256-${a}'`).join(" ")}; frame-src 'none'; child-src 'none'; worker-src 'none'; object-src 'none'`);const i=n.createElement("meta");i.setAttribute("http-equiv","Content-Security-Policy"),i.setAttribute("content","script-src 'unsafe-inline'");const l=n.createElement("script");return l.textContent=$e,n.head.prepend(s,i,l),`${ln(n)}${n.documentElement.outerHTML}`}const ie="wicked.editor",pe=1,dn=[[390,"Phone"],[820,"Tablet"],[1280,"Desktop"]],Te=34,un=[0,250,750,1500],pn=`
134
138
  <div data-testid="page-style" id="style" class="style-pane" hidden></div>
135
139
  <div data-testid="page-editor" id="editor" class="editor" data-kind="page" data-head="" data-pickable="false" data-selected="" data-size="pane" data-width="" tabindex="0" role="application" aria-label="The page">
136
140
  <div data-testid="page-tools" id="tools" class="tools" role="toolbar" aria-label="Page width">
137
- ${Pt.map(([n,o])=>`<button type="button" data-testid="page-width" data-width="${n}" aria-pressed="false" title="${o} · ${n} px wide">${o} ${n}</button>`).join("")}
141
+ ${dn.map(([e,n])=>`<button type="button" data-testid="page-width" data-width="${e}" aria-pressed="false" title="${n} · ${e} px wide">${n} ${e}</button>`).join("")}
138
142
  </div>
139
143
  <div id="stage" class="stage"></div>
140
144
  <div data-testid="page-hover-box" id="hover" class="box box--hover" hidden></div>
@@ -149,13 +153,13 @@
149
153
  <span class="swatches" data-testid="page-swatches" data-prop="background" id="fills"><span class="word">Fill</span></span>
150
154
  <span class="swatches" data-testid="page-swatches" data-prop="color" id="inks"><span class="word">Text</span></span>
151
155
  </div>
152
- </div>`;function O(n){const o=document.getElementById(n);if(o===null)throw new Error(`wicked-page: no #${n}`);return o}function Ue(n,o){const s=n?.blocks[o];return n===null||n.widMap[o]===void 0||s===void 0?"unmeasured":s.composite?"container":s.cut===!0?"cut":"yes"}function Ce(n){return`${n.charAt(0).toUpperCase()}${n.slice(1)}`}function Wt(n){document.body.insertAdjacentHTML("afterbegin",Yt);const o=O("editor");o.dataset.kind=n.kind,o.setAttribute("aria-label",n.kind==="document"?"The document":"The page");const s=O("stage");let r=null;const l=O("hover"),f=O("selected"),c=O("input"),h=O("handle"),x=O("hint"),D=O("note"),S=O("tools"),F=O("peek"),U=O("to-section"),re=O("remove"),g=O("fills"),y=O("inks");let k=null,A=[],v="pane",b=1,M="options",Z="style",_="simple",Se=null;const se=()=>b===1?v!=="inline":M==="full",J=()=>se()&&(b===1||_==="advanced");let ue=null,Ut=0;const Te=new Map,j=(e,t)=>{k?.postMessage({p:oe,v:de,type:e,payload:t})},ie=(e,t)=>new Promise(i=>{if(k===null){i({ok:!1,error:{code:"unavailable",message:"no host yet"}});return}const a=`wp-${++Ut}`;Te.set(a,i),k.postMessage({p:oe,v:de,type:e,id:a,payload:t})}),pe=e=>j("ui.status",{line:e.slice(0,120)});let C=null,Oe=Object.create(null),V=null,Le=0,ae=!1,Me=!1,X=null;const w=n.coverage?document.createElement("aside"):null;if(w!==null){w.id="coverage",w.dataset.testid="doc-coverage",w.setAttribute("aria-label","Requirements"),w.hidden=!0,document.body.append(w);const e=document.createElement("style");e.textContent=`#coverage{box-sizing:border-box;height:100%;overflow:auto;padding:16px;color:var(--ink-high);background:var(--surface-base);font:13px var(--font-sans,system-ui)}
156
+ </div>`;function M(e){const n=document.getElementById(e);if(n===null)throw new Error(`wicked-page: no #${e}`);return n}function st(e,n){const r=e?.blocks[n];return e===null||e.widMap[n]===void 0||r===void 0?"unmeasured":r.composite?"container":r.cut===!0?"cut":"yes"}function Oe(e){return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function fn(e){document.body.insertAdjacentHTML("afterbegin",pn);const n=M("editor");n.dataset.kind=e.kind,n.setAttribute("aria-label",e.kind==="document"?"The document":"The page");const r=M("stage");let s=null;const i=M("hover"),l=M("selected"),a=M("input"),u=M("handle"),w=M("hint"),C=M("note"),v=M("tools"),A=M("peek"),F=M("to-section"),B=M("remove"),g=M("fills"),m=M("inks");let x=null,S=[],y="pane",k=1,L="options",Z="style",D="simple",Le=null;const ae=()=>k===1?y!=="inline":L==="full",G=()=>ae()&&(k===1||D==="advanced");let fe=null,yn=0;const Re=new Map,U=(t,o)=>{x?.postMessage({p:ie,v:pe,type:t,payload:o})},le=(t,o)=>new Promise(c=>{if(x===null){c({ok:!1,error:{code:"unavailable",message:"no host yet"}});return}const d=`wp-${++yn}`;Re.set(d,c),x.postMessage({p:ie,v:pe,type:t,id:d,payload:o})}),he=t=>U("ui.status",{line:t.slice(0,120)});let O=null,Me=Object.create(null),Q=null,Fe=0,ce=!1,je=!1,Y=null;const E=e.coverage?document.createElement("aside"):null;if(E!==null){E.id="coverage",E.dataset.testid="doc-coverage",E.setAttribute("aria-label","Requirements"),E.hidden=!0,document.body.append(E);const t=document.createElement("style");t.textContent=`#coverage{box-sizing:border-box;height:100%;overflow:auto;padding:16px;color:var(--ink-high);background:var(--surface-base);font:13px var(--font-sans,system-ui)}
153
157
  #coverage h2{font-size:16px;margin:0 0 12px}#coverage p{color:var(--ink-muted);line-height:1.5}
154
158
  #coverage button{display:block;width:100%;padding:10px 8px;text-align:left;font:inherit;color:var(--ink-high);background:var(--surface-card);border:1px solid var(--border);border-radius:4px;margin:6px 0;cursor:pointer}
155
159
  #coverage button:disabled{cursor:default}#coverage button:focus-visible{outline:2px solid var(--accent)}
156
160
  #coverage p button{display:inline;width:auto;padding:0;margin:0;border:0;background:transparent;color:var(--accent);text-decoration:underline}
157
161
  body[data-coverage="side"] .editor{width:calc(100% - min(300px,38%))}
158
- body[data-coverage="side"] #coverage{position:absolute;right:0;top:0;width:min(300px,38%);border-left:1px solid var(--border)}`,document.body.append(e)}const fe=()=>{if(w===null)return;if(w.replaceChildren(),delete w.dataset.total,delete w.dataset.rows,delete w.dataset.named,ae){const p=document.createElement("p");p.textContent="Couldn't read the requirements · ";const $=document.createElement("button");$.type="button",$.textContent="Try again",$.addEventListener("click",()=>{Be()}),p.append($),w.append(p);return}if(V===null){const p=document.createElement("p");p.textContent="Reading requirements…",w.append(p);return}if(V.length===0){const p=document.createElement("p");p.textContent="No requirements for this document's repository",w.append(p);return}const e=ut(V.map(p=>({key:p.id,reqId:p.id,title:p.text,risk:!1})),Oe),t=e.filter(p=>p.wid!==null),i=e.filter(p=>p.wid===null);w.dataset.total=String(Le),w.dataset.rows=String(e.length),w.dataset.named=String(t.length);const a=document.createElement("h2");a.textContent="Requirements",w.append(a);const d=document.createElement("p");d.dataset.testid="doc-coverage-line",d.textContent=ft(e,Le),w.append(d);const u=(p,$)=>{if($.length===0)return;const le=document.createElement("p");le.textContent=`${p} (${$.length})`,w.append(le);for(const z of $){const P=document.createElement("button");P.type="button",P.dataset.testid="doc-coverage-row",P.dataset.req=z.reqId,P.dataset.named=String(z.wid!==null),P.disabled=z.wid===null,P.textContent=`${z.reqId} · ${z.title}${z.wid===null?"":` · ${ee(z.wid,n.kind)}`}`,P.addEventListener("click",()=>{if(z.wid!==null){if(M==="options"){A.includes("selection.chip")&&j("selection.set",{anchors:[{kind:"element",id:z.wid}]});return}Q(z.wid,!0),ke(z.wid)}}),w.append(P)}};u("Not named",i),u("Named",t)},Be=async()=>{if(!(!n.coverage||V!==null||Me)){Me=!0,ae=!1,fe();try{const e=await ie("checks.read",{}),t=e.ok?e.payload.checks:null;if(!e.ok||!Array.isArray(t)){ae=!0;return}V=t.filter(i=>typeof i=="object"&&i!==null&&typeof i.id=="string"&&typeof i.text=="string"),Le=typeof e.payload.total=="number"?e.payload.total:V.length}catch{ae=!0}finally{Me=!1,fe()}}},Zt=e=>{const t=new DOMParser().parseFromString(e,"text/html");Oe=Object.create(null);const i=Array.from(t.querySelectorAll("[data-wid]")),a=new Map;for(const d of i){const u=d.getAttribute("data-wid")??"";a.set(u,(a.get(u)??0)+1)}for(const d of i){const u=d.getAttribute("data-wid")??"";!/^[A-Za-z0-9_.:-]{1,100}$/.test(u)||a.get(u)!==1||(Oe[u]={text:(d.textContent??"").replace(/\s+/g," ").trim(),composite:d.querySelector("[data-wid]")!==null})}fe()};let E=null,he={scrollX:0,scrollY:0},ye=null,m=null,B=null,me=null,R=!1,Je=[],q=null,Fe=0,Ve=-1,G=null,_e=null,Ge=0,ge=[],Re=!1,ze=null,ve=null;const Qe=e=>{r?.contentWindow?.postMessage(e,"*")},Jt=e=>{if(e===r){Ve=Fe;for(const t of ge)clearTimeout(t);ge=Xt.map(t=>setTimeout(()=>Qe(xt),t))}},Vt=e=>{const t=document.createElement("iframe");for(const[a,d]of Object.entries({"data-testid":"page-frame",sandbox:"allow-scripts",title:n.kind==="document"?"The document":"The page",class:"frame"}))t.setAttribute(a,d);t.addEventListener("load",()=>Jt(t));const i=r;r=t;for(const a of ge)clearTimeout(a);t.srcdoc=e,s.appendChild(t),i?.remove(),be()},et=()=>{const e=v==="inline"?0:$e;if(q===null)return{x:0,y:e,s:1};const t=s.clientWidth,i=t>0?Math.min(1,t/q):1;return{x:Math.max(0,(t-q*i)/2),y:e,s:i}},be=()=>{s.style.top=`${v==="inline"?0:$e}px`,o.dataset.width=q===null?"":String(q);for(const i of Array.from(S.querySelectorAll("[data-width]")))i.setAttribute("aria-pressed",String(Number(i.dataset.width)===q));if(r===null)return;if(q===null){r.style.cssText="";return}const e=et(),t=s.clientHeight>0?s.clientHeight/e.s:0;r.style.cssText=`position:absolute;left:${e.x}px;top:0;width:${q}px;${t>0?`height:${t}px;`:""}transform:scale(${e.s});transform-origin:0 0`},we=e=>{if(e===null||E===null)return null;const t=E.widMap[e];if(t===void 0)return null;const i=gt(t,E.measured,he),a=et();return{left:a.x+i.left*a.s,top:a.y+i.top*a.s,width:i.width*a.s,height:i.height*a.s}},De=(e,t,i=0,a=0)=>{if(t===null){e.hidden=!0;return}e.hidden=!1,e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.style.width=`${Math.max(t.width,i)}px`,e.style.height=`${Math.max(t.height,a)}px`},qe=()=>(v!=="inline"||b>=2&&M==="card")&&E!==null,T=()=>{if(o.dataset.head=C===null?"":String(C),o.dataset.pickable=String(qe()),o.dataset.selected=m??"",o.dataset.size=v,De(l,ye!==m&&B===null?we(ye):null),f.dataset.wid=m??"",De(f,B===null?we(m):null),B!==null?De(c,we(B.wid),160,30):c.hidden=!0,S.hidden=v==="inline",o.dataset.mode=b>=2?_:"",re.hidden=!J(),g.hidden=!J(),y.hidden=!J(),Gt(),!se()||!qe()||B!==null){x.hidden=!0;return}if(x.hidden=!1,m===null){x.removeAttribute("data-editable"),x.textContent="Click an element to make it the subject · type on it to change it";return}const e=ee(m,n.kind),t=Ue(E,m);x.dataset.editable=String(t==="yes"),x.textContent=t==="yes"?`Type to change ${e} · Enter to edit its text · Esc to let go`:t==="container"?`${Ce(e)} holds other parts — click a line of text inside it to change the words · Esc to let go`:t==="cut"?`${Ce(e)} is too long to change by typing — say what to change in the message box · Esc to let go`:`${Ce(e)} can’t be changed by typing — say what to change in the message box · Esc to let go`},Gt=()=>{const e=J()&&qe()&&B===null&&!R?we(m):null;if(e===null||m===null){F.hidden=!0;return}F.hidden=!1,U.hidden=E?.blocks[m]?.section===void 0;const t=F.offsetHeight||30,i=e.top+e.height+6,a=o.clientHeight===0||i+t<=o.clientHeight-4,d=F.offsetWidth,u=o.clientWidth>0?o.clientWidth-d-4:1/0;F.style.left=`${Math.max(4,Math.min(e.left,u))}px`,F.style.top=`${a?i:Math.max($e+2,e.top-t-6)}px`},tt=(e,t)=>{for(const a of Array.from(e.querySelectorAll("button")))a.remove();const i=(a,d)=>{const u=document.createElement("button");u.type="button",u.className=a===Ae?"swatch swatch--default":"swatch";for(const[p,$]of Object.entries({"data-testid":"page-swatch"}))u.setAttribute(p,$);u.dataset.prop=t,u.dataset.value=a,u.title=`${t==="background"?"Fill":"Text"}: ${d}`,u.setAttribute("aria-label",u.title),a===Ae?u.textContent="Default":u.style.setProperty("--swatch",a),u.addEventListener("click",()=>{m!==null&&en(m,t,a,d)}),e.appendChild(u)};for(const a of Je)i(a.value,a.label);i(Ae,"Default")},I=()=>{if(B===null)return;B=null,c.hidden=!0,c.value="";const e=me;me=null,e!==null&&Ke(e),T()},Q=(e,t=!1)=>{X=null,m=e,I(),T(),e!==null&&(A.includes("selection.chip")&&j("selection.set",{anchors:[{kind:"element",id:e}]}),t||h.focus())},ke=e=>{Ge+=1,Qe(At(e,Ge))},Ke=e=>{const t=e.version;if(typeof t=="number"&&C!==null&&t<C)return;if(B!==null){const d=me?.version;typeof t=="number"&&t>B.base&&(typeof d!="number"||t>=d)&&(me=e);return}D.hidden=!0;const i=e.content,a=typeof i?.html=="string"?i.html:"";n.coverage&&Zt(a),C=typeof t=="number"?t:C,Je=Mt(a),ue=It(a)??ue,Ie?.refresh(),tt(g,"background"),tt(y,"color"),Fe+=1,_e=G,G=null,E=null,ye=null,m=null,I(),T(),Vt($t(a)?a:St(a))},Y=async e=>{if(Re){if(e!==void 0&&e===ze)return;ve=e===void 0?{}:{version:e};return}Re=!0,ze=e??null;try{const t=await ie("artifact.read",e===void 0?{}:{version:e});if(!t.ok){D.hidden=!1,D.textContent=t.error.code==="not_granted"?`This editor may not read the ${n.kind} here.`:`The ${n.kind} could not be read (${t.error.code}).`;return}Ke(t.payload)}finally{if(Re=!1,ze=null,ve!==null){const t=ve;ve=null,(t.version===void 0||t.version!==C)&&Y(t.version)}}};window.addEventListener("message",e=>{if(r===null||r.contentWindow===null||e.source!==r.contentWindow||Ve!==Fe)return;const t=kt(e.data);if(t!==null){if(t.type==="wid-inventory"){for(const a of ge)clearTimeout(a);E={widMap:t.widMap,blocks:t.blocks??{},measured:{scrollX:t.scrollX,scrollY:t.scrollY}},he={scrollX:t.scrollX,scrollY:t.scrollY};const i=_e;_e=null,i!==null&&t.widMap[i]!==void 0&&ke(i),X!==null&&t.widMap[X]!==void 0&&(m=X,n.coverage&&ke(X)),T()}else if(t.type==="scroll-state")he={scrollX:t.scrollX,scrollY:t.scrollY},T();else if(t.type==="scroll-ack")t.scrollX!==void 0&&t.scrollY!==void 0&&(he={scrollX:t.scrollX,scrollY:t.scrollY},T());else if(t.type==="wid-hover")ye=t.wid,T();else if(t.type==="wid-click"){if(b===1&&v==="inline")return;if(b===2&&M==="card"){Q(t.wid);return}const i=t.wid===m?E?.blocks[t.wid]?.section:void 0;Q(i!==void 0&&E?.widMap[i]!==void 0?i:t.wid)}}});const nt=(e,t)=>{if(!se()||R||C===null||E===null||Ue(E,e)!=="yes")return;const i=E.blocks[e]?.text??"";B={wid:e,before:i,base:C},c.value=t??i,T(),c.focus(),t===null?c.select():c.setSelectionRange(c.value.length,c.value.length)},Ne=async(e,t,i,a,d=C)=>{if(C===null||R)return;R=!0,T(),pe(i);const u=a;try{const p=await ie("version.write",{base:d,ops:e,summary:t});if(p.ok)G=u,await Y(typeof p.payload.version=="number"?p.payload.version:void 0);else if(p.error.code==="stale"||p.error.code==="head_moved"){pe(p.error.code==="stale"&&p.error.message?p.error.message:"Not changed: it moved while you typed"),G=u;const $=p.payload?.head;p.error.code==="head_moved"?await Y(typeof $=="number"?$:void 0):typeof $=="number"&&$!==C&&await Y($)}else p.error.code==="timeout"||(p.error.code==="refused"?pe(p.error.message||"Nothing changed"):pe(`Not changed: ${p.error.message||p.error.code}`))}finally{R=!1,T()}},Qt=async()=>{if(B===null||C===null||R)return;const{wid:e,before:t,base:i}=B,a=c.value.replace(/\s*\n\s*/g," ");if(I(),h.focus(),a===t)return;const d=ee(e,n.kind);await Ne([{op:"text",anchor:e,value:a,before:t}],d,`Changing ${d}…`,e,i)},ot=async e=>{if(!J()||R||E?.widMap[e]===void 0)return;const t=ee(e,n.kind),i=E.blocks[e]?.section??null;h.focus(),await Ne([{op:"remove",anchor:e}],t,`Removing ${t}…`,i)},en=async(e,t,i,a)=>{if(!J()||R||E?.widMap[e]===void 0)return;const d=ee(e,n.kind);h.focus(),await Ne([{op:"style",anchor:e,style:{[t]:i}}],d,`${t==="background"?"Filling":"Colouring the text of"} ${d}: ${a.toLowerCase()}…`,e)},rt=e=>{const t=E?.blocks[e]?.section;return t===void 0||E?.widMap[t]===void 0?!1:(Q(t),!0)};U.addEventListener("click",()=>{m!==null&&rt(m)}),re.addEventListener("click",()=>{m!==null&&ot(m)});for(const e of Array.from(S.querySelectorAll("[data-width]")))e.addEventListener("click",()=>{const t=Number(e.dataset.width);q=q===t?null:t,be(),T()});window.addEventListener("resize",()=>{be(),T()}),c.addEventListener("keydown",e=>{e.stopPropagation(),e.key==="Enter"?(e.preventDefault(),Qt()):e.key==="Escape"&&(e.preventDefault(),I(),h.focus())}),c.addEventListener("blur",()=>{I()});const tn=()=>[...Array.from(S.querySelectorAll("button")),h,...Array.from(F.querySelectorAll("button")),...Array.from(w?.querySelectorAll("button")??[])].filter(e=>e.closest("[hidden]")===null&&!(e instanceof HTMLButtonElement&&e.disabled)),st=(e,t)=>{if(e.target===c)return;const i=e.target?.tagName==="BUTTON";if(!(i&&(e.key==="Enter"||e.key===" "))){if(e.key==="Escape"){if(!t&&m!==null){e.preventDefault(),Q(null);return}e.preventDefault(),j("ui.key",{key:"Escape"});return}if((e.metaKey||e.ctrlKey)&&!e.altKey&&e.key.toLowerCase()==="k"){e.preventDefault(),j("ui.key",{key:"Mod+K"});return}if(!t&&(e.metaKey||e.ctrlKey)&&!e.altKey&&(e.key==="Backspace"||e.key==="Delete")){e.preventDefault(),m!==null&&!R&&ot(m);return}if(!t&&e.altKey&&!e.metaKey&&!e.ctrlKey&&e.key==="ArrowUp"){e.preventDefault(),m!==null&&rt(m);return}if(e.altKey&&!e.metaKey&&!e.ctrlKey&&/^Key[A-Z]$/.test(e.code)&&Ye(`Alt+${e.code.slice(3)}`)){e.preventDefault(),j("ui.key",{key:`Alt+${e.code.slice(3)}`});return}if(e.key==="Tab"){e.preventDefault();const a=tn(),d=a.indexOf(document.activeElement),u=d===-1&&document.activeElement===o&&!e.shiftKey?0:d+(e.shiftKey?-1:1);if(d===-1&&u!==0||u<0||u>=a.length){j("ui.key",{key:e.shiftKey?"Shift+Tab":"Tab"});return}a[u].focus();return}if(!(e.metaKey||e.ctrlKey||e.altKey)&&!(i&&e.key.length!==1)){if(e.key==="Enter"){!t&&m!==null&&!R&&se()&&(e.preventDefault(),nt(m,null));return}if(e.key.length===1){if(e.preventDefault(),!t&&m!==null&&!R&&se()){nt(m,e.key);return}j("ui.typed",{grapheme:e.key})}}}};o.addEventListener("keydown",e=>st(e,!1)),w?.addEventListener("keydown",e=>st(e,!0));const je=e=>{v=e,document.body.dataset.size=e,e==="inline"&&(I(),b<2&&Q(null),document.activeElement?.blur?.()),be(),T()},it=e=>{if(!(typeof e!="object"||e===null))for(const[t,i]of Object.entries(e))/^--[a-z0-9-]+$/.test(t)&&typeof i=="string"&&i.length<=200&&!/url\(/i.test(i)&&document.documentElement.style.setProperty(t,i)},nn=e=>{const t=e.data;try{if(t===null||typeof t!="object"||t.p!==oe||t.v!==de)return;if(typeof t.re=="string"){const a=Te.get(t.re);if(a===void 0)return;Te.delete(t.re);const d=typeof t.payload=="object"&&t.payload!==null?t.payload:{};t.ok===!0?a({ok:!0,payload:d}):a({ok:!1,error:t.error??{code:"unavailable",message:"no answer"},payload:d});return}if(Se!==null&&Se.dispatch(t))return;const i=typeof t.payload=="object"&&t.payload!==null?t.payload:{};switch(t.type){case"host.ping":typeof t.id=="string"&&k?.postMessage({p:oe,v:de,re:t.id,ok:!0,payload:{}});return;case"host.size":(i.size==="inline"||i.size==="pane"||i.size==="full")&&je(i.size);return;case"host.theme":it(i.theme);return;case"artifact.changed":{ae&&Be();const a=i.version;typeof a=="number"&&a!==C&&(G=G??m,Y(a));return}case"selection.cleared":X=null,m!==null&&(m=null,I(),T());return;default:return}}catch{}};window.addEventListener("message",e=>{const t=e.data;if(k!==null||t===null||typeof t!="object"||t.p!==oe||t.type!=="host.hello"||e.ports[0]===void 0)return;k=e.ports[0],k.onmessage=nn;const i=typeof t.payload=="object"&&t.payload!==null?t.payload:{};A=Array.isArray(i.grants)?i.grants.filter(d=>typeof d=="string"):[],it(i.theme);const a=Rt(i);b=a.protocol,b>=2?(M=i.surface==="options"?"options":a.surface,Z=a.tab??"style",_=a.mode??"simple",Se=new Kt(k,{surface:(d,u)=>{M=d,u!==null&&(_=u),xe()},mode:d=>(_=d,n.coverage?xe():T(),_),tab:d=>{n.coverage&&(Z=d,xe())},selection:d=>{const u=d.find(p=>typeof p=="object"&&p!==null&&p.kind==="element"&&typeof p.id=="string");M==="options"&&u!==void 0||(X=u?.id??null,m=u!==void 0&&E?.widMap[u.id]!==void 0?u.id:null,m!==null&&n.coverage&&ke(m),I(),T())}}),xe()):je(a.size),Y()});const at=O("style");let Ie=null;const xe=()=>{const e=M==="options",t=n.coverage&&e&&Z==="coverage",i=n.coverage&&M==="full"&&_==="advanced";n.coverage&&(document.body.dataset.coverage=i?"side":"",w!==null&&(w.hidden=!t&&!i),(t||i)&&(fe(),Be())),at.hidden=!e||t,o.hidden=e,e&&!t&&Ie===null&&(Ie=jt(at,{tokens:()=>ue,key:a=>j("ui.key",{key:a}),apply:async a=>{for(let d=0;d<2;d+=1){if(C===null)return{ok:!1,reason:`The ${n.kind} is not loaded yet`};const u=await ie("theme.set",{base:C,tokens:a});if(u.ok){const le=u.payload.version;return ue={name:a.name,colors:{...a.colors},fonts:{...a.fonts}},typeof le=="number"&&await Y(le),{ok:!0}}if(u.error.code!=="head_moved")return{ok:!1,reason:u.error.message};const p=await ie("artifact.read",{});if(!p.ok)return{ok:!1,reason:p.error.message||p.error.code};const $=p.payload.version;if(typeof $!="number"||C!==null&&$<C)return{ok:!1,reason:`The current ${n.kind} version could not be read.`};if(Ke(p.payload),d===1)return{ok:!1,reason:u.error.message||u.error.code}}return{ok:!1,reason:`The ${n.kind} changed again: try once more`}}})),je(_t(M))};Dt(n.editor,n.surfaces)}const Ht={card:{interactive:!0,aspect:"16:9",actions:[{id:"ask",label:"Ask about this",verb:"host:ask"}]},options:{tabs:[{id:"style",label:"Style",render:"plugin"}]},full:{modes:["simple","advanced"],default:"simple"}};function Ze(){Wt({editor:"wicked-page",surfaces:Ht,kind:"page",coverage:!1})}return Ze(),K.start=Ze,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"}),K})({});
162
+ body[data-coverage="side"] #coverage{position:absolute;right:0;top:0;width:min(300px,38%);border-left:1px solid var(--border)}`,document.body.append(t)}const ye=()=>{if(E===null)return;if(E.replaceChildren(),delete E.dataset.total,delete E.dataset.rows,delete E.dataset.named,ce){const h=document.createElement("p");h.textContent="Couldn't read the requirements · ";const T=document.createElement("button");T.type="button",T.textContent="Try again",T.addEventListener("click",()=>{_e()}),h.append(T),E.append(h);return}if(Q===null){const h=document.createElement("p");h.textContent="Reading requirements…",E.append(h);return}if(Q.length===0){const h=document.createElement("p");h.textContent="No requirements for this document's repository",E.append(h);return}const t=xt(Q.map(h=>({key:h.id,reqId:h.id,title:h.text,risk:!1})),Me),o=t.filter(h=>h.wid!==null),c=t.filter(h=>h.wid===null);E.dataset.total=String(Fe),E.dataset.rows=String(t.length),E.dataset.named=String(o.length);const d=document.createElement("h2");d.textContent="Requirements",E.append(d);const p=document.createElement("p");p.dataset.testid="doc-coverage-line",p.textContent=Et(t,Fe),E.append(p);const f=(h,T)=>{if(T.length===0)return;const de=document.createElement("p");de.textContent=`${h} (${T.length})`,E.append(de);for(const q of T){const X=document.createElement("button");X.type="button",X.dataset.testid="doc-coverage-row",X.dataset.req=q.reqId,X.dataset.named=String(q.wid!==null),X.disabled=q.wid===null,X.textContent=`${q.reqId} · ${q.title}${q.wid===null?"":` · ${ne(q.wid,e.kind)}`}`,X.addEventListener("click",()=>{if(q.wid!==null){if(L==="options"){S.includes("selection.chip")&&U("selection.set",{anchors:[{kind:"element",id:q.wid}]});return}te(q.wid,!0),Ae(q.wid)}}),E.append(X)}};f("Not named",c),f("Named",o)},_e=async()=>{if(!(!e.coverage||Q!==null||je)){je=!0,ce=!1,ye();try{const t=await le("checks.read",{}),o=t.ok?t.payload.checks:null;if(!t.ok||!Array.isArray(o)){ce=!0;return}Q=o.filter(c=>typeof c=="object"&&c!==null&&typeof c.id=="string"&&typeof c.text=="string"),Fe=typeof t.payload.total=="number"?t.payload.total:Q.length}catch{ce=!0}finally{je=!1,ye()}}},mn=t=>{const o=new DOMParser().parseFromString(t,"text/html");Me=Object.create(null);const c=Array.from(o.querySelectorAll("[data-wid]")),d=new Map;for(const p of c){const f=p.getAttribute("data-wid")??"";d.set(f,(d.get(f)??0)+1)}for(const p of c){const f=p.getAttribute("data-wid")??"";!/^[A-Za-z0-9_.:-]{1,100}$/.test(f)||d.get(f)!==1||(Me[f]={text:(p.textContent??"").replace(/\s+/g," ").trim(),composite:p.querySelector("[data-wid]")!==null})}ye()};let $=null,me={scrollX:0,scrollY:0},ge=null,b=null,_=null,ve=null,N=!1,at=[],P=null,Be=0,lt=-1,ee=null,De=null,ct=0,be=[],Ne=!1,qe=null,we=null;const dt=t=>{s?.contentWindow?.postMessage(t,"*")},gn=t=>{if(t===s){lt=Be;for(const o of be)clearTimeout(o);be=un.map(o=>setTimeout(()=>dt(Ft),o))}},vn=t=>{const o=document.createElement("iframe");for(const[d,p]of Object.entries({"data-testid":"page-frame",sandbox:"allow-scripts",title:e.kind==="document"?"The document":"The page",class:"frame"}))o.setAttribute(d,p);o.addEventListener("load",()=>gn(o));const c=s;s=o;for(const d of be)clearTimeout(d);o.srcdoc=cn(t),r.appendChild(o),c?.remove(),ke()},ut=()=>{const t=y==="inline"?0:Te;if(P===null)return{x:0,y:t,s:1};const o=r.clientWidth,c=o>0?Math.min(1,o/P):1;return{x:Math.max(0,(o-P*c)/2),y:t,s:c}},ke=()=>{r.style.top=`${y==="inline"?0:Te}px`,n.dataset.width=P===null?"":String(P);for(const c of Array.from(v.querySelectorAll("[data-width]")))c.setAttribute("aria-pressed",String(Number(c.dataset.width)===P));if(s===null)return;if(P===null){s.style.cssText="";return}const t=ut(),o=r.clientHeight>0?r.clientHeight/t.s:0;s.style.cssText=`position:absolute;left:${t.x}px;top:0;width:${P}px;${o>0?`height:${o}px;`:""}transform:scale(${t.s});transform-origin:0 0`},xe=t=>{if(t===null||$===null)return null;const o=$.widMap[t];if(o===void 0)return null;const c=Tt(o,$.measured,me),d=ut();return{left:d.x+c.left*d.s,top:d.y+c.top*d.s,width:c.width*d.s,height:c.height*d.s}},Ie=(t,o,c=0,d=0)=>{if(o===null){t.hidden=!0;return}t.hidden=!1,t.style.left=`${o.left}px`,t.style.top=`${o.top}px`,t.style.width=`${Math.max(o.width,c)}px`,t.style.height=`${Math.max(o.height,d)}px`},Pe=()=>(y!=="inline"||k>=2&&L==="card")&&$!==null,R=()=>{if(n.dataset.head=O===null?"":String(O),n.dataset.pickable=String(Pe()),n.dataset.selected=b??"",n.dataset.size=y,Ie(i,ge!==b&&_===null?xe(ge):null),l.dataset.wid=b??"",Ie(l,_===null?xe(b):null),_!==null?Ie(a,xe(_.wid),160,30):a.hidden=!0,v.hidden=y==="inline",n.dataset.mode=k>=2?D:"",B.hidden=!G(),g.hidden=!G(),m.hidden=!G(),bn(),!ae()||!Pe()||_!==null){w.hidden=!0;return}if(w.hidden=!1,b===null){w.removeAttribute("data-editable"),w.textContent="Click an element to make it the subject · type on it to change it";return}const t=ne(b,e.kind),o=st($,b);w.dataset.editable=String(o==="yes"),w.textContent=o==="yes"?`Type to change ${t} · Enter to edit its text · Esc to let go`:o==="container"?`${Oe(t)} holds other parts — click a line of text inside it to change the words · Esc to let go`:o==="cut"?`${Oe(t)} is too long to change by typing — say what to change in the message box · Esc to let go`:`${Oe(t)} can’t be changed by typing — say what to change in the message box · Esc to let go`},bn=()=>{const t=G()&&Pe()&&_===null&&!N?xe(b):null;if(t===null||b===null){A.hidden=!0;return}A.hidden=!1,F.hidden=$?.blocks[b]?.section===void 0;const o=A.offsetHeight||30,c=t.top+t.height+6,d=n.clientHeight===0||c+o<=n.clientHeight-4,p=A.offsetWidth,f=n.clientWidth>0?n.clientWidth-p-4:1/0;A.style.left=`${Math.max(4,Math.min(t.left,f))}px`,A.style.top=`${d?c:Math.max(Te+2,t.top-o-6)}px`},pt=(t,o)=>{for(const d of Array.from(t.querySelectorAll("button")))d.remove();const c=(d,p)=>{const f=document.createElement("button");f.type="button",f.className=d===Ce?"swatch swatch--default":"swatch";for(const[h,T]of Object.entries({"data-testid":"page-swatch"}))f.setAttribute(h,T);f.dataset.prop=o,f.dataset.value=d,f.title=`${o==="background"?"Fill":"Text"}: ${p}`,f.setAttribute("aria-label",f.title),d===Ce?f.textContent="Default":f.style.setProperty("--swatch",d),f.addEventListener("click",()=>{b!==null&&kn(b,o,d,p)}),t.appendChild(f)};for(const d of at)c(d.value,d.label);c(Ce,"Default")},W=()=>{if(_===null)return;_=null,a.hidden=!0,a.value="";const t=ve;ve=null,t!==null&&ze(t),R()},te=(t,o=!1)=>{Y=null,b=t,W(),R(),t!==null&&(S.includes("selection.chip")&&U("selection.set",{anchors:[{kind:"element",id:t}]}),o||u.focus())},Ae=t=>{ct+=1,dt(jt(t,ct))},ze=t=>{const o=t.version;if(typeof o=="number"&&O!==null&&o<O)return;if(_!==null){const p=ve?.version;typeof o=="number"&&o>_.base&&(typeof p!="number"||o>=p)&&(ve=t);return}C.hidden=!0;const c=t.content,d=typeof c?.html=="string"?c.html:"";e.coverage&&mn(d),O=typeof o=="number"?o:O,at=zt(d),fe=Qt(d)??fe,We?.refresh(),pt(g,"background"),pt(m,"color"),Be+=1,De=ee,ee=null,$=null,ge=null,b=null,W(),R(),vn(Bt(d)?d:Nt(d))},H=async t=>{if(Ne){if(t!==void 0&&t===qe)return;we=t===void 0?{}:{version:t};return}Ne=!0,qe=t??null;try{const o=await le("artifact.read",t===void 0?{}:{version:t});if(!o.ok){C.hidden=!1,C.textContent=o.error.code==="not_granted"?`This editor may not read the ${e.kind} here.`:`The ${e.kind} could not be read (${o.error.code}).`;return}ze(o.payload)}finally{if(Ne=!1,qe=null,we!==null){const o=we;we=null,(o.version===void 0||o.version!==O)&&H(o.version)}}};window.addEventListener("message",t=>{if(s===null||s.contentWindow===null||t.source!==s.contentWindow||lt!==Be)return;const o=Mt(t.data);if(o!==null){if(o.type==="wid-inventory"){for(const d of be)clearTimeout(d);$={widMap:o.widMap,blocks:o.blocks??{},measured:{scrollX:o.scrollX,scrollY:o.scrollY}},me={scrollX:o.scrollX,scrollY:o.scrollY};const c=De;De=null,c!==null&&o.widMap[c]!==void 0&&Ae(c),Y!==null&&o.widMap[Y]!==void 0&&(b=Y,e.coverage&&Ae(Y)),R()}else if(o.type==="scroll-state")me={scrollX:o.scrollX,scrollY:o.scrollY},R();else if(o.type==="scroll-ack")o.scrollX!==void 0&&o.scrollY!==void 0&&(me={scrollX:o.scrollX,scrollY:o.scrollY},R());else if(o.type==="wid-hover")ge=o.wid,R();else if(o.type==="wid-click"){if(k===1&&y==="inline")return;if(k===2&&L==="card"){te(o.wid);return}const c=o.wid===b?$?.blocks[o.wid]?.section:void 0;te(c!==void 0&&$?.widMap[c]!==void 0?c:o.wid)}}});const ft=(t,o)=>{if(!ae()||N||O===null||$===null||st($,t)!=="yes")return;const c=$.blocks[t]?.text??"";_={wid:t,before:c,base:O},a.value=o??c,R(),a.focus(),o===null?a.select():a.setSelectionRange(a.value.length,a.value.length)},Ke=async(t,o,c,d,p=O)=>{if(O===null||N)return;N=!0,R(),he(c);const f=d;try{const h=await le("version.write",{base:p,ops:t,summary:o});if(h.ok)ee=f,await H(typeof h.payload.version=="number"?h.payload.version:void 0);else if(h.error.code==="stale"||h.error.code==="head_moved"){he(h.error.code==="stale"&&h.error.message?h.error.message:"Not changed: it moved while you typed"),ee=f;const T=h.payload?.head;h.error.code==="head_moved"?await H(typeof T=="number"?T:void 0):typeof T=="number"&&T!==O&&await H(T)}else h.error.code==="timeout"||(h.error.code==="refused"?he(h.error.message||"Nothing changed"):he(`Not changed: ${h.error.message||h.error.code}`))}finally{N=!1,R()}},wn=async()=>{if(_===null||O===null||N)return;const{wid:t,before:o,base:c}=_,d=a.value.replace(/\s*\n\s*/g," ");if(W(),u.focus(),d===o)return;const p=ne(t,e.kind);await Ke([{op:"text",anchor:t,value:d,before:o}],p,`Changing ${p}…`,t,c)},ht=async t=>{if(!G()||N||$?.widMap[t]===void 0)return;const o=ne(t,e.kind),c=$.blocks[t]?.section??null;u.focus(),await Ke([{op:"remove",anchor:t}],o,`Removing ${o}…`,c)},kn=async(t,o,c,d)=>{if(!G()||N||$?.widMap[t]===void 0)return;const p=ne(t,e.kind);u.focus(),await Ke([{op:"style",anchor:t,style:{[o]:c}}],p,`${o==="background"?"Filling":"Colouring the text of"} ${p}: ${d.toLowerCase()}…`,t)},yt=t=>{const o=$?.blocks[t]?.section;return o===void 0||$?.widMap[o]===void 0?!1:(te(o),!0)};F.addEventListener("click",()=>{b!==null&&yt(b)}),B.addEventListener("click",()=>{b!==null&&ht(b)});for(const t of Array.from(v.querySelectorAll("[data-width]")))t.addEventListener("click",()=>{const o=Number(t.dataset.width);P=P===o?null:o,ke(),R()});window.addEventListener("resize",()=>{ke(),R()}),a.addEventListener("keydown",t=>{t.stopPropagation(),t.key==="Enter"?(t.preventDefault(),wn()):t.key==="Escape"&&(t.preventDefault(),W(),u.focus())}),a.addEventListener("blur",()=>{W()});const xn=()=>[...Array.from(v.querySelectorAll("button")),u,...Array.from(A.querySelectorAll("button")),...Array.from(E?.querySelectorAll("button")??[])].filter(t=>t.closest("[hidden]")===null&&!(t instanceof HTMLButtonElement&&t.disabled)),mt=(t,o)=>{if(t.target===a)return;const c=t.target?.tagName==="BUTTON";if(!(c&&(t.key==="Enter"||t.key===" "))){if(t.key==="Escape"){if(!o&&b!==null){t.preventDefault(),te(null);return}t.preventDefault(),U("ui.key",{key:"Escape"});return}if((t.metaKey||t.ctrlKey)&&!t.altKey&&t.key.toLowerCase()==="k"){t.preventDefault(),U("ui.key",{key:"Mod+K"});return}if(!o&&(t.metaKey||t.ctrlKey)&&!t.altKey&&(t.key==="Backspace"||t.key==="Delete")){t.preventDefault(),b!==null&&!N&&ht(b);return}if(!o&&t.altKey&&!t.metaKey&&!t.ctrlKey&&t.key==="ArrowUp"){t.preventDefault(),b!==null&&yt(b);return}if(t.altKey&&!t.metaKey&&!t.ctrlKey&&/^Key[A-Z]$/.test(t.code)&&He(`Alt+${t.code.slice(3)}`)){t.preventDefault(),U("ui.key",{key:`Alt+${t.code.slice(3)}`});return}if(t.key==="Tab"){t.preventDefault();const d=xn(),p=d.indexOf(document.activeElement),f=p===-1&&document.activeElement===n&&!t.shiftKey?0:p+(t.shiftKey?-1:1);if(p===-1&&f!==0||f<0||f>=d.length){U("ui.key",{key:t.shiftKey?"Shift+Tab":"Tab"});return}d[f].focus();return}if(!(t.metaKey||t.ctrlKey||t.altKey)&&!(c&&t.key.length!==1)){if(t.key==="Enter"){!o&&b!==null&&!N&&ae()&&(t.preventDefault(),ft(b,null));return}if(t.key.length===1){if(t.preventDefault(),!o&&b!==null&&!N&&ae()){ft(b,t.key);return}U("ui.typed",{grapheme:t.key})}}}};n.addEventListener("keydown",t=>mt(t,!1)),E?.addEventListener("keydown",t=>mt(t,!0));const Ue=t=>{y=t,document.body.dataset.size=t,t==="inline"&&(W(),k<2&&te(null),document.activeElement?.blur?.()),ke(),R()},gt=t=>{if(!(typeof t!="object"||t===null))for(const[o,c]of Object.entries(t))/^--[a-z0-9-]+$/.test(o)&&typeof c=="string"&&c.length<=200&&!/url\(/i.test(c)&&document.documentElement.style.setProperty(o,c)},An=t=>{const o=t.data;try{if(o===null||typeof o!="object"||o.p!==ie||o.v!==pe)return;if(typeof o.re=="string"){const d=Re.get(o.re);if(d===void 0)return;Re.delete(o.re);const p=typeof o.payload=="object"&&o.payload!==null?o.payload:{};o.ok===!0?d({ok:!0,payload:p}):d({ok:!1,error:o.error??{code:"unavailable",message:"no answer"},payload:p});return}if(Le!==null&&Le.dispatch(o))return;const c=typeof o.payload=="object"&&o.payload!==null?o.payload:{};switch(o.type){case"host.ping":typeof o.id=="string"&&x?.postMessage({p:ie,v:pe,re:o.id,ok:!0,payload:{}});return;case"host.size":(c.size==="inline"||c.size==="pane"||c.size==="full")&&Ue(c.size);return;case"host.theme":gt(c.theme);return;case"artifact.changed":{ce&&_e();const d=c.version;typeof d=="number"&&d!==O&&(ee=ee??b,H(d));return}case"selection.cleared":Y=null,b!==null&&(b=null,W(),R());return;default:return}}catch{}};window.addEventListener("message",t=>{const o=t.data;if(x!==null||o===null||typeof o!="object"||o.p!==ie||o.type!=="host.hello"||t.ports[0]===void 0)return;x=t.ports[0],x.onmessage=An;const c=typeof o.payload=="object"&&o.payload!==null?o.payload:{};S=Array.isArray(c.grants)?c.grants.filter(p=>typeof p=="string"):[],gt(c.theme);const d=Xt(c);k=d.protocol,k>=2?(L=c.surface==="options"?"options":d.surface,Z=d.tab??"style",D=d.mode??"simple",Le=new Vt(x,{surface:(p,f)=>{L=p,f!==null&&(D=f),Ee()},mode:p=>(D=p,e.coverage?Ee():R(),D),tab:p=>{e.coverage&&(Z=p,Ee())},selection:p=>{const f=p.find(h=>typeof h=="object"&&h!==null&&h.kind==="element"&&typeof h.id=="string");L==="options"&&f!==void 0||(Y=f?.id??null,b=f!==void 0&&$?.widMap[f.id]!==void 0?f.id:null,b!==null&&e.coverage&&Ae(b),W(),R())}}),Ee()):Ue(d.size),H()});const vt=M("style");let We=null;const Ee=()=>{const t=L==="options",o=e.coverage&&t&&Z==="coverage",c=e.coverage&&L==="full"&&D==="advanced";e.coverage&&(document.body.dataset.coverage=c?"side":"",E!==null&&(E.hidden=!o&&!c),(o||c)&&(ye(),_e())),vt.hidden=!t||o,n.hidden=t,t&&!o&&We===null&&(We=Gt(vt,{tokens:()=>fe,key:d=>U("ui.key",{key:d}),apply:async d=>{for(let p=0;p<2;p+=1){if(O===null)return{ok:!1,reason:`The ${e.kind} is not loaded yet`};const f=await le("theme.set",{base:O,tokens:d});if(f.ok){const de=f.payload.version;return fe={name:d.name,colors:{...d.colors},fonts:{...d.fonts}},typeof de=="number"&&await H(de),{ok:!0}}if(f.error.code!=="head_moved")return{ok:!1,reason:f.error.message};const h=await le("artifact.read",{});if(!h.ok)return{ok:!1,reason:h.error.message||h.error.code};const T=h.payload.version;if(typeof T!="number"||O!==null&&T<O)return{ok:!1,reason:`The current ${e.kind} version could not be read.`};if(ze(h.payload),p===1)return{ok:!1,reason:f.error.message||f.error.code}}return{ok:!1,reason:`The ${e.kind} changed again: try once more`}}})),Ue(Wt(L))};Ht(e.editor,e.surfaces)}const hn={card:{interactive:!0,aspect:"16:9",actions:[{id:"ask",label:"Ask about this",verb:"host:ask"}]},options:{tabs:[{id:"style",label:"Style",render:"plugin"}]},full:{modes:["simple","advanced"],default:"simple"}};function it(){fn({editor:"wicked-page",surfaces:hn,kind:"page",coverage:!1})}return it(),z.start=it,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"}),z})({});
159
163
  </script>
160
164
  </body>
161
165
  </html>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "wicked-video",
3
3
  "title": "Video",
4
- "version": "0.14.1",
4
+ "version": "0.15.0",
5
5
  "protocol": [
6
6
  1,
7
7
  2
@@ -1,7 +1,7 @@
1
1
  <!doctype html>
2
2
  <html lang="en"><head><meta charset="utf-8">
3
3
  <meta name="wicked-editor" content="wicked-video">
4
- <meta name="wicked-editor-version" content="0.14.1">
4
+ <meta name="wicked-editor-version" content="0.15.0">
5
5
  <title>Video</title>
6
6
  <style>
7
7
  :root{--surface-base:#fff;--surface-card:#f6f7f9;--surface-raised:#fff;--ink-high:#0d1117;--ink-body:#2b333d;--ink-muted:#5b6673;--border:#d5dae1;--accent:#224a5e;--font-sans:system-ui,sans-serif}
@@ -0,0 +1,97 @@
1
+ Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)
2
+ Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
3
+ Wicked Sans A modifications Copyright 2026 The Wicked Agile Project Authors.
4
+
5
+ Wicked Sans A is a Modified Version of the Font Software above, derived from Inter 4.1 (rsms/inter): renamed; alternates frozen; tabular figures by default on the digits; a close mark (U+2715) added; subset. The original declares no Reserved Font Name.
6
+
7
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
8
+ This license is copied below, and is also available with a FAQ at:
9
+ https://scripts.sil.org/OFL
10
+
11
+
12
+ -----------------------------------------------------------
13
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
14
+ -----------------------------------------------------------
15
+
16
+ PREAMBLE
17
+ The goals of the Open Font License (OFL) are to stimulate worldwide
18
+ development of collaborative font projects, to support the font creation
19
+ efforts of academic and linguistic communities, and to provide a free and
20
+ open framework in which fonts may be shared and improved in partnership
21
+ with others.
22
+
23
+ The OFL allows the licensed fonts to be used, studied, modified and
24
+ redistributed freely as long as they are not sold by themselves. The
25
+ fonts, including any derivative works, can be bundled, embedded,
26
+ redistributed and/or sold with any software provided that any reserved
27
+ names are not used by derivative works. The fonts and derivatives,
28
+ however, cannot be released under any other type of license. The
29
+ requirement for fonts to remain under this license does not apply
30
+ to any document created using the fonts or their derivatives.
31
+
32
+ DEFINITIONS
33
+ "Font Software" refers to the set of files released by the Copyright
34
+ Holder(s) under this license and clearly marked as such. This may
35
+ include source files, build scripts and documentation.
36
+
37
+ "Reserved Font Name" refers to any names specified as such after the
38
+ copyright statement(s).
39
+
40
+ "Original Version" refers to the collection of Font Software components as
41
+ distributed by the Copyright Holder(s).
42
+
43
+ "Modified Version" refers to any derivative made by adding to, deleting,
44
+ or substituting -- in part or in whole -- any of the components of the
45
+ Original Version, by changing formats or by porting the Font Software to a
46
+ new environment.
47
+
48
+ "Author" refers to any designer, engineer, programmer, technical
49
+ writer or other person who contributed to the Font Software.
50
+
51
+ PERMISSION & CONDITIONS
52
+ Permission is hereby granted, free of charge, to any person obtaining
53
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
54
+ redistribute, and sell modified and unmodified copies of the Font
55
+ Software, subject to the following conditions:
56
+
57
+ 1) Neither the Font Software nor any of its individual components,
58
+ in Original or Modified Versions, may be sold by itself.
59
+
60
+ 2) Original or Modified Versions of the Font Software may be bundled,
61
+ redistributed and/or sold with any software, provided that each copy
62
+ contains the above copyright notice and this license. These can be
63
+ included either as stand-alone text files, human-readable headers or
64
+ in the appropriate machine-readable metadata fields within text or
65
+ binary files as long as those fields can be easily viewed by the user.
66
+
67
+ 3) No Modified Version of the Font Software may use the Reserved Font
68
+ Name(s) unless explicit written permission is granted by the corresponding
69
+ Copyright Holder. This restriction only applies to the primary font name as
70
+ presented to the users.
71
+
72
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
73
+ Software shall not be used to promote, endorse or advertise any
74
+ Modified Version, except to acknowledge the contribution(s) of the
75
+ Copyright Holder(s) and the Author(s) or with their explicit written
76
+ permission.
77
+
78
+ 5) The Font Software, modified or unmodified, in part or in whole,
79
+ must be distributed entirely under this license, and must not be
80
+ distributed under any other license. The requirement for fonts to
81
+ remain under this license does not apply to any document created
82
+ using the Font Software.
83
+
84
+ TERMINATION
85
+ This license becomes null and void if any of the above conditions are
86
+ not met.
87
+
88
+ DISCLAIMER
89
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
90
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
91
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
92
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
93
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
94
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
95
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
96
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
97
+ OTHER DEALINGS IN THE FONT SOFTWARE.
package/dist/index.html CHANGED
@@ -4,8 +4,9 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>wicked-studio</title>
7
- <script type="module" crossorigin src="/assets/index-u4O_7N-b.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-BUZ_-Syk.css">
7
+ <link rel="icon" type="image/svg+xml" href="/assets/favicon-BJA6hF2f.svg" />
8
+ <script type="module" crossorigin src="/assets/index-CVrWDGRP.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-BRBwWQMH.css">
9
10
  </head>
10
11
  <body>
11
12
  <div id="root"></div>