@myissue/vue-website-page-builder 3.5.0 → 3.5.1

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.
@@ -188,9 +188,7 @@ export declare const usePageBuilderStateStore: import('pinia').StoreDefinition<"
188
188
  image?: string | undefined;
189
189
  } | undefined;
190
190
  userSettings?: {
191
- [x: string]: unknown;
192
191
  language?: {
193
- [x: string]: unknown;
194
192
  default?: string | undefined;
195
193
  enable?: readonly string[] | undefined;
196
194
  disableLanguageDropDown?: boolean | undefined;
@@ -139,16 +139,15 @@ export interface PageBuilderConfig {
139
139
  } | null;
140
140
  userForPageBuilder?: PageBuilderUser;
141
141
  [key: string]: unknown;
142
- userSettings?: ({
142
+ userSettings?: {
143
143
  language?: {
144
144
  default?: string;
145
145
  enable?: readonly string[];
146
146
  disableLanguageDropDown?: boolean;
147
- [key: string]: unknown;
148
147
  };
149
148
  autoSave?: boolean;
150
149
  fontFamily?: string;
151
- } & Record<string, unknown>) | null;
150
+ } | null;
152
151
  settings?: {
153
152
  brandColor?: string;
154
153
  [key: string]: unknown;
@@ -5596,7 +5596,7 @@ const b4 = /* @__PURE__ */ u4("pageBuilderState", {
5596
5596
  }
5597
5597
  }), i5 = p4(), ve = b4(i5), Mr = function(r) {
5598
5598
  return !r || typeof r == "object" && r.constructor === Object && Object.keys(r).length === 0;
5599
- }, g4 = "3.5.0", x4 = { class: "pbx-w-full pbx-inset-x-0 pbx-h-[90vh] pbx-bg-white pbx-overflow-x-scroll lg:pbx-pt-2 pbx-pt-2" }, h4 = { class: "pbx-mt-4 pbx-mb-4 pbx-py-8 pbx-px-2 pbx-border pbx-border-solid pbx-border-gray-600 pbx-rounded-xl" }, f4 = { class: "pbx-flex pbx-items-left pbx-flex-col pbx-gap-1" }, y4 = { class: "pbx-myQuaternaryHeader" }, v4 = { class: "pbx-myPrimaryParagraph pbx-text-xs" }, w4 = { class: "pbx-px-2" }, S4 = { class: "pbx-mt-8" }, k4 = { class: "pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2" }, C4 = { class: "pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg" }, T4 = { class: "pbx-overflow-x-auto" }, M4 = { class: "pbx-min-w-full" }, E4 = { class: "pbx-bg-gray-50" }, L4 = {
5599
+ }, g4 = "3.5.1", x4 = { class: "pbx-w-full pbx-inset-x-0 pbx-h-[90vh] pbx-bg-white pbx-overflow-x-scroll lg:pbx-pt-2 pbx-pt-2" }, h4 = { class: "pbx-mt-4 pbx-mb-4 pbx-py-8 pbx-px-2 pbx-border pbx-border-solid pbx-border-gray-600 pbx-rounded-xl" }, f4 = { class: "pbx-flex pbx-items-left pbx-flex-col pbx-gap-1" }, y4 = { class: "pbx-myQuaternaryHeader" }, v4 = { class: "pbx-myPrimaryParagraph pbx-text-xs" }, w4 = { class: "pbx-px-2" }, S4 = { class: "pbx-mt-8" }, k4 = { class: "pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2" }, C4 = { class: "pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg" }, T4 = { class: "pbx-overflow-x-auto" }, M4 = { class: "pbx-min-w-full" }, E4 = { class: "pbx-bg-gray-50" }, L4 = {
5600
5600
  scope: "col",
5601
5601
  class: "pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"
5602
5602
  }, P4 = {
@@ -18,7 +18,7 @@ Only state can be modified.`);l[0]="$state",Wr=!1,o.set(a,l,o.state.value),Wr=!0
18
18
  state: () => new MyClass()
19
19
  Found in store "${S.$id}".`),x&&a&&t.hydrate&&t.hydrate(S.$state,x),d=!0,c=!0,S}/*! #__NO_SIDE_EFFECTS__ */function ZS(r,e,t){let o,n;const a=typeof e=="function";o=r,n=a?t:e;function l(s,p){const d=i.hasInjectionContext();if(s=(process.env.NODE_ENV==="test"&&No&&No._testing?null:s)||(d?i.inject(l2,null):null),s&&Mo(s),process.env.NODE_ENV!=="production"&&!No)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
20
20
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
21
- This will fail in production.`);s=No,s._s.has(o)||(a?Ya(o,e,n,s):C2(o,n,s),process.env.NODE_ENV!=="production"&&(l._pinia=s));const c=s._s.get(o);if(process.env.NODE_ENV!=="production"&&p){const m="__hot:"+o,b=a?Ya(m,e,n,s,!0):C2(m,Qe({},n),s,!0);p._hotUpdate(b),delete s.state.value[m],s._s.delete(m)}if(process.env.NODE_ENV!=="production"&&Kt){const m=i.getCurrentInstance();if(m&&m.proxy&&!p){const b=m.proxy,g="_pStores"in b?b._pStores:b._pStores={};g[o]=c}}return c}return l.$id=o,l}const E2=ZS("pageBuilderState",{state:()=>({componentArrayAddMethod:null,localStorageItemName:null,showModalTipTap:!1,menuRight:!0,borderStyle:null,borderWidth:null,borderColor:null,borderRadiusGlobal:null,borderRadiusTopLeft:null,borderRadiusTopRight:null,borderRadiusBottomleft:null,borderRadiusBottomRight:null,elementContainsHyperlink:null,hyperlinkAbility:null,hyperlinkInput:null,hyperlinkMessage:null,hyperlinkError:null,hyberlinkEnable:!1,openHyperlinkinkInNewTab:null,opacity:null,backgroundOpacity:null,textAreaVueModel:null,currentClasses:[],currentStyles:{},fontVerticalPadding:null,fontHorizontalPadding:null,fontVerticalMargin:null,fontHorizontalMargin:null,fontStyle:null,fontFamily:null,fontWeight:null,fontBase:null,fontDesktop:null,fontTablet:null,fontMobile:null,backgroundColor:null,textColor:null,element:null,component:null,components:[],basePrimaryImage:null,configPageBuilder:null,showModalHTMLEditor:!1,toggleGlobalHtmlMode:!1,applyImageToSelection:{src:""},currentPreviewImage:null,builderStarted:!1,isLoadingGlobal:!0,isSaving:!1,hasLocalDraftForUpdate:!1,isResumeEditing:!1,isRestoring:!1,currentLanguage:null,historyIndex:-1,historyLength:0,addComponentAddIndex:null}),getters:{getComponentArrayAddMethod(r){return r.componentArrayAddMethod},getLocalStorageItemName(r){return r.localStorageItemName},getShowModalTipTap(r){return r.showModalTipTap},getMenuRight(r){return r.menuRight},getBorderStyle(r){return r.borderStyle},getBorderWidth(r){return r.borderWidth},getBorderColor(r){return r.borderColor},getBorderRadiusGlobal(r){return r.borderRadiusGlobal},getBorderRadiusTopLeft(r){return r.borderRadiusTopLeft},getBorderRadiusTopRight(r){return r.borderRadiusTopRight},getBorderRadiusBottomleft(r){return r.borderRadiusBottomleft},getBorderRadiusBottomRight(r){return r.borderRadiusBottomRight},getElementContainsHyperlink(r){return r.elementContainsHyperlink},getHyperlinkAbility(r){return r.hyperlinkAbility},getHyperlinkInput(r){return r.hyperlinkInput},getHyperlinkMessage(r){return r.hyperlinkMessage},getHyperlinkError(r){return r.hyperlinkError},getHyberlinkEnable(r){return r.hyberlinkEnable},getOpenHyperlinkInNewTab(r){return r.openHyperlinkinkInNewTab},getOpacity(r){return r.opacity},getBackgroundOpacity(r){return r.backgroundOpacity},getTextAreaVueModel(r){return r.textAreaVueModel},getCurrentClasses(r){return r.currentClasses},getCurrentStyles(r){return r.currentStyles},getFontStyle(r){return r.fontStyle},getFontVerticalPadding(r){return r.fontVerticalPadding},getFontHorizontalPadding(r){return r.fontHorizontalPadding},getFontVerticalMargin(r){return r.fontVerticalMargin},getFontHorizontalMargin(r){return r.fontHorizontalMargin},getFontFamily(r){return r.fontFamily},getFontWeight(r){return r.fontWeight},getFontBase(r){return r.fontBase},getFontDesktop(r){return r.fontDesktop},getFontTablet(r){return r.fontTablet},getFontMobile(r){return r.fontMobile},getBackgroundColor(r){return r.backgroundColor},getTextColor(r){return r.textColor},getElement(r){return r.element},getComponent(r){return r.component},getComponents(r){return r.components},getBasePrimaryImage(r){return r.basePrimaryImage},getPageBuilderConfig(r){return r.configPageBuilder},getShowModalHTMLEditor(r){return r.showModalHTMLEditor},getToggleGlobalHtmlMode(r){return r.toggleGlobalHtmlMode},getApplyImageToSelection(r){return r.applyImageToSelection},getCurrentPreviewImage(r){return r.currentPreviewImage},getBuilderStarted:r=>r.builderStarted,getIsLoadingGlobal:r=>r.isLoadingGlobal,getIsSaving:r=>r.isSaving,getHasLocalDraftForUpdate:r=>r.hasLocalDraftForUpdate,getIsLoadingResumeEditing:r=>r.isResumeEditing,getIsRestoring:r=>r.isRestoring,getCurrentLanguage:r=>r.currentLanguage,getHistoryIndex:r=>r.historyIndex,getHistoryLength:r=>r.historyLength,getAddComponentAddIndex:r=>r.addComponentAddIndex},actions:{setComponentArrayAddMethod(r){this.componentArrayAddMethod=r},setLocalStorageItemName(r){this.localStorageItemName=r},setShowModalTipTap(r){this.showModalTipTap=r},setMenuRight(r){this.menuRight=r},setBorderStyle(r){this.borderStyle=r},setBorderWidth(r){this.borderWidth=r},setBorderColor(r){this.borderColor=r},setBorderRadiusGlobal(r){this.borderRadiusGlobal=r},setBorderRadiusTopLeft(r){this.borderRadiusTopLeft=r},setBorderRadiusTopRight(r){this.borderRadiusTopRight=r},setBorderRadiusBottomleft(r){this.borderRadiusBottomleft=r},setBorderRadiusBottomRight(r){this.borderRadiusBottomRight=r},setElementContainsHyperlink(r){this.elementContainsHyperlink=r},setHyperlinkAbility(r){this.hyperlinkAbility=r},setHyperlinkInput(r){this.hyperlinkInput=r},setHyperlinkMessage(r){this.hyperlinkMessage=r},setHyperlinkError(r){this.hyperlinkError=r},setHyberlinkEnable(r){this.hyberlinkEnable=r},setOpenHyperlinkInNewTab(r){this.openHyperlinkinkInNewTab=r},setOpacity(r){this.opacity=r},setBackgroundOpacity(r){this.backgroundOpacity=r},setTextAreaVueModel(r){this.textAreaVueModel=r},setClass(r){this.currentClasses=[...this.currentClasses,r]},removeClass(r){this.currentClasses=this.currentClasses.filter(e=>e!==r)},setCurrentClasses(r){this.currentClasses=Array.from(r)},setCurrentStyles(r){this.currentStyles=r},setFontVerticalPadding(r){this.fontVerticalPadding=r},setFontHorizontalPadding(r){this.fontHorizontalPadding=r},setFontVerticalMargin(r){this.fontVerticalMargin=r},setFontHorizontalMargin(r){this.fontHorizontalMargin=r},setFontStyle(r){this.fontStyle=r},setFontFamily(r){this.fontFamily=r},setFontWeight(r){this.fontWeight=r},setFontBase(r){this.fontBase=r},setFontDesktop(r){this.fontDesktop=r},setFontTablet(r){this.fontTablet=r},setFontMobile(r){this.fontMobile=r},setBackgroundColor(r){this.backgroundColor=r},setTextColor(r){this.textColor=r},setElement(r){this.element=null,i.nextTick(()=>{this.element=r})},setComponent(r){if(!r){this.element=null,this.component=null;return}this.component=null,i.nextTick(()=>{this.component=r})},setComponents(r){this.components=[],i.nextTick(()=>{this.components=r||[]})},setPushComponents(r){const e=r.componentArrayAddMethod??"push";e==="push"?this.components.push(r.component):e==="unshift"&&this.components.unshift(r.component)},setBasePrimaryImage(r){this.element&&(this.element.src=r??void 0),this.basePrimaryImage=r},setCurrentLayoutPreview(r){localStorage.setItem("preview",r)},setPageBuilderConfig(r){this.configPageBuilder=r},setShowModalHTMLEditor(r){this.showModalHTMLEditor=r},setToggleGlobalHtmlMode(r){this.toggleGlobalHtmlMode=r},setApplyImageToSelection(r){this.applyImageToSelection=r},setCurrentPreviewImage(r){this.currentPreviewImage=r},setBuilderStarted(r){this.builderStarted=r},setIsLoadingGlobal(r){this.isLoadingGlobal=r},setIsSaving(r){this.isSaving=r},setHasLocalDraftForUpdate(r){this.hasLocalDraftForUpdate=r},setIsLoadingResumeEditing(r){this.isResumeEditing=r},setIsRestoring(r){this.isRestoring=r},setCurrentLanguage(r){this.currentLanguage=r},setHistoryIndex(r){this.historyIndex=r},setHistoryLength(r){this.historyLength=r},setAddComponentAddIndex(r){this.addComponentAddIndex=r}}}),Xa=f2(),te=E2(Xa),Xt=function(r){return!r||typeof r=="object"&&r.constructor===Object&&Object.keys(r).length===0},$S="3.5.0",eC={class:"pbx-w-full pbx-inset-x-0 pbx-h-[90vh] pbx-bg-white pbx-overflow-x-scroll lg:pbx-pt-2 pbx-pt-2"},tC={class:"pbx-mt-4 pbx-mb-4 pbx-py-8 pbx-px-2 pbx-border pbx-border-solid pbx-border-gray-600 pbx-rounded-xl"},rC={class:"pbx-flex pbx-items-left pbx-flex-col pbx-gap-1"},oC={class:"pbx-myQuaternaryHeader"},iC={class:"pbx-myPrimaryParagraph pbx-text-xs"},nC={class:"pbx-px-2"},aC={class:"pbx-mt-8"},lC={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},sC={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},pC={class:"pbx-overflow-x-auto"},dC={class:"pbx-min-w-full"},cC={class:"pbx-bg-gray-50"},mC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},bC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},gC={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},xC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},uC={class:"pbx-min-w-[30rem] pbx-w-max"},hC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},fC={class:"pbx-min-w-[30rem] pbx-w-max"},yC={class:"pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium pbx-bg-blue-100 pbx-text-blue-800"},wC={key:0,class:"pbx-mt-4"},vC={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},kC={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},SC={class:"pbx-overflow-x-auto"},CC={class:"pbx-min-w-full"},EC={class:"pbx-bg-gray-50"},TC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},NC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},MC={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},BC={key:0},LC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},PC={class:"pbx-min-w-[30rem] pbx-w-max"},AC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},DC={class:"pbx-min-w-[30rem] pbx-w-max"},IC={key:1},VC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},zC={class:"pbx-min-w-[30rem] pbx-w-max"},OC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},_C={class:"pbx-min-w-[30rem] pbx-w-max"},RC={key:1,class:"pbx-mt-8"},HC={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},FC={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},jC={class:"pbx-overflow-x-auto"},qC={class:"pbx-min-w-full"},UC={class:"pbx-bg-gray-50"},WC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},GC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},JC={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},KC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},YC={class:"pbx-min-w-[30rem] pbx-w-max"},XC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},QC={class:"pbx-min-w-[30rem] pbx-w-max"},ZC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},$C={class:"pbx-min-w-[30rem] pbx-w-max"},e6={key:0,class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},t6={class:"pbx-min-w-[30rem] pbx-w-max"},r6={class:"pbx-flex pbx-items-center pbx-space-x-3"},o6=["src"],i6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},n6={class:"pbx-min-w-[30rem] pbx-w-max"},a6={key:0,class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},l6={class:"pbx-min-w-[30rem] pbx-w-max"},s6={key:2,class:"pbx-mt-8"},p6={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},d6={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},c6={class:"pbx-overflow-x-auto"},m6={class:"pbx-min-w-full"},b6={class:"pbx-bg-gray-50"},g6={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},x6={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},u6={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},h6={key:0},f6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},y6={class:"pbx-min-w-[30rem] pbx-w-max"},w6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},v6={class:"pbx-min-w-[30rem] pbx-w-max"},k6={key:1},S6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},C6={class:"pbx-min-w-[30rem] pbx-w-max"},E6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},T6={class:"pbx-min-w-[30rem] pbx-w-max"},N6={key:2},M6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},B6={class:"pbx-min-w-[30rem] pbx-w-max"},L6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},P6={class:"pbx-min-w-[30rem] pbx-w-max"},A6={key:3},D6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},I6={class:"pbx-min-w-[30rem] pbx-w-max"},V6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},z6={class:"pbx-min-w-[30rem] pbx-w-max"},O6={key:3,class:"pbx-mt-8"},_6={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},R6={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},H6={class:"pbx-overflow-x-auto"},F6={class:"pbx-min-w-full"},j6={class:"pbx-bg-gray-50"},q6={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},U6={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},W6={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},G6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},J6={class:"pbx-min-w-[30rem] pbx-w-max"},K6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},Y6={class:"pbx-min-w-[30rem] pbx-w-max"},X6={class:"pbx-flex pbx-items-center pbx-space-x-3"},Q6=["src"],Z6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},$6={class:"pbx-min-w-[30rem] pbx-w-max"},eE={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},tE={class:"pbx-min-w-[30rem] pbx-w-max"},rE={class:"pbx-flex pbx-items-center pbx-space-x-3"},oE={class:"pbx-pr-6"},iE={class:"pbx-flex pbx-items-center pbx-space-x-3"},nE={class:"pbx-whitespace-nowrap"},aE={key:4,class:"pbx-mt-8"},lE={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},sE={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},pE={class:"pbx-overflow-x-auto"},dE={class:"pbx-w-max"},cE={class:"pbx-bg-gray-50"},mE={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},bE={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},gE={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},xE={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},uE={class:"pbx-min-w-[30rem] pbx-w-max"},hE={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},fE={class:"pbx-min-w-[30rem] pbx-w-max"},yE={key:0},wE={key:1},vE={key:0},kE={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},SE={class:"pbx-min-w-[30rem] pbx-w-max"},CE={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},EE={class:"pbx-min-w-[30rem] pbx-w-max"},TE={class:"pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium"},NE={class:"pbx-mt-4 pbx-mb-4 pbx-py-8 pbx-px-2 pbx-border pbx-border-solid pbx-border-gray-600 pbx-rounded-xl"},ME={class:"pbx-flex pbx-items-left pbx-flex-col pbx-gap-1"},BE={class:"pbx-myQuaternaryHeader"},LE={class:"pbx-myPrimaryParagraph pbx-text-xs"},PE={class:"pbx-mt-4 pbx-whitespace-pre-wrap pbx-text-white pbx-overflow-hidden pbx-bg-gray-900"},AE={class:"pbx-flex bg-gray-800/40 pbx-ring-1 ring-white/5"},DE={class:"pbx-mb-px pbx-flex pbx-text-xs pbx-font-medium pbx-text-myPrimaryMediumGrayColor"},IE={class:"pbx-px-4 pbx-py-4 pbx-text-white"},VE={class:"pbx-px-4 pbx-pb-8 pbx-pt-4 pbx-text-white pbx-text-xs pbx-break-all"},zE={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-text-white"},OE=i.defineComponent({__name:"PageBuilderSettings",setup(r){const{translate:e}=ee(),t=te,o=i.computed(()=>t.getPageBuilderConfig);return(n,a)=>{var l,s,p,d,c,m,b,g,x,u,h,y,v,f,w,k;return i.openBlock(),i.createElementBlock("div",eC,[i.createElementVNode("div",tC,[i.createElementVNode("div",null,[i.createElementVNode("div",rC,[i.createElementVNode("h3",oC,i.toDisplayString(i.unref(e)("Configuration Overview")),1),i.createElementVNode("p",iC,i.toDisplayString(i.unref(e)("A summary of current user preferences, application settings, and system metadata including UI theme, language, saved components, and logo configuration.")),1)]),i.createElementVNode("div",nC,[i.createElementVNode("div",aC,[i.createElementVNode("h4",lC,i.toDisplayString(i.unref(e)("Version Information")),1),i.createElementVNode("div",sC,[i.createElementVNode("div",pC,[i.createElementVNode("table",dC,[i.createElementVNode("thead",cC,[i.createElementVNode("tr",null,[i.createElementVNode("th",mC,i.toDisplayString(i.unref(e)("App")),1),i.createElementVNode("th",bC,i.toDisplayString(i.unref(e)("Version")),1)])]),i.createElementVNode("tbody",gC,[i.createElementVNode("tr",null,[i.createElementVNode("td",xC,[i.createElementVNode("div",uC,i.toDisplayString(i.unref(e)("Page Builder")),1)]),i.createElementVNode("td",hC,[i.createElementVNode("div",fC,[i.createElementVNode("span",yC,i.toDisplayString(i.unref($S)),1)])])])])])])])]),(l=o.value)!=null&&l.resourceData&&!i.unref(Xt)(o.value.resourceData)?(i.openBlock(),i.createElementBlock("div",wC,[i.createElementVNode("h4",vC,i.toDisplayString(i.unref(e)("Resource Data")),1),i.createElementVNode("div",kC,[i.createElementVNode("div",SC,[i.createElementVNode("table",CC,[i.createElementVNode("thead",EC,[i.createElementVNode("tr",null,[i.createElementVNode("th",TC,i.toDisplayString(i.unref(e)("Property")),1),i.createElementVNode("th",NC,i.toDisplayString(i.unref(e)("Value")),1)])]),i.createElementVNode("tbody",MC,[(p=(s=o.value)==null?void 0:s.resourceData)!=null&&p.title?(i.openBlock(),i.createElementBlock("tr",BC,[i.createElementVNode("td",LC,[i.createElementVNode("div",PC,i.toDisplayString(i.unref(e)("Title")),1)]),i.createElementVNode("td",AC,[i.createElementVNode("div",DC,i.toDisplayString(o.value.resourceData.title),1)])])):i.createCommentVNode("",!0),(c=(d=o.value)==null?void 0:d.resourceData)!=null&&c.id?(i.openBlock(),i.createElementBlock("tr",IC,[i.createElementVNode("td",VC,[i.createElementVNode("div",zC,i.toDisplayString(i.unref(e)("ID")),1)]),i.createElementVNode("td",OC,[i.createElementVNode("div",_C,i.toDisplayString(o.value.resourceData.id),1)])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0),(m=o.value)!=null&&m.userForPageBuilder&&!i.unref(Xt)(o.value.userForPageBuilder)?(i.openBlock(),i.createElementBlock("div",RC,[i.createElementVNode("h4",HC,i.toDisplayString(i.unref(e)("User Information")),1),i.createElementVNode("div",FC,[i.createElementVNode("div",jC,[i.createElementVNode("table",qC,[i.createElementVNode("thead",UC,[i.createElementVNode("tr",null,[i.createElementVNode("th",WC,i.toDisplayString(i.unref(e)("Property")),1),i.createElementVNode("th",GC,i.toDisplayString(i.unref(e)("Value")),1)])]),i.createElementVNode("tbody",JC,[i.createElementVNode("tr",null,[i.createElementVNode("td",KC,[i.createElementVNode("div",YC,i.toDisplayString(i.unref(e)("User Name")),1)]),i.createElementVNode("td",XC,[i.createElementVNode("div",QC,i.toDisplayString(o.value.userForPageBuilder.name),1)])]),i.createElementVNode("tr",null,[i.createElementVNode("td",ZC,[i.createElementVNode("div",$C,i.toDisplayString(i.unref(e)("Image")),1)]),o.value.userForPageBuilder.image&&typeof o.value.userForPageBuilder.image=="string"&&o.value.userForPageBuilder.image.length>2?(i.openBlock(),i.createElementBlock("td",e6,[i.createElementVNode("div",t6,[i.createElementVNode("div",r6,[i.createElementVNode("img",{class:"pbx-block pbx-inset-0 pbx-object-top pbx-h-10 pbx-min-h-10 pbx-max-h-10 pbx-w-10 pbx-min-w-10 pbx-max-w-10 pbx-object-cover pbx-rounded-full",src:o.value.userForPageBuilder.image,alt:"image"},null,8,o6)])])])):i.createCommentVNode("",!0)]),i.createElementVNode("tr",null,[i.createElementVNode("td",i6,[i.createElementVNode("div",n6,i.toDisplayString(i.unref(e)("Image URL")),1)]),o.value.userForPageBuilder.image&&typeof o.value.userForPageBuilder.image=="string"&&o.value.userForPageBuilder.image.length>2?(i.openBlock(),i.createElementBlock("td",a6,[i.createElementVNode("div",l6,i.toDisplayString(o.value.userForPageBuilder.image),1)])):i.createCommentVNode("",!0)])])])])])])):i.createCommentVNode("",!0),(b=o.value)!=null&&b.userSettings&&!i.unref(Xt)(o.value.userSettings)?(i.openBlock(),i.createElementBlock("div",s6,[i.createElementVNode("h4",p6,i.toDisplayString(i.unref(e)("User Settings")),1),i.createElementVNode("div",d6,[i.createElementVNode("div",c6,[i.createElementVNode("table",m6,[i.createElementVNode("thead",b6,[i.createElementVNode("tr",null,[i.createElementVNode("th",g6,i.toDisplayString(i.unref(e)("Setting")),1),i.createElementVNode("th",x6,i.toDisplayString(i.unref(e)("Value")),1)])]),i.createElementVNode("tbody",u6,[(x=(g=o.value)==null?void 0:g.userSettings)!=null&&x.theme?(i.openBlock(),i.createElementBlock("tr",h6,[i.createElementVNode("td",f6,[i.createElementVNode("div",y6,i.toDisplayString(i.unref(e)("Theme")),1)]),i.createElementVNode("td",w6,[i.createElementVNode("div",v6,i.toDisplayString(o.value.userSettings.theme),1)])])):i.createCommentVNode("",!0),(h=(u=o.value)==null?void 0:u.userSettings)!=null&&h.language?(i.openBlock(),i.createElementBlock("tr",k6,[i.createElementVNode("td",S6,[i.createElementVNode("div",C6,i.toDisplayString(i.unref(e)("Language")),1)]),i.createElementVNode("td",E6,[i.createElementVNode("div",T6,i.toDisplayString(o.value.userSettings.language),1)])])):i.createCommentVNode("",!0),((v=(y=o.value)==null?void 0:y.userSettings)==null?void 0:v.autoSave)!==void 0?(i.openBlock(),i.createElementBlock("tr",N6,[i.createElementVNode("td",M6,[i.createElementVNode("div",B6,i.toDisplayString(i.unref(e)("Auto Save")),1)]),i.createElementVNode("td",L6,[i.createElementVNode("div",P6,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.userSettings.autoSave?"bg-green-100 text-green-800":"bg-red-100 text-red-800"])},i.toDisplayString(o.value.userSettings.autoSave?i.unref(e)("Enabled"):i.unref(e)("Disabled")),3)])])])):i.createCommentVNode("",!0),((w=(f=o.value)==null?void 0:f.userSettings)==null?void 0:w.notifications)!==void 0?(i.openBlock(),i.createElementBlock("tr",A6,[i.createElementVNode("td",D6,[i.createElementVNode("div",I6,i.toDisplayString(i.unref(e)("Notifications")),1)]),i.createElementVNode("td",V6,[i.createElementVNode("div",z6,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.userSettings.notifications?"bg-green-100 text-green-800":"bg-red-100 text-red-800"])},i.toDisplayString(o.value.userSettings.notifications?i.unref(e)("Enabled"):i.unref(e)("Disabled")),3)])])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0),o.value&&o.value.pageBuilderLogo&&!i.unref(Xt)(o.value.pageBuilderLogo)?(i.openBlock(),i.createElementBlock("div",O6,[i.createElementVNode("h4",_6,i.toDisplayString(i.unref(e)("Logo Configuration")),1),i.createElementVNode("div",R6,[i.createElementVNode("div",H6,[i.createElementVNode("table",F6,[i.createElementVNode("thead",j6,[i.createElementVNode("tr",null,[i.createElementVNode("th",q6,i.toDisplayString(i.unref(e)("Property")),1),i.createElementVNode("th",U6,i.toDisplayString(i.unref(e)("Value")),1)])]),i.createElementVNode("tbody",W6,[i.createElementVNode("tr",null,[i.createElementVNode("td",G6,[i.createElementVNode("div",J6,i.toDisplayString(i.unref(e)("Logo")),1)]),i.createElementVNode("td",K6,[i.createElementVNode("div",Y6,[i.createElementVNode("div",X6,[i.createElementVNode("img",{class:"pbx-h-4",src:o.value.pageBuilderLogo.src,alt:"Logo"},null,8,Q6)])])])]),i.createElementVNode("tr",null,[i.createElementVNode("td",Z6,[i.createElementVNode("div",$6,i.toDisplayString(i.unref(e)("Logo URL")),1)]),i.createElementVNode("td",eE,[i.createElementVNode("div",tE,[i.createElementVNode("div",rE,[i.createElementVNode("div",oE,[i.createElementVNode("div",iE,[i.createElementVNode("span",nE,i.toDisplayString(o.value.pageBuilderLogo.src),1)])])])])])])])])])])])):i.createCommentVNode("",!0),(k=o.value)!=null&&k.updateOrCreate&&!i.unref(Xt)(o.value.updateOrCreate)?(i.openBlock(),i.createElementBlock("div",aE,[i.createElementVNode("h4",lE,i.toDisplayString(i.unref(e)("Form Type")),1),i.createElementVNode("div",sE,[i.createElementVNode("div",pE,[i.createElementVNode("table",dE,[i.createElementVNode("thead",cE,[i.createElementVNode("tr",null,[i.createElementVNode("th",mE,i.toDisplayString(i.unref(e)("Mode")),1),i.createElementVNode("th",bE,i.toDisplayString(i.unref(e)("Description")),1)])]),i.createElementVNode("tbody",gE,[i.createElementVNode("tr",null,[i.createElementVNode("td",xE,[i.createElementVNode("div",uE,i.toDisplayString(i.unref(e)("Form Type")),1)]),i.createElementVNode("td",hE,[i.createElementVNode("div",fE,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.updateOrCreate.formType==="create"?"bg-green-100 text-green-800":"bg-blue-100 text-blue-800"])},[o.value&&o.value.updateOrCreate.formType==="create"?(i.openBlock(),i.createElementBlock("span",yE,i.toDisplayString(o.value.updateOrCreate.formType),1)):i.createCommentVNode("",!0),o.value&&o.value.updateOrCreate.formType==="update"?(i.openBlock(),i.createElementBlock("span",wE,i.toDisplayString(o.value.updateOrCreate.formType),1)):i.createCommentVNode("",!0)],2)])])]),o.value.updateOrCreate.formName&&o.value.updateOrCreate.formName.length>0?(i.openBlock(),i.createElementBlock("tr",vE,[i.createElementVNode("td",kE,[i.createElementVNode("div",SE,i.toDisplayString(i.unref(e)("Form Name")),1)]),i.createElementVNode("td",CE,[i.createElementVNode("div",EE,[i.createElementVNode("span",TE,i.toDisplayString(o.value.updateOrCreate.formName),1)])])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0)])])]),i.createElementVNode("div",NE,[i.createElementVNode("div",ME,[i.createElementVNode("h3",BE,i.toDisplayString(i.unref(e)("Complete Configuration Overview")),1),i.createElementVNode("p",LE,i.toDisplayString(i.unref(e)("Complete configuration object currently used by the Page Builder. Includes user information, branding settings, and other context-specific data needed for rendering and managing the builder environment.")),1)]),i.createElementVNode("div",PE,[i.createElementVNode("div",AE,[i.createElementVNode("div",DE,[i.createElementVNode("div",IE,i.toDisplayString(i.unref(e)("Configuration")),1)])]),i.createElementVNode("div",VE,[i.createElementVNode("p",zE," config: "+i.toDisplayString(JSON.stringify(o.value,null,4)),1)])])])])}}}),_E={key:0,class:"pbx-fixed pbx-inset-0 pbx-z-[9999]"},RE={class:"pbx-flex pbx-gap-2 pbx-justify-between pbx-items-center pbx-py-2 pbx-px-2 pbx-mb-2 pbx-border-b pbx-border-gray-200"},HE={class:"pbx-myQuaternaryHeader pbx-my-0 pbx-py-0 pbx-text-black"},FE={class:"pbx-pt-4 pbx-px-2"},jE=i.defineComponent({__name:"FloatingSidePanel",props:{title:{type:String,required:!1,default:null},showSidebarPanel:{type:Boolean,default:!1},position:{type:String,required:!0,default:"right",validator(r){const t=["left","right"].includes(r);return t||console.warn(`Invalid prop: position must be 'left' or 'right', got '${r}'`),t}}},emits:["closeSidebarPanel"],setup(r,{emit:e}){const t=e,o=()=>{t("closeSidebarPanel")};return(n,a)=>(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.Transition,{name:"popup-fade"},{default:i.withCtx(()=>[r.showSidebarPanel?(i.openBlock(),i.createElementBlock("div",_E,[i.createElementVNode("div",{class:"pbx-fixed pbx-inset-0 pbx-bg-black pbx-opacity-20 pbx-z-40",onClick:o}),i.createElementVNode("div",{class:i.normalizeClass(["pbx-font-sans pbx-fixed pbx-top-0 pbx-rounded-3xl pbx-py-2 pbx-px-2 pbx-border pbx-border-gray-200 pbx-max-h-[80vh] lg:pbx-min-h-[98%] pbx-min-h-[80vh] lg:pbx-min-w-96 lg:pbx-w-96 pbx-w-[96%] pbx-overflow-y-auto pbx-z-50 pbx-bg-white lg:pbx-mt-2 pbx-mt-2",[r.position==="left"?"pbx-left-0 pbx-ml-[1%]":"",r.position==="right"?"pbx-right-0 pbx-mr-[1%]":""]]),onClick:a[0]||(a[0]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",RE,[i.createElementVNode("span",HE,i.toDisplayString(r.title),1),i.createElementVNode("span",{onClick:o},[...a[1]||(a[1]=[i.createElementVNode("div",{class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-text-black"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," close ")],-1)])])]),i.createElementVNode("div",FE,[i.renderSlot(n.$slots,"default")])],2)])):i.createCommentVNode("",!0)]),_:3})]))}}),qE={class:"pbx-flex pbx-flex-col pbx-items-center pbx-justify-center pbx-myPrimaryGap"},UE={class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center pbx-relative"},WE={class:"pbx-overflow-y-auto"},GE={class:"pbx-flex pbx-items-center pbx-justify-center pbx-gap-2"},JE={class:"pbx-lg:pbx-text-base pbx-text-sm pbx-font-semibold pbx-text-center pbx-min-h-14 pbx-flex pbx-justify-center pbx-items-center"},KE={class:"pbx-bg-gray-100 pbx-rounded-full pbx-w-32 pbx-h-32 pbx-flex pbx-items-center pbx-justify-center"},YE={class:"pbx-text-center"},XE={class:"pbx-lg:pbx-text-7xl pbx-text-5xl"},QE={key:0,class:"pbx-w-full pbx-space-y-6"},ZE={class:"pbx-text-xl pbx-font-semibold pbx-mb-4 pbx-text-center"},$E={class:"pbx-text-sm pbx-font-semibold pbx-uppercase pbx-tracking-widest pbx-text-gray-400 pbx-mb-3 pbx-px-1"},eT={class:"pbx-space-y-3"},tT={class:"pbx-flex-shrink-0 pbx-mt-1"},rT={key:0,class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-myPrimaryLinkColor pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-white hover:pbx-text-white"},oT={key:1,class:"pbx-select-none pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-myPrimaryErrorColor pbx-aspect-square hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-white"},iT={class:"pbx-flex-1"},nT={class:"pbx-text-sm pbx-text-gray-600"},aT={key:1,class:"pbx-text-gray-500 pbx-text-center"},lT={class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center"},sT=i.defineComponent({__name:"ComponentTopMenu",setup(r){const{translate:e}=ee(),t=me(),o=i.ref(!1),n=i.ref(!1),a=i.ref(""),l=i.ref(1),s=i.ref(""),p=i.ref(""),d=i.ref(""),c=i.ref(null),m=i.ref(null),b=i.ref(null),g=i.ref(null),x=i.ref(null),u=function(){n.value=!0,a.value="delete",l.value=2,s.value=e("Remove all Components"),p.value=e("Are you sure you want to remove all Components?"),d.value=e("Close"),c.value=null,m.value=e("Delete"),b.value=function(){n.value=!1},g.value=function(){},x.value=async function(){o.value=!0,await t.clearHtmlSelection(),await t.handleFormSubmission(),await be(500),n.value=!1,o.value=!1}},h=i.ref(!1),y=function(){h.value=!1},v=function(){h.value=!0},f=i.ref(null),w=i.ref(!1),k=i.computed(()=>{if(!f.value)return[];const I=new Map;for(const M of f.value.checks){const E=M.category??"Other";I.has(E)||I.set(E,[]),I.get(E).push(M)}return Array.from(I.entries()).map(([M,E])=>({title:M,checks:E}))}),B=async function(){w.value=!w.value,w.value&&(f.value=await t.analyzeSEO())},S=function(){w.value=!1};return(I,M)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",qE,[i.createElementVNode("div",UE,[i.createElementVNode("div",{onClick:B,"pbx-bg-myPrimaryLinkColor":"",class:i.normalizeClass(["pbx-select-none pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white",{"pbx-bg-myPrimaryLinkColor pbx-text-white":w.value}])},[...M[4]||(M[4]=[i.createElementVNode("div",{class:"pbx-font-semibold pbx-text-sm"},"SEO",-1)])],2),i.createVNode(jE,{title:"SEO",showSidebarPanel:w.value,onCloseSidebarPanel:S,position:"left"},{default:i.withCtx(()=>[i.createElementVNode("div",WE,[i.createElementVNode("div",null,[i.createElementVNode("div",GE,[i.createElementVNode("div",JE,[f.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"pbx-relative pbx-my-4 pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center pbx-w-36 pbx-h-36",style:i.normalizeStyle({background:`conic-gradient(${f.value.score<50?"#ef4444":"#50C878"} ${f.value.score}%, #e5e7eb 0)`})},[i.createElementVNode("div",KE,[i.createElementVNode("div",YE,[i.createElementVNode("span",XE,i.toDisplayString(f.value.score),1),M[5]||(M[5]=i.createElementVNode("span",{class:"pbx-text-xl"},"%",-1))])])],4)):i.createCommentVNode("",!0)])]),k.value.length?(i.openBlock(),i.createElementBlock("div",QE,[i.createElementVNode("h3",ZE,i.toDisplayString(i.unref(e)("SEO Check Results")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(k.value,E=>(i.openBlock(),i.createElementBlock("div",{key:E.title},[i.createElementVNode("h4",$E,i.toDisplayString(E.title),1),i.createElementVNode("ul",eT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(E.checks,(P,V)=>(i.openBlock(),i.createElementBlock("li",{key:V,class:i.normalizeClass(["pbx-flex pbx-items-start pbx-gap-4 pbx-p-4 pbx-bg-white pbx-rounded-lg pbx-border-solid pbx-border-2",P.passed?"pbx-border-emerald-500":"pbx-border-red-600"])},[i.createElementVNode("div",tT,[P.passed?(i.openBlock(),i.createElementBlock("div",rT,[...M[6]||(M[6]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," check ",-1)])])):i.createCommentVNode("",!0),P.passed?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",oT,[...M[7]||(M[7]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," check_indeterminate_small ",-1)])]))]),i.createElementVNode("div",iT,[i.createElementVNode("p",{class:i.normalizeClass(["pbx-text-lg pbx-font-medium",P.passed?"pbx-text-green-700":"pbx-text-red-700"])},i.toDisplayString(P.check),3),i.createElementVNode("p",nT,i.toDisplayString(P.details),1)])],2))),128))])]))),128))])):(i.openBlock(),i.createElementBlock("div",aT,i.toDisplayString(i.unref(e)("No SEO checks available.")),1))])])]),_:1},8,["showSidebarPanel"])]),i.createElementVNode("div",{class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center"},[i.createElementVNode("div",{onClick:u,class:"pbx-select-none pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-myPrimaryErrorColor"},[...M[8]||(M[8]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," delete_forever ",-1)])])]),M[10]||(M[10]=i.createElementVNode("div",{class:"pbx-w-full pbx-border-t pbx-border-solid pbx-border-gray-200"},null,-1)),i.createElementVNode("div",lT,[i.createElementVNode("div",{onClick:M[0]||(M[0]=async()=>{await i.unref(t).clearHtmlSelection(),v()}),class:"pbx-select-none pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},[...M[9]||(M[9]=[i.createElementVNode("svg",{fill:"currentColor",height:"22",viewBox:"0 0 22 22",width:"22",xmlns:"http://www.w3.org/2000/svg",class:"css-1a6490m"},[i.createElementVNode("path",{"clip-rule":"evenodd",d:"M15.192 5.393A6.965 6.965 0 0012 4.071V2h-2v2.07a6.964 6.964 0 00-3.192 1.323L5.344 3.93 3.93 5.343l1.464 1.464A6.964 6.964 0 004.07 10H2v2h2.07a6.964 6.964 0 001.324 3.193L3.93 16.657l1.414 1.414 1.464-1.464A6.964 6.964 0 0010 17.929V20h2v-2.07a6.964 6.964 0 003.192-1.323l1.465 1.464 1.414-1.414-1.465-1.465A6.964 6.964 0 0017.93 12H20v-2h-2.07a6.963 6.963 0 00-1.324-3.193l1.464-1.464-1.414-1.414-1.464 1.464zM11 16a5 5 0 100-10 5 5 0 000 10z","fill-rule":"evenodd"})],-1)])])])]),i.createVNode(Bt,{showDynamicModalBuilder:n.value,type:a.value,gridColumnAmount:l.value,title:s.value,description:p.value,isLoading:o.value,firstButtonText:d.value,secondButtonText:c.value??void 0,thirdButtonText:m.value??void 0,onFirstModalButtonFunctionDynamicModalBuilder:M[1]||(M[1]=()=>{var E;return(E=b.value)==null?void 0:E.call(b)}),onSecondModalButtonFunctionDynamicModalBuilder:M[2]||(M[2]=()=>{var E;return(E=g.value)==null?void 0:E.call(g)}),onThirdModalButtonFunctionDynamicModalBuilder:M[3]||(M[3]=()=>{var E;return(E=x.value)==null?void 0:E.call(x)})},{default:i.withCtx(()=>[...M[11]||(M[11]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])]),_:1},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","isLoading","firstButtonText","secondButtonText","thirdButtonText"]),i.createVNode(Mt,{maxWidth:"5xl",showModalBuilder:h.value,title:"Main Settings",onCloseMainModalBuilder:y,minHeight:"",maxHeight:""},{default:i.withCtx(()=>[i.createVNode(OE)]),_:1},8,["showModalBuilder"])]))}});function Ee(r){this.content=r}Ee.prototype={constructor:Ee,find:function(r){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===r)return e;return-1},get:function(r){var e=this.find(r);return e==-1?void 0:this.content[e+1]},update:function(r,e,t){var o=t&&t!=r?this.remove(t):this,n=o.find(r),a=o.content.slice();return n==-1?a.push(t||r,e):(a[n+1]=e,t&&(a[n]=t)),new Ee(a)},remove:function(r){var e=this.find(r);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Ee(t)},addToStart:function(r,e){return new Ee([r,e].concat(this.remove(r).content))},addToEnd:function(r,e){var t=this.remove(r).content.slice();return t.push(r,e),new Ee(t)},addBefore:function(r,e,t){var o=this.remove(e),n=o.content.slice(),a=o.find(r);return n.splice(a==-1?n.length:a,0,e,t),new Ee(n)},forEach:function(r){for(var e=0;e<this.content.length;e+=2)r(this.content[e],this.content[e+1])},prepend:function(r){return r=Ee.from(r),r.size?new Ee(r.content.concat(this.subtract(r).content)):this},append:function(r){return r=Ee.from(r),r.size?new Ee(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var e=this;r=Ee.from(r);for(var t=0;t<r.content.length;t+=2)e=e.remove(r.content[t]);return e},toObject:function(){var r={};return this.forEach(function(e,t){r[e]=t}),r},get size(){return this.content.length>>1}},Ee.from=function(r){if(r instanceof Ee)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new Ee(e)};function T2(r,e,t){for(let o=0;;o++){if(o==r.childCount||o==e.childCount)return r.childCount==e.childCount?null:t;let n=r.child(o),a=e.child(o);if(n==a){t+=n.nodeSize;continue}if(!n.sameMarkup(a))return t;if(n.isText&&n.text!=a.text){let l=n.text,s=a.text,p=0;for(;l[p]==s[p];p++)t++;return p&&p<l.length&&p<s.length&&B2(l.charCodeAt(p-1))&&M2(l.charCodeAt(p))&&t--,t}if(n.content.size||a.content.size){let l=T2(n.content,a.content,t+1);if(l!=null)return l}t+=n.nodeSize}}function N2(r,e,t,o){for(let n=r.childCount,a=e.childCount;;){if(n==0||a==0)return n==a?null:{a:t,b:o};let l=r.child(--n),s=e.child(--a),p=l.nodeSize;if(l==s){t-=p,o-=p;continue}if(!l.sameMarkup(s))return{a:t,b:o};if(l.isText&&l.text!=s.text){let d=l.text,c=s.text,m=d.length,b=c.length;for(;m>0&&b>0&&d[m-1]==c[b-1];)m--,b--,t--,o--;return m&&b&&m<d.length&&B2(d.charCodeAt(m-1))&&M2(d.charCodeAt(m))&&(t++,o++),{a:t,b:o}}if(l.content.size||s.content.size){let d=N2(l.content,s.content,t-1,o-1);if(d)return d}t-=p,o-=p}}function M2(r){return r>=56320&&r<57344}function B2(r){return r>=55296&&r<56320}let A=class je{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let o=0;o<e.length;o++)this.size+=e[o].nodeSize}nodesBetween(e,t,o,n=0,a){for(let l=0,s=0;s<t;l++){let p=this.content[l],d=s+p.nodeSize;if(d>e&&o(p,n+s,a||null,l)!==!1&&p.content.size){let c=s+1;p.nodesBetween(Math.max(0,e-c),Math.min(p.content.size,t-c),o,n+c)}s=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,o,n){let a="",l=!0;return this.nodesBetween(e,t,(s,p)=>{let d=s.isText?s.text.slice(Math.max(e,p)-p,t-p):s.isLeaf?n?typeof n=="function"?n(s):n:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&d||s.isTextblock)&&o&&(l?l=!1:a+=o),a+=d},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,o=e.firstChild,n=this.content.slice(),a=0;for(t.isText&&t.sameMarkup(o)&&(n[n.length-1]=t.withText(t.text+o.text),a=1);a<e.content.length;a++)n.push(e.content[a]);return new je(n,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let o=[],n=0;if(t>e)for(let a=0,l=0;l<t;a++){let s=this.content[a],p=l+s.nodeSize;p>e&&((l<e||p>t)&&(s.isText?s=s.cut(Math.max(0,e-l),Math.min(s.text.length,t-l)):s=s.cut(Math.max(0,e-l-1),Math.min(s.content.size,t-l-1))),o.push(s),n+=s.nodeSize),l=p}return new je(o,n)}cutByIndex(e,t){return e==t?je.empty:e==0&&t==this.content.length?this:new je(this.content.slice(e,t))}replaceChild(e,t){let o=this.content[e];if(o==t)return this;let n=this.content.slice(),a=this.size+t.nodeSize-o.nodeSize;return n[e]=t,new je(n,a)}addToStart(e){return new je([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new je(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,o=0;t<this.content.length;t++){let n=this.content[t];e(n,o,t),o+=n.nodeSize}}findDiffStart(e,t=0){return T2(this,e,t)}findDiffEnd(e,t=this.size,o=e.size){return N2(this,e,t,o)}findIndex(e){if(e==0)return Hi(0,e);if(e==this.size)return Hi(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,o=0;;t++){let n=this.child(t),a=o+n.nodeSize;if(a>=e)return a==e?Hi(t+1,a):Hi(t,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return je.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return je.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return je.empty;let t,o=0;for(let n=0;n<e.length;n++){let a=e[n];o+=a.nodeSize,n&&a.isText&&e[n-1].sameMarkup(a)?(t||(t=e.slice(0,n)),t[t.length-1]=a.withText(t[t.length-1].text+a.text)):t&&t.push(a)}return new je(t||e,o)}static from(e){if(!e)return je.empty;if(e instanceof je)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new je([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};A.empty=new A([],0);const Qa={index:0,offset:0};function Hi(r,e){return Qa.index=r,Qa.offset=e,Qa}function Fi(r,e){if(r===e)return!0;if(!(r&&typeof r=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(r);if(Array.isArray(e)!=t)return!1;if(t){if(r.length!=e.length)return!1;for(let o=0;o<r.length;o++)if(!Fi(r[o],e[o]))return!1}else{for(let o in r)if(!(o in e)||!Fi(r[o],e[o]))return!1;for(let o in e)if(!(o in r))return!1}return!0}let Z=class lp{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,o=!1;for(let n=0;n<e.length;n++){let a=e[n];if(this.eq(a))return e;if(this.type.excludes(a.type))t||(t=e.slice(0,n));else{if(a.type.excludes(this.type))return e;!o&&a.type.rank>this.type.rank&&(t||(t=e.slice(0,n)),t.push(this),o=!0),t&&t.push(a)}}return t||(t=e.slice()),o||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Fi(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let o=e.marks[t.type];if(!o)throw new RangeError(`There is no mark type ${t.type} in this schema`);let n=o.create(t.attrs);return o.checkAttrs(n.attrs),n}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let o=0;o<e.length;o++)if(!e[o].eq(t[o]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return lp.none;if(e instanceof lp)return[e];let t=e.slice();return t.sort((o,n)=>o.type.rank-n.type.rank),t}};Z.none=[];let Bo=class extends Error{},O=class So{constructor(e,t,o){this.content=e,this.openStart=t,this.openEnd=o}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let o=P2(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return o&&new So(o,this.openStart,this.openEnd)}removeBetween(e,t){return new So(L2(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return So.empty;let o=t.openStart||0,n=t.openEnd||0;if(typeof o!="number"||typeof n!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new So(A.fromJSON(e,t.content),o,n)}static maxOpen(e,t=!0){let o=0,n=0;for(let a=e.firstChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.firstChild)o++;for(let a=e.lastChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.lastChild)n++;return new So(e,o,n)}};O.empty=new O(A.empty,0,0);function L2(r,e,t){let{index:o,offset:n}=r.findIndex(e),a=r.maybeChild(o),{index:l,offset:s}=r.findIndex(t);if(n==e||a.isText){if(s!=t&&!r.child(l).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(o!=l)throw new RangeError("Removing non-flat range");return r.replaceChild(o,a.copy(L2(a.content,e-n-1,t-n-1)))}function P2(r,e,t,o,n,a){let{index:l,offset:s}=r.findIndex(e),p=r.maybeChild(l);if(s==e||p.isText)return a&&o<=0&&n<=0&&!a.canReplace(l,l,t)?null:r.cut(0,e).append(t).append(r.cut(e));let d=P2(p.content,e-s-1,t,l==0?o-1:0,l==r.childCount-1?n-1:0,p);return d&&r.replaceChild(l,p.copy(d))}function pT(r,e,t){if(t.openStart>r.depth)throw new Bo("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new Bo("Inconsistent open depths");return A2(r,e,t,0)}function A2(r,e,t,o){let n=r.index(o),a=r.node(o);if(n==e.index(o)&&o<r.depth-t.openStart){let l=A2(r,e,t,o+1);return a.copy(a.content.replaceChild(n,l))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&r.depth==o&&e.depth==o){let l=r.parent,s=l.content;return vr(l,s.cut(0,r.parentOffset).append(t.content).append(s.cut(e.parentOffset)))}else{let{start:l,end:s}=dT(t,r);return vr(a,I2(r,l,s,e,o))}else return vr(a,ji(r,e,o))}function D2(r,e){if(!e.type.compatibleContent(r.type))throw new Bo("Cannot join "+e.type.name+" onto "+r.type.name)}function Za(r,e,t){let o=r.node(t);return D2(o,e.node(t)),o}function wr(r,e){let t=e.length-1;t>=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function Lo(r,e,t,o){let n=(e||r).node(t),a=0,l=e?e.index(t):n.childCount;r&&(a=r.index(t),r.depth>t?a++:r.textOffset&&(wr(r.nodeAfter,o),a++));for(let s=a;s<l;s++)wr(n.child(s),o);e&&e.depth==t&&e.textOffset&&wr(e.nodeBefore,o)}function vr(r,e){if(!r.type.validContent(e))throw new Bo("Invalid content for node "+r.type.name);return r.copy(e)}function I2(r,e,t,o,n){let a=r.depth>n&&Za(r,e,n+1),l=o.depth>n&&Za(t,o,n+1),s=[];return Lo(null,r,n,s),a&&l&&e.index(n)==t.index(n)?(D2(a,l),wr(vr(a,I2(r,e,t,o,n+1)),s)):(a&&wr(vr(a,ji(r,e,n+1)),s),Lo(e,t,n,s),l&&wr(vr(l,ji(t,o,n+1)),s)),Lo(o,null,n,s),new A(s)}function ji(r,e,t){let o=[];if(Lo(null,r,t,o),r.depth>t){let n=Za(r,e,t+1);wr(vr(n,ji(r,e,t+1)),o)}return Lo(e,null,t,o),new A(o)}function dT(r,e){let t=e.depth-r.openStart,n=e.node(t).copy(r.content);for(let a=t-1;a>=0;a--)n=e.node(a).copy(A.from(n));return{start:n.resolveNoCache(r.openStart+t),end:n.resolveNoCache(n.content.size-r.openEnd-t)}}class Po{constructor(e,t,o){this.pos=e,this.path=t,this.parentOffset=o,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let o=this.pos-this.path[this.path.length-1],n=e.child(t);return o?e.child(t).cut(o):n}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let o=this.path[t*3],n=t==0?0:this.path[t*3-1]+1;for(let a=0;a<e;a++)n+=o.child(a).nodeSize;return n}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Z.none;if(this.textOffset)return e.child(t).marks;let o=e.maybeChild(t-1),n=e.maybeChild(t);if(!o){let s=o;o=n,n=s}let a=o.marks;for(var l=0;l<a.length;l++)a[l].type.spec.inclusive===!1&&(!n||!a[l].isInSet(n.marks))&&(a=a[l--].removeFromSet(a));return a}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let o=t.marks,n=e.parent.maybeChild(e.index());for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!n||!o[a].isInSet(n.marks))&&(o=o[a--].removeFromSet(o));return o}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let o=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);o>=0;o--)if(e.pos<=this.end(o)&&(!t||t(this.node(o))))return new qi(this,e,o);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let o=[],n=0,a=t;for(let l=e;;){let{index:s,offset:p}=l.content.findIndex(a),d=a-p;if(o.push(l,s,n+p),!d||(l=l.child(s),l.isText))break;a=d-1,n+=p+1}return new Po(t,o,a)}static resolveCached(e,t){let o=V2.get(e);if(o)for(let a=0;a<o.elts.length;a++){let l=o.elts[a];if(l.pos==t)return l}else V2.set(e,o=new cT);let n=o.elts[o.i]=Po.resolve(e,t);return o.i=(o.i+1)%mT,n}}class cT{constructor(){this.elts=[],this.i=0}}const mT=12,V2=new WeakMap;class qi{constructor(e,t,o){this.$from=e,this.$to=t,this.depth=o}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 bT=Object.create(null);let Qt=class sp{constructor(e,t,o,n=Z.none){this.type=e,this.attrs=t,this.marks=n,this.content=o||A.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,o,n=0){this.content.nodesBetween(e,t,o,n,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,o,n){return this.content.textBetween(e,t,o,n)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,o){return this.type==e&&Fi(this.attrs,t||e.defaultAttrs||bT)&&Z.sameSet(this.marks,o||Z.none)}copy(e=null){return e==this.content?this:new sp(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new sp(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,o=!1){if(e==t)return O.empty;let n=this.resolve(e),a=this.resolve(t),l=o?0:n.sharedDepth(t),s=n.start(l),d=n.node(l).content.cut(n.pos-s,a.pos-s);return new O(d,n.depth-l,a.depth-l)}replace(e,t,o){return pT(this.resolve(e),this.resolve(t),o)}nodeAt(e){for(let t=this;;){let{index:o,offset:n}=t.content.findIndex(e);if(t=t.maybeChild(o),!t)return null;if(n==e||t.isText)return t;e-=n+1}}childAfter(e){let{index:t,offset:o}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:o}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:o}=this.content.findIndex(e);if(o<e)return{node:this.content.child(t),index:t,offset:o};let n=this.content.child(t-1);return{node:n,index:t-1,offset:o-n.nodeSize}}resolve(e){return Po.resolveCached(this,e)}resolveNoCache(e){return Po.resolve(this,e)}rangeHasMark(e,t,o){let n=!1;return t>e&&this.nodesBetween(e,t,a=>(o.isInSet(a.marks)&&(n=!0),!n)),n}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),z2(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,o=A.empty,n=0,a=o.childCount){let l=this.contentMatchAt(e).matchFragment(o,n,a),s=l&&l.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let p=n;p<a;p++)if(!this.type.allowsMarks(o.child(p).marks))return!1;return!0}canReplaceWith(e,t,o,n){if(n&&!this.type.allowsMarks(n))return!1;let a=this.contentMatchAt(e).matchType(o),l=a&&a.matchFragment(this.content,t);return l?l.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Z.none;for(let t=0;t<this.marks.length;t++){let o=this.marks[t];o.type.checkAttrs(o.attrs),e=o.addToSet(e)}if(!Z.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let o;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");o=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,o)}let n=A.fromJSON(e,t.content),a=e.nodeType(t.type).create(t.attrs,n,o);return a.type.checkAttrs(a.attrs),a}};Qt.prototype.text=void 0;class Ui extends Qt{constructor(e,t,o,n){if(super(e,t,null,n),!o)throw new RangeError("Empty text nodes are not allowed");this.text=o}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):z2(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Ui(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ui(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function z2(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class kr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let o=new gT(e,t);if(o.next==null)return kr.empty;let n=O2(o);o.next&&o.err("Unexpected trailing text");let a=vT(wT(n));return kT(a,o),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,o=e.childCount){let n=this;for(let a=t;n&&a<o;a++)n=n.matchType(e.child(a).type);return n}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let o=0;o<e.next.length;o++)if(this.next[t].type==e.next[o].type)return!0;return!1}fillBefore(e,t=!1,o=0){let n=[this];function a(l,s){let p=l.matchFragment(e,o);if(p&&(!t||p.validEnd))return A.from(s.map(d=>d.createAndFill()));for(let d=0;d<l.next.length;d++){let{type:c,next:m}=l.next[d];if(!(c.isText||c.hasRequiredAttrs())&&n.indexOf(m)==-1){n.push(m);let b=a(m,s.concat(c));if(b)return b}}return null}return a(this,[])}findWrapping(e){for(let o=0;o<this.wrapCache.length;o+=2)if(this.wrapCache[o]==e)return this.wrapCache[o+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),o=[{match:this,type:null,via:null}];for(;o.length;){let n=o.shift(),a=n.match;if(a.matchType(e)){let l=[];for(let s=n;s.type;s=s.via)l.push(s.type);return l.reverse()}for(let l=0;l<a.next.length;l++){let{type:s,next:p}=a.next[l];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in t)&&(!n.type||p.validEnd)&&(o.push({match:s.contentMatch,type:s,via:n}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(o){e.push(o);for(let n=0;n<o.next.length;n++)e.indexOf(o.next[n].next)==-1&&t(o.next[n].next)}return t(this),e.map((o,n)=>{let a=n+(o.validEnd?"*":" ")+" ";for(let l=0;l<o.next.length;l++)a+=(l?", ":"")+o.next[l].type.name+"->"+e.indexOf(o.next[l].next);return a}).join(`
21
+ This will fail in production.`);s=No,s._s.has(o)||(a?Ya(o,e,n,s):C2(o,n,s),process.env.NODE_ENV!=="production"&&(l._pinia=s));const c=s._s.get(o);if(process.env.NODE_ENV!=="production"&&p){const m="__hot:"+o,b=a?Ya(m,e,n,s,!0):C2(m,Qe({},n),s,!0);p._hotUpdate(b),delete s.state.value[m],s._s.delete(m)}if(process.env.NODE_ENV!=="production"&&Kt){const m=i.getCurrentInstance();if(m&&m.proxy&&!p){const b=m.proxy,g="_pStores"in b?b._pStores:b._pStores={};g[o]=c}}return c}return l.$id=o,l}const E2=ZS("pageBuilderState",{state:()=>({componentArrayAddMethod:null,localStorageItemName:null,showModalTipTap:!1,menuRight:!0,borderStyle:null,borderWidth:null,borderColor:null,borderRadiusGlobal:null,borderRadiusTopLeft:null,borderRadiusTopRight:null,borderRadiusBottomleft:null,borderRadiusBottomRight:null,elementContainsHyperlink:null,hyperlinkAbility:null,hyperlinkInput:null,hyperlinkMessage:null,hyperlinkError:null,hyberlinkEnable:!1,openHyperlinkinkInNewTab:null,opacity:null,backgroundOpacity:null,textAreaVueModel:null,currentClasses:[],currentStyles:{},fontVerticalPadding:null,fontHorizontalPadding:null,fontVerticalMargin:null,fontHorizontalMargin:null,fontStyle:null,fontFamily:null,fontWeight:null,fontBase:null,fontDesktop:null,fontTablet:null,fontMobile:null,backgroundColor:null,textColor:null,element:null,component:null,components:[],basePrimaryImage:null,configPageBuilder:null,showModalHTMLEditor:!1,toggleGlobalHtmlMode:!1,applyImageToSelection:{src:""},currentPreviewImage:null,builderStarted:!1,isLoadingGlobal:!0,isSaving:!1,hasLocalDraftForUpdate:!1,isResumeEditing:!1,isRestoring:!1,currentLanguage:null,historyIndex:-1,historyLength:0,addComponentAddIndex:null}),getters:{getComponentArrayAddMethod(r){return r.componentArrayAddMethod},getLocalStorageItemName(r){return r.localStorageItemName},getShowModalTipTap(r){return r.showModalTipTap},getMenuRight(r){return r.menuRight},getBorderStyle(r){return r.borderStyle},getBorderWidth(r){return r.borderWidth},getBorderColor(r){return r.borderColor},getBorderRadiusGlobal(r){return r.borderRadiusGlobal},getBorderRadiusTopLeft(r){return r.borderRadiusTopLeft},getBorderRadiusTopRight(r){return r.borderRadiusTopRight},getBorderRadiusBottomleft(r){return r.borderRadiusBottomleft},getBorderRadiusBottomRight(r){return r.borderRadiusBottomRight},getElementContainsHyperlink(r){return r.elementContainsHyperlink},getHyperlinkAbility(r){return r.hyperlinkAbility},getHyperlinkInput(r){return r.hyperlinkInput},getHyperlinkMessage(r){return r.hyperlinkMessage},getHyperlinkError(r){return r.hyperlinkError},getHyberlinkEnable(r){return r.hyberlinkEnable},getOpenHyperlinkInNewTab(r){return r.openHyperlinkinkInNewTab},getOpacity(r){return r.opacity},getBackgroundOpacity(r){return r.backgroundOpacity},getTextAreaVueModel(r){return r.textAreaVueModel},getCurrentClasses(r){return r.currentClasses},getCurrentStyles(r){return r.currentStyles},getFontStyle(r){return r.fontStyle},getFontVerticalPadding(r){return r.fontVerticalPadding},getFontHorizontalPadding(r){return r.fontHorizontalPadding},getFontVerticalMargin(r){return r.fontVerticalMargin},getFontHorizontalMargin(r){return r.fontHorizontalMargin},getFontFamily(r){return r.fontFamily},getFontWeight(r){return r.fontWeight},getFontBase(r){return r.fontBase},getFontDesktop(r){return r.fontDesktop},getFontTablet(r){return r.fontTablet},getFontMobile(r){return r.fontMobile},getBackgroundColor(r){return r.backgroundColor},getTextColor(r){return r.textColor},getElement(r){return r.element},getComponent(r){return r.component},getComponents(r){return r.components},getBasePrimaryImage(r){return r.basePrimaryImage},getPageBuilderConfig(r){return r.configPageBuilder},getShowModalHTMLEditor(r){return r.showModalHTMLEditor},getToggleGlobalHtmlMode(r){return r.toggleGlobalHtmlMode},getApplyImageToSelection(r){return r.applyImageToSelection},getCurrentPreviewImage(r){return r.currentPreviewImage},getBuilderStarted:r=>r.builderStarted,getIsLoadingGlobal:r=>r.isLoadingGlobal,getIsSaving:r=>r.isSaving,getHasLocalDraftForUpdate:r=>r.hasLocalDraftForUpdate,getIsLoadingResumeEditing:r=>r.isResumeEditing,getIsRestoring:r=>r.isRestoring,getCurrentLanguage:r=>r.currentLanguage,getHistoryIndex:r=>r.historyIndex,getHistoryLength:r=>r.historyLength,getAddComponentAddIndex:r=>r.addComponentAddIndex},actions:{setComponentArrayAddMethod(r){this.componentArrayAddMethod=r},setLocalStorageItemName(r){this.localStorageItemName=r},setShowModalTipTap(r){this.showModalTipTap=r},setMenuRight(r){this.menuRight=r},setBorderStyle(r){this.borderStyle=r},setBorderWidth(r){this.borderWidth=r},setBorderColor(r){this.borderColor=r},setBorderRadiusGlobal(r){this.borderRadiusGlobal=r},setBorderRadiusTopLeft(r){this.borderRadiusTopLeft=r},setBorderRadiusTopRight(r){this.borderRadiusTopRight=r},setBorderRadiusBottomleft(r){this.borderRadiusBottomleft=r},setBorderRadiusBottomRight(r){this.borderRadiusBottomRight=r},setElementContainsHyperlink(r){this.elementContainsHyperlink=r},setHyperlinkAbility(r){this.hyperlinkAbility=r},setHyperlinkInput(r){this.hyperlinkInput=r},setHyperlinkMessage(r){this.hyperlinkMessage=r},setHyperlinkError(r){this.hyperlinkError=r},setHyberlinkEnable(r){this.hyberlinkEnable=r},setOpenHyperlinkInNewTab(r){this.openHyperlinkinkInNewTab=r},setOpacity(r){this.opacity=r},setBackgroundOpacity(r){this.backgroundOpacity=r},setTextAreaVueModel(r){this.textAreaVueModel=r},setClass(r){this.currentClasses=[...this.currentClasses,r]},removeClass(r){this.currentClasses=this.currentClasses.filter(e=>e!==r)},setCurrentClasses(r){this.currentClasses=Array.from(r)},setCurrentStyles(r){this.currentStyles=r},setFontVerticalPadding(r){this.fontVerticalPadding=r},setFontHorizontalPadding(r){this.fontHorizontalPadding=r},setFontVerticalMargin(r){this.fontVerticalMargin=r},setFontHorizontalMargin(r){this.fontHorizontalMargin=r},setFontStyle(r){this.fontStyle=r},setFontFamily(r){this.fontFamily=r},setFontWeight(r){this.fontWeight=r},setFontBase(r){this.fontBase=r},setFontDesktop(r){this.fontDesktop=r},setFontTablet(r){this.fontTablet=r},setFontMobile(r){this.fontMobile=r},setBackgroundColor(r){this.backgroundColor=r},setTextColor(r){this.textColor=r},setElement(r){this.element=null,i.nextTick(()=>{this.element=r})},setComponent(r){if(!r){this.element=null,this.component=null;return}this.component=null,i.nextTick(()=>{this.component=r})},setComponents(r){this.components=[],i.nextTick(()=>{this.components=r||[]})},setPushComponents(r){const e=r.componentArrayAddMethod??"push";e==="push"?this.components.push(r.component):e==="unshift"&&this.components.unshift(r.component)},setBasePrimaryImage(r){this.element&&(this.element.src=r??void 0),this.basePrimaryImage=r},setCurrentLayoutPreview(r){localStorage.setItem("preview",r)},setPageBuilderConfig(r){this.configPageBuilder=r},setShowModalHTMLEditor(r){this.showModalHTMLEditor=r},setToggleGlobalHtmlMode(r){this.toggleGlobalHtmlMode=r},setApplyImageToSelection(r){this.applyImageToSelection=r},setCurrentPreviewImage(r){this.currentPreviewImage=r},setBuilderStarted(r){this.builderStarted=r},setIsLoadingGlobal(r){this.isLoadingGlobal=r},setIsSaving(r){this.isSaving=r},setHasLocalDraftForUpdate(r){this.hasLocalDraftForUpdate=r},setIsLoadingResumeEditing(r){this.isResumeEditing=r},setIsRestoring(r){this.isRestoring=r},setCurrentLanguage(r){this.currentLanguage=r},setHistoryIndex(r){this.historyIndex=r},setHistoryLength(r){this.historyLength=r},setAddComponentAddIndex(r){this.addComponentAddIndex=r}}}),Xa=f2(),te=E2(Xa),Xt=function(r){return!r||typeof r=="object"&&r.constructor===Object&&Object.keys(r).length===0},$S="3.5.1",eC={class:"pbx-w-full pbx-inset-x-0 pbx-h-[90vh] pbx-bg-white pbx-overflow-x-scroll lg:pbx-pt-2 pbx-pt-2"},tC={class:"pbx-mt-4 pbx-mb-4 pbx-py-8 pbx-px-2 pbx-border pbx-border-solid pbx-border-gray-600 pbx-rounded-xl"},rC={class:"pbx-flex pbx-items-left pbx-flex-col pbx-gap-1"},oC={class:"pbx-myQuaternaryHeader"},iC={class:"pbx-myPrimaryParagraph pbx-text-xs"},nC={class:"pbx-px-2"},aC={class:"pbx-mt-8"},lC={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},sC={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},pC={class:"pbx-overflow-x-auto"},dC={class:"pbx-min-w-full"},cC={class:"pbx-bg-gray-50"},mC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},bC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},gC={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},xC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},uC={class:"pbx-min-w-[30rem] pbx-w-max"},hC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},fC={class:"pbx-min-w-[30rem] pbx-w-max"},yC={class:"pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium pbx-bg-blue-100 pbx-text-blue-800"},wC={key:0,class:"pbx-mt-4"},vC={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},kC={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},SC={class:"pbx-overflow-x-auto"},CC={class:"pbx-min-w-full"},EC={class:"pbx-bg-gray-50"},TC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},NC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},MC={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},BC={key:0},LC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},PC={class:"pbx-min-w-[30rem] pbx-w-max"},AC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},DC={class:"pbx-min-w-[30rem] pbx-w-max"},IC={key:1},VC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},zC={class:"pbx-min-w-[30rem] pbx-w-max"},OC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},_C={class:"pbx-min-w-[30rem] pbx-w-max"},RC={key:1,class:"pbx-mt-8"},HC={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},FC={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},jC={class:"pbx-overflow-x-auto"},qC={class:"pbx-min-w-full"},UC={class:"pbx-bg-gray-50"},WC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},GC={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},JC={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},KC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},YC={class:"pbx-min-w-[30rem] pbx-w-max"},XC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},QC={class:"pbx-min-w-[30rem] pbx-w-max"},ZC={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},$C={class:"pbx-min-w-[30rem] pbx-w-max"},e6={key:0,class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},t6={class:"pbx-min-w-[30rem] pbx-w-max"},r6={class:"pbx-flex pbx-items-center pbx-space-x-3"},o6=["src"],i6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},n6={class:"pbx-min-w-[30rem] pbx-w-max"},a6={key:0,class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},l6={class:"pbx-min-w-[30rem] pbx-w-max"},s6={key:2,class:"pbx-mt-8"},p6={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},d6={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},c6={class:"pbx-overflow-x-auto"},m6={class:"pbx-min-w-full"},b6={class:"pbx-bg-gray-50"},g6={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},x6={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},u6={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},h6={key:0},f6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},y6={class:"pbx-min-w-[30rem] pbx-w-max"},w6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},v6={class:"pbx-min-w-[30rem] pbx-w-max"},k6={key:1},S6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},C6={class:"pbx-min-w-[30rem] pbx-w-max"},E6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},T6={class:"pbx-min-w-[30rem] pbx-w-max"},N6={key:2},M6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},B6={class:"pbx-min-w-[30rem] pbx-w-max"},L6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},P6={class:"pbx-min-w-[30rem] pbx-w-max"},A6={key:3},D6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},I6={class:"pbx-min-w-[30rem] pbx-w-max"},V6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},z6={class:"pbx-min-w-[30rem] pbx-w-max"},O6={key:3,class:"pbx-mt-8"},_6={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},R6={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},H6={class:"pbx-overflow-x-auto"},F6={class:"pbx-min-w-full"},j6={class:"pbx-bg-gray-50"},q6={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},U6={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},W6={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},G6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},J6={class:"pbx-min-w-[30rem] pbx-w-max"},K6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},Y6={class:"pbx-min-w-[30rem] pbx-w-max"},X6={class:"pbx-flex pbx-items-center pbx-space-x-3"},Q6=["src"],Z6={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},$6={class:"pbx-min-w-[30rem] pbx-w-max"},eE={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},tE={class:"pbx-min-w-[30rem] pbx-w-max"},rE={class:"pbx-flex pbx-items-center pbx-space-x-3"},oE={class:"pbx-pr-6"},iE={class:"pbx-flex pbx-items-center pbx-space-x-3"},nE={class:"pbx-whitespace-nowrap"},aE={key:4,class:"pbx-mt-8"},lE={class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},sE={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},pE={class:"pbx-overflow-x-auto"},dE={class:"pbx-w-max"},cE={class:"pbx-bg-gray-50"},mE={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},bE={scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"},gE={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},xE={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},uE={class:"pbx-min-w-[30rem] pbx-w-max"},hE={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},fE={class:"pbx-min-w-[30rem] pbx-w-max"},yE={key:0},wE={key:1},vE={key:0},kE={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},SE={class:"pbx-min-w-[30rem] pbx-w-max"},CE={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},EE={class:"pbx-min-w-[30rem] pbx-w-max"},TE={class:"pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium"},NE={class:"pbx-mt-4 pbx-mb-4 pbx-py-8 pbx-px-2 pbx-border pbx-border-solid pbx-border-gray-600 pbx-rounded-xl"},ME={class:"pbx-flex pbx-items-left pbx-flex-col pbx-gap-1"},BE={class:"pbx-myQuaternaryHeader"},LE={class:"pbx-myPrimaryParagraph pbx-text-xs"},PE={class:"pbx-mt-4 pbx-whitespace-pre-wrap pbx-text-white pbx-overflow-hidden pbx-bg-gray-900"},AE={class:"pbx-flex bg-gray-800/40 pbx-ring-1 ring-white/5"},DE={class:"pbx-mb-px pbx-flex pbx-text-xs pbx-font-medium pbx-text-myPrimaryMediumGrayColor"},IE={class:"pbx-px-4 pbx-py-4 pbx-text-white"},VE={class:"pbx-px-4 pbx-pb-8 pbx-pt-4 pbx-text-white pbx-text-xs pbx-break-all"},zE={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-text-white"},OE=i.defineComponent({__name:"PageBuilderSettings",setup(r){const{translate:e}=ee(),t=te,o=i.computed(()=>t.getPageBuilderConfig);return(n,a)=>{var l,s,p,d,c,m,b,g,x,u,h,y,v,f,w,k;return i.openBlock(),i.createElementBlock("div",eC,[i.createElementVNode("div",tC,[i.createElementVNode("div",null,[i.createElementVNode("div",rC,[i.createElementVNode("h3",oC,i.toDisplayString(i.unref(e)("Configuration Overview")),1),i.createElementVNode("p",iC,i.toDisplayString(i.unref(e)("A summary of current user preferences, application settings, and system metadata including UI theme, language, saved components, and logo configuration.")),1)]),i.createElementVNode("div",nC,[i.createElementVNode("div",aC,[i.createElementVNode("h4",lC,i.toDisplayString(i.unref(e)("Version Information")),1),i.createElementVNode("div",sC,[i.createElementVNode("div",pC,[i.createElementVNode("table",dC,[i.createElementVNode("thead",cC,[i.createElementVNode("tr",null,[i.createElementVNode("th",mC,i.toDisplayString(i.unref(e)("App")),1),i.createElementVNode("th",bC,i.toDisplayString(i.unref(e)("Version")),1)])]),i.createElementVNode("tbody",gC,[i.createElementVNode("tr",null,[i.createElementVNode("td",xC,[i.createElementVNode("div",uC,i.toDisplayString(i.unref(e)("Page Builder")),1)]),i.createElementVNode("td",hC,[i.createElementVNode("div",fC,[i.createElementVNode("span",yC,i.toDisplayString(i.unref($S)),1)])])])])])])])]),(l=o.value)!=null&&l.resourceData&&!i.unref(Xt)(o.value.resourceData)?(i.openBlock(),i.createElementBlock("div",wC,[i.createElementVNode("h4",vC,i.toDisplayString(i.unref(e)("Resource Data")),1),i.createElementVNode("div",kC,[i.createElementVNode("div",SC,[i.createElementVNode("table",CC,[i.createElementVNode("thead",EC,[i.createElementVNode("tr",null,[i.createElementVNode("th",TC,i.toDisplayString(i.unref(e)("Property")),1),i.createElementVNode("th",NC,i.toDisplayString(i.unref(e)("Value")),1)])]),i.createElementVNode("tbody",MC,[(p=(s=o.value)==null?void 0:s.resourceData)!=null&&p.title?(i.openBlock(),i.createElementBlock("tr",BC,[i.createElementVNode("td",LC,[i.createElementVNode("div",PC,i.toDisplayString(i.unref(e)("Title")),1)]),i.createElementVNode("td",AC,[i.createElementVNode("div",DC,i.toDisplayString(o.value.resourceData.title),1)])])):i.createCommentVNode("",!0),(c=(d=o.value)==null?void 0:d.resourceData)!=null&&c.id?(i.openBlock(),i.createElementBlock("tr",IC,[i.createElementVNode("td",VC,[i.createElementVNode("div",zC,i.toDisplayString(i.unref(e)("ID")),1)]),i.createElementVNode("td",OC,[i.createElementVNode("div",_C,i.toDisplayString(o.value.resourceData.id),1)])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0),(m=o.value)!=null&&m.userForPageBuilder&&!i.unref(Xt)(o.value.userForPageBuilder)?(i.openBlock(),i.createElementBlock("div",RC,[i.createElementVNode("h4",HC,i.toDisplayString(i.unref(e)("User Information")),1),i.createElementVNode("div",FC,[i.createElementVNode("div",jC,[i.createElementVNode("table",qC,[i.createElementVNode("thead",UC,[i.createElementVNode("tr",null,[i.createElementVNode("th",WC,i.toDisplayString(i.unref(e)("Property")),1),i.createElementVNode("th",GC,i.toDisplayString(i.unref(e)("Value")),1)])]),i.createElementVNode("tbody",JC,[i.createElementVNode("tr",null,[i.createElementVNode("td",KC,[i.createElementVNode("div",YC,i.toDisplayString(i.unref(e)("User Name")),1)]),i.createElementVNode("td",XC,[i.createElementVNode("div",QC,i.toDisplayString(o.value.userForPageBuilder.name),1)])]),i.createElementVNode("tr",null,[i.createElementVNode("td",ZC,[i.createElementVNode("div",$C,i.toDisplayString(i.unref(e)("Image")),1)]),o.value.userForPageBuilder.image&&typeof o.value.userForPageBuilder.image=="string"&&o.value.userForPageBuilder.image.length>2?(i.openBlock(),i.createElementBlock("td",e6,[i.createElementVNode("div",t6,[i.createElementVNode("div",r6,[i.createElementVNode("img",{class:"pbx-block pbx-inset-0 pbx-object-top pbx-h-10 pbx-min-h-10 pbx-max-h-10 pbx-w-10 pbx-min-w-10 pbx-max-w-10 pbx-object-cover pbx-rounded-full",src:o.value.userForPageBuilder.image,alt:"image"},null,8,o6)])])])):i.createCommentVNode("",!0)]),i.createElementVNode("tr",null,[i.createElementVNode("td",i6,[i.createElementVNode("div",n6,i.toDisplayString(i.unref(e)("Image URL")),1)]),o.value.userForPageBuilder.image&&typeof o.value.userForPageBuilder.image=="string"&&o.value.userForPageBuilder.image.length>2?(i.openBlock(),i.createElementBlock("td",a6,[i.createElementVNode("div",l6,i.toDisplayString(o.value.userForPageBuilder.image),1)])):i.createCommentVNode("",!0)])])])])])])):i.createCommentVNode("",!0),(b=o.value)!=null&&b.userSettings&&!i.unref(Xt)(o.value.userSettings)?(i.openBlock(),i.createElementBlock("div",s6,[i.createElementVNode("h4",p6,i.toDisplayString(i.unref(e)("User Settings")),1),i.createElementVNode("div",d6,[i.createElementVNode("div",c6,[i.createElementVNode("table",m6,[i.createElementVNode("thead",b6,[i.createElementVNode("tr",null,[i.createElementVNode("th",g6,i.toDisplayString(i.unref(e)("Setting")),1),i.createElementVNode("th",x6,i.toDisplayString(i.unref(e)("Value")),1)])]),i.createElementVNode("tbody",u6,[(x=(g=o.value)==null?void 0:g.userSettings)!=null&&x.theme?(i.openBlock(),i.createElementBlock("tr",h6,[i.createElementVNode("td",f6,[i.createElementVNode("div",y6,i.toDisplayString(i.unref(e)("Theme")),1)]),i.createElementVNode("td",w6,[i.createElementVNode("div",v6,i.toDisplayString(o.value.userSettings.theme),1)])])):i.createCommentVNode("",!0),(h=(u=o.value)==null?void 0:u.userSettings)!=null&&h.language?(i.openBlock(),i.createElementBlock("tr",k6,[i.createElementVNode("td",S6,[i.createElementVNode("div",C6,i.toDisplayString(i.unref(e)("Language")),1)]),i.createElementVNode("td",E6,[i.createElementVNode("div",T6,i.toDisplayString(o.value.userSettings.language),1)])])):i.createCommentVNode("",!0),((v=(y=o.value)==null?void 0:y.userSettings)==null?void 0:v.autoSave)!==void 0?(i.openBlock(),i.createElementBlock("tr",N6,[i.createElementVNode("td",M6,[i.createElementVNode("div",B6,i.toDisplayString(i.unref(e)("Auto Save")),1)]),i.createElementVNode("td",L6,[i.createElementVNode("div",P6,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.userSettings.autoSave?"bg-green-100 text-green-800":"bg-red-100 text-red-800"])},i.toDisplayString(o.value.userSettings.autoSave?i.unref(e)("Enabled"):i.unref(e)("Disabled")),3)])])])):i.createCommentVNode("",!0),((w=(f=o.value)==null?void 0:f.userSettings)==null?void 0:w.notifications)!==void 0?(i.openBlock(),i.createElementBlock("tr",A6,[i.createElementVNode("td",D6,[i.createElementVNode("div",I6,i.toDisplayString(i.unref(e)("Notifications")),1)]),i.createElementVNode("td",V6,[i.createElementVNode("div",z6,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.userSettings.notifications?"bg-green-100 text-green-800":"bg-red-100 text-red-800"])},i.toDisplayString(o.value.userSettings.notifications?i.unref(e)("Enabled"):i.unref(e)("Disabled")),3)])])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0),o.value&&o.value.pageBuilderLogo&&!i.unref(Xt)(o.value.pageBuilderLogo)?(i.openBlock(),i.createElementBlock("div",O6,[i.createElementVNode("h4",_6,i.toDisplayString(i.unref(e)("Logo Configuration")),1),i.createElementVNode("div",R6,[i.createElementVNode("div",H6,[i.createElementVNode("table",F6,[i.createElementVNode("thead",j6,[i.createElementVNode("tr",null,[i.createElementVNode("th",q6,i.toDisplayString(i.unref(e)("Property")),1),i.createElementVNode("th",U6,i.toDisplayString(i.unref(e)("Value")),1)])]),i.createElementVNode("tbody",W6,[i.createElementVNode("tr",null,[i.createElementVNode("td",G6,[i.createElementVNode("div",J6,i.toDisplayString(i.unref(e)("Logo")),1)]),i.createElementVNode("td",K6,[i.createElementVNode("div",Y6,[i.createElementVNode("div",X6,[i.createElementVNode("img",{class:"pbx-h-4",src:o.value.pageBuilderLogo.src,alt:"Logo"},null,8,Q6)])])])]),i.createElementVNode("tr",null,[i.createElementVNode("td",Z6,[i.createElementVNode("div",$6,i.toDisplayString(i.unref(e)("Logo URL")),1)]),i.createElementVNode("td",eE,[i.createElementVNode("div",tE,[i.createElementVNode("div",rE,[i.createElementVNode("div",oE,[i.createElementVNode("div",iE,[i.createElementVNode("span",nE,i.toDisplayString(o.value.pageBuilderLogo.src),1)])])])])])])])])])])])):i.createCommentVNode("",!0),(k=o.value)!=null&&k.updateOrCreate&&!i.unref(Xt)(o.value.updateOrCreate)?(i.openBlock(),i.createElementBlock("div",aE,[i.createElementVNode("h4",lE,i.toDisplayString(i.unref(e)("Form Type")),1),i.createElementVNode("div",sE,[i.createElementVNode("div",pE,[i.createElementVNode("table",dE,[i.createElementVNode("thead",cE,[i.createElementVNode("tr",null,[i.createElementVNode("th",mE,i.toDisplayString(i.unref(e)("Mode")),1),i.createElementVNode("th",bE,i.toDisplayString(i.unref(e)("Description")),1)])]),i.createElementVNode("tbody",gE,[i.createElementVNode("tr",null,[i.createElementVNode("td",xE,[i.createElementVNode("div",uE,i.toDisplayString(i.unref(e)("Form Type")),1)]),i.createElementVNode("td",hE,[i.createElementVNode("div",fE,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.updateOrCreate.formType==="create"?"bg-green-100 text-green-800":"bg-blue-100 text-blue-800"])},[o.value&&o.value.updateOrCreate.formType==="create"?(i.openBlock(),i.createElementBlock("span",yE,i.toDisplayString(o.value.updateOrCreate.formType),1)):i.createCommentVNode("",!0),o.value&&o.value.updateOrCreate.formType==="update"?(i.openBlock(),i.createElementBlock("span",wE,i.toDisplayString(o.value.updateOrCreate.formType),1)):i.createCommentVNode("",!0)],2)])])]),o.value.updateOrCreate.formName&&o.value.updateOrCreate.formName.length>0?(i.openBlock(),i.createElementBlock("tr",vE,[i.createElementVNode("td",kE,[i.createElementVNode("div",SE,i.toDisplayString(i.unref(e)("Form Name")),1)]),i.createElementVNode("td",CE,[i.createElementVNode("div",EE,[i.createElementVNode("span",TE,i.toDisplayString(o.value.updateOrCreate.formName),1)])])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0)])])]),i.createElementVNode("div",NE,[i.createElementVNode("div",ME,[i.createElementVNode("h3",BE,i.toDisplayString(i.unref(e)("Complete Configuration Overview")),1),i.createElementVNode("p",LE,i.toDisplayString(i.unref(e)("Complete configuration object currently used by the Page Builder. Includes user information, branding settings, and other context-specific data needed for rendering and managing the builder environment.")),1)]),i.createElementVNode("div",PE,[i.createElementVNode("div",AE,[i.createElementVNode("div",DE,[i.createElementVNode("div",IE,i.toDisplayString(i.unref(e)("Configuration")),1)])]),i.createElementVNode("div",VE,[i.createElementVNode("p",zE," config: "+i.toDisplayString(JSON.stringify(o.value,null,4)),1)])])])])}}}),_E={key:0,class:"pbx-fixed pbx-inset-0 pbx-z-[9999]"},RE={class:"pbx-flex pbx-gap-2 pbx-justify-between pbx-items-center pbx-py-2 pbx-px-2 pbx-mb-2 pbx-border-b pbx-border-gray-200"},HE={class:"pbx-myQuaternaryHeader pbx-my-0 pbx-py-0 pbx-text-black"},FE={class:"pbx-pt-4 pbx-px-2"},jE=i.defineComponent({__name:"FloatingSidePanel",props:{title:{type:String,required:!1,default:null},showSidebarPanel:{type:Boolean,default:!1},position:{type:String,required:!0,default:"right",validator(r){const t=["left","right"].includes(r);return t||console.warn(`Invalid prop: position must be 'left' or 'right', got '${r}'`),t}}},emits:["closeSidebarPanel"],setup(r,{emit:e}){const t=e,o=()=>{t("closeSidebarPanel")};return(n,a)=>(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.Transition,{name:"popup-fade"},{default:i.withCtx(()=>[r.showSidebarPanel?(i.openBlock(),i.createElementBlock("div",_E,[i.createElementVNode("div",{class:"pbx-fixed pbx-inset-0 pbx-bg-black pbx-opacity-20 pbx-z-40",onClick:o}),i.createElementVNode("div",{class:i.normalizeClass(["pbx-font-sans pbx-fixed pbx-top-0 pbx-rounded-3xl pbx-py-2 pbx-px-2 pbx-border pbx-border-gray-200 pbx-max-h-[80vh] lg:pbx-min-h-[98%] pbx-min-h-[80vh] lg:pbx-min-w-96 lg:pbx-w-96 pbx-w-[96%] pbx-overflow-y-auto pbx-z-50 pbx-bg-white lg:pbx-mt-2 pbx-mt-2",[r.position==="left"?"pbx-left-0 pbx-ml-[1%]":"",r.position==="right"?"pbx-right-0 pbx-mr-[1%]":""]]),onClick:a[0]||(a[0]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",RE,[i.createElementVNode("span",HE,i.toDisplayString(r.title),1),i.createElementVNode("span",{onClick:o},[...a[1]||(a[1]=[i.createElementVNode("div",{class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-text-black"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," close ")],-1)])])]),i.createElementVNode("div",FE,[i.renderSlot(n.$slots,"default")])],2)])):i.createCommentVNode("",!0)]),_:3})]))}}),qE={class:"pbx-flex pbx-flex-col pbx-items-center pbx-justify-center pbx-myPrimaryGap"},UE={class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center pbx-relative"},WE={class:"pbx-overflow-y-auto"},GE={class:"pbx-flex pbx-items-center pbx-justify-center pbx-gap-2"},JE={class:"pbx-lg:pbx-text-base pbx-text-sm pbx-font-semibold pbx-text-center pbx-min-h-14 pbx-flex pbx-justify-center pbx-items-center"},KE={class:"pbx-bg-gray-100 pbx-rounded-full pbx-w-32 pbx-h-32 pbx-flex pbx-items-center pbx-justify-center"},YE={class:"pbx-text-center"},XE={class:"pbx-lg:pbx-text-7xl pbx-text-5xl"},QE={key:0,class:"pbx-w-full pbx-space-y-6"},ZE={class:"pbx-text-xl pbx-font-semibold pbx-mb-4 pbx-text-center"},$E={class:"pbx-text-sm pbx-font-semibold pbx-uppercase pbx-tracking-widest pbx-text-gray-400 pbx-mb-3 pbx-px-1"},eT={class:"pbx-space-y-3"},tT={class:"pbx-flex-shrink-0 pbx-mt-1"},rT={key:0,class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-myPrimaryLinkColor pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-white hover:pbx-text-white"},oT={key:1,class:"pbx-select-none pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-myPrimaryErrorColor pbx-aspect-square hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-white"},iT={class:"pbx-flex-1"},nT={class:"pbx-text-sm pbx-text-gray-600"},aT={key:1,class:"pbx-text-gray-500 pbx-text-center"},lT={class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center"},sT=i.defineComponent({__name:"ComponentTopMenu",setup(r){const{translate:e}=ee(),t=me(),o=i.ref(!1),n=i.ref(!1),a=i.ref(""),l=i.ref(1),s=i.ref(""),p=i.ref(""),d=i.ref(""),c=i.ref(null),m=i.ref(null),b=i.ref(null),g=i.ref(null),x=i.ref(null),u=function(){n.value=!0,a.value="delete",l.value=2,s.value=e("Remove all Components"),p.value=e("Are you sure you want to remove all Components?"),d.value=e("Close"),c.value=null,m.value=e("Delete"),b.value=function(){n.value=!1},g.value=function(){},x.value=async function(){o.value=!0,await t.clearHtmlSelection(),await t.handleFormSubmission(),await be(500),n.value=!1,o.value=!1}},h=i.ref(!1),y=function(){h.value=!1},v=function(){h.value=!0},f=i.ref(null),w=i.ref(!1),k=i.computed(()=>{if(!f.value)return[];const I=new Map;for(const M of f.value.checks){const E=M.category??"Other";I.has(E)||I.set(E,[]),I.get(E).push(M)}return Array.from(I.entries()).map(([M,E])=>({title:M,checks:E}))}),B=async function(){w.value=!w.value,w.value&&(f.value=await t.analyzeSEO())},S=function(){w.value=!1};return(I,M)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",qE,[i.createElementVNode("div",UE,[i.createElementVNode("div",{onClick:B,"pbx-bg-myPrimaryLinkColor":"",class:i.normalizeClass(["pbx-select-none pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white",{"pbx-bg-myPrimaryLinkColor pbx-text-white":w.value}])},[...M[4]||(M[4]=[i.createElementVNode("div",{class:"pbx-font-semibold pbx-text-sm"},"SEO",-1)])],2),i.createVNode(jE,{title:"SEO",showSidebarPanel:w.value,onCloseSidebarPanel:S,position:"left"},{default:i.withCtx(()=>[i.createElementVNode("div",WE,[i.createElementVNode("div",null,[i.createElementVNode("div",GE,[i.createElementVNode("div",JE,[f.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"pbx-relative pbx-my-4 pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center pbx-w-36 pbx-h-36",style:i.normalizeStyle({background:`conic-gradient(${f.value.score<50?"#ef4444":"#50C878"} ${f.value.score}%, #e5e7eb 0)`})},[i.createElementVNode("div",KE,[i.createElementVNode("div",YE,[i.createElementVNode("span",XE,i.toDisplayString(f.value.score),1),M[5]||(M[5]=i.createElementVNode("span",{class:"pbx-text-xl"},"%",-1))])])],4)):i.createCommentVNode("",!0)])]),k.value.length?(i.openBlock(),i.createElementBlock("div",QE,[i.createElementVNode("h3",ZE,i.toDisplayString(i.unref(e)("SEO Check Results")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(k.value,E=>(i.openBlock(),i.createElementBlock("div",{key:E.title},[i.createElementVNode("h4",$E,i.toDisplayString(E.title),1),i.createElementVNode("ul",eT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(E.checks,(P,V)=>(i.openBlock(),i.createElementBlock("li",{key:V,class:i.normalizeClass(["pbx-flex pbx-items-start pbx-gap-4 pbx-p-4 pbx-bg-white pbx-rounded-lg pbx-border-solid pbx-border-2",P.passed?"pbx-border-emerald-500":"pbx-border-red-600"])},[i.createElementVNode("div",tT,[P.passed?(i.openBlock(),i.createElementBlock("div",rT,[...M[6]||(M[6]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," check ",-1)])])):i.createCommentVNode("",!0),P.passed?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",oT,[...M[7]||(M[7]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," check_indeterminate_small ",-1)])]))]),i.createElementVNode("div",iT,[i.createElementVNode("p",{class:i.normalizeClass(["pbx-text-lg pbx-font-medium",P.passed?"pbx-text-green-700":"pbx-text-red-700"])},i.toDisplayString(P.check),3),i.createElementVNode("p",nT,i.toDisplayString(P.details),1)])],2))),128))])]))),128))])):(i.openBlock(),i.createElementBlock("div",aT,i.toDisplayString(i.unref(e)("No SEO checks available.")),1))])])]),_:1},8,["showSidebarPanel"])]),i.createElementVNode("div",{class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center"},[i.createElementVNode("div",{onClick:u,class:"pbx-select-none pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-myPrimaryErrorColor"},[...M[8]||(M[8]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," delete_forever ",-1)])])]),M[10]||(M[10]=i.createElementVNode("div",{class:"pbx-w-full pbx-border-t pbx-border-solid pbx-border-gray-200"},null,-1)),i.createElementVNode("div",lT,[i.createElementVNode("div",{onClick:M[0]||(M[0]=async()=>{await i.unref(t).clearHtmlSelection(),v()}),class:"pbx-select-none pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},[...M[9]||(M[9]=[i.createElementVNode("svg",{fill:"currentColor",height:"22",viewBox:"0 0 22 22",width:"22",xmlns:"http://www.w3.org/2000/svg",class:"css-1a6490m"},[i.createElementVNode("path",{"clip-rule":"evenodd",d:"M15.192 5.393A6.965 6.965 0 0012 4.071V2h-2v2.07a6.964 6.964 0 00-3.192 1.323L5.344 3.93 3.93 5.343l1.464 1.464A6.964 6.964 0 004.07 10H2v2h2.07a6.964 6.964 0 001.324 3.193L3.93 16.657l1.414 1.414 1.464-1.464A6.964 6.964 0 0010 17.929V20h2v-2.07a6.964 6.964 0 003.192-1.323l1.465 1.464 1.414-1.414-1.465-1.465A6.964 6.964 0 0017.93 12H20v-2h-2.07a6.963 6.963 0 00-1.324-3.193l1.464-1.464-1.414-1.414-1.464 1.464zM11 16a5 5 0 100-10 5 5 0 000 10z","fill-rule":"evenodd"})],-1)])])])]),i.createVNode(Bt,{showDynamicModalBuilder:n.value,type:a.value,gridColumnAmount:l.value,title:s.value,description:p.value,isLoading:o.value,firstButtonText:d.value,secondButtonText:c.value??void 0,thirdButtonText:m.value??void 0,onFirstModalButtonFunctionDynamicModalBuilder:M[1]||(M[1]=()=>{var E;return(E=b.value)==null?void 0:E.call(b)}),onSecondModalButtonFunctionDynamicModalBuilder:M[2]||(M[2]=()=>{var E;return(E=g.value)==null?void 0:E.call(g)}),onThirdModalButtonFunctionDynamicModalBuilder:M[3]||(M[3]=()=>{var E;return(E=x.value)==null?void 0:E.call(x)})},{default:i.withCtx(()=>[...M[11]||(M[11]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])]),_:1},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","isLoading","firstButtonText","secondButtonText","thirdButtonText"]),i.createVNode(Mt,{maxWidth:"5xl",showModalBuilder:h.value,title:"Main Settings",onCloseMainModalBuilder:y,minHeight:"",maxHeight:""},{default:i.withCtx(()=>[i.createVNode(OE)]),_:1},8,["showModalBuilder"])]))}});function Ee(r){this.content=r}Ee.prototype={constructor:Ee,find:function(r){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===r)return e;return-1},get:function(r){var e=this.find(r);return e==-1?void 0:this.content[e+1]},update:function(r,e,t){var o=t&&t!=r?this.remove(t):this,n=o.find(r),a=o.content.slice();return n==-1?a.push(t||r,e):(a[n+1]=e,t&&(a[n]=t)),new Ee(a)},remove:function(r){var e=this.find(r);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Ee(t)},addToStart:function(r,e){return new Ee([r,e].concat(this.remove(r).content))},addToEnd:function(r,e){var t=this.remove(r).content.slice();return t.push(r,e),new Ee(t)},addBefore:function(r,e,t){var o=this.remove(e),n=o.content.slice(),a=o.find(r);return n.splice(a==-1?n.length:a,0,e,t),new Ee(n)},forEach:function(r){for(var e=0;e<this.content.length;e+=2)r(this.content[e],this.content[e+1])},prepend:function(r){return r=Ee.from(r),r.size?new Ee(r.content.concat(this.subtract(r).content)):this},append:function(r){return r=Ee.from(r),r.size?new Ee(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var e=this;r=Ee.from(r);for(var t=0;t<r.content.length;t+=2)e=e.remove(r.content[t]);return e},toObject:function(){var r={};return this.forEach(function(e,t){r[e]=t}),r},get size(){return this.content.length>>1}},Ee.from=function(r){if(r instanceof Ee)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new Ee(e)};function T2(r,e,t){for(let o=0;;o++){if(o==r.childCount||o==e.childCount)return r.childCount==e.childCount?null:t;let n=r.child(o),a=e.child(o);if(n==a){t+=n.nodeSize;continue}if(!n.sameMarkup(a))return t;if(n.isText&&n.text!=a.text){let l=n.text,s=a.text,p=0;for(;l[p]==s[p];p++)t++;return p&&p<l.length&&p<s.length&&B2(l.charCodeAt(p-1))&&M2(l.charCodeAt(p))&&t--,t}if(n.content.size||a.content.size){let l=T2(n.content,a.content,t+1);if(l!=null)return l}t+=n.nodeSize}}function N2(r,e,t,o){for(let n=r.childCount,a=e.childCount;;){if(n==0||a==0)return n==a?null:{a:t,b:o};let l=r.child(--n),s=e.child(--a),p=l.nodeSize;if(l==s){t-=p,o-=p;continue}if(!l.sameMarkup(s))return{a:t,b:o};if(l.isText&&l.text!=s.text){let d=l.text,c=s.text,m=d.length,b=c.length;for(;m>0&&b>0&&d[m-1]==c[b-1];)m--,b--,t--,o--;return m&&b&&m<d.length&&B2(d.charCodeAt(m-1))&&M2(d.charCodeAt(m))&&(t++,o++),{a:t,b:o}}if(l.content.size||s.content.size){let d=N2(l.content,s.content,t-1,o-1);if(d)return d}t-=p,o-=p}}function M2(r){return r>=56320&&r<57344}function B2(r){return r>=55296&&r<56320}let A=class je{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let o=0;o<e.length;o++)this.size+=e[o].nodeSize}nodesBetween(e,t,o,n=0,a){for(let l=0,s=0;s<t;l++){let p=this.content[l],d=s+p.nodeSize;if(d>e&&o(p,n+s,a||null,l)!==!1&&p.content.size){let c=s+1;p.nodesBetween(Math.max(0,e-c),Math.min(p.content.size,t-c),o,n+c)}s=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,o,n){let a="",l=!0;return this.nodesBetween(e,t,(s,p)=>{let d=s.isText?s.text.slice(Math.max(e,p)-p,t-p):s.isLeaf?n?typeof n=="function"?n(s):n:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&d||s.isTextblock)&&o&&(l?l=!1:a+=o),a+=d},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,o=e.firstChild,n=this.content.slice(),a=0;for(t.isText&&t.sameMarkup(o)&&(n[n.length-1]=t.withText(t.text+o.text),a=1);a<e.content.length;a++)n.push(e.content[a]);return new je(n,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let o=[],n=0;if(t>e)for(let a=0,l=0;l<t;a++){let s=this.content[a],p=l+s.nodeSize;p>e&&((l<e||p>t)&&(s.isText?s=s.cut(Math.max(0,e-l),Math.min(s.text.length,t-l)):s=s.cut(Math.max(0,e-l-1),Math.min(s.content.size,t-l-1))),o.push(s),n+=s.nodeSize),l=p}return new je(o,n)}cutByIndex(e,t){return e==t?je.empty:e==0&&t==this.content.length?this:new je(this.content.slice(e,t))}replaceChild(e,t){let o=this.content[e];if(o==t)return this;let n=this.content.slice(),a=this.size+t.nodeSize-o.nodeSize;return n[e]=t,new je(n,a)}addToStart(e){return new je([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new je(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,o=0;t<this.content.length;t++){let n=this.content[t];e(n,o,t),o+=n.nodeSize}}findDiffStart(e,t=0){return T2(this,e,t)}findDiffEnd(e,t=this.size,o=e.size){return N2(this,e,t,o)}findIndex(e){if(e==0)return Hi(0,e);if(e==this.size)return Hi(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,o=0;;t++){let n=this.child(t),a=o+n.nodeSize;if(a>=e)return a==e?Hi(t+1,a):Hi(t,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return je.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return je.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return je.empty;let t,o=0;for(let n=0;n<e.length;n++){let a=e[n];o+=a.nodeSize,n&&a.isText&&e[n-1].sameMarkup(a)?(t||(t=e.slice(0,n)),t[t.length-1]=a.withText(t[t.length-1].text+a.text)):t&&t.push(a)}return new je(t||e,o)}static from(e){if(!e)return je.empty;if(e instanceof je)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new je([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};A.empty=new A([],0);const Qa={index:0,offset:0};function Hi(r,e){return Qa.index=r,Qa.offset=e,Qa}function Fi(r,e){if(r===e)return!0;if(!(r&&typeof r=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(r);if(Array.isArray(e)!=t)return!1;if(t){if(r.length!=e.length)return!1;for(let o=0;o<r.length;o++)if(!Fi(r[o],e[o]))return!1}else{for(let o in r)if(!(o in e)||!Fi(r[o],e[o]))return!1;for(let o in e)if(!(o in r))return!1}return!0}let Z=class lp{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,o=!1;for(let n=0;n<e.length;n++){let a=e[n];if(this.eq(a))return e;if(this.type.excludes(a.type))t||(t=e.slice(0,n));else{if(a.type.excludes(this.type))return e;!o&&a.type.rank>this.type.rank&&(t||(t=e.slice(0,n)),t.push(this),o=!0),t&&t.push(a)}}return t||(t=e.slice()),o||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Fi(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let o=e.marks[t.type];if(!o)throw new RangeError(`There is no mark type ${t.type} in this schema`);let n=o.create(t.attrs);return o.checkAttrs(n.attrs),n}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let o=0;o<e.length;o++)if(!e[o].eq(t[o]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return lp.none;if(e instanceof lp)return[e];let t=e.slice();return t.sort((o,n)=>o.type.rank-n.type.rank),t}};Z.none=[];let Bo=class extends Error{},O=class So{constructor(e,t,o){this.content=e,this.openStart=t,this.openEnd=o}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let o=P2(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return o&&new So(o,this.openStart,this.openEnd)}removeBetween(e,t){return new So(L2(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return So.empty;let o=t.openStart||0,n=t.openEnd||0;if(typeof o!="number"||typeof n!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new So(A.fromJSON(e,t.content),o,n)}static maxOpen(e,t=!0){let o=0,n=0;for(let a=e.firstChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.firstChild)o++;for(let a=e.lastChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.lastChild)n++;return new So(e,o,n)}};O.empty=new O(A.empty,0,0);function L2(r,e,t){let{index:o,offset:n}=r.findIndex(e),a=r.maybeChild(o),{index:l,offset:s}=r.findIndex(t);if(n==e||a.isText){if(s!=t&&!r.child(l).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(o!=l)throw new RangeError("Removing non-flat range");return r.replaceChild(o,a.copy(L2(a.content,e-n-1,t-n-1)))}function P2(r,e,t,o,n,a){let{index:l,offset:s}=r.findIndex(e),p=r.maybeChild(l);if(s==e||p.isText)return a&&o<=0&&n<=0&&!a.canReplace(l,l,t)?null:r.cut(0,e).append(t).append(r.cut(e));let d=P2(p.content,e-s-1,t,l==0?o-1:0,l==r.childCount-1?n-1:0,p);return d&&r.replaceChild(l,p.copy(d))}function pT(r,e,t){if(t.openStart>r.depth)throw new Bo("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new Bo("Inconsistent open depths");return A2(r,e,t,0)}function A2(r,e,t,o){let n=r.index(o),a=r.node(o);if(n==e.index(o)&&o<r.depth-t.openStart){let l=A2(r,e,t,o+1);return a.copy(a.content.replaceChild(n,l))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&r.depth==o&&e.depth==o){let l=r.parent,s=l.content;return vr(l,s.cut(0,r.parentOffset).append(t.content).append(s.cut(e.parentOffset)))}else{let{start:l,end:s}=dT(t,r);return vr(a,I2(r,l,s,e,o))}else return vr(a,ji(r,e,o))}function D2(r,e){if(!e.type.compatibleContent(r.type))throw new Bo("Cannot join "+e.type.name+" onto "+r.type.name)}function Za(r,e,t){let o=r.node(t);return D2(o,e.node(t)),o}function wr(r,e){let t=e.length-1;t>=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function Lo(r,e,t,o){let n=(e||r).node(t),a=0,l=e?e.index(t):n.childCount;r&&(a=r.index(t),r.depth>t?a++:r.textOffset&&(wr(r.nodeAfter,o),a++));for(let s=a;s<l;s++)wr(n.child(s),o);e&&e.depth==t&&e.textOffset&&wr(e.nodeBefore,o)}function vr(r,e){if(!r.type.validContent(e))throw new Bo("Invalid content for node "+r.type.name);return r.copy(e)}function I2(r,e,t,o,n){let a=r.depth>n&&Za(r,e,n+1),l=o.depth>n&&Za(t,o,n+1),s=[];return Lo(null,r,n,s),a&&l&&e.index(n)==t.index(n)?(D2(a,l),wr(vr(a,I2(r,e,t,o,n+1)),s)):(a&&wr(vr(a,ji(r,e,n+1)),s),Lo(e,t,n,s),l&&wr(vr(l,ji(t,o,n+1)),s)),Lo(o,null,n,s),new A(s)}function ji(r,e,t){let o=[];if(Lo(null,r,t,o),r.depth>t){let n=Za(r,e,t+1);wr(vr(n,ji(r,e,t+1)),o)}return Lo(e,null,t,o),new A(o)}function dT(r,e){let t=e.depth-r.openStart,n=e.node(t).copy(r.content);for(let a=t-1;a>=0;a--)n=e.node(a).copy(A.from(n));return{start:n.resolveNoCache(r.openStart+t),end:n.resolveNoCache(n.content.size-r.openEnd-t)}}class Po{constructor(e,t,o){this.pos=e,this.path=t,this.parentOffset=o,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let o=this.pos-this.path[this.path.length-1],n=e.child(t);return o?e.child(t).cut(o):n}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let o=this.path[t*3],n=t==0?0:this.path[t*3-1]+1;for(let a=0;a<e;a++)n+=o.child(a).nodeSize;return n}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Z.none;if(this.textOffset)return e.child(t).marks;let o=e.maybeChild(t-1),n=e.maybeChild(t);if(!o){let s=o;o=n,n=s}let a=o.marks;for(var l=0;l<a.length;l++)a[l].type.spec.inclusive===!1&&(!n||!a[l].isInSet(n.marks))&&(a=a[l--].removeFromSet(a));return a}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let o=t.marks,n=e.parent.maybeChild(e.index());for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!n||!o[a].isInSet(n.marks))&&(o=o[a--].removeFromSet(o));return o}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let o=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);o>=0;o--)if(e.pos<=this.end(o)&&(!t||t(this.node(o))))return new qi(this,e,o);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let o=[],n=0,a=t;for(let l=e;;){let{index:s,offset:p}=l.content.findIndex(a),d=a-p;if(o.push(l,s,n+p),!d||(l=l.child(s),l.isText))break;a=d-1,n+=p+1}return new Po(t,o,a)}static resolveCached(e,t){let o=V2.get(e);if(o)for(let a=0;a<o.elts.length;a++){let l=o.elts[a];if(l.pos==t)return l}else V2.set(e,o=new cT);let n=o.elts[o.i]=Po.resolve(e,t);return o.i=(o.i+1)%mT,n}}class cT{constructor(){this.elts=[],this.i=0}}const mT=12,V2=new WeakMap;class qi{constructor(e,t,o){this.$from=e,this.$to=t,this.depth=o}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 bT=Object.create(null);let Qt=class sp{constructor(e,t,o,n=Z.none){this.type=e,this.attrs=t,this.marks=n,this.content=o||A.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,o,n=0){this.content.nodesBetween(e,t,o,n,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,o,n){return this.content.textBetween(e,t,o,n)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,o){return this.type==e&&Fi(this.attrs,t||e.defaultAttrs||bT)&&Z.sameSet(this.marks,o||Z.none)}copy(e=null){return e==this.content?this:new sp(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new sp(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,o=!1){if(e==t)return O.empty;let n=this.resolve(e),a=this.resolve(t),l=o?0:n.sharedDepth(t),s=n.start(l),d=n.node(l).content.cut(n.pos-s,a.pos-s);return new O(d,n.depth-l,a.depth-l)}replace(e,t,o){return pT(this.resolve(e),this.resolve(t),o)}nodeAt(e){for(let t=this;;){let{index:o,offset:n}=t.content.findIndex(e);if(t=t.maybeChild(o),!t)return null;if(n==e||t.isText)return t;e-=n+1}}childAfter(e){let{index:t,offset:o}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:o}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:o}=this.content.findIndex(e);if(o<e)return{node:this.content.child(t),index:t,offset:o};let n=this.content.child(t-1);return{node:n,index:t-1,offset:o-n.nodeSize}}resolve(e){return Po.resolveCached(this,e)}resolveNoCache(e){return Po.resolve(this,e)}rangeHasMark(e,t,o){let n=!1;return t>e&&this.nodesBetween(e,t,a=>(o.isInSet(a.marks)&&(n=!0),!n)),n}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),z2(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,o=A.empty,n=0,a=o.childCount){let l=this.contentMatchAt(e).matchFragment(o,n,a),s=l&&l.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let p=n;p<a;p++)if(!this.type.allowsMarks(o.child(p).marks))return!1;return!0}canReplaceWith(e,t,o,n){if(n&&!this.type.allowsMarks(n))return!1;let a=this.contentMatchAt(e).matchType(o),l=a&&a.matchFragment(this.content,t);return l?l.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Z.none;for(let t=0;t<this.marks.length;t++){let o=this.marks[t];o.type.checkAttrs(o.attrs),e=o.addToSet(e)}if(!Z.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let o;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");o=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,o)}let n=A.fromJSON(e,t.content),a=e.nodeType(t.type).create(t.attrs,n,o);return a.type.checkAttrs(a.attrs),a}};Qt.prototype.text=void 0;class Ui extends Qt{constructor(e,t,o,n){if(super(e,t,null,n),!o)throw new RangeError("Empty text nodes are not allowed");this.text=o}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):z2(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Ui(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ui(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function z2(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class kr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let o=new gT(e,t);if(o.next==null)return kr.empty;let n=O2(o);o.next&&o.err("Unexpected trailing text");let a=vT(wT(n));return kT(a,o),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,o=e.childCount){let n=this;for(let a=t;n&&a<o;a++)n=n.matchType(e.child(a).type);return n}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let o=0;o<e.next.length;o++)if(this.next[t].type==e.next[o].type)return!0;return!1}fillBefore(e,t=!1,o=0){let n=[this];function a(l,s){let p=l.matchFragment(e,o);if(p&&(!t||p.validEnd))return A.from(s.map(d=>d.createAndFill()));for(let d=0;d<l.next.length;d++){let{type:c,next:m}=l.next[d];if(!(c.isText||c.hasRequiredAttrs())&&n.indexOf(m)==-1){n.push(m);let b=a(m,s.concat(c));if(b)return b}}return null}return a(this,[])}findWrapping(e){for(let o=0;o<this.wrapCache.length;o+=2)if(this.wrapCache[o]==e)return this.wrapCache[o+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),o=[{match:this,type:null,via:null}];for(;o.length;){let n=o.shift(),a=n.match;if(a.matchType(e)){let l=[];for(let s=n;s.type;s=s.via)l.push(s.type);return l.reverse()}for(let l=0;l<a.next.length;l++){let{type:s,next:p}=a.next[l];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in t)&&(!n.type||p.validEnd)&&(o.push({match:s.contentMatch,type:s,via:n}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(o){e.push(o);for(let n=0;n<o.next.length;n++)e.indexOf(o.next[n].next)==-1&&t(o.next[n].next)}return t(this),e.map((o,n)=>{let a=n+(o.validEnd?"*":" ")+" ";for(let l=0;l<o.next.length;l++)a+=(l?", ":"")+o.next[l].type.name+"->"+e.indexOf(o.next[l].next);return a}).join(`
22
22
  `)}}kr.empty=new kr(!0);class gT{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function O2(r){let e=[];do e.push(xT(r));while(r.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function xT(r){let e=[];do e.push(uT(r));while(r.next&&r.next!=")"&&r.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function uT(r){let e=yT(r);for(;;)if(r.eat("+"))e={type:"plus",expr:e};else if(r.eat("*"))e={type:"star",expr:e};else if(r.eat("?"))e={type:"opt",expr:e};else if(r.eat("{"))e=hT(r,e);else break;return e}function _2(r){/\D/.test(r.next)&&r.err("Expected number, got '"+r.next+"'");let e=Number(r.next);return r.pos++,e}function hT(r,e){let t=_2(r),o=t;return r.eat(",")&&(r.next!="}"?o=_2(r):o=-1),r.eat("}")||r.err("Unclosed braced range"),{type:"range",min:t,max:o,expr:e}}function fT(r,e){let t=r.nodeTypes,o=t[e];if(o)return[o];let n=[];for(let a in t){let l=t[a];l.isInGroup(e)&&n.push(l)}return n.length==0&&r.err("No node type or group '"+e+"' found"),n}function yT(r){if(r.eat("(")){let e=O2(r);return r.eat(")")||r.err("Missing closing paren"),e}else if(/\W/.test(r.next))r.err("Unexpected token '"+r.next+"'");else{let e=fT(r,r.next).map(t=>(r.inline==null?r.inline=t.isInline:r.inline!=t.isInline&&r.err("Mixing inline and block content"),{type:"name",value:t}));return r.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function wT(r){let e=[[]];return n(a(r,0),t()),e;function t(){return e.push([])-1}function o(l,s,p){let d={term:p,to:s};return e[l].push(d),d}function n(l,s){l.forEach(p=>p.to=s)}function a(l,s){if(l.type=="choice")return l.exprs.reduce((p,d)=>p.concat(a(d,s)),[]);if(l.type=="seq")for(let p=0;;p++){let d=a(l.exprs[p],s);if(p==l.exprs.length-1)return d;n(d,s=t())}else if(l.type=="star"){let p=t();return o(s,p),n(a(l.expr,p),p),[o(p)]}else if(l.type=="plus"){let p=t();return n(a(l.expr,s),p),n(a(l.expr,p),p),[o(p)]}else{if(l.type=="opt")return[o(s)].concat(a(l.expr,s));if(l.type=="range"){let p=s;for(let d=0;d<l.min;d++){let c=t();n(a(l.expr,p),c),p=c}if(l.max==-1)n(a(l.expr,p),p);else for(let d=l.min;d<l.max;d++){let c=t();o(p,c),n(a(l.expr,p),c),p=c}return[o(p)]}else{if(l.type=="name")return[o(s,void 0,l.value)];throw new Error("Unknown expr type")}}}}function R2(r,e){return e-r}function H2(r,e){let t=[];return o(e),t.sort(R2);function o(n){let a=r[n];if(a.length==1&&!a[0].term)return o(a[0].to);t.push(n);for(let l=0;l<a.length;l++){let{term:s,to:p}=a[l];!s&&t.indexOf(p)==-1&&o(p)}}}function vT(r){let e=Object.create(null);return t(H2(r,0));function t(o){let n=[];o.forEach(l=>{r[l].forEach(({term:s,to:p})=>{if(!s)return;let d;for(let c=0;c<n.length;c++)n[c][0]==s&&(d=n[c][1]);H2(r,p).forEach(c=>{d||n.push([s,d=[]]),d.indexOf(c)==-1&&d.push(c)})})});let a=e[o.join(",")]=new kr(o.indexOf(r.length-1)>-1);for(let l=0;l<n.length;l++){let s=n[l][1].sort(R2);a.next.push({type:n[l][0],next:e[s.join(",")]||t(s)})}return a}}function kT(r,e){for(let t=0,o=[r];t<o.length;t++){let n=o[t],a=!n.validEnd,l=[];for(let s=0;s<n.next.length;s++){let{type:p,next:d}=n.next[s];l.push(p.name),a&&!(p.isText||p.hasRequiredAttrs())&&(a=!1),o.indexOf(d)==-1&&o.push(d)}a&&e.err("Only non-generatable nodes ("+l.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function F2(r){let e=Object.create(null);for(let t in r){let o=r[t];if(!o.hasDefault)return null;e[t]=o.default}return e}function j2(r,e){let t=Object.create(null);for(let o in r){let n=e&&e[o];if(n===void 0){let a=r[o];if(a.hasDefault)n=a.default;else throw new RangeError("No value supplied for attribute "+o)}t[o]=n}return t}function q2(r,e,t,o){for(let n in e)if(!(n in r))throw new RangeError(`Unsupported attribute ${n} for ${t} of type ${o}`);for(let n in r)r[n].validate&&r[n].validate(e[n])}function U2(r,e){let t=Object.create(null);if(e)for(let o in e)t[o]=new CT(r,o,e[o]);return t}let W2=class j4{constructor(e,t,o){this.name=e,this.schema=t,this.spec=o,this.markSet=null,this.groups=o.group?o.group.split(" "):[],this.attrs=U2(e,o.attrs),this.defaultAttrs=F2(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(o.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==kr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:j2(this.attrs,e)}create(e=null,t,o){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Qt(this,this.computeAttrs(e),A.from(t),Z.setFrom(o))}createChecked(e=null,t,o){return t=A.from(t),this.checkContent(t),new Qt(this,this.computeAttrs(e),t,Z.setFrom(o))}createAndFill(e=null,t,o){if(e=this.computeAttrs(e),t=A.from(t),t.size){let l=this.contentMatch.fillBefore(t);if(!l)return null;t=l.append(t)}let n=this.contentMatch.matchFragment(t),a=n&&n.fillBefore(A.empty,!0);return a?new Qt(this,e,t.append(a),Z.setFrom(o)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let o=0;o<e.childCount;o++)if(!this.allowsMarks(e.child(o).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){q2(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let o=0;o<e.length;o++)this.allowsMarkType(e[o].type)?t&&t.push(e[o]):t||(t=e.slice(0,o));return t?t.length?t:Z.none:e}static compile(e,t){let o=Object.create(null);e.forEach((a,l)=>o[a]=new j4(a,t,l));let n=t.spec.topNode||"doc";if(!o[n])throw new RangeError("Schema is missing its top node type ('"+n+"')");if(!o.text)throw new RangeError("Every schema needs a 'text' type");for(let a in o.text.attrs)throw new RangeError("The text node type should not have attributes");return o}};function ST(r,e,t){let o=t.split("|");return n=>{let a=n===null?"null":typeof n;if(o.indexOf(a)<0)throw new RangeError(`Expected value of type ${o} for attribute ${e} on type ${r}, got ${a}`)}}class CT{constructor(e,t,o){this.hasDefault=Object.prototype.hasOwnProperty.call(o,"default"),this.default=o.default,this.validate=typeof o.validate=="string"?ST(e,t,o.validate):o.validate}get isRequired(){return!this.hasDefault}}class Wi{constructor(e,t,o,n){this.name=e,this.rank=t,this.schema=o,this.spec=n,this.attrs=U2(e,n.attrs),this.excluded=null;let a=F2(this.attrs);this.instance=a?new Z(this,a):null}create(e=null){return!e&&this.instance?this.instance:new Z(this,j2(this.attrs,e))}static compile(e,t){let o=Object.create(null),n=0;return e.forEach((a,l)=>o[a]=new Wi(a,n++,t,l)),o}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){q2(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class G2{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=Ee.from(e.nodes),t.marks=Ee.from(e.marks||{}),this.nodes=W2.compile(this.spec.nodes,this),this.marks=Wi.compile(this.spec.marks,this);let o=Object.create(null);for(let n in this.nodes){if(n in this.marks)throw new RangeError(n+" can not be both a node and a mark");let a=this.nodes[n],l=a.spec.content||"",s=a.spec.marks;if(a.contentMatch=o[l]||(o[l]=kr.parse(l,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=s=="_"?null:s?J2(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let n in this.marks){let a=this.marks[n],l=a.spec.excludes;a.excluded=l==null?[a]:l==""?[]:J2(this,l.split(" "))}this.nodeFromJSON=n=>Qt.fromJSON(this,n),this.markFromJSON=n=>Z.fromJSON(this,n),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,o,n){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof W2){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,o,n)}text(e,t){let o=this.nodes.text;return new Ui(o,o.defaultAttrs,e,Z.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function J2(r,e){let t=[];for(let o=0;o<e.length;o++){let n=e[o],a=r.marks[n],l=a;if(a)t.push(a);else for(let s in r.marks){let p=r.marks[s];(n=="_"||p.spec.group&&p.spec.group.split(" ").indexOf(n)>-1)&&t.push(l=p)}if(!l)throw new SyntaxError("Unknown mark type: '"+e[o]+"'")}return t}function ET(r){return r.tag!=null}function TT(r){return r.style!=null}let Ao=class pp{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let o=this.matchedStyles=[];t.forEach(n=>{if(ET(n))this.tags.push(n);else if(TT(n)){let a=/[^=]*/.exec(n.style)[0];o.indexOf(a)<0&&o.push(a),this.styles.push(n)}}),this.normalizeLists=!this.tags.some(n=>{if(!/^(ul|ol)\b/.test(n.tag)||!n.node)return!1;let a=e.nodes[n.node];return a.contentMatch.matchType(a)})}parse(e,t={}){let o=new Q2(this,t,!1);return o.addAll(e,Z.none,t.from,t.to),o.finish()}parseSlice(e,t={}){let o=new Q2(this,t,!0);return o.addAll(e,Z.none,t.from,t.to),O.maxOpen(o.finish())}matchTag(e,t,o){for(let n=o?this.tags.indexOf(o)+1:0;n<this.tags.length;n++){let a=this.tags[n];if(BT(e,a.tag)&&(a.namespace===void 0||e.namespaceURI==a.namespace)&&(!a.context||t.matchesContext(a.context))){if(a.getAttrs){let l=a.getAttrs(e);if(l===!1)continue;a.attrs=l||void 0}return a}}}matchStyle(e,t,o,n){for(let a=n?this.styles.indexOf(n)+1:0;a<this.styles.length;a++){let l=this.styles[a],s=l.style;if(!(s.indexOf(e)!=0||l.context&&!o.matchesContext(l.context)||s.length>e.length&&(s.charCodeAt(e.length)!=61||s.slice(e.length+1)!=t))){if(l.getAttrs){let p=l.getAttrs(t);if(p===!1)continue;l.attrs=p||void 0}return l}}}static schemaRules(e){let t=[];function o(n){let a=n.priority==null?50:n.priority,l=0;for(;l<t.length;l++){let s=t[l];if((s.priority==null?50:s.priority)<a)break}t.splice(l,0,n)}for(let n in e.marks){let a=e.marks[n].spec.parseDOM;a&&a.forEach(l=>{o(l=Z2(l)),l.mark||l.ignore||l.clearMark||(l.mark=n)})}for(let n in e.nodes){let a=e.nodes[n].spec.parseDOM;a&&a.forEach(l=>{o(l=Z2(l)),l.node||l.ignore||l.mark||(l.node=n)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new pp(e,pp.schemaRules(e)))}};const K2={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},NT={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Y2={ol:!0,ul:!0},Do=1,$a=2,Io=4;function X2(r,e,t){return e!=null?(e?Do:0)|(e==="full"?$a:0):r&&r.whitespace=="pre"?Do|$a:t&~Io}class Gi{constructor(e,t,o,n,a,l){this.type=e,this.attrs=t,this.marks=o,this.solid=n,this.options=l,this.content=[],this.activeMarks=Z.none,this.match=a||(l&Io?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(A.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let o=this.type.contentMatch,n;return(n=o.findWrapping(e.type))?(this.match=o,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Do)){let o=this.content[this.content.length-1],n;if(o&&o.isText&&(n=/[ \t\r\n\u000c]+$/.exec(o.text))){let a=o;o.text.length==n[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-n[0].length))}}let t=A.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(A.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!K2.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Q2{constructor(e,t,o){this.parser=e,this.options=t,this.isOpen=o,this.open=0,this.localPreserveWS=!1;let n=t.topNode,a,l=X2(null,t.preserveWhitespace,0)|(o?Io:0);n?a=new Gi(n.type,n.attrs,Z.none,!0,t.topMatch||n.type.contentMatch,l):o?a=new Gi(null,null,Z.none,!0,null,l):a=new Gi(e.schema.topNodeType,null,Z.none,!0,null,l),this.nodes=[a],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let o=e.nodeValue,n=this.top,a=n.options&$a?"full":this.localPreserveWS||(n.options&Do)>0,{schema:l}=this.parser;if(a==="full"||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(o)){if(a)if(a==="full")o=o.replace(/\r\n?/g,`
23
23
  `);else if(l.linebreakReplacement&&/[\r\n]/.test(o)&&this.top.findWrapping(l.linebreakReplacement.create())){let s=o.split(/\r?\n|\r/);for(let p=0;p<s.length;p++)p&&this.insertNode(l.linebreakReplacement.create(),t,!0),s[p]&&this.insertNode(l.text(s[p]),t,!/\S/.test(s[p]));o=""}else o=o.replace(/\r?\n|\r/g," ");else if(o=o.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(o)&&this.open==this.nodes.length-1){let s=n.content[n.content.length-1],p=e.previousSibling;(!s||p&&p.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(o=o.slice(1))}o&&this.insertNode(l.text(o),t,!/\S/.test(o)),this.findInText(e)}else this.findInside(e)}addElement(e,t,o){let n=this.localPreserveWS,a=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let l=e.nodeName.toLowerCase(),s;Y2.hasOwnProperty(l)&&this.parser.normalizeLists&&MT(e);let p=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,o));e:if(p?p.ignore:NT.hasOwnProperty(l))this.findInside(e),this.ignoreFallback(e,t);else if(!p||p.skip||p.closeParent){p&&p.closeParent?this.open=Math.max(0,this.open-1):p&&p.skip.nodeType&&(e=p.skip);let d,c=this.needsBlock;if(K2.hasOwnProperty(l))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),d=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let m=p&&p.skip?t:this.readStyles(e,t);m&&this.addAll(e,m),d&&this.sync(a),this.needsBlock=c}else{let d=this.readStyles(e,t);d&&this.addElementByRule(e,p,d,p.consuming===!1?s:void 0)}this.localPreserveWS=n}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
24
24
  `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let o=e.style;if(o&&o.length)for(let n=0;n<this.parser.matchedStyles.length;n++){let a=this.parser.matchedStyles[n],l=o.getPropertyValue(a);if(l)for(let s=void 0;;){let p=this.parser.matchStyle(a,l,this,s);if(!p)break;if(p.ignore)return null;if(p.clearMark?t=t.filter(d=>!p.clearMark(d)):t=t.concat(this.parser.schema.marks[p.mark].create(p.attrs)),p.consuming===!1)s=p;else break}}return t}addElementByRule(e,t,o,n){let a,l;if(t.node)if(l=this.parser.schema.nodes[t.node],l.isLeaf)this.insertNode(l.create(t.attrs),o,e.nodeName=="BR")||this.leafFallback(e,o);else{let p=this.enter(l,t.attrs||null,o,t.preserveWhitespace);p&&(a=!0,o=p)}else{let p=this.parser.schema.marks[t.mark];o=o.concat(p.create(t.attrs))}let s=this.top;if(l&&l.isLeaf)this.findInside(e);else if(n)this.addElement(e,o,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(p=>this.insertNode(p,o,!1));else{let p=e;typeof t.contentElement=="string"?p=e.querySelector(t.contentElement):typeof t.contentElement=="function"?p=t.contentElement(e):t.contentElement&&(p=t.contentElement),this.findAround(e,p,!0),this.addAll(p,o),this.findAround(e,p,!1)}a&&this.sync(s)&&this.open--}addAll(e,t,o,n){let a=o||0;for(let l=o?e.childNodes[o]:e.firstChild,s=n==null?null:e.childNodes[n];l!=s;l=l.nextSibling,++a)this.findAtPoint(e,a),this.addDOM(l,t);this.findAtPoint(e,a)}findPlace(e,t,o){let n,a;for(let l=this.open,s=0;l>=0;l--){let p=this.nodes[l],d=p.findWrapping(e);if(d&&(!n||n.length>d.length+s)&&(n=d,a=p,!d.length))break;if(p.solid){if(o)break;s+=2}}if(!n)return null;this.sync(a);for(let l=0;l<n.length;l++)t=this.enterInner(n[l],null,t,!1);return t}insertNode(e,t,o){if(e.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(t=this.enterInner(a,null,t))}let n=this.findPlace(e,t,o);if(n){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(e.type));let l=Z.none;for(let s of n.concat(e.marks))(a.type?a.type.allowsMarkType(s.type):$2(s.type,e.type))&&(l=s.addToSet(l));return a.content.push(e.mark(l)),!0}return!1}enter(e,t,o,n){let a=this.findPlace(e.create(t),o,!1);return a&&(a=this.enterInner(e,t,o,!0,n)),a}enterInner(e,t,o,n=!1,a){this.closeExtra();let l=this.top;l.match=l.match&&l.match.matchType(e);let s=X2(e,a,l.options);l.options&Io&&l.content.length==0&&(s|=Io);let p=Z.none;return o=o.filter(d=>(l.type?l.type.allowsMarkType(d.type):$2(d.type,e))?(p=d.addToSet(p),!1):!0),this.nodes.push(new Gi(e,t,p,n,null,s)),this.open++,o}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));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(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Do)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let o=this.nodes[t].content;for(let n=o.length-1;n>=0;n--)e+=o[n].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let o=0;o<this.find.length;o++)this.find[o].node==e&&this.find[o].offset==t&&(this.find[o].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,o){if(e!=t&&this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&t.compareDocumentPosition(this.find[n].node)&(o?2:4)&&(this.find[n].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),o=this.options.context,n=!this.isOpen&&(!o||o.parent.type==this.nodes[0].type),a=-(o?o.depth+1:0)+(n?0:1),l=(s,p)=>{for(;s>=0;s--){let d=t[s];if(d==""){if(s==t.length-1||s==0)continue;for(;p>=a;p--)if(l(s-1,p))return!0;return!1}else{let c=p>0||p==0&&n?this.nodes[p].type:o&&p>=a?o.node(p-a).type:null;if(!c||c.name!=d&&!c.isInGroup(d))return!1;p--}}return!0};return l(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let o=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(o&&o.isTextblock&&o.defaultAttrs)return o}for(let t in this.parser.schema.nodes){let o=this.parser.schema.nodes[t];if(o.isTextblock&&o.defaultAttrs)return o}}}function MT(r){for(let e=r.firstChild,t=null;e;e=e.nextSibling){let o=e.nodeType==1?e.nodeName.toLowerCase():null;o&&Y2.hasOwnProperty(o)&&t?(t.appendChild(e),e=t):o=="li"?t=e:o&&(t=null)}}function BT(r,e){return(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,e)}function Z2(r){let e={};for(let t in r)e[t]=r[t];return e}function $2(r,e){let t=e.schema.nodes;for(let o in t){let n=t[o];if(!n.allowsMarkType(r))continue;let a=[],l=s=>{a.push(s);for(let p=0;p<s.edgeCount;p++){let{type:d,next:c}=s.edge(p);if(d==e||a.indexOf(c)<0&&l(c))return!0}};if(l(n.contentMatch))return!0}}class Sr{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},o){o||(o=Ji(t).createDocumentFragment());let n=o,a=[];return e.forEach(l=>{if(a.length||l.marks.length){let s=0,p=0;for(;s<a.length&&p<l.marks.length;){let d=l.marks[p];if(!this.marks[d.type.name]){p++;continue}if(!d.eq(a[s][0])||d.type.spec.spanning===!1)break;s++,p++}for(;s<a.length;)n=a.pop()[1];for(;p<l.marks.length;){let d=l.marks[p++],c=this.serializeMark(d,l.isInline,t);c&&(a.push([d,n]),n.appendChild(c.dom),n=c.contentDOM||c.dom)}}n.appendChild(this.serializeNodeInner(l,t))}),o}serializeNodeInner(e,t){if(e.isText)return Ji(t).createTextNode(e.text);let{dom:o,contentDOM:n}=Ki(Ji(t),this.nodes[e.type.name](e),null,e.attrs);if(n){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,n)}return o}serializeNode(e,t={}){let o=this.serializeNodeInner(e,t);for(let n=e.marks.length-1;n>=0;n--){let a=this.serializeMark(e.marks[n],e.isInline,t);a&&((a.contentDOM||a.dom).appendChild(o),o=a.dom)}return o}serializeMark(e,t,o={}){let n=this.marks[e.type.name];return n&&Ki(Ji(o),n(e,t),null,e.attrs)}static renderSpec(e,t,o=null,n){return typeof t=="string"?{dom:e.createTextNode(t)}:Ki(e,t,o,n)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Sr(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=ev(e.nodes);return t.text||(t.text=o=>o.text),t}static marksFromSchema(e){return ev(e.marks)}}function ev(r){let e={};for(let t in r){let o=r[t].spec.toDOM;o&&(e[t]=o)}return e}function Ji(r){return r.document||window.document}const tv=new WeakMap;function LT(r){let e=tv.get(r);return e===void 0&&tv.set(r,e=PT(r)),e}function PT(r){let e=null;function t(o){if(o&&typeof o=="object")if(Array.isArray(o))if(typeof o[0]=="string")e||(e=[]),e.push(o);else for(let n=0;n<o.length;n++)t(o[n]);else for(let n in o)t(o[n])}return t(r),e}function Ki(r,e,t,o){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let n=e[0],a;if(typeof n!="string")throw new RangeError("Invalid array passed to renderSpec");if(o&&(a=LT(o))&&a.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let l=n.indexOf(" ");l>0&&(t=n.slice(0,l),n=n.slice(l+1));let s,p=t?r.createElementNS(t,n):r.createElement(n),d=e[1],c=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){c=2;for(let m in d)if(d[m]!=null){let b=m.indexOf(" ");b>0?p.setAttributeNS(m.slice(0,b),m.slice(b+1),d[m]):m=="style"&&p.style?p.style.cssText=d[m]:p.setAttribute(m,d[m])}}for(let m=c;m<e.length;m++){let b=e[m];if(b===0){if(m<e.length-1||m>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:p,contentDOM:p}}else if(typeof b=="string")p.appendChild(r.createTextNode(b));else{let{dom:g,contentDOM:x}=Ki(r,b,t,o);if(p.appendChild(g),x){if(s)throw new RangeError("Multiple content holes");s=x}}}return{dom:p,contentDOM:s}}const rv=65535,ov=Math.pow(2,16);function AT(r,e){return r+e*ov}function iv(r){return r&rv}function DT(r){return(r-(r&rv))/ov}const nv=1,av=2,Yi=4,lv=8;let el=class{constructor(e,t,o){this.pos=e,this.delInfo=t,this.recover=o}get deleted(){return(this.delInfo&lv)>0}get deletedBefore(){return(this.delInfo&(nv|Yi))>0}get deletedAfter(){return(this.delInfo&(av|Yi))>0}get deletedAcross(){return(this.delInfo&Yi)>0}},Cr=class Co{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Co.empty)return Co.empty}recover(e){let t=0,o=iv(e);if(!this.inverted)for(let n=0;n<o;n++)t+=this.ranges[n*3+2]-this.ranges[n*3+1];return this.ranges[o*3]+t+DT(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,o){let n=0,a=this.inverted?2:1,l=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let p=this.ranges[s]-(this.inverted?n:0);if(p>e)break;let d=this.ranges[s+a],c=this.ranges[s+l],m=p+d;if(e<=m){let b=d?e==p?-1:e==m?1:t:t,g=p+n+(b<0?0:c);if(o)return g;let x=e==(t<0?p:m)?null:AT(s/3,e-p),u=e==p?av:e==m?nv:Yi;return(t<0?e!=p:e!=m)&&(u|=lv),new el(g,u,x)}n+=c-d}return o?e+n:new el(e+n,0,null)}touches(e,t){let o=0,n=iv(t),a=this.inverted?2:1,l=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let p=this.ranges[s]-(this.inverted?o:0);if(p>e)break;let d=this.ranges[s+a],c=p+d;if(e<=c&&s==n*3)return!0;o+=this.ranges[s+l]-d}return!1}forEach(e){let t=this.inverted?2:1,o=this.inverted?1:2;for(let n=0,a=0;n<this.ranges.length;n+=3){let l=this.ranges[n],s=l-(this.inverted?a:0),p=l+(this.inverted?0:a),d=this.ranges[n+t],c=this.ranges[n+o];e(s,s+d,p,p+c),a+=c-d}}invert(){return new Co(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Co.empty:new Co(e<0?[0,-e,0]:[0,0,e])}};Cr.empty=new Cr([]);class Vo{constructor(e,t,o=0,n=e?e.length:0){this.mirror=t,this.from=o,this.to=n,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Vo(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,o=this._maps.length;t<e._maps.length;t++){let n=e.getMirror(t);this.appendMap(e._maps[t],n!=null&&n<t?o+n:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,o=this._maps.length+e._maps.length;t>=0;t--){let n=e.getMirror(t);this.appendMap(e._maps[t].invert(),n!=null&&n>t?o-n-1:void 0)}}invert(){let e=new Vo;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let o=this.from;o<this.to;o++)e=this._maps[o].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,o){let n=0;for(let a=this.from;a<this.to;a++){let l=this._maps[a],s=l.mapResult(e,t);if(s.recover!=null){let p=this.getMirror(a);if(p!=null&&p>a&&p<this.to){a=p,e=this._maps[p].recover(s.recover);continue}}n|=s.delInfo,e=s.pos}return o?e:new el(e,n,null)}}const tl=Object.create(null);let Pe=class{getMap(){return Cr.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let o=tl[t.stepType];if(!o)throw new RangeError(`No step type ${t.stepType} defined`);return o.fromJSON(e,t)}static jsonID(e,t){if(e in tl)throw new RangeError("Duplicate use of step JSON ID "+e);return tl[e]=t,t.prototype.jsonID=e,t}},Ve=class vi{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new vi(e,null)}static fail(e){return new vi(null,e)}static fromReplace(e,t,o,n){try{return vi.ok(e.replace(t,o,n))}catch(a){if(a instanceof Bo)return vi.fail(a.message);throw a}}};function rl(r,e,t){let o=[];for(let n=0;n<r.childCount;n++){let a=r.child(n);a.content.size&&(a=a.copy(rl(a.content,e,a))),a.isInline&&(a=e(a,t,n)),o.push(a)}return A.fromArray(o)}let ol=class ki extends Pe{constructor(e,t,o){super(),this.from=e,this.to=t,this.mark=o}apply(e){let t=e.slice(this.from,this.to),o=e.resolve(this.from),n=o.node(o.sharedDepth(this.to)),a=new O(rl(t.content,(l,s)=>!l.isAtom||!s.type.allowsMarkType(this.mark.type)?l:l.mark(this.mark.addToSet(l.marks)),n),t.openStart,t.openEnd);return Ve.fromReplace(e,this.from,this.to,a)}invert(){return new Jr(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),o=e.mapResult(this.to,-1);return t.deleted&&o.deleted||t.pos>=o.pos?null:new ki(t.pos,o.pos,this.mark)}merge(e){return e instanceof ki&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ki(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ki(t.from,t.to,e.markFromJSON(t.mark))}};Pe.jsonID("addMark",ol);let Jr=class Si extends Pe{constructor(e,t,o){super(),this.from=e,this.to=t,this.mark=o}apply(e){let t=e.slice(this.from,this.to),o=new O(rl(t.content,n=>n.mark(this.mark.removeFromSet(n.marks)),e),t.openStart,t.openEnd);return Ve.fromReplace(e,this.from,this.to,o)}invert(){return new ol(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),o=e.mapResult(this.to,-1);return t.deleted&&o.deleted||t.pos>=o.pos?null:new Si(t.pos,o.pos,this.mark)}merge(e){return e instanceof Si&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Si(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Si(t.from,t.to,e.markFromJSON(t.mark))}};Pe.jsonID("removeMark",Jr);let il=class Ci extends Pe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ve.fail("No node at mark step's position");let o=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Ve.fromReplace(e,this.pos,this.pos+1,new O(A.from(o),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let o=this.mark.addToSet(t.marks);if(o.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(o))return new Ci(this.pos,t.marks[n]);return new Ci(this.pos,this.mark)}}return new Xi(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ci(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ci(t.pos,e.markFromJSON(t.mark))}};Pe.jsonID("addNodeMark",il);let Xi=class dp extends Pe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ve.fail("No node at mark step's position");let o=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Ve.fromReplace(e,this.pos,this.pos+1,new O(A.from(o),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new il(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new dp(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new dp(t.pos,e.markFromJSON(t.mark))}};Pe.jsonID("removeNodeMark",Xi);let Ze=class xr extends Pe{constructor(e,t,o,n=!1){super(),this.from=e,this.to=t,this.slice=o,this.structure=n}apply(e){return this.structure&&nl(e,this.from,this.to)?Ve.fail("Structure replace would overwrite content"):Ve.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Cr([this.from,this.to-this.from,this.slice.size])}invert(e){return new xr(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),o=this.from==this.to&&xr.MAP_BIAS<0?t:e.mapResult(this.from,1);return o.deletedAcross&&t.deletedAcross?null:new xr(o.pos,Math.max(o.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof xr)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?O.empty:new O(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new xr(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?O.empty:new O(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new xr(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new xr(t.from,t.to,O.fromJSON(e,t.slice),!!t.structure)}};Ze.MAP_BIAS=1,Pe.jsonID("replace",Ze);let Ue=class Ia extends Pe{constructor(e,t,o,n,a,l,s=!1){super(),this.from=e,this.to=t,this.gapFrom=o,this.gapTo=n,this.slice=a,this.insert=l,this.structure=s}apply(e){if(this.structure&&(nl(e,this.from,this.gapFrom)||nl(e,this.gapTo,this.to)))return Ve.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Ve.fail("Gap is not a flat range");let o=this.slice.insertAt(this.insert,t.content);return o?Ve.fromReplace(e,this.from,this.to,o):Ve.fail("Content does not fit in gap")}getMap(){return new Cr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Ia(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),o=e.mapResult(this.to,-1),n=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),a=this.to==this.gapTo?o.pos:e.map(this.gapTo,1);return t.deletedAcross&&o.deletedAcross||n<t.pos||a>o.pos?null:new Ia(t.pos,o.pos,n,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ia(t.from,t.to,t.gapFrom,t.gapTo,O.fromJSON(e,t.slice),t.insert,!!t.structure)}};Pe.jsonID("replaceAround",Ue);function nl(r,e,t){let o=r.resolve(e),n=t-e,a=o.depth;for(;n>0&&a>0&&o.indexAfter(a)==o.node(a).childCount;)a--,n--;if(n>0){let l=o.node(a).maybeChild(o.indexAfter(a));for(;n>0;){if(!l||l.isLeaf)return!0;l=l.firstChild,n--}}return!1}function IT(r,e,t,o){let n=[],a=[],l,s;r.doc.nodesBetween(e,t,(p,d,c)=>{if(!p.isInline)return;let m=p.marks;if(!o.isInSet(m)&&c.type.allowsMarkType(o.type)){let b=Math.max(d,e),g=Math.min(d+p.nodeSize,t),x=o.addToSet(m);for(let u=0;u<m.length;u++)m[u].isInSet(x)||(l&&l.to==b&&l.mark.eq(m[u])?l.to=g:n.push(l=new Jr(b,g,m[u])));s&&s.to==b?s.to=g:a.push(s=new ol(b,g,o))}}),n.forEach(p=>r.step(p)),a.forEach(p=>r.step(p))}function VT(r,e,t,o){let n=[],a=0;r.doc.nodesBetween(e,t,(l,s)=>{if(!l.isInline)return;a++;let p=null;if(o instanceof Wi){let d=l.marks,c;for(;c=o.isInSet(d);)(p||(p=[])).push(c),d=c.removeFromSet(d)}else o?o.isInSet(l.marks)&&(p=[o]):p=l.marks;if(p&&p.length){let d=Math.min(s+l.nodeSize,t);for(let c=0;c<p.length;c++){let m=p[c],b;for(let g=0;g<n.length;g++){let x=n[g];x.step==a-1&&m.eq(n[g].style)&&(b=x)}b?(b.to=d,b.step=a):n.push({style:m,from:Math.max(s,e),to:d,step:a})}}}),n.forEach(l=>r.step(new Jr(l.from,l.to,l.style)))}function al(r,e,t,o=t.contentMatch,n=!0){let a=r.doc.nodeAt(e),l=[],s=e+1;for(let p=0;p<a.childCount;p++){let d=a.child(p),c=s+d.nodeSize,m=o.matchType(d.type);if(!m)l.push(new Ze(s,c,O.empty));else{o=m;for(let b=0;b<d.marks.length;b++)t.allowsMarkType(d.marks[b].type)||r.step(new Jr(s,c,d.marks[b]));if(n&&d.isText&&t.whitespace!="pre"){let b,g=/\r?\n|\r/g,x;for(;b=g.exec(d.text);)x||(x=new O(A.from(t.schema.text(" ",t.allowedMarks(d.marks))),0,0)),l.push(new Ze(s+b.index,s+b.index+b[0].length,x))}}s=c}if(!o.validEnd){let p=o.fillBefore(A.empty,!0);r.replace(s,s,new O(p,0,0))}for(let p=l.length-1;p>=0;p--)r.step(l[p])}function zT(r,e,t){return(e==0||r.canReplace(e,r.childCount))&&(t==r.childCount||r.canReplace(0,t))}function Kr(r){let t=r.parent.content.cutByIndex(r.startIndex,r.endIndex);for(let o=r.depth,n=0,a=0;;--o){let l=r.$from.node(o),s=r.$from.index(o)+n,p=r.$to.indexAfter(o)-a;if(o<r.depth&&l.canReplace(s,p,t))return o;if(o==0||l.type.spec.isolating||!zT(l,s,p))break;s&&(n=1),p<l.childCount&&(a=1)}return null}function OT(r,e,t){let{$from:o,$to:n,depth:a}=e,l=o.before(a+1),s=n.after(a+1),p=l,d=s,c=A.empty,m=0;for(let x=a,u=!1;x>t;x--)u||o.index(x)>0?(u=!0,c=A.from(o.node(x).copy(c)),m++):p--;let b=A.empty,g=0;for(let x=a,u=!1;x>t;x--)u||n.after(x+1)<n.end(x)?(u=!0,b=A.from(n.node(x).copy(b)),g++):d++;r.step(new Ue(p,d,l,s,new O(c.append(b),m,g),c.size-m,!0))}function ll(r,e,t=null,o=r){let n=_T(r,e),a=n&&RT(o,e);return a?n.map(sv).concat({type:e,attrs:t}).concat(a.map(sv)):null}function sv(r){return{type:r,attrs:null}}function _T(r,e){let{parent:t,startIndex:o,endIndex:n}=r,a=t.contentMatchAt(o).findWrapping(e);if(!a)return null;let l=a.length?a[0]:e;return t.canReplaceWith(o,n,l)?a:null}function RT(r,e){let{parent:t,startIndex:o,endIndex:n}=r,a=t.child(o),l=e.contentMatch.findWrapping(a.type);if(!l)return null;let p=(l.length?l[l.length-1]:e).contentMatch;for(let d=o;p&&d<n;d++)p=p.matchType(t.child(d).type);return!p||!p.validEnd?null:l}function HT(r,e,t){let o=A.empty;for(let l=t.length-1;l>=0;l--){if(o.size){let s=t[l].type.contentMatch.matchFragment(o);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=A.from(t[l].type.create(t[l].attrs,o))}let n=e.start,a=e.end;r.step(new Ue(n,a,n,a,new O(o,0,0),t.length,!0))}function FT(r,e,t,o,n){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=r.steps.length;r.doc.nodesBetween(e,t,(l,s)=>{let p=typeof n=="function"?n(l):n;if(l.isTextblock&&!l.hasMarkup(o,p)&&jT(r.doc,r.mapping.slice(a).map(s),o)){let d=null;if(o.schema.linebreakReplacement){let g=o.whitespace=="pre",x=!!o.contentMatch.matchType(o.schema.linebreakReplacement);g&&!x?d=!1:!g&&x&&(d=!0)}d===!1&&dv(r,l,s,a),al(r,r.mapping.slice(a).map(s,1),o,void 0,d===null);let c=r.mapping.slice(a),m=c.map(s,1),b=c.map(s+l.nodeSize,1);return r.step(new Ue(m,b,m+1,b-1,new O(A.from(o.create(p,null,l.marks)),0,0),1,!0)),d===!0&&pv(r,l,s,a),!1}})}function pv(r,e,t,o){e.forEach((n,a)=>{if(n.isText){let l,s=/\r?\n|\r/g;for(;l=s.exec(n.text);){let p=r.mapping.slice(o).map(t+1+a+l.index);r.replaceWith(p,p+1,e.type.schema.linebreakReplacement.create())}}})}function dv(r,e,t,o){e.forEach((n,a)=>{if(n.type==n.type.schema.linebreakReplacement){let l=r.mapping.slice(o).map(t+1+a);r.replaceWith(l,l+1,e.type.schema.text(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myissue/vue-website-page-builder",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
4
4
  "description": "Vue 3 page builder component with drag & drop functionality.",
5
5
  "type": "module",
6
6
  "main": "./dist/vue-website-page-builder.umd.cjs",