import{t as e}from"./rolldown-runtime.Bi-D_2cA.mjs";import{C as t,N as n,d as r,m as i,o as a,s as o}from"./react.B4lOa1lM.mjs";import{w as s}from"./motion.D9VVlZrJ.mjs";import{D as c,Et as l,W as u,h as d,o as f,r as ee,t as te,x as ne}from"./framer.KTGEEA2E.mjs";function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){return typeof e==`function`?e():e}function re(e,t){return M[e]>M[t]}function h(e){let t;for(let n of e){let e=m(n);if((t===void 0||re(e,t))&&(t=e),t===`user-blocking`)break}return t}function g(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function _(e,...t){if(!e)throw Error(`Assertion Error`+(t.length>0?`: `+t.join(` `):``))}function v(e){throw Error(`Unexpected value: ${e}`)}function y(e,t,n,r){_(e>=t,e,`outside lower bound for`,r),_(e<=n,e,`outside upper bound for`,r)}function b(e){return typeof e==`string`}function x(e){return Number.isFinite(e)}function S(e){return e===null}function C(e){if(S(e))return 0;switch(e.type){case`array`:return 1;case`boolean`:return 2;case`color`:return 3;case`date`:return 4;case`enum`:return 5;case`file`:return 6;case`responsiveimage`:return 10;case`link`:return 7;case`number`:return 8;case`object`:return 9;case`richtext`:return 11;case`string`:return 12;case`vectorsetitem`:return 13;default:v(e)}}function ie(e){let t=e.readUint16(),n=[];for(let r=0;ri)return 1;for(let i=0;it.value)}function ue(e){return{type:`color`,value:e.readString()}}function de(e,t){e.writeString(t.value)}function fe(e,t){return e.valuet.value)}function pe(e){let t=e.readInt64();return{type:`date`,value:new Date(t).toISOString()}}function me(e,t){let n=new Date(t.value).getTime();e.writeInt64(n)}function he(e,t){let n=new Date(e.value),r=new Date(t.value);return nr)}function ge(e){return{type:`enum`,value:e.readString()}}function _e(e,t){e.writeString(t.value)}function ve(e,t){return e.valuet.value)}function ye(e){return{type:`file`,value:e.readString()}}function be(e,t){e.writeString(t.value)}function xe(e,t){return e.valuet.value)}function Se(e){return{type:`link`,value:e.readJson()}}function Ce(e,t){e.writeJson(t.value)}function we(e,t){let n=JSON.stringify(e.value),r=JSON.stringify(t.value);return nr)}function Te(e){return{type:`number`,value:e.readFloat64()}}function Ee(e,t){e.writeFloat64(t.value)}function De(e,t){return e.valuet.value)}function Oe(e){let t=e.readUint16(),n={};for(let r=0;ri.length)return 1;for(let a=0;as)return 1;let c=e.value[o]??null,l=t.value[s]??null,u=O.compare(c,l,n);if(u!==0)return u}return 0}function je(e){return{type:`responsiveimage`,value:e.readJson()}}function Me(e,t){e.writeJson(t.value)}function Ne(e,t){let n=JSON.stringify(e.value),r=JSON.stringify(t.value);return nr)}function Pe(e){let t=e.readInt8();if(t===0)return{type:`richtext`,value:e.readUint32()};if(t===1)return{type:`richtext`,value:e.readString()};throw Error(`Invalid rich text pointer`)}function Fe(e,t){if(x(t.value))e.writeInt8(0),e.writeUint32(t.value);else if(b(t.value))e.writeInt8(1),e.writeString(t.value);else throw Error(`Invalid rich text pointer`)}function Ie(e,t){let n=e.value,r=t.value;if(x(n)&&x(r)||b(n)&&b(r))return nr);throw Error(`Invalid rich text pointer`)}function Le(e){return{type:`string`,value:e.readString()}}function Re(e,t){e.writeString(t.value)}function ze(e,t,n){let r=e.value,i=t.value;return n.type===0&&(r=e.value.toLowerCase(),i=t.value.toLowerCase()),ri)}function Be(e){return{type:`vectorsetitem`,value:e.readUint32()}}function Ve(e,t){e.writeUint32(t.value)}function He(e,t){let n=e.value,r=t.value;return nr)}async function Ue(e){let t=Math.floor(rt*(Math.random()+1)*2**(e-1));await new Promise(e=>{setTimeout(e,t)})}async function w(e,t){let n=We(t),r=[],i=0;for(let e of n)r.push(`${e.from}-${e.to-1}`),i+=e.to-e.from;let a=new URL(e),o=r.join(`,`);a.searchParams.set(`range`,o);let s=await H(a);if(s.status!==200)throw Error(`Request failed: ${s.status} ${s.statusText}`);let c=await s.arrayBuffer(),l=new Uint8Array(c);if(l.length!==i)throw Error(`Request failed: Unexpected response length`);let u=new at,d=0;for(let e of n){let t=e.to-e.from,n=d+t,r=l.subarray(d,n);u.write(e.from,r),d=n}return t.map(e=>u.read(e.from,e.to-e.from))}function T(e,t){let n=e.length+t.length,r=new Uint8Array(n);return r.set(e,0),r.set(t,e.length),r}function We(e){_(e.length>0,`Must have at least one range`);let t=[...e].sort((e,t)=>e.from-t.from),n=[];for(let e of t){let t=n.length-1,r=n[t];r&&e.from<=r.to?n[t]={from:r.from,to:Math.max(r.to,e.to)}:n.push(e)}return n}function E(e){let t={},n=e.readUint16();for(let r=0;r{u(),k=Object.create,A=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,qe=Object.getPrototypeOf,Je=Object.prototype.hasOwnProperty,Ye=(e,t)=>function(){try{return t||(0,e[j(e)[0]])((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},Xe=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of j(t))Je.call(e,i)||i===n||A(e,i,{get:()=>t[i],enumerable:!(r=Ke(t,i))||r.enumerable});return e},Ze=(e,t,n)=>(n=e==null?{}:k(qe(e)),Xe(!t&&e&&e.__esModule?n:A(n,`default`,{value:e,enumerable:!0}),e)),Qe=Ze(Ye({"../../../node_modules/dataloader/index.js"(e,t){var n,r=/* @__PURE__ */ function(){function e(e,t){if(typeof e!=`function`)throw TypeError(`DataLoader must be constructed with a function which accepts Array and returns Promise>, but got: `+e+`.`);this._batchLoadFn=e,this._maxBatchSize=function(e){if(e&&!1===e.batch)return 1;var t=e&&e.maxBatchSize;if(t===void 0)return 1/0;if(typeof t!=`number`||t<1)throw TypeError(`maxBatchSize must be a positive number: `+t);return t}(t),this._batchScheduleFn=function(e){var t=e&&e.batchScheduleFn;if(t===void 0)return i;if(typeof t!=`function`)throw TypeError(`batchScheduleFn must be a function: `+t);return t}(t),this._cacheKeyFn=function(e){var t=e&&e.cacheKeyFn;if(t===void 0)return function(e){return e};if(typeof t!=`function`)throw TypeError(`cacheKeyFn must be a function: `+t);return t}(t),this._cacheMap=function(e){if(e&&!1===e.cache)return null;var t=e&&e.cacheMap;if(t===void 0)return/* @__PURE__ */ new Map;if(t!==null){var n=[`get`,`set`,`delete`,`clear`].filter(function(e){return t&&typeof t[e]!=`function`});if(n.length!==0)throw TypeError(`Custom cacheMap missing methods: `+n.join(`, `))}return t}(t),this._batch=null,this.name=t&&t.name?t.name:null}var t=e.prototype;return t.load=function(e){if(e==null)throw TypeError(`The loader.load() function must be called with a value, but got: `+String(e)+`.`);var t=function(e){var t=e._batch;if(t!==null&&!t.hasDispatched&&t.keys.length and returns Promise>, but the function errored synchronously: `+String(n)+`.`))}if(!n||typeof n.then!=`function`)return a(e,t,TypeError(`DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise: `+String(n)+`.`));n.then(function(e){if(!s(e))throw TypeError(`DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise of an Array: `+String(e)+`.`);if(e.length!==t.keys.length)throw TypeError(`DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise of an Array of the same length as the Array of keys. Keys: `+String(t.keys)+` Values: `+String(e));o(t);for(var n=0;n but got: `+e+`.`);for(var t=[],n=0;n0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}t.exports=r}})(),1),M={background:0,"user-visible":1,"user-blocking":2},N={Uint8:1,Uint16:2,Uint32:4,BigUint64:8,Int8:1,Int16:2,Int32:4,BigInt64:8,Float32:4,Float64:8},P=(D=class e{getOffset(){return this.offset}ensureLength(e){let t=this.bytes.length;if(!(this.offset+e<=t))throw Error(`Reading out of bounds`)}readUint8(){let e=N.Uint8;this.ensureLength(e);let t=this.view.getUint8(this.offset);return this.offset+=e,t}readUint16(){let e=N.Uint16;this.ensureLength(e);let t=this.view.getUint16(this.offset);return this.offset+=e,t}readUint32(){let e=N.Uint32;this.ensureLength(e);let t=this.view.getUint32(this.offset);return this.offset+=e,t}readUint64(){let e=this.readBigUint64();return Number(e)}readBigUint64(){let e=N.BigUint64;this.ensureLength(e);let t=this.view.getBigUint64(this.offset);return this.offset+=e,t}readInt8(){let e=N.Int8;this.ensureLength(e);let t=this.view.getInt8(this.offset);return this.offset+=e,t}readInt16(){let e=N.Int16;this.ensureLength(e);let t=this.view.getInt16(this.offset);return this.offset+=e,t}readInt32(){let e=N.Int32;this.ensureLength(e);let t=this.view.getInt32(this.offset);return this.offset+=e,t}readInt64(){let e=this.readBigInt64();return Number(e)}readBigInt64(){let e=N.BigInt64;this.ensureLength(e);let t=this.view.getBigInt64(this.offset);return this.offset+=e,t}readFloat32(){let e=N.Float32;this.ensureLength(e);let t=this.view.getFloat32(this.offset);return this.offset+=e,t}readFloat64(){let e=N.Float64;this.ensureLength(e);let t=this.view.getFloat64(this.offset);return this.offset+=e,t}readBytes(e){let t=this.offset,n=t+e,r=this.bytes.subarray(t,n);return this.offset=n,r}readString(){let t=this.readUint32(),n=this.readBytes(t);return e.textDecoder.decode(n)}readJson(){let e=this.readString();return JSON.parse(e)}constructor(e){p(this,`bytes`,void 0),p(this,`offset`,0),p(this,`view`,void 0),this.bytes=e,this.view=g(this.bytes)}},p(D,`textDecoder`,new TextDecoder),D),$e=1024,et=1.5,F=e=>2**e-1,I=e=>-(2**(e-1)),L=e=>2**(e-1)-1,R={Uint8:0,Uint16:0,Uint32:0,Uint64:0,BigUint64:0,Int8:I(8),Int16:I(16),Int32:I(32),Int64:-(2**53-1),BigInt64:-(BigInt(2)**BigInt(63))},z={Uint8:F(8),Uint16:F(16),Uint32:F(32),Uint64:2**53-1,BigUint64:BigInt(2)**BigInt(64)-BigInt(1),Int8:L(8),Int16:L(16),Int32:L(32),Int64:2**53-1,BigInt64:BigInt(2)**BigInt(63)-BigInt(1)},tt=class{getOffset(){return this.offset}slice(e=0,t=this.offset){return this.bytes.slice(e,t)}subarray(e=0,t=this.offset){return this.bytes.subarray(e,t)}ensureLength(e){let t=this.bytes.length;if(this.offset+e<=t)return;let n=new Uint8Array(Math.ceil(t*et)+e);n.set(this.bytes),this.bytes=n,this.view=g(n)}writeUint8(e){y(e,R.Uint8,z.Uint8,`Uint8`);let t=N.Uint8;this.ensureLength(t),this.view.setUint8(this.offset,e),this.offset+=t}writeUint16(e){y(e,R.Uint16,z.Uint16,`Uint16`);let t=N.Uint16;this.ensureLength(t),this.view.setUint16(this.offset,e),this.offset+=t}writeUint32(e){y(e,R.Uint32,z.Uint32,`Uint32`);let t=N.Uint32;this.ensureLength(t),this.view.setUint32(this.offset,e),this.offset+=t}writeUint64(e){y(e,R.Uint64,z.Uint64,`Uint64`);let t=BigInt(e);this.writeBigUint64(t)}writeBigUint64(e){y(e,R.BigUint64,z.BigUint64,`BigUint64`);let t=N.BigUint64;this.ensureLength(t),this.view.setBigUint64(this.offset,e),this.offset+=t}writeInt8(e){y(e,R.Int8,z.Int8,`Int8`);let t=N.Int8;this.ensureLength(t),this.view.setInt8(this.offset,e),this.offset+=t}writeInt16(e){y(e,R.Int16,z.Int16,`Int16`);let t=N.Int16;this.ensureLength(t),this.view.setInt16(this.offset,e),this.offset+=t}writeInt32(e){y(e,R.Int32,z.Int32,`Int32`);let t=N.Int32;this.ensureLength(t),this.view.setInt32(this.offset,e),this.offset+=t}writeInt64(e){y(e,R.Int64,z.Int64,`Int64`);let t=BigInt(e);this.writeBigInt64(t)}writeBigInt64(e){y(e,R.BigInt64,z.BigInt64,`BigInt64`);let t=N.BigInt64;this.ensureLength(t),this.view.setBigInt64(this.offset,e),this.offset+=t}writeFloat32(e){let t=N.Float32;this.ensureLength(t),this.view.setFloat32(this.offset,e),this.offset+=t}writeFloat64(e){let t=N.Float64;this.ensureLength(t),this.view.setFloat64(this.offset,e),this.offset+=t}writeBytes(e){let t=e.length;this.ensureLength(t),this.bytes.set(e,this.offset),this.offset+=t}encodeString(e){let t=this.encodedStrings.get(e);if(t)return t;let n=this.encoder.encode(e);return this.encodedStrings.set(e,n),n}writeString(e){let t=this.encodeString(e),n=t.length;this.writeUint32(n),this.writeBytes(t)}writeJson(e){let t=JSON.stringify(e);this.writeString(t)}constructor(){p(this,`offset`,0),p(this,`bytes`,new Uint8Array($e)),p(this,`view`,g(this.bytes)),p(this,`encoder`,new TextEncoder),p(this,`encodedStrings`,/* @__PURE__ */ new Map)}},B=class e{static fromString(t){let[n,r,i]=t.split(`/`).map(Number);return _(x(n),`Invalid chunkId`),_(x(r),`Invalid offset`),_(x(i),`Invalid length`),new e(n,r,i)}toString(){return`${this.chunkId}/${this.offset}/${this.length}`}static read(t){let n=t.readUint16(),r=t.readUint32(),i=t.readUint32();return new e(n,r,i)}write(e){e.writeUint16(this.chunkId),e.writeUint32(this.offset),e.writeUint32(this.length)}compare(e){return this.chunkIde.chunkId?1:this.offsete.offset?1:(_(this.length===e.length),0)}constructor(e,t,n){p(this,`chunkId`,void 0),p(this,`offset`,void 0),p(this,`length`,void 0),this.chunkId=e,this.offset=t,this.length=n}},(e=>{e.read=function(e){let t=e.readUint8();switch(t){case 0:return null;case 1:return ie(e);case 2:return se(e);case 3:return ue(e);case 4:return pe(e);case 5:return ge(e);case 6:return ye(e);case 7:return Se(e);case 8:return Te(e);case 9:return Oe(e);case 10:return je(e);case 11:return Pe(e);case 12:return Le(e);case 13:return Be(e);default:v(t)}},e.write=function(e,t){let n=C(t);if(e.writeUint8(n),!S(t))switch(t.type){case`array`:return ae(e,t);case`boolean`:return ce(e,t);case`color`:return de(e,t);case`date`:return me(e,t);case`enum`:return _e(e,t);case`file`:return be(e,t);case`link`:return Ce(e,t);case`number`:return Ee(e,t);case`object`:return ke(e,t);case`responsiveimage`:return Me(e,t);case`richtext`:return Fe(e,t);case`vectorsetitem`:return Ve(e,t);case`string`:return Re(e,t);default:v(t)}},e.compare=function(e,t,n){let r=C(e),i=C(t);if(ri)return 1;if(S(e)||S(t))return 0;switch(e.type){case`array`:return _(t.type===`array`),oe(e,t,n);case`boolean`:return _(t.type===`boolean`),le(e,t);case`color`:return _(t.type===`color`),fe(e,t);case`date`:return _(t.type===`date`),he(e,t);case`enum`:return _(t.type===`enum`),ve(e,t);case`file`:return _(t.type===`file`),xe(e,t);case`link`:return _(t.type===`link`),we(e,t);case`number`:return _(t.type===`number`),De(e,t);case`object`:return _(t.type===`object`),Ae(e,t,n);case`responsiveimage`:return _(t.type===`responsiveimage`),Ne(e,t);case`richtext`:return _(t.type===`richtext`),Ie(e,t);case`vectorsetitem`:return _(t.type===`vectorsetitem`),He(e,t);case`string`:return _(t.type===`string`),ze(e,t,n);default:v(e)}}})(O||={}),nt=class e{sortEntries(){this.entries.sort((e,t)=>{for(let n=0;n{let e=[];for(let t=0;te.getField(t)??null);this.entries.push({values:n,pointer:t})}constructor(e,t){p(this,`fieldNames`,void 0),p(this,`options`,void 0),p(this,`entries`,[]),this.fieldNames=e,this.options=t}},V=3,rt=250,it=[408,429,500,502,503,504],H=async(e,t)=>{let n=0;for(;;){try{let r=await fetch(e,t);if(!it.includes(r.status)||++n>V)return r}catch(e){if(t?.signal?.aborted||++n>V)throw e}await Ue(n)}},at=class{read(e,t){for(let n of this.chunks){if(en.end)continue;if(e+t>n.end)break;let r=e-n.start,i=r+t;return n.data.slice(r,i)}throw Error(`Missing data`)}write(e,t){let n=e,r=n+t.length,i=0,a=this.chunks.length;for(;ie.end)){if(n>e.start){let r=n-e.start;t=T(e.data.subarray(0,r),t),n=e.start}break}}for(;a>i;a--){let e=this.chunks[a-1];if(_(e,`Missing chunk`),!(r{let e=h(this.modelPrioritySources);return e?l({batch:!0,priority:e}):void 0})}async getModel(e){return this.model||(e&&this.modelPrioritySources.add(e),this.modelPromise??=this.loadModel().finally(()=>{this.modelPrioritySources.clear()}),this.model??=await this.modelPromise),this.model}async lookupItems(e,t){_(e.length===this.fields.length,`Invalid query length`);let n=[(await this.getModel(t)).entries];for(let[r,i]of e.entries()){let e=[];for(let a of n){let n,o=t?l({batch:!0,priority:m(t)}):void 0;switch(o&&await o,i.type){case`All`:n=[a];break;case`Equals`:n=this.queryEquals(a,i,r);break;case`NotEquals`:n=this.queryNotEquals(a,i,r);break;case`LessThan`:n=this.queryLessThan(a,i,r);break;case`GreaterThan`:n=this.queryGreaterThan(a,i,r);break;case`Contains`:n=await this.queryContains(a,i,r,t);break;case`StartsWith`:n=await this.queryStartsWith(a,i,r,t);break;case`EndsWith`:n=await this.queryEndsWith(a,i,r,t);break;default:v(i)}e.push(...n)}n=e}let r=[];for(let e of n)for(let n of e){let e=t?l({batch:!0,priority:m(t)}):void 0;e&&await e;let i={};for(let e=0;e0?[a]:[]}queryNotEquals(e,t,n){let r=this.getLeftMost(e,n,t.value),i=this.getRightMost(e,n,t.value),a=[],o=e.slice(0,r);o.length>0&&a.push(o);let s=e.slice(i+1);return s.length>0&&a.push(s),a}queryLessThan(e,t,n){let r=this.getRightMost(e,n,null);if(e=e.slice(r+1),t.inclusive){let r=this.getRightMost(e,n,t.value),i=e.slice(0,r+1);return i.length>0?[i]:[]}let i=this.getLeftMost(e,n,t.value),a=e.slice(0,i);return a.length>0?[a]:[]}queryGreaterThan(e,t,n){let r=this.getRightMost(e,n,null);if(e=e.slice(r+1),t.inclusive){let r=this.getLeftMost(e,n,t.value),i=e.slice(r);return i.length>0?[i]:[]}let i=this.getRightMost(e,n,t.value),a=e.slice(i+1);return a.length>0?[a]:[]}queryContains(e,t,n,r){return this.findItems(e,n,r,e=>{if(e?.type!==f.String||t.value?.type!==f.String)return!1;let n=e.value,r=t.value.value;return this.collation.type===0&&(n=n.toLowerCase(),r=r.toLowerCase()),n.includes(r)})}queryStartsWith(e,t,n,r){return this.findItems(e,n,r,e=>{if(e?.type!==f.String||t.value?.type!==f.String)return!1;let n=e.value,r=t.value.value;return this.collation.type===0&&(n=n.toLowerCase(),r=r.toLowerCase()),n.startsWith(r)})}queryEndsWith(e,t,n,r){return this.findItems(e,n,r,e=>{if(e?.type!==f.String||t.value?.type!==f.String)return!1;let n=e.value,r=t.value.value;return this.collation.type===0&&(n=n.toLowerCase(),r=r.toLowerCase()),n.endsWith(r)})}getLeftMost(e,t,n){let r=0,i=e.length;for(;r>1,o=e[a].values[t];0>O.compare(o,n,this.collation)?r=a+1:i=a}return r}getRightMost(e,t,n){let r=0,i=e.length;for(;r>1,o=e[a].values[t];O.compare(o,n,this.collation)>0?i=a:r=a+1}return i-1}async findItems(e,t,n,r){let i=[],a=0;for(let o=0;o{if(!e.ok)throw Error(`Request failed: ${e.status} ${e.statusText}`);let t=await e.arrayBuffer(),n=new P(new Uint8Array(t)),r=[],i=n.readUint32();for(let e=0;e{this.isScanning=!1,this.scanPrioritySources.clear()})),this.itemsPromise}resolveItem(e,t){let n=this.itemPrioritySources.get(e);n||(n=/* @__PURE__ */ new Set,this.itemPrioritySources.set(e,n)),t&&n.add(t);let r=this.itemLoader.load({pointer:e,prioritySources:n}),i=()=>this.itemPrioritySources.delete(e);return r.then(i,i),r}constructor(e,t){p(this,`id`,void 0),p(this,`url`,void 0),p(this,`itemsPromise`,void 0),p(this,`isScanning`,!1),p(this,`scanPrioritySources`,/* @__PURE__ */ new Set),p(this,`itemPrioritySources`,/* @__PURE__ */ new Map),p(this,`itemLoader`,new Qe.default(async e=>{let t=e.map(({pointer:e})=>{let t=B.fromString(e);return{from:t.offset,to:t.offset+t.length}}),n=await w(this.url,t),r=[];for(let t=0;te.pointer})),this.id=e,this.url=t}},st=class{async scanItems(e){return(await Promise.all(this.chunks.map(async t=>t.scanItems(e)))).flat()}resolveItems(e,t){return Promise.all(e.map(e=>{let n=B.fromString(e),r=this.chunks[n.chunkId];return _(r,`Missing chunk`),r.resolveItem(e,t)}))}compareItems(e,t){let n=B.fromString(e.pointer),r=B.fromString(t.pointer);return n.compare(r)}compareValues(e,t,n){return O.compare(e,t,n)}constructor(e){p(this,`options`,void 0),p(this,`id`,void 0),p(this,`schema`,void 0),p(this,`indexes`,void 0),p(this,`resolveRichText`,void 0),p(this,`resolveVectorSetItem`,void 0),p(this,`chunks`,void 0),this.options=e,this.chunks=this.options.chunks.map((e,t)=>new ot(t,e)),this.schema=e.schema,this.indexes=e.indexes,this.resolveRichText=e.resolveRichText,this.resolveVectorSetItem=e.resolveVectorSetItem,this.id=e.id}}})))()}function lt(e){return typeof e==`object`&&!!e&&!/*#__PURE__*/ i(e)&&mt in e}function ut(e,...t){if(!e)throw Error(`Assertion Error`+(t.length>0?`: `+t.join(` `):``))}function dt(e,t,n){for(let[r,i]of Object.entries(t)){let t=e[r];typeof i==`number`?e[r]=n(i,t):ft(t,i,n)}}function ft(e,t,n){if(typeof t!=`number`){if(Array.isArray(t)){if(!Array.isArray(e))return;let[r]=t;for(let t=0;t{let o=t.get(i);if(o)return o;let c=function t(i){switch(i[0]){case 1:{let[,...e]=i,a=e.map(t);return/*#__PURE__*/ r(n,void 0,...a)}case 2:{let[,e,...n]=i,a=n.map(t);return/*#__PURE__*/ r(d,e,...a)}case 3:{let[,n,r,o]=i;dt(r,o,(n,r)=>{if(n===1)return r&&t(r);if(typeof r!=`string`)return r;let i=e[r];return i?(lt(i)&&i.preload(),i):r});let s=e[n];return ut(s,`Module not found`),lt(s)&&s.preload(),/*#__PURE__*/ a(ee,{componentIdentifier:n,children:e=>/*#__PURE__*/ a(te,{component:s,props:{...e,...r}})})}case 4:{let[,e,n,...a]=i,o=a.map(t);return r(e===`a`?s.a:e,n,...o)}case 5:{let[,e]=i;return e}}}(JSON.parse(i));return t.set(i,c),c}}var W,G,mt,ht,gt;function _t(){return(_t=e((()=>{o(),u(),t(),mt=`preload`,ht=((W=ht||{})[W.Fragment=1]=`Fragment`,W[W.Link=2]=`Link`,W[W.Module=3]=`Module`,W[W.Tag=4]=`Tag`,W[W.Text=5]=`Text`,W),gt=((G=gt||{})[G.RichText=1]=`RichText`,G[G.VectorSetItem=2]=`VectorSetItem`,G)})))()}var K,q,vt,J,yt,bt,xt,St,Y,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,X,Z,Q,Pt,Ft;function $(){return($=e((()=>{u(),ct(),_t(),K={BGOfjanJv:{isNullable:!0,type:f.String},CA5mG2Ela:{isNullable:!0,type:f.String},createdAt:{isNullable:!0,type:f.Date},grooWG6hw:{isNullable:!0,type:f.String},hgBjxMXno:{isNullable:!0,type:f.RichText},id:{isNullable:!1,type:f.String},M_v_rGE6Y:{isNullable:!0,type:f.Number},N0v9EECZR:{isNullable:!0,type:f.ResponsiveImage},nextItemId:{isNullable:!0,type:f.String},PIL2zXtff:{isNullable:!0,type:f.String},previousItemId:{isNullable:!0,type:f.String},SJUDlpkDU:{isNullable:!0,type:f.String},updatedAt:{isNullable:!0,type:f.Date}},q=new URL(`./E38Kktypj-indexes-default-0.framercms`,`https://framerusercontent.com/modules/WTcPSAvWsWLbMEU3HxHe/9iGLMj7YEMuDF0Ed0QUF/E38Kktypj.js`).href.replace(`/modules/`,`/cms/`),vt=[`id`],J={type:1},yt=[`previousItemId`],bt=[`nextItemId`],xt=[`id`,`SJUDlpkDU`],St=[`SJUDlpkDU`,`id`],Y={type:0},Ct=[`CA5mG2Ela`],wt=[`BGOfjanJv`],Tt=[`N0v9EECZR`],Et=[`grooWG6hw`],Dt=[`PIL2zXtff`],Ot=[`hgBjxMXno`],kt=[`M_v_rGE6Y`],At=[`SJUDlpkDU`],jt=[],Mt=e=>{let t=jt[e];if(t)return t().then(e=>e.default)},Nt=pt({}),X=new ne,Z={collectionByLocaleId:{default:new st({chunks:[new URL(`./E38Kktypj-chunk-default-0.framercms`,`https://framerusercontent.com/modules/WTcPSAvWsWLbMEU3HxHe/9iGLMj7YEMuDF0Ed0QUF/E38Kktypj.js`).href.replace(`/modules/`,`/cms/`)],id:`4f8a5e78-4719-4187-8f6d-e6cd4ac22b6fdefault`,indexes:[new U({collation:J,collectionSchema:K,fieldNames:vt,range:{from:0,to:97},url:q}),new U({collation:J,collectionSchema:K,fieldNames:yt,range:{from:97,to:193},url:q}),new U({collation:J,collectionSchema:K,fieldNames:bt,range:{from:193,to:285},url:q}),new U({collation:J,collectionSchema:K,fieldNames:xt,range:{from:285,to:489},url:q}),new U({collation:Y,collectionSchema:K,fieldNames:St,range:{from:489,to:693},url:q}),new U({collation:Y,collectionSchema:K,fieldNames:Ct,range:{from:693,to:884},url:q}),new U({collation:Y,collectionSchema:K,fieldNames:wt,range:{from:884,to:1187},url:q}),new U({collation:Y,collectionSchema:K,fieldNames:Tt,range:{from:1187,to:3087},url:q}),new U({collation:Y,collectionSchema:K,fieldNames:Et,range:{from:3087,to:3208},url:q}),new U({collation:Y,collectionSchema:K,fieldNames:Dt,range:{from:3208,to:3405},url:q}),new U({collation:Y,collectionSchema:K,fieldNames:Ot,range:{from:3405,to:7175},url:q}),new U({collation:Y,collectionSchema:K,fieldNames:kt,range:{from:7175,to:7264},url:q}),new U({collation:Y,collectionSchema:K,fieldNames:At,range:{from:7264,to:7420},url:q})],resolveRichText:Nt,resolveVectorSetItem:Mt,schema:K})},displayName:`Growing advice`,id:`4f8a5e78-4719-4187-8f6d-e6cd4ac22b6f`},c(Z,{CA5mG2Ela:{defaultValue:``,title:`Title`,type:f.String},BGOfjanJv:{defaultValue:``,title:`Introduction`,type:f.String},N0v9EECZR:{title:`Article image`,type:f.ResponsiveImage},grooWG6hw:{defaultValue:``,title:`Topic`,type:f.String},PIL2zXtff:{defaultValue:`Draft article ยท awaiting nursery review`,title:`Review status`,type:f.String},hgBjxMXno:{defaultValue:``,title:`Article`,type:f.RichText},M_v_rGE6Y:{defaultValue:0,title:`Display order`,type:f.Number},SJUDlpkDU:{preventLocalization:!1,title:`Slug`,type:f.String},createdAt:{title:`Created`,type:f.Date},updatedAt:{title:`Updated`,type:f.Date},previousItemId:{dataIdentifier:`local-module:collection/E38Kktypj:default`,title:`Previous`,type:f.CollectionReference},nextItemId:{dataIdentifier:`local-module:collection/E38Kktypj:default`,title:`Next`,type:f.CollectionReference}}),Q={},Pt={async getSlugByRecordId(e,t){let[n]=await X.query({from:{data:Z,type:`Collection`},limit:{type:`LiteralValue`,value:1},select:[{name:`SJUDlpkDU`,type:`Identifier`}],where:{left:{name:`id`,type:`Identifier`},operator:`==`,right:{type:`LiteralValue`,value:e},type:`BinaryOperation`}},t);return n?.SJUDlpkDU},async getRecordIdBySlug(e,t){let[n]=await X.query({from:{data:Z,type:`Collection`},limit:{type:`LiteralValue`,value:1},select:[{name:`id`,type:`Identifier`}],where:{left:{name:`SJUDlpkDU`,type:`Identifier`},operator:`==`,right:{type:`LiteralValue`,value:e},type:`BinaryOperation`}},t);return n?.id}},Ft={exports:{default:{type:`data`,name:`data`,annotations:{framerCollectionId:`E38Kktypj`,framerEnumToDisplayNameUtils:`2`,framerColorSyntax:`false`,framerContractVersion:`1`,framerAutoSizeImages:`true`,framerSlug:`SJUDlpkDU`,framerRecordIdKey:`id`,framerCollectionUtils:`1`,framerData:`true`}},utils:{type:`variable`,annotations:{framerContractVersion:`1`}},enumToDisplayNameFunctions:{type:`variable`,annotations:{framerContractVersion:`1`}},__FramerMetadata__:{type:`variable`}}}})))()}export{Z as a,Pt as i,Q as n,$ as r,Ft as t}; //# sourceMappingURL=E38Kktypj.DhPdbsoh.mjs.map