diff --git a/wp-content/plugins/wp-add-mime-types/includes/admin.php b/wp-content/plugins/wp-add-mime-types/includes/admin.php new file mode 100644 index 000000000..6a1cd1b82 --- /dev/null +++ b/wp-content/plugins/wp-add-mime-types/includes/admin.php @@ -0,0 +1,189 @@ +$m_value) + // " " is the Japanese multi-byte space. If the character is found out, it automatically change the space. + $mime_type_values[$m_type] = trim(str_replace(" ", " ", $m_value)); + $settings['mime_type_values'] = serialize($mime_type_values); + } + } + //else + //$mime_type_values = unserialize($settings['mime_type_values']); + + if(!isset($settings['security_attempt_enable'])) + $settings['security_attempt_enable'] = "no"; + else{ + if(isset($_POST['security_attempt_enable'])) + $settings['security_attempt_enable'] = wp_strip_all_tags($_POST['security_attempt_enable']); + } + if(!isset($settings['filename_sanitized_enable'])) + $settings['filename_sanitized_enable'] = "no"; + else{ + if(isset($_POST['filename_sanitized_enable'])) + $settings['filename_sanitized_enable'] = wp_strip_all_tags($_POST['filename_sanitized_enable']); + } + if(!isset($settings['file_type_debug'])) + $settings['file_type_debug'] = "no"; + else{ + if(isset($_POST['file_type_debug'])) + $settings['file_type_debug'] = wp_strip_all_tags($_POST['file_type_debug']); + } + } + } + // Update to WordPress Data. + if(is_multisite() && is_plugin_active_for_network(WAMT_PLUGIN_BASENAME)) + ;//get_site_option(WAMT_SITEADMIN_SETTING_FILE, $settings); + else{ + if(isset($_POST["wamt-form"]) && $_POST["wamt-form"]) + if(check_admin_referer("wamt-nonce-key", "wamt-form")) + update_option(WAMT_SETTING_FILE, $settings); + } + +?> +
{const r=new Map,a={platform:Xi,...n},i={...a.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,o=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:u,y:d}=hi(c,r,l),f=r,p={},h=0;for(let n=0;n '.concat(t.RSS_View_Instance.formatDate(new Date(n.date))," \s*<\/p>/g,""),children:JSON.parse((null===(n=e.querySelector("children"))||void 0===n?void 0:n.innerHTML)||"{}")})}),Xv.setSessionData(JSON.stringify(this.data[t.key]),t.key),[2]}})})),[4,Promise.all(t)]);case 1:return n.sent(),[2,this.data]}})})},t}(),Sv=function(){function t(t){this.RSS=t,this.createTriggerButton(),this.createFlyOut()}return t.prototype.getTriggerButtonID=function(){return"whats-new-rss-btn-".concat(this.RSS.getID())},t.prototype.getFlyoutID=function(){return"whats-new-rss-flyout-".concat(this.RSS.getID())},t.prototype.getFlyoutCloseBtnID=function(){return"whats-new-rss-flyout-close-".concat(this.RSS.getID())},t.prototype.getFlyoutMultiFeedNavID=function(){return"whats-new-rss-flyout-multi-feed-nav-".concat(this.RSS.getID())},t.prototype.setIsLoading=function(t){void 0===t&&(t=!1);var e=document.getElementById(this.getFlyoutID());t?e.classList.add("is-loading"):e.classList.remove("is-loading")},t.prototype.setNotification=function(t){var e=document.querySelector("#".concat(this.getTriggerButtonID()," .whats-new-rss-notification-badge"));t?(this.RSS.isMultiFeedRSS()?(e.innerHTML="",e.classList.add("is-multi-feed")):e.innerHTML=t>9?"9+":t.toString(),e.classList.remove("hide")):e.classList.add("hide")},t.prototype.createTriggerButton=function(){var t,e=this.RSS.getArgs().triggerButton.label;t=e?"\n\t\t\t".concat(this.RSS.getArgs().triggerButton.beforeBtn,'\n\t\t\t\n\t\t\t\t ".concat(o,' ').concat(i.label," ".concat(o," See More See Less
"),productBelowTitle:(0,xt.__)("Build Better Websites. Get More Designs. Do It All Faster with Premium Templates.","astra"),productBelowDescription:(0,xt.__)("Access exclusive templates, advanced site tools, and pro-level design features — everything you need to stand out online.","astra"),productDescription:(0,xt.__)("Choose from a huge library of professionally designed websites. Import everything — pages, images, content — and launch fast using your favorite page builder.","astra"),productBanner:(0,t.createElement)("div",{className:"overflow-hidden px-8 bg-gradient-to-b from-white to-[#f3f3f8]"},(0,t.createElement)("div",{className:"relative aspect-[16/9] w-full max-w-4xl mx-auto"},e?(0,t.createElement)("div",{className:"absolute inset-0 rounded-xl overflow-hidden bg-black"},(0,t.createElement)("iframe",{className:"w-full h-full",src:"https://www.youtube-nocookie.com/embed/xg_7y-_DKYY?list=PL1kzJGWGPrW-z7qHhM5JjYQDY3zyJNxBX&autoplay=1&modestbranding=1&rel=0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,title:(0,xt.__)("Starter Templates Video","astra"),frameBorder:"0"})):(0,t.createElement)("div",{className:"absolute inset-0 w-full h-full cursor-pointer group",onClick:()=>{r(!0)}},(0,t.createElement)("img",{className:"w-full h-full object-cover rounded-xl",src:Lr.starterTemplatesBanner,alt:(0,xt.__)("Starter Templates Banner","astra")}),(0,t.createElement)("div",{className:"absolute inset-0 bg-[#4F4E7C4D] rounded-xl"}),(0,t.createElement)("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-12 h-12 flex items-center justify-center bg-white bg-opacity-90 group-hover:bg-opacity-100 transition-all duration-300 rounded-full shadow-md group-hover:shadow-lg group-hover:scale-110"},(0,t.createElement)("svg",{className:"w-6 h-6 text-purple-600 group-hover:text-purple-800 transition-colors duration-300",viewBox:"0 0 24 24",fill:"currentColor"},(0,t.createElement)("path",{d:"M8 5v14l11-7z"})))))),featureItems:Dm,ctaButtonText:(0,xt.__)("Start Building Now","astra"),ctaButtonProps:{"data-type":"button","data-slug":astra_admin.starter_templates_data.slug,"data-init":astra_admin.starter_templates_data.path,"data-redirection":astra_admin.starter_templates_data.redirection,"data-action":Jr(astra_admin.starter_templates_data.status)},onUnlockExploreAction:()=>{window.open("https://startertemplates.com/#features","_blank")}});window.open(astra_admin.starter_templates_data.redirection,"_self")}},settings:()=>{const e=Br(t=>t.initialStateSetFlag);return(0,t.createElement)("div",{className:"grid grid-cols-[auto_1fr] lg:grid-cols-[16rem_1fr] bg-background-secondary flex-auto min-h-[calc(100vh_-_10rem)]"},(0,t.createElement)(zm,null),(0,t.createElement)("div",{className:"w-full h-full overflow-y-auto bg-background-secondary"},(0,t.createElement)("div",{className:"p-2 md:p-4 lg:p-8"},(0,t.createElement)(Ye,{className:"w-full md:max-w-2xl lg:max-w-3xl xl:max-w-[696px] mx-auto",direction:"column",gap:"xl"},(0,t.createElement)(Ye,{align:"center",justify:"between"},(0,t.createElement)(vr,{className:"[&_h2]:text-text-primary [&_h2]:leading-[1.875rem]",size:"md",title:(0,xt.__)("Settings","astra")})),!e&&(0,t.createElement)(So,null),e&&(0,t.createElement)(pr,{className:"p-6"},(0,t.createElement)(Xo,null))))))},"free-vs-pro":()=>{const{pro_available:e=!1,show_self_branding:n=!0}=astra_admin;return(0,t.createElement)("main",{className:"bg-background-secondary"},(0,t.createElement)("h1",{className:"sr-only"},(0,xt.__)("Astra Free vs Pro","astra")),(0,t.createElement)(Ye,{className:"md:p-8 sm:p-6 p-[0.7rem]",cols:12,containerType:"grid",gap:"2xl"},(0,t.createElement)(Ye.Item,{className:"flex flex-col gap-8",colSpan:{lg:8,md:12,sm:12}},(0,t.createElement)(bo,null),(0,t.createElement)(Kr,{className:"hidden lg:flex !flex-row",items:[(0,xt.__)("Advanced Design Customization","astra"),(0,xt.__)("Custom Layouts & Site Builder","astra"),(0,xt.__)("Various Built-in Layouts","astra"),(0,xt.__)("Lightning-Fast Performance","astra"),(0,xt.__)("WooCommerce Enhancements","astra"),(0,xt.__)("More Header & Footer Options","astra")],columnView:!0})),(0,t.createElement)(Ye.Item,{className:"flex flex-col gap-8 lg:sticky lg:top-8 lg:self-start",colSpan:{lg:4,md:12,sm:12}},!e&&n&&(0,t.createElement)(Kr,null),n&&(0,t.createElement)(ro,null))))},"custom-layouts":()=>{const e="1"===new URLSearchParams(K()?.search).get("astra-activation-redirect")?1:0;return(0,t.createElement)("main",{className:"relative"},(0,t.createElement)("div",{className:"w-full absolute inset-0 blur-md"},$r["custom-layout"]),(0,t.createElement)("div",{className:"relative z-10 pt-[4rem]"},(0,t.createElement)("div",{className:"max-w-[39rem] h-max bg-white m-auto shadow-overlay-modal text-center rounded-lg p-8"},(0,t.createElement)("div",null,(0,t.createElement)("div",{className:"mx-auto flex items-center justify-center"},$r["astra-logo"]),(0,t.createElement)("div",{className:"mt-3 text-center sm:mt-5"},(0,t.createElement)("h4",{className:"text-2xl font-semibold leading-7 text-slate-800",id:"modal-title"},(0,xt.__)("Site Builder","astra")),(0,t.createElement)("div",{className:"mt-2"},(0,t.createElement)("p",{className:"text-sm leading-[1.375rem] text-slate-500 text-center"},(0,xt.__)("Upgrade to Astra Pro to get access to the Site Builder, which allow you to create a unique header, footer, 404 pages, and custom content.","astra"))),astra_admin.show_banner_video&&(0,t.createElement)("div",{className:"relative pb-[17.5rem] mt-5"},(0,t.createElement)("iframe",{className:"absolute inset-0 w-full h-full rounded-md",src:`https://www.youtube-nocookie.com/embed/FWRkzJQwcKU?showinfo=0&autoplay=${e}&mute=${e}&rel=0`,allow:"autoplay",title:"YouTube video player",frameBorder:"0",allowFullScreen:!0})))),(0,t.createElement)("div",{className:"text-center mt-5"},(0,t.createElement)(Gr,{className:"w-auto justify-center rounded-md border border-transparent bg-astra px-[2.9375rem] py-[0.6875rem] text-base leading-4 font-medium text-white shadow-sm hover:bg-astra-hover focus:outline-none focus:ring-2 focus:ring-astra-hover focus:ring-offset-2"}),(0,t.createElement)("div",null,(0,t.createElement)("button",{className:"w-auto justify-center mt-4 text-base leading-4 text-astra font-medium",onClick:()=>{window.open(astra_admin.free_vs_pro_link,"_self")}},(0,xt.__)("Free vs Pro","astra")))))))},spectra:()=>{new URLSearchParams(K()?.search);const[e,r]=(0,n.useState)(!1);if("activated"===astra_admin.spectra_plugin_status)return void window.open(`${astra_admin.admin_base_url}options-general.php?page=spectra`,"_self");const a=()=>{window.open("https://wpspectra.com/pricing/?utm_source=astra&utm_medium=dashboard&utm_campaign=promotion-page","_blank")};return(0,t.createElement)(km,{heading:(0,xt.__)("Design Your Website Visually — Fast, Easy & Without Limits","astra"),productLogo:(0,t.createElement)("img",{width:30,height:30,src:"https://ps.w.org/ultimate-addons-for-gutenberg/assets/icon-256x256.gif",alt:(0,xt.__)("Spectra Logo","astra")}),productTitle:(0,xt.__)("Spectra","astra"),productDescription:(0,xt.__)("Spectra is a powerful visual website builder made for WordPress. Just click, drag, and create anything — no code, no limits.","astra"),productStatus:astra_admin.spectra_plugin_status,productBanner:astra_admin.show_banner_video&&(0,t.createElement)("div",{className:"overflow-hidden px-8 bg-gradient-to-b from-white to-[#f3f3f8]"},(0,t.createElement)("div",{className:"relative aspect-[16/9] w-full max-w-4xl mx-auto"},e?(0,t.createElement)("div",{className:"absolute inset-0 rounded-xl overflow-hidden bg-black"},(0,t.createElement)("iframe",{className:"w-full h-full",src:"https://www.youtube-nocookie.com/embed/GLNzTxArR6Y?autoplay=1&modestbranding=1&rel=0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,title:(0,xt.__)("Spectra Video","astra"),frameBorder:"0"})):(0,t.createElement)("div",{className:"absolute inset-0 w-full h-full cursor-pointer group",onClick:()=>{r(!0)}},(0,t.createElement)("img",{className:"w-full h-full object-cover rounded-xl",src:Lr.spectraBanner,alt:(0,xt.__)("Spectra Banner","astra")}),(0,t.createElement)("div",{className:"absolute inset-0 bg-[#4F4E7C4D] rounded-xl"}),(0,t.createElement)("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-12 h-12 flex items-center justify-center bg-white bg-opacity-90 group-hover:bg-opacity-100 transition-all duration-300 rounded-full shadow-md group-hover:shadow-lg group-hover:scale-110"},(0,t.createElement)("svg",{className:"w-6 h-6 text-purple-600 group-hover:text-purple-800 transition-colors duration-300",viewBox:"0 0 24 24",fill:"currentColor"},(0,t.createElement)("path",{d:"M8 5v14l11-7z"})))))),featureItems:Ym,ctaButtonText:(0,xt.__)("Install Spectra Free","astra"),ctaButtonProps:{"data-type":"button","data-slug":"ultimate-addons-for-gutenberg","data-init":"ultimate-addons-for-gutenberg/ultimate-addons-for-gutenberg.php","data-redirection":`${astra_admin.admin_base_url}options-general.php?page=spectra`,"data-action":Jr(astra_admin.spectra_plugin_status)},onUnlockExploreAction:a,showBottomTexts:!1,onSecondaryButtonClick:a,bottomSectionClassName:"bg-background-secondary spectra-screen flex flex-col items-center gap-5 text-center border-t border-[#E6E6EF] pt-6 pb-6 px-12 rounded-b-xl",bottomButtonsClassName:"flex flex-col items-center gap-3 w-full",customButtonText:(0,xt.__)("Install Spectra Free","astra")})},woocommerce:()=>{const{pro_available:e=!1,show_self_branding:n=!0}=astra_admin;return(0,t.createElement)("main",{className:"bg-background-secondary"},(0,t.createElement)("h1",{className:"sr-only"}," Astra "),(0,t.createElement)(Ye,{className:"md:p-8 sm:p-6 p-[0.7rem]",cols:12,containerType:"grid",gap:"2xl"},(0,t.createElement)(Ye.Item,{className:"flex flex-col gap-8",colSpan:{lg:8,md:12,sm:12}},(0,t.createElement)(Qm,null)),(0,t.createElement)(Ye.Item,{className:"flex flex-col gap-8 lg:sticky lg:top-8 lg:self-start",colSpan:{lg:4,md:12,sm:12}},!e&&n&&(0,t.createElement)(Kr,{ProSvg:Nr.UpgradeToPro.WooCommerce,title:(0,xt.__)("Unlock Premium WooCommerce Features with Astra Pro!","astra"),description:(0,xt.__)("Supercharge your store with advanced design options, conversion-boosting features, and seamless WooCommerce integration.","astra"),items:[(0,xt.__)("Next-Level Cart & Checkout Customization","astra"),(0,xt.__)("Product Grid & Gallery Enhancements","astra"),(0,xt.__)("Sticky Add to Cart Button","astra"),(0,xt.__)("Infinite Scroll & AJAX Pagination","astra"),(0,xt.__)("Conversion-Optimized Checkout Design","astra")]}),n&&(0,t.createElement)(ro,null),e&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)(pr,{className:"deprecated-section p-3 [&>div>.ast-licensing-wrap]:max-w-full"},wp.hooks.applyFilters("astra_dashboard.welcome_screen_after_integrations",(0,t.createElement)("span",{hidden:!0})))))))},docs:({setOpen:e})=>{const[r,a]=(0,n.useState)(""),[i,s]=(0,n.useState)(null);!function(t,e,r){(0,n.useEffect)(()=>{const n=lr(t,e);return n(),()=>n.cancel&&n.cancel()},[t,e,...r])}(()=>{if(""===r)s(null);else{const t=astra_admin.astra_docs_data.docs.filter(t=>t.title.toLowerCase().includes(r));s(t)}},300,[r]);const o=404===astra_admin.astra_docs_data?.data?.status;return(0,t.createElement)("main",{className:"bg-white"},(0,t.createElement)("div",{className:""},(0,t.createElement)("h1",{className:"sr-only"}," ",(0,xt.__)("Welcome to KB Docs","astra")," "),(0,t.createElement)("div",{className:"w-full flex justify-between items-center bg-gray-50 py-5 px-6"},(0,t.createElement)("a",{href:astra_admin.astra_base_url,className:"flex-shrink-0 flex items-center ast-box-shadow-none"},(0,t.createElement)("img",{className:"lg:block mr-3 h-[2.6rem] w-auto ast-box-shadow-none",src:astra_admin.logo_url,alt:"Workflow"})),(0,t.createElement)("div",{className:"max-w-5xl mx-auto w-full relative"},(0,t.createElement)("input",{type:"search",placeholder:(0,xt.__)("Search","astra"),className:"w-full ast-docs-search-fields text-base",onChange:t=>a(t.target.value)}),(0,t.createElement)("div",{className:"absolute top-1/2 -translate-y-1/2 left-4"},r?$r.close:$r.search)),e&&(0,t.createElement)("div",null,(0,t.createElement)("button",{onClick:()=>e(!1)},$r.popupclose))),(0,t.createElement)("div",{className:"sm:max-w-5xl mx-auto w-full flex flex-col"},(0,t.createElement)("div",{className:"flex flex-col lg:flex-row gap-8 pt-10"},(0,t.createElement)("div",{className:"w-full px-6 lg:px-0 lg:w-2/3 mb-5 self-center"},o&&(0,t.createElement)("div",{className:"flex items-center justify-center"},(0,t.createElement)("div",{className:"text-center"},(0,t.createElement)("h2",{className:"text-4xl font-bold text-gray-800 mb-4"},(0,xt.__)("404","astra")),(0,t.createElement)("p",{className:"text-xl text-gray-600 mb-8"},(0,xt.__)("Oops! Documentation not found.","astra")),(0,t.createElement)("p",{className:"text-lg text-gray-600 mb-8"},astra_admin.astra_docs_data?.message),(0,t.createElement)(yt,{role:"button",to:astra_admin.astra_base_url,className:"sm:inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-astra focus-visible:bg-astra-hover hover:text-white hover:bg-astra-hover focus:outline-none mr-4 mb-2 sm:mb-0"},(0,xt.__)("Go to Dashboard","astra")))),!o&&(0,t.createElement)(t.Fragment,null,i&&i.length>0&&(0,t.createElement)("div",{className:"mb-8"},(0,t.createElement)(ev,{data:i})),Object.entries(astra_admin.astra_docs_data.categories).map((e,n)=>(0,t.createElement)($m,{item:e,key:n})),!astra_admin.pro_available&&astra_admin.upgrade_notice&&(0,t.createElement)("div",{className:"mt-10"},(0,t.createElement)(tv,null)))),(0,t.createElement)("div",{className:"w-full px-6 lg:px-0 lg:w-1/3"},(0,t.createElement)(Ur,{id:"vip-priority-support",className:"border border-sky-500 mb-5",icon:$r.support,title:(0,t.createElement)("span",{className:"font-medium"},(0,xt.__)("VIP Priority Support","astra")),description:(0,xt.__)("Faster and exclusive support service designed for VIP assistance and benefits.","astra"),linkHRef:astra_admin.astraWebsite?.vipPrioritySupportUrl,linkText:(0,xt.__)("Know More →","astra")}),(0,t.createElement)(Ur,{id:"view-documentation",className:"border border-slate-200 mb-5",icon:$r.book,title:(0,t.createElement)("span",{className:"font-medium"},(0,xt.__)("View Documentation","astra")),description:(0,xt.__)(`Browse documentation, reference material, and tutorials for ${astra_admin.theme_name} Theme.`,"astra"),linkHRef:astra_admin.astraWebsite?.docsUrl,linkText:(0,t.createElement)("span",{className:"inline-flex items-center gap-2"},(0,xt.__)("View All Documentation","astra"),$r.redirect)}))))))}},rv=function(){const{search:e}=K(),r=new URLSearchParams(e),a=r.get("page"),i=r.get("path");if((0,n.useEffect)(()=>{"function"==typeof astWpMenuClassChange&&astWpMenuClassChange(i)},[i]),astra_admin.home_slug!==a)return(0,t.createElement)("p",null,"Fallback Route Page");const s=nv[i]||mo;return(0,t.createElement)(s,null)};let av=1;const iv=new class{#t;#e;constructor(){this.#t=[],this.#e=[]}subscribe(t){return this.#e.push(t),()=>{this.#e=this.#e.filter(e=>e!==t)}}publish(t){this.#e.forEach(e=>e(t))}add(t){this.#t.push(t),this.publish(t)}remove(t){return this.#t=this.#t.filter(e=>e.id!==t),t}create(t){const{id:e,message:n="",jsx:r,...a}=t;if(!n&&"function"!=typeof r)return;const i="number"==typeof e?e:av++;return this.#t.find(t=>t.id===i)&&(this.#t=this.#t.map(t=>t.id===i?(this.publish({...t,title:n,jsx:r,...a}),{...t,title:n,jsx:r,...a}):t)),this.add({id:i,title:n,jsx:r,...a}),i}update(t,e){const{render:n}=e;let r=e;switch(typeof n){case"function":r={jsx:n,...e};break;case"string":r={title:n,...e}}this.#t=this.#t.map(e=>e.id===t?(this.publish({...e,...r}),{...e,...r}):e)}dismiss(t){return t||this.#t.forEach(t=>this.#e.forEach(e=>e({id:t.id,dismiss:!0}))),this.#e.forEach(e=>e({id:t,dismiss:!0})),t}history(){return this.#t}default(t="",e={}){return this.create({message:t,type:"neutral",...e})}success(t="",e={}){return this.create({message:t,type:"success",...e})}error(t="",e={}){return this.create({message:t,type:"error",...e})}warning(t="",e={}){return this.create({message:t,type:"warning",...e})}info(t="",e={}){return this.create({message:t,type:"info",...e})}custom(t,e={}){return this.create({jsx:t,type:"custom",...e})}},sv=Object.seal(Object.assign((t,e)=>iv.default(t,e),{success:iv.success.bind(iv),error:iv.error.bind(iv),warning:iv.warning.bind(iv),info:iv.info.bind(iv),custom:iv.custom.bind(iv),dismiss:iv.dismiss.bind(iv),update:iv.update.bind(iv)},{getHistory:iv.history.bind(iv)})),ov={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},lv={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},cv="bg-background-inverse border-background-inverse",uv={light:"text-icon-secondary",dark:"text-icon-inverse"};let dv=!1;const fv=({toastItem:t,title:e="",content:r="",autoDismiss:a=!0,dismissAfter:i=5e3,theme:s="light",design:o="stack",icon:l,variant:c="neutral",removeToast:u})=>{const d=(0,n.useRef)(0),f=(0,n.useRef)(0),p=(0,n.useRef)(),h=(t,e=i)=>{if(a&&!(i<0))return d.current=(new Date).getTime(),setTimeout(()=>{"function"==typeof u&&u(t.id)},e)};(0,n.useEffect)(()=>{const e=i;return p.current=h(t,e),()=>{clearTimeout(p.current)}},[]),(0,n.useEffect)(()=>{!t?.dismiss||"function"!=typeof u||u(t.id)},[t]);const m=()=>{"function"==typeof u&&t?.action?.onClick?.(()=>u(t.id))};let v=null;return"stack"===o&&(v=(0,Pt.jsx)("div",{className:Ee("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===s?cv:lv?.[c],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(p.current),f.current=(new Date).getTime()},onMouseLeave:()=>{p.current=h(t,i-(f.current-d.current))},children:"custom"!==t.type?(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Gs({variant:c,icon:l,theme:s})}),(0,Pt.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[Ys({title:e,theme:s}),Ks({content:r,theme:s}),t?.action?.label&&"function"==typeof t?.action?.onClick&&(0,Pt.jsx)("div",{className:"mt-2.5",children:Us({actionLabel:t?.action?.label,actionType:t?.action?.type??"button",onAction:m,theme:s})})]}),(0,Pt.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,Pt.jsx)("button",{className:Ee("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",uv[s]??uv.light),onClick:()=>{"function"==typeof u&&u(t.id)},children:(0,Pt.jsx)(xr,{})})})]}):t?.jsx?.({close:()=>u(t.id),action:t?.action?{...t?.action,onClick:m}:null})})),"inline"===o&&(v=(0,Pt.jsxs)("div",{className:Ee("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===s?cv:lv?.[c],"lg:w-[47.5rem] w-full"),children:[(0,Pt.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Gs({variant:c,icon:l,theme:s})}),(0,Pt.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[Ys({title:e,theme:s}),Ks({content:r,theme:s})]}),(0,Pt.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,Pt.jsx)("button",{className:Ee("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",uv[s]??uv.light),onClick:()=>u(t.id),children:(0,Pt.jsx)(xr,{})})})]})),v},pv=(hv=({position:t="top-right",design:e="stack",theme:r="light",className:a="",autoDismiss:i=!0,dismissAfter:s=5e3})=>{const[l,c]=(0,n.useState)([]);(0,n.useEffect)(()=>{iv.subscribe(t=>{t?.dismiss?c(e=>e.map(e=>e.id===t.id?{...e,dismiss:!0}:e)):setTimeout(()=>{(0,o.flushSync)(()=>c(e=>-1!==e.findIndex(e=>e.id===t.id)?e.map(e=>e.id===t.id?{...e,...t}:e):[...e,t]))})})},[]);const u=t=>{c(e=>e.filter(e=>e.id!==t))};return(0,Pt.jsx)("ul",{className:Ee("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",ov[t]??ov["top-right"],a),children:(0,Pt.jsx)(Am,{initial:!1,children:l.map(t=>(0,Pt.jsx)(vm.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${t.id}`,children:(0,Pt.jsx)(fv,{toastItem:t,title:t.title,content:t?.description,icon:t?.icon??void 0,design:t?.design??e,autoDismiss:t?.autoDismiss??i,dismissAfter:t?.dismissAfter??s,removeToast:u,variant:t.type,theme:t?.theme??r})},t.id))})})},(0,n.memo)(t=>{const e=t.singleTon;return dv&&e?null:(dv=!0,(0,Pt.jsx)(hv,{...t}))}));var hv;function mv(){const e=Dr(),r=Br(t=>t.settingsSavedNotification),a=new URLSearchParams(K()?.search),i=a.get("status")?a.get("status"):"";return""!==i&&"imported"===i&&(e({type:"UPDATE_SETTINGS_SAVED_NOTIFICATION",payload:(0,xt.__)("Successfully imported!","astra")}),setTimeout(()=>{window.location=astra_admin.astra_base_url},1e3)),(0,n.useEffect)(()=>{if(""!==r){sv.success(r);const t=setTimeout(()=>{e({type:"UPDATE_SETTINGS_SAVED_NOTIFICATION",payload:""})},2e3);return()=>clearTimeout(t)}},[r]),(0,t.createElement)(pv,{position:"top-right",design:"stack",theme:"light",autoDismiss:!0,dismissAfter:2e3})}const vv=({children:t,gap:e="lg",className:n,...r})=>(0,Pt.jsx)("div",{className:Ee("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",Le(e),n),...r,children:t});vv.displayName="Topbar";const gv=({gap:t="sm",children:e,className:n})=>(0,Pt.jsx)("div",{className:Ee("flex items-center",Le(t),n),children:e});gv.displayName="Topbar.Left";const yv=({gap:t="md",children:e,align:n="center",className:r})=>{const a={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return(0,Pt.jsx)("div",{className:Ee("flex items-center grow",Le(t),a,r),children:e})};yv.displayName="Topbar.Middle";const bv=({gap:t="sm",children:e,className:n})=>(0,Pt.jsx)("div",{className:Ee("flex items-center",Le(t),n),children:e});bv.displayName="Topbar.Right";const wv=({children:t,className:e})=>(0,Pt.jsx)("div",{className:Ee("flex items-center [&>svg]:block h-full",e),children:t});wv.displayName="Topbar.Item",vv.Left=gv,vv.Middle=yv,vv.Right=bv,vv.Item=wv;const xv=()=>{const[e,r]=(0,n.useState)(null);return(0,n.useEffect)(()=>{const t=localStorage.getItem("astraUpgradeNoticeDismissedUntil");if(t){const e=new Date(parseInt(t));new Date').concat(n.title,"
\n\t\t\t\t\t\t\t"):"".concat(n.title,"
"),s='\n\t\t\t\t\t\t\t\t'.concat(t.post_title,'
\n\t\t\t\t\t').concat(e.formatDate(new Date(t.post_date)),'\n\t\t\t\t1?"s":""," ago")}if(r