@uniweb/runtime 0.9.10 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/_importmap/@uniweb-core.js +1 -1
- package/dist/app/_importmap/@uniweb-runtime-default-fetcher.js +1 -0
- package/dist/app/_importmap/@uniweb-runtime-foundation-loader.js +1 -0
- package/dist/app/_importmap/@uniweb-runtime-provider.js +1 -0
- package/dist/app/_importmap/@uniweb-runtime-setup.js +1 -0
- package/dist/app/_importmap/@uniweb-theming.js +53 -0
- package/dist/app/_importmap/react-router-dom.js +1 -0
- package/dist/app/assets/_importmap_react-router-dom-CLbp1nUY.js +3 -0
- package/dist/app/assets/index-C_CSAb0x.js +59 -0
- package/dist/app/assets/index-DIdy_K3F.js +9 -0
- package/dist/app/assets/index-n0uF7vTr.js +74 -0
- package/dist/app/assets/normalize-DbApPPeG.js +1 -0
- package/dist/app/assets/setup-BeQi33In.js +1 -0
- package/dist/app/assets/shade-generator-BBzWo1IN.js +1 -0
- package/dist/app/index.html +19 -3
- package/dist/app/manifest.json +15 -4
- package/package.json +2 -2
- package/dist/app/assets/core-BI26Dvfl.js +0 -132
- package/dist/app/assets/index-Dfiy0YWz.js +0 -63
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
const Te=Symbol.for("yaml.alias"),ct=Symbol.for("yaml.document"),F=Symbol.for("yaml.map"),Ve=Symbol.for("yaml.pair"),Be=Symbol.for("yaml.scalar"),ee=Symbol.for("yaml.seq"),B=Symbol.for("yaml.node.type"),J=n=>!!n&&typeof n=="object"&&n[B]===Te,pe=n=>!!n&&typeof n=="object"&&n[B]===ct,ye=n=>!!n&&typeof n=="object"&&n[B]===F,A=n=>!!n&&typeof n=="object"&&n[B]===Ve,k=n=>!!n&&typeof n=="object"&&n[B]===Be,ge=n=>!!n&&typeof n=="object"&&n[B]===ee;function E(n){if(n&&typeof n=="object")switch(n[B]){case F:case ee:return!0}return!1}function N(n){if(n&&typeof n=="object")switch(n[B]){case Te:case F:case Be:case ee:return!0}return!1}const He=n=>(k(n)||E(n))&&!!n.anchor,_=Symbol("break visit"),ut=Symbol("skip children"),X=Symbol("remove node");function z(n,e){const t=ht(e);pe(n)?Q(null,n.contents,t,Object.freeze([n]))===X&&(n.contents=null):Q(null,n,t,Object.freeze([]))}z.BREAK=_;z.SKIP=ut;z.REMOVE=X;function Q(n,e,t,s){const i=dt(n,e,t,s);if(N(i)||A(i))return pt(n,s,i),Q(n,i,t,s);if(typeof i!="symbol"){if(E(e)){s=Object.freeze(s.concat(e));for(let r=0;r<e.items.length;++r){const o=Q(r,e.items[r],t,s);if(typeof o=="number")r=o-1;else{if(o===_)return _;o===X&&(e.items.splice(r,1),r-=1)}}}else if(A(e)){s=Object.freeze(s.concat(e));const r=Q("key",e.key,t,s);if(r===_)return _;r===X&&(e.key=null);const o=Q("value",e.value,t,s);if(o===_)return _;o===X&&(e.value=null)}}return i}function ht(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function dt(n,e,t,s){if(typeof t=="function")return t(n,e,s);if(ye(e))return t.Map?.(n,e,s);if(ge(e))return t.Seq?.(n,e,s);if(A(e))return t.Pair?.(n,e,s);if(k(e))return t.Scalar?.(n,e,s);if(J(e))return t.Alias?.(n,e,s)}function pt(n,e,t){const s=e[e.length-1];if(E(s))s.items[n]=t;else if(A(s))n==="key"?s.key=t:s.value=t;else if(pe(s))s.contents=t;else{const i=J(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const yt={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},gt=n=>n.replace(/[!,[\]{}]/g,e=>yt[e]);class C{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},C.defaultYaml,e),this.tags=Object.assign({},C.defaultTags,t)}clone(){const e=new C(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new C(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:C.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},C.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:C.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},C.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),i=s.shift();switch(i){case"%TAG":{if(s.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[r,o]=s;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[r]=s;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{const o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}const[,s,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);const r=this.tags[s];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return s==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+gt(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let i;if(e&&s.length>0&&N(e.contents)){const r={};z(e.contents,(o,l)=>{N(l)&&l.tag&&(r[l.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[r,o]of s)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
|
|
2
|
+
`)}}C.defaultYaml={explicit:!1,version:"1.2"};C.defaultTags={"!!":"tag:yaml.org,2002:"};function Ze(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(t)}return!0}function mt(n){const e=new Set;return z(n,{Value(t,s){s.anchor&&e.add(s.anchor)}}),e}function bt(n,e){for(let t=1;;++t){const s=`${n}${t}`;if(!e.has(s))return s}}function xt(n,e){const t=[],s=new Map;let i=null;return{onAnchor:r=>{t.push(r),i??(i=mt(n));const o=bt(e,i);return i.add(o),o},setAnchors:()=>{for(const r of t){const o=s.get(r);if(typeof o=="object"&&o.anchor&&(k(o.node)||E(o.node)))o.node.anchor=o.anchor;else{const l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=r,l}}},sourceObjects:s}}function H(n,e,t,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let i=0,r=s.length;i<r;++i){const o=s[i],l=H(n,s,String(i),o);l===void 0?delete s[i]:l!==o&&(s[i]=l)}else if(s instanceof Map)for(const i of Array.from(s.keys())){const r=s.get(i),o=H(n,s,i,r);o===void 0?s.delete(i):o!==r&&s.set(i,o)}else if(s instanceof Set)for(const i of Array.from(s)){const r=H(n,s,i,i);r===void 0?s.delete(i):r!==i&&(s.delete(i),s.add(r))}else for(const[i,r]of Object.entries(s)){const o=H(n,s,i,r);o===void 0?delete s[i]:o!==r&&(s[i]=o)}return n.call(e,t,s)}function M(n,e,t){if(Array.isArray(n))return n.map((s,i)=>M(s,String(i),t));if(n&&typeof n.toJSON=="function"){if(!t||!He(n))return n.toJSON(e,t);const s={aliasCount:0,count:1,res:void 0};t.anchors.set(n,s),t.onCreate=r=>{s.res=r,delete t.onCreate};const i=n.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof n=="bigint"&&!t?.keep?Number(n):n}class Ie{constructor(e){Object.defineProperty(this,B,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:i,reviver:r}={}){if(!pe(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},l=M(this,"",o);if(typeof i=="function")for(const{count:f,res:a}of o.anchors.values())i(a,f);return typeof r=="function"?H(r,{"":l},"",l):l}}class wt extends Ie{constructor(e){super(Te),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let s;t?.aliasResolveCache?s=t.aliasResolveCache:(s=[],z(e,{Node:(r,o)=>{(J(o)||He(o))&&s.push(o)}}),t&&(t.aliasResolveCache=s));let i;for(const r of s){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};const{anchors:s,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){const f=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(f)}let l=s.get(o);if(l||(M(o,null,t),l=s.get(o)),l?.res===void 0){const f="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(f)}if(r>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=oe(i,o,s)),l.count*l.aliasCount>r)){const f="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(f)}return l.res}toString(e,t,s){const i=`*${this.source}`;if(e){if(Ze(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}}function oe(n,e,t){if(J(e)){const s=e.resolve(n),i=t&&s&&t.get(s);return i?i.count*i.aliasCount:0}else if(E(e)){let s=0;for(const i of e.items){const r=oe(n,i,t);r>s&&(s=r)}return s}else if(A(e)){const s=oe(n,e.key,t),i=oe(n,e.value,t);return Math.max(s,i)}return 1}const Xe=n=>!n||typeof n!="function"&&typeof n!="object";class S extends Ie{constructor(e){super(Be),this.value=e}toJSON(e,t){return t?.keep?this.value:M(this.value,e,t)}toString(){return String(this.value)}}S.BLOCK_FOLDED="BLOCK_FOLDED";S.BLOCK_LITERAL="BLOCK_LITERAL";S.PLAIN="PLAIN";S.QUOTE_DOUBLE="QUOTE_DOUBLE";S.QUOTE_SINGLE="QUOTE_SINGLE";const St="tag:yaml.org,2002:";function Ot(n,e,t){if(e){const s=t.filter(r=>r.tag===e),i=s.find(r=>!r.format)??s[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(s=>s.identify?.(n)&&!s.format)}function ce(n,e,t){if(pe(n)&&(n=n.contents),N(n))return n;if(A(n)){const u=t.schema[F].createNode?.(t.schema,null,t);return u.items.push(n),u}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:s,onAnchor:i,onTagObj:r,schema:o,sourceObjects:l}=t;let f;if(s&&n&&typeof n=="object"){if(f=l.get(n),f)return f.anchor??(f.anchor=i(n)),new wt(f.anchor);f={anchor:null,node:null},l.set(n,f)}e?.startsWith("!!")&&(e=St+e.slice(2));let a=Ot(n,e,o.tags);if(!a){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const u=new S(n);return f&&(f.node=u),u}a=n instanceof Map?o[F]:Symbol.iterator in Object(n)?o[ee]:o[F]}r&&(r(a),delete t.onTagObj);const y=a?.createNode?a.createNode(t.schema,n,t):typeof a?.nodeClass?.from=="function"?a.nodeClass.from(t.schema,n,t):new S(n);return e?y.tag=e:a.default||(y.tag=a.tag),f&&(f.node=y),y}function Fe(n,e,t){let s=t;for(let i=e.length-1;i>=0;--i){const r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){const o=[];o[r]=s,s=o}else s=new Map([[r,s]])}return ce(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const $t=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class ve extends Ie{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(s=>N(s)||A(s)?s.clone(e):s),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if($t(e))this.add(t);else{const[s,...i]=e,r=this.get(s,!0);if(E(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(s,Fe(this.schema,i,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}deleteIn(e){const[t,...s]=e;if(s.length===0)return this.delete(t);const i=this.get(t,!0);if(E(i))return i.deleteIn(s);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){const[s,...i]=e,r=this.get(s,!0);return i.length===0?!t&&k(r)?r.value:r:E(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!A(t))return!1;const s=t.value;return s==null||e&&k(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[t,...s]=e;if(s.length===0)return this.has(t);const i=this.get(t,!0);return E(i)?i.hasIn(s):!1}setIn(e,t){const[s,...i]=e;if(i.length===0)this.set(s,t);else{const r=this.get(s,!0);if(E(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(s,Fe(this.schema,i,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}}const kt=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function x(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const Y=(n,e,t)=>n.endsWith(`
|
|
3
|
+
`)?x(t,e):t.includes(`
|
|
4
|
+
`)?`
|
|
5
|
+
`+x(t,e):(n.endsWith(" ")?"":" ")+t,xe="flow",Ee="block",le="quoted";function me(n,e,t="flow",{indentAtStart:s,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:l}={}){if(!i||i<0)return n;i<r&&(r=0);const f=Math.max(1+r,1+i-e.length);if(n.length<=f)return n;const a=[],y={};let u=i-e.length;typeof s=="number"&&(s>i-Math.max(2,r)?a.push(0):u=i-s);let d,p,g=!1,c=-1,h=-1,w=-1;t===Ee&&(c=Je(n,c,e.length),c!==-1&&(u=c+f));for(let b;b=n[c+=1];){if(t===le&&b==="\\"){switch(h=c,n[c+1]){case"x":c+=3;break;case"u":c+=5;break;case"U":c+=9;break;default:c+=1}w=c}if(b===`
|
|
6
|
+
`)t===Ee&&(c=Je(n,c,e.length)),u=c+e.length+f,d=void 0;else{if(b===" "&&p&&p!==" "&&p!==`
|
|
7
|
+
`&&p!==" "){const O=n[c+1];O&&O!==" "&&O!==`
|
|
8
|
+
`&&O!==" "&&(d=c)}if(c>=u)if(d)a.push(d),u=d+f,d=void 0;else if(t===le){for(;p===" "||p===" ";)p=b,b=n[c+=1],g=!0;const O=c>w+1?c-2:h-1;if(y[O])return n;a.push(O),y[O]=!0,u=O+f,d=void 0}else g=!0}p=b}if(g&&l&&l(),a.length===0)return n;o&&o();let m=n.slice(0,a[0]);for(let b=0;b<a.length;++b){const O=a[b],$=a[b+1]||n.length;O===0?m=`
|
|
9
|
+
${e}${n.slice(0,$)}`:(t===le&&y[O]&&(m+=`${n[O]}\\`),m+=`
|
|
10
|
+
${e}${n.slice(O+1,$)}`)}return m}function Je(n,e,t){let s=e,i=e+1,r=n[i];for(;r===" "||r===" ";)if(e<i+t)r=n[++e];else{do r=n[++e];while(r&&r!==`
|
|
11
|
+
`);s=e,i=e+1,r=n[i]}return s}const be=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),we=n=>/^(%|---|\.\.\.)/m.test(n);function At(n,e,t){if(!e||e<0)return!1;const s=e-t,i=n.length;if(i<=s)return!1;for(let r=0,o=0;r<i;++r)if(n[r]===`
|
|
12
|
+
`){if(r-o>s)return!0;if(o=r+1,i-o<=s)return!1}return!0}function v(n,e){const t=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:s}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(we(n)?" ":"");let o="",l=0;for(let f=0,a=t[f];a;a=t[++f])if(a===" "&&t[f+1]==="\\"&&t[f+2]==="n"&&(o+=t.slice(l,f)+"\\ ",f+=1,l=f,a="\\"),a==="\\")switch(t[f+1]){case"u":{o+=t.slice(l,f);const y=t.substr(f+2,4);switch(y){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:y.substr(0,2)==="00"?o+="\\x"+y.substr(2):o+=t.substr(f,6)}f+=5,l=f+1}break;case"n":if(s||t[f+2]==='"'||t.length<i)f+=1;else{for(o+=t.slice(l,f)+`
|
|
13
|
+
|
|
14
|
+
`;t[f+2]==="\\"&&t[f+3]==="n"&&t[f+4]!=='"';)o+=`
|
|
15
|
+
`,f+=2;o+=r,t[f+2]===" "&&(o+="\\"),f+=1,l=f+1}break;default:f+=1}return o=l?o+t.slice(l):t,s?o:me(o,r,le,be(e,!1))}function je(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
|
|
16
|
+
`)||/[ \t]\n|\n[ \t]/.test(n))return v(n,e);const t=e.indent||(we(n)?" ":""),s="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
17
|
+
${t}`)+"'";return e.implicitKey?s:me(s,t,xe,be(e,!1))}function q(n,e){const{singleQuote:t}=e.options;let s;if(t===!1)s=v;else{const i=n.includes('"'),r=n.includes("'");i&&!r?s=je:r&&!i?s=v:s=t?je:v}return s(n,e)}let Le;try{Le=new RegExp(`(^|(?<!
|
|
18
|
+
))
|
|
19
|
+
+(?!
|
|
20
|
+
|$)`,"g")}catch{Le=/\n+(?!\n|$)/g}function fe({comment:n,type:e,value:t},s,i,r){const{blockQuote:o,commentString:l,lineWidth:f}=s.options;if(!o||/\n[\t ]+$/.test(t))return q(t,s);const a=s.indent||(s.forceBlockIndent||we(t)?" ":""),y=o==="literal"?!0:o==="folded"||e===S.BLOCK_FOLDED?!1:e===S.BLOCK_LITERAL?!0:!At(t,f,a.length);if(!t)return y?`|
|
|
21
|
+
`:`>
|
|
22
|
+
`;let u,d;for(d=t.length;d>0;--d){const $=t[d-1];if($!==`
|
|
23
|
+
`&&$!==" "&&$!==" ")break}let p=t.substring(d);const g=p.indexOf(`
|
|
24
|
+
`);g===-1?u="-":t===p||g!==p.length-1?(u="+",r&&r()):u="",p&&(t=t.slice(0,-p.length),p[p.length-1]===`
|
|
25
|
+
`&&(p=p.slice(0,-1)),p=p.replace(Le,`$&${a}`));let c=!1,h,w=-1;for(h=0;h<t.length;++h){const $=t[h];if($===" ")c=!0;else if($===`
|
|
26
|
+
`)w=h;else break}let m=t.substring(0,w<h?w+1:h);m&&(t=t.substring(m.length),m=m.replace(/\n+/g,`$&${a}`));let O=(c?a?"2":"1":"")+u;if(n&&(O+=" "+l(n.replace(/ ?[\r\n]+/g," ")),i&&i()),!y){const $=t.replace(/\n+/g,`
|
|
27
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${a}`);let j=!1;const T=be(s,!0);o!=="folded"&&e!==S.BLOCK_FOLDED&&(T.onOverflow=()=>{j=!0});const V=me(`${m}${$}${p}`,a,Ee,T);if(!j)return`>${O}
|
|
28
|
+
${a}${V}`}return t=t.replace(/\n+/g,`$&${a}`),`|${O}
|
|
29
|
+
${a}${m}${t}${p}`}function Nt(n,e,t,s){const{type:i,value:r}=n,{actualString:o,implicitKey:l,indent:f,indentStep:a,inFlow:y}=e;if(l&&r.includes(`
|
|
30
|
+
`)||y&&/[[\]{},]/.test(r))return q(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return l||y||!r.includes(`
|
|
31
|
+
`)?q(r,e):fe(n,e,t,s);if(!l&&!y&&i!==S.PLAIN&&r.includes(`
|
|
32
|
+
`))return fe(n,e,t,s);if(we(r)){if(f==="")return e.forceBlockIndent=!0,fe(n,e,t,s);if(l&&f===a)return q(r,e)}const u=r.replace(/\n+/g,`$&
|
|
33
|
+
${f}`);if(o){const d=c=>c.default&&c.tag!=="tag:yaml.org,2002:str"&&c.test?.test(u),{compat:p,tags:g}=e.doc.schema;if(g.some(d)||p?.some(d))return q(r,e)}return l?u:me(u,f,xe,be(e,!1))}function Et(n,e,t,s){const{implicitKey:i,inFlow:r}=e,o=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:l}=n;l!==S.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=S.QUOTE_DOUBLE);const f=y=>{switch(y){case S.BLOCK_FOLDED:case S.BLOCK_LITERAL:return i||r?q(o.value,e):fe(o,e,t,s);case S.QUOTE_DOUBLE:return v(o.value,e);case S.QUOTE_SINGLE:return je(o.value,e);case S.PLAIN:return Nt(o,e,t,s);default:return null}};let a=f(l);if(a===null){const{defaultKeyType:y,defaultStringType:u}=e.options,d=i&&y||u;if(a=f(d),a===null)throw new Error(`Unsupported default string type ${d}`)}return a}function jt(n,e){const t=Object.assign({blockQuote:!0,commentString:kt,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let s;switch(t.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:n,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:s,options:t}}function Lt(n,e){if(e.tag){const i=n.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,s;if(k(e)){s=e.value;let i=n.filter(r=>r.identify?.(s));if(i.length>1){const r=i.filter(o=>o.test);r.length>0&&(i=r)}t=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else s=e,t=n.find(i=>i.nodeClass&&s instanceof i.nodeClass);if(!t){const i=s?.constructor?.name??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${i} value`)}return t}function Ct(n,e,{anchors:t,doc:s}){if(!s.directives)return"";const i=[],r=(k(n)||E(n))&&n.anchor;r&&Ze(r)&&(t.add(r),i.push(`&${r}`));const o=n.tag??(e.default?null:e.tag);return o&&i.push(s.directives.tagString(o)),i.join(" ")}function ue(n,e,t,s){if(A(n))return n.toString(e,t,s);if(J(n)){if(e.doc.directives)return n.toString(e);if(e.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let i;const r=N(n)?n:e.doc.createNode(n,{onTagObj:f=>i=f});i??(i=Lt(e.doc.schema.tags,r));const o=Ct(r,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const l=typeof i.stringify=="function"?i.stringify(r,e,t,s):k(r)?Et(r,e,t,s):r.toString(e,t,s);return o?k(r)||l[0]==="{"||l[0]==="["?`${o} ${l}`:`${o}
|
|
34
|
+
${e.indent}${l}`:l}function Mt({key:n,value:e},t,s,i){const{allNullValues:r,doc:o,indent:l,indentStep:f,options:{commentString:a,indentSeq:y,simpleKeys:u}}=t;let d=N(n)&&n.comment||null;if(u){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(E(n)||!N(n)&&typeof n=="object"){const T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let p=!u&&(!n||d&&e==null&&!t.inFlow||E(n)||(k(n)?n.type===S.BLOCK_FOLDED||n.type===S.BLOCK_LITERAL:typeof n=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!p&&(u||!r),indent:l+f});let g=!1,c=!1,h=ue(n,t,()=>g=!0,()=>c=!0);if(!p&&!t.inFlow&&h.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(t.inFlow){if(r||e==null)return g&&s&&s(),h===""?"?":p?`? ${h}`:h}else if(r&&!u||e==null&&p)return h=`? ${h}`,d&&!g?h+=Y(h,t.indent,a(d)):c&&i&&i(),h;g&&(d=null),p?(d&&(h+=Y(h,t.indent,a(d))),h=`? ${h}
|
|
35
|
+
${l}:`):(h=`${h}:`,d&&(h+=Y(h,t.indent,a(d))));let w,m,b;N(e)?(w=!!e.spaceBefore,m=e.commentBefore,b=e.comment):(w=!1,m=null,b=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!p&&!d&&k(e)&&(t.indentAtStart=h.length+1),c=!1,!y&&f.length>=2&&!t.inFlow&&!p&&ge(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let O=!1;const $=ue(e,t,()=>O=!0,()=>c=!0);let j=" ";if(d||w||m){if(j=w?`
|
|
36
|
+
`:"",m){const T=a(m);j+=`
|
|
37
|
+
${x(T,t.indent)}`}$===""&&!t.inFlow?j===`
|
|
38
|
+
`&&b&&(j=`
|
|
39
|
+
|
|
40
|
+
`):j+=`
|
|
41
|
+
${t.indent}`}else if(!p&&E(e)){const T=$[0],V=$.indexOf(`
|
|
42
|
+
`),Ke=V!==-1,at=t.inFlow??e.flow??e.items.length===0;if(Ke||!at){let De=!1;if(Ke&&(T==="&"||T==="!")){let I=$.indexOf(" ");T==="&"&&I!==-1&&I<V&&$[I+1]==="!"&&(I=$.indexOf(" ",I+1)),(I===-1||V<I)&&(De=!0)}De||(j=`
|
|
43
|
+
${t.indent}`)}}else($===""||$[0]===`
|
|
44
|
+
`)&&(j="");return h+=j+$,t.inFlow?O&&s&&s():b&&!O?h+=Y(h,t.indent,a(b)):c&&i&&i(),h}function Pt(n,e){(n==="debug"||n==="warn")&&console.warn(e)}const te="<<",Se={identify:n=>n===te||typeof n=="symbol"&&n.description===te,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new S(Symbol(te)),{addToJSMap:et}),stringify:()=>te},Tt=(n,e)=>(Se.identify(e)||k(e)&&(!e.type||e.type===S.PLAIN)&&Se.identify(e.value))&&n?.doc.schema.tags.some(t=>t.tag===Se.tag&&t.default);function et(n,e,t){if(t=n&&J(t)?t.resolve(n.doc):t,ge(t))for(const s of t.items)Oe(n,e,s);else if(Array.isArray(t))for(const s of t)Oe(n,e,s);else Oe(n,e,t)}function Oe(n,e,t){const s=n&&J(t)?t.resolve(n.doc):t;if(!ye(s))throw new Error("Merge sources must be maps or map aliases");const i=s.toJSON(null,n,Map);for(const[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function tt(n,e,{key:t,value:s}){if(N(t)&&t.addToJSMap)t.addToJSMap(n,e,s);else if(Tt(n,t))et(n,e,s);else{const i=M(t,"",n);if(e instanceof Map)e.set(i,M(s,i,n));else if(e instanceof Set)e.add(i);else{const r=Bt(t,i,n),o=M(s,r,n);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}function Bt(n,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(N(n)&&t?.doc){const s=jt(t.doc,{});s.anchors=new Set;for(const r of t.anchors.keys())s.anchors.add(r.anchor);s.inFlow=!0,s.inStringifyKey=!0;const i=n.toString(s);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),Pt(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function _e(n,e,t){const s=ce(n,void 0,t),i=ce(e,void 0,t);return new P(s,i)}class P{constructor(e,t=null){Object.defineProperty(this,B,{value:Ve}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;return N(t)&&(t=t.clone(e)),N(s)&&(s=s.clone(e)),new P(t,s)}toJSON(e,t){const s=t?.mapAsMap?new Map:{};return tt(t,s,this)}toString(e,t,s){return e?.doc?Mt(this,e,t,s):JSON.stringify(this)}}function nt(n,e,t){return(e.inFlow??n.flow?_t:It)(n,e,t)}function It({comment:n,items:e},t,{blockItemPrefix:s,flowChars:i,itemIndent:r,onChompKeep:o,onComment:l}){const{indent:f,options:{commentString:a}}=t,y=Object.assign({},t,{indent:r,type:null});let u=!1;const d=[];for(let g=0;g<e.length;++g){const c=e[g];let h=null;if(N(c))!u&&c.spaceBefore&&d.push(""),he(t,d,c.commentBefore,u),c.comment&&(h=c.comment);else if(A(c)){const m=N(c.key)?c.key:null;m&&(!u&&m.spaceBefore&&d.push(""),he(t,d,m.commentBefore,u))}u=!1;let w=ue(c,y,()=>h=null,()=>u=!0);h&&(w+=Y(w,r,a(h))),u&&h&&(u=!1),d.push(s+w)}let p;if(d.length===0)p=i.start+i.end;else{p=d[0];for(let g=1;g<d.length;++g){const c=d[g];p+=c?`
|
|
45
|
+
${f}${c}`:`
|
|
46
|
+
`}}return n?(p+=`
|
|
47
|
+
`+x(a(n),f),l&&l()):u&&o&&o(),p}function _t({items:n},e,{flowChars:t,itemIndent:s}){const{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:l}}=e;s+=r;const f=Object.assign({},e,{indent:s,inFlow:!0,type:null});let a=!1,y=0;const u=[];for(let g=0;g<n.length;++g){const c=n[g];let h=null;if(N(c))c.spaceBefore&&u.push(""),he(e,u,c.commentBefore,!1),c.comment&&(h=c.comment);else if(A(c)){const m=N(c.key)?c.key:null;m&&(m.spaceBefore&&u.push(""),he(e,u,m.commentBefore,!1),m.comment&&(a=!0));const b=N(c.value)?c.value:null;b?(b.comment&&(h=b.comment),b.commentBefore&&(a=!0)):c.value==null&&m?.comment&&(h=m.comment)}h&&(a=!0);let w=ue(c,f,()=>h=null);a||(a=u.length>y||w.includes(`
|
|
48
|
+
`)),g<n.length-1?w+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(a||(a=u.reduce((m,b)=>m+b.length+2,2)+(w.length+2)>e.options.lineWidth)),a&&(w+=",")),h&&(w+=Y(w,s,l(h))),u.push(w),y=u.length}const{start:d,end:p}=t;if(u.length===0)return d+p;if(!a){const g=u.reduce((c,h)=>c+h.length+2,2);a=e.options.lineWidth>0&&g>e.options.lineWidth}if(a){let g=d;for(const c of u)g+=c?`
|
|
49
|
+
${r}${i}${c}`:`
|
|
50
|
+
`;return`${g}
|
|
51
|
+
${i}${p}`}else return`${d}${o}${u.join(" ")}${o}${p}`}function he({indent:n,options:{commentString:e}},t,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){const r=x(e(s),n);t.push(r.trimStart())}}function D(n,e){const t=k(e)?e.value:e;for(const s of n)if(A(s)&&(s.key===e||s.key===t||k(s.key)&&s.key.value===t))return s}class U extends ve{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(F,e),this.items=[]}static from(e,t,s){const{keepUndefined:i,replacer:r}=s,o=new this(e),l=(f,a)=>{if(typeof r=="function")a=r.call(t,f,a);else if(Array.isArray(r)&&!r.includes(f))return;(a!==void 0||i)&&o.items.push(_e(f,a,s))};if(t instanceof Map)for(const[f,a]of t)l(f,a);else if(t&&typeof t=="object")for(const f of Object.keys(t))l(f,t[f]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let s;A(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new P(e,e?.value):s=new P(e.key,e.value);const i=D(this.items,s.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${s.key} already set`);k(i.value)&&Xe(s.value)?i.value.value=s.value:i.value=s.value}else if(r){const o=this.items.findIndex(l=>r(s,l)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(e){const t=D(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const i=D(this.items,e)?.value;return(!t&&k(i)?i.value:i)??void 0}has(e){return!!D(this.items,e)}set(e,t){this.add(new P(e,t),!0)}toJSON(e,t,s){const i=s?new s:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(const r of this.items)tt(t,i,r);return i}toString(e,t,s){if(!e)return JSON.stringify(this);for(const i of this.items)if(!A(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),nt(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}class st extends ve{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(ee,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=ne(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const s=ne(e);if(typeof s!="number")return;const i=this.items[s];return!t&&k(i)?i.value:i}has(e){const t=ne(e);return typeof t=="number"&&t<this.items.length}set(e,t){const s=ne(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[s];k(i)&&Xe(t)?i.value=t:this.items[s]=t}toJSON(e,t){const s=[];t?.onCreate&&t.onCreate(s);let i=0;for(const r of this.items)s.push(M(r,String(i++),t));return s}toString(e,t,s){return e?nt(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t}):JSON.stringify(this)}static from(e,t,s){const{replacer:i}=s,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let l of t){if(typeof i=="function"){const f=t instanceof Set?l:String(o++);l=i.call(t,f,l)}r.items.push(ce(l,void 0,s))}}return r}}function ne(n){let e=k(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function it(n,e){if(ge(n))for(let t=0;t<n.items.length;++t){let s=n.items[t];if(!A(s)){if(ye(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const i=s.items[0]||new P(new S(null));if(s.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${s.commentBefore}
|
|
52
|
+
${i.key.commentBefore}`:s.commentBefore),s.comment){const r=i.value??i.key;r.comment=r.comment?`${s.comment}
|
|
53
|
+
${r.comment}`:s.comment}s=i}n.items[t]=A(s)?s:new P(s)}}else e("Expected a sequence for this tag");return n}function rt(n,e,t){const{replacer:s}=t,i=new st(n);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof s=="function"&&(o=s.call(e,String(r++),o));let l,f;if(Array.isArray(o))if(o.length===2)l=o[0],f=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const a=Object.keys(o);if(a.length===1)l=a[0],f=o[l];else throw new TypeError(`Expected tuple with one key, not ${a.length} keys`)}else l=o;i.items.push(_e(l,f,t))}return i}const en={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:it,createNode:rt};class W extends st{constructor(){super(),this.add=U.prototype.add.bind(this),this.delete=U.prototype.delete.bind(this),this.get=U.prototype.get.bind(this),this.has=U.prototype.has.bind(this),this.set=U.prototype.set.bind(this),this.tag=W.tag}toJSON(e,t){if(!t)return super.toJSON(e);const s=new Map;t?.onCreate&&t.onCreate(s);for(const i of this.items){let r,o;if(A(i)?(r=M(i.key,"",t),o=M(i.value,r,t)):r=M(i,"",t),s.has(r))throw new Error("Ordered maps must not include duplicate keys");s.set(r,o)}return s}static from(e,t,s){const i=rt(e,t,s),r=new this;return r.items=i.items,r}}W.tag="tag:yaml.org,2002:omap";const tn={collection:"seq",identify:n=>n instanceof Map,nodeClass:W,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const t=it(n,e),s=[];for(const{key:i}of t.items)k(i)&&(s.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):s.push(i.value));return Object.assign(new W,t)},createNode:(n,e,t)=>W.from(n,e,t)};class G extends U{constructor(e){super(e),this.tag=G.tag}add(e){let t;A(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new P(e.key,null):t=new P(e,null),D(this.items,t.key)||this.items.push(t)}get(e,t){const s=D(this.items,e);return!t&&A(s)?k(s.key)?s.key.value:s.key:s}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const s=D(this.items,e);s&&!t?this.items.splice(this.items.indexOf(s),1):!s&&t&&this.items.push(new P(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);throw new Error("Set items must all have null values")}static from(e,t,s){const{replacer:i}=s,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(_e(o,null,s));return r}}G.tag="tag:yaml.org,2002:set";const nn={collection:"map",identify:n=>n instanceof Set,nodeClass:G,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,t)=>G.from(n,e,t),resolve(n,e){if(ye(n)){if(n.hasAllNullValues(!0))return Object.assign(new G,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}},ot="\uFEFF",lt="",ft="",Ce="";function sn(n){switch(n){case ot:return"byte-order-mark";case lt:return"doc-mode";case ft:return"flow-error-end";case Ce:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
54
|
+
`:case`\r
|
|
55
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function L(n){switch(n){case void 0:case" ":case`
|
|
56
|
+
`:case"\r":case" ":return!0;default:return!1}}const Re=new Set("0123456789ABCDEFabcdef"),Kt=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),se=new Set(",[]{}"),Dt=new Set(` ,[]{}
|
|
57
|
+
\r `),$e=n=>!n||Dt.has(n);class rn{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let s=this.next??"stream";for(;s&&(t||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
58
|
+
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
59
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;for(;t===" ";)t=this.buffer[++s+e];if(t==="\r"){const i=this.buffer[s+e+1];if(i===`
|
|
60
|
+
`||!i&&!this.atEnd)return e+s+1}return t===`
|
|
61
|
+
`||s>=this.indentNext||!t&&!this.atEnd?e+s:-1}if(t==="-"||t==="."){const s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&L(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
62
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===ot&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,s=e.indexOf("#");for(;s!==-1;){const r=e[s-1];if(r===" "||r===" "){t=s-1;break}else s=e.indexOf("#",s+1)}for(;;){const r=e[t-1];if(r===" "||r===" ")t-=1;else break}const i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield lt,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const t=this.peek(3);if((t==="---"||t==="...")&&L(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!L(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&L(t)){const s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil($e),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,s=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=s=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&i[0]!=="#"||s===0&&(i.startsWith("---")||i.startsWith("..."))&&L(i[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield ft,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil($e),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||L(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}const s=this.buffer.substring(0,t);let i=s.indexOf(`
|
|
63
|
+
`,this.pos);if(i!==-1){for(;i!==-1;){const r=this.continueScalar(i+1);if(r===-1)break;i=s.indexOf(`
|
|
64
|
+
`,r)}i!==-1&&(t=i-(s[i-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>L(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,s;e:for(let r=this.pos;s=this.buffer[r];++r)switch(s){case" ":t+=1;break;case`
|
|
65
|
+
`:e=r,t=0;break;case"\r":{const o=this.buffer[r+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
66
|
+
`)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
|
|
67
|
+
`,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(s=this.buffer[i];s===" ";)s=this.buffer[++i];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
|
|
68
|
+
`;)s=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let r=e-1,o=this.buffer[r];o==="\r"&&(o=this.buffer[--r]);const l=r;for(;o===" ";)o=this.buffer[--r];if(o===`
|
|
69
|
+
`&&r>=this.pos&&r+1+t>l)e=r;else break}while(!0);return yield Ce,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,s=this.pos-1,i;for(;i=this.buffer[++s];)if(i===":"){const r=this.buffer[s+1];if(L(r)||e&&se.has(r))break;t=s}else if(L(i)){let r=this.buffer[s+1];if(i==="\r"&&(r===`
|
|
70
|
+
`?(s+=1,i=`
|
|
71
|
+
`,r=this.buffer[s+1]):t=s),r==="#"||e&&se.has(r))break;if(i===`
|
|
72
|
+
`){const o=this.continueScalar(s+1);if(o===-1)break;s=Math.max(s,o-2)}}else{if(e&&se.has(i))break;t=s}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Ce,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil($e))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(L(t)||e&&se.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!L(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Kt.has(t))t=this.buffer[++e];else if(t==="%"&&Re.has(this.buffer[e+1])&&Re.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
|
|
73
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
74
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,s;do s=this.buffer[++t];while(s===" "||e&&s===" ");const i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,s=this.buffer[t];for(;!e(s);)s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}function on(n){const{path:e,url:t,schema:s,transform:i}=n||{},r=n?.method&&n.method.toUpperCase()!=="GET"?n.method.toUpperCase():void 0,o=r==="POST"?n?.body:void 0;return JSON.stringify({path:e,url:t,schema:s,transform:i,method:r,body:o})}class ln{constructor(){this._cache=new Map,this._inflight=new Map,this._listeners=new Set,this._keyedListeners=new Map,Object.seal(this)}subscribe(e,t){if(typeof e=="string"&&typeof t=="function"){const s=e;let i=this._keyedListeners.get(s);return i||(i=new Set,this._keyedListeners.set(s,i)),i.add(t),()=>{const r=this._keyedListeners.get(s);r&&(r.delete(t),r.size===0&&this._keyedListeners.delete(s))}}if(typeof e=="function")return this._listeners.add(e),()=>this._listeners.delete(e);throw new TypeError("DataStore.subscribe: expected (fn) or (key, fn)")}has(e){return this._cache.has(e)}get(e){return this._cache.has(e)?this._cache.get(e):null}set(e,t){this._cache.set(e,t);for(const i of this._listeners)i();const s=this._keyedListeners.get(e);if(s)for(const i of s)i()}get inflight(){return this._inflight}clear(){this._cache.clear(),this._inflight.clear()}}const Ft=/\{([A-Za-z_][A-Za-z0-9_]*)\}/g;function Ue(n,e,t={}){const{encode:s=!0}=t;if(typeof n=="string")return n.replace(Ft,(i,r)=>{if(!(r in(e||{})))return i;const o=e[r];return o==null?i:s?encodeURIComponent(String(o)):String(o)});if(Array.isArray(n))return n.map(i=>Ue(i,e,t));if(n&&typeof n=="object"){const i={};for(const r of Object.keys(n))i[r]=Ue(n[r],e,t);return i}return n}const Jt=new Set(["eq","ne","gt","gte","lt","lte","in","nin","like","exists"]);function ae(n,e){if(n==null)return!0;if(typeof n!="object"||Array.isArray(n)||e==null||typeof e!="object")return!1;for(const t of Object.keys(n))if(!Rt(t,n[t],e))return!1;return!0}function fn(n,e){return Array.isArray(e)?n==null?e.slice():e.filter(t=>ae(n,t)):[]}function Rt(n,e,t){if(n==="and")return Array.isArray(e)?e.every(i=>ae(i,t)):!1;if(n==="or")return Array.isArray(e)?e.some(i=>ae(i,t)):!1;if(n==="not")return!ae(e,t);const s=qt(t,n);return e===null?s==null:typeof e=="object"&&!Array.isArray(e)&&Ut(e)?Qt(e,s):Z(s,e)}function Ut(n){if(n==null||typeof n!="object"||Array.isArray(n))return!1;const e=Object.keys(n);return e.length===0?!1:e.every(t=>Jt.has(t))}function Qt(n,e){for(const t of Object.keys(n))if(!Yt(t,n[t],e))return!1;return!0}function Yt(n,e,t){switch(n){case"eq":return Z(t,e);case"ne":return!Z(t,e);case"gt":return ie(t,e)&&t>e;case"gte":return ie(t,e)&&t>=e;case"lt":return ie(t,e)&&t<e;case"lte":return ie(t,e)&&t<=e;case"in":return Array.isArray(e)?e.some(s=>Z(t,s)):!1;case"nin":return Array.isArray(e)?!e.some(s=>Z(t,s)):!1;case"like":return typeof t!="string"||typeof e!="string"?!1:Wt(e,t);case"exists":return!!t==!!e;default:return!1}}function Z(n,e){return n===e?!0:n==null||e==null?!1:Array.isArray(n)&&!Array.isArray(e)?n.some(t=>t===e):!1}function ie(n,e){return n==null||e==null?!1:typeof n==typeof e}function qt(n,e){if(typeof e!="string")return;if(e.indexOf(".")===-1)return n[e];let t=n;for(const s of e.split(".")){if(t==null||typeof t!="object")return;t=t[s]}return t}function Wt(n,e){const t="^"+n.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".")+"$";return new RegExp(t).test(e)}const de={name:"json-body",canPush:new Set(["where","limit","sort"]),defaultEnvelope:null,encode(n,{method:e,pushCandidates:t,rename:s}){const i=new Set,r=[];let o=null;if(e==="GET")t.has("where")&&n.where!==void 0&&(r.push([R("where","_where",s),JSON.stringify(n.where)]),i.add("where")),t.has("limit")&&n.limit!==void 0&&(r.push([R("limit","_limit",s),String(n.limit)]),i.add("limit")),t.has("sort")&&n.sort!==void 0&&(r.push([R("sort","_sort",s),String(n.sort)]),i.add("sort"));else if(e==="POST"){const l={};t.has("where")&&n.where!==void 0&&(l[R("where","where",s)]=n.where,i.add("where")),t.has("limit")&&n.limit!==void 0&&(l[R("limit","limit",s)]=n.limit,i.add("limit")),t.has("sort")&&n.sort!==void 0&&(l[R("sort","sort",s)]=n.sort,i.add("sort")),Object.keys(l).length>0&&(o=l)}return{queryParams:r,bodyMerge:o,pushed:i}}};function R(n,e,t){return t&&typeof t[n]=="string"&&t[n].length>0?t[n]:e}const Qe={name:"flat-query",canPush:new Set(["where","limit","sort"]),defaultEnvelope:null,encode(n,{method:e,pushCandidates:t,rename:s}){const i=new Set,r=[];if(e!=="GET")return{queryParams:r,bodyMerge:null,pushed:i};if(t.has("where")&&n.where!==void 0){const o=Gt(n.where);if(o!==null){for(const[l,f]of o)r.push([Vt(l),f]);i.add("where")}}if(t.has("limit")&&n.limit!==void 0&&(r.push([We("limit","limit",s),String(n.limit)]),i.add("limit")),t.has("sort")&&n.sort!==void 0){const o=zt(n.sort);o!==null&&(r.push([We("sort","sort",s),o]),i.add("sort"))}return{queryParams:r,bodyMerge:null,pushed:i}}};function Gt(n){if(!n||typeof n!="object"||Array.isArray(n))return null;const e=[];for(const[t,s]of Object.entries(n)){if(t==="and"||t==="or"||t==="not"||t.includes("."))return null;if(Ye(s)){e.push([t,qe(s)]);continue}if(s&&typeof s=="object"&&!Array.isArray(s)){const i=Object.keys(s);if(i.length===1&&i[0]==="eq"&&Ye(s.eq)){e.push([t,qe(s.eq)]);continue}}return null}return e}function zt(n){if(typeof n!="string"||n.length===0)return null;const e=n.split(",").map(s=>s.trim()).filter(Boolean);if(e.length===0)return null;const t=[];for(const s of e){const[i,r]=s.split(/\s+/);if(!i)return null;const o=(r||"asc").toLowerCase()==="desc";t.push(o?`-${i}`:i)}return t.join(",")}function Ye(n){if(n===null)return!0;const e=typeof n;return e==="string"||e==="number"||e==="boolean"}function qe(n){return n===null?"":String(n)}function We(n,e,t){return t&&typeof t[n]=="string"&&t[n].length>0?t[n]:e}function Vt(n,e){return n}const Ge={name:"strapi",canPush:new Set(["where","limit","sort"]),defaultEnvelope:{collection:"data",item:"data"},encode(n,{method:e,pushCandidates:t,rename:s}){const i=new Set,r=[];if(e!=="GET")return{queryParams:r,bodyMerge:null,pushed:i};if(t.has("where")&&n.where!==void 0){const o=Ne("where","filters",s),l=Zt(n.where,o);if(l!==null){for(const f of l)r.push(f);i.add("where")}}if(t.has("limit")&&n.limit!==void 0){const o=Ne("limit","pagination[limit]",s);r.push([o,String(n.limit)]),i.add("limit")}if(t.has("sort")&&n.sort!==void 0){const o=vt(n.sort,Ne("sort","sort",s));if(o!==null){for(const l of o)r.push(l);i.add("sort")}}return{queryParams:r,bodyMerge:null,pushed:i}}},Ht={eq:"[$eq]",ne:"[$ne]",gt:"[$gt]",gte:"[$gte]",lt:"[$lt]",lte:"[$lte]",in:"[$in]",nin:"[$notIn]",like:"[$containsi]",exists:"[$notNull]"};function Zt(n,e){const t=[];try{Me(n,[e],t)}catch(s){if(s&&s.unencodable)return null;throw s}return t.length>0?t:null}function Me(n,e,t){(!n||typeof n!="object"||Array.isArray(n))&&K();for(const[s,i]of Object.entries(n))s==="and"||s==="or"?(Array.isArray(i)||K(),i.forEach((r,o)=>{Me(r,[...e,`[$${s}]`,`[${o}]`],t)})):s==="not"?Me(i,[...e,"[$not]"],t):Xt(s,i,e,t)}function Xt(n,e,t,s){const i=n.split(".").map(o=>`[${o}]`),r=[...t,...i];if(ke(e)){s.push([re(r)+"[$eq]",Ae(e)]);return}if(e&&typeof e=="object"&&!Array.isArray(e)){for(const[o,l]of Object.entries(e)){const f=Ht[o];if(f||K(),o==="in"||o==="nin"){Array.isArray(l)||K(),l.forEach((a,y)=>{ke(a)||K(),s.push([re(r)+f+`[${y}]`,Ae(a)])});continue}if(o==="exists"){const a=!!l;s.push([re(r)+(a?"[$notNull]":"[$null]"),"true"]);continue}ke(l)||K(),s.push([re(r)+f,Ae(l)])}return}K()}function re(n){return n.join("")}function K(){const n=new Error("unencodable predicate");throw n.unencodable=!0,n}function vt(n,e){if(typeof n!="string"||n.length===0)return null;const t=n.split(",").map(i=>i.trim()).filter(Boolean);if(t.length===0)return null;const s=[];for(const i of t){const[r,o]=i.split(/\s+/);if(!r)return null;const l=(o||"asc").toLowerCase()==="desc"?"desc":"asc";s.push(`${r}:${l}`)}return s.length===1?[[e,s[0]]]:s.map((i,r)=>[`${e}[${r}]`,i])}function ke(n){if(n===null)return!0;const e=typeof n;return e==="string"||e==="number"||e==="boolean"}function Ae(n){return n===null?"":String(n)}function Ne(n,e,t){return t&&typeof t[n]=="string"&&t[n].length>0?t[n]:e}const Pe=new Map([[de.name,de],[Qe.name,Qe],[Ge.name,Ge]]);function an(n,{dev:e=!1}={}){if(!n)return de;const t=Pe.get(n);return t||(e&&!ze.has(n)&&(ze.add(n),console.warn(`[default-fetcher] unknown request style "${n}"; falling back to "json-body". Known styles: ${[...Pe.keys()].join(", ")}.`)),de)}const ze=new Set;function cn(){return[...Pe.keys()]}export{wt as A,A as B,sn as C,ct as D,Pt as E,Ue as F,on as G,ln as H,ae as I,cn as J,fn as K,rn as L,F as M,B as N,an as O,P,S,U as Y,st as a,ge as b,nn as c,Be as d,ee as e,jt as f,x as g,N as h,ye as i,ue as j,C as k,Y as l,Se as m,mt as n,tn as o,en as p,bt as q,ce as r,Et as s,E as t,$t as u,k as v,Fe as w,M as x,H as y,xt as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const i=new Set([50,100,200,300,400,500,600,700,800,900,950]),f=/^([a-z][a-z0-9]*)-(\d+)$/,h=/^([a-z][a-z0-9]*-\d+)\/(\d+)$/,p=/^rgba\(\s*(var\(--[^)]+\))\s*\/\s*([\d.]+)\s*\)$/;function E(t){if(typeof t!="string")return t;const s=t.match(p);if(s){const r=s[1],n=parseFloat(s[2]);return n>=.999?r:`color-mix(in srgb, ${r} ${Math.round(n*100)}%, transparent)`}if(t.includes("(")||t.startsWith("#"))return t;const a=t.replace(/^-{0,2}/,""),c=a.match(h);if(c){const r=c[1],n=parseInt(c[2],10),e=r.match(f);if(e&&i.has(parseInt(e[2],10)))return n>=100?`var(--${r})`:`color-mix(in srgb, var(--${r}) ${n}%, transparent)`}const o=a.match(f);if(o){const r=parseInt(o[2],10);if(i.has(r))return`var(--${a})`}return t}export{E as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as m,R as w}from"./_importmap_react-CrAkajDz.js";import{e as F,d as M}from"./index-C_CSAb0x.js";import{createDefaultFetcher as _}from"../_importmap/@uniweb-runtime-default-fetcher.js";import{j as a}from"./jsx-runtime-0PlsXv6K.js";import{G as V}from"./index-n0uF7vTr.js";import"./shade-generator-BBzWo1IN.js";import{buildSectionOverrides as z,buildTheme as G}from"../_importmap/@uniweb-theming.js";import{u as D,b as N,L as H,d as U}from"./_importmap_react-router-dom-CLbp1nUY.js";const T="section-";function q(e){if(!e)return`${T}unknown`;const t=e.stableId||e.id;return`${T}${t==null||t===""?"unknown":t}`}function K(e){return{title:e.title||"",pretitle:e.pretitle||"",subtitle:e.subtitle||"",paragraphs:e.paragraphs||[],links:e.links||[],images:e.images||[],lists:e.lists||[],icons:e.icons||[],videos:e.videos||[],snippets:e.snippets||[],buttons:e.buttons||[],data:e.data||{},cards:e.cards||[],documents:e.documents||[],forms:e.forms||[],quotes:e.quotes||[],headings:e.headings||[],...e.math&&e.math.length?{math:e.math}:{}}}function J(e){const t=e||{};return{title:t.title||"",pretitle:t.pretitle||"",subtitle:t.subtitle||"",alignment:t.alignment||null,paragraphs:t.paragraphs||[],links:t.links||[],images:t.images||[],lists:t.lists||[],icons:t.icons||[],videos:t.videos||[],insets:t.insets||[],snippets:t.snippets||[],buttons:t.buttons||[],data:t.data||{},cards:t.cards||[],documents:t.documents||[],forms:t.forms||[],quotes:t.quotes||[],headings:t.headings||[],...t.math&&t.math.length?{math:t.math}:{},items:(t.items||[]).map(K),sequence:t.sequence||[],raw:t.raw}}function A(e,t){if(!e||typeof e!="object"||Array.isArray(e))return e;const n={...e};for(const[r,i]of Object.entries(t)){const o=typeof i=="object"?i.default:void 0;if(n[r]===void 0&&o!==void 0&&(n[r]=o),typeof i=="object"&&(Array.isArray(i.enum)&&n[r]!==void 0&&!i.enum.includes(n[r])&&o!==void 0&&(n[r]=o),i.type==="object"&&i.fields&&n[r]&&(n[r]=A(n[r],i.fields)),i.type==="array"&&i.items&&Array.isArray(n[r]))){const s=i.items;s&&typeof s=="object"&&s.type==="object"&&s.fields&&(n[r]=n[r].map(c=>A(c,s.fields)))}}return n}function X(e,t){return Array.isArray(e)?e.map(n=>A(n,t)):A(e,t)}function C(e,t){if(!e||typeof e!="object"||Array.isArray(e)||!Array.isArray(t))return e;const n={...e};for(const r of t){if(!r||typeof r!="object"||!r.id)continue;const i=r.id;n[i]===void 0&&r.default!==void 0&&(n[i]=r.default),r.type==="form"&&r.childSchema&&Array.isArray(n[i])?n[i]=n[i].map(o=>C(o,r.childSchema.fields)):(r.type==="nestedObject"||r.type==="object")&&Array.isArray(r.fields)&&n[i]&&typeof n[i]=="object"&&(n[i]=C(n[i],r.fields))}return n}function Y(e,t){if(e==null)return e;if(t.isComposite&&t.childSchema){const n=t.childSchema.fields,r=t.childCollection;if(r&&e&&typeof e=="object"&&!Array.isArray(e)){const i=Array.isArray(e[r])?e[r]:[];return{...e,[r]:i.map(o=>C(o,n))}}return Array.isArray(e)?e.map(i=>C(i,n)):e}return Array.isArray(t.fields)?C(e,t.fields):e}function Z(e,t){if(!t||!e||typeof e!="object")return e||{};const n={...e};for(const[r,i]of Object.entries(e)){const o=t[r];o&&(n[r]=F(o)?Y(i,o):X(i,o))}return n}function Q(e,t){return!t||Object.keys(t).length===0?e||{}:{...t,...e||{}}}function ee(e,t){if(!t)return;const n=e.parsedContent.data||{};let r=!1;const i={...n};for(const o of Object.keys(t))i[o]===void 0&&(i[o]=t[o],r=!0);r&&(e.parsedContent.data=i)}function te(e){if(e.dataLoading)return;const t=globalThis.uniweb?.foundationConfig?.handlers?.data;if(typeof t=="function")try{const n=t(e.parsedContent.data,e);n!=null&&n!==e.parsedContent.data&&(e.parsedContent.data=n)}catch(n){console.error("Foundation data handler failed:",n)}}function ne(e){if(e.dataLoading)return;const t=globalThis.uniweb?.foundationConfig?.handlers?.content;if(typeof t=="function"&&!(!e.rawContent||Object.keys(e.rawContent).length===0))try{const n=t(e.parsedContent.data,e);if(!n||n===e.rawContent)return;const r=e.parseContent(n);r.data=e.parsedContent.data,e.parsedContent=r,e.items=r.items||[]}catch(n){console.error("Foundation content handler failed:",n)}}function re(e,t,n){const r=globalThis.uniweb?.foundationConfig?.handlers?.props;if(typeof r!="function")return null;try{const i=r(e,t,n);if(i&&typeof i=="object")return i}catch(i){console.error("Foundation props handler failed:",i)}return null}function ie(e,t,n=null){ee(e,n),te(e),ne(e);const r=t?.defaults||{},i=Q(e.properties,r);let o=J(e.parsedContent);const s=t?.schemas||null;s&&o.data&&(o.data=Z(o.data,s));const c=re(o,i,e);return c?{content:c.content||o,params:c.params||i}:{content:o,params:i}}function oe(e){return globalThis.uniweb?.getComponentMeta?.(e)||null}const x={COLOR:"color",GRADIENT:"gradient",IMAGE:"image",VIDEO:"video"};function k(e){if(!e||!e.startsWith("/"))return e;const t=globalThis.uniweb?.activeWebsite?.basePath||"";return!t||e.startsWith(t+"/")||e===t?e:t+e}function se({gradient:e,opacity:t=.5}){const{start:n="rgba(0,0,0,0.7)",end:r="rgba(0,0,0,0)",angle:i=180,startPosition:o=0,endPosition:s=100}=e,c={position:"absolute",inset:0,background:`linear-gradient(${i}deg, ${n} ${o}%, ${r} ${s}%)`,opacity:t,pointerEvents:"none"};return a.jsx("div",{className:"background-overlay background-overlay--gradient",style:c,"aria-hidden":"true"})}function ae({type:e="dark",opacity:t=.5}){const r={position:"absolute",inset:0,backgroundColor:`rgba(${e==="light"?"255, 255, 255":"0, 0, 0"}, ${t})`,pointerEvents:"none"};return a.jsx("div",{className:"background-overlay background-overlay--solid",style:r,"aria-hidden":"true"})}function ce({overlay:e}){return e?.enabled?e.gradient?a.jsx(se,{gradient:e.gradient,opacity:e.opacity}):a.jsx(ae,{type:e.type,opacity:e.opacity}):null}function ue({color:e}){if(!e)return null;const t={position:"absolute",inset:0,backgroundColor:e};return a.jsx("div",{className:"background-color",style:t,"aria-hidden":"true"})}function le({gradient:e}){if(!e)return null;if(typeof e=="string"){const f={position:"absolute",inset:0,background:e};return a.jsx("div",{className:"background-gradient",style:f,"aria-hidden":"true"})}const{start:t="transparent",end:n="transparent",angle:r=0,startPosition:i=0,endPosition:o=100,startOpacity:s=1,endOpacity:c=1}=e,u=s<1?O(t,s):t,l=c<1?O(n,c):n,d={position:"absolute",inset:0,background:`linear-gradient(${r}deg, ${u} ${i}%, ${l} ${o}%)`};return a.jsx("div",{className:"background-gradient",style:d,"aria-hidden":"true"})}function O(e,t){if(e.startsWith("#")){const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return`rgba(${n}, ${r}, ${i}, ${t})`}if(e.startsWith("rgb")){const n=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(n)return`rgba(${n[1]}, ${n[2]}, ${n[3]}, ${t})`}return e}function L({image:e}){if(!e?.src)return null;const{src:t,position:n="center",size:r="cover",lazy:i=!0}=e,o={position:"absolute",inset:0,backgroundImage:`url(${k(t)})`,backgroundPosition:n,backgroundSize:r,backgroundRepeat:"no-repeat"};return a.jsx("div",{className:"background-image",style:o,"aria-hidden":"true"})}function de(){return typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function fe({video:e}){if(!e?.src)return null;const{src:t,sources:n,poster:r,loop:i=!0,muted:o=!0}=e;if(de()&&r)return a.jsx(L,{image:{src:r,size:"cover",position:"center"}});const s={position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"},c=(n||pe(t)).map(u=>({...u,src:k(u.src)}));return a.jsx("video",{className:"background-video",style:s,autoPlay:!0,loop:i,muted:o,playsInline:!0,poster:k(r),"aria-hidden":"true",children:c.map(({src:u,type:l},d)=>a.jsx("source",{src:u,type:l},d))})}function pe(e){const t=[],n=e.split(".").pop()?.toLowerCase(),r=e.slice(0,e.lastIndexOf("."));return n==="mp4"?(t.push({src:`${r}.webm`,type:"video/webm"}),t.push({src:e,type:"video/mp4"})):n==="webm"?(t.push({src:e,type:"video/webm"}),t.push({src:`${r}.mp4`,type:"video/mp4"})):t.push({src:e,type:ge(e)}),t}function ge(e){return e.endsWith(".webm")?"video/webm":e.endsWith(".ogg")||e.endsWith(".ogv")?"video/ogg":"video/mp4"}function me({mode:e,color:t,gradient:n,image:r,video:i,overlay:o,className:s=""}){if(!e)return null;const c={position:"absolute",inset:0,overflow:"hidden",zIndex:0};return a.jsxs("div",{className:`background background--${e} ${s}`.trim(),style:c,"aria-hidden":"true",children:[e===x.COLOR&&a.jsx(ue,{color:t}),e===x.GRADIENT&&a.jsx(le,{gradient:n}),e===x.IMAGE&&a.jsx(L,{image:r}),e===x.VIDEO&&a.jsx(fe,{video:i}),a.jsx(ce,{overlay:o})]})}const ye=["light","medium","dark"],he=e=>{const t=e.themeName,n=e.state?.className||"";let r="";t&&ye.includes(t)&&(r=`context-${t}`);let i=r;n&&(i=i?`${i} ${n}`:n);const{background:o={}}=e.standardOptions,s={};if(o.mode&&(s.position="relative",s.isolation="isolate"),e.contextOverrides)for(const[c,u]of Object.entries(e.contextOverrides))s[`--${c}`]=u;return{id:q(e),style:s,className:i,background:o}};function R({block:e,as:t="section"}){const n=e.initComponent(),r=e.website.entityStore,i=oe(e.type),o=r.resolve(e,i),[s,c]=m.useState(null);m.useEffect(()=>{c(null)},[e]),m.useEffect(()=>{if(o.status!=="pending")return;const $=new AbortController;return r.fetch(e,i,{signal:$.signal}).then(E=>{$.signal.aborted||E.data&&c(E.data)}),()=>$.abort()},[e]);const u=o.status==="ready"?o.data:s;if(e.dataLoading=o.status==="pending"&&!u,!n)return a.jsxs("div",{className:"block-error",style:{padding:"1rem",background:"#fef2f2",color:"#dc2626"},children:["Component not found: ",e.type]});const l=ie(e,i,u),d=l.params,h={content:{...l.content,...e.properties},params:d,block:e};if(!t)return a.jsx(n,{...h});const{background:p,...g}=he(e),b=n.className;b&&(g.className=g.className?`${g.className} ${b}`:b);const v=p?.mode&&i?.background!=="self";e.hasBackground=v;const S=t!=="section"?t:n.as||"section";return v?a.jsxs(S,{...g,children:[a.jsx(me,{mode:p.mode,color:p.color,gradient:p.gradient,image:p.image,video:p.video,overlay:p.overlay}),a.jsx("div",{style:{position:"relative",zIndex:10},children:a.jsx(n,{...h})})]}):a.jsx(S,{...g,children:a.jsx(n,{...h})})}function P({blocks:e}){return!e||e.length===0?null:e.map((t,n)=>a.jsx(w.Fragment,{children:a.jsx(R,{block:t})},t.id||n))}const be="uw-",I=e=>be+String(e).replace(/[^a-zA-Z0-9_-]/g,"-");function we(e,t){if(t===!1)return null;const n={body:I("body")};for(const r of e)n[r]=I(r);return t?{...n,...t}:n}function ve(e,t){if(t===!1)return{};const n={};for(const r of e)n[r]=1;return t?{...n,...t}:n}function Ce(e,t,n){const r={},i=t?.[e];i&&(r.viewTransitionName=i);const o=n?.[e];return o!=null&&(r.position="relative",r.zIndex=o),Object.keys(r).length>0?r:null}function xe({header:e,body:t,footer:n}){return a.jsxs("div",{style:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[e&&a.jsx("header",{children:e}),t&&a.jsx("main",{style:{flex:1},children:t}),n&&a.jsx("footer",{children:n})]})}function je(...e){for(const t of e)if(t)for(const n of t)n.initComponent()}function Ae(e={},t={}){return{...t,...e}}function $e({page:e,website:t}){const n=e.getLayoutName(),r=t.getRemoteLayout(n),i=t.getLayoutMeta(n),o=e.getBodyBlocks(),s=e.getLayoutAreas(),c=[o,...Object.values(s)];je(...c);const u=Object.keys(s),l=t.viewTransitions?we(u,i?.transitions):null,d=ve(u,i?.layers),f=(g,b)=>{const v=Ce(g,l,d);return v?a.jsx("div",{style:v,children:b}):b},h=o?f("body",a.jsx(P,{blocks:o})):null,p={};for(const[g,b]of Object.entries(s))p[g]=f(g,a.jsx(P,{blocks:b}));if(r){const g=Ae(e.getLayoutParams(),i?.defaults);return a.jsx(r,{page:e,website:t,params:g,body:h,...p},n)}return a.jsx(xe,{body:h,...p})}const ke={description:{name:"description"},keywords:{name:"keywords"},robots:{name:"robots"},"og:title":{property:"og:title"},"og:description":{property:"og:description"},"og:image":{property:"og:image"},"og:url":{property:"og:url"},"og:type":{property:"og:type"},"twitter:card":{name:"twitter:card"},"twitter:title":{name:"twitter:title"},"twitter:description":{name:"twitter:description"},"twitter:image":{name:"twitter:image"}};function Ne(e){const t=ke[e];if(!t)return null;const n=t.property?`meta[property="${t.property}"]`:`meta[name="${t.name}"]`;let r=document.querySelector(n);return r||(r=document.createElement("meta"),t.property?r.setAttribute("property",t.property):r.setAttribute("name",t.name),document.head.appendChild(r)),r}function Se(e){let t=document.querySelector(`link[rel="${e}"]`);return t||(t=document.createElement("link"),t.setAttribute("rel",e),document.head.appendChild(t)),t}function y(e,t){const n=Ne(e);n&&(t?n.setAttribute("content",t):n.remove())}function Ee(e,t={}){const{siteName:n="",titleSeparator:r=" | "}=t;m.useRef([]),m.useEffect(()=>{if(!e)return;if(e.title){const o=n?`${e.title}${r}${n}`:e.title;document.title=o}y("description",e.description||null);const i=Array.isArray(e.keywords)?e.keywords.join(", "):e.keywords;if(y("keywords",i||null),y("robots",e.robots||null),e.og&&(y("og:title",e.og.title||e.title||null),y("og:description",e.og.description||e.description||null),y("og:image",e.og.image||null),y("og:url",e.og.url||null),y("og:type","website"),y("twitter:card",e.og.image?"summary_large_image":"summary"),y("twitter:title",e.og.title||e.title||null),y("twitter:description",e.og.description||e.description||null),y("twitter:image",e.og.image||null)),e.canonical)Se("canonical").setAttribute("href",e.canonical);else{const o=document.querySelector('link[rel="canonical"]');o&&o.remove()}return()=>{document.title=n||"Website"}},[e?.title,e?.description,e?.keywords,e?.canonical,e?.robots,e?.og?.title,e?.og?.description,e?.og?.image,e?.og?.url,n,r])}const j={wrapper:{minHeight:"80vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"2rem",textAlign:"center"},heading:{fontSize:"3rem",fontWeight:"bold",color:"#1f2937",marginBottom:"1rem"},message:{color:"#64748b",marginBottom:"2rem"},link:{color:"#3b82f6",textDecoration:"underline"}};function Te(){const e=globalThis.uniweb?.activeWebsite?.basePath||"",t=e?`${e}/`:"/";return w.createElement("div",{className:"page-not-found",style:j.wrapper},w.createElement("h1",{style:j.heading},"404"),w.createElement("p",{style:j.message},"Page not found"),w.createElement("a",{href:t,style:j.link},"Go to homepage"))}function Oe({blocks:e,from:t,wrapAs:n}){return(e||t?.childBlocks||[]).map((i,o)=>a.jsx(w.Fragment,{children:a.jsx(R,{block:i,as:n||null})},i.id||o))}function Pe({page:e,appearance:t}){const n=m.useRef(null),r=m.useMemo(()=>{if(!e)return"";const i=e.getPageBlocks();return z(i,t)},[e,t]);return m.useEffect(()=>{if(!r){n.current&&(n.current.remove(),n.current=null);return}if(!n.current&&(n.current=document.getElementById("uniweb-page-overrides")||document.createElement("style"),n.current.id="uniweb-page-overrides",!n.current.parentNode)){const i=document.getElementById("uniweb-theme");i&&i.nextSibling?i.parentNode.insertBefore(n.current,i.nextSibling):i?i.parentNode.appendChild(n.current):document.head.appendChild(n.current)}return n.current.textContent=r,()=>{n.current&&(n.current.remove(),n.current=null)}},[r]),null}function Qe(){const e=D(),n=globalThis.uniweb?.activeWebsite,r=n?.name||"",[,i]=m.useReducer(b=>b+1,0),o=N();let s=n?.getPage(e.pathname);s&&n&&n.setActivePage(e.pathname);const c=!s||!s.hasContent()||s.isContentLoaded();m.useEffect(()=>{c||s.loadContent().then(()=>i())},[s,c]);const u=s?.redirect||null,l=s&&!s.redirect&&!s.hasContent()?s.getNavigableRoute():null,d=!!(l&&l!==s?.route),f=!s&&!u;f&&(s=n?.getNotFoundPage?.()||null);const h=s?.getHeadMeta?.()||{title:f?"Page Not Found":s?.title||"Website",description:s?.description||""};m.useEffect(()=>{u&&(u.startsWith("http")?window.location.replace(u):o(u,{replace:!0}))},[u,o]),m.useEffect(()=>{d&&o(l,{replace:!0})},[d,l,o]),Ee(h,{siteName:r});const p=!!(s?.dynamicContext&&!n?._dynamicPageCache?.has(e.pathname));if(m.useEffect(()=>{if(!(!p||!n?.dataStore))return n.dataStore.subscribe(i)},[p,n]),u||d)return null;if(s?.rewrite)return window.location.reload(),null;if(!s)return e.pathname,a.jsxs(a.Fragment,{children:[a.jsx(Te,{}),!1]});if(!c)return null;const g=n?.themeData?.appearance;return a.jsxs(a.Fragment,{children:[a.jsx(Pe,{page:s,appearance:g}),a.jsx($e,{page:s,website:n})]})}function Ie({params:e}){return w.createElement("span",{className:"xref xref--unhandled"},`[${e?.key||"?"}]`)}function De(e,t){const n=t?.default?.capabilities||{};e.defaultInsets={Ref:Ie,...n.defaultInsets||{}},n.xref?.build&&e.activeWebsite&&n.xref.build(e.activeWebsite,{foundationKinds:n.xref.kinds||{}})}function Le(e,t){if(!(!e?.dataStore||!t?.length))for(const n of t)e.dataStore.set(V(n.config),{data:n.data})}function Re(e,t){const n=e?.activeWebsite,r=n?.themeData;if(!r||r.css)return;const i=t?.default?.capabilities||{};try{const{config:o,css:s,links:c}=G(r,{foundationVars:i.vars||{},base:n.basePath||"/"});Object.assign(r,o,{css:s,links:c})}catch(o){console.warn("[uniweb] theme CSS generation failed:",o?.message||o)}}const Be=1e3,B=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function We(e){const t=globalThis.uniweb?.activeWebsite;if(!e||!t)return;const n=t.getPage(e);if(!(!n?.hasContent?.()||n.isContentLoaded?.()))return Promise.race([n.loadContent(),new Promise(r=>setTimeout(r,Be))])}function W(e,t,n){globalThis.uniweb?.foundationConfig?.viewTransitions&&document.startViewTransition&&!B?document.startViewTransition(async()=>{const i=typeof t=="string"?t:t?.pathname;await We(i),e(t,n)}):e(t,n)}const Fe=w.forwardRef(function({onClick:t,replace:n,state:r,preventScrollReset:i,...o},s){const c=N(),u=l=>{t&&t(l),!(l.defaultPrevented||l.metaKey||l.altKey||l.ctrlKey||l.shiftKey||l.button!==0||!globalThis.uniweb?.foundationConfig?.viewTransitions||!document.startViewTransition||B)&&(l.preventDefault(),W(c,o.to,{replace:n,state:r,preventScrollReset:i}))};return w.createElement(H,{ref:s,...o,onClick:u,replace:n,state:r,preventScrollReset:i})});function Me(){const e=N();return(t,n)=>W(e,t,n)}const _e={Link:Fe,useNavigate:Me,useParams:U,useLocation:D},Ve={lucide:"lu",heroicons:"hi",heroicons2:"hi2",phosphor:"pi",tabler:"tb",feather:"fi",fa:"fa",fa6:"fa6",bootstrap:"bs","material-design":"md","ant-design":"ai",remix:"ri","simple-icons":"si",ionicons:"io5",boxicons:"bi",vscode:"vsc",weather:"wi",game:"gi",lu:"lu",hi:"hi",hi2:"hi2",pi:"pi",tb:"tb",fi:"fi",bs:"bs",md:"md",ai:"ai",ri:"ri",io5:"io5",bi:"bi",si:"si",vsc:"vsc",wi:"wi",gi:"gi"};function ze(e={}){const t=e.cdnUrl||"https://uniweb.github.io/icons",n=e.cdn!==!1,r=new Map;return async function(o,s){const c=Ve[o.toLowerCase()];if(!c)return console.warn(`[icons] Unknown family "${o}"`),null;const u=`${c}:${s}`;if(r.has(u))return r.get(u);if(!n)return r.set(u,null),null;try{const l=`${c}-${s}`,d=`${t}/${c}/${l}.svg`,f=await fetch(d);if(!f.ok)throw new Error(`HTTP ${f.status}`);const h=await f.text();return r.set(u,h),h}catch(l){return console.warn(`[icons] Failed to load ${o}:${s}`,l.message),r.set(u,null),null}}}function Ge(e){const t=e?.config?.base||"/",n=e?.config?.fetcher??{};return _({basePath:t,config:n,dev:!1})}function et({content:e,foundation:t,extensions:n=[],routingComponents:r=_e,transport:i=null}){const o=Ge(e),c=M(e,t,n,{defaultFetcher:o,transport:i,dev:!1});if(e?.fetchedData?.length&&c.activeWebsite?.dataStore&&Le(c.activeWebsite,e.fetchedData),c.childBlockRenderer=Oe,De(c,t),(typeof document>"u"||!document.getElementById("uniweb-theme"))&&Re(c,t),c.routingComponents=r,c.iconResolver=ze(e?.icons),typeof document<"u")try{const u=document.getElementById("__ICON_CACHE__");if(u){const l=JSON.parse(u.textContent);for(const[d,f]of Object.entries(l))c.iconCache.set(d,f)}}catch{}return c}async function tt(){const e=document.getElementById("__DATA__");if(!e?.textContent)return null;const t=e.textContent;if(e.type==="application/json")try{return JSON.parse(t)}catch{return null}if(typeof DecompressionStream<"u")try{const n=Uint8Array.from(atob(t),s=>s.charCodeAt(0)),r=new DecompressionStream("gzip"),i=r.writable.getWriter();i.write(n),i.close();const o=await new Response(r.readable).text();return JSON.parse(o)}catch{return null}try{return JSON.parse(t)}catch{return null}}export{Qe as P,We as a,tt as d,Le as h,et as i,B as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const E=[50,100,200,300,400,500,600,700,800,900,950],u={50:.97,100:.93,200:.87,300:.78,400:.68,500:.55,600:.48,700:.4,800:.32,900:.24,950:.14},G={50:.15,100:.25,200:.4,300:.65,400:.85,500:1,600:.95,700:.85,800:.75,900:.6,950:.45},B=u[50]-u[500],P=u[500]-u[950],p={};for(const t of E)t<500?p[t]=(u[t]-u[500])/B:t>500&&(p[t]=(u[500]-u[t])/P);const $={fixed:{hueShift:{light:0,dark:0},chromaBoost:1,lightEndChroma:.15,darkEndChroma:.45},natural:{hueShift:{light:5,dark:-15},chromaBoost:1.1,lightEndChroma:.2,darkEndChroma:.4},vivid:{hueShift:{light:3,dark:-10},chromaBoost:1.4,lightEndChroma:.35,darkEndChroma:.55}};function y(t){if(!t||typeof t!="string")throw new Error(`Invalid color: ${t}`);const n=t.trim().toLowerCase();if(n.startsWith("oklch("))return j(n);if(n.startsWith("#"))return v(n);if(n.startsWith("rgb"))return V(n);if(n.startsWith("hsl"))return z(n);if(/^[0-9a-f]{3,8}$/i.test(n))return v("#"+n);throw new Error(`Unsupported color format: ${t}`)}function j(t){const n=t.match(/oklch\(\s*([0-9.]+)(%?)\s+([0-9.]+)\s+([0-9.]+)(deg)?\s*\)/);if(!n)throw new Error(`Invalid oklch format: ${t}`);let r=parseFloat(n[1]);n[2]==="%"&&(r/=100);const e=parseFloat(n[3]),o=parseFloat(n[4]);return{l:r,c:e,h:o}}function v(t){const n=D(t);return T(n.r,n.g,n.b)}function D(t){let n=t.replace("#","");n.length===3&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]),n.length===4&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);const r=parseInt(n.slice(0,6),16);return{r:r>>16&255,g:r>>8&255,b:r&255}}function V(t){const n=t.match(/rgba?\(\s*([0-9.]+)[\s,]+([0-9.]+)[\s,]+([0-9.]+)/);if(!n)throw new Error(`Invalid rgb format: ${t}`);const r=parseFloat(n[1]),e=parseFloat(n[2]),o=parseFloat(n[3]);return T(r,e,o)}function z(t){const n=t.match(/hsla?\(\s*([0-9.]+)(deg)?[\s,]+([0-9.]+)%[\s,]+([0-9.]+)%/);if(!n)throw new Error(`Invalid hsl format: ${t}`);const r=parseFloat(n[1]),e=parseFloat(n[3])/100,o=parseFloat(n[4])/100,c=q(r,e,o);return T(c.r*255,c.g*255,c.b*255)}function q(t,n,r){const e=t/360;let o,c,s;if(n===0)o=c=s=r;else{const a=r<.5?r*(1+n):r+n-r*n,h=2*r-a;o=L(h,a,e+1/3),c=L(h,a,e),s=L(h,a,e-1/3)}return{r:o,g:c,b:s}}function L(t,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}function T(t,n,r){t/=255,n/=255,r/=255,t=O(t),n=O(n),r=O(r);const e=.4122214708*t+.5363325363*n+.0514459929*r,o=.2119034982*t+.6806995451*n+.1073969566*r,c=.0883024619*t+.2817188376*n+.6299787005*r,s=Math.cbrt(e),a=Math.cbrt(o),h=Math.cbrt(c),d=.2104542553*s+.793617785*a-.0040720468*h,l=1.9779984951*s-2.428592205*a+.4505937099*h,i=.0259040371*s+.7827717662*a-.808675766*h,m=Math.sqrt(l*l+i*i);let f=Math.atan2(i,l)*(180/Math.PI);return f<0&&(f+=360),{l:d,c:m,h:f}}function O(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function _(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function x(t,n,r){const e=r*(Math.PI/180),o=n*Math.cos(e),c=n*Math.sin(e),s=t+.3963377774*o+.2158037573*c,a=t-.1055613458*o-.0638541728*c,h=t-.0894841775*o-1.291485548*c,d=s*s*s,l=a*a*a,i=h*h*h;let m=4.0767416621*d-3.3077115913*l+.2309699292*i,f=-1.2684380046*d+2.6097574011*l-.3413193965*i,C=-.0041960863*d-.7034186147*l+1.707614701*i;return m=Math.round(Math.max(0,Math.min(1,_(m)))*255),f=Math.round(Math.max(0,Math.min(1,_(f)))*255),C=Math.round(Math.max(0,Math.min(1,_(C)))*255),{r:m,g:f,b:C}}function K(t,n,r){return t>=-.5&&t<=255.5&&n>=-.5&&n<=255.5&&r>=-.5&&r<=255.5}function W(t,n,r){let e=0,o=r,c=0;for(let s=0;s<8;s++){const a=(e+o)/2,h=x(t,a,n);K(h.r,h.g,h.b)?(c=a,e=a):o=a}return c}function A(t,n,r,e){const o=1-e;return o*o*t+2*o*e*n+e*e*r}function S(t,n,r){return t+(n-t)*r}function I(t){return t=t%360,t<0?t+360:t}function U(t){return t>=0&&t<120||t>300}function M(t,n,r){const e=(t*100).toFixed(1),o=n.toFixed(4),c=r.toFixed(1);return`oklch(${e}% ${o} ${c})`}function w(t,n,r){const e=o=>o.toString(16).padStart(2,"0");return`#${e(t)}${e(n)}${e(r)}`}function R(t,n={}){const{format:r="oklch",mode:e="fixed",exactMatch:o}=n,c=y(t),s=$[e]||$.fixed;return e==="fixed"?J(c,t,r,o):Q(c,t,r,s,o)}function J(t,n,r,e){const o={},c=e!==!1;for(const s of E){if(c&&s===500){r==="hex"?o[s]=n.startsWith("#")?n:N(t):o[s]=M(t.l,t.c,t.h);continue}let a;c?s<500?a=t.l+p[s]*(u[50]-t.l):a=t.l-p[s]*(t.l-u[950]):a=u[s];const h=G[s],d=t.c*h,l=W(a,t.h,d);if(r==="hex"){const i=x(a,l,t.h);o[s]=w(i.r,i.g,i.b)}else o[s]=M(a,l,t.h)}return o}function Q(t,n,r,e,o){const c={},s=U(t.h),a=s?e.hueShift.light:-e.hueShift.light,h=s?e.hueShift.dark:-e.hueShift.dark,d={l:u[50],c:t.c*e.lightEndChroma,h:I(t.h+a)},l={l:u[950],c:t.c*e.darkEndChroma,h:I(t.h+h)},i=t.c*e.chromaBoost;for(let m=0;m<E.length;m++){const f=E[m];if(o!==!1&&f===500){r==="hex"?c[f]=n.startsWith("#")?n:N(t):c[f]=M(t.l,t.c,t.h);continue}let C,b,k;if(m<=5){const g=m/5;C=S(d.l,t.l,g),k=S(d.h,t.h,g);const F=(d.c+i)/2;b=A(d.c,F,i,g)}else{const g=(m-5)/5;C=S(t.l,l.l,g),k=S(t.h,l.h,g);const F=(i+l.c)/2;b=A(i,F,l.c,g)}k=I(k);const H=W(C,k,b);if(r==="hex"){const g=x(C,H,k);c[f]=w(g.r,g.g,g.b)}else c[f]=M(C,H,k)}return c}function N(t){const n=x(t.l,t.c,t.h);return w(n.r,n.g,n.b)}function X(t,n={}){const r={};for(const[e,o]of Object.entries(t)){if(typeof o=="object"&&o!==null&&!o.base&&Object.keys(o).some(s=>!isNaN(parseInt(s)))){r[e]=o;continue}if(typeof o=="object"&&o!==null&&o.base){const{base:c,...s}=o;r[e]=R(c,{...n,...s})}else typeof o=="string"&&(r[e]=R(o,n))}return r}function Y(t){try{return y(t),!0}catch{return!1}}function Z(){return[...E]}export{M as a,R as b,Z as c,w as f,X as g,Y as i,y as p};
|
package/dist/app/index.html
CHANGED
|
@@ -14,17 +14,33 @@
|
|
|
14
14
|
"react-dom/server": "/_importmap/react-dom-server.js",
|
|
15
15
|
"react/jsx-runtime": "/_importmap/react-jsx-runtime.js",
|
|
16
16
|
"react/jsx-dev-runtime": "/_importmap/react-jsx-dev-runtime.js",
|
|
17
|
-
"@uniweb/core": "/_importmap/@uniweb-core.js"
|
|
17
|
+
"@uniweb/core": "/_importmap/@uniweb-core.js",
|
|
18
|
+
"@uniweb/runtime/provider": "/_importmap/@uniweb-runtime-provider.js",
|
|
19
|
+
"@uniweb/runtime/setup": "/_importmap/@uniweb-runtime-setup.js",
|
|
20
|
+
"@uniweb/runtime/foundation-loader": "/_importmap/@uniweb-runtime-foundation-loader.js",
|
|
21
|
+
"@uniweb/runtime/default-fetcher": "/_importmap/@uniweb-runtime-default-fetcher.js",
|
|
22
|
+
"react-router-dom": "/_importmap/react-router-dom.js",
|
|
23
|
+
"@uniweb/theming": "/_importmap/@uniweb-theming.js"
|
|
18
24
|
}
|
|
19
25
|
}
|
|
20
26
|
</script>
|
|
21
|
-
<script type="module" crossorigin src="/assets/index-
|
|
27
|
+
<script type="module" crossorigin src="/assets/index-DIdy_K3F.js"></script>
|
|
22
28
|
<link rel="modulepreload" crossorigin href="/assets/_commonjsHelpers-CqkleIqs.js">
|
|
23
29
|
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-0PlsXv6K.js">
|
|
24
30
|
<link rel="modulepreload" crossorigin href="/assets/index-CxUeIbEw.js">
|
|
25
31
|
<link rel="modulepreload" crossorigin href="/assets/_importmap_react-CrAkajDz.js">
|
|
26
32
|
<link rel="modulepreload" crossorigin href="/assets/index-VvOM7xKK.js">
|
|
27
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
33
|
+
<link rel="modulepreload" crossorigin href="/assets/index-n0uF7vTr.js">
|
|
34
|
+
<link rel="modulepreload" crossorigin href="/assets/shade-generator-BBzWo1IN.js">
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/normalize-DbApPPeG.js">
|
|
36
|
+
<link rel="modulepreload" crossorigin href="/assets/index-C_CSAb0x.js">
|
|
37
|
+
<link rel="modulepreload" crossorigin href="/_importmap/@uniweb-runtime-default-fetcher.js">
|
|
38
|
+
<link rel="modulepreload" crossorigin href="/_importmap/@uniweb-theming.js">
|
|
39
|
+
<link rel="modulepreload" crossorigin href="/assets/_importmap_react-router-dom-CLbp1nUY.js">
|
|
40
|
+
<link rel="modulepreload" crossorigin href="/assets/setup-BeQi33In.js">
|
|
41
|
+
<link rel="modulepreload" crossorigin href="/_importmap/@uniweb-runtime-foundation-loader.js">
|
|
42
|
+
<link rel="modulepreload" crossorigin href="/_importmap/@uniweb-core.js">
|
|
43
|
+
<link rel="modulepreload" crossorigin href="/_importmap/@uniweb-runtime-provider.js">
|
|
28
44
|
</head>
|
|
29
45
|
<body>
|
|
30
46
|
<div id="root"></div>
|
package/dist/app/manifest.json
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"entry": "assets/index-
|
|
2
|
+
"version": "0.10.0",
|
|
3
|
+
"entry": "assets/index-DIdy_K3F.js",
|
|
4
4
|
"preloads": [
|
|
5
5
|
"assets/_commonjsHelpers-CqkleIqs.js",
|
|
6
|
+
"assets/normalize-DbApPPeG.js",
|
|
7
|
+
"assets/shade-generator-BBzWo1IN.js",
|
|
6
8
|
"assets/index-VvOM7xKK.js",
|
|
7
9
|
"assets/index-CxUeIbEw.js",
|
|
10
|
+
"assets/index-n0uF7vTr.js",
|
|
11
|
+
"assets/index-C_CSAb0x.js",
|
|
8
12
|
"assets/_importmap_react-CrAkajDz.js",
|
|
9
13
|
"assets/jsx-runtime-0PlsXv6K.js",
|
|
10
|
-
"assets/
|
|
14
|
+
"assets/setup-BeQi33In.js",
|
|
15
|
+
"assets/_importmap_react-router-dom-CLbp1nUY.js"
|
|
11
16
|
],
|
|
12
17
|
"importMap": {
|
|
13
18
|
"react": "_importmap/react.js",
|
|
@@ -15,6 +20,12 @@
|
|
|
15
20
|
"react-dom/server": "_importmap/react-dom-server.js",
|
|
16
21
|
"react/jsx-runtime": "_importmap/react-jsx-runtime.js",
|
|
17
22
|
"react/jsx-dev-runtime": "_importmap/react-jsx-dev-runtime.js",
|
|
18
|
-
"@uniweb/core": "_importmap/@uniweb-core.js"
|
|
23
|
+
"@uniweb/core": "_importmap/@uniweb-core.js",
|
|
24
|
+
"@uniweb/runtime/provider": "_importmap/@uniweb-runtime-provider.js",
|
|
25
|
+
"@uniweb/runtime/setup": "_importmap/@uniweb-runtime-setup.js",
|
|
26
|
+
"@uniweb/runtime/foundation-loader": "_importmap/@uniweb-runtime-foundation-loader.js",
|
|
27
|
+
"@uniweb/runtime/default-fetcher": "_importmap/@uniweb-runtime-default-fetcher.js",
|
|
28
|
+
"react-router-dom": "_importmap/react-router-dom.js",
|
|
29
|
+
"@uniweb/theming": "_importmap/@uniweb-theming.js"
|
|
19
30
|
}
|
|
20
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Minimal runtime for loading Uniweb foundations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"esbuild": "^0.21.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.27.0",
|
|
45
45
|
"vite": "^7.3.1",
|
|
46
46
|
"vitest": "^4.1.7",
|
|
47
|
-
"@uniweb/build": "0.16.
|
|
47
|
+
"@uniweb/build": "0.16.23"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"react": "^19.0.0",
|