{"version":3,"file":"chunk.77.2f24afe5907496af537e.js","names":["Object","value","exports","html","_options","options","assign","createDocument","Parser","DOMParser","window","Error","docHtml","parseFromString","cleanHtml","allowBr","replace","removeCodeWrappers","trim","doc","body","textContent","querySelectorAll","forEach","element","tagName","querySelector","replaceWith","createElement","length","space","createTextNode","remove","firstChildInnerContent","firstElementChild","innerHTML","e","t","r","clean_basic_html_js_1","require","enumerable","get","cleanBasicHtml","kg_converters_js_1","lexicalToMobiledoc","mobiledocToLexical","lexical_to_mobiledoc_js_1","mobiledoc_to_lexical_js_1","serializedLexical","JSON","stringify","BLANK_DOC","lexical","parse","root","mobiledoc","version","MOBILEDOC_VERSION","ghostVersion","GHOST_VERSION","atoms","cards","markups","sections","children","child","type","addTextSection","HEADING_TYPES","includes","tag","listChild","listItems","listRoot","flatListItems","traverse","item","grandchild","splice","indexOf","push","listItemChild","markers","buildMarkers","section","KNOWN_CARDS","cardType","cardName","CARD_NAME_MAP","payload","key","keys","CARD_PROPERTY_MAP","map","entries","card","L_FORMAT_MAP","Map","TEXT_TYPES","codeblock","horizontalrule","embed","embedType","getOrSetMarkupIndex","markup","index","findIndex","m","childWithFormats","openMarkups","childIndex","format","openedFormats","closedFormatCount","readFormat","nextFormats","firstMissingFormatIndex","slice","markupIndexes","text","linkMarkup","url","linkMarkupIndex","linkChild","linkChildIndex","openedMarkupIndexes","closedMarkupCount","atomIndex","atom","formats","serializedMobiledoc","direction","indent","sectionTypeIdentifier","lexicalChild","lexicalNode","createEmptyLexicalNode","populateLexicalNodeWithMarkers","listNode","listType","start","listItem","i","listItemNode","cardIndex","oldName","newName","CARD_FIXES_MAP","TAG_TO_LEXICAL_NODE","p","h1","h2","h3","h4","h5","h6","blockquote","aside","a","rel","target","title","ATOM_TO_LEXICAL_NODE","MARKUP_TO_FORMAT","strong","b","em","s","u","code","sub","sup","hr","callout","backgroundColor","match","linkNode","href","openLinkMarkup","textTypeIdentifier","openMarkupsIndexes","numberOfClosedMarkups","atomName","embedChildNode","markupIndex","attrs","undefined","convertMarkupTagsToLexicalFormatBitmask","j","pop","detail","mode","style","attributes","nodeParams","parentNode","childNode","tags","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","resolve","module","_eai_r","_eai_d","define","defineProperty","Symbol","toStringTag","dataType","configDataType","useBrowseConfig","createQuery","path","sendingDomains","config","raw","Array","isArray","filter","d","trimmed","startsWith","parsed","hostSettings","managedEmail","sendingDomain","hasSendingDomain","isManagedEmail","enabled","require_hooks_use_handle_error","require_utils_api_fetch_api","_tanstack_react_query","react","usersDataType","currentUserUrl","apiUrl","include","currentUserQueryKey","useCurrentUser","fetchApi","useFetchApi","handleError","result","useQuery","queryKey","queryFn","select","data","users","useEffect","error","require_utils_api_hooks","require_utils_api_update_queries","useBrowseOffers","defaultSearchParams","useBrowseOffersById","createQueryWithId","useEditOffer","createMutation","method","offer","offers","updateQueries","emberUpdateType","update","updateQueryCache","useAddOffer","insertToQueryCache","useInvalidateOffers","queryClient","useQueryClient","invalidateQueries","useBrowsePosts","useBrowsePostsInfinite","createInfiniteQuery","defaultNextPageParams","lastPage","otherParams","meta","pagination","next","page","toString","returnData","originalData","pages","posts","flatMap","isEnd","getPost","useDeletePost","useSearchIndexPosts","useBrowseSettings","group","useEditSettings","settings","newData","filters","predicate","query","useRegenerateAccessCode","useDeleteStripeSettings","useTestSlack","checkStripeEnabled","hasSetting","some","setting","hasDirectKeys","hasConnectKeys","stripeDirect","getSettingValue","find","getSettingValues","humanizeSettingKey","char","toUpperCase","RegExp","join","isSettingReadOnly","is_read_only","require_hooks_use_permissions","require_hooks_use_confirm_unload","require_hooks_use_form","require_hooks_use_filterable_api","require_hooks_use_koenig_file_upload","require_hooks_use_koenig_fetch_embed","require_hooks_use_koenig_link_suggestions","require_hooks_use_feature_flag","require_hooks_use_pintura_config","koenigFileUploadTypes","useConfirmUnload","useFeatureFlag","useFilterableApi","useForm","useHandleError","useKoenigFetchEmbed","useKoenigFileUpload","useKoenigLinkSuggestions","usePermission","usePinturaConfig","require_rolldown_runtime","__toESM","shouldConfirmUnload","handleBeforeUnload","event","preventDefault","returnValue","addEventListener","removeEventListener","require_api_config","flag","labs","_tryghost_nql_string","filterData","filterKey","input","toLowerCase","responseKey","limit","useRef","loadData","async","current","allLoaded","lastInput","response","escapeNqlString","loadInitialValues","values","missingValues","additionalData","initialState","savingDelay","savedDelay","onSave","onSaveError","onSavedStateReset","onSaveCompleted","onValidate","formState","setFormState","useState","saveState","setSaveState","errors","setErrors","setTimeout","state","isValid","errs","Boolean","validate","useCallback","newErrors","handleSave","force","fakeWhenUnchanged","timeBefore","Date","now","duration","Promise","updateForm","updater","okVariant","okLabel","okProps","disabled","variant","label","reset","clearError","field","require_providers_framework_provider","require_utils_errors","_sentry_react","sonner","showErrorToast","message","toast","dismiss","sentryDSN","useFramework","withToast","console","SessionExpiredError","withScope","scope","APIError","setTag","status","captureException","getErrorMessage","require_utils_helpers","oembedUrl","URL","getGhostPaths","apiRoot","location","origin","searchParams","set","image","mimeTypes","extensions","endpoint","requestMethod","resourceName","video","audio","mediaThumbnail","file","getStringAtPath","maybeObj","progress","setProgress","isLoading","setLoading","filesNumber","setFilesNumber","progressTracker","updateProgress","size","totalProgress","Math","round","defaultValidator","extension","exec","name","uploadFile","formData","fileFormData","FormData","append","uploadResponse","onUploadProgress","uploadProgress","responseUrl","resource","fileName","context","upload","files","validationResult","uploadPromises","uploadResult","all","clear","require_api_offers","require_api_posts","siteUrl","membersSignupAccess","donationsEnabled","recommendationsEnabled","includeShareLink","shareLinkLabel","offersData","latestPostsData","fields","order","searchPosts","searchPages","defaultLinks","useMemo","items","post","visibility","publishedAt","published_at","fetchAutocompleteLinks","redemption_type","searchLinks","term","usePagination","setPage","prevMeta","setPrevMeta","total","nextPage","min","prevPage","max","require_api_current_user","requiredRoles","currentUser","currentUserRoles","roles","role","require_api_settings","parseOptionalString","TypeError","resolveUrl","adminRoot","configData","settingsData","pinturaConfig","pintura","isEnabled","fallbackJsUrl","fallbackCssUrl","configJsUrl","configCssUrl","js","css","jsUrl","cssUrl","require_utils_query_client","react_jsx_runtime","FrameworkContext","createContext","externalNavigate","unsplashConfig","Authorization","onUpdate","onInvalidate","onDelete","FrameworkProvider","queryClientOverride","queryClientOptions","props","jsx","ErrorBoundary","QueryClientProvider","client","QueryClient","defaultOptions","queries","refetchOnWindowFocus","staleTime","refetchOnMount","gcTime","retry","networkMode","Provider","useContext","__create","create","__defProp","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","mod","isNodeMode","to","from","except","desc","n","call","__copyProps","k","bind","__esModule","require_utils_api_handle_response","xhrHeadersToFetchHeaders","xhr","Headers","headerLines","getAllResponseHeaders","split","headerLine","separatorIndex","headerName","headerValue","GHOST_API_REQUEST","SESSION_API_REQUEST","UNAUTHENTICATED_ADMIN_ROUTE","sessionExpiryHandled","isSessionExpiry","test","redirectOnSessionExpiry","pathname","hash","fetchWithXhr","headers","credentials","signal","reject","onabort","DOMException","aborted","XMLHttpRequest","open","withCredentials","responseType","setRequestHeader","onprogress","lengthComputable","loaded","onload","Response","statusText","onerror","onSignalAbort","abort","onloadend","send","activityPubRoot","useActivityPub","search","URLSearchParams","timeout","controller","AbortController","requestInit","attempts","retryingMs","startTime","retryPeriods","retryableErrors","ServerUnreachableError","MaintenanceError","getErrorData","errorName","totalSeconds","server","fetchFn","fetch","timeoutHandle","errorClass","captureMessage","extra","TimeoutError","UnauthorizedError","cause","newError","clearTimeout","UnsupportedMediaTypeError","RequestEntityTooLargeError","json","ok","VersionMismatchError","ValidationError","ThemeValidationError","HostLimitError","EmailError","JSONError","require_hooks_use_pagination","hasPermission","permissions","defaultErrorHandler","getNextPageParams","nextPageParams","useInfiniteQuery","pageParam","initialPageParam","getNextPageParam","mutateOptions","useMutation","mutationFn","requestOptions","generatedBody","requestBody","onSuccess","setQueriesData","createPaginatedQuery","parseInt","paginatedSearchParams","isFetching","deleteFromQueryCache","idsFromPayload","_","currentData","deletedIds","recordsToInsert","getRecords","concat","updatedRecords","updated","reduce","record","constructor","errorOptions","super","this","errorsWithMessage","AlreadyExistsError","fallback","subdir","substr","assetRoot","downloadFile","iframe","document","getElementById","display","setAttribute","getFilenameFromContentDisposition","header","extendedMatch","singleQuote","extValue","firstQuote","secondQuote","encoded","decodeURIComponent","quotedMatch","unquotedMatch","blobDownload","fallbackFilename","filename","blob","blobUrl","createObjectURL","download","appendChild","click","revokeObjectURL","blobDownloadFromEndpoint","downloadFromEndpoint","adminXQueryClient","__TANSTACK_QUERY_CLIENT__"],"sources":["webpack://__ember_auto_import__/koenig/kg-clean-basic-html/build/cjs/clean-basic-html.js","webpack://__ember_auto_import__/koenig/kg-clean-basic-html/build/cjs/index.js","webpack://__ember_auto_import__/koenig/kg-converters/build/cjs/index.js","webpack://__ember_auto_import__/koenig/kg-converters/build/cjs/kg-converters.js","webpack://__ember_auto_import__/koenig/kg-converters/build/cjs/lexical-to-mobiledoc.js","webpack://__ember_auto_import__/koenig/kg-converters/build/cjs/mobiledoc-to-lexical.js","webpack://__ember_auto_import__/home/runner/work/core/core/apps/node_modules/.pnpm/moment@2.30.1/node_modules/moment/locale|sync|/^\\.\\/.*$/","webpack://__ember_auto_import__/javascript/tmp/broccoli--4471-WnVi4XVGgTNn/cache-685-webpack_bundler_ember_auto_import_webpack/l.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/api/config.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/api/current-user.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/api/offers.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/api/posts.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/api/settings.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-confirm-unload.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-feature-flag.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-filterable-api.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-form.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-handle-error.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-koenig-fetch-embed.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-koenig-file-upload.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-koenig-link-suggestions.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-pagination.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-permissions.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-pintura-config.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/providers/framework-provider.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/rolldown-runtime-D6vf50IK.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/api/fetch-api.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/api/handle-response.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/api/hooks.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/api/update-queries.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/errors.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/helpers.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/query-client.cjs","webpack://__ember_auto_import__/src/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cleanBasicHtml = cleanBasicHtml;\nfunction removeCodeWrappers(html) {\n    return html.replace(/<code\\b[^>]*>((.*?){.*?}(.*?))<\\/code>/gi, '$1');\n}\nfunction cleanBasicHtml(html = '', _options = {}) {\n    const defaults = {};\n    const options = Object.assign({}, defaults, _options);\n    if (!options.createDocument) {\n        const Parser = (typeof DOMParser !== 'undefined' && DOMParser) || (typeof window !== 'undefined' && window.DOMParser);\n        if (!Parser) {\n            throw new Error('cleanBasicHtml() must be passed a `createDocument` function as an option when used in a non-browser environment');\n        }\n        options.createDocument = function (docHtml) {\n            const parser = new Parser();\n            return parser.parseFromString(docHtml, 'text/html');\n        };\n    }\n    let cleanHtml = html;\n    if (!options.allowBr || cleanHtml === '<br>') {\n        cleanHtml = cleanHtml\n            .replace(/<br\\s?\\/?>/g, ' ');\n    }\n    if (options.removeCodeWrappers) {\n        cleanHtml = removeCodeWrappers(cleanHtml);\n    }\n    cleanHtml = cleanHtml\n        .replace(/(\\s|&nbsp;){2,}/g, ' ')\n        .trim()\n        .replace(/^&nbsp;|&nbsp$/g, '')\n        .trim();\n    // remove any elements that have a blank textContent\n    if (cleanHtml) {\n        const doc = options.createDocument(cleanHtml);\n        // don't analyze the document if it's empty (can result in storing <br> tags if allowed)\n        if (doc.body.textContent === '') {\n            return '';\n        }\n        doc.body.querySelectorAll('*').forEach((element) => {\n            // Treat Zero Width Non-Joiner characters as spaces\n            if (!element.textContent?.trim().replace(/\\u200c+/g, '')) {\n                if (options.allowBr && element.tagName === 'BR') {\n                    // keep it\n                    return;\n                }\n                if (options.allowBr && element.querySelector('br')) {\n                    return element.replaceWith(doc.createElement('br'));\n                }\n                if (element.textContent && element.textContent.length > 0) {\n                    // keep a single space to avoid collapsing spaces\n                    const space = doc.createTextNode(' ');\n                    return element.replaceWith(space);\n                }\n                return element.remove();\n            }\n        });\n        if (options.firstChildInnerContent && doc.body.firstElementChild) {\n            cleanHtml = doc.body.firstElementChild.innerHTML.trim();\n        }\n        else {\n            cleanHtml = doc.body.innerHTML.trim();\n        }\n    }\n    return cleanHtml;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cleanBasicHtml = void 0;\nvar clean_basic_html_js_1 = require(\"./clean-basic-html.js\");\nObject.defineProperty(exports, \"cleanBasicHtml\", { enumerable: true, get: function () { return clean_basic_html_js_1.cleanBasicHtml; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mobiledocToLexical = exports.lexicalToMobiledoc = void 0;\nvar kg_converters_js_1 = require(\"./kg-converters.js\");\nObject.defineProperty(exports, \"lexicalToMobiledoc\", { enumerable: true, get: function () { return kg_converters_js_1.lexicalToMobiledoc; } });\nObject.defineProperty(exports, \"mobiledocToLexical\", { enumerable: true, get: function () { return kg_converters_js_1.mobiledocToLexical; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mobiledocToLexical = exports.lexicalToMobiledoc = void 0;\nconst lexical_to_mobiledoc_js_1 = require(\"./lexical-to-mobiledoc.js\");\nObject.defineProperty(exports, \"lexicalToMobiledoc\", { enumerable: true, get: function () { return lexical_to_mobiledoc_js_1.lexicalToMobiledoc; } });\nconst mobiledoc_to_lexical_js_1 = require(\"./mobiledoc-to-lexical.js\");\nObject.defineProperty(exports, \"mobiledocToLexical\", { enumerable: true, get: function () { return mobiledoc_to_lexical_js_1.mobiledocToLexical; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lexicalToMobiledoc = lexicalToMobiledoc;\nconst MOBILEDOC_VERSION = '0.3.1';\nconst GHOST_VERSION = '4.0';\nconst BLANK_DOC = {\n    version: MOBILEDOC_VERSION,\n    ghostVersion: GHOST_VERSION,\n    markups: [],\n    atoms: [],\n    cards: [],\n    sections: [\n        [1, 'p', [\n                [0, [], 0, '']\n            ]]\n    ]\n};\nconst MD_TEXT_SECTION = 1;\nconst MD_LIST_SECTION = 3;\nconst MD_CARD_SECTION = 10;\nconst MD_TEXT_MARKER = 0;\nconst MD_ATOM_MARKER = 1;\nconst L_IS_BOLD = 1;\nconst L_IS_ITALIC = 1 << 1;\nconst L_IS_STRIKETHROUGH = 1 << 2;\nconst L_IS_UNDERLINE = 1 << 3;\nconst L_IS_CODE = 1 << 4;\nconst L_IS_SUBSCRIPT = 1 << 5;\nconst L_IS_SUPERSCRIPT = 1 << 6;\nconst L_FORMAT_MAP = new Map([\n    [L_IS_BOLD, 'strong'],\n    [L_IS_ITALIC, 'em'],\n    [L_IS_STRIKETHROUGH, 's'],\n    [L_IS_UNDERLINE, 'u'],\n    [L_IS_CODE, 'code'],\n    [L_IS_SUBSCRIPT, 'sub'],\n    [L_IS_SUPERSCRIPT, 'sup']\n]);\nconst HEADING_TYPES = ['heading', 'extended-heading'];\nconst TEXT_TYPES = ['text', 'extended-text'];\n// TODO: Feels a little too explicit as it will need updating every time we add a new card.\n//\n// One alternative is to use a list of all built-in Lexical types and assume that anything\n// not listed is a card but that feels more dangerous.\n//\n// Another alternative is to grab the list of cards from kg-default-nodes but that's creating\n// more inter-dependencies that makes development setup tricky.\nconst KNOWN_CARDS = [\n    'audio',\n    'bookmark',\n    'button',\n    'callout',\n    'codeblock',\n    'email-cta',\n    'email',\n    'embed',\n    'file',\n    'gallery',\n    'header',\n    'horizontalrule',\n    'html',\n    'image',\n    'markdown',\n    'paywall',\n    'product',\n    'signup',\n    'toggle',\n    'video'\n];\nconst CARD_NAME_MAP = {\n    codeblock: 'code',\n    horizontalrule: 'hr'\n};\nconst CARD_PROPERTY_MAP = {\n    embed: {\n        embedType: 'type'\n    }\n};\nfunction lexicalToMobiledoc(serializedLexical) {\n    if (serializedLexical === null || serializedLexical === undefined || serializedLexical === '') {\n        return JSON.stringify(BLANK_DOC);\n    }\n    const lexical = JSON.parse(serializedLexical);\n    if (!lexical.root) {\n        return JSON.stringify(BLANK_DOC);\n    }\n    const mobiledoc = buildEmptyDoc();\n    lexical.root.children?.forEach((child) => addRootChild(child, mobiledoc));\n    return JSON.stringify(mobiledoc);\n}\n/* internal functions ------------------------------------------------------- */\nfunction buildEmptyDoc() {\n    return {\n        version: MOBILEDOC_VERSION,\n        ghostVersion: GHOST_VERSION,\n        atoms: [],\n        cards: [],\n        markups: [],\n        sections: []\n    };\n}\nfunction getOrSetMarkupIndex(markup, mobiledoc) {\n    let index = mobiledoc.markups.findIndex((m) => m[0] === markup);\n    if (index === -1) {\n        mobiledoc.markups.push([markup]);\n        index = mobiledoc.markups.length - 1;\n    }\n    return index;\n}\nfunction getOrSetAtomIndex(atom, mobiledoc) {\n    let index = mobiledoc.atoms.findIndex((m) => m === atom);\n    if (index === -1) {\n        mobiledoc.atoms.push(atom);\n        index = mobiledoc.atoms.length - 1;\n    }\n    return index;\n}\nfunction addRootChild(child, mobiledoc) {\n    if (child.type === 'paragraph') {\n        addTextSection(child, mobiledoc);\n    }\n    if (HEADING_TYPES.includes(child.type)) {\n        addTextSection(child, mobiledoc, child.tag);\n    }\n    if (child.type === 'quote') {\n        addTextSection(child, mobiledoc, 'blockquote');\n    }\n    if (child.type === 'aside') {\n        addTextSection(child, mobiledoc, 'aside');\n    }\n    if (child.type === 'list') {\n        addListSection(child, mobiledoc, child.tag);\n    }\n    if (KNOWN_CARDS.includes(child.type)) {\n        addCardSection(child, mobiledoc);\n    }\n}\nfunction addTextSection(childWithFormats, mobiledoc, tagName = 'p') {\n    const markers = buildMarkers(childWithFormats, mobiledoc);\n    const section = [MD_TEXT_SECTION, tagName, markers];\n    mobiledoc.sections.push(section);\n}\nfunction addListSection(listChild, mobiledoc, tagName = 'ul') {\n    const listItems = buildListItems(listChild, mobiledoc);\n    const section = [MD_LIST_SECTION, tagName, listItems];\n    mobiledoc.sections.push(section);\n}\nfunction buildListItems(listRoot, mobiledoc) {\n    const listItems = [];\n    flattenListChildren(listRoot);\n    listRoot.children?.forEach((listItemChild) => {\n        if (listItemChild.type === 'listitem') {\n            const markers = buildMarkers(listItemChild, mobiledoc);\n            listItems.push(markers);\n        }\n    });\n    return listItems;\n}\nfunction flattenListChildren(listRoot) {\n    const flatListItems = [];\n    function traverse(item) {\n        item.children?.forEach((child) => {\n            child.children?.forEach((grandchild) => {\n                if (grandchild.type === 'list') {\n                    traverse(grandchild);\n                    child.children.splice(child.children.indexOf(grandchild), 1);\n                }\n            });\n            if (child.type === 'listitem' && child.children?.length) {\n                flatListItems.push(child);\n            }\n        });\n    }\n    traverse(listRoot);\n    listRoot.children = flatListItems;\n}\nfunction buildMarkers(childWithFormats, mobiledoc) {\n    const markers = [];\n    if (!childWithFormats.children?.length) {\n        markers.push([MD_TEXT_MARKER, [], 0, '']);\n    }\n    else {\n        // mobiledoc tracks opened/closed formats across markers whereas lexical\n        // lists all formats for each marker so we need to manually track open formats\n        let openMarkups = [];\n        // markup: a specific format, or tag name+attributes\n        // marker: a piece of text with 0 or more markups\n        childWithFormats.children.forEach((child, childIndex) => {\n            if (TEXT_TYPES.includes(child.type)) {\n                if (child.format !== 0) {\n                    // text child has formats, track which are new and which have closed\n                    const openedFormats = [];\n                    const childFormats = readFormat(child.format);\n                    let closedFormatCount = 0;\n                    childFormats.forEach((format) => {\n                        if (!openMarkups.includes(format)) {\n                            openMarkups.push(format);\n                            openedFormats.push(format);\n                        }\n                    });\n                    // mobiledoc will immediately close any formats if the next section doesn't use them or it's not a text section\n                    if (!childWithFormats.children[childIndex + 1] || !TEXT_TYPES.includes(childWithFormats.children[childIndex + 1].type)) {\n                        // no more children, close all formats\n                        closedFormatCount = openMarkups.length;\n                        openMarkups = [];\n                    }\n                    else {\n                        const nextChild = childWithFormats.children[childIndex + 1];\n                        const nextFormats = readFormat(nextChild.format);\n                        const firstMissingFormatIndex = openMarkups.findIndex((format) => !nextFormats.includes(format));\n                        if (firstMissingFormatIndex !== -1) {\n                            const formatsToClose = openMarkups.slice(firstMissingFormatIndex);\n                            closedFormatCount = formatsToClose.length;\n                            openMarkups = openMarkups.slice(0, firstMissingFormatIndex);\n                        }\n                    }\n                    const markupIndexes = openedFormats.map(format => getOrSetMarkupIndex(format, mobiledoc));\n                    markers.push([MD_TEXT_MARKER, markupIndexes, closedFormatCount, child.text]);\n                }\n                else {\n                    // text child has no formats so we close all formats in mobiledoc\n                    const closedFormatCount = openMarkups.length;\n                    openMarkups = [];\n                    markers.push([MD_TEXT_MARKER, [], closedFormatCount, child.text]);\n                }\n            }\n            if (child.type === 'link') {\n                const linkMarkup = ['a', ['href', child.url]];\n                const linkMarkupIndex = mobiledoc.markups.push(linkMarkup) - 1;\n                child.children?.forEach((linkChild, linkChildIndex) => {\n                    if (linkChild.format !== 0) {\n                        const openedMarkupIndexes = [];\n                        const openedFormats = [];\n                        // first child of a link opens the link markup\n                        if (linkChildIndex === 0) {\n                            openMarkups.push(linkMarkup);\n                            openedMarkupIndexes.push(linkMarkupIndex);\n                        }\n                        // text child has formats, track which are new and which have closed\n                        const childFormats = readFormat(linkChild.format);\n                        let closedMarkupCount = 0;\n                        childFormats.forEach((format) => {\n                            if (!openMarkups.includes(format)) {\n                                openMarkups.push(format);\n                                openedFormats.push(format);\n                            }\n                        });\n                        // mobiledoc will immediately close any formats if the next section doesn't use them\n                        if (!child.children[linkChildIndex + 1]) {\n                            // last child of a link closes all markups\n                            closedMarkupCount = openMarkups.length;\n                            openMarkups = [];\n                        }\n                        else {\n                            const nextChild = child.children[linkChildIndex + 1];\n                            const nextFormats = readFormat(nextChild.format);\n                            const firstMissingFormatIndex = openMarkups.findIndex((markup) => {\n                                const markupIsLink = JSON.stringify(markup) === JSON.stringify(linkMarkup);\n                                return !markupIsLink && !nextFormats.includes(markup);\n                            });\n                            if (firstMissingFormatIndex !== -1) {\n                                const formatsToClose = openMarkups.slice(firstMissingFormatIndex);\n                                closedMarkupCount = formatsToClose.length;\n                                openMarkups = openMarkups.slice(0, firstMissingFormatIndex);\n                            }\n                        }\n                        openedMarkupIndexes.push(...openedFormats.map(format => getOrSetMarkupIndex(format, mobiledoc)));\n                        markers.push([MD_TEXT_MARKER, openedMarkupIndexes, closedMarkupCount, linkChild.text]);\n                    }\n                    else {\n                        const openedMarkupIndexes = [];\n                        // first child of a link opens the link markup\n                        if (linkChildIndex === 0) {\n                            openMarkups.push(linkMarkup);\n                            openedMarkupIndexes.push(linkMarkupIndex);\n                        }\n                        let closedMarkupCount = openMarkups.length - 1; // don't close the link markup, just the others\n                        // last child of a link closes all markups\n                        if (!child.children[linkChildIndex + 1]) {\n                            closedMarkupCount += 1; // close the link markup\n                            openMarkups = [];\n                        }\n                        markers.push([MD_TEXT_MARKER, openedMarkupIndexes, closedMarkupCount, linkChild.text]);\n                    }\n                });\n            }\n            if (child.type === 'linebreak') {\n                const atom = ['soft-return', '', {}];\n                const atomIndex = getOrSetAtomIndex(atom, mobiledoc);\n                markers.push([MD_ATOM_MARKER, [], 0, atomIndex]);\n            }\n        });\n    }\n    return markers;\n}\n// Lexical stores formats as a bitmask, so we need to read the bitmask to\n// determine which formats are present\nfunction readFormat(format) {\n    const formats = [];\n    L_FORMAT_MAP.forEach((value, key) => {\n        if ((format & key) !== 0) {\n            formats.push(value);\n        }\n    });\n    return formats;\n}\nfunction addCardSection(child, mobiledoc) {\n    const cardType = child.type;\n    let cardName = child.type;\n    // rename card if there's a difference between lexical/mobiledoc\n    if (CARD_NAME_MAP[cardName]) {\n        cardName = CARD_NAME_MAP[cardName];\n    }\n    // don't include type in the payload\n    const payload = {};\n    for (const key of Object.keys(child)) {\n        if (key !== 'type') {\n            payload[key] = child[key];\n        }\n    }\n    // rename any properties to match mobiledoc\n    if (CARD_PROPERTY_MAP[cardType]) {\n        const map = CARD_PROPERTY_MAP[cardType];\n        for (const [key, value] of Object.entries(map)) {\n            payload[value] = payload[key];\n            delete payload[key];\n        }\n    }\n    const card = [cardName, payload];\n    mobiledoc.cards.push(card);\n    const cardIndex = mobiledoc.cards.length - 1;\n    const section = [MD_CARD_SECTION, cardIndex];\n    mobiledoc.sections.push(section);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mobiledocToLexical = mobiledocToLexical;\nconst BLANK_DOC = {\n    root: {\n        children: [],\n        direction: null,\n        format: '',\n        indent: 0,\n        type: 'root',\n        version: 1\n    }\n};\nconst TAG_TO_LEXICAL_NODE = {\n    p: {\n        type: 'paragraph'\n    },\n    h1: {\n        type: 'heading',\n        tag: 'h1'\n    },\n    h2: {\n        type: 'heading',\n        tag: 'h2'\n    },\n    h3: {\n        type: 'heading',\n        tag: 'h3'\n    },\n    h4: {\n        type: 'heading',\n        tag: 'h4'\n    },\n    h5: {\n        type: 'heading',\n        tag: 'h5'\n    },\n    h6: {\n        type: 'heading',\n        tag: 'h6'\n    },\n    blockquote: {\n        type: 'quote'\n    },\n    aside: {\n        type: 'aside'\n    },\n    a: {\n        type: 'link',\n        rel: null,\n        target: null,\n        title: null,\n        url: null\n    }\n};\nconst ATOM_TO_LEXICAL_NODE = {\n    'soft-return': {\n        type: 'linebreak',\n        version: 1\n    }\n};\nconst MARKUP_TO_FORMAT = {\n    strong: 1,\n    b: 1,\n    em: 1 << 1,\n    i: 1 << 1,\n    s: 1 << 2,\n    u: 1 << 3,\n    code: 1 << 4,\n    sub: 1 << 5,\n    sup: 1 << 6\n};\nconst CARD_NAME_MAP = {\n    code: 'codeblock',\n    hr: 'horizontalrule'\n};\nconst CARD_PROPERTY_MAP = {\n    embed: {\n        type: 'embedType'\n    }\n};\nconst CARD_FIXES_MAP = {\n    callout: (payload) => {\n        if (payload.backgroundColor && !payload.backgroundColor.match(/^[a-zA-Z\\d-]+$/)) {\n            payload.backgroundColor = 'white';\n        }\n        return payload;\n    }\n};\nfunction mobiledocToLexical(serializedMobiledoc) {\n    if (serializedMobiledoc === null || serializedMobiledoc === undefined || serializedMobiledoc === '') {\n        return JSON.stringify(BLANK_DOC);\n    }\n    const mobiledoc = JSON.parse(serializedMobiledoc);\n    if (!mobiledoc.sections) {\n        return JSON.stringify(BLANK_DOC);\n    }\n    const lexical = buildEmptyDoc();\n    mobiledoc.sections.forEach((child) => addRootChild(child, mobiledoc, lexical));\n    return JSON.stringify(lexical);\n}\n/* internal functions ------------------------------------------------------- */\nfunction buildEmptyDoc() {\n    return {\n        root: {\n            children: [],\n            direction: null,\n            format: '',\n            indent: 0,\n            type: 'root',\n            version: 1\n        }\n    };\n}\nfunction addRootChild(child, mobiledoc, lexical) {\n    const sectionTypeIdentifier = child[0];\n    if (sectionTypeIdentifier === 1) {\n        // Markup (text) section\n        const lexicalChild = convertMarkupSectionToLexical(child, mobiledoc);\n        lexical.root.children.push(lexicalChild);\n        // Set direction to ltr if there is any text\n        // Otherwise direction should be null\n        // Not sure if this is necessary:\n        // if we don't plan to support RTL, we could just set 'ltr' in all cases and ignore null\n        if (lexicalChild.children && lexicalChild.children.length > 0) {\n            lexical.root.direction = 'ltr';\n        }\n    }\n    else if (sectionTypeIdentifier === 2) {\n        // Image section\n        // Not used in Ghost\n    }\n    else if (sectionTypeIdentifier === 3) {\n        // List section\n        const lexicalChild = convertListSectionToLexical(child, mobiledoc);\n        lexical.root.children.push(lexicalChild);\n        lexical.root.direction = 'ltr'; // mobiledoc only supports LTR\n    }\n    else if (sectionTypeIdentifier === 10) {\n        // Card section\n        const lexicalChild = convertCardSectionToLexical(child, mobiledoc);\n        lexical.root.children.push(lexicalChild);\n    }\n}\nfunction convertMarkupSectionToLexical(section, mobiledoc) {\n    const tagName = section[1]; // e.g. 'p'\n    const markers = section[2]; // e.g. [[0, [0], 0, \"Hello world\"]]\n    // Create an empty Lexical node from the tag name\n    // We will add nodes to the children array later\n    const lexicalNode = createEmptyLexicalNode(tagName);\n    populateLexicalNodeWithMarkers(lexicalNode, markers, mobiledoc);\n    return lexicalNode;\n}\nfunction populateLexicalNodeWithMarkers(lexicalNode, markers, mobiledoc) {\n    const markups = mobiledoc.markups;\n    const atoms = mobiledoc.atoms;\n    // Initiate some variables before looping over all the markers\n    const openMarkups = []; // tracks which markup tags are open for the current marker\n    let linkNode = undefined; // tracks current link node or undefined if no a tag is open\n    let href = undefined; // tracks the href for the current link node or undefined if no a tag is open\n    let rel = undefined; //tracks the rel attribute for the current link node or undefined if no a tag is open\n    let openLinkMarkup = false; // tracks whether the current node is a link node\n    // loop over markers and convert each one to lexical\n    for (let i = 0; i < markers.length; i++) {\n        // grab the attributes from the current marker\n        const [textTypeIdentifier, openMarkupsIndexes, numberOfClosedMarkups, value] = markers[i];\n        // Markers are either text (markup) or atoms\n        const markerType = textTypeIdentifier === 0 ? 'markup' : 'atom';\n        // If the current marker is an atom, convert the atom to Lexical and add to the node\n        if (markerType === 'atom') {\n            const atom = atoms[value];\n            const atomName = atom[0];\n            const childNode = ATOM_TO_LEXICAL_NODE[atomName];\n            embedChildNode(lexicalNode, childNode);\n            continue;\n        }\n        // calculate which markups are open for the current marker\n        openMarkupsIndexes.forEach((markupIndex) => {\n            const markup = markups[markupIndex];\n            // Extract the href from the markup if it's a link\n            if (markup[0] === 'a') {\n                openLinkMarkup = true;\n                const attrs = markup[1];\n                if (attrs && attrs[0] === 'href') {\n                    href = attrs[1];\n                }\n                if (attrs && attrs[2] === 'rel') {\n                    rel = attrs[3];\n                }\n            }\n            // Add the markup to the list of open markups\n            openMarkups.push(markup);\n        });\n        if (value !== undefined) {\n            // Convert the open markups to a bitmask compatible with Lexical\n            const format = convertMarkupTagsToLexicalFormatBitmask(openMarkups);\n            // If there is an open link tag, add the text to the link node\n            // Otherwise add the text to the parent node\n            if (openLinkMarkup) { // link is open\n                // Create an empty link node if it doesn't exist already\n                linkNode = linkNode !== undefined ? linkNode : createEmptyLexicalNode('a', { url: href, rel: rel || null });\n                // Create a text node and add it to the link node\n                const textNode = createTextNode(value, format);\n                embedChildNode(linkNode, textNode);\n            }\n            else {\n                const textNode = createTextNode(value, format);\n                embedChildNode(lexicalNode, textNode);\n            }\n        }\n        // Close any markups that are closed after the current marker\n        // Remove any closed markups from openMarkups list\n        for (let j = 0; j < numberOfClosedMarkups; j++) {\n            // Remove the most recently opened markup from the list of open markups\n            const markup = openMarkups.pop();\n            // If we're closing a link tag, add the linkNode to the node\n            // Reset href and linkNode for the next markup\n            if (markup && markup[0] === 'a') {\n                embedChildNode(lexicalNode, linkNode);\n                openLinkMarkup = false;\n                href = undefined;\n                linkNode = undefined;\n            }\n        }\n    }\n}\n// Creates a text node from the given text and format\nfunction createTextNode(text, format) {\n    return {\n        detail: 0,\n        format: format,\n        mode: 'normal',\n        style: '',\n        text: text,\n        type: 'text',\n        version: 1\n    };\n}\n// Creates an empty Lexical node from the given tag name and additional attributes\nfunction createEmptyLexicalNode(tagName, attributes = {}) {\n    const nodeParams = TAG_TO_LEXICAL_NODE[tagName];\n    const node = {\n        children: [],\n        direction: 'ltr',\n        format: '',\n        indent: 0,\n        ...nodeParams,\n        ...attributes,\n        type: nodeParams?.type || attributes.type || tagName,\n        version: 1\n    };\n    return node;\n}\n// Adds a child node to a parent node\nfunction embedChildNode(parentNode, childNode) {\n    // If there is no child node, do nothing\n    if (!childNode) {\n        return;\n    }\n    // Add textNode to node's children\n    parentNode.children.push(childNode);\n    // If there is any text (e.g. not a blank text node), set the direction to ltr\n    if (childNode && 'text' in childNode && childNode.text) {\n        parentNode.direction = 'ltr';\n    }\n}\n// Lexical stores formats as a bitmask\n// Mobiledoc stores formats as a list of open markup tags\n// This function converts a list of open tags to a bitmask compatible with lexical\nfunction convertMarkupTagsToLexicalFormatBitmask(tags) {\n    let format = 0;\n    tags.forEach((tag) => {\n        const tagName = tag[0];\n        if (tagName in MARKUP_TO_FORMAT) {\n            format = format | MARKUP_TO_FORMAT[tagName];\n        }\n    });\n    return format;\n}\nfunction convertListSectionToLexical(child, mobiledoc) {\n    const tag = child[1];\n    const listItems = child[2];\n    const listType = tag === 'ul' ? 'bullet' : 'number';\n    const listNode = createEmptyLexicalNode(tag, { tag, type: 'list', listType, start: 1, direction: 'ltr' });\n    listItems?.forEach((listItem, i) => {\n        const listItemNode = createEmptyLexicalNode('li', { type: 'listitem', value: i + 1, direction: 'ltr' });\n        populateLexicalNodeWithMarkers(listItemNode, listItem, mobiledoc);\n        listNode.children.push(listItemNode);\n    });\n    return listNode;\n}\nfunction convertCardSectionToLexical(child, mobiledoc) {\n    const cardIndex = child[1];\n    let [cardName, payload] = mobiledoc.cards[cardIndex];\n    // rename card if there's a difference between mobiledoc and lexical\n    cardName = CARD_NAME_MAP[cardName] || cardName;\n    // rename any properties to match lexical\n    if (CARD_PROPERTY_MAP[cardName]) {\n        const map = CARD_PROPERTY_MAP[cardName];\n        for (const [oldName, newName] of Object.entries(map)) {\n            payload[newName] = payload[oldName];\n            delete payload[oldName];\n        }\n    }\n    // run any payload fixes\n    if (CARD_FIXES_MAP[cardName]) {\n        payload = CARD_FIXES_MAP[cardName](payload);\n    }\n    delete payload.type;\n    const decoratorNode = { type: cardName, ...payload };\n    return decoratorNode;\n}\n","var map = {\n\t\"./af\": 82909,\n\t\"./af.js\": 82909,\n\t\"./ar\": 12785,\n\t\"./ar-dz\": 93396,\n\t\"./ar-dz.js\": 93396,\n\t\"./ar-kw\": 69208,\n\t\"./ar-kw.js\": 69208,\n\t\"./ar-ly\": 677,\n\t\"./ar-ly.js\": 677,\n\t\"./ar-ma\": 45668,\n\t\"./ar-ma.js\": 45668,\n\t\"./ar-ps\": 43583,\n\t\"./ar-ps.js\": 43583,\n\t\"./ar-sa\": 70870,\n\t\"./ar-sa.js\": 70870,\n\t\"./ar-tn\": 30120,\n\t\"./ar-tn.js\": 30120,\n\t\"./ar.js\": 12785,\n\t\"./az\": 12617,\n\t\"./az.js\": 12617,\n\t\"./be\": 4963,\n\t\"./be.js\": 4963,\n\t\"./bg\": 13925,\n\t\"./bg.js\": 13925,\n\t\"./bm\": 22091,\n\t\"./bm.js\": 22091,\n\t\"./bn\": 14990,\n\t\"./bn-bd\": 95993,\n\t\"./bn-bd.js\": 95993,\n\t\"./bn.js\": 14990,\n\t\"./bo\": 47949,\n\t\"./bo.js\": 47949,\n\t\"./br\": 81162,\n\t\"./br.js\": 81162,\n\t\"./bs\": 51417,\n\t\"./bs.js\": 51417,\n\t\"./ca\": 95606,\n\t\"./ca.js\": 95606,\n\t\"./cs\": 53724,\n\t\"./cs.js\": 53724,\n\t\"./cv\": 1223,\n\t\"./cv.js\": 1223,\n\t\"./cy\": 45390,\n\t\"./cy.js\": 45390,\n\t\"./da\": 789,\n\t\"./da.js\": 789,\n\t\"./de\": 78041,\n\t\"./de-at\": 44451,\n\t\"./de-at.js\": 44451,\n\t\"./de-ch\": 99237,\n\t\"./de-ch.js\": 99237,\n\t\"./de.js\": 78041,\n\t\"./dv\": 30768,\n\t\"./dv.js\": 30768,\n\t\"./el\": 88975,\n\t\"./el.js\": 88975,\n\t\"./en-au\": 16628,\n\t\"./en-au.js\": 16628,\n\t\"./en-ca\": 92550,\n\t\"./en-ca.js\": 92550,\n\t\"./en-gb\": 86295,\n\t\"./en-gb.js\": 86295,\n\t\"./en-ie\": 78140,\n\t\"./en-ie.js\": 78140,\n\t\"./en-il\": 10155,\n\t\"./en-il.js\": 10155,\n\t\"./en-in\": 53293,\n\t\"./en-in.js\": 53293,\n\t\"./en-nz\": 39342,\n\t\"./en-nz.js\": 39342,\n\t\"./en-sg\": 28928,\n\t\"./en-sg.js\": 28928,\n\t\"./eo\": 91490,\n\t\"./eo.js\": 91490,\n\t\"./es\": 78038,\n\t\"./es-do\": 32730,\n\t\"./es-do.js\": 32730,\n\t\"./es-mx\": 6430,\n\t\"./es-mx.js\": 6430,\n\t\"./es-us\": 56443,\n\t\"./es-us.js\": 56443,\n\t\"./es.js\": 78038,\n\t\"./et\": 71255,\n\t\"./et.js\": 71255,\n\t\"./eu\": 29952,\n\t\"./eu.js\": 29952,\n\t\"./fa\": 69419,\n\t\"./fa.js\": 69419,\n\t\"./fi\": 52291,\n\t\"./fi.js\": 52291,\n\t\"./fil\": 66559,\n\t\"./fil.js\": 66559,\n\t\"./fo\": 79465,\n\t\"./fo.js\": 79465,\n\t\"./fr\": 66014,\n\t\"./fr-ca\": 79383,\n\t\"./fr-ca.js\": 79383,\n\t\"./fr-ch\": 69864,\n\t\"./fr-ch.js\": 69864,\n\t\"./fr.js\": 66014,\n\t\"./fy\": 66355,\n\t\"./fy.js\": 66355,\n\t\"./ga\": 4442,\n\t\"./ga.js\": 4442,\n\t\"./gd\": 72581,\n\t\"./gd.js\": 72581,\n\t\"./gl\": 17997,\n\t\"./gl.js\": 17997,\n\t\"./gom-deva\": 2480,\n\t\"./gom-deva.js\": 2480,\n\t\"./gom-latn\": 74347,\n\t\"./gom-latn.js\": 74347,\n\t\"./gu\": 42198,\n\t\"./gu.js\": 42198,\n\t\"./he\": 77861,\n\t\"./he.js\": 77861,\n\t\"./hi\": 94129,\n\t\"./hi.js\": 94129,\n\t\"./hr\": 30528,\n\t\"./hr.js\": 30528,\n\t\"./hu\": 47381,\n\t\"./hu.js\": 47381,\n\t\"./hy-am\": 42380,\n\t\"./hy-am.js\": 42380,\n\t\"./id\": 79187,\n\t\"./id.js\": 79187,\n\t\"./is\": 45082,\n\t\"./is.js\": 45082,\n\t\"./it\": 65123,\n\t\"./it-ch\": 63303,\n\t\"./it-ch.js\": 63303,\n\t\"./it.js\": 65123,\n\t\"./ja\": 92063,\n\t\"./ja.js\": 92063,\n\t\"./jv\": 58222,\n\t\"./jv.js\": 58222,\n\t\"./ka\": 69550,\n\t\"./ka.js\": 69550,\n\t\"./kk\": 38748,\n\t\"./kk.js\": 38748,\n\t\"./km\": 39994,\n\t\"./km.js\": 39994,\n\t\"./kn\": 43719,\n\t\"./kn.js\": 43719,\n\t\"./ko\": 19568,\n\t\"./ko.js\": 19568,\n\t\"./ku\": 38226,\n\t\"./ku-kmr\": 2729,\n\t\"./ku-kmr.js\": 2729,\n\t\"./ku.js\": 38226,\n\t\"./ky\": 80630,\n\t\"./ky.js\": 80630,\n\t\"./lb\": 25732,\n\t\"./lb.js\": 25732,\n\t\"./lo\": 80135,\n\t\"./lo.js\": 80135,\n\t\"./lt\": 73586,\n\t\"./lt.js\": 73586,\n\t\"./lv\": 46824,\n\t\"./lv.js\": 46824,\n\t\"./me\": 93576,\n\t\"./me.js\": 93576,\n\t\"./mi\": 9516,\n\t\"./mi.js\": 9516,\n\t\"./mk\": 21270,\n\t\"./mk.js\": 21270,\n\t\"./ml\": 14487,\n\t\"./ml.js\": 14487,\n\t\"./mn\": 7481,\n\t\"./mn.js\": 7481,\n\t\"./mr\": 20365,\n\t\"./mr.js\": 20365,\n\t\"./ms\": 71054,\n\t\"./ms-my\": 43925,\n\t\"./ms-my.js\": 43925,\n\t\"./ms.js\": 71054,\n\t\"./mt\": 32207,\n\t\"./mt.js\": 32207,\n\t\"./my\": 79388,\n\t\"./my.js\": 79388,\n\t\"./nb\": 1318,\n\t\"./nb.js\": 1318,\n\t\"./ne\": 20999,\n\t\"./ne.js\": 20999,\n\t\"./nl\": 73624,\n\t\"./nl-be\": 48492,\n\t\"./nl-be.js\": 48492,\n\t\"./nl.js\": 73624,\n\t\"./nn\": 85378,\n\t\"./nn.js\": 85378,\n\t\"./oc-lnc\": 91966,\n\t\"./oc-lnc.js\": 91966,\n\t\"./pa-in\": 92733,\n\t\"./pa-in.js\": 92733,\n\t\"./pl\": 80854,\n\t\"./pl.js\": 80854,\n\t\"./pt\": 95950,\n\t\"./pt-br\": 90051,\n\t\"./pt-br.js\": 90051,\n\t\"./pt.js\": 95950,\n\t\"./ro\": 7485,\n\t\"./ro.js\": 7485,\n\t\"./ru\": 44195,\n\t\"./ru.js\": 44195,\n\t\"./sd\": 25225,\n\t\"./sd.js\": 25225,\n\t\"./se\": 12698,\n\t\"./se.js\": 12698,\n\t\"./si\": 65550,\n\t\"./si.js\": 65550,\n\t\"./sk\": 85316,\n\t\"./sk.js\": 85316,\n\t\"./sl\": 71070,\n\t\"./sl.js\": 71070,\n\t\"./sq\": 50454,\n\t\"./sq.js\": 50454,\n\t\"./sr\": 4275,\n\t\"./sr-cyrl\": 5630,\n\t\"./sr-cyrl.js\": 5630,\n\t\"./sr.js\": 4275,\n\t\"./ss\": 4012,\n\t\"./ss.js\": 4012,\n\t\"./sv\": 8983,\n\t\"./sv.js\": 8983,\n\t\"./sw\": 19264,\n\t\"./sw.js\": 19264,\n\t\"./ta\": 86117,\n\t\"./ta.js\": 86117,\n\t\"./te\": 53801,\n\t\"./te.js\": 53801,\n\t\"./tet\": 42425,\n\t\"./tet.js\": 42425,\n\t\"./tg\": 10311,\n\t\"./tg.js\": 10311,\n\t\"./th\": 94126,\n\t\"./th.js\": 94126,\n\t\"./tk\": 43755,\n\t\"./tk.js\": 43755,\n\t\"./tl-ph\": 72347,\n\t\"./tl-ph.js\": 72347,\n\t\"./tlh\": 51440,\n\t\"./tlh.js\": 51440,\n\t\"./tr\": 32588,\n\t\"./tr.js\": 32588,\n\t\"./tzl\": 22746,\n\t\"./tzl.js\": 22746,\n\t\"./tzm\": 77801,\n\t\"./tzm-latn\": 73819,\n\t\"./tzm-latn.js\": 73819,\n\t\"./tzm.js\": 77801,\n\t\"./ug-cn\": 88722,\n\t\"./ug-cn.js\": 88722,\n\t\"./uk\": 70750,\n\t\"./uk.js\": 70750,\n\t\"./ur\": 16517,\n\t\"./ur.js\": 16517,\n\t\"./uz\": 50541,\n\t\"./uz-latn\": 92055,\n\t\"./uz-latn.js\": 92055,\n\t\"./uz.js\": 50541,\n\t\"./vi\": 93811,\n\t\"./vi.js\": 93811,\n\t\"./x-pseudo\": 97415,\n\t\"./x-pseudo.js\": 97415,\n\t\"./yo\": 43886,\n\t\"./yo.js\": 43886,\n\t\"./zh-cn\": 89900,\n\t\"./zh-cn.js\": 89900,\n\t\"./zh-hk\": 2732,\n\t\"./zh-hk.js\": 2732,\n\t\"./zh-mo\": 82433,\n\t\"./zh-mo.js\": 82433,\n\t\"./zh-tw\": 51244,\n\t\"./zh-tw.js\": 51244\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 54551;","\nwindow._eai_r = require;\nwindow._eai_d = define;\n","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_api_hooks = require(\"../utils/api/hooks.cjs\");\n//#region src/api/config.ts\nvar dataType = \"ConfigResponseType\";\nvar configDataType = dataType;\nvar useBrowseConfig = require_utils_api_hooks.createQuery({\n\tdataType,\n\tpath: \"/config/\"\n});\nvar isManagedEmail = (config) => {\n\treturn !!config?.hostSettings?.managedEmail?.enabled;\n};\nvar normalizeSendingDomains = (raw) => {\n\tif (Array.isArray(raw)) return raw.filter((d) => typeof d === \"string\" && d.length > 0);\n\tif (typeof raw === \"string\" && raw.length > 0) {\n\t\tconst trimmed = raw.trim();\n\t\tif (trimmed.startsWith(\"[\")) try {\n\t\t\tconst parsed = JSON.parse(trimmed);\n\t\t\tif (Array.isArray(parsed)) return parsed.filter((d) => typeof d === \"string\" && d.length > 0);\n\t\t} catch {}\n\t\treturn [raw];\n\t}\n\treturn [];\n};\nvar sendingDomains = (config) => {\n\treturn normalizeSendingDomains(config?.hostSettings?.managedEmail?.sendingDomain);\n};\nvar hasSendingDomain = (config) => {\n\treturn sendingDomains(config).length > 0;\n};\nvar sendingDomain = (config) => {\n\treturn sendingDomains(config)[0];\n};\n//#endregion\nexports.configDataType = configDataType;\nexports.hasSendingDomain = hasSendingDomain;\nexports.isManagedEmail = isManagedEmail;\nexports.sendingDomain = sendingDomain;\nexports.sendingDomains = sendingDomains;\nexports.useBrowseConfig = useBrowseConfig;\n\n//# sourceMappingURL=config.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_hooks_use_handle_error = require(\"../hooks/use-handle-error.cjs\");\nconst require_utils_api_fetch_api = require(\"../utils/api/fetch-api.cjs\");\nlet _tanstack_react_query = require(\"@tanstack/react-query\");\nlet react = require(\"react\");\n//#region src/api/current-user.ts\nvar usersDataType = \"UsersResponseType\";\nvar currentUserUrl = require_utils_api_fetch_api.apiUrl(\"/users/me/\", { include: \"roles\" });\nvar currentUserQueryKey = [usersDataType, currentUserUrl];\nvar useCurrentUser = () => {\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tconst handleError = require_hooks_use_handle_error();\n\tconst result = (0, _tanstack_react_query.useQuery)({\n\t\tqueryKey: currentUserQueryKey,\n\t\tqueryFn: () => fetchApi(currentUserUrl),\n\t\tselect: (data) => data.users[0]\n\t});\n\t(0, react.useEffect)(() => {\n\t\tif (result.error) handleError(result.error);\n\t}, [handleError, result.error]);\n\treturn result;\n};\n//#endregion\nexports.currentUserQueryKey = currentUserQueryKey;\nexports.useCurrentUser = useCurrentUser;\nexports.usersDataType = usersDataType;\n\n//# sourceMappingURL=current-user.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_api_hooks = require(\"../utils/api/hooks.cjs\");\nconst require_utils_api_update_queries = require(\"../utils/api/update-queries.cjs\");\nlet _tanstack_react_query = require(\"@tanstack/react-query\");\n//#region src/api/offers.ts\nvar dataType = \"OffersResponseType\";\nvar useInvalidateOffers = () => {\n\tconst queryClient = (0, _tanstack_react_query.useQueryClient)();\n\treturn () => {\n\t\treturn queryClient.invalidateQueries({ queryKey: [dataType] });\n\t};\n};\nvar useBrowseOffers = require_utils_api_hooks.createQuery({\n\tdataType,\n\tpath: \"/offers/\",\n\tdefaultSearchParams: {}\n});\nvar useBrowseOffersById = require_utils_api_hooks.createQueryWithId({\n\tdataType,\n\tpath: (id) => `/offers/${id}/`\n});\nvar useEditOffer = require_utils_api_hooks.createMutation({\n\tmethod: \"PUT\",\n\tpath: (offer) => `/offers/${offer.id}/`,\n\tbody: (offer) => ({ offers: [offer] }),\n\tupdateQueries: {\n\t\tdataType,\n\t\temberUpdateType: \"createOrUpdate\",\n\t\tupdate: require_utils_api_update_queries.updateQueryCache(\"offers\")\n\t}\n});\nvar useAddOffer = require_utils_api_hooks.createMutation({\n\tmethod: \"POST\",\n\tpath: () => \"/offers/\",\n\tbody: (offer) => ({ offers: [offer] }),\n\tupdateQueries: {\n\t\tdataType,\n\t\temberUpdateType: \"createOrUpdate\",\n\t\tupdate: require_utils_api_update_queries.insertToQueryCache(\"offers\")\n\t}\n});\n//#endregion\nexports.useAddOffer = useAddOffer;\nexports.useBrowseOffers = useBrowseOffers;\nexports.useBrowseOffersById = useBrowseOffersById;\nexports.useEditOffer = useEditOffer;\nexports.useInvalidateOffers = useInvalidateOffers;\n\n//# sourceMappingURL=offers.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_api_hooks = require(\"../utils/api/hooks.cjs\");\n//#region src/api/posts.ts\nvar dataType = \"PostsResponseType\";\nvar useBrowsePosts = require_utils_api_hooks.createQuery({\n\tdataType,\n\tpath: \"/posts/\"\n});\nvar useBrowsePostsInfinite = require_utils_api_hooks.createInfiniteQuery({\n\tdataType,\n\tpath: \"/posts/\",\n\tdefaultNextPageParams: (lastPage, otherParams) => {\n\t\tif (!lastPage.meta?.pagination.next) return;\n\t\treturn {\n\t\t\t...otherParams,\n\t\t\tpage: lastPage.meta.pagination.next.toString()\n\t\t};\n\t},\n\treturnData: (originalData) => {\n\t\tconst { pages } = originalData;\n\t\tconst posts = pages.flatMap((page) => page.posts);\n\t\tconst meta = pages[pages.length - 1].meta;\n\t\treturn {\n\t\t\tposts,\n\t\t\tmeta,\n\t\t\tisEnd: meta ? meta.pagination.pages === meta.pagination.page : true\n\t\t};\n\t}\n});\nvar getPost = require_utils_api_hooks.createQueryWithId({\n\tdataType,\n\tpath: (id) => `/posts/${id}/`\n});\nvar useDeletePost = require_utils_api_hooks.createMutation({\n\tmethod: \"DELETE\",\n\tpath: (id) => `/posts/${id}/`\n});\nvar useSearchIndexPosts = require_utils_api_hooks.createQuery({\n\tdataType,\n\tpath: \"/search-index/posts/\"\n});\n//#endregion\nexports.getPost = getPost;\nexports.useBrowsePosts = useBrowsePosts;\nexports.useBrowsePostsInfinite = useBrowsePostsInfinite;\nexports.useDeletePost = useDeletePost;\nexports.useSearchIndexPosts = useSearchIndexPosts;\n\n//# sourceMappingURL=posts.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_api_hooks = require(\"../utils/api/hooks.cjs\");\n//#region src/api/settings.ts\nvar dataType = \"SettingsResponseType\";\nvar useBrowseSettings = require_utils_api_hooks.createQuery({\n\tdataType,\n\tpath: \"/settings/\",\n\tdefaultSearchParams: { group: \"site,theme,private,members,portal,newsletter,email,labs,slack,unsplash,views,firstpromoter,editor,comments,analytics,announcement,pintura,donations,security,social_web,explore,transistor\" }\n});\nvar useEditSettings = require_utils_api_hooks.createMutation({\n\tmethod: \"PUT\",\n\tpath: () => \"/settings/\",\n\tbody: (settings) => ({ settings: settings.map(({ key, value }) => ({\n\t\tkey,\n\t\tvalue\n\t})) }),\n\tupdateQueries: {\n\t\tdataType,\n\t\temberUpdateType: \"createOrUpdate\",\n\t\tupdate: (newData) => ({\n\t\t\t...newData,\n\t\t\tsettings: newData.settings\n\t\t})\n\t},\n\tinvalidateQueries: { filters: { predicate(query) {\n\t\treturn query.queryKey[0] !== dataType;\n\t} } }\n});\nvar useRegenerateAccessCode = require_utils_api_hooks.createMutation({\n\tmethod: \"POST\",\n\tpath: () => \"/settings/access_code/regenerate/\",\n\tupdateQueries: {\n\t\tdataType,\n\t\temberUpdateType: \"createOrUpdate\",\n\t\tupdate: (newData) => ({\n\t\t\t...newData,\n\t\t\tsettings: newData.settings\n\t\t})\n\t},\n\tinvalidateQueries: { filters: { predicate(query) {\n\t\treturn query.queryKey[0] !== dataType;\n\t} } }\n});\nvar useDeleteStripeSettings = require_utils_api_hooks.createMutation({\n\tmethod: \"DELETE\",\n\tpath: () => \"/settings/stripe/connect/\",\n\tinvalidateQueries: { dataType }\n});\nvar useTestSlack = require_utils_api_hooks.createMutation({\n\tmethod: \"POST\",\n\tpath: () => \"/slack/test/\"\n});\nfunction humanizeSettingKey(key) {\n\treturn key.replace(/^[a-z]/, (char) => char.toUpperCase()).replace(/_/g, \" \").replace(new RegExp(`\\\\b(${[\n\t\t\"API\",\n\t\t\"CTA\",\n\t\t\"RSS\"\n\t].join(\"|\")})\\\\b`, \"ig\"), (match) => match.toUpperCase());\n}\nfunction getSettingValues(settings, keys) {\n\treturn keys.map((key) => settings?.find((setting) => setting.key === key)?.value);\n}\nfunction getSettingValue(settings, key) {\n\tif (!settings) return null;\n\treturn settings.find((d) => d.key === key)?.value || null;\n}\nfunction isSettingReadOnly(settings, key) {\n\tif (!settings) return;\n\treturn settings.find((d) => d.key === key)?.is_read_only || false;\n}\nfunction checkStripeEnabled(settings, config) {\n\tconst hasSetting = (key) => settings.some((setting) => setting.key === key && setting.value);\n\tconst hasDirectKeys = hasSetting(\"stripe_secret_key\") && hasSetting(\"stripe_publishable_key\");\n\tconst hasConnectKeys = hasSetting(\"stripe_connect_secret_key\") && hasSetting(\"stripe_connect_publishable_key\");\n\tif (config.stripeDirect) return hasDirectKeys;\n\treturn hasConnectKeys || hasDirectKeys;\n}\n//#endregion\nexports.checkStripeEnabled = checkStripeEnabled;\nexports.getSettingValue = getSettingValue;\nexports.getSettingValues = getSettingValues;\nexports.humanizeSettingKey = humanizeSettingKey;\nexports.isSettingReadOnly = isSettingReadOnly;\nexports.useBrowseSettings = useBrowseSettings;\nexports.useDeleteStripeSettings = useDeleteStripeSettings;\nexports.useEditSettings = useEditSettings;\nexports.useRegenerateAccessCode = useRegenerateAccessCode;\nexports.useTestSlack = useTestSlack;\n\n//# sourceMappingURL=settings.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_hooks_use_handle_error = require(\"./hooks/use-handle-error.cjs\");\nconst require_hooks_use_permissions = require(\"./hooks/use-permissions.cjs\");\nconst require_hooks_use_confirm_unload = require(\"./hooks/use-confirm-unload.cjs\");\nconst require_hooks_use_form = require(\"./hooks/use-form.cjs\");\nconst require_hooks_use_filterable_api = require(\"./hooks/use-filterable-api.cjs\");\nconst require_hooks_use_koenig_file_upload = require(\"./hooks/use-koenig-file-upload.cjs\");\nconst require_hooks_use_koenig_fetch_embed = require(\"./hooks/use-koenig-fetch-embed.cjs\");\nconst require_hooks_use_koenig_link_suggestions = require(\"./hooks/use-koenig-link-suggestions.cjs\");\nconst require_hooks_use_feature_flag = require(\"./hooks/use-feature-flag.cjs\");\nconst require_hooks_use_pintura_config = require(\"./hooks/use-pintura-config.cjs\");\nexports.koenigFileUploadTypes = require_hooks_use_koenig_file_upload.koenigFileUploadTypes;\nexports.useConfirmUnload = require_hooks_use_confirm_unload.useConfirmUnload;\nexports.useFeatureFlag = require_hooks_use_feature_flag.useFeatureFlag;\nexports.useFilterableApi = require_hooks_use_filterable_api;\nexports.useForm = require_hooks_use_form;\nexports.useHandleError = require_hooks_use_handle_error;\nexports.useKoenigFetchEmbed = require_hooks_use_koenig_fetch_embed.useKoenigFetchEmbed;\nexports.useKoenigFileUpload = require_hooks_use_koenig_file_upload.useKoenigFileUpload;\nexports.useKoenigLinkSuggestions = require_hooks_use_koenig_link_suggestions.useKoenigLinkSuggestions;\nexports.usePermission = require_hooks_use_permissions.usePermission;\nexports.usePinturaConfig = require_hooks_use_pintura_config.usePinturaConfig;\n","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_rolldown_runtime = require(\"../rolldown-runtime-D6vf50IK.cjs\");\nlet react = require(\"react\");\nreact = require_rolldown_runtime.__toESM(react, 1);\n//#region src/hooks/use-confirm-unload.ts\nfunction useConfirmUnload(shouldConfirmUnload) {\n\treact.useEffect(() => {\n\t\tif (!shouldConfirmUnload) return;\n\t\tconst handleBeforeUnload = (event) => {\n\t\t\tevent.preventDefault();\n\t\t\tevent.returnValue = \"\";\n\t\t};\n\t\twindow.addEventListener(\"beforeunload\", handleBeforeUnload);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"beforeunload\", handleBeforeUnload);\n\t\t};\n\t}, [shouldConfirmUnload]);\n}\n//#endregion\nexports.useConfirmUnload = useConfirmUnload;\n\n//# sourceMappingURL=use-confirm-unload.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_api_config = require(\"../api/config.cjs\");\n//#region src/hooks/use-feature-flag.ts\n/**\n* Returns whether a Labs flag is explicitly enabled. Only boolean `true`\n* counts — `false` while config is loading, missing, or failed.\n*/\nvar useFeatureFlag = (flag) => {\n\tconst { data: config } = require_api_config.useBrowseConfig();\n\treturn config?.config.labs?.[flag] === true;\n};\n//#endregion\nexports.useFeatureFlag = useFeatureFlag;\n\n//# sourceMappingURL=use-feature-flag.cjs.map","const require_utils_api_fetch_api = require(\"../utils/api/fetch-api.cjs\");\nlet react = require(\"react\");\nlet _tryghost_nql_string = require(\"@tryghost/nql-string\");\n//#region src/hooks/use-filterable-api.ts\nvar filterData = (data = [], filterKey, input) => {\n\tif (!data || !input) return data;\n\treturn data.filter((item) => item[filterKey]?.toLowerCase().includes(input.toLowerCase()));\n};\nvar useFilterableApi = ({ path, filterKey, responseKey, limit = 20 }) => {\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tconst result = (0, react.useRef)({});\n\tconst loadData = async (input) => {\n\t\tif ((result.current.allLoaded || result.current.lastInput === input) && result.current.data) return filterData(result.current.data, filterKey, input);\n\t\tconst response = await fetchApi(require_utils_api_fetch_api.apiUrl(path, {\n\t\t\tfilter: input ? `${filterKey}:~${(0, _tryghost_nql_string.escapeNqlString)(input)}` : \"\",\n\t\t\tlimit: limit.toString()\n\t\t}));\n\t\tresult.current.data = response[responseKey];\n\t\tresult.current.allLoaded = !input && !response.meta?.pagination.next;\n\t\tresult.current.lastInput = input;\n\t\treturn filterData(response[responseKey], filterKey, input);\n\t};\n\tconst loadInitialValues = async (values, key) => {\n\t\tawait loadData(\"\");\n\t\tconst data = [...result.current.data || []];\n\t\tconst missingValues = values.filter((value) => !result.current.data?.find((item) => item[key] === value));\n\t\tif (missingValues.length) {\n\t\t\tconst additionalData = await fetchApi(require_utils_api_fetch_api.apiUrl(path, {\n\t\t\t\tfilter: `${key}:[${missingValues.join(\",\")}]`,\n\t\t\t\tlimit: \"100\"\n\t\t\t}));\n\t\t\tdata.push(...additionalData[responseKey]);\n\t\t}\n\t\treturn values.map((value) => data.find((item) => item[key] === value));\n\t};\n\treturn {\n\t\tloadData,\n\t\tloadInitialValues\n\t};\n};\n//#endregion\nmodule.exports = useFilterableApi;\n\n//# sourceMappingURL=use-filterable-api.cjs.map","let react = require(\"react\");\n//#region src/hooks/use-form.ts\nvar useForm = ({ initialState, savingDelay, savedDelay = 2e3, onSave, onSaveError, onSavedStateReset: onSaveCompleted, onValidate }) => {\n\tconst [formState, setFormState] = (0, react.useState)(initialState);\n\tconst [saveState, setSaveState] = (0, react.useState)(\"\");\n\tconst [errors, setErrors] = (0, react.useState)({});\n\t(0, react.useEffect)(() => {\n\t\tif (saveState === \"saved\") setTimeout(() => {\n\t\t\tonSaveCompleted?.();\n\t\t\tsetSaveState((state) => state === \"saved\" ? \"\" : state);\n\t\t}, savedDelay);\n\t}, [saveState, savedDelay]);\n\tconst isValid = (errs) => Object.values(errs).filter(Boolean).length === 0;\n\tconst validate = (0, react.useCallback)(() => {\n\t\tif (!onValidate) return true;\n\t\tconst newErrors = onValidate(formState);\n\t\tsetErrors(newErrors);\n\t\treturn isValid(newErrors);\n\t}, [formState, onValidate]);\n\tconst handleSave = (0, react.useCallback)(async (options = {}) => {\n\t\tif (!validate()) {\n\t\t\tsetSaveState(\"error\");\n\t\t\treturn false;\n\t\t}\n\t\tif (saveState !== \"unsaved\" && !options.force && !options.fakeWhenUnchanged) return true;\n\t\tconst timeBefore = Date.now();\n\t\tsetSaveState(\"saving\");\n\t\ttry {\n\t\t\tif (saveState === \"unsaved\" || options.force) await onSave(formState);\n\t\t\tconst duration = Date.now() - timeBefore;\n\t\t\tif (savingDelay && duration < savingDelay) await new Promise((resolve) => {\n\t\t\t\tsetTimeout(resolve, savingDelay - duration);\n\t\t\t});\n\t\t\tsetSaveState(\"saved\");\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\tawait onSaveError?.(e);\n\t\t\tsetSaveState(\"unsaved\");\n\t\t\tthrow e;\n\t\t}\n\t}, [\n\t\tformState,\n\t\tsaveState,\n\t\tsavingDelay,\n\t\tonSave,\n\t\tonSaveError,\n\t\tvalidate\n\t]);\n\tconst updateForm = (0, react.useCallback)((updater) => {\n\t\tsetFormState(updater);\n\t\tsetSaveState(\"unsaved\");\n\t}, []);\n\tlet okVariant = \"default\";\n\tif (saveState === \"saved\") okVariant = \"default\";\n\telse if (saveState === \"error\") okVariant = \"destructive\";\n\tlet okLabel = \"\";\n\tif (saveState === \"saved\") okLabel = \"Saved\";\n\telse if (saveState === \"saving\") okLabel = \"Saving...\";\n\telse if (saveState === \"error\") okLabel = \"Retry\";\n\tconst okProps = {\n\t\tdisabled: saveState === \"saving\",\n\t\tvariant: okVariant,\n\t\tlabel: okLabel || void 0\n\t};\n\treturn {\n\t\tformState,\n\t\tsaveState,\n\t\thandleSave,\n\t\tupdateForm,\n\t\tsetFormState,\n\t\treset() {\n\t\t\tsetFormState(initialState);\n\t\t\tsetSaveState(\"\");\n\t\t},\n\t\tvalidate,\n\t\tisValid: isValid(errors),\n\t\tclearError: (field) => {\n\t\t\tsetErrors((state) => ({\n\t\t\t\t...state,\n\t\t\t\t[field]: \"\"\n\t\t\t}));\n\t\t},\n\t\terrors,\n\t\tsetErrors,\n\t\tokProps\n\t};\n};\n//#endregion\nmodule.exports = useForm;\n\n//# sourceMappingURL=use-form.cjs.map","const require_rolldown_runtime = require(\"../rolldown-runtime-D6vf50IK.cjs\");\nconst require_providers_framework_provider = require(\"../providers/framework-provider.cjs\");\nconst require_utils_errors = require(\"../utils/errors.cjs\");\nlet _sentry_react = require(\"@sentry/react\");\n_sentry_react = require_rolldown_runtime.__toESM(_sentry_react, 1);\nlet react = require(\"react\");\nlet sonner = require(\"sonner\");\n//#region src/hooks/use-handle-error.ts\nfunction showErrorToast(message) {\n\tsonner.toast.dismiss();\n\tsonner.toast.error(message);\n}\n/**\n* Generic error handling for API calls. This is enabled by default for queries (can be disabled by\n* setting defaultErrorHandler:false when using the query) but should be called when mutations throw\n* errors in order to handle anything unexpected.\n*/\nvar useHandleError = () => {\n\tconst { sentryDSN } = require_providers_framework_provider.useFramework();\n\treturn (0, react.useCallback)((error, { withToast = true } = {}) => {\n\t\tconsole.error(error);\n\t\tif (sentryDSN && !(error instanceof require_utils_errors.SessionExpiredError)) _sentry_react.withScope((scope) => {\n\t\t\tif (error instanceof require_utils_errors.APIError && error.response) {\n\t\t\t\tscope.setTag(\"api_url\", error.response.url);\n\t\t\t\tscope.setTag(\"api_response_status\", error.response.status);\n\t\t\t}\n\t\t\t_sentry_react.captureException(error);\n\t\t});\n\t\tif (!withToast) return;\n\t\tif (error instanceof require_utils_errors.APIError && error.response?.status === 418) sonner.toast.dismiss();\n\t\telse if (error instanceof require_utils_errors.SessionExpiredError) sonner.toast.dismiss();\n\t\telse if (error instanceof require_utils_errors.APIError) showErrorToast(require_utils_errors.getErrorMessage(error, error.message));\n\t\telse showErrorToast(\"Something went wrong, please try again.\");\n\t}, [sentryDSN]);\n};\n//#endregion\nmodule.exports = useHandleError;\n\n//# sourceMappingURL=use-handle-error.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_helpers = require(\"../utils/helpers.cjs\");\nconst require_utils_api_fetch_api = require(\"../utils/api/fetch-api.cjs\");\nlet react = require(\"react\");\n//#region src/hooks/use-koenig-fetch-embed.ts\nvar useKoenigFetchEmbed = () => {\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\treturn (0, react.useCallback)(async (url, { type } = {}) => {\n\t\tconst oembedUrl = new URL(`${require_utils_helpers.getGhostPaths().apiRoot}/oembed/`, window.location.origin);\n\t\toembedUrl.searchParams.set(\"url\", url);\n\t\tif (type) oembedUrl.searchParams.set(\"type\", type);\n\t\treturn await fetchApi(oembedUrl);\n\t}, [fetchApi]);\n};\n//#endregion\nexports.useKoenigFetchEmbed = useKoenigFetchEmbed;\n\n//# sourceMappingURL=use-koenig-fetch-embed.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_helpers = require(\"../utils/helpers.cjs\");\nconst require_utils_api_fetch_api = require(\"../utils/api/fetch-api.cjs\");\nlet react = require(\"react\");\n//#region src/hooks/use-koenig-file-upload.ts\nvar koenigFileUploadTypes = {\n\timage: {\n\t\tmimeTypes: [\n\t\t\t\"image/gif\",\n\t\t\t\"image/jpg\",\n\t\t\t\"image/jpeg\",\n\t\t\t\"image/png\",\n\t\t\t\"image/svg+xml\",\n\t\t\t\"image/webp\"\n\t\t],\n\t\textensions: [\n\t\t\t\"gif\",\n\t\t\t\"jpg\",\n\t\t\t\"jpeg\",\n\t\t\t\"png\",\n\t\t\t\"svg\",\n\t\t\t\"svgz\",\n\t\t\t\"webp\"\n\t\t],\n\t\tendpoint: \"/images/upload/\",\n\t\trequestMethod: \"post\",\n\t\tresourceName: \"images\"\n\t},\n\tvideo: {\n\t\tmimeTypes: [\n\t\t\t\"video/mp4\",\n\t\t\t\"video/webm\",\n\t\t\t\"video/ogg\"\n\t\t],\n\t\textensions: [\n\t\t\t\"mp4\",\n\t\t\t\"webm\",\n\t\t\t\"ogv\"\n\t\t],\n\t\tendpoint: \"/media/upload/\",\n\t\trequestMethod: \"post\",\n\t\tresourceName: \"media\"\n\t},\n\taudio: {\n\t\tmimeTypes: [\n\t\t\t\"audio/mp3\",\n\t\t\t\"audio/mpeg\",\n\t\t\t\"audio/ogg\",\n\t\t\t\"audio/wav\",\n\t\t\t\"audio/vnd.wav\",\n\t\t\t\"audio/wave\",\n\t\t\t\"audio/x-wav\",\n\t\t\t\"audio/mp4\",\n\t\t\t\"audio/x-m4a\"\n\t\t],\n\t\textensions: [\n\t\t\t\"mp3\",\n\t\t\t\"wav\",\n\t\t\t\"ogg\",\n\t\t\t\"m4a\"\n\t\t],\n\t\tendpoint: \"/media/upload/\",\n\t\trequestMethod: \"post\",\n\t\tresourceName: \"media\"\n\t},\n\tmediaThumbnail: {\n\t\tmimeTypes: [\n\t\t\t\"image/gif\",\n\t\t\t\"image/jpg\",\n\t\t\t\"image/jpeg\",\n\t\t\t\"image/png\",\n\t\t\t\"image/webp\"\n\t\t],\n\t\textensions: [\n\t\t\t\"gif\",\n\t\t\t\"jpg\",\n\t\t\t\"jpeg\",\n\t\t\t\"png\",\n\t\t\t\"webp\"\n\t\t],\n\t\tendpoint: \"/media/thumbnail/upload/\",\n\t\trequestMethod: \"put\",\n\t\tresourceName: \"media\"\n\t},\n\tfile: {\n\t\textensions: [],\n\t\tendpoint: \"/files/upload/\",\n\t\trequestMethod: \"post\",\n\t\tresourceName: \"files\"\n\t}\n};\nvar getStringAtPath = (maybeObj, path) => {\n\tlet current = maybeObj;\n\tfor (const key of path) if (current && typeof current === \"object\" && key in current) current = current[key];\n\telse return null;\n\treturn typeof current === \"string\" ? current : null;\n};\nvar useKoenigFileUpload = (type = \"image\") => {\n\tconst [progress, setProgress] = (0, react.useState)(0);\n\tconst [isLoading, setLoading] = (0, react.useState)(false);\n\tconst [errors, setErrors] = (0, react.useState)([]);\n\tconst [filesNumber, setFilesNumber] = (0, react.useState)(0);\n\tconst progressTracker = (0, react.useRef)(/* @__PURE__ */ new Map());\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tfunction updateProgress() {\n\t\tif (progressTracker.current.size === 0) {\n\t\t\tsetProgress(0);\n\t\t\treturn;\n\t\t}\n\t\tlet totalProgress = 0;\n\t\tprogressTracker.current.forEach((value) => {\n\t\t\ttotalProgress += value;\n\t\t});\n\t\tsetProgress(Math.round(totalProgress / progressTracker.current.size));\n\t}\n\tconst defaultValidator = (file) => {\n\t\tif (type === \"file\") return true;\n\t\tconst extensions = koenigFileUploadTypes[type].extensions;\n\t\tconst [, extension] = /(?:\\.([^.]+))?$/.exec(file.name) ?? [];\n\t\tif (!extensions) return true;\n\t\tif (!extension || extensions.indexOf(extension.toLowerCase()) === -1) return `The file type you uploaded is not supported. Please use ${`.${extensions.join(\", .\").toUpperCase()}`}`;\n\t\treturn true;\n\t};\n\tconst validate = (files = []) => {\n\t\tconst validationResult = [];\n\t\tfor (let i = 0; i < files.length; i += 1) {\n\t\t\tconst file = files[i];\n\t\t\tconst result = defaultValidator(file);\n\t\t\tif (result === true) continue;\n\t\t\tvalidationResult.push({\n\t\t\t\tfileName: file.name,\n\t\t\t\tmessage: result\n\t\t\t});\n\t\t}\n\t\treturn validationResult;\n\t};\n\tconst uploadFile = async (file, { formData = {} } = {}) => {\n\t\tprogressTracker.current.set(file, 0);\n\t\tconst fileFormData = new FormData();\n\t\tfileFormData.append(\"file\", file, file.name);\n\t\tObject.keys(formData).forEach((key) => {\n\t\t\tfileFormData.append(key, formData[key]);\n\t\t});\n\t\tconst url = `${require_utils_helpers.getGhostPaths().apiRoot}${koenigFileUploadTypes[type].endpoint}`;\n\t\ttry {\n\t\t\tconst uploadResponse = await fetchApi(url, {\n\t\t\t\tmethod: koenigFileUploadTypes[type].requestMethod,\n\t\t\t\tbody: fileFormData,\n\t\t\t\tonUploadProgress(uploadProgress) {\n\t\t\t\t\tprogressTracker.current.set(file, uploadProgress);\n\t\t\t\t\tupdateProgress();\n\t\t\t\t}\n\t\t\t});\n\t\t\tprogressTracker.current.set(file, 100);\n\t\t\tupdateProgress();\n\t\t\tlet responseUrl;\n\t\t\tif (uploadResponse) {\n\t\t\t\tconst resource = uploadResponse[koenigFileUploadTypes[type].resourceName];\n\t\t\t\tif (resource && Array.isArray(resource) && resource[0]) responseUrl = resource[0].url;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\turl: responseUrl,\n\t\t\t\tfileName: file.name\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t\tconst context = getStringAtPath(error, [\n\t\t\t\t\"data\",\n\t\t\t\t\"errors\",\n\t\t\t\t0,\n\t\t\t\t\"context\"\n\t\t\t]) || \"\";\n\t\t\tconst message = getStringAtPath(error, [\n\t\t\t\t\"data\",\n\t\t\t\t\"errors\",\n\t\t\t\t0,\n\t\t\t\t\"message\"\n\t\t\t]) || getStringAtPath(error, [\"message\"]) || \"\";\n\t\t\tthrow {\n\t\t\t\tmessage: context || message,\n\t\t\t\tcontext,\n\t\t\t\tfileName: file.name\n\t\t\t};\n\t\t}\n\t};\n\tconst upload = async (files = [], options = {}) => {\n\t\tsetFilesNumber(files.length);\n\t\tsetLoading(true);\n\t\tsetErrors([]);\n\t\tconst validationResult = validate(files);\n\t\tif (validationResult.length) {\n\t\t\tsetErrors(validationResult);\n\t\t\tsetLoading(false);\n\t\t\tsetProgress(100);\n\t\t\treturn null;\n\t\t}\n\t\tconst uploadPromises = [];\n\t\tfor (let i = 0; i < files.length; i += 1) {\n\t\t\tconst file = files[i];\n\t\t\tuploadPromises.push(uploadFile(file, options));\n\t\t}\n\t\ttry {\n\t\t\tconst uploadResult = await Promise.all(uploadPromises);\n\t\t\tsetProgress(100);\n\t\t\tprogressTracker.current.clear();\n\t\t\tsetLoading(false);\n\t\t\tsetErrors([]);\n\t\t\treturn uploadResult;\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t\tsetErrors([error]);\n\t\t\tsetLoading(false);\n\t\t\tsetProgress(100);\n\t\t\tprogressTracker.current.clear();\n\t\t\treturn null;\n\t\t}\n\t};\n\treturn {\n\t\tprogress,\n\t\tisLoading,\n\t\tupload,\n\t\terrors,\n\t\tfilesNumber\n\t};\n};\n//#endregion\nexports.koenigFileUploadTypes = koenigFileUploadTypes;\nexports.useKoenigFileUpload = useKoenigFileUpload;\n\n//# sourceMappingURL=use-koenig-file-upload.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_hooks_use_filterable_api = require(\"./use-filterable-api.cjs\");\nconst require_api_offers = require(\"../api/offers.cjs\");\nconst require_api_posts = require(\"../api/posts.cjs\");\nlet react = require(\"react\");\n//#region src/hooks/use-koenig-link-suggestions.ts\nvar useKoenigLinkSuggestions = ({ siteUrl, membersSignupAccess, donationsEnabled, recommendationsEnabled, includeShareLink = false, shareLinkLabel = \"Share\" }) => {\n\tconst { data: offersData } = require_api_offers.useBrowseOffers();\n\tconst { data: latestPostsData } = require_api_posts.useBrowsePosts({ searchParams: {\n\t\tfilter: \"status:published\",\n\t\tfields: \"id,url,title,visibility,published_at\",\n\t\torder: \"published_at desc\",\n\t\tlimit: \"5\"\n\t} });\n\tconst searchPosts = require_hooks_use_filterable_api({\n\t\tpath: \"/search-index/posts/\",\n\t\tfilterKey: \"title\",\n\t\tresponseKey: \"posts\"\n\t});\n\tconst searchPages = require_hooks_use_filterable_api({\n\t\tpath: \"/search-index/pages/\",\n\t\tfilterKey: \"title\",\n\t\tresponseKey: \"pages\"\n\t});\n\tconst defaultLinks = (0, react.useMemo)(() => {\n\t\treturn [{\n\t\t\tlabel: \"Latest posts\",\n\t\t\titems: (latestPostsData?.posts || []).map((post) => ({\n\t\t\t\tid: post.id,\n\t\t\t\ttitle: post.title,\n\t\t\t\turl: post.url,\n\t\t\t\tvisibility: post.visibility,\n\t\t\t\tpublishedAt: post.published_at\n\t\t\t}))\n\t\t}];\n\t}, [latestPostsData?.posts]);\n\treturn {\n\t\tfetchAutocompleteLinks: (0, react.useCallback)(async () => {\n\t\t\tconst defaults = [{\n\t\t\t\tlabel: \"Homepage\",\n\t\t\t\tvalue: siteUrl\n\t\t\t}, {\n\t\t\t\tlabel: \"Free signup\",\n\t\t\t\tvalue: \"#/portal/signup/free\"\n\t\t\t}];\n\t\t\tconst shareLink = includeShareLink ? [{\n\t\t\t\tlabel: shareLinkLabel,\n\t\t\t\tvalue: \"#/share\"\n\t\t\t}] : [];\n\t\t\tconst memberLinks = membersSignupAccess === \"all\" ? [{\n\t\t\t\tlabel: \"Paid signup\",\n\t\t\t\tvalue: \"#/portal/signup\"\n\t\t\t}, {\n\t\t\t\tlabel: \"Upgrade or change plan\",\n\t\t\t\tvalue: \"#/portal/account/plans\"\n\t\t\t}] : [];\n\t\t\tconst donationLink = donationsEnabled ? [{\n\t\t\t\tlabel: \"Tips and donations\",\n\t\t\t\tvalue: \"#/portal/support\"\n\t\t\t}] : [];\n\t\t\tconst recommendationLink = recommendationsEnabled ? [{\n\t\t\t\tlabel: \"Recommendations\",\n\t\t\t\tvalue: \"#/portal/recommendations\"\n\t\t\t}] : [];\n\t\t\tconst offersLinks = (offersData?.offers || []).filter((offer) => offer.status === \"active\" && offer.redemption_type === \"signup\").map((offer) => ({\n\t\t\t\tlabel: `Offer - ${offer.name}`,\n\t\t\t\tvalue: new URL(offer.code, siteUrl).toString()\n\t\t\t}));\n\t\t\treturn [\n\t\t\t\t...defaults,\n\t\t\t\t...memberLinks,\n\t\t\t\t...donationLink,\n\t\t\t\t...shareLink,\n\t\t\t\t...recommendationLink,\n\t\t\t\t...offersLinks\n\t\t\t];\n\t\t}, [\n\t\t\tdonationsEnabled,\n\t\t\tincludeShareLink,\n\t\t\tmembersSignupAccess,\n\t\t\toffersData?.offers,\n\t\t\trecommendationsEnabled,\n\t\t\tshareLinkLabel,\n\t\t\tsiteUrl\n\t\t]),\n\t\tsearchLinks: (0, react.useCallback)(async (term) => {\n\t\t\tif (!term) return defaultLinks;\n\t\t\tconst [posts, pages] = await Promise.all([searchPosts.loadData(term), searchPages.loadData(term)]);\n\t\t\treturn [{\n\t\t\t\tlabel: \"Posts\",\n\t\t\t\titems: posts.filter((item) => item.status === \"published\").map((item) => ({\n\t\t\t\t\tid: item.id,\n\t\t\t\t\ttitle: item.title,\n\t\t\t\t\turl: item.url,\n\t\t\t\t\tvisibility: item.visibility,\n\t\t\t\t\tpublishedAt: item.published_at\n\t\t\t\t}))\n\t\t\t}, {\n\t\t\t\tlabel: \"Pages\",\n\t\t\t\titems: pages.filter((item) => item.status === \"published\").map((item) => ({\n\t\t\t\t\tid: item.id,\n\t\t\t\t\ttitle: item.title,\n\t\t\t\t\turl: item.url,\n\t\t\t\t\tvisibility: item.visibility,\n\t\t\t\t\tpublishedAt: item.published_at\n\t\t\t\t}))\n\t\t\t}].filter((group) => group.items.length > 0);\n\t\t}, [\n\t\t\tdefaultLinks,\n\t\t\tsearchPages,\n\t\t\tsearchPosts\n\t\t])\n\t};\n};\n//#endregion\nexports.useKoenigLinkSuggestions = useKoenigLinkSuggestions;\n\n//# sourceMappingURL=use-koenig-link-suggestions.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nlet react = require(\"react\");\n//#region src/hooks/use-pagination.ts\nvar usePagination = ({ limit, meta, page, setPage }) => {\n\tconst [prevMeta, setPrevMeta] = (0, react.useState)(meta);\n\t(0, react.useEffect)(() => {\n\t\tif (meta) {\n\t\t\tsetPrevMeta(meta);\n\t\t\tif (meta.pages > 0 && meta.pages < page) setPage(meta.pages);\n\t\t}\n\t}, [\n\t\tmeta,\n\t\tsetPage,\n\t\tpage\n\t]);\n\treturn {\n\t\tpage,\n\t\tsetPage,\n\t\tpages: prevMeta?.pages ?? null,\n\t\tlimit: prevMeta?.limit && prevMeta.limit !== \"all\" ? prevMeta.limit : limit,\n\t\ttotal: prevMeta?.total ?? null,\n\t\tnextPage: () => setPage(Math.min(page + 1, prevMeta?.pages ? prevMeta.pages : page)),\n\t\tprevPage: () => setPage(Math.max(1, page - 1))\n\t};\n};\n//#endregion\nexports.usePagination = usePagination;\n\n//# sourceMappingURL=use-pagination.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_api_current_user = require(\"../api/current-user.cjs\");\n//#region src/hooks/use-permissions.ts\nvar usePermission = (requiredRoles) => {\n\tconst { data: currentUser } = require_api_current_user.useCurrentUser();\n\tif (!requiredRoles || requiredRoles.length === 0) return true;\n\tconst currentUserRoles = currentUser?.roles.map((role) => role.name);\n\tif (!currentUserRoles) return false;\n\treturn requiredRoles.some((role) => currentUserRoles.includes(role));\n};\n//#endregion\nexports.usePermission = usePermission;\n\n//# sourceMappingURL=use-permissions.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_helpers = require(\"../utils/helpers.cjs\");\nconst require_api_config = require(\"../api/config.cjs\");\nconst require_api_settings = require(\"../api/settings.cjs\");\nlet react = require(\"react\");\n//#region src/hooks/use-pintura-config.ts\nvar parseOptionalString = (value) => {\n\tif (value === null || typeof value === \"undefined\") return;\n\tif (typeof value === \"string\") return value;\n\tthrow new TypeError(\"Expected value to be null, undefined, or a string\");\n};\nvar resolveUrl = (url) => {\n\tif (url.startsWith(\"/\")) {\n\t\tconst { adminRoot } = require_utils_helpers.getGhostPaths();\n\t\treturn window.location.origin + adminRoot.replace(/\\/$/, \"\") + url;\n\t}\n\treturn url;\n};\n/**\n* Returns the URLs for Pintura, or `null` when Pintura is not\n* enabled/configured.\n*\n* Suitable for passing to Koenig's `cardConfig`. Koenig handles its own script\n* and CSS loading — this hook only resolves the URLs from settings and host\n* config.\n*/\nfunction usePinturaConfig() {\n\tconst { data: configData } = require_api_config.useBrowseConfig();\n\tconst { data: settingsData } = require_api_settings.useBrowseSettings();\n\tconst pinturaConfig = (configData?.config)?.hostSettings?.pintura;\n\tconst [isEnabled, fallbackJsUrl, fallbackCssUrl] = require_api_settings.getSettingValues(settingsData?.settings ?? null, [\n\t\t\"pintura\",\n\t\t\"pintura_js_url\",\n\t\t\"pintura_css_url\"\n\t]);\n\tlet configJsUrl;\n\tlet configCssUrl;\n\tif (isEnabled) {\n\t\tconfigJsUrl = pinturaConfig?.js || parseOptionalString(fallbackJsUrl);\n\t\tconfigCssUrl = pinturaConfig?.css || parseOptionalString(fallbackCssUrl);\n\t}\n\treturn (0, react.useMemo)(() => {\n\t\tif (!configJsUrl || !configCssUrl) return null;\n\t\treturn {\n\t\t\tjsUrl: resolveUrl(configJsUrl),\n\t\t\tcssUrl: resolveUrl(configCssUrl)\n\t\t};\n\t}, [configJsUrl, configCssUrl]);\n}\n//#endregion\nexports.usePinturaConfig = usePinturaConfig;\n\n//# sourceMappingURL=use-pintura-config.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_query_client = require(\"../utils/query-client.cjs\");\nlet _sentry_react = require(\"@sentry/react\");\nlet _tanstack_react_query = require(\"@tanstack/react-query\");\nlet react = require(\"react\");\nlet react_jsx_runtime = require(\"react/jsx-runtime\");\n//#region src/providers/framework-provider.tsx\nvar FrameworkContext = (0, react.createContext)({\n\tghostVersion: \"\",\n\texternalNavigate: () => {},\n\tunsplashConfig: {\n\t\tAuthorization: \"\",\n\t\t\"Accept-Version\": \"\",\n\t\t\"Content-Type\": \"\",\n\t\t\"App-Pragma\": \"\",\n\t\t\"X-Unsplash-Cache\": true\n\t},\n\tsentryDSN: null,\n\tonUpdate: () => {},\n\tonInvalidate: () => {},\n\tonDelete: () => {}\n});\nfunction FrameworkProvider({ children, queryClient: queryClientOverride, queryClientOptions, ...props }) {\n\treturn /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_sentry_react.ErrorBoundary, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_tanstack_react_query.QueryClientProvider, {\n\t\tclient: (0, react.useMemo)(() => {\n\t\t\tif (queryClientOverride) return queryClientOverride;\n\t\t\tif (!queryClientOptions) return require_utils_query_client;\n\t\t\treturn new _tanstack_react_query.QueryClient({ defaultOptions: { queries: {\n\t\t\t\trefetchOnWindowFocus: queryClientOptions.refetchOnWindowFocus ?? false,\n\t\t\t\tstaleTime: queryClientOptions.staleTime ?? 5 * (60 * 1e3),\n\t\t\t\trefetchOnMount: queryClientOptions.refetchOnMount ?? false,\n\t\t\t\tgcTime: 10 * (60 * 1e3),\n\t\t\t\tretry: false,\n\t\t\t\tnetworkMode: \"always\"\n\t\t\t} } });\n\t\t}, [queryClientOverride, queryClientOptions]),\n\t\tchildren: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FrameworkContext.Provider, {\n\t\t\tvalue: props,\n\t\t\tchildren\n\t\t})\n\t}) });\n}\nvar useFramework = () => (0, react.useContext)(FrameworkContext);\n//#endregion\nexports.FrameworkProvider = FrameworkProvider;\nexports.useFramework = useFramework;\n\n//# sourceMappingURL=framework-provider.cjs.map","//#region \\0rolldown/runtime.js\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\n//#endregion\nObject.defineProperty(exports, \"__toESM\", {\n\tenumerable: true,\n\tget: function() {\n\t\treturn __toESM;\n\t}\n});\n","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_rolldown_runtime = require(\"../../rolldown-runtime-D6vf50IK.cjs\");\nconst require_providers_framework_provider = require(\"../../providers/framework-provider.cjs\");\nconst require_utils_errors = require(\"../errors.cjs\");\nconst require_utils_helpers = require(\"../helpers.cjs\");\nconst require_utils_api_handle_response = require(\"./handle-response.cjs\");\nlet _sentry_react = require(\"@sentry/react\");\n_sentry_react = require_rolldown_runtime.__toESM(_sentry_react, 1);\nlet react = require(\"react\");\n//#region src/utils/api/fetch-api.ts\nvar xhrHeadersToFetchHeaders = (xhr) => {\n\tconst result = new Headers();\n\tconst headerLines = xhr.getAllResponseHeaders()?.split(\"\\r\\n\") || [];\n\tfor (const headerLine of headerLines) {\n\t\tconst separatorIndex = headerLine.indexOf(\":\");\n\t\tif (separatorIndex === -1) continue;\n\t\tconst headerName = headerLine.slice(0, separatorIndex);\n\t\tconst headerValue = headerLine.slice(separatorIndex + 1).trim();\n\t\tresult.append(headerName, headerValue);\n\t}\n\treturn result;\n};\nvar xhrToFetchResponse = (xhr) => new Response(xhr.response, {\n\tstatus: xhr.status,\n\tstatusText: xhr.statusText,\n\theaders: xhrHeadersToFetchHeaders(xhr)\n});\nvar GHOST_API_REQUEST = /\\/ghost\\/api\\//;\nvar SESSION_API_REQUEST = /\\/ghost\\/api\\/admin\\/session([/?#]|$)/;\nvar UNAUTHENTICATED_ADMIN_ROUTE = /^#\\/(?:reset|setup|signin|signup)(?:[/?]|$)/;\nvar sessionExpiryHandled = false;\nvar isUnauthenticatedAdminRoute = (adminRoot) => {\n\treturn window.location.pathname === adminRoot && (!window.location.hash || window.location.hash === \"#/\" || UNAUTHENTICATED_ADMIN_ROUTE.test(window.location.hash));\n};\nvar isSessionExpiry = (endpoint) => {\n\tconst url = endpoint.toString();\n\treturn GHOST_API_REQUEST.test(url) && !SESSION_API_REQUEST.test(url);\n};\nvar redirectOnSessionExpiry = () => {\n\tconst { adminRoot } = require_utils_helpers.getGhostPaths();\n\tif (!sessionExpiryHandled && !isUnauthenticatedAdminRoute(adminRoot)) {\n\t\tsessionExpiryHandled = true;\n\t\twindow.location.replace(adminRoot);\n\t}\n};\nvar fetchWithXhr = (onUploadProgress, endpoint, { method, headers, credentials, body, signal }) => new Promise((resolve, reject) => {\n\tconst onabort = () => {\n\t\treject(new DOMException(\"Aborted\", \"AbortError\"));\n\t};\n\tif (signal.aborted) {\n\t\tonabort();\n\t\treturn;\n\t}\n\tconst xhr = new XMLHttpRequest();\n\txhr.open(method, endpoint.toString(), true);\n\tswitch (credentials) {\n\t\tcase \"omit\": throw new Error(\"\\\"omit\\\" credentials cannot be represented with legacy XMLHttpRequest. Consider \\\"same-origin\\\".\");\n\t\tcase \"same-origin\":\n\t\t\txhr.withCredentials = false;\n\t\t\tbreak;\n\t\tcase \"include\":\n\t\t\txhr.withCredentials = true;\n\t\t\tbreak;\n\t\tdefault: throw new Error(credentials);\n\t}\n\txhr.responseType = \"arraybuffer\";\n\tfor (const [headerName, headerValue] of Object.entries(headers)) xhr.setRequestHeader(headerName, headerValue);\n\txhr.upload.onprogress = (event) => {\n\t\tif (event.lengthComputable) onUploadProgress(event.loaded / event.total * 100);\n\t};\n\txhr.onload = () => {\n\t\tresolve(xhrToFetchResponse(xhr));\n\t};\n\txhr.onerror = () => {\n\t\treject(/* @__PURE__ */ new TypeError(\"Network request failed\"));\n\t};\n\txhr.onabort = onabort;\n\tconst onSignalAbort = () => xhr.abort();\n\tsignal.addEventListener(\"abort\", onSignalAbort);\n\txhr.onloadend = () => {\n\t\tsignal.removeEventListener(\"abort\", onSignalAbort);\n\t};\n\txhr.send(body);\n});\nvar useFetchApi = () => {\n\tconst { ghostVersion, sentryDSN } = require_providers_framework_provider.useFramework();\n\treturn (0, react.useCallback)(async (endpoint, { method = \"GET\", headers = {}, body, credentials = \"include\", timeout, retry = true, onUploadProgress } = {}) => {\n\t\tconst controller = new AbortController();\n\t\tconst requestInit = {\n\t\t\tmethod,\n\t\t\theaders: {\n\t\t\t\t\"app-pragma\": \"no-cache\",\n\t\t\t\t...ghostVersion ? { \"x-ghost-version\": ghostVersion } : {},\n\t\t\t\t...typeof body === \"string\" ? { [\"content-type\"]: \"application/json\" } : {},\n\t\t\t\t...headers\n\t\t\t},\n\t\t\tcredentials,\n\t\t\tmode: \"cors\",\n\t\t\tbody,\n\t\t\tsignal: controller.signal\n\t\t};\n\t\tlet attempts = 0;\n\t\tlet retryingMs = 0;\n\t\tconst startTime = Date.now();\n\t\tconst maxRetryingMs = 15e3;\n\t\tconst retryPeriods = [500, 1e3];\n\t\tconst retryableErrors = [\n\t\t\trequire_utils_errors.ServerUnreachableError,\n\t\t\trequire_utils_errors.MaintenanceError,\n\t\t\tTypeError\n\t\t];\n\t\tconst getErrorData = (error, response) => {\n\t\t\tconst data = {\n\t\t\t\terrorName: error?.name,\n\t\t\t\tattempts,\n\t\t\t\ttotalSeconds: retryingMs / 1e3,\n\t\t\t\tendpoint: endpoint.toString()\n\t\t\t};\n\t\t\tif (endpoint.toString().includes(\"/ghost/api/\")) data.server = response?.headers.get(\"server\");\n\t\t\treturn data;\n\t\t};\n\t\tconst fetchFn = onUploadProgress ? fetchWithXhr.bind(null, onUploadProgress) : fetch;\n\t\tconst timeoutHandle = timeout ? setTimeout(() => controller.abort(), timeout) : void 0;\n\t\ttry {\n\t\t\twhile (attempts === 0 || retry) try {\n\t\t\t\treturn await require_utils_api_handle_response(await fetchFn(endpoint, requestInit));\n\t\t\t} catch (error) {\n\t\t\t\tretryingMs = Date.now() - startTime;\n\t\t\t\tif (retry && retryableErrors.some((errorClass) => error instanceof errorClass) && retryingMs <= maxRetryingMs) {\n\t\t\t\t\tawait new Promise((resolve) => {\n\t\t\t\t\t\tsetTimeout(resolve, retryPeriods[attempts] || retryPeriods[retryPeriods.length - 1]);\n\t\t\t\t\t});\n\t\t\t\t\tattempts += 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (attempts !== 0 && sentryDSN) _sentry_react.captureMessage(\"Request failed after multiple attempts\", { extra: getErrorData() });\n\t\t\t\tif (error && typeof error === \"object\" && \"name\" in error && error.name === \"AbortError\") throw new require_utils_errors.TimeoutError();\n\t\t\t\tif (error instanceof require_utils_errors.UnauthorizedError && isSessionExpiry(endpoint)) {\n\t\t\t\t\tredirectOnSessionExpiry();\n\t\t\t\t\tthrow new require_utils_errors.SessionExpiredError(error.response, error.data, { cause: error });\n\t\t\t\t}\n\t\t\t\tlet newError = error;\n\t\t\t\tif (!(error instanceof require_utils_errors.APIError)) newError = new require_utils_errors.ServerUnreachableError({ cause: error });\n\t\t\t\tthrow newError;\n\t\t\t}\n\t\t} finally {\n\t\t\tclearTimeout(timeoutHandle);\n\t\t}\n\t}, [ghostVersion, sentryDSN]);\n};\nvar { apiRoot, activityPubRoot } = require_utils_helpers.getGhostPaths();\nvar apiUrl = (path, searchParams = {}, useActivityPub = false) => {\n\tconst url = new URL(`${useActivityPub ? activityPubRoot : apiRoot}${path}`, window.location.origin);\n\turl.search = new URLSearchParams(searchParams).toString();\n\treturn url.toString();\n};\n//#endregion\nexports.apiUrl = apiUrl;\nexports.useFetchApi = useFetchApi;\n\n//# sourceMappingURL=fetch-api.cjs.map","const require_utils_errors = require(\"../errors.cjs\");\n//#region src/utils/api/handle-response.ts\nvar handleResponse = async (response) => {\n\tif (response.status === 0) throw new require_utils_errors.ServerUnreachableError();\n\telse if (response.status === 503) throw new require_utils_errors.MaintenanceError(response, await response.text());\n\telse if (response.status === 415) throw new require_utils_errors.UnsupportedMediaTypeError(response, await response.text());\n\telse if (response.status === 413) throw new require_utils_errors.RequestEntityTooLargeError(response, await response.text());\n\telse if (response.status === 401) {\n\t\tif (response.headers.get(\"content-type\")?.includes(\"json\")) throw new require_utils_errors.UnauthorizedError(response, await response.json());\n\t\tthrow new require_utils_errors.UnauthorizedError(response, await response.text());\n\t} else if (!response.ok) {\n\t\tif (!response.headers.get(\"content-type\")?.includes(\"json\")) throw new require_utils_errors.APIError(response, await response.text());\n\t\tconst data = await response.json();\n\t\tif (response.status === 403 && data.errors?.[0]?.message === \"Authorization failed\") throw new require_utils_errors.UnauthorizedError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"VersionMismatchError\") throw new require_utils_errors.VersionMismatchError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"ValidationError\") throw new require_utils_errors.ValidationError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"NoPermissionError\") throw new require_utils_errors.ValidationError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"ThemeValidationError\") throw new require_utils_errors.ThemeValidationError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"HostLimitError\") throw new require_utils_errors.HostLimitError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"EmailError\") throw new require_utils_errors.EmailError(response, data);\n\t\telse throw new require_utils_errors.JSONError(response, data);\n\t} else if (response.status === 204) return;\n\telse if (response.headers.get(\"content-type\")?.includes(\"text/csv\")) return await response.text();\n\telse return await response.json();\n};\n//#endregion\nmodule.exports = handleResponse;\n\n//# sourceMappingURL=handle-response.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_providers_framework_provider = require(\"../../providers/framework-provider.cjs\");\nconst require_hooks_use_handle_error = require(\"../../hooks/use-handle-error.cjs\");\nconst require_hooks_use_pagination = require(\"../../hooks/use-pagination.cjs\");\nconst require_utils_api_fetch_api = require(\"./fetch-api.cjs\");\nconst require_hooks_use_permissions = require(\"../../hooks/use-permissions.cjs\");\nlet _tanstack_react_query = require(\"@tanstack/react-query\");\nlet react = require(\"react\");\n//#region src/utils/api/hooks.ts\nvar createQuery = (options) => ({ searchParams, ...query } = {}) => {\n\tconst url = require_utils_api_fetch_api.apiUrl(options.path, searchParams || options.defaultSearchParams, options?.useActivityPub);\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tconst handleError = require_hooks_use_handle_error();\n\tconst hasPermission = require_hooks_use_permissions.usePermission(options.permissions);\n\tconst result = (0, _tanstack_react_query.useQuery)({\n\t\t...query,\n\t\tenabled: hasPermission && (query.enabled ?? true),\n\t\tqueryKey: [options.dataType, url],\n\t\tqueryFn: () => fetchApi(url, { ...options })\n\t});\n\tconst data = (0, react.useMemo)(() => result.data && options.returnData ? options.returnData(result.data) : result.data, [result.data]);\n\t(0, react.useEffect)(() => {\n\t\tif (result.error && query.defaultErrorHandler !== false) handleError(result.error);\n\t}, [\n\t\thandleError,\n\t\tresult.error,\n\t\tquery.defaultErrorHandler\n\t]);\n\treturn {\n\t\t...result,\n\t\tdata\n\t};\n};\nvar createPaginatedQuery = (options) => ({ searchParams, ...query } = {}) => {\n\tconst [page, setPage] = (0, react.useState)(1);\n\tconst limit = searchParams?.limit || options.defaultSearchParams?.limit ? parseInt(searchParams?.limit || options.defaultSearchParams?.limit || \"15\") : 15;\n\tconst paginatedSearchParams = searchParams || options.defaultSearchParams || {};\n\tpaginatedSearchParams.page = page.toString();\n\tconst url = require_utils_api_fetch_api.apiUrl(options.path, paginatedSearchParams, options?.useActivityPub);\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tconst handleError = require_hooks_use_handle_error();\n\tconst hasPermission = require_hooks_use_permissions.usePermission(options.permissions);\n\tconst result = (0, _tanstack_react_query.useQuery)({\n\t\t...query,\n\t\tenabled: hasPermission && (query.enabled ?? true),\n\t\tqueryKey: [options.dataType, url],\n\t\tqueryFn: () => fetchApi(url, { ...options })\n\t});\n\tconst data = (0, react.useMemo)(() => result.data && options.returnData ? options.returnData(result.data) : result.data, [result.data]);\n\tconst pagination = require_hooks_use_pagination.usePagination({\n\t\tpage,\n\t\tsetPage,\n\t\tlimit,\n\t\tmeta: result.isFetching ? void 0 : data?.meta?.pagination\n\t});\n\t(0, react.useEffect)(() => {\n\t\tif (result.error && query.defaultErrorHandler !== false) handleError(result.error);\n\t}, [\n\t\thandleError,\n\t\tresult.error,\n\t\tquery.defaultErrorHandler\n\t]);\n\treturn {\n\t\t...result,\n\t\tdata,\n\t\tpagination\n\t};\n};\nvar createInfiniteQuery = (options) => ({ searchParams, getNextPageParams, ...query } = {}) => {\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tconst handleError = require_hooks_use_handle_error();\n\tconst hasPermission = require_hooks_use_permissions.usePermission(options.permissions);\n\tconst nextPageParams = getNextPageParams || options.defaultNextPageParams || (() => ({}));\n\tconst result = (0, _tanstack_react_query.useInfiniteQuery)({\n\t\t...query,\n\t\tenabled: hasPermission && (query.enabled ?? true),\n\t\tqueryKey: [options.dataType, require_utils_api_fetch_api.apiUrl(options.path, searchParams || options.defaultSearchParams, options?.useActivityPub)],\n\t\tqueryFn: ({ pageParam }) => fetchApi(require_utils_api_fetch_api.apiUrl(options.path, pageParam || searchParams || options.defaultSearchParams, options?.useActivityPub)),\n\t\tinitialPageParam: void 0,\n\t\tgetNextPageParam: (data) => nextPageParams(data, searchParams || options.defaultSearchParams || {})\n\t});\n\tconst data = (0, react.useMemo)(() => result.data && options.returnData(result.data), [result.data]);\n\t(0, react.useEffect)(() => {\n\t\tif (result.error && query.defaultErrorHandler !== false) handleError(result.error);\n\t}, [\n\t\thandleError,\n\t\tresult.error,\n\t\tquery.defaultErrorHandler\n\t]);\n\treturn {\n\t\t...result,\n\t\tdata\n\t};\n};\nvar createQueryWithId = (options) => (id, { searchParams, ...query } = {}) => {\n\treturn createQuery({\n\t\t...options,\n\t\tpath: options.path(id)\n\t})({\n\t\tsearchParams: searchParams || options.defaultSearchParams,\n\t\t...query\n\t});\n};\nvar mutate = ({ fetchApi, path, payload, searchParams, options }) => {\n\tconst { defaultSearchParams, body, ...requestOptions } = options;\n\tconst url = require_utils_api_fetch_api.apiUrl(path, searchParams || defaultSearchParams, options?.useActivityPub);\n\tconst generatedBody = payload && body?.(payload);\n\tlet requestBody = void 0;\n\tif (generatedBody instanceof FormData) requestBody = generatedBody;\n\telse if (generatedBody) requestBody = JSON.stringify(generatedBody);\n\treturn fetchApi(url, {\n\t\tbody: requestBody,\n\t\t...requestOptions\n\t});\n};\nvar createMutation = ({ path, searchParams, defaultSearchParams, updateQueries, invalidateQueries, ...mutateOptions }) => () => {\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tconst queryClient = (0, _tanstack_react_query.useQueryClient)();\n\tconst { onUpdate, onInvalidate, onDelete } = require_providers_framework_provider.useFramework();\n\treturn (0, _tanstack_react_query.useMutation)({\n\t\tmutationFn: (payload) => mutate({\n\t\t\tfetchApi,\n\t\t\tpath: path(payload),\n\t\t\tpayload,\n\t\t\tsearchParams: searchParams?.(payload) || defaultSearchParams,\n\t\t\toptions: mutateOptions\n\t\t}),\n\t\tonSuccess: (0, react.useCallback)((newData, payload) => {\n\t\t\tif (invalidateQueries && \"dataType\" in invalidateQueries) {\n\t\t\t\tqueryClient.invalidateQueries({ queryKey: [invalidateQueries.dataType] });\n\t\t\t\tonInvalidate(invalidateQueries.dataType);\n\t\t\t} else if (invalidateQueries) queryClient.invalidateQueries(invalidateQueries.filters, invalidateQueries.options);\n\t\t\tif (updateQueries) {\n\t\t\t\tqueryClient.setQueriesData({ queryKey: [updateQueries.dataType] }, (data) => updateQueries.update(newData, data, payload));\n\t\t\t\tif (updateQueries.emberUpdateType === \"createOrUpdate\") onUpdate(updateQueries.dataType, newData);\n\t\t\t\telse if (updateQueries.emberUpdateType === \"delete\") {\n\t\t\t\t\tif (typeof payload !== \"string\") throw new Error(\"Expected delete mutation to have a string (ID) payload. Either change the payload or update the createMutation hook\");\n\t\t\t\t\tonDelete(updateQueries.dataType, payload);\n\t\t\t\t}\n\t\t\t}\n\t\t}, [\n\t\t\tonInvalidate,\n\t\t\tonUpdate,\n\t\t\tonDelete,\n\t\t\tqueryClient\n\t\t])\n\t});\n};\n//#endregion\nexports.createInfiniteQuery = createInfiniteQuery;\nexports.createMutation = createMutation;\nexports.createPaginatedQuery = createPaginatedQuery;\nexports.createQuery = createQuery;\nexports.createQueryWithId = createQueryWithId;\n\n//# sourceMappingURL=hooks.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\n//#region src/utils/api/update-queries.ts\nvar insertToQueryCache = (field, recordsToInsert) => {\n\treturn (newData, currentData) => {\n\t\tif (!currentData) return currentData;\n\t\tconst getRecords = recordsToInsert || ((response) => response[field]);\n\t\tif (typeof currentData === \"object\" && \"pages\" in currentData) {\n\t\t\tconst { pages } = currentData;\n\t\t\tconst lastPage = pages[pages.length - 1];\n\t\t\treturn {\n\t\t\t\t...currentData,\n\t\t\t\tpages: pages.slice(0, -1).concat({\n\t\t\t\t\t...lastPage,\n\t\t\t\t\t[field]: lastPage[field].concat(getRecords(newData))\n\t\t\t\t})\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t...currentData,\n\t\t\t[field]: currentData[field].concat(getRecords(newData))\n\t\t};\n\t};\n};\nvar updateQueryCache = (field, updatedRecords) => {\n\treturn (newData, currentData) => {\n\t\tif (!currentData) return currentData;\n\t\tconst updated = (updatedRecords || ((response) => {\n\t\t\treturn response[field].reduce((result, record) => ({\n\t\t\t\t...result,\n\t\t\t\t[record.id]: record\n\t\t\t}), {});\n\t\t}))(newData);\n\t\tif (typeof currentData === \"object\" && \"pages\" in currentData) {\n\t\t\tconst { pages } = currentData;\n\t\t\treturn {\n\t\t\t\t...currentData,\n\t\t\t\tpages: pages.map((page) => ({\n\t\t\t\t\t...page,\n\t\t\t\t\t[field]: page[field].map((current) => updated[current.id] || current)\n\t\t\t\t}))\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t...currentData,\n\t\t\t[field]: currentData[field].map((current) => updated[current.id] || current)\n\t\t};\n\t};\n};\nvar deleteFromQueryCache = (field, idsFromPayload) => {\n\treturn (_, currentData, payload) => {\n\t\tif (!currentData) return currentData;\n\t\tconst deletedIds = idsFromPayload?.(payload) || [payload];\n\t\tif (typeof currentData === \"object\" && \"pages\" in currentData) {\n\t\t\tconst { pages } = currentData;\n\t\t\treturn {\n\t\t\t\t...currentData,\n\t\t\t\tpages: pages.map((page) => ({\n\t\t\t\t\t...page,\n\t\t\t\t\t[field]: page[field].filter((current) => !deletedIds.includes(current.id))\n\t\t\t\t}))\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t...currentData,\n\t\t\t[field]: currentData[field].filter((current) => !deletedIds.includes(current.id))\n\t\t};\n\t};\n};\n//#endregion\nexports.deleteFromQueryCache = deleteFromQueryCache;\nexports.insertToQueryCache = insertToQueryCache;\nexports.updateQueryCache = updateQueryCache;\n\n//# sourceMappingURL=update-queries.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\n//#region src/utils/errors.ts\nvar APIError = class extends Error {\n\tresponse;\n\tdata;\n\tconstructor(response, data, message, errorOptions) {\n\t\tif (!message && response && response.url.includes(\"/ghost/api/admin/\")) message = `Something went wrong while loading ${response.url.replace(/.+\\/ghost\\/api\\/admin\\//, \"\").replace(/\\W.*/, \"\").replace(\"_\", \" \")}, please try again.`;\n\t\tsuper(message || \"Something went wrong, please try again.\", errorOptions);\n\t\tthis.response = response;\n\t\tthis.data = data;\n\t}\n};\nvar JSONError = class extends APIError {\n\tdata;\n\tconstructor(response, data, message, errorOptions) {\n\t\tsuper(response, data, message, errorOptions);\n\t\tthis.data = data;\n\t}\n};\nvar VersionMismatchError = class extends JSONError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"API server is running a newer version of Ghost, please upgrade.\", errorOptions);\n\t}\n};\nvar ServerUnreachableError = class extends APIError {\n\tconstructor(errorOptions) {\n\t\tsuper(void 0, void 0, \"Something went wrong, please try again.\", errorOptions);\n\t}\n};\nvar TimeoutError = class extends APIError {\n\tconstructor(errorOptions) {\n\t\tsuper(void 0, void 0, \"Request timed out, please try again.\", errorOptions);\n\t}\n};\nvar RequestEntityTooLargeError = class extends APIError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"Request is larger than the maximum file size the server allows\", errorOptions);\n\t}\n};\nvar UnsupportedMediaTypeError = class extends APIError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"Request contains an unknown or unsupported file type.\", errorOptions);\n\t}\n};\nvar MaintenanceError = class extends APIError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"Ghost is currently undergoing maintenance, please wait a moment then retry.\", errorOptions);\n\t}\n};\nvar UnauthorizedError = class extends APIError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"You are not authorised to make this request.\", errorOptions);\n\t}\n};\nvar SessionExpiredError = class extends UnauthorizedError {};\nvar ThemeValidationError = class extends JSONError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"Theme is not compatible or contains errors.\", errorOptions);\n\t}\n};\nvar HostLimitError = class extends JSONError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"A hosting plan limit was reached or exceeded.\", errorOptions);\n\t}\n};\nvar EmailError = class extends JSONError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"Please verify your email settings\", errorOptions);\n\t}\n};\nvar ValidationError = class extends JSONError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, data.errors[0].message, errorOptions);\n\t}\n};\nvar errorsWithMessage = [\n\tValidationError,\n\tThemeValidationError,\n\tHostLimitError,\n\tEmailError\n];\nfunction getErrorMessage(error, fallback) {\n\tif (error instanceof ValidationError && error.data?.errors[0]) return error.data.errors[0].context || error.data.errors[0].message;\n\treturn fallback;\n}\nvar AlreadyExistsError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t}\n};\n//#endregion\nexports.APIError = APIError;\nexports.AlreadyExistsError = AlreadyExistsError;\nexports.EmailError = EmailError;\nexports.HostLimitError = HostLimitError;\nexports.JSONError = JSONError;\nexports.MaintenanceError = MaintenanceError;\nexports.RequestEntityTooLargeError = RequestEntityTooLargeError;\nexports.ServerUnreachableError = ServerUnreachableError;\nexports.SessionExpiredError = SessionExpiredError;\nexports.ThemeValidationError = ThemeValidationError;\nexports.TimeoutError = TimeoutError;\nexports.UnauthorizedError = UnauthorizedError;\nexports.UnsupportedMediaTypeError = UnsupportedMediaTypeError;\nexports.ValidationError = ValidationError;\nexports.VersionMismatchError = VersionMismatchError;\nexports.errorsWithMessage = errorsWithMessage;\nexports.getErrorMessage = getErrorMessage;\n\n//# sourceMappingURL=errors.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\n//#region src/utils/helpers.ts\nfunction getGhostPaths() {\n\tconst path = window.location.pathname;\n\tconst subdir = path.substr(0, path.search(\"/ghost/\"));\n\treturn {\n\t\tsubdir,\n\t\tadminRoot: `${subdir}/ghost/`,\n\t\tassetRoot: `${subdir}/ghost/assets/`,\n\t\tapiRoot: `${subdir}/ghost/api/admin`,\n\t\tactivityPubRoot: `${subdir}/.ghost/activitypub`\n\t};\n}\nfunction downloadFile(url) {\n\tlet iframe = document.getElementById(\"iframeDownload\");\n\tif (!iframe) {\n\t\tiframe = document.createElement(\"iframe\");\n\t\tiframe.id = \"iframeDownload\";\n\t\tiframe.style.display = \"none\";\n\t\tdocument.body.append(iframe);\n\t}\n\tiframe.setAttribute(\"src\", url);\n}\nfunction downloadFromEndpoint(path) {\n\tdownloadFile(`${getGhostPaths().apiRoot}${path}`);\n}\n/**\n* Extracts the filename from a `Content-Disposition` header, preferring the\n* RFC 5987 extended form (`filename*=`) over the basic `filename=` form.\n* Returns `undefined` when neither is present.\n*/\nfunction getFilenameFromContentDisposition(header) {\n\tif (!header) return;\n\tconst extendedMatch = header.match(/filename\\*=([^;]+)/i);\n\tif (extendedMatch?.[1]) {\n\t\tconst singleQuote = \"'\";\n\t\tconst extValue = extendedMatch[1].trim();\n\t\tconst firstQuote = extValue.indexOf(singleQuote);\n\t\tconst secondQuote = firstQuote === -1 ? -1 : extValue.indexOf(singleQuote, firstQuote + 1);\n\t\tconst encoded = secondQuote === -1 ? extValue : extValue.slice(secondQuote + 1);\n\t\ttry {\n\t\t\treturn decodeURIComponent(encoded.replace(/^[\"']|[\"']$/g, \"\"));\n\t\t} catch {}\n\t}\n\tconst quotedMatch = header.match(/filename=\"([^\"]*)\"/i);\n\tif (quotedMatch?.[1]) return quotedMatch[1].trim();\n\tconst unquotedMatch = header.match(/filename=([^;]+)/i);\n\tif (unquotedMatch?.[1]) return unquotedMatch[1].trim();\n}\n/**\n* Downloads a file by fetching it as a blob and triggering a browser download.\n* Use this instead of downloadFile/downloadFromEndpoint for streaming responses\n* (e.g. large CSV exports) where the iframe approach may not work reliably.\n*\n* The filename comes from the response's `Content-Disposition` header;\n* `fallbackFilename` is only used when the server omits it.\n*/\nasync function blobDownload(url, fallbackFilename) {\n\tconst response = await fetch(url, { method: \"GET\" });\n\tif (!response.ok) throw new Error(`Download failed: ${response.status} ${response.statusText}`);\n\tconst filename = getFilenameFromContentDisposition(response.headers.get(\"content-disposition\")) ?? fallbackFilename ?? \"download\";\n\tconst blob = await response.blob();\n\tconst blobUrl = window.URL.createObjectURL(blob);\n\tconst a = document.createElement(\"a\");\n\ta.href = blobUrl;\n\ta.download = filename;\n\tdocument.body.appendChild(a);\n\ta.click();\n\ta.remove();\n\twindow.URL.revokeObjectURL(blobUrl);\n}\nasync function blobDownloadFromEndpoint(path, fallbackFilename) {\n\treturn blobDownload(`${getGhostPaths().apiRoot}${path}`, fallbackFilename);\n}\n//#endregion\nexports.blobDownload = blobDownload;\nexports.blobDownloadFromEndpoint = blobDownloadFromEndpoint;\nexports.downloadFile = downloadFile;\nexports.downloadFromEndpoint = downloadFromEndpoint;\nexports.getFilenameFromContentDisposition = getFilenameFromContentDisposition;\nexports.getGhostPaths = getGhostPaths;\n\n//# sourceMappingURL=helpers.cjs.map","let _tanstack_react_query = require(\"@tanstack/react-query\");\n//#region src/utils/query-client.ts\nvar queryClient = window.adminXQueryClient || new _tanstack_react_query.QueryClient({ defaultOptions: { queries: {\n\trefetchOnWindowFocus: false,\n\tstaleTime: 5 * (60 * 1e3),\n\tgcTime: 10 * (60 * 1e3),\n\tretry: false,\n\tnetworkMode: \"always\"\n} } });\nwindow.__TANSTACK_QUERY_CLIENT__ = queryClient;\nif (!window.adminXQueryClient) window.adminXQueryClient = queryClient;\n//#endregion\nmodule.exports = queryClient;\n\n//# sourceMappingURL=query-client.cjs.map",null],"mappings":";AACAA,sCAA+CC,WAC/CC,iBAIA,SAAwBC,EAAO,GAAIC,EAAW,CAAC,GAC3C,MACMC,EAAUL,OAAOM,OAAO,CAAC,EADd,CAAC,EAC0BF;AAC5C,IAAKC,EAAQE,eAAgB,CACzB,MAAMC,EAA+B,oBAAdC,WAA6BA,WAAiC,oBAAXC,QAA0BA,OAAOD;AAC3G,IAAKD,EACD,MAAM,IAAIG,MAAM;AAEpBN,EAAQE,eAAiB,SAAUK,GAE/B,WADmBJ,GACLK,gBAAgBD,EAAS,YAC3C,CACJ,CACA,IAAIE,EAAYX;AAchB,GAbKE,EAAQU,SAAyB,SAAdD,IACpBA,EAAYA,EACPE,QAAQ,cAAe,MAE5BX,EAAQY,qBACRH,EAtBR,SAA4BX,GACxB,OAAOA,EAAKa,QAAQ,2CAA4C,KACpE,CAFA,CAsBuCF,IAEnCA,EAAYA,EACPE,QAAQ,mBAAoB,KAC5BE,OACAF,QAAQ,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5H;AAWvC,MAVa,CACTwC,SAAU,GACVmE,UAAW,MACXpB,OAAQ,GACRqB,OAAQ,KACL8D,KACAD,EACH/H,KAAMgI,GAAYhI,MAAQ+H,EAAW/H,MAAQ1C,EAC7CgC,QAAS,EAGjB,CAEA,SAAS+H,EAAeY,EAAYC,GAE3BA,IAILD,EAAWnI,SAASgB,KAAKoH,GAErBA,GAAa,SAAUA,GAAaA,EAAU7E,OAC9C4E,EAAWhE,UAAY,OAE/B,CAIA,SAASwD,EAAwCU,GAC7C,IAAItF,EAAS;AAOb,OANAsF,EAAK/K,QAASgD,IACV,MAAM9C,EAAU8C,EAAI;AAChB9C,KAAW2I,IACXpD,GAAkBoD,EAAiB3I,MAGpCuF,CACX,SAAA5E,EAAAC,EAAAC,GCtRA,IAAAwD,EAAA,CACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,mBACA,cACA,iBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,WACA,cACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,mBACA,eACA,kBACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,cACA,iBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,kBACA,qBACA,mBACA,sBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,iBACA,oBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,iBACA,oBACA,eACA,YACA,eACA,YACA,eACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,cACA,iBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,cACA,iBACA,aACA,gBACA,cACA,iBACA,cACA,mBACA,sBACA,iBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,aACA,kBACA,qBACA,gBACA,aACA,gBACA,mBACA,sBACA,aACA,gBACA,gBACA,mBACA,eACA,kBACA,gBACA,mBACA,gBACA;AAIA,SAAAyG,EAAAC,GACA,IAAAC,EAAAC,EAAAF;AACA,OAAAG,EAAAF,EACA,CACA,SAAAC,EAAAF,GACA,IAAAG,EAAAC,EAAA9G,EAAA0G,GAAA,CACA,IAAApK,EAAA,IAAAzB,MAAA,uBAAA6L,EAAA;AAEA,MADApK,EAAAsI,KAAA,mBACAtI,CACA,CACA,OAAA0D,EAAA0G,EACA,CACAD,EAAA3G,KAAA,WACA,OAAA5F,OAAA4F,KAAAE,EACA,EACAyG,EAAAM,QAAAH,EACAI,EAAA5M,QAAAqM,EACAA,EAAAE,GAAA,iCAAArK,EAAAC,GCtSA3B,OAAAqM,OAAAvK,QACA9B,OAAAsM,OAAAC,qBCFAjN,OAAAkN,eA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