@sveltia/cms 0.8.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -16
- package/dist/sveltia-cms.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Sveltia CMS is a Git-based lightweight headless CMS under active development as a modern, quick replacement for [Netlify/Decap CMS](https://decapcms.org/). You can use it with your favourite static site generator like SvelteKit, Eleventy, Next.js and Hugo to manage content as static files in a Git repository. The free open source alternative to Netlify/Decap CMS is now in public beta — with more features to come.
|
|
4
4
|
|
|
5
|
-
<br>
|
|
6
6
|
|
|
7
|
-
<br>
|
|
8
8
|
|
|
9
|
-
<br>
|
|
10
10
|
|
|
11
|
-
<br>
|
|
12
12
|
|
|
13
|
-
; Sveltia CMS](docs/screenshot-5-20231124.webp)<br>
|
|
14
14
|
|
|
15
15
|
## Motivation
|
|
16
16
|
|
|
@@ -69,7 +69,7 @@ Here are some highlights mainly compared to Netlify/Decap CMS:
|
|
|
69
69
|
- [Integrates DeepL](#use-deepl-to-translate-entry-fields) to allow translation of text fields from another locale with one click.
|
|
70
70
|
- You can [disable non-default locale content](#disable-non-default-locale-content)[^15].
|
|
71
71
|
- You can [use a random UUID for an entry slug](#use-a-random-id-for-an-entry-slug), which is a good option for locales that write in non-Latin characters[^12].
|
|
72
|
-
- Resolves limitations in the
|
|
72
|
+
- Resolves the [limitations in the list and object widgets](https://decapcms.org/docs/beta-features/#i18n-support) so that changes made with these widgets will be duplicated between locales as expected when using the `i18n: duplicate` field configuration[^7].
|
|
73
73
|
|
|
74
74
|
### Collection enhancements
|
|
75
75
|
|
|
@@ -80,16 +80,20 @@ Here are some highlights mainly compared to Netlify/Decap CMS:
|
|
|
80
80
|
### Field enhancements
|
|
81
81
|
|
|
82
82
|
- Required fields, not optional fields, are clearly marked for efficient data entry.
|
|
83
|
-
-
|
|
83
|
+
- Provides a reimagined all-in-one asset selection dialog for file and image fields.
|
|
84
|
+
- [Collection-specific assets](#use-a-custom-media-folder-for-a-collection) will be listed first for easy selection, while all assets can also be displayed in a separate tab[^19].
|
|
85
|
+
- New assets can be uploaded by dragging & dropping them into the dialog[^20].
|
|
86
|
+
- A file/image URL can also be entered in the dialog.
|
|
87
|
+
- Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert free stock photos[^8].
|
|
84
88
|
- Optional object fields (`widget: object` with `required: false`) can be manually added or removed. If removed, the required subfields will no longer trigger validation errors[^16].
|
|
85
89
|
- You can revert changes to all fields or a specific field.
|
|
86
90
|
|
|
87
|
-
### Asset
|
|
91
|
+
### Asset management enhancements
|
|
88
92
|
|
|
89
|
-
- A completely new Asset Library, built separately from the image selection dialog, makes it easy to manage all of your files, including images and documents.
|
|
93
|
+
- A completely new Asset Library, built separately from the image selection dialog, makes it easy to manage all of your files, including images, videos and documents.
|
|
90
94
|
- You can sort or filter assets by name or file type and view asset details, including size, dimensions, and a list of entries that use the selected asset.
|
|
91
95
|
- You can upload multiple assets at once, including files in nested folders, by browsing or dragging & dropping them into the media library[^5].
|
|
92
|
-
- You can navigate between the global media folder and
|
|
96
|
+
- You can navigate between the global media folder and per-collection media folders[^6].
|
|
93
97
|
|
|
94
98
|
## Compatibility
|
|
95
99
|
|
|
@@ -157,12 +161,13 @@ While it’s not our goal to recreate all the features found in Netlify/Decap CM
|
|
|
157
161
|
|
|
158
162
|
- [Svelte 5](https://svelte.dev/blog/runes) migration
|
|
159
163
|
- Further Netlify/Decap CMS compatibility, including Editorial Workflow
|
|
160
|
-
-
|
|
161
|
-
- Mobile support[^18]
|
|
164
|
+
- [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md)
|
|
162
165
|
- Documentation
|
|
163
166
|
- Marketing site
|
|
164
167
|
- Demo site
|
|
165
168
|
- Starter templates
|
|
169
|
+
- Config editor[^10]
|
|
170
|
+
- Mobile support[^18]
|
|
166
171
|
|
|
167
172
|
## Getting started
|
|
168
173
|
|
|
@@ -205,9 +210,11 @@ You can use Sveltia CMS with a local Git repository, like the [beta feature](htt
|
|
|
205
210
|
1. Click “Work with Local Repository” and select the project’s root directory once prompted.
|
|
206
211
|
1. Make some changes to your content on Sveltia CMS.
|
|
207
212
|
1. See if the produced changes look good using `git diff` or a GUI like [GitHub Desktop](https://desktop.github.com/).
|
|
208
|
-
1. Open the dev site at `http://localhost:[port]/` to check the rendered
|
|
213
|
+
1. Open the dev site at `http://localhost:[port]/` to check the rendered pages.
|
|
209
214
|
1. Commit and push the changes if satisfied, or discard them if you’re just testing.
|
|
210
215
|
|
|
216
|
+
Remember that the local repository support doesn’t do any Git operation. You have to pull, commit and push all changes manually with a Git client. Also, at this point, you have to reload the CMS to see the latest content after fetching remote updates (this will be unnecessary once browsers support the proposed `FileSystemObserver` API).
|
|
217
|
+
|
|
211
218
|
### Use a custom icon for a collection
|
|
212
219
|
|
|
213
220
|
You can have an icon for each collection for easy identification in the collection list.
|
|
@@ -349,11 +356,11 @@ Importing the CMS as an npm package is not supported yet.
|
|
|
349
356
|
|
|
350
357
|
Visit the [Discussions](https://github.com/sveltia/sveltia-cms/discussions) page on this GitHub repository and start a new discussion. Tell us about your use cases!
|
|
351
358
|
|
|
352
|
-
Want to build a website with Sveltia CMS? [@kyoshino](https://github.com/kyoshino) is available for hire depending on your requirements.
|
|
359
|
+
Want to build a website with Sveltia CMS? Maintainer [@kyoshino](https://github.com/kyoshino) is available for hire depending on your requirements.
|
|
353
360
|
|
|
354
361
|
## Contributions
|
|
355
362
|
|
|
356
|
-
Sveltia CMS is still in early beta, so we do expect various problems. Please [report any bugs to us](https://github.com/sveltia/sveltia-cms/issues/new). Feel free to submit feature requests as well. Meanwhile, pull requests may not be accepted for the time being due to limited review resources. As we get closer to the 1.0 release, we’ll be welcoming localizers.
|
|
363
|
+
Sveltia CMS is still in early beta, so we do expect various problems. Please [report any bugs to us](https://github.com/sveltia/sveltia-cms/issues/new). Feel free to submit feature requests as well. Meanwhile, pull requests may not be accepted for the time being due to limited review resources. As we get closer to the 1.0 release, we’ll be welcoming [localizers](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md).
|
|
357
364
|
|
|
358
365
|
## Related Links
|
|
359
366
|
|
|
@@ -373,7 +380,7 @@ This software is provided “as is” without any express or implied warranty. T
|
|
|
373
380
|
[^8]: [Netlify/Decap CMS #2579](https://github.com/decaporg/decap-cms/issues/2579)
|
|
374
381
|
[^9]: [Netlify/Decap CMS #3505](https://github.com/decaporg/decap-cms/issues/3505)
|
|
375
382
|
[^10]: [Netlify/Decap CMS #341](https://github.com/decaporg/decap-cms/issues/341)
|
|
376
|
-
[^11]: [Netlify/Decap CMS #1382](https://github.com/decaporg/decap-cms/issues/1382) and many more. We’ll be updating this list after reviewing their issue list.
|
|
383
|
+
[^11]: [Netlify/Decap CMS #1382](https://github.com/decaporg/decap-cms/issues/1382), [Netlify/Decap CMS #5596](https://github.com/decaporg/decap-cms/issues/5596) and many more. We’ll be updating this list after reviewing their issue list.
|
|
377
384
|
[^12]: [Netlify/Decap CMS #1975](https://github.com/decaporg/decap-cms/issues/1975)
|
|
378
385
|
[^13]: [Netlify/Decap CMS #5112](https://github.com/decaporg/decap-cms/issues/5112)
|
|
379
386
|
[^14]: [Netlify/Decap CMS #4635](https://github.com/decaporg/decap-cms/issues/4635), [Netlify/Decap CMS #5920](https://github.com/decaporg/decap-cms/issues/5920), [Netlify/Decap CMS #6410](https://github.com/decaporg/decap-cms/issues/6410)
|
|
@@ -381,3 +388,5 @@ This software is provided “as is” without any express or implied warranty. T
|
|
|
381
388
|
[^16]: [Netlify/Decap CMS #2103](https://github.com/decaporg/decap-cms/issues/2103)
|
|
382
389
|
[^17]: [Netlify/Decap CMS #1333](https://github.com/decaporg/decap-cms/issues/1333)
|
|
383
390
|
[^18]: [Netlify/Decap CMS #441](https://github.com/decaporg/decap-cms/issues/441)
|
|
391
|
+
[^19]: [Netlify/Decap CMS #5910](https://github.com/decaporg/decap-cms/issues/5910)
|
|
392
|
+
[^20]: [Netlify/Decap CMS #4563](https://github.com/decaporg/decap-cms/issues/4563)
|
package/dist/sveltia-cms.js
CHANGED
|
@@ -220,7 +220,8 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
220
220
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
221
221
|
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const i="end"in n.value?n.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const i=!this.onKeyLine&&this.indent===e.indent&&n.sep;let s=[];if(i&&n.sep&&!n.value){const l=[];for(let r=0;r<n.sep.length;++r){const o=n.sep[r];switch(o.type){case"newline":l.push(r);break;case"space":break;case"comment":o.indent>e.indent&&(l.length=0);break;default:l.length=0}}l.length>=2&&(s=n.sep.splice(l[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!di(n.start,"explicit-key-ind")?n.start.push(this.sourceToken):i||n.value?(s.push(this.sourceToken),e.items.push({start:s})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}),this.onKeyLine=!0;return;case"map-value-ind":if(di(n.start,"explicit-key-ind"))if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(di(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(rw(n.key)&&!di(n.sep,"newline")){const l=$l(n.start),r=n.key,o=n.sep;o.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:r,sep:o}]})}else s.length>0?n.sep=n.sep.concat(s,this.sourceToken):n.sep.push(this.sourceToken);else if(di(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const l=$l(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):di(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);i||n.value?(e.items.push({start:s,key:l,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(l):(Object.assign(n,{key:l,sep:[]}),this.onKeyLine=!0);return}default:{const l=this.startBlockValue(e);if(l){i&&l.type!=="block-seq"&&di(n.start,"explicit-key-ind")&&e.items.push({start:s}),this.stack.push(l);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const i="end"in n.value?n.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||di(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i&&i.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{const i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){const s=na(i),l=$l(s);Yp(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:l,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
|
|
222
222
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
223
|
-
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=na(e),i=$l(n);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i}]}}case"map-value-ind":{this.onKeyLine=!0;const n=na(e),i=$l(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function ow(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new lw||null,prettyErrors:e}}function q8(t,e={}){const{lineCounter:n,prettyErrors:i}=ow(e),s=new Kd(n?.addNewLine),l=new Wd(e),r=Array.from(l.compose(s.parse(t)));if(i&&n)for(const o of r)o.errors.forEach(ja(t,n)),o.warnings.forEach(ja(t,n));return r.length>0?r:Object.assign([],{empty:!0},l.streamInfo())}function aw(t,e={}){const{lineCounter:n,prettyErrors:i}=ow(e),s=new Kd(n?.addNewLine),l=new Wd(e);let r=null;for(const o of l.compose(s.parse(t),!0,t.length))if(!r)r=o;else if(r.options.logLevel!=="silent"){r.errors.push(new Ws(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&n&&(r.errors.forEach(ja(t,n)),r.warnings.forEach(ja(t,n))),r}function H8(t,e,n){let i;typeof e=="function"?i=e:n===void 0&&e&&typeof e=="object"&&(n=e);const s=aw(t,n);if(!s)return null;if(s.warnings.forEach(l=>$v(s.options.logLevel,l)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:i},n))}function V8(t,e,n){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(t===void 0){const{keepUndefined:s}=n??e??{};if(!s)return}return new Lr(t,i,n).toString(n)}const ur=Object.freeze(Object.defineProperty({__proto__:null,Alias:Oc,CST:z8,Composer:Wd,Document:Lr,Lexer:sw,LineCounter:lw,Pair:dn,Parser:Kd,Scalar:xe,Schema:jc,YAMLError:Yd,YAMLMap:zn,YAMLParseError:Ws,YAMLSeq:Ps,YAMLWarning:Wv,isAlias:hl,isCollection:jt,isDocument:Sr,isMap:Tr,isNode:Ht,isPair:Ct,isScalar:Tt,isSeq:Er,parse:H8,parseAllDocuments:q8,parseDocument:aw,stringify:V8,visit:Ns,visitAsync:Ec},Symbol.toStringTag,{value:"Module"})),Cf=(t,e,{ellipsis:n="…"}={})=>{const i=[...t];return`${i.slice(0,e).join("").trim()}${i.length>e?n:""}`},Vt=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ci=t=>t.replace(/^\/+/,"").replace(/\/+$/,""),Ks=()=>window.crypto.randomUUID(),Gp=t=>t.match(/{{.+?}}/)?t:`{{${t}}}`,Zd=(t,e,n)=>{const i=e.value_field,s=e.display_fields,l=Gp(i),r=(s??[i]).map(Gp).join(" ");return n.map(o=>{const{content:a}=o?.locales[t]??{};if(!a)return;const c=Mi(a),u=Object.fromEntries([...new Set([...[...r.matchAll(/{{(.+?)}}/g)].map(_=>_[1]),...[...l.matchAll(/{{(.+?)}}/g)].map(_=>_[1])].map(_=>_.includes(".")?_.replace(/^([^.]+)+\.\*\.[^.]+$/,"$1.*"):_))].map(_=>{if(_.endsWith(".*")){const w=new RegExp(`^${Vt(_).replace("\\.\\*","\\.\\d+\\.[^.]+")}$`),k=ol(Object.fromEntries(Object.entries(c).filter(([T])=>!!T.match(w))));return[_,k[Object.keys(k)[0]]??""]}if(_==="slug")return[_,o.slug];const p=ri({collectionName:e.collection,keyPath:_}),b=_.replace(/^fields\./,""),g=c[b];return p?.widget==="relation"?[_,Xd({fieldConfig:p,valueMap:c,keyPath:b,locale:t})??""]:[_,g??""]})),f=Math.max(...Object.values(u).map(_=>Array.isArray(_)?_.length:1));let d=new Array(f).fill(r),h=new Array(f).fill(l);return Object.entries(u).forEach(([_,p])=>{Array.isArray(p)?p.forEach((b,g)=>{Object.entries(b).forEach(([w,k])=>{d.forEach((T,P)=>{g%P===0&&(d[g]=d[g].replaceAll(`{{${_}.${w}}}`,k),h[g]=h[g].replaceAll(`{{${_}.${w}}}`,k))})})}):(d=d.map(b=>b.replaceAll(`{{${_}}}`,p)),h=h.map(b=>b.replaceAll(`{{${_}}}`,p)))}),d.map((_,p)=>({label:_,value:h[p]}))}).flat(1).filter(Boolean).sort((o,a)=>o.label.localeCompare(a.label))},Xd=({fieldConfig:t,valueMap:e,keyPath:n,locale:i})=>{const{multiple:s,collection:l}=t,r=Co(l),o=Zd(i,t,r),a=c=>o.find(u=>u.value===c)?.label||c;return s?Object.entries(e).filter(([u])=>u.match(`^${Vt(n)}\\.\\d+$`)).map(([,u])=>u).map(a):a(e[n])},ji=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),cw=t=>Array.isArray(t)&&t.every(e=>ji(e)),uw=(t=1e3)=>new Promise(e=>{window.setTimeout(()=>{e()},t)}),Y8=({fieldConfig:t,valueMap:e,keyPath:n})=>{const{multiple:i,options:s}=t,l=cw(s),r=a=>s.find(c=>c.value===a)?.label||a;if(i){const a=Object.entries(e).filter(([c])=>c.match(`^${Vt(n)}\\.\\d+$`)).map(([,c])=>c);return l?a.map(r):a}const o=e[n];return l?r(o):o},ri=({collectionName:t,fileName:e=void 0,valueMap:n={},keyPath:i})=>{const s=yi(t),{fields:l}=e?s.files.find(({name:a})=>a===e):s,r=i.split(".");let o;return r.forEach((a,c)=>{if(c===0)o=l.find(({name:u})=>u===a);else if(o){const u=a.match(/^\d+$/),{field:f,fields:d,types:h,typeKey:_="type"}=o;f?o=f:d&&!u?o=d.find(({name:p})=>p===a):h&&u&&(o=h.find(({name:p})=>p===n[`${r.slice(0,c).join(".")}.${a}.${_}`]))}}),o},Jd=({collectionName:t,fileName:e,valueMap:n,keyPath:i,locale:s})=>{const l=ri({collectionName:t,fileName:e,valueMap:n,keyPath:i});let r=n[i];return l?.widget==="relation"&&(r=Xd({fieldConfig:l,valueMap:n,keyPath:i,locale:s})),l?.widget==="select"&&(r=Y8({fieldConfig:l,valueMap:n,keyPath:i})),r??""},fr=(t,e,n,{resolveRef:i=!0}={})=>{const{slug:s,locales:l,commitAuthor:{name:r,login:o,email:a}={},commitDate:c}=t;if(n==="slug")return s;if(n==="commit_author")return r||o||a;if(n==="commit_date")return c;const u=l[e]?.content;if(u===void 0)return;const f=n.includes(".")?Mi(u):u;if(i){const d=ri({collectionName:t.collectionName,keyPath:n});if(d?.widget==="relation")return Xd({fieldConfig:d,valueMap:f,keyPath:n,locale:e})}return f[n]},fo=Ge(!1),Qd=Ge([]),ni=Ge([]),Rt=Ge(),Ts=Ge([]),G8=t=>{const e=le(Ot);let n="single_file",i=[],s,l=!0;t?.i18n===!0&&ji(e?.i18n)&&({structure:n="single_file",locales:i=[],default_locale:s=void 0,save_all_locales:l=!0}=e.i18n),ji(t?.i18n)&&({structure:n="single_file",locales:i=[],default_locale:s=void 0,save_all_locales:l=!0}=t.i18n);const r=!!i.length;return{structure:n,hasLocales:r,locales:r?i:[],defaultLocale:r?s&&i.includes(s)?s:i[0]:void 0,saveAllLocales:l}},yi=t=>{const e=le(Ot).collections.find(n=>n.name===t);return{...e,_i18n:G8(e)}},xd=(t,e)=>le(ni).find(n=>n.collectionName===t&&n.fileName===e),Co=t=>{const e=yi(t);if(!e)return[];const{filter:n,_i18n:{defaultLocale:i="default"}}=e;return le(ni).filter(s=>s.collectionName===t&&(!n||fr(s,i,n.field)===n.value))},W8=async t=>{const e=t.replace(le(Ot).site_url,""),n=le(ni),i=await Promise.all(n.map(async s=>{const{locales:l,collectionName:r,fileName:o}=s;return(await Promise.all(Object.values(l).map(async({content:c})=>{const u=Mi(c);return(await Promise.all(Object.entries(u).map(async([d,h])=>{const _=ri({collectionName:r,fileName:o,valueMap:u,keyPath:d});return!_||!["image","file"].includes(_.widget)?!1:await rs(h,s)===e}))).includes(!0)}))).includes(!0)}));return n.filter((s,l)=>i[l])};var K8=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,s,l;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(s=i;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(l=Object.keys(e),i=l.length,i!==Object.keys(n).length)return!1;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,l[s]))return!1;for(s=i;s--!==0;){var r=l[s];if(!t(e[r],n[r]))return!1}return!0}return e!==e&&n!==n};const jn=Ed(K8);class sn{static async set(e,n){window.localStorage.setItem(e,JSON.stringify(n))}static async get(e){return JSON.parse(window.localStorage.getItem(e))}static async delete(e){window.localStorage.removeItem(e)}static async clear(){window.localStorage.clear()}static async keys(){return Object.keys(window.localStorage)}static async values(){return Object.values(window.localStorage).map(e=>JSON.parse(e))}static async entries(){return Object.entries(window.localStorage).map(([e,n])=>[e,JSON.parse(n)])}}const Df="sveltia-cms.prefs",vt=Ge({},t=>{(async()=>{try{const e=await sn.get(Df)??{};e.apiKeys||={},t(e)}catch{t({error:"permission_denied"})}})()});vt.subscribe(async t=>{if(!t||t.error||!Object.keys(t).length)return;try{jn(t,await sn.get(Df))||await sn.set(Df,t)}catch{}const{locale:e,theme:n,devModeEnabled:i=!1}=t;e&&le(J0).includes(e)&&xt.set(e);const s=!n||n==="auto",l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:s?l:n,autoTheming:s,env:i?"dev":"prod"})});const Ot=Ge(),{DEV:Z8,VITE_SITE_URL:X8}={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1},J8=t=>{if(!ji(t))throw new Error(le(me)("config.error.parse_failed"));if(!t.collections?.length)throw new Error(le(me)("config.error.no_collection"));if(!t.backend?.name)throw new Error(le(me)("config.error.no_backend"));if(!(t.backend.name in $k))throw new Error(le(me)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(!t.media_folder)throw new Error(le(me)("config.error.no_media_folder"))},Q8=async()=>{const{href:t="./config.yml"}=document.querySelector('link[type="text/yaml"][rel="cms-config-url"]')??{};let e,n;try{try{e=await fetch(t)}catch{throw new Error(le(me)("config.error.fetch_failed"))}if(!e.ok)throw new Error(le(me)("config.error.fetch_failed"));try{n=ur.parse(await e.text())}catch{throw new Error(le(me)("config.error.parse_failed"))}J8(n),Z8&&!n.site_url&&(n.site_url=X8||"http://localhost:5174"),Ot.set(n)}catch(i){Ot.set({error:i.name==="Error"?i.message:le(me)("config.error.unexpected")}),console.error(i)}};Ot.subscribe(t=>{if(le(vt).devModeEnabled&&console.info("siteConfig",t),!t||t.error)return;const{media_folder:e,public_folder:n,collections:i}=t;Rt.set(yi(i[0].name));const s=[...i.filter(({folder:u})=>!!u).map(({name:u,folder:f,extension:d,format:h,frontmatter_delimiter:_,yaml_quote:p})=>({collectionName:u,folder:f,extension:d,format:h,frontmatterDelimiter:_,yamlQuote:p})).sort((u,f)=>u.folder.localeCompare(f.folder)),...i.filter(({files:u})=>!!u).map(({name:u,files:f,extension:d,format:h,frontmatter_delimiter:_,yaml_quote:p})=>f.map(({name:b,file:g})=>({collectionName:u,fileName:b,file:g,extension:d,format:h,frontmatterDelimiter:_,yamlQuote:p}))).flat(1).sort((u,f)=>u.file.localeCompare(f.file))],l=Ci(e),r=n?`/${Ci(n)}`:`/${l}`,o={collectionName:null,internalPath:l,publicPath:r,entryRelative:!1},a=i.map(u=>{const{name:f,folder:d,path:h}=u;let{media_folder:_="",public_folder:p=""}=u;if(!h&&!_)return null;const b=!(_&&(_.startsWith("/")||_.includes("{{media_folder}}")));return _=_.replace("{{media_folder}}",l),p=p.replace("{{public_folder}}",r),{collectionName:f,internalPath:Ci(b?d:_),publicPath:p,entryRelative:b}}),c=[o,...a.filter(Boolean).sort((u,f)=>u.internalPath.localeCompare(f.internalPath))];Qd.set(s),_i.set(c),le(vt).devModeEnabled&&(console.info("allContentPaths",s),console.info("allAssetPaths",c))});const Bc=({date:t=new Date,timeZone:e=void 0}={})=>{const n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"longOffset"};return Object.fromEntries(new Intl.DateTimeFormat("en-US",{...n,hour12:!1,timeZone:e}).formatToParts(t).filter(({type:i})=>i in n).map(({type:i,value:s})=>[i,i==="hour"&&s==="24"?"00":s]))},x8=async({items:t},{accept:e}={})=>{const n=e?e.trim().split(/,\s*/g):[],i=s=>new Promise(l=>{s.name.startsWith(".")?l(null):s.isFile?s.file(r=>{const o=!n.length||n.some(a=>{const[c,u]=a.split("/");return u==="*"?r.type.split("/")[0]===c:r.type===a});l(o?r:null)},()=>{l(null)}):s.createReader().readEntries(r=>{l(Promise.all(r.map(i)))})});return(await Promise.all([...t].map(s=>i(s.webkitGetAsEntry())))).flat(1e5).filter(Boolean).sort((s,l)=>s.name.localeCompare(l.name))},eO=async t=>{const e=new FileReader;return new Promise(n=>{e.onload=()=>{n(e.result)},e.readAsText(t)})},tO=async t=>{const e=new FileReader;return new Promise(n=>{e.onload=()=>{n(e.result)},e.readAsArrayBuffer(t)})},Fa=async t=>{const e=await window.crypto.subtle.digest("SHA-1",await tO(t));return Array.from(new Uint8Array(e)).map(n=>n.toString(16).padStart(2,"0")).join("")},fw=async t=>{const e=typeof t=="string"?new Blob([t],{type:"text/plain"}):t,n=new FileReader;return new Promise(i=>{n.onload=()=>{i(n.result)},n.readAsDataURL(e)})},nO=async t=>(await fw(t)).split(",")[1],dr=t=>{const e=new Intl.NumberFormat(le(xt)),n=1e3,i=n*1e3,s=i*1e3,l=s*1e3;return t<n?`${e.format(t)} bytes`:t<i?`${e.format(Number((t/n).toFixed(1)))} KB`:t<s?`${e.format(Number((t/i).toFixed(1)))} MB`:t<l?`${e.format(Number((t/s).toFixed(1)))} GB`:`${e.format(Number((t/l).toFixed(1)))} TB`},eh=(t,e)=>{if(!e.length)return t;const[,n,i]=t.match(/(.+?)(?:\.([a-zA-Z0-9]+?))?$/),s=new RegExp(`^${Vt(n)}(?:-(\\d+?))?${i?`\\.${i}`:""}$`),l=e.sort((r,o)=>r.split(".")[0].localeCompare(o.split(".")[0])).findLast(r=>r.match(s));return l?`${n}-${Number(l.match(s)[1]??0)+1}${i?`.${i}`:""}`:t},Mf=t=>{const e=t.split("/");return e.forEach((n,i)=>{if(n===".."){const s=e.findLastIndex((l,r)=>!!l&&r<i);s>-1&&(e[s]=null)}(n===".."||n===".")&&(e[i]=null)}),e.filter(Boolean).join("/")},dw=t=>{const{slug:{encoding:e="unicode",clean_accents:n=!1,sanitize_replacement:i="-"}={}}=le(Ot);let s=t;return n&&(s=s.normalize("NFD").replace(/\p{Diacritic}/gu,"")),e==="ascii"?s=s.replaceAll(/[^\w-~]/g," "):s=s.replaceAll(/[^\p{L}\p{N}]/gu," "),s.toLocaleLowerCase().trim().replaceAll(/\s+/g,i)},ho=(t,{collection:e,content:n,currentSlug:i="",isMediaFolder:s=!1,entryFilePath:l=""})=>{const{name:r,identifier_field:o="title",folder:a}=e,c=Bc(),u=t.replaceAll(/{{(.+?)}}/g,(f,d)=>{if(["year","month","day","hour","minute","second"].includes(d))return c[d];if(d==="slug"&&i)return i;if(d==="uuid")return Ks();if(d==="uuid_short")return Ks().split("-").pop();if(d==="uuid_shorter")return Ks().split("-").shift();if(s){if(!l)return"";if(d==="dirname")return l.replace(a,"").split("/").slice(0,-1).join("/");if(d==="filename")return l.split("/").pop().split(".").shift();if(d==="extension")return l.split("/").pop().split(".").pop()}let h;return d.startsWith("fields.")?h=n[d.replace(/^fields\./,"")]:d==="slug"?h=n[o]||n.title||n.name||n.label:h=n[d],h&&(h=dw(h)),h||Ks().split("-").pop()});return i?u:eh(u,Co(r).map(f=>f.slug))},iO=(t,e)=>{const n=e==="image",i=n?new Image:document.createElement(e);return new Promise(s=>{const l=()=>{s({dimensions:e==="audio"?void 0:{width:n?i.naturalWidth:i.videoWidth,height:n?i.naturalHeight:i.videoHeight},duration:n?void 0:i.duration})};i.addEventListener(n?"load":"loadedmetadata",l,{once:!0}),i.src=t})},Wp=t=>new Date(t*1e3).toISOString().substr(11,8),Kp=["image","video","audio","document","other"],jf={image:/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|tiff?|webp)$/i,video:/\.(?:avi|mp4|mpeg|ogv|ts|webm|3gp|3g2)$/i,audio:/\.(?:aac|midi?|mp3|opus|wav|weba)$/i,document:/\.(?:csv|docx?|odp|ods|odt|pdf|pptx?|rtf|xslx?)$/i},an=Ge([]),_i=Ge([]),mi=Ge(),xs=Ge([]),Rf=Ge(),el=Ge(),Bn=Ge({folder:void 0,files:[]}),sO=pn([Bn],([t],e)=>{e(!!t.files?.length)}),lO=(t,e)=>{const{entryRelative:n,internalPath:i,publicPath:s}=le(_i).findLast(l=>[null,t.name].includes(l.collectionName));if(n){const l=t.path?t.path.split("/").slice(0,-1).join("/"):".";return{internalAssetFolder:Mf(ho(`${i}/${l}`,e)),publicAssetFolder:s.match(/^\.?$/)?s:Mf(ho(s,e))}}return{internalAssetFolder:i,publicAssetFolder:s}},th=t=>Object.entries(jf).find(([,e])=>t.match(e))?.[0]??"other",rO=(t,e)=>{if(!t.startsWith("/")){if(!e)return;const{collectionName:l,locales:r}=e,o=yi(l),{_i18n:{defaultLocale:a="default"},public_folder:c}=o,u=a in r?a:Object.keys(r)[0],{path:f,content:d}=r[u];if(!f||!d)return;const h=f.split("/").slice(0,-1).join("/"),_=c?ho(c,{collection:o,content:Mi(d),currentSlug:e.slug,isMediaFolder:!0,entryFilePath:f}):".",p=Mf(`${h}/${_}/${t}`);return le(an).find(b=>b.path===p)}const[,n,i]=t.match(/(.+?)\/([^/]+)$/)??[];if(!n)return;const{internalPath:s}=le(_i).findLast(l=>l.publicPath===n)??{};if(s)return le(an).find(l=>l.path===`${s}/${i}`)},mo=async(t,{pathOnly:e=!1}={})=>{if(!t)return;const n=t.url?.startsWith("blob:");if(n&&!e)return t.url;if(!t.url&&(t.file||t.fetchURL)&&!e){const o=URL.createObjectURL(t.file||await le(bi).fetchBlob(t));return an.update(a=>[...a.filter(({sha:c,path:u})=>!(c===t.sha&&u===t.path)),{...t,url:o}]),o}const{publicPath:i,entryRelative:s}=le(_i).find(({collectionName:o})=>o===t.collectionName)||le(_i).find(({collectionName:o})=>o===null);if(s)return n?t.url:void 0;const l=e?"":le(Ot).site_url??"",r=t.path.replace(t.folder,i);return`${l}${r}`},rs=async(t,e)=>{if(t)return t.match(/^(?:https?|data):/)?t:mo(rO(t,e))},oO=async t=>{const{kind:e}=t,n=await mo(t);let i,s;return["image","video","audio"].includes(e)&&n&&({dimensions:i,duration:s}=await iO(n,e)),{displayURL:n,dimensions:i,duration:s,usedEntries:await W8(n)}},aO=async t=>{const{site_domain:e=document.domain,base_url:n="https://api.netlify.com",auth_endpoint:i="auth"}=le(Ot).backend,s=600,l=800,{availHeight:r,availWidth:o}=window.screen,a=r/2-l/2,c=o/2-s/2,u=window.open(`${n}/${i}?provider=${t}&site_id=${e}&scope=repo`,"auth",`width=${s},height=${l},top=${a},left=${c}`);return new Promise(f=>{const d=({origin:h,data:_})=>{if(h!==n||typeof _!="string")return;if(_===`authorizing:${t}`){u.postMessage(_,h);return}const[,p,b]=_.match(`^authorization:${t}:(success|error):(.+)`)??[];let g;try{g=b?JSON.parse(b):void 0}catch{}f(p==="success"&&ji(g)&&typeof g.token=="string"?g.token:null),window.removeEventListener("message",d),u.close()};window.addEventListener("message",d)})},cO={create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"},uO=(t,{commitType:e="update",collection:n}={})=>{const{login:i="",name:s=""}=le(Fi),[l=""]=t.map(f=>f.slug).filter(Boolean),[r,...o]=t.map(({path:f})=>f),{backend:{commit_messages:a={}}={}}=le(Ot),c=n?.label_singular||n?.label||n?.name||"";let u=a[e]||cO[e]||"";return["create","update","delete"].includes(e)&&(u=u.replaceAll("{{slug}}",l).replaceAll("{{collection}}",c).replaceAll("{{path}}",r).replaceAll("{{author-login}}",i).replaceAll("{{author-name}}",s)),["uploadMedia","deleteMedia"].includes(e)&&(u=u.replaceAll("{{path}}",r).replaceAll("{{author-login}}",i).replaceAll("{{author-name}}",s),o.length&&(u+=` +${o.length}`)),["openAuthoring"].includes(e)&&(u=u.replaceAll("{{message}}",e).replaceAll("{{author-login}}",i).replaceAll("{{author-name}}",s)),u},fO="1.38.0",Me=SyntaxError,Qt=RangeError,Qe=TypeError,on=Error,Tn=void 0,os=typeof BigInt>"u"?Tn:BigInt,nh=RegExp,ih=WeakMap,hw=WeakMap.prototype.get,mw=WeakMap.prototype.set,Hn=Object.create,Hl=Number.isSafeInteger,Wi=Object.getOwnPropertyNames,Yn=Object.freeze,pw=Object.prototype.isPrototypeOf,Dn=Object.seal?Object.preventExtensions(Object.create(null)):null,hr=Function.prototype.bind,Zp=RegExp.prototype.test,Xp=RegExp.prototype.exec,sh=Reflect.apply,Ff=Proxy,Jp=typeof Symbol>"u"?Tn:Symbol.toStringTag,gw=Object.defineProperty,Es=Object.assign,lh=Object,dO=Math.floor,tl=Array.isArray,mr=1/0,rh=String.fromCharCode,za=Array,ia=Object.prototype.hasOwnProperty,Qp=Object.prototype.propertyIsEnumerable,Is=Function.prototype.apply;var _w=Qp.call.bind(Qp),ms=lh.hasOwn||function(){return ia.bind?ia.call.bind(ia):function(e,n){return ia.call(e,n)}}(),bw=lh.create;function xp(t){var e=bw(Dn);return ms(t,"value")&&(e.value=t.value),ms(t,"writable")&&(e.writable=t.writable),ms(t,"get")&&(e.get=t.get),ms(t,"set")&&(e.set=t.set),ms(t,"enumerable")&&(e.enumerable=t.enumerable),ms(t,"configurable")&&(e.configurable=t.configurable),e}const hO=function(e,n){if(!n&&typeof e!="function"&&(n=e,e=Hn(Dn)),Es)Es(e,n);else for(var i in n)ms(n,i)&&(e[i]=n[i]);if(e.default=e,typeof e=="function")e.prototype&&Yn(e.prototype);else if(Jp){var s=Hn(Dn);s.value="Module",gw(e,Jp,s)}return Yn(e)};/*!@preserve@license
|
|
223
|
+
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=na(e),i=$l(n);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i}]}}case"map-value-ind":{this.onKeyLine=!0;const n=na(e),i=$l(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function ow(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new lw||null,prettyErrors:e}}function q8(t,e={}){const{lineCounter:n,prettyErrors:i}=ow(e),s=new Kd(n?.addNewLine),l=new Wd(e),r=Array.from(l.compose(s.parse(t)));if(i&&n)for(const o of r)o.errors.forEach(ja(t,n)),o.warnings.forEach(ja(t,n));return r.length>0?r:Object.assign([],{empty:!0},l.streamInfo())}function aw(t,e={}){const{lineCounter:n,prettyErrors:i}=ow(e),s=new Kd(n?.addNewLine),l=new Wd(e);let r=null;for(const o of l.compose(s.parse(t),!0,t.length))if(!r)r=o;else if(r.options.logLevel!=="silent"){r.errors.push(new Ws(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&n&&(r.errors.forEach(ja(t,n)),r.warnings.forEach(ja(t,n))),r}function H8(t,e,n){let i;typeof e=="function"?i=e:n===void 0&&e&&typeof e=="object"&&(n=e);const s=aw(t,n);if(!s)return null;if(s.warnings.forEach(l=>$v(s.options.logLevel,l)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:i},n))}function V8(t,e,n){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(t===void 0){const{keepUndefined:s}=n??e??{};if(!s)return}return new Lr(t,i,n).toString(n)}const ur=Object.freeze(Object.defineProperty({__proto__:null,Alias:Oc,CST:z8,Composer:Wd,Document:Lr,Lexer:sw,LineCounter:lw,Pair:dn,Parser:Kd,Scalar:xe,Schema:jc,YAMLError:Yd,YAMLMap:zn,YAMLParseError:Ws,YAMLSeq:Ps,YAMLWarning:Wv,isAlias:hl,isCollection:jt,isDocument:Sr,isMap:Tr,isNode:Ht,isPair:Ct,isScalar:Tt,isSeq:Er,parse:H8,parseAllDocuments:q8,parseDocument:aw,stringify:V8,visit:Ns,visitAsync:Ec},Symbol.toStringTag,{value:"Module"})),Cf=(t,e,{ellipsis:n="…"}={})=>{const i=[...t];return`${i.slice(0,e).join("").trim()}${i.length>e?n:""}`},Vt=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ci=t=>t.replace(/^\/+/,"").replace(/\/+$/,""),Ks=()=>window.crypto.randomUUID(),Gp=t=>t.match(/{{.+?}}/)?t:`{{${t}}}`,Zd=(t,e,n)=>{const i=e.value_field,s=e.display_fields,l=Gp(i),r=(s??[i]).map(Gp).join(" ");return n.map(o=>{const{content:a}=o?.locales[t]??{};if(!a)return;const c=Mi(a),u=Object.fromEntries([...new Set([...[...r.matchAll(/{{(.+?)}}/g)].map(_=>_[1]),...[...l.matchAll(/{{(.+?)}}/g)].map(_=>_[1])].map(_=>_.includes(".")?_.replace(/^([^.]+)+\.\*\.[^.]+$/,"$1.*"):_))].map(_=>{if(_.endsWith(".*")){const w=new RegExp(`^${Vt(_).replace("\\.\\*","\\.\\d+\\.[^.]+")}$`),k=ol(Object.fromEntries(Object.entries(c).filter(([T])=>!!T.match(w))));return[_,k[Object.keys(k)[0]]??""]}if(_==="slug")return[_,o.slug];const p=ri({collectionName:e.collection,keyPath:_}),b=_.replace(/^fields\./,""),g=c[b];return p?.widget==="relation"?[_,Xd({fieldConfig:p,valueMap:c,keyPath:b,locale:t})??""]:[_,g??""]})),f=Math.max(...Object.values(u).map(_=>Array.isArray(_)?_.length:1));let d=new Array(f).fill(r),h=new Array(f).fill(l);return Object.entries(u).forEach(([_,p])=>{Array.isArray(p)?p.forEach((b,g)=>{Object.entries(b).forEach(([w,k])=>{d.forEach((T,P)=>{g%P===0&&(d[g]=d[g].replaceAll(`{{${_}.${w}}}`,k),h[g]=h[g].replaceAll(`{{${_}.${w}}}`,k))})})}):(d=d.map(b=>b.replaceAll(`{{${_}}}`,p)),h=h.map(b=>b.replaceAll(`{{${_}}}`,p)))}),d.map((_,p)=>({label:_,value:h[p]}))}).flat(1).filter(Boolean).sort((o,a)=>o.label.localeCompare(a.label))},Xd=({fieldConfig:t,valueMap:e,keyPath:n,locale:i})=>{const{multiple:s,collection:l}=t,r=Co(l),o=Zd(i,t,r),a=c=>o.find(u=>u.value===c)?.label||c;return s?Object.entries(e).filter(([u])=>u.match(`^${Vt(n)}\\.\\d+$`)).map(([,u])=>u).map(a):a(e[n])},ji=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),cw=t=>Array.isArray(t)&&t.every(e=>ji(e)),uw=(t=1e3)=>new Promise(e=>{window.setTimeout(()=>{e()},t)}),Y8=({fieldConfig:t,valueMap:e,keyPath:n})=>{const{multiple:i,options:s}=t,l=cw(s),r=a=>s.find(c=>c.value===a)?.label||a;if(i){const a=Object.entries(e).filter(([c])=>c.match(`^${Vt(n)}\\.\\d+$`)).map(([,c])=>c);return l?a.map(r):a}const o=e[n];return l?r(o):o},ri=({collectionName:t,fileName:e=void 0,valueMap:n={},keyPath:i})=>{const s=yi(t),{fields:l}=e?s.files.find(({name:a})=>a===e):s,r=i.split(".");let o;return r.forEach((a,c)=>{if(c===0)o=l.find(({name:u})=>u===a);else if(o){const u=a.match(/^\d+$/),{field:f,fields:d,types:h,typeKey:_="type"}=o;f?o=f:d&&!u?o=d.find(({name:p})=>p===a):h&&u&&(o=h.find(({name:p})=>p===n[`${r.slice(0,c).join(".")}.${a}.${_}`]))}}),o},Jd=({collectionName:t,fileName:e,valueMap:n,keyPath:i,locale:s})=>{const l=ri({collectionName:t,fileName:e,valueMap:n,keyPath:i});let r=n[i];return l?.widget==="relation"&&(r=Xd({fieldConfig:l,valueMap:n,keyPath:i,locale:s})),l?.widget==="select"&&(r=Y8({fieldConfig:l,valueMap:n,keyPath:i})),r??""},fr=(t,e,n,{resolveRef:i=!0}={})=>{const{slug:s,locales:l,commitAuthor:{name:r,login:o,email:a}={},commitDate:c}=t;if(n==="slug")return s;if(n==="commit_author")return r||o||a;if(n==="commit_date")return c;const u=l[e]?.content;if(u===void 0)return;const f=n.includes(".")?Mi(u):u;if(i){const d=ri({collectionName:t.collectionName,keyPath:n});if(d?.widget==="relation")return Xd({fieldConfig:d,valueMap:f,keyPath:n,locale:e})}return f[n]},fo=Ge(!1),Qd=Ge([]),ni=Ge([]),Rt=Ge(),Ts=Ge([]),G8=t=>{const e=le(Ot);let n="single_file",i=[],s,l=!0;t?.i18n===!0&&ji(e?.i18n)&&({structure:n="single_file",locales:i=[],default_locale:s=void 0,save_all_locales:l=!0}=e.i18n),ji(t?.i18n)&&({structure:n="single_file",locales:i=[],default_locale:s=void 0,save_all_locales:l=!0}=t.i18n);const r=!!i.length;return{structure:n,hasLocales:r,locales:r?i:[],defaultLocale:r?s&&i.includes(s)?s:i[0]:void 0,saveAllLocales:l}},yi=t=>{const e=le(Ot).collections.find(n=>n.name===t);return{...e,_i18n:G8(e)}},xd=(t,e)=>le(ni).find(n=>n.collectionName===t&&n.fileName===e),Co=t=>{const e=yi(t);if(!e)return[];const{filter:n,_i18n:{defaultLocale:i="default"}}=e;return le(ni).filter(s=>s.collectionName===t&&(!n||fr(s,i,n.field)===n.value))},W8=async t=>{const e=t.replace(le(Ot).site_url,""),n=le(ni),i=await Promise.all(n.map(async s=>{const{locales:l,collectionName:r,fileName:o}=s;return(await Promise.all(Object.values(l).map(async({content:c})=>{const u=Mi(c);return(await Promise.all(Object.entries(u).map(async([d,h])=>{const _=ri({collectionName:r,fileName:o,valueMap:u,keyPath:d});return!_||!["image","file"].includes(_.widget)?!1:await rs(h,s)===e}))).includes(!0)}))).includes(!0)}));return n.filter((s,l)=>i[l])};var K8=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,s,l;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(s=i;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(l=Object.keys(e),i=l.length,i!==Object.keys(n).length)return!1;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,l[s]))return!1;for(s=i;s--!==0;){var r=l[s];if(!t(e[r],n[r]))return!1}return!0}return e!==e&&n!==n};const jn=Ed(K8);class sn{static async set(e,n){window.localStorage.setItem(e,JSON.stringify(n))}static async get(e){return JSON.parse(window.localStorage.getItem(e))}static async delete(e){window.localStorage.removeItem(e)}static async clear(){window.localStorage.clear()}static async keys(){return Object.keys(window.localStorage)}static async values(){return Object.values(window.localStorage).map(e=>JSON.parse(e))}static async entries(){return Object.entries(window.localStorage).map(([e,n])=>[e,JSON.parse(n)])}}const Df="sveltia-cms.prefs",vt=Ge({},t=>{(async()=>{try{const e=await sn.get(Df)??{};e.apiKeys||={},t(e)}catch{t({error:"permission_denied"})}})()});vt.subscribe(async t=>{if(!t||t.error||!Object.keys(t).length)return;try{jn(t,await sn.get(Df))||await sn.set(Df,t)}catch{}const{locale:e,theme:n,devModeEnabled:i=!1}=t;e&&le(J0).includes(e)&&xt.set(e);const s=!n||n==="auto",l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:s?l:n,autoTheming:s,env:i?"dev":"prod"})});const Ot=Ge(),{DEV:Z8,VITE_SITE_URL:X8}={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1},J8=t=>{if(!ji(t))throw new Error(le(me)("config.error.parse_failed"));if(!t.collections?.length)throw new Error(le(me)("config.error.no_collection"));if(!t.backend?.name)throw new Error(le(me)("config.error.no_backend"));if(!(t.backend.name in $k))throw new Error(le(me)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(!t.media_folder)throw new Error(le(me)("config.error.no_media_folder"))},Q8=async()=>{const{href:t="./config.yml"}=document.querySelector('link[type="text/yaml"][rel="cms-config-url"]')??{};let e,n;try{try{e=await fetch(t)}catch{throw new Error(le(me)("config.error.fetch_failed"))}if(!e.ok)throw new Error(le(me)("config.error.fetch_failed"));try{n=ur.parse(await e.text())}catch{throw new Error(le(me)("config.error.parse_failed"))}J8(n),Z8&&!n.site_url&&(n.site_url=X8||"http://localhost:5174"),Ot.set(n)}catch(i){Ot.set({error:i.name==="Error"?i.message:le(me)("config.error.unexpected")}),console.error(i)}};Ot.subscribe(t=>{if(le(vt).devModeEnabled&&console.info("siteConfig",t),!t||t.error)return;const{media_folder:e,public_folder:n,collections:i}=t;Rt.set(yi(i[0].name));const s=[...i.filter(({folder:u})=>!!u).map(({name:u,folder:f,extension:d,format:h,frontmatter_delimiter:_,yaml_quote:p})=>({collectionName:u,folder:f,extension:d,format:h,frontmatterDelimiter:_,yamlQuote:p})).sort((u,f)=>u.folder.localeCompare(f.folder)),...i.filter(({files:u})=>!!u).map(({name:u,files:f,extension:d,format:h,frontmatter_delimiter:_,yaml_quote:p})=>f.map(({name:b,file:g})=>({collectionName:u,fileName:b,file:g,extension:d,format:h,frontmatterDelimiter:_,yamlQuote:p}))).flat(1).sort((u,f)=>u.file.localeCompare(f.file))],l=Ci(e),r=n?`/${Ci(n)}`.replace(/^\/@/,"@"):`/${l}`,o={collectionName:null,internalPath:l,publicPath:r,entryRelative:!1},a=i.map(u=>{const{name:f,folder:d,path:h}=u;let{media_folder:_="",public_folder:p=""}=u;if(!h&&!_)return null;const b=!(_&&(_.startsWith("/")||_.includes("{{media_folder}}")));return _=_.replace("{{media_folder}}",l),p=p.replace("{{public_folder}}",r),{collectionName:f,internalPath:Ci(b?d:_),publicPath:p,entryRelative:b}}),c=[o,...a.filter(Boolean).sort((u,f)=>u.internalPath.localeCompare(f.internalPath))];Qd.set(s),_i.set(c),le(vt).devModeEnabled&&(console.info("allContentPaths",s),console.info("allAssetPaths",c))});const Bc=({date:t=new Date,timeZone:e=void 0}={})=>{const n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"longOffset"};return Object.fromEntries(new Intl.DateTimeFormat("en-US",{...n,hour12:!1,timeZone:e}).formatToParts(t).filter(({type:i})=>i in n).map(({type:i,value:s})=>[i,i==="hour"&&s==="24"?"00":s]))},x8=async({items:t},{accept:e}={})=>{const n=e?e.trim().split(/,\s*/g):[],i=s=>new Promise(l=>{s.name.startsWith(".")?l(null):s.isFile?s.file(r=>{const o=!n.length||n.some(a=>{const[c,u]=a.split("/");return u==="*"?r.type.split("/")[0]===c:r.type===a});l(o?r:null)},()=>{l(null)}):s.createReader().readEntries(r=>{l(Promise.all(r.map(i)))})});return(await Promise.all([...t].map(s=>i(s.webkitGetAsEntry())))).flat(1e5).filter(Boolean).sort((s,l)=>s.name.localeCompare(l.name))},eO=async t=>{const e=new FileReader;return new Promise(n=>{e.onload=()=>{n(e.result.replace(/\r\n/g,`
|
|
224
|
+
`))},e.readAsText(t)})},tO=async t=>{const e=new FileReader;return new Promise(n=>{e.onload=()=>{n(e.result)},e.readAsArrayBuffer(t)})},Fa=async t=>{const e=await window.crypto.subtle.digest("SHA-1",await tO(t));return Array.from(new Uint8Array(e)).map(n=>n.toString(16).padStart(2,"0")).join("")},fw=async t=>{const e=typeof t=="string"?new Blob([t],{type:"text/plain"}):t,n=new FileReader;return new Promise(i=>{n.onload=()=>{i(n.result)},n.readAsDataURL(e)})},nO=async t=>(await fw(t)).split(",")[1],dr=t=>{const e=new Intl.NumberFormat(le(xt)),n=1e3,i=n*1e3,s=i*1e3,l=s*1e3;return t<n?`${e.format(t)} bytes`:t<i?`${e.format(Number((t/n).toFixed(1)))} KB`:t<s?`${e.format(Number((t/i).toFixed(1)))} MB`:t<l?`${e.format(Number((t/s).toFixed(1)))} GB`:`${e.format(Number((t/l).toFixed(1)))} TB`},eh=(t,e)=>{if(!e.length)return t;const[,n,i]=t.match(/(.+?)(?:\.([a-zA-Z0-9]+?))?$/),s=new RegExp(`^${Vt(n)}(?:-(\\d+?))?${i?`\\.${i}`:""}$`),l=e.sort((r,o)=>r.split(".")[0].localeCompare(o.split(".")[0])).findLast(r=>r.match(s));return l?`${n}-${Number(l.match(s)[1]??0)+1}${i?`.${i}`:""}`:t},Mf=t=>{const e=t.split("/");return e.forEach((n,i)=>{if(n===".."){const s=e.findLastIndex((l,r)=>!!l&&r<i);s>-1&&(e[s]=null)}(n===".."||n===".")&&(e[i]=null)}),e.filter(Boolean).join("/")},dw=t=>{const{slug:{encoding:e="unicode",clean_accents:n=!1,sanitize_replacement:i="-"}={}}=le(Ot);let s=t;return n&&(s=s.normalize("NFD").replace(/\p{Diacritic}/gu,"")),e==="ascii"?s=s.replaceAll(/[^\w-~]/g," "):s=s.replaceAll(/[^\p{L}\p{N}]/gu," "),s.toLocaleLowerCase().trim().replaceAll(/\s+/g,i)},ho=(t,{collection:e,content:n,currentSlug:i="",isMediaFolder:s=!1,entryFilePath:l=""})=>{const{name:r,identifier_field:o="title",folder:a}=e,c=Bc(),u=t.replaceAll(/{{(.+?)}}/g,(f,d)=>{if(["year","month","day","hour","minute","second"].includes(d))return c[d];if(d==="slug"&&i)return i;if(d==="uuid")return Ks();if(d==="uuid_short")return Ks().split("-").pop();if(d==="uuid_shorter")return Ks().split("-").shift();if(s){if(!l)return"";if(d==="dirname")return l.replace(a,"").split("/").slice(0,-1).join("/");if(d==="filename")return l.split("/").pop().split(".").shift();if(d==="extension")return l.split("/").pop().split(".").pop()}let h;return d.startsWith("fields.")?h=n[d.replace(/^fields\./,"")]:d==="slug"?h=n[o]||n.title||n.name||n.label:h=n[d],h&&(h=dw(h)),h||Ks().split("-").pop()});return i?u:eh(u,Co(r).map(f=>f.slug))},iO=(t,e)=>{const n=e==="image",i=n?new Image:document.createElement(e);return new Promise(s=>{const l=()=>{s({dimensions:e==="audio"?void 0:{width:n?i.naturalWidth:i.videoWidth,height:n?i.naturalHeight:i.videoHeight},duration:n?void 0:i.duration})};i.addEventListener(n?"load":"loadedmetadata",l,{once:!0}),i.src=t})},Wp=t=>new Date(t*1e3).toISOString().substr(11,8),Kp=["image","video","audio","document","other"],jf={image:/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|tiff?|webp)$/i,video:/\.(?:avi|mp4|mpeg|ogv|ts|webm|3gp|3g2)$/i,audio:/\.(?:aac|midi?|mp3|opus|wav|weba)$/i,document:/\.(?:csv|docx?|odp|ods|odt|pdf|pptx?|rtf|xslx?)$/i},an=Ge([]),_i=Ge([]),mi=Ge(),xs=Ge([]),Rf=Ge(),el=Ge(),Bn=Ge({folder:void 0,files:[]}),sO=pn([Bn],([t],e)=>{e(!!t.files?.length)}),lO=(t,e)=>{const{entryRelative:n,internalPath:i,publicPath:s}=le(_i).findLast(l=>[null,t.name].includes(l.collectionName));if(n){const l=t.path?t.path.split("/").slice(0,-1).join("/"):".";return{internalAssetFolder:Mf(ho(`${i}/${l}`,e)),publicAssetFolder:s.match(/^\.?$/)?s:Mf(ho(s,e))}}return{internalAssetFolder:i,publicAssetFolder:s}},th=t=>Object.entries(jf).find(([,e])=>t.match(e))?.[0]??"other",rO=(t,e)=>{if(!t.match(/^[/@]/)){if(!e)return;const{collectionName:l,locales:r}=e,o=yi(l),{_i18n:{defaultLocale:a="default"},public_folder:c}=o,u=a in r?a:Object.keys(r)[0],{path:f,content:d}=r[u];if(!f||!d)return;const h=f.split("/").slice(0,-1).join("/"),_=c?ho(c,{collection:o,content:Mi(d),currentSlug:e.slug,isMediaFolder:!0,entryFilePath:f}):".",p=Mf(`${h}/${_}/${t}`);return le(an).find(b=>b.path===p)}const[,n,i]=t.match(/(.+?)\/([^/]+)$/)??[];if(!n)return;const{internalPath:s}=le(_i).findLast(l=>l.publicPath===n)??{};if(s)return le(an).find(l=>l.path===`${s}/${i}`)},mo=async(t,{pathOnly:e=!1}={})=>{if(!t)return;const n=t.url?.startsWith("blob:");if(n&&!e)return t.url;if(!t.url&&(t.file||t.fetchURL)&&!e){const o=URL.createObjectURL(t.file||await le(bi).fetchBlob(t));return an.update(a=>[...a.filter(({sha:c,path:u})=>!(c===t.sha&&u===t.path)),{...t,url:o}]),o}const{publicPath:i,entryRelative:s}=le(_i).find(({collectionName:o})=>o===t.collectionName)||le(_i).find(({collectionName:o})=>o===null);if(s)return n?t.url:void 0;const l=e?"":le(Ot).site_url??"",r=t.path.replace(t.folder,i);return`${l}${r}`},rs=async(t,e)=>{if(t)return t.match(/^(?:https?|data):/)?t:mo(rO(t,e))},oO=async t=>{const{kind:e}=t,n=await mo(t);let i,s;return["image","video","audio"].includes(e)&&n&&({dimensions:i,duration:s}=await iO(n,e)),{displayURL:n,dimensions:i,duration:s,usedEntries:await W8(n)}},aO=async t=>{const{site_domain:e=document.domain,base_url:n="https://api.netlify.com",auth_endpoint:i="auth"}=le(Ot).backend,s=600,l=800,{availHeight:r,availWidth:o}=window.screen,a=r/2-l/2,c=o/2-s/2,u=window.open(`${n}/${i}?provider=${t}&site_id=${e}&scope=repo`,"auth",`width=${s},height=${l},top=${a},left=${c}`);return new Promise(f=>{const d=({origin:h,data:_})=>{if(h!==n||typeof _!="string")return;if(_===`authorizing:${t}`){u.postMessage(_,h);return}const[,p,b]=_.match(`^authorization:${t}:(success|error):(.+)`)??[];let g;try{g=b?JSON.parse(b):void 0}catch{}f(p==="success"&&ji(g)&&typeof g.token=="string"?g.token:null),window.removeEventListener("message",d),u.close()};window.addEventListener("message",d)})},cO={create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"},uO=(t,{commitType:e="update",collection:n}={})=>{const{login:i="",name:s=""}=le(Fi),[l=""]=t.map(f=>f.slug).filter(Boolean),[r,...o]=t.map(({path:f})=>f),{backend:{commit_messages:a={}}={}}=le(Ot),c=n?.label_singular||n?.label||n?.name||"";let u=a[e]||cO[e]||"";return["create","update","delete"].includes(e)&&(u=u.replaceAll("{{slug}}",l).replaceAll("{{collection}}",c).replaceAll("{{path}}",r).replaceAll("{{author-login}}",i).replaceAll("{{author-name}}",s)),["uploadMedia","deleteMedia"].includes(e)&&(u=u.replaceAll("{{path}}",r).replaceAll("{{author-login}}",i).replaceAll("{{author-name}}",s),o.length&&(u+=` +${o.length}`)),["openAuthoring"].includes(e)&&(u=u.replaceAll("{{message}}",e).replaceAll("{{author-login}}",i).replaceAll("{{author-name}}",s)),u},fO="1.38.0",Me=SyntaxError,Qt=RangeError,Qe=TypeError,on=Error,Tn=void 0,os=typeof BigInt>"u"?Tn:BigInt,nh=RegExp,ih=WeakMap,hw=WeakMap.prototype.get,mw=WeakMap.prototype.set,Hn=Object.create,Hl=Number.isSafeInteger,Wi=Object.getOwnPropertyNames,Yn=Object.freeze,pw=Object.prototype.isPrototypeOf,Dn=Object.seal?Object.preventExtensions(Object.create(null)):null,hr=Function.prototype.bind,Zp=RegExp.prototype.test,Xp=RegExp.prototype.exec,sh=Reflect.apply,Ff=Proxy,Jp=typeof Symbol>"u"?Tn:Symbol.toStringTag,gw=Object.defineProperty,Es=Object.assign,lh=Object,dO=Math.floor,tl=Array.isArray,mr=1/0,rh=String.fromCharCode,za=Array,ia=Object.prototype.hasOwnProperty,Qp=Object.prototype.propertyIsEnumerable,Is=Function.prototype.apply;var _w=Qp.call.bind(Qp),ms=lh.hasOwn||function(){return ia.bind?ia.call.bind(ia):function(e,n){return ia.call(e,n)}}(),bw=lh.create;function xp(t){var e=bw(Dn);return ms(t,"value")&&(e.value=t.value),ms(t,"writable")&&(e.writable=t.writable),ms(t,"get")&&(e.get=t.get),ms(t,"set")&&(e.set=t.set),ms(t,"enumerable")&&(e.enumerable=t.enumerable),ms(t,"configurable")&&(e.configurable=t.configurable),e}const hO=function(e,n){if(!n&&typeof e!="function"&&(n=e,e=Hn(Dn)),Es)Es(e,n);else for(var i in n)ms(n,i)&&(e[i]=n[i]);if(e.default=e,typeof e=="function")e.prototype&&Yn(e.prototype);else if(Jp){var s=Hn(Dn);s.value="Module",gw(e,Jp,s)}return Yn(e)};/*!@preserve@license
|
|
224
225
|
* 模块名称:j-regexp
|
|
225
226
|
* 模块功能:可读性更好的正则表达式创建方式。从属于“简计划”。
|
|
226
227
|
More readable way for creating RegExp. Belong to "Plan J".
|