@prismicio/editor-fields 0.4.39 → 0.4.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -28,9 +28,9 @@ Check the top-level render call using <`+X+">.")}return q}}function Vc($,q){{if(
28
28
  *
29
29
  * This source code is licensed under the MIT license found in the
30
30
  * LICENSE file in the root directory of this source tree.
31
- */var $F;function vTe(){if($F)return md;$F=1;var e=R,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(u,s,c){var l,f={},p=null,A=null;c!==void 0&&(p=""+c),s.key!==void 0&&(p=""+s.key),s.ref!==void 0&&(A=s.ref);for(l in s)r.call(s,l)&&!o.hasOwnProperty(l)&&(f[l]=s[l]);if(u&&u.defaultProps)for(l in s=u.defaultProps,s)f[l]===void 0&&(f[l]=s[l]);return{$$typeof:t,type:u,key:p,ref:A,props:f,_owner:i.current}}return md.Fragment=n,md.jsx=a,md.jsxs=a,md}process.env.NODE_ENV==="production"?Q1.exports=vTe():Q1.exports=gTe();var d=Q1.exports;const yTe="media-library-",EF=`${yTe}newMediaLibraryFeaturesBannerClosed`;function aq(e){const{maxWidth:t}=e,[n,r]=R.useState(()=>!(Fh.localStorage.isAvailable()&&Fh.localStorage.read(EF)));function i(){r(!1),Fh.localStorage.isAvailable()&&Fh.localStorage.write(EF,String(Date.now()))}return n?d.jsx(m.Box,{justifyContent:"center",padding:{inline:16,block:12},backgroundColor:"purple9",children:d.jsxs(m.Box,{maxWidth:t,width:"100%",alignItems:"center",gap:8,children:[d.jsx(m.Box,{borderRadius:"100%",alignItems:"center",justifyContent:"center",width:28,height:28,border:!0,borderColor:"purple8",flexShrink:0,children:d.jsx(m.Icon,{name:"autoFixHigh",color:"white",size:"small"})}),d.jsxs("div",{children:[d.jsx(m.Text,{color:"white",variant:"bold",children:"New features on the Media Library now available!"}),d.jsxs(m.Box,{gap:4,flexWrap:"wrap",children:[d.jsx(m.Text,{color:"white",children:"Media Tagging, Filtering, Improved Search & Bulk Deletion"}),d.jsx(m.Text,{color:"white",variant:"bold",href:"https://prismic.io/lp/new-media-library",target:"_blank",rel:"noopener noreferrer",underline:!0,children:"Find out More →"})]})]}),d.jsx(m.Button,{invisible:!0,color:"white",sx:{marginLeft:"auto",marginBottom:"auto",flexShrink:0},underline:!0,onClick:i,children:"Close"})]})}):null}const uq=R.createContext(void 0),bTe={selectedIds:new Set,excludedIds:new Set,isAllSelected:!1};function sq(e){const{children:t,initialTotalItemCount:n,isSelectAllEnabled:r=!1}=e,[i,o]=R.useState(bTe),a=R.useRef(),u=R.useRef(n||0),s=R.useMemo(()=>{const{selectedIds:C,excludedIds:y,isAllSelected:x}=i;return x?u.current-y.size:C.size},[i]),c=R.useCallback(C=>{const{isAllSelected:y,selectedIds:x,excludedIds:w}=i;return y?!w.has(C):x.has(C)},[i]),l=Xe.useStableCallback(()=>{const{isAllSelected:C,selectedIds:y,excludedIds:x}=i;return{selectedIds:[...y],excludedIds:[...x],isAllSelected:C,selectedCount:s}}),f=Xe.useStableCallback(()=>{r&&o({isAllSelected:!0,selectedIds:new Set,excludedIds:new Set})}),p=Xe.useStableCallback(()=>{o({isAllSelected:!1,selectedIds:new Set,excludedIds:new Set})});R.useEffect(()=>{const{isAllSelected:C,selectedIds:y,excludedIds:x}=i,w=u.current;if(!(w===0||!r)){if(C&&x.size===w){p();return}if(!C&&y.size===w){f();return}}},[i,r,f,p]);const A=Xe.useStableCallback(C=>{const{id:y,isSingleSelection:x,metaKey:w,shiftKey:M,ids:O}=C;return M&&O&&O.length>0&&a.current?v(y,O,a.current):x&&!w?h(y):c(y)?I([y]):S([y]),a.current=y,c(y)});function h(C){c(C)&&s===1?o(y=>({...y,selectedIds:new Set})):o({isAllSelected:!1,selectedIds:new Set([C]),excludedIds:new Set})}function v(C,y,x){const w=CTe(y,x,C),M=c(C);return M?I(w):S(w),M}const _=Xe.useStableCallback(()=>{s>0?p():f()});function S(C){const{isAllSelected:y}=i;if(y){o(x=>({...x,excludedIds:RF(x.excludedIds,C)}));return}o(x=>({...x,selectedIds:OF(x.selectedIds,C)}))}function I(C){const{isAllSelected:y}=i;if(y){o(x=>({...x,excludedIds:OF(x.excludedIds,C)}));return}o(x=>({...x,selectedIds:RF(x.selectedIds,C)}))}function T(C){u.current=C}const g=R.useMemo(()=>({selectedCount:s,state:i,totalItemCount:u.current,isSelected:c,isSelectAllEnabled:r,getSelectionState:l,toggleSelection:A,toggleSelectAll:_,clearSelection:p,setTotalItemCount:T}),[i,p,l,r,c,s,_,A]);return d.jsx(uq.Provider,{value:g,children:t})}function qu(e){const t=R.useContext(uq);if(t===void 0)throw new Error("useSelectionManagerContext must be used within a SelectionManagerProvider");const{totalItemCount:n,onChangeSelection:r}=e||{},{setTotalItemCount:i,totalItemCount:o,state:a,getSelectionState:u,...s}=t;n!==void 0&&n!==o&&i(n);const c=Xe.useStableCallback(r);return R.useEffect(()=>{c==null||c(u())},[u,c,a]),{...s,getSelectionState:u,isAllSelected:a.isAllSelected}}function CTe(e,t,n){const r=e.indexOf(t),i=e.indexOf(n);if(r===-1||i===-1)throw new Error("Both startValue and endValue must be in the array");return r<=i?e.slice(r,i+1):e.slice(i,r+1)}function RF(e,t){const n=new Set(e);return t.forEach(r=>n.delete(r)),n}function OF(e,t){return new Set([...e,...t])}function cq(){return d.jsx(m.Box,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:"grey3",children:d.jsxs(m.BlankSlate,{children:[d.jsx(m.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(m.BlankSlateTitle,{size:"big",children:'"Oops!"'}),d.jsx(m.BlankSlateDescription,{width:360,children:`"We can't find any items with that name"`})]})})}const Rl={warning:{uploadWhileUploading:{title:"Hang tight!",description:"Your current images are still being uploaded. Once they're all set, you'll be free to upload more."}}},j0=R.createContext(void 0);function xe(){const e=R.useContext(j0);if(!e)throw new Error("Missing EditorConfigContext.Provider");return e}class V1 extends Error{}function Bn(e){throw new V1(`Missing EditorConfig.${e}`)}function STe(){if(new URL(location.href).searchParams.has("debug"))return;const n=console.error.bind(console);console.error=(...r)=>{r[0]instanceof V1||_Te(r)||n(...r)},window.addEventListener("error",r=>{r.error instanceof V1&&r.preventDefault(),ITe(r.error)&&r.preventDefault()})}function _Te(e){const t="Warning: flushSync was called from inside a lifecycle method",n=typeof e[0]=="string"&&e[0].includes(t),r=typeof e[1]=="string"&&e[1].includes("RichTextField");return n&&r}function ITe(e){const t=/Invalid content for node document: <(bulletList|orderedList)\(listItem*/,n=e.message;return!!(typeof n=="string"&&n.match(t))}const TTe="https://prismic.io/docs/guides/manage-images#supported-media";var Ve;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(u=>typeof i[i[u]]!="number"),a={};for(const u of o)a[u]=i[u];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(Ve||(Ve={}));var z1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(z1||(z1={}));const ee=Ve.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Za=e=>{switch(typeof e){case"undefined":return ee.undefined;case"string":return ee.string;case"number":return isNaN(e)?ee.nan:ee.number;case"boolean":return ee.boolean;case"function":return ee.function;case"bigint":return ee.bigint;case"symbol":return ee.symbol;case"object":return Array.isArray(e)?ee.array:e===null?ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ee.promise:typeof Map<"u"&&e instanceof Map?ee.map:typeof Set<"u"&&e instanceof Set?ee.set:typeof Date<"u"&&e instanceof Date?ee.date:ee.object;default:return ee.unknown}},H=Ve.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),xTe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class _i extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let u=r,s=0;for(;s<a.path.length;){const c=a.path[s];s===a.path.length-1?(u[c]=u[c]||{_errors:[]},u[c]._errors.push(n(a))):u[c]=u[c]||{_errors:[]},u=u[c],s++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ve.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}_i.create=e=>new _i(e);const Xd=(e,t)=>{let n;switch(e.code){case H.invalid_type:e.received===ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ve.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ve.joinValues(e.keys,", ")}`;break;case H.invalid_union:n="Invalid input";break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ve.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${Ve.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n="Invalid function arguments";break;case H.invalid_return_type:n="Invalid function return type";break;case H.invalid_date:n="Invalid date";break;case H.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ve.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case H.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case H.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case H.custom:n="Invalid input";break;case H.invalid_intersection_types:n="Intersection results could not be merged";break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ve.assertNever(e)}return{message:n}};let lq=Xd;function wTe(e){lq=e}function wm(){return lq}const $m=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};let u="";const s=r.filter(c=>!!c).slice().reverse();for(const c of s)u=c(a,{data:t,defaultError:u}).message;return{...i,path:o,message:i.message||u}},$Te=[];function ne(e,t){const n=$m({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,wm(),Xd].filter(r=>!!r)});e.common.issues.push(n)}class Mn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Ie;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Mn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Ie;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Ie=Object.freeze({status:"aborted"}),fq=e=>({status:"dirty",value:e}),Vn=e=>({status:"valid",value:e}),H1=e=>e.status==="aborted",Y1=e=>e.status==="dirty",Em=e=>e.status==="valid",Rm=e=>typeof Promise<"u"&&e instanceof Promise;var de;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(de||(de={}));class so{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const FF=(e,t)=>{if(Em(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new _i(e.common.issues);return this._error=n,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,u)=>a.code!=="invalid_type"?{message:u.defaultError}:typeof u.data>"u"?{message:r??u.defaultError}:{message:n??u.defaultError},description:i}}class Fe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Za(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Za(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Mn,ctx:{common:t.parent.common,data:t.data,parsedType:Za(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Rm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Za(t)},o=this._parseSync({data:t,path:i.path,parent:i});return FF(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Za(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Rm(i)?i:Promise.resolve(i));return FF(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),u=()=>o.addIssue({code:H.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(s=>s?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ri({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Jo.create(this,this._def)}nullable(){return Fs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ii.create(this,this._def)}promise(){return Fl.create(this,this._def)}or(t){return rp.create([this,t],this._def)}and(t){return ip.create(this,t,this._def)}transform(t){return new Ri({...$e(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new cp({...$e(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new pq({typeName:ve.ZodBranded,type:this,...$e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new km({...$e(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return vh.create(this,t)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ETe=/^c[^\s-]{8,}$/i,RTe=/^[a-z][a-z0-9]*$/,OTe=/[0-9A-HJKMNP-TV-Z]{26}/,FTe=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,MTe=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,kTe=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),LTe=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,jTe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,UTe=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function BTe(e,t){return!!((t==="v4"||!t)&&LTe.test(e)||(t==="v6"||!t)&&jTe.test(e))}class Ci extends Fe{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(i=>t.test(i),{validation:n,code:H.invalid_string,...de.errToObj(r)}),this.nonempty=t=>this.min(1,de.errToObj(t)),this.trim=()=>new Ci({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new Ci({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new Ci({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ee.string){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.string,received:o.parsedType}),Ie}const r=new Mn;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,u=t.data.length<o.value;(a||u)&&(i=this._getOrReturnCtx(t,i),a?ne(i,{code:H.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&ne(i,{code:H.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")MTe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"email",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")kTe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"emoji",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")FTe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"uuid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")ETe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"cuid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")RTe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"cuid2",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")OTe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"ulid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ne(i,{validation:"url",code:H.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"regex",code:H.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?UTe(o).test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?BTe(t.data,o.version)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"ip",code:H.invalid_string,message:o.message}),r.dirty()):Ve.assertNever(o);return{status:r.value,value:t.data}}_addCheck(t){return new Ci({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...de.errToObj(t)})}url(t){return this._addCheck({kind:"url",...de.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...de.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...de.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...de.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...de.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...de.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...de.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...de.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...de.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...de.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...de.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...de.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...de.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...de.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...de.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ci.create=e=>{var t;return new Ci({checks:[],typeName:ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};function WTe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class lu extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ee.number){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.number,received:o.parsedType}),Ie}let r;const i=new Mn;for(const o of this._def.checks)o.kind==="int"?Ve.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:H.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?WTe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:H.not_finite,message:o.message}),i.dirty()):Ve.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,i){return new lu({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(i)}]})}_addCheck(t){return new lu({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:de.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:de.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:de.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:de.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ve.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}lu.create=e=>new lu({checks:[],typeName:ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class fu extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ee.bigint){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.bigint,received:o.parsedType}),Ie}let r;const i=new Mn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Ve.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,i){return new fu({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(i)}]})}_addCheck(t){return new fu({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}fu.create=e=>{var t;return new fu({checks:[],typeName:ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};class ep extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ee.boolean){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.boolean,received:r.parsedType}),Ie}return Vn(t.data)}}ep.create=e=>new ep({typeName:ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class Rs extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ee.date){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.date,received:o.parsedType}),Ie}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_date}),Ie}const r=new Mn;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ve.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Rs({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:de.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:de.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Rs.create=e=>new Rs({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ve.ZodDate,...$e(e)});class Om extends Fe{_parse(t){if(this._getType(t)!==ee.symbol){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.symbol,received:r.parsedType}),Ie}return Vn(t.data)}}Om.create=e=>new Om({typeName:ve.ZodSymbol,...$e(e)});class tp extends Fe{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.undefined,received:r.parsedType}),Ie}return Vn(t.data)}}tp.create=e=>new tp({typeName:ve.ZodUndefined,...$e(e)});class np extends Fe{_parse(t){if(this._getType(t)!==ee.null){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.null,received:r.parsedType}),Ie}return Vn(t.data)}}np.create=e=>new np({typeName:ve.ZodNull,...$e(e)});class Ol extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Vn(t.data)}}Ol.create=e=>new Ol({typeName:ve.ZodAny,...$e(e)});class ds extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Vn(t.data)}}ds.create=e=>new ds({typeName:ve.ZodUnknown,...$e(e)});class na extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return ne(n,{code:H.invalid_type,expected:ee.never,received:n.parsedType}),Ie}}na.create=e=>new na({typeName:ve.ZodNever,...$e(e)});class Fm extends Fe{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.void,received:r.parsedType}),Ie}return Vn(t.data)}}Fm.create=e=>new Fm({typeName:ve.ZodVoid,...$e(e)});class Ii extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ee.array)return ne(n,{code:H.invalid_type,expected:ee.array,received:n.parsedType}),Ie;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,u=n.data.length<i.exactLength.value;(a||u)&&(ne(n,{code:a?H.too_big:H.too_small,minimum:u?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ne(n,{code:H.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ne(n,{code:H.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,u)=>i.type._parseAsync(new so(n,a,n.path,u)))).then(a=>Mn.mergeArray(r,a));const o=[...n.data].map((a,u)=>i.type._parseSync(new so(n,a,n.path,u)));return Mn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Ii({...this._def,minLength:{value:t,message:de.toString(n)}})}max(t,n){return new Ii({...this._def,maxLength:{value:t,message:de.toString(n)}})}length(t,n){return new Ii({...this._def,exactLength:{value:t,message:de.toString(n)}})}nonempty(t){return this.min(1,t)}}Ii.create=(e,t)=>new Ii({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...$e(t)});function Xc(e){if(e instanceof Ct){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jo.create(Xc(r))}return new Ct({...e._def,shape:()=>t})}else return e instanceof Ii?new Ii({...e._def,type:Xc(e.element)}):e instanceof Jo?Jo.create(Xc(e.unwrap())):e instanceof Fs?Fs.create(Xc(e.unwrap())):e instanceof co?co.create(e.items.map(t=>Xc(t))):e}class Ct extends Fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ve.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ee.object){const c=this._getOrReturnCtx(t);return ne(c,{code:H.invalid_type,expected:ee.object,received:c.parsedType}),Ie}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof na&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||u.push(c);const s=[];for(const c of a){const l=o[c],f=i.data[c];s.push({key:{status:"valid",value:c},value:l._parse(new so(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof na){const c=this._def.unknownKeys;if(c==="passthrough")for(const l of u)s.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(c==="strict")u.length>0&&(ne(i,{code:H.unrecognized_keys,keys:u}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const l of u){const f=i.data[l];s.push({key:{status:"valid",value:l},value:c._parse(new so(i,f,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const l of s){const f=await l.key;c.push({key:f,value:await l.value,alwaysSet:l.alwaysSet})}return c}).then(c=>Mn.mergeObjectSync(r,c)):Mn.mergeObjectSync(r,s)}get shape(){return this._def.shape()}strict(t){return de.errToObj,new Ct({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,u;const s=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(u=de.errToObj(t).message)!==null&&u!==void 0?u:s}:{message:s}}}:{}})}strip(){return new Ct({...this._def,unknownKeys:"strip"})}passthrough(){return new Ct({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ct({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ct({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ct({...this._def,catchall:t})}pick(t){const n={};return Ve.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ct({...this._def,shape:()=>n})}omit(t){const n={};return Ve.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ct({...this._def,shape:()=>n})}deepPartial(){return Xc(this)}partial(t){const n={};return Ve.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Ct({...this._def,shape:()=>n})}required(t){const n={};return Ve.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Jo;)o=o._def.innerType;n[r]=o}}),new Ct({...this._def,shape:()=>n})}keyof(){return dq(Ve.objectKeys(this.shape))}}Ct.create=(e,t)=>new Ct({shape:()=>e,unknownKeys:"strip",catchall:na.create(),typeName:ve.ZodObject,...$e(t)});Ct.strictCreate=(e,t)=>new Ct({shape:()=>e,unknownKeys:"strict",catchall:na.create(),typeName:ve.ZodObject,...$e(t)});Ct.lazycreate=(e,t)=>new Ct({shape:e,unknownKeys:"strip",catchall:na.create(),typeName:ve.ZodObject,...$e(t)});class rp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const a=o.map(u=>new _i(u.ctx.common.issues));return ne(n,{code:H.invalid_union,unionErrors:a}),Ie}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const s of r){const c={...n,common:{...n.common,issues:[]},parent:null},l=s._parseSync({data:n.data,path:n.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=a.map(s=>new _i(s));return ne(n,{code:H.invalid_union,unionErrors:u}),Ie}}get options(){return this._def.options}}rp.create=(e,t)=>new rp({options:e,typeName:ve.ZodUnion,...$e(t)});const Zh=e=>e instanceof ap?Zh(e.schema):e instanceof Ri?Zh(e.innerType()):e instanceof up?[e.value]:e instanceof du?e.options:e instanceof sp?Object.keys(e.enum):e instanceof cp?Zh(e._def.innerType):e instanceof tp?[void 0]:e instanceof np?[null]:null;class U0 extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.object)return ne(n,{code:H.invalid_type,expected:ee.object,received:n.parsedType}),Ie;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ne(n,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=Zh(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of a){if(i.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);i.set(u,o)}}return new U0({typeName:ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...$e(r)})}}function G1(e,t){const n=Za(e),r=Za(t);if(e===t)return{valid:!0,data:e};if(n===ee.object&&r===ee.object){const i=Ve.objectKeys(t),o=Ve.objectKeys(e).filter(u=>i.indexOf(u)!==-1),a={...e,...t};for(const u of o){const s=G1(e[u],t[u]);if(!s.valid)return{valid:!1};a[u]=s.data}return{valid:!0,data:a}}else if(n===ee.array&&r===ee.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const a=e[o],u=t[o],s=G1(a,u);if(!s.valid)return{valid:!1};i.push(s.data)}return{valid:!0,data:i}}else return n===ee.date&&r===ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ip extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(H1(o)||H1(a))return Ie;const u=G1(o.value,a.value);return u.valid?((Y1(o)||Y1(a))&&n.dirty(),{status:n.value,value:u.data}):(ne(r,{code:H.invalid_intersection_types}),Ie)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ip.create=(e,t,n)=>new ip({left:e,right:t,typeName:ve.ZodIntersection,...$e(n)});class co extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.array)return ne(r,{code:H.invalid_type,expected:ee.array,received:r.parsedType}),Ie;if(r.data.length<this._def.items.length)return ne(r,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ie;!this._def.rest&&r.data.length>this._def.items.length&&(ne(r,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,u)=>{const s=this._def.items[u]||this._def.rest;return s?s._parse(new so(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Mn.mergeArray(n,a)):Mn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new co({...this._def,rest:t})}}co.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new co({items:e,typeName:ve.ZodTuple,rest:null,...$e(t)})};class op extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.object)return ne(r,{code:H.invalid_type,expected:ee.object,received:r.parsedType}),Ie;const i=[],o=this._def.keyType,a=this._def.valueType;for(const u in r.data)i.push({key:o._parse(new so(r,u,r.path,u)),value:a._parse(new so(r,r.data[u],r.path,u))});return r.common.async?Mn.mergeObjectAsync(n,i):Mn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new op({keyType:t,valueType:n,typeName:ve.ZodRecord,...$e(r)}):new op({keyType:Ci.create(),valueType:t,typeName:ve.ZodRecord,...$e(n)})}}class Mm extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.map)return ne(r,{code:H.invalid_type,expected:ee.map,received:r.parsedType}),Ie;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,s],c)=>({key:i._parse(new so(r,u,r.path,[c,"key"])),value:o._parse(new so(r,s,r.path,[c,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const s of a){const c=await s.key,l=await s.value;if(c.status==="aborted"||l.status==="aborted")return Ie;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),u.set(c.value,l.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const s of a){const c=s.key,l=s.value;if(c.status==="aborted"||l.status==="aborted")return Ie;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),u.set(c.value,l.value)}return{status:n.value,value:u}}}}Mm.create=(e,t,n)=>new Mm({valueType:t,keyType:e,typeName:ve.ZodMap,...$e(n)});class Os extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.set)return ne(r,{code:H.invalid_type,expected:ee.set,received:r.parsedType}),Ie;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ne(r,{code:H.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ne(r,{code:H.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(s){const c=new Set;for(const l of s){if(l.status==="aborted")return Ie;l.status==="dirty"&&n.dirty(),c.add(l.value)}return{status:n.value,value:c}}const u=[...r.data.values()].map((s,c)=>o._parse(new so(r,s,r.path,c)));return r.common.async?Promise.all(u).then(s=>a(s)):a(u)}min(t,n){return new Os({...this._def,minSize:{value:t,message:de.toString(n)}})}max(t,n){return new Os({...this._def,maxSize:{value:t,message:de.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Os.create=(e,t)=>new Os({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...$e(t)});class ll extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.function)return ne(n,{code:H.invalid_type,expected:ee.function,received:n.parsedType}),Ie;function r(u,s){return $m({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wm(),Xd].filter(c=>!!c),issueData:{code:H.invalid_arguments,argumentsError:s}})}function i(u,s){return $m({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wm(),Xd].filter(c=>!!c),issueData:{code:H.invalid_return_type,returnTypeError:s}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;return this._def.returns instanceof Fl?Vn(async(...u)=>{const s=new _i([]),c=await this._def.args.parseAsync(u,o).catch(p=>{throw s.addIssue(r(u,p)),s}),l=await a(...c);return await this._def.returns._def.type.parseAsync(l,o).catch(p=>{throw s.addIssue(i(l,p)),s})}):Vn((...u)=>{const s=this._def.args.safeParse(u,o);if(!s.success)throw new _i([r(u,s.error)]);const c=a(...s.data),l=this._def.returns.safeParse(c,o);if(!l.success)throw new _i([i(c,l.error)]);return l.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ll({...this._def,args:co.create(t).rest(ds.create())})}returns(t){return new ll({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ll({args:t||co.create([]).rest(ds.create()),returns:n||ds.create(),typeName:ve.ZodFunction,...$e(r)})}}class ap extends Fe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ap.create=(e,t)=>new ap({getter:e,typeName:ve.ZodLazy,...$e(t)});class up extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ne(n,{received:n.data,code:H.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:t.data}}get value(){return this._def.value}}up.create=(e,t)=>new up({value:e,typeName:ve.ZodLiteral,...$e(t)});function dq(e,t){return new du({values:e,typeName:ve.ZodEnum,...$e(t)})}class du extends Fe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{expected:Ve.joinValues(r),received:n.parsedType,code:H.invalid_type}),Ie}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{received:n.data,code:H.invalid_enum_value,options:r}),Ie}return Vn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return du.create(t)}exclude(t){return du.create(this.options.filter(n=>!t.includes(n)))}}du.create=dq;class sp extends Fe{_parse(t){const n=Ve.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ee.string&&r.parsedType!==ee.number){const i=Ve.objectValues(n);return ne(r,{expected:Ve.joinValues(i),received:r.parsedType,code:H.invalid_type}),Ie}if(n.indexOf(t.data)===-1){const i=Ve.objectValues(n);return ne(r,{received:r.data,code:H.invalid_enum_value,options:i}),Ie}return Vn(t.data)}get enum(){return this._def.values}}sp.create=(e,t)=>new sp({values:e,typeName:ve.ZodNativeEnum,...$e(t)});class Fl extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.promise&&n.common.async===!1)return ne(n,{code:H.invalid_type,expected:ee.promise,received:n.parsedType}),Ie;const r=n.parsedType===ee.promise?n.data:Promise.resolve(n.data);return Vn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Fl.create=(e,t)=>new Fl({type:e,typeName:ve.ZodPromise,...$e(t)});class Ri extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null;if(i.type==="preprocess"){const a=i.transform(r.data);return r.common.async?Promise.resolve(a).then(u=>this._def.schema._parseAsync({data:u,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}const o={addIssue:a=>{ne(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="refinement"){const a=u=>{const s=i.refinement(u,o);if(r.common.async)return Promise.resolve(s);if(s instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Ie:(u.status==="dirty"&&n.dirty(),a(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Ie:(u.status==="dirty"&&n.dirty(),a(u.value).then(()=>({status:n.value,value:u.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Em(a))return a;const u=i.transform(a.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Em(a)?Promise.resolve(i.transform(a.value,o)).then(u=>({status:n.value,value:u})):a);Ve.assertNever(i)}}Ri.create=(e,t,n)=>new Ri({schema:e,typeName:ve.ZodEffects,effect:t,...$e(n)});Ri.createWithPreprocess=(e,t,n)=>new Ri({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...$e(n)});class Jo extends Fe{_parse(t){return this._getType(t)===ee.undefined?Vn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jo.create=(e,t)=>new Jo({innerType:e,typeName:ve.ZodOptional,...$e(t)});class Fs extends Fe{_parse(t){return this._getType(t)===ee.null?Vn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Fs.create=(e,t)=>new Fs({innerType:e,typeName:ve.ZodNullable,...$e(t)});class cp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}cp.create=(e,t)=>new cp({innerType:e,typeName:ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class km extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Rm(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}km.create=(e,t)=>new km({innerType:e,typeName:ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class Lm extends Fe{_parse(t){if(this._getType(t)!==ee.nan){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.nan,received:r.parsedType}),Ie}return{status:"valid",value:t.data}}}Lm.create=e=>new Lm({typeName:ve.ZodNaN,...$e(e)});const KTe=Symbol("zod_brand");class pq extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class vh extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ie:o.status==="dirty"?(n.dirty(),fq(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ie:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new vh({in:t,out:n,typeName:ve.ZodPipeline})}}const Aq=(e,t={},n)=>e?Ol.create().superRefine((r,i)=>{var o,a;if(!e(r)){const u=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,s=(a=(o=u.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,c=typeof u=="string"?{message:u}:u;i.addIssue({code:"custom",...c,fatal:s})}}):Ol.create(),PTe={object:Ct.lazycreate};var ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"})(ve||(ve={}));const DTe=(e,t={message:`Input not instance of ${e.name}`})=>Aq(n=>n instanceof e,t),zo=Ci.create,jm=lu.create,NTe=Lm.create,qTe=fu.create,hq=ep.create,QTe=Rs.create,VTe=Om.create,zTe=tp.create,HTe=np.create,YTe=Ol.create,GTe=ds.create,JTe=na.create,ZTe=Fm.create,mq=Ii.create,lp=Ct.create,XTe=Ct.strictCreate,exe=rp.create,txe=U0.create,nxe=ip.create,rxe=co.create,ixe=op.create,oxe=Mm.create,axe=Os.create,uxe=ll.create,sxe=ap.create,cxe=up.create,lxe=du.create,fxe=sp.create,dxe=Fl.create,MF=Ri.create,pxe=Jo.create,Axe=Fs.create,hxe=Ri.createWithPreprocess,mxe=vh.create,gxe=()=>zo().optional(),vxe=()=>jm().optional(),yxe=()=>hq().optional(),bxe={string:e=>Ci.create({...e,coerce:!0}),number:e=>lu.create({...e,coerce:!0}),boolean:e=>ep.create({...e,coerce:!0}),bigint:e=>fu.create({...e,coerce:!0}),date:e=>Rs.create({...e,coerce:!0})},Cxe=Ie;var B=Object.freeze({__proto__:null,defaultErrorMap:Xd,setErrorMap:wTe,getErrorMap:wm,makeIssue:$m,EMPTY_PATH:$Te,addIssueToContext:ne,ParseStatus:Mn,INVALID:Ie,DIRTY:fq,OK:Vn,isAborted:H1,isDirty:Y1,isValid:Em,isAsync:Rm,get util(){return Ve},get objectUtil(){return z1},ZodParsedType:ee,getParsedType:Za,ZodType:Fe,ZodString:Ci,ZodNumber:lu,ZodBigInt:fu,ZodBoolean:ep,ZodDate:Rs,ZodSymbol:Om,ZodUndefined:tp,ZodNull:np,ZodAny:Ol,ZodUnknown:ds,ZodNever:na,ZodVoid:Fm,ZodArray:Ii,ZodObject:Ct,ZodUnion:rp,ZodDiscriminatedUnion:U0,ZodIntersection:ip,ZodTuple:co,ZodRecord:op,ZodMap:Mm,ZodSet:Os,ZodFunction:ll,ZodLazy:ap,ZodLiteral:up,ZodEnum:du,ZodNativeEnum:sp,ZodPromise:Fl,ZodEffects:Ri,ZodTransformer:Ri,ZodOptional:Jo,ZodNullable:Fs,ZodDefault:cp,ZodCatch:km,ZodNaN:Lm,BRAND:KTe,ZodBranded:pq,ZodPipeline:vh,custom:Aq,Schema:Fe,ZodSchema:Fe,late:PTe,get ZodFirstPartyTypeKind(){return ve},coerce:bxe,any:YTe,array:mq,bigint:qTe,boolean:hq,date:QTe,discriminatedUnion:txe,effect:MF,enum:lxe,function:uxe,instanceof:DTe,intersection:nxe,lazy:sxe,literal:cxe,map:oxe,nan:NTe,nativeEnum:fxe,never:JTe,null:HTe,nullable:Axe,number:jm,object:lp,oboolean:yxe,onumber:vxe,optional:pxe,ostring:gxe,pipeline:mxe,preprocess:hxe,promise:dxe,record:ixe,set:axe,strictObject:XTe,string:zo,symbol:VTe,transformer:MF,tuple:rxe,undefined:zTe,union:exe,unknown:GTe,void:ZTe,NEVER:Cxe,ZodIssueCode:H,quotelessJson:xTe,ZodError:_i});const Sxe=B.object({id:B.string(),label:B.string(),repeatable:B.boolean(),status:B.boolean()}),_xe=B.array(Sxe);function gq(e,t,n){return _e.request(new URL("customtypes",e),{headers:{repository:t},credentials:_e.getRequestCredentials(n),okType:_xe})}const Ixe=B.object({first_name:B.string().optional(),last_name:B.string().optional(),email:B.string().optional()}),IR=B.object({id:B.string(),name:B.string(),is_master:B.boolean().optional()}),Txe=B.discriminatedUnion("status",[B.object({status:B.literal("unclassified")}),B.object({status:B.literal("published")}),B.object({status:B.literal("release"),release_id:B.string()}),B.object({status:B.literal("archived")})]).and(B.object({version_id:B.string(),tags:B.array(B.string()),custom_type_label:B.string(),preview_summary:B.string().optional(),preview_image:B.string().optional(),last_modified_date:B.coerce.date(),author:Ixe,uid:B.string().optional()})),TR=B.object({id:B.string(),title:B.string().nullish().transform(e=>e??"Untitled"),custom_type_id:B.string(),group_lang_id:B.string(),language:IR,versions:B.array(Txe)}),vq=B.object({total:B.number(),cursor:B.string().optional(),results:B.array(TR)}),xxe=B.object({id:B.string(),title:B.string(),repository_id:B.string(),tags:B.array(B.string()).optional()}).passthrough(),wxe=B.object({results:B.array(xxe)});function B0(e,t,n,r,i){const o=new URL("documents",e);return r&&o.searchParams.set("limit",r.toString()),i&&o.searchParams.set("cursor",i),o.search+=`&${n}`,_e.request(o,{credentials:_e.getRequestCredentials(t),okType:vq})}function yq(e,t,n,r){const i=new URL(e);return i.search=r,_e.request(i,{headers:{repository:n},credentials:_e.getRequestCredentials(t),okType:wxe})}function bq(e){const{searchTerm:t,tags:n,localeId:r,customTypesIds:i}=e,o=new URLSearchParams;return t&&o.append("searchTerm",t),n!=null&&n.length&&o.append("tags",n.toString()),r&&o.append("localeId",r),i!=null&&i.length&&o.append("customTypesIds",i.toString()),o.toString()}function xR(e){return e.reduce((t,n)=>{if(n.values.every(i=>i===""))return t;const r=n.values.map(i=>[n.name,i]);return t.concat(r)},[])}function Cq(e,t,n){return _e.request(new URL(`documents/${n}`,e),{credentials:_e.getRequestCredentials(t),okType:TR})}function $xe(e,t,n,r){const i=new URL(`documents?status=release:${n}`,e);return r&&i.searchParams.set("limit",r.toString()),_e.request(i,{credentials:_e.getRequestCredentials(t),okType:vq})}function Sq(e,t,n){const r=W0({document_id:n});return B0(e,t,r,n.length)}const Exe=B.custom().transform((e,t)=>{const n=Ue.Document.decode(e);return n._tag==="Left"?(t.addIssue({code:B.ZodIssueCode.custom,message:"Invalid document."}),B.NEVER):n.right});function W0(e){const t=Pl.keys(e).flatMap(r=>{const i=e[r];return i?{name:r,values:i}:[]});return new URLSearchParams(xR(t)).toString()}const Rxe=B.object({id:B.string(),firstname:B.string().optional(),lastname:B.string().optional(),email:B.string()}),Oxe=B.array(Rxe),Fxe=B.object({slicemachineEnabled:B.boolean()}),Mxe=B.object({simulator_url:B.string().url().nullish(),languages:B.array(IR).transform(e=>gn.sort(e,t=>t.name)),authors:Oxe.optional().default([]),quotas:Fxe.optional().default({slicemachineEnabled:!1})}).transform(({simulator_url:e,...t})=>{const n=e&&Iq(e)?e:void 0;return{...t,simulatorUrl:n}});function _q(e,t){return _e.request(new URL("repository",e),{credentials:_e.getRequestCredentials(t),okType:Mxe})}function Iq(e){const t=$r.toURL(e);return t?t.pathname.endsWith("/slice-simulator"):!1}const kxe=B.object({results:B.array(B.string())});function Tq(e,t){return _e.request(new URL("repository/tags",e),{credentials:_e.getRequestCredentials(t),okType:kxe})}function yh(){const e=xe();e.mediaLibrary||Bn("mediaLibrary");const{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e,{items:i}=nt.useRequest(xq,[t,r,n]);return{tags:i}}function xq(e,t,n){return _e.request(new URL("tags",e),{credentials:_e.getRequestCredentials(n),okType:Lxe,headers:{repository:t}})}const wq=3,$q=20,wR=B.string().min(wq).max($q),$R=B.object({id:B.string(),name:wR,uploader_id:B.string().optional(),created_at:B.number(),last_modified:B.number(),count:B.number().optional().default(0)}),Lxe=B.object({items:B.array($R)});function bh(e){nt.updateFetcherData(xq,t=>{const{items:n}=t,r=e(n);if(r)return{items:r}})}function jxe(e){const{assetType:t,keyword:n,mode:r,tagIds:i}=e,o=xe();o.mediaLibrary||Bn("mediaLibrary");const{useOpenSearch:a,onAnalyticsEvent:u}=o,s=nt.useFetcherData(Yi),c=s[s.length-1],l=R.useRef(c);l.current=c,R.useEffect(()=>{if(!u||!n||!l.current||l.current.keyword!==n)return;const f=a&&n?"1":"0",p=String(n.split(" ").length),A=String(l.current.total),h=i.join(",");u("Media Library Search",{searchQuery:n,numberOfWords:p,numberOfResults:A,timeToGetResults:l.current.time,useOpenSearch:f,assetType:t,mode:r,tags:h})},[n,a,t,r,u,i])}function Uxe(e){const{assetType:t,mediaDialogOpen:n}=e,r=xe(),i=nt.useFetcherData(Yi),o=R.useRef(0);R.useEffect(()=>{n&&(o.current=performance.now())},[n]);function a(u){if(!r.onAnalyticsEvent||!r.mediaLibrary)return;const s=i[i.length-1];if(!s)return;const{keyword:c,tags:l}=s,f=Oq(i,t,c,l),p=r.useOpenSearch&&c?"1":"0",A=String(c.split(" ").length),h=String(s.total),v=f.findIndex(T=>T.id===u),_=String(v+1),S=[u].join(","),I=(performance.now()-o.current).toFixed(0);r.onAnalyticsEvent("Media Added To Page",{useOpenSearch:p,assetType:t,searchQuery:c,numberOfWords:A,numberOfResults:h,searchPosition:_,mediaIds:S,timeToAddMediaToPage:I,tags:l})}return a}const Wh=B.array(B.string()).optional().transform(e=>e==null?void 0:e[0]),K0=B.object({id:B.string(),kind:B.string(),extension:B.string().optional(),filename:B.string(),width:B.number().optional(),height:B.number().optional(),last_modified:B.number(),url:B.string(),alt:B.string().optional(),size:B.number(),notes:B.string().optional(),credits:B.string().optional(),search_highlight:B.object({filename:Wh,alt:Wh,notes:Wh,credits:Wh}).optional(),tags:B.array($R)}),Eq={"X-Prismic-Source":"Wroom"},Bxe=B.object({total:B.number(),cursor:B.string().optional(),items:B.array(K0)}),Rq=30;function Yi(e,t,n,r,i,o,a,u,s){const c=e?new URL("assets",e):void 0,l=new URLSearchParams(xR([{name:"limit",values:[`${Rq}`]},{name:"cursor",values:[s??""]},{name:"keyword",values:[i]},{name:"tags",values:o.split(",")},{name:"assetType",values:[r]},{name:"opensearch",values:a?["true"]:[]}])).toString(),f=Bxe.transform(A=>({...A,assetType:r,keyword:i,page:u,tags:o})),p=performance.now();return _e.request(`${(c==null?void 0:c.href)??""}?${l}`,{headers:{repository:t,...Eq},credentials:_e.getRequestCredentials(n),okType:f}).then(A=>({...A,time:(performance.now()-p).toFixed(0)}))}nt.cache.registerFetcherConfig(Yi,{revalidationStrategy:{type:"never"}});function Wxe(e){const{assetType:t="all",mode:n}=e,r=xe(),[i,o]=R.useState({keyword:"",page:0,tagIds:[]});r.mediaLibrary||Bn("mediaLibrary");const{assetsApiBaseUrl:a,authStrategy:u,repository:s,useOpenSearch:c}=r,{keyword:l,page:f,cursor:p,tagIds:A}=i,h=nt.useRequest(Yi,ER({assetsApiBaseUrl:a,authStrategy:u,repository:s,assetType:t,keyword:l,tagIds:A,useOpenSearch:c&&!!l,page:f,cursor:p}));jxe({assetType:t,keyword:l,tagIds:A,mode:n});const v=Nxe(t,l,A),_=h.total!==v.length;function S(){h.cursor!==void 0&&o(C=>({...C,page:C.page+1,cursor:h.cursor}))}function I(C){o(y=>({...y,page:0,cursor:void 0})),Ms((y,x)=>{if(x.page===0)return[...C,...y]})}function T(C){o(y=>({...y,keyword:C,page:0,cursor:void 0}))}function g(C){o(y=>({...y,tagIds:C,page:0,cursor:void 0}))}return{keyword:l,setKeyword:T,tagIds:A,setTagIds:g,media:v,mediaTotal:h.total,limit:Rq,hasNextPage:_,fetchNextPage:S,updateMedia:Kxe,unshiftMedia:I,deleteMedia:Pxe,deleteSearchData:Dxe,revalidateFirstPage:Fq}}function Kxe(e){Ms(t=>t.flatMap(n=>{const r=e.find(i=>i.id===n.id);return r?r.response===void 0?[]:{...n,...r.response}:n}))}function Pxe(e){Ms(t=>t.filter(n=>!e.includes(n.id)))}function Dxe(e){const{keyword:t,tagIds:n}=e,r=n==null?void 0:n.join(",");nt.updateFetcherData(Yi,i=>{if(!(t&&i.keyword===t)&&!(r&&i.tags===r))return i})}function Oq(e,t,n,r){const i=e.filter(u=>u.assetType===t&&u.keyword===n&&u.tags===r),a=gn.sort(i,u=>u.page).flatMap(u=>u.items);return n?gn.uniqBy(a,u=>u.id):a}function Nxe(e,t,n){const r=nt.useFetcherData(Yi);return Oq(r,e,t,n.join(","))}function Ms(e){nt.updateFetcherData(Yi,t=>{const{items:n,total:r}=t,i=e(n,t);if(i)return{...t,total:r+(i.length-n.length),items:i}})}function Fq(e){const{config:t,assetType:n}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");const{assetsApiBaseUrl:r,authStrategy:i,repository:o}=t;nt.revalidateData(Yi,ER({assetsApiBaseUrl:r,repository:o,authStrategy:i,assetType:n,keyword:"",tagIds:[],useOpenSearch:!1,page:0}))}function Mq(e){const{config:t,assetType:n}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");nt.updateFetcherData(Yi,r=>r.page===0?r:void 0),Fq({config:t,assetType:n})}function ER(e){return[e.assetsApiBaseUrl,e.repository,e.authStrategy,e.assetType,e.keyword,e.tagIds.join(","),e.useOpenSearch,e.page,e.cursor]}function qxe(e){const{revalidate:t,config:n,assetType:r}=e,{assetsApiBaseUrl:i=void 0,repository:o="",authStrategy:a="token"}=n.mediaLibrary?n:{},[u,s]=R.useState(!1),[c,l]=R.useState(!1);nt.useCacheRevalidation({fetcher:Yi,requestParams:ER({assetsApiBaseUrl:i,repository:o,authStrategy:a,assetType:r,keyword:"",tagIds:[],useOpenSearch:!1,page:0}),validator:(p,A)=>{var _,S,I,T;const h=((_=p.items[0])==null?void 0:_.id)??"",v=((I=(S=A[0])==null?void 0:S.items[0])==null?void 0:I.id)??"";return h!==v||p.total!==((T=A[0])==null?void 0:T.total)},onCacheInvalidated:()=>l(!0),every:6e4}),R.useEffect(()=>{u&&(l(!1),s(!1))},[u]);function f(){s(!0),t()}return{isMediaRevalidationInProgress:u,isMediaCacheInvalid:c,revalidateMedia:f}}let Kh;const Qxe=new Uint8Array(16);function Vxe(){if(!Kh&&(Kh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Kh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Kh(Qxe)}const ln=[];for(let e=0;e<256;++e)ln.push((e+256).toString(16).slice(1));function zxe(e,t=0){return ln[e[t+0]]+ln[e[t+1]]+ln[e[t+2]]+ln[e[t+3]]+"-"+ln[e[t+4]]+ln[e[t+5]]+"-"+ln[e[t+6]]+ln[e[t+7]]+"-"+ln[e[t+8]]+ln[e[t+9]]+"-"+ln[e[t+10]]+ln[e[t+11]]+ln[e[t+12]]+ln[e[t+13]]+ln[e[t+14]]+ln[e[t+15]]}const Hxe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kF={randomUUID:Hxe};function Yxe(e,t,n){if(kF.randomUUID&&!t&&!e)return kF.randomUUID();e=e||{};const r=e.random||(e.rng||Vxe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return zxe(r)}function Gxe(e){const{onBeforeUpload:t,onComplete:n}=e,[r,i]=R.useState([]),o=r.some(l=>l.status==="idle"||l.status==="uploading"),a=xe();function u(){if(!r.length||r.some(A=>A.status==="uploading")||r.every(A=>A.status==="error"))return;const l=r.find(A=>A.status==="idle");if(!l)return;let f=r;function p(A){f=A(f),i(f),f.every(v=>v.status==="success"||v.status==="error")&&setTimeout(()=>{i([]),n==null||n(f)},1500)}p(A=>A.map(h=>h.id===l.id?{...h,status:"uploading"}:h)),Jxe({file:l.file,config:a}).then(A=>{p(h=>h.map(v=>v.id===l.id?{...v,status:"success",response:A}:v))}).catch(()=>{p(A=>A.map(h=>h.id===l.id?{...h,status:"error"}:h))})}function s(l){const f=l.map(p=>({id:`temp-${Yxe()}`,file:p,status:"idle"}));i(f),t(f)}const c=R.useCallback(l=>{const f=[{...l,status:"idle"},...r.filter(p=>p.id!==l.id)];i(f),t(f)},[t,r]);return R.useEffect(u,[a,r,n]),{isUploading:o,uploadingFiles:r,onFilesSelected:s,onRetry:c}}function Jxe(e){const{file:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n,a=new FormData;return a.append(t.name,t),_e.request(new URL("assets",r),{headers:{repository:i,"Content-Type":"multipart/form-data",...Eq},method:"POST",body:a,credentials:_e.getRequestCredentials(o),okType:K0})}const kq=R.createContext(void 0);function Zxe(e){const{children:t,assetType:n="all",onSelectedChange:r,actionContainerRef:i}=e,o=r?"select":"browse",[a,u]=R.useTransition(),[s,c]=R.useTransition(),l=xe(),{showAlert:f}=m.useAlert(),{keyword:p,setKeyword:A,tagIds:h,setTagIds:v,media:_,fetchNextPage:S,hasNextPage:I,updateMedia:T,unshiftMedia:g,deleteMedia:C,mediaTotal:y,deleteSearchData:x,revalidateFirstPage:w}=Wxe({assetType:n,mode:o}),[M,O]=R.useState();function F(Oe){Oe&&x({keyword:Oe}),c(()=>{A(Oe),D.clearSelection()})}function K(){A(""),Mq({config:l,assetType:n})}function N(Oe){Oe.length&&x({tagIds:Oe}),c(()=>{v(Oe),D.clearSelection()})}const{isMediaRevalidationInProgress:J,isMediaCacheInvalid:Z,revalidateMedia:ae}=qxe({assetType:n,config:l,revalidate:K}),{isUploading:ge,onFilesSelected:se,uploadingFiles:k,onRetry:E}=Gxe({onBeforeUpload:Oe=>{A("");const mt=Oe.filter(Tt=>Tt.status==="idle").map(Tt=>({id:Tt.id,url:URL.createObjectURL(Tt.file),filename:Tt.file.name,size:Tt.file.size,extension:Tt.file.type,kind:Tt.file.type,last_modified:Tt.file.lastModified,tags:[]}));g(mt);const[lt]=mt??[];lt&&D.toggleSelection({id:lt.id,isSingleSelection:!0})},onComplete:Oe=>{const mt=Oe.flatMap(sn=>sn.status==="success"?sn:(rt(sn),{id:sn.id,response:void 0}));T(mt),w({config:l,assetType:n});const lt=mt[0];!lt||!lt.response||!D.isSelected(lt.id)||D.toggleSelection({id:lt.response.id,isSingleSelection:!0})}}),D=qu({totalItemCount:y,onChangeSelection:({selectedIds:Oe,selectedCount:mt})=>{if(Yt(!1),!!r){if(mt===1){const[lt]=[...Oe];if(k.some(sn=>sn.id===lt&&sn.status!=="success")){r(new Set);return}}r(new Set(Oe))}}});function ue(Oe){ge||se(Oe)}function ke(){I&&u(S)}function Se(Oe,mt){T([{id:Oe,response:mt}])}function rt(Oe){const mt=Ip.overflow(Oe.file.name,30);f({id:Oe.id,title:`The specified file "${mt}" could not be uploaded.`,subtitle:d.jsxs(m.Text,{color:"inherit",children:["Read more about our"," ",d.jsx(m.Text,{color:"tomato11",href:TTe,underline:!0,children:"supported media"}),"."]}),buttons:{action:{text:"Retry upload",icon:"cloudUpload",onClick:()=>E(Oe)}}})}const[bt,Yt]=R.useState(!1);return d.jsx(kq.Provider,{value:{isFetchingMedia:a,media:_,mediaTotal:y,onScrollToBottom:ke,actionContainerRef:i,onFilesUpload:ue,isUploading:ge,uploadingFiles:k,isMediaRevalidationInProgress:J,isMediaCacheInvalid:Z,revalidateMedia:ae,deleteMedia:C,updateMedia:Se,keyword:p,onKeywordChange:F,isSearchingMedia:s,assetType:n,tagManagerOpen:bt,setTagManagerOpen:Yt,tagIds:h,onTagIdsChange:N,openMediaSection:M,setOpenMediaSection:O},children:t})}function Et(){const e=R.useContext(kq);if(!e)throw new Error("useMediaLibrary must be used within a MediaLibraryProvider");return e}function Xxe(){const{actionContainerRef:e,isUploading:t,onFilesUpload:n,assetType:r}=Et(),i=e==null?void 0:e.current;return d.jsx(Lq,{actionContainerRef:e,children:d.jsxs(m.Box,{width:"100%",gap:16,children:[d.jsx(ewe,{}),d.jsx(m.Tooltip,{title:Rl.warning.uploadWhileUploading.title,content:Rl.warning.uploadWhileUploading.description,visible:t,stableMount:!0,children:d.jsx(m.FileUploadButton,{disabled:t,onFilesSelected:n,startIcon:"cloudUpload",color:i?"purple":"grey",size:"large",assetType:r,children:"Upload media"})})]})})}function ewe(){const{keyword:e,onKeywordChange:t,isFetchingMedia:n}=Et(),[r,i]=R.useState(e);return Xe.useOnChange(e,()=>{e===""&&i("")}),Xe.useDebounce(r,300,Xe.useStableCallback(o=>t(o))),d.jsx(m.Box,{width:"100%",flexDirection:"column",children:d.jsx(m.FormSearchInput,{value:r,placeholder:"Search",onValueChange:i,maxLength:200,isLoading:n&&e!==r})})}function Lq(e){const{children:t,actionContainerRef:n}=e,r=n==null?void 0:n.current,i=r?m.Portal:R.Fragment,o=r?{container:n.current,asChild:!0}:{};return d.jsx(i,{...o,children:t})}function twe(e){const{children:t}=e,{onFilesUpload:n,assetType:r}=Et();return d.jsx(m.FileDropZone,{overlay:d.jsx(nwe,{}),onFilesSelected:n,assetType:r,children:t})}function nwe(){const{isUploading:e}=Et(),t=e?Rl.warning.uploadWhileUploading.title:"Drop files here",n=e?Rl.warning.uploadWhileUploading.description:"Drop your files to upload them instantly to the media library.";return d.jsx(m.Box,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:"grey3",children:d.jsxs(m.BlankSlate,{children:[d.jsx(m.BlankSlateIcon,{name:e?"block":"cloudUpload",lineColor:e?"tomato11":"purple10",backgroundColor:e?"tomato2":"purple3",borderColor:e?"tomato6":"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(m.BlankSlateTitle,{size:"big",children:t}),d.jsx(m.BlankSlateDescription,{width:360,children:n})]})})}function jq(){return d.jsx(m.DefaultErrorMessage,{title:"Oops! Something went wrong",description:"An error occurred while searching for your image.",errorImageSrc:m.dialogErrorImage,sx:{marginBlock:"auto",marginInline:"auto"}})}function Uq(e){const{mediaList:t,mediaActions:n,mediaToolbar:r,sidePane:i}=e,o=m.useMediaQuery({min:"medium"});return d.jsxs(m.Box,{display:"grid",gridTemplateRows:"auto auto 1fr",gridTemplateColumns:o?"1fr 380px":"1fr",width:"100%",height:"100%",children:[d.jsxs(m.Box,{position:"relative",display:"grid",gap:16,gridColumn:"1",gridRow:"1",padding:{right:16,bottom:16},children:[n,r]}),d.jsx(m.Box,{position:"relative",display:"grid",gridColumn:"1",gridRow:"2 / -1",children:t}),o&&i]})}function Bq(e){const{count:t}=e;return d.jsxs(m.Text,{variant:"bold",children:[t," items"]})}function rwe(){var A;const{onScrollToBottom:e,media:t,isUploading:n,uploadingFiles:r,isSearchingMedia:i,isMediaRevalidationInProgress:o,setOpenMediaSection:a}=Et(),u=qu(),s=xe(),c=s.mediaLibrary&&s.mediaLibraryTagsEnabled,l=R.useRef(null);function f(h){u.toggleSelection({id:h,isSingleSelection:!0}),a("tags")}(n||i||o)&&((A=l.current)==null||A.scrollTo({top:0,behavior:"instant"}));function p(h,v,_){const S=v.shiftKey?t.map(({id:I})=>I):void 0;u.toggleSelection({id:h,isSingleSelection:_==="single",metaKey:v.metaKey,shiftKey:v.shiftKey,ids:S})}return d.jsx(Wq,{onScrollToBottom:e,scrollAreaRef:l,children:t.map(h=>{var v,_;return d.jsx(m.MediaCard,{"aria-label":"media item",...h,filenameHighlight:(v=h.search_highlight)==null?void 0:v.filename,loading:i,status:(_=r.find(S=>S.id===h.id))==null?void 0:_.status,selected:u.isSelected(h.id),onCardClick:S=>p(h.id,S,"single"),onCheckedChange:(S,I)=>p(h.id,I,"multi"),onAddTagClick:c?()=>f(h.id):void 0},h.id)})})}function Wq(e){const{children:t,scrollAreaRef:n,onScrollToBottom:r}=e,i=16,o=4,a="250px",u=`calc((100% - ${i*(o-1)}px) / ${o})`;return d.jsx(m.ScrollArea,{"aria-label":"Media list",ref:n,style:{display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(max(${a}, ${u}), 1fr))`,gridTemplateRows:"1fr 1fr 1fr ",gap:i,padding:2,paddingBottom:16,position:"relative"},onScrollToBottom:r,threshold:500,children:t})}function Kq(e){const{children:t,hasSelectedMedia:n}=e;return d.jsx(m.Box,{overflow:"hidden",gridColumn:"2 / -1",gridRow:"1 / -1",children:d.jsx(m.ScrollArea,{style:{display:"grid",height:"100%"},children:d.jsx(m.Box,{flexGrow:1,borderRadius:{topRight:8,topLeft:8},borderStyle:n?"solid":"dashed",border:{top:!0,right:!0,left:!0,bottom:!1},minWidth:0,children:t})})})}function Pq(e){const{onFilesUpload:t,isUploading:n,isInitialLoad:r=!1}=e,i=r||n;return d.jsxs(m.Box,{flexDirection:"column",justifyContent:"center",alignItems:"center",padding:16,gap:16,width:"100%",children:[d.jsx(m.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),d.jsx(m.Box,{flexDirection:"column",gap:4,children:d.jsxs(m.Text,{align:"center",children:["Select or"," ",d.jsx(m.FileUploadButton,{disabled:i,onFilesSelected:t,renderButton:o=>d.jsx(m.Tooltip,{title:Rl.warning.uploadWhileUploading.title,content:Rl.warning.uploadWhileUploading.description,visible:n,children:d.jsx(m.Box,{display:"inline-flex",as:"span",children:d.jsx(m.Button,{disabled:i,onClick:o,invisible:!0,children:"upload"})})})})," ","media."]})}),d.jsx(m.FileUploadButton,{disabled:i,onFilesSelected:t,color:"grey",children:"Upload media"})]})}function iwe(e){const{actionContainerRef:t}=e;return d.jsx(Uq,{sidePane:d.jsx(uwe,{}),mediaActions:d.jsx(awe,{actionContainerRef:t}),mediaToolbar:d.jsx(m.Skeleton,{color:"grey5",borderRadius:12,children:d.jsx(Bq,{count:888})}),mediaList:d.jsx(owe,{})})}function owe(){return d.jsx(Wq,{children:gn.range(1,24).map(e=>d.jsx(Dq,{},e))})}function awe(e){const{actionContainerRef:t}=e,n=Xe.useForceUpdate();return R.useLayoutEffect(()=>{n()},[n]),d.jsx(Lq,{actionContainerRef:t,children:d.jsxs(m.Box,{width:"100%",gap:16,children:[d.jsx(m.Box,{width:"100%",flexDirection:"column",children:d.jsx(m.FormSearchInput,{placeholder:"Search",maxLength:200,value:"",disabled:!0,onValueChange:()=>{}})}),d.jsx(m.FileUploadButton,{disabled:!0,onFilesSelected:()=>{},startIcon:"cloudUpload",color:t?"purple":"grey",size:"large",children:"Upload media"})]})})}function uwe(){return d.jsx(Kq,{hasSelectedMedia:!1,children:d.jsx(Pq,{onFilesUpload:()=>{},isUploading:!1,isInitialLoad:!0})})}function Dq(){return d.jsxs(m.Box,{height:302,width:"100%",flexDirection:"column",padding:16,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,children:[d.jsx(m.Skeleton,{height:164,width:"100%"}),d.jsx(m.Skeleton,{height:16,width:"100%",sx:{marginTop:12}}),d.jsx(m.Skeleton,{height:10,width:100,sx:{marginTop:8}}),d.jsx(m.Skeleton,{height:1,width:"100%",sx:{marginTop:20,marginBottom:16}}),d.jsxs(m.Box,{flexDirection:"row",gap:8,children:[d.jsx(m.Skeleton,{height:24,width:54}),d.jsx(m.Skeleton,{height:24,width:45}),d.jsx(m.Skeleton,{height:24,width:62})]})]})}const Nq=R.createContext({showToast:()=>{}});function swe(e){const{children:t}=e,{isFetchingMedia:n}=Et(),[r,i]=R.useState({title:"",seconds:5}),[o,a]=R.useState(!1),{title:u,action:s,seconds:c=1,icon:l="check"}=r,f=R.useMemo(()=>({showToast:p=>{i({seconds:c,...p}),a(!0)}}),[c]);return d.jsxs(d.Fragment,{children:[d.jsx(cwe,{open:n}),d.jsx(lwe,{}),d.jsx(m.Toast,{anchor:d.jsx(m.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:o,onOpenChange:a,title:u,action:s,seconds:c,icon:l}),d.jsx(Nq.Provider,{value:f,children:t})]})}function qq(){return R.useContext(Nq)}function cwe(e){const{open:t}=e;return d.jsx(m.Toast,{anchor:d.jsx(m.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more items ...",seconds:1})}function lwe(){const{revalidateMedia:e,isMediaCacheInvalid:t}=Et(),[n,r]=R.useState(t);return Xe.useOnChange(t,r),d.jsx(m.Toast,{anchor:d.jsx(m.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:n,title:"There has been changes to your media library",action:{title:"Update",onClick:e},cancel:{onClick:()=>r(!1)}})}function fwe(){const{media:e,mediaTotal:t,tagIds:n}=Et(),r=qu(),i=xe(),o=i.mediaLibrary&&i.mediaLibraryTagsEnabled;return d.jsxs(m.Box,{alignItems:"center",gap:16,children:[r.isSelectAllEnabled&&d.jsx(m.Checkbox,{onCheckedChange:r.toggleSelectAll,checked:r.selectedCount>0,indeterminate:r.selectedCount!==t,onClick:a=>a.stopPropagation(),disabled:e.length===0}),e.length!==0&&d.jsx(Bq,{count:t}),o&&d.jsxs(m.Box,{gap:8,alignItems:"center",children:[d.jsx(m.Text,{children:"Filter:"}),d.jsx(pwe,{}),n.length>0&&d.jsx(m.ErrorBoundary,{children:d.jsx(R.Suspense,{children:d.jsx(dwe,{})})})]})]})}function dwe(){const{tagIds:e,onTagIdsChange:t}=Et(),{tags:n}=yh(),r=R.useMemo(()=>hV.groupBy(n,o=>o.id),[n]);function i(o){const a=e.filter(u=>u!==o.id);t(a)}return d.jsx(d.Fragment,{children:e.map(o=>{var u;const a=(u=r.get(o))==null?void 0:u[0];return a?d.jsx(m.Badge,{title:a.name,size:"medium",color:"purple",onClose:()=>i(a),selected:!0},a.id):null})})}function pwe(){const{setTagManagerOpen:e,tagIds:t,onTagIdsChange:n}=Et(),[r,i]=R.useState(""),[o,a]=R.useState(!1);function u(l){a(l),l||i("")}function s(l){const f=t.includes(l.id)?t.filter(p=>p!==l.id):[...t,l.id];n(f),a(!1)}function c(){a(!1),e(!0)}return d.jsxs(m.DropdownMenu,{open:o,onOpenChange:u,children:[d.jsx(m.DropdownMenuTrigger,{children:d.jsx(m.Button,{startIcon:"label",endIcon:"arrowDropDown",size:"small",color:"grey",children:"Tags"})}),d.jsx(m.DropdownMenuContent,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:d.jsxs(m.ComboBox,{variant:"attached",children:[d.jsx(m.ComboBoxInput,{value:r,onValueChange:i,placeholder:"Search for a tag",autoFocus:!0}),d.jsx(m.ComboBoxContent,{children:d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(m.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:d.jsx(R.Suspense,{fallback:d.jsx(m.Box,{padding:8,flexDirection:"column",gap:8,children:gn.range(1,6).map(l=>d.jsx(m.Skeleton,{height:24,width:85},l))}),children:d.jsx(Awe,{searchTerm:r,setSearchTerm:i,onTagToggle:s})})})}),d.jsx(m.ComboboxAction,{children:d.jsx(m.Button,{invisible:!0,startIcon:"edit",textWeight:"normal",color:"dark",onClick:c,children:"Manage tags"})})]})})]})}function Awe(e){const{onTagToggle:t,searchTerm:n}=e,{tagIds:r}=Et(),{tags:i}=yh(),o=R.useMemo(()=>{const a=n.toLowerCase();return i.filter(u=>u.name.toLowerCase().includes(a))},[i,n]);return d.jsxs(d.Fragment,{children:[!o.length&&d.jsx(m.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),o.map((a,u)=>{const s=r.includes(a.id);return d.jsx(m.ComboBoxItem,{value:a.id,onCheckedChange:()=>t(a),checked:s,children:d.jsx(m.Badge,{title:a.name,color:"purple",sx:{marginLeft:8,marginBottom:u===o.length-1?8:4,marginTop:u===0?8:4},size:"medium"})},a.id)})]})}function jc(){const{media:e}=Et(),t=qu();return e.filter(({id:n})=>t.isSelected(n))}function hwe(){const[e,t]=R.useState(!1),n=jc(),r=qu(),i=R.useMemo(()=>n.some(({id:a})=>a.startsWith("temp")),[n]),[o]=n;return o?r.selectedCount>1?d.jsxs(m.Box,{gap:8,alignItems:"center",children:[d.jsxs(m.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:[r.selectedCount," media selected"]}),d.jsx(m.Tooltip,{content:"Open all selected media in new tabs",children:d.jsx(m.IconButton,{icon:"openInFull",variant:"solid",size:"small",onClick:()=>n.forEach(a=>window.open(a.url,"_blank"))})}),d.jsx(m.Tooltip,{content:"Remove selected media",children:d.jsx(m.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),d.jsx(LF,{open:e,onOpenChange:t,media:n})]}):d.jsxs(m.Box,{gap:8,alignItems:"center",children:[d.jsx(m.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:o.filename}),d.jsxs(m.Box,{gap:8,children:[d.jsx(m.Tooltip,{content:"Open media in new tab",children:d.jsx(m.IconButton,{icon:"openInFull",variant:"solid",size:"small",hiddenLabel:"Open media in new tab",onClick:()=>window.open(o.url,"_blank"),disabled:i})}),d.jsx(m.Tooltip,{content:"Copy media URL",children:d.jsx(m.IconButton,{icon:"link",variant:"solid",size:"small",hiddenLabel:"Copy media URL",onClick:()=>navigator.clipboard.writeText(o.url),disabled:i})}),d.jsx(m.Tooltip,{content:"Remove media",children:d.jsx(m.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),d.jsx(LF,{open:e,onOpenChange:t,media:o})]})]}):null}function LF(e){const{open:t,onOpenChange:n,media:r}=e,i=xe(),{showAlert:o}=m.useAlert(),{deleteMedia:a}=Et(),u=qu(),[s,c]=R.useState(!1),l=Array.isArray(r),f=l?"these items":"this item";function p(){c(!0);const h=u.getSelectionState().selectedIds;gwe({ids:h,config:i}).then(()=>{n(!1),a(h),u.clearSelection()}).catch(()=>{n(!1),o({title:"Error",subtitle:`Something went wrong when removing ${f}.`})}).finally(()=>{c(!1)})}return d.jsxs(m.Dialog,{onOpenChange:n,open:t,size:"small",children:[d.jsx(m.DialogHeader,{icon:"alert",title:`Remove ${f} from your media library?`}),d.jsx(m.DialogContent,{children:d.jsx(m.Box,{padding:16,children:d.jsxs(m.Text,{children:["You are about to delete ",f,":  ",l?d.jsx(mwe,{media:r}):d.jsx("b",{children:r.filename})]})})}),d.jsxs(m.DialogActions,{children:[d.jsx(m.DialogCancelButton,{}),d.jsxs(m.DialogActionButton,{onClick:p,color:"tomato",loading:s,children:["Yes, I want to remove ",f]})]})]})}const Pb=15;function mwe({media:e}){const t=e.slice(0,Pb),n=e.length>Pb,r=n?e.length-Pb:0,i=r===1?"item":"items";return d.jsxs("ul",{children:[t.map((o,a)=>d.jsx("li",{children:d.jsx("b",{children:o.filename})},a)),n&&d.jsxs("span",{children:[d.jsx("br",{}),"And ",d.jsx("b",{children:r})," more ",i,"..."]})]})}function gwe(e){const{ids:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");if(t.length===0)throw new Error("No ids provided during media deletion");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;if(t.length===1){const[a]=t;return _e.request(new URL(`assets/${a}`,r),{headers:{repository:i},method:"DELETE",credentials:_e.getRequestCredentials(o),okType:B.unknown()})}return _e.request(new URL("assets/bulk-delete",r),{headers:{repository:i},method:"POST",credentials:_e.getRequestCredentials(o),okType:B.unknown(),body:{ids:t}})}function vwe(){var o;const e=jc(),{uploadingFiles:t}=Et(),[n]=e;if(!n)return null;if(e.length===2)return d.jsx(Db,{children:e.map((a,u)=>d.jsx("div",{style:{position:"absolute",transform:u===0?"translateX(25%) rotate(15deg) ":"translateX(-25%) rotate(-15deg) "},children:d.jsx(jF,{media:a})},a.id))});if(e.length>2)return d.jsx(Db,{children:e.slice(-4).map((a,u)=>d.jsx("div",{style:{position:"absolute",paddingRight:u*16},children:d.jsx(jF,{media:a})},a.id))});const r=(o=t.find(a=>a.id===n.id))==null?void 0:o.status,i=n.kind.startsWith("image");return d.jsx(m.Box,{flexDirection:"column",children:d.jsx(m.CheckerBoard,{children:d.jsx(Db,{uploadStatus:r,hasImage:i,children:i?d.jsx(m.Image,{src:n.url,alt:n.alt,sizing:"contain"}):d.jsx(m.MediaCardPlaceholder,{extension:n.extension,filename:n.filename})})})})}function Db(e){const{children:t,uploadStatus:n,hasImage:r}=e;return d.jsxs(m.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:200,width:"100%",backgroundColor:r?"transparent":"purple2",children:[t,n&&d.jsx(m.Box,{position:"absolute",backgroundColor:"greyAlpha1",width:"100%",height:"100%",padding:{inline:16},justifyContent:"end",flexDirection:"column",children:d.jsx(m.MediaProgress,{status:n})})]})}function jF(e){const{media:t}=e;return d.jsx(m.Box,{width:111,height:152,children:t.kind==="image"?d.jsx(m.Image,{borderRadius:8,src:t.url,alt:t.alt,sizing:"cover"}):d.jsx(m.MediaCardPlaceholder,{extension:t.extension,filename:t.filename})})}const Xa=2e3,dd="__MAIN_THUMBNAIL__";function J1(e,t,n){const r=e.name===dd?void 0:e.name;let i;return t?to.isDefined(n)?i=[n.width,n.height]:to.isDefined(e.width)||to.isDefined(e.height)?i=[e.width??void 0,e.height??void 0]:i=[t.origin.width,t.origin.height]:i=void 0,[r,i?`${i[0]??"auto"}x${i[1]??"auto"}px`:void 0]}function ywe(e){var t,n;return[{...(t=e.config)==null?void 0:t.constraint,name:dd}].concat(((n=e.config)==null?void 0:n.thumbnails)??[])}function bwe(e,t){var a,u;const{__TYPE__:n,thumbnails:r,...i}=t,o=(u=(a=e.config)==null?void 0:a.thumbnails)==null?void 0:u.map(({name:s})=>r==null?void 0:r[s]);return[i,...o??[]]}function Cwe(e,t,n,r){const i=r.length===0?void 0:r;return e===dd||!Ue.isImageContent(t)?{...t,alt:i}:{...t,thumbnails:{...t.thumbnails,[e]:{...n,alt:i}}}}function Swe(e,t){const{width:n,height:r}=t??{};return n&&r?[n,r]:n?[n,Math.round(e.height*(n/e.width))]:r?[Math.round(e.width*(r/e.height)),r]:[e.width,e.height]}function _we(e,t,n,r,i){if(Ewe(e)==="svg")return e;const o=new URL(e);if(i){const{x:a,y:u,width:s,height:c}=t,l=[...o.searchParams.entries(),["rect",[a,u,s,c].join(",")],["w",n],["h",r]];o.search=l.map(f=>f.join("=")).join("&")}return o.toString()}function Qq(e){const t=new URL(e);return t.searchParams.delete("q"),t.searchParams.set("w","800"),t.searchParams.set("h","800"),t.searchParams.set("auto","compress,format"),t.searchParams.set("fit","max"),t.toString()}function Iwe(e){const t=new URL(e);return t.searchParams.delete("q"),t.searchParams.delete("fm"),t.searchParams.set("w","300"),t.searchParams.set("auto","compress,format"),t.toString()}function Twe(e){return e!=null&&e.url?Qq(e.url):void 0}function xwe(e,t,n,r){var u,s,c,l,f;if(!n||e===dd){const p=(u=t.config)==null?void 0:u.thumbnails,A=p&&Object.fromEntries(p.map(h=>[h.name,Xh(r,h)]));return{__TYPE__:"ImageContent",...Xh(r,(s=t.config)==null?void 0:s.constraint),thumbnails:A}}const i=(l=(c=t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===e);if(!i)return n;const o=(f=n.thumbnails)==null?void 0:f[e],a=Xh(r,i);return a.url===(o==null?void 0:o.url)?n:{...n,thumbnails:Pl.mapValues(n.thumbnails??{},(p,A)=>A===e?a:p)}}function wwe(e){return"kind"in e&&"extension"in e}function Xh(e,t){const{width:n,height:r,rect:i}=$we({...e,width:(e==null?void 0:e.width)??Xa,height:(e==null?void 0:e.height)??Xa},t),o=!!(t!=null&&t.width||t!=null&&t.height);return{url:_we(e.url,i,n,r,o),alt:e.alt,...wwe(e)?{credits:e.credits}:{},origin:{id:e.id,url:e.url,width:e.width??Xa,height:e.height??Xa},width:n,height:r,edit:{background:"transparent",zoom:1,crop:{x:i.x,y:i.y}}}}function $we(e,t){const[n,r]=Swe(e,t),i=Math.max(n/e.width,r/e.height),o=Math.round((e.width-n/i)/2),a=Math.round((e.height-r/i)/2),u=Math.round(n/i),s=Math.round(r/i);return{width:n,height:r,rect:{x:o,y:a,width:u,height:s}}}function Ewe(e){const{pathname:t}=new URL(e),n=t.lastIndexOf(".");if(n!==-1)return t.substring(n).slice(1).toLowerCase()}function Rwe(e){if(!e)return"";const{filename:t,extension:n}=e;if(!n)return t;const r=new RegExp(`\\.${n}$`);return t.replace(r,"")}function Vq(e){const{tags:t,toggleAssetTag:n,getTagsLabel:r}=e,{setTagManagerOpen:i}=Et(),{showToast:o}=qq(),{showAlert:a}=m.useAlert(),[u,s]=R.useState("");async function c(l,f){s("");try{await n(l,f),o({title:"Media tags were updated",seconds:3})}catch{a({title:"Error",subtitle:"Something went wrong when updating media tags"})}}return d.jsxs(m.Box,{flexDirection:"column",children:[d.jsxs(m.Box,{justifyContent:"space-between",children:[d.jsx(m.Text,{color:"grey12",variant:"bold",children:r()}),d.jsx(m.Button,{startIcon:"edit",invisible:!0,color:"dark",onClick:()=>i(!0),children:"Manage tags"})]}),d.jsxs(m.ComboBox,{sx:{marginTop:4,marginBottom:8},children:[d.jsx(Owe,{searchTerm:u,setSearchTerm:s}),d.jsx(m.ComboBoxContent,{children:d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(m.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:d.jsx(R.Suspense,{fallback:d.jsx(m.Box,{padding:8,flexDirection:"column",gap:8,children:gn.range(1,6).map(l=>d.jsx(m.Skeleton,{height:24,width:85},l))}),children:d.jsx(Fwe,{searchTerm:u,assignedTags:t,onToggleAssetTag:c})})})})]}),d.jsx(m.Box,{flexDirection:"column",alignItems:"flex-start",gap:8,children:t.map(l=>d.jsx(m.Badge,{title:l.name,size:"medium",color:"purple",selected:!0,onClose:()=>c(l,"remove")},l.id))})]})}function Owe(e){const{searchTerm:t,setSearchTerm:n}=e,r=R.useRef(null),{openMediaSection:i,setOpenMediaSection:o}=Et();return R.useEffect(()=>{var a;i==="tags"&&((a=r.current)==null||a.focus(),o(void 0))},[i,o]),d.jsx(m.ComboBoxInput,{value:t,onValueChange:n,placeholder:"Add or create a new tag",ref:r})}function Fwe(e){const{searchTerm:t,assignedTags:n,onToggleAssetTag:r}=e,[i]=jc(),o=xe(),{showAlert:a}=m.useAlert(),{tags:u}=yh(),s=R.useMemo(()=>{const p=t.toLowerCase();return u.filter(A=>A.name.toLowerCase().includes(p))},[u,t]),l=wR.safeParse(t).success&&u.every(p=>p.name!==t);async function f(){if(!t||!i)return;let p;try{p=await Mwe({name:t,config:o}),bh(A=>[p,...A])}catch{a({title:"Error",subtitle:`Something went wrong when creating the tag ${t}`});return}await r(p,"add")}return i?d.jsxs(d.Fragment,{children:[!s.length&&d.jsx(m.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),s.map((p,A)=>d.jsx(m.ComboBoxItem,{value:p.id,onCheckedChange:h=>r(p,h?"add":"remove"),checked:n.some(h=>h.id===p.id),children:d.jsx(m.Badge,{title:p.name,color:"purple",size:"medium",sx:{marginInline:8,marginBottom:A===s.length-1?8:4,marginTop:A===0?8:4}})},p.id)),l&&d.jsx(m.ComboBoxItem,{value:"new",onCheckedChange:f,children:d.jsxs(m.Box,{padding:8,flexDirection:"row",alignItems:"center",gap:4,children:[d.jsx(m.Icon,{name:"add",size:"small",color:"grey11"}),d.jsxs(m.Text,{color:"grey12",children:['Create tag "',t,'"']})]})})]}):null}function Mwe(e){const{name:t,config:n}=e;n.mediaLibrary||Bn("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return _e.request(new URL("tags",r),{headers:{repository:i},body:{name:t},method:"POST",credentials:_e.getRequestCredentials(o),okType:$R})}function kwe(e){const{selectedMedia:t}=e,n=xe(),r=R.useMemo(()=>jwe(t),[t]);async function i(a,u){const s=u==="remove",c=t.map(f=>f.id);let l=[];Ms(f=>(l=f,f.map(p=>c.includes(p.id)?s?Bwe(p,a):Uwe(p,a):p)));try{await Lwe({tagId:a.id,assetIds:c,operation:s?"remove":"add",config:n});const f=t.length*(s?-1:1);bh(p=>p.map(A=>A.id===a.id?{...A,count:A.count+f}:A))}catch(f){throw Ms(()=>l),f}}function o(){const a=r.length;return a>1?`${a} tags in common`:a===1?"1 tag in common":"Common tags"}return d.jsx(Vq,{tags:r,getTagsLabel:o,toggleAssetTag:i})}function Lwe(e){const{tagId:t,assetIds:n,config:r,operation:i}=e;if(!r.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:o,repository:a,authStrategy:u}=r;return _e.request(new URL(`tags/${t}/assets`,o),{headers:{repository:a},body:{assetIds:n},method:i==="add"?"POST":"DELETE",credentials:_e.getRequestCredentials(u),okType:B.unknown()})}function jwe(e){const t=e.length,n={},r=[];return e.forEach(o=>{o.tags.forEach(a=>{n[a.id]||(n[a.id]=0,r.push(a)),n[a.id]++})}),r.filter(o=>n[o.id]===t)}function Uwe(e,t){return e.tags.some(({id:r})=>r===t.id)?e:{...e,tags:[...e.tags,t]}}function Bwe(e,t){const n=e.tags.filter(r=>r.id!==t.id);return{...e,tags:n}}function Wwe(e){const{selectedMedia:t}=e,n=t.tags,r=xe(),{updateMedia:i}=Et();async function o(u,s){const c=t.tags,l=s==="remove",f=l?c.filter(p=>p.id!==u.id):[...c,u];i(t.id,{tags:f});try{await Kwe({mediaId:t.id,config:r,tags:f.map(p=>p.id)}),bh(p=>p.map(A=>A.id===u.id?{...A,count:A.count+(l?-1:1)}:A))}catch(p){throw i(t.id,{tags:c}),p}}function a(){const u=n.length;return u>1?`${u} tags`:u===1?"1 tag":"Tags"}return d.jsx(Vq,{tags:n,getTagsLabel:a,toggleAssetTag:o})}function Kwe(e){const{mediaId:t,config:n,tags:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return _e.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{tags:r},method:"PATCH",credentials:_e.getRequestCredentials(a),okType:K0})}function Pwe(){const[e,t]=R.useState("description");if(jc().length!==1)return d.jsx(Qwe,{});const r=e==="description",i=e==="more-info";return d.jsxs(d.Fragment,{children:[d.jsxs(m.Box,{border:!0,borderStyle:"solid",borderRadius:8,backgroundColor:"grey2",children:[d.jsx(m.Tab,{title:"Description",selected:r,onSelect:()=>t("description"),outline:r,background:r?void 0:"transparent",sx:{flexGrow:1,flexBasis:0}}),d.jsx(m.Tab,{title:"More info",selected:i,onSelect:()=>t("more-info"),outline:i,background:i?void 0:"transparent",sx:{flexGrow:1,flexBasis:0}})]}),d.jsx(Dwe,{tab:e})]})}function Dwe(e){const{tab:t}=e;switch(t){case"description":return d.jsx(Nwe,{});case"more-info":return d.jsx(qwe,{})}}function Nwe(){const{title:e,alt:t,onBlur:n,isUploading:r,selectedMedia:i}=zq(),o=xe(),a=o.mediaLibrary&&o.mediaLibraryTagsEnabled;if(!i)return null;const{extension:u}=i;return d.jsxs(m.Box,{flexDirection:"column",gap:16,children:[d.jsx(m.FormInput,{value:e.value,onValueChange:e.set,label:"Media title",placeholder:"Media title",onBlur:n,disabled:r,suffix:u?`.${u}`:void 0}),d.jsx(m.FormField,{label:"Alternative text",children:d.jsx(m.ContentEditable,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"A short description of the media for accessibility",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})}),a&&!r&&d.jsx(Wwe,{selectedMedia:i})]})}function qwe(){const{credits:e,notes:t,onBlur:n,isUploading:r,selectedMedia:i}=zq();if(!i)return null;const o=Hwe(i);return d.jsxs(m.Box,{gap:8,flexDirection:"column",children:[o.map(a=>d.jsxs(m.Box,{gap:8,children:[d.jsxs(m.Text,{color:"grey11",children:[a.label,":"]}),d.jsx(m.Text,{children:a.value})]},a.label)),d.jsx(m.FormField,{label:"Copyright",children:d.jsx(m.ContentEditable,{content:e.displayValue,contentVersion:e.version,readOnly:r,placeholder:"Media copyrights or credits",multiline:!0,decorations:{em:"highlight"},onChange:e.onChange,onBlur:n})}),d.jsx(m.FormField,{label:"Private notes",children:d.jsx(m.ContentEditable,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"Private notes are never shared publicly",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})})]})}function Qwe(){const e=jc(),{uploadingFiles:t}=Et(),n=xe(),r=R.useMemo(()=>t.some(o=>e.some(a=>o.id===a.id)&&o.status!=="success"),[e,t]),i=n.mediaLibrary&&n.mediaLibraryTagsEnabled;return d.jsx(d.Fragment,{children:i&&!r&&d.jsx(kwe,{selectedMedia:e})})}function zq(){const[e]=jc(),{updateMedia:t,uploadingFiles:n}=Et(),r=xe(),{showToast:i}=qq(),o=(e==null?void 0:e.id)??"",a=Ph(e,"alt"),u=Ph(e,"notes"),s=Ph(e,"credits"),c=Ph(e,"filename",Rwe),l=n.some(p=>p.id===(e==null?void 0:e.id)&&p.status!=="success");function f(){if(!e||!c.changed&&!a.changed&&!s.changed&&!u.changed)return;const{extension:p,search_highlight:A}=e,h=p?`${c.value}.${p}`:c.value;t(o,{filename:h,alt:a.value,credits:s.value,notes:u.value,search_highlight:{alt:a.changed||A==null?void 0:A.alt,credits:s.changed||A==null?void 0:A.credits,filename:c.changed||A==null?void 0:A.filename,notes:u.changed||A==null?void 0:A.notes}}),zwe({id:o,config:r,metadata:{filename:h,alt:a.value,credits:s.value,notes:u.value}}).then(()=>{i({title:"Media metadata has been saved.",seconds:3})}).catch(v=>{console.error(v)})}return{selectedMedia:e,onBlur:f,isUploading:l,title:c,alt:a,credits:s,notes:u,extension:e==null?void 0:e.extension}}function Ph(e,t,n=r=>r==null?void 0:r[t]){var c;const r=n(e)??"",[i,o]=R.useState(r);Xe.useOnChange(e==null?void 0:e.id,()=>o(r));const a=(c=e==null?void 0:e.search_highlight)==null?void 0:c[t],u=!!a;function s(l){const{from:f,to:p}=l.state.selection;l.commands.selectAll(),l.commands.unsetAllMarks(),l.commands.setTextSelection({from:f,to:p}),o(l.getText())}return{value:i,set:o,displayValue:Vwe(a??i)??"",onChange:s,version:`${(e==null?void 0:e.id)??""}_${u}`,changed:i!==r}}function Vwe(e){return e==null?void 0:e.replace(/\n/g,"<br>")}function zwe(e){const{id:t,config:n,metadata:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return _e.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{...r},method:"PATCH",credentials:_e.getRequestCredentials(a),okType:K0})}function Hwe(e){const{width:t,height:n,last_modified:r,size:i,extension:o}=e,a=t&&n,u={label:"Date",value:PC.prettyPrintDate(new Date(r))},s={label:"File size",value:Ip.formatBytes(i)},c=a?{label:"Dimensions",value:`${t}x${n}`}:void 0,l=a?{label:"Ratio",value:((t??0)/(n??0)).toFixed(1)}:void 0,f=o?{label:"Extension",value:o.toUpperCase()}:void 0;return[u,s,c,l,f].filter(to.isDefined)}function Ywe(){const{setTagManagerOpen:e}=Et(),[t,n]=R.useState("");return d.jsxs(m.Box,{gap:20,flexDirection:"column",height:"100%",children:[d.jsxs(m.Box,{alignItems:"center",gap:4,children:[d.jsx(m.IconButton,{icon:"close",size:"small",hasPadding:!1,onClick:()=>e(!1)}),d.jsx(m.Text,{variant:"bold",children:"Tags management"})]}),d.jsxs(m.Box,{gap:16,flexDirection:"column",height:"100%",children:[d.jsx(m.FormSearchInput,{value:t,onValueChange:n,placeholder:"Search for tags",endAdornment:!1,autoFocus:!0}),d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(Xwe,{}),children:d.jsx(R.Suspense,{fallback:d.jsx(n$e,{}),children:d.jsx(Gwe,{searchTerm:t})})})]})]})}function Gwe(e){const{searchTerm:t}=e,{tags:n}=yh(),r=n.filter(i=>i.name.toLowerCase().includes(t.toLowerCase()));return r.length===0?d.jsx(m.Text,{color:"grey9",variant:"small",children:"No tags found"}):d.jsx(m.AnimatedList,{ariaLabel:"Tags list",getItemKey:i=>i.id,gap:16,items:r,children:i=>d.jsx(Jwe,{tag:i})})}function Jwe(e){const{tag:t}=e,[n,r]=R.useState(!1),i=xe(),{showAlert:o}=m.useAlert(),{showToast:a}=m.useToast(),{tags:u}=yh();async function s(c){if(!wR.safeParse(c).success){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag name must be at least ${wq} and at maximum ${$q} characters long.`});return}if(u.some(p=>p.name===c)){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag with name "${c}" already exists.`});return}try{await t$e({id:t.id,name:c,config:i}),bh(p=>p.map(A=>A.id===t.id?{...A,name:c}:A)),Ms(p=>p.map(A=>{if(A.tags.findIndex(v=>v.id===t.id)!==-1){const v=A.tags.map(_=>_.id===t.id?{..._,name:c}:_);return{...A,tags:v}}return A})),a({title:`Tag "${t.name}" renamed to "${c}"`,seconds:3})}catch{o({title:"Error",subtitle:"Something went wrong when renaming the tag."})}}return d.jsxs(d.Fragment,{children:[d.jsxs(m.Box,{justifyContent:"space-between",children:[d.jsx(m.Badge,{title:t.name,color:"purple",size:"medium",onEdit:s}),d.jsx(m.Button,{invisible:!0,color:"tomato",textWeight:"normal",onClick:()=>r(!0),children:"Delete"})]}),d.jsx(Zwe,{open:n,onOpenChange:r,tag:t})]})}function Zwe(e){const{open:t,onOpenChange:n,tag:r}=e,{id:i,name:o,count:a}=r,u=xe(),{showAlert:s}=m.useAlert(),[c,l]=R.useState(!1);async function f(){l(!0);try{await e$e({id:i,config:u}),bh(p=>p.filter(A=>A.id!==i)),Ms(p=>p.map(A=>{if(A.tags.findIndex(v=>v.id===i)!==-1){const v=A.tags.filter(_=>_.id!==i);return{...A,tags:v}}return A}))}catch{s({title:"Error",subtitle:"Something went wrong when removing the tag."})}finally{l(!1),n(!1)}}return d.jsxs(m.Dialog,{onOpenChange:n,open:t,size:"small",children:[d.jsx(m.DialogHeader,{title:`This tag is being used on ${a} media item${a===1?"":"s"}`}),d.jsx(m.DialogContent,{padding:16,children:d.jsxs(m.Text,{children:["You are about to delete the tag name ",d.jsx("b",{children:o}),"."," ",a>0&&`This tag is being
31
+ */var $F;function vTe(){if($F)return md;$F=1;var e=R,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(u,s,c){var l,f={},p=null,A=null;c!==void 0&&(p=""+c),s.key!==void 0&&(p=""+s.key),s.ref!==void 0&&(A=s.ref);for(l in s)r.call(s,l)&&!o.hasOwnProperty(l)&&(f[l]=s[l]);if(u&&u.defaultProps)for(l in s=u.defaultProps,s)f[l]===void 0&&(f[l]=s[l]);return{$$typeof:t,type:u,key:p,ref:A,props:f,_owner:i.current}}return md.Fragment=n,md.jsx=a,md.jsxs=a,md}process.env.NODE_ENV==="production"?Q1.exports=vTe():Q1.exports=gTe();var d=Q1.exports;const yTe="media-library-",EF=`${yTe}newMediaLibraryFeaturesBannerClosed`;function aq(e){const{maxWidth:t}=e,[n,r]=R.useState(()=>!(Fh.localStorage.isAvailable()&&Fh.localStorage.read(EF)));function i(){r(!1),Fh.localStorage.isAvailable()&&Fh.localStorage.write(EF,String(Date.now()))}return n?d.jsx(m.Box,{justifyContent:"center",padding:{inline:16,block:12},backgroundColor:"purple9",children:d.jsxs(m.Box,{maxWidth:t,width:"100%",alignItems:"center",gap:8,children:[d.jsx(m.Box,{borderRadius:"100%",alignItems:"center",justifyContent:"center",width:28,height:28,border:!0,borderColor:"purple8",flexShrink:0,children:d.jsx(m.Icon,{name:"autoFixHigh",color:"white",size:"small"})}),d.jsxs("div",{children:[d.jsx(m.Text,{color:"white",variant:"bold",children:"New features on the Media Library now available!"}),d.jsxs(m.Box,{gap:4,flexWrap:"wrap",children:[d.jsx(m.Text,{color:"white",children:"Media Tagging, Filtering, Improved Search & Bulk Deletion"}),d.jsx(m.Text,{color:"white",variant:"bold",href:"https://prismic.io/lp/new-media-library",target:"_blank",rel:"noopener noreferrer",underline:!0,children:"Find out More →"})]})]}),d.jsx(m.Button,{invisible:!0,color:"white",sx:{marginLeft:"auto",marginBottom:"auto",flexShrink:0},underline:!0,onClick:i,children:"Close"})]})}):null}const uq=R.createContext(void 0),bTe={selectedIds:new Set,excludedIds:new Set,isAllSelected:!1};function sq(e){const{children:t,initialTotalItemCount:n,isSelectAllEnabled:r=!1}=e,[i,o]=R.useState(bTe),a=R.useRef(),u=R.useRef(n||0),s=R.useMemo(()=>{const{selectedIds:C,excludedIds:y,isAllSelected:x}=i;return x?u.current-y.size:C.size},[i]),c=R.useCallback(C=>{const{isAllSelected:y,selectedIds:x,excludedIds:w}=i;return y?!w.has(C):x.has(C)},[i]),l=Xe.useStableCallback(()=>{const{isAllSelected:C,selectedIds:y,excludedIds:x}=i;return{selectedIds:[...y],excludedIds:[...x],isAllSelected:C,selectedCount:s}}),f=Xe.useStableCallback(()=>{r&&o({isAllSelected:!0,selectedIds:new Set,excludedIds:new Set})}),p=Xe.useStableCallback(()=>{o({isAllSelected:!1,selectedIds:new Set,excludedIds:new Set})});R.useEffect(()=>{const{isAllSelected:C,selectedIds:y,excludedIds:x}=i,w=u.current;if(!(w===0||!r)){if(C&&x.size===w){p();return}if(!C&&y.size===w){f();return}}},[i,r,f,p]);const A=Xe.useStableCallback(C=>{const{id:y,isSingleSelection:x,metaKey:w,shiftKey:M,ids:O}=C;return M&&O&&O.length>0&&a.current?v(y,O,a.current):x&&!w?h(y):c(y)?I([y]):S([y]),a.current=y,c(y)});function h(C){c(C)&&s===1?o(y=>({...y,selectedIds:new Set})):o({isAllSelected:!1,selectedIds:new Set([C]),excludedIds:new Set})}function v(C,y,x){const w=CTe(y,x,C),M=c(C);return M?I(w):S(w),M}const _=Xe.useStableCallback(()=>{s>0?p():f()});function S(C){const{isAllSelected:y}=i;if(y){o(x=>({...x,excludedIds:RF(x.excludedIds,C)}));return}o(x=>({...x,selectedIds:OF(x.selectedIds,C)}))}function I(C){const{isAllSelected:y}=i;if(y){o(x=>({...x,excludedIds:OF(x.excludedIds,C)}));return}o(x=>({...x,selectedIds:RF(x.selectedIds,C)}))}function T(C){u.current=C}const g=R.useMemo(()=>({selectedCount:s,state:i,totalItemCount:u.current,isSelected:c,isSelectAllEnabled:r,getSelectionState:l,toggleSelection:A,toggleSelectAll:_,clearSelection:p,setTotalItemCount:T}),[i,p,l,r,c,s,_,A]);return d.jsx(uq.Provider,{value:g,children:t})}function qu(e){const t=R.useContext(uq);if(t===void 0)throw new Error("useSelectionManagerContext must be used within a SelectionManagerProvider");const{totalItemCount:n,onChangeSelection:r}=e||{},{setTotalItemCount:i,totalItemCount:o,state:a,getSelectionState:u,...s}=t;n!==void 0&&n!==o&&i(n);const c=Xe.useStableCallback(r);return R.useEffect(()=>{c==null||c(u())},[u,c,a]),{...s,getSelectionState:u,isAllSelected:a.isAllSelected}}function CTe(e,t,n){const r=e.indexOf(t),i=e.indexOf(n);if(r===-1||i===-1)throw new Error("Both startValue and endValue must be in the array");return r<=i?e.slice(r,i+1):e.slice(i,r+1)}function RF(e,t){const n=new Set(e);return t.forEach(r=>n.delete(r)),n}function OF(e,t){return new Set([...e,...t])}function cq(){return d.jsx(m.Box,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:"grey3",children:d.jsxs(m.BlankSlate,{children:[d.jsx(m.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(m.BlankSlateTitle,{size:"big",children:'"Oops!"'}),d.jsx(m.BlankSlateDescription,{width:360,children:`"We can't find any items with that name"`})]})})}const Rl={warning:{uploadWhileUploading:{title:"Hang tight!",description:"Your current images are still being uploaded. Once they're all set, you'll be free to upload more."}}},j0=R.createContext(void 0);function xe(){const e=R.useContext(j0);if(!e)throw new Error("Missing EditorConfigContext.Provider");return e}class V1 extends Error{}function Bn(e){throw new V1(`Missing EditorConfig.${e}`)}function STe(){if(new URL(location.href).searchParams.has("debug"))return;const n=console.error.bind(console);console.error=(...r)=>{r[0]instanceof V1||_Te(r)||n(...r)},window.addEventListener("error",r=>{r.error instanceof V1&&r.preventDefault(),ITe(r.error)&&r.preventDefault()})}function _Te(e){const t="Warning: flushSync was called from inside a lifecycle method",n=typeof e[0]=="string"&&e[0].includes(t),r=typeof e[1]=="string"&&e[1].includes("RichTextField");return n&&r}function ITe(e){const t=/Invalid content for node document: <(bulletList|orderedList)\(listItem*/,n=e.message;return!!(typeof n=="string"&&n.match(t))}const TTe="https://prismic.io/docs/guides/manage-images#supported-media";var Ve;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(u=>typeof i[i[u]]!="number"),a={};for(const u of o)a[u]=i[u];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(Ve||(Ve={}));var z1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(z1||(z1={}));const ee=Ve.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Za=e=>{switch(typeof e){case"undefined":return ee.undefined;case"string":return ee.string;case"number":return isNaN(e)?ee.nan:ee.number;case"boolean":return ee.boolean;case"function":return ee.function;case"bigint":return ee.bigint;case"symbol":return ee.symbol;case"object":return Array.isArray(e)?ee.array:e===null?ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ee.promise:typeof Map<"u"&&e instanceof Map?ee.map:typeof Set<"u"&&e instanceof Set?ee.set:typeof Date<"u"&&e instanceof Date?ee.date:ee.object;default:return ee.unknown}},H=Ve.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),xTe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class _i extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let u=r,s=0;for(;s<a.path.length;){const c=a.path[s];s===a.path.length-1?(u[c]=u[c]||{_errors:[]},u[c]._errors.push(n(a))):u[c]=u[c]||{_errors:[]},u=u[c],s++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ve.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}_i.create=e=>new _i(e);const Xd=(e,t)=>{let n;switch(e.code){case H.invalid_type:e.received===ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ve.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ve.joinValues(e.keys,", ")}`;break;case H.invalid_union:n="Invalid input";break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ve.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${Ve.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n="Invalid function arguments";break;case H.invalid_return_type:n="Invalid function return type";break;case H.invalid_date:n="Invalid date";break;case H.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ve.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case H.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case H.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case H.custom:n="Invalid input";break;case H.invalid_intersection_types:n="Intersection results could not be merged";break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ve.assertNever(e)}return{message:n}};let lq=Xd;function wTe(e){lq=e}function wm(){return lq}const $m=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};let u="";const s=r.filter(c=>!!c).slice().reverse();for(const c of s)u=c(a,{data:t,defaultError:u}).message;return{...i,path:o,message:i.message||u}},$Te=[];function ne(e,t){const n=$m({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,wm(),Xd].filter(r=>!!r)});e.common.issues.push(n)}class Mn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Ie;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Mn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Ie;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Ie=Object.freeze({status:"aborted"}),fq=e=>({status:"dirty",value:e}),Vn=e=>({status:"valid",value:e}),H1=e=>e.status==="aborted",Y1=e=>e.status==="dirty",Em=e=>e.status==="valid",Rm=e=>typeof Promise<"u"&&e instanceof Promise;var de;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(de||(de={}));class so{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const FF=(e,t)=>{if(Em(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new _i(e.common.issues);return this._error=n,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,u)=>a.code!=="invalid_type"?{message:u.defaultError}:typeof u.data>"u"?{message:r??u.defaultError}:{message:n??u.defaultError},description:i}}class Fe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Za(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Za(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Mn,ctx:{common:t.parent.common,data:t.data,parsedType:Za(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Rm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Za(t)},o=this._parseSync({data:t,path:i.path,parent:i});return FF(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Za(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Rm(i)?i:Promise.resolve(i));return FF(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),u=()=>o.addIssue({code:H.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(s=>s?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ri({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Jo.create(this,this._def)}nullable(){return Fs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ii.create(this,this._def)}promise(){return Fl.create(this,this._def)}or(t){return rp.create([this,t],this._def)}and(t){return ip.create(this,t,this._def)}transform(t){return new Ri({...$e(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new cp({...$e(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new pq({typeName:ve.ZodBranded,type:this,...$e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new km({...$e(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return vh.create(this,t)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ETe=/^c[^\s-]{8,}$/i,RTe=/^[a-z][a-z0-9]*$/,OTe=/[0-9A-HJKMNP-TV-Z]{26}/,FTe=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,MTe=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,kTe=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),LTe=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,jTe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,UTe=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function BTe(e,t){return!!((t==="v4"||!t)&&LTe.test(e)||(t==="v6"||!t)&&jTe.test(e))}class Ci extends Fe{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(i=>t.test(i),{validation:n,code:H.invalid_string,...de.errToObj(r)}),this.nonempty=t=>this.min(1,de.errToObj(t)),this.trim=()=>new Ci({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new Ci({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new Ci({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ee.string){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.string,received:o.parsedType}),Ie}const r=new Mn;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,u=t.data.length<o.value;(a||u)&&(i=this._getOrReturnCtx(t,i),a?ne(i,{code:H.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&ne(i,{code:H.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")MTe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"email",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")kTe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"emoji",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")FTe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"uuid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")ETe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"cuid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")RTe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"cuid2",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")OTe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"ulid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ne(i,{validation:"url",code:H.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"regex",code:H.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?UTe(o).test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?BTe(t.data,o.version)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"ip",code:H.invalid_string,message:o.message}),r.dirty()):Ve.assertNever(o);return{status:r.value,value:t.data}}_addCheck(t){return new Ci({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...de.errToObj(t)})}url(t){return this._addCheck({kind:"url",...de.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...de.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...de.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...de.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...de.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...de.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...de.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...de.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...de.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...de.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...de.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...de.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...de.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...de.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...de.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ci.create=e=>{var t;return new Ci({checks:[],typeName:ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};function WTe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class lu extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ee.number){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.number,received:o.parsedType}),Ie}let r;const i=new Mn;for(const o of this._def.checks)o.kind==="int"?Ve.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:H.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?WTe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:H.not_finite,message:o.message}),i.dirty()):Ve.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,i){return new lu({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(i)}]})}_addCheck(t){return new lu({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:de.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:de.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:de.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:de.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ve.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}lu.create=e=>new lu({checks:[],typeName:ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class fu extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ee.bigint){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.bigint,received:o.parsedType}),Ie}let r;const i=new Mn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Ve.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,i){return new fu({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(i)}]})}_addCheck(t){return new fu({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}fu.create=e=>{var t;return new fu({checks:[],typeName:ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};class ep extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ee.boolean){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.boolean,received:r.parsedType}),Ie}return Vn(t.data)}}ep.create=e=>new ep({typeName:ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class Rs extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ee.date){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.date,received:o.parsedType}),Ie}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_date}),Ie}const r=new Mn;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ve.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Rs({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:de.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:de.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Rs.create=e=>new Rs({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ve.ZodDate,...$e(e)});class Om extends Fe{_parse(t){if(this._getType(t)!==ee.symbol){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.symbol,received:r.parsedType}),Ie}return Vn(t.data)}}Om.create=e=>new Om({typeName:ve.ZodSymbol,...$e(e)});class tp extends Fe{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.undefined,received:r.parsedType}),Ie}return Vn(t.data)}}tp.create=e=>new tp({typeName:ve.ZodUndefined,...$e(e)});class np extends Fe{_parse(t){if(this._getType(t)!==ee.null){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.null,received:r.parsedType}),Ie}return Vn(t.data)}}np.create=e=>new np({typeName:ve.ZodNull,...$e(e)});class Ol extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Vn(t.data)}}Ol.create=e=>new Ol({typeName:ve.ZodAny,...$e(e)});class ds extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Vn(t.data)}}ds.create=e=>new ds({typeName:ve.ZodUnknown,...$e(e)});class na extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return ne(n,{code:H.invalid_type,expected:ee.never,received:n.parsedType}),Ie}}na.create=e=>new na({typeName:ve.ZodNever,...$e(e)});class Fm extends Fe{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.void,received:r.parsedType}),Ie}return Vn(t.data)}}Fm.create=e=>new Fm({typeName:ve.ZodVoid,...$e(e)});class Ii extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ee.array)return ne(n,{code:H.invalid_type,expected:ee.array,received:n.parsedType}),Ie;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,u=n.data.length<i.exactLength.value;(a||u)&&(ne(n,{code:a?H.too_big:H.too_small,minimum:u?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ne(n,{code:H.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ne(n,{code:H.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,u)=>i.type._parseAsync(new so(n,a,n.path,u)))).then(a=>Mn.mergeArray(r,a));const o=[...n.data].map((a,u)=>i.type._parseSync(new so(n,a,n.path,u)));return Mn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Ii({...this._def,minLength:{value:t,message:de.toString(n)}})}max(t,n){return new Ii({...this._def,maxLength:{value:t,message:de.toString(n)}})}length(t,n){return new Ii({...this._def,exactLength:{value:t,message:de.toString(n)}})}nonempty(t){return this.min(1,t)}}Ii.create=(e,t)=>new Ii({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...$e(t)});function Xc(e){if(e instanceof Ct){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jo.create(Xc(r))}return new Ct({...e._def,shape:()=>t})}else return e instanceof Ii?new Ii({...e._def,type:Xc(e.element)}):e instanceof Jo?Jo.create(Xc(e.unwrap())):e instanceof Fs?Fs.create(Xc(e.unwrap())):e instanceof co?co.create(e.items.map(t=>Xc(t))):e}class Ct extends Fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ve.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ee.object){const c=this._getOrReturnCtx(t);return ne(c,{code:H.invalid_type,expected:ee.object,received:c.parsedType}),Ie}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof na&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||u.push(c);const s=[];for(const c of a){const l=o[c],f=i.data[c];s.push({key:{status:"valid",value:c},value:l._parse(new so(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof na){const c=this._def.unknownKeys;if(c==="passthrough")for(const l of u)s.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(c==="strict")u.length>0&&(ne(i,{code:H.unrecognized_keys,keys:u}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const l of u){const f=i.data[l];s.push({key:{status:"valid",value:l},value:c._parse(new so(i,f,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const l of s){const f=await l.key;c.push({key:f,value:await l.value,alwaysSet:l.alwaysSet})}return c}).then(c=>Mn.mergeObjectSync(r,c)):Mn.mergeObjectSync(r,s)}get shape(){return this._def.shape()}strict(t){return de.errToObj,new Ct({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,u;const s=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(u=de.errToObj(t).message)!==null&&u!==void 0?u:s}:{message:s}}}:{}})}strip(){return new Ct({...this._def,unknownKeys:"strip"})}passthrough(){return new Ct({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ct({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ct({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ct({...this._def,catchall:t})}pick(t){const n={};return Ve.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ct({...this._def,shape:()=>n})}omit(t){const n={};return Ve.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ct({...this._def,shape:()=>n})}deepPartial(){return Xc(this)}partial(t){const n={};return Ve.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Ct({...this._def,shape:()=>n})}required(t){const n={};return Ve.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Jo;)o=o._def.innerType;n[r]=o}}),new Ct({...this._def,shape:()=>n})}keyof(){return dq(Ve.objectKeys(this.shape))}}Ct.create=(e,t)=>new Ct({shape:()=>e,unknownKeys:"strip",catchall:na.create(),typeName:ve.ZodObject,...$e(t)});Ct.strictCreate=(e,t)=>new Ct({shape:()=>e,unknownKeys:"strict",catchall:na.create(),typeName:ve.ZodObject,...$e(t)});Ct.lazycreate=(e,t)=>new Ct({shape:e,unknownKeys:"strip",catchall:na.create(),typeName:ve.ZodObject,...$e(t)});class rp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const a=o.map(u=>new _i(u.ctx.common.issues));return ne(n,{code:H.invalid_union,unionErrors:a}),Ie}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const s of r){const c={...n,common:{...n.common,issues:[]},parent:null},l=s._parseSync({data:n.data,path:n.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=a.map(s=>new _i(s));return ne(n,{code:H.invalid_union,unionErrors:u}),Ie}}get options(){return this._def.options}}rp.create=(e,t)=>new rp({options:e,typeName:ve.ZodUnion,...$e(t)});const Zh=e=>e instanceof ap?Zh(e.schema):e instanceof Ri?Zh(e.innerType()):e instanceof up?[e.value]:e instanceof du?e.options:e instanceof sp?Object.keys(e.enum):e instanceof cp?Zh(e._def.innerType):e instanceof tp?[void 0]:e instanceof np?[null]:null;class U0 extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.object)return ne(n,{code:H.invalid_type,expected:ee.object,received:n.parsedType}),Ie;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ne(n,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=Zh(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of a){if(i.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);i.set(u,o)}}return new U0({typeName:ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...$e(r)})}}function G1(e,t){const n=Za(e),r=Za(t);if(e===t)return{valid:!0,data:e};if(n===ee.object&&r===ee.object){const i=Ve.objectKeys(t),o=Ve.objectKeys(e).filter(u=>i.indexOf(u)!==-1),a={...e,...t};for(const u of o){const s=G1(e[u],t[u]);if(!s.valid)return{valid:!1};a[u]=s.data}return{valid:!0,data:a}}else if(n===ee.array&&r===ee.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const a=e[o],u=t[o],s=G1(a,u);if(!s.valid)return{valid:!1};i.push(s.data)}return{valid:!0,data:i}}else return n===ee.date&&r===ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ip extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(H1(o)||H1(a))return Ie;const u=G1(o.value,a.value);return u.valid?((Y1(o)||Y1(a))&&n.dirty(),{status:n.value,value:u.data}):(ne(r,{code:H.invalid_intersection_types}),Ie)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ip.create=(e,t,n)=>new ip({left:e,right:t,typeName:ve.ZodIntersection,...$e(n)});class co extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.array)return ne(r,{code:H.invalid_type,expected:ee.array,received:r.parsedType}),Ie;if(r.data.length<this._def.items.length)return ne(r,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ie;!this._def.rest&&r.data.length>this._def.items.length&&(ne(r,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,u)=>{const s=this._def.items[u]||this._def.rest;return s?s._parse(new so(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Mn.mergeArray(n,a)):Mn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new co({...this._def,rest:t})}}co.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new co({items:e,typeName:ve.ZodTuple,rest:null,...$e(t)})};class op extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.object)return ne(r,{code:H.invalid_type,expected:ee.object,received:r.parsedType}),Ie;const i=[],o=this._def.keyType,a=this._def.valueType;for(const u in r.data)i.push({key:o._parse(new so(r,u,r.path,u)),value:a._parse(new so(r,r.data[u],r.path,u))});return r.common.async?Mn.mergeObjectAsync(n,i):Mn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new op({keyType:t,valueType:n,typeName:ve.ZodRecord,...$e(r)}):new op({keyType:Ci.create(),valueType:t,typeName:ve.ZodRecord,...$e(n)})}}class Mm extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.map)return ne(r,{code:H.invalid_type,expected:ee.map,received:r.parsedType}),Ie;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,s],c)=>({key:i._parse(new so(r,u,r.path,[c,"key"])),value:o._parse(new so(r,s,r.path,[c,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const s of a){const c=await s.key,l=await s.value;if(c.status==="aborted"||l.status==="aborted")return Ie;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),u.set(c.value,l.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const s of a){const c=s.key,l=s.value;if(c.status==="aborted"||l.status==="aborted")return Ie;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),u.set(c.value,l.value)}return{status:n.value,value:u}}}}Mm.create=(e,t,n)=>new Mm({valueType:t,keyType:e,typeName:ve.ZodMap,...$e(n)});class Os extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.set)return ne(r,{code:H.invalid_type,expected:ee.set,received:r.parsedType}),Ie;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ne(r,{code:H.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ne(r,{code:H.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(s){const c=new Set;for(const l of s){if(l.status==="aborted")return Ie;l.status==="dirty"&&n.dirty(),c.add(l.value)}return{status:n.value,value:c}}const u=[...r.data.values()].map((s,c)=>o._parse(new so(r,s,r.path,c)));return r.common.async?Promise.all(u).then(s=>a(s)):a(u)}min(t,n){return new Os({...this._def,minSize:{value:t,message:de.toString(n)}})}max(t,n){return new Os({...this._def,maxSize:{value:t,message:de.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Os.create=(e,t)=>new Os({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...$e(t)});class ll extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.function)return ne(n,{code:H.invalid_type,expected:ee.function,received:n.parsedType}),Ie;function r(u,s){return $m({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wm(),Xd].filter(c=>!!c),issueData:{code:H.invalid_arguments,argumentsError:s}})}function i(u,s){return $m({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wm(),Xd].filter(c=>!!c),issueData:{code:H.invalid_return_type,returnTypeError:s}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;return this._def.returns instanceof Fl?Vn(async(...u)=>{const s=new _i([]),c=await this._def.args.parseAsync(u,o).catch(p=>{throw s.addIssue(r(u,p)),s}),l=await a(...c);return await this._def.returns._def.type.parseAsync(l,o).catch(p=>{throw s.addIssue(i(l,p)),s})}):Vn((...u)=>{const s=this._def.args.safeParse(u,o);if(!s.success)throw new _i([r(u,s.error)]);const c=a(...s.data),l=this._def.returns.safeParse(c,o);if(!l.success)throw new _i([i(c,l.error)]);return l.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ll({...this._def,args:co.create(t).rest(ds.create())})}returns(t){return new ll({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ll({args:t||co.create([]).rest(ds.create()),returns:n||ds.create(),typeName:ve.ZodFunction,...$e(r)})}}class ap extends Fe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ap.create=(e,t)=>new ap({getter:e,typeName:ve.ZodLazy,...$e(t)});class up extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ne(n,{received:n.data,code:H.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:t.data}}get value(){return this._def.value}}up.create=(e,t)=>new up({value:e,typeName:ve.ZodLiteral,...$e(t)});function dq(e,t){return new du({values:e,typeName:ve.ZodEnum,...$e(t)})}class du extends Fe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{expected:Ve.joinValues(r),received:n.parsedType,code:H.invalid_type}),Ie}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{received:n.data,code:H.invalid_enum_value,options:r}),Ie}return Vn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return du.create(t)}exclude(t){return du.create(this.options.filter(n=>!t.includes(n)))}}du.create=dq;class sp extends Fe{_parse(t){const n=Ve.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ee.string&&r.parsedType!==ee.number){const i=Ve.objectValues(n);return ne(r,{expected:Ve.joinValues(i),received:r.parsedType,code:H.invalid_type}),Ie}if(n.indexOf(t.data)===-1){const i=Ve.objectValues(n);return ne(r,{received:r.data,code:H.invalid_enum_value,options:i}),Ie}return Vn(t.data)}get enum(){return this._def.values}}sp.create=(e,t)=>new sp({values:e,typeName:ve.ZodNativeEnum,...$e(t)});class Fl extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.promise&&n.common.async===!1)return ne(n,{code:H.invalid_type,expected:ee.promise,received:n.parsedType}),Ie;const r=n.parsedType===ee.promise?n.data:Promise.resolve(n.data);return Vn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Fl.create=(e,t)=>new Fl({type:e,typeName:ve.ZodPromise,...$e(t)});class Ri extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null;if(i.type==="preprocess"){const a=i.transform(r.data);return r.common.async?Promise.resolve(a).then(u=>this._def.schema._parseAsync({data:u,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}const o={addIssue:a=>{ne(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="refinement"){const a=u=>{const s=i.refinement(u,o);if(r.common.async)return Promise.resolve(s);if(s instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Ie:(u.status==="dirty"&&n.dirty(),a(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Ie:(u.status==="dirty"&&n.dirty(),a(u.value).then(()=>({status:n.value,value:u.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Em(a))return a;const u=i.transform(a.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Em(a)?Promise.resolve(i.transform(a.value,o)).then(u=>({status:n.value,value:u})):a);Ve.assertNever(i)}}Ri.create=(e,t,n)=>new Ri({schema:e,typeName:ve.ZodEffects,effect:t,...$e(n)});Ri.createWithPreprocess=(e,t,n)=>new Ri({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...$e(n)});class Jo extends Fe{_parse(t){return this._getType(t)===ee.undefined?Vn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jo.create=(e,t)=>new Jo({innerType:e,typeName:ve.ZodOptional,...$e(t)});class Fs extends Fe{_parse(t){return this._getType(t)===ee.null?Vn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Fs.create=(e,t)=>new Fs({innerType:e,typeName:ve.ZodNullable,...$e(t)});class cp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}cp.create=(e,t)=>new cp({innerType:e,typeName:ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class km extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Rm(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new _i(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}km.create=(e,t)=>new km({innerType:e,typeName:ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class Lm extends Fe{_parse(t){if(this._getType(t)!==ee.nan){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.nan,received:r.parsedType}),Ie}return{status:"valid",value:t.data}}}Lm.create=e=>new Lm({typeName:ve.ZodNaN,...$e(e)});const KTe=Symbol("zod_brand");class pq extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class vh extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ie:o.status==="dirty"?(n.dirty(),fq(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ie:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new vh({in:t,out:n,typeName:ve.ZodPipeline})}}const Aq=(e,t={},n)=>e?Ol.create().superRefine((r,i)=>{var o,a;if(!e(r)){const u=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,s=(a=(o=u.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,c=typeof u=="string"?{message:u}:u;i.addIssue({code:"custom",...c,fatal:s})}}):Ol.create(),PTe={object:Ct.lazycreate};var ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"})(ve||(ve={}));const DTe=(e,t={message:`Input not instance of ${e.name}`})=>Aq(n=>n instanceof e,t),zo=Ci.create,jm=lu.create,NTe=Lm.create,qTe=fu.create,hq=ep.create,QTe=Rs.create,VTe=Om.create,zTe=tp.create,HTe=np.create,YTe=Ol.create,GTe=ds.create,JTe=na.create,ZTe=Fm.create,mq=Ii.create,lp=Ct.create,XTe=Ct.strictCreate,exe=rp.create,txe=U0.create,nxe=ip.create,rxe=co.create,ixe=op.create,oxe=Mm.create,axe=Os.create,uxe=ll.create,sxe=ap.create,cxe=up.create,lxe=du.create,fxe=sp.create,dxe=Fl.create,MF=Ri.create,pxe=Jo.create,Axe=Fs.create,hxe=Ri.createWithPreprocess,mxe=vh.create,gxe=()=>zo().optional(),vxe=()=>jm().optional(),yxe=()=>hq().optional(),bxe={string:e=>Ci.create({...e,coerce:!0}),number:e=>lu.create({...e,coerce:!0}),boolean:e=>ep.create({...e,coerce:!0}),bigint:e=>fu.create({...e,coerce:!0}),date:e=>Rs.create({...e,coerce:!0})},Cxe=Ie;var B=Object.freeze({__proto__:null,defaultErrorMap:Xd,setErrorMap:wTe,getErrorMap:wm,makeIssue:$m,EMPTY_PATH:$Te,addIssueToContext:ne,ParseStatus:Mn,INVALID:Ie,DIRTY:fq,OK:Vn,isAborted:H1,isDirty:Y1,isValid:Em,isAsync:Rm,get util(){return Ve},get objectUtil(){return z1},ZodParsedType:ee,getParsedType:Za,ZodType:Fe,ZodString:Ci,ZodNumber:lu,ZodBigInt:fu,ZodBoolean:ep,ZodDate:Rs,ZodSymbol:Om,ZodUndefined:tp,ZodNull:np,ZodAny:Ol,ZodUnknown:ds,ZodNever:na,ZodVoid:Fm,ZodArray:Ii,ZodObject:Ct,ZodUnion:rp,ZodDiscriminatedUnion:U0,ZodIntersection:ip,ZodTuple:co,ZodRecord:op,ZodMap:Mm,ZodSet:Os,ZodFunction:ll,ZodLazy:ap,ZodLiteral:up,ZodEnum:du,ZodNativeEnum:sp,ZodPromise:Fl,ZodEffects:Ri,ZodTransformer:Ri,ZodOptional:Jo,ZodNullable:Fs,ZodDefault:cp,ZodCatch:km,ZodNaN:Lm,BRAND:KTe,ZodBranded:pq,ZodPipeline:vh,custom:Aq,Schema:Fe,ZodSchema:Fe,late:PTe,get ZodFirstPartyTypeKind(){return ve},coerce:bxe,any:YTe,array:mq,bigint:qTe,boolean:hq,date:QTe,discriminatedUnion:txe,effect:MF,enum:lxe,function:uxe,instanceof:DTe,intersection:nxe,lazy:sxe,literal:cxe,map:oxe,nan:NTe,nativeEnum:fxe,never:JTe,null:HTe,nullable:Axe,number:jm,object:lp,oboolean:yxe,onumber:vxe,optional:pxe,ostring:gxe,pipeline:mxe,preprocess:hxe,promise:dxe,record:ixe,set:axe,strictObject:XTe,string:zo,symbol:VTe,transformer:MF,tuple:rxe,undefined:zTe,union:exe,unknown:GTe,void:ZTe,NEVER:Cxe,ZodIssueCode:H,quotelessJson:xTe,ZodError:_i});const Sxe=B.object({id:B.string(),label:B.string(),repeatable:B.boolean(),status:B.boolean()}),_xe=B.array(Sxe);function gq(e,t,n){return _e.request(new URL("customtypes",e),{headers:{repository:t},credentials:_e.getRequestCredentials(n),okType:_xe})}const Ixe=B.object({first_name:B.string().optional(),last_name:B.string().optional(),email:B.string().optional()}),IR=B.object({id:B.string(),name:B.string(),is_master:B.boolean().optional()}),Txe=B.discriminatedUnion("status",[B.object({status:B.literal("unclassified")}),B.object({status:B.literal("published")}),B.object({status:B.literal("release"),release_id:B.string()}),B.object({status:B.literal("archived")})]).and(B.object({version_id:B.string(),tags:B.array(B.string()),custom_type_label:B.string(),preview_summary:B.string().optional(),preview_image:B.string().optional(),last_modified_date:B.coerce.date(),author:Ixe,uid:B.string().optional()})),TR=B.object({id:B.string(),title:B.string().nullish().transform(e=>e??"Untitled"),custom_type_id:B.string(),group_lang_id:B.string(),language:IR,versions:B.array(Txe)}),vq=B.object({total:B.number(),cursor:B.string().optional(),results:B.array(TR)}),xxe=B.object({id:B.string(),title:B.string(),repository_id:B.string(),tags:B.array(B.string()).optional()}).passthrough(),wxe=B.object({results:B.array(xxe)});function B0(e,t,n,r,i){const o=new URL("documents",e);return r&&o.searchParams.set("limit",r.toString()),i&&o.searchParams.set("cursor",i),o.search+=`&${n}`,_e.request(o,{credentials:_e.getRequestCredentials(t),okType:vq})}function yq(e,t,n,r){const i=new URL(e);return i.search=n,_e.request(i,{credentials:_e.getRequestCredentials(t),okType:wxe,...r})}function bq(e){const{repository:t,searchTerm:n,tags:r,localeId:i,customTypesIds:o}=e,a=new URLSearchParams;return a.append("repository",t),n&&a.append("searchTerm",n),r!=null&&r.length&&a.append("tags",r.toString()),i&&a.append("localeId",i),o!=null&&o.length&&a.append("customTypesIds",o.toString()),a.toString()}function xR(e){return e.reduce((t,n)=>{if(n.values.every(i=>i===""))return t;const r=n.values.map(i=>[n.name,i]);return t.concat(r)},[])}function Cq(e,t,n){return _e.request(new URL(`documents/${n}`,e),{credentials:_e.getRequestCredentials(t),okType:TR})}function $xe(e,t,n,r){const i=new URL(`documents?status=release:${n}`,e);return r&&i.searchParams.set("limit",r.toString()),_e.request(i,{credentials:_e.getRequestCredentials(t),okType:vq})}function Sq(e,t,n){const r=W0({document_id:n});return B0(e,t,r,n.length)}const Exe=B.custom().transform((e,t)=>{const n=Ue.Document.decode(e);return n._tag==="Left"?(t.addIssue({code:B.ZodIssueCode.custom,message:"Invalid document."}),B.NEVER):n.right});function W0(e){const t=Pl.keys(e).flatMap(r=>{const i=e[r];return i?{name:r,values:i}:[]});return new URLSearchParams(xR(t)).toString()}const Rxe=B.object({id:B.string(),firstname:B.string().optional(),lastname:B.string().optional(),email:B.string()}),Oxe=B.array(Rxe),Fxe=B.object({slicemachineEnabled:B.boolean()}),Mxe=B.object({simulator_url:B.string().url().nullish(),languages:B.array(IR).transform(e=>gn.sort(e,t=>t.name)),authors:Oxe.optional().default([]),quotas:Fxe.optional().default({slicemachineEnabled:!1})}).transform(({simulator_url:e,...t})=>{const n=e&&Iq(e)?e:void 0;return{...t,simulatorUrl:n}});function _q(e,t){return _e.request(new URL("repository",e),{credentials:_e.getRequestCredentials(t),okType:Mxe})}function Iq(e){const t=$r.toURL(e);return t?t.pathname.endsWith("/slice-simulator"):!1}const kxe=B.object({results:B.array(B.string())});function Tq(e,t){return _e.request(new URL("repository/tags",e),{credentials:_e.getRequestCredentials(t),okType:kxe})}function yh(){const e=xe();e.mediaLibrary||Bn("mediaLibrary");const{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e,{items:i}=nt.useRequest(xq,[t,r,n]);return{tags:i}}function xq(e,t,n){return _e.request(new URL("tags",e),{credentials:_e.getRequestCredentials(n),okType:Lxe,headers:{repository:t}})}const wq=3,$q=20,wR=B.string().min(wq).max($q),$R=B.object({id:B.string(),name:wR,uploader_id:B.string().optional(),created_at:B.number(),last_modified:B.number(),count:B.number().optional().default(0)}),Lxe=B.object({items:B.array($R)});function bh(e){nt.updateFetcherData(xq,t=>{const{items:n}=t,r=e(n);if(r)return{items:r}})}function jxe(e){const{assetType:t,keyword:n,mode:r,tagIds:i}=e,o=xe();o.mediaLibrary||Bn("mediaLibrary");const{useOpenSearch:a,onAnalyticsEvent:u}=o,s=nt.useFetcherData(Yi),c=s[s.length-1],l=R.useRef(c);l.current=c,R.useEffect(()=>{if(!u||!n||!l.current||l.current.keyword!==n)return;const f=a&&n?"1":"0",p=String(n.split(" ").length),A=String(l.current.total),h=i.join(",");u("Media Library Search",{searchQuery:n,numberOfWords:p,numberOfResults:A,timeToGetResults:l.current.time,useOpenSearch:f,assetType:t,mode:r,tags:h})},[n,a,t,r,u,i])}function Uxe(e){const{assetType:t,mediaDialogOpen:n}=e,r=xe(),i=nt.useFetcherData(Yi),o=R.useRef(0);R.useEffect(()=>{n&&(o.current=performance.now())},[n]);function a(u){if(!r.onAnalyticsEvent||!r.mediaLibrary)return;const s=i[i.length-1];if(!s)return;const{keyword:c,tags:l}=s,f=Oq(i,t,c,l),p=r.useOpenSearch&&c?"1":"0",A=String(c.split(" ").length),h=String(s.total),v=f.findIndex(T=>T.id===u),_=String(v+1),S=[u].join(","),I=(performance.now()-o.current).toFixed(0);r.onAnalyticsEvent("Media Added To Page",{useOpenSearch:p,assetType:t,searchQuery:c,numberOfWords:A,numberOfResults:h,searchPosition:_,mediaIds:S,timeToAddMediaToPage:I,tags:l})}return a}const Wh=B.array(B.string()).optional().transform(e=>e==null?void 0:e[0]),K0=B.object({id:B.string(),kind:B.string(),extension:B.string().optional(),filename:B.string(),width:B.number().optional(),height:B.number().optional(),last_modified:B.number(),url:B.string(),alt:B.string().optional(),size:B.number(),notes:B.string().optional(),credits:B.string().optional(),search_highlight:B.object({filename:Wh,alt:Wh,notes:Wh,credits:Wh}).optional(),tags:B.array($R)}),Eq={"X-Prismic-Source":"Wroom"},Bxe=B.object({total:B.number(),cursor:B.string().optional(),items:B.array(K0)}),Rq=30;function Yi(e,t,n,r,i,o,a,u,s){const c=e?new URL("assets",e):void 0,l=new URLSearchParams(xR([{name:"limit",values:[`${Rq}`]},{name:"cursor",values:[s??""]},{name:"keyword",values:[i]},{name:"tags",values:o.split(",")},{name:"assetType",values:[r]},{name:"opensearch",values:a?["true"]:[]}])).toString(),f=Bxe.transform(A=>({...A,assetType:r,keyword:i,page:u,tags:o})),p=performance.now();return _e.request(`${(c==null?void 0:c.href)??""}?${l}`,{headers:{repository:t,...Eq},credentials:_e.getRequestCredentials(n),okType:f}).then(A=>({...A,time:(performance.now()-p).toFixed(0)}))}nt.cache.registerFetcherConfig(Yi,{revalidationStrategy:{type:"never"}});function Wxe(e){const{assetType:t="all",mode:n}=e,r=xe(),[i,o]=R.useState({keyword:"",page:0,tagIds:[]});r.mediaLibrary||Bn("mediaLibrary");const{assetsApiBaseUrl:a,authStrategy:u,repository:s,useOpenSearch:c}=r,{keyword:l,page:f,cursor:p,tagIds:A}=i,h=nt.useRequest(Yi,ER({assetsApiBaseUrl:a,authStrategy:u,repository:s,assetType:t,keyword:l,tagIds:A,useOpenSearch:c&&!!l,page:f,cursor:p}));jxe({assetType:t,keyword:l,tagIds:A,mode:n});const v=Nxe(t,l,A),_=h.total!==v.length;function S(){h.cursor!==void 0&&o(C=>({...C,page:C.page+1,cursor:h.cursor}))}function I(C){o(y=>({...y,page:0,cursor:void 0})),Ms((y,x)=>{if(x.page===0)return[...C,...y]})}function T(C){o(y=>({...y,keyword:C,page:0,cursor:void 0}))}function g(C){o(y=>({...y,tagIds:C,page:0,cursor:void 0}))}return{keyword:l,setKeyword:T,tagIds:A,setTagIds:g,media:v,mediaTotal:h.total,limit:Rq,hasNextPage:_,fetchNextPage:S,updateMedia:Kxe,unshiftMedia:I,deleteMedia:Pxe,deleteSearchData:Dxe,revalidateFirstPage:Fq}}function Kxe(e){Ms(t=>t.flatMap(n=>{const r=e.find(i=>i.id===n.id);return r?r.response===void 0?[]:{...n,...r.response}:n}))}function Pxe(e){Ms(t=>t.filter(n=>!e.includes(n.id)))}function Dxe(e){const{keyword:t,tagIds:n}=e,r=n==null?void 0:n.join(",");nt.updateFetcherData(Yi,i=>{if(!(t&&i.keyword===t)&&!(r&&i.tags===r))return i})}function Oq(e,t,n,r){const i=e.filter(u=>u.assetType===t&&u.keyword===n&&u.tags===r),a=gn.sort(i,u=>u.page).flatMap(u=>u.items);return n?gn.uniqBy(a,u=>u.id):a}function Nxe(e,t,n){const r=nt.useFetcherData(Yi);return Oq(r,e,t,n.join(","))}function Ms(e){nt.updateFetcherData(Yi,t=>{const{items:n,total:r}=t,i=e(n,t);if(i)return{...t,total:r+(i.length-n.length),items:i}})}function Fq(e){const{config:t,assetType:n}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");const{assetsApiBaseUrl:r,authStrategy:i,repository:o}=t;nt.revalidateData(Yi,ER({assetsApiBaseUrl:r,repository:o,authStrategy:i,assetType:n,keyword:"",tagIds:[],useOpenSearch:!1,page:0}))}function Mq(e){const{config:t,assetType:n}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");nt.updateFetcherData(Yi,r=>r.page===0?r:void 0),Fq({config:t,assetType:n})}function ER(e){return[e.assetsApiBaseUrl,e.repository,e.authStrategy,e.assetType,e.keyword,e.tagIds.join(","),e.useOpenSearch,e.page,e.cursor]}function qxe(e){const{revalidate:t,config:n,assetType:r}=e,{assetsApiBaseUrl:i=void 0,repository:o="",authStrategy:a="token"}=n.mediaLibrary?n:{},[u,s]=R.useState(!1),[c,l]=R.useState(!1);nt.useCacheRevalidation({fetcher:Yi,requestParams:ER({assetsApiBaseUrl:i,repository:o,authStrategy:a,assetType:r,keyword:"",tagIds:[],useOpenSearch:!1,page:0}),validator:(p,A)=>{var _,S,I,T;const h=((_=p.items[0])==null?void 0:_.id)??"",v=((I=(S=A[0])==null?void 0:S.items[0])==null?void 0:I.id)??"";return h!==v||p.total!==((T=A[0])==null?void 0:T.total)},onCacheInvalidated:()=>l(!0),every:6e4}),R.useEffect(()=>{u&&(l(!1),s(!1))},[u]);function f(){s(!0),t()}return{isMediaRevalidationInProgress:u,isMediaCacheInvalid:c,revalidateMedia:f}}let Kh;const Qxe=new Uint8Array(16);function Vxe(){if(!Kh&&(Kh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Kh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Kh(Qxe)}const ln=[];for(let e=0;e<256;++e)ln.push((e+256).toString(16).slice(1));function zxe(e,t=0){return ln[e[t+0]]+ln[e[t+1]]+ln[e[t+2]]+ln[e[t+3]]+"-"+ln[e[t+4]]+ln[e[t+5]]+"-"+ln[e[t+6]]+ln[e[t+7]]+"-"+ln[e[t+8]]+ln[e[t+9]]+"-"+ln[e[t+10]]+ln[e[t+11]]+ln[e[t+12]]+ln[e[t+13]]+ln[e[t+14]]+ln[e[t+15]]}const Hxe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kF={randomUUID:Hxe};function Yxe(e,t,n){if(kF.randomUUID&&!t&&!e)return kF.randomUUID();e=e||{};const r=e.random||(e.rng||Vxe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return zxe(r)}function Gxe(e){const{onBeforeUpload:t,onComplete:n}=e,[r,i]=R.useState([]),o=r.some(l=>l.status==="idle"||l.status==="uploading"),a=xe();function u(){if(!r.length||r.some(A=>A.status==="uploading")||r.every(A=>A.status==="error"))return;const l=r.find(A=>A.status==="idle");if(!l)return;let f=r;function p(A){f=A(f),i(f),f.every(v=>v.status==="success"||v.status==="error")&&setTimeout(()=>{i([]),n==null||n(f)},1500)}p(A=>A.map(h=>h.id===l.id?{...h,status:"uploading"}:h)),Jxe({file:l.file,config:a}).then(A=>{p(h=>h.map(v=>v.id===l.id?{...v,status:"success",response:A}:v))}).catch(()=>{p(A=>A.map(h=>h.id===l.id?{...h,status:"error"}:h))})}function s(l){const f=l.map(p=>({id:`temp-${Yxe()}`,file:p,status:"idle"}));i(f),t(f)}const c=R.useCallback(l=>{const f=[{...l,status:"idle"},...r.filter(p=>p.id!==l.id)];i(f),t(f)},[t,r]);return R.useEffect(u,[a,r,n]),{isUploading:o,uploadingFiles:r,onFilesSelected:s,onRetry:c}}function Jxe(e){const{file:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n,a=new FormData;return a.append(t.name,t),_e.request(new URL("assets",r),{headers:{repository:i,"Content-Type":"multipart/form-data",...Eq},method:"POST",body:a,credentials:_e.getRequestCredentials(o),okType:K0})}const kq=R.createContext(void 0);function Zxe(e){const{children:t,assetType:n="all",onSelectedChange:r,actionContainerRef:i}=e,o=r?"select":"browse",[a,u]=R.useTransition(),[s,c]=R.useTransition(),l=xe(),{showAlert:f}=m.useAlert(),{keyword:p,setKeyword:A,tagIds:h,setTagIds:v,media:_,fetchNextPage:S,hasNextPage:I,updateMedia:T,unshiftMedia:g,deleteMedia:C,mediaTotal:y,deleteSearchData:x,revalidateFirstPage:w}=Wxe({assetType:n,mode:o}),[M,O]=R.useState();function F(Oe){Oe&&x({keyword:Oe}),c(()=>{A(Oe),D.clearSelection()})}function K(){A(""),Mq({config:l,assetType:n})}function N(Oe){Oe.length&&x({tagIds:Oe}),c(()=>{v(Oe),D.clearSelection()})}const{isMediaRevalidationInProgress:J,isMediaCacheInvalid:Z,revalidateMedia:ae}=qxe({assetType:n,config:l,revalidate:K}),{isUploading:ge,onFilesSelected:se,uploadingFiles:k,onRetry:E}=Gxe({onBeforeUpload:Oe=>{A("");const mt=Oe.filter(Tt=>Tt.status==="idle").map(Tt=>({id:Tt.id,url:URL.createObjectURL(Tt.file),filename:Tt.file.name,size:Tt.file.size,extension:Tt.file.type,kind:Tt.file.type,last_modified:Tt.file.lastModified,tags:[]}));g(mt);const[lt]=mt??[];lt&&D.toggleSelection({id:lt.id,isSingleSelection:!0})},onComplete:Oe=>{const mt=Oe.flatMap(sn=>sn.status==="success"?sn:(rt(sn),{id:sn.id,response:void 0}));T(mt),w({config:l,assetType:n});const lt=mt[0];!lt||!lt.response||!D.isSelected(lt.id)||D.toggleSelection({id:lt.response.id,isSingleSelection:!0})}}),D=qu({totalItemCount:y,onChangeSelection:({selectedIds:Oe,selectedCount:mt})=>{if(Yt(!1),!!r){if(mt===1){const[lt]=[...Oe];if(k.some(sn=>sn.id===lt&&sn.status!=="success")){r(new Set);return}}r(new Set(Oe))}}});function ue(Oe){ge||se(Oe)}function ke(){I&&u(S)}function Se(Oe,mt){T([{id:Oe,response:mt}])}function rt(Oe){const mt=Ip.overflow(Oe.file.name,30);f({id:Oe.id,title:`The specified file "${mt}" could not be uploaded.`,subtitle:d.jsxs(m.Text,{color:"inherit",children:["Read more about our"," ",d.jsx(m.Text,{color:"tomato11",href:TTe,underline:!0,children:"supported media"}),"."]}),buttons:{action:{text:"Retry upload",icon:"cloudUpload",onClick:()=>E(Oe)}}})}const[bt,Yt]=R.useState(!1);return d.jsx(kq.Provider,{value:{isFetchingMedia:a,media:_,mediaTotal:y,onScrollToBottom:ke,actionContainerRef:i,onFilesUpload:ue,isUploading:ge,uploadingFiles:k,isMediaRevalidationInProgress:J,isMediaCacheInvalid:Z,revalidateMedia:ae,deleteMedia:C,updateMedia:Se,keyword:p,onKeywordChange:F,isSearchingMedia:s,assetType:n,tagManagerOpen:bt,setTagManagerOpen:Yt,tagIds:h,onTagIdsChange:N,openMediaSection:M,setOpenMediaSection:O},children:t})}function Et(){const e=R.useContext(kq);if(!e)throw new Error("useMediaLibrary must be used within a MediaLibraryProvider");return e}function Xxe(){const{actionContainerRef:e,isUploading:t,onFilesUpload:n,assetType:r}=Et(),i=e==null?void 0:e.current;return d.jsx(Lq,{actionContainerRef:e,children:d.jsxs(m.Box,{width:"100%",gap:16,children:[d.jsx(ewe,{}),d.jsx(m.Tooltip,{title:Rl.warning.uploadWhileUploading.title,content:Rl.warning.uploadWhileUploading.description,visible:t,stableMount:!0,children:d.jsx(m.FileUploadButton,{disabled:t,onFilesSelected:n,startIcon:"cloudUpload",color:i?"purple":"grey",size:"large",assetType:r,children:"Upload media"})})]})})}function ewe(){const{keyword:e,onKeywordChange:t,isFetchingMedia:n}=Et(),[r,i]=R.useState(e);return Xe.useOnChange(e,()=>{e===""&&i("")}),Xe.useDebounce(r,300,Xe.useStableCallback(o=>t(o))),d.jsx(m.Box,{width:"100%",flexDirection:"column",children:d.jsx(m.FormSearchInput,{value:r,placeholder:"Search",onValueChange:i,maxLength:200,isLoading:n&&e!==r})})}function Lq(e){const{children:t,actionContainerRef:n}=e,r=n==null?void 0:n.current,i=r?m.Portal:R.Fragment,o=r?{container:n.current,asChild:!0}:{};return d.jsx(i,{...o,children:t})}function twe(e){const{children:t}=e,{onFilesUpload:n,assetType:r}=Et();return d.jsx(m.FileDropZone,{overlay:d.jsx(nwe,{}),onFilesSelected:n,assetType:r,children:t})}function nwe(){const{isUploading:e}=Et(),t=e?Rl.warning.uploadWhileUploading.title:"Drop files here",n=e?Rl.warning.uploadWhileUploading.description:"Drop your files to upload them instantly to the media library.";return d.jsx(m.Box,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:"grey3",children:d.jsxs(m.BlankSlate,{children:[d.jsx(m.BlankSlateIcon,{name:e?"block":"cloudUpload",lineColor:e?"tomato11":"purple10",backgroundColor:e?"tomato2":"purple3",borderColor:e?"tomato6":"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(m.BlankSlateTitle,{size:"big",children:t}),d.jsx(m.BlankSlateDescription,{width:360,children:n})]})})}function jq(){return d.jsx(m.DefaultErrorMessage,{title:"Oops! Something went wrong",description:"An error occurred while searching for your image.",errorImageSrc:m.dialogErrorImage,sx:{marginBlock:"auto",marginInline:"auto"}})}function Uq(e){const{mediaList:t,mediaActions:n,mediaToolbar:r,sidePane:i}=e,o=m.useMediaQuery({min:"medium"});return d.jsxs(m.Box,{display:"grid",gridTemplateRows:"auto auto 1fr",gridTemplateColumns:o?"1fr 380px":"1fr",width:"100%",height:"100%",children:[d.jsxs(m.Box,{position:"relative",display:"grid",gap:16,gridColumn:"1",gridRow:"1",padding:{right:16,bottom:16},children:[n,r]}),d.jsx(m.Box,{position:"relative",display:"grid",gridColumn:"1",gridRow:"2 / -1",children:t}),o&&i]})}function Bq(e){const{count:t}=e;return d.jsxs(m.Text,{variant:"bold",children:[t," items"]})}function rwe(){var A;const{onScrollToBottom:e,media:t,isUploading:n,uploadingFiles:r,isSearchingMedia:i,isMediaRevalidationInProgress:o,setOpenMediaSection:a}=Et(),u=qu(),s=xe(),c=s.mediaLibrary&&s.mediaLibraryTagsEnabled,l=R.useRef(null);function f(h){u.toggleSelection({id:h,isSingleSelection:!0}),a("tags")}(n||i||o)&&((A=l.current)==null||A.scrollTo({top:0,behavior:"instant"}));function p(h,v,_){const S=v.shiftKey?t.map(({id:I})=>I):void 0;u.toggleSelection({id:h,isSingleSelection:_==="single",metaKey:v.metaKey,shiftKey:v.shiftKey,ids:S})}return d.jsx(Wq,{onScrollToBottom:e,scrollAreaRef:l,children:t.map(h=>{var v,_;return d.jsx(m.MediaCard,{"aria-label":"media item",...h,filenameHighlight:(v=h.search_highlight)==null?void 0:v.filename,loading:i,status:(_=r.find(S=>S.id===h.id))==null?void 0:_.status,selected:u.isSelected(h.id),onCardClick:S=>p(h.id,S,"single"),onCheckedChange:(S,I)=>p(h.id,I,"multi"),onAddTagClick:c?()=>f(h.id):void 0},h.id)})})}function Wq(e){const{children:t,scrollAreaRef:n,onScrollToBottom:r}=e,i=16,o=4,a="250px",u=`calc((100% - ${i*(o-1)}px) / ${o})`;return d.jsx(m.ScrollArea,{"aria-label":"Media list",ref:n,style:{display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(max(${a}, ${u}), 1fr))`,gridTemplateRows:"1fr 1fr 1fr ",gap:i,padding:2,paddingBottom:16,position:"relative"},onScrollToBottom:r,threshold:500,children:t})}function Kq(e){const{children:t,hasSelectedMedia:n}=e;return d.jsx(m.Box,{overflow:"hidden",gridColumn:"2 / -1",gridRow:"1 / -1",children:d.jsx(m.ScrollArea,{style:{display:"grid",height:"100%"},children:d.jsx(m.Box,{flexGrow:1,borderRadius:{topRight:8,topLeft:8},borderStyle:n?"solid":"dashed",border:{top:!0,right:!0,left:!0,bottom:!1},minWidth:0,children:t})})})}function Pq(e){const{onFilesUpload:t,isUploading:n,isInitialLoad:r=!1}=e,i=r||n;return d.jsxs(m.Box,{flexDirection:"column",justifyContent:"center",alignItems:"center",padding:16,gap:16,width:"100%",children:[d.jsx(m.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),d.jsx(m.Box,{flexDirection:"column",gap:4,children:d.jsxs(m.Text,{align:"center",children:["Select or"," ",d.jsx(m.FileUploadButton,{disabled:i,onFilesSelected:t,renderButton:o=>d.jsx(m.Tooltip,{title:Rl.warning.uploadWhileUploading.title,content:Rl.warning.uploadWhileUploading.description,visible:n,children:d.jsx(m.Box,{display:"inline-flex",as:"span",children:d.jsx(m.Button,{disabled:i,onClick:o,invisible:!0,children:"upload"})})})})," ","media."]})}),d.jsx(m.FileUploadButton,{disabled:i,onFilesSelected:t,color:"grey",children:"Upload media"})]})}function iwe(e){const{actionContainerRef:t}=e;return d.jsx(Uq,{sidePane:d.jsx(uwe,{}),mediaActions:d.jsx(awe,{actionContainerRef:t}),mediaToolbar:d.jsx(m.Skeleton,{color:"grey5",borderRadius:12,children:d.jsx(Bq,{count:888})}),mediaList:d.jsx(owe,{})})}function owe(){return d.jsx(Wq,{children:gn.range(1,24).map(e=>d.jsx(Dq,{},e))})}function awe(e){const{actionContainerRef:t}=e,n=Xe.useForceUpdate();return R.useLayoutEffect(()=>{n()},[n]),d.jsx(Lq,{actionContainerRef:t,children:d.jsxs(m.Box,{width:"100%",gap:16,children:[d.jsx(m.Box,{width:"100%",flexDirection:"column",children:d.jsx(m.FormSearchInput,{placeholder:"Search",maxLength:200,value:"",disabled:!0,onValueChange:()=>{}})}),d.jsx(m.FileUploadButton,{disabled:!0,onFilesSelected:()=>{},startIcon:"cloudUpload",color:t?"purple":"grey",size:"large",children:"Upload media"})]})})}function uwe(){return d.jsx(Kq,{hasSelectedMedia:!1,children:d.jsx(Pq,{onFilesUpload:()=>{},isUploading:!1,isInitialLoad:!0})})}function Dq(){return d.jsxs(m.Box,{height:302,width:"100%",flexDirection:"column",padding:16,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,children:[d.jsx(m.Skeleton,{height:164,width:"100%"}),d.jsx(m.Skeleton,{height:16,width:"100%",sx:{marginTop:12}}),d.jsx(m.Skeleton,{height:10,width:100,sx:{marginTop:8}}),d.jsx(m.Skeleton,{height:1,width:"100%",sx:{marginTop:20,marginBottom:16}}),d.jsxs(m.Box,{flexDirection:"row",gap:8,children:[d.jsx(m.Skeleton,{height:24,width:54}),d.jsx(m.Skeleton,{height:24,width:45}),d.jsx(m.Skeleton,{height:24,width:62})]})]})}const Nq=R.createContext({showToast:()=>{}});function swe(e){const{children:t}=e,{isFetchingMedia:n}=Et(),[r,i]=R.useState({title:"",seconds:5}),[o,a]=R.useState(!1),{title:u,action:s,seconds:c=1,icon:l="check"}=r,f=R.useMemo(()=>({showToast:p=>{i({seconds:c,...p}),a(!0)}}),[c]);return d.jsxs(d.Fragment,{children:[d.jsx(cwe,{open:n}),d.jsx(lwe,{}),d.jsx(m.Toast,{anchor:d.jsx(m.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:o,onOpenChange:a,title:u,action:s,seconds:c,icon:l}),d.jsx(Nq.Provider,{value:f,children:t})]})}function qq(){return R.useContext(Nq)}function cwe(e){const{open:t}=e;return d.jsx(m.Toast,{anchor:d.jsx(m.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more items ...",seconds:1})}function lwe(){const{revalidateMedia:e,isMediaCacheInvalid:t}=Et(),[n,r]=R.useState(t);return Xe.useOnChange(t,r),d.jsx(m.Toast,{anchor:d.jsx(m.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:n,title:"There has been changes to your media library",action:{title:"Update",onClick:e},cancel:{onClick:()=>r(!1)}})}function fwe(){const{media:e,mediaTotal:t,tagIds:n}=Et(),r=qu(),i=xe(),o=i.mediaLibrary&&i.mediaLibraryTagsEnabled;return d.jsxs(m.Box,{alignItems:"center",gap:16,children:[r.isSelectAllEnabled&&d.jsx(m.Checkbox,{onCheckedChange:r.toggleSelectAll,checked:r.selectedCount>0,indeterminate:r.selectedCount!==t,onClick:a=>a.stopPropagation(),disabled:e.length===0}),e.length!==0&&d.jsx(Bq,{count:t}),o&&d.jsxs(m.Box,{gap:8,alignItems:"center",children:[d.jsx(m.Text,{children:"Filter:"}),d.jsx(pwe,{}),n.length>0&&d.jsx(m.ErrorBoundary,{children:d.jsx(R.Suspense,{children:d.jsx(dwe,{})})})]})]})}function dwe(){const{tagIds:e,onTagIdsChange:t}=Et(),{tags:n}=yh(),r=R.useMemo(()=>hV.groupBy(n,o=>o.id),[n]);function i(o){const a=e.filter(u=>u!==o.id);t(a)}return d.jsx(d.Fragment,{children:e.map(o=>{var u;const a=(u=r.get(o))==null?void 0:u[0];return a?d.jsx(m.Badge,{title:a.name,size:"medium",color:"purple",onClose:()=>i(a),selected:!0},a.id):null})})}function pwe(){const{setTagManagerOpen:e,tagIds:t,onTagIdsChange:n}=Et(),[r,i]=R.useState(""),[o,a]=R.useState(!1);function u(l){a(l),l||i("")}function s(l){const f=t.includes(l.id)?t.filter(p=>p!==l.id):[...t,l.id];n(f),a(!1)}function c(){a(!1),e(!0)}return d.jsxs(m.DropdownMenu,{open:o,onOpenChange:u,children:[d.jsx(m.DropdownMenuTrigger,{children:d.jsx(m.Button,{startIcon:"label",endIcon:"arrowDropDown",size:"small",color:"grey",children:"Tags"})}),d.jsx(m.DropdownMenuContent,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:d.jsxs(m.ComboBox,{variant:"attached",children:[d.jsx(m.ComboBoxInput,{value:r,onValueChange:i,placeholder:"Search for a tag",autoFocus:!0}),d.jsx(m.ComboBoxContent,{children:d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(m.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:d.jsx(R.Suspense,{fallback:d.jsx(m.Box,{padding:8,flexDirection:"column",gap:8,children:gn.range(1,6).map(l=>d.jsx(m.Skeleton,{height:24,width:85},l))}),children:d.jsx(Awe,{searchTerm:r,setSearchTerm:i,onTagToggle:s})})})}),d.jsx(m.ComboboxAction,{children:d.jsx(m.Button,{invisible:!0,startIcon:"edit",textWeight:"normal",color:"dark",onClick:c,children:"Manage tags"})})]})})]})}function Awe(e){const{onTagToggle:t,searchTerm:n}=e,{tagIds:r}=Et(),{tags:i}=yh(),o=R.useMemo(()=>{const a=n.toLowerCase();return i.filter(u=>u.name.toLowerCase().includes(a))},[i,n]);return d.jsxs(d.Fragment,{children:[!o.length&&d.jsx(m.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),o.map((a,u)=>{const s=r.includes(a.id);return d.jsx(m.ComboBoxItem,{value:a.id,onCheckedChange:()=>t(a),checked:s,children:d.jsx(m.Badge,{title:a.name,color:"purple",sx:{marginLeft:8,marginBottom:u===o.length-1?8:4,marginTop:u===0?8:4},size:"medium"})},a.id)})]})}function jc(){const{media:e}=Et(),t=qu();return e.filter(({id:n})=>t.isSelected(n))}function hwe(){const[e,t]=R.useState(!1),n=jc(),r=qu(),i=R.useMemo(()=>n.some(({id:a})=>a.startsWith("temp")),[n]),[o]=n;return o?r.selectedCount>1?d.jsxs(m.Box,{gap:8,alignItems:"center",children:[d.jsxs(m.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:[r.selectedCount," media selected"]}),d.jsx(m.Tooltip,{content:"Open all selected media in new tabs",children:d.jsx(m.IconButton,{icon:"openInFull",variant:"solid",size:"small",onClick:()=>n.forEach(a=>window.open(a.url,"_blank"))})}),d.jsx(m.Tooltip,{content:"Remove selected media",children:d.jsx(m.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),d.jsx(LF,{open:e,onOpenChange:t,media:n})]}):d.jsxs(m.Box,{gap:8,alignItems:"center",children:[d.jsx(m.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:o.filename}),d.jsxs(m.Box,{gap:8,children:[d.jsx(m.Tooltip,{content:"Open media in new tab",children:d.jsx(m.IconButton,{icon:"openInFull",variant:"solid",size:"small",hiddenLabel:"Open media in new tab",onClick:()=>window.open(o.url,"_blank"),disabled:i})}),d.jsx(m.Tooltip,{content:"Copy media URL",children:d.jsx(m.IconButton,{icon:"link",variant:"solid",size:"small",hiddenLabel:"Copy media URL",onClick:()=>navigator.clipboard.writeText(o.url),disabled:i})}),d.jsx(m.Tooltip,{content:"Remove media",children:d.jsx(m.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),d.jsx(LF,{open:e,onOpenChange:t,media:o})]})]}):null}function LF(e){const{open:t,onOpenChange:n,media:r}=e,i=xe(),{showAlert:o}=m.useAlert(),{deleteMedia:a}=Et(),u=qu(),[s,c]=R.useState(!1),l=Array.isArray(r),f=l?"these items":"this item";function p(){c(!0);const h=u.getSelectionState().selectedIds;gwe({ids:h,config:i}).then(()=>{n(!1),a(h),u.clearSelection()}).catch(()=>{n(!1),o({title:"Error",subtitle:`Something went wrong when removing ${f}.`})}).finally(()=>{c(!1)})}return d.jsxs(m.Dialog,{onOpenChange:n,open:t,size:"small",children:[d.jsx(m.DialogHeader,{icon:"alert",title:`Remove ${f} from your media library?`}),d.jsx(m.DialogContent,{children:d.jsx(m.Box,{padding:16,children:d.jsxs(m.Text,{children:["You are about to delete ",f,":  ",l?d.jsx(mwe,{media:r}):d.jsx("b",{children:r.filename})]})})}),d.jsxs(m.DialogActions,{children:[d.jsx(m.DialogCancelButton,{}),d.jsxs(m.DialogActionButton,{onClick:p,color:"tomato",loading:s,children:["Yes, I want to remove ",f]})]})]})}const Pb=15;function mwe({media:e}){const t=e.slice(0,Pb),n=e.length>Pb,r=n?e.length-Pb:0,i=r===1?"item":"items";return d.jsxs("ul",{children:[t.map((o,a)=>d.jsx("li",{children:d.jsx("b",{children:o.filename})},a)),n&&d.jsxs("span",{children:[d.jsx("br",{}),"And ",d.jsx("b",{children:r})," more ",i,"..."]})]})}function gwe(e){const{ids:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");if(t.length===0)throw new Error("No ids provided during media deletion");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;if(t.length===1){const[a]=t;return _e.request(new URL(`assets/${a}`,r),{headers:{repository:i},method:"DELETE",credentials:_e.getRequestCredentials(o),okType:B.unknown()})}return _e.request(new URL("assets/bulk-delete",r),{headers:{repository:i},method:"POST",credentials:_e.getRequestCredentials(o),okType:B.unknown(),body:{ids:t}})}function vwe(){var o;const e=jc(),{uploadingFiles:t}=Et(),[n]=e;if(!n)return null;if(e.length===2)return d.jsx(Db,{children:e.map((a,u)=>d.jsx("div",{style:{position:"absolute",transform:u===0?"translateX(25%) rotate(15deg) ":"translateX(-25%) rotate(-15deg) "},children:d.jsx(jF,{media:a})},a.id))});if(e.length>2)return d.jsx(Db,{children:e.slice(-4).map((a,u)=>d.jsx("div",{style:{position:"absolute",paddingRight:u*16},children:d.jsx(jF,{media:a})},a.id))});const r=(o=t.find(a=>a.id===n.id))==null?void 0:o.status,i=n.kind.startsWith("image");return d.jsx(m.Box,{flexDirection:"column",children:d.jsx(m.CheckerBoard,{children:d.jsx(Db,{uploadStatus:r,hasImage:i,children:i?d.jsx(m.Image,{src:n.url,alt:n.alt,sizing:"contain"}):d.jsx(m.MediaCardPlaceholder,{extension:n.extension,filename:n.filename})})})})}function Db(e){const{children:t,uploadStatus:n,hasImage:r}=e;return d.jsxs(m.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:200,width:"100%",backgroundColor:r?"transparent":"purple2",children:[t,n&&d.jsx(m.Box,{position:"absolute",backgroundColor:"greyAlpha1",width:"100%",height:"100%",padding:{inline:16},justifyContent:"end",flexDirection:"column",children:d.jsx(m.MediaProgress,{status:n})})]})}function jF(e){const{media:t}=e;return d.jsx(m.Box,{width:111,height:152,children:t.kind==="image"?d.jsx(m.Image,{borderRadius:8,src:t.url,alt:t.alt,sizing:"cover"}):d.jsx(m.MediaCardPlaceholder,{extension:t.extension,filename:t.filename})})}const Xa=2e3,dd="__MAIN_THUMBNAIL__";function J1(e,t,n){const r=e.name===dd?void 0:e.name;let i;return t?to.isDefined(n)?i=[n.width,n.height]:to.isDefined(e.width)||to.isDefined(e.height)?i=[e.width??void 0,e.height??void 0]:i=[t.origin.width,t.origin.height]:i=void 0,[r,i?`${i[0]??"auto"}x${i[1]??"auto"}px`:void 0]}function ywe(e){var t,n;return[{...(t=e.config)==null?void 0:t.constraint,name:dd}].concat(((n=e.config)==null?void 0:n.thumbnails)??[])}function bwe(e,t){var a,u;const{__TYPE__:n,thumbnails:r,...i}=t,o=(u=(a=e.config)==null?void 0:a.thumbnails)==null?void 0:u.map(({name:s})=>r==null?void 0:r[s]);return[i,...o??[]]}function Cwe(e,t,n,r){const i=r.length===0?void 0:r;return e===dd||!Ue.isImageContent(t)?{...t,alt:i}:{...t,thumbnails:{...t.thumbnails,[e]:{...n,alt:i}}}}function Swe(e,t){const{width:n,height:r}=t??{};return n&&r?[n,r]:n?[n,Math.round(e.height*(n/e.width))]:r?[Math.round(e.width*(r/e.height)),r]:[e.width,e.height]}function _we(e,t,n,r,i){if(Ewe(e)==="svg")return e;const o=new URL(e);if(i){const{x:a,y:u,width:s,height:c}=t,l=[...o.searchParams.entries(),["rect",[a,u,s,c].join(",")],["w",n],["h",r]];o.search=l.map(f=>f.join("=")).join("&")}return o.toString()}function Qq(e){const t=new URL(e);return t.searchParams.delete("q"),t.searchParams.set("w","800"),t.searchParams.set("h","800"),t.searchParams.set("auto","compress,format"),t.searchParams.set("fit","max"),t.toString()}function Iwe(e){const t=new URL(e);return t.searchParams.delete("q"),t.searchParams.delete("fm"),t.searchParams.set("w","300"),t.searchParams.set("auto","compress,format"),t.toString()}function Twe(e){return e!=null&&e.url?Qq(e.url):void 0}function xwe(e,t,n,r){var u,s,c,l,f;if(!n||e===dd){const p=(u=t.config)==null?void 0:u.thumbnails,A=p&&Object.fromEntries(p.map(h=>[h.name,Xh(r,h)]));return{__TYPE__:"ImageContent",...Xh(r,(s=t.config)==null?void 0:s.constraint),thumbnails:A}}const i=(l=(c=t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===e);if(!i)return n;const o=(f=n.thumbnails)==null?void 0:f[e],a=Xh(r,i);return a.url===(o==null?void 0:o.url)?n:{...n,thumbnails:Pl.mapValues(n.thumbnails??{},(p,A)=>A===e?a:p)}}function wwe(e){return"kind"in e&&"extension"in e}function Xh(e,t){const{width:n,height:r,rect:i}=$we({...e,width:(e==null?void 0:e.width)??Xa,height:(e==null?void 0:e.height)??Xa},t),o=!!(t!=null&&t.width||t!=null&&t.height);return{provider:"imgix",url:_we(e.url,i,n,r,o),alt:e.alt,...wwe(e)?{credits:e.credits}:{},origin:{id:e.id,url:e.url,width:e.width??Xa,height:e.height??Xa},width:n,height:r,edit:{background:"transparent",zoom:1,crop:{x:i.x,y:i.y}}}}function $we(e,t){const[n,r]=Swe(e,t),i=Math.max(n/e.width,r/e.height),o=Math.round((e.width-n/i)/2),a=Math.round((e.height-r/i)/2),u=Math.round(n/i),s=Math.round(r/i);return{width:n,height:r,rect:{x:o,y:a,width:u,height:s}}}function Ewe(e){const{pathname:t}=new URL(e),n=t.lastIndexOf(".");if(n!==-1)return t.substring(n).slice(1).toLowerCase()}function Rwe(e){if(!e)return"";const{filename:t,extension:n}=e;if(!n)return t;const r=new RegExp(`\\.${n}$`);return t.replace(r,"")}function Vq(e){const{tags:t,toggleAssetTag:n,getTagsLabel:r}=e,{setTagManagerOpen:i}=Et(),{showToast:o}=qq(),{showAlert:a}=m.useAlert(),[u,s]=R.useState("");async function c(l,f){s("");try{await n(l,f),o({title:"Media tags were updated",seconds:3})}catch{a({title:"Error",subtitle:"Something went wrong when updating media tags"})}}return d.jsxs(m.Box,{flexDirection:"column",children:[d.jsxs(m.Box,{justifyContent:"space-between",children:[d.jsx(m.Text,{color:"grey12",variant:"bold",children:r()}),d.jsx(m.Button,{startIcon:"edit",invisible:!0,color:"dark",onClick:()=>i(!0),children:"Manage tags"})]}),d.jsxs(m.ComboBox,{sx:{marginTop:4,marginBottom:8},children:[d.jsx(Owe,{searchTerm:u,setSearchTerm:s}),d.jsx(m.ComboBoxContent,{children:d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(m.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:d.jsx(R.Suspense,{fallback:d.jsx(m.Box,{padding:8,flexDirection:"column",gap:8,children:gn.range(1,6).map(l=>d.jsx(m.Skeleton,{height:24,width:85},l))}),children:d.jsx(Fwe,{searchTerm:u,assignedTags:t,onToggleAssetTag:c})})})})]}),d.jsx(m.Box,{flexDirection:"column",alignItems:"flex-start",gap:8,children:t.map(l=>d.jsx(m.Badge,{title:l.name,size:"medium",color:"purple",selected:!0,onClose:()=>c(l,"remove")},l.id))})]})}function Owe(e){const{searchTerm:t,setSearchTerm:n}=e,r=R.useRef(null),{openMediaSection:i,setOpenMediaSection:o}=Et();return R.useEffect(()=>{var a;i==="tags"&&((a=r.current)==null||a.focus(),o(void 0))},[i,o]),d.jsx(m.ComboBoxInput,{value:t,onValueChange:n,placeholder:"Add or create a new tag",ref:r})}function Fwe(e){const{searchTerm:t,assignedTags:n,onToggleAssetTag:r}=e,[i]=jc(),o=xe(),{showAlert:a}=m.useAlert(),{tags:u}=yh(),s=R.useMemo(()=>{const p=t.toLowerCase();return u.filter(A=>A.name.toLowerCase().includes(p))},[u,t]),l=wR.safeParse(t).success&&u.every(p=>p.name!==t);async function f(){if(!t||!i)return;let p;try{p=await Mwe({name:t,config:o}),bh(A=>[p,...A])}catch{a({title:"Error",subtitle:`Something went wrong when creating the tag ${t}`});return}await r(p,"add")}return i?d.jsxs(d.Fragment,{children:[!s.length&&d.jsx(m.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),s.map((p,A)=>d.jsx(m.ComboBoxItem,{value:p.id,onCheckedChange:h=>r(p,h?"add":"remove"),checked:n.some(h=>h.id===p.id),children:d.jsx(m.Badge,{title:p.name,color:"purple",size:"medium",sx:{marginInline:8,marginBottom:A===s.length-1?8:4,marginTop:A===0?8:4}})},p.id)),l&&d.jsx(m.ComboBoxItem,{value:"new",onCheckedChange:f,children:d.jsxs(m.Box,{padding:8,flexDirection:"row",alignItems:"center",gap:4,children:[d.jsx(m.Icon,{name:"add",size:"small",color:"grey11"}),d.jsxs(m.Text,{color:"grey12",children:['Create tag "',t,'"']})]})})]}):null}function Mwe(e){const{name:t,config:n}=e;n.mediaLibrary||Bn("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return _e.request(new URL("tags",r),{headers:{repository:i},body:{name:t},method:"POST",credentials:_e.getRequestCredentials(o),okType:$R})}function kwe(e){const{selectedMedia:t}=e,n=xe(),r=R.useMemo(()=>jwe(t),[t]);async function i(a,u){const s=u==="remove",c=t.map(f=>f.id);let l=[];Ms(f=>(l=f,f.map(p=>c.includes(p.id)?s?Bwe(p,a):Uwe(p,a):p)));try{await Lwe({tagId:a.id,assetIds:c,operation:s?"remove":"add",config:n});const f=t.length*(s?-1:1);bh(p=>p.map(A=>A.id===a.id?{...A,count:A.count+f}:A))}catch(f){throw Ms(()=>l),f}}function o(){const a=r.length;return a>1?`${a} tags in common`:a===1?"1 tag in common":"Common tags"}return d.jsx(Vq,{tags:r,getTagsLabel:o,toggleAssetTag:i})}function Lwe(e){const{tagId:t,assetIds:n,config:r,operation:i}=e;if(!r.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:o,repository:a,authStrategy:u}=r;return _e.request(new URL(`tags/${t}/assets`,o),{headers:{repository:a},body:{assetIds:n},method:i==="add"?"POST":"DELETE",credentials:_e.getRequestCredentials(u),okType:B.unknown()})}function jwe(e){const t=e.length,n={},r=[];return e.forEach(o=>{o.tags.forEach(a=>{n[a.id]||(n[a.id]=0,r.push(a)),n[a.id]++})}),r.filter(o=>n[o.id]===t)}function Uwe(e,t){return e.tags.some(({id:r})=>r===t.id)?e:{...e,tags:[...e.tags,t]}}function Bwe(e,t){const n=e.tags.filter(r=>r.id!==t.id);return{...e,tags:n}}function Wwe(e){const{selectedMedia:t}=e,n=t.tags,r=xe(),{updateMedia:i}=Et();async function o(u,s){const c=t.tags,l=s==="remove",f=l?c.filter(p=>p.id!==u.id):[...c,u];i(t.id,{tags:f});try{await Kwe({mediaId:t.id,config:r,tags:f.map(p=>p.id)}),bh(p=>p.map(A=>A.id===u.id?{...A,count:A.count+(l?-1:1)}:A))}catch(p){throw i(t.id,{tags:c}),p}}function a(){const u=n.length;return u>1?`${u} tags`:u===1?"1 tag":"Tags"}return d.jsx(Vq,{tags:n,getTagsLabel:a,toggleAssetTag:o})}function Kwe(e){const{mediaId:t,config:n,tags:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return _e.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{tags:r},method:"PATCH",credentials:_e.getRequestCredentials(a),okType:K0})}function Pwe(){const[e,t]=R.useState("description");if(jc().length!==1)return d.jsx(Qwe,{});const r=e==="description",i=e==="more-info";return d.jsxs(d.Fragment,{children:[d.jsxs(m.Box,{border:!0,borderStyle:"solid",borderRadius:8,backgroundColor:"grey2",children:[d.jsx(m.Tab,{title:"Description",selected:r,onSelect:()=>t("description"),outline:r,background:r?void 0:"transparent",sx:{flexGrow:1,flexBasis:0}}),d.jsx(m.Tab,{title:"More info",selected:i,onSelect:()=>t("more-info"),outline:i,background:i?void 0:"transparent",sx:{flexGrow:1,flexBasis:0}})]}),d.jsx(Dwe,{tab:e})]})}function Dwe(e){const{tab:t}=e;switch(t){case"description":return d.jsx(Nwe,{});case"more-info":return d.jsx(qwe,{})}}function Nwe(){const{title:e,alt:t,onBlur:n,isUploading:r,selectedMedia:i}=zq(),o=xe(),a=o.mediaLibrary&&o.mediaLibraryTagsEnabled;if(!i)return null;const{extension:u}=i;return d.jsxs(m.Box,{flexDirection:"column",gap:16,children:[d.jsx(m.FormInput,{value:e.value,onValueChange:e.set,label:"Media title",placeholder:"Media title",onBlur:n,disabled:r,suffix:u?`.${u}`:void 0}),d.jsx(m.FormInputField,{label:"Alternative text",children:d.jsx(m.ContentEditable,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"A short description of the media for accessibility",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})}),a&&!r&&d.jsx(Wwe,{selectedMedia:i})]})}function qwe(){const{credits:e,notes:t,onBlur:n,isUploading:r,selectedMedia:i}=zq();if(!i)return null;const o=Hwe(i);return d.jsxs(m.Box,{gap:8,flexDirection:"column",children:[o.map(a=>d.jsxs(m.Box,{gap:8,children:[d.jsxs(m.Text,{color:"grey11",children:[a.label,":"]}),d.jsx(m.Text,{children:a.value})]},a.label)),d.jsx(m.FormInputField,{label:"Copyright",children:d.jsx(m.ContentEditable,{content:e.displayValue,contentVersion:e.version,readOnly:r,placeholder:"Media copyrights or credits",multiline:!0,decorations:{em:"highlight"},onChange:e.onChange,onBlur:n})}),d.jsx(m.FormInputField,{label:"Private notes",children:d.jsx(m.ContentEditable,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"Private notes are never shared publicly",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})})]})}function Qwe(){const e=jc(),{uploadingFiles:t}=Et(),n=xe(),r=R.useMemo(()=>t.some(o=>e.some(a=>o.id===a.id)&&o.status!=="success"),[e,t]),i=n.mediaLibrary&&n.mediaLibraryTagsEnabled;return d.jsx(d.Fragment,{children:i&&!r&&d.jsx(kwe,{selectedMedia:e})})}function zq(){const[e]=jc(),{updateMedia:t,uploadingFiles:n}=Et(),r=xe(),{showToast:i}=qq(),o=(e==null?void 0:e.id)??"",a=Ph(e,"alt"),u=Ph(e,"notes"),s=Ph(e,"credits"),c=Ph(e,"filename",Rwe),l=n.some(p=>p.id===(e==null?void 0:e.id)&&p.status!=="success");function f(){if(!e||!c.changed&&!a.changed&&!s.changed&&!u.changed)return;const{extension:p,search_highlight:A}=e,h=p?`${c.value}.${p}`:c.value;t(o,{filename:h,alt:a.value,credits:s.value,notes:u.value,search_highlight:{alt:a.changed||A==null?void 0:A.alt,credits:s.changed||A==null?void 0:A.credits,filename:c.changed||A==null?void 0:A.filename,notes:u.changed||A==null?void 0:A.notes}}),zwe({id:o,config:r,metadata:{filename:h,alt:a.value,credits:s.value,notes:u.value}}).then(()=>{i({title:"Media metadata has been saved.",seconds:3})}).catch(v=>{console.error(v)})}return{selectedMedia:e,onBlur:f,isUploading:l,title:c,alt:a,credits:s,notes:u,extension:e==null?void 0:e.extension}}function Ph(e,t,n=r=>r==null?void 0:r[t]){var c;const r=n(e)??"",[i,o]=R.useState(r);Xe.useOnChange(e==null?void 0:e.id,()=>o(r));const a=(c=e==null?void 0:e.search_highlight)==null?void 0:c[t],u=!!a;function s(l){const{from:f,to:p}=l.state.selection;l.commands.selectAll(),l.commands.unsetAllMarks(),l.commands.setTextSelection({from:f,to:p}),o(l.getText())}return{value:i,set:o,displayValue:Vwe(a??i)??"",onChange:s,version:`${(e==null?void 0:e.id)??""}_${u}`,changed:i!==r}}function Vwe(e){return e==null?void 0:e.replace(/\n/g,"<br>")}function zwe(e){const{id:t,config:n,metadata:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return _e.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{...r},method:"PATCH",credentials:_e.getRequestCredentials(a),okType:K0})}function Hwe(e){const{width:t,height:n,last_modified:r,size:i,extension:o}=e,a=t&&n,u={label:"Date",value:PC.prettyPrintDate(new Date(r))},s={label:"File size",value:Ip.formatBytes(i)},c=a?{label:"Dimensions",value:`${t}x${n}`}:void 0,l=a?{label:"Ratio",value:((t??0)/(n??0)).toFixed(1)}:void 0,f=o?{label:"Extension",value:o.toUpperCase()}:void 0;return[u,s,c,l,f].filter(to.isDefined)}function Ywe(){const{setTagManagerOpen:e}=Et(),[t,n]=R.useState("");return d.jsxs(m.Box,{gap:20,flexDirection:"column",height:"100%",children:[d.jsxs(m.Box,{alignItems:"center",gap:4,children:[d.jsx(m.IconButton,{icon:"close",size:"small",hasPadding:!1,onClick:()=>e(!1)}),d.jsx(m.Text,{variant:"bold",children:"Tags management"})]}),d.jsxs(m.Box,{gap:16,flexDirection:"column",height:"100%",children:[d.jsx(m.FormSearchInput,{value:t,onValueChange:n,placeholder:"Search for tags",endAdornment:!1,autoFocus:!0}),d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(Xwe,{}),children:d.jsx(R.Suspense,{fallback:d.jsx(n$e,{}),children:d.jsx(Gwe,{searchTerm:t})})})]})]})}function Gwe(e){const{searchTerm:t}=e,{tags:n}=yh(),r=n.filter(i=>i.name.toLowerCase().includes(t.toLowerCase()));return r.length===0?d.jsx(m.Text,{color:"grey9",variant:"small",children:"No tags found"}):d.jsx(m.AnimatedList,{ariaLabel:"Tags list",getItemKey:i=>i.id,gap:16,items:r,children:i=>d.jsx(Jwe,{tag:i})})}function Jwe(e){const{tag:t}=e,[n,r]=R.useState(!1),i=xe(),{showAlert:o}=m.useAlert(),{showToast:a}=m.useToast(),{tags:u}=yh();async function s(c){if(!wR.safeParse(c).success){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag name must be at least ${wq} and at maximum ${$q} characters long.`});return}if(u.some(p=>p.name===c)){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag with name "${c}" already exists.`});return}try{await t$e({id:t.id,name:c,config:i}),bh(p=>p.map(A=>A.id===t.id?{...A,name:c}:A)),Ms(p=>p.map(A=>{if(A.tags.findIndex(v=>v.id===t.id)!==-1){const v=A.tags.map(_=>_.id===t.id?{..._,name:c}:_);return{...A,tags:v}}return A})),a({title:`Tag "${t.name}" renamed to "${c}"`,seconds:3})}catch{o({title:"Error",subtitle:"Something went wrong when renaming the tag."})}}return d.jsxs(d.Fragment,{children:[d.jsxs(m.Box,{justifyContent:"space-between",children:[d.jsx(m.Badge,{title:t.name,color:"purple",size:"medium",onEdit:s}),d.jsx(m.Button,{invisible:!0,color:"tomato",textWeight:"normal",onClick:()=>r(!0),children:"Delete"})]}),d.jsx(Zwe,{open:n,onOpenChange:r,tag:t})]})}function Zwe(e){const{open:t,onOpenChange:n,tag:r}=e,{id:i,name:o,count:a}=r,u=xe(),{showAlert:s}=m.useAlert(),[c,l]=R.useState(!1);async function f(){l(!0);try{await e$e({id:i,config:u}),bh(p=>p.filter(A=>A.id!==i)),Ms(p=>p.map(A=>{if(A.tags.findIndex(v=>v.id===i)!==-1){const v=A.tags.filter(_=>_.id!==i);return{...A,tags:v}}return A}))}catch{s({title:"Error",subtitle:"Something went wrong when removing the tag."})}finally{l(!1),n(!1)}}return d.jsxs(m.Dialog,{onOpenChange:n,open:t,size:"small",children:[d.jsx(m.DialogHeader,{title:`This tag is being used on ${a} media item${a===1?"":"s"}`}),d.jsx(m.DialogContent,{padding:16,children:d.jsxs(m.Text,{children:["You are about to delete the tag name ",d.jsx("b",{children:o}),"."," ",a>0&&`This tag is being
32
32
  used on ${a} media item${a===1?"":"s"} and will be deleted
33
- from ${a===1?"it":"them"}.`]})}),d.jsxs(m.DialogActions,{children:[d.jsx(m.DialogCancelButton,{}),d.jsx(m.DialogActionButton,{onClick:f,color:"tomato",loading:c,children:"Yes, I want to delete"})]})]})}function Xwe(){const e=R.useContext(nt.ErrorBoundaryContext);return d.jsx(m.Box,{flexDirection:"column",children:d.jsxs(m.BlankSlate,{children:[d.jsx(m.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed"}),d.jsx(m.BlankSlateTitle,{size:"big",children:"Oops!"}),d.jsx(m.BlankSlateDescription,{width:360,children:"We couldn't load your media tags."}),d.jsx(m.BlankSlateActions,{children:d.jsx(m.Button,{onClick:e==null?void 0:e.reset,size:"medium",children:"Try again"})})]})})}function e$e(e){const{id:t,config:n}=e;n.mediaLibrary||Bn("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return _e.request(new URL(`tags/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:_e.getRequestCredentials(o),okType:B.unknown()})}function t$e(e){const{id:t,name:n,config:r}=e;r.mediaLibrary||Bn("mediaLibrary");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=r;return _e.request(new URL(`tags/${t}`,i),{headers:{repository:o},method:"PATCH",credentials:_e.getRequestCredentials(a),body:{name:n},okType:B.unknown()})}function n$e(){return d.jsx(m.Box,{flexDirection:"column",gap:16,children:gn.range(1,6).map(e=>d.jsxs(m.Box,{justifyContent:"space-between",children:[d.jsx(m.Skeleton,{height:24,width:85}),d.jsx(m.Skeleton,{height:24,width:45})]},e))})}function r$e(){const e=jc(),{onFilesUpload:t,isUploading:n,tagManagerOpen:r}=Et();return e.length===0&&r===!1?d.jsx(Pq,{onFilesUpload:t,isUploading:n}):d.jsx(m.Box,{flexDirection:"column",backgroundColor:"grey1",width:"100%",padding:16,gap:16,borderRadius:{topLeft:8,topRight:8},children:r?d.jsx(Ywe,{}):d.jsxs(d.Fragment,{children:[d.jsx(hwe,{}),d.jsx(vwe,{}),d.jsx(Pwe,{})]})})}function i$e(){const e=qu();return d.jsx(Kq,{hasSelectedMedia:e.selectedCount!==0,children:d.jsx(r$e,{})})}function Hq(e){const{assetType:t,onSelectedChange:n,actionContainerRef:r}=e;return d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(jq,{}),children:d.jsx(R.Suspense,{fallback:d.jsx(iwe,{actionContainerRef:r}),children:d.jsx(sq,{children:d.jsx(Zxe,{assetType:t,actionContainerRef:r,onSelectedChange:n,children:d.jsx(twe,{children:d.jsx(o$e,{})})})})})})}function o$e(){const{media:e}=Et();return d.jsx(swe,{children:d.jsx(Uq,{sidePane:d.jsx(i$e,{}),mediaActions:d.jsx(Xxe,{}),mediaToolbar:d.jsx(fwe,{}),mediaList:e.length===0?d.jsx(cq,{}):d.jsx(rwe,{})})})}const Yq=R.createContext({editedUID:{current:!1},onEditUID:()=>{}});function Gq(e){return Object.values(e.json).some(t=>{var n;return((n=t.uid)==null?void 0:n.type)==="UID"})}function a$e(e){const{content:t,customType:n}=e;return Gq(n)&&!t.uid}function Jq(e){const{documentId:t,documentsWithUid:n,uid:r}=e;return n.filter(i=>t!==i.id&&s$e({document:i,uid:r})&&u$e({...e,document:i}))}function u$e(e){const{customTypeId:t,languageId:n,document:r}=e,i=t===r.custom_type_id,o=n===r.language.id;return i&&o}function s$e(e){const{document:t,uid:n}=e,r=t.versions.filter(i=>i.uid===n);return r.length===0?!0:r.some(i=>i.status!=="archived")}function Zq(e,t){if(t)return`${e}___${t}`}const Xq=R.createContext({update:()=>{}});function P0(e){const{sliceKey:t}=e||{},n=R.useContext(Xq),r=Zq("sliceFieldSet",t),i=t===(n==null?void 0:n.id);return{selectionId:r,selected:i,selection:n}}function er(e){var t;return((t=e.config)==null?void 0:t.label)??(e.type==="Boolean"||e.type==="Separator"?void 0:e.fieldset)??e.type}const Z1="...";function Qu(e,t){var n,r,i;return e.type==="Boolean"?(t?(n=e.config)==null?void 0:n.placeholder_true:(r=e.config)==null?void 0:r.placeholder_false)||Z1:((i=e.config)==null?void 0:i.placeholder)||Z1}function c$e(e){var u;const{content:t,field:n,id:r,readOnly:i,onContentChange:o}=e,a=(t==null?void 0:t.value)??((u=n.config)==null?void 0:u.default_value)??!1;return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"biToggle"}),d.jsx(m.FieldLabel,{htmlFor:r,children:er(n)}),d.jsxs(m.FieldControl,{children:[d.jsx(m.Box,{padding:4,alignItems:"center",children:d.jsx(m.Text,{children:Qu(n,a)})}),d.jsx(m.Switch,{id:r,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:a,onCheckedChange:s=>{i||o(l$e(s))}})]})]})}function l$e(e){return{__TYPE__:"BooleanContent",value:e}}function f$e(e){const{id:t,field:n,content:r,onContentChange:i}=e;return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"colorLens"}),d.jsx(m.FieldLabel,{id:t,children:er(n)}),d.jsx(m.FieldControl,{children:d.jsx(m.Box,{padding:{left:4},alignItems:"center",children:d.jsx(m.ColorInput,{onValueChange:o=>i(d$e(o)),value:r==null?void 0:r.value,"aria-labelledby":t,placeholder:Qu(n)})})})]})}function d$e(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Color",value:e}}function p$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=i!=null&&i.value?PC.dateFromISOString(i.value):void 0;return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"dateRange"}),d.jsx(m.FieldLabel,{id:t,children:er(r)}),d.jsx(m.FieldControl,{children:d.jsx(m.Box,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:d.jsx(m.DateInput,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:u=>o(A$e(u))})})})]})}function A$e(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:h$e(e)}}function h$e(e){const t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}const Vu=R.forwardRef(function(t,n){return d.jsx(m.TextInput,{padding:e7,...t,ref:n,sx:{...t.sx,alignSelf:"stretch"}})}),e7={input:{inline:4},adornment:{inline:12}},m$e=({provider:e})=>g$e[e.toLowerCase()]??d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:d.jsx("path",{d:"M7.99992 1.33333C4.31992 1.33333 1.33325 4.32 1.33325 8C1.33325 11.68 4.31992 14.6667 7.99992 14.6667C11.6799 14.6667 14.6666 11.68 14.6666 8C14.6666 4.32 11.6799 1.33333 7.99992 1.33333ZM2.66659 8C2.66659 7.59333 2.71992 7.19333 2.80659 6.81333L5.99325 10V10.6667C5.99325 11.4 6.59325 12 7.32658 12V13.2867C4.70658 12.9533 2.66659 10.7133 2.66659 8ZM11.9266 11.6C11.7533 11.06 11.2599 10.6667 10.6599 10.6667H9.99325V8.66667C9.99325 8.3 9.69325 8 9.32658 8H5.32658V6.66667H6.65992C7.02658 6.66667 7.32658 6.36667 7.32658 6V4.66667H8.65992C9.39325 4.66667 9.99325 4.06667 9.99325 3.33333V3.06C11.9466 3.84667 13.3333 5.76667 13.3333 8C13.3333 9.38667 12.7933 10.6533 11.9266 11.6Z",fill:"#6F6E77"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6524_22412",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),g$e={codepen:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:d.jsx("path",{d:"M15.9879 5.44292C15.9843 5.42352 15.981 5.40413 15.9759 5.38517C15.9726 5.37375 15.9688 5.36298 15.9651 5.35177C15.9597 5.33497 15.9541 5.31816 15.9474 5.30179C15.9427 5.29037 15.9373 5.27938 15.9321 5.26839C15.9248 5.25288 15.9173 5.23758 15.9086 5.22271C15.9026 5.21172 15.8957 5.20138 15.889 5.19082C15.8798 5.1766 15.8703 5.1626 15.8599 5.14902C15.8524 5.13889 15.8446 5.1292 15.8365 5.1195C15.8257 5.10657 15.8141 5.09429 15.8024 5.08223C15.7934 5.07318 15.7843 5.06413 15.7748 5.05529C15.7623 5.04387 15.7494 5.0331 15.7358 5.02276C15.7255 5.01479 15.7154 5.0066 15.7046 4.99927C15.7007 4.99647 15.6973 4.99324 15.6932 4.99065L8.38116 0.115543C8.15039 -0.0385144 7.84939 -0.0385144 7.61863 0.115543L0.306176 4.99044C0.302082 4.99302 0.29885 4.99626 0.294756 4.99906C0.283983 5.0066 0.273856 5.01457 0.263514 5.02254C0.250155 5.0331 0.237011 5.04387 0.224515 5.05486C0.215034 5.06348 0.205985 5.07253 0.19715 5.0818C0.185084 5.09386 0.17388 5.10614 0.162892 5.11907C0.154704 5.12877 0.146947 5.13846 0.139406 5.14924C0.129064 5.16281 0.119583 5.1766 0.110318 5.19104C0.103639 5.20159 0.0969593 5.21194 0.0907108 5.22293C0.0820922 5.23779 0.0745509 5.25309 0.0674405 5.26817C0.0622694 5.27916 0.0566673 5.29037 0.0521425 5.30157C0.0454631 5.31795 0.0396456 5.33475 0.0342589 5.35156C0.030596 5.36276 0.0267177 5.37375 0.0237011 5.38388C0.0187455 5.40284 0.0150825 5.42201 0.0116351 5.44162C0.00969592 5.45153 0.00732581 5.46123 0.00603302 5.47136C0.00215465 5.50109 0 5.53082 0 5.56121V10.4372C0 10.4673 0.00215465 10.4975 0.00646395 10.527C0.00797221 10.5378 0.0107733 10.5464 0.0129279 10.5568C0.0163753 10.5762 0.0193919 10.5955 0.0258558 10.6149C0.0288723 10.6257 0.0323198 10.6365 0.0366291 10.6483C0.0420157 10.6656 0.0474023 10.6828 0.0538662 10.6985C0.058391 10.7093 0.0646395 10.7201 0.0689488 10.7309C0.0760591 10.7459 0.0840314 10.761 0.09265 10.7768C0.098683 10.7875 0.105578 10.7983 0.112042 10.8082C0.121307 10.8233 0.131434 10.8362 0.142207 10.8491C0.149748 10.8599 0.157289 10.8685 0.165908 10.8789C0.176897 10.8918 0.187455 10.9047 0.200382 10.9162C0.209217 10.9248 0.21762 10.9355 0.228393 10.942C0.24089 10.9528 0.254249 10.9636 0.267177 10.9748C0.277519 10.9834 0.288723 10.9898 0.297342 10.9982C0.301436 11.0004 0.303806 11.0047 0.308115 11.0067L7.61863 15.8841C7.73412 15.9617 7.86641 16.0005 8 15.9998C8.13359 15.9992 8.26588 15.9611 8.38137 15.8841L15.6938 11.0092C15.6979 11.0067 15.7014 11.0036 15.7052 11.0008C15.716 10.9933 15.7261 10.9853 15.7365 10.9773C15.7498 10.9668 15.763 10.9558 15.7755 10.9446C15.785 10.9362 15.794 10.9269 15.8031 10.9179C15.8149 10.9058 15.8263 10.8935 15.8371 10.8806C15.8453 10.8709 15.8531 10.8612 15.8606 10.8509C15.8709 10.8373 15.8804 10.8233 15.8897 10.8091C15.8964 10.7987 15.903 10.7882 15.9093 10.7776C15.9179 10.7625 15.9254 10.7472 15.9328 10.7317C15.9379 10.7207 15.9433 10.7097 15.9481 10.6985C15.9548 10.6819 15.9604 10.6651 15.9657 10.6483C15.9694 10.6371 15.9733 10.6261 15.9765 10.6149C15.9815 10.596 15.9849 10.5766 15.9886 10.5572C15.9903 10.5473 15.9929 10.5376 15.994 10.5275C15.9978 10.4977 16 10.468 16 10.4376V5.5625C16 5.53212 15.9976 5.50238 15.994 5.47265C15.9922 5.46209 15.989 5.45347 15.9869 5.44292H15.9879ZM7.99978 9.62638L5.56826 8.00005L7.99978 6.37351L10.4315 8.00005L7.99978 9.62638ZM7.31245 5.17919L4.33171 7.17288L1.92561 5.56336L7.31245 1.97221V5.17919ZM3.09515 7.99984L1.37531 9.15021V6.84947L3.09515 7.99984ZM4.33171 8.82765L7.31245 10.8211V14.0281L1.92561 10.4365L4.33171 8.82722V8.82765ZM8.68733 10.8207L11.6681 8.82722L14.0744 10.4365L8.68733 14.0277V10.8207ZM12.9046 8.00027L14.6247 6.84969V9.15064L12.9046 7.99984V8.00027ZM11.6681 7.17288L8.68733 5.1794V1.97221L14.0744 5.56336L11.6681 7.17288Z",fill:"black"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22409",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:d.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:d.jsx("path",{d:"M6.24312 14.1129V8.35021L1.28724 5.49888V8.78388L3.55732 10.0999V12.5702L6.24312 14.1129ZM7.53036 14.1468L10.2658 12.571V10.0422L12.5506 8.71812V5.47426L7.53036 8.3727V14.1468ZM11.8904 4.36906L9.25164 2.83995L6.93472 4.18436L4.60022 2.8386L1.93795 4.38817L6.90626 7.24665L11.8904 4.36906ZM0 12.0115V4.02675L6.91821 0L13.8378 4.00984V11.9988L6.91805 15.985L0 12.0115Z",fill:"black"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22406",children:d.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[d.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.73038 10.3003C8.40789 10.6268 8.00377 10.7901 7.51804 10.7901C7.04025 10.7901 6.64411 10.6308 6.32956 10.3122C6.01503 9.99367 5.85776 9.58351 5.85776 9.08176C5.85776 8.60389 6.01901 8.20766 6.3415 7.89306C6.66401 7.57847 7.06016 7.42118 7.52998 7.42118C7.84849 7.42118 8.13715 7.49484 8.39594 7.64219C8.65474 7.78953 8.8558 7.99063 8.99913 8.2455C9.14246 8.50034 9.21412 8.77908 9.21412 9.08176C9.21412 9.56757 9.05287 9.97376 8.73038 10.3003ZM9.10662 3.58632V6.35792C8.82791 6.07918 8.53131 5.87808 8.21678 5.75463C7.90223 5.63118 7.54988 5.56946 7.1597 5.56946C6.53062 5.56946 5.96527 5.72476 5.4636 6.03538C4.96193 6.34597 4.57176 6.77007 4.29305 7.30768C4.01435 7.84528 3.875 8.44062 3.875 9.09369C3.875 9.76269 4.01236 10.366 4.28708 10.9036C4.5618 11.4412 4.95197 11.8653 5.45763 12.1759C5.96328 12.4865 6.54258 12.6418 7.19553 12.6418C8.14312 12.6418 8.80403 12.3312 9.17831 11.71H9.20218V12.5595H11.0894V3.15625L9.10662 3.58632Z",fill:"#232323"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22345",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("rect",{width:"16",height:"16",fill:"white"}),d.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[d.jsx("path",{d:"M8.43286 7.78387C8.43286 9.321 9.67925 10.5674 11.2166 10.5674C12.7538 10.5674 13.9999 9.321 13.9999 7.78387C13.9999 6.24675 12.7538 5.00061 11.2166 5.00061C9.67925 5.00061 8.43286 6.24675 8.43286 7.78387Z",fill:"#FF0084"}),d.jsx("path",{d:"M2 7.78408C2 9.32121 3.24614 10.5676 4.78352 10.5676C6.32089 10.5676 7.56703 9.32121 7.56703 7.78408C7.56703 6.24695 6.32089 5.00081 4.78352 5.00081C3.24614 5.00081 2 6.24695 2 7.78408Z",fill:"#0063DC"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22379",children:d.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("rect",{width:"16",height:"16",fill:"#121212"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),d.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),d.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),d.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6668 5.22222V4.11111H9.55569V3H8.44458V3.90739V5.0185V6.33333H9.55569H10.6668H11.7779V5.22222H10.6668Z",fill:"#FF6666"})]}),instagram:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[d.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:d.jsx("path",{d:"M4.70325 0.0949238C3.85627 0.1349 3.27778 0.270564 2.77227 0.468642C2.24897 0.672648 1.80537 0.946046 1.36408 1.38914C0.922279 1.83249 0.650958 2.27688 0.448504 2.8007C0.252489 3.3075 0.119662 3.88627 0.0822604 4.73377C0.045126 5.58283 0.0366102 5.85363 0.0407495 8.01522C0.0448729 10.1765 0.0544124 10.4479 0.0949012 11.2972C0.135388 12.1439 0.270546 12.7222 0.468623 13.2279C0.672886 13.7512 0.946004 14.1946 1.38935 14.6361C1.83245 15.0777 2.27708 15.3487 2.80115 15.5515C3.30744 15.7472 3.88644 15.8806 4.73369 15.9177C5.58273 15.9551 5.85379 15.9634 8.01483 15.9592C10.1769 15.9551 10.448 15.9456 11.297 15.9053C12.144 15.8648 12.722 15.7292 13.228 15.5316C13.7513 15.3268 14.1949 15.0542 14.6362 14.6109C15.0775 14.1678 15.3488 13.7231 15.5512 13.199C15.7473 12.6927 15.8806 12.1137 15.9175 11.267C15.9546 10.4174 15.9634 10.1461 15.9593 7.98478C15.9551 5.8232 15.9453 5.55239 15.9051 4.7036C15.8649 3.85609 15.7292 3.27811 15.5314 2.77208C15.3269 2.24877 15.054 1.80567 14.6109 1.36387C14.1678 0.922574 13.7232 0.650729 13.1991 0.448785C12.6926 0.252768 12.1138 0.119166 11.2666 0.0825425C10.4175 0.0448876 10.1465 0.0366393 7.98465 0.0407642C5.82336 0.0448892 5.5523 0.0541772 4.70325 0.0949238ZM4.79611 14.485C4.02004 14.4512 3.59863 14.3222 3.31776 14.2142C2.94585 14.0703 2.68046 13.8977 2.40114 13.6205C2.12234 13.3422 1.94928 13.0776 1.80408 12.7064C1.69497 12.4255 1.5637 12.0046 1.52734 11.2286C1.48788 10.3896 1.47886 10.1378 1.47498 8.01237C1.47086 5.88742 1.47859 5.63569 1.51522 4.79593C1.54848 4.02038 1.67822 3.59843 1.78602 3.31782C1.92993 2.94539 2.10196 2.68051 2.37973 2.4012C2.65801 2.12187 2.92263 1.94933 3.29402 1.80412C3.57463 1.69451 3.99555 1.56426 4.77134 1.52738C5.61084 1.48766 5.8623 1.47915 7.98723 1.47502C10.1127 1.47089 10.3644 1.47838 11.2042 1.51526C11.9797 1.54904 12.4016 1.67749 12.682 1.78607C13.0541 1.92998 13.3195 2.1015 13.5986 2.37979C13.8777 2.65808 14.0507 2.92218 14.1959 3.29435C14.3055 3.57418 14.4358 3.99562 14.4724 4.77117C14.5124 5.61068 14.5214 5.8624 14.5253 7.98736C14.5294 10.1128 14.5217 10.3646 14.4848 11.2038C14.451 11.9799 14.3223 12.4016 14.214 12.6827C14.0701 13.0543 13.898 13.3197 13.62 13.5991C13.342 13.8773 13.0774 14.0509 12.7057 14.1961C12.4256 14.3055 12.0042 14.436 11.2289 14.4729C10.3894 14.5123 10.1379 14.5214 8.01225 14.5252C5.88732 14.5294 5.63586 14.5214 4.79611 14.485ZM11.2854 3.74493C11.2864 4.27211 11.7151 4.69896 12.2422 4.69792C12.7697 4.69689 13.1965 4.2685 13.1957 3.74132C13.1947 3.21414 12.7661 2.78704 12.2386 2.78807C11.7112 2.7891 11.2844 3.21775 11.2854 3.74493ZM3.91277 8.00773C3.91714 10.2653 5.75063 12.0913 8.0076 12.0869C10.2648 12.0825 12.0919 10.2495 12.0875 7.99201C12.0831 5.73526 10.2494 3.90819 7.99188 3.91257C5.73489 3.91696 3.90837 5.75073 3.91277 8.00773ZM5.34648 8.0049C5.3439 6.53969 6.52978 5.34942 7.99471 5.34683C9.45991 5.344 10.6504 6.52937 10.6533 7.99484C10.6561 9.46031 9.47022 10.6503 8.00477 10.6532C6.53984 10.656 5.34932 9.47037 5.34648 8.0049Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[d.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[d.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[d.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),d.jsx("g",{mask:"url(#mask3_6523_22356)",children:d.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),d.jsxs("defs",{children:[d.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:d.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),d.jsx("clipPath",{id:"clip0_6523_22356",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})}),d.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEAlgCWAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMAEAMCAwYAAFokAABijgAAd23/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoXHh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoaJjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEICOMI4QMBIgACEQEDEQH/xADDAAEBAQEBAQEBAAAAAAAAAAAAAQUEBgMHAgEBAQADAQEAAAAAAAAAAAAAAAECAwUEBhAAAQIEBAcBAQEBAQAAAAAAAAMFcIA1FiIjMxQBEQIyEwQ0MRIGFZARAAADCAICAgEABwUJAQAAAAADo4ABcqLSBDREsXNDRcECESExQVGREjIQYdETM3GB8VJiksLiFBUSAAECBgEEAwABAwIHAAAAAAABAnCxcpIDM0QxMkNFcZFzERBBEmGCoCFRgUKDNP/aAAwDAQACEQMRAAAA9X5n5Z3e26jLei6jLRqMsajLGoyxqMsajLGoyxqMsajLJqMsajLGoyxqMsajLGoyxqMsalyqajLGoyxqMsajLJqMsajLGo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KTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoGUmXQMpMugZSZdAyky6BlJl0DKTLoDnvufy537Hll/h/wDD6D6Wt/8AX6/X7GP/AJSzvp+h35f+p32+v9/73fw/b/ZdP+37Ps76u/2fX6u+rDn6vt/3/wDqLvsfww7ddj+GHbrsfww7d9j+GHbrsfww7ddj+GHbrsfww7ddj+GHbrsfww7ddj+GHbrsfww7ddj+GHbrsfww7ddj+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfw5h277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3XY/hh26jfww7dRv4Ydu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BMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMNeYa8w15hrzDXnGvONeca8415xrzjXnGvONeca041pxrTjWnGtONaca041pxrTjWnGtONacas41ZxqzjVnGrONWcas41ZxqzjVnGrONScak41JxqTjUUGooNRQaig1FBqKDTUGmoNNQaag01BpqDTUGmoNNQaag0lBpKDSUGkoNJQaSg0lBpKDSUGioNFQaKg0VBoqDRVGiqNFUaKo0FRoKjQVGgqNBUaCo0FRoKjQVGgqPXqj16o9eqPXqj16o9eqPXqj16o9eqPXqj1yo9cqPXKj1yo9cqPXLD1yw9csPXLD1yw9csPWrD1qw9asPWrD1qw9asPWrD1qw9asPWrD1qw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrB34/8Ay/z/AH/53yHY/wDU/E/0v+P7/wCz/9k="})]})]}),pinterest:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[d.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),d.jsx("path",{d:"M7.999 2C4.68555 2 2 4.68555 2 7.999C2 10.5406 3.58174 12.7102 5.81336 13.5861C5.76137 13.1121 5.71338 12.3843 5.83336 11.8644C5.94134 11.3964 6.53724 8.88285 6.53724 8.88285C6.53724 8.88285 6.35727 8.52291 6.35727 7.993C6.35727 7.15914 6.84119 6.53524 7.44309 6.53524C7.95501 6.53524 8.20297 6.91918 8.20297 7.3811C8.20297 7.89502 7.87502 8.66489 7.70705 9.37877C7.56507 9.97667 8.007 10.4626 8.5949 10.4626C9.66072 10.4626 10.4806 9.33878 10.4806 7.71505C10.4806 6.27929 9.44876 5.27345 7.975 5.27345C6.26729 5.27345 5.26546 6.55324 5.26546 7.87702C5.26546 8.39293 5.46342 8.94484 5.71138 9.24679C5.75937 9.30678 5.76737 9.35877 5.75337 9.41876C5.70738 9.60873 5.6074 10.0167 5.5874 10.0987C5.56141 10.2086 5.50142 10.2326 5.38743 10.1786C4.63756 9.83069 4.16964 8.73488 4.16964 7.85502C4.16964 5.96334 5.54541 4.22563 8.13298 4.22563C10.2146 4.22563 11.8304 5.70938 11.8304 7.69105C11.8304 9.75871 10.5266 11.4224 8.71688 11.4224C8.10898 11.4224 7.53708 11.1065 7.34111 10.7345C7.34111 10.7345 7.04116 11.8804 6.96717 12.1603C6.83119 12.6822 6.46526 13.3341 6.2213 13.732C6.7832 13.906 7.3791 14 7.997 14C11.3104 14 13.996 11.3144 13.996 8.001C13.998 4.68555 11.3124 2 7.999 2Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6570_25513",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:d.jsx("path",{d:"M12.6609 7.10585C10.121 5.59751 5.93158 5.45882 3.50697 6.1947C3.11759 6.31287 2.70584 6.09298 2.5879 5.70373C2.46988 5.31411 2.68945 4.90265 3.07911 4.78429C5.86241 3.93945 10.4892 4.1026 13.4132 5.83828C13.7634 6.04622 13.8782 6.49851 13.6707 6.84813C13.4629 7.19833 13.0103 7.31376 12.6609 7.10585ZM12.5777 9.33993C12.3995 9.62908 12.0215 9.71979 11.7327 9.54223C9.61522 8.24063 6.38637 7.86357 3.88123 8.624C3.55636 8.72218 3.21323 8.53899 3.11455 8.21475C3.01666 7.88989 3.19992 7.54738 3.5242 7.44859C6.38597 6.58018 9.9436 7.00081 12.3756 8.49536C12.6644 8.67322 12.7553 9.05146 12.5777 9.33993ZM11.6136 11.4855C11.472 11.7177 11.1697 11.7904 10.9383 11.6489C9.08801 10.518 6.75909 10.2627 4.01637 10.8891C3.75207 10.9497 3.48866 10.7841 3.42838 10.5198C3.36785 10.2556 3.53284 9.99217 3.79772 9.93186C6.79916 9.2457 9.37381 9.54101 11.4506 10.8101C11.6822 10.9515 11.7551 11.254 11.6136 11.4855ZM8.00002 0.120623C3.64839 0.120623 0.120605 3.64834 0.120605 7.99989C0.120605 12.352 3.64839 15.8794 8.00002 15.8794C12.3517 15.8794 15.8794 12.352 15.8794 7.99989C15.8794 3.64834 12.3517 0.120623 8.00002 0.120623Z",fill:"#1ED760"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22402",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:d.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d.jsx("path",{d:"M14.3193 4.31285C14.329 4.45301 14.329 4.59317 14.329 4.73462C14.329 9.04475 11.0516 14.0156 5.05865 14.0156V14.0131C3.28832 14.0156 1.55478 13.508 0.0644531 12.5507C0.321873 12.5817 0.580582 12.5972 0.839937 12.5979C2.30703 12.5992 3.7322 12.1063 4.88639 11.1988C3.4922 11.1724 2.26961 10.2623 1.84252 8.93366C2.3309 9.02796 2.83413 9.00858 3.31349 8.87746C1.79349 8.57001 0.699937 7.23299 0.699937 5.68023C0.699937 5.66602 0.699937 5.65246 0.699937 5.63889C1.15284 5.89144 1.65994 6.0316 2.17865 6.0471C0.747034 5.08923 0.305743 3.18251 1.17026 1.69176C2.82445 3.7296 5.2651 4.96844 7.8851 5.09956C7.62252 3.96664 7.98123 2.77947 8.82768 1.98307C10.1399 0.748096 12.2038 0.811395 13.4374 2.12452C14.167 1.98048 14.8664 1.71243 15.5064 1.33264C15.2632 2.0877 14.7541 2.72909 14.0741 3.13665C14.7199 3.06044 15.3509 2.88734 15.9451 2.62316C15.5077 3.2794 14.9567 3.85103 14.3193 4.31285Z",fill:"#1D9BF0"})}),vimeo:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[d.jsx("path",{d:"M16 14.4C16 15.28 15.28 16 14.4 16H1.6C0.72 16 0 15.28 0 14.4V1.6C0 0.72 0.72 0 1.6 0H14.4C15.28 0 16 0.72 16 1.6V14.4Z",fill:"#1AB7EA"}),d.jsx("path",{d:"M13.9945 5.3084C13.9391 6.42815 13.1229 7.97447 11.5458 9.93402C9.91331 11.9736 8.52987 13 7.40928 13C6.70372 13 6.12267 12.3735 5.63846 11.1338C5.32027 9.98735 4.98824 8.85427 4.67005 7.70786C4.31036 6.46814 3.92299 5.84161 3.50796 5.84161C3.42495 5.84161 3.10676 6.02824 2.56721 6.38816L2 5.68165C2.59488 5.1751 3.17593 4.68187 3.75698 4.17532C4.54554 3.52214 5.14042 3.17555 5.54162 3.13556C6.46853 3.05557 7.04958 3.66877 7.27093 4.97514C7.50612 6.40149 7.67213 7.28129 7.75514 7.62788C8.01799 8.80095 8.32235 9.40081 8.64054 9.40081C8.88956 9.40081 9.26309 9.01423 9.77497 8.2544C10.273 7.49457 10.5497 6.90804 10.5774 6.50813C10.6465 5.85494 10.3837 5.52169 9.77497 5.52169C9.48444 5.52169 9.19392 5.58834 8.88956 5.70831C9.48444 3.84206 10.605 2.94893 12.2652 3.00225C13.4826 3.02891 14.0637 3.80207 13.9945 5.3084Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22340",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("path",{d:"M15.6656 3.75817C15.4816 3.06609 14.9395 2.5211 14.2511 2.33614C13.0034 2 8 2 8 2C8 2 2.99666 2 1.7489 2.33614C1.06051 2.5211 0.518324 3.06609 0.334339 3.75817C0 5.01251 0 7.62963 0 7.62963C0 7.62963 0 10.2467 0.334339 11.5012C0.518324 12.1932 1.06051 12.7381 1.7489 12.9232C2.99666 13.2593 8 13.2593 8 13.2593C8 13.2593 13.0034 13.2593 14.2511 12.9232C14.9395 12.7381 15.4816 12.1932 15.6656 11.5012C16 10.2467 16 7.62963 16 7.62963C16 7.62963 16 5.01251 15.6656 3.75817Z",fill:"#ED1D24"}),d.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function t7(e){const{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=R.useRef(null),[a,u]=R.useState(!1);Xe.useOnChange(t,()=>{var c;a&&(u(!1),(c=o.current)==null||c.reset())});function s(){u(!0),r(void 0)}return $r.toURL(t)?t===(n==null?void 0:n.embed_url)?d.jsx(X1,{content:n,selected:i}):d.jsx(m.ErrorBoundary,{ref:o,renderError:v$e,onError:s,children:d.jsx(R.Suspense,{fallback:n&&d.jsx(X1,{content:n,selected:i}),children:d.jsx(y$e,{url:t,selected:i,onContentChange:r})})}):null}function v$e(){return d.jsxs(m.Box,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[d.jsx(m.Icon,{name:"alert",size:"small",color:"grey11"}),d.jsx(m.Text,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function X1(e){const{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:u}=_$e(t);return d.jsxs(m.PreviewCard,{selected:n,children:[d.jsx(m.PreviewImage,{src:r.url,aspectRatio:r.aspectRatio}),d.jsxs(m.PreviewContent,{children:[d.jsxs(m.Box,{display:"flex",alignItems:"center",gap:4,children:[d.jsx(m$e,{provider:i}),d.jsx(m.Text,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&d.jsx(m.Text,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),d.jsx(m.Text,{variant:"smallBold",href:a,children:u})]})]})}function y$e(e){const{url:t,onContentChange:n,selected:r}=e,i=b$e({url:t,onContentChange:n});return d.jsx(X1,{content:i,selected:r})}function b$e(e){const{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=xe(),i=nt.useRequest(C$e,[t,r]),o=Xe.useStableCallback(n);return R.useEffect(()=>{const a=m.handleEditorFlushSyncError(()=>o(i));return()=>{clearTimeout(a)}},[i,o]),i}function C$e(e,t){const n=new URL(t);return n.searchParams.set("url",e),_e.request(n,{okType:S$e(e)})}function S$e(e){return B.object({type:B.string(),version:B.string().or(B.number()).nullish(),title:B.string().nullish(),author_name:B.string().nullish(),author_url:B.string().nullish(),provider_name:B.string().nullish(),provider_url:B.string().nullish(),cache_age:B.string().or(B.number()).nullish(),thumbnail_url:B.string().nullish(),thumbnail_width:B.number().nullish(),thumbnail_height:B.number().nullish(),html:B.string().nullish()}).passthrough().transform(t=>{const n={embed_url:e};return{...n,__TYPE__:"EmbedContent",type:t.type,version:t.version,title:t.title,author_name:t.author_name,author_url:t.author_url,provider_name:t.provider_name,provider_url:t.provider_url,cache_age:t.cache_age,thumbnail_url:t.thumbnail_url,thumbnail_width:t.thumbnail_width,thumbnail_height:t.thumbnail_height,html:t.html,all:{...n,...t}}})}function _$e(e){let t="";switch(e.type){case"video":t=e.title??"";break;case"photo":t=`View this post${e.provider_name?` on ${e.provider_name}`:""}`;break;default:t=`Open${e.provider_name?` on ${e.provider_name}`:""}`}return{url:e.embed_url,thumbnail:{url:e.thumbnail_url??"",aspectRatio:e.type==="video"?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}function I$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=Xe.useDebounceState({initialState:(i==null?void 0:i.embed_url)??"",startTransition:R.startTransition});function u(s){a.set(s),$r.toURL(s)||o(void 0)}return d.jsxs(m.Field,{footer:$r.toURL(a.value)&&d.jsx(m.FieldFooter,{children:d.jsx(t7,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[d.jsx(m.FieldIcon,{name:"cloud"}),d.jsx(m.FieldLabel,{htmlFor:t,children:er(r)}),d.jsx(m.FieldControl,{children:d.jsx(Vu,{id:t,readOnly:n,placeholder:Qu(r),value:a.value,onValueChange:u,variant:$r.toURL(a.value)?"link":"normal",endAdornment:d.jsx(m.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>u("")})})})]})}function n7(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function Nb(e){const t=/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/,n=e.match(t);if(!n)return;const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return;const o={lat:r,lng:i};if(n7(o))return o}function UF(e){return e?`${e.lat}, ${e.lng}`:""}function BF(e){const t=/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/,n=e.match(t);if(!n)return Nb(e);const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return Nb(e);const o={lat:r,lng:i};return n7(o)?o:Nb(e)}function T$e(e){const{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:u,clearValue:s,isValidCoordinates:c}=x$e(i);return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"place"}),d.jsx(m.FieldLabel,{htmlFor:n,children:er(t)}),d.jsx(m.FieldControl,{children:d.jsx(Vu,{id:n,onValueChange:o,placeholder:Z1,readOnly:r,value:a,onBlur:u,variant:c?"link":"normal",endAdornment:d.jsx(m.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:s})})})]})}function x$e(e){const{content:t,onContentChange:n}=e,r=UF(t==null?void 0:t.position),[i,o]=R.useState(r);function a(){const c=BF(i);if(!c)return o(""),n(void 0);const{lat:l,lng:f}=c;o(UF({lat:l,lng:f})),n({__TYPE__:"GeoPointContent",position:{lat:l,lng:f}})}function u(){o(""),n(void 0)}const s=!!BF(i);return{displayedValue:i,isValidCoordinates:s,onValueChange:o,onBlur:a,clearValue:u}}function r7(e){const{fieldLabel:t,imageLabel:n=[]}=e;return d.jsxs(m.CardHeaderTitle,{children:[d.jsx(m.Text,{variant:"bold",noWrap:!0,children:Ip.overflow(t,30)}),n.length!==0&&d.jsx(m.Text,{color:"grey11",noSelect:!0,children:` • ${n.join(" • ")}`})]})}function i7(e){const{fieldLabel:t,isUpdating:n,readOnly:r,onMediaDialogOpenChange:i}=e;return d.jsxs(d.Fragment,{children:[d.jsx(m.CardHeader,{sx:{flexWrap:"wrap"},children:d.jsx(r7,{fieldLabel:t})}),d.jsx(m.CardContent,{children:d.jsx(m.Card,{color:"grey2",variant:"dashed",paddingBlock:12,radius:4,sx:{width:"100%"},children:d.jsx(m.CardContent,{children:d.jsxs(m.BlankSlate,{variant:"horizontal",children:[d.jsx(m.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple9",backgroundColor:"purple4",size:"small"}),d.jsx(m.BlankSlateTitle,{children:n?"Preparing your image...":"You haven't selected an image"}),!r&&d.jsx(m.BlankSlateActions,{children:d.jsx(m.Button,{disabled:n,onClick:()=>i(!0),size:"medium",children:"Select image"})})]})})})})]})}const w$e=lp({id:zo(),width:jm(),height:jm(),urls:lp({full:zo(),small:zo().transform(Iwe)}),alt_description:zo().optional(),description:zo().nullable()}),$$e=lp({results:mq(w$e)}).transform(e=>e.results);function o7(e,t){const n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),_e.request(n,{okType:$$e})}nt.cache.registerFetcherConfig(o7,{cacheCapacity:5,revalidationStrategy:{type:"never"}});function E$e(e,t){const n=R.useRef(),r=xe(),i=nt.useRequest(o7,[e,t]);return Xe.useDebounce(t,1e3,()=>{var o;n.current&&t!==n.current&&((o=r.onAnalyticsEvent)==null||o.call(r,"Unsplash Image Searched")),n.current=t}),i}function R$e(e){const{onSelectedChange:t}=e,[n,r]=R.useTransition(),i=Xe.useDebounceState({initialState:"",ms:300,startTransition:r});return d.jsxs(m.Box,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[d.jsx(m.FormSearchInput,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(jq,{}),children:d.jsx(R.Suspense,{fallback:d.jsx(F$e,{}),children:d.jsx(O$e,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function O$e(e){const{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=M$e({term:t,onSelectedChange:n});return d.jsxs(d.Fragment,{children:[d.jsx(a7,{children:i==null?void 0:i.map(u=>{const c=new URL(u.urls.full).searchParams.get("fm")??"jpg";return d.jsx(m.MediaCard,{url:u.urls.small,filename:u.description??"Unsplash Image",selected:a===u.id,onCardClick:()=>o(u),onCheckedChange:()=>o(u),extension:c,width:u.width,height:u.height,loading:r},u.id)})}),i.length===0&&d.jsx(cq,{})]})}function a7(e){const{children:t}=e;return d.jsx(m.ScrollArea,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 250px), 1fr))",gap:16,paddingBottom:16,position:"relative",width:"100%"},children:t})}function F$e(){return d.jsx(a7,{children:gn.range(1,24).map(e=>d.jsx(Dq,{},e))})}function M$e(e){var c;const{term:t,onSelectedChange:n}=e,{unsplashApiBaseUrl:r}=xe(),i=E$e(r,t||"citrus fruit"),o=(c=i==null?void 0:i[0])==null?void 0:c.id,[a,u]=R.useState();R.useEffect(()=>{n==null||n([]),u(void 0)},[o,n]);function s(l){if(l.id===a)return u(void 0),n==null?void 0:n([]);u(l.id),n==null||n([{...l,url:l.urls.full,alt:l.alt_description}])}return{media:i,toggleSelected:s,selectedImageId:a}}function RR(e){const{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=xe(),a=o.mediaLibrary,[u,s]=R.useState(()=>a?"media":"unsplash"),[c,l]=R.useState(new Set),[f,p]=R.useState([]),A=c.size+f.length,h=nt.useFetcherData(Yi);R.useEffect(()=>{!t||!a||Mq({config:o,assetType:i})},[t,o,i,a]);function v(C){if(C!=="media"&&C!=="unsplash")throw new Error(`Invalid option ${C}.`);s(C)}function _(C){C||l(new Set),n(C)}const S=Uxe({assetType:i,mediaDialogOpen:t});function I(){var C;if(u==="unsplash"){const y=f[0];if(!y)return;r(y),(C=o.onAnalyticsEvent)==null||C.call(o,"Unsplash Image Added")}else if(u==="media"){const w=h.flatMap(M=>M.items).filter(M=>c.has(M.id))[0];if(!w)return;r(w),S(w.id)}_(!1)}function T(){if(A===0)return"Select a media item to add to the page";if(A>1)return"Only one media item can be added to the page"}const{containerRef:g}=m.useAlert();return d.jsxs(m.Dialog,{open:t,onOpenChange:_,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside:C=>{g&&Xe.refContainsTarget(g,C.target)&&C.preventDefault()},children:[d.jsx(m.DialogHeader,{icon:"image",title:"Media library"}),d.jsxs(m.DialogOptions,{value:u,onValueChange:v,padding:"small",width:"auto",children:[a&&d.jsx(m.DialogOptionsItem,{value:"media",icon:"photo"}),d.jsx(m.DialogOptionsItem,{value:"unsplash",icon:"unsplash"})]}),d.jsx(m.DialogContent,{children:d.jsxs(m.Box,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[d.jsx(aq,{}),d.jsxs(m.Box,{overflow:"hidden",backgroundColor:"grey3",padding:{top:16,inline:16},flexGrow:1,children:[u==="media"&&d.jsx(Hq,{assetType:i,onSelectedChange:l}),u==="unsplash"&&d.jsx(R$e,{onSelectedChange:p})]})]})}),d.jsxs(m.DialogActions,{children:[d.jsx(m.DialogCancelButton,{}),d.jsx(m.DialogActionButton,{onClick:I,disabled:A!==1,tooltipLabel:T(),children:"Add to page"})]})]})}function u7(e){const{isMediaDialogOpen:t,selected:n,onMediaSelected:r,onMediaDialogOpenChange:i,children:o}=e;return d.jsxs(m.Card,{color:n?"indigo2":"grey2",variant:n?"selected":"dashed",paddingBlock:12,radius:4,children:[o,d.jsx(RR,{open:t,onOpenChange:i,onMediaSelected:r,assetType:"image"})]})}function s7(e){const{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:u}=n,s=L$e({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:s,edit:{...t.edit,zoom:u,crop:{x:o,y:a}}}}function k$e(e){var c,l,f;const{field:t,content:n,thumbnail:r,croppedImage:i}=e;if(r===dd)return c7({content:n,croppedImage:i});const o=Ue.isImageContent(n),a=(l=(c=t==null?void 0:t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===r),u=o?(f=n.thumbnails)==null?void 0:f[r]:void 0;if(!a||!u)return n;const s=s7({contentView:u,croppedImage:i});return s.url===u.url?n:{...n,thumbnails:o?{...n.thumbnails,[r]:s}:void 0}}function c7(e){const{content:t,croppedImage:n}=e,r=s7({contentView:t,croppedImage:n});return r.url===t.url?t:{...t,...r}}function L$e(e){const{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:u,cropWidth:s}=n,c=new URL(t.url),l=t.height!==a||t.width!==o;if(r!==0||i!==0||u!==t.height||s!==t.width){const p=[r,i,s,u].map(Math.round).join(",");c.searchParams.set("rect",p),c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())}return l&&(c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())),c.toString()}function j$e(e){const{x:t,y:n}=e.edit.crop,r=e.edit.zoom,{width:i,height:o}=e,{width:a,height:u}=e.origin,s=i/o,c=Math.min(a,u*s/r),l=c/s;return{x:t,y:n,width:i,height:o,zoom:r,cropWidth:c,cropHeight:l}}function U$e(e){const{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:u,cropWidth:s}=n,c=t.contentView,l={x:n.x,y:n.y,width:s,height:u},[f,p]=R.useState(),A=(c==null?void 0:c.origin.url)??"",h=!(t!=null&&t.thumbnail.height&&(t!=null&&t.thumbnail.width));function v(g,C){const y=parseInt(C);isNaN(y)||y<=0||!h||r({...n,[g]:y})}function _(g){r({...n,cropWidth:g.width,cropHeight:g.height,x:g.x,y:g.y})}function S(g){r({...n,zoom:g})}function I(){p(Dh),r({...n,...Dh})}function T(){c&&(p(Dh),r({...n,...Dh,zoom:1,cropWidth:c.width,cropHeight:c.height}))}return d.jsxs(m.Box,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[d.jsxs(m.Box,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[d.jsx(m.Tooltip,{content:"Center",children:d.jsx(m.Button,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:I})}),d.jsx(m.Tooltip,{content:"Cover",children:d.jsx(m.Button,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:T})}),d.jsx(m.Separator,{orientation:"vertical"}),d.jsx(m.FormInput,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:g=>v("width",g),sx:{width:100},disabled:!h}),d.jsx(m.FormInput,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:g=>v("height",g),sx:{width:100},disabled:!h})]}),d.jsx(m.Cropper,{image:A,aspect:i/o,crop:f??{x:0,y:0},onCropChange:p,zoom:a,onZoomChange:S,onCropAreaChange:(g,C)=>_(C),initialCroppedAreaPixels:l}),d.jsx(m.Box,{width:"100%",maxWidth:320,children:d.jsx(m.Slider,{min:1,max:3,step:.01,value:[a],onValueChange:([g])=>S(g??1)})})]})}const Dh={x:0,y:0};function B$e(e){const{trigger:t,initialImages:n,renderTooltip:r}=e,{open:i,onOpenChange:o,ready:a,option:u,selectedImage:s,croppedImage:c,setCroppedImage:l,setReady:f,setOption:p}=W$e(e);return d.jsxs(m.Dialog,{trigger:t,onAnimationEnd:()=>f(!0),open:i,onOpenChange:o,renderTooltip:r,children:[d.jsx(m.DialogHeader,{icon:"photo",title:"Image editor"}),d.jsx(m.DialogOptions,{value:String(u),onValueChange:A=>p(Number(A)),children:n.map((A,h)=>d.jsx(m.DialogOptionsItem,{value:String(h),icon:"photo",title:A.labels[0]??"Main",subtitle:A.labels[1]??""},A.thumbnail.name))}),s&&d.jsx(m.DialogContent,{children:a&&c&&d.jsx(U$e,{selectedImage:s,imageCrop:c,setImageCrop:l},s.thumbnail.name)})]})}function W$e(e){const{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=R.useState(_),[a,u]=R.useState(!1),[s,c]=R.useState(!1),[l,f]=R.useState(n);function p(S){S?(f(n),o(_())):(c(!1),r({option:l,croppedImages:i})),u(S)}const A=t[l],h=i[(A==null?void 0:A.thumbnail.name)??""];function v(S){if(!A)return;const I=A.thumbnail.name;o({...i,[I]:S})}function _(){return t.reduce((S,I)=>(I.contentView&&(S[I.thumbnail.name]=j$e(I.contentView)),S),{})}return{open:a,ready:s,option:l,selectedImage:A,croppedImage:h,setCroppedImage:v,setReady:c,setOption:f,onClose:r,onOpenChange:p}}function K$e(e){const{id:t,readOnly:n,altText:r,onValueChange:i,selected:o}=e;return d.jsxs(m.Field,{selected:o,children:[d.jsx(m.FieldLabel,{htmlFor:t,children:"Alt text"}),d.jsx(m.FieldControl,{children:d.jsx(m.Box,{flexGrow:1,height:40,children:d.jsx(Vu,{id:t,placeholder:"Short description for the visually impaired",readOnly:n,value:r,onValueChange:i,padding:{input:{inline:12}}})})})]})}function P$e(e){const{fieldLabel:t,imageLabel:n,initialImages:r,page:i,displaySeparator:o=!0,isSVGContentView:a,visibility:u,onClear:s,onCropperDialogClose:c,onMediaDialogOpenChange:l}=e;return d.jsxs(m.Box,{display:"flex",flexDirection:"column",gap:12,children:[d.jsxs(m.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:4,children:[d.jsx(r7,{fieldLabel:t,imageLabel:n}),d.jsxs(m.CardHeaderActions,{sx:{visibility:u},children:[d.jsx(B$e,{trigger:d.jsx(m.Button,{startIcon:"crop",disabled:a}),renderTooltip:f=>d.jsx(m.Tooltip,{content:"Crop & Resize",children:f}),initialImages:r,initialOption:i,onClose:c}),d.jsx(m.Tooltip,{content:"Replace",children:d.jsx(m.Button,{startIcon:"imageSearch",hiddenLabel:"Replace",onClick:()=>l(!0)})}),d.jsx(m.Tooltip,{content:"Clear",children:d.jsx(m.Button,{onClick:s,startIcon:"delete"})})]})]}),o&&d.jsx(m.Separator,{style:"dashed",decorative:!0})]})}function D$e(e){const{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:u,previewImageUrl:s,onSelect:c}=e;function l(f){return f.nativeEvent instanceof MouseEvent&&(f.metaKey||f.ctrlKey)?window.open(n,"_blank"):c()}return d.jsxs(m.Card,{paddingBlock:16,onSelect:l,children:[d.jsx(m.CardContent,{children:d.jsxs(m.Box,{justifyContent:"space-between",children:[d.jsxs(m.Box,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[d.jsx(N$e,{documentType:t}),d.jsx(q$e,{title:r,statusColor:i}),d.jsx(Q$e,{description:o})]}),d.jsx(V$e,{previewImageUrl:s})]})}),a.length>0&&d.jsx(z$e,{tags:a,tagsFilter:u})]})}function N$e(e){const{documentType:t}=e;return d.jsx(m.Badge,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function q$e(e){const{title:t,statusColor:n}=e;return d.jsxs(m.Box,{gap:8,alignItems:"center",children:[d.jsx(m.Dot,{color:n}),d.jsx(m.Text,{variant:"bold",children:t})]})}function Q$e(e){const{description:t}=e,n=t==null?void 0:t.substring(0,150);return n?d.jsx(m.Text,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):d.jsx(m.Text,{variant:"smallItalic",color:"grey11",children:"No description available"})}function V$e(e){const{previewImageUrl:t}=e;return d.jsx(m.Box,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?d.jsx(m.Image,{src:t,sizing:"cover"}):d.jsxs(d.Fragment,{children:[d.jsx(m.Icon,{name:"hideImage",size:"large",color:"grey11"}),d.jsx(m.Text,{color:"grey11",variant:"small",children:"No preview available"})]})})}function z$e(e){const{tags:t}=e;return d.jsxs(m.CardFooter,{children:[d.jsxs(m.Box,{gap:4,alignItems:"center",children:[d.jsx(m.Icon,{name:"label",size:"small",color:"grey11"}),d.jsx(m.Text,{variant:"small",color:"grey11",children:"Tags:"})]}),d.jsx(m.TextOverflow,{children:t.map(n=>d.jsx(m.Badge,{size:"medium",title:n,sx:{marginRight:8}},n))})]})}function H$e(e){var g,C;const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i}=e,o=xe();o.searchDocuments||Bn("searchDocuments");const{coreApiBaseUrl:a,documentSearchBaseUrl:u,authStrategy:s,status:c,documentListOpenSearchEnabled:l,repository:f}=o,p=l===!1;function A(){return p?W0({tags:[...Rn.map(n,y=>y.id)],customTypes:[...Rn.map(r,y=>y.id)],language:[...Rn.map(i,y=>y.id)],term:[t]}):bq({searchTerm:t,customTypesIds:[...Rn.map(r,y=>y.id)],tags:[...Rn.map(n,y=>y.id)],localeId:[...Rn.map(i,y=>y.id)][0]})}const[h,v]=R.useState([]),[_,S]=R.useState(""),I=A(),T=nt.useRequest(l7,[a,u,s,f,I,c,p]);return I!==_?(S(I),v(T.results)):T.results.length>0&&((g=gn.last(h))==null?void 0:g.id)!==((C=gn.last(T.results))==null?void 0:C.id)&&v(y=>y.concat(T.results)),{documents:h,response:T}}nt.cache.registerFetcherConfig(l7,{cacheCapacity:500,revalidationStrategy:{type:"never"}});async function l7(e,t,n,r,i,o,a){const u=oq[o];if(a){const f=await B0(e,n,i,200);return WF(f,u)}const s=await yq(t,n,r,i),c=await Sq(e,n,s.results.map(({id:l})=>l));return WF(c,u)}function WF(e,t){return{results:e.results.flatMap(r=>{const i=r.versions.filter(o=>t.includes(o.status));return i.length===0?[]:{...r,versions:i}})}}function KF(){const e=xe();e.searchDocuments||Bn("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=nt.useRequest(_q,[t,n]);return new Set(r.languages.map(i=>({id:i.id,label:i.name})))}function Y$e(){const e=xe();e.searchDocuments||Bn("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=nt.useRequest(Tq,[t,n]);return new Set(r.results.map(i=>({id:i,label:i})))}function G$e(){const e=xe();e.searchDocuments||Bn("searchDocuments");const{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e,i=nt.useRequest(gq,[t,n,r]);return new Set(i)}function J$e(e,t){const n=xe(),r=Xe.useDebounceState({initialState:""}),[i,o]=R.useState(new Set),[a,u]=R.useState(new Set);function s(){return!n.searchDocuments||!n.localeId?new Set:new Set([{id:n.localeId,label:n.localeId}])}const[c,l]=R.useState(s),f=Rn.union(a,Um(e)),p=Rn.union(i,Um(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:u,filteredLocales:c,setFilteredLocales:l,typesFilter:f,tagsFilter:p}}function Um(e){return e?Rn.map(e,t=>({id:t,label:t})):new Set}function Z$e(e){const{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:u,fixedCustomTypes:s}=e;return d.jsxs(d.Fragment,{children:[d.jsx(eEe,{selectedValues:t,onSelectedValuesChange:n}),d.jsx(eC,{selectedValues:r,fixedSelectedValues:Um(u),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:Y$e}),d.jsx(eC,{selectedValues:o,fixedSelectedValues:Um(s),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:G$e})]})}function eC(e){const[t,n]=R.useState(!1),r=R.useRef(null);return d.jsx(m.ErrorBoundary,{ref:r,renderError:()=>{var i;return d.jsx(m.FilterField,{mode:"error",onErrorRetry:(i=r.current)==null?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:d.jsx(R.Suspense,{fallback:d.jsx(m.FilterField,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:d.jsx(X$e,{open:t,setOpen:n,...e})})})}function X$e(e){const{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:u,fetchFilters:s,multiple:c}=e,l=s();return d.jsx(m.FilterField,{open:t,setOpen:n,label:a,icon:u,selectedValues:o,values:new Set(l),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:c})}function eEe(e){const{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=R.useState(Rn.first(t));function o(u){n(u),i(Rn.first(u))}const a=Rn.find(KF(),u=>{var s;return u.id===((s=Rn.first(t))==null?void 0:s.id)});return(a==null?void 0:a.label)!==(r==null?void 0:r.label)&&i(a),d.jsx(eC,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:o,label:"Locale",icon:"public",fetchFilters:KF,multiple:!1})}function f7(e){const{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,...i}=e,o=xe(),{searchTerm:a,filteredTags:u,setFilteredTags:s,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:f,setFilteredLocales:p,typesFilter:A,tagsFilter:h}=J$e(n,r),[v,_]=R.useTransition();return d.jsx(m.Dialog,{size:{height:727,width:656},hasClose:!1,...i,children:d.jsx(m.DialogContent,{children:d.jsxs(m.Box,{flexDirection:"column",height:"100%",children:[d.jsxs(m.Box,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[d.jsx(m.FormInput,{value:a.value,onValueChange:a.set,placeholder:"Search a page",icon:"search"}),o.searchDocuments&&d.jsx(Z$e,{filteredTags:u,setFilteredTags:s,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:f,setFilteredLocales:p,fixedTags:r,fixedCustomTypes:n}),d.jsx(m.Text,{variant:"smallBold",color:"grey11",children:"Link to a document"})]}),o.searchDocuments?d.jsx(m.ErrorBoundary,{renderError:nEe,children:d.jsx(R.Suspense,{fallback:d.jsx(iEe,{}),children:d.jsx(rEe,{searchTerm:a.debouncedValue,tagsFilter:h,typesFilter:A,localesFilter:f,startTransition:_,onSelectDocument:t})})}):d.jsx(d7,{message:"Slice Machine does not yet support mock data for linked documents in the simulator."}),d.jsx(tEe,{isLoading:v})]})})})}function tEe(e){const{isLoading:t}=e;return d.jsx(m.Toast,{anchor:d.jsx(m.Box,{position:"relative",width:"100%",justifyContent:"center",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more results ...",seconds:1})}function nEe(){return d.jsx(m.Box,{height:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",children:d.jsx(m.DefaultErrorMessage,{title:"Request failed",description:"An error occurred while fetching documents.",errorImageSrc:m.dialogErrorImage})})}function rEe(e){const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,onSelectDocument:o}=e,{documents:a}=H$e({searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r}),u=xe();return d.jsxs(m.ScrollArea,{style:{flexGrow:1,paddingTop:m.theme.space[10],paddingBottom:m.theme.space[16],paddingInline:m.theme.space[16],display:"flex",flexDirection:"column",gap:m.theme.space[12]},children:[a.length===0&&d.jsx(d7,{}),a.map(s=>{const c=s.versions[0];if(!c)return null;const l=_R({documentId:s.id,versionId:c.status==="archived"?c.version_id:void 0,releaseId:c.status==="release"?c.release_id:void 0,status:c.status,baseUrl:u.baseUrl}),f=oEe({tags:c.tags,tagsFilter:n});return d.jsx(D$e,{documentType:c.custom_type_label,documentUrl:l,description:c.preview_summary,tags:f,title:s.title,previewImageUrl:c.preview_image,onSelect:()=>o(s.id),statusColor:iq[c.status].color},`${s.id}-${c.status}`)})]})}function d7(e){const{message:t="We can't find any versions matching this request"}=e,n="Oops!";return d.jsx(m.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:d.jsxs(m.BlankSlate,{children:[d.jsx(m.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(m.BlankSlateTitle,{size:"big",children:n}),d.jsx(m.BlankSlateDescription,{width:360,children:t})]})})}function iEe(){return d.jsx(m.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:gn.range(1,5).map(e=>d.jsx(m.Skeleton,{height:150},e))})}function oEe(e){const{tags:t,tagsFilter:n}=e,r=[...n].map(o=>o.label).reverse();return gn.sort(t,o=>-r.indexOf(o))}function p7(e){const{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,onValueChange:o,openInNewTab:a=!0,condensedButtons:u=!1,setOpenInNewTab:s}=e,c=s&&i==="web",l=a?"checkBox":"checkBoxOutlinedBlank";return d.jsxs(d.Fragment,{children:[c&&d.jsx(m.Tooltip,{content:"Open in new tab",visible:u,children:d.jsx(m.Button,{startIcon:l,color:"grey",size:"small",onClick:()=>s(!a),children:u?"":"Open in new tab"})}),d.jsxs(m.Select,{value:i,color:"grey",size:"small",boldTriggerText:!0,startIcon:aEe(i),disabled:!r,onValueChange:o,placeholder:u?"":gd("placeholder"),onlyStartIcon:u&&!!i,renderTrigger:({button:f})=>d.jsx(m.Tooltip,{content:gd(i),visible:u,children:f}),children:[d.jsx(m.SelectItem,{value:"web",icon:"public",children:gd("web")}),d.jsx(m.SelectItem,{value:"document",icon:"description",children:gd("document")}),d.jsx(m.SelectItem,{value:"media",icon:"image",children:gd("media")})]}),d.jsx(m.Button,{startIcon:"close",color:"grey",size:"small",disabled:!t,onClick:n})]})}function gd(e){if(!e||e==="placeholder")return"Choose link type";switch(e){case"document":return"Link to Prismic page";case"web":return"Link to web page";case"media":return"Link to media"}}function aEe(e){if(e)switch(e){case"document":return"description";case"web":return"public";case"media":return"image"}}function uEe(e){var y;const{field:t,content:n,onContentChange:r}=e,i=h(),[o,a]=R.useState(A),[u,s]=R.useState(()=>(n==null?void 0:n.value.__TYPE__)==="ExternalLink"?n.value.target:""),[c,l]=R.useState(!1),f=R.useRef(null);Xe.useOnChange(i,T);const p=o?sEe[o]:void 0;function A(){var x,w;return!((x=t.config)!=null&&x.select)||n!=null&&n.value.__TYPE__?n==null?void 0:n.value.__TYPE__:PF[(w=t.config)==null?void 0:w.select]}function h(){return n?n.value.__TYPE__==="DocumentLink"?n.value.id:n.value.__TYPE__==="ExternalLink"?n.value.url:n.value.name:""}function v(x){if(!x)return r(void 0);switch(o){case"ExternalLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:x,target:u}});case"DocumentLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:x}});case"FileLink":case"ImageLink":case void 0:return r(void 0)}}function _(x){a(PF[x]),v("")}function S(x){v(x)}function I(){l(!0)}function T(){var x;c&&(l(!1),(x=f.current)==null||x.reset())}function g(x){const w=x?"_blank":null;s(w),r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:i,target:w}})}function C(x){r(h7({media:x}))}return{contentType:o,selectType:p,fieldValue:i,onValueChange:v,onTypeChange:_,placeholder:Qu(t),isTypeSelectEnabled:!((y=t.config)!=null&&y.select),onDocumentSelected:S,onError:I,errorBoundaryRef:f,isTargetNewTab:u==="_blank",updateWebLinkTarget:g,onMediaSelected:C}}const sEe={DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media"},PF={document:"DocumentLink",web:"ExternalLink",media:"FileLink"};function cEe(e){const t=xe();t.searchDocuments||Bn("searchDocuments");const{coreApiBaseUrl:n,authStrategy:r}=t;return nt.useRequest(A7,[n,r,e]).title}const lEe=lp({id:zo(),title:zo()});function A7(e,t,n){return _e.request(new URL(`documents/${n}`,e),{credentials:_e.getRequestCredentials(t),okType:lEe})}nt.cache.registerFetcherConfig(A7,{concurrency:50});function h7(e){var i,o,a,u,s,c;const{media:t}=e,n="kind"in t;return n&&t.kind==="image"?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:t.filename,url:t.url,kind:t.kind,size:t.size.toString(),height:((i=t.height)==null?void 0:i.toString())??`${Xa}`,width:((o=t.width)==null?void 0:o.toString())??`${Xa}`,date:((a=t.last_modified)==null?void 0:a.toString())??""}}:n?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:t.id,name:t.filename,kind:t.kind,url:t.url,size:t.size.toString(),date:((u=t.last_modified)==null?void 0:u.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:(t==null?void 0:t.alt)??t.url,kind:"image",url:t.url,size:"0",height:((s=t.height)==null?void 0:s.toString())??`${Xa}`,width:((c=t.width)==null?void 0:c.toString())??`${Xa}`}}}function m7(e){var J,Z;const{content:t,field:n,id:r,onContentChange:i,readOnly:o=!1,condensedButtons:a=!1}=e,[u,s]=R.useState(!1),[c,l]=R.useState(!1),[f,p]=R.useState(!1),[A,h]=R.useState(!1),{contentType:v,fieldValue:_,errorBoundaryRef:S,onDocumentSelected:I,onError:T,onMediaSelected:g,...C}=uEe({content:t,field:n,onContentChange:i}),y=u||c,x=o||!v,w=v==="DocumentLink"&&_!=="",M=v==="ImageLink"||v==="FileLink",F=v==="ExternalLink"&&$r.toURL(_),K={id:r,contentType:v,onBlur:()=>s(!1),onFocus:()=>{s(!0),v==="DocumentLink"&&p(!0),v==="FileLink"&&h(!0),v==="ImageLink"&&h(!0)},readOnly:x,textType:F||M?"link":"normal",value:_,condensedButtons:a,...C},{searchDocuments:N}=xe();return d.jsxs(d.Fragment,{children:[d.jsxs(m.Popover,{onMouseOverChange:l,open:y,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:d.jsxs(m.Field,{onMouseOverChange:s,children:[d.jsx(m.FieldIcon,{name:"link"}),d.jsx(m.FieldLabel,{htmlFor:r,children:er(n)}),d.jsx(m.FieldControl,{children:w&&N?d.jsx(pEe,{errorBoundaryRef:S,onError:T,fallback:d.jsx(tC,{...K,value:"..."}),renderError:()=>fEe(K),children:d.jsx(dEe,{...K,documentId:_,openDocumentListModal:()=>p(!0)})}):d.jsx(tC,{...K})})]}),children:[F&&d.jsx(m.LinkDescriptionCard,{url:F,title:$r.getUrlTitle(F)??"",subTitle:F.toString()}),(t==null?void 0:t.value.__TYPE__)==="ImageLink"&&d.jsx(m.LinkImageCard,{url:t.value.url,title:t.value.name,subTitle:`${t.value.width} x ${t.value.height} pixels`})]}),d.jsx(RR,{open:A,onOpenChange:h,onMediaSelected:g,assetType:"all"}),d.jsx(f7,{open:f,onOpenChange:p,onSelectDocument:ae=>{p(!1),I(ae)},fixedCustomTypes:new Set((J=n.config)==null?void 0:J.customtypes),fixedTags:new Set((Z=n.config)==null?void 0:Z.tags)})]})}function fEe(e){return d.jsx(tC,{...e,textType:"link"})}function tC(e){const{id:t,onValueChange:n,placeholder:r,readOnly:i,value:o,textType:a,onFocus:u,onBlur:s,contentType:c,isTypeSelectEnabled:l,selectType:f,onTypeChange:p,isTargetNewTab:A,condensedButtons:h,updateWebLinkTarget:v}=e,_=c==="DocumentLink"||c==="ImageLink"||c==="FileLink";return d.jsx(Vu,{id:t,onValueChange:n,placeholder:r,readOnly:i||_,value:o,variant:a,onFocus:u,onBlur:s,cursor:_?"pointer":"text",endAdornment:d.jsx(p7,{hasLink:!!o,onUnlink:()=>n(""),selectEnabled:l,selectedType:f,onValueChange:p,openInNewTab:A,condensedButtons:h,setOpenInNewTab:v})})}function dEe(e){const{id:t,documentId:n,openDocumentListModal:r,onValueChange:i,isTypeSelectEnabled:o,selectType:a,condensedButtons:u,onTypeChange:s}=e,c=cEe(n);return d.jsx(Vu,{id:t,readOnly:!0,value:c,variant:"link",onFocus:r,cursor:"pointer",endAdornment:d.jsx(p7,{hasLink:!0,onUnlink:()=>i(""),selectEnabled:o,selectedType:a,condensedButtons:u,onValueChange:s})})}function pEe(e){const{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return d.jsx(m.ErrorBoundary,{ref:t,onError:n,renderError:o,children:d.jsx(R.Suspense,{fallback:i,children:r})})}function AEe(e){const{linkTo:t,onLinkToChange:n}=e;return d.jsx(m7,{content:hEe(t),onContentChange:r=>n(mEe(r)),field:{type:"Link",config:{label:"Link",allowTargetBlank:!0}},condensedButtons:!0})}function hEe(e){return e?{__TYPE__:"LinkContent",value:e}:void 0}function mEe(e){return e?e.value:void 0}function g7(e){var g,C;const{allContentViews:t,content:n,contentView:r,fieldLabel:i,id:o,imageLabel:a,initialImages:u,isUpdating:s,page:c=0,readOnly:l,thumbnailName:f,onClear:p,onContentChange:A,onCropperDialogClose:h,onPageChange:v=()=>{},onMediaDialogOpenChange:_}=e,S=((C=(g=n==null?void 0:n.url)==null?void 0:g.split("?")[0])==null?void 0:C.slice(-4))===".svg",I=n!=null&&n.url&&!l?"visible":"hidden",T=!Ue.isImageContent(n);return d.jsxs(m.Box,{display:"flex",gap:12,padding:{inline:12},children:[d.jsx(m.Box,{children:d.jsx(m.Carousel,{getItemSource:Twe,items:t,onPageChange:v,page:c,buttonSize:"small",renderPrevTooltip:y=>d.jsx(m.Tooltip,{content:"Previous",children:y}),renderNextTooltip:y=>d.jsx(m.Tooltip,{content:"Next",children:y}),style:T?{width:181,height:142}:{width:123,height:93},children:y=>(y==null?void 0:y.url)&&d.jsx(m.CarouselItem,{"aria-label":"Image Field Item",src:Qq(y.url),alt:y.alt??void 0,isUpdating:s,disableAnimation:T},`${f}_${y.url}`)})}),d.jsxs(m.Box,{width:"100%",display:"flex",flexDirection:"column",gap:T?16:12,children:[d.jsx(P$e,{fieldLabel:i,imageLabel:a,initialImages:u,page:c,displaySeparator:!T,isSVGContentView:S,visibility:I,onClear:p,onCropperDialogClose:h,onMediaDialogOpenChange:_}),d.jsx(K$e,{id:o,readOnly:l||!r,altText:(r==null?void 0:r.alt)??"",onValueChange:y=>{r&&A(Cwe(f,n,r,y))}}),T&&d.jsx(AEe,{linkTo:n.linkTo,onLinkToChange:y=>{A({...n,linkTo:y})}})]})]})}function gEe(e){const{content:t,onContentChange:n,field:r}=e,[i,o]=R.useState(0),[a,u]=R.useTransition(),s=vEe(r),c=s[i],l=t?bwe(r,t):void 0,f=l==null?void 0:l[i];function p(_){if(!c)return;const S=xwe(c.name,r,t,_);S!==t&&u(()=>n(S))}function A(_){u(()=>o(_))}function h({option:_,croppedImages:S}){if(o(_),!t)return;const I=Object.entries(S).reduce((T,[g,C])=>k$e({field:r,content:T,thumbnail:g,croppedImage:C}),t);I!==t&&u(()=>n(I))}function v(){o==null||o(0),n(void 0)}return{onCropperDialogClose:h,onPageChange:A,onMediaSelected:p,isUpdating:a,page:i,thumbnail:c,allThumbnails:s,allContentViews:l,contentView:f,onClear:v}}function vEe(e){return R.useMemo(()=>ywe(e),[e])}function yEe(e){const{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e,a=t&&t.origin.url.length>0,{onCropperDialogClose:u,onPageChange:s,onMediaSelected:c,isUpdating:l,page:f,thumbnail:p,allThumbnails:A,allContentViews:h,contentView:v,onClear:_}=gEe({field:n,content:t,onContentChange:i}),[S,I]=R.useState(!1),T=er(n),g=A.map((x,w)=>{const M=h==null?void 0:h[w];return{thumbnail:x,contentView:M,labels:J1(x,t,M)}}),C=p&&a?J1(p,t,v).filter(to.isDefined):[],y=p&&t&&a&&h;return d.jsx(u7,{isMediaDialogOpen:S,onMediaSelected:c,onMediaDialogOpenChange:I,children:d.jsx(R.Suspense,{fallback:d.jsx("div",{style:{height:95}}),children:y?d.jsx(g7,{allContentViews:h,content:t,contentView:v,fieldLabel:T,id:r,imageLabel:C,initialImages:g,isUpdating:l,page:f,readOnly:o,thumbnailName:p.name,onClear:_,onContentChange:i,onCropperDialogClose:u,onMediaDialogOpenChange:I,onPageChange:s}):d.jsx(i7,{fieldLabel:T,isUpdating:l,readOnly:o,onMediaDialogOpenChange:I})})})}function bEe(e){var _,S;const{searchTerm:t,catalogId:n}=e,r=xe();r.integrationFields||Bn("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,[u,s]=R.useState(1),[c,l]=R.useState([]),[f,p]=R.useState(""),A=nt.useRequest(CEe,[i,a,o,n,t,t===f?u:1]);t!==f?(p(t),s(1),l(A.items)):A.items.length>0&&((_=gn.last(c))==null?void 0:_.id)!==((S=gn.last(A.items))==null?void 0:S.id)&&l(I=>I.concat(A.items));const h=u<A.totalPages;function v(){h&&s(I=>I+1)}return{items:c,response:A,fetchNextPage:v,hasNextPage:h}}function CEe(e,t,n,r,i,o=1,a=30){const u=new URL(`if/search/${r}`,e);return u.searchParams.set("searchTerm",i),u.searchParams.set("limit",a.toString()),u.searchParams.set("page",o.toString()),_e.request(u,{headers:{repository:n},credentials:_e.getRequestCredentials(t),okType:SEe})}const v7=B.object({id:B.string(),title:B.string(),imageURL:B.string().optional(),description:B.string().optional()}),SEe=B.object({items:B.array(v7),totalPages:B.number(),page:B.number()});function y7(e){const{itemId:t,catalogId:n}=e,r=xe();r.integrationFields||Bn("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,s=nt.useRequest(_Ee,[i,a,o,n,t]).items[0];if(!s)throw new Error("Item not found");return{item:s}}function _Ee(e,t,n,r,i){const o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),_e.request(o,{headers:{repository:n},credentials:_e.getRequestCredentials(t),okType:IEe})}const IEe=B.object({items:B.array(v7)});function OR(e){const{item:t,onClick:n,catalogId:r}=e;return d.jsxs(m.PreviewCard,{variant:"large",onClick:n,children:[d.jsx(TEe,{src:t.imageURL??"",alt:t.title}),d.jsxs(m.PreviewContent,{children:[d.jsx(m.Badge,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),d.jsx(m.Text,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),d.jsx(m.Text,{variant:"small",color:"grey11",children:t.description??t.id})]})]})}const Nh=76;function TEe(e){const{src:t,alt:n}=e;return t?d.jsx(m.PreviewImage,{src:t,alt:n,width:Nh,height:Nh,framed:!0}):d.jsxs(m.Box,{borderRadius:6,backgroundColor:"grey2",height:Nh,width:Nh,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[d.jsx(m.Icon,{name:"hideImage",size:"large",color:"grey11"}),d.jsx(m.Text,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function el(){return d.jsxs(m.PreviewCard,{variant:"large",children:[d.jsx(m.Skeleton,{height:76,width:76}),d.jsxs(m.PreviewContent,{children:[d.jsx(m.Skeleton,{height:24,width:168}),d.jsx(m.Skeleton,{height:24,width:240,sx:{marginTop:4}}),d.jsx(m.Skeleton,{height:16,width:144})]})]})}function xEe(e){const{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=Xe.useDebounceState({initialState:""}),a=xe();return d.jsx(m.Dialog,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:d.jsx(m.DialogContent,{children:d.jsxs(m.Box,{flexDirection:"column",height:"100%",children:[d.jsxs(m.Box,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[d.jsx(m.FormSearchInput,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),d.jsx(m.Text,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(nC,{message:"There was an error while fetching your catalog items."}),children:d.jsx(R.Suspense,{fallback:d.jsxs(m.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[d.jsx(el,{}),d.jsx(el,{}),d.jsx(el,{}),d.jsx(el,{}),d.jsx(el,{})]}),children:d.jsx($Ee,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):d.jsx(nC,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function wEe(e){const{isLoading:t}=e;return d.jsx(m.Toast,{anchor:d.jsx(m.Box,{position:"relative",width:"100%",justifyContent:"center",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more results ...",seconds:1})}function $Ee(e){const{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=R.useTransition(),{items:a,hasNextPage:u,fetchNextPage:s}=bEe({catalogId:t,searchTerm:n});return d.jsxs(d.Fragment,{children:[d.jsx(m.ScrollArea,{onScrollToBottom:()=>u&&o(s),style:{flexGrow:1,paddingTop:m.theme.space[10],paddingBottom:m.theme.space[16],paddingInline:m.theme.space[16],display:"flex",flexDirection:"column",gap:m.theme.space[12]},threshold:252,children:a.length===0?d.jsx(nC,{}):a.map(c=>d.jsx(OR,{item:c,catalogId:t,onClick:()=>r(c)},c.id))}),d.jsx(wEe,{isLoading:i})]})}function nC(e){const{message:t="We can't find any items matching your search"}=e,n="Oops!";return d.jsx(m.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:d.jsxs(m.BlankSlate,{children:[d.jsx(m.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(m.BlankSlateTitle,{size:"big",children:n}),d.jsx(m.BlankSlateDescription,{width:360,children:t})]})})}function EEe(e){const{itemId:t,item:n}=e,r=xe();return t&&n&&n.id===t?d.jsx(tl,{...e,value:n.title}):t&&r.integrationFields?d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(tl,{...e,value:t}),children:d.jsx(R.Suspense,{fallback:d.jsx(tl,{...e,value:t}),children:d.jsx(FEe,{...e,itemId:t})},t)},t):t&&!r.integrationFields?d.jsx(tl,{...e,value:t}):d.jsx(tl,{...e,value:""})}function REe(e){const{catalogId:t,itemId:n,item:r}=e,i=xe();return n&&r&&r.id===n?d.jsx(m.FieldFooter,{children:d.jsx(OR,{catalogId:t,item:r})}):n&&i.integrationFields?d.jsx(m.ErrorBoundary,{renderError:()=>null,children:d.jsx(m.FieldFooter,{children:d.jsx(R.Suspense,{fallback:d.jsx(el,{}),children:d.jsx(OEe,{catalogId:t,itemId:n})},n)})},n):null}function OEe(e){const{itemId:t,catalogId:n}=e,{item:r}=y7({catalogId:n,itemId:t});return d.jsx(OR,{catalogId:n,item:r})}function tl(e){const{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return d.jsx(Vu,{id:t,placeholder:Qu(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:d.jsx(m.Button,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function FEe(e){const{itemId:t,catalogId:n}=e,{item:r}=y7({catalogId:n,itemId:t});return d.jsx(tl,{...e,value:r.title})}function MEe(e){var A;const{id:t,field:n,content:r,readOnly:i,onContentChange:o}=e,[a,u]=R.useState(!1),[s,c]=R.useState(),l=(A=n.config)==null?void 0:A.catalog;if(!l)return null;function f(h){o({value:h.id,__TYPE__:"IntegrationFieldsContent"}),c(h),u(!1)}function p(){o(void 0),c(void 0)}return d.jsxs(d.Fragment,{children:[d.jsxs(m.Field,{footer:d.jsx(REe,{catalogId:l,item:s,itemId:r==null?void 0:r.value}),children:[d.jsx(m.FieldIcon,{name:"multipleStop"}),d.jsx(m.FieldLabel,{htmlFor:t,children:er(n)}),d.jsx(m.FieldControl,{children:d.jsx(EEe,{id:t,field:n,readOnly:i,catalogId:l,item:s,itemId:r==null?void 0:r.value,onFocus:()=>u(!0),onClearItem:p})})]}),d.jsx(xEe,{open:a,onOpenChange:u,catalogId:l,onSelectItem:f})]})}function kEe(e){const{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"notes"}),d.jsx(m.FieldLabel,{htmlFor:r,children:er(n)}),d.jsx(m.FieldControl,{children:d.jsx(m.TextArea,{id:r,placeholder:Qu(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(t==null?void 0:t.value)??"",onChange:a=>{i(LEe(a))}})})]})}function LEe(e){return e.length===0?void 0:{__TYPE__:"FieldContent",type:"Text",value:e}}const jEe=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var u,s;const o=Number(e==null?void 0:e.value),a=Number.isFinite(o)?o:void 0;return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"pin"}),d.jsx(m.FieldLabel,{htmlFor:n,children:er(t)}),d.jsx(m.FieldControl,{children:d.jsx(m.NumberInput,{id:n,value:a,min:(u=t.config)==null?void 0:u.min,max:(s=t.config)==null?void 0:s.max,padding:e7,placeholder:Qu(t),readOnly:i,onValueChange:c=>r(UEe(c))})})]})};function UEe(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(e)}}function fn(e){this.content=e}fn.prototype={constructor:fn,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new fn(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new fn(n)},addToStart:function(e,t){return new fn([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new fn(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new fn(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=fn.from(e),e.size?new fn(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=fn.from(e),e.size?new fn(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=fn.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};fn.from=function(e){if(e instanceof fn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new fn(t)};function b7(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let a=0;i.text[a]==o.text[a];a++)n++;return n}if(i.content.size||o.content.size){let a=b7(i.content,o.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function C7(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let a=e.child(--i),u=t.child(--o),s=a.nodeSize;if(a==u){n-=s,r-=s;continue}if(!a.sameMarkup(u))return{a:n,b:r};if(a.isText&&a.text!=u.text){let c=0,l=Math.min(a.text.length,u.text.length);for(;c<l&&a.text[a.text.length-c-1]==u.text[u.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||u.content.size){let c=C7(a.content,u.content,n-1,r-1);if(c)return c}n-=s,r-=s}}class G{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let a=0,u=0;u<n;a++){let s=this.content[a],c=u+s.nodeSize;if(c>t&&r(s,i+u,o||null,a)!==!1&&s.content.size){let l=u+1;s.nodesBetween(Math.max(0,t-l),Math.min(s.content.size,n-l),r,i+l)}u=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",a=!0;return this.nodesBetween(t,n,(u,s)=>{u.isText?(o+=u.text.slice(Math.max(t,s)-s,n-s),a=!r):u.isLeaf?(i?o+=typeof i=="function"?i(u):i:u.type.spec.leafText&&(o+=u.type.spec.leafText(u)),a=!r):!a&&u.isBlock&&(o+=r,a=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new G(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,a=0;a<n;o++){let u=this.content[o],s=a+u.nodeSize;s>t&&((a<t||s>n)&&(u.isText?u=u.cut(Math.max(0,t-a),Math.min(u.text.length,n-a)):u=u.cut(Math.max(0,t-a-1),Math.min(u.content.size,n-a-1))),r.push(u),i+=u.nodeSize),a=s}return new G(r,i)}cutByIndex(t,n){return t==n?G.empty:t==0&&n==this.content.length?this:new G(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new G(i,o)}addToStart(t){return new G([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new G(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return b7(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return C7(this,t,n,r)}findIndex(t,n=-1){if(t==0)return qh(0,t);if(t==this.size)return qh(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),a=i+o.nodeSize;if(a>=t)return a==t||n>0?qh(r+1,a):qh(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return G.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new G(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return G.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new G(n||t,r)}static from(t){if(!t)return G.empty;if(t instanceof G)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new G([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}G.empty=new G([],0);const qb={index:0,offset:0};function qh(e,t){return qb.index=e,qb.offset=t,qb}function Bm(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Bm(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Bm(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let gt=class rC{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Bm(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return rC.none;if(t instanceof rC)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};gt.none=[];class fp extends Error{}class re{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=_7(this.content,t+this.openStart,n);return r&&new re(r,this.openStart,this.openEnd)}removeBetween(t,n){return new re(S7(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return re.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new re(G.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new re(t,r,i)}}re.empty=new re(G.empty,0,0);function S7(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:u}=e.findIndex(n);if(i==t||o.isText){if(u!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(S7(o.content,t-i-1,n-i-1)))}function _7(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let u=_7(a.content,t-o-1,n);return u&&e.replaceChild(i,a.copy(u))}function BEe(e,t,n){if(n.openStart>e.depth)throw new fp("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new fp("Inconsistent open depths");return I7(e,t,n,0)}function I7(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let a=I7(e,t,n,r+1);return o.copy(o.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,u=a.content;return As(a,u.cut(0,e.parentOffset).append(n.content).append(u.cut(t.parentOffset)))}else{let{start:a,end:u}=WEe(n,e);return As(o,x7(e,a,u,t,r))}else return As(o,Wm(e,t,r))}function T7(e,t){if(!t.type.compatibleContent(e.type))throw new fp("Cannot join "+t.type.name+" onto "+e.type.name)}function iC(e,t,n){let r=e.node(n);return T7(r,t.node(n)),r}function ps(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function wd(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(ps(e.nodeAfter,r),o++));for(let u=o;u<a;u++)ps(i.child(u),r);t&&t.depth==n&&t.textOffset&&ps(t.nodeBefore,r)}function As(e,t){return e.type.checkContent(t),e.copy(t)}function x7(e,t,n,r,i){let o=e.depth>i&&iC(e,t,i+1),a=r.depth>i&&iC(n,r,i+1),u=[];return wd(null,e,i,u),o&&a&&t.index(i)==n.index(i)?(T7(o,a),ps(As(o,x7(e,t,n,r,i+1)),u)):(o&&ps(As(o,Wm(e,t,i+1)),u),wd(t,n,i,u),a&&ps(As(a,Wm(n,r,i+1)),u)),wd(r,null,i,u),new G(u)}function Wm(e,t,n){let r=[];if(wd(null,e,n,r),e.depth>n){let i=iC(e,t,n+1);ps(As(i,Wm(e,t,n+1)),r)}return wd(t,null,n,r),new G(r)}function WEe(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(G.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class dp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return gt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let u=r;r=i,i=u}let o=r.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Km(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let a=t;;){let{index:u,offset:s}=a.content.findIndex(o),c=o-s;if(r.push(a,u,i+s),!c||(a=a.child(u),a.isText))break;o=c-1,i+=s+1}return new dp(n,r,o)}static resolveCached(t,n){for(let i=0;i<Qb.length;i++){let o=Qb[i];if(o.pos==n&&o.doc==t)return o}let r=Qb[Vb]=dp.resolve(t,n);return Vb=(Vb+1)%KEe,r}}let Qb=[],Vb=0,KEe=12;class Km{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const PEe=Object.create(null);let fl=class oC{constructor(t,n,r,i=gt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||G.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Bm(this.attrs,n||t.defaultAttrs||PEe)&&gt.sameSet(this.marks,r||gt.none)}copy(t=null){return t==this.content?this:new oC(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new oC(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return re.empty;let i=this.resolve(t),o=this.resolve(n),a=r?0:i.sharedDepth(n),u=i.start(a),c=i.node(a).content.cut(i.pos-u,o.pos-u);return new re(c,i.depth-a,o.depth-a)}replace(t,n,r){return BEe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return dp.resolveCached(this,t)}resolveNoCache(t){return dp.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),w7(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=G.empty,i=0,o=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,i,o),u=a&&a.matchFragment(this.content,n);if(!u||!u.validEnd)return!1;for(let s=i;s<o;s++)if(!this.type.allowsMarks(r.child(s).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),a=o&&o.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=gt.none;for(let n=0;n<this.marks.length;n++)t=this.marks[n].addToSet(t);if(!gt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=G.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,i,r)}};fl.prototype.text=void 0;class Pm extends fl{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):w7(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Pm(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Pm(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function w7(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class ks{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new DEe(t,n);if(r.next==null)return ks.empty;let i=$7(r);r.next&&r.err("Unexpected trailing text");let o=YEe(HEe(i));return GEe(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(a,u){let s=a.matchFragment(t,r);if(s&&(!n||s.validEnd))return G.from(u.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:l,next:f}=a.next[c];if(!(l.isText||l.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let p=o(f,u.concat(l));if(p)return p}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let a=[];for(let u=i;u.type;u=u.via)a.push(u.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:u,next:s}=o.next[a];!u.isLeaf&&!u.hasRequiredAttrs()&&!(u.name in n)&&(!i.type||s.validEnd)&&(r.push({match:u.contentMatch,type:u,via:i}),n[u.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)o+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return o}).join(`
33
+ from ${a===1?"it":"them"}.`]})}),d.jsxs(m.DialogActions,{children:[d.jsx(m.DialogCancelButton,{}),d.jsx(m.DialogActionButton,{onClick:f,color:"tomato",loading:c,children:"Yes, I want to delete"})]})]})}function Xwe(){const e=R.useContext(nt.ErrorBoundaryContext);return d.jsx(m.Box,{flexDirection:"column",children:d.jsxs(m.BlankSlate,{children:[d.jsx(m.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed"}),d.jsx(m.BlankSlateTitle,{size:"big",children:"Oops!"}),d.jsx(m.BlankSlateDescription,{width:360,children:"We couldn't load your media tags."}),d.jsx(m.BlankSlateActions,{children:d.jsx(m.Button,{onClick:e==null?void 0:e.reset,size:"medium",children:"Try again"})})]})})}function e$e(e){const{id:t,config:n}=e;n.mediaLibrary||Bn("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return _e.request(new URL(`tags/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:_e.getRequestCredentials(o),okType:B.unknown()})}function t$e(e){const{id:t,name:n,config:r}=e;r.mediaLibrary||Bn("mediaLibrary");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=r;return _e.request(new URL(`tags/${t}`,i),{headers:{repository:o},method:"PATCH",credentials:_e.getRequestCredentials(a),body:{name:n},okType:B.unknown()})}function n$e(){return d.jsx(m.Box,{flexDirection:"column",gap:16,children:gn.range(1,6).map(e=>d.jsxs(m.Box,{justifyContent:"space-between",children:[d.jsx(m.Skeleton,{height:24,width:85}),d.jsx(m.Skeleton,{height:24,width:45})]},e))})}function r$e(){const e=jc(),{onFilesUpload:t,isUploading:n,tagManagerOpen:r}=Et();return e.length===0&&r===!1?d.jsx(Pq,{onFilesUpload:t,isUploading:n}):d.jsx(m.Box,{flexDirection:"column",backgroundColor:"grey1",width:"100%",padding:16,gap:16,borderRadius:{topLeft:8,topRight:8},children:r?d.jsx(Ywe,{}):d.jsxs(d.Fragment,{children:[d.jsx(hwe,{}),d.jsx(vwe,{}),d.jsx(Pwe,{})]})})}function i$e(){const e=qu();return d.jsx(Kq,{hasSelectedMedia:e.selectedCount!==0,children:d.jsx(r$e,{})})}function Hq(e){const{assetType:t,onSelectedChange:n,actionContainerRef:r}=e;return d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(jq,{}),children:d.jsx(R.Suspense,{fallback:d.jsx(iwe,{actionContainerRef:r}),children:d.jsx(sq,{children:d.jsx(Zxe,{assetType:t,actionContainerRef:r,onSelectedChange:n,children:d.jsx(twe,{children:d.jsx(o$e,{})})})})})})}function o$e(){const{media:e}=Et();return d.jsx(swe,{children:d.jsx(Uq,{sidePane:d.jsx(i$e,{}),mediaActions:d.jsx(Xxe,{}),mediaToolbar:d.jsx(fwe,{}),mediaList:e.length===0?d.jsx(cq,{}):d.jsx(rwe,{})})})}const Yq=R.createContext({editedUID:{current:!1},onEditUID:()=>{}});function Gq(e){return Object.values(e.json).some(t=>{var n;return((n=t.uid)==null?void 0:n.type)==="UID"})}function a$e(e){const{content:t,customType:n}=e;return Gq(n)&&!t.uid}function Jq(e){const{documentId:t,documentsWithUid:n,uid:r}=e;return n.filter(i=>t!==i.id&&s$e({document:i,uid:r})&&u$e({...e,document:i}))}function u$e(e){const{customTypeId:t,languageId:n,document:r}=e,i=t===r.custom_type_id,o=n===r.language.id;return i&&o}function s$e(e){const{document:t,uid:n}=e,r=t.versions.filter(i=>i.uid===n);return r.length===0?!0:r.some(i=>i.status!=="archived")}function Zq(e,t){if(t)return`${e}___${t}`}const Xq=R.createContext({update:()=>{}});function P0(e){const{sliceKey:t}=e||{},n=R.useContext(Xq),r=Zq("sliceFieldSet",t),i=t===(n==null?void 0:n.id);return{selectionId:r,selected:i,selection:n}}function er(e){var t;return((t=e.config)==null?void 0:t.label)??(e.type==="Boolean"||e.type==="Separator"?void 0:e.fieldset)??e.type}const Z1="...";function Qu(e,t){var n,r,i;return e.type==="Boolean"?(t?(n=e.config)==null?void 0:n.placeholder_true:(r=e.config)==null?void 0:r.placeholder_false)||Z1:((i=e.config)==null?void 0:i.placeholder)||Z1}function c$e(e){var u;const{content:t,field:n,id:r,readOnly:i,onContentChange:o}=e,a=(t==null?void 0:t.value)??((u=n.config)==null?void 0:u.default_value)??!1;return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"biToggle"}),d.jsx(m.FieldLabel,{htmlFor:r,children:er(n)}),d.jsxs(m.FieldControl,{children:[d.jsx(m.Box,{padding:4,alignItems:"center",children:d.jsx(m.Text,{children:Qu(n,a)})}),d.jsx(m.Switch,{id:r,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:a,onCheckedChange:s=>{i||o(l$e(s))}})]})]})}function l$e(e){return{__TYPE__:"BooleanContent",value:e}}function f$e(e){const{id:t,field:n,content:r,onContentChange:i}=e;return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"colorLens"}),d.jsx(m.FieldLabel,{id:t,children:er(n)}),d.jsx(m.FieldControl,{children:d.jsx(m.Box,{padding:{left:4},alignItems:"center",children:d.jsx(m.ColorInput,{onValueChange:o=>i(d$e(o)),value:r==null?void 0:r.value,"aria-labelledby":t,placeholder:Qu(n)})})})]})}function d$e(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Color",value:e}}function p$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=i!=null&&i.value?PC.dateFromISOString(i.value):void 0;return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"dateRange"}),d.jsx(m.FieldLabel,{id:t,children:er(r)}),d.jsx(m.FieldControl,{children:d.jsx(m.Box,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:d.jsx(m.DateInput,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:u=>o(A$e(u))})})})]})}function A$e(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:h$e(e)}}function h$e(e){const t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}const Vu=R.forwardRef(function(t,n){return d.jsx(m.TextInput,{padding:e7,...t,ref:n,sx:{...t.sx,alignSelf:"stretch"}})}),e7={input:{inline:4},adornment:{inline:12}},m$e=({provider:e})=>g$e[e.toLowerCase()]??d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:d.jsx("path",{d:"M7.99992 1.33333C4.31992 1.33333 1.33325 4.32 1.33325 8C1.33325 11.68 4.31992 14.6667 7.99992 14.6667C11.6799 14.6667 14.6666 11.68 14.6666 8C14.6666 4.32 11.6799 1.33333 7.99992 1.33333ZM2.66659 8C2.66659 7.59333 2.71992 7.19333 2.80659 6.81333L5.99325 10V10.6667C5.99325 11.4 6.59325 12 7.32658 12V13.2867C4.70658 12.9533 2.66659 10.7133 2.66659 8ZM11.9266 11.6C11.7533 11.06 11.2599 10.6667 10.6599 10.6667H9.99325V8.66667C9.99325 8.3 9.69325 8 9.32658 8H5.32658V6.66667H6.65992C7.02658 6.66667 7.32658 6.36667 7.32658 6V4.66667H8.65992C9.39325 4.66667 9.99325 4.06667 9.99325 3.33333V3.06C11.9466 3.84667 13.3333 5.76667 13.3333 8C13.3333 9.38667 12.7933 10.6533 11.9266 11.6Z",fill:"#6F6E77"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6524_22412",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),g$e={codepen:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:d.jsx("path",{d:"M15.9879 5.44292C15.9843 5.42352 15.981 5.40413 15.9759 5.38517C15.9726 5.37375 15.9688 5.36298 15.9651 5.35177C15.9597 5.33497 15.9541 5.31816 15.9474 5.30179C15.9427 5.29037 15.9373 5.27938 15.9321 5.26839C15.9248 5.25288 15.9173 5.23758 15.9086 5.22271C15.9026 5.21172 15.8957 5.20138 15.889 5.19082C15.8798 5.1766 15.8703 5.1626 15.8599 5.14902C15.8524 5.13889 15.8446 5.1292 15.8365 5.1195C15.8257 5.10657 15.8141 5.09429 15.8024 5.08223C15.7934 5.07318 15.7843 5.06413 15.7748 5.05529C15.7623 5.04387 15.7494 5.0331 15.7358 5.02276C15.7255 5.01479 15.7154 5.0066 15.7046 4.99927C15.7007 4.99647 15.6973 4.99324 15.6932 4.99065L8.38116 0.115543C8.15039 -0.0385144 7.84939 -0.0385144 7.61863 0.115543L0.306176 4.99044C0.302082 4.99302 0.29885 4.99626 0.294756 4.99906C0.283983 5.0066 0.273856 5.01457 0.263514 5.02254C0.250155 5.0331 0.237011 5.04387 0.224515 5.05486C0.215034 5.06348 0.205985 5.07253 0.19715 5.0818C0.185084 5.09386 0.17388 5.10614 0.162892 5.11907C0.154704 5.12877 0.146947 5.13846 0.139406 5.14924C0.129064 5.16281 0.119583 5.1766 0.110318 5.19104C0.103639 5.20159 0.0969593 5.21194 0.0907108 5.22293C0.0820922 5.23779 0.0745509 5.25309 0.0674405 5.26817C0.0622694 5.27916 0.0566673 5.29037 0.0521425 5.30157C0.0454631 5.31795 0.0396456 5.33475 0.0342589 5.35156C0.030596 5.36276 0.0267177 5.37375 0.0237011 5.38388C0.0187455 5.40284 0.0150825 5.42201 0.0116351 5.44162C0.00969592 5.45153 0.00732581 5.46123 0.00603302 5.47136C0.00215465 5.50109 0 5.53082 0 5.56121V10.4372C0 10.4673 0.00215465 10.4975 0.00646395 10.527C0.00797221 10.5378 0.0107733 10.5464 0.0129279 10.5568C0.0163753 10.5762 0.0193919 10.5955 0.0258558 10.6149C0.0288723 10.6257 0.0323198 10.6365 0.0366291 10.6483C0.0420157 10.6656 0.0474023 10.6828 0.0538662 10.6985C0.058391 10.7093 0.0646395 10.7201 0.0689488 10.7309C0.0760591 10.7459 0.0840314 10.761 0.09265 10.7768C0.098683 10.7875 0.105578 10.7983 0.112042 10.8082C0.121307 10.8233 0.131434 10.8362 0.142207 10.8491C0.149748 10.8599 0.157289 10.8685 0.165908 10.8789C0.176897 10.8918 0.187455 10.9047 0.200382 10.9162C0.209217 10.9248 0.21762 10.9355 0.228393 10.942C0.24089 10.9528 0.254249 10.9636 0.267177 10.9748C0.277519 10.9834 0.288723 10.9898 0.297342 10.9982C0.301436 11.0004 0.303806 11.0047 0.308115 11.0067L7.61863 15.8841C7.73412 15.9617 7.86641 16.0005 8 15.9998C8.13359 15.9992 8.26588 15.9611 8.38137 15.8841L15.6938 11.0092C15.6979 11.0067 15.7014 11.0036 15.7052 11.0008C15.716 10.9933 15.7261 10.9853 15.7365 10.9773C15.7498 10.9668 15.763 10.9558 15.7755 10.9446C15.785 10.9362 15.794 10.9269 15.8031 10.9179C15.8149 10.9058 15.8263 10.8935 15.8371 10.8806C15.8453 10.8709 15.8531 10.8612 15.8606 10.8509C15.8709 10.8373 15.8804 10.8233 15.8897 10.8091C15.8964 10.7987 15.903 10.7882 15.9093 10.7776C15.9179 10.7625 15.9254 10.7472 15.9328 10.7317C15.9379 10.7207 15.9433 10.7097 15.9481 10.6985C15.9548 10.6819 15.9604 10.6651 15.9657 10.6483C15.9694 10.6371 15.9733 10.6261 15.9765 10.6149C15.9815 10.596 15.9849 10.5766 15.9886 10.5572C15.9903 10.5473 15.9929 10.5376 15.994 10.5275C15.9978 10.4977 16 10.468 16 10.4376V5.5625C16 5.53212 15.9976 5.50238 15.994 5.47265C15.9922 5.46209 15.989 5.45347 15.9869 5.44292H15.9879ZM7.99978 9.62638L5.56826 8.00005L7.99978 6.37351L10.4315 8.00005L7.99978 9.62638ZM7.31245 5.17919L4.33171 7.17288L1.92561 5.56336L7.31245 1.97221V5.17919ZM3.09515 7.99984L1.37531 9.15021V6.84947L3.09515 7.99984ZM4.33171 8.82765L7.31245 10.8211V14.0281L1.92561 10.4365L4.33171 8.82722V8.82765ZM8.68733 10.8207L11.6681 8.82722L14.0744 10.4365L8.68733 14.0277V10.8207ZM12.9046 8.00027L14.6247 6.84969V9.15064L12.9046 7.99984V8.00027ZM11.6681 7.17288L8.68733 5.1794V1.97221L14.0744 5.56336L11.6681 7.17288Z",fill:"black"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22409",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:d.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:d.jsx("path",{d:"M6.24312 14.1129V8.35021L1.28724 5.49888V8.78388L3.55732 10.0999V12.5702L6.24312 14.1129ZM7.53036 14.1468L10.2658 12.571V10.0422L12.5506 8.71812V5.47426L7.53036 8.3727V14.1468ZM11.8904 4.36906L9.25164 2.83995L6.93472 4.18436L4.60022 2.8386L1.93795 4.38817L6.90626 7.24665L11.8904 4.36906ZM0 12.0115V4.02675L6.91821 0L13.8378 4.00984V11.9988L6.91805 15.985L0 12.0115Z",fill:"black"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22406",children:d.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[d.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.73038 10.3003C8.40789 10.6268 8.00377 10.7901 7.51804 10.7901C7.04025 10.7901 6.64411 10.6308 6.32956 10.3122C6.01503 9.99367 5.85776 9.58351 5.85776 9.08176C5.85776 8.60389 6.01901 8.20766 6.3415 7.89306C6.66401 7.57847 7.06016 7.42118 7.52998 7.42118C7.84849 7.42118 8.13715 7.49484 8.39594 7.64219C8.65474 7.78953 8.8558 7.99063 8.99913 8.2455C9.14246 8.50034 9.21412 8.77908 9.21412 9.08176C9.21412 9.56757 9.05287 9.97376 8.73038 10.3003ZM9.10662 3.58632V6.35792C8.82791 6.07918 8.53131 5.87808 8.21678 5.75463C7.90223 5.63118 7.54988 5.56946 7.1597 5.56946C6.53062 5.56946 5.96527 5.72476 5.4636 6.03538C4.96193 6.34597 4.57176 6.77007 4.29305 7.30768C4.01435 7.84528 3.875 8.44062 3.875 9.09369C3.875 9.76269 4.01236 10.366 4.28708 10.9036C4.5618 11.4412 4.95197 11.8653 5.45763 12.1759C5.96328 12.4865 6.54258 12.6418 7.19553 12.6418C8.14312 12.6418 8.80403 12.3312 9.17831 11.71H9.20218V12.5595H11.0894V3.15625L9.10662 3.58632Z",fill:"#232323"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22345",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("rect",{width:"16",height:"16",fill:"white"}),d.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[d.jsx("path",{d:"M8.43286 7.78387C8.43286 9.321 9.67925 10.5674 11.2166 10.5674C12.7538 10.5674 13.9999 9.321 13.9999 7.78387C13.9999 6.24675 12.7538 5.00061 11.2166 5.00061C9.67925 5.00061 8.43286 6.24675 8.43286 7.78387Z",fill:"#FF0084"}),d.jsx("path",{d:"M2 7.78408C2 9.32121 3.24614 10.5676 4.78352 10.5676C6.32089 10.5676 7.56703 9.32121 7.56703 7.78408C7.56703 6.24695 6.32089 5.00081 4.78352 5.00081C3.24614 5.00081 2 6.24695 2 7.78408Z",fill:"#0063DC"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22379",children:d.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("rect",{width:"16",height:"16",fill:"#121212"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),d.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),d.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),d.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6668 5.22222V4.11111H9.55569V3H8.44458V3.90739V5.0185V6.33333H9.55569H10.6668H11.7779V5.22222H10.6668Z",fill:"#FF6666"})]}),instagram:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[d.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:d.jsx("path",{d:"M4.70325 0.0949238C3.85627 0.1349 3.27778 0.270564 2.77227 0.468642C2.24897 0.672648 1.80537 0.946046 1.36408 1.38914C0.922279 1.83249 0.650958 2.27688 0.448504 2.8007C0.252489 3.3075 0.119662 3.88627 0.0822604 4.73377C0.045126 5.58283 0.0366102 5.85363 0.0407495 8.01522C0.0448729 10.1765 0.0544124 10.4479 0.0949012 11.2972C0.135388 12.1439 0.270546 12.7222 0.468623 13.2279C0.672886 13.7512 0.946004 14.1946 1.38935 14.6361C1.83245 15.0777 2.27708 15.3487 2.80115 15.5515C3.30744 15.7472 3.88644 15.8806 4.73369 15.9177C5.58273 15.9551 5.85379 15.9634 8.01483 15.9592C10.1769 15.9551 10.448 15.9456 11.297 15.9053C12.144 15.8648 12.722 15.7292 13.228 15.5316C13.7513 15.3268 14.1949 15.0542 14.6362 14.6109C15.0775 14.1678 15.3488 13.7231 15.5512 13.199C15.7473 12.6927 15.8806 12.1137 15.9175 11.267C15.9546 10.4174 15.9634 10.1461 15.9593 7.98478C15.9551 5.8232 15.9453 5.55239 15.9051 4.7036C15.8649 3.85609 15.7292 3.27811 15.5314 2.77208C15.3269 2.24877 15.054 1.80567 14.6109 1.36387C14.1678 0.922574 13.7232 0.650729 13.1991 0.448785C12.6926 0.252768 12.1138 0.119166 11.2666 0.0825425C10.4175 0.0448876 10.1465 0.0366393 7.98465 0.0407642C5.82336 0.0448892 5.5523 0.0541772 4.70325 0.0949238ZM4.79611 14.485C4.02004 14.4512 3.59863 14.3222 3.31776 14.2142C2.94585 14.0703 2.68046 13.8977 2.40114 13.6205C2.12234 13.3422 1.94928 13.0776 1.80408 12.7064C1.69497 12.4255 1.5637 12.0046 1.52734 11.2286C1.48788 10.3896 1.47886 10.1378 1.47498 8.01237C1.47086 5.88742 1.47859 5.63569 1.51522 4.79593C1.54848 4.02038 1.67822 3.59843 1.78602 3.31782C1.92993 2.94539 2.10196 2.68051 2.37973 2.4012C2.65801 2.12187 2.92263 1.94933 3.29402 1.80412C3.57463 1.69451 3.99555 1.56426 4.77134 1.52738C5.61084 1.48766 5.8623 1.47915 7.98723 1.47502C10.1127 1.47089 10.3644 1.47838 11.2042 1.51526C11.9797 1.54904 12.4016 1.67749 12.682 1.78607C13.0541 1.92998 13.3195 2.1015 13.5986 2.37979C13.8777 2.65808 14.0507 2.92218 14.1959 3.29435C14.3055 3.57418 14.4358 3.99562 14.4724 4.77117C14.5124 5.61068 14.5214 5.8624 14.5253 7.98736C14.5294 10.1128 14.5217 10.3646 14.4848 11.2038C14.451 11.9799 14.3223 12.4016 14.214 12.6827C14.0701 13.0543 13.898 13.3197 13.62 13.5991C13.342 13.8773 13.0774 14.0509 12.7057 14.1961C12.4256 14.3055 12.0042 14.436 11.2289 14.4729C10.3894 14.5123 10.1379 14.5214 8.01225 14.5252C5.88732 14.5294 5.63586 14.5214 4.79611 14.485ZM11.2854 3.74493C11.2864 4.27211 11.7151 4.69896 12.2422 4.69792C12.7697 4.69689 13.1965 4.2685 13.1957 3.74132C13.1947 3.21414 12.7661 2.78704 12.2386 2.78807C11.7112 2.7891 11.2844 3.21775 11.2854 3.74493ZM3.91277 8.00773C3.91714 10.2653 5.75063 12.0913 8.0076 12.0869C10.2648 12.0825 12.0919 10.2495 12.0875 7.99201C12.0831 5.73526 10.2494 3.90819 7.99188 3.91257C5.73489 3.91696 3.90837 5.75073 3.91277 8.00773ZM5.34648 8.0049C5.3439 6.53969 6.52978 5.34942 7.99471 5.34683C9.45991 5.344 10.6504 6.52937 10.6533 7.99484C10.6561 9.46031 9.47022 10.6503 8.00477 10.6532C6.53984 10.656 5.34932 9.47037 5.34648 8.0049Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[d.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[d.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[d.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),d.jsx("g",{mask:"url(#mask3_6523_22356)",children:d.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),d.jsxs("defs",{children:[d.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:d.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),d.jsx("clipPath",{id:"clip0_6523_22356",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})}),d.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEAlgCWAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMAEAMCAwYAAFokAABijgAAd23/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoXHh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQE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="})]})]}),pinterest:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[d.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),d.jsx("path",{d:"M7.999 2C4.68555 2 2 4.68555 2 7.999C2 10.5406 3.58174 12.7102 5.81336 13.5861C5.76137 13.1121 5.71338 12.3843 5.83336 11.8644C5.94134 11.3964 6.53724 8.88285 6.53724 8.88285C6.53724 8.88285 6.35727 8.52291 6.35727 7.993C6.35727 7.15914 6.84119 6.53524 7.44309 6.53524C7.95501 6.53524 8.20297 6.91918 8.20297 7.3811C8.20297 7.89502 7.87502 8.66489 7.70705 9.37877C7.56507 9.97667 8.007 10.4626 8.5949 10.4626C9.66072 10.4626 10.4806 9.33878 10.4806 7.71505C10.4806 6.27929 9.44876 5.27345 7.975 5.27345C6.26729 5.27345 5.26546 6.55324 5.26546 7.87702C5.26546 8.39293 5.46342 8.94484 5.71138 9.24679C5.75937 9.30678 5.76737 9.35877 5.75337 9.41876C5.70738 9.60873 5.6074 10.0167 5.5874 10.0987C5.56141 10.2086 5.50142 10.2326 5.38743 10.1786C4.63756 9.83069 4.16964 8.73488 4.16964 7.85502C4.16964 5.96334 5.54541 4.22563 8.13298 4.22563C10.2146 4.22563 11.8304 5.70938 11.8304 7.69105C11.8304 9.75871 10.5266 11.4224 8.71688 11.4224C8.10898 11.4224 7.53708 11.1065 7.34111 10.7345C7.34111 10.7345 7.04116 11.8804 6.96717 12.1603C6.83119 12.6822 6.46526 13.3341 6.2213 13.732C6.7832 13.906 7.3791 14 7.997 14C11.3104 14 13.996 11.3144 13.996 8.001C13.998 4.68555 11.3124 2 7.999 2Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6570_25513",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:d.jsx("path",{d:"M12.6609 7.10585C10.121 5.59751 5.93158 5.45882 3.50697 6.1947C3.11759 6.31287 2.70584 6.09298 2.5879 5.70373C2.46988 5.31411 2.68945 4.90265 3.07911 4.78429C5.86241 3.93945 10.4892 4.1026 13.4132 5.83828C13.7634 6.04622 13.8782 6.49851 13.6707 6.84813C13.4629 7.19833 13.0103 7.31376 12.6609 7.10585ZM12.5777 9.33993C12.3995 9.62908 12.0215 9.71979 11.7327 9.54223C9.61522 8.24063 6.38637 7.86357 3.88123 8.624C3.55636 8.72218 3.21323 8.53899 3.11455 8.21475C3.01666 7.88989 3.19992 7.54738 3.5242 7.44859C6.38597 6.58018 9.9436 7.00081 12.3756 8.49536C12.6644 8.67322 12.7553 9.05146 12.5777 9.33993ZM11.6136 11.4855C11.472 11.7177 11.1697 11.7904 10.9383 11.6489C9.08801 10.518 6.75909 10.2627 4.01637 10.8891C3.75207 10.9497 3.48866 10.7841 3.42838 10.5198C3.36785 10.2556 3.53284 9.99217 3.79772 9.93186C6.79916 9.2457 9.37381 9.54101 11.4506 10.8101C11.6822 10.9515 11.7551 11.254 11.6136 11.4855ZM8.00002 0.120623C3.64839 0.120623 0.120605 3.64834 0.120605 7.99989C0.120605 12.352 3.64839 15.8794 8.00002 15.8794C12.3517 15.8794 15.8794 12.352 15.8794 7.99989C15.8794 3.64834 12.3517 0.120623 8.00002 0.120623Z",fill:"#1ED760"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22402",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:d.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d.jsx("path",{d:"M14.3193 4.31285C14.329 4.45301 14.329 4.59317 14.329 4.73462C14.329 9.04475 11.0516 14.0156 5.05865 14.0156V14.0131C3.28832 14.0156 1.55478 13.508 0.0644531 12.5507C0.321873 12.5817 0.580582 12.5972 0.839937 12.5979C2.30703 12.5992 3.7322 12.1063 4.88639 11.1988C3.4922 11.1724 2.26961 10.2623 1.84252 8.93366C2.3309 9.02796 2.83413 9.00858 3.31349 8.87746C1.79349 8.57001 0.699937 7.23299 0.699937 5.68023C0.699937 5.66602 0.699937 5.65246 0.699937 5.63889C1.15284 5.89144 1.65994 6.0316 2.17865 6.0471C0.747034 5.08923 0.305743 3.18251 1.17026 1.69176C2.82445 3.7296 5.2651 4.96844 7.8851 5.09956C7.62252 3.96664 7.98123 2.77947 8.82768 1.98307C10.1399 0.748096 12.2038 0.811395 13.4374 2.12452C14.167 1.98048 14.8664 1.71243 15.5064 1.33264C15.2632 2.0877 14.7541 2.72909 14.0741 3.13665C14.7199 3.06044 15.3509 2.88734 15.9451 2.62316C15.5077 3.2794 14.9567 3.85103 14.3193 4.31285Z",fill:"#1D9BF0"})}),vimeo:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[d.jsx("path",{d:"M16 14.4C16 15.28 15.28 16 14.4 16H1.6C0.72 16 0 15.28 0 14.4V1.6C0 0.72 0.72 0 1.6 0H14.4C15.28 0 16 0.72 16 1.6V14.4Z",fill:"#1AB7EA"}),d.jsx("path",{d:"M13.9945 5.3084C13.9391 6.42815 13.1229 7.97447 11.5458 9.93402C9.91331 11.9736 8.52987 13 7.40928 13C6.70372 13 6.12267 12.3735 5.63846 11.1338C5.32027 9.98735 4.98824 8.85427 4.67005 7.70786C4.31036 6.46814 3.92299 5.84161 3.50796 5.84161C3.42495 5.84161 3.10676 6.02824 2.56721 6.38816L2 5.68165C2.59488 5.1751 3.17593 4.68187 3.75698 4.17532C4.54554 3.52214 5.14042 3.17555 5.54162 3.13556C6.46853 3.05557 7.04958 3.66877 7.27093 4.97514C7.50612 6.40149 7.67213 7.28129 7.75514 7.62788C8.01799 8.80095 8.32235 9.40081 8.64054 9.40081C8.88956 9.40081 9.26309 9.01423 9.77497 8.2544C10.273 7.49457 10.5497 6.90804 10.5774 6.50813C10.6465 5.85494 10.3837 5.52169 9.77497 5.52169C9.48444 5.52169 9.19392 5.58834 8.88956 5.70831C9.48444 3.84206 10.605 2.94893 12.2652 3.00225C13.4826 3.02891 14.0637 3.80207 13.9945 5.3084Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22340",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("path",{d:"M15.6656 3.75817C15.4816 3.06609 14.9395 2.5211 14.2511 2.33614C13.0034 2 8 2 8 2C8 2 2.99666 2 1.7489 2.33614C1.06051 2.5211 0.518324 3.06609 0.334339 3.75817C0 5.01251 0 7.62963 0 7.62963C0 7.62963 0 10.2467 0.334339 11.5012C0.518324 12.1932 1.06051 12.7381 1.7489 12.9232C2.99666 13.2593 8 13.2593 8 13.2593C8 13.2593 13.0034 13.2593 14.2511 12.9232C14.9395 12.7381 15.4816 12.1932 15.6656 11.5012C16 10.2467 16 7.62963 16 7.62963C16 7.62963 16 5.01251 15.6656 3.75817Z",fill:"#ED1D24"}),d.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function t7(e){const{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=R.useRef(null),[a,u]=R.useState(!1);Xe.useOnChange(t,()=>{var c;a&&(u(!1),(c=o.current)==null||c.reset())});function s(){u(!0),r(void 0)}return $r.toURL(t)?t===(n==null?void 0:n.embed_url)?d.jsx(X1,{content:n,selected:i}):d.jsx(m.ErrorBoundary,{ref:o,renderError:v$e,onError:s,children:d.jsx(R.Suspense,{fallback:n&&d.jsx(X1,{content:n,selected:i}),children:d.jsx(y$e,{url:t,selected:i,onContentChange:r})})}):null}function v$e(){return d.jsxs(m.Box,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[d.jsx(m.Icon,{name:"alert",size:"small",color:"grey11"}),d.jsx(m.Text,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function X1(e){const{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:u}=_$e(t);return d.jsxs(m.PreviewCard,{selected:n,children:[d.jsx(m.PreviewImage,{src:r.url,aspectRatio:r.aspectRatio}),d.jsxs(m.PreviewContent,{children:[d.jsxs(m.Box,{display:"flex",alignItems:"center",gap:4,children:[d.jsx(m$e,{provider:i}),d.jsx(m.Text,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&d.jsx(m.Text,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),d.jsx(m.Text,{variant:"smallBold",href:a,children:u})]})]})}function y$e(e){const{url:t,onContentChange:n,selected:r}=e,i=b$e({url:t,onContentChange:n});return d.jsx(X1,{content:i,selected:r})}function b$e(e){const{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=xe(),i=nt.useRequest(C$e,[t,r]),o=Xe.useStableCallback(n);return R.useEffect(()=>{const a=m.handleEditorFlushSyncError(()=>o(i));return()=>{clearTimeout(a)}},[i,o]),i}function C$e(e,t){const n=new URL(t);return n.searchParams.set("url",e),_e.request(n,{okType:S$e(e)})}function S$e(e){return B.object({type:B.string(),version:B.string().or(B.number()).nullish(),title:B.string().nullish(),author_name:B.string().nullish(),author_url:B.string().nullish(),provider_name:B.string().nullish(),provider_url:B.string().nullish(),cache_age:B.string().or(B.number()).nullish(),thumbnail_url:B.string().nullish(),thumbnail_width:B.number().nullish(),thumbnail_height:B.number().nullish(),html:B.string().nullish()}).passthrough().transform(t=>{const n={embed_url:e};return{...n,__TYPE__:"EmbedContent",type:t.type,version:t.version,title:t.title,author_name:t.author_name,author_url:t.author_url,provider_name:t.provider_name,provider_url:t.provider_url,cache_age:t.cache_age,thumbnail_url:t.thumbnail_url,thumbnail_width:t.thumbnail_width,thumbnail_height:t.thumbnail_height,html:t.html,all:{...n,...t}}})}function _$e(e){let t="";switch(e.type){case"video":t=e.title??"";break;case"photo":t=`View this post${e.provider_name?` on ${e.provider_name}`:""}`;break;default:t=`Open${e.provider_name?` on ${e.provider_name}`:""}`}return{url:e.embed_url,thumbnail:{url:e.thumbnail_url??"",aspectRatio:e.type==="video"?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}function I$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=Xe.useDebounceState({initialState:(i==null?void 0:i.embed_url)??"",startTransition:R.startTransition});function u(s){a.set(s),$r.toURL(s)||o(void 0)}return d.jsxs(m.Field,{footer:$r.toURL(a.value)&&d.jsx(m.FieldFooter,{children:d.jsx(t7,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[d.jsx(m.FieldIcon,{name:"cloud"}),d.jsx(m.FieldLabel,{htmlFor:t,children:er(r)}),d.jsx(m.FieldControl,{children:d.jsx(Vu,{id:t,readOnly:n,placeholder:Qu(r),value:a.value,onValueChange:u,variant:$r.toURL(a.value)?"link":"normal",endAdornment:d.jsx(m.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>u("")})})})]})}function n7(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function Nb(e){const t=/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/,n=e.match(t);if(!n)return;const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return;const o={lat:r,lng:i};if(n7(o))return o}function UF(e){return e?`${e.lat}, ${e.lng}`:""}function BF(e){const t=/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/,n=e.match(t);if(!n)return Nb(e);const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return Nb(e);const o={lat:r,lng:i};return n7(o)?o:Nb(e)}function T$e(e){const{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:u,clearValue:s,isValidCoordinates:c}=x$e(i);return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"place"}),d.jsx(m.FieldLabel,{htmlFor:n,children:er(t)}),d.jsx(m.FieldControl,{children:d.jsx(Vu,{id:n,onValueChange:o,placeholder:Z1,readOnly:r,value:a,onBlur:u,variant:c?"link":"normal",endAdornment:d.jsx(m.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:s})})})]})}function x$e(e){const{content:t,onContentChange:n}=e,r=UF(t==null?void 0:t.position),[i,o]=R.useState(r);function a(){const c=BF(i);if(!c)return o(""),n(void 0);const{lat:l,lng:f}=c;o(UF({lat:l,lng:f})),n({__TYPE__:"GeoPointContent",position:{lat:l,lng:f}})}function u(){o(""),n(void 0)}const s=!!BF(i);return{displayedValue:i,isValidCoordinates:s,onValueChange:o,onBlur:a,clearValue:u}}function r7(e){const{fieldLabel:t,imageLabel:n=[]}=e;return d.jsxs(m.CardHeaderTitle,{children:[d.jsx(m.Text,{variant:"bold",noWrap:!0,children:Ip.overflow(t,30)}),n.length!==0&&d.jsx(m.Text,{color:"grey11",noSelect:!0,children:` • ${n.join(" • ")}`})]})}function i7(e){const{fieldLabel:t,isUpdating:n,readOnly:r,onMediaDialogOpenChange:i}=e;return d.jsxs(d.Fragment,{children:[d.jsx(m.CardHeader,{sx:{flexWrap:"wrap"},children:d.jsx(r7,{fieldLabel:t})}),d.jsx(m.CardContent,{children:d.jsx(m.Card,{color:"grey2",variant:"dashed",paddingBlock:12,radius:4,sx:{width:"100%"},children:d.jsx(m.CardContent,{children:d.jsxs(m.BlankSlate,{variant:"horizontal",children:[d.jsx(m.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple9",backgroundColor:"purple4",size:"small"}),d.jsx(m.BlankSlateTitle,{children:n?"Preparing your image...":"You haven't selected an image"}),!r&&d.jsx(m.BlankSlateActions,{children:d.jsx(m.Button,{disabled:n,onClick:()=>i(!0),size:"medium",children:"Select image"})})]})})})})]})}const w$e=lp({id:zo(),width:jm(),height:jm(),urls:lp({full:zo(),small:zo().transform(Iwe)}),alt_description:zo().optional(),description:zo().nullable()}),$$e=lp({results:mq(w$e)}).transform(e=>e.results);function o7(e,t){const n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),_e.request(n,{okType:$$e})}nt.cache.registerFetcherConfig(o7,{cacheCapacity:5,revalidationStrategy:{type:"never"}});function E$e(e,t){const n=R.useRef(),r=xe(),i=nt.useRequest(o7,[e,t]);return Xe.useDebounce(t,1e3,()=>{var o;n.current&&t!==n.current&&((o=r.onAnalyticsEvent)==null||o.call(r,"Unsplash Image Searched")),n.current=t}),i}function R$e(e){const{onSelectedChange:t}=e,[n,r]=R.useTransition(),i=Xe.useDebounceState({initialState:"",ms:300,startTransition:r});return d.jsxs(m.Box,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[d.jsx(m.FormSearchInput,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(jq,{}),children:d.jsx(R.Suspense,{fallback:d.jsx(F$e,{}),children:d.jsx(O$e,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function O$e(e){const{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=M$e({term:t,onSelectedChange:n});return d.jsxs(d.Fragment,{children:[d.jsx(a7,{children:i==null?void 0:i.map(u=>{const c=new URL(u.urls.full).searchParams.get("fm")??"jpg";return d.jsx(m.MediaCard,{url:u.urls.small,filename:u.description??"Unsplash Image",selected:a===u.id,onCardClick:()=>o(u),onCheckedChange:()=>o(u),extension:c,width:u.width,height:u.height,loading:r},u.id)})}),i.length===0&&d.jsx(cq,{})]})}function a7(e){const{children:t}=e;return d.jsx(m.ScrollArea,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 250px), 1fr))",gap:16,paddingBottom:16,position:"relative",width:"100%"},children:t})}function F$e(){return d.jsx(a7,{children:gn.range(1,24).map(e=>d.jsx(Dq,{},e))})}function M$e(e){var c;const{term:t,onSelectedChange:n}=e,{unsplashApiBaseUrl:r}=xe(),i=E$e(r,t||"citrus fruit"),o=(c=i==null?void 0:i[0])==null?void 0:c.id,[a,u]=R.useState();R.useEffect(()=>{n==null||n([]),u(void 0)},[o,n]);function s(l){if(l.id===a)return u(void 0),n==null?void 0:n([]);u(l.id),n==null||n([{...l,url:l.urls.full,alt:l.alt_description}])}return{media:i,toggleSelected:s,selectedImageId:a}}function RR(e){const{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=xe(),a=o.mediaLibrary,[u,s]=R.useState(()=>a?"media":"unsplash"),[c,l]=R.useState(new Set),[f,p]=R.useState([]),A=c.size+f.length,h=nt.useFetcherData(Yi);R.useEffect(()=>{!t||!a||Mq({config:o,assetType:i})},[t,o,i,a]);function v(C){if(C!=="media"&&C!=="unsplash")throw new Error(`Invalid option ${C}.`);s(C)}function _(C){C||l(new Set),n(C)}const S=Uxe({assetType:i,mediaDialogOpen:t});function I(){var C;if(u==="unsplash"){const y=f[0];if(!y)return;r(y),(C=o.onAnalyticsEvent)==null||C.call(o,"Unsplash Image Added")}else if(u==="media"){const w=h.flatMap(M=>M.items).filter(M=>c.has(M.id))[0];if(!w)return;r(w),S(w.id)}_(!1)}function T(){if(A===0)return"Select a media item to add to the page";if(A>1)return"Only one media item can be added to the page"}const{containerRef:g}=m.useAlert();return d.jsxs(m.Dialog,{open:t,onOpenChange:_,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside:C=>{g&&Xe.refContainsTarget(g,C.target)&&C.preventDefault()},children:[d.jsx(m.DialogHeader,{icon:"image",title:"Media library"}),d.jsxs(m.DialogOptions,{value:u,onValueChange:v,padding:"small",width:"auto",children:[a&&d.jsx(m.DialogOptionsItem,{value:"media",icon:"photo"}),d.jsx(m.DialogOptionsItem,{value:"unsplash",icon:"unsplash"})]}),d.jsx(m.DialogContent,{children:d.jsxs(m.Box,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[d.jsx(aq,{}),d.jsxs(m.Box,{overflow:"hidden",backgroundColor:"grey3",padding:{top:16,inline:16},flexGrow:1,children:[u==="media"&&d.jsx(Hq,{assetType:i,onSelectedChange:l}),u==="unsplash"&&d.jsx(R$e,{onSelectedChange:p})]})]})}),d.jsxs(m.DialogActions,{children:[d.jsx(m.DialogCancelButton,{}),d.jsx(m.DialogActionButton,{onClick:I,disabled:A!==1,tooltipLabel:T(),children:"Add to page"})]})]})}function u7(e){const{isMediaDialogOpen:t,selected:n,onMediaSelected:r,onMediaDialogOpenChange:i,children:o}=e;return d.jsxs(m.Card,{color:n?"indigo2":"grey2",variant:n?"selected":"dashed",paddingBlock:12,radius:4,children:[o,d.jsx(RR,{open:t,onOpenChange:i,onMediaSelected:r,assetType:"image"})]})}function s7(e){const{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:u}=n,s=L$e({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:s,edit:{...t.edit,zoom:u,crop:{x:o,y:a}}}}function k$e(e){var c,l,f;const{field:t,content:n,thumbnail:r,croppedImage:i}=e;if(r===dd)return c7({content:n,croppedImage:i});const o=Ue.isImageContent(n),a=(l=(c=t==null?void 0:t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===r),u=o?(f=n.thumbnails)==null?void 0:f[r]:void 0;if(!a||!u)return n;const s=s7({contentView:u,croppedImage:i});return s.url===u.url?n:{...n,thumbnails:o?{...n.thumbnails,[r]:s}:void 0}}function c7(e){const{content:t,croppedImage:n}=e,r=s7({contentView:t,croppedImage:n});return r.url===t.url?t:{...t,...r}}function L$e(e){const{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:u,cropWidth:s}=n,c=new URL(t.url),l=t.height!==a||t.width!==o;if(r!==0||i!==0||u!==t.height||s!==t.width){const p=[r,i,s,u].map(Math.round).join(",");c.searchParams.set("rect",p),c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())}return l&&(c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())),c.toString()}function j$e(e){const{x:t,y:n}=e.edit.crop,r=e.edit.zoom,{width:i,height:o}=e,{width:a,height:u}=e.origin,s=i/o,c=Math.min(a,u*s/r),l=c/s;return{x:t,y:n,width:i,height:o,zoom:r,cropWidth:c,cropHeight:l}}function U$e(e){const{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:u,cropWidth:s}=n,c=t.contentView,l={x:n.x,y:n.y,width:s,height:u},[f,p]=R.useState(),A=(c==null?void 0:c.origin.url)??"",h=!(t!=null&&t.thumbnail.height&&(t!=null&&t.thumbnail.width));function v(g,C){const y=parseInt(C);isNaN(y)||y<=0||!h||r({...n,[g]:y})}function _(g){r({...n,cropWidth:g.width,cropHeight:g.height,x:g.x,y:g.y})}function S(g){r({...n,zoom:g})}function I(){p(Dh),r({...n,...Dh})}function T(){c&&(p(Dh),r({...n,...Dh,zoom:1,cropWidth:c.width,cropHeight:c.height}))}return d.jsxs(m.Box,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[d.jsxs(m.Box,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[d.jsx(m.Tooltip,{content:"Center",children:d.jsx(m.Button,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:I})}),d.jsx(m.Tooltip,{content:"Cover",children:d.jsx(m.Button,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:T})}),d.jsx(m.Separator,{orientation:"vertical"}),d.jsx(m.FormInput,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:g=>v("width",g),sx:{width:100},disabled:!h}),d.jsx(m.FormInput,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:g=>v("height",g),sx:{width:100},disabled:!h})]}),d.jsx(m.Cropper,{image:A,aspect:i/o,crop:f??{x:0,y:0},onCropChange:p,zoom:a,onZoomChange:S,onCropAreaChange:(g,C)=>_(C),initialCroppedAreaPixels:l}),d.jsx(m.Box,{width:"100%",maxWidth:320,children:d.jsx(m.Slider,{min:1,max:3,step:.01,value:[a],onValueChange:([g])=>S(g??1)})})]})}const Dh={x:0,y:0};function B$e(e){const{trigger:t,initialImages:n,renderTooltip:r}=e,{open:i,onOpenChange:o,ready:a,option:u,selectedImage:s,croppedImage:c,setCroppedImage:l,setReady:f,setOption:p}=W$e(e);return d.jsxs(m.Dialog,{trigger:t,onAnimationEnd:()=>f(!0),open:i,onOpenChange:o,renderTooltip:r,children:[d.jsx(m.DialogHeader,{icon:"photo",title:"Image editor"}),d.jsx(m.DialogOptions,{value:String(u),onValueChange:A=>p(Number(A)),children:n.map((A,h)=>d.jsx(m.DialogOptionsItem,{value:String(h),icon:"photo",title:A.labels[0]??"Main",subtitle:A.labels[1]??""},A.thumbnail.name))}),s&&d.jsx(m.DialogContent,{children:a&&c&&d.jsx(U$e,{selectedImage:s,imageCrop:c,setImageCrop:l},s.thumbnail.name)})]})}function W$e(e){const{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=R.useState(_),[a,u]=R.useState(!1),[s,c]=R.useState(!1),[l,f]=R.useState(n);function p(S){S?(f(n),o(_())):(c(!1),r({option:l,croppedImages:i})),u(S)}const A=t[l],h=i[(A==null?void 0:A.thumbnail.name)??""];function v(S){if(!A)return;const I=A.thumbnail.name;o({...i,[I]:S})}function _(){return t.reduce((S,I)=>(I.contentView&&(S[I.thumbnail.name]=j$e(I.contentView)),S),{})}return{open:a,ready:s,option:l,selectedImage:A,croppedImage:h,setCroppedImage:v,setReady:c,setOption:f,onClose:r,onOpenChange:p}}function K$e(e){const{id:t,readOnly:n,altText:r,onValueChange:i,selected:o}=e;return d.jsxs(m.Field,{selected:o,children:[d.jsx(m.FieldLabel,{htmlFor:t,children:"Alt text"}),d.jsx(m.FieldControl,{children:d.jsx(m.Box,{flexGrow:1,height:40,children:d.jsx(Vu,{id:t,placeholder:"Short description for the visually impaired",readOnly:n,value:r,onValueChange:i,padding:{input:{inline:12}}})})})]})}function P$e(e){const{fieldLabel:t,imageLabel:n,initialImages:r,page:i,displaySeparator:o=!0,isSVGContentView:a,visibility:u,onClear:s,onCropperDialogClose:c,onMediaDialogOpenChange:l}=e;return d.jsxs(m.Box,{display:"flex",flexDirection:"column",gap:12,children:[d.jsxs(m.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:4,children:[d.jsx(r7,{fieldLabel:t,imageLabel:n}),d.jsxs(m.CardHeaderActions,{sx:{visibility:u},children:[d.jsx(B$e,{trigger:d.jsx(m.Button,{startIcon:"crop",disabled:a}),renderTooltip:f=>d.jsx(m.Tooltip,{content:"Crop & Resize",children:f}),initialImages:r,initialOption:i,onClose:c}),d.jsx(m.Tooltip,{content:"Replace",children:d.jsx(m.Button,{startIcon:"imageSearch",hiddenLabel:"Replace",onClick:()=>l(!0)})}),d.jsx(m.Tooltip,{content:"Clear",children:d.jsx(m.Button,{onClick:s,startIcon:"delete"})})]})]}),o&&d.jsx(m.Separator,{style:"dashed",decorative:!0})]})}function D$e(e){const{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:u,previewImageUrl:s,onSelect:c}=e;function l(f){return f.nativeEvent instanceof MouseEvent&&(f.metaKey||f.ctrlKey)?window.open(n,"_blank"):c()}return d.jsxs(m.Card,{paddingBlock:16,onSelect:l,children:[d.jsx(m.CardContent,{children:d.jsxs(m.Box,{justifyContent:"space-between",children:[d.jsxs(m.Box,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[d.jsx(N$e,{documentType:t}),d.jsx(q$e,{title:r,statusColor:i}),d.jsx(Q$e,{description:o})]}),d.jsx(V$e,{previewImageUrl:s})]})}),a.length>0&&d.jsx(z$e,{tags:a,tagsFilter:u})]})}function N$e(e){const{documentType:t}=e;return d.jsx(m.Badge,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function q$e(e){const{title:t,statusColor:n}=e;return d.jsxs(m.Box,{gap:8,alignItems:"center",children:[d.jsx(m.Dot,{color:n}),d.jsx(m.Text,{variant:"bold",children:t})]})}function Q$e(e){const{description:t}=e,n=t==null?void 0:t.substring(0,150);return n?d.jsx(m.Text,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):d.jsx(m.Text,{variant:"smallItalic",color:"grey11",children:"No description available"})}function V$e(e){const{previewImageUrl:t}=e;return d.jsx(m.Box,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?d.jsx(m.Image,{src:t,sizing:"cover"}):d.jsxs(d.Fragment,{children:[d.jsx(m.Icon,{name:"hideImage",size:"large",color:"grey11"}),d.jsx(m.Text,{color:"grey11",variant:"small",children:"No preview available"})]})})}function z$e(e){const{tags:t}=e;return d.jsxs(m.CardFooter,{children:[d.jsxs(m.Box,{gap:4,alignItems:"center",children:[d.jsx(m.Icon,{name:"label",size:"small",color:"grey11"}),d.jsx(m.Text,{variant:"small",color:"grey11",children:"Tags:"})]}),d.jsx(m.TextOverflow,{children:t.map(n=>d.jsx(m.Badge,{size:"medium",title:n,sx:{marginRight:8}},n))})]})}function H$e(e){var g,C;const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i}=e,o=xe();o.searchDocuments||Bn("searchDocuments");const{coreApiBaseUrl:a,documentSearchBaseUrl:u,authStrategy:s,status:c,documentListOpenSearchEnabled:l,repository:f}=o,p=l===!1;function A(){return p?W0({tags:[...Rn.map(n,y=>y.id)],customTypes:[...Rn.map(r,y=>y.id)],language:[...Rn.map(i,y=>y.id)],term:[t]}):bq({repository:f,searchTerm:t,customTypesIds:[...Rn.map(r,y=>y.id)],tags:[...Rn.map(n,y=>y.id)],localeId:[...Rn.map(i,y=>y.id)][0]})}const[h,v]=R.useState([]),[_,S]=R.useState(""),I=A(),T=nt.useRequest(l7,[a,u,s,I,c,p]);return I!==_?(S(I),v(T.results)):T.results.length>0&&((g=gn.last(h))==null?void 0:g.id)!==((C=gn.last(T.results))==null?void 0:C.id)&&v(y=>y.concat(T.results)),{documents:h,response:T}}nt.cache.registerFetcherConfig(l7,{cacheCapacity:500,revalidationStrategy:{type:"never"}});async function l7(e,t,n,r,i,o){const a=oq[i];if(o){const l=await B0(e,n,r,200);return WF(l,a)}const u=await yq(t,n,r),s=await Sq(e,n,u.results.map(({id:c})=>c));return WF(s,a)}function WF(e,t){return{results:e.results.flatMap(r=>{const i=r.versions.filter(o=>t.includes(o.status));return i.length===0?[]:{...r,versions:i}})}}function KF(){const e=xe();e.searchDocuments||Bn("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=nt.useRequest(_q,[t,n]);return new Set(r.languages.map(i=>({id:i.id,label:i.name})))}function Y$e(){const e=xe();e.searchDocuments||Bn("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=nt.useRequest(Tq,[t,n]);return new Set(r.results.map(i=>({id:i,label:i})))}function G$e(){const e=xe();e.searchDocuments||Bn("searchDocuments");const{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e,i=nt.useRequest(gq,[t,n,r]);return new Set(i)}function J$e(e,t){const n=xe(),r=Xe.useDebounceState({initialState:""}),[i,o]=R.useState(new Set),[a,u]=R.useState(new Set);function s(){return!n.searchDocuments||!n.localeId?new Set:new Set([{id:n.localeId,label:n.localeId}])}const[c,l]=R.useState(s),f=Rn.union(a,Um(e)),p=Rn.union(i,Um(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:u,filteredLocales:c,setFilteredLocales:l,typesFilter:f,tagsFilter:p}}function Um(e){return e?Rn.map(e,t=>({id:t,label:t})):new Set}function Z$e(e){const{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:u,fixedCustomTypes:s}=e;return d.jsxs(d.Fragment,{children:[d.jsx(eEe,{selectedValues:t,onSelectedValuesChange:n}),d.jsx(eC,{selectedValues:r,fixedSelectedValues:Um(u),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:Y$e}),d.jsx(eC,{selectedValues:o,fixedSelectedValues:Um(s),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:G$e})]})}function eC(e){const[t,n]=R.useState(!1),r=R.useRef(null);return d.jsx(m.ErrorBoundary,{ref:r,renderError:()=>{var i;return d.jsx(m.FilterField,{mode:"error",onErrorRetry:(i=r.current)==null?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:d.jsx(R.Suspense,{fallback:d.jsx(m.FilterField,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:d.jsx(X$e,{open:t,setOpen:n,...e})})})}function X$e(e){const{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:u,fetchFilters:s,multiple:c}=e,l=s();return d.jsx(m.FilterField,{open:t,setOpen:n,label:a,icon:u,selectedValues:o,values:new Set(l),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:c})}function eEe(e){const{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=R.useState(Rn.first(t));function o(u){n(u),i(Rn.first(u))}const a=Rn.find(KF(),u=>{var s;return u.id===((s=Rn.first(t))==null?void 0:s.id)});return(a==null?void 0:a.label)!==(r==null?void 0:r.label)&&i(a),d.jsx(eC,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:o,label:"Locale",icon:"public",fetchFilters:KF,multiple:!1})}function f7(e){const{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,...i}=e,o=xe(),{searchTerm:a,filteredTags:u,setFilteredTags:s,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:f,setFilteredLocales:p,typesFilter:A,tagsFilter:h}=J$e(n,r),[v,_]=R.useTransition();return d.jsx(m.Dialog,{size:{height:727,width:656},hasClose:!1,...i,children:d.jsx(m.DialogContent,{children:d.jsxs(m.Box,{flexDirection:"column",height:"100%",children:[d.jsxs(m.Box,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[d.jsx(m.FormInput,{value:a.value,onValueChange:a.set,placeholder:"Search a page",icon:"search"}),o.searchDocuments&&d.jsx(Z$e,{filteredTags:u,setFilteredTags:s,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:f,setFilteredLocales:p,fixedTags:r,fixedCustomTypes:n}),d.jsx(m.Text,{variant:"smallBold",color:"grey11",children:"Link to a document"})]}),o.searchDocuments?d.jsx(m.ErrorBoundary,{renderError:nEe,children:d.jsx(R.Suspense,{fallback:d.jsx(iEe,{}),children:d.jsx(rEe,{searchTerm:a.debouncedValue,tagsFilter:h,typesFilter:A,localesFilter:f,startTransition:_,onSelectDocument:t})})}):d.jsx(d7,{message:"Slice Machine does not yet support mock data for linked documents in the simulator."}),d.jsx(tEe,{isLoading:v})]})})})}function tEe(e){const{isLoading:t}=e;return d.jsx(m.Toast,{anchor:d.jsx(m.Box,{position:"relative",width:"100%",justifyContent:"center",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more results ...",seconds:1})}function nEe(){return d.jsx(m.Box,{height:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",children:d.jsx(m.DefaultErrorMessage,{title:"Request failed",description:"An error occurred while fetching documents.",errorImageSrc:m.dialogErrorImage})})}function rEe(e){const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,onSelectDocument:o}=e,{documents:a}=H$e({searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r}),u=xe();return d.jsxs(m.ScrollArea,{style:{flexGrow:1,paddingTop:m.theme.space[10],paddingBottom:m.theme.space[16],paddingInline:m.theme.space[16],display:"flex",flexDirection:"column",gap:m.theme.space[12]},children:[a.length===0&&d.jsx(d7,{}),a.map(s=>{const c=s.versions[0];if(!c)return null;const l=_R({documentId:s.id,versionId:c.status==="archived"?c.version_id:void 0,releaseId:c.status==="release"?c.release_id:void 0,status:c.status,baseUrl:u.baseUrl}),f=oEe({tags:c.tags,tagsFilter:n});return d.jsx(D$e,{documentType:c.custom_type_label,documentUrl:l,description:c.preview_summary,tags:f,title:s.title,previewImageUrl:c.preview_image,onSelect:()=>o(s.id),statusColor:iq[c.status].color},`${s.id}-${c.status}`)})]})}function d7(e){const{message:t="We can't find any versions matching this request"}=e,n="Oops!";return d.jsx(m.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:d.jsxs(m.BlankSlate,{children:[d.jsx(m.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(m.BlankSlateTitle,{size:"big",children:n}),d.jsx(m.BlankSlateDescription,{width:360,children:t})]})})}function iEe(){return d.jsx(m.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:gn.range(1,5).map(e=>d.jsx(m.Skeleton,{height:150},e))})}function oEe(e){const{tags:t,tagsFilter:n}=e,r=[...n].map(o=>o.label).reverse();return gn.sort(t,o=>-r.indexOf(o))}function p7(e){const{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,onValueChange:o,openInNewTab:a=!0,condensedButtons:u=!1,setOpenInNewTab:s}=e,c=s&&i==="web",l=a?"checkBox":"checkBoxOutlinedBlank";return d.jsxs(d.Fragment,{children:[c&&d.jsx(m.Tooltip,{content:"Open in new tab",visible:u,children:d.jsx(m.Button,{startIcon:l,color:"grey",size:"small",onClick:()=>s(!a),children:u?"":"Open in new tab"})}),d.jsxs(m.Select,{value:i,color:"grey",size:"small",boldTriggerText:!0,startIcon:aEe(i),disabled:!r,onValueChange:o,placeholder:u?"":gd("placeholder"),onlyStartIcon:u&&!!i,renderTrigger:({button:f})=>d.jsx(m.Tooltip,{content:gd(i),visible:u,children:f}),children:[d.jsx(m.SelectItem,{value:"web",icon:"public",children:gd("web")}),d.jsx(m.SelectItem,{value:"document",icon:"description",children:gd("document")}),d.jsx(m.SelectItem,{value:"media",icon:"image",children:gd("media")})]}),d.jsx(m.Button,{startIcon:"close",color:"grey",size:"small",disabled:!t,onClick:n})]})}function gd(e){if(!e||e==="placeholder")return"Choose link type";switch(e){case"document":return"Link to Prismic page";case"web":return"Link to web page";case"media":return"Link to media"}}function aEe(e){if(e)switch(e){case"document":return"description";case"web":return"public";case"media":return"image"}}function uEe(e){var y;const{field:t,content:n,onContentChange:r}=e,i=h(),[o,a]=R.useState(A),[u,s]=R.useState(()=>(n==null?void 0:n.value.__TYPE__)==="ExternalLink"?n.value.target:""),[c,l]=R.useState(!1),f=R.useRef(null);Xe.useOnChange(i,T);const p=o?sEe[o]:void 0;function A(){var x,w;return!((x=t.config)!=null&&x.select)||n!=null&&n.value.__TYPE__?n==null?void 0:n.value.__TYPE__:PF[(w=t.config)==null?void 0:w.select]}function h(){return n?n.value.__TYPE__==="DocumentLink"?n.value.id:n.value.__TYPE__==="ExternalLink"?n.value.url:n.value.name:""}function v(x){if(!x)return r(void 0);switch(o){case"ExternalLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:x,target:u}});case"DocumentLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:x}});case"FileLink":case"ImageLink":case void 0:return r(void 0)}}function _(x){a(PF[x]),v("")}function S(x){v(x)}function I(){l(!0)}function T(){var x;c&&(l(!1),(x=f.current)==null||x.reset())}function g(x){const w=x?"_blank":null;s(w),r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:i,target:w}})}function C(x){r(h7({media:x}))}return{contentType:o,selectType:p,fieldValue:i,onValueChange:v,onTypeChange:_,placeholder:Qu(t),isTypeSelectEnabled:!((y=t.config)!=null&&y.select),onDocumentSelected:S,onError:I,errorBoundaryRef:f,isTargetNewTab:u==="_blank",updateWebLinkTarget:g,onMediaSelected:C}}const sEe={DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media"},PF={document:"DocumentLink",web:"ExternalLink",media:"FileLink"};function cEe(e){const t=xe();t.searchDocuments||Bn("searchDocuments");const{coreApiBaseUrl:n,authStrategy:r}=t;return nt.useRequest(A7,[n,r,e]).title}const lEe=lp({id:zo(),title:zo()});function A7(e,t,n){return _e.request(new URL(`documents/${n}`,e),{credentials:_e.getRequestCredentials(t),okType:lEe})}nt.cache.registerFetcherConfig(A7,{concurrency:50});function h7(e){var i,o,a,u,s,c;const{media:t}=e,n="kind"in t;return n&&t.kind==="image"?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:t.filename,url:t.url,kind:t.kind,size:t.size.toString(),height:((i=t.height)==null?void 0:i.toString())??`${Xa}`,width:((o=t.width)==null?void 0:o.toString())??`${Xa}`,date:((a=t.last_modified)==null?void 0:a.toString())??""}}:n?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:t.id,name:t.filename,kind:t.kind,url:t.url,size:t.size.toString(),date:((u=t.last_modified)==null?void 0:u.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:(t==null?void 0:t.alt)??t.url,kind:"image",url:t.url,size:"0",height:((s=t.height)==null?void 0:s.toString())??`${Xa}`,width:((c=t.width)==null?void 0:c.toString())??`${Xa}`}}}function m7(e){var J,Z;const{content:t,field:n,id:r,onContentChange:i,readOnly:o=!1,condensedButtons:a=!1}=e,[u,s]=R.useState(!1),[c,l]=R.useState(!1),[f,p]=R.useState(!1),[A,h]=R.useState(!1),{contentType:v,fieldValue:_,errorBoundaryRef:S,onDocumentSelected:I,onError:T,onMediaSelected:g,...C}=uEe({content:t,field:n,onContentChange:i}),y=u||c,x=o||!v,w=v==="DocumentLink"&&_!=="",M=v==="ImageLink"||v==="FileLink",F=v==="ExternalLink"&&$r.toURL(_),K={id:r,contentType:v,onBlur:()=>s(!1),onFocus:()=>{s(!0),v==="DocumentLink"&&p(!0),v==="FileLink"&&h(!0),v==="ImageLink"&&h(!0)},readOnly:x,textType:F||M?"link":"normal",value:_,condensedButtons:a,...C},{searchDocuments:N}=xe();return d.jsxs(d.Fragment,{children:[d.jsxs(m.Popover,{onMouseOverChange:l,open:y,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:d.jsxs(m.Field,{onMouseOverChange:s,children:[d.jsx(m.FieldIcon,{name:"link"}),d.jsx(m.FieldLabel,{htmlFor:r,children:er(n)}),d.jsx(m.FieldControl,{children:w&&N?d.jsx(pEe,{errorBoundaryRef:S,onError:T,fallback:d.jsx(tC,{...K,value:"..."}),renderError:()=>fEe(K),children:d.jsx(dEe,{...K,documentId:_,openDocumentListModal:()=>p(!0)})}):d.jsx(tC,{...K})})]}),children:[F&&d.jsx(m.LinkDescriptionCard,{url:F,title:$r.getUrlTitle(F)??"",subTitle:F.toString()}),(t==null?void 0:t.value.__TYPE__)==="ImageLink"&&d.jsx(m.LinkImageCard,{url:t.value.url,title:t.value.name,subTitle:`${t.value.width} x ${t.value.height} pixels`})]}),d.jsx(RR,{open:A,onOpenChange:h,onMediaSelected:g,assetType:"all"}),d.jsx(f7,{open:f,onOpenChange:p,onSelectDocument:ae=>{p(!1),I(ae)},fixedCustomTypes:new Set((J=n.config)==null?void 0:J.customtypes),fixedTags:new Set((Z=n.config)==null?void 0:Z.tags)})]})}function fEe(e){return d.jsx(tC,{...e,textType:"link"})}function tC(e){const{id:t,onValueChange:n,placeholder:r,readOnly:i,value:o,textType:a,onFocus:u,onBlur:s,contentType:c,isTypeSelectEnabled:l,selectType:f,onTypeChange:p,isTargetNewTab:A,condensedButtons:h,updateWebLinkTarget:v}=e,_=c==="DocumentLink"||c==="ImageLink"||c==="FileLink";return d.jsx(Vu,{id:t,onValueChange:n,placeholder:r,readOnly:i||_,value:o,variant:a,onFocus:u,onBlur:s,cursor:_?"pointer":"text",endAdornment:d.jsx(p7,{hasLink:!!o,onUnlink:()=>n(""),selectEnabled:l,selectedType:f,onValueChange:p,openInNewTab:A,condensedButtons:h,setOpenInNewTab:v})})}function dEe(e){const{id:t,documentId:n,openDocumentListModal:r,onValueChange:i,isTypeSelectEnabled:o,selectType:a,condensedButtons:u,onTypeChange:s}=e,c=cEe(n);return d.jsx(Vu,{id:t,readOnly:!0,value:c,variant:"link",onFocus:r,cursor:"pointer",endAdornment:d.jsx(p7,{hasLink:!0,onUnlink:()=>i(""),selectEnabled:o,selectedType:a,condensedButtons:u,onValueChange:s})})}function pEe(e){const{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return d.jsx(m.ErrorBoundary,{ref:t,onError:n,renderError:o,children:d.jsx(R.Suspense,{fallback:i,children:r})})}function AEe(e){const{linkTo:t,onLinkToChange:n}=e;return d.jsx(m7,{content:hEe(t),onContentChange:r=>n(mEe(r)),field:{type:"Link",config:{label:"Link",allowTargetBlank:!0}},condensedButtons:!0})}function hEe(e){return e?{__TYPE__:"LinkContent",value:e}:void 0}function mEe(e){return e?e.value:void 0}function g7(e){var g,C;const{allContentViews:t,content:n,contentView:r,fieldLabel:i,id:o,imageLabel:a,initialImages:u,isUpdating:s,page:c=0,readOnly:l,thumbnailName:f,onClear:p,onContentChange:A,onCropperDialogClose:h,onPageChange:v=()=>{},onMediaDialogOpenChange:_}=e,S=((C=(g=n==null?void 0:n.url)==null?void 0:g.split("?")[0])==null?void 0:C.slice(-4))===".svg",I=n!=null&&n.url&&!l?"visible":"hidden",T=!Ue.isImageContent(n);return d.jsxs(m.Box,{display:"flex",gap:12,padding:{inline:12},children:[d.jsx(m.Box,{children:d.jsx(m.Carousel,{getItemSource:Twe,items:t,onPageChange:v,page:c,buttonSize:"small",renderPrevTooltip:y=>d.jsx(m.Tooltip,{content:"Previous",children:y}),renderNextTooltip:y=>d.jsx(m.Tooltip,{content:"Next",children:y}),style:T?{width:181,height:142}:{width:123,height:93},children:y=>(y==null?void 0:y.url)&&d.jsx(m.CarouselItem,{"aria-label":"Image Field Item",src:Qq(y.url),alt:y.alt??void 0,isUpdating:s,disableAnimation:T},`${f}_${y.url}`)})}),d.jsxs(m.Box,{width:"100%",display:"flex",flexDirection:"column",gap:T?16:12,children:[d.jsx(P$e,{fieldLabel:i,imageLabel:a,initialImages:u,page:c,displaySeparator:!T,isSVGContentView:S,visibility:I,onClear:p,onCropperDialogClose:h,onMediaDialogOpenChange:_}),d.jsx(K$e,{id:o,readOnly:l||!r,altText:(r==null?void 0:r.alt)??"",onValueChange:y=>{r&&A(Cwe(f,n,r,y))}}),T&&d.jsx(AEe,{linkTo:n.linkTo,onLinkToChange:y=>{A({...n,linkTo:y})}})]})]})}function gEe(e){const{content:t,onContentChange:n,field:r}=e,[i,o]=R.useState(0),[a,u]=R.useTransition(),s=vEe(r),c=s[i],l=t?bwe(r,t):void 0,f=l==null?void 0:l[i];function p(_){if(!c)return;const S=xwe(c.name,r,t,_);S!==t&&u(()=>n(S))}function A(_){u(()=>o(_))}function h({option:_,croppedImages:S}){if(o(_),!t)return;const I=Object.entries(S).reduce((T,[g,C])=>k$e({field:r,content:T,thumbnail:g,croppedImage:C}),t);I!==t&&u(()=>n(I))}function v(){o==null||o(0),n(void 0)}return{onCropperDialogClose:h,onPageChange:A,onMediaSelected:p,isUpdating:a,page:i,thumbnail:c,allThumbnails:s,allContentViews:l,contentView:f,onClear:v}}function vEe(e){return R.useMemo(()=>ywe(e),[e])}function yEe(e){const{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e,a=t&&t.origin.url.length>0,{onCropperDialogClose:u,onPageChange:s,onMediaSelected:c,isUpdating:l,page:f,thumbnail:p,allThumbnails:A,allContentViews:h,contentView:v,onClear:_}=gEe({field:n,content:t,onContentChange:i}),[S,I]=R.useState(!1),T=er(n),g=A.map((x,w)=>{const M=h==null?void 0:h[w];return{thumbnail:x,contentView:M,labels:J1(x,t,M)}}),C=p&&a?J1(p,t,v).filter(to.isDefined):[],y=p&&t&&a&&h;return d.jsx(u7,{isMediaDialogOpen:S,onMediaSelected:c,onMediaDialogOpenChange:I,children:d.jsx(R.Suspense,{fallback:d.jsx("div",{style:{height:95}}),children:y?d.jsx(g7,{allContentViews:h,content:t,contentView:v,fieldLabel:T,id:r,imageLabel:C,initialImages:g,isUpdating:l,page:f,readOnly:o,thumbnailName:p.name,onClear:_,onContentChange:i,onCropperDialogClose:u,onMediaDialogOpenChange:I,onPageChange:s}):d.jsx(i7,{fieldLabel:T,isUpdating:l,readOnly:o,onMediaDialogOpenChange:I})})})}function bEe(e){var _,S;const{searchTerm:t,catalogId:n}=e,r=xe();r.integrationFields||Bn("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,[u,s]=R.useState(1),[c,l]=R.useState([]),[f,p]=R.useState(""),A=nt.useRequest(CEe,[i,a,o,n,t,t===f?u:1]);t!==f?(p(t),s(1),l(A.items)):A.items.length>0&&((_=gn.last(c))==null?void 0:_.id)!==((S=gn.last(A.items))==null?void 0:S.id)&&l(I=>I.concat(A.items));const h=u<A.totalPages;function v(){h&&s(I=>I+1)}return{items:c,response:A,fetchNextPage:v,hasNextPage:h}}function CEe(e,t,n,r,i,o=1,a=30){const u=new URL(`if/search/${r}`,e);return u.searchParams.set("searchTerm",i),u.searchParams.set("limit",a.toString()),u.searchParams.set("page",o.toString()),_e.request(u,{headers:{repository:n},credentials:_e.getRequestCredentials(t),okType:SEe})}const v7=B.object({id:B.string(),title:B.string(),imageURL:B.string().optional(),description:B.string().optional()}),SEe=B.object({items:B.array(v7),totalPages:B.number(),page:B.number()});function y7(e){const{itemId:t,catalogId:n}=e,r=xe();r.integrationFields||Bn("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,s=nt.useRequest(_Ee,[i,a,o,n,t]).items[0];if(!s)throw new Error("Item not found");return{item:s}}function _Ee(e,t,n,r,i){const o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),_e.request(o,{headers:{repository:n},credentials:_e.getRequestCredentials(t),okType:IEe})}const IEe=B.object({items:B.array(v7)});function OR(e){const{item:t,onClick:n,catalogId:r}=e;return d.jsxs(m.PreviewCard,{variant:"large",onClick:n,children:[d.jsx(TEe,{src:t.imageURL??"",alt:t.title}),d.jsxs(m.PreviewContent,{children:[d.jsx(m.Badge,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),d.jsx(m.Text,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),d.jsx(m.Text,{variant:"small",color:"grey11",children:t.description??t.id})]})]})}const Nh=76;function TEe(e){const{src:t,alt:n}=e;return t?d.jsx(m.PreviewImage,{src:t,alt:n,width:Nh,height:Nh,framed:!0}):d.jsxs(m.Box,{borderRadius:6,backgroundColor:"grey2",height:Nh,width:Nh,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[d.jsx(m.Icon,{name:"hideImage",size:"large",color:"grey11"}),d.jsx(m.Text,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function el(){return d.jsxs(m.PreviewCard,{variant:"large",children:[d.jsx(m.Skeleton,{height:76,width:76}),d.jsxs(m.PreviewContent,{children:[d.jsx(m.Skeleton,{height:24,width:168}),d.jsx(m.Skeleton,{height:24,width:240,sx:{marginTop:4}}),d.jsx(m.Skeleton,{height:16,width:144})]})]})}function xEe(e){const{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=Xe.useDebounceState({initialState:""}),a=xe();return d.jsx(m.Dialog,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:d.jsx(m.DialogContent,{children:d.jsxs(m.Box,{flexDirection:"column",height:"100%",children:[d.jsxs(m.Box,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[d.jsx(m.FormSearchInput,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),d.jsx(m.Text,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(nC,{message:"There was an error while fetching your catalog items."}),children:d.jsx(R.Suspense,{fallback:d.jsxs(m.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[d.jsx(el,{}),d.jsx(el,{}),d.jsx(el,{}),d.jsx(el,{}),d.jsx(el,{})]}),children:d.jsx($Ee,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):d.jsx(nC,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function wEe(e){const{isLoading:t}=e;return d.jsx(m.Toast,{anchor:d.jsx(m.Box,{position:"relative",width:"100%",justifyContent:"center",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more results ...",seconds:1})}function $Ee(e){const{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=R.useTransition(),{items:a,hasNextPage:u,fetchNextPage:s}=bEe({catalogId:t,searchTerm:n});return d.jsxs(d.Fragment,{children:[d.jsx(m.ScrollArea,{onScrollToBottom:()=>u&&o(s),style:{flexGrow:1,paddingTop:m.theme.space[10],paddingBottom:m.theme.space[16],paddingInline:m.theme.space[16],display:"flex",flexDirection:"column",gap:m.theme.space[12]},threshold:252,children:a.length===0?d.jsx(nC,{}):a.map(c=>d.jsx(OR,{item:c,catalogId:t,onClick:()=>r(c)},c.id))}),d.jsx(wEe,{isLoading:i})]})}function nC(e){const{message:t="We can't find any items matching your search"}=e,n="Oops!";return d.jsx(m.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:d.jsxs(m.BlankSlate,{children:[d.jsx(m.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(m.BlankSlateTitle,{size:"big",children:n}),d.jsx(m.BlankSlateDescription,{width:360,children:t})]})})}function EEe(e){const{itemId:t,item:n}=e,r=xe();return t&&n&&n.id===t?d.jsx(tl,{...e,value:n.title}):t&&r.integrationFields?d.jsx(m.ErrorBoundary,{renderError:()=>d.jsx(tl,{...e,value:t}),children:d.jsx(R.Suspense,{fallback:d.jsx(tl,{...e,value:t}),children:d.jsx(FEe,{...e,itemId:t})},t)},t):t&&!r.integrationFields?d.jsx(tl,{...e,value:t}):d.jsx(tl,{...e,value:""})}function REe(e){const{catalogId:t,itemId:n,item:r}=e,i=xe();return n&&r&&r.id===n?d.jsx(m.FieldFooter,{children:d.jsx(OR,{catalogId:t,item:r})}):n&&i.integrationFields?d.jsx(m.ErrorBoundary,{renderError:()=>null,children:d.jsx(m.FieldFooter,{children:d.jsx(R.Suspense,{fallback:d.jsx(el,{}),children:d.jsx(OEe,{catalogId:t,itemId:n})},n)})},n):null}function OEe(e){const{itemId:t,catalogId:n}=e,{item:r}=y7({catalogId:n,itemId:t});return d.jsx(OR,{catalogId:n,item:r})}function tl(e){const{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return d.jsx(Vu,{id:t,placeholder:Qu(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:d.jsx(m.Button,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function FEe(e){const{itemId:t,catalogId:n}=e,{item:r}=y7({catalogId:n,itemId:t});return d.jsx(tl,{...e,value:r.title})}function MEe(e){var A;const{id:t,field:n,content:r,readOnly:i,onContentChange:o}=e,[a,u]=R.useState(!1),[s,c]=R.useState(),l=(A=n.config)==null?void 0:A.catalog;if(!l)return null;function f(h){o({value:h.id,__TYPE__:"IntegrationFieldsContent"}),c(h),u(!1)}function p(){o(void 0),c(void 0)}return d.jsxs(d.Fragment,{children:[d.jsxs(m.Field,{footer:d.jsx(REe,{catalogId:l,item:s,itemId:r==null?void 0:r.value}),children:[d.jsx(m.FieldIcon,{name:"multipleStop"}),d.jsx(m.FieldLabel,{htmlFor:t,children:er(n)}),d.jsx(m.FieldControl,{children:d.jsx(EEe,{id:t,field:n,readOnly:i,catalogId:l,item:s,itemId:r==null?void 0:r.value,onFocus:()=>u(!0),onClearItem:p})})]}),d.jsx(xEe,{open:a,onOpenChange:u,catalogId:l,onSelectItem:f})]})}function kEe(e){const{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"notes"}),d.jsx(m.FieldLabel,{htmlFor:r,children:er(n)}),d.jsx(m.FieldControl,{children:d.jsx(m.TextArea,{id:r,placeholder:Qu(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(t==null?void 0:t.value)??"",onChange:a=>{i(LEe(a))}})})]})}function LEe(e){return e.length===0?void 0:{__TYPE__:"FieldContent",type:"Text",value:e}}const jEe=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var u,s;const o=Number(e==null?void 0:e.value),a=Number.isFinite(o)?o:void 0;return d.jsxs(m.Field,{children:[d.jsx(m.FieldIcon,{name:"pin"}),d.jsx(m.FieldLabel,{htmlFor:n,children:er(t)}),d.jsx(m.FieldControl,{children:d.jsx(m.NumberInput,{id:n,value:a,min:(u=t.config)==null?void 0:u.min,max:(s=t.config)==null?void 0:s.max,padding:e7,placeholder:Qu(t),readOnly:i,onValueChange:c=>r(UEe(c))})})]})};function UEe(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(e)}}function fn(e){this.content=e}fn.prototype={constructor:fn,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new fn(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new fn(n)},addToStart:function(e,t){return new fn([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new fn(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new fn(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=fn.from(e),e.size?new fn(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=fn.from(e),e.size?new fn(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=fn.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};fn.from=function(e){if(e instanceof fn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new fn(t)};function b7(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let a=0;i.text[a]==o.text[a];a++)n++;return n}if(i.content.size||o.content.size){let a=b7(i.content,o.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function C7(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let a=e.child(--i),u=t.child(--o),s=a.nodeSize;if(a==u){n-=s,r-=s;continue}if(!a.sameMarkup(u))return{a:n,b:r};if(a.isText&&a.text!=u.text){let c=0,l=Math.min(a.text.length,u.text.length);for(;c<l&&a.text[a.text.length-c-1]==u.text[u.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||u.content.size){let c=C7(a.content,u.content,n-1,r-1);if(c)return c}n-=s,r-=s}}class G{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let a=0,u=0;u<n;a++){let s=this.content[a],c=u+s.nodeSize;if(c>t&&r(s,i+u,o||null,a)!==!1&&s.content.size){let l=u+1;s.nodesBetween(Math.max(0,t-l),Math.min(s.content.size,n-l),r,i+l)}u=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",a=!0;return this.nodesBetween(t,n,(u,s)=>{u.isText?(o+=u.text.slice(Math.max(t,s)-s,n-s),a=!r):u.isLeaf?(i?o+=typeof i=="function"?i(u):i:u.type.spec.leafText&&(o+=u.type.spec.leafText(u)),a=!r):!a&&u.isBlock&&(o+=r,a=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new G(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,a=0;a<n;o++){let u=this.content[o],s=a+u.nodeSize;s>t&&((a<t||s>n)&&(u.isText?u=u.cut(Math.max(0,t-a),Math.min(u.text.length,n-a)):u=u.cut(Math.max(0,t-a-1),Math.min(u.content.size,n-a-1))),r.push(u),i+=u.nodeSize),a=s}return new G(r,i)}cutByIndex(t,n){return t==n?G.empty:t==0&&n==this.content.length?this:new G(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new G(i,o)}addToStart(t){return new G([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new G(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return b7(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return C7(this,t,n,r)}findIndex(t,n=-1){if(t==0)return qh(0,t);if(t==this.size)return qh(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),a=i+o.nodeSize;if(a>=t)return a==t||n>0?qh(r+1,a):qh(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return G.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new G(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return G.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new G(n||t,r)}static from(t){if(!t)return G.empty;if(t instanceof G)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new G([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}G.empty=new G([],0);const qb={index:0,offset:0};function qh(e,t){return qb.index=e,qb.offset=t,qb}function Bm(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Bm(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Bm(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let gt=class rC{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Bm(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return rC.none;if(t instanceof rC)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};gt.none=[];class fp extends Error{}class re{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=_7(this.content,t+this.openStart,n);return r&&new re(r,this.openStart,this.openEnd)}removeBetween(t,n){return new re(S7(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return re.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new re(G.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new re(t,r,i)}}re.empty=new re(G.empty,0,0);function S7(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:u}=e.findIndex(n);if(i==t||o.isText){if(u!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(S7(o.content,t-i-1,n-i-1)))}function _7(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let u=_7(a.content,t-o-1,n);return u&&e.replaceChild(i,a.copy(u))}function BEe(e,t,n){if(n.openStart>e.depth)throw new fp("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new fp("Inconsistent open depths");return I7(e,t,n,0)}function I7(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let a=I7(e,t,n,r+1);return o.copy(o.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,u=a.content;return As(a,u.cut(0,e.parentOffset).append(n.content).append(u.cut(t.parentOffset)))}else{let{start:a,end:u}=WEe(n,e);return As(o,x7(e,a,u,t,r))}else return As(o,Wm(e,t,r))}function T7(e,t){if(!t.type.compatibleContent(e.type))throw new fp("Cannot join "+t.type.name+" onto "+e.type.name)}function iC(e,t,n){let r=e.node(n);return T7(r,t.node(n)),r}function ps(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function wd(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(ps(e.nodeAfter,r),o++));for(let u=o;u<a;u++)ps(i.child(u),r);t&&t.depth==n&&t.textOffset&&ps(t.nodeBefore,r)}function As(e,t){return e.type.checkContent(t),e.copy(t)}function x7(e,t,n,r,i){let o=e.depth>i&&iC(e,t,i+1),a=r.depth>i&&iC(n,r,i+1),u=[];return wd(null,e,i,u),o&&a&&t.index(i)==n.index(i)?(T7(o,a),ps(As(o,x7(e,t,n,r,i+1)),u)):(o&&ps(As(o,Wm(e,t,i+1)),u),wd(t,n,i,u),a&&ps(As(a,Wm(n,r,i+1)),u)),wd(r,null,i,u),new G(u)}function Wm(e,t,n){let r=[];if(wd(null,e,n,r),e.depth>n){let i=iC(e,t,n+1);ps(As(i,Wm(e,t,n+1)),r)}return wd(t,null,n,r),new G(r)}function WEe(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(G.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class dp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return gt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let u=r;r=i,i=u}let o=r.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Km(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let a=t;;){let{index:u,offset:s}=a.content.findIndex(o),c=o-s;if(r.push(a,u,i+s),!c||(a=a.child(u),a.isText))break;o=c-1,i+=s+1}return new dp(n,r,o)}static resolveCached(t,n){for(let i=0;i<Qb.length;i++){let o=Qb[i];if(o.pos==n&&o.doc==t)return o}let r=Qb[Vb]=dp.resolve(t,n);return Vb=(Vb+1)%KEe,r}}let Qb=[],Vb=0,KEe=12;class Km{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const PEe=Object.create(null);let fl=class oC{constructor(t,n,r,i=gt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||G.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Bm(this.attrs,n||t.defaultAttrs||PEe)&&gt.sameSet(this.marks,r||gt.none)}copy(t=null){return t==this.content?this:new oC(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new oC(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return re.empty;let i=this.resolve(t),o=this.resolve(n),a=r?0:i.sharedDepth(n),u=i.start(a),c=i.node(a).content.cut(i.pos-u,o.pos-u);return new re(c,i.depth-a,o.depth-a)}replace(t,n,r){return BEe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return dp.resolveCached(this,t)}resolveNoCache(t){return dp.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),w7(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=G.empty,i=0,o=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,i,o),u=a&&a.matchFragment(this.content,n);if(!u||!u.validEnd)return!1;for(let s=i;s<o;s++)if(!this.type.allowsMarks(r.child(s).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),a=o&&o.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=gt.none;for(let n=0;n<this.marks.length;n++)t=this.marks[n].addToSet(t);if(!gt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=G.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,i,r)}};fl.prototype.text=void 0;class Pm extends fl{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):w7(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Pm(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Pm(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function w7(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class ks{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new DEe(t,n);if(r.next==null)return ks.empty;let i=$7(r);r.next&&r.err("Unexpected trailing text");let o=YEe(HEe(i));return GEe(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(a,u){let s=a.matchFragment(t,r);if(s&&(!n||s.validEnd))return G.from(u.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:l,next:f}=a.next[c];if(!(l.isText||l.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let p=o(f,u.concat(l));if(p)return p}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let a=[];for(let u=i;u.type;u=u.via)a.push(u.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:u,next:s}=o.next[a];!u.isLeaf&&!u.hasRequiredAttrs()&&!(u.name in n)&&(!i.type||s.validEnd)&&(r.push({match:u.contentMatch,type:u,via:i}),n[u.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)o+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return o}).join(`
34
34
  `)}}ks.empty=new ks(!0);class DEe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function $7(e){let t=[];do t.push(NEe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function NEe(e){let t=[];do t.push(qEe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function qEe(e){let t=zEe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=QEe(e,t);else break;return t}function DF(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function QEe(e,t){let n=DF(e),r=n;return e.eat(",")&&(e.next!="}"?r=DF(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function VEe(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let a=n[o];a.groups.indexOf(t)>-1&&i.push(a)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function zEe(e){if(e.eat("(")){let t=$7(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=VEe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function HEe(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(a,u,s){let c={term:s,to:u};return t[a].push(c),c}function i(a,u){a.forEach(s=>s.to=u)}function o(a,u){if(a.type=="choice")return a.exprs.reduce((s,c)=>s.concat(o(c,u)),[]);if(a.type=="seq")for(let s=0;;s++){let c=o(a.exprs[s],u);if(s==a.exprs.length-1)return c;i(c,u=n())}else if(a.type=="star"){let s=n();return r(u,s),i(o(a.expr,s),s),[r(s)]}else if(a.type=="plus"){let s=n();return i(o(a.expr,u),s),i(o(a.expr,s),s),[r(s)]}else{if(a.type=="opt")return[r(u)].concat(o(a.expr,u));if(a.type=="range"){let s=u;for(let c=0;c<a.min;c++){let l=n();i(o(a.expr,s),l),s=l}if(a.max==-1)i(o(a.expr,s),s);else for(let c=a.min;c<a.max;c++){let l=n();r(s,l),i(o(a.expr,s),l),s=l}return[r(s)]}else{if(a.type=="name")return[r(u,void 0,a.value)];throw new Error("Unknown expr type")}}}}function E7(e,t){return t-e}function NF(e,t){let n=[];return r(t),n.sort(E7);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let a=0;a<o.length;a++){let{term:u,to:s}=o[a];!u&&n.indexOf(s)==-1&&r(s)}}}function YEe(e){let t=Object.create(null);return n(NF(e,0));function n(r){let i=[];r.forEach(a=>{e[a].forEach(({term:u,to:s})=>{if(!u)return;let c;for(let l=0;l<i.length;l++)i[l][0]==u&&(c=i[l][1]);NF(e,s).forEach(l=>{c||i.push([u,c=[]]),c.indexOf(l)==-1&&c.push(l)})})});let o=t[r.join(",")]=new ks(r.indexOf(e.length-1)>-1);for(let a=0;a<i.length;a++){let u=i[a][1].sort(E7);o.next.push({type:i[a][0],next:t[u.join(",")]||n(u)})}return o}}function GEe(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,a=[];for(let u=0;u<i.next.length;u++){let{type:s,next:c}=i.next[u];a.push(s.name),o&&!(s.isText||s.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function R7(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function O7(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function F7(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new JEe(e[n]);return t}let qF=class M7{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=F7(r.attrs),this.defaultAttrs=R7(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ks.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:O7(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new fl(this,this.computeAttrs(t),G.from(n),gt.setFrom(r))}createChecked(t=null,n,r){return n=G.from(n),this.checkContent(n),new fl(this,this.computeAttrs(t),n,gt.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=G.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(G.empty,!0);return o?new fl(this,t,n.append(o),gt.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:gt.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,a)=>r[o]=new M7(o,n,a));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class JEe{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class FR{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=F7(i.attrs),this.excluded=null;let o=R7(this.attrs);this.instance=o?new gt(this,o):null}create(t=null){return!t&&this.instance?this.instance:new gt(this,O7(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,a)=>r[o]=new FR(o,i++,n,a)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}excludes(t){return this.excluded.indexOf(t)>-1}}class ZEe{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=fn.from(t.nodes),n.marks=fn.from(t.marks||{}),this.nodes=qF.compile(this.spec.nodes,this),this.marks=FR.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],a=o.spec.content||"",u=o.spec.marks;o.contentMatch=r[a]||(r[a]=ks.parse(a,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet=u=="_"?null:u?QF(this,u.split(" ")):u==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],a=o.spec.excludes;o.excluded=a==null?[o]:a==""?[]:QF(this,a.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof qF){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new Pm(r,r.defaultAttrs,t,gt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return fl.fromJSON(this,t)}markFromJSON(t){return gt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function QF(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],a=o;if(o)n.push(o);else for(let u in e.marks){let s=e.marks[u];(i=="_"||s.spec.group&&s.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=s)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class pp{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=t.nodes[r.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new zF(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new zF(this,n,!0);return r.addAll(t,n.from,n.to),re.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(tRe(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}matchStyle(t,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let a=this.styles[o],u=a.style;if(!(u.indexOf(t)!=0||a.context&&!r.matchesContext(a.context)||u.length>t.length&&(u.charCodeAt(t.length)!=61||u.slice(t.length+1)!=n))){if(a.getAttrs){let s=a.getAttrs(n);if(s===!1)continue;a.attrs=s||void 0}return a}}}static schemaRules(t){let n=[];function r(i){let o=i.priority==null?50:i.priority,a=0;for(;a<n.length;a++){let u=n[a];if((u.priority==null?50:u.priority)<o)break}n.splice(a,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(a=>{r(a=HF(a)),a.mark||a.ignore||a.clearMark||(a.mark=i)})}for(let i in t.nodes){let o=t.nodes[i].spec.parseDOM;o&&o.forEach(a=>{r(a=HF(a)),a.node||a.ignore||a.mark||(a.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new pp(t,pp.schemaRules(t)))}}const k7={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},XEe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},L7={ol:!0,ul:!0},Dm=1,Nm=2,$d=4;function VF(e,t,n){return t!=null?(t?Dm:0)|(t==="full"?Nm:0):e&&e.whitespace=="pre"?Dm|Nm:n&~$d}class Qh{constructor(t,n,r,i,o,a,u){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=i,this.solid=o,this.options=u,this.content=[],this.activeMarks=gt.none,this.stashMarks=[],this.match=a||(u&$d?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(G.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Dm)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=G.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(G.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;n<r.length;n++){let i=r[n];(this.type?this.type.allowsMarkType(i.type):rRe(i.type,t))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!k7.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class zF{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0;let i=n.topNode,o,a=VF(null,n.preserveWhitespace,0)|(r?$d:0);i?o=new Qh(i.type,i.attrs,gt.none,gt.none,!0,n.topMatch||i.type.contentMatch,a):r?o=new Qh(null,null,gt.none,gt.none,!0,null,a):o=new Qh(t.schema.topNodeType,null,gt.none,gt.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){if(t.nodeType==3)this.addTextNode(t);else if(t.nodeType==1){let n=t.getAttribute("style");if(!n)this.addElement(t);else{let r=this.readStyles(nRe(n));if(!r)return;let[i,o]=r,a=this.top;for(let u=0;u<o.length;u++)this.removePendingMark(o[u],a);for(let u=0;u<i.length;u++)this.addPendingMark(i[u]);this.addElement(t);for(let u=0;u<i.length;u++)this.removePendingMark(i[u],a);for(let u=0;u<o.length;u++)this.addPendingMark(o[u])}}}addTextNode(t){let n=t.nodeValue,r=this.top;if(r.options&Nm||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(r.options&Dm)r.options&Nm?n=n.replace(/\r\n?/g,`
35
35
  `):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],o=t.previousSibling;(!i||o&&o.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(t)}else this.findInside(t)}addElement(t,n){let r=t.nodeName.toLowerCase(),i;L7.hasOwnProperty(r)&&this.parser.normalizeLists&&eRe(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(i=this.parser.matchTag(t,this,n));if(o?o.ignore:XEe.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let a,u=this.top,s=this.needsBlock;if(k7.hasOwnProperty(r))u.content.length&&u.content[0].isInline&&this.open&&(this.open--,u=this.top),a=!0,u.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t);return}this.addAll(t),a&&this.sync(u),this.needsBlock=s}else this.addElementByRule(t,o,o.consuming===!1?i:void 0)}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
36
36
  `))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=gt.none,r=gt.none;e:for(let i=0;i<t.length;i+=2)for(let o=void 0;;){let a=this.parser.matchStyle(t[i],t[i+1],this,o);if(!a)continue e;if(a.ignore)return null;if(a.clearMark?this.top.pendingMarks.forEach(u=>{a.clearMark(u)&&(r=u.addToSet(r))}):n=this.parser.schema.marks[a.mark].create(a.attrs).addToSet(n),a.consuming===!1)o=a;else break}return[n,r]}addElementByRule(t,n,r){let i,o,a;n.node?(o=this.parser.schema.nodes[n.node],o.isLeaf?this.insertNode(o.create(n.attrs))||this.leafFallback(t):i=this.enter(o,n.attrs||null,n.preserveWhitespace)):(a=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(a));let u=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(s=>this.insertNode(s));else{let s=t;typeof n.contentElement=="string"?s=t.querySelector(n.contentElement):typeof n.contentElement=="function"?s=n.contentElement(t):n.contentElement&&(s=n.contentElement),this.findAround(t,s,!0),this.addAll(s)}i&&this.sync(u)&&this.open--,a&&this.removePendingMark(a,u)}addAll(t,n,r){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,a=r==null?null:t.childNodes[r];o!=a;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o);this.findAtPoint(t,i)}findPlace(t){let n,r;for(let i=this.open;i>=0;i--){let o=this.nodes[i],a=o.findWrapping(t);if(a&&(!n||n.length>a.length)&&(n=a,r=o,!a.length)||o.solid)break}if(!n)return!1;this.sync(r);for(let i=0;i<n.length;i++)this.enterInner(n[i],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(t)){this.closeExtra();let n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));let r=n.activeMarks;for(let i=0;i<t.marks.length;i++)(!n.type||n.type.allowsMarkType(t.marks[i].type))&&(r=t.marks[i].addToSet(r));return n.content.push(t.mark(r)),!0}return!1}enter(t,n,r){let i=this.findPlace(t.create(n));return i&&this.enterInner(t,n,!0,r),i}enterInner(t,n=null,r=!1,i){this.closeExtra();let o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t);let a=VF(t,i,o.options);o.options&$d&&o.content.length==0&&(a|=$d),this.nodes.push(new Qh(t,n,o.activeMarks,o.pendingMarks,r,null,a)),this.open++}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),a=(u,s)=>{for(;u>=0;u--){let c=n[u];if(c==""){if(u==n.length-1||u==0)continue;for(;s>=o;s--)if(a(u-1,s))return!0;return!1}else{let l=s>0||s==0&&i?this.nodes[s].type:r&&s>=o?r.node(s-o).type:null;if(!l||l.name!=c&&l.groups.indexOf(c)==-1)return!1;s--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=iRe(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(t)>-1)i.pendingMarks=t.removeFromSet(i.pendingMarks);else{i.activeMarks=t.removeFromSet(i.activeMarks);let a=i.popFromStashMark(t);a&&i.type&&i.type.allowsMarkType(a.type)&&(i.activeMarks=a.addToSet(i.activeMarks))}if(i==n)break}}}function eRe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&L7.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function tRe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function nRe(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function HF(e){let t={};for(let n in e)t[n]=e[n];return t}function rRe(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],a=u=>{o.push(u);for(let s=0;s<u.edgeCount;s++){let{type:c,next:l}=u.edge(s);if(c==t||o.indexOf(l)<0&&a(l))return!0}};if(a(i.contentMatch))return!0}}function iRe(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}class as{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=zb(n).createDocumentFragment());let i=r,o=[];return t.forEach(a=>{if(o.length||a.marks.length){let u=0,s=0;for(;u<o.length&&s<a.marks.length;){let c=a.marks[s];if(!this.marks[c.type.name]){s++;continue}if(!c.eq(o[u][0])||c.type.spec.spanning===!1)break;u++,s++}for(;u<o.length;)i=o.pop()[1];for(;s<a.marks.length;){let c=a.marks[s++],l=this.serializeMark(c,a.isInline,n);l&&(o.push([c,i]),i.appendChild(l.dom),i=l.contentDOM||l.dom)}}i.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=as.renderSpec(zb(n),this.nodes[t.type.name](t));if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&as.renderSpec(zb(r),i(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let i=n[0],o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let a,u=r?t.createElementNS(r,i):t.createElement(i),s=n[1],c=1;if(s&&typeof s=="object"&&s.nodeType==null&&!Array.isArray(s)){c=2;for(let l in s)if(s[l]!=null){let f=l.indexOf(" ");f>0?u.setAttributeNS(l.slice(0,f),l.slice(f+1),s[l]):u.setAttribute(l,s[l])}}for(let l=c;l<n.length;l++){let f=n[l];if(f===0){if(l<n.length-1||l>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}else{let{dom:p,contentDOM:A}=as.renderSpec(t,f,r);if(u.appendChild(p),A){if(a)throw new RangeError("Multiple content holes");a=A}}}return{dom:u,contentDOM:a}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new as(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=YF(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return YF(t.marks)}}function YF(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function zb(e){return e.document||window.document}const j7=65535,U7=Math.pow(2,16);function oRe(e,t){return e+t*U7}function GF(e){return e&j7}function aRe(e){return(e-(e&j7))/U7}const B7=1,W7=2,em=4,K7=8;let aC=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&K7)>0}get deletedBefore(){return(this.delInfo&(B7|em))>0}get deletedAfter(){return(this.delInfo&(W7|em))>0}get deletedAcross(){return(this.delInfo&em)>0}},Ml=class nl{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&nl.empty)return nl.empty}recover(t){let n=0,r=GF(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+aRe(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,a=this.inverted?1:2;for(let u=0;u<this.ranges.length;u+=3){let s=this.ranges[u]-(this.inverted?i:0);if(s>t)break;let c=this.ranges[u+o],l=this.ranges[u+a],f=s+c;if(t<=f){let p=c?t==s?-1:t==f?1:n:n,A=s+i+(p<0?0:l);if(r)return A;let h=t==(n<0?s:f)?null:oRe(u/3,t-s),v=t==s?W7:t==f?B7:em;return(n<0?t!=s:t!=f)&&(v|=K7),new aC(A,v,h)}i+=l-c}return r?t+i:new aC(t+i,0,null)}touches(t,n){let r=0,i=GF(n),o=this.inverted?2:1,a=this.inverted?1:2;for(let u=0;u<this.ranges.length;u+=3){let s=this.ranges[u]-(this.inverted?r:0);if(s>t)break;let c=this.ranges[u+o],l=s+c;if(t<=l&&u==i*3)return!0;r+=this.ranges[u+a]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let a=this.ranges[i],u=a-(this.inverted?o:0),s=a+(this.inverted?0:o),c=this.ranges[i+n],l=this.ranges[i+r];t(u,u+c,s,s+l),o+=l-c}}invert(){return new nl(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?nl.empty:new nl(t<0?[0,-t,0]:[0,0,t])}};Ml.empty=new Ml([]);class Ed{constructor(t=[],n,r=0,i=t.length){this.maps=t,this.mirror=n,this.from=r,this.to=i}slice(t=0,n=this.maps.length){return new Ed(this.maps,this.mirror,t,n)}copy(){return new Ed(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,n){this.to=this.maps.push(t),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(t){for(let n=0,r=this.maps.length;n<t.maps.length;n++){let i=t.getMirror(n);this.appendMap(t.maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this.maps.length+t.maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t.maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Ed;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let o=this.from;o<this.to;o++){let a=this.maps[o],u=a.mapResult(t,n);if(u.recover!=null){let s=this.getMirror(o);if(s!=null&&s>o&&s<this.to){o=s,t=this.maps[s].recover(u.recover);continue}}i|=u.delInfo,t=u.pos}return r?t:new aC(t,i,null)}}const Hb=Object.create(null);let yr=class{getMap(){return Ml.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Hb[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Hb)throw new RangeError("Duplicate use of step JSON ID "+t);return Hb[t]=n,n.prototype.jsonID=t,n}},ir=class bd{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new bd(t,null)}static fail(t){return new bd(null,t)}static fromReplace(t,n,r,i){try{return bd.ok(t.replace(n,r,i))}catch(o){if(o instanceof fp)return bd.fail(o.message);throw o}}};function MR(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(MR(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return G.fromArray(r)}let P7=class Cd extends yr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new re(MR(n.content,(a,u)=>!a.isAtom||!u.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),i),n.openStart,n.openEnd);return ir.fromReplace(t,this.from,this.to,o)}invert(){return new D7(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Cd(n.pos,r.pos,this.mark)}merge(t){return t instanceof Cd&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Cd(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Cd(n.from,n.to,t.markFromJSON(n.mark))}};yr.jsonID("addMark",P7);let D7=class Sd extends yr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new re(MR(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return ir.fromReplace(t,this.from,this.to,r)}invert(){return new P7(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Sd(n.pos,r.pos,this.mark)}merge(t){return t instanceof Sd&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Sd(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Sd(n.from,n.to,t.markFromJSON(n.mark))}};yr.jsonID("removeMark",D7);let N7=class _d extends yr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return ir.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return ir.fromReplace(t,this.pos,this.pos+1,new re(G.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new _d(this.pos,n.marks[i]);return new _d(this.pos,this.mark)}}return new q7(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new _d(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new _d(n.pos,t.markFromJSON(n.mark))}};yr.jsonID("addNodeMark",N7);let q7=class uC extends yr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return ir.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return ir.fromReplace(t,this.pos,this.pos+1,new re(G.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new N7(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new uC(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new uC(n.pos,t.markFromJSON(n.mark))}};yr.jsonID("removeNodeMark",q7);let Ch=class es extends yr{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&sC(t,this.from,this.to)?ir.fail("Structure replace would overwrite content"):ir.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Ml([this.from,this.to-this.from,this.slice.size])}invert(t){return new es(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new es(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof es)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?re.empty:new re(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new es(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?re.empty:new re(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new es(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new es(n.from,n.to,re.fromJSON(t,n.slice),!!n.structure)}};yr.jsonID("replace",Ch);let ra=class tm extends yr{constructor(t,n,r,i,o,a,u=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=a,this.structure=u}apply(t){if(this.structure&&(sC(t,this.from,this.gapFrom)||sC(t,this.gapTo,this.to)))return ir.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return ir.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?ir.fromReplace(t,this.from,this.to,r):ir.fail("Content does not fit in gap")}getMap(){return new Ml([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new tm(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new tm(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new tm(n.from,n.to,n.gapFrom,n.gapTo,re.fromJSON(t,n.slice),n.insert,!!n.structure)}};yr.jsonID("replaceAround",ra);function sC(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let a=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function uRe(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Sh(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let i=e.$from.node(r),o=e.$from.index(r),a=e.$to.indexAfter(r);if(r<e.depth&&i.canReplace(o,a,n))return r;if(r==0||i.type.spec.isolating||!uRe(i,o,a))break}return null}function Q7(e,t,n=null,r=e){let i=sRe(e,t),o=i&&cRe(r,t);return o?i.map(JF).concat({type:t,attrs:n}).concat(o.map(JF)):null}function JF(e){return{type:e,attrs:null}}function sRe(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let a=o.length?o[0]:t;return n.canReplaceWith(r,i,a)?o:null}function cRe(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),a=t.contentMatch.findWrapping(o.type);if(!a)return null;let s=(a.length?a[a.length-1]:t).contentMatch;for(let c=r;s&&c<i;c++)s=s.matchType(n.child(c).type);return!s||!s.validEnd?null:a}function V7(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,l=n-2;c>o;c--,l--){let f=i.node(c),p=i.index(c);if(f.type.spec.isolating)return!1;let A=f.content.cutByIndex(p,f.childCount),h=r&&r[l+1];h&&(A=A.replaceChild(0,h.type.create(h.attrs)));let v=r&&r[l]||f;if(!f.canReplace(p+1,f.childCount)||!v.type.validContent(A))return!1}let u=i.indexAfter(o),s=r&&r[0];return i.node(o).canReplaceWith(u,u,s?s.type:i.node(o+1).type)}function _h(e,t){let n=e.resolve(t),r=n.index();return z7(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function z7(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function H7(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,a,u=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),u++,a=r.node(i).maybeChild(u)):(o=r.node(i).maybeChild(u-1),a=r.node(i+1)),o&&!o.isTextblock&&z7(o,a)&&r.node(i).canReplace(u,u+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function lRe(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let a=r.depth;a>=0;a--){let u=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,s=r.index(a)+(u>0?1:0),c=r.node(a),l=!1;if(o==1)l=c.canReplace(s,s,i);else{let f=c.contentMatchAt(s).findWrapping(i.firstChild.type);l=f&&c.canReplaceWith(s,s,f[0])}if(l)return u==0?r.pos:u<0?r.before(a+1):r.after(a+1)}return null}function kR(e,t,n=t,r=re.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return fRe(i,o,r)?new Ch(t,n,r):new dRe(i,o,r).fit()}function fRe(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class dRe{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=G.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=G.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,a=r.depth,u=i.depth;for(;a&&u&&o.childCount==1;)o=o.firstChild.content,a--,u--;let s=new re(o,a,u);return t>-1?new ra(r.pos,t,this.$to.pos,this.$to.end(),s,n):s.size||r.pos!=this.$to.pos?new Ch(r.pos,i.pos,s):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Yb(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let a=i.firstChild;for(let u=this.depth;u>=0;u--){let{type:s,match:c}=this.frontier[u],l,f=null;if(n==1&&(a?c.matchType(a.type)||(f=c.fillBefore(G.from(a),!1)):o&&s.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:u,parent:o,inject:f};if(n==2&&a&&(l=c.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:u,parent:o,wrap:l};if(o&&c.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Yb(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new re(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Yb(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new re(Id(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new re(Id(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let v=0;v<o.length;v++)this.openFrontierNode(o[v]);let a=this.unplaced,u=r?r.content:a.content,s=a.openStart-t,c=0,l=[],{match:f,type:p}=this.frontier[n];if(i){for(let v=0;v<i.childCount;v++)l.push(i.child(v));f=f.matchFragment(i)}let A=u.size+t-(a.content.size-a.openEnd);for(;c<u.childCount;){let v=u.child(c),_=f.matchType(v.type);if(!_)break;c++,(c>1||s==0||v.content.size)&&(f=_,l.push(Y7(v.mark(p.allowedMarks(v.marks)),c==1?s:0,c==u.childCount?A:-1)))}let h=c==u.childCount;h||(A=-1),this.placed=Td(this.placed,n,G.from(l)),this.frontier[n].match=f,h&&A<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,_=u;v<A;v++){let S=_.lastChild;this.frontier.push({type:S.type,match:S.contentMatchAt(S.childCount)}),_=S.content}this.unplaced=h?t==0?re.empty:new re(Id(a.content,t-1,1),t-1,A<0?a.openEnd:t-1):new re(Id(a.content,t,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!Gb(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),a=Gb(t,n,i,r,o);if(a){for(let u=n-1;u>=0;u--){let{match:s,type:c}=this.frontier[u],l=Gb(t,u,c,s,!0);if(!l||l.childCount)continue e}return{depth:n,fit:a,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Td(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Td(this.placed,this.depth,G.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(G.empty,!0);n.childCount&&(this.placed=Td(this.placed,this.frontier.length,n))}}function Id(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Id(e.firstChild.content,t-1,n)))}function Td(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Td(e.lastChild.content,t-1,n)))}function Yb(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Y7(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Y7(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(G.empty,!0)))),e.copy(r)}function Gb(e,t,n,r,i){let o=e.node(t),a=i?e.indexAfter(t):e.index(t);if(a==o.childCount&&!n.compatibleContent(o.type))return null;let u=r.fillBefore(o.content,!0,a);return u&&!pRe(n,o.content,a)?u:null}function pRe(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}let ARe=class nm extends yr{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return ir.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return ir.fromReplace(t,this.pos,this.pos+1,new re(G.from(i),0,n.isLeaf?0:1))}getMap(){return Ml.empty}invert(t){return new nm(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new nm(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new nm(n.pos,n.attr,n.value)}};yr.jsonID("attr",ARe);let Ap=class extends Error{};Ap=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Ap.prototype=Object.create(Error.prototype);Ap.prototype.constructor=Ap;Ap.prototype.name="TransformError";const Jb=Object.create(null);class Qe{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new hRe(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=re.empty){let r=n.content.lastChild,i=null;for(let u=0;u<n.openEnd;u++)i=r,r=r.lastChild;let o=t.steps.length,a=this.ranges;for(let u=0;u<a.length;u++){let{$from:s,$to:c}=a[u],l=t.mapping.slice(o);t.replaceRange(l.map(s.pos),l.map(c.pos),u?re.empty:n),u==0&&eM(t,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:a,$to:u}=i[o],s=t.mapping.slice(r),c=s.map(a.pos),l=s.map(u.pos);o?t.deleteRange(c,l):(t.replaceRangeWith(c,l,n),eM(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new Ke(t):rl(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let o=t.depth-1;o>=0;o--){let a=n<0?rl(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):rl(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,r);if(a)return a}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Ti(t.node(0))}static atStart(t){return rl(t,t,0,0,1)||new Ti(t)}static atEnd(t){return rl(t,t,t.content.size,t.childCount,-1)||new Ti(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Jb[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Jb)throw new RangeError("Duplicate use of selection JSON ID "+t);return Jb[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Ke.between(this.$anchor,this.$head).getBookmark()}}Qe.prototype.visible=!0;class hRe{constructor(t,n){this.$from=t,this.$to=n}}let ZF=!1;function XF(e){!ZF&&!e.parent.inlineContent&&(ZF=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ke extends Qe{constructor(t,n=t){XF(t),XF(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Qe.near(r);let i=t.resolve(n.map(this.anchor));return new Ke(i.parent.inlineContent?i:r,r)}replace(t,n=re.empty){if(super.replace(t,n),n==re.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Ke&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new D0(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ke(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let o=Qe.findFrom(n,r,!0)||Qe.findFrom(n,-r,!0);if(o)n=o.$head;else return Qe.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(Qe.findFrom(t,-r,!0)||Qe.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new Ke(t,n)}}Qe.jsonID("text",Ke);class D0{constructor(t,n){this.anchor=t,this.head=n}map(t){return new D0(t.map(this.anchor),t.map(this.head))}resolve(t){return Ke.between(t.resolve(this.anchor),t.resolve(this.head))}}class me extends Qe{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=t.resolve(i);return r?Qe.near(o):new me(o)}content(){return new re(G.from(this.node),0,0)}eq(t){return t instanceof me&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new LR(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new me(t.resolve(n.anchor))}static create(t,n){return new me(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}me.prototype.visible=!1;Qe.jsonID("node",me);class LR{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new D0(r,r):new LR(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&me.isSelectable(r)?new me(n):Qe.near(n)}}class Ti extends Qe{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=re.empty){if(n==re.empty){t.delete(0,t.doc.content.size);let r=Qe.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new Ti(t)}map(t){return new Ti(t)}eq(t){return t instanceof Ti}getBookmark(){return mRe}}Qe.jsonID("all",Ti);const mRe={map(){return this},resolve(e){return new Ti(e)}};function rl(e,t,n,r,i,o=!1){if(t.inlineContent)return Ke.create(e,n);for(let a=r-(i>0?0:1);i>0?a<t.childCount:a>=0;a+=i){let u=t.child(a);if(u.isAtom){if(!o&&me.isSelectable(u))return me.create(e,n-(i<0?u.nodeSize:0))}else{let s=rl(e,u,n+i,i<0?u.childCount:0,i,o);if(s)return s}n+=u.nodeSize*i}return null}function eM(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Ch||i instanceof ra))return;let o=e.mapping.maps[r],a;o.forEach((u,s,c,l)=>{a==null&&(a=l)}),e.setSelection(Qe.near(e.doc.resolve(a),n))}function tM(e,t){return!t||!e?e:e.bind(t)}class Vh{constructor(t,n,r){this.name=t,this.init=tM(n.init,r),this.apply=tM(n.apply,r)}}new Vh("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Vh("selection",{init(e,t){return e.selection||Qe.atStart(t.doc)},apply(e){return e.selection}}),new Vh("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Vh("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}});function G7(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=G7(i,t,{})),n[r]=i}return n}class Nr{constructor(t){this.spec=t,this.props={},t.props&&G7(t.props,this,this.props),this.key=t.key?t.key.key:J7("plugin")}getState(t){return t[this.key]}}const Zb=Object.create(null);function J7(e){return e in Zb?e+"$"+ ++Zb[e]:(Zb[e]=0,e+"$")}class Gi{constructor(t="key"){this.key=J7(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Uc=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Z7=function(e,t,n,r){return n&&(nM(e,t,n,r,-1)||nM(e,t,n,r,1))},gRe=/^(img|br|input|textarea|hr)$/i;function nM(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:qm(e))){let o=e.parentNode;if(!o||o.nodeType!=1||jR(e)||gRe.test(e.nodeName)||e.contentEditable=="false")return!1;t=Uc(e)+(i<0?0:1),e=o}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?qm(e):0}else return!1}}function qm(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function vRe(e,t,n){for(let r=t==0,i=t==qm(e);r||i;){if(e==n)return!0;let o=Uc(e);if(e=e.parentNode,!e)return!1;r=r&&o==0,i=i&&o==qm(e)}}function jR(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const X7=function(e){return e.focusNode&&Z7(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function e8(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const lo=typeof navigator<"u"?navigator:null,rM=typeof document<"u"?document:null,zu=lo&&lo.userAgent||"",cC=/Edge\/(\d+)/.exec(zu),t8=/MSIE \d/.exec(zu),lC=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zu),Ih=!!(t8||lC||cC),n8=t8?document.documentMode:lC?+lC[1]:cC?+cC[1]:0,N0=!Ih&&/gecko\/(\d+)/i.test(zu);N0&&+(/Firefox\/(\d+)/.exec(zu)||[0,0])[1];const fC=!Ih&&/Chrome\/(\d+)/.exec(zu),Bc=!!fC,yRe=fC?+fC[1]:0,Wc=!Ih&&!!lo&&/Apple Computer/.test(lo.vendor),UR=Wc&&(/Mobile\/\w+/.test(zu)||!!lo&&lo.maxTouchPoints>2),Hr=UR||(lo?/Mac/.test(lo.platform):!1),bRe=lo?/Win/.test(lo.platform):!1,Th=/Android \d/.test(zu),BR=!!rM&&"webkitFontSmoothing"in rM.documentElement.style,CRe=BR?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function SRe(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&i.size==0,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let u=r.resolve(a),s,c;if(X7(n)){for(s=u;i&&!i.node;)i=i.parent;let l=i.node;if(i&&l.isAtom&&me.isSelectable(l)&&i.parent&&!(l.isInline&&vRe(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;c=new me(a==f?u:r.resolve(f))}}else{let l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null;s=r.resolve(l)}if(!c){let l=t=="pointer"||e.state.selection.head<u.pos&&!o?1:-1;c=i8(e,s,u,l)}return c}function r8(e){return e.editable?e.hasFocus():xRe(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function WR(e,t=!1){let n=e.state.selection;if(TRe(e,n),!!r8(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Bc){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Z7(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)IRe(e);else{let{anchor:r,head:i}=n,o,a;iM&&!(n instanceof Ke)&&(n.$from.parent.inlineContent||(o=oM(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=oM(e,n.to))),e.docView.setSelection(r,i,e.root,t),iM&&(o&&aM(o),a&&aM(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&_Re(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const iM=Wc||Bc&&yRe<63;function oM(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Wc&&i&&i.contentEditable=="false")return Xb(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return Xb(i);if(o)return Xb(o)}}function Xb(e){return e.contentEditable="true",Wc&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function aM(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function _Re(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!r8(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function IRe(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setEnd(r.parentNode,Uc(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&Ih&&n8<=11&&(r.disabled=!0,r.disabled=!1)}function TRe(e,t){if(t instanceof me){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(uM(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else uM(e)}function uM(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function i8(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||Ke.between(t,n,r)}function xRe(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function dC(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&Qe.findFrom(o,t)}function Ha(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function sM(e,t,n){let r=e.state.selection;if(r instanceof Ke)if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let a=e.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return Ha(e,new Ke(r.$anchor,a))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=dC(e.state,t);return i&&i instanceof me?Ha(e,i):!1}else if(!(Hr&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,a;if(!o||o.isText)return!1;let u=t<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(a=e.docView.descAt(u))&&!a.contentDOM?me.isSelectable(o)?Ha(e,new me(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):BR?Ha(e,new Ke(e.state.doc.resolve(t<0?u:u+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof me&&r.node.isInline)return Ha(e,new Ke(t>0?r.$to:r.$from));{let i=dC(e.state,t);return i?Ha(e,i):!1}}}function Qm(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Rd(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Gc(e,t){return t<0?wRe(e):$Re(e)}function wRe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,a=!1;for(N0&&n.nodeType==1&&r<Qm(n)&&Rd(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let u=n.childNodes[r-1];if(Rd(u,-1))i=n,o=--r;else if(u.nodeType==3)n=u,r=n.nodeValue.length;else break}}else{if(o8(n))break;{let u=n.previousSibling;for(;u&&Rd(u,-1);)i=n.parentNode,o=Uc(u),u=u.previousSibling;if(u)n=u,r=Qm(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?pC(e,n,r):i&&pC(e,i,o)}function $Re(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=Qm(n),o,a;for(;;)if(r<i){if(n.nodeType!=1)break;let u=n.childNodes[r];if(Rd(u,1))o=n,a=++r;else break}else{if(o8(n))break;{let u=n.nextSibling;for(;u&&Rd(u,1);)o=u.parentNode,a=Uc(u)+1,u=u.nextSibling;if(u)n=u,r=0,i=Qm(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}o&&pC(e,o,a)}function o8(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function ERe(e,t){for(;e&&t==e.childNodes.length&&!jR(e);)t=Uc(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function RRe(e,t){for(;e&&!t&&!jR(e);)t=Uc(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function pC(e,t,n){if(t.nodeType!=3){let o,a;(a=ERe(t,n))?(t=a,n=0):(o=RRe(t,n))&&(t=o,n=o.nodeValue.length)}let r=e.domSelection();if(X7(r)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&WR(e)},50)}function cM(e,t){let n=e.state.doc.resolve(t);if(!(Bc||bRe)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let o=e.coordsAtPos(t-1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(t<n.end()){let o=e.coordsAtPos(t+1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function lM(e,t,n){let r=e.state.selection;if(r instanceof Ke&&!r.empty||n.indexOf("s")>-1||Hr&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let a=dC(e.state,t);if(a&&a instanceof me)return Ha(e,a)}if(!i.parent.inlineContent){let a=t<0?i:o,u=r instanceof Ti?Qe.near(a,t):Qe.findFrom(a,t);return u?Ha(e,u):!1}return!1}function fM(e,t){if(!(e.state.selection instanceof Ke))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let a=e.state.tr;return t<0?a.delete(n.pos-o.nodeSize,n.pos):a.delete(n.pos,n.pos+o.nodeSize),e.dispatch(a),!0}return!1}function dM(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function ORe(e){if(!Wc||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;dM(e,r,"true"),setTimeout(()=>dM(e,r,"false"),20)}return!1}function FRe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function MRe(e,t){let n=t.keyCode,r=FRe(t);if(n==8||Hr&&n==72&&r=="c")return fM(e,-1)||Gc(e,-1);if(n==46&&!t.shiftKey||Hr&&n==68&&r=="c")return fM(e,1)||Gc(e,1);if(n==13||n==27)return!0;if(n==37||Hr&&n==66&&r=="c"){let i=n==37?cM(e,e.state.selection.from)=="ltr"?-1:1:-1;return sM(e,i,r)||Gc(e,i)}else if(n==39||Hr&&n==70&&r=="c"){let i=n==39?cM(e,e.state.selection.from)=="ltr"?1:-1:1;return sM(e,i,r)||Gc(e,i)}else{if(n==38||Hr&&n==80&&r=="c")return lM(e,-1,r)||Gc(e,-1);if(n==40||Hr&&n==78&&r=="c")return ORe(e)||lM(e,1,r)||Gc(e,1);if(r==(Hr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function a8(e,t){e.someProp("transformCopied",A=>{t=A(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let A=r.firstChild;n.push(A.type.name,A.attrs!=A.type.defaultAttrs?A.attrs:null),r=A.content}let a=e.someProp("clipboardSerializer")||as.fromSchema(e.state.schema),u=d8(),s=u.createElement("div");s.appendChild(a.serializeFragment(r,{document:u}));let c=s.firstChild,l,f=0;for(;c&&c.nodeType==1&&(l=f8[c.nodeName.toLowerCase()]);){for(let A=l.length-1;A>=0;A--){let h=u.createElement(l[A]);for(;s.firstChild;)h.appendChild(s.firstChild);s.appendChild(h),f++}c=s.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`);let p=e.someProp("clipboardTextSerializer",A=>A(t,e))||t.content.textBetween(0,t.content.size,`