@billgangcom/theme-lib 1.4.0 → 1.5.0

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.
@@ -1,11 +1,6 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@charset "UTF-8";@import"https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100..900;1,100..900&display=swap";._icon_21b8w_1 path{fill:var(--icon-fill)}._hoverable_21b8w_5{cursor:pointer}._button_rcjso_1{background-color:#ff3f19;padding:10px 16px;color:#fff;border-radius:12px;cursor:pointer;font-size:16px}._button_rcjso_1:disabled{opacity:.7;cursor:auto}._wrapper_1y283_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_1y283_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._input_1y283_17{width:100%;background-color:var(--background-color);border-radius:12px;padding:7px 11px;font-size:16px;line-height:24px;border:1px solid var(--background-color)}._input_1y283_17::placeholder{color:#c2c2c2}._input_1y283_17:disabled{background-color:var(--background-color);opacity:.7}._required_1y283_36{border:1px solid #ff3f19}._paddingless_1y283_40{padding:0}._wrapper_dmzhr_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_dmzhr_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._select_dmzhr_17{width:100%;background-color:var(--background-color);border-radius:12px;padding:10px 12px;font-size:14px;line-height:20px;display:flex;align-items:center;justify-content:space-between;cursor:pointer}._icon_dmzhr_30{transition:.2s}._rotate_dmzhr_34{transform:rotate(180deg)}._content_dmzhr_38{position:relative}._options_dmzhr_42{position:absolute;top:45px;width:100%;background-color:var(--background-color);border-radius:12px;font-size:14px;line-height:20px;display:flex;flex-direction:column;max-height:200px;z-index:10;overflow-y:scroll;cursor:pointer}._option_dmzhr_42{padding:10px 12px;border-radius:12px}._option_dmzhr_42:hover{background-color:#e6e6e6}._wrapper_3w2ni_1{display:flex;width:fit-content;gap:8px;align-items:center;border-radius:12px;line-height:20px;color:#252525;font-size:14px;font-weight:400}._switch_3w2ni_13{width:40px;height:24px;background-color:#ccc;border-radius:25px;display:flex;align-items:center;padding:2px;cursor:pointer;transition:background-color .2s}._switch_3w2ni_13._active_3w2ni_24{background:#ff3f19}._switch_3w2ni_13 ._toggle_3w2ni_27{width:14px;height:14px;background-color:#fff;border-radius:16px;transition:transform .2s;transform:translate(2px)}._switch_3w2ni_13._active_3w2ni_24 ._toggle_3w2ni_27{transform:translate(18px)}._background_3w2ni_39{background-color:#f8f8f8}._padding_3w2ni_43{padding:8px}._wrapper_1inu5_1{border:var(--default-border);width:fit-content;height:fit-content;max-height:500px;max-width:500px;min-width:300px;padding:10px;left:10px;top:10px;position:absolute;z-index:1000;background-color:#fff;display:flex;border-radius:8px;justify-content:center;align-items:center;overflow:hidden}._blocks_1op3c_1{display:flex;align-items:center;gap:8px}._block_1op3c_1{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1op3c_18{border:1px solid #ff3f19}._applyButton_1cqw4_2{flex:0 1 50%;font-weight:400}._cancelButton_1cqw4_7{background-color:#f8f8f8;color:var(--accent-color)}._content_1cqw4_12{display:flex;flex-direction:column;width:100%}._label_1cqw4_18{padding:8px 12px;border-radius:8px;display:flex;align-items:center;position:relative;gap:8px;width:100%;background-color:var(--background-color);cursor:pointer}._colorValue_1cqw4_30{width:20px;height:20px;padding:2.5px;border-radius:2px}._modal_1cqw4_37{left:15px;width:288px;overflow-y:auto;z-index:100000000;position:fixed;background-color:#fff;border-radius:12px;padding:10px;border:1px solid #e6e6e6;height:400px;display:flex;flex-direction:column;gap:10px;font-size:16px;line-height:24px;font-weight:700}._colorMap_1cqw4_56{position:relative;width:100%;height:300px;cursor:pointer;border-radius:4px}._indicator_1cqw4_64{position:absolute;width:20px;height:20px;border:4px solid white;border-radius:50%;pointer-events:none}._hueSlider_1cqw4_73{width:80%;left:30px;height:8px;position:absolute;bottom:80px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red,red);border-radius:5px}input[type=range]{-webkit-appearance:none;height:8px;outline:none;border-radius:5px;position:relative;display:flex;justify-content:center}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border:5px solid #fff;border-radius:50%;cursor:pointer}._slider_1cqw4_102{width:100%;cursor:pointer}._buttons_1cqw4_107{display:flex;gap:5px;width:100%}._name_1cqw4_113{line-height:20px;padding:0 4px 4px}._secondary_1cqw4_118{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._input_1cqw4_126{line-height:20px;font-size:14px;font-weight:400}._modal_1t5at_1{position:fixed;top:0;left:0;right:0;bottom:0;background:#2525253d;z-index:100;display:flex;padding:20px;justify-content:center;align-items:center;overflow:hidden}._wrapper_1qvfi_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%;position:relative}._label_1qvfi_10{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._textarea_1qvfi_18{width:100%;background-color:var(--background-color);border-radius:12px;padding:8px 12px;font-size:16px;line-height:24px;resize:none;min-height:80px}._textarea_1qvfi_18::placeholder{color:#c2c2c2}._length_1qvfi_33{position:absolute;bottom:12px;right:12px;color:#c2c2c2;line-height:20px}._wrapper_1fcne_2{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_1fcne_10{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._options_1fcne_18{display:flex;gap:20px}._radioLabel_1fcne_23{display:flex;align-items:center;cursor:pointer;position:relative}._radio_1fcne_23{position:absolute;opacity:0;cursor:pointer}._custom_1fcne_36{height:20px;width:20px;border-radius:50%;border:1px solid #e6e6e6;display:inline-block;margin-right:8px;position:relative}._radio_1fcne_23:checked+._custom_1fcne_36{border-color:#ff3f19;background:#ffeae5}._custom_1fcne_36:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:8px;height:8px;border-radius:50%;background-color:#e53e3e;opacity:0}._radio_1fcne_23:checked+._custom_1fcne_36:after{opacity:1}._option_1fcne_18{font-size:16px;line-height:24px;font-weight:400}._tip_pl6k0_1{display:flex;align-items:center;padding:8px;border-radius:12px;gap:8px}._text_pl6k0_9{flex:1 1 auto;line-height:20px;font-size:14px}._warning_pl6k0_15{background:#faf8e6;color:#c1972a}._error_pl6k0_20{background:#ffc3b7;color:#ff3f19}._hide_pl6k0_25{display:none}._buttons_1gn8m_1{display:flex;align-items:center;gap:16px}._button_1gn8m_1{cursor:pointer;padding:10px}._devices_hxl12_1{display:flex;gap:4px;background:var(--background-color);padding:4px;border-radius:16px}._device_hxl12_1{padding:6px 8px;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:12px;border:1px solid var(--background-color)}._device_hxl12_1:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_hxl12_23{background-color:#fff}._active_hxl12_23:hover{border:1px solid var(--background-color);box-shadow:none}._header_wxpoz_1{position:absolute;top:0;left:0;width:100%;padding:11px 22px;line-height:20px;border-bottom:var(--default-border);display:flex;align-items:center;justify-content:space-between;gap:24px;z-index:50000}._left_wxpoz_16,._right_wxpoz_17{display:flex;align-items:center;gap:24px}._preview_vijvm_2{display:flex;align-items:center;gap:4px;color:var(--accent-color);line-height:20px;padding:10px 16px;cursor:pointer;border:1px solid #fff;border-radius:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}._preview_vijvm_2:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_vijvm_22{background-color:var(--background-color)}._active_vijvm_22:hover{border:1px solid #fff;box-shadow:none}._settings_q79q3_1{display:flex;gap:20px;align-items:center;color:var(--accent-color)}._language_1mbvp_1{display:flex;align-items:center;gap:4px;background-color:var(--background-color);padding:10px 12px;border-radius:12px;cursor:pointer}._text_1mbvp_11{padding-right:4px;color:var(--main-color)}._pages_x8pw2_1{position:relative}._default_x8pw2_5{display:flex;align-items:center;gap:4px;padding:10px 12px;background-color:var(--background-color);border-radius:8px;cursor:pointer;position:relative}._text_x8pw2_16{padding-right:4px;color:var(--main-color);flex:1 1 auto}._modal_x8pw2_22{position:absolute;top:45px;width:320px;left:0;z-index:100;background-color:#fff;border:1px solid #e6e6e6;border-radius:8px;padding:8px 12px;display:flex;flex-direction:column}._page_x8pw2_1{display:flex;align-items:center;gap:8px;padding:12px 8px;border-radius:8px;cursor:pointer}._hoverable_x8pw2_45{background-color:var(--background-color)}._separator_x8pw2_49{border-bottom:1px solid #f0f0f0}._button_x8pw2_53{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:start;gap:8px;padding:16px 8px 12px;transition:.2s}._button_x8pw2_53:hover{background-color:var(--background-color)}._zoom_a77cn_1{display:flex;align-items:center;gap:4px;background-color:var(--background-color);padding:10px 12px;border-radius:12px;cursor:pointer}._theme_3wxbf_1{display:flex;align-items:center;gap:4px;padding:9px 12px;background:#e5fadd;color:#338b13;border-radius:100px}._exit_2ce42_1{border-bottom:var(--default-border);display:flex;gap:8px;align-items:center;padding:22px;cursor:pointer}._text_2ce42_10{color:#252525;line-height:20px}._navbar_2ac63_1{width:100px;border-right:var(--default-border)}._main_2ac63_6{display:flex;flex-direction:column;gap:8px;padding:16px 12px}._block_2ac63_13{display:flex;align-items:center;flex-direction:column;gap:4px;color:var(--accent-color);line-height:20px;padding:12px 24px;cursor:pointer;border:1px solid #fff;border-radius:16px}._block_2ac63_13:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_2ac63_30{background-color:var(--background-color);color:#252525}._active_2ac63_30:hover{border:1px solid #fff;box-shadow:none}._preview_jui5n_1{width:100%;background-color:var(--background-color);padding:16px 32px 0;position:relative;z-index:500}._main_jui5n_9{width:100%;display:flex;flex-direction:column;overflow-y:auto;height:100%;position:relative;z-index:1}._content_jui5n_19{background-color:#fff;border:var(--default-border);border-bottom:none;height:100%}._loading_jui5n_26{width:100%;height:100%;display:flex;justify-content:center;align-items:center}._loader_jui5n_34{border:4px solid rgba(0,0,0,.1);border-left-color:#fff;border-radius:50%;width:40px;height:40px;animation:_spin_jui5n_1 1s linear infinite}@keyframes _spin_jui5n_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._header_1t64j_1{display:flex;width:100%;padding:18px;justify-content:center;border:var(--default-border);background-color:#fff;border-top-left-radius:16px;border-top-right-radius:16px;border-bottom:none;z-index:5}._circles_1t64j_14{left:28px;top:28px;position:absolute;display:flex;align-items:center;gap:8px}._circle_1t64j_14{width:12px;height:12px;border-radius:50%;border:.5px solid #e6e6e6}._red_1t64j_30{background:#ff5f57}._green_1t64j_34{background:#28c840}._yellow_1t64j_38{background:#febc2e}._input_1t64j_42{background-color:var(--background-color);padding:6px 8px;display:flex;max-width:480px;width:100%;border-radius:6px}._main_1t64j_51{flex:1 1 auto;display:flex;align-items:center;justify-content:center;gap:4px}._text_1t64j_59{font-weight:600;font-size:12px;line-height:16px;margin:0 0 0 4px}._content_92dk8_1{width:100%;height:100%}._block_92dk8_6{position:relative;cursor:pointer;border-left:1px solid #e6e6e6;border-right:1px solid #e6e6e6}._active_92dk8_13{border:2px solid #ff3f19}._name_92dk8_17{z-index:10;position:absolute;top:-28px;left:-2px;border-top-left-radius:8px;border-top-right-radius:8px;color:#fff;background:#ff3f19;padding:4px 12px;line-height:20px;text-align:center}._empty_92dk8_31{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._icon_92dk8_42{width:64px;height:64px;background-color:var(--background-color);display:flex;border-radius:50%;justify-content:center;align-items:center;margin:0 0 8px}._title_92dk8_53{font-weight:700;font-size:24px;line-height:32px}._text_92dk8_59{font-size:16px;line-height:24px;color:var(--accent-color)}._sections_92dk8_65{padding:0 20px;margin:20px 0 0;display:flex;flex-wrap:wrap;justify-content:center;gap:24px}._section_92dk8_65{cursor:pointer;display:flex;gap:10px;max-width:288px;width:100%;align-items:center;justify-content:space-between;padding:24px;background-color:var(--background-color);border-radius:24px;color:var(--accent-color)}._sidebar_1f3hk_1{position:absolute;display:flex;height:fit-content();flex-direction:column;right:10px;z-index:20;padding:10px;cursor:auto}._content_1f3hk_12{height:100%;border:1px solid #e6e6e6;border-radius:8px;background-color:#fff;padding:8px;max-width:60px;width:100%}._button_1f3hk_22{display:flex;align-items:center;border-radius:8px;padding:8px;transition:.2s background-color}._moveButton_1f3hk_30:hover{background-color:var(--background-color)}._border_1f3hk_34{border-bottom:var(--default-border)}._deleteButton_1f3hk_38:hover{background-color:#dd6363;color:#fff}._results_f488n_1{display:flex;flex-direction:column;padding:8px;gap:20px}._name_f488n_8{color:var(--main-color);font-weight:600;font-size:16px;line-height:24px}._product_f488n_15{display:flex;align-items:center;justify-content:space-between;cursor:pointer}._search_1s0qp_1{background:var(--background-color);padding:8px 12px;display:flex;align-items:center;border-radius:12px;width:100%;gap:10px;margin:8px 0}._input_1s0qp_12{width:100%;font-size:16px;line-height:24px;color:#252525}._input_1s0qp_12::placeholder{color:#c2c2c2}._sidebar_1r5sp_1{max-width:320px;width:100%;padding:16px;border-right:var(--default-border);height:100%;position:relative}._title_1r5sp_10{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px;padding-bottom:8px}._active_1r5sp_18{display:flex;align-items:center;gap:8px}._layers_62wod_1{display:flex;flex-direction:column;position:relative;height:100%}._block_62wod_8{position:relative;display:flex;align-items:center;gap:4px;font-size:16px;line-height:24px;padding:8px 12px;border-radius:8px;cursor:pointer}._block_62wod_8:hover{background-color:var(--background-color)}._dragging_62wod_23{box-shadow:0 2.1px 4.36px #00000004;box-shadow:0 5.3px 10.22px #00000005;border:var(--default-border);box-shadow:0 10.81px 19.93px #00000006;cursor:grabbing}._active_62wod_31{background:#ffeae5}._add_62wod_35{z-index:2;position:absolute;display:flex;justify-content:center;align-items:center;bottom:0;left:0;border-bottom:2px solid #ff3f19;width:100%}._button_62wod_47{position:relative;display:flex;justify-content:center;align-items:center;top:12px;background-color:#ff3f19;width:24px;height:24px;border-radius:50%;padding:4px}._empty_62wod_60{display:flex;flex-direction:column;justify-content:center;height:100%;width:100%;align-items:center;text-align:center;gap:4px;color:var(--accent-color)}._title_62wod_72{font-size:16px;line-height:24px;font-weight:700;color:var(--accent-color)}._icon_62wod_79{margin:0 0 12px}._text_62wod_83{font-size:16px;font-weight:400;line-height:24px}._highlight_62wod_89{color:#ff3f19;cursor:pointer}._theme_1xj36_1{display:flex;flex-direction:column}._block_1xj36_6{justify-content:start;display:flex;align-items:center;gap:8px;width:100%;padding:16px 8px;cursor:pointer;border-radius:8px}._block_1xj36_6:hover{background-color:var(--background-color)}._name_1xj36_20{flex:1 1 auto}._back_14yda_1{display:flex;align-items:center;gap:8px;padding-bottom:8px}._render_14yda_8{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:501}._open_14yda_23{animation:.2s _open_14yda_23 forwards}@keyframes _open_14yda_23{0%{transform:translate(320px);z-index:1}99%{z-index:1}to{z-index:5000;transform:translate(0)}}@keyframes _close_14yda_50{0%{z-index:1;transform:translate(0)}to{z-index:1;transform:translate(320px)}}._close_14yda_50{animation:.2s _close_14yda_50 forwards}._clicked_14yda_54{opacity:0}._title_14yda_58{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px}._button_14yda_65{align-self:center;flex:1}._loading_14yda_70{flex:1 1 auto}._settings_14yda_74{flex:1 1 auto;overflow-y:scroll;overflow-x:hidden}._buttons_14yda_80{justify-content:space-between;display:flex;gap:10px}._deleteButton_14yda_86{display:flex;align-items:center;border-radius:8px;padding:8px;transition:.2s background-color}._deleteButton_14yda_86:hover{background-color:#dd6363;color:#fff}._settings_1r85j_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:3}._open_1r85j_16{transform:translate(0)}._close_1r85j_20{transform:translate(320px)}._header_1r85j_24{display:flex;align-items:center;gap:8px}._title_1r85j_30{font-weight:700;font-size:20px;line-height:24px;flex:1 1 auto}._addButton_1r85j_37{color:#ff3f19;display:flex;align-items:center;gap:4px;cursor:pointer}._wrapper_n1a7x_1{overflow-y:scroll}._category_n1a7x_5{display:flex;flex-direction:column}._categoryTitle_n1a7x_10{font-weight:600;font-size:16px;line-height:24px}._color_n1a7x_16{display:flex;flex-direction:column}._color_n1a7x_16:not(:last-child){border-bottom:1px solid #f0f0f0}._content_n1a7x_24{padding:12px 0;gap:8px;display:flex;align-items:center;flex:1 1 auto}._preview_n1a7x_32{width:39px;height:39px;flex:0 0 39px;padding:5px;border-radius:50%;border:1px solid #e6e6e6}._wrapper_kb55x_2{overflow-y:scroll}._category_kb55x_6{display:flex;flex-direction:column}._categoryTitle_kb55x_11{font-weight:600;font-size:16px;line-height:24px}._color_kb55x_17{gap:8px;display:flex;flex-direction:column}._name_kb55x_23{line-height:20px;padding:0 4px 4px}._content_kb55x_28{display:flex;flex-direction:column;width:100%}._label_kb55x_34{padding:8px 12px;border-radius:12px;display:flex;align-items:center;gap:5px;width:100%;background-color:var(--background-color);cursor:pointer}._input_kb55x_45[type=color]{width:20px;height:20px;padding:1px}._input_kb55x_45{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:100%;border:none;padding:0;cursor:pointer;border-radius:50%}._input_kb55x_45::-webkit-color-swatch{border-radius:50%;border:none}._input_kb55x_45::-webkit-color-swatch-wrapper{padding:0;border-radius:50%}._title_kb55x_71{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._field_kb55x_79{display:flex;flex-direction:column;gap:10px;padding:16px 0}._field_kb55x_79:not(:last-child){border-bottom:1px solid #f0f0f0}._alignments_kb55x_89{display:flex;flex-direction:column;gap:10px}._lineField_kb55x_95{display:flex;justify-content:space-between;align-items:center}._style_kb55x_101{flex:1 0 50%;display:flex;flex-direction:column;gap:8px}._header_kb55x_108{display:flex;align-items:center;justify-content:space-between}._wrapper_k9on2_1{overflow-y:scroll}._category_k9on2_5{display:flex;flex-direction:column}._categoryTitle_k9on2_10{font-weight:600;font-size:16px;line-height:24px}._font_k9on2_16{padding:12px 0;gap:8px;display:flex;align-items:center;position:relative;flex:1 1 auto;cursor:pointer}._font_k9on2_16:hover{background-color:#f8f8f8;border-radius:8px}._font_k9on2_16:not(:last-child){border-bottom:var(--default-border)}._font_k9on2_16:not(:last-child):hover{border-bottom:1px solid #f8f8f8}._content_k9on2_36{display:flex;flex-direction:column;width:100%}._icon_k9on2_42{padding:8px;border-radius:8px;background-color:#f8f8f8;display:flex;align-items:center;justify-content:center}._paragraph_k9on2_51{padding:12px}._deleteIcon_k9on2_55{position:absolute;right:10px;width:20px;height:20px}._iconButton_k9on2_62{width:32px;height:32px}._wrapper_94fpv_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:5}._open_94fpv_16{transform:translate(0)}._close_94fpv_20{transform:translate(320px)}._header_94fpv_24{display:flex;align-items:center;gap:8px;margin:0 0 10px}._title_94fpv_31{font-weight:700;font-size:20px;line-height:24px}._options_94fpv_37{display:flex;flex-direction:column;gap:10px;flex:1 1 auto}._clicked_94fpv_44{opacity:0}._wrapper_1j33r_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:5}._open_1j33r_16{transform:translate(0)}._close_1j33r_20{transform:translate(320px)}._header_1j33r_24{display:flex;align-items:center;gap:8px;margin:0 0 10px}._title_1j33r_31{font-weight:700;font-size:20px;line-height:24px}._options_1j33r_37{display:flex;flex-direction:column;gap:10px;flex:1 1 auto}._clicked_1j33r_44{opacity:0}._label_1j33r_48{font-size:14px;font-weight:400;line-height:20px;color:var(--accent-color)}._alignments_1j33r_55{display:flex;flex-direction:column;gap:10px}._blocks_1j33r_61{display:flex;align-items:center;gap:8px}._alignment_1j33r_55{padding:8px;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1j33r_75{border:1px solid #ff3f19}._wrapper_jjfwh_1{display:flex;flex-direction:column;gap:20px;background:#fff;max-width:640px;width:100%;padding:16px 24px;border-radius:16px}._header_jjfwh_12{display:flex;justify-content:space-between;align-items:center;font-size:24px;font-weight:700;line-height:32px}._content_jjfwh_21{display:flex;flex-direction:column;gap:10px;overflow-y:scroll;max-height:500px}._buttons_jjfwh_29{display:flex;justify-content:end;gap:12px}._cancel_jjfwh_35{background-color:var(--background-color);color:var(--accent-color)}._label_jjfwh_40,._description_jjfwh_41{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._preview_jjfwh_49{display:flex;flex-direction:column;gap:10px}._block_jjfwh_55{padding:24px;display:flex;flex-direction:column;border:1px solid var(--background-color);border-radius:8px}._slug_jjfwh_63{line-height:20px;color:#ff3f19;margin-bottom:4px}._title_jjfwh_69{font-weight:600;font-size:16px;line-height:24px}._layout_kjedu_1{width:100%;height:100%;display:flex;position:relative}._main_kjedu_8{display:flex;flex-direction:column;width:100%;position:relative}._content_kjedu_15{position:relative;padding-top:64px;height:100%;display:flex}*{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}*{padding:0;margin:0;border:0}*,*:before,*:after{box-sizing:border-box}:focus,:active{outline:none}a:focus,a:active{outline:none}nav,footer,header,aside{display:block}html,body{width:100%;line-height:1;font-size:16px;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}input,button,textarea{font-family:inherit}input::-ms-clear{display:none}button{background-color:transparent;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}a,a:visited,a:hover{text-decoration:none}ul li{list-style:none}img{vertical-align:top}h1,h2,h3,h4,h5,h6,a{font-size:inherit}a{color:inherit}*{-webkit-tap-highlight-color:transparent}input{border:none;background:none;outline:none;padding:0}input[type=color]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:40px;height:40px;border:none;background:transparent}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}*{-ms-overflow-style:none;scrollbar-width:none}* ::-webkit-scrollbar{display:none}:root{--default-border: 1px solid #f0f0f0;--accent-color: #757575;--main-color: #252525;--background-color: #f8f8f8}#root{height:100vh}body,html{background-color:#fff;font-family:Archivo,sans-serif;max-height:100vh;overflow:hidden}._wrapper_o1bnv_2{display:flex;flex-direction:column;gap:10px}._alignmentBlock_o1bnv_8{padding:10px 0 16px;display:flex;flex-direction:column;gap:6px;border-bottom:1px solid #f0f0f0}._title_o1bnv_16{font-weight:700;line-height:24px;font-size:16px;color:#252525}._subtitle_o1bnv_23{color:#757575;font-size:14px;line-height:20px;font-weight:400}._alignmentContent_o1bnv_30{display:flex;justify-content:space-between;align-items:stretch;gap:8px}._alignments_o1bnv_37{border-radius:12px;background:#f8f8f8;display:grid;gap:4px;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);flex:0 0 50%}._alignment_o1bnv_8{cursor:pointer;display:flex;height:100%;width:100%;align-items:center;justify-content:center}._circle_o1bnv_56{width:6px;height:6px;border-radius:50%;background-color:#c2c2c2}._paddings_o1bnv_63{border-radius:12px;display:grid;gap:4px;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}._padding_o1bnv_63{width:68px;display:flex;align-items:center;gap:4px;background:#f8f8f8;border-radius:12px;padding:10px 8px}._input_o1bnv_81{width:100%}._subtitle_2zbxx_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_2zbxx_8,._text_2zbxx_9{padding:10px 0 16px;display:flex;flex-direction:column;border-bottom:1px solid #f0f0f0}._top_2zbxx_16{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_2zbxx_23{display:flex;flex-direction:column;gap:6px}._typeTexts_3zlec_1{display:flex;align-items:center;gap:8px}._block_3zlec_7{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_3zlec_18{border:1px solid #ff3f19}._subtitle_2l7ty_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_2l7ty_8,._text_2l7ty_9,._productsBlock_2l7ty_10{padding:10px 0 16px;display:flex;flex-direction:column;border-bottom:1px solid #f0f0f0;width:100%}._productsBlock_2l7ty_10{position:relative}._top_2l7ty_22{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_2l7ty_29{display:flex;flex-direction:column;gap:6px}._typeTexts_2l7ty_35{display:flex;align-items:center;gap:8px}._block_2l7ty_41{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_2l7ty_52{border:1px solid #ff3f19}._products_2l7ty_10{width:100%;display:flex;flex-direction:column;gap:8px}._product_2l7ty_10{display:flex;align-items:center;gap:8px;width:100%}._button_2l7ty_70{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:center;gap:6px;width:100%}._image_2l7ty_80{border-radius:8px;border:1px solid #f0f0f0;background-color:#fff;padding:4px}._info_2l7ty_87{border-radius:12px;display:flex;gap:4px;justify-content:space-between;align-items:center;flex:1 1 auto;background-color:#f8f8f8;padding:8px 12px}._name_2l7ty_98{flex:1 1 100%}._buttons_2l7ty_102{display:flex;align-items:center;gap:8px}._modal_2l7ty_108{position:fixed;background-color:#fff;right:-300px;top:0;z-index:10000;max-width:276px;width:100%;padding:16px;border-radius:12px}._modal_2l7ty_108 ._top_2l7ty_22{display:flex;align-items:center;justify-content:space-between}._other_2l7ty_125{display:flex;flex-direction:column;gap:6px}._subtitle_1y5sw_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_1y5sw_8,._text_1y5sw_9,._productsBlock_1y5sw_10,._buttonsBlock_1y5sw_11{padding:10px 0 16px;display:flex;flex-direction:column;border-bottom:1px solid #f0f0f0}._buttonsBlock_1y5sw_11{position:relative}._top_1y5sw_22{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_1y5sw_29{display:flex;flex-direction:column;gap:6px}._typeTexts_1y5sw_35{display:flex;align-items:center;gap:8px}._block_1y5sw_41{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1y5sw_52{border:1px solid #ff3f19}._products_1y5sw_10{width:100%;display:flex;flex-direction:column;gap:8px}._product_1y5sw_10{display:flex;align-items:center;gap:8px;width:100%}._button_1y5sw_11{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:center;gap:6px;width:100%}._image_1y5sw_80{border-radius:8px;border:1px solid #f0f0f0;background-color:#fff;padding:4px}._info_1y5sw_87{border-radius:12px;display:flex;gap:4px;justify-content:space-between;align-items:center;flex:1 1 auto;background-color:#f8f8f8;padding:8px 12px}._name_1y5sw_98{flex:1 1 100%}._buttons_1y5sw_11{display:flex;align-items:center;gap:8px}._modal_1y5sw_108{position:fixed;background-color:#fff;right:-300px;z-index:10000;max-width:276px;width:100%;bottom:20px;padding:16px;border-radius:12px}._modal_1y5sw_108 ._top_1y5sw_22{display:flex;align-items:center;justify-content:space-between}._other_1y5sw_125{display:flex;flex-direction:column;gap:6px}._options_1y5sw_131{display:flex;flex-direction:column;gap:15px}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-DUXD-4un.cjs"),E=require("react"),Xn=["desktop","tablet","mobile"],Kn=[{icon:"paint",name:"Colors"},{icon:"font",name:"Fonts"},{icon:"corners-out",name:"Borders"},{icon:"arrow-square",name:"Buttons"},{icon:"textbox",name:"Inputs"}],Qn="https://g-api.billgang.com",Zn="https://www.googleapis.com/webfonts/v1/webfonts",er="_buttons_1gn8m_1",tr="_button_1gn8m_1",nr={buttons:er,button:tr},rr=()=>o.jsxRuntimeExports.jsxs("div",{className:nr.buttons,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"undo",hoverable:!0,width:20,height:20}),o.jsxRuntimeExports.jsx(o.Icon,{name:"redo",hoverable:!0,width:20,height:20})]}),sr="_devices_hxl12_1",or="_device_hxl12_1",ir="_active_hxl12_23",qe={devices:sr,device:or,active:ir},ar=()=>{const{currentDevice:t,setCurrentDevice:e}=o.useDeviceStore();return o.jsxRuntimeExports.jsx("div",{className:qe.devices,children:Xn.map(n=>o.jsxRuntimeExports.jsx("div",{className:o.clx(qe.device,{[qe.active]:t===n}),onClick:()=>e(n),children:o.jsxRuntimeExports.jsx(o.Icon,{name:n,fill:t===n?"#252525":"#757575",width:20,height:20})},n))})},cr="_header_wxpoz_1",ur="_left_wxpoz_16",lr="_right_wxpoz_17",Se={header:cr,left:ur,right:lr},dr="_preview_vijvm_2",fr="_active_vijvm_22",ze={preview:dr,active:fr},pr=()=>{const{onPreview:t,setOnPreview:e}=o.usePreviewStore();return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ze.preview,{[ze.active]:t}),onClick:()=>e(!t),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-up-right",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:ze.text,children:"Preview"})]})},hr="_settings_q79q3_1",gr={settings:hr},mr="_language_1mbvp_1",xr="_text_1mbvp_11",Rt={language:mr,text:xr},vr=()=>o.jsxRuntimeExports.jsxs("div",{className:Rt.language,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"globe",fill:"#252525",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:Rt.text,children:"Default"}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-down",width:20,height:20})]}),Er="_pages_x8pw2_1",yr="_text_x8pw2_16",br="_modal_x8pw2_22",jr="_page_x8pw2_1",Sr="_hoverable_x8pw2_45",_r="_separator_x8pw2_49",wr="_button_x8pw2_53",X={pages:Er,default:"_default_x8pw2_5",text:yr,modal:br,page:jr,hoverable:Sr,separator:_r,button:wr},J=t=>t?t.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" and "):"";function nn(t,e){return function(){return t.apply(e,arguments)}}const{toString:Rr}=Object.prototype,{getPrototypeOf:gt}=Object,Pe=(t=>e=>{const n=Rr.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),G=t=>(t=t.toLowerCase(),e=>Pe(e)===t),ke=t=>e=>typeof e===t,{isArray:de}=Array,ve=ke("undefined");function Or(t){return t!==null&&!ve(t)&&t.constructor!==null&&!ve(t.constructor)&&L(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const rn=G("ArrayBuffer");function Tr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&rn(t.buffer),e}const Dr=ke("string"),L=ke("function"),sn=ke("number"),Ae=t=>t!==null&&typeof t=="object",Cr=t=>t===!0||t===!1,Te=t=>{if(Pe(t)!=="object")return!1;const e=gt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Nr=G("Date"),Ir=G("File"),Pr=G("Blob"),kr=G("FileList"),Ar=t=>Ae(t)&&L(t.pipe),Br=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||L(t.append)&&((e=Pe(t))==="formdata"||e==="object"&&L(t.toString)&&t.toString()==="[object FormData]"))},Lr=G("URLSearchParams"),[Mr,$r,Fr,Ur]=["ReadableStream","Request","Response","Headers"].map(G),Hr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ee(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),de(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),a=i.length;let c;for(r=0;r<a;r++)c=i[r],e.call(null,t[c],c,t)}}function on(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const te=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,an=t=>!ve(t)&&t!==te;function rt(){const{caseless:t}=an(this)&&this||{},e={},n=(r,s)=>{const i=t&&on(e,s)||s;Te(e[i])&&Te(r)?e[i]=rt(e[i],r):Te(r)?e[i]=rt({},r):de(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Ee(arguments[r],n);return e}const qr=(t,e,n,{allOwnKeys:r}={})=>(Ee(e,(s,i)=>{n&&L(s)?t[i]=nn(s,n):t[i]=s},{allOwnKeys:r}),t),zr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Vr=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Gr=(t,e,n,r)=>{let s,i,a;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)a=s[i],(!r||r(a,t,e))&&!c[a]&&(e[a]=t[a],c[a]=!0);t=n!==!1&&gt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Wr=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Yr=t=>{if(!t)return null;if(de(t))return t;let e=t.length;if(!sn(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Jr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&gt(Uint8Array)),Xr=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},Kr=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Qr=G("HTMLFormElement"),Zr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ot=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),es=G("RegExp"),cn=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ee(n,(s,i)=>{let a;(a=e(s,i,t))!==!1&&(r[i]=a||s)}),Object.defineProperties(t,r)},ts=t=>{cn(t,(e,n)=>{if(L(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(L(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ns=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return de(t)?r(t):r(String(t).split(e)),n},rs=()=>{},ss=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Ve="abcdefghijklmnopqrstuvwxyz",Tt="0123456789",un={DIGIT:Tt,ALPHA:Ve,ALPHA_DIGIT:Ve+Ve.toUpperCase()+Tt},os=(t=16,e=un.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function is(t){return!!(t&&L(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const as=t=>{const e=new Array(10),n=(r,s)=>{if(Ae(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=de(r)?[]:{};return Ee(r,(a,c)=>{const u=n(a,s+1);!ve(u)&&(i[c]=u)}),e[s]=void 0,i}}return r};return n(t,0)},cs=G("AsyncFunction"),us=t=>t&&(Ae(t)||L(t))&&L(t.then)&&L(t.catch),ln=((t,e)=>t?setImmediate:e?((n,r)=>(te.addEventListener("message",({source:s,data:i})=>{s===te&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),te.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",L(te.postMessage)),ls=typeof queueMicrotask<"u"?queueMicrotask.bind(te):typeof process<"u"&&process.nextTick||ln,f={isArray:de,isArrayBuffer:rn,isBuffer:Or,isFormData:Br,isArrayBufferView:Tr,isString:Dr,isNumber:sn,isBoolean:Cr,isObject:Ae,isPlainObject:Te,isReadableStream:Mr,isRequest:$r,isResponse:Fr,isHeaders:Ur,isUndefined:ve,isDate:Nr,isFile:Ir,isBlob:Pr,isRegExp:es,isFunction:L,isStream:Ar,isURLSearchParams:Lr,isTypedArray:Jr,isFileList:kr,forEach:Ee,merge:rt,extend:qr,trim:Hr,stripBOM:zr,inherits:Vr,toFlatObject:Gr,kindOf:Pe,kindOfTest:G,endsWith:Wr,toArray:Yr,forEachEntry:Xr,matchAll:Kr,isHTMLForm:Qr,hasOwnProperty:Ot,hasOwnProp:Ot,reduceDescriptors:cn,freezeMethods:ts,toObjectSet:ns,toCamelCase:Zr,noop:rs,toFiniteNumber:ss,findKey:on,global:te,isContextDefined:an,ALPHABET:un,generateString:os,isSpecCompliantForm:is,toJSONObject:as,isAsyncFn:cs,isThenable:us,setImmediate:ln,asap:ls};function S(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}f.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const dn=S.prototype,fn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{fn[t]={value:t}});Object.defineProperties(S,fn);Object.defineProperty(dn,"isAxiosError",{value:!0});S.from=(t,e,n,r,s,i)=>{const a=Object.create(dn);return f.toFlatObject(t,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),S.call(a,t.message,e,n,r,s),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const ds=null;function st(t){return f.isPlainObject(t)||f.isArray(t)}function pn(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function Dt(t,e,n){return t?t.concat(e).map(function(s,i){return s=pn(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function fs(t){return f.isArray(t)&&!t.some(st)}const ps=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function Be(t,e,n){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,g){return!f.isUndefined(g[h])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(s))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(f.isDate(m))return m.toISOString();if(!u&&f.isBlob(m))throw new S("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(m)||f.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,h,g){let y=m;if(m&&!g&&typeof m=="object"){if(f.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(f.isArray(m)&&fs(m)||(f.isFileList(m)||f.endsWith(h,"[]"))&&(y=f.toArray(m)))return h=pn(h),y.forEach(function(j,D){!(f.isUndefined(j)||j===null)&&e.append(a===!0?Dt([h],D,i):a===null?h:h+"[]",l(j))}),!1}return st(m)?!0:(e.append(Dt(g,h,i),l(m)),!1)}const p=[],v=Object.assign(ps,{defaultVisitor:d,convertValue:l,isVisitable:st});function x(m,h){if(!f.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(m),f.forEach(m,function(y,b){(!(f.isUndefined(y)||y===null)&&s.call(e,y,f.isString(b)?b.trim():b,h,v))===!0&&x(y,h?h.concat(b):[b])}),p.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return x(t),e}function Ct(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function mt(t,e){this._pairs=[],t&&Be(t,this,e)}const hn=mt.prototype;hn.append=function(e,n){this._pairs.push([e,n])};hn.toString=function(e){const n=e?function(r){return e.call(this,r,Ct)}:Ct;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function hs(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gn(t,e,n){if(!e)return t;const r=n&&n.encode||hs,s=n&&n.serialize;let i;if(s?i=s(e,n):i=f.isURLSearchParams(e)?e.toString():new mt(e,n).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Nt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(r){r!==null&&e(r)})}}const mn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gs=typeof URLSearchParams<"u"?URLSearchParams:mt,ms=typeof FormData<"u"?FormData:null,xs=typeof Blob<"u"?Blob:null,vs={isBrowser:!0,classes:{URLSearchParams:gs,FormData:ms,Blob:xs},protocols:["http","https","file","blob","url","data"]},xt=typeof window<"u"&&typeof document<"u",ot=typeof navigator=="object"&&navigator||void 0,Es=xt&&(!ot||["ReactNative","NativeScript","NS"].indexOf(ot.product)<0),ys=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bs=xt&&window.location.href||"http://localhost",js=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xt,hasStandardBrowserEnv:Es,hasStandardBrowserWebWorkerEnv:ys,navigator:ot,origin:bs},Symbol.toStringTag,{value:"Module"})),A={...js,...vs};function Ss(t,e){return Be(t,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return A.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function _s(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ws(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function xn(t){function e(n,r,s,i){let a=n[i++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),u=i>=n.length;return a=!a&&f.isArray(s)?s.length:a,u?(f.hasOwnProp(s,a)?s[a]=[s[a],r]:s[a]=r,!c):((!s[a]||!f.isObject(s[a]))&&(s[a]=[]),e(n,r,s[a],i)&&f.isArray(s[a])&&(s[a]=ws(s[a])),!c)}if(f.isFormData(t)&&f.isFunction(t.entries)){const n={};return f.forEachEntry(t,(r,s)=>{e(_s(r),s,n,0)}),n}return null}function Rs(t,e,n){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const ye={transitional:mn,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=f.isObject(e);if(i&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return s?JSON.stringify(xn(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ss(e,this.formSerializer).toString();if((c=f.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Be(c?{"files[]":e}:e,u&&new u,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Rs(e)):e}],transformResponse:[function(e){const n=this.transitional||ye.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(r&&!this.responseType||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(a)throw c.name==="SyntaxError"?S.from(c,S.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{ye.headers[t]={}});const Os=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ts=t=>{const e={};let n,r,s;return t&&t.split(`
3
- `).forEach(function(a){s=a.indexOf(":"),n=a.substring(0,s).trim().toLowerCase(),r=a.substring(s+1).trim(),!(!n||e[n]&&Os[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},It=Symbol("internals");function he(t){return t&&String(t).trim().toLowerCase()}function De(t){return t===!1||t==null?t:f.isArray(t)?t.map(De):String(t)}function Ds(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Cs=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ge(t,e,n,r,s){if(f.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!f.isString(e)){if(f.isString(r))return e.indexOf(r)!==-1;if(f.isRegExp(r))return r.test(e)}}function Ns(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Is(t,e){const n=f.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,i,a){return this[r].call(this,e,s,i,a)},configurable:!0})})}class B{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function i(c,u,l){const d=he(u);if(!d)throw new Error("header name must be a non-empty string");const p=f.findKey(s,d);(!p||s[p]===void 0||l===!0||l===void 0&&s[p]!==!1)&&(s[p||u]=De(c))}const a=(c,u)=>f.forEach(c,(l,d)=>i(l,d,u));if(f.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(f.isString(e)&&(e=e.trim())&&!Cs(e))a(Ts(e),n);else if(f.isHeaders(e))for(const[c,u]of e.entries())i(u,c,r);else e!=null&&i(n,e,r);return this}get(e,n){if(e=he(e),e){const r=f.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return Ds(s);if(f.isFunction(n))return n.call(this,s,r);if(f.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=he(e),e){const r=f.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ge(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function i(a){if(a=he(a),a){const c=f.findKey(r,a);c&&(!n||Ge(r,r[c],c,n))&&(delete r[c],s=!0)}}return f.isArray(e)?e.forEach(i):i(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!e||Ge(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const n=this,r={};return f.forEach(this,(s,i)=>{const a=f.findKey(r,i);if(a){n[a]=De(s),delete n[i];return}const c=e?Ns(i):String(i).trim();c!==i&&delete n[i],n[c]=De(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return f.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&f.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
4
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[It]=this[It]={accessors:{}}).accessors,s=this.prototype;function i(a){const c=he(a);r[c]||(Is(s,a),r[c]=!0)}return f.isArray(e)?e.forEach(i):i(e),this}}B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(B.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});f.freezeMethods(B);function We(t,e){const n=this||ye,r=e||n,s=B.from(r.headers);let i=r.data;return f.forEach(t,function(c){i=c.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function vn(t){return!!(t&&t.__CANCEL__)}function fe(t,e,n){S.call(this,t??"canceled",S.ERR_CANCELED,e,n),this.name="CanceledError"}f.inherits(fe,S,{__CANCEL__:!0});function En(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ps(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ks(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,i=0,a;return e=e!==void 0?e:1e3,function(u){const l=Date.now(),d=r[i];a||(a=l),n[s]=u,r[s]=l;let p=i,v=0;for(;p!==s;)v+=n[p++],p=p%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),l-a<e)return;const x=d&&l-d;return x?Math.round(v*1e3/x):void 0}}function As(t,e){let n=0,r=1e3/e,s,i;const a=(l,d=Date.now())=>{n=d,s=null,i&&(clearTimeout(i),i=null),t.apply(null,l)};return[(...l)=>{const d=Date.now(),p=d-n;p>=r?a(l,d):(s=l,i||(i=setTimeout(()=>{i=null,a(s)},r-p)))},()=>s&&a(s)]}const Ne=(t,e,n=3)=>{let r=0;const s=ks(50,250);return As(i=>{const a=i.loaded,c=i.lengthComputable?i.total:void 0,u=a-r,l=s(u),d=a<=c;r=a;const p={loaded:a,total:c,progress:c?a/c:void 0,bytes:u,rate:l||void 0,estimated:l&&c&&d?(c-a)/l:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(p)},n)},Pt=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},kt=t=>(...e)=>f.asap(()=>t(...e)),Bs=A.hasStandardBrowserEnv?function(){const e=A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent),n=document.createElement("a");let r;function s(i){let a=i;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(a){const c=f.isString(a)?s(a):a;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),Ls=A.hasStandardBrowserEnv?{write(t,e,n,r,s,i){const a=[t+"="+encodeURIComponent(e)];f.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),f.isString(r)&&a.push("path="+r),f.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ms(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function $s(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function yn(t,e){return t&&!Ms(e)?$s(t,e):e}const At=t=>t instanceof B?{...t}:t;function re(t,e){e=e||{};const n={};function r(l,d,p){return f.isPlainObject(l)&&f.isPlainObject(d)?f.merge.call({caseless:p},l,d):f.isPlainObject(d)?f.merge({},d):f.isArray(d)?d.slice():d}function s(l,d,p){if(f.isUndefined(d)){if(!f.isUndefined(l))return r(void 0,l,p)}else return r(l,d,p)}function i(l,d){if(!f.isUndefined(d))return r(void 0,d)}function a(l,d){if(f.isUndefined(d)){if(!f.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function c(l,d,p){if(p in e)return r(l,d);if(p in t)return r(void 0,l)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(l,d)=>s(At(l),At(d),!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(d){const p=u[d]||s,v=p(t[d],e[d],d);f.isUndefined(v)&&p!==c||(n[d]=v)}),n}const bn=t=>{const e=re({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=e;e.headers=a=B.from(a),e.url=gn(yn(e.baseURL,e.url),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let u;if(f.isFormData(n)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...d]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...d].join("; "))}}if(A.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(e)),r||r!==!1&&Bs(e.url))){const l=s&&i&&Ls.read(i);l&&a.set(s,l)}return e},Fs=typeof XMLHttpRequest<"u",Us=Fs&&function(t){return new Promise(function(n,r){const s=bn(t);let i=s.data;const a=B.from(s.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:l}=s,d,p,v,x,m;function h(){x&&x(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let g=new XMLHttpRequest;g.open(s.method.toUpperCase(),s.url,!0),g.timeout=s.timeout;function y(){if(!g)return;const j=B.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),R={data:!c||c==="text"||c==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:j,config:t,request:g};En(function(P){n(P),h()},function(P){r(P),h()},R),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(r(new S("Request aborted",S.ECONNABORTED,t,g)),g=null)},g.onerror=function(){r(new S("Network Error",S.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||mn;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new S(D,R.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,t,g)),g=null},i===void 0&&a.setContentType(null),"setRequestHeader"in g&&f.forEach(a.toJSON(),function(D,R){g.setRequestHeader(R,D)}),f.isUndefined(s.withCredentials)||(g.withCredentials=!!s.withCredentials),c&&c!=="json"&&(g.responseType=s.responseType),l&&([v,m]=Ne(l,!0),g.addEventListener("progress",v)),u&&g.upload&&([p,x]=Ne(u),g.upload.addEventListener("progress",p),g.upload.addEventListener("loadend",x)),(s.cancelToken||s.signal)&&(d=j=>{g&&(r(!j||j.type?new fe(null,t,g):j),g.abort(),g=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const b=Ps(s.url);if(b&&A.protocols.indexOf(b)===-1){r(new S("Unsupported protocol "+b+":",S.ERR_BAD_REQUEST,t));return}g.send(i||null)})},Hs=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,c();const d=l instanceof Error?l:this.reason;r.abort(d instanceof S?d:new fe(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,i(new S(`timeout ${e} of ms exceeded`,S.ETIMEDOUT))},e);const c=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),t=null)};t.forEach(l=>l.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>f.asap(c),u}},qs=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},zs=async function*(t,e){for await(const n of Vs(t))yield*qs(n,e)},Vs=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Bt=(t,e,n,r)=>{const s=zs(t,e);let i=0,a,c=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:d}=await s.next();if(l){c(),u.close();return}let p=d.byteLength;if(n){let v=i+=p;n(v)}u.enqueue(new Uint8Array(d))}catch(l){throw c(l),l}},cancel(u){return c(u),s.return()}},{highWaterMark:2})},Le=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",jn=Le&&typeof ReadableStream=="function",Gs=Le&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Sn=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Ws=jn&&Sn(()=>{let t=!1;const e=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Lt=64*1024,it=jn&&Sn(()=>f.isReadableStream(new Response("").body)),Ie={stream:it&&(t=>t.body)};Le&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ie[e]&&(Ie[e]=f.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new S(`Response type '${e}' is not supported`,S.ERR_NOT_SUPPORT,r)})})})(new Response);const Ys=async t=>{if(t==null)return 0;if(f.isBlob(t))return t.size;if(f.isSpecCompliantForm(t))return(await new Request(A.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(f.isArrayBufferView(t)||f.isArrayBuffer(t))return t.byteLength;if(f.isURLSearchParams(t)&&(t=t+""),f.isString(t))return(await Gs(t)).byteLength},Js=async(t,e)=>{const n=f.toFiniteNumber(t.getContentLength());return n??Ys(e)},Xs=Le&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:l,headers:d,withCredentials:p="same-origin",fetchOptions:v}=bn(t);l=l?(l+"").toLowerCase():"text";let x=Hs([s,i&&i.toAbortSignal()],a),m;const h=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let g;try{if(u&&Ws&&n!=="get"&&n!=="head"&&(g=await Js(d,r))!==0){let R=new Request(e,{method:"POST",body:r,duplex:"half"}),I;if(f.isFormData(r)&&(I=R.headers.get("content-type"))&&d.setContentType(I),R.body){const[P,U]=Pt(g,Ne(kt(u)));r=Bt(R.body,Lt,P,U)}}f.isString(p)||(p=p?"include":"omit");const y="credentials"in Request.prototype;m=new Request(e,{...v,signal:x,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:y?p:void 0});let b=await fetch(m);const j=it&&(l==="stream"||l==="response");if(it&&(c||j&&h)){const R={};["status","statusText","headers"].forEach(w=>{R[w]=b[w]});const I=f.toFiniteNumber(b.headers.get("content-length")),[P,U]=c&&Pt(I,Ne(kt(c),!0))||[];b=new Response(Bt(b.body,Lt,P,()=>{U&&U(),h&&h()}),R)}l=l||"text";let D=await Ie[f.findKey(Ie,l)||"text"](b,t);return!j&&h&&h(),await new Promise((R,I)=>{En(R,I,{data:D,headers:B.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:m})})}catch(y){throw h&&h(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,t,m),{cause:y.cause||y}):S.from(y,y&&y.code,t,m)}}),at={http:ds,xhr:Us,fetch:Xs};f.forEach(at,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Mt=t=>`- ${t}`,Ks=t=>f.isFunction(t)||t===null||t===!1,_n={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let i=0;i<e;i++){n=t[i];let a;if(r=n,!Ks(n)&&(r=at[(a=String(n)).toLowerCase()],r===void 0))throw new S(`Unknown adapter '${a}'`);if(r)break;s[a||"#"+i]=r}if(!r){const i=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=e?i.length>1?`since :
5
- `+i.map(Mt).join(`
6
- `):" "+Mt(i[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:at};function Ye(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new fe(null,t)}function $t(t){return Ye(t),t.headers=B.from(t.headers),t.data=We.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),_n.getAdapter(t.adapter||ye.adapter)(t).then(function(r){return Ye(t),r.data=We.call(t,t.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return vn(r)||(Ye(t),r&&r.response&&(r.response.data=We.call(t,t.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const wn="1.7.7",vt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{vt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ft={};vt.transitional=function(e,n,r){function s(i,a){return"[Axios v"+wn+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,c)=>{if(e===!1)throw new S(s(a," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!Ft[a]&&(Ft[a]=!0,console.warn(s(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,a,c):!0}};function Qs(t,e,n){if(typeof t!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],a=e[i];if(a){const c=t[i],u=c===void 0||a(c,i,t);if(u!==!0)throw new S("option "+i+" must be "+u,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+i,S.ERR_BAD_OPTION)}}const ct={assertOptions:Qs,validators:vt},ee=ct.validators;class ne{constructor(e){this.defaults=e,this.interceptors={request:new Nt,response:new Nt}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
- `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=re(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ct.assertOptions(r,{silentJSONParsing:ee.transitional(ee.boolean),forcedJSONParsing:ee.transitional(ee.boolean),clarifyTimeoutError:ee.transitional(ee.boolean)},!1),s!=null&&(f.isFunction(s)?n.paramsSerializer={serialize:s}:ct.assertOptions(s,{encode:ee.function,serialize:ee.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&f.merge(i.common,i[n.method]);i&&f.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=B.concat(a,i);const c=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let d,p=0,v;if(!u){const m=[$t.bind(this),void 0];for(m.unshift.apply(m,c),m.push.apply(m,l),v=m.length,d=Promise.resolve(n);p<v;)d=d.then(m[p++],m[p++]);return d}v=c.length;let x=n;for(p=0;p<v;){const m=c[p++],h=c[p++];try{x=m(x)}catch(g){h.call(this,g);break}}try{d=$t.call(this,x)}catch(m){return Promise.reject(m)}for(p=0,v=l.length;p<v;)d=d.then(l[p++],l[p++]);return d}getUri(e){e=re(this.defaults,e);const n=yn(e.baseURL,e.url);return gn(n,e.params,e.paramsSerializer)}}f.forEach(["delete","get","head","options"],function(e){ne.prototype[e]=function(n,r){return this.request(re(r||{},{method:e,url:n,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(e){function n(r){return function(i,a,c){return this.request(re(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}ne.prototype[e]=n(),ne.prototype[e+"Form"]=n(!0)});class Et{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(c=>{r.subscribe(c),i=c}).then(s);return a.cancel=function(){r.unsubscribe(i)},a},e(function(i,a,c){r.reason||(r.reason=new fe(i,a,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Et(function(s){e=s}),cancel:e}}}function Zs(t){return function(n){return t.apply(null,n)}}function eo(t){return f.isObject(t)&&t.isAxiosError===!0}const ut={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ut).forEach(([t,e])=>{ut[e]=t});function Rn(t){const e=new ne(t),n=nn(ne.prototype.request,e);return f.extend(n,ne.prototype,e,{allOwnKeys:!0}),f.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return Rn(re(t,s))},n}const T=Rn(ye);T.Axios=ne;T.CanceledError=fe;T.CancelToken=Et;T.isCancel=vn;T.VERSION=wn;T.toFormData=Be;T.AxiosError=S;T.Cancel=T.CanceledError;T.all=function(e){return Promise.all(e)};T.spread=Zs;T.isAxiosError=eo;T.mergeConfig=re;T.AxiosHeaders=B;T.formToJSON=t=>xn(f.isHTMLForm(t)?new FormData(t):t);T.getAdapter=_n.getAdapter;T.HttpStatusCode=ut;T.default=T;const to="https://g-api.billgang.com",no=async(t="get",e,n)=>{const r=localStorage.getItem("shopId")||void 0,s=`${to}/v2/builder/shops/${r}/${e}`,i=localStorage.getItem("accessToken")||void 0;if(t.toUpperCase()==="GET")return(await T.get(s,{headers:{Authorization:`Bearer ${i}`}})).data;t.toUpperCase()==="POST"&&await T.post(s,{...n},{headers:{Authorization:`Bearer ${i}`}}),t.toUpperCase()==="PUT"&&await T.put(s,{...n},{headers:{Authorization:`Bearer ${i}`}})},ro=()=>{const{currentPage:t,setCurrentPage:e,setIsOpenModal:n,pages:r,setIsEdit:s,setEditedPage:i,deletePage:a,isOpenSelectModal:c,setIsOpenSelectModal:u}=o.usePagesStore(),{deletePage:l}=o.useLayersStore(),[d,p]=E.useState("");return E.useEffect(()=>{const v=()=>{u(!1)};return document.body.addEventListener("click",v),()=>{document.body.removeEventListener("click",v)}},[]),o.jsxRuntimeExports.jsxs("div",{className:X.pages,children:[o.jsxRuntimeExports.jsxs("div",{className:X.default,onClick:v=>{v.stopPropagation(),u(!c)},children:[o.jsxRuntimeExports.jsx(o.Icon,{name:r[t].icon,fill:"#252525",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:X.text,children:o.defaultPageNames.includes(r[t].name)?`${J(r[t].name)} page`:r[t].name}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-down",width:20,height:20})]}),c&&o.jsxRuntimeExports.jsxs("div",{className:X.modal,onClick:v=>v.stopPropagation(),children:[Object.keys(r).map(v=>{const x=r[v];return o.jsxRuntimeExports.jsxs("div",{className:o.clx(X.page,{[X.hoverable]:d===v}),onMouseEnter:()=>p(v),onMouseLeave:()=>p(""),onClick:()=>{p(""),s(!1),e(v),u(!1)},children:[o.jsxRuntimeExports.jsx(o.Icon,{name:x.icon,fill:"#252525"}),o.jsxRuntimeExports.jsx("span",{className:X.text,children:o.defaultPageNames.includes(x.name)?`${J(x.name)} page`:x.name}),d===v&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"settings",fill:"#757575",onClick:m=>{m.stopPropagation(),s(!0),i(v),n(!0)}}),!o.defaultPageNames.includes(x.name)&&o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",fill:"#C12A2A",onClick:m=>{r[t].name===x.name&&e("home"),m.stopPropagation(),a(v),l(x.name)}})]}),r[t].name===x.name&&o.jsxRuntimeExports.jsx(o.Icon,{name:"check",fill:"#FF3F19"})]},v)}),o.jsxRuntimeExports.jsx("div",{className:X.separator}),o.jsxRuntimeExports.jsxs(o.Button,{className:X.button,onClick:v=>{v.stopPropagation(),n(!0)},size:"l",children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"plus",fill:"#ff3f19"}),o.jsxRuntimeExports.jsx("span",{children:"Create Page Blank"})]})]})]})},so="_zoom_a77cn_1",oo={zoom:so},io=()=>{const[t,e]=E.useState(),n=()=>{e(Number(Math.round(window.devicePixelRatio*50).toFixed(0)))};return E.useEffect(()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[]),o.jsxRuntimeExports.jsxs("div",{className:oo.zoom,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"zoom-minus",width:20,height:20}),o.jsxRuntimeExports.jsxs("span",{children:[t," %"]})]})},ao=()=>o.jsxRuntimeExports.jsxs("div",{className:gr.settings,children:[o.jsxRuntimeExports.jsx(vr,{}),o.jsxRuntimeExports.jsx(ro,{}),o.jsxRuntimeExports.jsx(io,{})]}),co="_theme_3wxbf_1",uo={theme:co},lo=()=>o.jsxRuntimeExports.jsxs("div",{className:uo.theme,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"check",width:18,height:18}),o.jsxRuntimeExports.jsx("div",{children:"Current Theme"})]}),fo=()=>{const{themeSettings:t}=o.useThemeSettingsStore(),{settings:e}=o.useSettingsStore(),[n,r]=E.useState(null),[s,i]=E.useState(!1),{pages:a}=o.usePagesStore(),{blocks:c}=o.useLayersStore();function u(x,m){return m.map(g=>Object.values(g.value).filter(y=>y.type===x).map(y=>y.value).flat()).flat()}function l(x,m){return u(x,m).some(g=>g)}function d(x,m){const h=u(x,m);return Array.isArray(h)&&h.length>0?Math.max(...h):0}function p(x){const m=Object.keys(a).find(h=>a[h].name===x);return m?a[m]:null}const v=()=>{if(s)n&&clearTimeout(n);else{const m=Object.keys(c).map(h=>{const g=p(h);return{name:g?g.name:h,path:h==="home"?"/":(g==null?void 0:g.path)||h,layout:{...c[h]},neededProductIds:[...u("ProductId",Object.values(c[h]))],neededCategoryIds:[...u("CategoryId",Object.values(c[h]))],neededAnnouncementIds:[...u("AnnouncementId",Object.values(c[h]))],neededListingIds:[...u("ListingId",Object.values(c[h]))],neededFaqs:l("Faqs",Object.values(c[h])),neededReviewCount:d("ReviewCount",Object.values(c[h])),seo:{pageTitle:g?g.seo.title:"",pageDescription:g?g.seo.description:""}}});no("POST","save",{themeSettings:t,settings:e,updatedPages:m})}i(!0);const x=setTimeout(()=>{i(!1)},2e3);r(x)};return o.jsxRuntimeExports.jsxs("div",{className:Se.header,children:[o.jsxRuntimeExports.jsxs("div",{className:Se.left,children:[o.jsxRuntimeExports.jsx(ar,{}),o.jsxRuntimeExports.jsx(pr,{})]}),o.jsxRuntimeExports.jsx("div",{className:Se.center,children:o.jsxRuntimeExports.jsx(ao,{})}),o.jsxRuntimeExports.jsxs("div",{className:Se.right,children:[o.jsxRuntimeExports.jsx(lo,{}),o.jsxRuntimeExports.jsx(rr,{}),o.jsxRuntimeExports.jsx(o.Button,{onClick:v,children:"Save"})]})]})},po="_exit_2ce42_1",ho="_text_2ce42_10",Ut={exit:po,text:ho},go=()=>o.jsxRuntimeExports.jsxs("div",{className:Ut.exit,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"sign-out",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:Ut.text,children:"Exit"})]}),mo="_navbar_2ac63_1",xo="_main_2ac63_6",vo="_block_2ac63_13",Eo="_active_2ac63_30",_e={navbar:mo,main:xo,block:vo,active:Eo},yo=()=>{const{activeBlock:t,setActiveBlock:e}=o.useNavbarStore(),{setActiveBlock:n}=o.useBlocksStore(),{setCurrentBlock:r}=o.useLayersStore(),{setActiveBlock:s}=o.useThemeSettingsStore();function i(a){n(null),e(a),r(null),s(null)}return o.jsxRuntimeExports.jsxs("div",{className:_e.navbar,children:[o.jsxRuntimeExports.jsx(go,{}),o.jsxRuntimeExports.jsx("div",{className:_e.main,children:o.navbarBlocks.map(a=>o.jsxRuntimeExports.jsxs("div",{className:o.clx(_e.block,{[_e.active]:t.icon===a.icon}),onClick:()=>i(a),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:a.icon,fill:t.icon===a.icon?"#252525":"#757575"}),o.jsxRuntimeExports.jsx("span",{children:a.name})]},a.icon))})]})},bo="_preview_jui5n_1",jo="_main_jui5n_9",So="_content_jui5n_19",_o="_loading_jui5n_26",wo="_loader_jui5n_34",Ro="_spin_jui5n_1",ge={preview:bo,main:jo,content:So,loading:_o,loader:wo,spin:Ro},Oo="_header_1t64j_1",To="_circles_1t64j_14",Do="_circle_1t64j_14",Co="_red_1t64j_30",No="_green_1t64j_34",Io="_yellow_1t64j_38",Po="_input_1t64j_42",ko="_main_1t64j_51",Ao="_text_1t64j_59",K={header:Oo,circles:To,circle:Do,red:Co,green:No,yellow:Io,input:Po,main:ko,text:Ao},Bo="data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20x='0.5'%20width='16'%20height='16'%20fill='url(%23pattern0_4042_718)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_4042_718'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_4042_718'%20transform='scale(0.015625)'/%3e%3c/pattern%3e%3cimage%20id='image0_4042_718'%20width='64'%20height='64'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAONJREFUeF7t20EOhEAIRFG4/6F7DvEnYeFzryQIv6pBd2behOu9dPvsbog+k+NLgArQAqmJcw9iAAhSgZKB3IJkkAySQTJ4CiE+gA8oBeg0mH3Ai084P89HhqwEqIA209ICsQdjAeaZIgaAYKxBDMCAYy8fXwAIgiAIcoJpJEYGI4VjB3YrbC9gL2AvkCB43cM5PgZgAAZgQFnNZAhdGykQBEEQBEEQDBmgAm2glM/z+QUYisYUGoldO7kY32IEAzCg6RgIRgjFAsw+AgRBMNYgBmCAT2TCYfoPPz/HCqQCX1eBHzHnv7C7WhBSAAAAAElFTkSuQmCC'/%3e%3c/defs%3e%3c/svg%3e",Lo=["red","yellow","green"],Mo=()=>o.jsxRuntimeExports.jsxs("div",{className:K.header,children:[o.jsxRuntimeExports.jsx("div",{className:K.circles,children:Lo.map(t=>o.jsxRuntimeExports.jsx("div",{className:o.clx(K.circle,{[K.red]:t==="red",[K.yellow]:t==="yellow",[K.green]:t==="green"})},t))}),o.jsxRuntimeExports.jsxs("div",{className:K.input,children:[o.jsxRuntimeExports.jsxs("div",{className:K.main,children:[o.jsxRuntimeExports.jsx("img",{src:Bo,alt:""}),o.jsxRuntimeExports.jsx("span",{className:K.text,children:"lorem.ipsum"}),o.jsxRuntimeExports.jsx(o.Icon,{name:"lock",fill:"#757575",width:15,height:16})]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"copy",width:20,height:20})]})]}),$o="_content_92dk8_1",Fo="_block_92dk8_6",Uo="_active_92dk8_13",Ho="_name_92dk8_17",qo="_empty_92dk8_31",zo="_icon_92dk8_42",Vo="_title_92dk8_53",Go="_text_92dk8_59",Wo="_sections_92dk8_65",Yo="_section_92dk8_65",z={content:$o,block:Fo,active:Uo,name:Ho,empty:qo,icon:zo,title:Vo,text:Go,sections:Wo,section:Yo},Jo="_sidebar_1f3hk_1",Xo="_content_1f3hk_12",Ko="_button_1f3hk_22",Qo="_moveButton_1f3hk_30",Zo="_border_1f3hk_34",ei="_deleteButton_1f3hk_38",M={sidebar:Jo,content:Xo,button:Ko,moveButton:Qo,border:Zo,deleteButton:ei},ti=()=>{const{activeBlock:t}=o.usePreviewStore(),{blocks:e,removeBlock:n,moveBlock:r,duplicateBlock:s}=o.useLayersStore(),{currentPage:i,pages:a}=o.usePagesStore(),c=Object.keys(e[a[i].name]),u=c.indexOf(t),l=()=>{u>0&&r(a[i].name,u,u-1)},d=()=>{u<c.length-1&&r(a[i].name,u,u+1)},p=()=>{s(a[i].name,t)};return o.jsxRuntimeExports.jsx("div",{className:M.sidebar,children:o.jsxRuntimeExports.jsxs("div",{className:M.content,children:[o.jsxRuntimeExports.jsx("button",{onClick:l,className:o.clx(M.button,M.moveButton),disabled:u===0,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-preview-up"})}),o.jsxRuntimeExports.jsx("button",{onClick:d,className:o.clx(M.button,M.moveButton),disabled:u===c.length-1,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-preview-down"})}),o.jsxRuntimeExports.jsx("div",{className:M.border}),o.jsxRuntimeExports.jsx("button",{onClick:p,className:o.clx(M.button,M.moveButton),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"copy"})}),o.jsxRuntimeExports.jsx("div",{className:M.border}),o.jsxRuntimeExports.jsx("button",{onClick:()=>n(a[i].name,t),className:o.clx(M.button,M.deleteButton),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",hoverable:!0})})]})})},On=({render:t,block:e})=>t(e),ni=()=>{const{blocks:t,setActiveBlock:e}=o.useBlocksStore(),{hideModal:n}=o.useSubmodalStore();function r(s){e(s),n()}return o.jsxRuntimeExports.jsxs("div",{className:z.empty,children:[o.jsxRuntimeExports.jsx("div",{className:z.icon,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"file",width:32,height:32,fill:"#757575"})}),o.jsxRuntimeExports.jsx("div",{className:z.title,children:"Empty Page"}),o.jsxRuntimeExports.jsx("div",{className:z.text,children:"Here are the recommended sections for you"}),o.jsxRuntimeExports.jsxs("div",{className:z.sections,children:[Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:z.section,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsxs("span",{children:[s," Sections"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"plus"})]})),Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:z.section,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsxs("span",{children:[s," Sections"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"plus"})]}))]})]})},ri=E.memo(()=>{const{setActiveBlock:t,activeBlock:e}=o.usePreviewStore(),{blocks:n}=o.useBlocksStore(),{blocks:r}=o.useLayersStore(),{settings:s}=o.useSettingsStore(),{currentPage:i,pages:a,setIsOpenSelectModal:c}=o.usePagesStore(),u=p=>{const v=n[p.name],x=p.value;for(const m in x)v[m]=x[m];return v.renderBlock(s)},l=E.useRef(e);E.useEffect(()=>{l.current=e},[e]),E.useEffect(()=>{const p=()=>{l.current&&t(null)};return document.body.addEventListener("click",p),()=>{document.body.removeEventListener("click",p)}},[]);const d=E.useCallback(p=>u(p),[r]);return o.jsxRuntimeExports.jsxs("div",{onClick:p=>{p.stopPropagation(),c(!1)},className:z.content,children:[r[a[i].name]&&Object.keys(r[a[i].name]).map(p=>o.jsxRuntimeExports.jsxs("div",{onClick:()=>t(p),className:o.clx(z.block,{[z.active]:e===p}),children:[e===p&&o.jsxRuntimeExports.jsx("div",{className:z.name,children:r[a[i].name][p].name}),e===p&&o.jsxRuntimeExports.jsx(ti,{}),o.jsxRuntimeExports.jsx(On,{render:d,block:r[a[i].name][p]})]})),(!r[a[i].name]||Object.keys(r[a[i].name]).length===0)&&o.jsxRuntimeExports.jsx(ni,{})]})}),si="_results_f488n_1",oi="_name_f488n_8",ii="_product_f488n_15",we={results:si,name:oi,product:ii},ai="_search_1s0qp_1",ci="_input_1s0qp_12",Ht={search:ai,input:ci},ui=()=>o.jsxRuntimeExports.jsxs("label",{className:Ht.search,children:[o.jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search for sections",className:Ht.input}),o.jsxRuntimeExports.jsx(o.Icon,{name:"search",fill:"#757575"})]}),Tn=()=>{const{blocks:t,setActiveBlock:e}=o.useBlocksStore(),{hideModal:n}=o.useSubmodalStore();function r(s){e(s),n()}return o.jsxRuntimeExports.jsxs("div",{className:we.add,children:[o.jsxRuntimeExports.jsx(ui,{}),o.jsxRuntimeExports.jsx("div",{className:we.results,children:Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:we.product,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsx("span",{className:we.name,children:s}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-right"})]},s))})]})},li=()=>{const{modalPosition:t,color:e,initialColor:n,setShowModal:r,hue:s,saturation:i,brightness:a,dragging:c,setDragging:u,setHue:l,setSaturation:d,setBrightness:p,colorChange:v,setColor:x,update:m}=o.useColorPickerStore(),h=w=>{const{offsetX:C,offsetY:N}=w.nativeEvent;u(!0),b(C,N,w.currentTarget)},g=w=>{if(c){const C=document.querySelector(`.${o.styles.colorMap}`),{left:N,top:k}=C.getBoundingClientRect(),O=w.clientX-N,Z=w.clientY-k;b(O,Z,C)}},y=()=>{u(!1)},b=(w,C,N)=>{const{width:k,height:O}=N.getBoundingClientRect(),Z=Math.max(0,Math.min(w/k*100,100)),be=Math.max(0,Math.min(100-C/O*100,100));d(Z),p(be),j(Z,be)},j=(w,C)=>{const N=I(s,w,C);v(N),x(N)},D=(w,C,N)=>{C/=100,N/=100;const k=je=>(je+w/60)%6,O=je=>N*(1-C*Math.max(0,Math.min(k(je),4-k(je),1))),Z=Math.round(255*O(5)),be=Math.round(255*O(3)),Jn=Math.round(255*O(1));return{r:Z,g:be,b:Jn}},R=(w,C,N)=>{const k=O=>O.toString(16).padStart(2,"0");return`#${k(w)}${k(C)}${k(N)}`},I=(w,C,N)=>{const{r:k,g:O,b:Z}=D(w,C,N);return R(k,O,Z)};E.useEffect(()=>{const w=N=>g(N),C=()=>y();return c?(document.addEventListener("mousemove",w),document.addEventListener("mouseup",C)):(document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C)),()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C)}},[c]);function P(){m(e),r(!1)}function U(){r(!1),v(n)}return o.jsxRuntimeExports.jsxs("div",{className:o.styles.modal,onClick:w=>w.stopPropagation(),style:{top:`${t.top}px`,left:`${t.left}px`},children:[o.jsxRuntimeExports.jsx("div",{children:"Color"}),o.jsxRuntimeExports.jsx("div",{className:o.styles.colorMap,onMouseDown:h,style:{background:`
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@charset "UTF-8";@import"https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100..900;1,100..900&display=swap";._icon_21b8w_1 path{fill:var(--icon-fill)}._hoverable_21b8w_5{cursor:pointer}._button_rcjso_1{background-color:#ff3f19;padding:10px 16px;color:#fff;border-radius:12px;cursor:pointer;font-size:16px}._button_rcjso_1:disabled{opacity:.7;cursor:auto}._wrapper_1y283_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_1y283_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._input_1y283_17{width:100%;background-color:var(--background-color);border-radius:12px;padding:7px 11px;font-size:16px;line-height:24px;border:1px solid var(--background-color)}._input_1y283_17::placeholder{color:#c2c2c2}._input_1y283_17:disabled{background-color:var(--background-color);opacity:.7}._required_1y283_36{border:1px solid #ff3f19}._paddingless_1y283_40{padding:0}._wrapper_dmzhr_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_dmzhr_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._select_dmzhr_17{width:100%;background-color:var(--background-color);border-radius:12px;padding:10px 12px;font-size:14px;line-height:20px;display:flex;align-items:center;justify-content:space-between;cursor:pointer}._icon_dmzhr_30{transition:.2s}._rotate_dmzhr_34{transform:rotate(180deg)}._content_dmzhr_38{position:relative}._options_dmzhr_42{position:absolute;top:45px;width:100%;background-color:var(--background-color);border-radius:12px;font-size:14px;line-height:20px;display:flex;flex-direction:column;max-height:200px;z-index:10;overflow-y:scroll;cursor:pointer}._option_dmzhr_42{padding:10px 12px;border-radius:12px}._option_dmzhr_42:hover{background-color:#e6e6e6}._wrapper_3w2ni_1{display:flex;width:fit-content;gap:8px;align-items:center;border-radius:12px;line-height:20px;color:#252525;font-size:14px;font-weight:400}._switch_3w2ni_13{width:40px;height:24px;background-color:#ccc;border-radius:25px;display:flex;align-items:center;padding:2px;cursor:pointer;transition:background-color .2s}._switch_3w2ni_13._active_3w2ni_24{background:#ff3f19}._switch_3w2ni_13 ._toggle_3w2ni_27{width:14px;height:14px;background-color:#fff;border-radius:16px;transition:transform .2s;transform:translate(2px)}._switch_3w2ni_13._active_3w2ni_24 ._toggle_3w2ni_27{transform:translate(18px)}._background_3w2ni_39{background-color:#f8f8f8}._padding_3w2ni_43{padding:8px}._wrapper_1inu5_1{border:var(--default-border);width:fit-content;height:fit-content;max-height:500px;max-width:500px;min-width:300px;padding:10px;left:10px;top:10px;position:absolute;z-index:1000;background-color:#fff;display:flex;border-radius:8px;justify-content:center;align-items:center;overflow:hidden}._blocks_1op3c_1{display:flex;align-items:center;gap:8px}._block_1op3c_1{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1op3c_18{border:1px solid #ff3f19}._applyButton_1cqw4_2{flex:0 1 50%;font-weight:400}._cancelButton_1cqw4_7{background-color:#f8f8f8;color:var(--accent-color)}._content_1cqw4_12{display:flex;flex-direction:column;width:100%}._label_1cqw4_18{padding:8px 12px;border-radius:8px;display:flex;align-items:center;position:relative;gap:8px;width:100%;background-color:var(--background-color);cursor:pointer}._colorValue_1cqw4_30{width:20px;height:20px;padding:2.5px;border-radius:2px}._modal_1cqw4_37{left:15px;width:288px;overflow-y:auto;z-index:100000000;position:fixed;background-color:#fff;border-radius:12px;padding:10px;border:1px solid #e6e6e6;height:400px;display:flex;flex-direction:column;gap:10px;font-size:16px;line-height:24px;font-weight:700}._colorMap_1cqw4_56{position:relative;width:100%;height:300px;cursor:pointer;border-radius:4px}._indicator_1cqw4_64{position:absolute;width:20px;height:20px;border:4px solid white;border-radius:50%;pointer-events:none}._hueSlider_1cqw4_73{width:80%;left:30px;height:8px;position:absolute;bottom:80px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red,red);border-radius:5px}input[type=range]{-webkit-appearance:none;height:8px;outline:none;border-radius:5px;position:relative;display:flex;justify-content:center}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border:5px solid #fff;border-radius:50%;cursor:pointer}._slider_1cqw4_102{width:100%;cursor:pointer}._buttons_1cqw4_107{display:flex;gap:5px;width:100%}._name_1cqw4_113{line-height:20px;padding:0 4px 4px}._secondary_1cqw4_118{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._input_1cqw4_126{line-height:20px;font-size:14px;font-weight:400}._modal_1qb2a_1{position:fixed;top:0;left:0;right:0;bottom:0;background:#2525253d;z-index:100000;display:flex;padding:20px;justify-content:center;align-items:center;overflow:hidden}._wrapper_1qvfi_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%;position:relative}._label_1qvfi_10{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._textarea_1qvfi_18{width:100%;background-color:var(--background-color);border-radius:12px;padding:8px 12px;font-size:16px;line-height:24px;resize:none;min-height:80px}._textarea_1qvfi_18::placeholder{color:#c2c2c2}._length_1qvfi_33{position:absolute;bottom:12px;right:12px;color:#c2c2c2;line-height:20px}._wrapper_1fcne_2{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_1fcne_10{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._options_1fcne_18{display:flex;gap:20px}._radioLabel_1fcne_23{display:flex;align-items:center;cursor:pointer;position:relative}._radio_1fcne_23{position:absolute;opacity:0;cursor:pointer}._custom_1fcne_36{height:20px;width:20px;border-radius:50%;border:1px solid #e6e6e6;display:inline-block;margin-right:8px;position:relative}._radio_1fcne_23:checked+._custom_1fcne_36{border-color:#ff3f19;background:#ffeae5}._custom_1fcne_36:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:8px;height:8px;border-radius:50%;background-color:#e53e3e;opacity:0}._radio_1fcne_23:checked+._custom_1fcne_36:after{opacity:1}._option_1fcne_18{font-size:16px;line-height:24px;font-weight:400}._tip_pl6k0_1{display:flex;align-items:center;padding:8px;border-radius:12px;gap:8px}._text_pl6k0_9{flex:1 1 auto;line-height:20px;font-size:14px}._warning_pl6k0_15{background:#faf8e6;color:#c1972a}._error_pl6k0_20{background:#ffc3b7;color:#ff3f19}._hide_pl6k0_25{display:none}._customCheckbox_1b69m_1{display:inline-block;cursor:pointer;position:relative}._checkboxBox_1b69m_7{display:inline-block;width:20px;height:20px;border:1px solid #e6e6e6;border-radius:6px;position:relative}._checkboxBox_1b69m_7._checked_1b69m_16{background:#ffeae5;border:1px solid #ff3f19}._icon_1b69m_21{position:absolute;top:3px;left:3px}._wrapper_arjxm_2{display:flex;flex-direction:column;gap:6px}._label_arjxm_8{color:#757575;font-weight:400;font-size:14px;line-height:20px}._icon_arjxm_15{padding:4px;background-color:#fff;border:1px solid #f0f0f0;display:flex;justify-content:center;align-items:center;border-radius:6px}._text_arjxm_25{font-weight:400;font-size:16px;line-height:24px;color:#ff3f19}._content_arjxm_32{display:flex;align-items:center;gap:6px;cursor:pointer;background-color:#f8f8f8;border-radius:12px;padding:6px 8px}._modal_arjxm_42{background-color:#f8f8f8;border:1px solid #f0f0f0;border-radius:16px;width:100%;max-width:640px}._top_arjxm_50{padding:16px 24px;display:flex;align-items:center;justify-content:space-between}._title_arjxm_57{color:#252525;font-weight:400;font-size:18px;line-height:24px}._modalContent_arjxm_64{padding:16px 24px;border-top-left-radius:16px;border-top-right-radius:16px;border-top:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0;background-color:#fff}._images_arjxm_73{display:grid;grid-template-columns:repeat(3,1fr);align-items:center;gap:10px;overflow-y:scroll;max-height:390px}._add_arjxm_82{display:flex;flex-direction:column;gap:8px;padding:43px 16px;border:1px dashed #e6e6e6;justify-content:center;align-items:center;border-radius:16px;aspect-ratio:1/1}._description_arjxm_94{text-align:center;color:#252525;font-size:14px;line-height:20px}._description_arjxm_94 span:last-child{padding-top:4px}._bottom_arjxm_104{display:flex;justify-content:end;align-items:center;width:100%;background-color:#fff;border-bottom-left-radius:16px;border-bottom-right-radius:16px;padding:16px 24px 12px;gap:6px}._cancel_arjxm_116{background-color:var(--background-color);color:var(--accent-color)}._highlight_arjxm_121{color:#ff3f19;cursor:pointer}._accent_arjxm_126{color:var(--accent-color)}._image_arjxm_73{position:relative;padding:43px 16px;border:1px solid #e6e6e6;justify-content:center;align-items:center;border-radius:16px;aspect-ratio:1/1}._selected_arjxm_140{border:1px solid #ff3f19}._checkbox_arjxm_144{position:absolute;top:12px;left:12px}._loading_arjxm_150{position:relative;padding:43px 16px;border:1px solid #e6e6e6;background-color:#f8f8f8;justify-content:center;align-items:center;display:flex;border-radius:16px;aspect-ratio:1/1}._spinner_arjxm_162{width:24px;height:24px;border:2px solid #ff3f19;border-top-color:#f8f8f8;border-radius:50%;animation:_spin_arjxm_162 1s linear infinite}@keyframes _spin_arjxm_162{to{transform:rotate(360deg)}}._buttons_1gn8m_1{display:flex;align-items:center;gap:16px}._button_1gn8m_1{cursor:pointer;padding:10px}._devices_hxl12_1{display:flex;gap:4px;background:var(--background-color);padding:4px;border-radius:16px}._device_hxl12_1{padding:6px 8px;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:12px;border:1px solid var(--background-color)}._device_hxl12_1:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_hxl12_23{background-color:#fff}._active_hxl12_23:hover{border:1px solid var(--background-color);box-shadow:none}._header_wxpoz_1{position:absolute;top:0;left:0;width:100%;padding:11px 22px;line-height:20px;border-bottom:var(--default-border);display:flex;align-items:center;justify-content:space-between;gap:24px;z-index:50000}._left_wxpoz_16,._right_wxpoz_17{display:flex;align-items:center;gap:24px}._preview_vijvm_2{display:flex;align-items:center;gap:4px;color:var(--accent-color);line-height:20px;padding:10px 16px;cursor:pointer;border:1px solid #fff;border-radius:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}._preview_vijvm_2:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_vijvm_22{background-color:var(--background-color)}._active_vijvm_22:hover{border:1px solid #fff;box-shadow:none}._settings_q79q3_1{display:flex;gap:20px;align-items:center;color:var(--accent-color)}._language_1mbvp_1{display:flex;align-items:center;gap:4px;background-color:var(--background-color);padding:10px 12px;border-radius:12px;cursor:pointer}._text_1mbvp_11{padding-right:4px;color:var(--main-color)}._pages_x8pw2_1{position:relative}._default_x8pw2_5{display:flex;align-items:center;gap:4px;padding:10px 12px;background-color:var(--background-color);border-radius:8px;cursor:pointer;position:relative}._text_x8pw2_16{padding-right:4px;color:var(--main-color);flex:1 1 auto}._modal_x8pw2_22{position:absolute;top:45px;width:320px;left:0;z-index:100;background-color:#fff;border:1px solid #e6e6e6;border-radius:8px;padding:8px 12px;display:flex;flex-direction:column}._page_x8pw2_1{display:flex;align-items:center;gap:8px;padding:12px 8px;border-radius:8px;cursor:pointer}._hoverable_x8pw2_45{background-color:var(--background-color)}._separator_x8pw2_49{border-bottom:1px solid #f0f0f0}._button_x8pw2_53{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:start;gap:8px;padding:16px 8px 12px;transition:.2s}._button_x8pw2_53:hover{background-color:var(--background-color)}._zoom_a77cn_1{display:flex;align-items:center;gap:4px;background-color:var(--background-color);padding:10px 12px;border-radius:12px;cursor:pointer}._theme_3wxbf_1{display:flex;align-items:center;gap:4px;padding:9px 12px;background:#e5fadd;color:#338b13;border-radius:100px}._exit_2ce42_1{border-bottom:var(--default-border);display:flex;gap:8px;align-items:center;padding:22px;cursor:pointer}._text_2ce42_10{color:#252525;line-height:20px}._navbar_2ac63_1{width:100px;border-right:var(--default-border)}._main_2ac63_6{display:flex;flex-direction:column;gap:8px;padding:16px 12px}._block_2ac63_13{display:flex;align-items:center;flex-direction:column;gap:4px;color:var(--accent-color);line-height:20px;padding:12px 24px;cursor:pointer;border:1px solid #fff;border-radius:16px}._block_2ac63_13:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_2ac63_30{background-color:var(--background-color);color:#252525}._active_2ac63_30:hover{border:1px solid #fff;box-shadow:none}._preview_jui5n_1{width:100%;background-color:var(--background-color);padding:16px 32px 0;position:relative;z-index:500}._main_jui5n_9{width:100%;display:flex;flex-direction:column;overflow-y:auto;height:100%;position:relative;z-index:1}._content_jui5n_19{background-color:#fff;border:var(--default-border);border-bottom:none;height:100%}._loading_jui5n_26{width:100%;height:100%;display:flex;justify-content:center;align-items:center}._loader_jui5n_34{border:4px solid rgba(0,0,0,.1);border-left-color:#fff;border-radius:50%;width:40px;height:40px;animation:_spin_jui5n_1 1s linear infinite}@keyframes _spin_jui5n_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._header_1t64j_1{display:flex;width:100%;padding:18px;justify-content:center;border:var(--default-border);background-color:#fff;border-top-left-radius:16px;border-top-right-radius:16px;border-bottom:none;z-index:5}._circles_1t64j_14{left:28px;top:28px;position:absolute;display:flex;align-items:center;gap:8px}._circle_1t64j_14{width:12px;height:12px;border-radius:50%;border:.5px solid #e6e6e6}._red_1t64j_30{background:#ff5f57}._green_1t64j_34{background:#28c840}._yellow_1t64j_38{background:#febc2e}._input_1t64j_42{background-color:var(--background-color);padding:6px 8px;display:flex;max-width:480px;width:100%;border-radius:6px}._main_1t64j_51{flex:1 1 auto;display:flex;align-items:center;justify-content:center;gap:4px}._text_1t64j_59{font-weight:600;font-size:12px;line-height:16px;margin:0 0 0 4px}._content_92dk8_1{width:100%;height:100%}._block_92dk8_6{position:relative;cursor:pointer;border-left:1px solid #e6e6e6;border-right:1px solid #e6e6e6}._active_92dk8_13{border:2px solid #ff3f19}._name_92dk8_17{z-index:10;position:absolute;top:-28px;left:-2px;border-top-left-radius:8px;border-top-right-radius:8px;color:#fff;background:#ff3f19;padding:4px 12px;line-height:20px;text-align:center}._empty_92dk8_31{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._icon_92dk8_42{width:64px;height:64px;background-color:var(--background-color);display:flex;border-radius:50%;justify-content:center;align-items:center;margin:0 0 8px}._title_92dk8_53{font-weight:700;font-size:24px;line-height:32px}._text_92dk8_59{font-size:16px;line-height:24px;color:var(--accent-color)}._sections_92dk8_65{padding:0 20px;margin:20px 0 0;display:flex;flex-wrap:wrap;justify-content:center;gap:24px}._section_92dk8_65{cursor:pointer;display:flex;gap:10px;max-width:288px;width:100%;align-items:center;justify-content:space-between;padding:24px;background-color:var(--background-color);border-radius:24px;color:var(--accent-color)}._sidebar_1f3hk_1{position:absolute;display:flex;height:fit-content();flex-direction:column;right:10px;z-index:20;padding:10px;cursor:auto}._content_1f3hk_12{height:100%;border:1px solid #e6e6e6;border-radius:8px;background-color:#fff;padding:8px;max-width:60px;width:100%}._button_1f3hk_22{display:flex;align-items:center;border-radius:8px;padding:8px;transition:.2s background-color}._moveButton_1f3hk_30:hover{background-color:var(--background-color)}._border_1f3hk_34{border-bottom:var(--default-border)}._deleteButton_1f3hk_38:hover{background-color:#dd6363;color:#fff}._results_f488n_1{display:flex;flex-direction:column;padding:8px;gap:20px}._name_f488n_8{color:var(--main-color);font-weight:600;font-size:16px;line-height:24px}._product_f488n_15{display:flex;align-items:center;justify-content:space-between;cursor:pointer}._search_1s0qp_1{background:var(--background-color);padding:8px 12px;display:flex;align-items:center;border-radius:12px;width:100%;gap:10px;margin:8px 0}._input_1s0qp_12{width:100%;font-size:16px;line-height:24px;color:#252525}._input_1s0qp_12::placeholder{color:#c2c2c2}._sidebar_1r5sp_1{max-width:320px;width:100%;padding:16px;border-right:var(--default-border);height:100%;position:relative}._title_1r5sp_10{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px;padding-bottom:8px}._active_1r5sp_18{display:flex;align-items:center;gap:8px}._layers_62wod_1{display:flex;flex-direction:column;position:relative;height:100%}._block_62wod_8{position:relative;display:flex;align-items:center;gap:4px;font-size:16px;line-height:24px;padding:8px 12px;border-radius:8px;cursor:pointer}._block_62wod_8:hover{background-color:var(--background-color)}._dragging_62wod_23{box-shadow:0 2.1px 4.36px #00000004;box-shadow:0 5.3px 10.22px #00000005;border:var(--default-border);box-shadow:0 10.81px 19.93px #00000006;cursor:grabbing}._active_62wod_31{background:#ffeae5}._add_62wod_35{z-index:2;position:absolute;display:flex;justify-content:center;align-items:center;bottom:0;left:0;border-bottom:2px solid #ff3f19;width:100%}._button_62wod_47{position:relative;display:flex;justify-content:center;align-items:center;top:12px;background-color:#ff3f19;width:24px;height:24px;border-radius:50%;padding:4px}._empty_62wod_60{display:flex;flex-direction:column;justify-content:center;height:100%;width:100%;align-items:center;text-align:center;gap:4px;color:var(--accent-color)}._title_62wod_72{font-size:16px;line-height:24px;font-weight:700;color:var(--accent-color)}._icon_62wod_79{margin:0 0 12px}._text_62wod_83{font-size:16px;font-weight:400;line-height:24px}._highlight_62wod_89{color:#ff3f19;cursor:pointer}._block_1d6lb_1{position:relative;display:flex;align-items:center;gap:4px;font-size:16px;line-height:24px;padding:8px 12px;border-radius:8px;cursor:pointer}._block_1d6lb_1:hover{background-color:var(--background-color)}._theme_1xj36_1{display:flex;flex-direction:column}._block_1xj36_6{justify-content:start;display:flex;align-items:center;gap:8px;width:100%;padding:16px 8px;cursor:pointer;border-radius:8px}._block_1xj36_6:hover{background-color:var(--background-color)}._name_1xj36_20{flex:1 1 auto}._back_14yda_1{display:flex;align-items:center;gap:8px;padding-bottom:8px}._render_14yda_8{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:501}._open_14yda_23{animation:.2s _open_14yda_23 forwards}@keyframes _open_14yda_23{0%{transform:translate(320px);z-index:1}99%{z-index:1}to{z-index:5000;transform:translate(0)}}@keyframes _close_14yda_50{0%{z-index:1;transform:translate(0)}to{z-index:1;transform:translate(320px)}}._close_14yda_50{animation:.2s _close_14yda_50 forwards}._clicked_14yda_54{opacity:0}._title_14yda_58{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px}._button_14yda_65{align-self:center;flex:1}._loading_14yda_70{flex:1 1 auto}._settings_14yda_74{flex:1 1 auto;overflow-y:scroll;overflow-x:hidden}._buttons_14yda_80{justify-content:space-between;display:flex;gap:10px}._deleteButton_14yda_86{display:flex;align-items:center;border-radius:8px;padding:8px;transition:.2s background-color}._deleteButton_14yda_86:hover{background-color:#dd6363;color:#fff}._settings_1r85j_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:3}._open_1r85j_16{transform:translate(0)}._close_1r85j_20{transform:translate(320px)}._header_1r85j_24{display:flex;align-items:center;gap:8px}._title_1r85j_30{font-weight:700;font-size:20px;line-height:24px;flex:1 1 auto}._addButton_1r85j_37{color:#ff3f19;display:flex;align-items:center;gap:4px;cursor:pointer}._wrapper_n1a7x_1{overflow-y:scroll}._category_n1a7x_5{display:flex;flex-direction:column}._categoryTitle_n1a7x_10{font-weight:600;font-size:16px;line-height:24px}._color_n1a7x_16{display:flex;flex-direction:column}._color_n1a7x_16:not(:last-child){border-bottom:1px solid #f0f0f0}._content_n1a7x_24{padding:12px 0;gap:8px;display:flex;align-items:center;flex:1 1 auto}._preview_n1a7x_32{width:39px;height:39px;flex:0 0 39px;padding:5px;border-radius:50%;border:1px solid #e6e6e6}._wrapper_kb55x_2{overflow-y:scroll}._category_kb55x_6{display:flex;flex-direction:column}._categoryTitle_kb55x_11{font-weight:600;font-size:16px;line-height:24px}._color_kb55x_17{gap:8px;display:flex;flex-direction:column}._name_kb55x_23{line-height:20px;padding:0 4px 4px}._content_kb55x_28{display:flex;flex-direction:column;width:100%}._label_kb55x_34{padding:8px 12px;border-radius:12px;display:flex;align-items:center;gap:5px;width:100%;background-color:var(--background-color);cursor:pointer}._input_kb55x_45[type=color]{width:20px;height:20px;padding:1px}._input_kb55x_45{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:100%;border:none;padding:0;cursor:pointer;border-radius:50%}._input_kb55x_45::-webkit-color-swatch{border-radius:50%;border:none}._input_kb55x_45::-webkit-color-swatch-wrapper{padding:0;border-radius:50%}._title_kb55x_71{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._field_kb55x_79{display:flex;flex-direction:column;gap:10px;padding:16px 0}._field_kb55x_79:not(:last-child){border-bottom:1px solid #f0f0f0}._alignments_kb55x_89{display:flex;flex-direction:column;gap:10px}._lineField_kb55x_95{display:flex;justify-content:space-between;align-items:center}._style_kb55x_101{flex:1 0 50%;display:flex;flex-direction:column;gap:8px}._header_kb55x_108{display:flex;align-items:center;justify-content:space-between}._wrapper_k9on2_1{overflow-y:scroll}._category_k9on2_5{display:flex;flex-direction:column}._categoryTitle_k9on2_10{font-weight:600;font-size:16px;line-height:24px}._font_k9on2_16{padding:12px 0;gap:8px;display:flex;align-items:center;position:relative;flex:1 1 auto;cursor:pointer}._font_k9on2_16:hover{background-color:#f8f8f8;border-radius:8px}._font_k9on2_16:not(:last-child){border-bottom:var(--default-border)}._font_k9on2_16:not(:last-child):hover{border-bottom:1px solid #f8f8f8}._content_k9on2_36{display:flex;flex-direction:column;width:100%}._icon_k9on2_42{padding:8px;border-radius:8px;background-color:#f8f8f8;display:flex;align-items:center;justify-content:center}._paragraph_k9on2_51{padding:12px}._deleteIcon_k9on2_55{position:absolute;right:10px;width:20px;height:20px}._iconButton_k9on2_62{width:32px;height:32px}._wrapper_94fpv_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:5}._open_94fpv_16{transform:translate(0)}._close_94fpv_20{transform:translate(320px)}._header_94fpv_24{display:flex;align-items:center;gap:8px;margin:0 0 10px}._title_94fpv_31{font-weight:700;font-size:20px;line-height:24px}._options_94fpv_37{display:flex;flex-direction:column;gap:10px;flex:1 1 auto}._clicked_94fpv_44{opacity:0}._wrapper_1j33r_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:5}._open_1j33r_16{transform:translate(0)}._close_1j33r_20{transform:translate(320px)}._header_1j33r_24{display:flex;align-items:center;gap:8px;margin:0 0 10px}._title_1j33r_31{font-weight:700;font-size:20px;line-height:24px}._options_1j33r_37{display:flex;flex-direction:column;gap:10px;flex:1 1 auto}._clicked_1j33r_44{opacity:0}._label_1j33r_48{font-size:14px;font-weight:400;line-height:20px;color:var(--accent-color)}._alignments_1j33r_55{display:flex;flex-direction:column;gap:10px}._blocks_1j33r_61{display:flex;align-items:center;gap:8px}._alignment_1j33r_55{padding:8px;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1j33r_75{border:1px solid #ff3f19}._wrapper_jjfwh_1{display:flex;flex-direction:column;gap:20px;background:#fff;max-width:640px;width:100%;padding:16px 24px;border-radius:16px}._header_jjfwh_12{display:flex;justify-content:space-between;align-items:center;font-size:24px;font-weight:700;line-height:32px}._content_jjfwh_21{display:flex;flex-direction:column;gap:10px;overflow-y:scroll;max-height:500px}._buttons_jjfwh_29{display:flex;justify-content:end;gap:12px}._cancel_jjfwh_35{background-color:var(--background-color);color:var(--accent-color)}._label_jjfwh_40,._description_jjfwh_41{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._preview_jjfwh_49{display:flex;flex-direction:column;gap:10px}._block_jjfwh_55{padding:24px;display:flex;flex-direction:column;border:1px solid var(--background-color);border-radius:8px}._slug_jjfwh_63{line-height:20px;color:#ff3f19;margin-bottom:4px}._title_jjfwh_69{font-weight:600;font-size:16px;line-height:24px}._layout_kjedu_1{width:100%;height:100%;display:flex;position:relative}._main_kjedu_8{display:flex;flex-direction:column;width:100%;position:relative}._content_kjedu_15{position:relative;padding-top:64px;height:100%;display:flex}*{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}*{padding:0;margin:0;border:0}*,*:before,*:after{box-sizing:border-box}:focus,:active{outline:none}a:focus,a:active{outline:none}nav,footer,header,aside{display:block}html,body{width:100%;line-height:1;font-size:16px;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}input,button,textarea{font-family:inherit}input::-ms-clear{display:none}button{background-color:transparent;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}a,a:visited,a:hover{text-decoration:none}ul li{list-style:none}img{vertical-align:top}h1,h2,h3,h4,h5,h6,a{font-size:inherit}a{color:inherit}*{-webkit-tap-highlight-color:transparent}input{border:none;background:none;outline:none;padding:0}input[type=color]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:40px;height:40px;border:none;background:transparent}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}*{-ms-overflow-style:none;scrollbar-width:none}* ::-webkit-scrollbar{display:none}:root{--default-border: 1px solid #f0f0f0;--accent-color: #757575;--main-color: #252525;--background-color: #f8f8f8}#root{height:100vh}body,html{background-color:#fff;font-family:Archivo,sans-serif;max-height:100vh;overflow:hidden}._wrapper_o1bnv_2{display:flex;flex-direction:column;gap:10px}._alignmentBlock_o1bnv_8{padding:10px 0 16px;display:flex;flex-direction:column;gap:6px;border-bottom:1px solid #f0f0f0}._title_o1bnv_16{font-weight:700;line-height:24px;font-size:16px;color:#252525}._subtitle_o1bnv_23{color:#757575;font-size:14px;line-height:20px;font-weight:400}._alignmentContent_o1bnv_30{display:flex;justify-content:space-between;align-items:stretch;gap:8px}._alignments_o1bnv_37{border-radius:12px;background:#f8f8f8;display:grid;gap:4px;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);flex:0 0 50%}._alignment_o1bnv_8{cursor:pointer;display:flex;height:100%;width:100%;align-items:center;justify-content:center}._circle_o1bnv_56{width:6px;height:6px;border-radius:50%;background-color:#c2c2c2}._paddings_o1bnv_63{border-radius:12px;display:grid;gap:4px;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}._padding_o1bnv_63{width:68px;display:flex;align-items:center;gap:4px;background:#f8f8f8;border-radius:12px;padding:10px 8px}._input_o1bnv_81{width:100%}._subtitle_2zbxx_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_2zbxx_8,._text_2zbxx_9{padding:10px 0 16px;display:flex;flex-direction:column;border-bottom:1px solid #f0f0f0}._top_2zbxx_16{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_2zbxx_23{display:flex;flex-direction:column;gap:6px}._typeTexts_3zlec_1{display:flex;align-items:center;gap:8px}._block_3zlec_7{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_3zlec_18{border:1px solid #ff3f19}._subtitle_2l7ty_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_2l7ty_8,._text_2l7ty_9,._productsBlock_2l7ty_10{padding:10px 0 16px;display:flex;flex-direction:column;border-bottom:1px solid #f0f0f0;width:100%}._productsBlock_2l7ty_10{position:relative}._top_2l7ty_22{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_2l7ty_29{display:flex;flex-direction:column;gap:6px}._typeTexts_2l7ty_35{display:flex;align-items:center;gap:8px}._block_2l7ty_41{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_2l7ty_52{border:1px solid #ff3f19}._products_2l7ty_10{width:100%;display:flex;flex-direction:column;gap:8px}._product_2l7ty_10{display:flex;align-items:center;gap:8px;width:100%}._button_2l7ty_70{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:center;gap:6px;width:100%}._image_2l7ty_80{border-radius:8px;border:1px solid #f0f0f0;background-color:#fff;padding:4px}._info_2l7ty_87{border-radius:12px;display:flex;gap:4px;justify-content:space-between;align-items:center;flex:1 1 auto;background-color:#f8f8f8;padding:8px 12px}._name_2l7ty_98{flex:1 1 100%}._buttons_2l7ty_102{display:flex;align-items:center;gap:8px}._modal_2l7ty_108{position:fixed;background-color:#fff;right:-300px;top:0;z-index:10000;max-width:276px;width:100%;padding:16px;border-radius:12px}._modal_2l7ty_108 ._top_2l7ty_22{display:flex;align-items:center;justify-content:space-between}._other_2l7ty_125{display:flex;flex-direction:column;gap:6px}._subtitle_1y5sw_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_1y5sw_8,._text_1y5sw_9,._productsBlock_1y5sw_10,._buttonsBlock_1y5sw_11{padding:10px 0 16px;display:flex;flex-direction:column;border-bottom:1px solid #f0f0f0}._buttonsBlock_1y5sw_11{position:relative}._top_1y5sw_22{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_1y5sw_29{display:flex;flex-direction:column;gap:6px}._typeTexts_1y5sw_35{display:flex;align-items:center;gap:8px}._block_1y5sw_41{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1y5sw_52{border:1px solid #ff3f19}._products_1y5sw_10{width:100%;display:flex;flex-direction:column;gap:8px}._product_1y5sw_10{display:flex;align-items:center;gap:8px;width:100%}._button_1y5sw_11{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:center;gap:6px;width:100%}._image_1y5sw_80{border-radius:8px;border:1px solid #f0f0f0;background-color:#fff;padding:4px}._info_1y5sw_87{border-radius:12px;display:flex;gap:4px;justify-content:space-between;align-items:center;flex:1 1 auto;background-color:#f8f8f8;padding:8px 12px}._name_1y5sw_98{flex:1 1 100%}._buttons_1y5sw_11{display:flex;align-items:center;gap:8px}._modal_1y5sw_108{position:fixed;background-color:#fff;right:-300px;z-index:10000;max-width:276px;width:100%;bottom:20px;padding:16px;border-radius:12px}._modal_1y5sw_108 ._top_1y5sw_22{display:flex;align-items:center;justify-content:space-between}._other_1y5sw_125{display:flex;flex-direction:column;gap:6px}._options_1y5sw_131{display:flex;flex-direction:column;gap:15px}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-BO6B5tl0.cjs"),m=require("react"),wt=["desktop","tablet","mobile"],Dt=[{icon:"paint",name:"Colors"},{icon:"font",name:"Fonts"},{icon:"corners-out",name:"Borders"},{icon:"arrow-square",name:"Buttons"},{icon:"textbox",name:"Inputs"}],Rt="https://g-api.billgang.com",Ct="https://www.googleapis.com/webfonts/v1/webfonts",Ot="_buttons_1gn8m_1",It="_button_1gn8m_1",Tt={buttons:Ot,button:It},Nt=()=>r.jsxRuntimeExports.jsxs("div",{className:Tt.buttons,children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"undo",hoverable:!0,width:20,height:20}),r.jsxRuntimeExports.jsx(r.Icon,{name:"redo",hoverable:!0,width:20,height:20})]}),kt="_devices_hxl12_1",Pt="_device_hxl12_1",$t="_active_hxl12_23",xe={devices:kt,device:Pt,active:$t},Mt=()=>{const{currentDevice:t,setCurrentDevice:e}=r.useDeviceStore();return r.jsxRuntimeExports.jsx("div",{className:xe.devices,children:wt.map(n=>r.jsxRuntimeExports.jsx("div",{className:r.clx(xe.device,{[xe.active]:t===n}),onClick:()=>e(n),children:r.jsxRuntimeExports.jsx(r.Icon,{name:n,fill:t===n?"#252525":"#757575",width:20,height:20})},n))})},At="_header_wxpoz_1",Bt="_left_wxpoz_16",Lt="_right_wxpoz_17",oe={header:At,left:Bt,right:Lt},Ht="_preview_vijvm_2",Ft="_active_vijvm_22",ve={preview:Ht,active:Ft},Ut=()=>{const{onPreview:t,setOnPreview:e}=r.usePreviewStore();return r.jsxRuntimeExports.jsxs("div",{className:r.clx(ve.preview,{[ve.active]:t}),onClick:()=>e(!t),children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-up-right",width:20,height:20}),r.jsxRuntimeExports.jsx("span",{className:ve.text,children:"Preview"})]})},qt="_settings_q79q3_1",zt={settings:qt},Vt="_language_1mbvp_1",Yt="_text_1mbvp_11",Be={language:Vt,text:Yt},Gt=()=>r.jsxRuntimeExports.jsxs("div",{className:Be.language,children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"globe",fill:"#252525",width:20,height:20}),r.jsxRuntimeExports.jsx("span",{className:Be.text,children:"Default"}),r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-down",width:20,height:20})]}),Xt="_pages_x8pw2_1",Wt="_text_x8pw2_16",Qt="_modal_x8pw2_22",Zt="_page_x8pw2_1",Jt="_hoverable_x8pw2_45",Kt="_separator_x8pw2_49",en="_button_x8pw2_53",F={pages:Xt,default:"_default_x8pw2_5",text:Wt,modal:Qt,page:Zt,hoverable:Jt,separator:Kt,button:en},$=t=>t?t.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" and "):"",tn=()=>{const{currentPage:t,setCurrentPage:e,setIsOpenModal:n,pages:s,setIsEdit:o,setEditedPage:i,deletePage:a,isOpenSelectModal:c,setIsOpenSelectModal:u}=r.usePagesStore(),{deletePage:h}=r.useLayersStore(),[f,l]=m.useState("");return m.useEffect(()=>{const p=()=>{u(!1)};return document.body.addEventListener("click",p),()=>{document.body.removeEventListener("click",p)}},[]),r.jsxRuntimeExports.jsxs("div",{className:F.pages,children:[r.jsxRuntimeExports.jsxs("div",{className:F.default,onClick:p=>{p.stopPropagation(),u(!c)},children:[r.jsxRuntimeExports.jsx(r.Icon,{name:s[t].icon,fill:"#252525",width:20,height:20}),r.jsxRuntimeExports.jsx("span",{className:F.text,children:r.defaultPageNames.includes(s[t].name)?`${$(s[t].name)} page`:s[t].name}),r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-down",width:20,height:20})]}),c&&r.jsxRuntimeExports.jsxs("div",{className:F.modal,onClick:p=>p.stopPropagation(),children:[Object.keys(s).map(p=>{const d=s[p];return r.jsxRuntimeExports.jsxs("div",{className:r.clx(F.page,{[F.hoverable]:f===p}),onMouseEnter:()=>l(p),onMouseLeave:()=>l(""),onClick:()=>{l(""),o(!1),e(p),u(!1)},children:[r.jsxRuntimeExports.jsx(r.Icon,{name:d.icon,fill:"#252525"}),r.jsxRuntimeExports.jsx("span",{className:F.text,children:r.defaultPageNames.includes(d.name)?`${$(d.name)} page`:d.name}),f===p&&r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"settings",fill:"#757575",onClick:x=>{x.stopPropagation(),o(!0),i(p),n(!0)}}),!r.defaultPageNames.includes(d.name)&&r.jsxRuntimeExports.jsx(r.Icon,{name:"trash",fill:"#C12A2A",onClick:x=>{s[t].name===d.name&&e("home"),x.stopPropagation(),a(p),h(d.name)}})]}),s[t].name===d.name&&r.jsxRuntimeExports.jsx(r.Icon,{name:"check",fill:"#FF3F19"})]},p)}),r.jsxRuntimeExports.jsx("div",{className:F.separator}),r.jsxRuntimeExports.jsxs(r.Button,{className:F.button,onClick:p=>{p.stopPropagation(),n(!0)},size:"l",children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"plus",fill:"#ff3f19"}),r.jsxRuntimeExports.jsx("span",{children:"Create Page Blank"})]})]})]})},nn="_zoom_a77cn_1",rn={zoom:nn},sn=()=>{const[t,e]=m.useState(),n=()=>{e(Number(Math.round(window.devicePixelRatio*50).toFixed(0)))};return m.useEffect(()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[]),r.jsxRuntimeExports.jsxs("div",{className:rn.zoom,children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"zoom-minus",width:20,height:20}),r.jsxRuntimeExports.jsxs("span",{children:[t," %"]})]})},on=()=>r.jsxRuntimeExports.jsxs("div",{className:zt.settings,children:[r.jsxRuntimeExports.jsx(Gt,{}),r.jsxRuntimeExports.jsx(tn,{}),r.jsxRuntimeExports.jsx(sn,{})]}),an="_theme_3wxbf_1",cn={theme:an},un=()=>r.jsxRuntimeExports.jsxs("div",{className:cn.theme,children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"check",width:18,height:18}),r.jsxRuntimeExports.jsx("div",{children:"Current Theme"})]}),ln=()=>{const{themeSettings:t}=r.useThemeSettingsStore(),{settings:e}=r.useSettingsStore(),[n,s]=m.useState(null),[o,i]=m.useState(!1),{pages:a}=r.usePagesStore(),{blocks:c}=r.useLayersStore();function u(d,x){return x.map(v=>Object.values(v.value).filter(_=>_.type===d).map(_=>_.value).flat()).flat()}function h(d,x){return u(d,x).some(v=>v)}function f(d,x){const g=u(d,x);return Array.isArray(g)&&g.length>0?Math.max(...g):0}function l(d){const x=Object.keys(a).find(g=>a[g].name===d);return x?a[x]:null}const p=()=>{if(o)n&&clearTimeout(n);else{const x=Object.keys(c).map(g=>{const v=l(g);return{name:v?v.name:g,path:g==="home"?"/":(v==null?void 0:v.path)||g,layout:{...c[g]},neededProductIds:[...u("ProductId",Object.values(c[g]))],neededCategoryIds:[...u("CategoryId",Object.values(c[g]))],neededAnnouncementIds:[...u("AnnouncementId",Object.values(c[g]))],neededListingIds:[...u("ListingId",Object.values(c[g]))],neededFaqs:h("Faqs",Object.values(c[g])),neededReviewCount:f("ReviewCount",Object.values(c[g])),seo:{pageTitle:v?v.seo.title:"",pageDescription:v?v.seo.description:""}}});r.updateSettings("POST","save",{themeSettings:t,settings:e,updatedPages:x})}i(!0);const d=setTimeout(()=>{i(!1)},2e3);s(d)};return r.jsxRuntimeExports.jsxs("div",{className:oe.header,children:[r.jsxRuntimeExports.jsxs("div",{className:oe.left,children:[r.jsxRuntimeExports.jsx(Mt,{}),r.jsxRuntimeExports.jsx(Ut,{})]}),r.jsxRuntimeExports.jsx("div",{className:oe.center,children:r.jsxRuntimeExports.jsx(on,{})}),r.jsxRuntimeExports.jsxs("div",{className:oe.right,children:[r.jsxRuntimeExports.jsx(un,{}),r.jsxRuntimeExports.jsx(Nt,{}),r.jsxRuntimeExports.jsx(r.Button,{onClick:p,children:"Save"})]})]})},dn="_exit_2ce42_1",gn="_text_2ce42_10",Le={exit:dn,text:gn},pn=()=>r.jsxRuntimeExports.jsxs("div",{className:Le.exit,children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"sign-out",width:20,height:20}),r.jsxRuntimeExports.jsx("span",{className:Le.text,children:"Exit"})]}),hn="_navbar_2ac63_1",fn="_main_2ac63_6",mn="_block_2ac63_13",xn="_active_2ac63_30",ie={navbar:hn,main:fn,block:mn,active:xn},vn=()=>{const{activeBlock:t,setActiveBlock:e}=r.useNavbarStore(),{setActiveBlock:n}=r.useBlocksStore(),{setCurrentBlock:s}=r.useLayersStore(),{setActiveBlock:o}=r.useThemeSettingsStore();function i(a){n(null),e(a),s(null),o(null)}return r.jsxRuntimeExports.jsxs("div",{className:ie.navbar,children:[r.jsxRuntimeExports.jsx(pn,{}),r.jsxRuntimeExports.jsx("div",{className:ie.main,children:r.navbarBlocks.map(a=>r.jsxRuntimeExports.jsxs("div",{className:r.clx(ie.block,{[ie.active]:t.icon===a.icon}),onClick:()=>i(a),children:[r.jsxRuntimeExports.jsx(r.Icon,{name:a.icon,fill:t.icon===a.icon?"#252525":"#757575"}),r.jsxRuntimeExports.jsx("span",{children:a.name})]},a.icon))})]})},jn="_preview_jui5n_1",En="_main_jui5n_9",_n="_content_jui5n_19",bn="_loading_jui5n_26",Sn="_loader_jui5n_34",yn="_spin_jui5n_1",ee={preview:jn,main:En,content:_n,loading:bn,loader:Sn,spin:yn},wn="_header_1t64j_1",Dn="_circles_1t64j_14",Rn="_circle_1t64j_14",Cn="_red_1t64j_30",On="_green_1t64j_34",In="_yellow_1t64j_38",Tn="_input_1t64j_42",Nn="_main_1t64j_51",kn="_text_1t64j_59",U={header:wn,circles:Dn,circle:Rn,red:Cn,green:On,yellow:In,input:Tn,main:Nn,text:kn},Pn="data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20x='0.5'%20width='16'%20height='16'%20fill='url(%23pattern0_4042_718)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_4042_718'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_4042_718'%20transform='scale(0.015625)'/%3e%3c/pattern%3e%3cimage%20id='image0_4042_718'%20width='64'%20height='64'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAONJREFUeF7t20EOhEAIRFG4/6F7DvEnYeFzryQIv6pBd2behOu9dPvsbog+k+NLgArQAqmJcw9iAAhSgZKB3IJkkAySQTJ4CiE+gA8oBeg0mH3Ai084P89HhqwEqIA209ICsQdjAeaZIgaAYKxBDMCAYy8fXwAIgiAIcoJpJEYGI4VjB3YrbC9gL2AvkCB43cM5PgZgAAZgQFnNZAhdGykQBEEQBEEQDBmgAm2glM/z+QUYisYUGoldO7kY32IEAzCg6RgIRgjFAsw+AgRBMNYgBmCAT2TCYfoPPz/HCqQCX1eBHzHnv7C7WhBSAAAAAElFTkSuQmCC'/%3e%3c/defs%3e%3c/svg%3e",$n=["red","yellow","green"],Mn=()=>r.jsxRuntimeExports.jsxs("div",{className:U.header,children:[r.jsxRuntimeExports.jsx("div",{className:U.circles,children:$n.map(t=>r.jsxRuntimeExports.jsx("div",{className:r.clx(U.circle,{[U.red]:t==="red",[U.yellow]:t==="yellow",[U.green]:t==="green"})},t))}),r.jsxRuntimeExports.jsxs("div",{className:U.input,children:[r.jsxRuntimeExports.jsxs("div",{className:U.main,children:[r.jsxRuntimeExports.jsx("img",{src:Pn,alt:""}),r.jsxRuntimeExports.jsx("span",{className:U.text,children:"lorem.ipsum"}),r.jsxRuntimeExports.jsx(r.Icon,{name:"lock",fill:"#757575",width:15,height:16})]}),r.jsxRuntimeExports.jsx(r.Icon,{name:"copy",width:20,height:20})]})]}),An="_content_92dk8_1",Bn="_block_92dk8_6",Ln="_active_92dk8_13",Hn="_name_92dk8_17",Fn="_empty_92dk8_31",Un="_icon_92dk8_42",qn="_title_92dk8_53",zn="_text_92dk8_59",Vn="_sections_92dk8_65",Yn="_section_92dk8_65",ae={content:An,block:Bn,active:Ln,name:Hn,empty:Fn,icon:Un,title:qn,text:zn,sections:Vn,section:Yn},Gn="_sidebar_1f3hk_1",Xn="_content_1f3hk_12",Wn="_button_1f3hk_22",Qn="_moveButton_1f3hk_30",Zn="_border_1f3hk_34",Jn="_deleteButton_1f3hk_38",I={sidebar:Gn,content:Xn,button:Wn,moveButton:Qn,border:Zn,deleteButton:Jn},Kn=()=>{const{activeBlock:t}=r.usePreviewStore(),{blocks:e,removeBlock:n,moveBlock:s,duplicateBlock:o}=r.useLayersStore(),{currentPage:i,pages:a}=r.usePagesStore(),c=Object.keys(e[a[i].name]),u=c.indexOf(t),h=()=>{u>0&&s(a[i].name,u,u-1)},f=()=>{u<c.length-1&&s(a[i].name,u,u+1)},l=()=>{o(a[i].name,t)};return r.jsxRuntimeExports.jsx("div",{className:I.sidebar,children:r.jsxRuntimeExports.jsxs("div",{className:I.content,children:[r.jsxRuntimeExports.jsx("button",{onClick:h,className:r.clx(I.button,I.moveButton),disabled:u===0,children:r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-preview-up"})}),r.jsxRuntimeExports.jsx("button",{onClick:f,className:r.clx(I.button,I.moveButton),disabled:u===c.length-1,children:r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-preview-down"})}),r.jsxRuntimeExports.jsx("div",{className:I.border}),r.jsxRuntimeExports.jsx("button",{onClick:l,className:r.clx(I.button,I.moveButton),children:r.jsxRuntimeExports.jsx(r.Icon,{name:"copy"})}),r.jsxRuntimeExports.jsx("div",{className:I.border}),r.jsxRuntimeExports.jsx("button",{onClick:()=>n(a[i].name,t),className:r.clx(I.button,I.deleteButton),children:r.jsxRuntimeExports.jsx(r.Icon,{name:"trash",hoverable:!0})})]})})},nt=({render:t,block:e})=>t(e),er=()=>{const{footer:t}=r.useLayersStore(),{settings:e}=r.useSettingsStore(),{pageContext:n}=r.usePagesStore();return t==null?void 0:t.renderBlock(e,n)},tr=()=>{const{header:t}=r.useLayersStore(),{settings:e}=r.useSettingsStore(),{pageContext:n}=r.usePagesStore();return t==null?void 0:t.renderBlock(e,n)},nr=m.memo(()=>{const{setActiveBlock:t,activeBlock:e}=r.usePreviewStore(),{blocks:n}=r.useBlocksStore(),{blocks:s}=r.useLayersStore(),{settings:o}=r.useSettingsStore(),{currentPage:i,pages:a,setIsOpenSelectModal:c}=r.usePagesStore(),u=l=>{const p=n[l.name],d=l.value;for(const x in d)p[x]=d[x];return p.renderBlock(o)},h=m.useRef(e);m.useEffect(()=>{h.current=e},[e]),m.useEffect(()=>{const l=()=>{h.current&&t(null)};return document.body.addEventListener("click",l),()=>{document.body.removeEventListener("click",l)}},[]);const f=m.useCallback(l=>u(l),[s]);return r.jsxRuntimeExports.jsxs("div",{onClick:l=>{l.stopPropagation(),c(!1)},className:ae.content,children:[r.jsxRuntimeExports.jsx(tr,{}),s[a[i].name]&&Object.keys(s[a[i].name]).map(l=>r.jsxRuntimeExports.jsxs("div",{onClick:()=>t(l),className:r.clx(ae.block,{[ae.active]:e===l}),children:[e===l&&r.jsxRuntimeExports.jsx("div",{className:ae.name,children:s[a[i].name][l].name}),e===l&&r.jsxRuntimeExports.jsx(Kn,{}),r.jsxRuntimeExports.jsx(nt,{render:f,block:s[a[i].name][l]})]})),r.jsxRuntimeExports.jsx(er,{})]})}),rr="_results_f488n_1",sr="_name_f488n_8",or="_product_f488n_15",ce={results:rr,name:sr,product:or},ir="_search_1s0qp_1",ar="_input_1s0qp_12",He={search:ir,input:ar},cr=()=>r.jsxRuntimeExports.jsxs("label",{className:He.search,children:[r.jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search for sections",className:He.input}),r.jsxRuntimeExports.jsx(r.Icon,{name:"search",fill:"#757575"})]}),rt=()=>{const{blocks:t,setActiveBlock:e}=r.useBlocksStore(),{hideModal:n}=r.useSubmodalStore();function s(o){e(o),n()}return r.jsxRuntimeExports.jsxs("div",{className:ce.add,children:[r.jsxRuntimeExports.jsx(cr,{}),r.jsxRuntimeExports.jsx("div",{className:ce.results,children:Object.keys(t).map(o=>r.jsxRuntimeExports.jsxs("div",{className:ce.product,onClick:()=>s(o),children:[r.jsxRuntimeExports.jsx("span",{className:ce.name,children:o}),r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-right"})]},o))})]})},ur=()=>{const{modalPosition:t,color:e,initialColor:n,setShowModal:s,hue:o,saturation:i,brightness:a,dragging:c,setDragging:u,setHue:h,setSaturation:f,setBrightness:l,colorChange:p,setColor:d,update:x}=r.useColorPickerStore(),g=E=>{const{offsetX:w,offsetY:R}=E.nativeEvent;u(!0),b(w,R,E.currentTarget)},v=E=>{if(c){const w=document.querySelector(`.${r.styles.colorMap}`),{left:R,top:C}=w.getBoundingClientRect(),y=E.clientX-R,z=E.clientY-C;b(y,z,w)}},_=()=>{u(!1)},b=(E,w,R)=>{const{width:C,height:y}=R.getBoundingClientRect(),z=Math.max(0,Math.min(E/C*100,100)),re=Math.max(0,Math.min(100-w/y*100,100));f(z),l(re),S(z,re)},S=(E,w)=>{const R=A(o,E,w);p(R),d(R)},D=(E,w,R)=>{w/=100,R/=100;const C=se=>(se+E/60)%6,y=se=>R*(1-w*Math.max(0,Math.min(C(se),4-C(se),1))),z=Math.round(255*y(5)),re=Math.round(255*y(3)),yt=Math.round(255*y(1));return{r:z,g:re,b:yt}},M=(E,w,R)=>{const C=y=>y.toString(16).padStart(2,"0");return`#${C(E)}${C(w)}${C(R)}`},A=(E,w,R)=>{const{r:C,g:y,b:z}=D(E,w,R);return M(C,y,z)};m.useEffect(()=>{const E=R=>v(R),w=()=>_();return c?(document.addEventListener("mousemove",E),document.addEventListener("mouseup",w)):(document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",w)),()=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",w)}},[c]);function O(){x(e),s(!1)}function H(){s(!1),p(n)}return r.jsxRuntimeExports.jsxs("div",{className:r.styles.modal,onClick:E=>E.stopPropagation(),style:{top:`${t.top}px`,left:`${t.left}px`},children:[r.jsxRuntimeExports.jsx("div",{children:"Color"}),r.jsxRuntimeExports.jsx("div",{className:r.styles.colorMap,onMouseDown:g,style:{background:`
8
3
  linear-gradient(to top, black, transparent),
9
- linear-gradient(to right, hsl(${s}, 100%, 100%), hsl(${s}, 100%, 50%))
10
- `},children:o.jsxRuntimeExports.jsx("div",{className:o.styles.indicator,style:{position:"absolute",left:`${i}%`,top:`${100-a}%`,transform:"translate(-50%, -50%)"}})}),o.jsxRuntimeExports.jsx("div",{className:o.styles.hueSlider,children:o.jsxRuntimeExports.jsx("input",{type:"range",min:"0",max:"360",value:s,onChange:w=>{l(Number(w.target.value)),j(i,a)},className:o.styles.slider})}),o.jsxRuntimeExports.jsxs("div",{className:o.styles.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{onClick:U,className:o.clx(o.styles.applyButton,o.styles.cancelButton),children:"Cancel"}),o.jsxRuntimeExports.jsx(o.Button,{onClick:P,className:o.styles.applyButton,children:"Apply"})]})]})},di=()=>{const{onPreview:t}=o.usePreviewStore(),{hoverBlockId:e,isModalVisible:n,isPreviewVisible:r}=o.useSubmodalStore(),{settings:s}=o.useSettingsStore(),{blocks:i}=o.useBlocksStore(),{blocks:a}=o.useLayersStore(),{currentPage:c,pages:u}=o.usePagesStore(),{showModal:l}=o.useColorPickerStore(),[d,p]=E.useState(!0);E.useEffect(()=>{t&&setTimeout(()=>{p(!1)},100)},[t]);const v=x=>{if(!x)return;const m=i[x.name],h=x.value;for(const g in h)m[g]=h[g];return m.renderBlock(s)};return o.jsxRuntimeExports.jsxs("div",{className:ge.preview,children:[n&&o.jsxRuntimeExports.jsx(o.Submodal,{children:o.jsxRuntimeExports.jsx(Tn,{})}),r&&e&&o.jsxRuntimeExports.jsx(o.Submodal,{children:o.jsxRuntimeExports.jsx(On,{render:v,block:a[u[c].name][e]})}),l&&o.jsxRuntimeExports.jsx(li,{}),t&&o.jsxRuntimeExports.jsxs("div",{className:ge.main,children:[o.jsxRuntimeExports.jsx(Mo,{}),o.jsxRuntimeExports.jsx("div",{className:ge.content,children:d?o.jsxRuntimeExports.jsx("div",{className:ge.loading,children:o.jsxRuntimeExports.jsx("div",{className:ge.loader})}):o.jsxRuntimeExports.jsx(ri,{})})]})]})},fi="_sidebar_1r5sp_1",pi="_title_1r5sp_10",hi="_active_1r5sp_18",qt={sidebar:fi,title:pi,active:hi},Dn=E.createContext({dragDropManager:void 0});function $(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var zt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Je=function(){return Math.random().toString(36).substring(7).split("").join(".")},Vt={INIT:"@@redux/INIT"+Je(),REPLACE:"@@redux/REPLACE"+Je(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Je()}};function gi(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function mi(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(Ei(t))return"date";if(vi(t))return"error";var n=xi(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function xi(t){return typeof t.constructor=="function"?t.constructor.name:null}function vi(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function Ei(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function oe(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=mi(t)),e}function Cn(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?$(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?$(1):"Expected the enhancer to be a function. Instead, received: '"+oe(n)+"'");return n(Cn)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?$(2):"Expected the root reducer to be a function. Instead, received: '"+oe(t)+"'");var s=t,i=e,a=[],c=a,u=!1;function l(){c===a&&(c=a.slice())}function d(){if(u)throw new Error(process.env.NODE_ENV==="production"?$(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function p(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?$(4):"Expected the listener to be a function. Instead, received: '"+oe(h)+"'");if(u)throw new Error(process.env.NODE_ENV==="production"?$(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var g=!0;return l(),c.push(h),function(){if(g){if(u)throw new Error(process.env.NODE_ENV==="production"?$(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");g=!1,l();var b=c.indexOf(h);c.splice(b,1),a=null}}}function v(h){if(!gi(h))throw new Error(process.env.NODE_ENV==="production"?$(7):"Actions must be plain objects. Instead, the actual type was: '"+oe(h)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?$(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(u)throw new Error(process.env.NODE_ENV==="production"?$(9):"Reducers may not dispatch actions.");try{u=!0,i=s(i,h)}finally{u=!1}for(var g=a=c,y=0;y<g.length;y++){var b=g[y];b()}return h}function x(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?$(10):"Expected the nextReducer to be a function. Instead, received: '"+oe(h));s=h,v({type:Vt.REPLACE})}function m(){var h,g=p;return h={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?$(11):"Expected the observer to be an object. Instead, received: '"+oe(b)+"'");function j(){b.next&&b.next(d())}j();var D=g(j);return{unsubscribe:D}}},h[zt]=function(){return this},h}return v({type:Vt.INIT}),r={dispatch:v,subscribe:p,getState:d,replaceReducer:x},r[zt]=m,r}function _(t,e,...n){if(yi()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;r=new Error(e.replace(/%s/g,function(){return n[s++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function yi(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function bi(t,e,n){return e.split(".").reduce((r,s)=>r&&r[s]?r[s]:n||null,t)}function ji(t,e){return t.filter(n=>n!==e)}function Nn(t){return typeof t=="object"}function Si(t,e){const n=new Map,r=i=>{n.set(i,n.has(i)?n.get(i)+1:1)};t.forEach(r),e.forEach(r);const s=[];return n.forEach((i,a)=>{i===1&&s.push(a)}),s}function _i(t,e){return t.filter(n=>e.indexOf(n)>-1)}const yt="dnd-core/INIT_COORDS",Me="dnd-core/BEGIN_DRAG",bt="dnd-core/PUBLISH_DRAG_SOURCE",$e="dnd-core/HOVER",Fe="dnd-core/DROP",Ue="dnd-core/END_DRAG";function Gt(t,e){return{type:yt,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const wi={type:yt,payload:{clientOffset:null,sourceClientOffset:null}};function Ri(t){return function(n=[],r={publishSource:!0}){const{publishSource:s=!0,clientOffset:i,getSourceClientOffset:a}=r,c=t.getMonitor(),u=t.getRegistry();t.dispatch(Gt(i)),Oi(n,c,u);const l=Ci(n,c);if(l==null){t.dispatch(wi);return}let d=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");Ti(a),d=a(l)}t.dispatch(Gt(i,d));const v=u.getSource(l).beginDrag(c,l);if(v==null)return;Di(v),u.pinSource(l);const x=u.getSourceType(l);return{type:Me,payload:{itemType:x,item:v,sourceId:l,clientOffset:i||null,sourceClientOffset:d||null,isSourcePublic:!!s}}}}function Oi(t,e,n){_(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){_(n.getSource(r),"Expected sourceIds to be registered.")})}function Ti(t){_(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Di(t){_(Nn(t),"Item must be an object.")}function Ci(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function Ni(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ii(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Ni(t,s,n[s])})}return t}function Pi(t){return function(n={}){const r=t.getMonitor(),s=t.getRegistry();ki(r),Li(r).forEach((a,c)=>{const u=Ai(a,c,s,r),l={type:Fe,payload:{dropResult:Ii({},n,u)}};t.dispatch(l)})}}function ki(t){_(t.isDragging(),"Cannot call drop while not dragging."),_(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Ai(t,e,n,r){const s=n.getTarget(t);let i=s?s.drop(r,t):void 0;return Bi(i),typeof i>"u"&&(i=e===0?{}:r.getDropResult()),i}function Bi(t){_(typeof t>"u"||Nn(t),"Drop result must either be an object or undefined.")}function Li(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function Mi(t){return function(){const n=t.getMonitor(),r=t.getRegistry();$i(n);const s=n.getSourceId();return s!=null&&(r.getSource(s,!0).endDrag(n,s),r.unpinSource()),{type:Ue}}}function $i(t){_(t.isDragging(),"Cannot call endDrag while not dragging.")}function lt(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function Fi(t){return function(n,{clientOffset:r}={}){Ui(n);const s=n.slice(0),i=t.getMonitor(),a=t.getRegistry(),c=i.getItemType();return qi(s,a,c),Hi(s,i,a),zi(s,i,a),{type:$e,payload:{targetIds:s,clientOffset:r||null}}}}function Ui(t){_(Array.isArray(t),"Expected targetIds to be an array.")}function Hi(t,e,n){_(e.isDragging(),"Cannot call hover while not dragging."),_(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const s=t[r];_(t.lastIndexOf(s)===r,"Expected targetIds to be unique in the passed array.");const i=n.getTarget(s);_(i,"Expected targetIds to be registered.")}}function qi(t,e,n){for(let r=t.length-1;r>=0;r--){const s=t[r],i=e.getTargetType(s);lt(i,n)||t.splice(r,1)}}function zi(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function Vi(t){return function(){if(t.getMonitor().isDragging())return{type:bt}}}function Gi(t){return{beginDrag:Ri(t),publishDragSource:Vi(t),hover:Fi(t),drop:Pi(t),endDrag:Mi(t)}}class Wi{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(i){return(...a)=>{const c=i.apply(e,a);typeof c<"u"&&n(c)}}const s=Gi(this);return Object.keys(s).reduce((i,a)=>{const c=s[a];return i[a]=r(c),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Yi(t,e){return{x:t.x+e.x,y:t.y+e.y}}function In(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ji(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:In(Yi(e,r),n)}function Xi(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:In(e,n)}const xe=[],jt=[];xe.__IS_NONE__=!0;jt.__IS_ALL__=!0;function Ki(t,e){return t===xe?!1:t===jt||typeof e>"u"?!0:_i(e,t).length>0}class Qi{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;_(typeof e=="function","listener must be a function."),_(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const i=()=>{const a=this.store.getState(),c=a.stateId;try{c===s||c===s+1&&!Ki(a.dirtyHandlerIds,r)||e()}finally{s=c}};return this.store.subscribe(i)}subscribeToOffsetChange(e){_(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const s=this.store.getState().dragOffset;s!==n&&(n=s,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return _(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(_(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),s=this.getItemType();return lt(r,s)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(_(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),s=this.getItemType();return r!==s?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const s=this.registry.getTargetType(e),i=this.getItemType();if(i&&!lt(s,i))return!1;const a=this.getTargetIds();if(!a.length)return!1;const c=a.indexOf(e);return r?c===a.length-1:c>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ji(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Xi(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const Wt=typeof global<"u"?global:self,Pn=Wt.MutationObserver||Wt.WebKitMutationObserver;function kn(t){return function(){const n=setTimeout(s,0),r=setInterval(s,50);function s(){clearTimeout(n),clearInterval(r),t()}}}function Zi(t){let e=1;const n=new Pn(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const ea=typeof Pn=="function"?Zi:kn;class ta{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,s=e.length-this.index;r<s;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=ea(this.flush),this.requestErrorThrow=kn(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class na{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class ra{create(e){const n=this.freeTasks,r=n.length?n.pop():new na(this.onError,s=>n[n.length]=s);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const An=new ta,sa=new ra(An.registerPendingError);function oa(t){An.enqueueTask(sa.create(t))}const St="dnd-core/ADD_SOURCE",_t="dnd-core/ADD_TARGET",wt="dnd-core/REMOVE_SOURCE",He="dnd-core/REMOVE_TARGET";function ia(t){return{type:St,payload:{sourceId:t}}}function aa(t){return{type:_t,payload:{targetId:t}}}function ca(t){return{type:wt,payload:{sourceId:t}}}function ua(t){return{type:He,payload:{targetId:t}}}function la(t){_(typeof t.canDrag=="function","Expected canDrag to be a function."),_(typeof t.beginDrag=="function","Expected beginDrag to be a function."),_(typeof t.endDrag=="function","Expected endDrag to be a function.")}function da(t){_(typeof t.canDrop=="function","Expected canDrop to be a function."),_(typeof t.hover=="function","Expected hover to be a function."),_(typeof t.drop=="function","Expected beginDrag to be a function.")}function dt(t,e){if(e&&Array.isArray(t)){t.forEach(n=>dt(n,!1));return}_(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var F;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(F||(F={}));let fa=0;function pa(){return fa++}function ha(t){const e=pa().toString();switch(t){case F.SOURCE:return`S${e}`;case F.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Yt(t){switch(t[0]){case"S":return F.SOURCE;case"T":return F.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function Jt(t,e){const n=t.entries();let r=!1;do{const{done:s,value:[,i]}=n.next();if(i===e)return!0;r=!!s}while(!r);return!1}class ga{addSource(e,n){dt(e),la(n);const r=this.addHandler(F.SOURCE,e,n);return this.store.dispatch(ia(r)),r}addTarget(e,n){dt(e,!0),da(n);const r=this.addHandler(F.TARGET,e,n);return this.store.dispatch(aa(r)),r}containsHandler(e){return Jt(this.dragSources,e)||Jt(this.dropTargets,e)}getSource(e,n=!1){return _(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return _(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return _(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return _(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Yt(e)===F.SOURCE}isTargetId(e){return Yt(e)===F.TARGET}removeSource(e){_(this.getSource(e),"Expected an existing source."),this.store.dispatch(ca(e)),oa(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){_(this.getTarget(e),"Expected an existing target."),this.store.dispatch(ua(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);_(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){_(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const s=ha(e);return this.types.set(s,n),e===F.SOURCE?this.dragSources.set(s,r):e===F.TARGET&&this.dropTargets.set(s,r),s}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const ma=(t,e)=>t===e;function xa(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function va(t,e,n=ma){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Ea(t=xe,e){switch(e.type){case $e:break;case St:case _t:case He:case wt:return xe;case Me:case bt:case Ue:case Fe:default:return jt}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,s=Si(n,r);if(!(s.length>0||!va(n,r)))return xe;const a=r[r.length-1],c=n[n.length-1];return a!==c&&(a&&s.push(a),c&&s.push(c)),s}function ya(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ba(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){ya(t,s,n[s])})}return t}const Xt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function ja(t=Xt,e){const{payload:n}=e;switch(e.type){case yt:case Me:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case $e:return xa(t.clientOffset,n.clientOffset)?t:ba({},t,{clientOffset:n.clientOffset});case Ue:case Fe:return Xt;default:return t}}function Sa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ie(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Sa(t,s,n[s])})}return t}const _a={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function wa(t=_a,e){const{payload:n}=e;switch(e.type){case Me:return ie({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case bt:return ie({},t,{isSourcePublic:!0});case $e:return ie({},t,{targetIds:n.targetIds});case He:return t.targetIds.indexOf(n.targetId)===-1?t:ie({},t,{targetIds:ji(t.targetIds,n.targetId)});case Fe:return ie({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Ue:return ie({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Ra(t=0,e){switch(e.type){case St:case _t:return t+1;case wt:case He:return t-1;default:return t}}function Oa(t=0){return t+1}function Ta(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Da(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Ta(t,s,n[s])})}return t}function Ca(t={},e){return{dirtyHandlerIds:Ea(t.dirtyHandlerIds,{type:e.type,payload:Da({},e.payload,{prevTargetIds:bi(t,"dragOperation.targetIds",[])})}),dragOffset:ja(t.dragOffset,e),refCount:Ra(t.refCount,e),dragOperation:wa(t.dragOperation,e),stateId:Oa(t.stateId)}}function Na(t,e=void 0,n={},r=!1){const s=Ia(r),i=new Qi(s,new ga(s)),a=new Wi(s,i),c=t(a,e,n);return a.receiveBackend(c),a}function Ia(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Cn(Ca,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function Pa(t,e){if(t==null)return{};var n=ka(t,e),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ka(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}let Kt=0;const Ce=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Aa=E.memo(function(e){var{children:n}=e,r=Pa(e,["children"]);const[s,i]=Ba(r);return E.useEffect(()=>{if(i){const a=Bn();return++Kt,()=>{--Kt===0&&(a[Ce]=null)}}},[]),o.jsxRuntimeExports.jsx(Dn.Provider,{value:s,children:n})});function Ba(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=La(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function La(t,e=Bn(),n,r){const s=e;return s[Ce]||(s[Ce]={dragDropManager:Na(t,e,n,r)}),s[Ce]}function Bn(){return typeof global<"u"?global:window}var Ma=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;s--!==0;){var a=i[s];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n};const $a=o.getDefaultExportFromCjs(Ma),se=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Fa(t,e,n){const[r,s]=E.useState(()=>e(t)),i=E.useCallback(()=>{const a=e(t);$a(r,a)||(s(a),n&&n())},[r,t,n]);return se(i),[r,i]}function Ua(t,e,n){const[r,s]=Fa(t,e,n);return se(function(){const a=t.getHandlerId();if(a!=null)return t.subscribeToStateChange(s,{handlerIds:[a]})},[t,s]),r}function Ln(t,e,n){return Ua(e,t||(()=>({})),()=>n.reconnect())}function Mn(t,e){const n=[];return typeof t!="function"&&n.push(t),E.useMemo(()=>typeof t=="function"?t():t,n)}function Ha(t){return E.useMemo(()=>t.hooks.dragSource(),[t])}function qa(t){return E.useMemo(()=>t.hooks.dragPreview(),[t])}let Xe=!1,Ke=!1;class za{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){_(!Xe,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Xe=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Xe=!1}}isDragging(){if(!this.sourceId)return!1;_(!Ke,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ke=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Ke=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Qe=!1;class Va{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;_(!Qe,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Qe=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Qe=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Ga(t,e,n){const r=n.getRegistry(),s=r.addTarget(t,e);return[s,()=>r.removeTarget(s)]}function Wa(t,e,n){const r=n.getRegistry(),s=r.addSource(t,e);return[s,()=>r.removeSource(s)]}function ft(t,e,n,r){let s;if(s!==void 0)return!!s;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;const c=Object.prototype.hasOwnProperty.bind(e);for(let u=0;u<i.length;u++){const l=i[u];if(!c(l))return!1;const d=t[l],p=e[l];if(s=void 0,s===!1||s===void 0&&d!==p)return!1}return!0}function pt(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ya(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Ja(t){return(e=null,n=null)=>{if(!E.isValidElement(e)){const i=e;return t(i,n),i}const r=e;return Ya(r),Xa(r,n?i=>t(i,n):t)}}function $n(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const s=Ja(r);e[n]=()=>s}}),e}function Qt(t,e){typeof t=="function"?t(e):t.current=e}function Xa(t,e){const n=t.ref;return _(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?E.cloneElement(t,{ref:r=>{Qt(n,r),Qt(e,r)}}):E.cloneElement(t,{ref:e})}class Ka{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!ft(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ft(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=$n({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,pt(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,pt(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Qa{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!ft(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=$n({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,pt(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function pe(){const{dragDropManager:t}=E.useContext(Dn);return _(t!=null,"Expected drag drop context"),t}function Za(t,e){const n=pe(),r=E.useMemo(()=>new Ka(n.getBackend()),[n]);return se(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),se(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function ec(){const t=pe();return E.useMemo(()=>new za(t),[t])}class tc{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,s=this.monitor,{isDragging:i}=r;return i?i(s):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:s}=e;s&&s(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function nc(t,e,n){const r=E.useMemo(()=>new tc(t,e,n),[e,n]);return E.useEffect(()=>{r.spec=t},[t]),r}function rc(t){return E.useMemo(()=>{const e=t.type;return _(e!=null,"spec.type must be defined"),e},[t])}function sc(t,e,n){const r=pe(),s=nc(t,e,n),i=rc(t);se(function(){if(i!=null){const[c,u]=Wa(i,s,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),u}},[r,e,n,s,i])}function oc(t,e){const n=Mn(t);_(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=ec(),s=Za(n.options,n.previewOptions);return sc(n,r,s),[Ln(n.collect,r,s),Ha(s),qa(s)]}function ic(t){return E.useMemo(()=>t.hooks.dropTarget(),[t])}function ac(t){const e=pe(),n=E.useMemo(()=>new Qa(e.getBackend()),[e]);return se(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function cc(){const t=pe();return E.useMemo(()=>new Va(t),[t])}function uc(t){const{accept:e}=t;return E.useMemo(()=>(_(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class lc{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function dc(t,e){const n=E.useMemo(()=>new lc(t,e),[e]);return E.useEffect(()=>{n.spec=t},[t]),n}function fc(t,e,n){const r=pe(),s=dc(t,e),i=uc(t);se(function(){const[c,u]=Ga(i,s,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),u},[r,e,s,n,i.map(a=>a.toString()).join("|")])}function pc(t,e){const n=Mn(t),r=cc(),s=ac(n.options);return fc(n,r,s),[Ln(n.collect,r,s),ic(s)]}function Fn(t){let e=null;return()=>(e==null&&(e=t()),e)}function hc(t,e){return t.filter(n=>n!==e)}function gc(t,e){const n=new Set,r=i=>n.add(i);t.forEach(r),e.forEach(r);const s=[];return n.forEach(i=>s.push(i)),s}class mc{enter(e){const n=this.entered.length,r=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(e));return this.entered=gc(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=hc(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class xc{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const s=this.config.exposeProperties[r];s!=null&&(n[r]={value:s(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Un="__NATIVE_FILE__",Hn="__NATIVE_URL__",qn="__NATIVE_TEXT__",zn="__NATIVE_HTML__",Zt=Object.freeze(Object.defineProperty({__proto__:null,FILE:Un,HTML:zn,TEXT:qn,URL:Hn},Symbol.toStringTag,{value:"Module"}));function Ze(t,e,n){const r=e.reduce((s,i)=>s||t.getData(i),"");return r??n}const ht={[Un]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[zn]:{exposeProperties:{html:(t,e)=>Ze(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Hn]:{exposeProperties:{urls:(t,e)=>Ze(t,e,"").split(`
11
- `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[qn]:{exposeProperties:{text:(t,e)=>Ze(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function vc(t,e){const n=ht[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new xc(n);return r.loadDataTransfer(e),r}function et(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(ht).filter(n=>{const r=ht[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(s=>e.indexOf(s)>-1):!1})[0]||null}const Ec=Fn(()=>/firefox/i.test(navigator.userAgent)),Vn=Fn(()=>!!window.safari);class en{interpolate(e){const{xs:n,ys:r,c1s:s,c2s:i,c3s:a}=this;let c=n.length-1;if(e===n[c])return r[c];let u=0,l=a.length-1,d;for(;u<=l;){d=Math.floor(.5*(u+l));const x=n[d];if(x<e)u=d+1;else if(x>e)l=d-1;else return r[d]}c=Math.max(0,l);const p=e-n[c],v=p*p;return r[c]+s[c]*p+i[c]*v+a[c]*p*v}constructor(e,n){const{length:r}=e,s=[];for(let x=0;x<r;x++)s.push(x);s.sort((x,m)=>e[x]<e[m]?-1:1);const i=[],a=[];let c,u;for(let x=0;x<r-1;x++)c=e[x+1]-e[x],u=n[x+1]-n[x],i.push(c),a.push(u/c);const l=[a[0]];for(let x=0;x<i.length-1;x++){const m=a[x],h=a[x+1];if(m*h<=0)l.push(0);else{c=i[x];const g=i[x+1],y=c+g;l.push(3*y/((y+g)/m+(y+c)/h))}}l.push(a[a.length-1]);const d=[],p=[];let v;for(let x=0;x<l.length-1;x++){v=a[x];const m=l[x],h=1/i[x],g=m+l[x+1]-v-v;d.push((v-m-g)*h),p.push(g*h*h)}this.xs=e,this.ys=n,this.c1s=l,this.c2s=d,this.c3s=p}}const yc=1;function Gn(t){const e=t.nodeType===yc?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Re(t){return{x:t.clientX,y:t.clientY}}function bc(t){var e;return t.nodeName==="IMG"&&(Ec()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function jc(t,e,n,r){let s=t?e.width:n,i=t?e.height:r;return Vn()&&t&&(i/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:i}}function Sc(t,e,n,r,s){const i=bc(e),c=Gn(i?t:e),u={x:n.x-c.x,y:n.y-c.y},{offsetWidth:l,offsetHeight:d}=t,{anchorX:p,anchorY:v}=r,{dragPreviewWidth:x,dragPreviewHeight:m}=jc(i,e,l,d),h=()=>{let I=new en([0,.5,1],[u.y,u.y/d*m,u.y+m-d]).interpolate(v);return Vn()&&i&&(I+=(window.devicePixelRatio-1)*m),I},g=()=>new en([0,.5,1],[u.x,u.x/l*x,u.x+x-l]).interpolate(p),{offsetX:y,offsetY:b}=s,j=y===0||y,D=b===0||b;return{x:j?y:g(),y:D?b:h()}}class _c{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function wc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){wc(t,s,n[s])})}return t}class Rc{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const s=a=>this.handleDragStart(a,e),i=a=>this.handleSelectStart(a);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",s),n.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",s),n.removeEventListener("selectstart",i),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=a=>this.handleDragEnter(a,e),s=a=>this.handleDragOver(a,e),i=a=>this.handleDrop(a,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",s),n.addEventListener("drop",i),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",s),n.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return tn({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return tn({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Zt).some(n=>Zt[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=vc(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&Gn(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const a=Re(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:c}=s,u=et(c);if(this.monitor.isDragging()){if(c&&typeof c.setDragImage=="function"){const d=this.monitor.getSourceId(),p=this.sourceNodes.get(d),v=this.sourcePreviewNodes.get(d)||p;if(v){const{anchorX:x,anchorY:m,offsetX:h,offsetY:g}=this.getCurrentSourcePreviewNodeOptions(),j=Sc(p,v,a,{anchorX:x,anchorY:m},{offsetX:h,offsetY:g});c.setDragImage(v,j.x,j.y)}}try{c==null||c.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:l}=this.getCurrentSourcePreviewNodeOptions();l?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(u)this.beginDragNativeItem(u);else{if(c&&!c.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:c}=s,u=et(c);u&&this.beginDragNativeItem(u,c)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,i.length>0&&this.actions.hover(i,{clientOffset:Re(s)}),i.some(c=>this.monitor.canDropOnTarget(c))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=Re(s),this.scheduleHover(i),(i||[]).some(c=>this.monitor.canDropOnTarget(c))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;s.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}else et(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:Re(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const i=s.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(s.preventDefault(),i.dragDrop()))},this.options=new _c(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new mc(this.isNodeInDocument)}}const Oc=function(e,n,r){return new Rc(e,n,r)},Tc="_layers_62wod_1",Dc="_block_62wod_8",Cc="_dragging_62wod_23",Nc="_active_62wod_31",Ic="_add_62wod_35",Pc="_button_62wod_47",kc="_empty_62wod_60",Ac="_title_62wod_72",Bc="_icon_62wod_79",Lc="_text_62wod_83",Mc="_highlight_62wod_89",V={layers:Tc,block:Dc,dragging:Cc,active:Nc,add:Ic,button:Pc,empty:kc,title:Ac,icon:Bc,text:Lc,highlight:Mc},$c=({id:t,name:e,index:n,moveBlock:r,onClick:s})=>{const{currentPage:i,pages:a}=o.usePagesStore(),{activeBlock:c}=o.usePreviewStore(),{showPreview:u,hidePreview:l,showModal:d,hideModal:p,clearHideTimeout:v,startHideTimeout:x,hoverBlockId:m,isModalVisible:h}=o.useSubmodalStore(),{setPositionBlock:g}=o.useLayersStore(),[y,b]=E.useState(!1),j=()=>{h&&p(),u(t),b(!0),v()},D=w=>{w.stopPropagation(),l(),d(t),v(),g(n+1)},R=()=>{h?x():(b(!1),l())};E.useEffect(()=>{h||b(!1)},[h]);const[,I]=pc({accept:"block",hover(w){w.index!==n&&(r(a[i].name,w.index,n),w.index=n)}}),[{isDragging:P},U]=oc({type:"block",item:{id:t,index:n},collect:w=>({isDragging:w.isDragging()})});return o.jsxRuntimeExports.jsxs("div",{ref:w=>U(I(w)),className:o.clx(V.block,{[V.dragging]:P,[V.active]:!P&&c===t}),onClick:()=>s(t),onMouseEnter:j,onMouseLeave:R,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"cards"}),o.jsxRuntimeExports.jsx("span",{children:e}),(y||m===t)&&!P&&o.jsxRuntimeExports.jsx("div",{className:V.add,children:o.jsxRuntimeExports.jsx("button",{className:V.button,onClick:w=>D(w),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"plus",fill:"#fff"})})})]})},Fc=()=>{const{setActiveBlock:t}=o.useNavbarStore();return o.jsxRuntimeExports.jsxs("div",{className:V.empty,children:[o.jsxRuntimeExports.jsx("div",{className:V.icon,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"layers",width:32,height:32,fill:"#757575"})}),o.jsxRuntimeExports.jsx("div",{className:V.title,children:"Layers is empty"}),o.jsxRuntimeExports.jsxs("div",{className:V.text,children:["Try adding"," ",o.jsxRuntimeExports.jsx("span",{className:V.highlight,onClick:()=>t({icon:"plus",name:"Add"}),children:"sections"})," ","and recreate your own design"]})]})},Uc=()=>{const{blocks:t,setCurrentBlock:e,moveBlock:n}=o.useLayersStore(),{currentPage:r,pages:s}=o.usePagesStore();function i(a){e(a)}return o.jsxRuntimeExports.jsx(Aa,{backend:Oc,children:o.jsxRuntimeExports.jsxs("div",{className:V.layers,children:[t[s[r].name]&&Object.keys(t[s[r].name]).map((a,c)=>o.jsxRuntimeExports.jsx($c,{id:a,name:t[s[r].name][a].name,index:c,moveBlock:n,onClick:i},a)),(!t[s[r].name]||Object.keys(t[s[r].name]).length===0)&&o.jsxRuntimeExports.jsx(Fc,{})]})})},Hc=()=>{const{settings:t}=o.useSettingsStore();return t==null?void 0:t.renderSettings()},qc="_theme_1xj36_1",zc="_block_1xj36_6",Vc="_name_1xj36_20",tt={theme:qc,block:zc,name:Vc},Gc=()=>{const{setActiveBlock:t}=o.useThemeSettingsStore();function e(n){t(n)}return o.jsxRuntimeExports.jsx("div",{className:tt.theme,children:Kn.map(n=>o.jsxRuntimeExports.jsxs("div",{onClick:()=>e(n),className:o.clx(tt.block),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:n.icon}),o.jsxRuntimeExports.jsx("span",{className:tt.name,children:n.name}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-right"})]},n.icon))})},Wc="_back_14yda_1",Yc="_render_14yda_8",Jc="_open_14yda_23",Xc="_close_14yda_50",Kc="_clicked_14yda_54",Qc="_title_14yda_58",Zc="_button_14yda_65",eu="_loading_14yda_70",tu="_settings_14yda_74",nu="_buttons_14yda_80",ru="_deleteButton_14yda_86",W={back:Wc,render:Yc,open:Jc,close:Xc,clicked:Kc,title:Qc,button:Zc,loading:eu,settings:tu,buttons:nu,deleteButton:ru},su=({block:t})=>{if(!t)return;const{blocks:e,sourceBlocks:n,activeBlock:r}=o.useBlocksStore(),{currentBlock:s}=o.useLayersStore();if(!r&&!s)return null;if(t!=null&&t.name){const i=e[t.name],a={...t.value};for(const c in a)i[c]=a[c];return i.renderSettings()}else{const i=n[r];for(const a in i)t[a]={...i[a]};return t.renderSettings()}},ou=t=>{var D;const{isAdd:e}=t,[n,r]=E.useState(!1),{setActiveBlock:s}=o.useNavbarStore(),{blocks:i,activeBlock:a,setActiveBlock:c}=o.useBlocksStore(),{blocks:u,addBlock:l,editBlock:d,currentBlock:p,setCurrentBlock:v,removeBlock:x,setPositionBlock:m}=o.useLayersStore(),{currentPage:h,pages:g}=o.usePagesStore();function y(){c(null),v(null),setTimeout(()=>{r(!1)},150)}function b(){y(),s({name:"Layers",icon:"layers"})}function j(){return e?i[a]:i[u[g[h].name]&&u[g[h].name][p]?u[g[h].name][p].name:"null"]}return o.jsxRuntimeExports.jsxs("div",{className:o.clx(W.render,{[W.open]:j(),[W.close]:!j(),[W.clicked]:n}),children:[o.jsxRuntimeExports.jsxs("div",{className:W.back,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:y}),o.jsxRuntimeExports.jsx("h3",{className:W.title,children:a||u[g[h].name]&&((D=u[g[h].name][p])==null?void 0:D.name)||"Loading"})]}),o.jsxRuntimeExports.jsx("div",{className:W.settings,children:j()?o.jsxRuntimeExports.jsx(su,{block:e?j():u[g[h].name][p]}):o.jsxRuntimeExports.jsx("div",{className:W.loading,children:"Loading"})}),o.jsxRuntimeExports.jsxs("div",{className:W.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{style:{width:"100%"},onClick:()=>{r(!0);const R=j();e?(l(g[h].name,{name:a,value:{...R}}),m(null)):d(g[h].name,p,{name:u[g[h].name][p].name,value:{...R}}),b()},children:e?"Add Section":"Edit Section"}),!e&&o.jsxRuntimeExports.jsx("button",{onClick:()=>{r(!0),x(g[h].name,p),setTimeout(()=>{r(!1)},150)},className:W.deleteButton,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",hoverable:!0})})]})]})},iu="_settings_1r85j_1",au="_open_1r85j_16",cu="_close_1r85j_20",uu="_header_1r85j_24",lu="_title_1r85j_30",du="_addButton_1r85j_37",me={settings:iu,open:au,close:cu,header:uu,title:lu,addButton:du},fu="_wrapper_n1a7x_1",pu="_category_n1a7x_5",hu="_categoryTitle_n1a7x_10",gu="_color_n1a7x_16",mu="_content_n1a7x_24",xu="_preview_n1a7x_32",ae={wrapper:fu,category:pu,categoryTitle:hu,color:gu,content:mu,preview:xu},vu=()=>{const{themeSettings:t,updateColor:e}=o.useThemeSettingsStore();async function n(s,i,a){e(s,i,a)}const r=E.useMemo(()=>{const s={};return Object.entries(t.colors).forEach(([i,a])=>{Object.entries(a).forEach(([c,u])=>{s[u]||(s[u]=[]),s[u].push(`${i}-${c}`)})}),Object.keys(s).filter(i=>s[i].length>1)},[t.colors]);return o.jsxRuntimeExports.jsx("div",{className:ae.wrapper,children:Object.entries(t.colors).map(([s,i])=>o.jsxRuntimeExports.jsxs("div",{className:ae.category,children:[o.jsxRuntimeExports.jsx("h2",{className:ae.categoryTitle,children:J(s)}),Object.entries(i).map(([a,c])=>o.jsxRuntimeExports.jsxs("div",{className:ae.color,children:[o.jsxRuntimeExports.jsxs("div",{className:ae.content,children:[o.jsxRuntimeExports.jsx("div",{className:ae.preview,style:{background:c}}),o.jsxRuntimeExports.jsx(o.ColorPicker,{title:J(a),initialColor:c,onChange:u=>n(s,a,u)})]}),r.includes(c)&&o.jsxRuntimeExports.jsx(o.Tip,{type:"warning",message:"To avoid contrast problems, please use a different color",style:{marginBottom:12}})]},a))]},s))})},Eu="_wrapper_kb55x_2",yu="_category_kb55x_6",bu="_categoryTitle_kb55x_11",ju="_color_kb55x_17",Su="_name_kb55x_23",_u="_content_kb55x_28",wu="_label_kb55x_34",Ru="_input_kb55x_45",Ou="_title_kb55x_71",Tu="_field_kb55x_79",Du="_alignments_kb55x_89",Cu="_lineField_kb55x_95",Nu="_style_kb55x_101",Iu="_header_kb55x_108",Y={wrapper:Eu,category:yu,categoryTitle:bu,color:ju,name:Su,content:_u,label:wu,input:Ru,title:Ou,field:Tu,alignments:Du,lineField:Cu,style:Nu,header:Iu},Pu=["left","center","right"],ku=["solid","dashed"],Oe=t=>{const{title:e,children:n,rightAddon:r}=t;return o.jsxRuntimeExports.jsxs("div",{className:Y.field,children:[o.jsxRuntimeExports.jsxs("div",{className:Y.header,children:[o.jsxRuntimeExports.jsx("h4",{children:e}),r]}),n]})},Au=()=>{const{themeSettings:t,updateInput:e}=o.useThemeSettingsStore(),n=E.useMemo(()=>t.inputs,[t]),r=(i,a,c)=>{e(i,a,c)},s=i=>a=>{e(i,a,"color")};return o.jsxRuntimeExports.jsxs("div",{className:Y.wrapper,children:[o.jsxRuntimeExports.jsxs(Oe,{title:"General",children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Height (px)",value:String(n.general.height),onChange:i=>r("general",i,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Input,{label:"Style name",value:n.general.name,onChange:i=>r("general",i,"name")}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",onChange:i=>r("general",i,"size"),value:String(n.general.size),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:J(n.general.color),onChange:s("general"),title:"Font Color",labelStyle:"secondary"})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Field Fill",rightAddon:o.jsxRuntimeExports.jsx("div",{className:Y.switch,children:o.jsxRuntimeExports.jsx(o.Switch,{onChange:i=>r("field",i,"active"),current:n.field.active})}),children:[o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:J(n.field.color),onChange:s("field"),title:"Color",labelStyle:"secondary"}),o.jsxRuntimeExports.jsx(o.Input,{label:"Opacity (%)",value:String(n.field.opacity),onChange:i=>r("field",i,"opacity"),type:"number",min:0})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Border",rightAddon:o.jsxRuntimeExports.jsx("div",{className:Y.switch,children:o.jsxRuntimeExports.jsx(o.Switch,{onChange:i=>r("border",i,"active"),current:n.border.active})}),children:[o.jsxRuntimeExports.jsxs("div",{className:Y.lineField,children:[o.jsxRuntimeExports.jsxs("div",{className:Y.style,children:[o.jsxRuntimeExports.jsx("span",{className:Y.title,children:"Style"}),o.jsxRuntimeExports.jsx(o.Picker,{items:ku,selectedItem:n.border.style,onSelect:i=>r("border",i,"style"),getIconName:i=>`border-${i}`})]}),o.jsxRuntimeExports.jsx(o.Input,{label:"Radius (px)",value:String(n.border.radius),onChange:i=>r("border",i,"radius"),type:"number",min:0})]}),o.jsxRuntimeExports.jsx(o.Input,{label:"Thickness (px)",value:String(n.border.thickness),onChange:i=>r("border",i,"thickness"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:J(n.border.color),onChange:s("border"),title:"Color",labelStyle:"secondary"})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Label",children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Line Height (px)",value:String(n.label.height),onChange:i=>r("label",i,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",onChange:i=>r("label",i,"size"),value:String(n.label.size),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:J(n.label.color),onChange:s("label"),title:"Color",labelStyle:"secondary"}),o.jsxRuntimeExports.jsxs("div",{className:Y.alignments,children:[o.jsxRuntimeExports.jsx("h4",{className:Y.title,children:"Alignment Type"}),o.jsxRuntimeExports.jsx(o.Picker,{items:Pu,selectedItem:n.label.alignment,onSelect:i=>r("label",i,"alignment"),getIconName:i=>`align-${i}`})]})]})]})},Bu="_wrapper_k9on2_1",Lu="_category_k9on2_5",Mu="_categoryTitle_k9on2_10",$u="_font_k9on2_16",Fu="_content_k9on2_36",Uu="_icon_k9on2_42",Hu="_paragraph_k9on2_51",qu="_deleteIcon_k9on2_55",zu="_iconButton_k9on2_62",Q={wrapper:Bu,category:Lu,categoryTitle:Mu,font:$u,content:Fu,icon:Uu,paragraph:Hu,deleteIcon:qu,iconButton:zu},Vu=t=>{const{font:e,size:n,id:r,category:s}=t,{setActiveFont:i}=o.useThemeSettingsStore();return o.jsxRuntimeExports.jsxs("div",{className:Q.font,onClick:()=>i(r),children:[o.jsxRuntimeExports.jsx("div",{className:o.clx(Q.icon,{[Q.paragraph]:s==="paragraph"}),children:o.jsxRuntimeExports.jsx(o.Icon,{name:s})}),o.jsxRuntimeExports.jsxs("div",{className:Q.content,children:[o.jsxRuntimeExports.jsx("h2",{className:Q.categoryTitle,children:J(r)}),o.jsxRuntimeExports.jsx("span",{className:Q.value,children:`${e}, ${n}px`})]})]})},Gu=()=>{const{themeSettings:t,setActiveFont:e,activeBlock:n}=o.useThemeSettingsStore();E.useEffect(()=>(r(),()=>{r()}),[]);function r(){e(null)}if(n!=null&&n.name)return o.jsxRuntimeExports.jsx("div",{className:Q.wrapper,children:Object.entries(t.fonts).map(([s,i])=>o.jsxRuntimeExports.jsxs("div",{className:Q.category,children:[o.jsxRuntimeExports.jsx("h2",{className:Q.categoryTitle,children:J(s)}),Object.entries(i).map(([a,c])=>o.jsxRuntimeExports.jsx(Vu,{id:a,category:s,...c},a))]},s))})},Wu="_wrapper_94fpv_1",Yu="_open_94fpv_16",Ju="_close_94fpv_20",Xu="_header_94fpv_24",Ku="_title_94fpv_31",Qu="_options_94fpv_37",Zu="_clicked_94fpv_44",ce={wrapper:Wu,open:Yu,close:Ju,header:Xu,title:Ku,options:Qu,clicked:Zu},el=()=>{const{activeBlock:t,setActiveFont:e,activeFont:n,themeSettings:r,updateFont:s}=o.useThemeSettingsStore(),{fonts:i}=o.useFontsStore(),[a,c]=E.useState(null);function u(){e(null)}function l(p,v){a&&n&&s(a,n,v,p)}const d=E.useMemo(()=>n?r.fonts.heading[n]?(c("heading"),r.fonts.heading[n]):r.fonts.paragraph[n]?(c("paragraph"),r.fonts.paragraph[n]):(c(null),null):null,[n,r]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ce.wrapper,{[ce.open]:(t==null?void 0:t.name)==="Fonts"&&n,[ce.close]:(t==null?void 0:t.name)!=="Fonts"||!n}),children:[o.jsxRuntimeExports.jsxs("div",{className:ce.header,onClick:u,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0}),o.jsxRuntimeExports.jsx("span",{className:ce.title,children:"Font Style"})]}),n&&d&&o.jsxRuntimeExports.jsxs("div",{className:ce.options,children:[o.jsxRuntimeExports.jsx(o.Select,{label:"Font",value:d.font,onChange:p=>l(p,"font"),options:[...i.filter(p=>p!==d.font)]}),o.jsxRuntimeExports.jsx(o.Select,{label:"Size",value:String(d.size),onChange:p=>l(p,"size"),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.Select,{label:"Weight",value:String(d.weight),onChange:p=>l(p,"weight"),options:o.weightOptions})]})]})},tl="_wrapper_94fpv_1",nl="_open_94fpv_16",rl="_close_94fpv_20",sl="_header_94fpv_24",ol="_title_94fpv_31",il="_options_94fpv_37",al="_clicked_94fpv_44",ue={wrapper:tl,open:nl,close:rl,header:sl,title:ol,options:il,clicked:al},Wn=()=>{const{activeBlock:t,themeSettings:e,updateBorder:n,setActiveBlock:r}=o.useThemeSettingsStore();function s(c,u){n(u,c)}function i(){r(null)}const a=E.useMemo(()=>e.borders,[e]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ue.wrapper,{[ue.open]:(t==null?void 0:t.name)==="Borders",[ue.close]:(t==null?void 0:t.name)!=="Borders"}),children:[o.jsxRuntimeExports.jsxs("div",{className:ue.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:i}),o.jsxRuntimeExports.jsx("span",{className:ue.title,children:"Borders Style"})]}),o.jsxRuntimeExports.jsxs("div",{className:ue.options,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Border Radius (px)",value:String(a.radius),onChange:c=>s(Number(c),"radius"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Input,{label:"Border Thickness (px)",value:String(a.thickness),onChange:c=>s(Number(c),"thickness"),type:"number",min:0})]})]})},cl="_wrapper_1j33r_1",ul="_open_1j33r_16",ll="_close_1j33r_20",dl="_header_1j33r_24",fl="_title_1j33r_31",pl="_options_1j33r_37",hl="_clicked_1j33r_44",gl="_label_1j33r_48",ml="_alignments_1j33r_55",xl="_blocks_1j33r_61",vl="_alignment_1j33r_55",El="_active_1j33r_75",H={wrapper:cl,open:ul,close:ll,header:dl,title:fl,options:pl,clicked:hl,label:gl,alignments:ml,blocks:xl,alignment:vl,active:El},yl=["left","center","right"],Yn=()=>{const{activeBlock:t,themeSettings:e,updateButton:n,setActiveBlock:r}=o.useThemeSettingsStore();function s(c,u){n(u,c)}function i(){r(null)}const a=E.useMemo(()=>e.buttons,[e]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(H.wrapper,{[H.open]:(t==null?void 0:t.name)==="Buttons",[H.close]:(t==null?void 0:t.name)!=="Buttons"}),children:[o.jsxRuntimeExports.jsxs("div",{className:H.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:i}),o.jsxRuntimeExports.jsx("span",{className:H.title,children:"Buttons Style"})]}),a&&o.jsxRuntimeExports.jsxs("div",{className:H.options,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Height (px)",value:String(a.height),onChange:c=>s(c,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",value:String(a.size),onChange:c=>s(c,"size"),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.Input,{label:"Border Radius (px)",value:String(a.radius),onChange:c=>s(Number(c),"radius"),type:"number",min:0}),o.jsxRuntimeExports.jsxs("div",{className:H.alignments,children:[o.jsxRuntimeExports.jsx("h4",{className:H.label,children:"Alignment Type"}),o.jsxRuntimeExports.jsx("div",{className:H.blocks,children:yl.map(c=>o.jsxRuntimeExports.jsx("div",{className:o.clx(H.alignment,{[H.active]:a.alignment===c}),onClick:()=>{s(c,"alignment")},children:o.jsxRuntimeExports.jsx(o.Icon,{name:`align-${c}`,fill:a.alignment===c?"#252525":"#757575"})},c))})]})]})]})},bl=()=>{const{activeBlock:t}=o.useThemeSettingsStore();return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[(t==null?void 0:t.name)==="Fonts"&&o.jsxRuntimeExports.jsx(el,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Wn,{}),(t==null?void 0:t.name)==="Buttons"&&o.jsxRuntimeExports.jsx(Yn,{})]})},jl=()=>{const{activeBlock:t,setActiveBlock:e}=o.useThemeSettingsStore(),{activeBlock:n}=o.useNavbarStore();function r(){e(null)}return o.jsxRuntimeExports.jsxs("div",{className:o.clx(me.settings,{[me.open]:t,[me.close]:!t||n.name!=="Theme"}),children:[o.jsxRuntimeExports.jsxs("div",{className:me.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:r}),o.jsxRuntimeExports.jsx("span",{className:me.title,children:t==null?void 0:t.name})]}),(t==null?void 0:t.name)==="Fonts"&&o.jsxRuntimeExports.jsx(Gu,{}),(t==null?void 0:t.name)==="Colors"&&o.jsxRuntimeExports.jsx(vu,{}),(t==null?void 0:t.name)==="Inputs"&&o.jsxRuntimeExports.jsx(Au,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Wn,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Yn,{}),o.jsxRuntimeExports.jsx(bl,{})]})},Sl=()=>{const{activeBlock:t}=o.useNavbarStore(),{activeBlock:e}=o.useBlocksStore();function n(){switch(t.name){case"Layers":return"Layers";case"Add":return"Add Sections";case"Theme":return"Theme Settings";case"Settings":return"Settings"}}return o.jsxRuntimeExports.jsxs("div",{className:qt.sidebar,children:[o.jsxRuntimeExports.jsx("h3",{className:qt.title,children:n()}),t.name==="Layers"&&o.jsxRuntimeExports.jsx(Uc,{}),t.name==="Add"&&o.jsxRuntimeExports.jsx(Tn,{}),o.jsxRuntimeExports.jsx(ou,{isAdd:!!e}),o.jsxRuntimeExports.jsx(jl,{}),t.name==="Theme"&&o.jsxRuntimeExports.jsx(Gc,{}),t.name==="Settings"&&o.jsxRuntimeExports.jsx(Hc,{})]})},_l="_wrapper_jjfwh_1",wl="_header_jjfwh_12",Rl="_content_jjfwh_21",Ol="_buttons_jjfwh_29",Tl="_cancel_jjfwh_35",Dl="_label_jjfwh_40",Cl="_description_jjfwh_41",Nl="_preview_jjfwh_49",Il="_block_jjfwh_55",Pl="_slug_jjfwh_63",kl="_title_jjfwh_69",q={wrapper:_l,header:wl,content:Rl,buttons:Ol,cancel:Tl,label:Dl,description:Cl,preview:Nl,block:Il,slug:Pl,title:kl},Al=()=>{var P,U,w,C,N,k;const{setIsOpenModal:t,pages:e,createPage:n,updatePage:r,isEdit:s,setIsEdit:i,editedPage:a,setEditedPage:c}=o.usePagesStore(),{createPage:u,updatePage:l}=o.useLayersStore(),[d,p]=E.useState(a?(P=e[a])==null?void 0:P.path:""),[v,x]=E.useState(a?(U=e[a])==null?void 0:U.name:""),[m,h]=E.useState(a?(w=e[a])==null?void 0:w.seo.description:""),[g,y]=E.useState(a?(C=e[a])==null?void 0:C.visibility:"public");function b(){p(""),x(""),h(""),y("public"),i(!1),c(null)}function j(){b(),t(!1)}function D(O){return O[0]==="/"?O:"/"+O}function R(){n({path:D(d),name:v||d,icon:"file",seo:{title:v,description:m},visibility:g}),u(v),j()}function I(){l(e[a].name,v||d),r(a,{path:D(d),name:v||d,icon:e[a].icon||"file",seo:{title:v,description:m},visibility:g}),j()}return o.jsxRuntimeExports.jsxs("div",{className:q.wrapper,onClick:O=>O.stopPropagation(),children:[o.jsxRuntimeExports.jsxs("div",{className:q.header,children:[o.jsxRuntimeExports.jsxs("h2",{children:[s?"Edit":"Create"," Blank Page"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"x",fill:"#757575",hoverable:!0,onClick:j})]}),o.jsxRuntimeExports.jsxs("div",{className:q.content,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Page Slug",onChange:O=>p(O),value:d,placeholder:"path-to-page",disabled:!!(a&&((N=e[a])!=null&&N.name)&&o.defaultPageNames.includes(e[a].name)),required:!0,regex:"^.+$"}),o.jsxRuntimeExports.jsx(o.Input,{label:"Page Title",onChange:O=>x(O),value:v,placeholder:"Contact us",disabled:!!(a&&((k=e[a])!=null&&k.name)&&o.defaultPageNames.includes(e[a].name))}),o.jsxRuntimeExports.jsx(o.Textarea,{label:"Description",onChange:O=>h(O),value:m,placeholder:"Contact us at any time of the day or night. You are always welcome",maxLength:150}),o.jsxRuntimeExports.jsx(o.Radio,{label:"Visibility",defaultValue:g,options:[{value:"public",label:"Public"},{value:"private",label:"Private"}],onChange:O=>y(O)}),o.jsxRuntimeExports.jsxs("div",{className:q.preview,children:[o.jsxRuntimeExports.jsx("span",{className:q.label,children:"Preview"}),o.jsxRuntimeExports.jsxs("div",{className:q.block,children:[o.jsxRuntimeExports.jsx("span",{className:q.slug,children:d||"yoursite.url"}),o.jsxRuntimeExports.jsx("span",{className:q.title,children:v||"My Blank Page"}),o.jsxRuntimeExports.jsx("span",{className:q.description,children:m||"It is My Description"})]})]})]}),o.jsxRuntimeExports.jsxs("div",{className:q.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{className:q.cancel,onClick:j,children:"Cancel"}),o.jsxRuntimeExports.jsx(o.Button,{onClick:s?I:R,disabled:d.length===0,children:s?"Update":"Create"})]})]})},Bl="_layout_kjedu_1",Ll="_main_kjedu_8",Ml="_content_kjedu_15",nt={layout:Bl,main:Ll,content:Ml},$l=()=>{const{isOpenModal:t,setIsOpenModal:e}=o.usePagesStore();return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:nt.layout,children:[o.jsxRuntimeExports.jsx(yo,{}),o.jsxRuntimeExports.jsxs("main",{className:nt.main,children:[o.jsxRuntimeExports.jsx(fo,{}),o.jsxRuntimeExports.jsxs("div",{className:nt.content,children:[o.jsxRuntimeExports.jsx(Sl,{}),o.jsxRuntimeExports.jsx(di,{})]})]})]}),t&&o.jsxRuntimeExports.jsx(o.Modal,{close:e,children:o.jsxRuntimeExports.jsx(Al,{})})]})};async function le(t,e){const n=localStorage.getItem("shopId")||void 0,r=`${Qn}/${t}/builder/shops/${n}/${e}`,s=localStorage.getItem("accessToken")||void 0;return(await T.get(r,{headers:{Authorization:`Bearer ${s}`}})).data}async function Fl(){try{const[t,e,n,r,s,i]=await Promise.allSettled([le("v1","general"),le("v1","faqs"),le("v1","listings"),le("v1","products"),le("v1","reviews"),le("v1","categories")]);return{general:t,faqs:e,listings:n,products:r,reviews:s,categories:i}}catch(t){throw console.error("Error fetching page data:",t),t}}async function Ul(){try{const{data:t}=await T.get(`${Zn}?key=undefined`);return t.items}catch(t){throw console.error("Error fetching page data:",t),t}}const Hl=t=>{const{blocks:e,settings:n}=t,{setBlocks:r,setSourceBlocks:s}=o.useBlocksStore(),{fonts:i,setFonts:a}=o.useFontsStore(),{setSettings:c}=o.useSettingsStore(),{setPageContext:u}=o.usePagesStore();return E.useEffect(()=>{const l={};Object.keys(e).map(p=>{l[p]={...e[p]}}),c(n),s(l),r(e),(async()=>{if(i.length===0){const x=await Ul();a([...x.map(m=>m.family)])}let p={listings:void 0,products:void 0,reviews:void 0,categories:void 0,faqs:void 0,general:void 0};const v=await Fl();Object.keys(v).map(x=>{const m=x;p[m]=v[m].value.data}),u(p)})()},[]),o.jsxRuntimeExports.jsx($l,{})};exports.Builder=Hl;
4
+ linear-gradient(to right, hsl(${o}, 100%, 100%), hsl(${o}, 100%, 50%))
5
+ `},children:r.jsxRuntimeExports.jsx("div",{className:r.styles.indicator,style:{position:"absolute",left:`${i}%`,top:`${100-a}%`,transform:"translate(-50%, -50%)"}})}),r.jsxRuntimeExports.jsx("div",{className:r.styles.hueSlider,children:r.jsxRuntimeExports.jsx("input",{type:"range",min:"0",max:"360",value:o,onChange:E=>{h(Number(E.target.value)),S(i,a)},className:r.styles.slider})}),r.jsxRuntimeExports.jsxs("div",{className:r.styles.buttons,children:[r.jsxRuntimeExports.jsx(r.Button,{onClick:H,className:r.clx(r.styles.applyButton,r.styles.cancelButton),children:"Cancel"}),r.jsxRuntimeExports.jsx(r.Button,{onClick:O,className:r.styles.applyButton,children:"Apply"})]})]})},lr=()=>{const{onPreview:t}=r.usePreviewStore(),{hoverBlockId:e,isModalVisible:n,isPreviewVisible:s}=r.useSubmodalStore(),{settings:o}=r.useSettingsStore(),{blocks:i}=r.useBlocksStore(),{blocks:a}=r.useLayersStore(),{currentPage:c,pages:u}=r.usePagesStore(),{showModal:h}=r.useColorPickerStore(),[f,l]=m.useState(!0);m.useEffect(()=>{t&&setTimeout(()=>{l(!1)},100)},[t]);const p=d=>{if(!d)return;const x=i[d.name],g=d.value;for(const v in g)x[v]=g[v];return x.renderBlock(o)};return r.jsxRuntimeExports.jsxs("div",{className:ee.preview,children:[n&&r.jsxRuntimeExports.jsx(r.Submodal,{children:r.jsxRuntimeExports.jsx(rt,{})}),s&&e&&r.jsxRuntimeExports.jsx(r.Submodal,{children:r.jsxRuntimeExports.jsx(nt,{render:p,block:a[u[c].name][e]})}),h&&r.jsxRuntimeExports.jsx(ur,{}),t&&r.jsxRuntimeExports.jsxs("div",{className:ee.main,children:[r.jsxRuntimeExports.jsx(Mn,{}),r.jsxRuntimeExports.jsx("div",{className:ee.content,children:f?r.jsxRuntimeExports.jsx("div",{className:ee.loading,children:r.jsxRuntimeExports.jsx("div",{className:ee.loader})}):r.jsxRuntimeExports.jsx(nr,{})})]})]})},dr="_sidebar_1r5sp_1",gr="_title_1r5sp_10",pr="_active_1r5sp_18",Fe={sidebar:dr,title:gr,active:pr},st=m.createContext({dragDropManager:void 0});function T(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Ue=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),je=function(){return Math.random().toString(36).substring(7).split("").join(".")},qe={INIT:"@@redux/INIT"+je(),REPLACE:"@@redux/REPLACE"+je(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+je()}};function hr(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function fr(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(vr(t))return"date";if(xr(t))return"error";var n=mr(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function mr(t){return typeof t.constructor=="function"?t.constructor.name:null}function xr(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function vr(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function Y(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=fr(t)),e}function ot(t,e,n){var s;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?T(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?T(1):"Expected the enhancer to be a function. Instead, received: '"+Y(n)+"'");return n(ot)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?T(2):"Expected the root reducer to be a function. Instead, received: '"+Y(t)+"'");var o=t,i=e,a=[],c=a,u=!1;function h(){c===a&&(c=a.slice())}function f(){if(u)throw new Error(process.env.NODE_ENV==="production"?T(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function l(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?T(4):"Expected the listener to be a function. Instead, received: '"+Y(g)+"'");if(u)throw new Error(process.env.NODE_ENV==="production"?T(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var v=!0;return h(),c.push(g),function(){if(v){if(u)throw new Error(process.env.NODE_ENV==="production"?T(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,h();var b=c.indexOf(g);c.splice(b,1),a=null}}}function p(g){if(!hr(g))throw new Error(process.env.NODE_ENV==="production"?T(7):"Actions must be plain objects. Instead, the actual type was: '"+Y(g)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof g.type>"u")throw new Error(process.env.NODE_ENV==="production"?T(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(u)throw new Error(process.env.NODE_ENV==="production"?T(9):"Reducers may not dispatch actions.");try{u=!0,i=o(i,g)}finally{u=!1}for(var v=a=c,_=0;_<v.length;_++){var b=v[_];b()}return g}function d(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?T(10):"Expected the nextReducer to be a function. Instead, received: '"+Y(g));o=g,p({type:qe.REPLACE})}function x(){var g,v=l;return g={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?T(11):"Expected the observer to be an object. Instead, received: '"+Y(b)+"'");function S(){b.next&&b.next(f())}S();var D=v(S);return{unsubscribe:D}}},g[Ue]=function(){return this},g}return p({type:qe.INIT}),s={dispatch:p,subscribe:l,getState:f,replaceReducer:d},s[Ue]=x,s}function j(t,e,...n){if(jr()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let s;if(e===void 0)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let o=0;s=new Error(e.replace(/%s/g,function(){return n[o++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}function jr(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function Er(t,e,n){return e.split(".").reduce((s,o)=>s&&s[o]?s[o]:n||null,t)}function _r(t,e){return t.filter(n=>n!==e)}function it(t){return typeof t=="object"}function br(t,e){const n=new Map,s=i=>{n.set(i,n.has(i)?n.get(i)+1:1)};t.forEach(s),e.forEach(s);const o=[];return n.forEach((i,a)=>{i===1&&o.push(a)}),o}function Sr(t,e){return t.filter(n=>e.indexOf(n)>-1)}const Ne="dnd-core/INIT_COORDS",ge="dnd-core/BEGIN_DRAG",ke="dnd-core/PUBLISH_DRAG_SOURCE",pe="dnd-core/HOVER",he="dnd-core/DROP",fe="dnd-core/END_DRAG";function ze(t,e){return{type:Ne,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const yr={type:Ne,payload:{clientOffset:null,sourceClientOffset:null}};function wr(t){return function(n=[],s={publishSource:!0}){const{publishSource:o=!0,clientOffset:i,getSourceClientOffset:a}=s,c=t.getMonitor(),u=t.getRegistry();t.dispatch(ze(i)),Dr(n,c,u);const h=Or(n,c);if(h==null){t.dispatch(yr);return}let f=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");Rr(a),f=a(h)}t.dispatch(ze(i,f));const p=u.getSource(h).beginDrag(c,h);if(p==null)return;Cr(p),u.pinSource(h);const d=u.getSourceType(h);return{type:ge,payload:{itemType:d,item:p,sourceId:h,clientOffset:i||null,sourceClientOffset:f||null,isSourcePublic:!!o}}}}function Dr(t,e,n){j(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(s){j(n.getSource(s),"Expected sourceIds to be registered.")})}function Rr(t){j(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Cr(t){j(it(t),"Item must be an object.")}function Or(t,e){let n=null;for(let s=t.length-1;s>=0;s--)if(e.canDragSource(t[s])){n=t[s];break}return n}function Ir(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Tr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},s=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),s.forEach(function(o){Ir(t,o,n[o])})}return t}function Nr(t){return function(n={}){const s=t.getMonitor(),o=t.getRegistry();kr(s),Mr(s).forEach((a,c)=>{const u=Pr(a,c,o,s),h={type:he,payload:{dropResult:Tr({},n,u)}};t.dispatch(h)})}}function kr(t){j(t.isDragging(),"Cannot call drop while not dragging."),j(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Pr(t,e,n,s){const o=n.getTarget(t);let i=o?o.drop(s,t):void 0;return $r(i),typeof i>"u"&&(i=e===0?{}:s.getDropResult()),i}function $r(t){j(typeof t>"u"||it(t),"Drop result must either be an object or undefined.")}function Mr(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function Ar(t){return function(){const n=t.getMonitor(),s=t.getRegistry();Br(n);const o=n.getSourceId();return o!=null&&(s.getSource(o,!0).endDrag(n,o),s.unpinSource()),{type:fe}}}function Br(t){j(t.isDragging(),"Cannot call endDrag while not dragging.")}function Re(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function Lr(t){return function(n,{clientOffset:s}={}){Hr(n);const o=n.slice(0),i=t.getMonitor(),a=t.getRegistry(),c=i.getItemType();return Ur(o,a,c),Fr(o,i,a),qr(o,i,a),{type:pe,payload:{targetIds:o,clientOffset:s||null}}}}function Hr(t){j(Array.isArray(t),"Expected targetIds to be an array.")}function Fr(t,e,n){j(e.isDragging(),"Cannot call hover while not dragging."),j(!e.didDrop(),"Cannot call hover after drop.");for(let s=0;s<t.length;s++){const o=t[s];j(t.lastIndexOf(o)===s,"Expected targetIds to be unique in the passed array.");const i=n.getTarget(o);j(i,"Expected targetIds to be registered.")}}function Ur(t,e,n){for(let s=t.length-1;s>=0;s--){const o=t[s],i=e.getTargetType(o);Re(i,n)||t.splice(s,1)}}function qr(t,e,n){t.forEach(function(s){n.getTarget(s).hover(e,s)})}function zr(t){return function(){if(t.getMonitor().isDragging())return{type:ke}}}function Vr(t){return{beginDrag:wr(t),publishDragSource:zr(t),hover:Lr(t),drop:Nr(t),endDrag:Ar(t)}}class Yr{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function s(i){return(...a)=>{const c=i.apply(e,a);typeof c<"u"&&n(c)}}const o=Vr(this);return Object.keys(o).reduce((i,a)=>{const c=o[a];return i[a]=s(c),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const s=this.store.getState().refCount>0;this.backend&&(s&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!s&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Gr(t,e){return{x:t.x+e.x,y:t.y+e.y}}function at(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Xr(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:s}=t;return!e||!n||!s?null:at(Gr(e,s),n)}function Wr(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:at(e,n)}const ne=[],Pe=[];ne.__IS_NONE__=!0;Pe.__IS_ALL__=!0;function Qr(t,e){return t===ne?!1:t===Pe||typeof e>"u"?!0:Sr(e,t).length>0}class Zr{subscribeToStateChange(e,n={}){const{handlerIds:s}=n;j(typeof e=="function","listener must be a function."),j(typeof s>"u"||Array.isArray(s),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const i=()=>{const a=this.store.getState(),c=a.stateId;try{c===o||c===o+1&&!Qr(a.dirtyHandlerIds,s)||e()}finally{o=c}};return this.store.subscribe(i)}subscribeToOffsetChange(e){j(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const s=()=>{const o=this.store.getState().dragOffset;o!==n&&(n=o,e())};return this.store.subscribe(s)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return j(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(j(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const s=this.registry.getTargetType(e),o=this.getItemType();return Re(s,o)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(j(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const s=this.registry.getSourceType(e),o=this.getItemType();return s!==o?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:s}=n;if(!this.isDragging())return!1;const o=this.registry.getTargetType(e),i=this.getItemType();if(i&&!Re(o,i))return!1;const a=this.getTargetIds();if(!a.length)return!1;const c=a.indexOf(e);return s?c===a.length-1:c>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Xr(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Wr(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const Ve=typeof global<"u"?global:self,ct=Ve.MutationObserver||Ve.WebKitMutationObserver;function ut(t){return function(){const n=setTimeout(o,0),s=setInterval(o,50);function o(){clearTimeout(n),clearInterval(s),t()}}}function Jr(t){let e=1;const n=new ct(t),s=document.createTextNode("");return n.observe(s,{characterData:!0}),function(){e=-e,s.data=e}}const Kr=typeof ct=="function"?Jr:ut;class es{enqueueTask(e){const{queue:n,requestFlush:s}=this;n.length||(s(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let s=0,o=e.length-this.index;s<o;s++)e[s]=e[s+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Kr(this.flush),this.requestErrorThrow=ut(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class ts{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class ns{create(e){const n=this.freeTasks,s=n.length?n.pop():new ts(this.onError,o=>n[n.length]=o);return s.task=e,s}constructor(e){this.onError=e,this.freeTasks=[]}}const lt=new es,rs=new ns(lt.registerPendingError);function ss(t){lt.enqueueTask(rs.create(t))}const $e="dnd-core/ADD_SOURCE",Me="dnd-core/ADD_TARGET",Ae="dnd-core/REMOVE_SOURCE",me="dnd-core/REMOVE_TARGET";function os(t){return{type:$e,payload:{sourceId:t}}}function is(t){return{type:Me,payload:{targetId:t}}}function as(t){return{type:Ae,payload:{sourceId:t}}}function cs(t){return{type:me,payload:{targetId:t}}}function us(t){j(typeof t.canDrag=="function","Expected canDrag to be a function."),j(typeof t.beginDrag=="function","Expected beginDrag to be a function."),j(typeof t.endDrag=="function","Expected endDrag to be a function.")}function ls(t){j(typeof t.canDrop=="function","Expected canDrop to be a function."),j(typeof t.hover=="function","Expected hover to be a function."),j(typeof t.drop=="function","Expected beginDrag to be a function.")}function Ce(t,e){if(e&&Array.isArray(t)){t.forEach(n=>Ce(n,!1));return}j(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var N;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(N||(N={}));let ds=0;function gs(){return ds++}function ps(t){const e=gs().toString();switch(t){case N.SOURCE:return`S${e}`;case N.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Ye(t){switch(t[0]){case"S":return N.SOURCE;case"T":return N.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function Ge(t,e){const n=t.entries();let s=!1;do{const{done:o,value:[,i]}=n.next();if(i===e)return!0;s=!!o}while(!s);return!1}class hs{addSource(e,n){Ce(e),us(n);const s=this.addHandler(N.SOURCE,e,n);return this.store.dispatch(os(s)),s}addTarget(e,n){Ce(e,!0),ls(n);const s=this.addHandler(N.TARGET,e,n);return this.store.dispatch(is(s)),s}containsHandler(e){return Ge(this.dragSources,e)||Ge(this.dropTargets,e)}getSource(e,n=!1){return j(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return j(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return j(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return j(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Ye(e)===N.SOURCE}isTargetId(e){return Ye(e)===N.TARGET}removeSource(e){j(this.getSource(e),"Expected an existing source."),this.store.dispatch(as(e)),ss(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){j(this.getTarget(e),"Expected an existing target."),this.store.dispatch(cs(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);j(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){j(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,s){const o=ps(e);return this.types.set(o,n),e===N.SOURCE?this.dragSources.set(o,s):e===N.TARGET&&this.dropTargets.set(o,s),o}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const fs=(t,e)=>t===e;function ms(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function xs(t,e,n=fs){if(t.length!==e.length)return!1;for(let s=0;s<t.length;++s)if(!n(t[s],e[s]))return!1;return!0}function vs(t=ne,e){switch(e.type){case pe:break;case $e:case Me:case me:case Ae:return ne;case ge:case ke:case fe:case he:default:return Pe}const{targetIds:n=[],prevTargetIds:s=[]}=e.payload,o=br(n,s);if(!(o.length>0||!xs(n,s)))return ne;const a=s[s.length-1],c=n[n.length-1];return a!==c&&(a&&o.push(a),c&&o.push(c)),o}function js(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Es(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},s=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),s.forEach(function(o){js(t,o,n[o])})}return t}const Xe={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function _s(t=Xe,e){const{payload:n}=e;switch(e.type){case Ne:case ge:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case pe:return ms(t.clientOffset,n.clientOffset)?t:Es({},t,{clientOffset:n.clientOffset});case fe:case he:return Xe;default:return t}}function bs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function G(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},s=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),s.forEach(function(o){bs(t,o,n[o])})}return t}const Ss={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function ys(t=Ss,e){const{payload:n}=e;switch(e.type){case ge:return G({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case ke:return G({},t,{isSourcePublic:!0});case pe:return G({},t,{targetIds:n.targetIds});case me:return t.targetIds.indexOf(n.targetId)===-1?t:G({},t,{targetIds:_r(t.targetIds,n.targetId)});case he:return G({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case fe:return G({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function ws(t=0,e){switch(e.type){case $e:case Me:return t+1;case Ae:case me:return t-1;default:return t}}function Ds(t=0){return t+1}function Rs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},s=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),s.forEach(function(o){Rs(t,o,n[o])})}return t}function Os(t={},e){return{dirtyHandlerIds:vs(t.dirtyHandlerIds,{type:e.type,payload:Cs({},e.payload,{prevTargetIds:Er(t,"dragOperation.targetIds",[])})}),dragOffset:_s(t.dragOffset,e),refCount:ws(t.refCount,e),dragOperation:ys(t.dragOperation,e),stateId:Ds(t.stateId)}}function Is(t,e=void 0,n={},s=!1){const o=Ts(s),i=new Zr(o,new hs(o)),a=new Yr(o,i),c=t(a,e,n);return a.receiveBackend(c),a}function Ts(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return ot(Os,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function Ns(t,e){if(t==null)return{};var n=ks(t,e),s,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)s=i[o],!(e.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(t,s)&&(n[s]=t[s])}return n}function ks(t,e){if(t==null)return{};var n={},s=Object.keys(t),o,i;for(i=0;i<s.length;i++)o=s[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}let We=0;const de=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Ps=m.memo(function(e){var{children:n}=e,s=Ns(e,["children"]);const[o,i]=$s(s);return m.useEffect(()=>{if(i){const a=dt();return++We,()=>{--We===0&&(a[de]=null)}}},[]),r.jsxRuntimeExports.jsx(st.Provider,{value:o,children:n})});function $s(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=Ms(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function Ms(t,e=dt(),n,s){const o=e;return o[de]||(o[de]={dragDropManager:Is(t,e,n,s)}),o[de]}function dt(){return typeof global<"u"?global:window}var As=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var s,o,i;if(Array.isArray(e)){if(s=e.length,s!=n.length)return!1;for(o=s;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),s=i.length,s!==Object.keys(n).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=s;o--!==0;){var a=i[o];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n};const Bs=r.getDefaultExportFromCjs(As),V=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Ls(t,e,n){const[s,o]=m.useState(()=>e(t)),i=m.useCallback(()=>{const a=e(t);Bs(s,a)||(o(a),n&&n())},[s,t,n]);return V(i),[s,i]}function Hs(t,e,n){const[s,o]=Ls(t,e,n);return V(function(){const a=t.getHandlerId();if(a!=null)return t.subscribeToStateChange(o,{handlerIds:[a]})},[t,o]),s}function gt(t,e,n){return Hs(e,t||(()=>({})),()=>n.reconnect())}function pt(t,e){const n=[];return typeof t!="function"&&n.push(t),m.useMemo(()=>typeof t=="function"?t():t,n)}function Fs(t){return m.useMemo(()=>t.hooks.dragSource(),[t])}function Us(t){return m.useMemo(()=>t.hooks.dragPreview(),[t])}let Ee=!1,_e=!1;class qs{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){j(!Ee,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ee=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Ee=!1}}isDragging(){if(!this.sourceId)return!1;j(!_e,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return _e=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{_e=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let be=!1;class zs{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;j(!be,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return be=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{be=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Vs(t,e,n){const s=n.getRegistry(),o=s.addTarget(t,e);return[o,()=>s.removeTarget(o)]}function Ys(t,e,n){const s=n.getRegistry(),o=s.addSource(t,e);return[o,()=>s.removeSource(o)]}function Oe(t,e,n,s){let o;if(o!==void 0)return!!o;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;const c=Object.prototype.hasOwnProperty.bind(e);for(let u=0;u<i.length;u++){const h=i[u];if(!c(h))return!1;const f=t[h],l=e[h];if(o=void 0,o===!1||o===void 0&&f!==l)return!1}return!0}function Ie(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Gs(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Xs(t){return(e=null,n=null)=>{if(!m.isValidElement(e)){const i=e;return t(i,n),i}const s=e;return Gs(s),Ws(s,n?i=>t(i,n):t)}}function ht(t){const e={};return Object.keys(t).forEach(n=>{const s=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const o=Xs(s);e[n]=()=>o}}),e}function Qe(t,e){typeof t=="function"?t(e):t.current=e}function Ws(t,e){const n=t.ref;return j(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?m.cloneElement(t,{ref:s=>{Qe(n,s),Qe(e,s)}}):m.cloneElement(t,{ref:e})}class Qs{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,s=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(s&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Oe(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Oe(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=ht({dragSource:(n,s)=>{this.clearDragSource(),this.dragSourceOptions=s||null,Ie(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,s)=>{this.clearDragPreview(),this.dragPreviewOptions=s||null,Ie(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Zs{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Oe(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=ht({dropTarget:(n,s)=>{this.clearDropTarget(),this.dropTargetOptions=s,Ie(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function K(){const{dragDropManager:t}=m.useContext(st);return j(t!=null,"Expected drag drop context"),t}function Js(t,e){const n=K(),s=m.useMemo(()=>new Qs(n.getBackend()),[n]);return V(()=>(s.dragSourceOptions=t||null,s.reconnect(),()=>s.disconnectDragSource()),[s,t]),V(()=>(s.dragPreviewOptions=e||null,s.reconnect(),()=>s.disconnectDragPreview()),[s,e]),s}function Ks(){const t=K();return m.useMemo(()=>new qs(t),[t])}class eo{beginDrag(){const e=this.spec,n=this.monitor;let s=null;return typeof e.item=="object"?s=e.item:typeof e.item=="function"?s=e.item(n):s={},s??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const s=this.spec,o=this.monitor,{isDragging:i}=s;return i?i(o):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,s=this.connector,{end:o}=e;o&&o(n.getItem(),n),s.reconnect()}constructor(e,n,s){this.spec=e,this.monitor=n,this.connector=s}}function to(t,e,n){const s=m.useMemo(()=>new eo(t,e,n),[e,n]);return m.useEffect(()=>{s.spec=t},[t]),s}function no(t){return m.useMemo(()=>{const e=t.type;return j(e!=null,"spec.type must be defined"),e},[t])}function ro(t,e,n){const s=K(),o=to(t,e,n),i=no(t);V(function(){if(i!=null){const[c,u]=Ys(i,o,s);return e.receiveHandlerId(c),n.receiveHandlerId(c),u}},[s,e,n,o,i])}function so(t,e){const n=pt(t);j(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const s=Ks(),o=Js(n.options,n.previewOptions);return ro(n,s,o),[gt(n.collect,s,o),Fs(o),Us(o)]}function oo(t){return m.useMemo(()=>t.hooks.dropTarget(),[t])}function io(t){const e=K(),n=m.useMemo(()=>new Zs(e.getBackend()),[e]);return V(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function ao(){const t=K();return m.useMemo(()=>new zs(t),[t])}function co(t){const{accept:e}=t;return m.useMemo(()=>(j(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class uo{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function lo(t,e){const n=m.useMemo(()=>new uo(t,e),[e]);return m.useEffect(()=>{n.spec=t},[t]),n}function go(t,e,n){const s=K(),o=lo(t,e),i=co(t);V(function(){const[c,u]=Vs(i,o,s);return e.receiveHandlerId(c),n.receiveHandlerId(c),u},[s,e,o,n,i.map(a=>a.toString()).join("|")])}function po(t,e){const n=pt(t),s=ao(),o=io(n.options);return go(n,s,o),[gt(n.collect,s,o),oo(o)]}function ft(t){let e=null;return()=>(e==null&&(e=t()),e)}function ho(t,e){return t.filter(n=>n!==e)}function fo(t,e){const n=new Set,s=i=>n.add(i);t.forEach(s),e.forEach(s);const o=[];return n.forEach(i=>o.push(i)),o}class mo{enter(e){const n=this.entered.length,s=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(e));return this.entered=fo(this.entered.filter(s),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=ho(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class xo{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(s=>{const o=this.config.exposeProperties[s];o!=null&&(n[s]={value:o(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const mt="__NATIVE_FILE__",xt="__NATIVE_URL__",vt="__NATIVE_TEXT__",jt="__NATIVE_HTML__",Ze=Object.freeze(Object.defineProperty({__proto__:null,FILE:mt,HTML:jt,TEXT:vt,URL:xt},Symbol.toStringTag,{value:"Module"}));function Se(t,e,n){const s=e.reduce((o,i)=>o||t.getData(i),"");return s??n}const Te={[mt]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[jt]:{exposeProperties:{html:(t,e)=>Se(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[xt]:{exposeProperties:{urls:(t,e)=>Se(t,e,"").split(`
6
+ `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[vt]:{exposeProperties:{text:(t,e)=>Se(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function vo(t,e){const n=Te[t];if(!n)throw new Error(`native type ${t} has no configuration`);const s=new xo(n);return s.loadDataTransfer(e),s}function ye(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(Te).filter(n=>{const s=Te[n];return s!=null&&s.matchesTypes?s.matchesTypes.some(o=>e.indexOf(o)>-1):!1})[0]||null}const jo=ft(()=>/firefox/i.test(navigator.userAgent)),Et=ft(()=>!!window.safari);class Je{interpolate(e){const{xs:n,ys:s,c1s:o,c2s:i,c3s:a}=this;let c=n.length-1;if(e===n[c])return s[c];let u=0,h=a.length-1,f;for(;u<=h;){f=Math.floor(.5*(u+h));const d=n[f];if(d<e)u=f+1;else if(d>e)h=f-1;else return s[f]}c=Math.max(0,h);const l=e-n[c],p=l*l;return s[c]+o[c]*l+i[c]*p+a[c]*l*p}constructor(e,n){const{length:s}=e,o=[];for(let d=0;d<s;d++)o.push(d);o.sort((d,x)=>e[d]<e[x]?-1:1);const i=[],a=[];let c,u;for(let d=0;d<s-1;d++)c=e[d+1]-e[d],u=n[d+1]-n[d],i.push(c),a.push(u/c);const h=[a[0]];for(let d=0;d<i.length-1;d++){const x=a[d],g=a[d+1];if(x*g<=0)h.push(0);else{c=i[d];const v=i[d+1],_=c+v;h.push(3*_/((_+v)/x+(_+c)/g))}}h.push(a[a.length-1]);const f=[],l=[];let p;for(let d=0;d<h.length-1;d++){p=a[d];const x=h[d],g=1/i[d],v=x+h[d+1]-p-p;f.push((p-x-v)*g),l.push(v*g*g)}this.xs=e,this.ys=n,this.c1s=h,this.c2s=f,this.c3s=l}}const Eo=1;function _t(t){const e=t.nodeType===Eo?t:t.parentElement;if(!e)return null;const{top:n,left:s}=e.getBoundingClientRect();return{x:s,y:n}}function ue(t){return{x:t.clientX,y:t.clientY}}function _o(t){var e;return t.nodeName==="IMG"&&(jo()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function bo(t,e,n,s){let o=t?e.width:n,i=t?e.height:s;return Et()&&t&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i}}function So(t,e,n,s,o){const i=_o(e),c=_t(i?t:e),u={x:n.x-c.x,y:n.y-c.y},{offsetWidth:h,offsetHeight:f}=t,{anchorX:l,anchorY:p}=s,{dragPreviewWidth:d,dragPreviewHeight:x}=bo(i,e,h,f),g=()=>{let A=new Je([0,.5,1],[u.y,u.y/f*x,u.y+x-f]).interpolate(p);return Et()&&i&&(A+=(window.devicePixelRatio-1)*x),A},v=()=>new Je([0,.5,1],[u.x,u.x/h*d,u.x+d-h]).interpolate(l),{offsetX:_,offsetY:b}=o,S=_===0||_,D=b===0||b;return{x:S?_:v(),y:D?b:g()}}class yo{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function wo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ke(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},s=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),s.forEach(function(o){wo(t,o,n[o])})}return t}class Do{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,s){return this.sourcePreviewNodeOptions.set(e,s),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,s){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,s);const o=a=>this.handleDragStart(a,e),i=a=>this.handleSelectStart(a);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",o),n.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",o),n.removeEventListener("selectstart",i),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const s=a=>this.handleDragEnter(a,e),o=a=>this.handleDragOver(a,e),i=a=>this.handleDrop(a,e);return n.addEventListener("dragenter",s),n.addEventListener("dragover",o),n.addEventListener("drop",i),()=>{n.removeEventListener("dragenter",s),n.removeEventListener("dragover",o),n.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return Ke({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return Ke({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Ze).some(n=>Ze[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=vo(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var s;return(s=this.rootElement)===null||s===void 0?void 0:s.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,s){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=o=>{const i=this.sourceNodes.get(o);return i&&_t(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=o=>!!(o&&this.document&&this.document.body&&this.document.body.contains(o)),this.endDragIfSourceWasRemovedFromDOM=()=>{const o=this.currentDragSourceNode;o==null||this.isNodeInDocument(o)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=o=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(o||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=o=>{if(o.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const a=ue(o);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:c}=o,u=ye(c);if(this.monitor.isDragging()){if(c&&typeof c.setDragImage=="function"){const f=this.monitor.getSourceId(),l=this.sourceNodes.get(f),p=this.sourcePreviewNodes.get(f)||l;if(p){const{anchorX:d,anchorY:x,offsetX:g,offsetY:v}=this.getCurrentSourcePreviewNodeOptions(),S=So(l,p,a,{anchorX:d,anchorY:x},{offsetX:g,offsetY:v});c.setDragImage(p,S.x,S.y)}}try{c==null||c.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(o.target);const{captureDraggingState:h}=this.getCurrentSourcePreviewNodeOptions();h?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(u)this.beginDragNativeItem(u);else{if(c&&!c.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=o=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(o.dataTransfer)}if(!this.enterLeaveCounter.enter(o.target)||this.monitor.isDragging())return;const{dataTransfer:c}=o,u=ye(c);u&&this.beginDragNativeItem(u,c)},this.handleTopDragEnter=o=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=o.altKey,i.length>0&&this.actions.hover(i,{clientOffset:ue(o)}),i.some(c=>this.monitor.canDropOnTarget(c))&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=o=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(o.dataTransfer)}},this.handleTopDragOver=o=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}this.altKeyPressed=o.altKey,this.lastClientOffset=ue(o),this.scheduleHover(i),(i||[]).some(c=>this.monitor.canDropOnTarget(c))?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=o=>{this.isDraggingNativeItem()&&o.preventDefault(),this.enterLeaveCounter.leave(o.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=o=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;o.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(o.dataTransfer)}else ye(o.dataTransfer)&&o.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=o=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:ue(o)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=o=>{const i=o.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(o.preventDefault(),i.dragDrop()))},this.options=new yo(n,s),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new mo(this.isNodeInDocument)}}const Ro=function(e,n,s){return new Do(e,n,s)},Co="_layers_62wod_1",Oo="_block_62wod_8",Io="_dragging_62wod_23",To="_active_62wod_31",No="_add_62wod_35",ko="_button_62wod_47",Po="_empty_62wod_60",$o="_title_62wod_72",Mo="_icon_62wod_79",Ao="_text_62wod_83",Bo="_highlight_62wod_89",J={layers:Co,block:Oo,dragging:Io,active:To,add:No,button:ko,empty:Po,title:$o,icon:Mo,text:Ao,highlight:Bo},Lo="_block_1d6lb_1",et={block:Lo},Ho=()=>{const{setCurrentBlock:t}=r.useLayersStore(),{activeBlock:e}=r.usePreviewStore();function n(s){t(s)}return r.jsxRuntimeExports.jsxs("div",{className:r.clx(et.block,{[et.active]:e==="header"}),onClick:()=>n("header"),children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"cards"}),r.jsxRuntimeExports.jsx("span",{children:"Header"})]})},Fo="_block_1d6lb_1",tt={block:Fo},Uo=()=>{const{activeBlock:t}=r.usePreviewStore(),{setCurrentBlock:e}=r.useLayersStore();function n(s){e(s)}return r.jsxRuntimeExports.jsxs("div",{className:r.clx(tt.block,{[tt.active]:t==="footer"}),onClick:()=>n("footer"),children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"cards"}),r.jsxRuntimeExports.jsx("span",{children:"Footer"})]})},qo=({id:t,name:e,index:n,moveBlock:s,onClick:o})=>{const{currentPage:i,pages:a}=r.usePagesStore(),{activeBlock:c}=r.usePreviewStore(),{showPreview:u,hidePreview:h,showModal:f,hideModal:l,clearHideTimeout:p,startHideTimeout:d,hoverBlockId:x,isModalVisible:g}=r.useSubmodalStore(),{setPositionBlock:v}=r.useLayersStore(),[_,b]=m.useState(!1),S=()=>{g&&l(),u(t),b(!0),p()},D=E=>{E.stopPropagation(),h(),f(t),p(),v(n+1)},M=()=>{g?d():(b(!1),h())};m.useEffect(()=>{g||b(!1)},[g]);const[,A]=po({accept:"block",hover(E){E.index!==n&&(s(a[i].name,E.index,n),E.index=n)}}),[{isDragging:O},H]=so({type:"block",item:{id:t,index:n},collect:E=>({isDragging:E.isDragging()})});return r.jsxRuntimeExports.jsxs("div",{ref:E=>H(A(E)),className:r.clx(J.block,{[J.dragging]:O,[J.active]:!O&&c===t}),onClick:()=>o(t),onMouseEnter:S,onMouseLeave:M,children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"cards"}),r.jsxRuntimeExports.jsx("span",{children:e}),(_||x===t)&&!O&&r.jsxRuntimeExports.jsx("div",{className:J.add,children:r.jsxRuntimeExports.jsx("button",{className:J.button,onClick:E=>D(E),children:r.jsxRuntimeExports.jsx(r.Icon,{name:"plus",fill:"#fff"})})})]})},zo=()=>{const{blocks:t,setCurrentBlock:e,moveBlock:n}=r.useLayersStore(),{currentPage:s,pages:o}=r.usePagesStore();function i(a){e(a)}return r.jsxRuntimeExports.jsxs("div",{className:J.layers,children:[r.jsxRuntimeExports.jsx(Ho,{}),r.jsxRuntimeExports.jsx(Ps,{backend:Ro,children:r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:t[o[s].name]&&Object.keys(t[o[s].name]).map((a,c)=>r.jsxRuntimeExports.jsx(qo,{id:a,name:t[o[s].name][a].name,index:c,moveBlock:n,onClick:i},a))})}),r.jsxRuntimeExports.jsx(Uo,{})]})},Vo=({isHeader:t})=>{const{header:e,footer:n}=r.useLayersStore(),{pageContext:s}=r.usePagesStore();return console.log(e),t?e==null?void 0:e.renderSettings(s):n==null?void 0:n.renderSettings(s)},Yo=()=>{const{settings:t}=r.useSettingsStore();return t==null?void 0:t.renderSettings()},Go="_theme_1xj36_1",Xo="_block_1xj36_6",Wo="_name_1xj36_20",we={theme:Go,block:Xo,name:Wo},Qo=()=>{const{setActiveBlock:t}=r.useThemeSettingsStore();function e(n){t(n)}return r.jsxRuntimeExports.jsx("div",{className:we.theme,children:Dt.map(n=>r.jsxRuntimeExports.jsxs("div",{onClick:()=>e(n),className:r.clx(we.block),children:[r.jsxRuntimeExports.jsx(r.Icon,{name:n.icon}),r.jsxRuntimeExports.jsx("span",{className:we.name,children:n.name}),r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-right"})]},n.icon))})},Zo="_back_14yda_1",Jo="_render_14yda_8",Ko="_open_14yda_23",ei="_close_14yda_50",ti="_clicked_14yda_54",ni="_title_14yda_58",ri="_button_14yda_65",si="_loading_14yda_70",oi="_settings_14yda_74",ii="_buttons_14yda_80",ai="_deleteButton_14yda_86",B={back:Zo,render:Jo,open:Ko,close:ei,clicked:ti,title:ni,button:ri,loading:si,settings:oi,buttons:ii,deleteButton:ai},ci=({block:t})=>{if(!t)return;const{blocks:e,sourceBlocks:n,activeBlock:s}=r.useBlocksStore(),{currentBlock:o}=r.useLayersStore();if(!s&&!o)return null;if(t!=null&&t.name){const i=e[t.name],a={...t.value};for(const c in a)i[c]=a[c];return i.renderSettings()}else{const i=n[s];for(const a in i)t[a]={...i[a]};return t.renderSettings()}},ui=t=>{var H;const{isAdd:e}=t,[n,s]=m.useState(!1),{setActiveBlock:o}=r.useNavbarStore(),{blocks:i,activeBlock:a,setActiveBlock:c}=r.useBlocksStore(),{blocks:u,addBlock:h,editBlock:f,currentBlock:l,setCurrentBlock:p,removeBlock:d,setPositionBlock:x,setHeader:g,setFooter:v,header:_,footer:b}=r.useLayersStore(),{currentPage:S,pages:D}=r.usePagesStore();function M(){c(null),p(null),setTimeout(()=>{s(!1)},150)}function A(){M(),o({name:"Layers",icon:"layers"})}function O(){return e?i[a]:i[u[D[S].name]&&u[D[S].name][l]?u[D[S].name][l].name:"null"]}return r.jsxRuntimeExports.jsxs("div",{className:r.clx(B.render,{[B.open]:l,[B.close]:!l,[B.clicked]:n}),children:[r.jsxRuntimeExports.jsxs("div",{className:B.back,children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-left",hoverable:!0,onClick:M}),r.jsxRuntimeExports.jsx("h3",{className:B.title,children:a||u[D[S].name]&&((H=u[D[S].name][l])==null?void 0:H.name)||l&&$(l)||"Loading"})]}),r.jsxRuntimeExports.jsxs("div",{className:B.settings,children:[l&&O()&&r.jsxRuntimeExports.jsx(ci,{block:e?O():u[D[S].name][l]}),l&&["header","footer"].includes(l)&&r.jsxRuntimeExports.jsx(Vo,{isHeader:l==="header"}),!l&&r.jsxRuntimeExports.jsx("div",{className:B.loading,children:"Loading"})]}),r.jsxRuntimeExports.jsxs("div",{className:B.buttons,children:[r.jsxRuntimeExports.jsx(r.Button,{style:{width:"100%"},onClick:()=>{if(s(!0),["header","active"].includes(l))l==="header"?g(_):v(b);else{const E=O();e?(h(D[S].name,{name:a,value:{...E}}),x(null)):f(D[S].name,l,{name:u[D[S].name][l].name,value:{...E}})}A()},children:e?"Add Section":"Edit Section"}),!e&&!["header","footer"].includes(l)&&r.jsxRuntimeExports.jsx("button",{onClick:()=>{s(!0),d(D[S].name,l),setTimeout(()=>{s(!1)},150)},className:B.deleteButton,children:r.jsxRuntimeExports.jsx(r.Icon,{name:"trash",hoverable:!0})})]})]})},li="_settings_1r85j_1",di="_open_1r85j_16",gi="_close_1r85j_20",pi="_header_1r85j_24",hi="_title_1r85j_30",fi="_addButton_1r85j_37",te={settings:li,open:di,close:gi,header:pi,title:hi,addButton:fi},mi="_wrapper_n1a7x_1",xi="_category_n1a7x_5",vi="_categoryTitle_n1a7x_10",ji="_color_n1a7x_16",Ei="_content_n1a7x_24",_i="_preview_n1a7x_32",X={wrapper:mi,category:xi,categoryTitle:vi,color:ji,content:Ei,preview:_i},bi=()=>{const{themeSettings:t,updateColor:e}=r.useThemeSettingsStore();async function n(o,i,a){e(o,i,a)}const s=m.useMemo(()=>{const o={};return Object.entries(t.colors).forEach(([i,a])=>{Object.entries(a).forEach(([c,u])=>{o[u]||(o[u]=[]),o[u].push(`${i}-${c}`)})}),Object.keys(o).filter(i=>o[i].length>1)},[t.colors]);return r.jsxRuntimeExports.jsx("div",{className:X.wrapper,children:Object.entries(t.colors).map(([o,i])=>r.jsxRuntimeExports.jsxs("div",{className:X.category,children:[r.jsxRuntimeExports.jsx("h2",{className:X.categoryTitle,children:$(o)}),Object.entries(i).map(([a,c])=>r.jsxRuntimeExports.jsxs("div",{className:X.color,children:[r.jsxRuntimeExports.jsxs("div",{className:X.content,children:[r.jsxRuntimeExports.jsx("div",{className:X.preview,style:{background:c}}),r.jsxRuntimeExports.jsx(r.ColorPicker,{title:$(a),initialColor:c,onChange:u=>n(o,a,u)})]}),s.includes(c)&&r.jsxRuntimeExports.jsx(r.Tip,{type:"warning",message:"To avoid contrast problems, please use a different color",style:{marginBottom:12}})]},a))]},o))})},Si="_wrapper_kb55x_2",yi="_category_kb55x_6",wi="_categoryTitle_kb55x_11",Di="_color_kb55x_17",Ri="_name_kb55x_23",Ci="_content_kb55x_28",Oi="_label_kb55x_34",Ii="_input_kb55x_45",Ti="_title_kb55x_71",Ni="_field_kb55x_79",ki="_alignments_kb55x_89",Pi="_lineField_kb55x_95",$i="_style_kb55x_101",Mi="_header_kb55x_108",L={wrapper:Si,category:yi,categoryTitle:wi,color:Di,name:Ri,content:Ci,label:Oi,input:Ii,title:Ti,field:Ni,alignments:ki,lineField:Pi,style:$i,header:Mi},Ai=["left","center","right"],Bi=["solid","dashed"],le=t=>{const{title:e,children:n,rightAddon:s}=t;return r.jsxRuntimeExports.jsxs("div",{className:L.field,children:[r.jsxRuntimeExports.jsxs("div",{className:L.header,children:[r.jsxRuntimeExports.jsx("h4",{children:e}),s]}),n]})},Li=()=>{const{themeSettings:t,updateInput:e}=r.useThemeSettingsStore(),n=m.useMemo(()=>t.inputs,[t]),s=(i,a,c)=>{e(i,a,c)},o=i=>a=>{e(i,a,"color")};return r.jsxRuntimeExports.jsxs("div",{className:L.wrapper,children:[r.jsxRuntimeExports.jsxs(le,{title:"General",children:[r.jsxRuntimeExports.jsx(r.Input,{label:"Height (px)",value:String(n.general.height),onChange:i=>s("general",i,"height"),type:"number",min:0}),r.jsxRuntimeExports.jsx(r.Input,{label:"Style name",value:n.general.name,onChange:i=>s("general",i,"name")}),r.jsxRuntimeExports.jsx(r.Select,{label:"Font Size (px)",onChange:i=>s("general",i,"size"),value:String(n.general.size),options:r.sizeOptions}),r.jsxRuntimeExports.jsx(r.ColorPicker,{initialColor:$(n.general.color),onChange:o("general"),title:"Font Color",labelStyle:"secondary"})]}),r.jsxRuntimeExports.jsxs(le,{title:"Field Fill",rightAddon:r.jsxRuntimeExports.jsx("div",{className:L.switch,children:r.jsxRuntimeExports.jsx(r.Switch,{onChange:i=>s("field",i,"active"),current:n.field.active})}),children:[r.jsxRuntimeExports.jsx(r.ColorPicker,{initialColor:$(n.field.color),onChange:o("field"),title:"Color",labelStyle:"secondary"}),r.jsxRuntimeExports.jsx(r.Input,{label:"Opacity (%)",value:String(n.field.opacity),onChange:i=>s("field",i,"opacity"),type:"number",min:0})]}),r.jsxRuntimeExports.jsxs(le,{title:"Border",rightAddon:r.jsxRuntimeExports.jsx("div",{className:L.switch,children:r.jsxRuntimeExports.jsx(r.Switch,{onChange:i=>s("border",i,"active"),current:n.border.active})}),children:[r.jsxRuntimeExports.jsxs("div",{className:L.lineField,children:[r.jsxRuntimeExports.jsxs("div",{className:L.style,children:[r.jsxRuntimeExports.jsx("span",{className:L.title,children:"Style"}),r.jsxRuntimeExports.jsx(r.Picker,{items:Bi,selectedItem:n.border.style,onSelect:i=>s("border",i,"style"),getIconName:i=>`border-${i}`})]}),r.jsxRuntimeExports.jsx(r.Input,{label:"Radius (px)",value:String(n.border.radius),onChange:i=>s("border",i,"radius"),type:"number",min:0})]}),r.jsxRuntimeExports.jsx(r.Input,{label:"Thickness (px)",value:String(n.border.thickness),onChange:i=>s("border",i,"thickness"),type:"number",min:0}),r.jsxRuntimeExports.jsx(r.ColorPicker,{initialColor:$(n.border.color),onChange:o("border"),title:"Color",labelStyle:"secondary"})]}),r.jsxRuntimeExports.jsxs(le,{title:"Label",children:[r.jsxRuntimeExports.jsx(r.Input,{label:"Line Height (px)",value:String(n.label.height),onChange:i=>s("label",i,"height"),type:"number",min:0}),r.jsxRuntimeExports.jsx(r.Select,{label:"Font Size (px)",onChange:i=>s("label",i,"size"),value:String(n.label.size),options:r.sizeOptions}),r.jsxRuntimeExports.jsx(r.ColorPicker,{initialColor:$(n.label.color),onChange:o("label"),title:"Color",labelStyle:"secondary"}),r.jsxRuntimeExports.jsxs("div",{className:L.alignments,children:[r.jsxRuntimeExports.jsx("h4",{className:L.title,children:"Alignment Type"}),r.jsxRuntimeExports.jsx(r.Picker,{items:Ai,selectedItem:n.label.alignment,onSelect:i=>s("label",i,"alignment"),getIconName:i=>`align-${i}`})]})]})]})},Hi="_wrapper_k9on2_1",Fi="_category_k9on2_5",Ui="_categoryTitle_k9on2_10",qi="_font_k9on2_16",zi="_content_k9on2_36",Vi="_icon_k9on2_42",Yi="_paragraph_k9on2_51",Gi="_deleteIcon_k9on2_55",Xi="_iconButton_k9on2_62",q={wrapper:Hi,category:Fi,categoryTitle:Ui,font:qi,content:zi,icon:Vi,paragraph:Yi,deleteIcon:Gi,iconButton:Xi},Wi=t=>{const{font:e,size:n,id:s,category:o}=t,{setActiveFont:i}=r.useThemeSettingsStore();return r.jsxRuntimeExports.jsxs("div",{className:q.font,onClick:()=>i(s),children:[r.jsxRuntimeExports.jsx("div",{className:r.clx(q.icon,{[q.paragraph]:o==="paragraph"}),children:r.jsxRuntimeExports.jsx(r.Icon,{name:o})}),r.jsxRuntimeExports.jsxs("div",{className:q.content,children:[r.jsxRuntimeExports.jsx("h2",{className:q.categoryTitle,children:$(s)}),r.jsxRuntimeExports.jsx("span",{className:q.value,children:`${e}, ${n}px`})]})]})},Qi=()=>{const{themeSettings:t,setActiveFont:e,activeBlock:n}=r.useThemeSettingsStore();m.useEffect(()=>(s(),()=>{s()}),[]);function s(){e(null)}if(n!=null&&n.name)return r.jsxRuntimeExports.jsx("div",{className:q.wrapper,children:Object.entries(t.fonts).map(([o,i])=>r.jsxRuntimeExports.jsxs("div",{className:q.category,children:[r.jsxRuntimeExports.jsx("h2",{className:q.categoryTitle,children:$(o)}),Object.entries(i).map(([a,c])=>r.jsxRuntimeExports.jsx(Wi,{id:a,category:o,...c},a))]},o))})},Zi="_wrapper_94fpv_1",Ji="_open_94fpv_16",Ki="_close_94fpv_20",ea="_header_94fpv_24",ta="_title_94fpv_31",na="_options_94fpv_37",ra="_clicked_94fpv_44",W={wrapper:Zi,open:Ji,close:Ki,header:ea,title:ta,options:na,clicked:ra},sa=()=>{const{activeBlock:t,setActiveFont:e,activeFont:n,themeSettings:s,updateFont:o}=r.useThemeSettingsStore(),{fonts:i}=r.useFontsStore(),[a,c]=m.useState(null);function u(){e(null)}function h(l,p){a&&n&&o(a,n,p,l)}const f=m.useMemo(()=>n?s.fonts.heading[n]?(c("heading"),s.fonts.heading[n]):s.fonts.paragraph[n]?(c("paragraph"),s.fonts.paragraph[n]):(c(null),null):null,[n,s]);return r.jsxRuntimeExports.jsxs("div",{className:r.clx(W.wrapper,{[W.open]:(t==null?void 0:t.name)==="Fonts"&&n,[W.close]:(t==null?void 0:t.name)!=="Fonts"||!n}),children:[r.jsxRuntimeExports.jsxs("div",{className:W.header,onClick:u,children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-left",hoverable:!0}),r.jsxRuntimeExports.jsx("span",{className:W.title,children:"Font Style"})]}),n&&f&&r.jsxRuntimeExports.jsxs("div",{className:W.options,children:[r.jsxRuntimeExports.jsx(r.Select,{label:"Font",value:f.font,onChange:l=>h(l,"font"),options:[...i.filter(l=>l!==f.font)]}),r.jsxRuntimeExports.jsx(r.Select,{label:"Size",value:String(f.size),onChange:l=>h(l,"size"),options:r.sizeOptions}),r.jsxRuntimeExports.jsx(r.Select,{label:"Weight",value:String(f.weight),onChange:l=>h(l,"weight"),options:r.weightOptions})]})]})},oa="_wrapper_94fpv_1",ia="_open_94fpv_16",aa="_close_94fpv_20",ca="_header_94fpv_24",ua="_title_94fpv_31",la="_options_94fpv_37",da="_clicked_94fpv_44",Q={wrapper:oa,open:ia,close:aa,header:ca,title:ua,options:la,clicked:da},bt=()=>{const{activeBlock:t,themeSettings:e,updateBorder:n,setActiveBlock:s}=r.useThemeSettingsStore();function o(c,u){n(u,c)}function i(){s(null)}const a=m.useMemo(()=>e.borders,[e]);return r.jsxRuntimeExports.jsxs("div",{className:r.clx(Q.wrapper,{[Q.open]:(t==null?void 0:t.name)==="Borders",[Q.close]:(t==null?void 0:t.name)!=="Borders"}),children:[r.jsxRuntimeExports.jsxs("div",{className:Q.header,children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-left",hoverable:!0,onClick:i}),r.jsxRuntimeExports.jsx("span",{className:Q.title,children:"Borders Style"})]}),r.jsxRuntimeExports.jsxs("div",{className:Q.options,children:[r.jsxRuntimeExports.jsx(r.Input,{label:"Border Radius (px)",value:String(a.radius),onChange:c=>o(Number(c),"radius"),type:"number",min:0}),r.jsxRuntimeExports.jsx(r.Input,{label:"Border Thickness (px)",value:String(a.thickness),onChange:c=>o(Number(c),"thickness"),type:"number",min:0})]})]})},ga="_wrapper_1j33r_1",pa="_open_1j33r_16",ha="_close_1j33r_20",fa="_header_1j33r_24",ma="_title_1j33r_31",xa="_options_1j33r_37",va="_clicked_1j33r_44",ja="_label_1j33r_48",Ea="_alignments_1j33r_55",_a="_blocks_1j33r_61",ba="_alignment_1j33r_55",Sa="_active_1j33r_75",k={wrapper:ga,open:pa,close:ha,header:fa,title:ma,options:xa,clicked:va,label:ja,alignments:Ea,blocks:_a,alignment:ba,active:Sa},ya=["left","center","right"],St=()=>{const{activeBlock:t,themeSettings:e,updateButton:n,setActiveBlock:s}=r.useThemeSettingsStore();function o(c,u){n(u,c)}function i(){s(null)}const a=m.useMemo(()=>e.buttons,[e]);return r.jsxRuntimeExports.jsxs("div",{className:r.clx(k.wrapper,{[k.open]:(t==null?void 0:t.name)==="Buttons",[k.close]:(t==null?void 0:t.name)!=="Buttons"}),children:[r.jsxRuntimeExports.jsxs("div",{className:k.header,children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-left",hoverable:!0,onClick:i}),r.jsxRuntimeExports.jsx("span",{className:k.title,children:"Buttons Style"})]}),a&&r.jsxRuntimeExports.jsxs("div",{className:k.options,children:[r.jsxRuntimeExports.jsx(r.Input,{label:"Height (px)",value:String(a.height),onChange:c=>o(c,"height"),type:"number",min:0}),r.jsxRuntimeExports.jsx(r.Select,{label:"Font Size (px)",value:String(a.size),onChange:c=>o(c,"size"),options:r.sizeOptions}),r.jsxRuntimeExports.jsx(r.Input,{label:"Border Radius (px)",value:String(a.radius),onChange:c=>o(Number(c),"radius"),type:"number",min:0}),r.jsxRuntimeExports.jsxs("div",{className:k.alignments,children:[r.jsxRuntimeExports.jsx("h4",{className:k.label,children:"Alignment Type"}),r.jsxRuntimeExports.jsx("div",{className:k.blocks,children:ya.map(c=>r.jsxRuntimeExports.jsx("div",{className:r.clx(k.alignment,{[k.active]:a.alignment===c}),onClick:()=>{o(c,"alignment")},children:r.jsxRuntimeExports.jsx(r.Icon,{name:`align-${c}`,fill:a.alignment===c?"#252525":"#757575"})},c))})]})]})]})},wa=()=>{const{activeBlock:t}=r.useThemeSettingsStore();return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[(t==null?void 0:t.name)==="Fonts"&&r.jsxRuntimeExports.jsx(sa,{}),(t==null?void 0:t.name)==="Borders"&&r.jsxRuntimeExports.jsx(bt,{}),(t==null?void 0:t.name)==="Buttons"&&r.jsxRuntimeExports.jsx(St,{})]})},Da=()=>{const{activeBlock:t,setActiveBlock:e}=r.useThemeSettingsStore(),{activeBlock:n}=r.useNavbarStore();function s(){e(null)}return r.jsxRuntimeExports.jsxs("div",{className:r.clx(te.settings,{[te.open]:t,[te.close]:!t||n.name!=="Theme"}),children:[r.jsxRuntimeExports.jsxs("div",{className:te.header,children:[r.jsxRuntimeExports.jsx(r.Icon,{name:"arrow-left",hoverable:!0,onClick:s}),r.jsxRuntimeExports.jsx("span",{className:te.title,children:t==null?void 0:t.name})]}),(t==null?void 0:t.name)==="Fonts"&&r.jsxRuntimeExports.jsx(Qi,{}),(t==null?void 0:t.name)==="Colors"&&r.jsxRuntimeExports.jsx(bi,{}),(t==null?void 0:t.name)==="Inputs"&&r.jsxRuntimeExports.jsx(Li,{}),(t==null?void 0:t.name)==="Borders"&&r.jsxRuntimeExports.jsx(bt,{}),(t==null?void 0:t.name)==="Borders"&&r.jsxRuntimeExports.jsx(St,{}),r.jsxRuntimeExports.jsx(wa,{})]})},Ra=()=>{const{activeBlock:t}=r.useNavbarStore(),{activeBlock:e}=r.useBlocksStore();function n(){switch(t.name){case"Layers":return"Layers";case"Add":return"Add Sections";case"Theme":return"Theme Settings";case"Settings":return"Settings"}}return r.jsxRuntimeExports.jsxs("div",{className:Fe.sidebar,children:[r.jsxRuntimeExports.jsx("h3",{className:Fe.title,children:n()}),t.name==="Layers"&&r.jsxRuntimeExports.jsx(zo,{}),t.name==="Add"&&r.jsxRuntimeExports.jsx(rt,{}),r.jsxRuntimeExports.jsx(ui,{isAdd:!!e}),r.jsxRuntimeExports.jsx(Da,{}),t.name==="Theme"&&r.jsxRuntimeExports.jsx(Qo,{}),t.name==="Settings"&&r.jsxRuntimeExports.jsx(Yo,{})]})},Ca="_wrapper_jjfwh_1",Oa="_header_jjfwh_12",Ia="_content_jjfwh_21",Ta="_buttons_jjfwh_29",Na="_cancel_jjfwh_35",ka="_label_jjfwh_40",Pa="_description_jjfwh_41",$a="_preview_jjfwh_49",Ma="_block_jjfwh_55",Aa="_slug_jjfwh_63",Ba="_title_jjfwh_69",P={wrapper:Ca,header:Oa,content:Ia,buttons:Ta,cancel:Na,label:ka,description:Pa,preview:$a,block:Ma,slug:Aa,title:Ba},La=()=>{var O,H,E,w,R,C;const{setIsOpenModal:t,pages:e,createPage:n,updatePage:s,isEdit:o,setIsEdit:i,editedPage:a,setEditedPage:c}=r.usePagesStore(),{createPage:u,updatePage:h}=r.useLayersStore(),[f,l]=m.useState(a?(O=e[a])==null?void 0:O.path:""),[p,d]=m.useState(a?(H=e[a])==null?void 0:H.name:""),[x,g]=m.useState(a?(E=e[a])==null?void 0:E.seo.description:""),[v,_]=m.useState(a?(w=e[a])==null?void 0:w.visibility:"public");function b(){l(""),d(""),g(""),_("public"),i(!1),c(null)}function S(){b(),t(!1)}function D(y){return y[0]==="/"?y:"/"+y}function M(){n({path:D(f),name:p||f,icon:"file",seo:{title:p,description:x},visibility:v}),u(p),S()}function A(){h(e[a].name,p||f),s(a,{path:D(f),name:p||f,icon:e[a].icon||"file",seo:{title:p,description:x},visibility:v}),S()}return r.jsxRuntimeExports.jsxs("div",{className:P.wrapper,onClick:y=>y.stopPropagation(),children:[r.jsxRuntimeExports.jsxs("div",{className:P.header,children:[r.jsxRuntimeExports.jsxs("h2",{children:[o?"Edit":"Create"," Blank Page"]}),r.jsxRuntimeExports.jsx(r.Icon,{name:"x",fill:"#757575",hoverable:!0,onClick:S})]}),r.jsxRuntimeExports.jsxs("div",{className:P.content,children:[r.jsxRuntimeExports.jsx(r.Input,{label:"Page Slug",onChange:y=>l(y),value:f,placeholder:"path-to-page",disabled:!!(a&&((R=e[a])!=null&&R.name)&&r.defaultPageNames.includes(e[a].name)),required:!0,regex:"^.+$"}),r.jsxRuntimeExports.jsx(r.Input,{label:"Page Title",onChange:y=>d(y),value:p,placeholder:"Contact us",disabled:!!(a&&((C=e[a])!=null&&C.name)&&r.defaultPageNames.includes(e[a].name))}),r.jsxRuntimeExports.jsx(r.Textarea,{label:"Description",onChange:y=>g(y),value:x,placeholder:"Contact us at any time of the day or night. You are always welcome",maxLength:150}),r.jsxRuntimeExports.jsx(r.Radio,{label:"Visibility",defaultValue:v,options:[{value:"public",label:"Public"},{value:"private",label:"Private"}],onChange:y=>_(y)}),r.jsxRuntimeExports.jsxs("div",{className:P.preview,children:[r.jsxRuntimeExports.jsx("span",{className:P.label,children:"Preview"}),r.jsxRuntimeExports.jsxs("div",{className:P.block,children:[r.jsxRuntimeExports.jsx("span",{className:P.slug,children:f||"yoursite.url"}),r.jsxRuntimeExports.jsx("span",{className:P.title,children:p||"My Blank Page"}),r.jsxRuntimeExports.jsx("span",{className:P.description,children:x||"It is My Description"})]})]})]}),r.jsxRuntimeExports.jsxs("div",{className:P.buttons,children:[r.jsxRuntimeExports.jsx(r.Button,{className:P.cancel,onClick:S,children:"Cancel"}),r.jsxRuntimeExports.jsx(r.Button,{onClick:o?A:M,disabled:f.length===0,children:o?"Update":"Create"})]})]})},Ha="_layout_kjedu_1",Fa="_main_kjedu_8",Ua="_content_kjedu_15",De={layout:Ha,main:Fa,content:Ua},qa=()=>{const{isOpenModal:t,setIsOpenModal:e}=r.usePagesStore(),{openModal:n,setOpenModal:s}=r.useChooseImageStore();return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsxs("div",{className:De.layout,children:[r.jsxRuntimeExports.jsx(vn,{}),r.jsxRuntimeExports.jsxs("main",{className:De.main,children:[r.jsxRuntimeExports.jsx(ln,{}),r.jsxRuntimeExports.jsxs("div",{className:De.content,children:[r.jsxRuntimeExports.jsx(Ra,{}),r.jsxRuntimeExports.jsx(lr,{})]})]})]}),t&&r.jsxRuntimeExports.jsx(r.Modal,{close:e,children:r.jsxRuntimeExports.jsx(La,{})}),n&&r.jsxRuntimeExports.jsx(r.Modal,{close:s,children:r.jsxRuntimeExports.jsx(r.ChooseImageModal,{})})]})};async function Z(t,e){const n=localStorage.getItem("shopId")||void 0,s=`${Rt}/${t}/builder/shops/${n}/${e}`,o=localStorage.getItem("accessToken")||void 0;return(await r.axios.get(s,{headers:{Authorization:`Bearer ${o}`}})).data}async function za(){try{const[t,e,n,s,o,i]=await Promise.allSettled([Z("v1","general"),Z("v1","faqs"),Z("v1","listings"),Z("v1","products"),Z("v1","reviews"),Z("v1","categories")]);return{general:t,faqs:e,listings:n,products:s,reviews:o,categories:i}}catch(t){throw console.error("Error fetching page data:",t),t}}async function Va(){try{const{data:t}=await r.axios.get(`${Ct}?key=undefined`);return t.items}catch(t){throw console.error("Error fetching page data:",t),t}}const Ya=t=>{const{blocks:e,settings:n,header:s,footer:o}=t,{setBlocks:i,setSourceBlocks:a}=r.useBlocksStore(),{fonts:c,setFonts:u}=r.useFontsStore(),{setSettings:h}=r.useSettingsStore(),{setPageContext:f}=r.usePagesStore(),{setHeader:l,setFooter:p}=r.useLayersStore();return m.useEffect(()=>{const d={};Object.keys(e).map(g=>{d[g]={...e[g]}}),l(s),p(o),h(n),a(d),i(e),(async()=>{if(c.length===0){const _=await Va();u([..._.map(b=>b.family)])}let g={listings:void 0,products:void 0,reviews:void 0,categories:void 0,faqs:void 0,general:void 0};const v=await za();Object.keys(v).map(_=>{const b=_;g[b]=v[b].value.data}),f(g)})()},[]),r.jsxRuntimeExports.jsx(qa,{})};exports.Builder=Ya;