@chaibuilder/sdk 1.2.60 → 1.2.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AddBlocks-Wja5xsTO.cjs +1 -0
- package/dist/{AddBlocks-L-3Io1jR.js → AddBlocks-ucNQHhx7.js} +18 -18
- package/dist/CanvasArea-1lUzUorh.js +975 -0
- package/dist/CanvasArea-dsxnMndK.cjs +60 -0
- package/dist/{CodeEditor-cY6z8D4N.js → CodeEditor-LeNocbY6.js} +1 -1
- package/dist/{CodeEditor-NuzOGqRn.cjs → CodeEditor-kk0bmQ3P.cjs} +1 -1
- package/dist/{CurrentPage-XXy2OzNq.js → CurrentPage-huy7O-ih.js} +3 -3
- package/dist/{CurrentPage-ccOL3l6S.cjs → CurrentPage-oPzQ-MY2.cjs} +1 -1
- package/dist/{ListTree-yoltG7gq.js → ListTree-5T-2KuBE.js} +1 -1
- package/dist/{ListTree-8jpTvI-s.cjs → ListTree-Fwl6Dtgc.cjs} +1 -1
- package/dist/{PagesPanel-t3NlycIl.cjs → PagesPanel-85U4O4ex.cjs} +1 -1
- package/dist/{PagesPanel-XUtE4Aou.js → PagesPanel-IT7AmWMs.js} +4 -4
- package/dist/{ProjectPanel-UClucyIl.cjs → ProjectPanel-NiOqTkub.cjs} +1 -1
- package/dist/{ProjectPanel-3zkDX3az.js → ProjectPanel-hhxqbHEX.js} +4 -4
- package/dist/{Settings-GVs7UvAX.cjs → Settings-NqIs7PLQ.cjs} +1 -1
- package/dist/{Settings-C9AegLbF.js → Settings-UO9zB4rm.js} +2 -2
- package/dist/{SidePanels-Y3z3wyQx.js → SidePanels-2ZXeWnl7.js} +3 -3
- package/dist/{SidePanels--qxWuuF-.cjs → SidePanels-n5WUkXLw.cjs} +1 -1
- package/dist/{ThemeConfiguration-03I3INEI.cjs → ThemeConfiguration-UNRnCxnU.cjs} +1 -1
- package/dist/{ThemeConfiguration-e_4e_ZcS.js → ThemeConfiguration-VSQaQn9_.js} +4 -4
- package/dist/{Topbar-lnCz7TLm.js → Topbar-Tkn___pR.js} +2 -2
- package/dist/{Topbar-Yrhyc6IQ.cjs → Topbar-m48Xdj0O.cjs} +1 -1
- package/dist/UILibrariesPanel-0NMxbnSZ.js +215 -0
- package/dist/UILibrariesPanel-9V4REpxW.cjs +1 -0
- package/dist/{UnsplashImages-Y0TGxNbH.js → UnsplashImages-LU3fiooG.js} +1 -1
- package/dist/{UnsplashImages-5JbDig-S.cjs → UnsplashImages-fm761J9M.cjs} +1 -1
- package/dist/{UploadImages-f6wPPJxc.cjs → UploadImages-2_SIuRI7.cjs} +1 -1
- package/dist/{UploadImages-Dh35M55S.js → UploadImages-MjYi7gfH.js} +1 -1
- package/dist/{add-page-modal-j2foeVKa.cjs → add-page-modal-QdlPDeMk.cjs} +1 -1
- package/dist/{add-page-modal-sKH5SHMa.js → add-page-modal-TWTjEGxY.js} +4 -4
- package/dist/{atoms-a0H_593V.cjs → atoms-KQpaDRnF.cjs} +1 -1
- package/dist/{atoms-ZOWyNoiC.js → atoms-Oomqut88.js} +2 -2
- package/dist/{confirm-alert-pGxJwZ2Q.js → confirm-alert-RNzVJyhU.js} +1 -1
- package/dist/{confirm-alert-C3wsf6lk.cjs → confirm-alert-gFBHhF1C.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -2
- package/dist/{delete-page-modal-XObwAnNB.cjs → delete-page-modal-B5W3a1ZW.cjs} +1 -1
- package/dist/{delete-page-modal-4Tp_VPx1.js → delete-page-modal-sUlXQ02P.js} +3 -3
- package/dist/email.cjs +1 -1
- package/dist/email.js +2 -2
- package/dist/{form-pya-o19L.js → form-c4b4A8Ap.js} +1 -1
- package/dist/{form-D9cWMUJ4.cjs → form-lqNXs-pv.cjs} +1 -1
- package/dist/{index-1teL5Lld.js → index-0M3H1dVb.js} +3 -3
- package/dist/{index-TzLilp-0.js → index-SyrshOUV.js} +399 -402
- package/dist/{index-849lneVZ.cjs → index-TKS5_SlD.cjs} +1 -1
- package/dist/{index-ZZTdYO7r.js → index-WN67ca4z.js} +9 -9
- package/dist/{index-8Fxmy4tt.cjs → index-afblGXKA.cjs} +2 -2
- package/dist/index-upb0eDoG.cjs +1 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +97 -146
- package/dist/{page-viewer-Q-eOjWmS.js → page-viewer-qb3ot43w.js} +4 -4
- package/dist/{page-viewer-tNzhbu_E.cjs → page-viewer-v4K0Wkhx.cjs} +1 -1
- package/dist/plugin-2hf9pCRy.cjs +1 -0
- package/dist/plugin-wDnsBVPp.js +54 -0
- package/dist/{project-general-setting-uDDo2ktT.js → project-general-setting-LfoijnjK.js} +4 -4
- package/dist/{project-general-setting-9fI_iZ_Q.cjs → project-general-setting-Q7hgQy5G.cjs} +1 -1
- package/dist/{project-seo-setting-rjrO9KDR.cjs → project-seo-setting-rjVkahzj.cjs} +1 -1
- package/dist/{project-seo-setting-PXJe5SSV.js → project-seo-setting-ztis1_yw.js} +2 -2
- package/dist/{single-page-detail-0ipAHwTX.js → single-page-detail-Neoai4eq.js} +11 -11
- package/dist/{single-page-detail-s_kkO9Zj.cjs → single-page-detail-tR7Qp9T4.cjs} +1 -1
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +3 -3
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +44 -44
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +1 -1
- package/package.json +1 -1
- package/dist/AddBlocks-BtMNa99n.cjs +0 -1
- package/dist/CanvasArea-KBfW2Hh3.js +0 -978
- package/dist/CanvasArea-ZNRxUJR7.cjs +0 -59
- package/dist/UILibrariesPanel-LGbh-IZP.cjs +0 -1
- package/dist/UILibrariesPanel-PP4QDQRZ.js +0 -216
- package/dist/index-cH1CfTbV.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const av=require("i18next"),k9=require("react-i18next"),c1=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),Y=require("./index-cH1CfTbV.cjs"),v4=require("./_commonjsHelpers-wDK0ZLPo.cjs"),rv=require("clsx"),nv=require("react-dom"),cy=require("@radix-ui/react-scroll-area"),h2=require("@floating-ui/react-dom"),m4=require("jotai"),ey=require("flagged"),a2=require("lodash-es"),ay=require("./Functions-N3yhPYKY.cjs"),y6=require("@radix-ui/react-icons"),c6=require("react-hotkeys-hook"),ov=require("@chaibuilder/runtime"),ry=require("@react-hookz/web"),e3=require("lucide-react"),T6=require("./index--mLLy7QQ.cjs");function lv(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(c,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return c.default=t,Object.freeze(c)}const x=lv(u),J4=lv(cy),ny="Add block",oy="(Enter or paste TailwindCSS HTML snippet)",ly="(Click to add block to page)",iy="Core",sy="Custom Blocks",dy="UI Library",hy="Use HTML snippets from Tailwind CSS component libraries etc. or just copy paste your own HTML code.",uy="Tailwind HTML snippet:",vy="Enter your code snippet here...",gy="Import HTML",fy="NOTE: Imported html will be added to the currently selected block. If no block is selected, the html will be added to the page.",py="Dark mode",my="This page has no blocks. Add a block by clicking the + button",zy="This page is empty",My="Please select a block to edit settings or styles",by="Please select a block to ask AI",Cy="Please select a styling block",wy="Drop your block here",Vy="Use setting",Hy="Mobile (XS)",yy="Styles set here are applied to all screen unless edited at higher breakpoint",Ly="Mobile landscape (SM)",xy="Styles set here are applied at 640px and up unless edited at higher breakpoint",Iy="Tablet (MD)",Sy="Styles set here are applied at 768px and up",Fy="Tablet Landscape (LG)",Ay="Styles set here are applied at 1024px and up unless edited at higher breakpoint",By="Desktop (XL)",Oy="Styles set here are applied at 1280px and up unless edited at higher breakpoint",Ey="Large Desktop (2XL)",Gy="Styles set here are applied at 1536px and up",Py="Breakpoints",ky="Clear",Ry="Clear whole canvas?",Ny="Are you sure you want to clear the whole canvas?",Ty="Cancel",jy="Yes",Dy="Preview",qy="Settings",Zy="Styling",Wy="Data Provider",Ky="Are you sure you want to remove <span class='text-blue-500'>{name}</span> provider?",Uy="Your data provider will be removed from this page and all added data binding will be not visible on blocks.",Jy="Remove",Yy="You have no data providers registered. Please add a data provider to your project.",Xy="Learn more",Qy="Add data providers:",_y="Select a provider",$y="Choose",tL="Page data providers:",cL="View Data",eL="Mark as Global",aL="Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks.",rL="Global blocks are indicated with",nL="Global blocks are available under 'Global' category",oL="Enter global block name",lL="Eg: Header, Footer",iL="{{length}} blocks selected.",sL="Cut",dL="Copy",hL="Clear Selection",uL="This is dev mode. Visit",vL="to see page preview",gL={add_block:ny,enter_paste_tailwind_html:oy,click_to_add_block:ly,core:iy,custom_blocks:sy,ui_library:dy,import:"Import",html_snippet_description:hy,tailwind_html_snippet:uy,enter_code_snippet:vy,import_html:gy,note_imported_html:fy,dark_mode:py,tree_view_no_blocks:my,canvas_empty:zy,no_block_selected_for_styling:My,no_block_selected_for_ask_ai:by,no_styling_block_selected:Cy,drop_here_message:wy,use_setting:Vy,mobile_xs_title:Hy,mobile_xs_content:yy,mobile_sm_title:Ly,mobile_sm_content:xy,tablet_md_title:Iy,tablet_md_content:Sy,tablet_lg_title:Fy,tablet_lg_content:Ay,desktop_xl_title:By,desktop_xl_content:Oy,large_desktop_2xl_title:Ey,large_desktop_2xl_content:Gy,Breakpoints:Py,clear:ky,clear_canvas_title:Ry,clear_canvas_description:Ny,cancel:Ty,yes:jy,preview:Dy,settings:qy,styling:Zy,data_provider:Wy,remove_provider_confirmation:Ky,remove_provider_warning:Uy,remove:Jy,no_data_providers:Yy,learn_more:Xy,add_data_providers:Qy,select_provider:_y,choose:$y,page_data_providers:tL,view_data:cL,mark_as_global:eL,global_block_note:aL,global_block_indicator:rL,global_block_category:nL,enter_global_block_name:oL,eg_header_footer:lL,blocks_selected:iL,cut:sL,copy:dL,delete:"Delete",clear_selection:hL,dev_mode_message:uL,to_see_page_preview:vL,"flex.heading":"Flex Child","flex.basis":"Basis","flex.order":"Order","flex.flex":"Flex","flex.grow":"Grow","flex.shrink":"Shrink","grid.heading":"Grid Child","grid.col_span":"Col Span","grid.col_start":"Col Start","grid.col_end":"Col End","grid.row_span":"Row Span","grid.row_start":"Row Start","grid.row_end":"Row End","grid.order":"Order","layout.heading":"Layout","layout.width":"Width","layout.height":"Height","layout.margin":"Margin","layout.margin_all":"All","layout.margin_lr":"Left-Right","layout.margin_tb":"Top-Bottom","layout.margin_top":"Top","layout.margin_right":"Right","layout.margin_bottom":"Bottom","layout.margin_left":"Left","layout.padding":"Padding","layout.padding_all":"All","layout.padding_lr":"Left-Right","layout.padding_tb":"Top-Bottom","layout.padding_top":"Top","layout.padding_right":"Right","layout.padding_bottom":"Bottom","layout.padding_left":"Left","layout.space_bt":"Space Bt.","layout.space_lr":"Left-Right","layout.space_tb":"Top-Bottom","size.heading":"Size","size.min_width_height":"Min width & height","size.min_width":"Min Width","size.min_height":"Min Height","size.max_width_height":"Max width & height","size.max_width":"Max Width","size.max_height":"Max Height","size.object_options_aspect_ratio":"Object options & aspect ratio","size.aspect":"Aspect","size.fit":"Fit","size.position":"Position","display.heading":"Display","display.display":"Display","display.flex_options":"Flex options","display.flex_direction":"Direction","display.flex_wrap":"Wrap","display.justify_content":"Justify","display.align_content":"Content","display.align_items":"Items","display.gap":"Gap","display.gap_all":"All","display.gap_lr":"Left-Right","display.gap_tb":"Top-Bottom","display.grid_options":"Grid options","display.grid_columns":"Columns","display.grid_rows":"Rows","display.grid_auto_flow":"Auto Flow","display.grid_auto_cols":"Auto Cols","display.grid_auto_rows":"Auto Rows","display.visibility_opacity":"Visibility & Opacity","display.visibility":"Visibility","display.opacity":"Opacity","position.heading":"Position","position.position":"Position","position.options":"Position options","position.direction":"Direction","position.top":"Top","position.right":"Right","position.bottom":"Bottom","position.left":"Left","position.inset":"Inset","position.all":"All","position.lr":"Left Right","position.tb":"Top Bottom","position.z_index":"Z-Index","position.float_clear":"Float & Clear","position.float":"Float","position.clear":"Clear","position.overflow_overscroll":"Overflow & Overscroll","position.overflow":"Overflow","position.overscroll":"Overscroll","typography.heading":"Typography","typography.font":"Font","typography.size":"Size","typography.height":"Height","typography.weight":"Weight","typography.color":"Color","typography.alignments":"Alignments","typography.align":"Align","typography.valign":"V. Align","typography.spacing_decoration_more":"Spacing, decoration & more","typography.spacing":"Spacing","typography.decoration":"Decoration","typography.thickness":"Thickness","typography.transform":"Transform","typography.whitespace_breaks":"White space & breaks","typography.whitespace":"Whitespace","typography.wordbreak":"Wordbreak","background.heading":"Background","background.bgcolor":"Bg. Color","background.position_size_more":"Position, Size & more","background.attachment":"Attachment","background.clipping":"Clipping","background.origin":"Origin","background.position":"Position","background.repeat":"Repeat","background.size":"Size","background.gradient":"Gradient","background.gradient_colors":"Gradient colors","background.from_color":"From","background.via_color":"Via","background.to_color":"To","border.heading":"Border & Outline","border.width":"Width","border.all":"All","border.lr":"Left Right","border.tb":"Top bottom","border.top":"Top","border.right":"Right","border.bottom":"Bottom","border.left":"Left","border.corners":"Corners","border.top_left":"Top Left","border.top_right":"Top right","border.bottom_right":"Bottom right","border.bottom_left":"Bottom left","border.color":"Color","border.style":"Style","border.divide_options":"Divide options","border.divide_color":"Color","border.divide_style":"Style","border.outline_styling":"Outline styling","border.outline_width":"Width","border.outline_offset":"Offset","border.outline_style":"Style","border.ring_options":"Ring options","border.ring_width":"Width","border.ring_color":"Color","border.ring_offset_width":"Offset","border.ring_offset_color":"Off. color","effect.heading":"Effect & Animation","effect.shadow":"Shadow","effect.color":"Color","effect.cursor":"Cursor","effect.blend_cursor":"Blend & Cursor","effect.mix_blend":"Mix Blend","effect.bg_blend":"Bg. Blend","effect.transform":"Transform","effect.origin":"Origin","effect.scale":"Scale","effect.all":"All","effect.lr":"Left-Right","effect.tb":"Top-Bottom","effect.skew":"Skew","effect.translate":"Translate","effect.rotate":"Rotate","effect.animation":"Animation","effect.transition":"Transition","effect.easing":"Easing","effect.duration":"Duration","effect.delay":"Delay","classes.heading":"Classes"},fL="Adicionar bloco",pL="(Digite ou cole um trecho HTML do TailwindCSS)",mL="(Clique para adicionar bloco à página)",zL="Principal",ML="Personalizados",bL="Biblioteca de UI",CL="Use trechos HTML de bibliotecas de componentes Tailwind CSS, etc. ou simplesmente copie e cole seu próprio código HTML.",wL="Trecho HTML do Tailwind:",VL="Digite seu trecho de código aqui...",HL="Importar HTML",yL="NOTA: O HTML importado será adicionado ao bloco atualmente selecionado. Se nenhum bloco for selecionado, o HTML será adicionado à página.",LL="Modo escuro",xL="Esta página não tem blocos. Adicione um bloco clicando no botão +",IL="Esta página está vazia",SL="Selecione um bloco para editar as configurações ou estilos",FL="Selecione um bloco de estilo",AL="Solte seu bloco aqui",BL="Usar configuração",OL="Celular (XS)",EL="Os estilos definidos aqui são aplicados a todas as telas, a menos que editados em um ponto de interrupção mais alto",GL="Celular paisagem (SM)",PL="Os estilos definidos aqui são aplicados a 640px e acima, a menos que editados em um ponto de interrupção mais alto",kL="Tablet (MD)",RL="Os estilos definidos aqui são aplicados a 768px e acima",NL="Paisagem do tablet (LG)",TL="Os estilos definidos aqui são aplicados a 1024px e acima, a menos que editados em um ponto de interrupção mais alto",jL="Desktop (XL)",DL="Os estilos definidos aqui são aplicados a 1280px e acima, a menos que editados em um ponto de interrupção mais alto",qL="Desktop Grande (2XL)",ZL="Os estilos definidos aqui são aplicados a 1536px e acima",WL="Pontos de interrupção",KL="Limpar",UL="Limpar toda a tela?",JL="Tem certeza de que deseja limpar toda a tela?",YL="Cancelar",XL="Sim",QL="Visualizar",_L="Configurações",$L="Estilo",tx="Provedor de Dados",cx="Tem certeza de que deseja remover o provedor <span class='text-blue-500'>{name}</span>?",ex="Seu provedor de dados será removido desta página e todas as vinculações de dados adicionadas não serão visíveis nos blocos.",ax="Remover",rx="Você não tem provedores de dados registrados. Adicione um provedor de dados ao seu projeto.",nx="Saiba mais",ox="Adicionar provedores de dados:",lx="Selecione um provedor",ix="Escolher",sx="Provedores de dados da página:",dx="Ver Dados",hx="Marcar como Global",ux="Nota: Blocos globais são instâncias únicas. Editar blocos globais será refletido em todas as páginas que usam esses blocos.",vx="Blocos globais são indicados com",gx="Blocos globais estão disponíveis na categoria 'Global'",fx="Digite o nome do bloco global",px="Ex: Cabeçalho, Rodapé",mx="{{length}} blocos selecionados.",zx="Recortar",Mx="Copiar",bx="Limpar Seleção",Cx="Este é o modo de desenvolvimento. Visite",wx="para ver a pré-visualização da página",Vx={add_block:fL,enter_paste_tailwind_html:pL,click_to_add_block:mL,core:zL,custom_blocks:ML,ui_library:bL,import:"Importar",html_snippet_description:CL,tailwind_html_snippet:wL,enter_code_snippet:VL,import_html:HL,note_imported_html:yL,dark_mode:LL,tree_view_no_blocks:xL,canvas_empty:IL,no_block_selected_for_styling:SL,no_styling_block_selected:FL,drop_here_message:AL,use_setting:BL,mobile_xs_title:OL,mobile_xs_content:EL,mobile_sm_title:GL,mobile_sm_content:PL,tablet_md_title:kL,tablet_md_content:RL,tablet_lg_title:NL,tablet_lg_content:TL,desktop_xl_title:jL,desktop_xl_content:DL,large_desktop_2xl_title:qL,large_desktop_2xl_content:ZL,Breakpoints:WL,clear:KL,clear_canvas_title:UL,clear_canvas_description:JL,cancel:YL,yes:XL,preview:QL,settings:_L,styling:$L,data_provider:tx,remove_provider_confirmation:cx,remove_provider_warning:ex,remove:ax,no_data_providers:rx,learn_more:nx,add_data_providers:ox,select_provider:lx,choose:ix,page_data_providers:sx,view_data:dx,mark_as_global:hx,global_block_note:ux,global_block_indicator:vx,global_block_category:gx,enter_global_block_name:fx,eg_header_footer:px,blocks_selected:mx,cut:zx,copy:Mx,delete:"Excluir",clear_selection:bx,dev_mode_message:Cx,to_see_page_preview:wx,"flex.heading":"Filho Flex","flex.basis":"Base","flex.order":"Ordem","flex.flex":"Flex","flex.grow":"Crescer","flex.shrink":"Encolher","grid.heading":"Filho Grade","grid.col_span":"Abrangência da Coluna","grid.col_start":"Início da Coluna","grid.col_end":"Fim da Coluna","grid.row_span":"Abrangência da Linha","grid.row_start":"Início da Linha","grid.row_end":"Fim da Linha","grid.order":"Ordem","layout.heading":"Layout","layout.width":"Largura","layout.height":"Altura","layout.margin":"Margem","layout.margin_all":"Todas","layout.margin_lr":"Esquerda-Direita","layout.margin_tb":"Topo-Baixo","layout.margin_top":"Topo","layout.margin_right":"Direita","layout.margin_bottom":"Baixo","layout.margin_left":"Esquerda","layout.padding":"Preenchimento","layout.padding_all":"Todos","layout.padding_lr":"Esquerda-Direita","layout.padding_tb":"Topo-Baixo","layout.padding_top":"Topo","layout.padding_right":"Direita","layout.padding_bottom":"Baixo","layout.padding_left":"Esquerda","layout.space_bt":"Espaçamento","layout.space_lr":"Esquerda-Direita","layout.space_tb":"Topo-Baixo","size.heading":"Tamanho","size.min_width_height":"Largura & Altura Mínimas","size.min_width":"Largura Mínima","size.min_height":"Altura Mínima","size.max_width_height":"Largura & Altura Máximas","size.max_width":"Largura Máxima","size.max_height":"Altura Máxima","size.object_options_aspect_ratio":"Opções de Objeto & Proporção","size.aspect":"Proporção","size.fit":"Ajuste","size.position":"Posição","display.heading":"Exibição","display.display":"Exibir","display.flex_options":"Opções de Flex","display.flex_direction":"Direção","display.flex_wrap":"Quebra","display.justify_content":"Justificar","display.align_content":"Conteúdo","display.align_items":"Itens","display.gap":"Espaçamento","display.gap_all":"Todos","display.gap_lr":"Esquerda-Direita","display.gap_tb":"Topo-Baixo","display.grid_options":"Opções de Grade","display.grid_columns":"Colunas","display.grid_rows":"Linhas","display.grid_auto_flow":"Fluxo Automático","display.grid_auto_cols":"Colunas Automáticas","display.grid_auto_rows":"Linhas Automáticas","display.visibility_opacity":"Visibilidade & Opacidade","display.visibility":"Visibilidade","display.opacity":"Opacidade","position.heading":"Posição","position.position":"Posição","position.options":"Opções de Posição","position.direction":"Direção","position.top":"Topo","position.right":"Direita","position.bottom":"Baixo","position.left":"Esquerda","position.inset":"Inserção","position.all":"Todos","position.lr":"Esquerda Direita","position.tb":"Topo Baixo","position.z_index":"Z-Index","position.float_clear":"Flutuar & Limpar","position.float":"Flutuar","position.clear":"Limpar","position.overflow_overscroll":"Transbordo & Rolagem Excedente","position.overflow":"Transbordo","position.overscroll":"Rolagem Excedente","typography.heading":"Tipografia","typography.font":"Fonte","typography.size":"Tamanho","typography.height":"Altura","typography.weight":"Peso","typography.color":"Cor","typography.alignments":"Alinhamentos","typography.align":"Alinhar","typography.valign":"V. Alinhar","typography.spacing_decoration_more":"Espaçamento, Decoração & Mais","typography.spacing":"Espaçamento","typography.decoration":"Decoração","typography.thickness":"Espessura","typography.transform":"Transformação","typography.whitespace_breaks":"Espaçamento & Quebras","typography.whitespace":"Espaçamento","typography.wordbreak":"Quebra de Palavra","background.heading":"Fundo","background.bgcolor":"Cor do Fundo","background.position_size_more":"Posição, Tamanho & Mais","background.attachment":"Anexo","background.clipping":"Recorte","background.origin":"Origem","background.position":"Posição","background.repeat":"Repetir","background.size":"Tamanho","background.gradient":"Gradiente","background.gradient_colors":"Cores do Gradiente","background.from_color":"De","background.via_color":"Via","background.to_color":"Para","border.heading":"Borda & Contorno","border.width":"Largura","border.all":"Todos","border.lr":"Esquerda Direita","border.tb":"Topo Baixo","border.top":"Topo","border.right":"Direita","border.bottom":"Baixo","border.left":"Esquerda","border.corners":"Cantoneiras","border.top_left":"Topo Esquerda","border.top_right":"Topo Direita","border.bottom_right":"Baixo Direita","border.bottom_left":"Baixo Esquerda","border.color":"Cor","border.style":"Estilo","border.divide_options":"Opções de Divisão","border.divide_color":"Cor","border.divide_style":"Estilo","border.outline_styling":"Estilização de Contorno","border.outline_width":"Largura","border.outline_offset":"Offset","border.outline_style":"Estilo","border.ring_options":"Opções de Anel","border.ring_width":"Largura","border.ring_color":"Cor","border.ring_offset_width":"Offset","border.ring_offset_color":"Cor do Offset","effect.heading":"Efeito & Animação","effect.shadow":"Sombra","effect.color":"Cor","effect.cursor":"Cursor","effect.blend_cursor":"Mistura & Cursor","effect.mix_blend":"Mistura","effect.bg_blend":"Mistura de Fundo","effect.transform":"Transformação","effect.origin":"Origem","effect.scale":"Escala","effect.all":"Todos","effect.lr":"Esquerda-Direita","effect.tb":"Topo-Baixo","effect.skew":"Inclinação","effect.translate":"Translação","effect.rotate":"Rotação","effect.animation":"Animação","effect.transition":"Transição","effect.easing":"Facilitando","effect.duration":"Duração","effect.delay":"Atraso","classes.heading":"Classes"},Hx="Agregar bloque",yx="(Ingrese o pegue un fragmento HTML de TailwindCSS)",Lx="(Haga clic para agregar un bloque a la página)",xx="Núcleo",Ix="Bloques Personalizados",Sx="Biblioteca de UI",Fx="Use fragmentos de HTML de bibliotecas de componentes de Tailwind CSS, etc. o simplemente copie y pegue su propio código HTML.",Ax="Fragmento HTML de Tailwind:",Bx="Ingrese su fragmento de código aquí...",Ox="Importar HTML",Ex="NOTA: El HTML importado se añadirá al bloque seleccionado actualmente. Si no se selecciona ningún bloque, el HTML se añadirá a la página.",Gx="Modo oscuro",Px="Esta página no tiene bloques. Agregue un bloque haciendo clic en el botón +",kx="Esta página está vacía",Rx="Seleccione un bloque para editar configuraciones o estilos",Nx="Seleccione un bloque de estilo",Tx="Suelta tu bloque aquí",jx="Usar configuración",Dx="Móvil (XS)",qx="Los estilos establecidos aquí se aplican a todas las pantallas a menos que se editen en un punto de interrupción superior",Zx="Paisaje móvil (SM)",Wx="Los estilos establecidos aquí se aplican a 640px y superiores, a menos que se editen en un punto de interrupción superior",Kx="Tableta (MD)",Ux="Los estilos establecidos aquí se aplican a 768px y superiores",Jx="Paisaje de la tableta (LG)",Yx="Los estilos establecidos aquí se aplican a 1024px y superiores, a menos que se editen en un punto de interrupción superior",Xx="Escritorio (XL)",Qx="Los estilos establecidos aquí se aplican a 1280px y superiores, a menos que se editen en un punto de interrupción superior",_x="Escritorio Grande (2XL)",$x="Los estilos establecidos aquí se aplican a 1536px y superiores",tI="Puntos de interrupción",cI="Limpiar",eI="¿Limpiar todo el lienzo?",aI="¿Estás seguro de que quieres limpiar todo el lienzo?",rI="Cancelar",nI="Sí",oI="Vista previa",lI="Configuraciones",iI="Estilo",sI="Proveedor de Datos",dI="¿Está seguro de que desea eliminar el proveedor <span class='text-blue-500'>{name}</span>?",hI="Su proveedor de datos se eliminará de esta página y todas las vinculaciones de datos añadidas no serán visibles en los bloques.",uI="Eliminar",vI="No tiene proveedores de datos registrados. Agregue un proveedor de datos a su proyecto.",gI="Aprender más",fI="Agregar proveedores de datos:",pI="Seleccione un proveedor",mI="Elija",zI="Proveedores de datos de la página:",MI="Ver Datos",bI="Marcar como Global",CI="Nota: Los bloques globales son instancias únicas. Editar bloques globales se reflejará en todas las páginas que usen estos bloques.",wI="Los bloques globales se indican con",VI="Los bloques globales están disponibles en la categoría 'Global'",HI="Ingrese el nombre del bloque global",yI="Ej: Encabezado, Pie de página",LI="{{length}} bloques seleccionados.",xI="Cortar",II="Copiar",SI="Limpiar Selección",FI="Este es el modo de desarrollo. Visite",AI="para ver la vista previa de la página",BI={add_block:Hx,enter_paste_tailwind_html:yx,click_to_add_block:Lx,core:xx,custom_blocks:Ix,ui_library:Sx,import:"Importar",html_snippet_description:Fx,tailwind_html_snippet:Ax,enter_code_snippet:Bx,import_html:Ox,note_imported_html:Ex,dark_mode:Gx,tree_view_no_blocks:Px,canvas_empty:kx,no_block_selected_for_styling:Rx,no_styling_block_selected:Nx,drop_here_message:Tx,use_setting:jx,mobile_xs_title:Dx,mobile_xs_content:qx,mobile_sm_title:Zx,mobile_sm_content:Wx,tablet_md_title:Kx,tablet_md_content:Ux,tablet_lg_title:Jx,tablet_lg_content:Yx,desktop_xl_title:Xx,desktop_xl_content:Qx,large_desktop_2xl_title:_x,large_desktop_2xl_content:$x,Breakpoints:tI,clear:cI,clear_canvas_title:eI,clear_canvas_description:aI,cancel:rI,yes:nI,preview:oI,settings:lI,styling:iI,data_provider:sI,remove_provider_confirmation:dI,remove_provider_warning:hI,remove:uI,no_data_providers:vI,learn_more:gI,add_data_providers:fI,select_provider:pI,choose:mI,page_data_providers:zI,view_data:MI,mark_as_global:bI,global_block_note:CI,global_block_indicator:wI,global_block_category:VI,enter_global_block_name:HI,eg_header_footer:yI,blocks_selected:LI,cut:xI,copy:II,delete:"Eliminar",clear_selection:SI,dev_mode_message:FI,to_see_page_preview:AI,"flex.heading":"Hijo Flex","flex.basis":"Base","flex.order":"Orden","flex.flex":"Flex","flex.grow":"Crecer","flex.shrink":"Encoger","grid.heading":"Hijo Grid","grid.col_span":"Extensión de Columna","grid.col_start":"Inicio de Columna","grid.col_end":"Fin de Columna","grid.row_span":"Extensión de Fila","grid.row_start":"Inicio de Fila","grid.row_end":"Fin de Fila","grid.order":"Orden","layout.heading":"Diseño","layout.width":"Ancho","layout.height":"Altura","layout.margin":"Margen","layout.margin_all":"Todas","layout.margin_lr":"Izquierda-Derecha","layout.margin_tb":"Arriba-Abajo","layout.margin_top":"Arriba","layout.margin_right":"Derecha","layout.margin_bottom":"Abajo","layout.margin_left":"Izquierda","layout.padding":"Relleno","layout.padding_all":"Todos","layout.padding_lr":"Izquierda-Derecha","layout.padding_tb":"Arriba-Abajo","layout.padding_top":"Arriba","layout.padding_right":"Derecha","layout.padding_bottom":"Abajo","layout.padding_left":"Izquierda","layout.space_bt":"Espaciado","layout.space_lr":"Izquierda-Derecha","layout.space_tb":"Arriba-Abajo","size.heading":"Tamaño","size.min_width_height":"Ancho & Altura Mínimos","size.min_width":"Ancho Mínimo","size.min_height":"Altura Mínima","size.max_width_height":"Ancho & Altura Máximos","size.max_width":"Ancho Máximo","size.max_height":"Altura Máxima","size.object_options_aspect_ratio":"Opciones de Objeto & Relación de Aspecto","size.aspect":"Aspecto","size.fit":"Ajustar","size.position":"Posición","display.heading":"Mostrar","display.display":"Mostrar","display.flex_options":"Opciones de Flex","display.flex_direction":"Dirección","display.flex_wrap":"Ajustar","display.justify_content":"Justificar","display.align_content":"Contenido","display.align_items":"Elementos","display.gap":"Espaciado","display.gap_all":"Todos","display.gap_lr":"Izquierda-Derecha","display.gap_tb":"Arriba-Abajo","display.grid_options":"Opciones de Grid","display.grid_columns":"Columnas","display.grid_rows":"Filas","display.grid_auto_flow":"Flujo Automático","display.grid_auto_cols":"Columnas Automáticas","display.grid_auto_rows":"Filas Automáticas","display.visibility_opacity":"Visibilidad & Opacidad","display.visibility":"Visibilidad","display.opacity":"Opacidad","position.heading":"Posición","position.position":"Posición","position.options":"Opciones de Posición","position.direction":"Dirección","position.top":"Arriba","position.right":"Derecha","position.bottom":"Abajo","position.left":"Izquierda","position.inset":"Inserción","position.all":"Todos","position.lr":"Izquierda Derecha","position.tb":"Arriba Abajo","position.z_index":"Índice Z","position.float_clear":"Flotar & Limpiar","position.float":"Flotar","position.clear":"Limpiar","position.overflow_overscroll":"Desbordamiento & Exceso de Desplazamiento","position.overflow":"Desbordamiento","position.overscroll":"Exceso de Desplazamiento","typography.heading":"Tipografía","typography.font":"Fuente","typography.size":"Tamaño","typography.height":"Altura","typography.weight":"Peso","typography.color":"Color","typography.alignments":"Alineamientos","typography.align":"Alinear","typography.valign":"V. Alinear","typography.spacing_decoration_more":"Espaciado, Decoración & Más","typography.spacing":"Espaciado","typography.decoration":"Decoración","typography.thickness":"Grosor","typography.transform":"Transformación","typography.whitespace_breaks":"Espaciado & Saltos","typography.whitespace":"Espaciado","typography.wordbreak":"Corte de Palabra","background.heading":"Fondo","background.bgcolor":"Color del Fondo","background.position_size_more":"Posición, Tamaño & Más","background.attachment":"Adjunto","background.clipping":"Recorte","background.origin":"Origen","background.position":"Posición","background.repeat":"Repetir","background.size":"Tamaño","background.gradient":"Gradiente","background.gradient_colors":"Colores del Gradiente","background.from_color":"De","background.via_color":"A través de","background.to_color":"Hacia","border.heading":"Borde & Contorno","border.width":"Ancho","border.all":"Todos","border.lr":"Izquierda Derecha","border.tb":"Arriba Abajo","border.top":"Arriba","border.right":"Derecha","border.bottom":"Abajo","border.left":"Izquierda","border.corners":"Esquinas","border.top_left":"Arriba Izquierda","border.top_right":"Arriba Derecha","border.bottom_right":"Abajo Derecha","border.bottom_left":"Abajo Izquierda","border.color":"Color","border.style":"Estilo","border.divide_options":"Opciones de División","border.divide_color":"Color","border.divide_style":"Estilo","border.outline_styling":"Estilo de Contorno","border.outline_width":"Ancho","border.outline_offset":"Offset","border.outline_style":"Estilo","border.ring_options":"Opciones de Anillo","border.ring_width":"Ancho","border.ring_color":"Color","border.ring_offset_width":"Offset","border.ring_offset_color":"Color del Offset","effect.heading":"Efecto & Animación","effect.shadow":"Sombra","effect.color":"Color","effect.cursor":"Cursor","effect.blend_cursor":"Mezcla & Cursor","effect.mix_blend":"Mezcla","effect.bg_blend":"Mezcla de Fondo","effect.transform":"Transformación","effect.origin":"Origen","effect.scale":"Escala","effect.all":"Todos","effect.lr":"Izquierda-Derecha","effect.tb":"Arriba-Abajo","effect.skew":"Sesgar","effect.translate":"Trasladar","effect.rotate":"Rotar","effect.animation":"Animación","effect.transition":"Transición","effect.easing":"Facilitación","effect.duration":"Duración","effect.delay":"Retraso","classes.heading":"Clases"};av.use(k9.initReactI18next).init({resources:{en:{translation:gL},"pt-BR":{translation:Vx},es:{translation:BI}},lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});var OI=Object.create,iv=Object.defineProperty,EI=Object.getOwnPropertyDescriptor,se=Object.getOwnPropertyNames,GI=Object.getPrototypeOf,PI=Object.prototype.hasOwnProperty,kI=(t,c)=>function(){return t&&(c=(0,t[se(t)[0]])(t=0)),c},u1=(t,c)=>function(){return c||(0,t[se(t)[0]])((c={exports:{}}).exports,c),c.exports},RI=(t,c,e,a)=>{if(c&&typeof c=="object"||typeof c=="function")for(let r of se(c))!PI.call(t,r)&&r!==e&&iv(t,r,{get:()=>c[r],enumerable:!(a=EI(c,r))||a.enumerable});return t},d3=(t,c,e)=>(e=t!=null?OI(GI(t)):{},RI(c||!t||!t.__esModule?iv(e,"default",{value:t,enumerable:!0}):e,t)),R=kI({"react-shim.js"(){"use strict"}});R();R();var NI=(t,c)=>t.size===c.size&&Array.from(t).every(([e,a])=>Object.is(c.get(e),a)),TI=(t,c)=>t.size===c.size&&Array.from(t).every(([e,a])=>{const r=c.get(e);return r&&a.size===r.size&&Array.from(a).every(n=>r.has(n))});function jI({shouldShowPrivateAtoms:t=!1,...c}={}){const e=Y.useStore(c),[a,r]=u.useState(()=>({values:new Map,dependents:new Map})),n=u.useRef(!0);return n.current=!0,u.useLayoutEffect(()=>{n.current=!1}),u.useEffect(()=>{const o=(e==null?void 0:e.dev_subscribe_store)||(e==null?void 0:e.dev_subscribe_state);if(!o)return;let l=new Map,i=new Map;"dev_subscribe_store"in e||console.warn("[DEPRECATION-WARNING]: Your Jotai version is out-of-date and contains deprecated properties that will be removed soon. Please update to the latest version of Jotai.");const h=d=>{var f,m,z;typeof d!="object"&&console.warn("[DEPRECATION-WARNING]: Your Jotai version is out-of-date and contains deprecated properties that will be removed soon. Please update to the latest version of Jotai.");const v=new Map,g=new Map;for(const M of((f=e.dev_get_mounted_atoms)==null?void 0:f.call(e))||[]){if(!t&&M.debugPrivate)continue;const C=(m=e.dev_get_atom_state)==null?void 0:m.call(e,M);C&&"v"in C&&v.set(M,C.v);const V=(z=e.dev_get_mounted)==null?void 0:z.call(e,M);if(V){let w=V.t;t||(w=new Set(Array.from(w.values()).filter(H=>!H.debugPrivate))),g.set(M,w)}}if(NI(l,v)&&TI(i,g))return;l=v,i=g;const p=()=>r({values:v,dependents:g});n.current?Promise.resolve().then(p):p()},s=o==null?void 0:o(h,2);return h({}),s},[e,t]),a}R();function sv(t){const c=Y.useStore(t);return u.useCallback(e=>{c.dev_restore_atoms&&c.dev_restore_atoms(e.values)},[c])}R();R();R();R();R();function DI(t){if(t.sheet)return t.sheet;for(var c=0;c<document.styleSheets.length;c++)if(document.styleSheets[c].ownerNode===t)return document.styleSheets[c]}function qI(t){var c=document.createElement("style");return c.setAttribute("data-emotion",t.key),t.nonce!==void 0&&c.setAttribute("nonce",t.nonce),c.appendChild(document.createTextNode("")),c.setAttribute("data-s",""),c}var ZI=function(){function t(e){var a=this;this._insertTag=function(r){var n;a.tags.length===0?a.insertionPoint?n=a.insertionPoint.nextSibling:a.prepend?n=a.container.firstChild:n=a.before:n=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(r,n),a.tags.push(r)},this.isSpeedy=e.speedy===void 0?process.env.NODE_ENV==="production":e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var c=t.prototype;return c.hydrate=function(a){a.forEach(this._insertTag)},c.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(qI(this));var r=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var n=a.charCodeAt(0)===64&&a.charCodeAt(1)===105;n&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
|
|
1
|
+
"use strict";const av=require("i18next"),k9=require("react-i18next"),c1=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),Y=require("./index-upb0eDoG.cjs"),v4=require("./_commonjsHelpers-wDK0ZLPo.cjs"),rv=require("clsx"),nv=require("react-dom"),cy=require("@radix-ui/react-scroll-area"),h2=require("@floating-ui/react-dom"),m4=require("jotai"),ey=require("flagged"),a2=require("lodash-es"),ay=require("./Functions-N3yhPYKY.cjs"),y6=require("@radix-ui/react-icons"),c6=require("react-hotkeys-hook"),ov=require("@chaibuilder/runtime"),ry=require("@react-hookz/web"),e3=require("lucide-react"),T6=require("./index--mLLy7QQ.cjs");function lv(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(c,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return c.default=t,Object.freeze(c)}const x=lv(u),J4=lv(cy),ny="Add block",oy="(Enter or paste TailwindCSS HTML snippet)",ly="(Click to add block to page)",iy="Core",sy="Custom Blocks",dy="UI Library",hy="Use HTML snippets from Tailwind CSS component libraries etc. or just copy paste your own HTML code.",uy="Tailwind HTML snippet:",vy="Enter your code snippet here...",gy="Import HTML",fy="NOTE: Imported html will be added to the currently selected block. If no block is selected, the html will be added to the page.",py="Dark mode",my="This page has no blocks. Add a block by clicking the + button",zy="This page is empty",My="Please select a block to edit settings or styles",by="Please select a block to ask AI",Cy="Please select a styling block",wy="Drop your block here",Vy="Use setting",Hy="Mobile (XS)",yy="Styles set here are applied to all screen unless edited at higher breakpoint",Ly="Mobile landscape (SM)",xy="Styles set here are applied at 640px and up unless edited at higher breakpoint",Iy="Tablet (MD)",Sy="Styles set here are applied at 768px and up",Fy="Tablet Landscape (LG)",Ay="Styles set here are applied at 1024px and up unless edited at higher breakpoint",By="Desktop (XL)",Oy="Styles set here are applied at 1280px and up unless edited at higher breakpoint",Ey="Large Desktop (2XL)",Gy="Styles set here are applied at 1536px and up",Py="Breakpoints",ky="Clear",Ry="Clear whole canvas?",Ny="Are you sure you want to clear the whole canvas?",Ty="Cancel",jy="Yes",Dy="Preview",qy="Settings",Zy="Styling",Wy="Data Provider",Ky="Are you sure you want to remove <span class='text-blue-500'>{name}</span> provider?",Uy="Your data provider will be removed from this page and all added data binding will be not visible on blocks.",Jy="Remove",Yy="You have no data providers registered. Please add a data provider to your project.",Xy="Learn more",Qy="Add data providers:",_y="Select a provider",$y="Choose",tL="Page data providers:",cL="View Data",eL="Mark as Global",aL="Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks.",rL="Global blocks are indicated with",nL="Global blocks are available under 'Global' category",oL="Enter global block name",lL="Eg: Header, Footer",iL="{{length}} blocks selected.",sL="Cut",dL="Copy",hL="Clear Selection",uL="This is dev mode. Visit",vL="to see page preview",gL={add_block:ny,enter_paste_tailwind_html:oy,click_to_add_block:ly,core:iy,custom_blocks:sy,ui_library:dy,import:"Import",html_snippet_description:hy,tailwind_html_snippet:uy,enter_code_snippet:vy,import_html:gy,note_imported_html:fy,dark_mode:py,tree_view_no_blocks:my,canvas_empty:zy,no_block_selected_for_styling:My,no_block_selected_for_ask_ai:by,no_styling_block_selected:Cy,drop_here_message:wy,use_setting:Vy,mobile_xs_title:Hy,mobile_xs_content:yy,mobile_sm_title:Ly,mobile_sm_content:xy,tablet_md_title:Iy,tablet_md_content:Sy,tablet_lg_title:Fy,tablet_lg_content:Ay,desktop_xl_title:By,desktop_xl_content:Oy,large_desktop_2xl_title:Ey,large_desktop_2xl_content:Gy,Breakpoints:Py,clear:ky,clear_canvas_title:Ry,clear_canvas_description:Ny,cancel:Ty,yes:jy,preview:Dy,settings:qy,styling:Zy,data_provider:Wy,remove_provider_confirmation:Ky,remove_provider_warning:Uy,remove:Jy,no_data_providers:Yy,learn_more:Xy,add_data_providers:Qy,select_provider:_y,choose:$y,page_data_providers:tL,view_data:cL,mark_as_global:eL,global_block_note:aL,global_block_indicator:rL,global_block_category:nL,enter_global_block_name:oL,eg_header_footer:lL,blocks_selected:iL,cut:sL,copy:dL,delete:"Delete",clear_selection:hL,dev_mode_message:uL,to_see_page_preview:vL,"flex.heading":"Flex Child","flex.basis":"Basis","flex.order":"Order","flex.flex":"Flex","flex.grow":"Grow","flex.shrink":"Shrink","grid.heading":"Grid Child","grid.col_span":"Col Span","grid.col_start":"Col Start","grid.col_end":"Col End","grid.row_span":"Row Span","grid.row_start":"Row Start","grid.row_end":"Row End","grid.order":"Order","layout.heading":"Layout","layout.width":"Width","layout.height":"Height","layout.margin":"Margin","layout.margin_all":"All","layout.margin_lr":"Left-Right","layout.margin_tb":"Top-Bottom","layout.margin_top":"Top","layout.margin_right":"Right","layout.margin_bottom":"Bottom","layout.margin_left":"Left","layout.padding":"Padding","layout.padding_all":"All","layout.padding_lr":"Left-Right","layout.padding_tb":"Top-Bottom","layout.padding_top":"Top","layout.padding_right":"Right","layout.padding_bottom":"Bottom","layout.padding_left":"Left","layout.space_bt":"Space Bt.","layout.space_lr":"Left-Right","layout.space_tb":"Top-Bottom","size.heading":"Size","size.min_width_height":"Min width & height","size.min_width":"Min Width","size.min_height":"Min Height","size.max_width_height":"Max width & height","size.max_width":"Max Width","size.max_height":"Max Height","size.object_options_aspect_ratio":"Object options & aspect ratio","size.aspect":"Aspect","size.fit":"Fit","size.position":"Position","display.heading":"Display","display.display":"Display","display.flex_options":"Flex options","display.flex_direction":"Direction","display.flex_wrap":"Wrap","display.justify_content":"Justify","display.align_content":"Content","display.align_items":"Items","display.gap":"Gap","display.gap_all":"All","display.gap_lr":"Left-Right","display.gap_tb":"Top-Bottom","display.grid_options":"Grid options","display.grid_columns":"Columns","display.grid_rows":"Rows","display.grid_auto_flow":"Auto Flow","display.grid_auto_cols":"Auto Cols","display.grid_auto_rows":"Auto Rows","display.visibility_opacity":"Visibility & Opacity","display.visibility":"Visibility","display.opacity":"Opacity","position.heading":"Position","position.position":"Position","position.options":"Position options","position.direction":"Direction","position.top":"Top","position.right":"Right","position.bottom":"Bottom","position.left":"Left","position.inset":"Inset","position.all":"All","position.lr":"Left Right","position.tb":"Top Bottom","position.z_index":"Z-Index","position.float_clear":"Float & Clear","position.float":"Float","position.clear":"Clear","position.overflow_overscroll":"Overflow & Overscroll","position.overflow":"Overflow","position.overscroll":"Overscroll","typography.heading":"Typography","typography.font":"Font","typography.size":"Size","typography.height":"Height","typography.weight":"Weight","typography.color":"Color","typography.alignments":"Alignments","typography.align":"Align","typography.valign":"V. Align","typography.spacing_decoration_more":"Spacing, decoration & more","typography.spacing":"Spacing","typography.decoration":"Decoration","typography.thickness":"Thickness","typography.transform":"Transform","typography.whitespace_breaks":"White space & breaks","typography.whitespace":"Whitespace","typography.wordbreak":"Wordbreak","background.heading":"Background","background.bgcolor":"Bg. Color","background.position_size_more":"Position, Size & more","background.attachment":"Attachment","background.clipping":"Clipping","background.origin":"Origin","background.position":"Position","background.repeat":"Repeat","background.size":"Size","background.gradient":"Gradient","background.gradient_colors":"Gradient colors","background.from_color":"From","background.via_color":"Via","background.to_color":"To","border.heading":"Border & Outline","border.width":"Width","border.all":"All","border.lr":"Left Right","border.tb":"Top bottom","border.top":"Top","border.right":"Right","border.bottom":"Bottom","border.left":"Left","border.corners":"Corners","border.top_left":"Top Left","border.top_right":"Top right","border.bottom_right":"Bottom right","border.bottom_left":"Bottom left","border.color":"Color","border.style":"Style","border.divide_options":"Divide options","border.divide_color":"Color","border.divide_style":"Style","border.outline_styling":"Outline styling","border.outline_width":"Width","border.outline_offset":"Offset","border.outline_style":"Style","border.ring_options":"Ring options","border.ring_width":"Width","border.ring_color":"Color","border.ring_offset_width":"Offset","border.ring_offset_color":"Off. color","effect.heading":"Effect & Animation","effect.shadow":"Shadow","effect.color":"Color","effect.cursor":"Cursor","effect.blend_cursor":"Blend & Cursor","effect.mix_blend":"Mix Blend","effect.bg_blend":"Bg. Blend","effect.transform":"Transform","effect.origin":"Origin","effect.scale":"Scale","effect.all":"All","effect.lr":"Left-Right","effect.tb":"Top-Bottom","effect.skew":"Skew","effect.translate":"Translate","effect.rotate":"Rotate","effect.animation":"Animation","effect.transition":"Transition","effect.easing":"Easing","effect.duration":"Duration","effect.delay":"Delay","classes.heading":"Classes"},fL="Adicionar bloco",pL="(Digite ou cole um trecho HTML do TailwindCSS)",mL="(Clique para adicionar bloco à página)",zL="Principal",ML="Personalizados",bL="Biblioteca de UI",CL="Use trechos HTML de bibliotecas de componentes Tailwind CSS, etc. ou simplesmente copie e cole seu próprio código HTML.",wL="Trecho HTML do Tailwind:",VL="Digite seu trecho de código aqui...",HL="Importar HTML",yL="NOTA: O HTML importado será adicionado ao bloco atualmente selecionado. Se nenhum bloco for selecionado, o HTML será adicionado à página.",LL="Modo escuro",xL="Esta página não tem blocos. Adicione um bloco clicando no botão +",IL="Esta página está vazia",SL="Selecione um bloco para editar as configurações ou estilos",FL="Selecione um bloco de estilo",AL="Solte seu bloco aqui",BL="Usar configuração",OL="Celular (XS)",EL="Os estilos definidos aqui são aplicados a todas as telas, a menos que editados em um ponto de interrupção mais alto",GL="Celular paisagem (SM)",PL="Os estilos definidos aqui são aplicados a 640px e acima, a menos que editados em um ponto de interrupção mais alto",kL="Tablet (MD)",RL="Os estilos definidos aqui são aplicados a 768px e acima",NL="Paisagem do tablet (LG)",TL="Os estilos definidos aqui são aplicados a 1024px e acima, a menos que editados em um ponto de interrupção mais alto",jL="Desktop (XL)",DL="Os estilos definidos aqui são aplicados a 1280px e acima, a menos que editados em um ponto de interrupção mais alto",qL="Desktop Grande (2XL)",ZL="Os estilos definidos aqui são aplicados a 1536px e acima",WL="Pontos de interrupção",KL="Limpar",UL="Limpar toda a tela?",JL="Tem certeza de que deseja limpar toda a tela?",YL="Cancelar",XL="Sim",QL="Visualizar",_L="Configurações",$L="Estilo",tx="Provedor de Dados",cx="Tem certeza de que deseja remover o provedor <span class='text-blue-500'>{name}</span>?",ex="Seu provedor de dados será removido desta página e todas as vinculações de dados adicionadas não serão visíveis nos blocos.",ax="Remover",rx="Você não tem provedores de dados registrados. Adicione um provedor de dados ao seu projeto.",nx="Saiba mais",ox="Adicionar provedores de dados:",lx="Selecione um provedor",ix="Escolher",sx="Provedores de dados da página:",dx="Ver Dados",hx="Marcar como Global",ux="Nota: Blocos globais são instâncias únicas. Editar blocos globais será refletido em todas as páginas que usam esses blocos.",vx="Blocos globais são indicados com",gx="Blocos globais estão disponíveis na categoria 'Global'",fx="Digite o nome do bloco global",px="Ex: Cabeçalho, Rodapé",mx="{{length}} blocos selecionados.",zx="Recortar",Mx="Copiar",bx="Limpar Seleção",Cx="Este é o modo de desenvolvimento. Visite",wx="para ver a pré-visualização da página",Vx={add_block:fL,enter_paste_tailwind_html:pL,click_to_add_block:mL,core:zL,custom_blocks:ML,ui_library:bL,import:"Importar",html_snippet_description:CL,tailwind_html_snippet:wL,enter_code_snippet:VL,import_html:HL,note_imported_html:yL,dark_mode:LL,tree_view_no_blocks:xL,canvas_empty:IL,no_block_selected_for_styling:SL,no_styling_block_selected:FL,drop_here_message:AL,use_setting:BL,mobile_xs_title:OL,mobile_xs_content:EL,mobile_sm_title:GL,mobile_sm_content:PL,tablet_md_title:kL,tablet_md_content:RL,tablet_lg_title:NL,tablet_lg_content:TL,desktop_xl_title:jL,desktop_xl_content:DL,large_desktop_2xl_title:qL,large_desktop_2xl_content:ZL,Breakpoints:WL,clear:KL,clear_canvas_title:UL,clear_canvas_description:JL,cancel:YL,yes:XL,preview:QL,settings:_L,styling:$L,data_provider:tx,remove_provider_confirmation:cx,remove_provider_warning:ex,remove:ax,no_data_providers:rx,learn_more:nx,add_data_providers:ox,select_provider:lx,choose:ix,page_data_providers:sx,view_data:dx,mark_as_global:hx,global_block_note:ux,global_block_indicator:vx,global_block_category:gx,enter_global_block_name:fx,eg_header_footer:px,blocks_selected:mx,cut:zx,copy:Mx,delete:"Excluir",clear_selection:bx,dev_mode_message:Cx,to_see_page_preview:wx,"flex.heading":"Filho Flex","flex.basis":"Base","flex.order":"Ordem","flex.flex":"Flex","flex.grow":"Crescer","flex.shrink":"Encolher","grid.heading":"Filho Grade","grid.col_span":"Abrangência da Coluna","grid.col_start":"Início da Coluna","grid.col_end":"Fim da Coluna","grid.row_span":"Abrangência da Linha","grid.row_start":"Início da Linha","grid.row_end":"Fim da Linha","grid.order":"Ordem","layout.heading":"Layout","layout.width":"Largura","layout.height":"Altura","layout.margin":"Margem","layout.margin_all":"Todas","layout.margin_lr":"Esquerda-Direita","layout.margin_tb":"Topo-Baixo","layout.margin_top":"Topo","layout.margin_right":"Direita","layout.margin_bottom":"Baixo","layout.margin_left":"Esquerda","layout.padding":"Preenchimento","layout.padding_all":"Todos","layout.padding_lr":"Esquerda-Direita","layout.padding_tb":"Topo-Baixo","layout.padding_top":"Topo","layout.padding_right":"Direita","layout.padding_bottom":"Baixo","layout.padding_left":"Esquerda","layout.space_bt":"Espaçamento","layout.space_lr":"Esquerda-Direita","layout.space_tb":"Topo-Baixo","size.heading":"Tamanho","size.min_width_height":"Largura & Altura Mínimas","size.min_width":"Largura Mínima","size.min_height":"Altura Mínima","size.max_width_height":"Largura & Altura Máximas","size.max_width":"Largura Máxima","size.max_height":"Altura Máxima","size.object_options_aspect_ratio":"Opções de Objeto & Proporção","size.aspect":"Proporção","size.fit":"Ajuste","size.position":"Posição","display.heading":"Exibição","display.display":"Exibir","display.flex_options":"Opções de Flex","display.flex_direction":"Direção","display.flex_wrap":"Quebra","display.justify_content":"Justificar","display.align_content":"Conteúdo","display.align_items":"Itens","display.gap":"Espaçamento","display.gap_all":"Todos","display.gap_lr":"Esquerda-Direita","display.gap_tb":"Topo-Baixo","display.grid_options":"Opções de Grade","display.grid_columns":"Colunas","display.grid_rows":"Linhas","display.grid_auto_flow":"Fluxo Automático","display.grid_auto_cols":"Colunas Automáticas","display.grid_auto_rows":"Linhas Automáticas","display.visibility_opacity":"Visibilidade & Opacidade","display.visibility":"Visibilidade","display.opacity":"Opacidade","position.heading":"Posição","position.position":"Posição","position.options":"Opções de Posição","position.direction":"Direção","position.top":"Topo","position.right":"Direita","position.bottom":"Baixo","position.left":"Esquerda","position.inset":"Inserção","position.all":"Todos","position.lr":"Esquerda Direita","position.tb":"Topo Baixo","position.z_index":"Z-Index","position.float_clear":"Flutuar & Limpar","position.float":"Flutuar","position.clear":"Limpar","position.overflow_overscroll":"Transbordo & Rolagem Excedente","position.overflow":"Transbordo","position.overscroll":"Rolagem Excedente","typography.heading":"Tipografia","typography.font":"Fonte","typography.size":"Tamanho","typography.height":"Altura","typography.weight":"Peso","typography.color":"Cor","typography.alignments":"Alinhamentos","typography.align":"Alinhar","typography.valign":"V. Alinhar","typography.spacing_decoration_more":"Espaçamento, Decoração & Mais","typography.spacing":"Espaçamento","typography.decoration":"Decoração","typography.thickness":"Espessura","typography.transform":"Transformação","typography.whitespace_breaks":"Espaçamento & Quebras","typography.whitespace":"Espaçamento","typography.wordbreak":"Quebra de Palavra","background.heading":"Fundo","background.bgcolor":"Cor do Fundo","background.position_size_more":"Posição, Tamanho & Mais","background.attachment":"Anexo","background.clipping":"Recorte","background.origin":"Origem","background.position":"Posição","background.repeat":"Repetir","background.size":"Tamanho","background.gradient":"Gradiente","background.gradient_colors":"Cores do Gradiente","background.from_color":"De","background.via_color":"Via","background.to_color":"Para","border.heading":"Borda & Contorno","border.width":"Largura","border.all":"Todos","border.lr":"Esquerda Direita","border.tb":"Topo Baixo","border.top":"Topo","border.right":"Direita","border.bottom":"Baixo","border.left":"Esquerda","border.corners":"Cantoneiras","border.top_left":"Topo Esquerda","border.top_right":"Topo Direita","border.bottom_right":"Baixo Direita","border.bottom_left":"Baixo Esquerda","border.color":"Cor","border.style":"Estilo","border.divide_options":"Opções de Divisão","border.divide_color":"Cor","border.divide_style":"Estilo","border.outline_styling":"Estilização de Contorno","border.outline_width":"Largura","border.outline_offset":"Offset","border.outline_style":"Estilo","border.ring_options":"Opções de Anel","border.ring_width":"Largura","border.ring_color":"Cor","border.ring_offset_width":"Offset","border.ring_offset_color":"Cor do Offset","effect.heading":"Efeito & Animação","effect.shadow":"Sombra","effect.color":"Cor","effect.cursor":"Cursor","effect.blend_cursor":"Mistura & Cursor","effect.mix_blend":"Mistura","effect.bg_blend":"Mistura de Fundo","effect.transform":"Transformação","effect.origin":"Origem","effect.scale":"Escala","effect.all":"Todos","effect.lr":"Esquerda-Direita","effect.tb":"Topo-Baixo","effect.skew":"Inclinação","effect.translate":"Translação","effect.rotate":"Rotação","effect.animation":"Animação","effect.transition":"Transição","effect.easing":"Facilitando","effect.duration":"Duração","effect.delay":"Atraso","classes.heading":"Classes"},Hx="Agregar bloque",yx="(Ingrese o pegue un fragmento HTML de TailwindCSS)",Lx="(Haga clic para agregar un bloque a la página)",xx="Núcleo",Ix="Bloques Personalizados",Sx="Biblioteca de UI",Fx="Use fragmentos de HTML de bibliotecas de componentes de Tailwind CSS, etc. o simplemente copie y pegue su propio código HTML.",Ax="Fragmento HTML de Tailwind:",Bx="Ingrese su fragmento de código aquí...",Ox="Importar HTML",Ex="NOTA: El HTML importado se añadirá al bloque seleccionado actualmente. Si no se selecciona ningún bloque, el HTML se añadirá a la página.",Gx="Modo oscuro",Px="Esta página no tiene bloques. Agregue un bloque haciendo clic en el botón +",kx="Esta página está vacía",Rx="Seleccione un bloque para editar configuraciones o estilos",Nx="Seleccione un bloque de estilo",Tx="Suelta tu bloque aquí",jx="Usar configuración",Dx="Móvil (XS)",qx="Los estilos establecidos aquí se aplican a todas las pantallas a menos que se editen en un punto de interrupción superior",Zx="Paisaje móvil (SM)",Wx="Los estilos establecidos aquí se aplican a 640px y superiores, a menos que se editen en un punto de interrupción superior",Kx="Tableta (MD)",Ux="Los estilos establecidos aquí se aplican a 768px y superiores",Jx="Paisaje de la tableta (LG)",Yx="Los estilos establecidos aquí se aplican a 1024px y superiores, a menos que se editen en un punto de interrupción superior",Xx="Escritorio (XL)",Qx="Los estilos establecidos aquí se aplican a 1280px y superiores, a menos que se editen en un punto de interrupción superior",_x="Escritorio Grande (2XL)",$x="Los estilos establecidos aquí se aplican a 1536px y superiores",tI="Puntos de interrupción",cI="Limpiar",eI="¿Limpiar todo el lienzo?",aI="¿Estás seguro de que quieres limpiar todo el lienzo?",rI="Cancelar",nI="Sí",oI="Vista previa",lI="Configuraciones",iI="Estilo",sI="Proveedor de Datos",dI="¿Está seguro de que desea eliminar el proveedor <span class='text-blue-500'>{name}</span>?",hI="Su proveedor de datos se eliminará de esta página y todas las vinculaciones de datos añadidas no serán visibles en los bloques.",uI="Eliminar",vI="No tiene proveedores de datos registrados. Agregue un proveedor de datos a su proyecto.",gI="Aprender más",fI="Agregar proveedores de datos:",pI="Seleccione un proveedor",mI="Elija",zI="Proveedores de datos de la página:",MI="Ver Datos",bI="Marcar como Global",CI="Nota: Los bloques globales son instancias únicas. Editar bloques globales se reflejará en todas las páginas que usen estos bloques.",wI="Los bloques globales se indican con",VI="Los bloques globales están disponibles en la categoría 'Global'",HI="Ingrese el nombre del bloque global",yI="Ej: Encabezado, Pie de página",LI="{{length}} bloques seleccionados.",xI="Cortar",II="Copiar",SI="Limpiar Selección",FI="Este es el modo de desarrollo. Visite",AI="para ver la vista previa de la página",BI={add_block:Hx,enter_paste_tailwind_html:yx,click_to_add_block:Lx,core:xx,custom_blocks:Ix,ui_library:Sx,import:"Importar",html_snippet_description:Fx,tailwind_html_snippet:Ax,enter_code_snippet:Bx,import_html:Ox,note_imported_html:Ex,dark_mode:Gx,tree_view_no_blocks:Px,canvas_empty:kx,no_block_selected_for_styling:Rx,no_styling_block_selected:Nx,drop_here_message:Tx,use_setting:jx,mobile_xs_title:Dx,mobile_xs_content:qx,mobile_sm_title:Zx,mobile_sm_content:Wx,tablet_md_title:Kx,tablet_md_content:Ux,tablet_lg_title:Jx,tablet_lg_content:Yx,desktop_xl_title:Xx,desktop_xl_content:Qx,large_desktop_2xl_title:_x,large_desktop_2xl_content:$x,Breakpoints:tI,clear:cI,clear_canvas_title:eI,clear_canvas_description:aI,cancel:rI,yes:nI,preview:oI,settings:lI,styling:iI,data_provider:sI,remove_provider_confirmation:dI,remove_provider_warning:hI,remove:uI,no_data_providers:vI,learn_more:gI,add_data_providers:fI,select_provider:pI,choose:mI,page_data_providers:zI,view_data:MI,mark_as_global:bI,global_block_note:CI,global_block_indicator:wI,global_block_category:VI,enter_global_block_name:HI,eg_header_footer:yI,blocks_selected:LI,cut:xI,copy:II,delete:"Eliminar",clear_selection:SI,dev_mode_message:FI,to_see_page_preview:AI,"flex.heading":"Hijo Flex","flex.basis":"Base","flex.order":"Orden","flex.flex":"Flex","flex.grow":"Crecer","flex.shrink":"Encoger","grid.heading":"Hijo Grid","grid.col_span":"Extensión de Columna","grid.col_start":"Inicio de Columna","grid.col_end":"Fin de Columna","grid.row_span":"Extensión de Fila","grid.row_start":"Inicio de Fila","grid.row_end":"Fin de Fila","grid.order":"Orden","layout.heading":"Diseño","layout.width":"Ancho","layout.height":"Altura","layout.margin":"Margen","layout.margin_all":"Todas","layout.margin_lr":"Izquierda-Derecha","layout.margin_tb":"Arriba-Abajo","layout.margin_top":"Arriba","layout.margin_right":"Derecha","layout.margin_bottom":"Abajo","layout.margin_left":"Izquierda","layout.padding":"Relleno","layout.padding_all":"Todos","layout.padding_lr":"Izquierda-Derecha","layout.padding_tb":"Arriba-Abajo","layout.padding_top":"Arriba","layout.padding_right":"Derecha","layout.padding_bottom":"Abajo","layout.padding_left":"Izquierda","layout.space_bt":"Espaciado","layout.space_lr":"Izquierda-Derecha","layout.space_tb":"Arriba-Abajo","size.heading":"Tamaño","size.min_width_height":"Ancho & Altura Mínimos","size.min_width":"Ancho Mínimo","size.min_height":"Altura Mínima","size.max_width_height":"Ancho & Altura Máximos","size.max_width":"Ancho Máximo","size.max_height":"Altura Máxima","size.object_options_aspect_ratio":"Opciones de Objeto & Relación de Aspecto","size.aspect":"Aspecto","size.fit":"Ajustar","size.position":"Posición","display.heading":"Mostrar","display.display":"Mostrar","display.flex_options":"Opciones de Flex","display.flex_direction":"Dirección","display.flex_wrap":"Ajustar","display.justify_content":"Justificar","display.align_content":"Contenido","display.align_items":"Elementos","display.gap":"Espaciado","display.gap_all":"Todos","display.gap_lr":"Izquierda-Derecha","display.gap_tb":"Arriba-Abajo","display.grid_options":"Opciones de Grid","display.grid_columns":"Columnas","display.grid_rows":"Filas","display.grid_auto_flow":"Flujo Automático","display.grid_auto_cols":"Columnas Automáticas","display.grid_auto_rows":"Filas Automáticas","display.visibility_opacity":"Visibilidad & Opacidad","display.visibility":"Visibilidad","display.opacity":"Opacidad","position.heading":"Posición","position.position":"Posición","position.options":"Opciones de Posición","position.direction":"Dirección","position.top":"Arriba","position.right":"Derecha","position.bottom":"Abajo","position.left":"Izquierda","position.inset":"Inserción","position.all":"Todos","position.lr":"Izquierda Derecha","position.tb":"Arriba Abajo","position.z_index":"Índice Z","position.float_clear":"Flotar & Limpiar","position.float":"Flotar","position.clear":"Limpiar","position.overflow_overscroll":"Desbordamiento & Exceso de Desplazamiento","position.overflow":"Desbordamiento","position.overscroll":"Exceso de Desplazamiento","typography.heading":"Tipografía","typography.font":"Fuente","typography.size":"Tamaño","typography.height":"Altura","typography.weight":"Peso","typography.color":"Color","typography.alignments":"Alineamientos","typography.align":"Alinear","typography.valign":"V. Alinear","typography.spacing_decoration_more":"Espaciado, Decoración & Más","typography.spacing":"Espaciado","typography.decoration":"Decoración","typography.thickness":"Grosor","typography.transform":"Transformación","typography.whitespace_breaks":"Espaciado & Saltos","typography.whitespace":"Espaciado","typography.wordbreak":"Corte de Palabra","background.heading":"Fondo","background.bgcolor":"Color del Fondo","background.position_size_more":"Posición, Tamaño & Más","background.attachment":"Adjunto","background.clipping":"Recorte","background.origin":"Origen","background.position":"Posición","background.repeat":"Repetir","background.size":"Tamaño","background.gradient":"Gradiente","background.gradient_colors":"Colores del Gradiente","background.from_color":"De","background.via_color":"A través de","background.to_color":"Hacia","border.heading":"Borde & Contorno","border.width":"Ancho","border.all":"Todos","border.lr":"Izquierda Derecha","border.tb":"Arriba Abajo","border.top":"Arriba","border.right":"Derecha","border.bottom":"Abajo","border.left":"Izquierda","border.corners":"Esquinas","border.top_left":"Arriba Izquierda","border.top_right":"Arriba Derecha","border.bottom_right":"Abajo Derecha","border.bottom_left":"Abajo Izquierda","border.color":"Color","border.style":"Estilo","border.divide_options":"Opciones de División","border.divide_color":"Color","border.divide_style":"Estilo","border.outline_styling":"Estilo de Contorno","border.outline_width":"Ancho","border.outline_offset":"Offset","border.outline_style":"Estilo","border.ring_options":"Opciones de Anillo","border.ring_width":"Ancho","border.ring_color":"Color","border.ring_offset_width":"Offset","border.ring_offset_color":"Color del Offset","effect.heading":"Efecto & Animación","effect.shadow":"Sombra","effect.color":"Color","effect.cursor":"Cursor","effect.blend_cursor":"Mezcla & Cursor","effect.mix_blend":"Mezcla","effect.bg_blend":"Mezcla de Fondo","effect.transform":"Transformación","effect.origin":"Origen","effect.scale":"Escala","effect.all":"Todos","effect.lr":"Izquierda-Derecha","effect.tb":"Arriba-Abajo","effect.skew":"Sesgar","effect.translate":"Trasladar","effect.rotate":"Rotar","effect.animation":"Animación","effect.transition":"Transición","effect.easing":"Facilitación","effect.duration":"Duración","effect.delay":"Retraso","classes.heading":"Clases"};av.use(k9.initReactI18next).init({resources:{en:{translation:gL},"pt-BR":{translation:Vx},es:{translation:BI}},lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});var OI=Object.create,iv=Object.defineProperty,EI=Object.getOwnPropertyDescriptor,se=Object.getOwnPropertyNames,GI=Object.getPrototypeOf,PI=Object.prototype.hasOwnProperty,kI=(t,c)=>function(){return t&&(c=(0,t[se(t)[0]])(t=0)),c},u1=(t,c)=>function(){return c||(0,t[se(t)[0]])((c={exports:{}}).exports,c),c.exports},RI=(t,c,e,a)=>{if(c&&typeof c=="object"||typeof c=="function")for(let r of se(c))!PI.call(t,r)&&r!==e&&iv(t,r,{get:()=>c[r],enumerable:!(a=EI(c,r))||a.enumerable});return t},d3=(t,c,e)=>(e=t!=null?OI(GI(t)):{},RI(c||!t||!t.__esModule?iv(e,"default",{value:t,enumerable:!0}):e,t)),R=kI({"react-shim.js"(){"use strict"}});R();R();var NI=(t,c)=>t.size===c.size&&Array.from(t).every(([e,a])=>Object.is(c.get(e),a)),TI=(t,c)=>t.size===c.size&&Array.from(t).every(([e,a])=>{const r=c.get(e);return r&&a.size===r.size&&Array.from(a).every(n=>r.has(n))});function jI({shouldShowPrivateAtoms:t=!1,...c}={}){const e=Y.useStore(c),[a,r]=u.useState(()=>({values:new Map,dependents:new Map})),n=u.useRef(!0);return n.current=!0,u.useLayoutEffect(()=>{n.current=!1}),u.useEffect(()=>{const o=(e==null?void 0:e.dev_subscribe_store)||(e==null?void 0:e.dev_subscribe_state);if(!o)return;let l=new Map,i=new Map;"dev_subscribe_store"in e||console.warn("[DEPRECATION-WARNING]: Your Jotai version is out-of-date and contains deprecated properties that will be removed soon. Please update to the latest version of Jotai.");const h=d=>{var f,m,z;typeof d!="object"&&console.warn("[DEPRECATION-WARNING]: Your Jotai version is out-of-date and contains deprecated properties that will be removed soon. Please update to the latest version of Jotai.");const v=new Map,g=new Map;for(const M of((f=e.dev_get_mounted_atoms)==null?void 0:f.call(e))||[]){if(!t&&M.debugPrivate)continue;const C=(m=e.dev_get_atom_state)==null?void 0:m.call(e,M);C&&"v"in C&&v.set(M,C.v);const V=(z=e.dev_get_mounted)==null?void 0:z.call(e,M);if(V){let w=V.t;t||(w=new Set(Array.from(w.values()).filter(H=>!H.debugPrivate))),g.set(M,w)}}if(NI(l,v)&&TI(i,g))return;l=v,i=g;const p=()=>r({values:v,dependents:g});n.current?Promise.resolve().then(p):p()},s=o==null?void 0:o(h,2);return h({}),s},[e,t]),a}R();function sv(t){const c=Y.useStore(t);return u.useCallback(e=>{c.dev_restore_atoms&&c.dev_restore_atoms(e.values)},[c])}R();R();R();R();R();function DI(t){if(t.sheet)return t.sheet;for(var c=0;c<document.styleSheets.length;c++)if(document.styleSheets[c].ownerNode===t)return document.styleSheets[c]}function qI(t){var c=document.createElement("style");return c.setAttribute("data-emotion",t.key),t.nonce!==void 0&&c.setAttribute("nonce",t.nonce),c.appendChild(document.createTextNode("")),c.setAttribute("data-s",""),c}var ZI=function(){function t(e){var a=this;this._insertTag=function(r){var n;a.tags.length===0?a.insertionPoint?n=a.insertionPoint.nextSibling:a.prepend?n=a.container.firstChild:n=a.before:n=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(r,n),a.tags.push(r)},this.isSpeedy=e.speedy===void 0?process.env.NODE_ENV==="production":e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var c=t.prototype;return c.hydrate=function(a){a.forEach(this._insertTag)},c.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(qI(this));var r=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var n=a.charCodeAt(0)===64&&a.charCodeAt(1)===105;n&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
|
|
2
2
|
`+a+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!n}if(this.isSpeedy){var o=DI(r);try{o.insertRule(a,o.cssRules.length)}catch(l){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(a)&&console.error('There was a problem inserting the following rule: "'+a+'"',l)}}else r.appendChild(document.createTextNode(a));this.ctr++},c.flush=function(){this.tags.forEach(function(a){return a.parentNode&&a.parentNode.removeChild(a)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},t}(),y2="-ms-",r8="-moz-",G1="-webkit-",de="comm",he="rule",ue="decl";var WI="@import";var dv="@keyframes";var KI="@layer",UI=Math.abs,R9=String.fromCharCode,JI=Object.assign;function YI(t,c){return z2(t,0)^45?(((c<<2^z2(t,0))<<2^z2(t,1))<<2^z2(t,2))<<2^z2(t,3):0}function hv(t){return t.trim()}function XI(t,c){return(t=c.exec(t))?t[0]:t}function P1(t,c,e){return t.replace(c,e)}function Ic(t,c){return t.indexOf(c)}function z2(t,c){return t.charCodeAt(c)|0}function F6(t,c,e){return t.slice(c,e)}function d4(t){return t.length}function ve(t){return t.length}function a0(t,c){return c.push(t),t}function QI(t,c){return t.map(c).join("")}var N9=1,T3=1,uv=0,P2=0,r2=0,U3="";function T9(t,c,e,a,r,n,o){return{value:t,root:c,parent:e,type:a,props:r,children:n,line:N9,column:T3,length:o,return:""}}function e6(t,c){return JI(T9("",null,null,"",null,null,0),t,{length:-t.length},c)}function _I(){return r2}function $I(){return r2=P2>0?z2(U3,--P2):0,T3--,r2===10&&(T3=1,N9--),r2}function W2(){return r2=P2<uv?z2(U3,P2++):0,T3++,r2===10&&(T3=1,N9++),r2}function p4(){return z2(U3,P2)}function D0(){return P2}function j6(t,c){return F6(U3,t,c)}function A6(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vv(t){return N9=T3=1,uv=d4(U3=t),P2=0,[]}function gv(t){return U3="",t}function q0(t){return hv(j6(P2-1,Sc(t===91?t+2:t===40?t+1:t)))}function tS(t){for(;(r2=p4())&&r2<33;)W2();return A6(t)>2||A6(r2)>3?"":" "}function cS(t,c){for(;--c&&W2()&&!(r2<48||r2>102||r2>57&&r2<65||r2>70&&r2<97););return j6(t,D0()+(c<6&&p4()==32&&W2()==32))}function Sc(t){for(;W2();)switch(r2){case t:return P2;case 34:case 39:t!==34&&t!==39&&Sc(r2);break;case 40:t===41&&Sc(t);break;case 92:W2();break}return P2}function eS(t,c){for(;W2()&&t+r2!==57;)if(t+r2===84&&p4()===47)break;return"/*"+j6(c,P2-1)+"*"+R9(t===47?t:W2())}function aS(t){for(;!A6(p4());)W2();return j6(t,P2)}function rS(t){return gv(Z0("",null,null,null,[""],t=vv(t),0,[0],t))}function Z0(t,c,e,a,r,n,o,l,i){for(var h=0,s=0,d=o,v=0,g=0,p=0,f=1,m=1,z=1,M=0,C="",V=r,w=n,H=a,y=C;m;)switch(p=M,M=W2()){case 40:if(p!=108&&z2(y,d-1)==58){Ic(y+=P1(q0(M),"&","&\f"),"&\f")!=-1&&(z=-1);break}case 34:case 39:case 91:y+=q0(M);break;case 9:case 10:case 13:case 32:y+=tS(p);break;case 92:y+=cS(D0()-1,7);continue;case 47:switch(p4()){case 42:case 47:a0(nS(eS(W2(),D0()),c,e),i);break;default:y+="/"}break;case 123*f:l[h++]=d4(y)*z;case 125*f:case 59:case 0:switch(M){case 0:case 125:m=0;case 59+s:z==-1&&(y=P1(y,/\f/g,"")),g>0&&d4(y)-d&&a0(g>32?Ra(y+";",a,e,d-1):Ra(P1(y," ","")+";",a,e,d-2),i);break;case 59:y+=";";default:if(a0(H=ka(y,c,e,h,s,r,l,C,V=[],w=[],d),n),M===123)if(s===0)Z0(y,c,H,H,V,n,d,l,w);else switch(v===99&&z2(y,3)===110?100:v){case 100:case 108:case 109:case 115:Z0(t,H,H,a&&a0(ka(t,H,H,0,0,r,l,C,r,V=[],d),w),r,w,d,l,a?V:w);break;default:Z0(y,H,H,H,[""],w,0,l,w)}}h=s=g=0,f=z=1,C=y="",d=o;break;case 58:d=1+d4(y),g=p;default:if(f<1){if(M==123)--f;else if(M==125&&f++==0&&$I()==125)continue}switch(y+=R9(M),M*f){case 38:z=s>0?1:(y+="\f",-1);break;case 44:l[h++]=(d4(y)-1)*z,z=1;break;case 64:p4()===45&&(y+=q0(W2())),v=p4(),s=d=d4(C=y+=aS(D0())),M++;break;case 45:p===45&&d4(y)==2&&(f=0)}}return n}function ka(t,c,e,a,r,n,o,l,i,h,s){for(var d=r-1,v=r===0?n:[""],g=ve(v),p=0,f=0,m=0;p<a;++p)for(var z=0,M=F6(t,d+1,d=UI(f=o[p])),C=t;z<g;++z)(C=hv(f>0?v[z]+" "+M:P1(M,/&\f/g,v[z])))&&(i[m++]=C);return T9(t,c,e,r===0?he:l,i,h,s)}function nS(t,c,e){return T9(t,c,e,de,R9(_I()),F6(t,2,-2),0)}function Ra(t,c,e,a){return T9(t,c,e,ue,F6(t,0,a),F6(t,a+1,-1),a)}function k3(t,c){for(var e="",a=ve(t),r=0;r<a;r++)e+=c(t[r],r,t,c)||"";return e}function oS(t,c,e,a){switch(t.type){case KI:if(t.children.length)break;case WI:case ue:return t.return=t.return||t.value;case de:return"";case dv:return t.return=t.value+"{"+k3(t.children,a)+"}";case he:t.value=t.props.join(",")}return d4(e=k3(t.children,a))?t.return=t.value+"{"+e+"}":""}function lS(t){var c=ve(t);return function(e,a,r,n){for(var o="",l=0;l<c;l++)o+=t[l](e,a,r,n)||"";return o}}function iS(t){return function(c){c.root||(c=c.return)&&t(c)}}var Na=function(c){var e=new WeakMap;return function(a){if(e.has(a))return e.get(a);var r=c(a);return e.set(a,r),r}};function sS(t){var c=Object.create(null);return function(e){return c[e]===void 0&&(c[e]=t(e)),c[e]}}var dS=function(c,e,a){for(var r=0,n=0;r=n,n=p4(),r===38&&n===12&&(e[a]=1),!A6(n);)W2();return j6(c,P2)},hS=function(c,e){var a=-1,r=44;do switch(A6(r)){case 0:r===38&&p4()===12&&(e[a]=1),c[a]+=dS(P2-1,e,a);break;case 2:c[a]+=q0(r);break;case 4:if(r===44){c[++a]=p4()===58?"&\f":"",e[a]=c[a].length;break}default:c[a]+=R9(r)}while(r=W2());return c},uS=function(c,e){return gv(hS(vv(c),e))},Ta=new WeakMap,vS=function(c){if(!(c.type!=="rule"||!c.parent||c.length<1)){for(var e=c.value,a=c.parent,r=c.column===a.column&&c.line===a.line;a.type!=="rule";)if(a=a.parent,!a)return;if(!(c.props.length===1&&e.charCodeAt(0)!==58&&!Ta.get(a))&&!r){Ta.set(c,!0);for(var n=[],o=uS(e,n),l=a.props,i=0,h=0;i<o.length;i++)for(var s=0;s<l.length;s++,h++)c.props[h]=n[i]?o[i].replace(/&\f/g,l[s]):l[s]+" "+o[i]}}},gS=function(c){if(c.type==="decl"){var e=c.value;e.charCodeAt(0)===108&&e.charCodeAt(2)===98&&(c.return="",c.value="")}},fS="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",pS=function(c){return c.type==="comm"&&c.children.indexOf(fS)>-1},mS=function(c){return function(e,a,r){if(!(e.type!=="rule"||c.compat)){var n=e.value.match(/(:first|:nth|:nth-last)-child/g);if(n){for(var o=!!e.parent,l=o?e.parent.children:r,i=l.length-1;i>=0;i--){var h=l[i];if(h.line<e.line)break;if(h.column<e.column){if(pS(h))return;break}}n.forEach(function(s){console.error('The pseudo class "'+s+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+s.split("-child")[0]+'-of-type".')})}}}},fv=function(c){return c.type.charCodeAt(1)===105&&c.type.charCodeAt(0)===64},zS=function(c,e){for(var a=c-1;a>=0;a--)if(!fv(e[a]))return!0;return!1},ja=function(c){c.type="",c.value="",c.return="",c.children="",c.props=""},MS=function(c,e,a){fv(c)&&(c.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),ja(c)):zS(e,a)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),ja(c)))};function pv(t,c){switch(YI(t,c)){case 5103:return G1+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return G1+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return G1+t+r8+t+y2+t+t;case 6828:case 4268:return G1+t+y2+t+t;case 6165:return G1+t+y2+"flex-"+t+t;case 5187:return G1+t+P1(t,/(\w+).+(:[^]+)/,G1+"box-$1$2"+y2+"flex-$1$2")+t;case 5443:return G1+t+y2+"flex-item-"+P1(t,/flex-|-self/,"")+t;case 4675:return G1+t+y2+"flex-line-pack"+P1(t,/align-content|flex-|-self/,"")+t;case 5548:return G1+t+y2+P1(t,"shrink","negative")+t;case 5292:return G1+t+y2+P1(t,"basis","preferred-size")+t;case 6060:return G1+"box-"+P1(t,"-grow","")+G1+t+y2+P1(t,"grow","positive")+t;case 4554:return G1+P1(t,/([^-])(transform)/g,"$1"+G1+"$2")+t;case 6187:return P1(P1(P1(t,/(zoom-|grab)/,G1+"$1"),/(image-set)/,G1+"$1"),t,"")+t;case 5495:case 3959:return P1(t,/(image-set\([^]*)/,G1+"$1$`$1");case 4968:return P1(P1(t,/(.+:)(flex-)?(.*)/,G1+"box-pack:$3"+y2+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+G1+t+t;case 4095:case 3583:case 4068:case 2532:return P1(t,/(.+)-inline(.+)/,G1+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(d4(t)-1-c>6)switch(z2(t,c+1)){case 109:if(z2(t,c+4)!==45)break;case 102:return P1(t,/(.+:)(.+)-([^]+)/,"$1"+G1+"$2-$3$1"+r8+(z2(t,c+3)==108?"$3":"$2-$3"))+t;case 115:return~Ic(t,"stretch")?pv(P1(t,"stretch","fill-available"),c)+t:t}break;case 4949:if(z2(t,c+1)!==115)break;case 6444:switch(z2(t,d4(t)-3-(~Ic(t,"!important")&&10))){case 107:return P1(t,":",":"+G1)+t;case 101:return P1(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+G1+(z2(t,14)===45?"inline-":"")+"box$3$1"+G1+"$2$3$1"+y2+"$2box$3")+t}break;case 5936:switch(z2(t,c+11)){case 114:return G1+t+y2+P1(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return G1+t+y2+P1(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return G1+t+y2+P1(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return G1+t+y2+t+t}return t}var bS=function(c,e,a,r){if(c.length>-1&&!c.return)switch(c.type){case ue:c.return=pv(c.value,c.length);break;case dv:return k3([e6(c,{value:P1(c.value,"@","@"+G1)})],r);case he:if(c.length)return QI(c.props,function(n){switch(XI(n,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return k3([e6(c,{props:[P1(n,/:(read-\w+)/,":"+r8+"$1")]})],r);case"::placeholder":return k3([e6(c,{props:[P1(n,/:(plac\w+)/,":"+G1+"input-$1")]}),e6(c,{props:[P1(n,/:(plac\w+)/,":"+r8+"$1")]}),e6(c,{props:[P1(n,/:(plac\w+)/,y2+"input-$1")]})],r)}return""})}},CS=[bS],j9=function(c){var e=c.key;if(process.env.NODE_ENV!=="production"&&!e)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
|
|
3
3
|
If multiple caches share the same key they might "fight" for each other's style elements.`);if(e==="css"){var a=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(a,function(f){var m=f.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(f),f.setAttribute("data-s",""))})}var r=c.stylisPlugins||CS;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(e))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+e+'" was passed');var n={},o,l=[];o=c.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),function(f){for(var m=f.getAttribute("data-emotion").split(" "),z=1;z<m.length;z++)n[m[z]]=!0;l.push(f)});var i,h=[vS,gS];process.env.NODE_ENV!=="production"&&h.push(mS({get compat(){return p.compat}}),MS);{var s,d=[oS,process.env.NODE_ENV!=="production"?function(f){f.root||(f.return?s.insert(f.return):f.value&&f.type!==de&&s.insert(f.value+"{}"))}:iS(function(f){s.insert(f)})],v=lS(h.concat(r,d)),g=function(m){return k3(rS(m),v)};i=function(m,z,M,C){s=M,process.env.NODE_ENV!=="production"&&z.map!==void 0&&(s={insert:function(w){M.insert(w+z.map)}}),g(m?m+"{"+z.styles+"}":z.styles),C&&(p.inserted[z.name]=!0)}}var p={key:e,sheet:new ZI({key:e,container:o,nonce:c.nonce,speedy:c.speedy,prepend:c.prepend,insertionPoint:c.insertionPoint}),nonce:c.nonce,inserted:n,registered:{},insert:i};return p.sheet.hydrate(l),p};function Fc(){return Fc=Object.assign?Object.assign.bind():function(t){for(var c=1;c<arguments.length;c++){var e=arguments[c];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},Fc.apply(this,arguments)}var n8={exports:{}},k1={};/** @license React v16.13.1
|
|
4
4
|
* react-is.production.min.js
|
|
@@ -203,4 +203,4 @@ object-assign/index.js:
|
|
|
203
203
|
(c) Sindre Sorhus
|
|
204
204
|
@license MIT
|
|
205
205
|
*)
|
|
206
|
-
*/R();var Yr1=process.env.NODE_ENV!=="production"?Jr1:()=>null;function Xr1(){return new URLSearchParams(window.location.search).has("dnd")}function Qr1(){return new URLSearchParams(window.location.search).has("outline")}const _r1={dnd:Xr1(),arborist:Qr1()};class XH extends u.Component{constructor(c){super(c),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?c1.jsxRuntimeExports.jsxs("div",{className:"h-full w-full rounded-md bg-red-200 p-4 text-red-500",id:"errorBoundary",children:[c1.jsxRuntimeExports.jsx("p",{className:"font-semibold",children:"Oops! Something went wrong."}),c1.jsxRuntimeExports.jsx("p",{children:"Please try again later."})]}):this.props.children}}const $r1=()=>{const[t,c]=Y.usePreviewMode(),{t:e}=k9.useTranslation(),a=Y.useBuilderProp("previewComponent",null);return t?c1.jsxRuntimeExports.jsxs("div",{className:ay.cn("fixed inset-0 z-[999] bg-background",t?"block":"hidden"),children:[c1.jsxRuntimeExports.jsxs(Y.Button,{size:"sm",className:"absolute right-0 top-0 m-4 space-x-2",onClick:()=>c(!1),children:[c1.jsxRuntimeExports.jsx(y6.EyeClosedIcon,{}),c1.jsxRuntimeExports.jsx("span",{children:e("Close Preview")})]}),c1.jsxRuntimeExports.jsx("div",{children:a?c1.jsxRuntimeExports.jsx(u.Suspense,{fallback:c1.jsxRuntimeExports.jsx(Y.Skeleton,{className:"h-96 w-full"}),children:u.createElement(a)}):null})]}):null},QH=t=>{const[c,e]=Y.useSelectedBlockIds(),a=Y.useRemoveBlocks(),r=Y.useDuplicateBlocks(),{undo:n,redo:o}=Y.useUndoManager();c6.useHotkeys("esc",()=>e([]),{document:t},[e]),c6.useHotkeys("ctrl+d,command+d",()=>r(c),{document:t,preventDefault:!0},[c,r]),c6.useHotkeys("ctrl+z,command+z",()=>n(),{document:t},[n]),c6.useHotkeys("ctrl+y,command+y",()=>o(),{document:t},[o]),c6.useHotkeys("del, backspace",l=>{l.preventDefault(),a(c)},{document:t},[c,a])},tn1=(t,c)=>{const e=[];let a=a2.find(t,{_id:c}),r=a2.get(a,"_parent","");for(;a2.isString(r)&&!a2.isEmpty(r);)e.push(a==null?void 0:a._parent),a=a2.find(t,{_id:r}),r=a==null?void 0:a._parent;return a2.flatten(e)},cn1=m4.atom([]),en1=()=>{const[t]=Y.useSelectedBlockIds(),c=m4.useAtomValue(Y.presentBlocksAtom),[,e]=m4.useAtom(cn1);u.useEffect(()=>{let a=[];const r=a2.first(t);a2.isString(r)&&(a=[r,...tn1(c,r)]),e(a)},[t,c,e])};const _H=()=>m4.useAtom(Y.chaiExternalDataAtom),an1=()=>u.useMemo(()=>ov.getChaiDataProviders(),[]),rn1=({children:t})=>{const[,c]=_H(),[e]=Y.usePageDataProviders(),a=an1();return u.useEffect(()=>(c({}),a2.each(e,r=>{const n=a2.find(a,{providerKey:r.providerKey});if(n){const o=(n==null?void 0:n.mockFn)||(n==null?void 0:n.dataFn);o&&o(r.args).then(l=>c(i=>({...i,[r.providerKey]:l})))}}),()=>{a2.each(e,r=>{c(n=>(delete n[r.providerKey],n))})}),[a,e,c]),c1.jsxRuntimeExports.jsx(c1.jsxRuntimeExports.Fragment,{children:t})};function nn1(t,c,e){e.push(a2.find(t,{_id:c}));const a=a2.filter(t,{_parent:c});for(const r of a)e.push(...$H(r._id,t));return e}const $H=(t,c)=>{let e=[];return e=a2.flattenDeep([...e,...nn1(c,t,e)]),e},on1=m4.atom(!1),Pa=()=>{const[t,c]=m4.useAtom(on1),[e,a]=u.useState(null),r=Y.useBuilderProp("askAiCallBack",null),n=Y.useStreamMultipleBlocksProps(),o=Y.useUpdateMultipleBlocksProps(),[l]=Y.useBlocksStore();return{askAi:u.useCallback(async(i,h,s,d)=>{if(r){c(!0),a(null);try{const v=i==="content"?a2.cloneDeep($H(h,l)):[a2.cloneDeep(l.find(f=>f._id===h))];a2.set(v,"0._parent",null);const{blocks:g,error:p}=await r(i,s,v);if(p){a(p);return}i==="styles"?o(g):n(g)}catch(v){a(v)}finally{c(!1),d&&d()}}},[r,c,l,o,n]),loading:t,error:e}};function ln1(t){return T6.GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"},child:[]}]})(t)}function in1(t){return T6.GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"},child:[]}]})(t)}function ty(t){return T6.GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"},child:[]}]})(t)}function sn1(t){return T6.GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"},child:[]}]})(t)}function dn1(t){return T6.GenIcon({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V299.6l-94.7 94.7c-8.2 8.2-14 18.5-16.8 29.7l-15 60.1c-2.3 9.4-1.8 19 1.4 27.8H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM549.8 235.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-29.4 29.4-71-71 29.4-29.4c15.6-15.6 40.9-15.6 56.6 0zM311.9 417L441.1 287.8l71 71L382.9 487.9c-4.1 4.1-9.2 7-14.9 8.4l-60.1 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.1c1.4-5.6 4.3-10.8 8.4-14.9z"},child:[]}]})(t)}const hn1=[{name:"Improve writing",icon:dn1,prompt:"Improving writing in all text elements. Replacing placeholder content with meaningful relevant content."},{name:"Replace placeholder content",icon:in1,prompt:"Discard current placeholder content and replace with meaningful relevant content."},{name:"Fix grammar",icon:y6.CheckIcon,prompt:"Fix grammar in all text elements. Ensuring the text is grammatically correct and free of errors."},{name:"Make longer",icon:y6.ArrowUpIcon,prompt:"Make all text elements longer."},{name:"Make shorter",icon:y6.ArrowDownIcon,prompt:"Make all text elements shorter."},{name:"Add emojis",icon:e3.SmileIcon,prompt:"Add emojis to text elements if relevant."},{name:"Randomize",icon:e3.ShuffleIcon,prompt:"Randomize all text elements."}];function un1({onClick:t}){const{loading:c}=Pa();return c1.jsxRuntimeExports.jsx("div",{className:c?"pointer-events-none opacity-50":"",children:c1.jsxRuntimeExports.jsx("ul",{className:"space-y-2",children:hn1.map(({name:e,icon:a,subMenus:r,prompt:n})=>r?c1.jsxRuntimeExports.jsxs(Y.DropdownMenu,{children:[c1.jsxRuntimeExports.jsx(Y.DropdownMenuTrigger,{asChild:!0,children:c1.jsxRuntimeExports.jsxs("li",{className:"flex cursor-pointer items-center space-x-2 hover:bg-gray-100",children:[c1.jsxRuntimeExports.jsx(a,{className:"h-4 w-4"}),c1.jsxRuntimeExports.jsx("span",{children:e})]},e)}),c1.jsxRuntimeExports.jsxs(Y.DropdownMenuContent,{children:[c1.jsxRuntimeExports.jsx(Y.DropdownMenuLabel,{children:"My Account"}),c1.jsxRuntimeExports.jsx(Y.DropdownMenuSeparator,{}),c1.jsxRuntimeExports.jsx(Y.DropdownMenuItem,{children:"Profile"}),c1.jsxRuntimeExports.jsx(Y.DropdownMenuItem,{children:"Billing"}),c1.jsxRuntimeExports.jsx(Y.DropdownMenuItem,{children:"Team"}),c1.jsxRuntimeExports.jsx(Y.DropdownMenuItem,{children:"Subscription"})]})]}):c1.jsxRuntimeExports.jsxs("li",{onClick:()=>t(n),className:"flex cursor-pointer items-center space-x-2 rounded p-1 pl-2 text-sm hover:bg-gray-100",children:[c1.jsxRuntimeExports.jsx(a,{className:"h-4 w-4"}),c1.jsxRuntimeExports.jsx("span",{children:e})]},e))})})}const vn1=({blockId:t})=>{const{t:c}=k9.useTranslation(),{askAi:e,loading:a,error:r}=Pa(),[n,o]=u.useState(""),l=u.useRef(null);u.useEffect(()=>{var h;(h=l.current)==null||h.focus()},[]);const i=()=>{r||o("")};return t?c1.jsxRuntimeExports.jsxs("div",{className:"mt-4",children:[c1.jsxRuntimeExports.jsxs("h2",{className:"mb-2 text-xs font-semibold leading-none tracking-tight text-gray-500",children:[c("Ask AI")," (GPT-4o mini)"]}),c1.jsxRuntimeExports.jsx(Y.Textarea,{ref:l,value:n,onChange:h=>o(h.target.value),placeholder:c("Ask AI to edit content"),className:"w-full border border-gray-400 focus:border-0",rows:3,onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),e("content",t,n,i))}}),c1.jsxRuntimeExports.jsxs("div",{className:"my-2 flex items-center gap-2",children:[a?null:c1.jsxRuntimeExports.jsx(Y.Button,{disabled:n.trim().length<5||a,onClick:()=>e("content",t,n,i),variant:"default",className:"w-fit",size:"sm",children:a?c1.jsxRuntimeExports.jsxs(c1.jsxRuntimeExports.Fragment,{children:[c1.jsxRuntimeExports.jsx(e3.Loader,{className:"h-5 w-5 animate-spin"}),c("Generating... Please wait")]}):c("Edit with AI")}),a?c1.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2",children:[c1.jsxRuntimeExports.jsxs(Y.Skeleton,{className:"flex w-full items-center space-x-1 px-4 py-1 pl-2",children:[c1.jsxRuntimeExports.jsx(ty,{className:"h-4 w-4 animate-spin text-gray-500"}),c1.jsxRuntimeExports.jsx("p",{className:"text-xs",children:c("Generating... Please wait")})]}),c1.jsxRuntimeExports.jsx(Y.Button,{variant:"destructive",onClick:()=>stop(),className:"hidden w-fit",size:"sm",children:c("Stop")})]}):null]}),c1.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:r&&c1.jsxRuntimeExports.jsx("p",{className:"break-words rounded border border-red-500 bg-red-100 p-1 text-xs text-red-500",children:r.message})}),c1.jsxRuntimeExports.jsx(un1,{onClick:h=>e("content",t,h,i)})]}):c1.jsxRuntimeExports.jsx("div",{className:"p-4 text-center",children:c1.jsxRuntimeExports.jsxs("div",{className:"space-y-4 rounded-xl p-4",children:[c1.jsxRuntimeExports.jsx(e3.SparklesIcon,{className:"mx-auto text-3xl"}),c1.jsxRuntimeExports.jsx("h1",{children:c("no_block_selected_for_ask_ai")})]})})},gn1=({onOpen:t})=>{const{t:c}=k9.useTranslation(),e=Y.useBuilderProp("aiContext",""),[a,r]=u.useState(e),n=u.useRef(null),o=Y.useBuilderProp("saveAiContextCallback",a2.noop),[l,i]=u.useState(!1),[h,s]=u.useState(null),[d,v]=u.useState(!1),{toast:g}=Y.useToast(),p=u.useRef(null);u.useEffect(()=>{e&&r(e)},[e]);const f=async()=>{try{i(!0),s(null),await o(a),g({title:c("AI Context updated"),description:c("You can now ask AI to edit your content"),variant:"default"}),p.current.click()}catch(m){s(m)}finally{i(!1)}};return c1.jsxRuntimeExports.jsx(Y.Accordion,{onValueChange:m=>{t(m!==""),v(m!=="")},type:"single",collapsible:!0,className:"rounded-md border bg-gray-100 px-2",children:c1.jsxRuntimeExports.jsxs(Y.AccordionItem,{value:"set-context",children:[c1.jsxRuntimeExports.jsx(Y.AccordionTrigger,{ref:p,hideArrow:!0,className:"py-1 hover:no-underline",children:c1.jsxRuntimeExports.jsxs("div",{className:"flex w-full items-center justify-between",children:[c1.jsxRuntimeExports.jsx("span",{className:"font-semibold",children:c("AI Context")}),c1.jsxRuntimeExports.jsxs(Y.Button,{variant:"default",size:"sm",children:[c1.jsxRuntimeExports.jsx("span",{children:c(d?"Cancel":"Edit")})," ",d?c1.jsxRuntimeExports.jsx(y6.Cross2Icon,{className:"h-4 w-4"}):c1.jsxRuntimeExports.jsx(e3.EditIcon,{className:"h-4 w-4"})]})]})}),c1.jsxRuntimeExports.jsxs(Y.AccordionContent,{children:[c1.jsxRuntimeExports.jsx(Y.Textarea,{ref:n,value:a,onChange:m=>r(m.target.value),placeholder:c("Tell about this page. Eg: This page is about ..."),className:"w-full border border-gray-400 bg-background focus:border",rows:10,onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),f())}}),e.trim().length===0?c1.jsxRuntimeExports.jsx("p",{className:"mt-2 text-xs text-gray-500",children:c("Eg: This page is about an AI assistant app called Chai Studio. It allows users to create beautiful webpages and edit content with AI.")}):null,c1.jsxRuntimeExports.jsxs("div",{className:"mt-2 flex items-center",children:[c1.jsxRuntimeExports.jsx(Y.Button,{disabled:a.trim().length<5,onClick:()=>f(),variant:"default",className:"w-fit",size:"sm",children:l?c1.jsxRuntimeExports.jsxs(c1.jsxRuntimeExports.Fragment,{children:[c1.jsxRuntimeExports.jsx(e3.Loader,{className:"h-5 w-5 animate-spin"}),c("Generating... Please wait")]}):c("Save")}),e.trim().length>0?c1.jsxRuntimeExports.jsxs(Y.AlertDialog,{children:[c1.jsxRuntimeExports.jsx(Y.AlertDialogTrigger,{asChild:!0,children:c1.jsxRuntimeExports.jsx(Y.Button,{disabled:e.trim().length===0,variant:"ghost",className:"w-fit",size:"sm",children:l?c1.jsxRuntimeExports.jsxs(c1.jsxRuntimeExports.Fragment,{children:[c1.jsxRuntimeExports.jsx(e3.Loader,{className:"h-5 w-5 animate-spin"}),c("Generating... Please wait")]}):c("Delete")})}),c1.jsxRuntimeExports.jsxs(Y.AlertDialogContent,{children:[c1.jsxRuntimeExports.jsxs(Y.AlertDialogHeader,{children:[c1.jsxRuntimeExports.jsx(Y.AlertDialogTitle,{children:c("Remove context?")}),c1.jsxRuntimeExports.jsx(Y.AlertDialogDescription,{})]}),c1.jsxRuntimeExports.jsxs(Y.AlertDialogFooter,{children:[c1.jsxRuntimeExports.jsx(Y.AlertDialogCancel,{children:c("Cancel")}),c1.jsxRuntimeExports.jsx(Y.AlertDialogAction,{onClick:()=>{r(""),f()},children:"Yes, Delete"})]})]})]}):null]}),c1.jsxRuntimeExports.jsx("div",{className:"mt-2 max-w-full",children:h&&c1.jsxRuntimeExports.jsx("p",{className:"break-words rounded border border-red-500 bg-red-100 p-1 text-xs text-red-500",children:h.message})})]})]})})},fn1=()=>{const[t]=Y.useSelectedBlockIds(),[c,e]=u.useState(!1);return c1.jsxRuntimeExports.jsxs("div",{className:"absolute inset-0 z-50 h-full w-full bg-background p-2",children:[c1.jsxRuntimeExports.jsx(gn1,{onOpen:a=>e(a)}),c?null:c1.jsxRuntimeExports.jsx(vn1,{blockId:a2.first(t)})]})},pn1=u.lazy(()=>Promise.resolve().then(()=>require("./SidePanels--qxWuuF-.cjs"))),mn1=u.lazy(()=>Promise.resolve().then(()=>require("./Topbar-Yrhyc6IQ.cjs"))),zn1=u.lazy(()=>Promise.resolve().then(()=>require("./CanvasArea-ZNRxUJR7.cjs"))),Mn1=u.lazy(()=>Promise.resolve().then(()=>require("./Settings-GVs7UvAX.cjs"))),bn1=()=>{const{savePage:t}=Y.useSavePage(),c=Y.useBuilderProp("autoSaveSupport",!0),e=Y.useBuilderProp("autoSaveInterval",60);ry.useIntervalEffect(()=>{c&&t()},e*1e3)},Cn1=()=>{const[t]=m4.useAtom(Y.builderSaveStateAtom),[c]=m4.useAtom(Y.aiAssistantActiveAtom),e=n=>{Y.isDevelopment()||n.preventDefault()};QH(document),en1(),bn1(),u.useEffect(()=>(t!=="SAVED"?window.onbeforeunload=()=>"":window.onbeforeunload=null,()=>{window.onbeforeunload=null}),[t]);const a=Y.useBuilderProp("editable",!0),r=Y.useBuilderProp("nonEditableComponent",null);return c1.jsxRuntimeExports.jsx("div",{className:"h-screen w-screen bg-background text-foreground",children:c1.jsxRuntimeExports.jsxs(Y.TooltipProvider,{children:[c1.jsxRuntimeExports.jsxs("div",{onContextMenu:e,className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[c1.jsxRuntimeExports.jsx("div",{className:"h-14 w-screen shrink-0 border-b border-border",children:c1.jsxRuntimeExports.jsx(u.Suspense,{children:c1.jsxRuntimeExports.jsx(mn1,{})})}),c1.jsxRuntimeExports.jsxs("main",{className:"relative flex h-full flex-1 flex-row",children:[a?null:c1.jsxRuntimeExports.jsx("div",{className:"absolute inset-0 z-[500] flex h-full w-full items-center justify-center backdrop-blur-[2px]",children:c1.jsxRuntimeExports.jsx(u.Suspense,{children:u.createElement(r)})}),c1.jsxRuntimeExports.jsx("div",{className:"flex h-full max-h-full w-fit border-border",style:{maxHeight:"calc(100vh - 56px)"},children:c1.jsxRuntimeExports.jsx(u.Suspense,{children:c1.jsxRuntimeExports.jsx(pn1,{})})}),c1.jsxRuntimeExports.jsx("div",{className:"h-full flex-1 bg-slate-800/20",children:c1.jsxRuntimeExports.jsx(u.Suspense,{children:c1.jsxRuntimeExports.jsx(zn1,{})})}),c1.jsxRuntimeExports.jsxs("div",{className:"relative flex h-[100%] w-[280px] min-w-[280px] border-l border-border pb-10",children:[c1.jsxRuntimeExports.jsx(u.Suspense,{children:c1.jsxRuntimeExports.jsx(Mn1,{})}),c?c1.jsxRuntimeExports.jsx(fn1,{}):null]})]})]}),c1.jsxRuntimeExports.jsx($r1,{})]})})},ev=m4.getDefaultStore(),wn1=()=>c1.jsxRuntimeExports.jsx("section",{className:"h-screen w-screen bg-gray-900 py-12 sm:py-16 lg:py-20 xl:hidden",children:c1.jsxRuntimeExports.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:c1.jsxRuntimeExports.jsxs("div",{className:"mx-auto max-w-md text-center",children:[c1.jsxRuntimeExports.jsx("img",{src:"https://fldwljgzcktqnysdkxnn.supabase.co/storage/v1/object/public/chaibuilder-blob-storage/175ac8d8-37fe-4707-bb4a-3c0cd6a6db75/gVH7O-Ir_400x400.png",alt:"Chai Builder",className:"mx-auto w-14 rounded-full"}),c1.jsxRuntimeExports.jsx("br",{}),c1.jsxRuntimeExports.jsx("h2",{className:"text-4xl font-bold text-white",children:"Screen too small"}),c1.jsxRuntimeExports.jsx("p",{className:"mt-6 text-sm font-medium leading-6 text-white text-opacity-70",children:"Please view this page on greater than 1280px screen width."})]})})});let Vn1=!1;const Hn1=t=>{Vn1=t};const yn1=t=>{const[,c]=Y.useBlocksStore(),[,e]=Y.useBrandingOptions(),a=Y.useBuilderReset();return u.useEffect(()=>{ev.set(Y.chaiBuilderPropsAtom,a2.omit(t,["blocks","subPages","brandingOptions","dataProviders"]))},[t]),u.useEffect(()=>{ev.set(Y.dataProvidersAtom,t.dataProviders||[])},[t.dataProviders]),u.useEffect(()=>{c(ov.syncBlocksWithDefaults(t.blocks||[])),a()},[t.blocks]),u.useEffect(()=>{av.changeLanguage(t.locale||"en")},[t.locale]),u.useEffect(()=>{Hn1(t.showDebugLogs)},[t.showDebugLogs]),u.useEffect(()=>{e(t.brandingOptions)},[t.brandingOptions,e]),c1.jsxRuntimeExports.jsx(Cn1,{})},Ln1=t=>{const c=t._flags||{};return c1.jsxRuntimeExports.jsxs(XH,{children:[c1.jsxRuntimeExports.jsxs(ey.FlagsProvider,{features:{..._r1,...c},children:[c1.jsxRuntimeExports.jsx(Yr1,{}),c1.jsxRuntimeExports.jsx(wn1,{}),c1.jsxRuntimeExports.jsx(yn1,{...t})]}),c1.jsxRuntimeExports.jsx(Y.Toaster,{})]})};exports.BlocksExternalDataProvider=rn1;exports.ChaiBuilderEditor=Ln1;exports.ErrorBoundary=XH;exports.FaCircleCheck=sn1;exports.FaMoon=ln1;exports.FaSpinner=ty;exports.useAskAi=Pa;exports.useChaiExternalData=_H;exports.useKeyEventWatcher=QH;
|
|
206
|
+
*/R();var Yr1=process.env.NODE_ENV!=="production"?Jr1:()=>null;function Xr1(){return new URLSearchParams(window.location.search).has("dnd")}function Qr1(){return new URLSearchParams(window.location.search).has("outline")}const _r1={dnd:Xr1(),arborist:Qr1()};class XH extends u.Component{constructor(c){super(c),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?c1.jsxRuntimeExports.jsxs("div",{className:"h-full w-full rounded-md bg-red-200 p-4 text-red-500",id:"errorBoundary",children:[c1.jsxRuntimeExports.jsx("p",{className:"font-semibold",children:"Oops! Something went wrong."}),c1.jsxRuntimeExports.jsx("p",{children:"Please try again later."})]}):this.props.children}}const $r1=()=>{const[t,c]=Y.usePreviewMode(),{t:e}=k9.useTranslation(),a=Y.useBuilderProp("previewComponent",null);return t?c1.jsxRuntimeExports.jsxs("div",{className:ay.cn("fixed inset-0 z-[999] bg-background",t?"block":"hidden"),children:[c1.jsxRuntimeExports.jsxs(Y.Button,{size:"sm",className:"absolute right-0 top-0 m-4 space-x-2",onClick:()=>c(!1),children:[c1.jsxRuntimeExports.jsx(y6.EyeClosedIcon,{}),c1.jsxRuntimeExports.jsx("span",{children:e("Close Preview")})]}),c1.jsxRuntimeExports.jsx("div",{children:a?c1.jsxRuntimeExports.jsx(u.Suspense,{fallback:c1.jsxRuntimeExports.jsx(Y.Skeleton,{className:"h-96 w-full"}),children:u.createElement(a)}):null})]}):null},QH=t=>{const[c,e]=Y.useSelectedBlockIds(),a=Y.useRemoveBlocks(),r=Y.useDuplicateBlocks(),{undo:n,redo:o}=Y.useUndoManager(),l=t?{document:t}:{};c6.useHotkeys("esc",()=>e([]),l,[e]),c6.useHotkeys("ctrl+d,command+d",()=>r(c),{...l,preventDefault:!0},[c,r]),c6.useHotkeys("ctrl+z,command+z",()=>n(),l,[n]),c6.useHotkeys("ctrl+y,command+y",()=>o(),l,[o]),c6.useHotkeys("del, backspace",i=>{i.preventDefault(),a(c)},l,[c,a])},tn1=(t,c)=>{const e=[];let a=a2.find(t,{_id:c}),r=a2.get(a,"_parent","");for(;a2.isString(r)&&!a2.isEmpty(r);)e.push(a==null?void 0:a._parent),a=a2.find(t,{_id:r}),r=a==null?void 0:a._parent;return a2.flatten(e)},cn1=m4.atom([]),en1=()=>{const[t]=Y.useSelectedBlockIds(),c=m4.useAtomValue(Y.presentBlocksAtom),[,e]=m4.useAtom(cn1);u.useEffect(()=>{let a=[];const r=a2.first(t);a2.isString(r)&&(a=[r,...tn1(c,r)]),e(a)},[t,c,e])};const _H=()=>m4.useAtom(Y.chaiExternalDataAtom),an1=()=>u.useMemo(()=>ov.getChaiDataProviders(),[]),rn1=({children:t})=>{const[,c]=_H(),[e]=Y.usePageDataProviders(),a=an1();return u.useEffect(()=>(c({}),a2.each(e,r=>{const n=a2.find(a,{providerKey:r.providerKey});if(n){const o=(n==null?void 0:n.mockFn)||(n==null?void 0:n.dataFn);o&&o(r.args).then(l=>c(i=>({...i,[r.providerKey]:l})))}}),()=>{a2.each(e,r=>{c(n=>(delete n[r.providerKey],n))})}),[a,e,c]),c1.jsxRuntimeExports.jsx(c1.jsxRuntimeExports.Fragment,{children:t})};function nn1(t,c,e){e.push(a2.find(t,{_id:c}));const a=a2.filter(t,{_parent:c});for(const r of a)e.push(...$H(r._id,t));return e}const $H=(t,c)=>{let e=[];return e=a2.flattenDeep([...e,...nn1(c,t,e)]),e},on1=m4.atom(!1),Pa=()=>{const[t,c]=m4.useAtom(on1),[e,a]=u.useState(null),r=Y.useBuilderProp("askAiCallBack",null),n=Y.useStreamMultipleBlocksProps(),o=Y.useUpdateMultipleBlocksProps(),[l]=Y.useBlocksStore();return{askAi:u.useCallback(async(i,h,s,d)=>{if(r){c(!0),a(null);try{const v=i==="content"?a2.cloneDeep($H(h,l)):[a2.cloneDeep(l.find(f=>f._id===h))];a2.set(v,"0._parent",null);const{blocks:g,error:p}=await r(i,s,v);if(p){a(p);return}i==="styles"?o(g):n(g)}catch(v){a(v)}finally{c(!1),d&&d()}}},[r,c,l,o,n]),loading:t,error:e}};function ln1(t){return T6.GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"},child:[]}]})(t)}function in1(t){return T6.GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"},child:[]}]})(t)}function ty(t){return T6.GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"},child:[]}]})(t)}function sn1(t){return T6.GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"},child:[]}]})(t)}function dn1(t){return T6.GenIcon({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V299.6l-94.7 94.7c-8.2 8.2-14 18.5-16.8 29.7l-15 60.1c-2.3 9.4-1.8 19 1.4 27.8H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM549.8 235.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-29.4 29.4-71-71 29.4-29.4c15.6-15.6 40.9-15.6 56.6 0zM311.9 417L441.1 287.8l71 71L382.9 487.9c-4.1 4.1-9.2 7-14.9 8.4l-60.1 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.1c1.4-5.6 4.3-10.8 8.4-14.9z"},child:[]}]})(t)}const hn1=[{name:"Improve writing",icon:dn1,prompt:"Improving writing in all text elements. Replacing placeholder content with meaningful relevant content."},{name:"Replace placeholder content",icon:in1,prompt:"Discard current placeholder content and replace with meaningful relevant content."},{name:"Fix grammar",icon:y6.CheckIcon,prompt:"Fix grammar in all text elements. Ensuring the text is grammatically correct and free of errors."},{name:"Make longer",icon:y6.ArrowUpIcon,prompt:"Make all text elements longer."},{name:"Make shorter",icon:y6.ArrowDownIcon,prompt:"Make all text elements shorter."},{name:"Add emojis",icon:e3.SmileIcon,prompt:"Add emojis to text elements if relevant."},{name:"Randomize",icon:e3.ShuffleIcon,prompt:"Randomize all text elements."}];function un1({onClick:t}){const{loading:c}=Pa();return c1.jsxRuntimeExports.jsx("div",{className:c?"pointer-events-none opacity-50":"",children:c1.jsxRuntimeExports.jsx("ul",{className:"space-y-2",children:hn1.map(({name:e,icon:a,subMenus:r,prompt:n})=>r?c1.jsxRuntimeExports.jsxs(Y.DropdownMenu,{children:[c1.jsxRuntimeExports.jsx(Y.DropdownMenuTrigger,{asChild:!0,children:c1.jsxRuntimeExports.jsxs("li",{className:"flex cursor-pointer items-center space-x-2 hover:bg-gray-100",children:[c1.jsxRuntimeExports.jsx(a,{className:"h-4 w-4"}),c1.jsxRuntimeExports.jsx("span",{children:e})]},e)}),c1.jsxRuntimeExports.jsxs(Y.DropdownMenuContent,{children:[c1.jsxRuntimeExports.jsx(Y.DropdownMenuLabel,{children:"My Account"}),c1.jsxRuntimeExports.jsx(Y.DropdownMenuSeparator,{}),c1.jsxRuntimeExports.jsx(Y.DropdownMenuItem,{children:"Profile"}),c1.jsxRuntimeExports.jsx(Y.DropdownMenuItem,{children:"Billing"}),c1.jsxRuntimeExports.jsx(Y.DropdownMenuItem,{children:"Team"}),c1.jsxRuntimeExports.jsx(Y.DropdownMenuItem,{children:"Subscription"})]})]}):c1.jsxRuntimeExports.jsxs("li",{onClick:()=>t(n),className:"flex cursor-pointer items-center space-x-2 rounded p-1 pl-2 text-sm hover:bg-gray-100",children:[c1.jsxRuntimeExports.jsx(a,{className:"h-4 w-4"}),c1.jsxRuntimeExports.jsx("span",{children:e})]},e))})})}const vn1=({blockId:t})=>{const{t:c}=k9.useTranslation(),{askAi:e,loading:a,error:r}=Pa(),[n,o]=u.useState(""),l=u.useRef(null);u.useEffect(()=>{var h;(h=l.current)==null||h.focus()},[]);const i=()=>{r||o("")};return t?c1.jsxRuntimeExports.jsxs("div",{className:"mt-4",children:[c1.jsxRuntimeExports.jsxs("h2",{className:"mb-2 text-xs font-semibold leading-none tracking-tight text-gray-500",children:[c("Ask AI")," (GPT-4o mini)"]}),c1.jsxRuntimeExports.jsx(Y.Textarea,{ref:l,value:n,onChange:h=>o(h.target.value),placeholder:c("Ask AI to edit content"),className:"w-full border border-gray-400 focus:border-0",rows:3,onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),e("content",t,n,i))}}),c1.jsxRuntimeExports.jsxs("div",{className:"my-2 flex items-center gap-2",children:[a?null:c1.jsxRuntimeExports.jsx(Y.Button,{disabled:n.trim().length<5||a,onClick:()=>e("content",t,n,i),variant:"default",className:"w-fit",size:"sm",children:a?c1.jsxRuntimeExports.jsxs(c1.jsxRuntimeExports.Fragment,{children:[c1.jsxRuntimeExports.jsx(e3.Loader,{className:"h-5 w-5 animate-spin"}),c("Generating... Please wait")]}):c("Edit with AI")}),a?c1.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2",children:[c1.jsxRuntimeExports.jsxs(Y.Skeleton,{className:"flex w-full items-center space-x-1 px-4 py-1 pl-2",children:[c1.jsxRuntimeExports.jsx(ty,{className:"h-4 w-4 animate-spin text-gray-500"}),c1.jsxRuntimeExports.jsx("p",{className:"text-xs",children:c("Generating... Please wait")})]}),c1.jsxRuntimeExports.jsx(Y.Button,{variant:"destructive",onClick:()=>stop(),className:"hidden w-fit",size:"sm",children:c("Stop")})]}):null]}),c1.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:r&&c1.jsxRuntimeExports.jsx("p",{className:"break-words rounded border border-red-500 bg-red-100 p-1 text-xs text-red-500",children:r.message})}),c1.jsxRuntimeExports.jsx(un1,{onClick:h=>e("content",t,h,i)})]}):c1.jsxRuntimeExports.jsx("div",{className:"p-4 text-center",children:c1.jsxRuntimeExports.jsxs("div",{className:"space-y-4 rounded-xl p-4",children:[c1.jsxRuntimeExports.jsx(e3.SparklesIcon,{className:"mx-auto text-3xl"}),c1.jsxRuntimeExports.jsx("h1",{children:c("no_block_selected_for_ask_ai")})]})})},gn1=({onOpen:t})=>{const{t:c}=k9.useTranslation(),e=Y.useBuilderProp("aiContext",""),[a,r]=u.useState(e),n=u.useRef(null),o=Y.useBuilderProp("saveAiContextCallback",a2.noop),[l,i]=u.useState(!1),[h,s]=u.useState(null),[d,v]=u.useState(!1),{toast:g}=Y.useToast(),p=u.useRef(null);u.useEffect(()=>{e&&r(e)},[e]);const f=async()=>{try{i(!0),s(null),await o(a),g({title:c("AI Context updated"),description:c("You can now ask AI to edit your content"),variant:"default"}),p.current.click()}catch(m){s(m)}finally{i(!1)}};return c1.jsxRuntimeExports.jsx(Y.Accordion,{onValueChange:m=>{t(m!==""),v(m!=="")},type:"single",collapsible:!0,className:"rounded-md border bg-gray-100 px-2",children:c1.jsxRuntimeExports.jsxs(Y.AccordionItem,{value:"set-context",children:[c1.jsxRuntimeExports.jsx(Y.AccordionTrigger,{ref:p,hideArrow:!0,className:"py-1 hover:no-underline",children:c1.jsxRuntimeExports.jsxs("div",{className:"flex w-full items-center justify-between",children:[c1.jsxRuntimeExports.jsx("span",{className:"font-semibold",children:c("AI Context")}),c1.jsxRuntimeExports.jsxs(Y.Button,{variant:"default",size:"sm",children:[c1.jsxRuntimeExports.jsx("span",{children:c(d?"Cancel":"Edit")})," ",d?c1.jsxRuntimeExports.jsx(y6.Cross2Icon,{className:"h-4 w-4"}):c1.jsxRuntimeExports.jsx(e3.EditIcon,{className:"h-4 w-4"})]})]})}),c1.jsxRuntimeExports.jsxs(Y.AccordionContent,{children:[c1.jsxRuntimeExports.jsx(Y.Textarea,{ref:n,value:a,onChange:m=>r(m.target.value),placeholder:c("Tell about this page. Eg: This page is about ..."),className:"w-full border border-gray-400 bg-background focus:border",rows:10,onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),f())}}),e.trim().length===0?c1.jsxRuntimeExports.jsx("p",{className:"mt-2 text-xs text-gray-500",children:c("Eg: This page is about an AI assistant app called Chai Studio. It allows users to create beautiful webpages and edit content with AI.")}):null,c1.jsxRuntimeExports.jsxs("div",{className:"mt-2 flex items-center",children:[c1.jsxRuntimeExports.jsx(Y.Button,{disabled:a.trim().length<5,onClick:()=>f(),variant:"default",className:"w-fit",size:"sm",children:l?c1.jsxRuntimeExports.jsxs(c1.jsxRuntimeExports.Fragment,{children:[c1.jsxRuntimeExports.jsx(e3.Loader,{className:"h-5 w-5 animate-spin"}),c("Generating... Please wait")]}):c("Save")}),e.trim().length>0?c1.jsxRuntimeExports.jsxs(Y.AlertDialog,{children:[c1.jsxRuntimeExports.jsx(Y.AlertDialogTrigger,{asChild:!0,children:c1.jsxRuntimeExports.jsx(Y.Button,{disabled:e.trim().length===0,variant:"ghost",className:"w-fit",size:"sm",children:l?c1.jsxRuntimeExports.jsxs(c1.jsxRuntimeExports.Fragment,{children:[c1.jsxRuntimeExports.jsx(e3.Loader,{className:"h-5 w-5 animate-spin"}),c("Generating... Please wait")]}):c("Delete")})}),c1.jsxRuntimeExports.jsxs(Y.AlertDialogContent,{children:[c1.jsxRuntimeExports.jsxs(Y.AlertDialogHeader,{children:[c1.jsxRuntimeExports.jsx(Y.AlertDialogTitle,{children:c("Remove context?")}),c1.jsxRuntimeExports.jsx(Y.AlertDialogDescription,{})]}),c1.jsxRuntimeExports.jsxs(Y.AlertDialogFooter,{children:[c1.jsxRuntimeExports.jsx(Y.AlertDialogCancel,{children:c("Cancel")}),c1.jsxRuntimeExports.jsx(Y.AlertDialogAction,{onClick:()=>{r(""),f()},children:"Yes, Delete"})]})]})]}):null]}),c1.jsxRuntimeExports.jsx("div",{className:"mt-2 max-w-full",children:h&&c1.jsxRuntimeExports.jsx("p",{className:"break-words rounded border border-red-500 bg-red-100 p-1 text-xs text-red-500",children:h.message})})]})]})})},fn1=()=>{const[t]=Y.useSelectedBlockIds(),[c,e]=u.useState(!1);return c1.jsxRuntimeExports.jsxs("div",{className:"absolute inset-0 z-50 h-full w-full bg-background p-2",children:[c1.jsxRuntimeExports.jsx(gn1,{onOpen:a=>e(a)}),c?null:c1.jsxRuntimeExports.jsx(vn1,{blockId:a2.first(t)})]})},pn1=u.lazy(()=>Promise.resolve().then(()=>require("./SidePanels-n5WUkXLw.cjs"))),mn1=u.lazy(()=>Promise.resolve().then(()=>require("./Topbar-m48Xdj0O.cjs"))),zn1=u.lazy(()=>Promise.resolve().then(()=>require("./CanvasArea-dsxnMndK.cjs"))),Mn1=u.lazy(()=>Promise.resolve().then(()=>require("./Settings-NqIs7PLQ.cjs"))),bn1=()=>{const{savePage:t}=Y.useSavePage(),c=Y.useBuilderProp("autoSaveSupport",!0),e=Y.useBuilderProp("autoSaveInterval",60);ry.useIntervalEffect(()=>{c&&t()},e*1e3)},Cn1=()=>{const[t]=m4.useAtom(Y.builderSaveStateAtom),[c]=m4.useAtom(Y.aiAssistantActiveAtom),e=n=>{Y.isDevelopment()||n.preventDefault()};QH(),en1(),bn1(),u.useEffect(()=>(t!=="SAVED"?window.onbeforeunload=()=>"":window.onbeforeunload=null,()=>{window.onbeforeunload=null}),[t]);const a=Y.useBuilderProp("editable",!0),r=Y.useBuilderProp("nonEditableComponent",null);return c1.jsxRuntimeExports.jsx("div",{className:"h-screen w-screen bg-background text-foreground",children:c1.jsxRuntimeExports.jsxs(Y.TooltipProvider,{children:[c1.jsxRuntimeExports.jsxs("div",{onContextMenu:e,className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[c1.jsxRuntimeExports.jsx("div",{className:"h-14 w-screen shrink-0 border-b border-border",children:c1.jsxRuntimeExports.jsx(u.Suspense,{children:c1.jsxRuntimeExports.jsx(mn1,{})})}),c1.jsxRuntimeExports.jsxs("main",{className:"relative flex h-full flex-1 flex-row",children:[a?null:c1.jsxRuntimeExports.jsx("div",{className:"absolute inset-0 z-[500] flex h-full w-full items-center justify-center backdrop-blur-[2px]",children:c1.jsxRuntimeExports.jsx(u.Suspense,{children:u.createElement(r)})}),c1.jsxRuntimeExports.jsx("div",{className:"flex h-full max-h-full w-fit border-border",style:{maxHeight:"calc(100vh - 56px)"},children:c1.jsxRuntimeExports.jsx(u.Suspense,{children:c1.jsxRuntimeExports.jsx(pn1,{})})}),c1.jsxRuntimeExports.jsx("div",{className:"h-full flex-1 bg-slate-800/20",children:c1.jsxRuntimeExports.jsx(u.Suspense,{children:c1.jsxRuntimeExports.jsx(zn1,{})})}),c1.jsxRuntimeExports.jsxs("div",{className:"relative flex h-[100%] w-[280px] min-w-[280px] border-l border-border pb-10",children:[c1.jsxRuntimeExports.jsx(u.Suspense,{children:c1.jsxRuntimeExports.jsx(Mn1,{})}),c?c1.jsxRuntimeExports.jsx(fn1,{}):null]})]})]}),c1.jsxRuntimeExports.jsx($r1,{})]})})},ev=m4.getDefaultStore(),wn1=()=>c1.jsxRuntimeExports.jsx("section",{className:"h-screen w-screen bg-gray-900 py-12 sm:py-16 lg:py-20 xl:hidden",children:c1.jsxRuntimeExports.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:c1.jsxRuntimeExports.jsxs("div",{className:"mx-auto max-w-md text-center",children:[c1.jsxRuntimeExports.jsx("img",{src:"https://fldwljgzcktqnysdkxnn.supabase.co/storage/v1/object/public/chaibuilder-blob-storage/175ac8d8-37fe-4707-bb4a-3c0cd6a6db75/gVH7O-Ir_400x400.png",alt:"Chai Builder",className:"mx-auto w-14 rounded-full"}),c1.jsxRuntimeExports.jsx("br",{}),c1.jsxRuntimeExports.jsx("h2",{className:"text-4xl font-bold text-white",children:"Screen too small"}),c1.jsxRuntimeExports.jsx("p",{className:"mt-6 text-sm font-medium leading-6 text-white text-opacity-70",children:"Please view this page on greater than 1280px screen width."})]})})});let Vn1=!1;const Hn1=t=>{Vn1=t};const yn1=t=>{const[,c]=Y.useBlocksStore(),[,e]=Y.useBrandingOptions(),a=Y.useBuilderReset();return u.useEffect(()=>{ev.set(Y.chaiBuilderPropsAtom,a2.omit(t,["blocks","subPages","brandingOptions","dataProviders"]))},[t]),u.useEffect(()=>{ev.set(Y.dataProvidersAtom,t.dataProviders||[])},[t.dataProviders]),u.useEffect(()=>{c(ov.syncBlocksWithDefaults(t.blocks||[])),a()},[t.blocks]),u.useEffect(()=>{av.changeLanguage(t.locale||"en")},[t.locale]),u.useEffect(()=>{Hn1(t.showDebugLogs)},[t.showDebugLogs]),u.useEffect(()=>{e(t.brandingOptions)},[t.brandingOptions,e]),c1.jsxRuntimeExports.jsx(Cn1,{})},Ln1=t=>{const c=t._flags||{};return c1.jsxRuntimeExports.jsxs(XH,{children:[c1.jsxRuntimeExports.jsxs(ey.FlagsProvider,{features:{..._r1,...c},children:[c1.jsxRuntimeExports.jsx(Yr1,{}),c1.jsxRuntimeExports.jsx(wn1,{}),c1.jsxRuntimeExports.jsx(yn1,{...t})]}),c1.jsxRuntimeExports.jsx(Y.Toaster,{})]})};exports.BlocksExternalDataProvider=rn1;exports.ChaiBuilderEditor=Ln1;exports.ErrorBoundary=XH;exports.FaCircleCheck=sn1;exports.FaMoon=ln1;exports.FaSpinner=ty;exports.useAskAi=Pa;exports.useChaiExternalData=_H;exports.useKeyEventWatcher=QH;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("./jsx-runtime-Z_BpKhVy.cjs"),R=require("react"),cn=require("@radix-ui/react-toggle"),ce=require("class-variance-authority"),u=require("./utils-D_vtk3zK.cjs"),dn=require("@radix-ui/react-switch"),un=require("@radix-ui/react-slot"),mn=require("@radix-ui/react-accordion"),Y=require("@radix-ui/react-icons"),pn=require("@radix-ui/react-alert-dialog"),fn=require("@radix-ui/react-dialog"),xn=require("@radix-ui/react-label"),gn=require("@radix-ui/react-scroll-area"),hn=require("@radix-ui/react-tabs"),bn=require("@radix-ui/react-tooltip"),vn=require("@radix-ui/react-popover"),yn=require("@radix-ui/react-menubar"),jn=require("@radix-ui/react-hover-card"),wn=require("@radix-ui/react-select"),kn=require("@radix-ui/react-dropdown-menu"),Rn=require("@radix-ui/react-separator"),Cn=require("@radix-ui/react-toast"),J=require("cmdk"),Sn=require("@radix-ui/react-context-menu"),jt=require("react-icons-picker"),En=require("react-dom"),l=require("lodash-es"),An=require("react-quill"),ae=require("./Functions-N3yhPYKY.cjs"),Se=require("@chaibuilder/runtime"),p=require("jotai"),X=require("./MODIFIERS-mVmfEGgo.cjs"),Nn=require("./_commonjsHelpers-wDK0ZLPo.cjs"),_n=require("@react-hookz/web"),Bn=require("tree-model");require("react-i18next");function H(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const f=H(R),wt=H(cn),Le=H(dn),le=H(mn),W=H(pn),M=H(fn),kt=H(xn),ie=H(gn),de=H(hn),fe=H(bn),he=H(vn),B=H(yn),Ee=H(jn),q=H(wn),D=H(kn),Rt=H(Rn),Z=H(Cn),L=H(Sn);var $={VITE_OPENAI_API_KEY:"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",VITE_UNSPASH_ACCESS_KEY:"XgYBCm-XCHecRMsbfhw6oZWGkltco1U5TYMEd0LXZeA",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let Pn=0;function ne(e,t){const s=`atom${++Pn}`,o={toString:()=>s};return typeof e=="function"?o.read=e:(o.init=e,o.read=n=>n(o),o.write=(n,a,i)=>a(o,typeof i=="function"?i(n(o)):i)),t&&(o.write=t),o}const Pe=e=>"init"in e,Te=e=>!!e.write,ke=new WeakMap,Tn=(e,t)=>{ke.set(e,t),e.catch(()=>{}).finally(()=>ke.delete(e))},lt=(e,t)=>{const s=ke.get(e);s&&(ke.delete(e),s(t))},ct=(e,t)=>{e.status="fulfilled",e.value=t},dt=(e,t)=>{e.status="rejected",e.reason=t},Mn=e=>typeof(e==null?void 0:e.then)=="function",xe=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),ut=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),pe=e=>"v"in e&&e.v instanceof Promise,In=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,ye=e=>{if("e"in e)throw e.e;return e.v},Ct=()=>{const e=new WeakMap,t=new WeakMap,s=new Map;let o,n,a;($?"production":void 0)!=="production"&&(o=new Set,n=new Set,a=new Set);const i=m=>e.get(m),d=(m,h)=>{($?"production":void 0)!=="production"&&Object.freeze(h);const y=e.get(m);if(e.set(m,h),s.has(m)||s.set(m,y),y&&pe(y)){const b="v"in h?h.v instanceof Promise?h.v:Promise.resolve(h.v):Promise.reject(h.e);lt(y.v,b)}},x=(m,h,y)=>{const b=new Map;let j=!1;y.forEach((v,S)=>{!v&&S===m&&(v=h),v?(b.set(S,v),h.d.get(S)!==v&&(j=!0)):($?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(j||h.d.size!==b.size)&&(h.d=b)},c=(m,h,y)=>{const b=i(m),j={d:(b==null?void 0:b.d)||new Map,v:h};if(y&&x(m,j,y),b&&xe(b,j)&&b.d===j.d)return b;if(b&&pe(b)&&pe(j)&&In(b,j)){if(b.d===j.d)return b;j.v=b.v}return d(m,j),j},g=(m,h,y,b)=>{if(Mn(h)){let j;const v=new Promise((S,z)=>{let A=!1;h.then(T=>{if(!A){A=!0;const N=i(m),oe=c(m,v,y);ct(v,T),S(T),(N==null?void 0:N.d)!==oe.d&&U(m,oe,N==null?void 0:N.d)}},T=>{if(!A){A=!0;const N=i(m),oe=c(m,v,y);dt(v,T),z(T),(N==null?void 0:N.d)!==oe.d&&U(m,oe,N==null?void 0:N.d)}}),j=T=>{A||(A=!0,T.then(N=>ct(v,N),N=>dt(v,N)),S(T))}});return v.orig=h,v.status="pending",Tn(v,S=>{S&&j(S),b==null||b()}),c(m,v,y)}return c(m,h,y)},w=(m,h,y)=>{const b=i(m),j={d:(b==null?void 0:b.d)||new Map,e:h};return y&&x(m,j,y),b&&ut(b,j)&&b.d===j.d?b:(d(m,j),j)},C=m=>{const h=i(m);if(h&&(h.d.forEach((A,T)=>{T!==m&&!t.has(T)&&C(T)}),Array.from(h.d).every(([A,T])=>{const N=i(A);return A===m||N===T||N&&!pe(N)&&xe(N,T)})))return h;const y=new Map;let b=!0;const j=A=>{if(A===m){const N=i(A);if(N)return y.set(A,N),ye(N);if(Pe(A))return y.set(A,void 0),A.init;throw new Error("no atom init")}const T=C(A);return y.set(A,T),ye(T)};let v,S;const z={get signal(){return v||(v=new AbortController),v.signal},get setSelf(){return($?"production":void 0)!=="production"&&!Te(m)&&console.warn("setSelf function cannot be used with read-only atom"),!S&&Te(m)&&(S=(...A)=>{if(($?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return I(m,...A)}),S}};try{const A=m.read(j,z);return g(m,A,y,()=>v==null?void 0:v.abort())}catch(A){return w(m,A,y)}finally{b=!1}},O=m=>ye(C(m)),k=m=>{let h=t.get(m);return h||(h=V(m)),h},E=(m,h)=>!h.l.size&&(!h.t.size||h.t.size===1&&h.t.has(m)),_=m=>{const h=t.get(m);h&&E(m,h)&&G(m)},F=m=>{const h=new Map,y=new WeakMap,b=v=>{const S=t.get(v);S==null||S.t.forEach(z=>{z!==v&&(h.set(z,(h.get(z)||new Set).add(v)),y.set(z,(y.get(z)||0)+1),b(z))})};b(m);const j=v=>{const S=t.get(v);S==null||S.t.forEach(z=>{var A;if(z!==v){let T=y.get(z);if(T&&y.set(z,--T),!T){let N=!!((A=h.get(z))!=null&&A.size);if(N){const oe=i(z),ln=C(z);N=!oe||!xe(oe,ln)}N||h.forEach(oe=>oe.delete(z))}j(z)}})};j(m)},P=(m,...h)=>{let y=!0;const b=S=>ye(C(S)),j=(S,...z)=>{let A;if(S===m){if(!Pe(S))throw new Error("atom not writable");const T=i(S),N=g(S,z[0]);(!T||!xe(T,N))&&F(S)}else A=P(S,...z);if(!y){const T=se();($?"production":void 0)!=="production"&&n.forEach(N=>N({type:"async-write",flushed:T}))}return A},v=m.write(b,j,...h);return y=!1,v},I=(m,...h)=>{const y=P(m,...h),b=se();return($?"production":void 0)!=="production"&&n.forEach(j=>j({type:"write",flushed:b})),y},V=(m,h)=>{const y={t:new Set(h&&[h]),l:new Set};if(t.set(m,y),($?"production":void 0)!=="production"&&a.add(m),C(m).d.forEach((b,j)=>{const v=t.get(j);v?v.t.add(m):j!==m&&V(j,m)}),C(m),Te(m)&&m.onMount){const b=m.onMount((...j)=>I(m,...j));b&&(y.u=b)}return y},G=m=>{var h;const y=(h=t.get(m))==null?void 0:h.u;y&&y(),t.delete(m),($?"production":void 0)!=="production"&&a.delete(m);const b=i(m);b?(pe(b)&<(b.v),b.d.forEach((j,v)=>{if(v!==m){const S=t.get(v);S&&(S.t.delete(m),E(v,S)&&G(v))}})):($?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},U=(m,h,y)=>{const b=new Set(h.d.keys());y==null||y.forEach((j,v)=>{if(b.has(v)){b.delete(v);return}const S=t.get(v);S&&(S.t.delete(m),E(v,S)&&G(v))}),b.forEach(j=>{const v=t.get(j);v?v.t.add(m):t.has(m)&&V(j,m)})},se=()=>{let m;for(($?"production":void 0)!=="production"&&(m=new Set);s.size;){const h=Array.from(s);s.clear(),h.forEach(([y,b])=>{const j=i(y);if(j){j.d!==(b==null?void 0:b.d)&&U(y,j,b==null?void 0:b.d);const v=t.get(y);v&&!(b&&!pe(b)&&(xe(b,j)||ut(b,j)))&&(v.l.forEach(S=>S()),($?"production":void 0)!=="production"&&m.add(y))}else($?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if(($?"production":void 0)!=="production")return o.forEach(h=>h("state")),m},K=(m,h)=>{const y=k(m),b=se(),j=y.l;return j.add(h),($?"production":void 0)!=="production"&&(o.forEach(v=>v("sub")),n.forEach(v=>v({type:"sub",flushed:b}))),()=>{j.delete(h),_(m),($?"production":void 0)!=="production"&&(o.forEach(v=>v("unsub")),n.forEach(v=>v({type:"unsub"})))}};return($?"production":void 0)!=="production"?{get:O,set:I,sub:K,dev_subscribe_store:(m,h)=>h!==2?(console.warn("The current StoreListener revision is 2. The older ones are deprecated."),o.add(m),()=>{o.delete(m)}):(n.add(m),()=>{n.delete(m)}),dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:m=>e.get(m),dev_get_mounted:m=>t.get(m),dev_restore_atoms:m=>{for(const[y,b]of m)Pe(y)&&(g(y,b),F(y));const h=se();n.forEach(y=>y({type:"restore",flushed:h}))}}:{get:O,set:I,sub:K}};let Me;const Dn=()=>(Me||(Me=Ct()),Me);var Ln={VITE_OPENAI_API_KEY:"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",VITE_UNSPASH_ACCESS_KEY:"XgYBCm-XCHecRMsbfhw6oZWGkltco1U5TYMEd0LXZeA",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const On=R.createContext(void 0),Ue=e=>{const t=R.useContext(On);return(e==null?void 0:e.store)||t||Dn()};const zn=e=>typeof(e==null?void 0:e.then)=="function",Vn=R.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function St(e,t){const s=Ue(t),[[o,n,a],i]=R.useReducer(c=>{const g=s.get(e);return Object.is(c[0],g)&&c[1]===s&&c[2]===e?c:[g,s,e]},void 0,()=>[s.get(e),s,e]);let d=o;(n!==s||a!==e)&&(i(),d=s.get(e));const x=t==null?void 0:t.delay;return R.useEffect(()=>{const c=s.sub(e,()=>{if(typeof x=="number"){setTimeout(i,x);return}i()});return i(),c},[s,e,x]),R.useDebugValue(d),zn(d)?Vn(d):d}function Et(e,t){const s=Ue(t);return R.useCallback((...n)=>{if((Ln?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return s.set(e,...n)},[s,e])}function At(e,t){return[St(e,t),Et(e,t)]}var qe={VITE_OPENAI_API_KEY:"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",VITE_UNSPASH_ACCESS_KEY:"XgYBCm-XCHecRMsbfhw6oZWGkltco1U5TYMEd0LXZeA",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Nt=Symbol();const mt=(e,t,s)=>(t.has(s)?t:t.set(s,e())).get(s),Fn=new WeakMap,Un=(e,t,s)=>{const o=mt(()=>new WeakMap,Fn,t);return mt(e,o,s)},qn={},pt=e=>!!e.write,Hn=e=>typeof e=="function";function $n(e,t){return Un(()=>{const s=new WeakMap,o=(i,d)=>{let x=s.get(i);if(x)return x;const c=d&&s.get(d),g=[],w=[];return i.forEach((C,O)=>{const k=t?t(C):O;w[O]=k;const E=c&&c.atomList[c.keyList.indexOf(k)];if(E){g[O]=E;return}const _=P=>{const I=P(n),V=P(e),U=o(V,I==null?void 0:I.arr).keyList.indexOf(k);if(U<0||U>=V.length){const se=i[o(i).keyList.indexOf(k)];if(se)return se;throw new Error("splitAtom: index out of bounds for read")}return V[U]},F=(P,I,V)=>{const G=P(n),U=P(e),K=o(U,G==null?void 0:G.arr).keyList.indexOf(k);if(K<0||K>=U.length)throw new Error("splitAtom: index out of bounds for write");const m=Hn(V)?V(U[K]):V;I(e,[...U.slice(0,K),m,...U.slice(K+1)])};g[O]=pt(e)?ne(_,F):ne(_)}),c&&c.keyList.length===w.length&&c.keyList.every((C,O)=>C===w[O])?x=c:x={arr:i,atomList:g,keyList:w},s.set(i,x),x},n=ne(i=>{const d=i(n),x=i(e);return o(x,d==null?void 0:d.arr)});(qe?"production":void 0)!=="production"&&(n.debugPrivate=!0),n.init=void 0;const a=pt(e)?ne(i=>i(n).atomList,(i,d,x)=>{switch(x.type){case"remove":{const c=i(a).indexOf(x.atom);if(c>=0){const g=i(e);d(e,[...g.slice(0,c),...g.slice(c+1)])}break}case"insert":{const c=x.before?i(a).indexOf(x.before):i(a).length;if(c>=0){const g=i(e);d(e,[...g.slice(0,c),x.value,...g.slice(c)])}break}case"move":{const c=i(a).indexOf(x.atom),g=x.before?i(a).indexOf(x.before):i(a).length;if(c>=0&&g>=0){const w=i(e);c<g?d(e,[...w.slice(0,c),...w.slice(c+1,g),w[c],...w.slice(g)]):d(e,[...w.slice(0,g),w[c],...w.slice(g,c),...w.slice(c+1)])}break}}}):ne(i=>i(n).atomList);return a},e,t||qn)}function Gn(e){const t=Symbol(),s=ne(t);(qe?"production":void 0)!=="production"&&(s.debugPrivate=!0);const o=ne((n,a)=>{const i=n(s);return i!==t?i:e(n,a)},(n,a,i)=>{if(i===Nt)a(s,t);else if(typeof i=="function"){const d=n(o);a(s,i(d))}else a(s,i)});return o}const Yn=e=>typeof(e==null?void 0:e.then)=="function";function Wn(e){let t,s;const o={getItem:(n,a)=>{var i,d;const x=g=>{if(g=g||"",t!==g){try{s=JSON.parse(g)}catch{return a}t=g}return s},c=(d=(i=e())==null?void 0:i.getItem(n))!=null?d:null;return Yn(c)?c.then(x):x(c)},setItem:(n,a)=>{var i;return(i=e())==null?void 0:i.setItem(n,JSON.stringify(a))},removeItem:n=>{var a;return(a=e())==null?void 0:a.removeItem(n)}};return typeof window<"u"&&typeof window.addEventListener=="function"&&(o.subscribe=(n,a,i)=>{if(!(e()instanceof window.Storage))return()=>{};const d=x=>{if(x.storageArea===e()&&x.key===n){let c;try{c=JSON.parse(x.newValue||"")}catch{c=i}a(c)}};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}}),o}const Kn=Wn(()=>typeof window<"u"?window.localStorage:void 0);function ue(e,t,s=Kn,o){const n=o==null?void 0:o.unstable_getOnInit,a=ne(n?s.getItem(e,t):t);return(qe?"production":void 0)!=="production"&&(a.debugPrivate=!0),a.onMount=d=>{n||d(s.getItem(e,t));let x;return s.subscribe&&(x=s.subscribe(e,d,t)),x},ne(d=>d(a),(d,x,c)=>{const g=typeof c=="function"?c(d(a)):c;return g===Nt?(x(a,t),s.removeItem(e)):g instanceof Promise?g.then(w=>(x(a,w),s.setItem(e,w))):(x(a,g),s.setItem(e,g))})}const He=p.atom(null);He.debugLabel="chaiBuilderPropsAtom";const _t=p.atom({});_t.debugLabel="chaiExternalDataAtom";const Xn=()=>!1,Jn=e=>{const t=e.replace(X.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}},Oe=l.memoize((e,t)=>{if(!e)return!0;const s=Se.getBlockComponent(e);return s&&l.has(s,"canAcceptBlock")?s.canAcceptBlock(t):!1}),ki=l.memoize((e,t)=>{const s=Se.getBlockComponent(t);return s&&l.has(s,"canBeNested")?s.canBeNested(e):!0}),Zn=l.memoize(e=>{const t=Se.getBlockComponent(e);return t&&l.has(t,"canDuplicate")?t.canDuplicate():!0}),Qn=l.memoize(e=>{const t=Se.getBlockComponent(e);return t&&l.has(t,"canDelete")?t.canDelete():!0});function Bt(e,t,s){const o=l.filter(e,a=>a._parent===t),n=[];for(let a=0;a<o.length;a++){const i=Tt(o[a]);if(Object.keys(i).length>0&&Object.keys(i).forEach(d=>{o[a][d]=`slot:${ae.generateUUID()}`}),l.filter(e,{_parent:o[a]._id}).length>0){const d=ae.generateUUID();n.push({...o[a],oldId:o[a]._id,_id:d,_parent:s}),n.push(l.flatten(Bt(e,o[a]._id,d)))}else n.push({...o[a],oldId:o[a]._id,_id:ae.generateUUID(),_parent:s})}return l.flatten(n)}function Pt(e){const t={};e.forEach(o=>{t[o._id]={...o,children:[]}});const s=[];return e.forEach(o=>{if(o._parent){const n=t[o._parent];n&&n.children.push(t[o._id])}else s.push(t[o._id])}),s}const Tt=e=>{const t={};return Object.keys(e).forEach(s=>{l.isString(e[s])&&e[s].startsWith("slot")&&(t[s]=e[s].replace("slot:",""))}),t},er=(e,t,s=null)=>{let o=l.find(e,{_id:t});o={...o,oldId:o._id,_id:ae.generateUUID()},s&&(o={...o,_parent:s});const n=[o];l.filter(e,{_parent:t}).length>0&&n.push(l.flatten(Bt(e,t,o._id)));const a=l.flatten(n);return l.map(a,i=>{const d=i,x=Tt(d);return Object.keys(x).length>0&&Object.keys(x).forEach(c=>{const g=l.find(a,{oldId:x[c].replace("slot:","")});d[c]=`slot:${g._id}`}),l.omit(d,["global","oldId"])})};const ee=p.atom([]);ee.debugLabel="presentBlocksAtom";const Mt=p.atom(e=>{const t=e(ee);return Pt([...t])});Mt.debugLabel="treeDSBlocks";ee.debugLabel="presentBlocksAtom";const $e=$n(ee);$e.debugLabel="pageBlocksAtomsAtom";const tr=p.atom("");tr.debugLabel="builderActivePageAtom";const sr=p.atom(-1);sr.debugLabel="destinationDropIndexAtom";const It=p.atom([]);It.debugLabel="buildingBlocksAtom";const or=p.atom(e=>{const t=e(It);return l.filter(t,s=>l.has(s,"blockId"))});or.debugLabel="globalBlocksAtom";const Ge=p.atom([]);Ge.debugLabel="selectedBlockIdsAtom";const Ye=p.atom(e=>{const t=e(ee),s=e(Ge);return l.map(l.filter(t,({_id:o})=>l.includes(s,o)),o=>({...o}))});Ye.debugLabel="selectedBlocksAtom";const Ae=p.atom(e=>{const t=e(Ye);if(t.length===0)return null;if(t.length===1)return t[0]});Ae.debugLabel="selectedBlockAtom";const nr=e=>l.get(e,"_parent",null),rr=p.atom(e=>{const t=e(Ye),s=l.map(t,nr);return l.filter(e(ee),o=>l.includes(s,o._id))});rr.debugLabel="selectedBlocksParentsAtom";const Dt=p.atom(()=>!1);Dt.debugLabel="selectedBlockFlexChildAtom";const Lt=p.atom(()=>!1);Lt.debugLabel="selectedBlockGridChildAtom";const We=p.atom("");We.debugLabel="styleStateAtom";const Ot=ue("styleBreakpoint","xs");Ot.debugLabel="styleBreakpointAtom";const ar=()=>({flexChild:p.useAtomValue(Dt),gridChild:p.useAtomValue(Lt)}),ir=()=>p.useAtomValue(Ae),Ri=p.atom(e=>{const t=e(Ae),s=e(ee);let o=t;const n=[t];do{const a=s.find(({_id:i})=>i===(o==null?void 0:o._parent));o=a,a&&n.push(a)}while(o!=null&&o._parent);return n});const be=()=>{const[e,t]=p.useAtom(Ge),s=R.useCallback(o=>{t(n=>l.includes(n,o)?l.without(n,o):[...n,o])},[t]);return[e,t,s]},ze=e=>{switch(e.type){case"singular":return e.uiSchema;case"model":const{properties:t}=e,s={};return Object.keys(t).forEach(a=>{const i=t[a];if(l.includes(["slot","styles"],i.type))return;const d=a;s[d]=ze(i)}),s;case"list":const{itemProperties:o}=e,n={items:{}};return Object.keys(o).forEach(a=>{const i=o[a];if(l.includes(["slot","styles"],i.type))return;const d=a;n.items[d]=ze(i)}),n;default:return{}}},Ve=e=>{switch(e.type){case"singular":return e.schema;case"model":const{properties:t,title:s}=e,o={title:s,type:"object",properties:{}};return Object.keys(t).forEach(d=>{const x=t[d];if(l.includes(["slot","styles"],x.type))return;const c=d;o.properties[c]=Ve(x)}),o;case"list":const{itemProperties:n,title:a}=e,i={title:a,type:"array",items:{type:"object",properties:{}}};return Object.keys(n).forEach(d=>{const x=n[d];if(l.includes(["slot","styles"],x.type))return;const c=d;i.items.properties[c]=Ve(x),l.set(i.items,"title",l.get(x,"itemTitle",`${a} item`))}),i;default:return{}}},zt=e=>{if(!e)return{};const t={};return Object.keys(e).forEach(s=>{t[s]=cr(e[s])}),t},lr=e=>{if(l.isEmpty(e.default))return[];const{itemProperties:t}=e;return l.map(e.default,s=>{const o={...s};return l.forIn(s,(n,a)=>{l.has(t,a)&&l.get(t[a],"i18n",!1)&&(o[a]=X.I18N_KEY)}),o})},cr=e=>{switch(e.type){case"styles":return e.default;case"slot":return`${X.SLOT_KEY}${ae.generateUUID()}`;case"singular":const{schema:t}=e;return l.get(t,"default","");case"model":return zt(e.properties);case"list":return lr(e);default:return""}};const dr=(e,t)=>{const s={};return l.set(s,e,t),s};var Ke={exports:{}},Ci=Ke.exports;(function(e){(function(){"use strict";function t(o,n,a){return o.splice(n,!a||1+a-n+(!(a<0^n>=0)&&(a<0||-1)*o.length)),o.length}let s=function(){let o=[],n=-1,a=0,i=!1,d;function x(c,g){return!c||typeof c[g]!="function"?this:(i=!0,c[g](),i=!1,this)}return{add:function(c){return i?this:(o.splice(n+1,o.length-n),o.push(c),a&&o.length>a&&t(o,0,-(a+1)),n=o.length-1,d&&d(),this)},setCallback:function(c){d=c},undo:function(){let c=o[n];if(!c)return this;const g=c.groupId;for(;c.groupId===g&&(x(c,"undo"),n-=1,c=o[n],!(!c||!c.groupId)););return d&&d(),this},redo:function(){let c=o[n+1];if(!c)return this;const g=c.groupId;for(;c.groupId===g&&(x(c,"redo"),n+=1,c=o[n+1],!(!c||!c.groupId)););return d&&d(),this},clear:function(){let c=o.length;o=[],n=-1,d&&c>0&&d()},hasUndo:function(){return n!==-1},hasRedo:function(){return n<o.length-1},getCommands:function(c){return c?o.filter(g=>g.groupId===c):o},getIndex:function(){return n},setLimit:function(c){a=c}}};e.exports?e.exports=s:window.UndoManager=s})()})(Ke);var ur=Ke.exports;const mr=Nn.getDefaultExportFromCjs(ur),pr=p.atom(X.BRANDING_OPTIONS_DEFAULTS),fr=p.atom(null),Xe=()=>{const[e,t]=p.useAtom(pr);return[l.isObject(e)?{...X.BRANDING_OPTIONS_DEFAULTS,...e}:X.BRANDING_OPTIONS_DEFAULTS,t]},xr=()=>p.useAtom(fr),gr=p.atom(null),Vt=()=>({currentPage:p.useAtomValue(gr)});function Ft(e){return Pt(e)}const Je=(e,t)=>l.flatten(e.map(s=>{if(s=t?{...s,_parent:t}:{...s},s.children){const o=[...s.children];return delete s.children,l.flatten([s,...Je(o,s._id)])}return s}));function Ze(e,t=!1){for(let s=0;s<e.length;s++){const o=e[s];o.global&&!t?e[s]={type:"GlobalBlock",blockId:o.blockId,_parent:l.get(o,"_parent",null),_id:o._id}:o.children&&o.children.length&&Ze(o.children)}}function Ut(e){let t=[],s=l.filter(e,{type:"GlobalBlock"});return s.length>0&&(s=l.map(s,qt),l.each(s,o=>{t=[...t,...hr(o)]})),t}function hr(e){let t=[];const s=l.get(l.first(e),"_parent",null);l.set(l.first(e),"_parent",null);const o=[flatToNestedInstance.convert(Ht(e))];Ze(o,!0);let n=Je(o,e[0]._id);return n=l.set(n,"0._parent",s),t=[...t,n,...Ut(n)],t}function qt(e){const t=l.find(Fe,{_id:e._id});if(!t)return[];const s=[t],o=l.filter(Fe,{_parent:e._id});return o.length?l.flatten([...s,...l.flatten(l.map(o,qt))]):l.flatten(s)}const Ht=e=>JSON.parse(JSON.stringify(e));let Fe=[];function br(e){Fe=e;const t=Ft(Ht(e));Ze(t);const s=Je(t,null),o=Ut(s),n={};return l.each(o,a=>l.set(n,l.first(a).blockId,a)),[s,n]}const $t=()=>{const[e]=Xe(),{currentPage:t}=Vt(),[s]=me();return R.useCallback(()=>{const o=l.map(s,a=>l.omit(a,["expanded","order","title","siblings","tempClasses"])),[n=[]]=br(o);return{currentPage:t,blocks:n}},[e,t,s])},Q=(e,t=void 0)=>{const s=p.useAtomValue(He);return l.get(s,e,t)},Qe=p.atom([]);Qe.debugLabel="dataProvidersAtom";const Gt=()=>p.useAtom(Qe),Ne=p.atom("SAVED");Ne.debugLabel="builderSaveStateAtom";const vr=()=>{const[e,t]=p.useAtom(Ne),s=Q("onSavePage",async c=>{}),o=Q("onSave",async c=>{}),n=Q("onSaveStateChange",l.noop),a=$t(),[i]=Gt(),[d]=Xe();return{savePage:_n.useThrottledCallback(async()=>{t("SAVING"),n("SAVING");const c=a();return await s({blocks:c.blocks,providers:i}),await o({blocks:c.blocks,providers:i,brandingOptions:d,themeConfiguration:d}),setTimeout(()=>{t("SAVED"),n("SAVED")},100),!0},[a,t,d,o,n],3e3),saveState:e,setSaveState:t}},re=new mr;re.setLimit(50);const et=()=>{const[,e]=p.useAtom(Ne),t=Q("onSaveStateChange",l.noop);return R.useEffect(()=>(re.setCallback(()=>{e("UNSAVED"),t("UNSAVED")}),()=>{re.setCallback(l.noop)}),[]),{add:re.add,undo:re.undo,redo:re.redo,hasRedo:re.hasRedo,hasUndo:re.hasUndo,clear:re.clear}},tt=(e,t)=>{const s=[],o=l.filter(e,n=>l.includes(t,n._id)||l.includes(t,n._parent)?(s.push(n._id),!1):!0);return l.isEmpty(s)?o:tt(o,s)},yr=()=>{const[e]=me(),[t,s]=be(),{setNewBlocks:o}=te();return R.useCallback(n=>{var i;const a=((i=l.find(e,{_id:n[0]}))==null?void 0:i._parent)||null;o(tt(e,n)),setTimeout(()=>s(a?[a]:[]),200)},[e,s,t])};function jr(e,t,s,o){let n=e.filter(d=>!d._parent);s&&(n=e.filter(d=>d._parent===s));const a=o!==void 0?o:n.length;let i=e.length;for(let d=0,x=0;d<e.length;d++)if(e[d]._parent===s){if(x===a){i=d;break}x++}return!s&&o!==void 0&&o>=n.length&&(i=e.length),[...e.slice(0,i),...t,...e.slice(i)]}function wr(e){let t=[];return e.walk(s=>(delete s.model.children,t.push(s.model),!0)),t}function ft(e,t){return e.first(s=>s.model._id===t)||null}function kr(e,t,s,o){const n=ft(e,t),a=ft(e,s);if(n&&a){n.drop(),a.children||(a.model.children=[]);try{a.addChildAtIndex(n,o)}catch(i){return console.error("Error adding child to parent:",i),!1}return!0}return!1}function Rr(e,t,s,o){if(!t)return e;s=s||"root";const a=new Bn().parse({_id:"root",children:Ft(e)});if(kr(a,t,s,o)){const i=wr(a),d=i.find(x=>x._id===t);return d&&(d._parent=s==="root"?null:s),i.shift(),i}return e}const Cr=()=>{const[,e]=me();return{setNewBlocks:t=>{e(t)},addBlocks:(t,s,o)=>{e(n=>jr(n,t,s,o))},removeBlocks:t=>{e(s=>tt(s,t))},moveBlocks:(t,s,o)=>{e(n=>{let a=n;for(let i=0;i<t.length;i++)a=Rr(a,t[i],s,o);return a})},updateBlocksProps:t=>{e(s=>{const o=t.map(n=>n._id);return s.map(n=>{if(o.includes(n._id)){const a=l.find(t,{_id:n._id});return{...n,...l.omit(a,"_id")}}return n})})}}},me=()=>p.useAtom(ee),te=()=>{const{add:e}=et(),[t]=me(),{setNewBlocks:s,addBlocks:o,removeBlocks:n,moveBlocks:a,updateBlocksProps:i}=Cr();return{moveBlocks:(k,E,_)=>{const F=l.map(k,I=>{const G=t.find(K=>K._id===I)._parent||null,se=t.filter(K=>G?K._parent===G:!K._parent).map(K=>K._id).indexOf(I);return{_id:I,oldParent:G,oldPosition:se}}),P=F.find(({_id:I})=>I===k[0]);P&&P.oldParent===E&&P.oldPosition===_||(a(k,E,_),e({undo:()=>l.each(F,({_id:I,oldParent:V,oldPosition:G})=>{a([I],V,G)}),redo:()=>a(k,E,_)}))},addBlocks:(k,E,_)=>{o(k,E,_),e({undo:()=>n(l.map(k,"_id")),redo:()=>o(k,E,_)})},removeBlocks:k=>{var P;const E=(P=l.first(k))==null?void 0:P._parent,F=t.filter(I=>E?I._parent===E:!I._parent).indexOf(l.first(k));n(l.map(k,"_id")),e({undo:()=>o(k,E,F),redo:()=>n(l.map(k,"_id"))})},updateBlocks:(k,E,_)=>{let F=[];if(_)F=l.map(k,P=>({_id:P,..._}));else{const P=l.keys(E);F=l.map(k,I=>{const V=t.find(U=>U._id===I),G={_id:I};return l.each(P,U=>G[U]=V[U]),G})}i(l.map(k,P=>({_id:P,...E}))),e({undo:()=>i(F),redo:()=>i(l.map(k,P=>({_id:P,...E})))})},updateBlocksRuntime:(k,E)=>{i(l.map(k,_=>({_id:_,...E})))},setNewBlocks:k=>{s(k),e({undo:()=>s(t),redo:()=>s(k)})},updateMultipleBlocksProps:k=>{let E=[];E=l.map(k,_=>{const F=l.keys(_),P=t.find(V=>V._id===_._id),I={};return l.each(F,V=>I[V]=P[V]),I}),i(k),e({undo:()=>i(E),redo:()=>i(k)})}}},Sr=()=>{const[e]=me(),[,t]=be(),{addBlocks:s}=te(),o=R.useCallback((a,i,d)=>{var C;for(let O=0;O<a.length;O++){const{_id:k}=a[O];a[O]._id=ae.generateUUID();const E=l.filter(a,{_parent:k});for(let _=0;_<E.length;_++)E[_]._parent=a[O]._id}const x=l.first(a);let c,g;return i&&(c=l.find(e,{_id:i}),a[0]._parent=i,g=i),!(c?Oe(c==null?void 0:c._type,x._type):!0)&&c&&(a[0]._parent=c._parent,g=c._parent),s(a,g,d),t([(C=l.first(a))==null?void 0:C._id]),l.first(a)},[e,t]);return{addCoreBlock:R.useCallback((a,i,d)=>{if(l.has(a,"blocks")){const _=a.blocks;return o(_,i,d)}const x=ae.generateUUID(),c=zt(a.props),g=[];l.forIn(c,(_,F)=>{if(l.startsWith(_,X.SLOT_KEY)){const P=_.replace(X.SLOT_KEY,"");g.push({_id:P,_type:"Slot",_parent:x,_name:a.props[F].name,_styles:a.props[F].styles,_emptyStyles:a.props[F].emptyStyles})}});const w={_type:a.type,_id:x,...c};let C,O;i&&(C=l.find(e,{_id:i}),w._parent=i,O=i),!Oe(C==null?void 0:C._type,w._type)&&C&&(w._parent=C._parent,O=C._parent);const E=[w,...g];return s(E,O,d),t([w._id]),w},[o,e,t]),addPredefinedBlock:o}},xt={xs:420,sm:620,md:768,lg:1024,xl:1280,"2xl":1536},gt=["xs","sm","md","lg","xl","2xl"];function Er(e,t){if(t===null)return"baseClasses";const s=t.mq;if(s==="xs"||t.dark||t.mod!=="")return"classes";let o="baseClasses",n=gt.indexOf(s);for(;n>0;){const a=gt[n-1];if(l.find(e,{mq:a,property:t.property})){o="classes";break}n--}return o}const ht=[];function Ar(e="",t="",s=[]){e=e.trim().replace(/ +/g,"");let o=l.filter(l.map(e.split(" "),u.constructClassObject),c=>!l.isNull(c)),n=l.filter(l.map(t.split(" "),u.constructClassObject),c=>!l.isNull(c));n=l.filter(n,c=>!l.includes(ht,c.property));const a=[],i=[];l.each(s,c=>{const g=u.constructClassObject(c),w=l.find(o,l.pick(g,["dark","mq","mod","property"]));if(w&&(o=l.filter(o,C=>C.fullCls!==(w==null?void 0:w.fullCls))),a.push(g),g.mq==="xs"&&!g.dark&&g.mod===""&&(n=l.filter(n,C=>C.property!==g.property)),Er(o,g)==="baseClasses"&&!l.includes(ht,g.property)){const C=l.find(n,l.pick(g,["property"]));w&&(n=l.filter(n,O=>O.fullCls!==(C==null?void 0:C.fullCls))),i.push({...g,fullCls:g.cls,mq:"xs"})}});const d=l.map(l.sortBy([...o,...a],c=>xt[c.mq]),"fullCls").join(" ");return`${l.map(l.sortBy([...n,...i],c=>xt[c.mq]),"fullCls").join(" ").trim()},${d.trim()}`.trim().replace(/ +/g,"")}const ve=p.atom([]);ve.debugLabel="selectedStylingBlocksAtom";const Yt=()=>p.useAtom(ve),Nr=e=>{const t=e.replace(X.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}},_r=p.atom(null,(e,t,{blockIds:s,newClasses:o})=>{const n=l.filter(e($e),i=>s.includes(e(i)._id)),a=l.first(e(ve));return l.map(n,i=>{const d=e(i),x=l.get(d,a.prop,`${X.STYLES_KEY},`),{baseClasses:c,classes:g}=Nr(x);return{ids:[d._id],props:{[a.prop]:`${X.STYLES_KEY}${Ar(g,c,o)}`}}})}),Br=()=>{const e=p.useSetAtom(_r),{updateBlocks:t,updateBlocksRuntime:s}=te();return R.useCallback((o,n,a=!1)=>{const i=e({blockIds:o,newClasses:n});if(!a){s(o,i[0].props);return}t(o,i[0].props)},[e])},Wt=()=>p.useAtom(Ot),Kt=ue("canvasWidth",800),Xt=p.atom(e=>{const t=e(Kt);return ae.getBreakpointValue(t).toLowerCase()}),Pr=()=>{const[e,t]=p.useAtom(Kt),s=p.useAtomValue(Xt),[o,n]=Wt();return R.useEffect(()=>{o!=="xs"&&n(s)},[s,o,n]),[e,s,t]},Tr=ue("canvasZoom",100),Mr=()=>p.useAtom(Tr),Jt=p.atom([]),Zt=()=>{const[e,t]=p.useAtom(Jt),s=p.useSetAtom(st),o=R.useCallback(n=>{t(n),s([])},[t,s]);return[e,o]},st=p.atom([]),Ir=()=>{const[e,t]=p.useAtom(st),s=p.useSetAtom(Jt),o=R.useCallback(n=>{t(n),s([])},[t,s]);return[e,o]},Qt=ue("darkMode",!1),Dr=()=>{const[e,t]=p.useAtom(Qt);return[e,t]},es=()=>{const[e]=me(),[,t]=be(),{addBlocks:s}=te();return R.useCallback((o,n=null)=>{const a=[];l.each(o,i=>{const d=e.find(C=>C._id===i);n||(n=d._parent);const g=l.filter(e,C=>l.isString(n)?C._parent===n:!d._parent).indexOf(d)+1,w=er(e,i,n);s(w,n,g),a.push(l.get(w,"0._id",""))}),t(a)},[e,t])},Lr=p.atom([]),Or=()=>{const[e,t]=p.useAtom(Lr),s=R.useCallback(o=>{t(n=>l.includes(n,o)?l.without(n,o):[...n,o])},[t]);return[e,t,s]},zr=p.atom(""),ts=()=>p.useAtom(zr),Vr=()=>{const e=p.useAtomValue(ee);return R.useCallback((t,s)=>{const o=l.map(e,n=>(l.includes(t,l.get(n,"_id"))&&l.set(n,"_parent",s),n));console.log("newBlocks",o)},[e])},Fr=()=>{console.warn("usePasteBlocks is not implemented");const e=p.useAtomValue(st),[t,s]=Zt(),o=es(),n=Vr();return{canPaste:R.useMemo(()=>t.length>0||e.length>0,[e,t]),pasteBlocks:R.useCallback(i=>{l.isEmpty(e)?n(t,i):o(e,i),s(()=>[])},[t,e,o,n,s])}},Ur=p.atom(!1),qr=()=>{const[e,t]=p.useAtom(Ur);return[e,t]},Hr=p.atom(null,(e,t,{blockIds:s,fullClasses:o})=>{const n=l.first(e(ve)),a=l.filter(e($e),i=>s.includes(e(i)._id));return l.map(a,i=>{const d=e(i),x=o;let{classes:c,baseClasses:g}=Jn(l.get(d,n.prop,"styles:,"));return l.each(x,w=>{const C=w.replace(/[\[\]\/\\{}()*+?.^$|]/g,"\\$&"),O=new RegExp(`(^| )${C}($| )`,"g");c=c.replace(O," ").replace(/ +/g," ").trim();const k=l.first(w.split(":"));l.includes(["2xl","xl","lg","md","sm"],k)&&x.push(w.split(":").pop().trim())}),l.each(x,w=>{const C=new RegExp(`(^| )${w.replace("[","\\[").replace("]","\\]")}($| )`,"g");g=g.replace(C," ").replace(/ +/g," ").trim()}),{ids:[d._id],props:{[n.prop]:`${X.STYLES_KEY}${g},${c}`}}})}),$r=()=>{const{updateBlocks:e}=te(),t=p.useSetAtom(Hr);return R.useCallback((s,o)=>{const n=t({blockIds:s,fullClasses:o});e(s,n[0].props)},[t])},ss=p.atom(e=>{const t=l.first(e(ve)),s=e(Ae);if(!t||t.blockId!==l.get(s,"_id",null))return[];const n=l.get(s,t.prop,`${X.STYLES_KEY},`).replace(X.STYLES_KEY,"").split(",").join(" ");return l.filter(l.map(n.trim().split(" "),u.constructClassObject),a=>!l.isNull(a))}),Gr=()=>p.useAtomValue(ss),bt={xs:0,sm:1,md:2,lg:3,xl:4,"2xl":5},Yr=p.atom(e=>{const t=e(Xt),s=e(We),o=e(Qt),n=Wr(t);let a=l.filter(e(ss),{mod:s});return l.startsWith(s,"_")||(a=l.filter(a,i=>n.includes(i.mq))),a=a.sort((i,d)=>bt[i.mq]-bt[d.mq]),o||(a=l.filter(a,{dark:!1})),a}),Wr=e=>{let t=[];switch(e){case"xs":t=["xs"];break;case"sm":t=["xs","sm"];break;case"md":t=["xs","sm","md"];break;case"lg":t=["xs","sm","md","lg"];break;case"xl":t=["xs","sm","md","lg","xl"];break;case"2xl":t=["xs","sm","md","lg","xl","2xl"];break;default:t=["xs"];break}return t},Kr=()=>p.useAtomValue(Yr),Xr=()=>p.useAtom(We),Jr=()=>{const{updateBlocks:e}=te();return R.useCallback((t,s,o)=>{e(t,s,o)},[e])},Zr=()=>{const{updateMultipleBlocksProps:e}=te();return R.useCallback(t=>{e(t)},[e])},Qr=()=>{const{updateBlocksRuntime:e}=te();return R.useCallback(async(t,s,o=30)=>{const n=l.keys(l.omit(s,["_id"]));for(const a of n){const i=s[a];if(l.isString(i)){const d=l.chunk(i.split(""),12);let x="";e([t],{[a]:""});for(let c=0;c<d.length;c++)x+=d[c].join(""),e([t],{[a]:x}),await new Promise(g=>setTimeout(g,o))}}},[e])},ea=()=>{const{updateMultipleBlocksProps:e}=te(),t=Qr();return R.useCallback(async s=>{for(const o of s)await t(o._id,o);e(s)},[e])},ta=()=>{const{updateBlocksRuntime:e}=te();return R.useCallback((t,s)=>{e(t,s)},[e])},os={name:"",props:{},modalProps:{},backdropClose:!0},sa=p.atom(os),oa=()=>{const[e,t]=p.useAtom(sa),s=R.useCallback((n,a={},i={})=>{t({name:n,props:a,modalProps:i})},[t]),o=R.useCallback((...n)=>{l.get(e,"props.onClose",()=>{})(...n),t(os)},[t,e]);return{activeModal:e,openModal:s,closeModal:o}},na=()=>(console.warn("useAllBlocks is deprecated, use useBlocksStore() instead"),p.useAtomValue(ee)),ns=p.atom(!1);ns.debugLabel="readOnlyModeAtom";const rs=p.atom("online");rs.debugLabel="networkModeAtom";const ra=p.atom(!1);ra.debugLabel="editLayerNameAtom";const aa=p.atom("");aa.debugLabel="activeLanguageAtom";const ia=p.atom("");ia.debugLabel="primaryLanguageAtom";const as=p.atom(null);as.debugLabel="canvasIframeAtom";const is=p.atom("outline");is.debugLabel="activePanelAtom";const ls=p.atom("");ls.debugLabel="showPredefinedBlockCategoryAtom";const cs=p.atom({undoCount:0,redoCount:0});cs.debugLabel="historyStatesAtom";const ds=p.atom("");ds.debugLabel="inlineEditingActiveAtom";const us=p.atom(!1);us.debugLabel="draggingFlagAtom";const ms=p.atom(null);ms.debugLabel="treeRefAtom";const ps=p.atom({});ps.debugLabel="canvasSettingsAtom";const ot=p.atom(!1);ot.debugLabel="askAiActiveBlockAtom";const la=p.atom(!1);la.debugLabel="codeEditorOpenAtom";const ca=ue("codeEditorHeight",500);ca.debugLabel="codeEditorHeightAtom";const fs=p.atom([]);fs.debugLabel="xShowBlocksAtom";const da=()=>p.useAtomValue(ns),ua=p.atom(""),ma=p.atom(null),pa=()=>p.useAtom(ua),fa=()=>p.useAtom(ma),xa=ue("selectedBreakpoints",["XS","MD","XL"]),ga=()=>{const[e,t]=p.useAtom(xa);return[e,t]},ha=()=>{const e=p.useSetAtom(cs),{clear:t}=et(),[,s]=be(),[,o]=ts(),[,n]=Yt(),[,a]=At(ot);return()=>{s([]),n([]),o(""),t(),a(!1),e({undoCount:0,redoCount:0})}},ba=()=>({data:Q("uiLibraries",[]),isLoading:!1}),va=()=>{const[e,t]=R.useState(null),s=R.useCallback(async o=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(o),t(o),!0}catch(n){return console.warn("Copy failed",n),t(null),!1}},[]);return[e,s]},ya=p.atom(null),ja=()=>p.useAtom(ya),xs=ce.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),gs=f.forwardRef(({className:e,variant:t,size:s,...o},n)=>r.jsxRuntimeExports.jsx(wt.Root,{ref:n,className:u.cn(xs({variant:t,size:s,className:e})),...o}));gs.displayName=wt.Root.displayName;const hs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Le.Root,{className:u.cn("peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",e),...t,ref:s,children:r.jsxRuntimeExports.jsx(Le.Thumb,{className:u.cn("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950")})}));hs.displayName=Le.Root.displayName;const _e=ce.cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),bs=f.forwardRef(({className:e,variant:t,size:s,asChild:o=!1,...n},a)=>{const i=o?un.Slot:"button";return r.jsxRuntimeExports.jsx(i,{className:u.cn(_e({variant:t,size:s,className:e})),ref:a,...n})});bs.displayName="Button";const wa=le.Root,vs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(le.Item,{ref:s,className:u.cn("border-b",e),...t}));vs.displayName="AccordionItem";const ys=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsx(le.Header,{className:"flex",children:r.jsxRuntimeExports.jsxs(le.Trigger,{ref:o,className:u.cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...s,children:[t,s.hideArrow?null:r.jsxRuntimeExports.jsx(Y.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));ys.displayName=le.Trigger.displayName;const js=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsx(le.Content,{ref:o,className:u.cn("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...s,children:r.jsxRuntimeExports.jsx("div",{className:"pb-4 pt-0",children:t})}));js.displayName=le.Content.displayName;const ka=ce.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ws=f.forwardRef(({className:e,variant:t,...s},o)=>r.jsxRuntimeExports.jsx("div",{ref:o,role:"alert",className:u.cn(ka({variant:t}),e),...s}));ws.displayName="Alert";const ks=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("h5",{ref:s,className:u.cn("mb-1 font-medium leading-none tracking-tight",e),...t}));ks.displayName="AlertTitle";const Rs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("text-sm [&_p]:leading-relaxed",e),...t}));Rs.displayName="AlertDescription";const Cs=ce.cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Ra=({className:e,variant:t,...s})=>r.jsxRuntimeExports.jsx("div",{className:u.cn(Cs({variant:t}),e),...s}),Ca=W.Root,Sa=W.Trigger,Ss=({className:e,...t})=>r.jsxRuntimeExports.jsx(W.Portal,{className:u.cn(e),...t});Ss.displayName=W.Portal.displayName;const Es=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(W.Overlay,{className:u.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:s}));Es.displayName=W.Overlay.displayName;const As=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsxs(Ss,{children:[r.jsxRuntimeExports.jsx(Es,{}),r.jsxRuntimeExports.jsx(W.Content,{ref:s,className:u.cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...t})]}));As.displayName=W.Content.displayName;const Ns=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ns.displayName="AlertDialogHeader";const _s=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_s.displayName="AlertDialogFooter";const Bs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(W.Title,{ref:s,className:u.cn("text-lg font-semibold",e),...t}));Bs.displayName=W.Title.displayName;const Ps=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(W.Description,{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));Ps.displayName=W.Description.displayName;const Ts=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(W.Action,{ref:s,className:u.cn(_e(),e),...t}));Ts.displayName=W.Action.displayName;const Ms=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(W.Cancel,{ref:s,className:u.cn(_e({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ms.displayName=W.Cancel.displayName;const nt=M.Root,Is=M.Trigger,Ds=({className:e,...t})=>r.jsxRuntimeExports.jsx(M.Portal,{className:u.cn(e),...t});Ds.displayName=M.Portal.displayName;const Ls=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(M.Overlay,{ref:s,className:u.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ls.displayName=M.Overlay.displayName;const Be=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(Ds,{children:[r.jsxRuntimeExports.jsx(Ls,{}),r.jsxRuntimeExports.jsxs(M.Content,{ref:o,className:u.cn("fixed left-[50%] top-[50%] z-[999] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...s,children:[t,r.jsxRuntimeExports.jsxs(M.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsxRuntimeExports.jsx(Y.Cross2Icon,{className:"h-4 w-4"}),r.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Be.displayName=M.Content.displayName;const Os=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Os.displayName="DialogHeader";const zs=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zs.displayName="DialogFooter";const Vs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(M.Title,{ref:s,className:u.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));Vs.displayName=M.Title.displayName;const Fs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(M.Description,{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));Fs.displayName=M.Description.displayName;const Us=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Us.displayName="Card";const qs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("flex flex-col space-y-1.5 p-6",e),...t}));qs.displayName="CardHeader";const Hs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("h3",{ref:s,className:u.cn("font-semibold leading-none tracking-tight",e),...t}));Hs.displayName="CardTitle";const $s=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("p",{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));$s.displayName="CardDescription";const Gs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("p-6 pt-0",e),...t}));Gs.displayName="CardContent";const Ys=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn(" flex items-center p-6 pt-0",e),...t}));Ys.displayName="CardFooter";const Ws=f.forwardRef(({className:e,type:t,...s},o)=>r.jsxRuntimeExports.jsx("input",{type:t,className:u.cn("flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...s,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));Ws.displayName="Input";const Ea=ce.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ks=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(kt.Root,{ref:s,className:u.cn(Ea(),e),...t}));Ks.displayName=kt.Root.displayName;const Xs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("textarea",{className:u.cn("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...t,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));Xs.displayName="Textarea";const Js=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(ie.Root,{ref:o,className:u.cn("relative overflow-hidden",e),...s,children:[r.jsxRuntimeExports.jsx(ie.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),r.jsxRuntimeExports.jsx(rt,{}),r.jsxRuntimeExports.jsx(ie.Corner,{})]}));Js.displayName=ie.Root.displayName;const rt=f.forwardRef(({className:e,orientation:t="vertical",...s},o)=>r.jsxRuntimeExports.jsx(ie.ScrollAreaScrollbar,{ref:o,orientation:t,className:u.cn("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",e),...s,children:r.jsxRuntimeExports.jsx(ie.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));rt.displayName=ie.ScrollAreaScrollbar.displayName;const Zs=de.Root,at=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(de.List,{ref:s,className:u.cn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));at.displayName=de.List.displayName;const Re=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(de.Trigger,{ref:s,className:u.cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Re.displayName=de.Trigger.displayName;const Ce=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(de.Content,{ref:s,className:u.cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ce.displayName=de.Content.displayName;const Aa=fe.Portal,Na=fe.Provider,_a=fe.Root,Ba=fe.Trigger,Qs=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>r.jsxRuntimeExports.jsx(fe.Content,{ref:o,sideOffset:t,className:u.cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s}));Qs.displayName=fe.Content.displayName;const Pa=he.Root,Ta=he.Trigger,eo=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},n)=>r.jsxRuntimeExports.jsx(he.Portal,{children:r.jsxRuntimeExports.jsx(he.Content,{ref:n,align:t,sideOffset:s,className:u.cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));eo.displayName=he.Content.displayName;const Ma=B.Menu,Ia=B.Group,Da=B.Portal,La=B.Sub,Oa=B.RadioGroup,to=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(B.Root,{ref:s,className:u.cn("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t}));to.displayName=B.Root.displayName;const so=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(B.Trigger,{ref:s,className:u.cn("flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t}));so.displayName=B.Trigger.displayName;const oo=f.forwardRef(({className:e,inset:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(B.SubTrigger,{ref:n,className:u.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...o,children:[s,r.jsxRuntimeExports.jsx(Y.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));oo.displayName=B.SubTrigger.displayName;const no=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(B.SubContent,{ref:s,className:u.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));no.displayName=B.SubContent.displayName;const ro=f.forwardRef(({className:e,align:t="start",alignOffset:s=-4,sideOffset:o=8,...n},a)=>r.jsxRuntimeExports.jsx(B.Portal,{children:r.jsxRuntimeExports.jsx(B.Content,{ref:a,align:t,alignOffset:s,sideOffset:o,className:u.cn("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));ro.displayName=B.Content.displayName;const ao=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(B.Item,{ref:o,className:u.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));ao.displayName=B.Item.displayName;const io=f.forwardRef(({className:e,children:t,checked:s,...o},n)=>r.jsxRuntimeExports.jsxs(B.CheckboxItem,{ref:n,className:u.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(B.ItemIndicator,{children:r.jsxRuntimeExports.jsx(Y.CheckIcon,{className:"h-4 w-4"})})}),t]}));io.displayName=B.CheckboxItem.displayName;const lo=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(B.RadioItem,{ref:o,className:u.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(B.ItemIndicator,{children:r.jsxRuntimeExports.jsx(Y.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));lo.displayName=B.RadioItem.displayName;const co=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(B.Label,{ref:o,className:u.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));co.displayName=B.Label.displayName;const uo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(B.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-muted",e),...t}));uo.displayName=B.Separator.displayName;const mo=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});mo.displayname="MenubarShortcut";const za=Ee.Root,Va=Ee.Trigger,po=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},n)=>r.jsxRuntimeExports.jsx(Ee.Content,{ref:n,align:t,sideOffset:s,className:u.cn("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));po.displayName=Ee.Content.displayName;const Fa=q.Root,Ua=q.Group,qa=q.Value,fo=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(q.Trigger,{ref:o,className:u.cn("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...s,children:[t,r.jsxRuntimeExports.jsx(q.Icon,{asChild:!0,children:r.jsxRuntimeExports.jsx(Y.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));fo.displayName=q.Trigger.displayName;const xo=f.forwardRef(({className:e,children:t,position:s="popper",...o},n)=>r.jsxRuntimeExports.jsx(q.Portal,{children:r.jsxRuntimeExports.jsx(q.Content,{ref:n,className:u.cn("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...o,children:r.jsxRuntimeExports.jsx(q.Viewport,{className:u.cn("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));xo.displayName=q.Content.displayName;const go=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(q.Label,{ref:s,className:u.cn("px-2 py-1.5 text-sm font-semibold",e),...t}));go.displayName=q.Label.displayName;const ho=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(q.Item,{ref:o,className:u.cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(q.ItemIndicator,{children:r.jsxRuntimeExports.jsx(Y.CheckIcon,{className:"h-4 w-4"})})}),r.jsxRuntimeExports.jsx(q.ItemText,{children:t})]}));ho.displayName=q.Item.displayName;const bo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(q.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-muted",e),...t}));bo.displayName=q.Separator.displayName;const Ha=M.Root,$a=M.Trigger,Ga=M.Close,vo=({className:e,...t})=>r.jsxRuntimeExports.jsx(M.Portal,{className:u.cn(e),...t});vo.displayName=M.Portal.displayName;const yo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(M.Overlay,{className:u.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:s}));yo.displayName=M.Overlay.displayName;const Ya=ce.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),jo=f.forwardRef(({side:e="right",className:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(vo,{children:[r.jsxRuntimeExports.jsx(yo,{}),r.jsxRuntimeExports.jsxs(M.Content,{ref:n,className:u.cn(Ya({side:e}),t),...o,children:[s,r.jsxRuntimeExports.jsxs(M.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r.jsxRuntimeExports.jsx(Y.Cross2Icon,{className:"h-4 w-4"}),r.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));jo.displayName=M.Content.displayName;const wo=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});wo.displayName="SheetHeader";const ko=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ko.displayName="SheetFooter";const Ro=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(M.Title,{ref:s,className:u.cn("text-lg font-semibold text-foreground",e),...t}));Ro.displayName=M.Title.displayName;const Co=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(M.Description,{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));Co.displayName=M.Description.displayName;const Wa=D.Root,Ka=D.Trigger,Xa=D.Group,Ja=D.Portal,Za=D.Sub,Qa=D.RadioGroup,So=f.forwardRef(({className:e,inset:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(D.SubTrigger,{ref:n,className:u.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...o,children:[s,r.jsxRuntimeExports.jsx(Y.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));So.displayName=D.SubTrigger.displayName;const Eo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(D.SubContent,{ref:s,className:u.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Eo.displayName=D.SubContent.displayName;const Ao=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>r.jsxRuntimeExports.jsx(D.Portal,{children:r.jsxRuntimeExports.jsx(D.Content,{ref:o,sideOffset:t,className:u.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));Ao.displayName=D.Content.displayName;const No=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(D.Item,{ref:o,className:u.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));No.displayName=D.Item.displayName;const _o=f.forwardRef(({className:e,children:t,checked:s,...o},n)=>r.jsxRuntimeExports.jsxs(D.CheckboxItem,{ref:n,className:u.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(D.ItemIndicator,{children:r.jsxRuntimeExports.jsx(Y.CheckIcon,{className:"h-4 w-4"})})}),t]}));_o.displayName=D.CheckboxItem.displayName;const Bo=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(D.RadioItem,{ref:o,className:u.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(D.ItemIndicator,{children:r.jsxRuntimeExports.jsx(Y.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Bo.displayName=D.RadioItem.displayName;const Po=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(D.Label,{ref:o,className:u.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));Po.displayName=D.Label.displayName;const To=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(D.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-muted",e),...t}));To.displayName=D.Separator.displayName;const Mo=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest opacity-60",e),...t});Mo.displayName="DropdownMenuShortcut";const Io=f.forwardRef(({className:e,orientation:t="horizontal",decorative:s=!0,...o},n)=>r.jsxRuntimeExports.jsx(Rt.Root,{ref:n,decorative:s,orientation:t,className:u.cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Io.displayName=Rt.Root.displayName;const ei=1,ti=1e6;let Ie=0;function si(){return Ie=(Ie+1)%Number.MAX_VALUE,Ie.toString()}const De=new Map,vt=e=>{if(De.has(e))return;const t=setTimeout(()=>{De.delete(e),ge({type:"REMOVE_TOAST",toastId:e})},ti);De.set(e,t)},Do=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ei)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=t;return s?vt(s):e.toasts.forEach(o=>{vt(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)}}},je=[];let we={toasts:[]};function ge(e){we=Do(we,e),je.forEach(t=>{t(we)})}function Lo({...e}){const t=si(),s=n=>ge({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>ge({type:"DISMISS_TOAST",toastId:t});return ge({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:s}}function Oo(){const[e,t]=f.useState(we);return f.useEffect(()=>(je.push(t),()=>{const s=je.indexOf(t);s>-1&&je.splice(s,1)}),[e]),{...e,toast:Lo,dismiss:s=>ge({type:"DISMISS_TOAST",toastId:s})}}const oi=Z.Provider,zo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Z.Viewport,{ref:s,className:u.cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));zo.displayName=Z.Viewport.displayName;const ni=ce.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Vo=f.forwardRef(({className:e,variant:t,...s},o)=>r.jsxRuntimeExports.jsx(Z.Root,{ref:o,className:u.cn(ni({variant:t}),e),...s}));Vo.displayName=Z.Root.displayName;const ri=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Z.Action,{ref:s,className:u.cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));ri.displayName=Z.Action.displayName;const Fo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Z.Close,{ref:s,className:u.cn("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:r.jsxRuntimeExports.jsx(Y.Cross2Icon,{className:"h-4 w-4"})}));Fo.displayName=Z.Close.displayName;const Uo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Z.Title,{ref:s,className:u.cn("text-sm font-semibold [&+div]:text-xs",e),...t}));Uo.displayName=Z.Title.displayName;const qo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Z.Description,{ref:s,className:u.cn("text-sm opacity-90",e),...t}));qo.displayName=Z.Description.displayName;function ai(){const{toasts:e}=Oo();return r.jsxRuntimeExports.jsxs(oi,{children:[e.map(({id:t,title:s,description:o,action:n,...a})=>r.jsxRuntimeExports.jsxs(Vo,{...a,children:[r.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[s&&r.jsxRuntimeExports.jsx(Uo,{children:s}),o&&r.jsxRuntimeExports.jsx(qo,{children:o})]}),n,r.jsxRuntimeExports.jsx(Fo,{})]},t)),r.jsxRuntimeExports.jsx(zo,{})]})}const ii=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("animate-pulse rounded-md bg-primary/10",e),...t}),it=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(J.Command,{ref:s,className:u.cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));it.displayName=J.Command.displayName;const li=({children:e,...t})=>r.jsxRuntimeExports.jsx(nt,{...t,children:r.jsxRuntimeExports.jsx(Be,{className:"overflow-hidden p-0",children:r.jsxRuntimeExports.jsx(it,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Ho=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[r.jsxRuntimeExports.jsx(Y.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),r.jsxRuntimeExports.jsx(J.Command.Input,{ref:s,className:u.cn("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Ho.displayName=J.Command.Input.displayName;const $o=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(J.Command.List,{ref:s,className:u.cn("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));$o.displayName=J.Command.List.displayName;const Go=f.forwardRef((e,t)=>r.jsxRuntimeExports.jsx(J.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Go.displayName=J.Command.Empty.displayName;const Yo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(J.Command.Group,{ref:s,className:u.cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Yo.displayName=J.Command.Group.displayName;const Wo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(J.Command.Separator,{ref:s,className:u.cn("-mx-1 h-px bg-border",e),...t}));Wo.displayName=J.Command.Separator.displayName;const Ko=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(J.Command.Item,{ref:s,className:u.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));Ko.displayName=J.Command.Item.displayName;const Xo=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Xo.displayName="CommandShortcut";const ci=L.Root,di=L.Trigger,ui=L.Group,mi=L.Portal,pi=L.Sub,fi=L.RadioGroup,Jo=f.forwardRef(({className:e,inset:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(L.SubTrigger,{ref:n,className:u.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...o,children:[s,r.jsxRuntimeExports.jsx(Y.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Jo.displayName=L.SubTrigger.displayName;const Zo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(L.SubContent,{ref:s,className:u.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Zo.displayName=L.SubContent.displayName;const Qo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(L.Portal,{children:r.jsxRuntimeExports.jsx(L.Content,{ref:s,className:u.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));Qo.displayName=L.Content.displayName;const en=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(L.Item,{ref:o,className:u.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));en.displayName=L.Item.displayName;const tn=f.forwardRef(({className:e,children:t,checked:s,...o},n)=>r.jsxRuntimeExports.jsxs(L.CheckboxItem,{ref:n,className:u.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(L.ItemIndicator,{children:r.jsxRuntimeExports.jsx(Y.CheckIcon,{className:"h-4 w-4"})})}),t]}));tn.displayName=L.CheckboxItem.displayName;const sn=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(L.RadioItem,{ref:o,className:u.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(L.ItemIndicator,{children:r.jsxRuntimeExports.jsx(Y.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));sn.displayName=L.RadioItem.displayName;const on=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(L.Label,{ref:o,className:u.cn("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...s}));on.displayName=L.Label.displayName;const nn=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(L.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-border",e),...t}));nn.displayName=L.Separator.displayName;const rn=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});rn.displayName="ContextMenuShortcut";const xi=e=>{try{const t=document.getElementById("icon-picker-field"),s=document.createElement("div");En.render(r.jsxRuntimeExports.jsx(jt.IconPickerItem,{value:e}),s),t.appendChild(s),s.hidden=!0;let o=s.innerHTML;setTimeout(()=>t.removeChild(s),100);const a=new DOMParser().parseFromString(o,"image/svg+xml"),i=a.querySelector("svg");return i&&(i.removeAttribute("width"),i.removeAttribute("height")),new XMLSerializer().serializeToString(a)}catch(t){return console.error(t),""}},gi=({value:e,onChange:t})=>{const s=o=>{t("<svg />");const n=xi(o);t(n)};return r.jsxRuntimeExports.jsxs("div",{className:"mt-1 flex h-20 items-center gap-x-2",id:"icon-picker-field",children:[r.jsxRuntimeExports.jsxs("div",{className:"group relative h-12 w-12",children:[r.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:e?e.replace("<svg",'<svg class="h-5 w-5"'):"<svg class='h-5 w-5' />"},className:"absolute left-1/2 top-1/2 z-0 -translate-x-1/2 -translate-y-1/2 transform cursor-pointer bg-white"}),r.jsxRuntimeExports.jsx(jt,{value:e?"BiSolidGrid":null,onChange:s,pickButtonStyle:{position:"relative",height:"48px",width:"48px",border:"1px solid #BBBBBB",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",backgroundColor:"transparent",zIndex:1},searchInputStyle:{backgroundColor:"transparent",width:"100%",border:"1px solid #BBBBBB",margin:"0px 10px",padding:"10px"}})]}),r.jsxRuntimeExports.jsx("textarea",{autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",value:e,onChange:o=>t(o.target.value),className:"h-full w-full rounded-sm border border-foreground/20 px-2 py-1 text-xs shadow-sm focus:border-gray-500/80 focus:outline-none focus:ring-0",placeholder:"Choose icon or enter svg"})]})},hi=R.lazy(()=>Promise.resolve().then(()=>require("./UnsplashImages-fm761J9M.cjs"))),bi=R.lazy(()=>Promise.resolve().then(()=>require("./UploadImages-2_SIuRI7.cjs"))),an=({isModalView:e=!1,onSelect:t=()=>{}})=>{const s=Q("uploadMediaCallback"),o=Q("unsplashAccessKey"),n=s===void 0,a=o===void 0,[i,d]=R.useState(a?"upload":n?"unsplash":"upload");return r.jsxRuntimeExports.jsxs("div",{className:"flex h-full flex-col",children:[r.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:r.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:e&&n?"Unsplash images":e?"Select or upload images":"Images"})}),r.jsxRuntimeExports.jsxs(Zs,{value:i,onValueChange:x=>d(x),className:"flex h-full w-full flex-col py-2",children:[!(n||a)&&r.jsxRuntimeExports.jsxs(at,{className:"w-full",children:[r.jsxRuntimeExports.jsx(Re,{value:"upload",className:"w-full",children:"Upload"}),r.jsxRuntimeExports.jsx(Re,{value:"unsplash",className:"w-full",children:"Unsplash"})]}),i==="unsplash"?r.jsxRuntimeExports.jsx(Ce,{value:"unsplash",className:"flex h-full flex-col overflow-hidden",children:r.jsxRuntimeExports.jsx(R.Suspense,{fallback:r.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:r.jsxRuntimeExports.jsx(hi,{isModalView:e,onSelect:t})})}):r.jsxRuntimeExports.jsx(Ce,{value:"upload",className:"flex h-full flex-col overflow-hidden",children:r.jsxRuntimeExports.jsx(R.Suspense,{fallback:r.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:r.jsxRuntimeExports.jsx(bi,{isModalView:e,onSelect:t})})})]})]})},vi=Object.freeze(Object.defineProperty({__proto__:null,default:an},Symbol.toStringTag,{value:"Module"})),yt=({children:e,onSelect:t})=>{const[s,o]=R.useState(!1),n=(...a)=>{t.call(void 0,...a),o(!1)};return r.jsxRuntimeExports.jsxs(nt,{open:s,onOpenChange:a=>o(a),children:[r.jsxRuntimeExports.jsx(Is,{asChild:!0,children:e}),r.jsxRuntimeExports.jsx(Be,{className:"flex h-3/4 max-w-5xl",children:r.jsxRuntimeExports.jsx("div",{className:"h-full w-full",children:r.jsxRuntimeExports.jsx(an,{isModalView:!0,onSelect:n})})})]})},yi=({value:e,onChange:t,id:s,onBlur:o})=>{const n=Q("uploadMediaCallback"),a=Q("unsplashAccessKey"),i=n===void 0,d=a===void 0;return r.jsxRuntimeExports.jsxs("div",{className:"mt-1.5 flex items-center gap-x-3",children:[e?r.jsxRuntimeExports.jsx("img",{src:e,className:"h-20 w-20 overflow-hidden rounded-md border object-cover",alt:""}):r.jsxRuntimeExports.jsx(yt,{onSelect:t,children:r.jsxRuntimeExports.jsx("div",{className:"h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400"})}),r.jsxRuntimeExports.jsxs("div",{className:"flex w-3/5 flex-col",children:[!(i&&d)&&r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(yt,{onSelect:t,children:r.jsxRuntimeExports.jsx("small",{className:"cursor-pointer rounded-full bg-gray-600 px-2 py-1 text-center text-xs text-white hover:bg-gray-500 dark:bg-gray-700",children:e||!l.isEmpty(e)?"Replace Image":"Choose Image"})}),r.jsxRuntimeExports.jsx("small",{className:"-pl-4 pt-2 text-center text-xs text-gray-600",children:"OR"})]}),r.jsxRuntimeExports.jsx("input",{autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",type:"url",className:"text-xs",placeholder:"Enter image URL",value:e,onBlur:({target:{value:x}})=>o(s,x),onChange:x=>t(x.target.value)})]})]})},ji=({id:e,placeholder:t,value:s,onChange:o,onBlur:n})=>{const a={toolbar:[["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]},{align:[]}],["link","clean"]]},i=["header","font","list","bold","italic","underline","strike","blockquote","color","background","align","link","image"];return typeof window>"u"?null:r.jsxRuntimeExports.jsx(An,{id:e,value:s,onBlur:d=>n(e,d),onChange:d=>o(d),modules:a,formats:i,placeholder:t,className:"mt-1 rounded-md"})},wi=({schema:e,formData:t,onChange:s})=>{const[o,n]=R.useState([]),a=Q("getPages",()=>[]),{type:i="page",href:d="",target:x="self"}=t;return R.useEffect(()=>{(async()=>{const c=await a();n(c||[])})()},[]),r.jsxRuntimeExports.jsxs("div",{children:[r.jsxRuntimeExports.jsx("span",{className:"text-xs font-medium",children:(e==null?void 0:e.title)??"Link"}),r.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-y-1.5",children:[r.jsxRuntimeExports.jsx("select",{name:"type",value:i,onChange:c=>s({...t,type:c.target.value}),children:[{const:"page",title:"Open Page"},{const:"url",title:"Open URL"},{const:"email",title:"Compose Email"},{const:"telephone",title:"Call Phone"},{const:"scroll",title:"Scroll to element"}].map(c=>r.jsxRuntimeExports.jsx("option",{value:c.const,children:c.title},c.const))}),i==="page"?r.jsxRuntimeExports.jsxs("select",{name:"href",value:d,onChange:c=>s({...t,href:c.target.value||"#"}),children:[r.jsxRuntimeExports.jsx("option",{value:"",children:"Choose page"}),l.map(o,c=>r.jsxRuntimeExports.jsx("option",{value:c.slug,children:c.name},c.uuid))]}):r.jsxRuntimeExports.jsx("input",{autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",name:"href",type:"text",value:d,onChange:c=>s({...t,href:c.target.value||"#"}),placeholder:i==="page"||i==="url"?"Enter URL":i==="scroll"?"#ElementID":"Enter detail"}),(i==="page"||i==="url")&&r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[r.jsxRuntimeExports.jsx("input",{autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",type:"checkbox",defaultChecked:x==="_blank",className:"cursor-pointer rounded-md border border-border",onChange:()=>s({...t,target:x==="_blank"?"_self":"_blank"})}),r.jsxRuntimeExports.jsx("span",{className:"pt-1 text-xs",children:"Open in new tab"})]})]})]})};exports.Accordion=wa;exports.AccordionContent=js;exports.AccordionItem=vs;exports.AccordionTrigger=ys;exports.Alert=ws;exports.AlertDescription=Rs;exports.AlertDialog=Ca;exports.AlertDialogAction=Ts;exports.AlertDialogCancel=Ms;exports.AlertDialogContent=As;exports.AlertDialogDescription=Ps;exports.AlertDialogFooter=_s;exports.AlertDialogHeader=Ns;exports.AlertDialogTitle=Bs;exports.AlertDialogTrigger=Sa;exports.AlertTitle=ks;exports.Badge=Ra;exports.Button=bs;exports.Card=Us;exports.CardContent=Gs;exports.CardDescription=$s;exports.CardFooter=Ys;exports.CardHeader=qs;exports.CardTitle=Hs;exports.Command=it;exports.CommandDialog=li;exports.CommandEmpty=Go;exports.CommandGroup=Yo;exports.CommandInput=Ho;exports.CommandItem=Ko;exports.CommandList=$o;exports.CommandSeparator=Wo;exports.CommandShortcut=Xo;exports.ContextMenu=ci;exports.ContextMenuCheckboxItem=tn;exports.ContextMenuContent=Qo;exports.ContextMenuGroup=ui;exports.ContextMenuItem=en;exports.ContextMenuLabel=on;exports.ContextMenuPortal=mi;exports.ContextMenuRadioGroup=fi;exports.ContextMenuRadioItem=sn;exports.ContextMenuSeparator=nn;exports.ContextMenuShortcut=rn;exports.ContextMenuSub=pi;exports.ContextMenuSubContent=Zo;exports.ContextMenuSubTrigger=Jo;exports.ContextMenuTrigger=di;exports.Dialog=nt;exports.DialogContent=Be;exports.DialogDescription=Fs;exports.DialogFooter=zs;exports.DialogHeader=Os;exports.DialogTitle=Vs;exports.DialogTrigger=Is;exports.DropdownMenu=Wa;exports.DropdownMenuCheckboxItem=_o;exports.DropdownMenuContent=Ao;exports.DropdownMenuGroup=Xa;exports.DropdownMenuItem=No;exports.DropdownMenuLabel=Po;exports.DropdownMenuPortal=Ja;exports.DropdownMenuRadioGroup=Qa;exports.DropdownMenuRadioItem=Bo;exports.DropdownMenuSeparator=To;exports.DropdownMenuShortcut=Mo;exports.DropdownMenuSub=Za;exports.DropdownMenuSubContent=Eo;exports.DropdownMenuSubTrigger=So;exports.DropdownMenuTrigger=Ka;exports.HoverCard=za;exports.HoverCardContent=po;exports.HoverCardTrigger=Va;exports.IconPickerField=gi;exports.ImagePickerField=yi;exports.ImagesPanel=vi;exports.Input=Ws;exports.Label=Ks;exports.LinkField=wi;exports.Menubar=to;exports.MenubarCheckboxItem=io;exports.MenubarContent=ro;exports.MenubarGroup=Ia;exports.MenubarItem=ao;exports.MenubarLabel=co;exports.MenubarMenu=Ma;exports.MenubarPortal=Da;exports.MenubarRadioGroup=Oa;exports.MenubarRadioItem=lo;exports.MenubarSeparator=uo;exports.MenubarShortcut=mo;exports.MenubarSub=La;exports.MenubarSubContent=no;exports.MenubarSubTrigger=oo;exports.MenubarTrigger=so;exports.Popover=Pa;exports.PopoverContent=eo;exports.PopoverTrigger=Ta;exports.RichTextEditorField=ji;exports.ScrollArea=Js;exports.ScrollBar=rt;exports.Select=Fa;exports.SelectContent=xo;exports.SelectGroup=Ua;exports.SelectItem=ho;exports.SelectLabel=go;exports.SelectSeparator=bo;exports.SelectTrigger=fo;exports.SelectValue=qa;exports.Separator=Io;exports.Sheet=Ha;exports.SheetClose=Ga;exports.SheetContent=jo;exports.SheetDescription=Co;exports.SheetFooter=ko;exports.SheetHeader=wo;exports.SheetTitle=Ro;exports.SheetTrigger=$a;exports.Skeleton=ii;exports.Switch=hs;exports.Tabs=Zs;exports.TabsContent=Ce;exports.TabsList=at;exports.TabsTrigger=Re;exports.Textarea=Xs;exports.Toaster=ai;exports.Toggle=gs;exports.Tooltip=_a;exports.TooltipContent=Qs;exports.TooltipPortal=Aa;exports.TooltipProvider=Na;exports.TooltipTrigger=Ba;exports.activePanelAtom=is;exports.aiAssistantActiveAtom=ot;exports.atom=ne;exports.atomWithDefault=Gn;exports.atomWithStorage=ue;exports.badgeVariants=Cs;exports.builderSaveStateAtom=Ne;exports.buttonVariants=_e;exports.canAcceptChildBlock=Oe;exports.canDeleteBlock=Qn;exports.canDuplicateBlock=Zn;exports.canvasIframeAtom=as;exports.canvasSettingsAtom=ps;exports.chaiBuilderPropsAtom=He;exports.chaiExternalDataAtom=_t;exports.convertDotNotationToObject=dr;exports.createStore=Ct;exports.dataProvidersAtom=Qe;exports.draggingFlagAtom=us;exports.getBlockJSONFromSchemas=Ve;exports.getBlockJSONFromUISchemas=ze;exports.inlineEditingActiveAtom=ds;exports.isDevelopment=Xn;exports.networkModeAtom=rs;exports.presentBlocksAtom=ee;exports.reducer=Do;exports.showPredefinedBlockCategoryAtom=ls;exports.toast=Lo;exports.toggleVariants=xs;exports.treeDSBlocks=Mt;exports.treeRefAtom=ms;exports.useActiveModal=oa;exports.useActivePanel=pa;exports.useAddBlock=Sr;exports.useAddBlockParent=fa;exports.useAddClassesToBlocks=Br;exports.useAllBlocks=na;exports.useAtom=At;exports.useAtomValue=St;exports.useBlocksContainer=xr;exports.useBlocksStore=me;exports.useBlocksStoreUndoableActions=te;exports.useBrandingOptions=Xe;exports.useBuilderProp=Q;exports.useBuilderReset=ha;exports.useCanvasWidth=Pr;exports.useCanvasZoom=Mr;exports.useCodeEditor=ja;exports.useCopyBlockIds=Ir;exports.useCopyToClipboard=va;exports.useCurrentPage=Vt;exports.useCutBlockIds=Zt;exports.useDarkMode=Dr;exports.useDuplicateBlocks=es;exports.useGetPageData=$t;exports.useHiddenBlockIds=Or;exports.useHighlightBlockId=ts;exports.usePageDataProviders=Gt;exports.usePasteBlocks=Fr;exports.usePreviewMode=qr;exports.useReadOnlyMode=da;exports.useRemoveBlocks=yr;exports.useRemoveClassesFromBlocks=$r;exports.useSavePage=vr;exports.useSelectedBlock=ir;exports.useSelectedBlockAllClasses=Gr;exports.useSelectedBlockCurrentClasses=Kr;exports.useSelectedBlockIds=be;exports.useSelectedBlocksDisplayChild=ar;exports.useSelectedBreakpoints=ga;exports.useSelectedStylingBlocks=Yt;exports.useSetAtom=Et;exports.useStore=Ue;exports.useStreamMultipleBlocksProps=ea;exports.useStylingBreakpoint=Wt;exports.useStylingState=Xr;exports.useToast=Oo;exports.useUILibraryBlocks=ba;exports.useUndoManager=et;exports.useUpdateBlocksProps=Jr;exports.useUpdateBlocksPropsRealtime=ta;exports.useUpdateMultipleBlocksProps=Zr;exports.xShowBlocksAtom=fs;
|