import{t as e}from"./rolldown-runtime.CrzmA4BD.mjs";import{B as t,H as n}from"./react.BuYg6O4f.mjs";import{O as r,b as i,i as a,q as o,y as s}from"./framer.DmwLz-ss.mjs";function c(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function l(e,...t){if(!e)throw Error(`Assertion Error`+(t.length>0?`: `+t.join(` `):``))}function u(e){throw Error(`Unexpected value: ${e}`)}function d(e){return Number.isFinite(e)}function f(e){return e===null}function p(e){if(f(e))return 0;switch(e.type){case a.Array:return 1;case a.Boolean:return 2;case a.Color:return 3;case a.Date:return 4;case a.Enum:return 5;case a.File:return 6;case a.ResponsiveImage:return 10;case a.Link:return 7;case a.Number:return 8;case a.Object:return 9;case a.RichText:return 11;case a.String:return 12;default:u(e)}}function m(e){let t=e.readUint16(),n=[];for(let r=0;ri)return 1;for(let i=0;it.value?1:0}function h(e){return{type:a.Color,value:e.readString()}}function ae(e,t){e.writeString(t.value)}function oe(e,t){return e.valuet.value?1:0}function se(e){let t=e.readInt64(),n=new Date(t);return{type:a.Date,value:n.toISOString()}}function ce(e,t){let n=new Date(t.value).getTime();e.writeInt64(n)}function le(e,t){let n=new Date(e.value),r=new Date(t.value);return nr?1:0}function ue(e){return{type:a.Enum,value:e.readString()}}function de(e,t){e.writeString(t.value)}function fe(e,t){return e.valuet.value?1:0}function pe(e){return{type:a.File,value:e.readString()}}function me(e,t){e.writeString(t.value)}function g(e,t){return e.valuet.value?1:0}function he(e){return{type:a.Link,value:e.readJson()}}function ge(e,t){e.writeJson(t.value)}function _e(e,t){let n=JSON.stringify(e.value),r=JSON.stringify(t.value);return nr?1:0}function ve(e){return{type:a.Number,value:e.readFloat64()}}function ye(e,t){e.writeFloat64(t.value)}function be(e,t){return e.valuet.value?1:0}function xe(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=y.compare(c,l,n);if(u!==0)return u}return 0}function we(e){return{type:a.ResponsiveImage,value:e.readJson()}}function Te(e,t){e.writeJson(t.value)}function Ee(e,t){let n=JSON.stringify(e.value),r=JSON.stringify(t.value);return nr?1:0}function De(e){return{type:a.RichText,value:e.readUint32()}}function Oe(e,t){e.writeUint32(t.value)}function ke(e,t){let n=e.value,r=t.value;return nr?1:0}function Ae(e){return{type:a.String,value:e.readString()}}function je(e,t){e.writeString(t.value)}function Me(e,t,n){let r=e.value,i=t.value;return n.type===0&&(r=e.value.toLowerCase(),i=t.value.toLowerCase()),ri?1:0}async function Ne(e){let t=Math.floor(L*(Math.random()+1)*2**(e-1));await new Promise(e=>{setTimeout(e,t)})}async function Pe(e,t){let n=v(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 z(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 B,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 _(e,t){let n=e.length+t.length,r=new Uint8Array(n);return r.set(e,0),r.set(t,e.length),r}function v(e){l(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}var y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,Fe=e((()=>{t(),o(),b=Object.create,x=Object.defineProperty,S=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,E=(e,t)=>function(){return t||(0,e[C(e)[0]])((t={exports:{}}).exports,t),t.exports},D=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of C(t))T.call(e,i)||i===n||x(e,i,{get:()=>t[i],enumerable:!(r=S(t,i))||r.enumerable});return e},O=(e,t,n)=>(n=e==null?{}:b(w(e)),D(!t&&e&&e.__esModule?n:x(n,`default`,{value:e,enumerable:!0}),e)),k=O(E({"../../../node_modules/dataloader/index.js"(e,t){var n,r=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 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}})()),A={Uint8:1,Uint16:2,Uint32:4,BigUint64:8,Int8:1,Int16:2,Int32:4,BigInt64:8,Float32:4,Float64:8},j=class{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=A.Uint8;this.ensureLength(e);let t=this.view.getUint8(this.offset);return this.offset+=e,t}readUint16(){let e=A.Uint16;this.ensureLength(e);let t=this.view.getUint16(this.offset);return this.offset+=e,t}readUint32(){let e=A.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=A.BigUint64;this.ensureLength(e);let t=this.view.getBigUint64(this.offset);return this.offset+=e,t}readInt8(){let e=A.Int8;this.ensureLength(e);let t=this.view.getInt8(this.offset);return this.offset+=e,t}readInt16(){let e=A.Int16;this.ensureLength(e);let t=this.view.getInt16(this.offset);return this.offset+=e,t}readInt32(){let e=A.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=A.BigInt64;this.ensureLength(e);let t=this.view.getBigInt64(this.offset);return this.offset+=e,t}readFloat32(){let e=A.Float32;this.ensureLength(e);let t=this.view.getFloat32(this.offset);return this.offset+=e,t}readFloat64(){let e=A.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 e=this.readUint32(),t=this.readBytes(e);return this.decoder.decode(t)}readJson(){let e=this.readString();return JSON.parse(e)}constructor(e){this.bytes=e,this.offset=0,this.view=c(this.bytes),this.decoder=new TextDecoder}},n!==void 0&&n.requestIdleCallback,M=e=>2**e-1,N=e=>-(2**(e-1)),P=e=>2**(e-1)-1,N(8),N(16),N(32),-(BigInt(2)**BigInt(63)),M(8),M(16),M(32),BigInt(2)**BigInt(64)-BigInt(1),P(8),P(16),P(32),BigInt(2)**BigInt(63)-BigInt(1),F=class e{static fromString(t){let[n,r,i]=t.split(`/`).map(Number);return l(d(n),`Invalid chunkId`),l(d(r),`Invalid offset`),l(d(i),`Invalid length`),new e(n,r,i)}toString(){return`${this.chunkId}/${this.offset}/${this.length}`}static read(t){return new e(t.readUint16(),t.readUint32(),t.readUint32())}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:(l(this.length===e.length),0)}constructor(e,t,n){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 m(e);case 2:return ne(e);case 3:return h(e);case 4:return se(e);case 5:return ue(e);case 6:return pe(e);case 7:return he(e);case 8:return ve(e);case 9:return xe(e);case 10:return we(e);case 11:return De(e);case 12:return Ae(e);default:u(t)}},e.write=function(e,t){let n=p(t);if(e.writeUint8(n),!f(t))switch(t.type){case a.Array:return ee(e,t);case a.Boolean:return re(e,t);case a.Color:return ae(e,t);case a.Date:return ce(e,t);case a.Enum:return de(e,t);case a.File:return me(e,t);case a.Link:return ge(e,t);case a.Number:return ye(e,t);case a.Object:return Se(e,t);case a.ResponsiveImage:return Te(e,t);case a.RichText:return Oe(e,t);case a.String:return je(e,t);default:u(t)}},e.compare=function(e,t,n){let r=p(e),i=p(t);if(ri)return 1;if(f(e)||f(t))return 0;switch(e.type){case a.Array:return l(t.type===a.Array),te(e,t,n);case a.Boolean:return l(t.type===a.Boolean),ie(e,t);case a.Color:return l(t.type===a.Color),oe(e,t);case a.Date:return l(t.type===a.Date),le(e,t);case a.Enum:return l(t.type===a.Enum),fe(e,t);case a.File:return l(t.type===a.File),g(e,t);case a.Link:return l(t.type===a.Link),_e(e,t);case a.Number:return l(t.type===a.Number),be(e,t);case a.Object:return l(t.type===a.Object),Ce(e,t,n);case a.ResponsiveImage:return l(t.type===a.ResponsiveImage),Ee(e,t);case a.RichText:return l(t.type===a.RichText),ke(e,t);case a.String:return l(t.type===a.String),Me(e,t,n);default:u(e)}}})(y||={}),I=3,L=250,R=[408,429,500,502,503,504],z=async(e,t)=>{let n=0;for(;;){try{let r=await fetch(e,t);if(!R.includes(r.status)||++n>I)return r}catch(e){if(t?.signal?.aborted||++n>I)throw e}await Ne(n)}},B=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=_(e.data.subarray(0,r),t),n=e.start}break}}for(;a>i;a--){let e=this.chunks[a-1];if(l(e,`Missing chunk`),!(r{if(!e.ok)throw Error(`Request failed: ${e.status} ${e.statusText}`);let t=await e.arrayBuffer(),n=new j(new Uint8Array(t)),r=[],i=n.readUint32();for(let e=0;e{let t=e.map(e=>{let t=F.fromString(e);return{from:t.offset,to:t.offset+t.length}});return(await Pe(this.url,t)).map((t,n)=>{let r=new j(t),i=V.read(r),a=e[n];return l(a,`Missing pointer`),{pointer:a,data:i.getData()}})})}},U=class{async scanItems(){return(await Promise.all(this.chunks.map(async e=>e.scanItems()))).flat()}async resolveItems(e){return Promise.all(e.map(e=>{let t=F.fromString(e),n=this.chunks[t.chunkId];return l(n,`Missing chunk`),n.resolveItem(e)}))}compareItems(e,t){let n=F.fromString(e.pointer),r=F.fromString(t.pointer);return n.compare(r)}compareValues(e,t,n){return y.compare(e,t,n)}constructor(e){this.options=e,this.schema=this.options.schema,this.indexes=this.options.indexes,this.resolveRichText=this.options.resolveRichText,this.chunks=this.options.chunks.map((e,t)=>new H(t,e))}}}));async function Ie(e){let t=K[e];if(t)return await t()}var W,G,K,Le=e((()=>{W=(e,t)=>async()=>(await e())[t],G=()=>import(`./TpFQitykE-2.CJoTlSET.mjs`),K=[W(G,`richText`)]})),q,J,Y,X,Z,Q,$,Re=e((()=>{o(),Fe(),Le(),q={id:{isNullable:!1,type:a.String},nextItemId:{isNullable:!0,type:a.String},O6Ay4HJTp:{isNullable:!0,type:a.String},previousItemId:{isNullable:!0,type:a.String},RI5P3jxBa:{isNullable:!0,type:a.RichText},Sad9N1XwF:{isNullable:!0,type:a.ResponsiveImage},vCkXcpmQ1:{isNullable:!0,type:a.String}},J=new s(new i),Y={collectionByLocaleId:{default:new U({chunks:[new URL(`./TpFQitykE-chunk-default-0.framercms`,`/js/TpFQitykE.js`).href.replace(`/modules/`,`/cms/`)],indexes:[],resolveRichText:Ie,schema:q})},displayName:`Blog`},X=Y,r(Y,{vCkXcpmQ1:{defaultValue:``,title:`Title`,type:a.String},O6Ay4HJTp:{title:`Slug`,type:a.String},Sad9N1XwF:{title:`Image`,type:a.ResponsiveImage},RI5P3jxBa:{defaultValue:``,title:`Content`,type:a.RichText},previousItemId:{dataIdentifier:`local-module:collection/TpFQitykE:default`,title:`Previous`,type:a.CollectionReference},nextItemId:{dataIdentifier:`local-module:collection/TpFQitykE:default`,title:`Next`,type:a.CollectionReference}}),Z={},Q={async getSlugByRecordId(e,t){let[n]=await J.get({from:{data:Y,type:`Collection`},limit:{type:`LiteralValue`,value:1},select:[{name:`O6Ay4HJTp`,type:`Identifier`}],where:{left:{name:`id`,type:`Identifier`},operator:`==`,right:{type:`LiteralValue`,value:e},type:`BinaryOperation`}},t).readAsync();return n?.O6Ay4HJTp},async getRecordIdBySlug(e,t){let[n]=await J.get({from:{data:Y,type:`Collection`},limit:{type:`LiteralValue`,value:1},select:[{name:`id`,type:`Identifier`}],where:{left:{name:`O6Ay4HJTp`,type:`Identifier`},operator:`==`,right:{type:`LiteralValue`,value:e},type:`BinaryOperation`}},t).readAsync();return n?.id}},$={exports:{default:{type:`data`,name:`data`,annotations:{framerCollectionId:`TpFQitykE`,framerColorSyntax:`false`,framerSlug:`O6Ay4HJTp`,framerContractVersion:`1`,framerCollectionUtils:`1`,framerData:``,framerRecordIdKey:`id`,framerEnumToDisplayNameUtils:`2`,framerAutoSizeImages:`true`}},utils:{type:`variable`,annotations:{framerContractVersion:`1`}},enumToDisplayNameFunctions:{type:`variable`,annotations:{framerContractVersion:`1`}},__FramerMetadata__:{type:`variable`}}}}));export{Q as a,Re as i,$ as n,Z as r,X as t}; //# sourceMappingURL=TpFQitykE.BaqTxdcy.mjs.map