pixedi 1.6.1 → 1.8.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.
package/dist/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`._button_1vpzl_1{cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box;background-color:#0000;border:1px solid #0000;border-radius:4px;justify-content:center;align-items:center;gap:8px;height:32px;padding:0 8px;font-family:inherit;font-size:14px;font-weight:500;transition:background-color .2s,border-color .2s,opacity .2s;display:inline-flex}._button_1vpzl_1:disabled{pointer-events:none;opacity:.5}._button_1vpzl_1 svg{flex-shrink:0;width:16px;height:16px}._default_1vpzl_35{background-color:var(--primary);color:var(--primary-foreground)}._default_1vpzl_35:hover{opacity:.9}._outline_1vpzl_44{border-color:var(--border);background-color:var(--background);color:var(--foreground)}._outline_1vpzl_44:hover{background-color:var(--secondary)}._ghost_1vpzl_54{color:var(--foreground);padding:0 8px}._ghost_1vpzl_54:hover{background-color:var(--secondary)}._rect_1vpzl_63{width:32px;height:32px}._separator_gp8ff_1{background-color:var(--border);box-sizing:border-box;border:none;flex-shrink:0;display:block}._separator_gp8ff_1[data-orientation=horizontal]{width:100%;height:1px}._separator_gp8ff_1[data-orientation=vertical]{align-self:stretch;width:1px;height:100%;margin:0}._wrapper_1aw0m_1{box-sizing:border-box;width:100%;position:relative}._trigger_1aw0m_6{width:100%;height:32px;color:var(--foreground);background-color:var(--background);border:1px solid var(--border);cursor:pointer;box-sizing:border-box;-webkit-user-select:none;user-select:none;border-radius:4px;outline:none;justify-content:space-between;align-items:center;padding:0 8px 0 10px;font-family:inherit;font-size:14px;transition:border-color .2s;display:flex}._trigger_1aw0m_6:hover,._trigger_1aw0m_6:focus{border-color:var(--muted-foreground)}._triggerArrow_1aw0m_31{width:16px;height:16px;color:var(--muted-foreground);transition:transform .2s}._wrapper_1aw0m_1[data-state=open] ._triggerArrow_1aw0m_31{transform:rotate(180deg)}._content_1aw0m_40{background-color:var(--background);border:1px solid var(--border);z-index:50;box-sizing:border-box;border-radius:4px;width:100%;max-height:282px;padding:4px;position:absolute;top:calc(100% + 4px);left:0;overflow-y:auto;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}._content_1aw0m_40::-webkit-scrollbar{width:4px}._content_1aw0m_40::-webkit-scrollbar-track{background:0 0}._content_1aw0m_40::-webkit-scrollbar-thumb{background-color:var(--border);border-radius:10px}._wrapper_1aw0m_1[data-state=closed] ._content_1aw0m_40{display:none}._groupLabel_1aw0m_74{color:var(--muted-foreground);-webkit-user-select:none;user-select:none;padding:8px 10px;font-size:12px;font-weight:500}._item_1aw0m_81{width:100%;color:var(--foreground);cursor:pointer;-webkit-user-select:none;user-select:none;box-sizing:border-box;background:0 0;border-radius:4px;justify-content:space-between;align-items:center;padding:4px 10px;display:flex}._item_1aw0m_81:hover{background-color:var(--secondary)}._itemLeft_1aw0m_98{font-size:14px;font-weight:400}._itemAddon_1aw0m_102{align-items:center;gap:8px;display:flex}._itemAddon_1aw0m_102 span{color:var(--muted-foreground);font-size:12px}._itemAddon_1aw0m_102 svg{font-size:14px}._itemAddon_1aw0m_102 b{flex-shrink:0;width:16px;height:16px}._itemRightContainer_1aw0m_122{align-items:center;gap:8px;display:flex}._itemRight_1aw0m_122{color:var(--muted-foreground);font-size:14px}._itemCheck_1aw0m_131{width:16px;height:16px;color:var(--foreground);flex-shrink:0}:host{height:100%;display:block}:host *{box-sizing:border-box}._root_1qifp_8{width:100%;height:100%;font-size:16px;font-family:var(--font-sans);--font-sans:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Tahoma, Helvetica, Arial, sans-serif;--font-mono:"Courier New", Courier, monospace;--color-white:#fff;--color-white-fade:color-mix(in srgb, var(--color-white) 65%, transparent);--color-black:#000;--color-red:oklch(63.7% .237 25.331);--color-green:oklch(76.8% .188 151.716);--background:oklch(100% 0 0);--background-fade:color-mix(in srgb, var(--background) 65%, transparent);--foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(75.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--accent-blue:oklch(60.9% .221 251.687);--accent-blue-light:oklch(96% .02 250);--accent-blue-fade:color-mix(in srgb, var(--accent-blue) 60%, transparent);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--overlay-bg:color-mix(in srgb, var(--color-black) 50%, transparent);--overlay-bg-white:color-mix(in srgb, var(--color-white) 80%, transparent);--surface-border:solid 1px transparent;position:relative}._root_1qifp_8[data-theme=dark]{--color-white-fade:color-mix(in srgb, var(--color-white) 45%, transparent);--background:oklch(24.5% 0 0);--background-fade:color-mix(in srgb, var(--background) 70%, transparent);--foreground:oklch(78.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(29.5% 0 0);--muted-foreground:oklch(50% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--accent-blue-light:oklch(25% .06 250);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--overlay-bg:color-mix(in srgb, var(--color-black) 75%, transparent);--surface-border:solid 1px var(--border)}._root_1qifp_8 h1,._root_1qifp_8 h2,._root_1qifp_8 h3,._root_1qifp_8 h4,._root_1qifp_8 h5,._root_1qifp_8 h6{color:var(--foreground);margin:0;font-weight:600}._textRed_1qifp_78{color:var(--color-red)}._bgRed_1qifp_81{background-color:var(--color-red)}._bgGreen_1qifp_84{background-color:var(--color-green)}._textGreen_1qifp_87{color:var(--color-green)}._mask_1qifp_90{background-color:var(--overlay-bg)}._semibold_1qifp_93{letter-spacing:.4px;font-weight:600}._bold_1qifp_97{letter-spacing:.4px;font-weight:700}._system_1qifp_101{color:var(--muted-foreground);background-color:var(--background);justify-content:center;align-items:center;display:flex;position:absolute;inset:0}._wrapper_1qifp_111{width:100%;height:100%;min-height:480px;position:relative;overflow:hidden}._grid_1qifp_118{background:var(--background);grid-template:"header header"48px"sidebar frame"1fr"sidebar infobar"32px/48px 1fr;height:100%;display:grid;position:relative}._grid_1qifp_118._mobile_1qifp_130{grid-template-columns:0 1fr}._gridNoInfobar_1qifp_134{grid-template:"header header"48px"sidebar frame"1fr/48px 1fr;height:100%;display:grid;position:relative}._gridNoInfobar_1qifp_134._mobile_1qifp_130{grid-template-columns:0 1fr}._input_kyavx_1{width:100%;height:32px;color:var(--foreground);background-color:var(--background);border:1px solid var(--input);box-sizing:border-box;border-radius:4px;outline:none;padding:0 8px;font-family:inherit;font-size:14px;line-height:normal;transition:border-color .2s,box-shadow .2s;display:block}._input_kyavx_1:hover:not(:disabled):not(:focus){border-color:var(--muted-foreground)}._input_kyavx_1:focus{box-shadow:0 0 0 1px var(--ring)}._input_kyavx_1:disabled{cursor:not-allowed;opacity:.5;background-color:var(--secondary)}._input_kyavx_1::placeholder{color:var(--muted-foreground);opacity:1}._numberClean_kyavx_39::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._numberClean_kyavx_39::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}._numberClean_kyavx_39[type=number]{-moz-appearance:textfield}._container_14vsv_1{position:relative}._legend_14vsv_4{color:var(--muted-foreground);background:var(--background);margin-left:8px;padding:0 4px;font-size:12px;position:absolute;top:-9px}._suffix_14vsv_13{color:var(--muted-foreground);pointer-events:none;-webkit-user-select:none;user-select:none;font-size:14px;position:absolute;bottom:2px;right:8px}._group_1e7jm_1{margin-left:4px;display:flex}._save_1e7jm_6{width:36px;color:var(--color-green);border-top-right-radius:0;border-bottom-right-radius:0}._close_1e7jm_13{width:36px;color:var(--color-red);border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}._sliderContainer_1unyb_1{cursor:pointer;touch-action:none;--slider-progress:0%;align-items:center;width:100%;height:24px;display:flex;position:relative}._sliderContainer_1unyb_1._disabled_1unyb_11{pointer-events:none;cursor:not-allowed;opacity:.5}._sliderContainer_1unyb_1:not(._disabled_1unyb_11):hover ._sliderThumb_1unyb_17{transform:translate(-50%,-50%)scale(1.1)}._sliderTrack_1unyb_22{background-color:color-mix(in oklch, var(--muted-foreground) 65%, transparent);border-radius:2px;width:100%;height:2px;position:relative}._sliderRange_1unyb_34{background-color:var(--primary);height:100%;width:var(--slider-progress);border-radius:2px;position:absolute}._sliderThumb_1unyb_17{top:50%;left:var(--slider-progress);background-color:var(--background);border:2px solid var(--primary);pointer-events:none;border-radius:50%;width:12px;height:13px;transition:transform .1s,box-shadow .1s;position:absolute;transform:translate(-50%,-50%)}._sliderTooltip_1unyb_58{top:-40px;left:var(--slider-progress);background-color:var(--foreground);color:var(--background,#000);white-space:nowrap;pointer-events:none;z-index:2;border-radius:4px;padding:7px 10px 8px;font-size:12px;line-height:1;position:absolute;transform:translate(-50%);box-shadow:0 2px 8px #0000001a}._sliderTooltip_1unyb_58:after{content:"";background-color:var(--foreground);width:6px;height:6px;position:absolute;bottom:-2px;left:50%;transform:translate(-50%)rotate(45deg)}._hiddenInput_1unyb_86{opacity:0;cursor:pointer;z-index:1;width:100%;height:100%;margin:0;position:absolute;top:0;left:0}._tooltip_1rdl9_1{position:relative}._container_1rdl9_5{gap:0;display:flex}._container_1rdl9_5[data-position=left],._container_1rdl9_5[data-position=right]{flex-direction:column}._container_1rdl9_5 [data-tooltip]{pointer-events:auto}._popup_1rdl9_19{top:var(--tooltip-y,0px);left:var(--tooltip-x,0px);background-color:var(--foreground);color:var(--background);z-index:999;pointer-events:none;opacity:var(--tooltip-opacity,0);width:var(--tooltip-w,auto);height:var(--tooltip-h,auto);transition:opacity var(--tooltip-fade,.2s);border-radius:4px;font-size:14px;position:absolute;transform:translate(-50%,-100%);box-shadow:0 2px 8px #0000001a}._popup_1rdl9_19:before{content:"";background-color:inherit;width:10px;height:10px;position:absolute;bottom:-3px;left:50%;transform:translate(-50%)rotate(45deg)}._popup_1rdl9_19[data-position=top]{transform:translate(-50%,-100%)}._popup_1rdl9_19[data-position=top]:before{top:auto;bottom:-3px;left:50%;transform:translate(-50%)rotate(45deg)}._popup_1rdl9_19[data-position=bottom]{transform:translate(-50%)}._popup_1rdl9_19[data-position=bottom]:before{top:-3px;bottom:auto;left:50%;transform:translate(-50%)rotate(45deg)}._popup_1rdl9_19[data-position=left]{transform:translate(-100%,-50%)}._popup_1rdl9_19[data-position=left]:before{top:50%;left:auto;right:-3px;transform:translateY(-50%)rotate(45deg)}._popup_1rdl9_19[data-position=right]{transform:translateY(-50%)}._popup_1rdl9_19[data-position=right]:before{top:50%;left:-3px;right:auto;transform:translateY(-50%)rotate(45deg)}._popup_1rdl9_19._animated_1rdl9_92{transition:left var(--tooltip-slide,.4s), top var(--tooltip-slide,.4s), width var(--tooltip-slide,.4s), height var(--tooltip-slide,.4s), opacity var(--tooltip-fade,.2s)}._mask_1rdl9_101{border-radius:inherit;width:100%;height:100%;overflow:hidden}._track_1rdl9_108{width:max-content;height:max-content;transform:translateX(calc(-1 * var(--tooltip-offset,0px)));display:flex}._track_1rdl9_108[data-position=left],._track_1rdl9_108[data-position=right]{transform:translateY(calc(-1 * var(--tooltip-offset,0px)));flex-direction:column}._animated_1rdl9_92 ._track_1rdl9_108{transition:transform var(--tooltip-slide,.4s)}._title_1rdl9_125{min-width:var(--tooltip-item-w,auto);max-width:var(--tooltip-item-w,none);min-height:var(--tooltip-item-h,32px);max-height:var(--tooltip-item-h,none);white-space:nowrap;box-sizing:border-box;flex:none;justify-content:center;align-items:center;padding:0 10px;display:flex}._surfaceTool_e739m_1{background-color:var(--background);border:var(--surface-border);color:var(--foreground);z-index:9;border-radius:4px;gap:4px;padding:4px;display:flex;position:absolute;bottom:16px;left:50%;transform:translate(-50%);box-shadow:0 2px 8px #0000001a}._header_m05h6_1{box-sizing:border-box;background-color:var(--background);border-bottom:1px solid var(--border);grid-area:header;justify-content:space-between;align-items:center;height:48px;padding:0 8px;display:flex}._left_m05h6_12{align-items:center;gap:0;display:flex}._sidebarToggle_m05h6_17{border-right:solid 1px var(--border);width:48px;height:48px;color:var(--foreground);cursor:pointer;justify-content:center;align-items:center;transition:all .2s;display:none;position:relative;left:-8px}._sidebarToggle_m05h6_17._mobile_m05h6_30{display:flex}._sidebarIcon_m05h6_34{stroke-width:1.6px;width:18px;height:18px}._tools_m05h6_39{gap:8px;display:flex}._history_m05h6_43{align-items:center;gap:6px;display:flex}._historyText_m05h6_48{color:var(--muted-foreground);font-size:14px;font-family:var(--font-mono)}._tools_5caap_1{flex-direction:column}._row1_5caap_5{flex-direction:row;align-items:center;gap:4px;padding:4px;display:flex}._min_5caap_13{text-align:left;width:30px;font-size:14px}._slider_5caap_19{flex:1}._max_5caap_23{text-align:right;width:45px;font-size:14px}._row2_5caap_29{flex-direction:row;gap:4px;display:flex}._select_5caap_35{width:180px}._option_5caap_39{width:120px;height:32px}._option_5caap_39 img{object-fit:cover;width:100%;height:100%}._active_5caap_50{color:var(--accent-blue);background:var(--muted)}._filterInteract_5caap_55{max-width:calc(100% - 32px);max-height:calc(100% - 32px);margin:auto;position:absolute;inset:0}._filterInteract_5caap_55>div:first-child{width:100%;max-width:100%;height:100%;max-height:100%}._compare_5caap_70{width:0;height:100%;position:absolute;top:0;transform:translate(-50%)}._compare_5caap_70:before{content:"";background:var(--accent-blue);width:1px;height:100%;position:absolute;top:0;left:-.5px}._compareThumb_5caap_88{background:var(--color-white);border:solid 1px var(--accent-blue);width:32px;height:32px;color:var(--accent-blue);cursor:pointer;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._compareThumb_5caap_88 svg{width:20px;height:20px}._preview_t77n1_1{box-sizing:border-box;max-width:calc(100% - 32px);max-height:calc(100% - 32px);margin:auto;transition:all .2s linear,clip-path;position:absolute;inset:0;overflow:hidden}._preview_t77n1_1._faded_t77n1_13{opacity:.5;filter:blur(2px)}._rotate_t77n1_19{box-sizing:border-box;width:100%;height:100%;transition:all .2s linear;position:absolute;top:50%;left:50%;overflow:hidden;transform:translate(-50%,-50%)}._flip_t77n1_31{box-sizing:border-box;transition:all .2s linear;position:absolute;inset:0;overflow:hidden}._image_t77n1_39{max-width:none;max-height:none;transition:all .2s linear,filter;display:block;position:absolute}._label_t77n1_49{background:var(--color-white-fade);box-sizing:border-box;text-transform:uppercase;letter-spacing:1px;width:80px;height:28px;color:var(--color-black);z-index:3;justify-content:center;align-items:center;font-size:12px;font-weight:600;display:flex;position:absolute;top:8px}._before_t77n1_67{left:8px}._after_t77n1_71{right:8px}._sidebar_1lx29_1{background:var(--background-fade);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);border-right:1px solid var(--border);z-index:10;grid-area:sidebar;width:48px;position:relative}._sidebar_1lx29_1._mobile_1lx29_10{transition:transform .2s ease-out;transform:translate(-110%);box-shadow:0 2px 8px #0000001a}._sidebar_1lx29_1._mobile_1lx29_10._open_1lx29_15{transform:translate(0%)}._wrapper_1lx29_20{flex-direction:column;display:flex}._item_1lx29_24{cursor:pointer;height:48px;color:var(--foreground);justify-content:center;align-items:center;transition:all .2s;display:flex;position:relative}._item_1lx29_24 svg{width:16px;height:16px}._item_1lx29_24:hover{background-color:var(--accent)}._item_1lx29_24._selected_1lx29_43{color:var(--accent-blue);background-color:var(--accent)}._item_1lx29_24._selected_1lx29_43:before{content:"";background-color:var(--accent-blue);width:2px;position:absolute;top:0;bottom:0;left:0}._infobar_895qe_1{background:var(--muted);font-family:var(--font-mono);color:var(--foreground);grid-area:infobar;justify-content:space-between;align-items:center;padding:0 16px;font-size:14px;display:flex}._resize_1sbig_1{align-items:center;padding-top:16px}._toolsLock_1sbig_5{width:12px;height:12px;color:var(--muted-foreground)}._indicatorWrapper_1sbig_10{justify-content:center;width:100%;height:2px;display:flex;position:absolute;top:0;left:0}._indicator_1sbig_10{background:var(--accent-blue);opacity:.6;border-radius:2px;width:30%;height:100%;transition:width .2s}._wrapper_1co2u_1{box-sizing:border-box;max-width:calc(100% - 32px);max-height:calc(100% - 32px);margin:auto;position:absolute;inset:0}._box_1co2u_9{cursor:move;box-sizing:border-box;-webkit-user-select:none;user-select:none;touch-action:none;border:1px solid var(--color-white-fade);position:absolute}._toolsInfo_1co2u_18{-webkit-user-select:none;user-select:none;min-width:54px;margin-top:-2px;display:inline-block}._toolsInfoLabel_1co2u_25{color:var(--muted-foreground);font-size:12px;line-height:12px}._toolsInfoValue_1co2u_30{color:var(--foreground);font-size:14px;line-height:14px}._linesBox_1co2u_35{pointer-events:none;position:absolute;inset:1px}._line_1co2u_35{border:1px dashed var(--color-white);opacity:.5;position:absolute}._lineV_1co2u_45{border-top:0;border-bottom:0;width:33%;height:100%;top:0;left:33%}._lineH_1co2u_53{border-left:0;border-right:0;width:100%;height:33%;top:33%;left:0}._pointer_1co2u_61{box-sizing:border-box;width:14px;height:14px;position:absolute}._pointerTopLeft_1co2u_67{border-top:3px solid var(--accent-blue);border-left:3px solid var(--accent-blue);cursor:nwse-resize;top:-6px;left:-6px}._pointerTopRight_1co2u_74{border-top:3px solid var(--accent-blue);border-right:3px solid var(--accent-blue);cursor:nesw-resize;top:-6px;right:-6px}._pointerBottomRight_1co2u_81{border-bottom:3px solid var(--accent-blue);border-right:3px solid var(--accent-blue);cursor:nwse-resize;bottom:-6px;right:-6px}._pointerBottomLeft_1co2u_88{border-bottom:3px solid var(--accent-blue);border-left:3px solid var(--accent-blue);cursor:nesw-resize;bottom:-6px;left:-6px}._mobileBorder_1co2u_95{box-sizing:border-box;border:2px solid var(--accent-blue);position:absolute;inset:0}._mobilePointer_1co2u_101{background-color:var(--overlay-bg-white);border:3px solid var(--accent-blue);box-sizing:border-box;border-radius:50%;width:32px;height:32px;position:absolute;bottom:-16px;right:-16px}._info_1co2u_112{height:16px;font-family:var(--font-mono);color:#000;background-color:var(--color-white-fade);box-sizing:border-box;align-items:center;padding:0 6px;font-size:12px;display:flex;position:absolute}._info_1co2u_112 b{font-weight:600;transform:translateY(1px)}._infoX_1co2u_129{border-left:solid 2px var(--accent-blue);top:-12px;left:16px}._infoY_1co2u_134{transform-origin:100%;border-right:solid 2px var(--accent-blue);top:8px;right:calc(100% + 4px);transform:rotate(-90deg)}._infoW_1co2u_141{border-right:solid 2px var(--accent-blue);bottom:-12px;right:16px}._infoH_1co2u_146{transform-origin:0%;border-left:solid 2px var(--accent-blue);bottom:8px;left:calc(100% + 4px);transform:rotate(-90deg)}._group_1co2u_153{flex-shrink:0;width:max-content;display:flex}._group_1co2u_153 button{color:var(--foreground);border-radius:0}._group_1co2u_153 button._active_1co2u_162{color:var(--accent-blue);background:var(--muted)}._group_1co2u_153 button:not(:first-child){margin-left:-1px}._group_1co2u_153 button:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}._group_1co2u_153 button:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}._select_1ieak_1{width:220px}._btnH_15adi_1{border-top-right-radius:0;border-bottom-right-radius:0;width:36px}._btnV_15adi_7{border-top-left-radius:0;border-bottom-left-radius:0;width:36px;margin-left:-1px}._frame_1p6kh_1{box-sizing:border-box;background:var(--background);grid-area:frame;width:100%;height:100%;margin:0 auto;position:relative;overflow:hidden}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`._button_1vpzl_1{cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box;background-color:#0000;border:1px solid #0000;border-radius:4px;justify-content:center;align-items:center;gap:8px;height:32px;padding:0 8px;font-family:inherit;font-size:14px;font-weight:500;transition:background-color .2s,border-color .2s,opacity .2s;display:inline-flex}._button_1vpzl_1:disabled{pointer-events:none;opacity:.5}._button_1vpzl_1 svg{flex-shrink:0;width:16px;height:16px}._default_1vpzl_35{background-color:var(--primary);color:var(--primary-foreground)}._default_1vpzl_35:hover{opacity:.9}._outline_1vpzl_44{border-color:var(--border);background-color:var(--background);color:var(--foreground)}._outline_1vpzl_44:hover{background-color:var(--secondary)}._ghost_1vpzl_54{color:var(--foreground);padding:0 8px}._ghost_1vpzl_54:hover{background-color:var(--secondary)}._rect_1vpzl_63{width:32px;height:32px}._separator_gp8ff_1{background-color:var(--border);box-sizing:border-box;border:none;flex-shrink:0;display:block}._separator_gp8ff_1[data-orientation=horizontal]{width:100%;height:1px}._separator_gp8ff_1[data-orientation=vertical]{align-self:stretch;width:1px;height:100%;margin:0}._wrapper_1aw0m_1{box-sizing:border-box;width:100%;position:relative}._trigger_1aw0m_6{width:100%;height:32px;color:var(--foreground);background-color:var(--background);border:1px solid var(--border);cursor:pointer;box-sizing:border-box;-webkit-user-select:none;user-select:none;border-radius:4px;outline:none;justify-content:space-between;align-items:center;padding:0 8px 0 10px;font-family:inherit;font-size:14px;transition:border-color .2s;display:flex}._trigger_1aw0m_6:hover,._trigger_1aw0m_6:focus{border-color:var(--muted-foreground)}._triggerArrow_1aw0m_31{width:16px;height:16px;color:var(--muted-foreground);transition:transform .2s}._wrapper_1aw0m_1[data-state=open] ._triggerArrow_1aw0m_31{transform:rotate(180deg)}._content_1aw0m_40{background-color:var(--background);border:1px solid var(--border);z-index:50;box-sizing:border-box;border-radius:4px;width:100%;max-height:282px;padding:4px;position:absolute;top:calc(100% + 4px);left:0;overflow-y:auto;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}._content_1aw0m_40::-webkit-scrollbar{width:4px}._content_1aw0m_40::-webkit-scrollbar-track{background:0 0}._content_1aw0m_40::-webkit-scrollbar-thumb{background-color:var(--border);border-radius:10px}._wrapper_1aw0m_1[data-state=closed] ._content_1aw0m_40{display:none}._groupLabel_1aw0m_74{color:var(--muted-foreground);-webkit-user-select:none;user-select:none;padding:8px 10px;font-size:12px;font-weight:500}._item_1aw0m_81{width:100%;color:var(--foreground);cursor:pointer;-webkit-user-select:none;user-select:none;box-sizing:border-box;background:0 0;border-radius:4px;justify-content:space-between;align-items:center;padding:4px 10px;display:flex}._item_1aw0m_81:hover{background-color:var(--secondary)}._itemLeft_1aw0m_98{font-size:14px;font-weight:400}._itemAddon_1aw0m_102{align-items:center;gap:8px;display:flex}._itemAddon_1aw0m_102 span{color:var(--muted-foreground);font-size:12px}._itemAddon_1aw0m_102 svg{font-size:14px}._itemAddon_1aw0m_102 b{flex-shrink:0;width:16px;height:16px}._itemRightContainer_1aw0m_122{align-items:center;gap:8px;display:flex}._itemRight_1aw0m_122{color:var(--muted-foreground);font-size:14px}._itemCheck_1aw0m_131{width:16px;height:16px;color:var(--foreground);flex-shrink:0}:host{height:100%;display:block}:host *{box-sizing:border-box}._root_1qifp_8{width:100%;height:100%;font-size:16px;font-family:var(--font-sans);--font-sans:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Tahoma, Helvetica, Arial, sans-serif;--font-mono:"Courier New", Courier, monospace;--color-white:#fff;--color-white-fade:color-mix(in srgb, var(--color-white) 65%, transparent);--color-black:#000;--color-red:oklch(63.7% .237 25.331);--color-green:oklch(76.8% .188 151.716);--background:oklch(100% 0 0);--background-fade:color-mix(in srgb, var(--background) 65%, transparent);--foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(75.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--accent-blue:oklch(60.9% .221 251.687);--accent-blue-light:oklch(96% .02 250);--accent-blue-fade:color-mix(in srgb, var(--accent-blue) 60%, transparent);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--overlay-bg:color-mix(in srgb, var(--color-black) 50%, transparent);--overlay-bg-white:color-mix(in srgb, var(--color-white) 80%, transparent);--surface-border:solid 1px transparent;position:relative}._root_1qifp_8[data-theme=dark]{--color-white-fade:color-mix(in srgb, var(--color-white) 45%, transparent);--background:oklch(24.5% 0 0);--background-fade:color-mix(in srgb, var(--background) 70%, transparent);--foreground:oklch(78.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(29.5% 0 0);--muted-foreground:oklch(50% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--accent-blue-light:oklch(25% .06 250);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--overlay-bg:color-mix(in srgb, var(--color-black) 75%, transparent);--surface-border:solid 1px var(--border)}._root_1qifp_8 h1,._root_1qifp_8 h2,._root_1qifp_8 h3,._root_1qifp_8 h4,._root_1qifp_8 h5,._root_1qifp_8 h6{color:var(--foreground);margin:0;font-weight:600}._textRed_1qifp_78{color:var(--color-red)}._bgRed_1qifp_81{background-color:var(--color-red)}._bgGreen_1qifp_84{background-color:var(--color-green)}._textGreen_1qifp_87{color:var(--color-green)}._mask_1qifp_90{background-color:var(--overlay-bg)}._semibold_1qifp_93{letter-spacing:.4px;font-weight:600}._bold_1qifp_97{letter-spacing:.4px;font-weight:700}._system_1qifp_101{color:var(--muted-foreground);background-color:var(--background);justify-content:center;align-items:center;display:flex;position:absolute;inset:0}._wrapper_1qifp_111{width:100%;height:100%;min-height:480px;position:relative;overflow:hidden}._grid_1qifp_118{background:var(--background);grid-template:"header header"48px"sidebar frame"1fr"sidebar infobar"32px/48px 1fr;height:100%;display:grid;position:relative}._grid_1qifp_118._mobile_1qifp_130{grid-template-columns:0 1fr}._gridNoInfobar_1qifp_134{grid-template:"header header"48px"sidebar frame"1fr/48px 1fr;height:100%;display:grid;position:relative}._gridNoInfobar_1qifp_134._mobile_1qifp_130{grid-template-columns:0 1fr}._input_kyavx_1{width:100%;height:32px;color:var(--foreground);background-color:var(--background);border:1px solid var(--input);box-sizing:border-box;border-radius:4px;outline:none;padding:0 8px;font-family:inherit;font-size:14px;line-height:normal;transition:border-color .2s,box-shadow .2s;display:block}._input_kyavx_1:hover:not(:disabled):not(:focus){border-color:var(--muted-foreground)}._input_kyavx_1:focus{box-shadow:0 0 0 1px var(--ring)}._input_kyavx_1:disabled{cursor:not-allowed;opacity:.5;background-color:var(--secondary)}._input_kyavx_1::placeholder{color:var(--muted-foreground);opacity:1}._numberClean_kyavx_39::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._numberClean_kyavx_39::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}._numberClean_kyavx_39[type=number]{-moz-appearance:textfield}._container_14vsv_1{position:relative}._legend_14vsv_4{color:var(--muted-foreground);background:var(--background);margin-left:8px;padding:0 4px;font-size:12px;position:absolute;top:-9px}._suffix_14vsv_13{color:var(--muted-foreground);pointer-events:none;-webkit-user-select:none;user-select:none;font-size:14px;position:absolute;bottom:2px;right:8px}._group_1e7jm_1{margin-left:4px;display:flex}._save_1e7jm_6{width:36px;color:var(--color-green);border-top-right-radius:0;border-bottom-right-radius:0}._close_1e7jm_13{width:36px;color:var(--color-red);border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}._sliderContainer_1unyb_1{cursor:pointer;touch-action:none;--slider-progress:0%;align-items:center;width:100%;height:24px;display:flex;position:relative}._sliderContainer_1unyb_1._disabled_1unyb_11{pointer-events:none;cursor:not-allowed;opacity:.5}._sliderContainer_1unyb_1:not(._disabled_1unyb_11):hover ._sliderThumb_1unyb_17{transform:translate(-50%,-50%)scale(1.1)}._sliderTrack_1unyb_22{background-color:color-mix(in oklch, var(--muted-foreground) 65%, transparent);border-radius:2px;width:100%;height:2px;position:relative}._sliderRange_1unyb_34{background-color:var(--primary);height:100%;width:var(--slider-progress);border-radius:2px;position:absolute}._sliderThumb_1unyb_17{top:50%;left:var(--slider-progress);background-color:var(--background);border:2px solid var(--primary);pointer-events:none;border-radius:50%;width:12px;height:13px;transition:transform .1s,box-shadow .1s;position:absolute;transform:translate(-50%,-50%)}._sliderTooltip_1unyb_58{top:-40px;left:var(--slider-progress);background-color:var(--foreground);color:var(--background,#000);white-space:nowrap;pointer-events:none;z-index:2;border-radius:4px;padding:7px 10px 8px;font-size:12px;line-height:1;position:absolute;transform:translate(-50%);box-shadow:0 2px 8px #0000001a}._sliderTooltip_1unyb_58:after{content:"";background-color:var(--foreground);width:6px;height:6px;position:absolute;bottom:-2px;left:50%;transform:translate(-50%)rotate(45deg)}._hiddenInput_1unyb_86{opacity:0;cursor:pointer;z-index:1;width:100%;height:100%;margin:0;position:absolute;top:0;left:0}._tooltip_1rdl9_1{position:relative}._container_1rdl9_5{gap:0;display:flex}._container_1rdl9_5[data-position=left],._container_1rdl9_5[data-position=right]{flex-direction:column}._container_1rdl9_5 [data-tooltip]{pointer-events:auto}._popup_1rdl9_19{top:var(--tooltip-y,0px);left:var(--tooltip-x,0px);background-color:var(--foreground);color:var(--background);z-index:999;pointer-events:none;opacity:var(--tooltip-opacity,0);width:var(--tooltip-w,auto);height:var(--tooltip-h,auto);transition:opacity var(--tooltip-fade,.2s);border-radius:4px;font-size:14px;position:absolute;transform:translate(-50%,-100%);box-shadow:0 2px 8px #0000001a}._popup_1rdl9_19:before{content:"";background-color:inherit;width:10px;height:10px;position:absolute;bottom:-3px;left:50%;transform:translate(-50%)rotate(45deg)}._popup_1rdl9_19[data-position=top]{transform:translate(-50%,-100%)}._popup_1rdl9_19[data-position=top]:before{top:auto;bottom:-3px;left:50%;transform:translate(-50%)rotate(45deg)}._popup_1rdl9_19[data-position=bottom]{transform:translate(-50%)}._popup_1rdl9_19[data-position=bottom]:before{top:-3px;bottom:auto;left:50%;transform:translate(-50%)rotate(45deg)}._popup_1rdl9_19[data-position=left]{transform:translate(-100%,-50%)}._popup_1rdl9_19[data-position=left]:before{top:50%;left:auto;right:-3px;transform:translateY(-50%)rotate(45deg)}._popup_1rdl9_19[data-position=right]{transform:translateY(-50%)}._popup_1rdl9_19[data-position=right]:before{top:50%;left:-3px;right:auto;transform:translateY(-50%)rotate(45deg)}._popup_1rdl9_19._animated_1rdl9_92{transition:left var(--tooltip-slide,.4s), top var(--tooltip-slide,.4s), width var(--tooltip-slide,.4s), height var(--tooltip-slide,.4s), opacity var(--tooltip-fade,.2s)}._mask_1rdl9_101{border-radius:inherit;width:100%;height:100%;overflow:hidden}._track_1rdl9_108{width:max-content;height:max-content;transform:translateX(calc(-1 * var(--tooltip-offset,0px)));display:flex}._track_1rdl9_108[data-position=left],._track_1rdl9_108[data-position=right]{transform:translateY(calc(-1 * var(--tooltip-offset,0px)));flex-direction:column}._animated_1rdl9_92 ._track_1rdl9_108{transition:transform var(--tooltip-slide,.4s)}._title_1rdl9_125{min-width:var(--tooltip-item-w,auto);max-width:var(--tooltip-item-w,none);min-height:var(--tooltip-item-h,32px);max-height:var(--tooltip-item-h,none);white-space:nowrap;box-sizing:border-box;flex:none;justify-content:center;align-items:center;padding:0 10px;display:flex}._surfaceTool_1skmt_1{background-color:var(--background);border:var(--surface-border);color:var(--foreground);z-index:9;border-radius:4px;align-items:center;gap:4px;padding:4px;display:flex;position:absolute;bottom:16px;left:50%;transform:translate(-50%);box-shadow:0 2px 8px #0000001a}._content_1skmt_18{display:flex}._drag_1skmt_22{cursor:move;touch-action:none;-webkit-user-select:none;user-select:none;width:16px;height:16px;padding:0 2px}._header_m05h6_1{box-sizing:border-box;background-color:var(--background);border-bottom:1px solid var(--border);grid-area:header;justify-content:space-between;align-items:center;height:48px;padding:0 8px;display:flex}._left_m05h6_12{align-items:center;gap:0;display:flex}._sidebarToggle_m05h6_17{border-right:solid 1px var(--border);width:48px;height:48px;color:var(--foreground);cursor:pointer;justify-content:center;align-items:center;transition:all .2s;display:none;position:relative;left:-8px}._sidebarToggle_m05h6_17._mobile_m05h6_30{display:flex}._sidebarIcon_m05h6_34{stroke-width:1.6px;width:18px;height:18px}._tools_m05h6_39{gap:8px;display:flex}._history_m05h6_43{align-items:center;gap:6px;display:flex}._historyText_m05h6_48{color:var(--muted-foreground);font-size:14px;font-family:var(--font-mono)}._tools_4u8qe_1{flex-direction:column}._row1_4u8qe_5{flex-direction:row;align-items:center;gap:4px;padding:4px;display:flex}._min_4u8qe_13{text-align:left;width:30px;font-size:14px}._slider_4u8qe_19{flex:1}._max_4u8qe_23{text-align:right;width:45px;font-size:14px}._row2_4u8qe_29{flex-direction:row;gap:4px;display:flex}._select_4u8qe_35{width:160px}._option_4u8qe_39{width:120px;height:32px}._option_4u8qe_39 img{object-fit:cover;width:100%;height:100%}._active_4u8qe_50{color:var(--accent-blue);background:var(--muted)}._filterInteract_4u8qe_55{max-width:calc(100% - 32px);max-height:calc(100% - 32px);margin:auto;position:absolute;inset:0}._filterInteract_4u8qe_55>div:first-child{width:100%;max-width:100%;height:100%;max-height:100%}._compare_4u8qe_70{width:0;height:100%;position:absolute;top:0;transform:translate(-50%)}._compare_4u8qe_70:before{content:"";background:var(--accent-blue);width:1px;height:100%;position:absolute;top:0;left:-.5px}._compareThumb_4u8qe_88{background:var(--color-white);border:solid 1px var(--accent-blue);width:32px;height:32px;color:var(--accent-blue);cursor:pointer;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._compareThumb_4u8qe_88 svg{width:20px;height:20px}._preview_t77n1_1{box-sizing:border-box;max-width:calc(100% - 32px);max-height:calc(100% - 32px);margin:auto;transition:all .2s linear,clip-path;position:absolute;inset:0;overflow:hidden}._preview_t77n1_1._faded_t77n1_13{opacity:.5;filter:blur(2px)}._rotate_t77n1_19{box-sizing:border-box;width:100%;height:100%;transition:all .2s linear;position:absolute;top:50%;left:50%;overflow:hidden;transform:translate(-50%,-50%)}._flip_t77n1_31{box-sizing:border-box;transition:all .2s linear;position:absolute;inset:0;overflow:hidden}._image_t77n1_39{max-width:none;max-height:none;transition:all .2s linear,filter;display:block;position:absolute}._label_t77n1_49{background:var(--color-white-fade);box-sizing:border-box;text-transform:uppercase;letter-spacing:1px;width:80px;height:28px;color:var(--color-black);z-index:3;justify-content:center;align-items:center;font-size:12px;font-weight:600;display:flex;position:absolute;top:8px}._before_t77n1_67{left:8px}._after_t77n1_71{right:8px}._sidebar_1lx29_1{background:var(--background-fade);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);border-right:1px solid var(--border);z-index:10;grid-area:sidebar;width:48px;position:relative}._sidebar_1lx29_1._mobile_1lx29_10{transition:transform .2s ease-out;transform:translate(-110%);box-shadow:0 2px 8px #0000001a}._sidebar_1lx29_1._mobile_1lx29_10._open_1lx29_15{transform:translate(0%)}._wrapper_1lx29_20{flex-direction:column;display:flex}._item_1lx29_24{cursor:pointer;height:48px;color:var(--foreground);justify-content:center;align-items:center;transition:all .2s;display:flex;position:relative}._item_1lx29_24 svg{width:16px;height:16px}._item_1lx29_24:hover{background-color:var(--accent)}._item_1lx29_24._selected_1lx29_43{color:var(--accent-blue);background-color:var(--accent)}._item_1lx29_24._selected_1lx29_43:before{content:"";background-color:var(--accent-blue);width:2px;position:absolute;top:0;bottom:0;left:0}._infobar_895qe_1{background:var(--muted);font-family:var(--font-mono);color:var(--foreground);grid-area:infobar;justify-content:space-between;align-items:center;padding:0 16px;font-size:14px;display:flex}._resize_1sbig_1{align-items:center;padding-top:16px}._toolsLock_1sbig_5{width:12px;height:12px;color:var(--muted-foreground)}._indicatorWrapper_1sbig_10{justify-content:center;width:100%;height:2px;display:flex;position:absolute;top:0;left:0}._indicator_1sbig_10{background:var(--accent-blue);opacity:.6;border-radius:2px;width:30%;height:100%;transition:width .2s}._wrapper_1co2u_1{box-sizing:border-box;max-width:calc(100% - 32px);max-height:calc(100% - 32px);margin:auto;position:absolute;inset:0}._box_1co2u_9{cursor:move;box-sizing:border-box;-webkit-user-select:none;user-select:none;touch-action:none;border:1px solid var(--color-white-fade);position:absolute}._toolsInfo_1co2u_18{-webkit-user-select:none;user-select:none;min-width:54px;margin-top:-2px;display:inline-block}._toolsInfoLabel_1co2u_25{color:var(--muted-foreground);font-size:12px;line-height:12px}._toolsInfoValue_1co2u_30{color:var(--foreground);font-size:14px;line-height:14px}._linesBox_1co2u_35{pointer-events:none;position:absolute;inset:1px}._line_1co2u_35{border:1px dashed var(--color-white);opacity:.5;position:absolute}._lineV_1co2u_45{border-top:0;border-bottom:0;width:33%;height:100%;top:0;left:33%}._lineH_1co2u_53{border-left:0;border-right:0;width:100%;height:33%;top:33%;left:0}._pointer_1co2u_61{box-sizing:border-box;width:14px;height:14px;position:absolute}._pointerTopLeft_1co2u_67{border-top:3px solid var(--accent-blue);border-left:3px solid var(--accent-blue);cursor:nwse-resize;top:-6px;left:-6px}._pointerTopRight_1co2u_74{border-top:3px solid var(--accent-blue);border-right:3px solid var(--accent-blue);cursor:nesw-resize;top:-6px;right:-6px}._pointerBottomRight_1co2u_81{border-bottom:3px solid var(--accent-blue);border-right:3px solid var(--accent-blue);cursor:nwse-resize;bottom:-6px;right:-6px}._pointerBottomLeft_1co2u_88{border-bottom:3px solid var(--accent-blue);border-left:3px solid var(--accent-blue);cursor:nesw-resize;bottom:-6px;left:-6px}._mobileBorder_1co2u_95{box-sizing:border-box;border:2px solid var(--accent-blue);position:absolute;inset:0}._mobilePointer_1co2u_101{background-color:var(--overlay-bg-white);border:3px solid var(--accent-blue);box-sizing:border-box;border-radius:50%;width:32px;height:32px;position:absolute;bottom:-16px;right:-16px}._info_1co2u_112{height:16px;font-family:var(--font-mono);color:#000;background-color:var(--color-white-fade);box-sizing:border-box;align-items:center;padding:0 6px;font-size:12px;display:flex;position:absolute}._info_1co2u_112 b{font-weight:600;transform:translateY(1px)}._infoX_1co2u_129{border-left:solid 2px var(--accent-blue);top:-12px;left:16px}._infoY_1co2u_134{transform-origin:100%;border-right:solid 2px var(--accent-blue);top:8px;right:calc(100% + 4px);transform:rotate(-90deg)}._infoW_1co2u_141{border-right:solid 2px var(--accent-blue);bottom:-12px;right:16px}._infoH_1co2u_146{transform-origin:0%;border-left:solid 2px var(--accent-blue);bottom:8px;left:calc(100% + 4px);transform:rotate(-90deg)}._group_1co2u_153{flex-shrink:0;width:max-content;display:flex}._group_1co2u_153 button{color:var(--foreground);border-radius:0}._group_1co2u_153 button._active_1co2u_162{color:var(--accent-blue);background:var(--muted)}._group_1co2u_153 button:not(:first-child){margin-left:-1px}._group_1co2u_153 button:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}._group_1co2u_153 button:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}._select_1ieak_1{width:220px}._btnH_15adi_1{border-top-right-radius:0;border-bottom-right-radius:0;width:36px}._btnV_15adi_7{border-top-left-radius:0;border-bottom-left-radius:0;width:36px;margin-left:-1px}._frame_1p6kh_1{box-sizing:border-box;background:var(--background);grid-area:frame;width:100%;height:100%;margin:0 auto;position:relative;overflow:hidden}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
2
  import { Children as e, createContext as t, forwardRef as n, isValidElement as r, useCallback as i, useContext as a, useEffect as o, useImperativeHandle as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
3
3
  //#region \0rolldown/runtime.js
4
4
  var f = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), p = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
@@ -196,7 +196,7 @@ var f = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
196
196
  var m = Object.keys(n).filter(function(e) {
197
197
  return e !== "key";
198
198
  });
199
- o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", N[p + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, p, m, p), N[p + o] = !0);
199
+ o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", ae[p + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, p, m, p), ae[p + o] = !0);
200
200
  }
201
201
  if (p = null, i !== void 0 && (r(i), p = "" + i), s(n) && (r(n.key), p = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
202
202
  else i = n;
@@ -214,7 +214,7 @@ var f = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
214
214
  h = { react_stack_bottom_frame: function(e) {
215
215
  return e();
216
216
  } };
217
- var te, ne = {}, re = h.react_stack_bottom_frame.bind(h, o)(), ie = M(i(o)), N = {};
217
+ var te, ne = {}, re = h.react_stack_bottom_frame.bind(h, o)(), ie = M(i(o)), ae = {};
218
218
  e.Fragment = v, e.jsx = function(e, t, n) {
219
219
  var r = 1e4 > A.recentlyCreatedOwnerStacks++;
220
220
  return d(e, t, n, !1, r ? Error("react-stack-top-frame") : re, r ? M(i(e)) : ie);
@@ -422,11 +422,11 @@ var A = {
422
422
  ...A,
423
423
  ...e,
424
424
  children: [/* @__PURE__ */ (0, x.jsx)("path", { d: "M21 7v6h-6" }), /* @__PURE__ */ (0, x.jsx)("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" })]
425
- }), N = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
425
+ }), ae = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
426
426
  ...A,
427
427
  ...e,
428
428
  children: [/* @__PURE__ */ (0, x.jsx)("path", { d: "M6 2v14a2 2 0 0 0 2 2h14" }), /* @__PURE__ */ (0, x.jsx)("path", { d: "M18 22V8a2 2 0 0 0-2-2H2" })]
429
- }), ae = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
429
+ }), oe = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
430
430
  ...A,
431
431
  ...e,
432
432
  children: [
@@ -445,7 +445,7 @@ var A = {
445
445
  }),
446
446
  /* @__PURE__ */ (0, x.jsx)("path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" })
447
447
  ]
448
- }), oe = (e) => /* @__PURE__ */ (0, x.jsx)("svg", {
448
+ }), se = (e) => /* @__PURE__ */ (0, x.jsx)("svg", {
449
449
  ...A,
450
450
  ...e,
451
451
  children: /* @__PURE__ */ (0, x.jsx)("rect", {
@@ -455,7 +455,7 @@ var A = {
455
455
  y: "3",
456
456
  rx: "2"
457
457
  })
458
- }), se = (e) => /* @__PURE__ */ (0, x.jsx)("svg", {
458
+ }), ce = (e) => /* @__PURE__ */ (0, x.jsx)("svg", {
459
459
  ...A,
460
460
  ...e,
461
461
  children: /* @__PURE__ */ (0, x.jsx)("rect", {
@@ -465,7 +465,7 @@ var A = {
465
465
  y: "6",
466
466
  rx: "2"
467
467
  })
468
- }), ce = (e) => /* @__PURE__ */ (0, x.jsx)("svg", {
468
+ }), le = (e) => /* @__PURE__ */ (0, x.jsx)("svg", {
469
469
  ...A,
470
470
  ...e,
471
471
  children: /* @__PURE__ */ (0, x.jsx)("rect", {
@@ -475,7 +475,7 @@ var A = {
475
475
  y: "4.5",
476
476
  rx: "2"
477
477
  })
478
- }), le = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
478
+ }), ue = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
479
479
  ...A,
480
480
  ...e,
481
481
  children: [
@@ -491,7 +491,7 @@ var A = {
491
491
  rx: "1"
492
492
  })
493
493
  ]
494
- }), ue = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
494
+ }), de = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
495
495
  ...A,
496
496
  ...e,
497
497
  children: [
@@ -502,7 +502,7 @@ var A = {
502
502
  /* @__PURE__ */ (0, x.jsx)("path", { d: "M12 8v2" }),
503
503
  /* @__PURE__ */ (0, x.jsx)("path", { d: "M12 2v2" })
504
504
  ]
505
- }), de = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
505
+ }), fe = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
506
506
  ...A,
507
507
  ...e,
508
508
  children: [
@@ -513,15 +513,15 @@ var A = {
513
513
  /* @__PURE__ */ (0, x.jsx)("path", { d: "M16 12h-2" }),
514
514
  /* @__PURE__ */ (0, x.jsx)("path", { d: "M22 12h-2" })
515
515
  ]
516
- }), fe = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
516
+ }), pe = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
517
517
  ...A,
518
518
  ...e,
519
519
  children: [/* @__PURE__ */ (0, x.jsx)("path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" }), /* @__PURE__ */ (0, x.jsx)("path", { d: "M21 3v5h-5" })]
520
- }), pe = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
520
+ }), me = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
521
521
  ...A,
522
522
  ...e,
523
523
  children: [/* @__PURE__ */ (0, x.jsx)("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ (0, x.jsx)("path", { d: "M3 3v5h5" })]
524
- }), me = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
524
+ }), he = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
525
525
  ...A,
526
526
  ...e,
527
527
  children: [
@@ -544,7 +544,7 @@ var A = {
544
544
  /* @__PURE__ */ (0, x.jsx)("path", { d: "M14 15h7" }),
545
545
  /* @__PURE__ */ (0, x.jsx)("path", { d: "M14 20h7" })
546
546
  ]
547
- }), he = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
547
+ }), ge = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
548
548
  ...A,
549
549
  ...e,
550
550
  children: [
@@ -558,7 +558,7 @@ var A = {
558
558
  /* @__PURE__ */ (0, x.jsx)("path", { d: "M8 10v4" }),
559
559
  /* @__PURE__ */ (0, x.jsx)("path", { d: "M8 12H3" })
560
560
  ]
561
- }), ge = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
561
+ }), _e = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
562
562
  ...A,
563
563
  ...e,
564
564
  children: [
@@ -572,7 +572,7 @@ var A = {
572
572
  /* @__PURE__ */ (0, x.jsx)("path", { d: "M9 3v18" }),
573
573
  /* @__PURE__ */ (0, x.jsx)("path", { d: "m14 9 3 3-3 3" })
574
574
  ]
575
- }), _e = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
575
+ }), ve = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
576
576
  ...A,
577
577
  ...e,
578
578
  children: [
@@ -586,7 +586,7 @@ var A = {
586
586
  /* @__PURE__ */ (0, x.jsx)("path", { d: "M9 3v18" }),
587
587
  /* @__PURE__ */ (0, x.jsx)("path", { d: "m16 15-3-3 3-3" })
588
588
  ]
589
- }), ve = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
589
+ }), ye = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
590
590
  ...A,
591
591
  ...e,
592
592
  children: [
@@ -600,7 +600,7 @@ var A = {
600
600
  /* @__PURE__ */ (0, x.jsx)("path", { d: "m3 21 9-9" }),
601
601
  /* @__PURE__ */ (0, x.jsx)("path", { d: "M12.2 6.2 11 5" })
602
602
  ]
603
- }), ye = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
603
+ }), be = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
604
604
  ...A,
605
605
  ...e,
606
606
  children: [
@@ -608,7 +608,42 @@ var A = {
608
608
  /* @__PURE__ */ (0, x.jsx)("path", { d: "m16 16 4-4-4-4" }),
609
609
  /* @__PURE__ */ (0, x.jsx)("path", { d: "m8 8-4 4 4 4" })
610
610
  ]
611
- }), be = (e) => /* @__PURE__ */ (0, x.jsx)("svg", {
611
+ }), xe = (e) => /* @__PURE__ */ (0, x.jsxs)("svg", {
612
+ ...A,
613
+ ...e,
614
+ children: [
615
+ /* @__PURE__ */ (0, x.jsx)("circle", {
616
+ cx: "9",
617
+ cy: "12",
618
+ r: "1"
619
+ }),
620
+ /* @__PURE__ */ (0, x.jsx)("circle", {
621
+ cx: "9",
622
+ cy: "5",
623
+ r: "1"
624
+ }),
625
+ /* @__PURE__ */ (0, x.jsx)("circle", {
626
+ cx: "9",
627
+ cy: "19",
628
+ r: "1"
629
+ }),
630
+ /* @__PURE__ */ (0, x.jsx)("circle", {
631
+ cx: "15",
632
+ cy: "12",
633
+ r: "1"
634
+ }),
635
+ /* @__PURE__ */ (0, x.jsx)("circle", {
636
+ cx: "15",
637
+ cy: "5",
638
+ r: "1"
639
+ }),
640
+ /* @__PURE__ */ (0, x.jsx)("circle", {
641
+ cx: "15",
642
+ cy: "19",
643
+ r: "1"
644
+ })
645
+ ]
646
+ }), Se = (e) => /* @__PURE__ */ (0, x.jsx)("svg", {
612
647
  ...A,
613
648
  ...e,
614
649
  children: /* @__PURE__ */ (0, x.jsx)("path", {
@@ -623,31 +658,31 @@ var A = {
623
658
  repeatCount: "indefinite"
624
659
  })
625
660
  })
626
- }), P = () => {
661
+ }), N = () => {
627
662
  let e = a(v);
628
663
  if (!e) throw Error("usePixediContext must be used within an PixediProvider");
629
664
  return e;
630
- }, F = {
665
+ }, P = {
631
666
  button: "_button_1vpzl_1",
632
667
  default: "_default_1vpzl_35",
633
668
  outline: "_outline_1vpzl_44",
634
669
  ghost: "_ghost_1vpzl_54",
635
670
  rect: "_rect_1vpzl_63"
636
- }, I = ({ className: e = "", variant: t = "default", children: n, ref: r, ...i }) => /* @__PURE__ */ (0, x.jsx)("button", {
671
+ }, F = ({ className: e = "", variant: t = "default", children: n, ref: r, ...i }) => /* @__PURE__ */ (0, x.jsx)("button", {
637
672
  ref: r,
638
- className: `${F.button} ${F[t]} ${e}`.trim(),
673
+ className: `${P.button} ${P[t]} ${e}`.trim(),
639
674
  ...i,
640
675
  children: n
641
- }), xe = { separator: "_separator_gp8ff_1" }, Se = n(({ className: e = "", orientation: t = "horizontal", ...n }, r) => /* @__PURE__ */ (0, x.jsx)("hr", {
676
+ }), Ce = { separator: "_separator_gp8ff_1" }, we = n(({ className: e = "", orientation: t = "horizontal", ...n }, r) => /* @__PURE__ */ (0, x.jsx)("hr", {
642
677
  ref: r,
643
678
  role: "separator",
644
679
  "aria-orientation": t,
645
680
  "data-orientation": t,
646
- className: `${xe.separator} ${e}`.trim(),
681
+ className: `${Ce.separator} ${e}`.trim(),
647
682
  ...n
648
683
  }));
649
- Se.displayName = "Separator";
650
- var L = {
684
+ we.displayName = "Separator";
685
+ var I = {
651
686
  wrapper: "_wrapper_1aw0m_1",
652
687
  trigger: "_trigger_1aw0m_6",
653
688
  triggerArrow: "_triggerArrow_1aw0m_31",
@@ -659,7 +694,7 @@ var L = {
659
694
  itemRightContainer: "_itemRightContainer_1aw0m_122",
660
695
  itemRight: "_itemRight_1aw0m_122",
661
696
  itemCheck: "_itemCheck_1aw0m_131"
662
- }, R = {
697
+ }, L = {
663
698
  root: "_root_1qifp_8",
664
699
  textRed: "_textRed_1qifp_78",
665
700
  bgRed: "_bgRed_1qifp_81",
@@ -673,7 +708,7 @@ var L = {
673
708
  grid: "_grid_1qifp_118",
674
709
  mobile: "_mobile_1qifp_130",
675
710
  gridNoInfobar: "_gridNoInfobar_1qifp_134"
676
- }, Ce = (e) => {
711
+ }, Te = (e) => {
677
712
  let t = 0, n = window.innerHeight;
678
713
  for (let r = e.parentElement; r; r = r.parentElement) {
679
714
  let { overflow: e, overflowY: i } = getComputedStyle(r);
@@ -685,7 +720,7 @@ var L = {
685
720
  top: t,
686
721
  bottom: n
687
722
  };
688
- }, we = ({ items: e, value: t, onChange: n }) => {
723
+ }, Ee = ({ items: e, value: t, onChange: n }) => {
689
724
  let [r, i] = d(!1), a = u(null), s = u(null), f = u(null), p = l(() => {
690
725
  let t = (e) => e.reduce((e, n) => n.options ? [...e, ...t(n.options.map((e) => ({
691
726
  ...e,
@@ -702,7 +737,7 @@ var L = {
702
737
  let e = a.current, t = s.current, n = f.current;
703
738
  if (!r || !e || !t || !n) return;
704
739
  n.style.removeProperty("top"), n.style.removeProperty("max-height");
705
- let { top: i, bottom: o } = Ce(e), c = e.getBoundingClientRect().top, l = t.getBoundingClientRect(), u = n.offsetHeight, d = o - 8 - l.bottom - 4, p = l.top - 4 - i - 8, m = l.bottom + 4, h = 0;
740
+ let { top: i, bottom: o } = Te(e), c = e.getBoundingClientRect().top, l = t.getBoundingClientRect(), u = n.offsetHeight, d = o - 8 - l.bottom - 4, p = l.top - 4 - i - 8, m = l.bottom + 4, h = 0;
706
741
  u > d && (u <= p ? m = l.top - 4 - u : p > d ? (h = Math.max(p, 0), m = l.top - 4 - h) : h = Math.max(d, 0)), h && (n.style.maxHeight = `${h}px`), n.style.top = `${m - c}px`;
707
742
  }, [r, e]), {
708
743
  isOpen: r,
@@ -715,114 +750,114 @@ var L = {
715
750
  },
716
751
  toggleOpen: () => i((e) => !e)
717
752
  };
718
- }, Te = ({ items: e, value: t, onChange: n, placeholder: r = "Select an option", className: i = "", renderOption: a }) => {
719
- let { isOpen: o, selectedLabel: s, containerRef: c, triggerRef: l, contentRef: u, handleSelectItem: d, toggleOpen: f } = we({
753
+ }, De = ({ items: e, value: t, onChange: n, placeholder: r = "Select an option", className: i = "", renderOption: a }) => {
754
+ let { isOpen: o, selectedLabel: s, containerRef: c, triggerRef: l, contentRef: u, handleSelectItem: d, toggleOpen: f } = Ee({
720
755
  items: e,
721
756
  value: t,
722
757
  onChange: n
723
758
  });
724
759
  return /* @__PURE__ */ (0, x.jsxs)("div", {
725
760
  ref: c,
726
- className: `${L.wrapper} ${i}`.trim(),
761
+ className: `${I.wrapper} ${i}`.trim(),
727
762
  "data-state": o ? "open" : "closed",
728
763
  children: [/* @__PURE__ */ (0, x.jsxs)("button", {
729
764
  ref: l,
730
765
  type: "button",
731
- className: L.trigger,
766
+ className: I.trigger,
732
767
  onClick: f,
733
- children: [/* @__PURE__ */ (0, x.jsx)("span", { children: s ?? r }), /* @__PURE__ */ (0, x.jsx)(ne, { className: L.triggerArrow })]
768
+ children: [/* @__PURE__ */ (0, x.jsx)("span", { children: s ?? r }), /* @__PURE__ */ (0, x.jsx)(ne, { className: I.triggerArrow })]
734
769
  }), /* @__PURE__ */ (0, x.jsx)("div", {
735
770
  ref: u,
736
- className: L.content,
771
+ className: I.content,
737
772
  children: e.map((e, n) => e.options ? /* @__PURE__ */ (0, x.jsxs)("div", { children: [/* @__PURE__ */ (0, x.jsx)("div", {
738
- className: `${L.groupLabel} ${R.semibold}`,
773
+ className: `${I.groupLabel} ${L.semibold}`,
739
774
  children: e.label
740
775
  }), e.options.map((e) => /* @__PURE__ */ (0, x.jsxs)("div", {
741
- className: L.item,
776
+ className: I.item,
742
777
  onClick: () => d(e.value),
743
778
  children: [a ? a(e) : /* @__PURE__ */ (0, x.jsx)("span", {
744
- className: L.itemLeft,
779
+ className: I.itemLeft,
745
780
  children: e.label
746
781
  }), /* @__PURE__ */ (0, x.jsxs)("div", {
747
- className: L.itemAddon,
782
+ className: I.itemAddon,
748
783
  children: [
749
784
  e.rightLabel && /* @__PURE__ */ (0, x.jsx)("span", { children: e.rightLabel }),
750
- t === e.value && /* @__PURE__ */ (0, x.jsx)(j, { className: L.itemCheck }),
785
+ t === e.value && /* @__PURE__ */ (0, x.jsx)(j, { className: I.itemCheck }),
751
786
  t !== e.value && /* @__PURE__ */ (0, x.jsx)("b", {})
752
787
  ]
753
788
  })]
754
789
  }, e.value))] }, `group-${n}`) : /* @__PURE__ */ (0, x.jsxs)("div", {
755
- className: L.item,
790
+ className: I.item,
756
791
  onClick: () => d(e.value),
757
792
  children: [a ? a(e) : /* @__PURE__ */ (0, x.jsx)("span", {
758
- className: L.itemLeft,
793
+ className: I.itemLeft,
759
794
  children: e.label
760
795
  }), /* @__PURE__ */ (0, x.jsxs)("div", {
761
- className: L.itemAddon,
796
+ className: I.itemAddon,
762
797
  children: [
763
798
  e.rightLabel && /* @__PURE__ */ (0, x.jsx)("span", { children: e.rightLabel }),
764
- t === e.value && /* @__PURE__ */ (0, x.jsx)(j, { className: L.itemCheck }),
799
+ t === e.value && /* @__PURE__ */ (0, x.jsx)(j, { className: I.itemCheck }),
765
800
  t !== e.value && /* @__PURE__ */ (0, x.jsx)("b", {})
766
801
  ]
767
802
  })]
768
803
  }, e.value))
769
804
  })]
770
805
  });
771
- }, Ee = {
806
+ }, Oe = {
772
807
  input: "_input_kyavx_1",
773
808
  numberClean: "_numberClean_kyavx_39"
774
- }, De = ({ className: e = "", type: t = "text", hideArrows: n = !0, ref: r, ...i }) => {
775
- let a = t === "number" && n ? Ee.numberClean : "";
809
+ }, ke = ({ className: e = "", type: t = "text", hideArrows: n = !0, ref: r, ...i }) => {
810
+ let a = t === "number" && n ? Oe.numberClean : "";
776
811
  return /* @__PURE__ */ (0, x.jsx)("input", {
777
812
  ref: r,
778
813
  type: t,
779
- className: `${Ee.input} ${a} ${e}`.trim(),
814
+ className: `${Oe.input} ${a} ${e}`.trim(),
780
815
  ...i
781
816
  });
782
- }, Oe = {
817
+ }, Ae = {
783
818
  container: "_container_14vsv_1",
784
819
  legend: "_legend_14vsv_4",
785
820
  suffix: "_suffix_14vsv_13"
786
- }, ke = ({ label: e, className: t = "", style: n, ref: r, ...i }) => /* @__PURE__ */ (0, x.jsxs)("div", {
787
- className: `${Oe.container} ${t}`.trim(),
821
+ }, je = ({ label: e, className: t = "", style: n, ref: r, ...i }) => /* @__PURE__ */ (0, x.jsxs)("div", {
822
+ className: `${Ae.container} ${t}`.trim(),
788
823
  style: n,
789
824
  children: [
790
825
  /* @__PURE__ */ (0, x.jsx)("span", {
791
- className: Oe.legend,
826
+ className: Ae.legend,
792
827
  children: e
793
828
  }),
794
- /* @__PURE__ */ (0, x.jsx)(De, {
829
+ /* @__PURE__ */ (0, x.jsx)(ke, {
795
830
  ref: r,
796
831
  type: "number",
797
832
  ...i
798
833
  }),
799
834
  /* @__PURE__ */ (0, x.jsx)("span", {
800
- className: Oe.suffix,
835
+ className: Ae.suffix,
801
836
  children: "px"
802
837
  })
803
838
  ]
804
- }), Ae = {
839
+ }), Me = {
805
840
  group: "_group_1e7jm_1",
806
841
  save: "_save_1e7jm_6",
807
842
  close: "_close_1e7jm_13"
808
- }, z = ({ onSave: e, onClose: t, saving: n = !1, disabled: r = !1 }) => /* @__PURE__ */ (0, x.jsxs)("div", {
809
- className: Ae.group,
810
- children: [/* @__PURE__ */ (0, x.jsx)(I, {
843
+ }, R = ({ onSave: e, onClose: t, saving: n = !1, disabled: r = !1 }) => /* @__PURE__ */ (0, x.jsxs)("div", {
844
+ className: Me.group,
845
+ children: [/* @__PURE__ */ (0, x.jsx)(F, {
811
846
  variant: "outline",
812
- className: Ae.save,
847
+ className: Me.save,
813
848
  "aria-label": "Save",
814
849
  disabled: r || n,
815
850
  onClick: e,
816
- children: n ? /* @__PURE__ */ (0, x.jsx)(be, {}) : /* @__PURE__ */ (0, x.jsx)(j, {})
817
- }), /* @__PURE__ */ (0, x.jsx)(I, {
851
+ children: n ? /* @__PURE__ */ (0, x.jsx)(Se, {}) : /* @__PURE__ */ (0, x.jsx)(j, {})
852
+ }), /* @__PURE__ */ (0, x.jsx)(F, {
818
853
  variant: "outline",
819
- className: Ae.close,
854
+ className: Me.close,
820
855
  "aria-label": "Close",
821
856
  disabled: n,
822
857
  onClick: t,
823
858
  children: /* @__PURE__ */ (0, x.jsx)(ee, {})
824
859
  })]
825
- }), B = {
860
+ }), z = {
826
861
  sliderContainer: "_sliderContainer_1unyb_1",
827
862
  disabled: "_disabled_1unyb_11",
828
863
  sliderThumb: "_sliderThumb_1unyb_17",
@@ -830,10 +865,10 @@ var L = {
830
865
  sliderRange: "_sliderRange_1unyb_34",
831
866
  sliderTooltip: "_sliderTooltip_1unyb_58",
832
867
  hiddenInput: "_hiddenInput_1unyb_86"
833
- }, je = (e, t, n) => {
868
+ }, Ne = (e, t, n) => {
834
869
  let r = n - t;
835
870
  return r <= 0 ? 0 : (e - t) / r * 100;
836
- }, Me = /* @__PURE__ */ new Set([
871
+ }, Pe = /* @__PURE__ */ new Set([
837
872
  "ArrowDown",
838
873
  "ArrowLeft",
839
874
  "ArrowRight",
@@ -842,12 +877,12 @@ var L = {
842
877
  "Home",
843
878
  "PageDown",
844
879
  "PageUp"
845
- ]), Ne = ({ min: e, max: t, value: n, step: r = 1, disabled: i = !1, isTooltip: a = !1, unit: o = "", className: l, onChange: f, onInput: p, ref: m }) => {
880
+ ]), Fe = ({ min: e, max: t, value: n, step: r = 1, disabled: i = !1, isTooltip: a = !1, unit: o = "", className: l, onChange: f, onInput: p, ref: m }) => {
846
881
  let h = u(null), g = u(null), _ = n ?? e, [v, y] = d(_);
847
882
  s(m, () => ({ getValue: () => v }), [v]);
848
883
  let b = (n) => {
849
884
  y(n);
850
- let r = je(n, e, t);
885
+ let r = Ne(n, e, t);
851
886
  h.current?.style.setProperty("--slider-progress", `${r}%`);
852
887
  }, S = () => {
853
888
  !i && g.current && f?.(Number(g.current.value));
@@ -857,7 +892,7 @@ var L = {
857
892
  n !== void 0 && (g.current.value = String(n));
858
893
  let r = Number(g.current.value);
859
894
  y(r);
860
- let i = je(r, e, t);
895
+ let i = Ne(r, e, t);
861
896
  h.current?.style.setProperty("--slider-progress", `${i}%`);
862
897
  }, [
863
898
  n,
@@ -865,15 +900,15 @@ var L = {
865
900
  t
866
901
  ]), /* @__PURE__ */ (0, x.jsxs)("div", {
867
902
  ref: h,
868
- className: `${B.sliderContainer} ${i ? B.disabled : ""} ${l || ""}`,
869
- style: { "--slider-progress": `${je(_, e, t)}%` },
903
+ className: `${z.sliderContainer} ${i ? z.disabled : ""} ${l || ""}`,
904
+ style: { "--slider-progress": `${Ne(_, e, t)}%` },
870
905
  children: [/* @__PURE__ */ (0, x.jsxs)("div", {
871
- className: B.sliderTrack,
906
+ className: z.sliderTrack,
872
907
  children: [
873
- /* @__PURE__ */ (0, x.jsx)("div", { className: B.sliderRange }),
874
- /* @__PURE__ */ (0, x.jsx)("div", { className: B.sliderThumb }),
908
+ /* @__PURE__ */ (0, x.jsx)("div", { className: z.sliderRange }),
909
+ /* @__PURE__ */ (0, x.jsx)("div", { className: z.sliderThumb }),
875
910
  a && /* @__PURE__ */ (0, x.jsx)("div", {
876
- className: B.sliderTooltip,
911
+ className: z.sliderTooltip,
877
912
  children: `${v}${o}`
878
913
  })
879
914
  ]
@@ -893,12 +928,12 @@ var L = {
893
928
  S();
894
929
  },
895
930
  onKeyUp: (e) => {
896
- Me.has(e.key) && S();
931
+ Pe.has(e.key) && S();
897
932
  },
898
- className: B.hiddenInput
933
+ className: z.hiddenInput
899
934
  })]
900
935
  });
901
- }, V = {
936
+ }, B = {
902
937
  tooltip: "_tooltip_1rdl9_1",
903
938
  container: "_container_1rdl9_5",
904
939
  popup: "_popup_1rdl9_19",
@@ -906,7 +941,7 @@ var L = {
906
941
  mask: "_mask_1rdl9_101",
907
942
  track: "_track_1rdl9_108",
908
943
  title: "_title_1rdl9_125"
909
- }, Pe = (t, n = "top") => {
944
+ }, Ie = (t, n = "top") => {
910
945
  let [i, a] = d(null), [s, f] = d(null), [p, m] = d(!1), [h, g] = d(!1), [_, v] = d([]), y = u(null), b = u(null), x = u([]), S = n === "left" || n === "right", C = l(() => {
911
946
  let n = [];
912
947
  return e.forEach(t, (e) => {
@@ -978,48 +1013,152 @@ var L = {
978
1013
  handleMouseMove: E,
979
1014
  handleMouseLeave: D
980
1015
  };
981
- }, H = ({ children: e, position: t = "top", className: n = "", classNameTitle: r = "", style: i }) => {
982
- let { containerRef: a, trackRef: o, titleRefs: s, titles: c, isAnimated: l, cssVars: u, handleMouseMove: d, handleMouseLeave: f } = Pe(e, t);
1016
+ }, V = ({ children: e, position: t = "top", className: n = "", classNameTitle: r = "", style: i }) => {
1017
+ let { containerRef: a, trackRef: o, titleRefs: s, titles: c, isAnimated: l, cssVars: u, handleMouseMove: d, handleMouseLeave: f } = Ie(e, t);
983
1018
  return /* @__PURE__ */ (0, x.jsxs)("div", {
984
1019
  ref: a,
985
1020
  onMouseMove: d,
986
1021
  onMouseLeave: f,
987
1022
  onBlur: f,
988
- className: V.tooltip,
1023
+ className: B.tooltip,
989
1024
  style: {
990
1025
  ...u,
991
1026
  ...i
992
1027
  },
993
1028
  children: [/* @__PURE__ */ (0, x.jsx)("div", {
994
1029
  "data-position": t,
995
- className: `${V.container} ${n}`,
1030
+ className: `${B.container} ${n}`,
996
1031
  children: e
997
1032
  }), /* @__PURE__ */ (0, x.jsx)("div", {
998
1033
  "aria-hidden": "true",
999
1034
  "data-position": t,
1000
- className: `${V.popup} ${l ? V.animated : ""}`,
1035
+ className: `${B.popup} ${l ? B.animated : ""}`,
1001
1036
  children: /* @__PURE__ */ (0, x.jsx)("div", {
1002
- className: V.mask,
1037
+ className: B.mask,
1003
1038
  children: /* @__PURE__ */ (0, x.jsx)("div", {
1004
1039
  ref: o,
1005
1040
  "data-position": t,
1006
- className: V.track,
1041
+ className: B.track,
1007
1042
  children: c.map((e, t) => /* @__PURE__ */ (0, x.jsx)("div", {
1008
1043
  ref: (e) => {
1009
1044
  s.current[t] = e;
1010
1045
  },
1011
- className: `${V.title} ${r}`,
1046
+ className: `${B.title} ${r}`,
1012
1047
  children: e
1013
1048
  }, t))
1014
1049
  })
1015
1050
  })
1016
1051
  })]
1017
1052
  });
1018
- }, Fe = { surfaceTool: "_surfaceTool_e739m_1" }, U = ({ children: e, className: t = "", ref: n }) => /* @__PURE__ */ (0, x.jsx)("div", {
1019
- ref: n,
1020
- className: `${Fe.surfaceTool} ${t}`,
1053
+ }, Le = t(void 0), Re = () => {
1054
+ let e = a(Le), t = u({
1055
+ dx: 0,
1056
+ dy: 0
1057
+ });
1058
+ return e ?? t;
1059
+ };
1060
+ //#endregion
1061
+ //#region src/shared/components/Pixedi/ui/surface-tool/useSurfaceTool.tsx
1062
+ function H(e, t, n) {
1063
+ return Math.min(Math.max(e, t), n);
1064
+ }
1065
+ function ze(e, { dx: t, dy: n }) {
1066
+ e.style.transform = `translate(calc(-50% + ${t}px), ${n}px)`;
1067
+ }
1068
+ function Be(e, t) {
1069
+ let n = e.parentElement;
1070
+ if (!n) return null;
1071
+ let r = e.getBoundingClientRect(), i = n.getBoundingClientRect(), a = r.left - i.left - t.dx, o = r.top - i.top - t.dy;
1072
+ return {
1073
+ minDx: -a,
1074
+ maxDx: Math.max(-a, i.width - r.width - a),
1075
+ minDy: -o,
1076
+ maxDy: Math.max(-o, i.height - r.height - o)
1077
+ };
1078
+ }
1079
+ var Ve = ({ surfaceRef: e }) => {
1080
+ let t = O(), n = Re(), r = u(null), i = u({
1081
+ dx: 0,
1082
+ dy: 0
1083
+ }), a = u(null);
1084
+ return o(() => {
1085
+ let o = e.current;
1086
+ if (!o) return;
1087
+ let s = (e) => {
1088
+ n.current = e, ze(o, e);
1089
+ }, c = () => {
1090
+ let e = Be(o, n.current);
1091
+ if (!e) return;
1092
+ let { dx: t, dy: r } = n.current;
1093
+ s({
1094
+ dx: H(t, e.minDx, e.maxDx),
1095
+ dy: H(r, e.minDy, e.maxDy)
1096
+ });
1097
+ }, l = (e) => {
1098
+ let t = r.current, n = a.current;
1099
+ if (!t || !n) return;
1100
+ e.preventDefault();
1101
+ let o = "clientX" in e ? e.clientX : e.touches[0].clientX, c = "clientY" in e ? e.clientY : e.touches[0].clientY;
1102
+ s({
1103
+ dx: H(i.current.dx + (o - t.x), n.minDx, n.maxDx),
1104
+ dy: H(i.current.dy + (c - t.y), n.minDy, n.maxDy)
1105
+ });
1106
+ }, u = () => {
1107
+ r.current && (r.current = null, a.current = null, t || (document.body.style.cursor = ""));
1108
+ };
1109
+ c();
1110
+ let d = new AbortController(), { signal: f } = d;
1111
+ if (document.addEventListener("mousemove", l, { signal: f }), document.addEventListener("touchmove", l, {
1112
+ signal: f,
1113
+ passive: !1
1114
+ }), document.addEventListener("mouseup", u, { signal: f }), document.addEventListener("touchend", u, { signal: f }), typeof ResizeObserver < "u" && o.parentElement) {
1115
+ let e = new ResizeObserver(c);
1116
+ e.observe(o.parentElement), f.addEventListener("abort", () => e.disconnect());
1117
+ }
1118
+ return () => d.abort();
1119
+ }, [
1120
+ e,
1121
+ n,
1122
+ t
1123
+ ]), { handleDragStart: (o) => {
1124
+ let s = e.current;
1125
+ if (!s) return;
1126
+ o.stopPropagation();
1127
+ let c = Be(s, n.current);
1128
+ if (!c) return;
1129
+ let l = "clientX" in o ? o.clientX : o.touches[0].clientX, u = "clientY" in o ? o.clientY : o.touches[0].clientY;
1130
+ r.current = {
1131
+ x: l,
1132
+ y: u
1133
+ }, i.current = { ...n.current }, a.current = c, t || (document.body.style.cursor = "move");
1134
+ } };
1135
+ }, He = {
1136
+ surfaceTool: "_surfaceTool_1skmt_1",
1137
+ content: "_content_1skmt_18",
1138
+ drag: "_drag_1skmt_22"
1139
+ }, U = ({ children: e, className: t = "", ref: n }) => {
1140
+ let r = u(null), { handleDragStart: i } = Ve({ surfaceRef: r });
1141
+ return /* @__PURE__ */ (0, x.jsxs)("div", {
1142
+ ref: (e) => {
1143
+ r.current = e, n && (n.current = e);
1144
+ },
1145
+ className: He.surfaceTool,
1146
+ children: [/* @__PURE__ */ (0, x.jsx)(xe, {
1147
+ className: He.drag,
1148
+ onMouseDown: i,
1149
+ onTouchStart: i
1150
+ }), /* @__PURE__ */ (0, x.jsx)("div", {
1151
+ className: `${He.content} ${t}`,
1152
+ children: e
1153
+ })]
1154
+ });
1155
+ }, Ue = ({ children: e }) => /* @__PURE__ */ (0, x.jsx)(Le, {
1156
+ value: u({
1157
+ dx: 0,
1158
+ dy: 0
1159
+ }),
1021
1160
  children: e
1022
- }), Ie = 1920, Le = .85, Re = [
1161
+ }), We = 1920, Ge = .85, Ke = [
1023
1162
  {
1024
1163
  label: "Facebook",
1025
1164
  value: "facebook",
@@ -1122,7 +1261,7 @@ var L = {
1122
1261
  }
1123
1262
  ]
1124
1263
  }
1125
- ], ze = [
1264
+ ], qe = [
1126
1265
  {
1127
1266
  value: "saturate",
1128
1267
  label: "Saturate",
@@ -1193,7 +1332,7 @@ var L = {
1193
1332
  sliderValue: 100,
1194
1333
  rightLabel: "100%"
1195
1334
  }
1196
- ], Be = [
1335
+ ], Je = [
1197
1336
  {
1198
1337
  value: "vintage",
1199
1338
  label: "Vintage"
@@ -1234,7 +1373,7 @@ var L = {
1234
1373
  value: "x-ray",
1235
1374
  label: "X-Ray"
1236
1375
  }
1237
- ], W = 32, Ve = (e, t, n, r, i, a, o, s, c, l) => {
1376
+ ], W = 32, Ye = (e, t, n, r, i, a, o, s, c, l) => {
1238
1377
  let { x: u, y: d, w: f, h: p } = c;
1239
1378
  if (e) {
1240
1379
  let e = o - c.w - c.x;
@@ -1257,7 +1396,7 @@ var L = {
1257
1396
  w: f,
1258
1397
  h: p
1259
1398
  };
1260
- }, He = (e, t, n, r, i, a, o, s, c, l) => {
1399
+ }, Xe = (e, t, n, r, i, a, o, s, c, l) => {
1261
1400
  let { x: u } = c, { y: d, w: f, h: p } = c;
1262
1401
  if (e) {
1263
1402
  f += i - n, f + u > o && (f = o - u), f < W && (f = W);
@@ -1279,7 +1418,7 @@ var L = {
1279
1418
  w: f,
1280
1419
  h: p
1281
1420
  };
1282
- }, Ue = (e, t, n, r, i, a, o, s, c, l) => {
1421
+ }, Ze = (e, t, n, r, i, a, o, s, c, l) => {
1283
1422
  let { y: u } = c, { x: d, w: f, h: p } = c;
1284
1423
  if (e) {
1285
1424
  p += a - r, p + u > s && (p = s - u), p < W && (p = W);
@@ -1301,7 +1440,7 @@ var L = {
1301
1440
  w: f,
1302
1441
  h: p
1303
1442
  };
1304
- }, We = (e, t, n, r, i, a, o, s, c, l) => {
1443
+ }, Qe = (e, t, n, r, i, a, o, s, c, l) => {
1305
1444
  let { x: u, y: d } = c, { w: f, h: p } = c;
1306
1445
  if (e) f += i - n, f + u > o && (f = o - u), f < W && (f = W), p += a - r, p + d > s && (p = s - d), p < W && (p = W);
1307
1446
  else {
@@ -1320,7 +1459,7 @@ var L = {
1320
1459
  w: f,
1321
1460
  h: p
1322
1461
  };
1323
- }, Ge = (e, t, n, r, i, a, o, s, c) => {
1462
+ }, $e = (e, t, n, r, i, a, o, s, c) => {
1324
1463
  let l = e === "tl" || e === "bl", u = e === "tl" || e === "tr", d = c.x + c.w, f = c.y + c.h, p = i - n, m = a - r, h = t >= 1 ? c.w + (l ? -p : p) : (c.h + (u ? -m : m)) * t, g = l ? d : o - c.x, _ = u ? f : s - c.y, v = Math.min(g, _ * t), y = Math.max(W, W * t), b = Math.min(Math.max(h, y), v), x = b / t;
1325
1464
  return {
1326
1465
  x: l ? d - b : c.x,
@@ -1328,12 +1467,12 @@ var L = {
1328
1467
  w: b,
1329
1468
  h: x
1330
1469
  };
1331
- }, Ke = (e, t, n, r, i, a, o, s, c, l, u) => t ? e === "tl" ? Ve(t, n, r, i, a, o, s, c, l, u) : e === "tr" ? He(t, n, r, i, a, o, s, c, l, u) : e === "bl" ? Ue(t, n, r, i, a, o, s, c, l, u) : e === "br" ? We(t, n, r, i, a, o, s, c, l, u) : {
1470
+ }, et = (e, t, n, r, i, a, o, s, c, l, u) => t ? e === "tl" ? Ye(t, n, r, i, a, o, s, c, l, u) : e === "tr" ? Xe(t, n, r, i, a, o, s, c, l, u) : e === "bl" ? Ze(t, n, r, i, a, o, s, c, l, u) : e === "br" ? Qe(t, n, r, i, a, o, s, c, l, u) : {
1332
1471
  x: 0,
1333
1472
  y: 0,
1334
1473
  w: 0,
1335
1474
  h: 0
1336
- } : Ge(e, n, r, i, a, o, s, c, l), G = (e, t, n) => {
1475
+ } : $e(e, n, r, i, a, o, s, c, l), G = (e, t, n) => {
1337
1476
  let r = .12, i = t / n, a = 0, o = 0;
1338
1477
  e === 1 && (a = (i > 1 ? n : t) * (1 - r * 2), o = a), e > 1 && (i > e ? (o = n * (1 - r * 2), a = o * e) : (a = t * (1 - r * 2), o = a / e)), e < 1 && (i > e ? (o = n * (1 - r * 2), a = o * e) : (a = t * (1 - r * 2), o = a / e));
1339
1478
  let s = a / t * 100, c = o / n * 100, l = (t - a) / 2 / t * 100, u = (n - o) / 2 / n * 100;
@@ -1347,7 +1486,7 @@ var L = {
1347
1486
  wP: Math.round(s / 100 * t),
1348
1487
  hP: Math.round(c / 100 * n)
1349
1488
  };
1350
- }, qe = (e, t, n, r) => {
1489
+ }, tt = (e, t, n, r) => {
1351
1490
  let i = e.w / 100 * n, a = e.h / 100 * r;
1352
1491
  t >= 1 ? a = i / t : i = a * t;
1353
1492
  let o = i / n * 100, s = a / r * 100, c = Math.max(o / (100 - e.x), s / (100 - e.y), 1);
@@ -1356,21 +1495,21 @@ var L = {
1356
1495
  w: o,
1357
1496
  h: s
1358
1497
  };
1359
- }, K = (e) => Math.abs(Math.round(e / 90)) % 2 == 1, Je = (e, t, n, r) => K(n) === K(r) ? {
1498
+ }, K = (e) => Math.abs(Math.round(e / 90)) % 2 == 1, nt = (e, t, n, r) => K(n) === K(r) ? {
1360
1499
  width: e,
1361
1500
  height: t
1362
1501
  } : {
1363
1502
  width: t,
1364
1503
  height: e
1365
- }, Ye = async (e) => {
1366
- let { width: t, height: n } = e, r = Math.min(1, Ie / Math.max(t, n)), i = Math.round(t * r), a = Math.round(n * r), o = new OffscreenCanvas(i, a), s = o.getContext("2d");
1504
+ }, rt = async (e) => {
1505
+ let { width: t, height: n } = e, r = Math.min(1, We / Math.max(t, n)), i = Math.round(t * r), a = Math.round(n * r), o = new OffscreenCanvas(i, a), s = o.getContext("2d");
1367
1506
  if (!s) throw Error("Failed to get 2D context for preview canvas");
1368
1507
  return s.drawImage(e, 0, 0, i, a), o.convertToBlob({
1369
1508
  type: "image/webp",
1370
- quality: Le
1509
+ quality: Ge
1371
1510
  });
1372
1511
  };
1373
- function Xe(e) {
1512
+ function it(e) {
1374
1513
  let t = new OffscreenCanvas(e.width, e.height), n = t.getContext("2d");
1375
1514
  if (!n) throw Error("Failed to create 2D context for canvas.");
1376
1515
  n.drawImage(e, 0, 0);
@@ -1384,14 +1523,14 @@ function Xe(e) {
1384
1523
  }
1385
1524
  //#endregion
1386
1525
  //#region src/shared/components/Pixedi/utils/imageProcessor.ts
1387
- var Ze = (e) => new Promise((t, n) => {
1526
+ var at = (e) => new Promise((t, n) => {
1388
1527
  let r = new FileReader();
1389
1528
  r.onloadend = () => {
1390
1529
  let e = r.result;
1391
1530
  typeof e == "string" ? t(e) : n(/* @__PURE__ */ Error("Failed to read blob as base64"));
1392
1531
  }, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("FileReader error")), r.readAsDataURL(e);
1393
1532
  });
1394
- async function Qe(e) {
1533
+ async function ot(e) {
1395
1534
  let t = await createImageBitmap(e), n = e.type || "image/png", r = n === "image/gif" ? "image/png" : n, i = document.createElement("canvas"), a = i.getContext("2d", { alpha: !0 });
1396
1535
  i.width = t.width, i.height = t.height, a?.drawImage(t, 0, 0), t.close();
1397
1536
  let o = () => {
@@ -1431,7 +1570,7 @@ async function Qe(e) {
1431
1570
  }, a, t) : i.toBlob((t) => {
1432
1571
  t ? e(t) : o(/* @__PURE__ */ Error("Failed to encode image as image/png"));
1433
1572
  }, "image/png");
1434
- }), s = await createImageBitmap(o), c = await Ye(s), { width: l, height: u } = s, d = Xe(s);
1573
+ }), s = await createImageBitmap(o), c = await rt(s), { width: l, height: u } = s, d = it(s);
1435
1574
  return s.close(), {
1436
1575
  newBlob: o,
1437
1576
  previewBlob: c,
@@ -1445,17 +1584,17 @@ async function Qe(e) {
1445
1584
  }
1446
1585
  //#endregion
1447
1586
  //#region src/shared/components/Pixedi/utils/preview.ts
1448
- var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0][0] + e[0][1] * t[1][0], e[0][0] * t[0][1] + e[0][1] * t[1][1]], [e[1][0] * t[0][0] + e[1][1] * t[1][0], e[1][0] * t[0][1] + e[1][1] * t[1][1]]], et = (e) => (Math.round(e / 90) % 4 + 4) % 4 * 90, tt = (e) => {
1449
- switch (et(e)) {
1587
+ var q = (e, t, n) => Math.max(t, Math.min(n, e)), st = (e, t) => [[e[0][0] * t[0][0] + e[0][1] * t[1][0], e[0][0] * t[0][1] + e[0][1] * t[1][1]], [e[1][0] * t[0][0] + e[1][1] * t[1][0], e[1][0] * t[0][1] + e[1][1] * t[1][1]]], ct = (e) => (Math.round(e / 90) % 4 + 4) % 4 * 90, lt = (e) => {
1588
+ switch (ct(e)) {
1450
1589
  case 90: return [[0, -1], [1, 0]];
1451
1590
  case 180: return [[-1, 0], [0, -1]];
1452
1591
  case 270: return [[0, 1], [-1, 0]];
1453
1592
  default: return [[1, 0], [0, 1]];
1454
1593
  }
1455
- }, nt = (e, t) => [[e ? -1 : 1, 0], [0, t ? -1 : 1]], rt = (e, t, n) => $e(nt(t, n), tt(-e)), it = (e) => [+(e[0][0] < 0 || e[0][1] < 0), +(e[1][0] < 0 || e[1][1] < 0)], at = (e, t, n) => {
1456
- let r = it(e);
1594
+ }, ut = (e, t) => [[e ? -1 : 1, 0], [0, t ? -1 : 1]], dt = (e, t, n) => st(ut(t, n), lt(-e)), ft = (e) => [+(e[0][0] < 0 || e[0][1] < 0), +(e[1][0] < 0 || e[1][1] < 0)], pt = (e, t, n) => {
1595
+ let r = ft(e);
1457
1596
  return [e[0][0] * t + e[0][1] * n + r[0], e[1][0] * t + e[1][1] * n + r[1]];
1458
- }, ot = (e) => {
1597
+ }, mt = (e) => {
1459
1598
  let t = 1, n = 1, r = {
1460
1599
  x: 0,
1461
1600
  y: 0,
@@ -1471,11 +1610,11 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1471
1610
  h: 1
1472
1611
  }, i = 0, a = !1, o = !1;
1473
1612
  else if (c.action.name === h.CROP) {
1474
- let e = (c.action.args.x ?? 0) / 100, t = (c.action.args.y ?? 0) / 100, n = (c.action.args.w ?? 100) / 100, s = (c.action.args.h ?? 100) / 100, l = rt(i, a, o), u = [
1475
- at(l, e, t),
1476
- at(l, e + n, t),
1477
- at(l, e, t + s),
1478
- at(l, e + n, t + s)
1613
+ let e = (c.action.args.x ?? 0) / 100, t = (c.action.args.y ?? 0) / 100, n = (c.action.args.w ?? 100) / 100, s = (c.action.args.h ?? 100) / 100, l = dt(i, a, o), u = [
1614
+ pt(l, e, t),
1615
+ pt(l, e + n, t),
1616
+ pt(l, e, t + s),
1617
+ pt(l, e + n, t + s)
1479
1618
  ], d = Math.min(...u.map((e) => e[0])), f = Math.max(...u.map((e) => e[0])), p = Math.min(...u.map((e) => e[1])), m = Math.max(...u.map((e) => e[1]));
1480
1619
  r = {
1481
1620
  x: r.x + d * r.w,
@@ -1504,13 +1643,13 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1504
1643
  flipV: o,
1505
1644
  filters: g
1506
1645
  };
1507
- }, st = (e) => {
1508
- let { box: t, flipH: n, flipV: r, rotation: i, newWidth: a, newHeight: o, initWidth: s, initHeight: c, viewWidth: l, viewHeight: u } = ot(e), d = e.filter((e) => e.action.name === h.FILTERS).at(-1)?.action.args, f = q(t.x, 0, 1), p = q(t.y, 0, 1), m = {
1646
+ }, ht = (e) => {
1647
+ let { box: t, flipH: n, flipV: r, rotation: i, newWidth: a, newHeight: o, initWidth: s, initHeight: c, viewWidth: l, viewHeight: u } = mt(e), d = e.filter((e) => e.action.name === h.FILTERS).at(-1)?.action.args, f = q(t.x, 0, 1), p = q(t.y, 0, 1), m = {
1509
1648
  x: f,
1510
1649
  y: p,
1511
1650
  w: q(t.w, 0, 1 - f),
1512
1651
  h: q(t.h, 0, 1 - p)
1513
- }, g = et(i);
1652
+ }, g = ct(i);
1514
1653
  return {
1515
1654
  ...m.x === 0 && m.y === 0 && m.w === 1 && m.h === 1 ? {} : { crop: {
1516
1655
  x: Math.round(s * t.x),
@@ -1529,18 +1668,18 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1529
1668
  } } : {},
1530
1669
  ...d ? { filters: d } : {}
1531
1670
  };
1532
- }, ct = (e) => {
1533
- let [t, n] = d(!1), { setImage: r, settings: i, history: a, originalBlob: o, setCurrentAction: s, resetHistory: c } = P();
1671
+ }, gt = (e) => {
1672
+ let [t, n] = d(!1), { setImage: r, settings: i, history: a, originalBlob: o, setCurrentAction: s, resetHistory: c } = N();
1534
1673
  return {
1535
1674
  save: async () => {
1536
1675
  if (!o) return;
1537
1676
  n(!0);
1538
- let t = st(a.items.slice(0, a.pointer + 1));
1677
+ let t = ht(a.items.slice(0, a.pointer + 1));
1539
1678
  try {
1540
- let n = await Qe(o);
1679
+ let n = await ot(o);
1541
1680
  t.crop && n.crop(t.crop.x, t.crop.y, t.crop.w, t.crop.h), t.flip && n.flip(t.flip.horizontal, t.flip.vertical), t.rotate && n.rotate(t.rotate.degrees), t.resize && n.resize(t.resize.width, t.resize.height), t.filters && n.filters(t.filters);
1542
1681
  let { newBlob: a, previewBlob: s, mimeType: c, width: l, height: u, isAlpha: d } = await n.get(i), f = "";
1543
- i.exportAs === "base64" && (f = await Ze(a)), await e(f || a), r({
1682
+ i.exportAs === "base64" && (f = await at(a)), await e(f || a), r({
1544
1683
  newBlob: a,
1545
1684
  previewBlob: s,
1546
1685
  mimeType: c,
@@ -1568,8 +1707,8 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1568
1707
  tools: "_tools_m05h6_39",
1569
1708
  history: "_history_m05h6_43",
1570
1709
  historyText: "_historyText_m05h6_48"
1571
- }, lt = ({ onBack: e, onSave: t, isMobile: n }) => {
1572
- let { save: r, reset: i, isSaving: a } = ct(t), { sidebar: o, history: s, undo: c, redo: l, setSidebar: u, setCurrentAction: d } = P(), f = s.items.length > 1 && !a, p = s.pointer === 0, m = s.pointer === s.items.length - 1, h = s.items.length < 2 || a, g = h || s.pointer === 0;
1710
+ }, _t = ({ onBack: e, onSave: t, isMobile: n }) => {
1711
+ let { save: r, reset: i, isSaving: a } = gt(t), { sidebar: o, history: s, undo: c, redo: l, setSidebar: u, setCurrentAction: d } = N(), f = s.items.length > 1 && !a, p = s.pointer === 0, m = s.pointer === s.items.length - 1, h = s.items.length < 2 || a, g = h || s.pointer === 0;
1573
1712
  return /* @__PURE__ */ (0, x.jsxs)("div", {
1574
1713
  className: J.header,
1575
1714
  children: [/* @__PURE__ */ (0, x.jsxs)("div", {
@@ -1579,10 +1718,10 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1579
1718
  onClick: () => {
1580
1719
  u(!o);
1581
1720
  },
1582
- children: o ? /* @__PURE__ */ (0, x.jsx)(_e, { className: J.sidebarIcon }) : /* @__PURE__ */ (0, x.jsx)(ge, { className: J.sidebarIcon })
1583
- }), /* @__PURE__ */ (0, x.jsx)(I, {
1721
+ children: o ? /* @__PURE__ */ (0, x.jsx)(ve, { className: J.sidebarIcon }) : /* @__PURE__ */ (0, x.jsx)(_e, { className: J.sidebarIcon })
1722
+ }), /* @__PURE__ */ (0, x.jsx)(F, {
1584
1723
  variant: "ghost",
1585
- className: F.rect,
1724
+ className: P.rect,
1586
1725
  onClick: e,
1587
1726
  children: /* @__PURE__ */ (0, x.jsx)(te, {})
1588
1727
  })]
@@ -1592,10 +1731,10 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1592
1731
  f && /* @__PURE__ */ (0, x.jsxs)("div", {
1593
1732
  className: J.history,
1594
1733
  children: [
1595
- /* @__PURE__ */ (0, x.jsx)(I, {
1734
+ /* @__PURE__ */ (0, x.jsx)(F, {
1596
1735
  variant: "outline",
1597
1736
  disabled: p,
1598
- className: F.rect,
1737
+ className: P.rect,
1599
1738
  onClick: () => {
1600
1739
  c(), d(null);
1601
1740
  },
@@ -1609,10 +1748,10 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1609
1748
  s.items.length
1610
1749
  ]
1611
1750
  }),
1612
- /* @__PURE__ */ (0, x.jsx)(I, {
1751
+ /* @__PURE__ */ (0, x.jsx)(F, {
1613
1752
  variant: "outline",
1614
1753
  disabled: m,
1615
- className: F.rect,
1754
+ className: P.rect,
1616
1755
  onClick: () => {
1617
1756
  l(), d(null);
1618
1757
  },
@@ -1620,50 +1759,50 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1620
1759
  })
1621
1760
  ]
1622
1761
  }),
1623
- /* @__PURE__ */ (0, x.jsx)(I, {
1762
+ /* @__PURE__ */ (0, x.jsx)(F, {
1624
1763
  variant: "outline",
1625
1764
  disabled: h,
1626
1765
  onClick: i,
1627
1766
  children: "Reset"
1628
1767
  }),
1629
- /* @__PURE__ */ (0, x.jsxs)(I, {
1768
+ /* @__PURE__ */ (0, x.jsxs)(F, {
1630
1769
  disabled: g,
1631
1770
  onClick: r,
1632
- children: [a ? /* @__PURE__ */ (0, x.jsx)(be, {}) : /* @__PURE__ */ (0, x.jsx)(j, {}), "Save"]
1771
+ children: [a ? /* @__PURE__ */ (0, x.jsx)(Se, {}) : /* @__PURE__ */ (0, x.jsx)(j, {}), "Save"]
1633
1772
  })
1634
1773
  ]
1635
1774
  })]
1636
1775
  });
1637
- }, ut = (e, t) => {
1776
+ }, vt = (e, t) => {
1638
1777
  let n = new CustomEvent("crop-update", { detail: t });
1639
1778
  e.dispatchEvent(n);
1640
- }, dt = (e, t) => {
1779
+ }, yt = (e, t) => {
1641
1780
  let n = new CustomEvent("clip-path-update", { detail: t });
1642
1781
  e.dispatchEvent(n);
1643
- }, ft = (e, t) => {
1782
+ }, bt = (e, t) => {
1644
1783
  let n = new CustomEvent("resize-update", { detail: t });
1645
1784
  e.dispatchEvent(n);
1646
- }, pt = (e, t) => {
1785
+ }, xt = (e, t) => {
1647
1786
  let n = new CustomEvent("filter-update", { detail: t });
1648
1787
  e.dispatchEvent(n);
1649
- }, mt = (e, t) => {
1788
+ }, St = (e, t) => {
1650
1789
  let n = new CustomEvent("compare-update", { detail: t });
1651
1790
  e.dispatchEvent(n);
1652
- }, ht = () => {
1653
- let { showCompare: e, previewUrl: t, getLastFilter: n, getLastHistoryItem: r, setCurrentAction: i, setSidebar: a, toggleCompare: s, addToHistory: c, eventBus: u } = P(), { width: f, height: p } = r(), { action: m } = n() || {}, g = m?.args || {}, _ = g?.url, v = ze.map((e) => ({
1791
+ }, Ct = () => {
1792
+ let { showCompare: e, previewUrl: t, getLastFilter: n, getLastHistoryItem: r, setCurrentAction: i, setSidebar: a, toggleCompare: s, addToHistory: c, eventBus: u } = N(), { width: f, height: p } = r(), { action: m } = n() || {}, g = m?.args || {}, _ = g?.url, v = qe.map((e) => ({
1654
1793
  ...e,
1655
1794
  sliderValue: g[e.value] ?? e.sliderValue,
1656
1795
  rightLabel: `${g[e.value] ?? e.sliderValue}${e.unit}`
1657
1796
  })), y = v.find((e) => e.value === "saturate")?.sliderValue, [b, x] = d("saturate"), [S, C] = d(_ ?? "vintage"), [w, T] = d(v), [E, D] = d(y ?? 0), [O, k] = d(!!_), A = l(() => Object.fromEntries(w.map((e) => [e.value, e.sliderValue])), [w]), j = () => {
1658
- s(), mt(u, 50);
1797
+ s(), St(u, 50);
1659
1798
  }, ee = (e) => {
1660
- pt(u, {
1799
+ xt(u, {
1661
1800
  ...A,
1662
1801
  [b]: e
1663
1802
  });
1664
1803
  }, M = w.find((e) => e.value === b);
1665
1804
  return o(() => {
1666
- O ? pt(u, { url: S }) : pt(u, {
1805
+ O ? xt(u, { url: S }) : xt(u, {
1667
1806
  ...A,
1668
1807
  [b]: E
1669
1808
  });
@@ -1697,7 +1836,7 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1697
1836
  x(e), D(w.find((t) => t.value === e)?.sliderValue || 0);
1698
1837
  },
1699
1838
  handleChangeWhenUrl: (e) => {
1700
- C(e), pt(u, { url: e });
1839
+ C(e), xt(u, { url: e });
1701
1840
  },
1702
1841
  handleSave: () => {
1703
1842
  c({
@@ -1714,20 +1853,20 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1714
1853
  }
1715
1854
  };
1716
1855
  }, Y = {
1717
- tools: "_tools_5caap_1",
1718
- row1: "_row1_5caap_5",
1719
- min: "_min_5caap_13",
1720
- slider: "_slider_5caap_19",
1721
- max: "_max_5caap_23",
1722
- row2: "_row2_5caap_29",
1723
- select: "_select_5caap_35",
1724
- option: "_option_5caap_39",
1725
- active: "_active_5caap_50",
1726
- filterInteract: "_filterInteract_5caap_55",
1727
- compare: "_compare_5caap_70",
1728
- compareThumb: "_compareThumb_5caap_88"
1729
- }, gt = () => {
1730
- let { showCompare: e, previewUrl: t, isUrl: n, toggleIsUrl: r, filters: i, selectedFilter: a, selectedFilterItem: o, selectedUrl: s, sliderValue: c, handleToggleCompare: l, handleSliderInput: u, handleSliderChange: d, handleChange: f, handleChangeWhenUrl: p, handleSave: m, handleClose: h } = ht();
1856
+ tools: "_tools_4u8qe_1",
1857
+ row1: "_row1_4u8qe_5",
1858
+ min: "_min_4u8qe_13",
1859
+ slider: "_slider_4u8qe_19",
1860
+ max: "_max_4u8qe_23",
1861
+ row2: "_row2_4u8qe_29",
1862
+ select: "_select_4u8qe_35",
1863
+ option: "_option_4u8qe_39",
1864
+ active: "_active_4u8qe_50",
1865
+ filterInteract: "_filterInteract_4u8qe_55",
1866
+ compare: "_compare_4u8qe_70",
1867
+ compareThumb: "_compareThumb_4u8qe_88"
1868
+ }, wt = () => {
1869
+ let { showCompare: e, previewUrl: t, isUrl: n, toggleIsUrl: r, filters: i, selectedFilter: a, selectedFilterItem: o, selectedUrl: s, sliderValue: c, handleToggleCompare: l, handleSliderInput: u, handleSliderChange: d, handleChange: f, handleChangeWhenUrl: p, handleSave: m, handleClose: h } = Ct();
1731
1870
  return /* @__PURE__ */ (0, x.jsxs)(U, {
1732
1871
  className: Y.tools,
1733
1872
  children: [!n && o && /* @__PURE__ */ (0, x.jsxs)("div", {
@@ -1737,7 +1876,7 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1737
1876
  className: Y.min,
1738
1877
  children: [o.min, o.unit]
1739
1878
  }),
1740
- /* @__PURE__ */ (0, x.jsx)(Ne, {
1879
+ /* @__PURE__ */ (0, x.jsx)(Fe, {
1741
1880
  className: Y.slider,
1742
1881
  min: o.min,
1743
1882
  max: o.max,
@@ -1756,29 +1895,29 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1756
1895
  }), /* @__PURE__ */ (0, x.jsxs)("div", {
1757
1896
  className: Y.row2,
1758
1897
  children: [
1759
- /* @__PURE__ */ (0, x.jsx)(H, {
1898
+ /* @__PURE__ */ (0, x.jsx)(V, {
1760
1899
  position: "top",
1761
- children: /* @__PURE__ */ (0, x.jsx)(I, {
1900
+ children: /* @__PURE__ */ (0, x.jsx)(F, {
1762
1901
  variant: "outline",
1763
1902
  "aria-label": "Compare",
1764
1903
  "data-tooltip": "Compare",
1765
1904
  onClick: l,
1766
1905
  className: e ? Y.active : "",
1767
- children: /* @__PURE__ */ (0, x.jsx)(ye, {})
1906
+ children: /* @__PURE__ */ (0, x.jsx)(be, {})
1768
1907
  })
1769
1908
  }),
1770
- /* @__PURE__ */ (0, x.jsx)(H, {
1909
+ /* @__PURE__ */ (0, x.jsx)(V, {
1771
1910
  position: "top",
1772
- children: /* @__PURE__ */ (0, x.jsx)(I, {
1911
+ children: /* @__PURE__ */ (0, x.jsx)(F, {
1773
1912
  variant: "outline",
1774
1913
  "aria-label": n ? "Filters" : "Predefined Filters",
1775
1914
  "data-tooltip": n ? "Filters" : "Predefined Filters",
1776
1915
  onClick: r,
1777
- children: n ? /* @__PURE__ */ (0, x.jsx)(he, {}) : /* @__PURE__ */ (0, x.jsx)(ve, {})
1916
+ children: n ? /* @__PURE__ */ (0, x.jsx)(ge, {}) : /* @__PURE__ */ (0, x.jsx)(ye, {})
1778
1917
  })
1779
1918
  }),
1780
- /* @__PURE__ */ (0, x.jsx)(Te, {
1781
- items: n ? Be : i,
1919
+ /* @__PURE__ */ (0, x.jsx)(De, {
1920
+ items: n ? Je : i,
1782
1921
  value: n ? s : a,
1783
1922
  placeholder: "Select filter",
1784
1923
  className: Y.select,
@@ -1792,15 +1931,15 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1792
1931
  }) : void 0,
1793
1932
  onChange: n ? p : f
1794
1933
  }),
1795
- /* @__PURE__ */ (0, x.jsx)(z, {
1934
+ /* @__PURE__ */ (0, x.jsx)(R, {
1796
1935
  onSave: m,
1797
1936
  onClose: h
1798
1937
  })
1799
1938
  ]
1800
1939
  })]
1801
1940
  });
1802
- }, _t = ({ isClipped: e, isFilter: t }) => {
1803
- let { history: n, previewUrl: r, currentAction: i, getLastRotation: a, eventBus: s } = P(), l = u(null), d = u(null), f = u(i?.name), p = u(r);
1941
+ }, Tt = ({ isClipped: e, isFilter: t }) => {
1942
+ let { history: n, previewUrl: r, currentAction: i, getLastRotation: a, eventBus: s } = N(), l = u(null), d = u(null), f = u(i?.name), p = u(r);
1804
1943
  c(() => {
1805
1944
  let e = f.current, t = i?.name, n = p.current !== r;
1806
1945
  if (f.current = t, p.current = r, !(e && t && e !== t) && !n) return;
@@ -1823,14 +1962,14 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1823
1962
  if (i) {
1824
1963
  let { width: e, height: t } = n.items.at(n.pointer);
1825
1964
  m.push({
1826
- ...i.name === h.ROTATE ? Je(e, t, a(), i.args.degrees) : {
1965
+ ...i.name === h.ROTATE ? nt(e, t, a(), i.args.degrees) : {
1827
1966
  width: e,
1828
1967
  height: t
1829
1968
  },
1830
1969
  action: i
1831
1970
  });
1832
1971
  }
1833
- let g = ot(m);
1972
+ let g = mt(m);
1834
1973
  return o(() => {
1835
1974
  e && l.current && (l.current.style.transition = "none"), i?.name !== h.RESIZE && l.current && (l.current.style.transform = "scale(1)");
1836
1975
  let n = (e) => {
@@ -1874,8 +2013,8 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1874
2013
  label: "_label_t77n1_49",
1875
2014
  before: "_before_t77n1_67",
1876
2015
  after: "_after_t77n1_71"
1877
- }, vt = ({ isClipped: e, isFilter: t, faded: n, style: r = {} }) => {
1878
- let { showCompare: i } = P(), { previewRef: a, imageRef: o, previewUrl: s, box: c, boxWidth: l, boxHeight: u, viewWidth: d, viewHeight: f, rotation: p, flipH: m, flipV: h, filters: g } = _t({
2016
+ }, Et = ({ isClipped: e, isFilter: t, faded: n, style: r = {} }) => {
2017
+ let { showCompare: i } = N(), { previewRef: a, imageRef: o, previewUrl: s, box: c, boxWidth: l, boxHeight: u, viewWidth: d, viewHeight: f, rotation: p, flipH: m, flipV: h, filters: g } = Tt({
1879
2018
  isClipped: e,
1880
2019
  isFilter: t
1881
2020
  });
@@ -1922,10 +2061,10 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1922
2061
  })
1923
2062
  ]
1924
2063
  });
1925
- }, yt = ({ compareRef: e }) => {
1926
- let { eventBus: t } = P(), n = O(), r = u(null), i = u(null);
2064
+ }, Dt = ({ compareRef: e }) => {
2065
+ let { eventBus: t } = N(), n = O(), r = u(null), i = u(null);
1927
2066
  return o(() => {
1928
- i.current = 0, mt(t, 0);
2067
+ i.current = 0, St(t, 0);
1929
2068
  }, [t]), o(() => {
1930
2069
  let n = (n) => {
1931
2070
  if (!e.current || !r.current) return;
@@ -1933,7 +2072,7 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1933
2072
  let a = e.current.parentElement;
1934
2073
  if (!a) return;
1935
2074
  let o = "clientX" in n ? n.clientX : n.touches[0].clientX, { width: s, left: c } = a.getBoundingClientRect(), l = Math.min(Math.max(o - c, 0), s) / s * 100;
1936
- i.current = l, e.current.style.left = `${l}%`, mt(t, l);
2075
+ i.current = l, e.current.style.left = `${l}%`, St(t, l);
1937
2076
  }, a = () => {
1938
2077
  e.current && (r.current = null, document.body.style.cursor = "auto");
1939
2078
  }, o = new AbortController(), { signal: s } = o;
@@ -1947,12 +2086,12 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1947
2086
  let a = "clientX" in t ? t.clientX : t.touches[0].clientX;
1948
2087
  r.current = a, n || (document.body.style.cursor = "pointer");
1949
2088
  } };
1950
- }, bt = () => {
1951
- let { showCompare: e, getLastHistoryItem: t } = P(), { width: n, height: r } = t(), i = u(null), { handleDragStart: a } = yt({ compareRef: i });
2089
+ }, Ot = () => {
2090
+ let { showCompare: e, getLastHistoryItem: t } = N(), { width: n, height: r } = t(), i = u(null), { handleDragStart: a } = Dt({ compareRef: i });
1952
2091
  return /* @__PURE__ */ (0, x.jsxs)("div", {
1953
2092
  className: Y.filterInteract,
1954
2093
  style: { aspectRatio: `${n} / ${r}` },
1955
- children: [/* @__PURE__ */ (0, x.jsx)(vt, { isFilter: !0 }), e && /* @__PURE__ */ (0, x.jsx)(x.Fragment, { children: /* @__PURE__ */ (0, x.jsx)("div", {
2094
+ children: [/* @__PURE__ */ (0, x.jsx)(Et, { isFilter: !0 }), e && /* @__PURE__ */ (0, x.jsx)(x.Fragment, { children: /* @__PURE__ */ (0, x.jsx)("div", {
1956
2095
  ref: i,
1957
2096
  className: Y.compare,
1958
2097
  style: { left: "50%" },
@@ -1960,11 +2099,11 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1960
2099
  className: Y.compareThumb,
1961
2100
  onMouseDown: a,
1962
2101
  onTouchStart: a,
1963
- children: /* @__PURE__ */ (0, x.jsx)(ye, {})
2102
+ children: /* @__PURE__ */ (0, x.jsx)(be, {})
1964
2103
  })
1965
2104
  }) })]
1966
2105
  });
1967
- }, xt = () => ({
2106
+ }, kt = () => ({
1968
2107
  saturate: 100,
1969
2108
  grayscale: 0,
1970
2109
  sepia: 0,
@@ -1972,33 +2111,33 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
1972
2111
  hueRotate: 0,
1973
2112
  brightness: 100,
1974
2113
  contrast: 100
1975
- }), St = {
2114
+ }), At = {
1976
2115
  [h.RESIZE]: {
1977
- icon: /* @__PURE__ */ (0, x.jsx)(le, {}),
2116
+ icon: /* @__PURE__ */ (0, x.jsx)(ue, {}),
1978
2117
  label: "Resize"
1979
2118
  },
1980
2119
  [h.CROP]: {
1981
- icon: /* @__PURE__ */ (0, x.jsx)(N, {}),
2120
+ icon: /* @__PURE__ */ (0, x.jsx)(ae, {}),
1982
2121
  label: "Crop"
1983
2122
  },
1984
2123
  [h.PRESET_CROP]: {
1985
- icon: /* @__PURE__ */ (0, x.jsx)(me, {}),
2124
+ icon: /* @__PURE__ */ (0, x.jsx)(he, {}),
1986
2125
  label: "Presets"
1987
2126
  },
1988
2127
  [h.FLIP]: {
1989
- icon: /* @__PURE__ */ (0, x.jsx)(ue, {}),
2128
+ icon: /* @__PURE__ */ (0, x.jsx)(de, {}),
1990
2129
  label: "Flip"
1991
2130
  },
1992
2131
  [h.ROTATE]: {
1993
- icon: /* @__PURE__ */ (0, x.jsx)(fe, {}),
2132
+ icon: /* @__PURE__ */ (0, x.jsx)(pe, {}),
1994
2133
  label: "Rotate"
1995
2134
  },
1996
2135
  [h.FILTERS]: {
1997
- icon: /* @__PURE__ */ (0, x.jsx)(he, {}),
2136
+ icon: /* @__PURE__ */ (0, x.jsx)(ge, {}),
1998
2137
  label: "Filters"
1999
2138
  }
2000
- }, Ct = (e) => St[e] ?? null, wt = () => {
2001
- let { settings: e, currentAction: t, showCompare: n, toggleCompare: r, getLastRotation: i, getLastHistoryItem: a, setCurrentAction: o, setSidebar: s } = P(), c = e?.tools || [], l = t?.name, { width: u, height: d } = a();
2139
+ }, jt = (e) => At[e] ?? null, Mt = () => {
2140
+ let { settings: e, currentAction: t, showCompare: n, toggleCompare: r, getLastRotation: i, getLastHistoryItem: a, setCurrentAction: o, setSidebar: s } = N(), c = e?.tools || [], l = t?.name, { width: u, height: d } = a();
2002
2141
  return { click: (e) => {
2003
2142
  if (c.includes(e) && l === e) {
2004
2143
  o(null);
@@ -2056,7 +2195,7 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2056
2195
  case h.FILTERS:
2057
2196
  o({
2058
2197
  name: h.FILTERS,
2059
- args: xt()
2198
+ args: kt()
2060
2199
  });
2061
2200
  break;
2062
2201
  }
@@ -2069,15 +2208,15 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2069
2208
  wrapper: "_wrapper_1lx29_20",
2070
2209
  item: "_item_1lx29_24",
2071
2210
  selected: "_selected_1lx29_43"
2072
- }, Tt = ({ isMobile: e }) => {
2073
- let { settings: t, sidebar: n, currentAction: r } = P(), i = t?.tools || [], a = r?.name, { click: o } = wt();
2211
+ }, Nt = ({ isMobile: e }) => {
2212
+ let { settings: t, sidebar: n, currentAction: r } = N(), i = t?.tools || [], a = r?.name, { click: o } = Mt();
2074
2213
  return /* @__PURE__ */ (0, x.jsx)("nav", {
2075
2214
  className: `${Z.sidebar} ${e ? Z.mobile : ""} ${e && n ? Z.open : ""}`,
2076
- children: /* @__PURE__ */ (0, x.jsx)(H, {
2215
+ children: /* @__PURE__ */ (0, x.jsx)(V, {
2077
2216
  position: "right",
2078
2217
  className: Z.tooltip,
2079
2218
  children: i.map((e) => {
2080
- let t = Ct(e);
2219
+ let t = jt(e);
2081
2220
  if (!t) return null;
2082
2221
  let { icon: n, label: r } = t;
2083
2222
  return /* @__PURE__ */ (0, x.jsx)("div", {
@@ -2090,15 +2229,15 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2090
2229
  })
2091
2230
  })
2092
2231
  });
2093
- }, Et = { infobar: "_infobar_895qe_1" }, Dt = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`, Ot = () => {
2094
- let { originalBlob: e, getLastHistoryItem: t } = P(), { width: n, height: r } = t();
2232
+ }, Pt = { infobar: "_infobar_895qe_1" }, Ft = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`, It = () => {
2233
+ let { originalBlob: e, getLastHistoryItem: t } = N(), { width: n, height: r } = t();
2095
2234
  return /* @__PURE__ */ (0, x.jsxs)("div", {
2096
- className: Et.infobar,
2235
+ className: Pt.infobar,
2097
2236
  children: [/* @__PURE__ */ (0, x.jsx)("div", {
2098
- className: Et.filesize,
2099
- children: e ? Dt(e.size) : "0 B"
2237
+ className: Pt.filesize,
2238
+ children: e ? Ft(e.size) : "0 B"
2100
2239
  }), /* @__PURE__ */ (0, x.jsxs)("div", {
2101
- className: Et.sizes,
2240
+ className: Pt.sizes,
2102
2241
  children: [
2103
2242
  n,
2104
2243
  " / ",
@@ -2106,17 +2245,17 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2106
2245
  ]
2107
2246
  })]
2108
2247
  });
2109
- }, kt = 15, At = 200, jt = 2, Mt = (e, t, n) => {
2110
- let r = Math.min(At, Math.max(kt, e));
2248
+ }, Lt = 15, Rt = 200, zt = 2, Bt = (e, t, n) => {
2249
+ let r = Math.min(Rt, Math.max(Lt, e));
2111
2250
  return {
2112
2251
  scale: r,
2113
2252
  width: Math.round(r / 100 * t),
2114
2253
  height: Math.round(r / 100 * n)
2115
2254
  };
2116
- }, Nt = () => {
2117
- let { getLastHistoryItem: e, setCurrentAction: t, addToHistory: n, setSidebar: r, eventBus: a } = P(), { width: s, height: c } = e(), [l, f] = d(s), [p, m] = d(c), [g, _] = d(100), v = u(g), y = u(0), b = u(null), x = i((e) => {
2118
- let t = Mt(e, s, c);
2119
- f(t.width), m(t.height), _(t.scale), v.current = t.scale, ft(a, t.scale);
2255
+ }, Vt = () => {
2256
+ let { getLastHistoryItem: e, setCurrentAction: t, addToHistory: n, setSidebar: r, eventBus: a } = N(), { width: s, height: c } = e(), [l, f] = d(s), [p, m] = d(c), [g, _] = d(100), v = u(g), y = u(0), b = u(null), x = i((e) => {
2257
+ let t = Bt(e, s, c);
2258
+ f(t.width), m(t.height), _(t.scale), v.current = t.scale, bt(a, t.scale);
2120
2259
  }, [
2121
2260
  c,
2122
2261
  s,
@@ -2131,16 +2270,16 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2131
2270
  };
2132
2271
  return o(() => {
2133
2272
  let e = (e) => {
2134
- let t = b.current?.parentElement;
2135
- return e.target instanceof Node && !!t?.contains(e.target);
2273
+ let t = b.current?.parentElement, n = e.composedPath?.()[0] ?? e.target;
2274
+ return n instanceof Node && !!t?.contains(n);
2136
2275
  }, t = (t) => {
2137
- e(t) && x(v.current - Math.sign(t.deltaY) * jt);
2276
+ e(t) && x(v.current - Math.sign(t.deltaY) * zt);
2138
2277
  }, n = (t) => {
2139
2278
  e(t) && (y.current = t.touches[0].clientY);
2140
2279
  }, r = (t) => {
2141
2280
  if (!e(t)) return;
2142
2281
  let n = t.touches[0].clientY, r = y.current - n;
2143
- Math.abs(r) < 10 || (x(v.current + Math.sign(r) * jt), y.current = n);
2282
+ Math.abs(r) < 10 || (x(v.current + Math.sign(r) * zt), y.current = n);
2144
2283
  }, i = new AbortController(), { signal: a } = i;
2145
2284
  return window.addEventListener("wheel", t, { signal: a }), window.addEventListener("touchstart", n, { signal: a }), window.addEventListener("touchmove", r, { signal: a }), () => i.abort();
2146
2285
  }, [x]), {
@@ -2169,10 +2308,10 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2169
2308
  height: p
2170
2309
  }
2171
2310
  }
2172
- }), ft(a, 100), r(!0);
2311
+ }), bt(a, 100), r(!0);
2173
2312
  },
2174
2313
  close: () => {
2175
- ft(a, 100), t(null), r(!0);
2314
+ bt(a, 100), t(null), r(!0);
2176
2315
  }
2177
2316
  };
2178
2317
  }, Q = {
@@ -2180,8 +2319,8 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2180
2319
  toolsLock: "_toolsLock_1sbig_5",
2181
2320
  indicatorWrapper: "_indicatorWrapper_1sbig_10",
2182
2321
  indicator: "_indicator_1sbig_10"
2183
- }, Pt = () => {
2184
- let { resizeRef: e, width: t, height: n, scale: r, currentWidth: i, currentHeight: a, setWidth: o, setHeight: s, handleWidthBlur: c, handleHeightBlur: l, save: u, close: d } = Nt();
2322
+ }, Ht = () => {
2323
+ let { resizeRef: e, width: t, height: n, scale: r, currentWidth: i, currentHeight: a, setWidth: o, setHeight: s, handleWidthBlur: c, handleHeightBlur: l, save: u, close: d } = Vt();
2185
2324
  return /* @__PURE__ */ (0, x.jsxs)(U, {
2186
2325
  ref: e,
2187
2326
  className: Q.resize,
@@ -2193,7 +2332,7 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2193
2332
  style: { width: `${r / 2}%` }
2194
2333
  })
2195
2334
  }),
2196
- /* @__PURE__ */ (0, x.jsx)(ke, {
2335
+ /* @__PURE__ */ (0, x.jsx)(je, {
2197
2336
  value: t,
2198
2337
  name: "width",
2199
2338
  label: "Width",
@@ -2202,7 +2341,7 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2202
2341
  onBlur: c
2203
2342
  }),
2204
2343
  /* @__PURE__ */ (0, x.jsx)(M, { className: Q.toolsLock }),
2205
- /* @__PURE__ */ (0, x.jsx)(ke, {
2344
+ /* @__PURE__ */ (0, x.jsx)(je, {
2206
2345
  value: n,
2207
2346
  name: "height",
2208
2347
  label: "Height",
@@ -2210,7 +2349,7 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2210
2349
  onChange: (e) => s(Number(e.target.value)),
2211
2350
  onBlur: l
2212
2351
  }),
2213
- /* @__PURE__ */ (0, x.jsx)(z, {
2352
+ /* @__PURE__ */ (0, x.jsx)(R, {
2214
2353
  onSave: u,
2215
2354
  onClose: d,
2216
2355
  disabled: t === i && n === a
@@ -2241,9 +2380,9 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2241
2380
  infoH: "_infoH_1co2u_146",
2242
2381
  group: "_group_1co2u_153",
2243
2382
  active: "_active_1co2u_162"
2244
- }, Ft = () => {
2245
- let { getLastHistoryItem: e } = P(), t = O(), n = u(null), { handleCropStart: r, initialCrop: i } = qt({ boxRef: n }), { width: a, height: o } = e(), { x: s, y: c, w: l, h: d } = i;
2246
- return /* @__PURE__ */ (0, x.jsxs)(x.Fragment, { children: [/* @__PURE__ */ (0, x.jsx)(vt, {
2383
+ }, Ut = () => {
2384
+ let { getLastHistoryItem: e } = N(), t = O(), n = u(null), { handleCropStart: r, initialCrop: i } = tn({ boxRef: n }), { width: a, height: o } = e(), { x: s, y: c, w: l, h: d } = i;
2385
+ return /* @__PURE__ */ (0, x.jsxs)(x.Fragment, { children: [/* @__PURE__ */ (0, x.jsx)(Et, {
2247
2386
  isClipped: !0,
2248
2387
  style: { clipPath: `xywh(${s}% ${c}% ${l}% ${d}%)` }
2249
2388
  }), /* @__PURE__ */ (0, x.jsx)("div", {
@@ -2258,40 +2397,40 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2258
2397
  top: `${c}%`,
2259
2398
  left: `${s}%`
2260
2399
  },
2261
- children: [/* @__PURE__ */ (0, x.jsx)(Bt, {}), t ? /* @__PURE__ */ (0, x.jsx)(Jt, { onMouseDown: r }) : /* @__PURE__ */ (0, x.jsxs)(x.Fragment, { children: [/* @__PURE__ */ (0, x.jsx)(Vt, { onMouseDown: r }), /* @__PURE__ */ (0, x.jsx)(Yt, {})] })]
2400
+ children: [/* @__PURE__ */ (0, x.jsx)(Jt, {}), t ? /* @__PURE__ */ (0, x.jsx)(nn, { onMouseDown: r }) : /* @__PURE__ */ (0, x.jsxs)(x.Fragment, { children: [/* @__PURE__ */ (0, x.jsx)(Yt, { onMouseDown: r }), /* @__PURE__ */ (0, x.jsx)(rn, {})] })]
2262
2401
  })
2263
2402
  })] });
2264
- }, It = [
2403
+ }, Wt = [
2265
2404
  {
2266
2405
  id: "freeform",
2267
- icon: /* @__PURE__ */ (0, x.jsx)(N, {}),
2406
+ icon: /* @__PURE__ */ (0, x.jsx)(ae, {}),
2268
2407
  label: "Freeform"
2269
2408
  },
2270
2409
  {
2271
2410
  id: "origin",
2272
- icon: /* @__PURE__ */ (0, x.jsx)(ae, {}),
2411
+ icon: /* @__PURE__ */ (0, x.jsx)(oe, {}),
2273
2412
  label: "Original"
2274
2413
  },
2275
2414
  {
2276
2415
  id: "1:1",
2277
- icon: /* @__PURE__ */ (0, x.jsx)(oe, {}),
2416
+ icon: /* @__PURE__ */ (0, x.jsx)(se, {}),
2278
2417
  label: "1 : 1"
2279
2418
  },
2280
2419
  {
2281
2420
  id: "4:3",
2282
- icon: /* @__PURE__ */ (0, x.jsx)(ce, {}),
2421
+ icon: /* @__PURE__ */ (0, x.jsx)(le, {}),
2283
2422
  label: "4 : 3"
2284
2423
  },
2285
2424
  {
2286
2425
  id: "16:9",
2287
- icon: /* @__PURE__ */ (0, x.jsx)(se, {}),
2426
+ icon: /* @__PURE__ */ (0, x.jsx)(ce, {}),
2288
2427
  label: "16 : 9"
2289
2428
  }
2290
- ], Lt = ({ value: e, onChange: t }) => /* @__PURE__ */ (0, x.jsx)("div", {
2429
+ ], Gt = ({ value: e, onChange: t }) => /* @__PURE__ */ (0, x.jsx)("div", {
2291
2430
  className: $.group,
2292
- children: /* @__PURE__ */ (0, x.jsx)(H, {
2431
+ children: /* @__PURE__ */ (0, x.jsx)(V, {
2293
2432
  position: "top",
2294
- children: It.map((n) => /* @__PURE__ */ (0, x.jsx)(I, {
2433
+ children: Wt.map((n) => /* @__PURE__ */ (0, x.jsx)(F, {
2295
2434
  variant: "outline",
2296
2435
  className: `${$.groupBtn} ${e === n.id ? $.active : ""}`,
2297
2436
  onClick: () => t(n.id),
@@ -2300,8 +2439,8 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2300
2439
  children: n.icon
2301
2440
  }, n.id))
2302
2441
  })
2303
- }), Rt = () => {
2304
- let { setCurrentAction: e, currentAction: t, getLastHistoryItem: n, addToHistory: r, setSidebar: i, eventBus: a } = P(), { width: s, height: c } = n(), { name: l, args: d } = t || {}, f = l === h.CROP ? d?.id : "", p = s / c, m = u({
2442
+ }), Kt = () => {
2443
+ let { setCurrentAction: e, currentAction: t, getLastHistoryItem: n, addToHistory: r, setSidebar: i, eventBus: a } = N(), { width: s, height: c } = n(), { name: l, args: d } = t || {}, f = l === h.CROP ? d?.id : "", p = s / c, m = u({
2305
2444
  x: 0,
2306
2445
  y: 0,
2307
2446
  w: 0,
@@ -2353,19 +2492,19 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2353
2492
  e(null), i(!0);
2354
2493
  }
2355
2494
  };
2356
- }, zt = () => {
2357
- let { currentValue: e, handleChange: t, handleSave: n, handleClose: r } = Rt();
2358
- return /* @__PURE__ */ (0, x.jsxs)(U, { children: [/* @__PURE__ */ (0, x.jsx)(Lt, {
2495
+ }, qt = () => {
2496
+ let { currentValue: e, handleChange: t, handleSave: n, handleClose: r } = Kt();
2497
+ return /* @__PURE__ */ (0, x.jsxs)(U, { children: [/* @__PURE__ */ (0, x.jsx)(Gt, {
2359
2498
  value: e,
2360
2499
  onChange: t
2361
- }), /* @__PURE__ */ (0, x.jsx)(z, {
2500
+ }), /* @__PURE__ */ (0, x.jsx)(R, {
2362
2501
  onSave: n,
2363
2502
  onClose: r
2364
2503
  })] });
2365
- }, Bt = () => /* @__PURE__ */ (0, x.jsxs)("div", {
2504
+ }, Jt = () => /* @__PURE__ */ (0, x.jsxs)("div", {
2366
2505
  className: $.linesBox,
2367
2506
  children: [/* @__PURE__ */ (0, x.jsx)("span", { className: `${$.line} ${$.lineV}` }), /* @__PURE__ */ (0, x.jsx)("span", { className: `${$.line} ${$.lineH}` })]
2368
- }), Vt = ({ onMouseDown: e }) => /* @__PURE__ */ (0, x.jsxs)(x.Fragment, { children: [
2507
+ }), Yt = ({ onMouseDown: e }) => /* @__PURE__ */ (0, x.jsxs)(x.Fragment, { children: [
2369
2508
  /* @__PURE__ */ (0, x.jsx)("div", {
2370
2509
  className: `${$.pointer} ${$.pointerTopLeft}`,
2371
2510
  onMouseDown: (t) => e(t, "tl", "nwse")
@@ -2385,20 +2524,20 @@ var q = (e, t, n) => Math.max(t, Math.min(n, e)), $e = (e, t) => [[e[0][0] * t[0
2385
2524
  ] });
2386
2525
  //#endregion
2387
2526
  //#region src/shared/components/Pixedi/crop/useCropInteraction.ts
2388
- function Ht(e, t, n) {
2527
+ function Xt(e, t, n) {
2389
2528
  return Math.min(Math.max(e, t), n);
2390
2529
  }
2391
- function Ut(e, { x: t, y: n, w: r, h: i }) {
2530
+ function Zt(e, { x: t, y: n, w: r, h: i }) {
2392
2531
  e.style.left = `${t}%`, e.style.top = `${n}%`, e.style.width = `${r}%`, e.style.height = `${i}%`;
2393
2532
  }
2394
- function Wt(e) {
2533
+ function Qt(e) {
2395
2534
  let { width: t, height: n } = e.getBoundingClientRect();
2396
2535
  return {
2397
2536
  frameW: t,
2398
2537
  frameH: n
2399
2538
  };
2400
2539
  }
2401
- function Gt({ x: e, y: t, w: n, h: r }, i, a) {
2540
+ function $t({ x: e, y: t, w: n, h: r }, i, a) {
2402
2541
  return {
2403
2542
  x: e / 100 * i,
2404
2543
  y: t / 100 * a,
@@ -2406,7 +2545,7 @@ function Gt({ x: e, y: t, w: n, h: r }, i, a) {
2406
2545
  h: r / 100 * a
2407
2546
  };
2408
2547
  }
2409
- function Kt({ x: e, y: t, w: n, h: r }, i, a) {
2548
+ function en({ x: e, y: t, w: n, h: r }, i, a) {
2410
2549
  return {
2411
2550
  x: e / i * 100,
2412
2551
  y: t / a * 100,
@@ -2414,22 +2553,22 @@ function Kt({ x: e, y: t, w: n, h: r }, i, a) {
2414
2553
  h: r / a * 100
2415
2554
  };
2416
2555
  }
2417
- var qt = ({ boxRef: e }) => {
2418
- let { currentAction: t, getLastHistoryItem: n, eventBus: r } = P(), i = O(), { width: a, height: s } = n(), c = t?.name === h.CROP || t?.name === h.PRESET_CROP, d = c ? t.args.ratio : 1, f = !c || t.args.isFree, p = l(() => G(d, a, s), [
2556
+ var tn = ({ boxRef: e }) => {
2557
+ let { currentAction: t, getLastHistoryItem: n, eventBus: r } = N(), i = O(), { width: a, height: s } = n(), c = t?.name === h.CROP || t?.name === h.PRESET_CROP, d = c ? t.args.ratio : 1, f = !c || t.args.isFree, p = l(() => G(d, a, s), [
2419
2558
  d,
2420
2559
  a,
2421
2560
  s
2422
2561
  ]), m = u(null), g = u(""), _ = u(p), v = u(p);
2423
2562
  return o(() => {
2424
- _.current = p, dt(r, p);
2563
+ _.current = p, yt(r, p);
2425
2564
  }, [p, r]), o(() => {
2426
2565
  let t = (e, t) => {
2427
- _.current = t, Ut(e, t), ut(r, {
2566
+ _.current = t, Zt(e, t), vt(r, {
2428
2567
  x: Math.round(t.x / 100 * a),
2429
2568
  y: Math.round(t.y / 100 * s),
2430
2569
  w: Math.round(t.w / 100 * a),
2431
2570
  h: Math.round(t.h / 100 * s)
2432
- }), dt(r, t);
2571
+ }), yt(r, t);
2433
2572
  }, n = (e) => {
2434
2573
  e.preventDefault(), v.current = _.current;
2435
2574
  let t = "clientX" in e ? e.clientX : e.touches[0].clientX, n = "clientY" in e ? e.clientY : e.touches[0].clientY;
@@ -2442,7 +2581,7 @@ var qt = ({ boxRef: e }) => {
2442
2581
  t.preventDefault();
2443
2582
  let n = e.current, r = n.parentElement;
2444
2583
  if (!r) return;
2445
- let { frameW: i, frameH: a } = Wt(r);
2584
+ let { frameW: i, frameH: a } = Qt(r);
2446
2585
  if (g.current) {
2447
2586
  o(t, n, i, a);
2448
2587
  return;
@@ -2450,14 +2589,14 @@ var qt = ({ boxRef: e }) => {
2450
2589
  c(t, n, i, a);
2451
2590
  }, o = (e, n, r, i) => {
2452
2591
  if (!m.current) return;
2453
- let o = "clientX" in e ? e.clientX : e.touches[0].clientX, c = "clientY" in e ? e.clientY : e.touches[0].clientY, l = Kt(Ke(g.current, f, d, m.current.x, m.current.y, o, c, r, i, Gt(v.current, r, i), Gt(_.current, r, i)), r, i);
2454
- t(n, f ? l : qe(l, d, a, s));
2592
+ let o = "clientX" in e ? e.clientX : e.touches[0].clientX, c = "clientY" in e ? e.clientY : e.touches[0].clientY, l = en(et(g.current, f, d, m.current.x, m.current.y, o, c, r, i, $t(v.current, r, i), $t(_.current, r, i)), r, i);
2593
+ t(n, f ? l : tt(l, d, a, s));
2455
2594
  }, c = (e, n, r, i) => {
2456
2595
  if (!m.current) return;
2457
2596
  let { x: a, y: o, w: s, h: c } = v.current, l = "clientX" in e ? e.clientX : e.touches[0].clientX, u = "clientY" in e ? e.clientY : e.touches[0].clientY, d = (l - m.current.x) / r * 100, f = (u - m.current.y) / i * 100;
2458
2597
  t(n, {
2459
- x: Ht(a + d, 0, Math.max(0, 100 - s)),
2460
- y: Ht(o + f, 0, Math.max(0, 100 - c)),
2598
+ x: Xt(a + d, 0, Math.max(0, 100 - s)),
2599
+ y: Xt(o + f, 0, Math.max(0, 100 - c)),
2461
2600
  w: s,
2462
2601
  h: c
2463
2602
  });
@@ -2492,14 +2631,14 @@ var qt = ({ boxRef: e }) => {
2492
2631
  },
2493
2632
  initialCrop: p
2494
2633
  };
2495
- }, Jt = ({ onMouseDown: e }) => /* @__PURE__ */ (0, x.jsx)("div", {
2634
+ }, nn = ({ onMouseDown: e }) => /* @__PURE__ */ (0, x.jsx)("div", {
2496
2635
  className: $.mobileBorder,
2497
2636
  children: /* @__PURE__ */ (0, x.jsx)("div", {
2498
2637
  className: $.mobilePointer,
2499
2638
  onTouchStart: (t) => e(t, "br", "nwse")
2500
2639
  })
2501
- }), Yt = () => {
2502
- let e = u(null), t = u(null), n = u(null), r = u(null), { currentAction: i, getLastHistoryItem: a, eventBus: s } = P(), { width: c, height: l } = a();
2640
+ }), rn = () => {
2641
+ let e = u(null), t = u(null), n = u(null), r = u(null), { currentAction: i, getLastHistoryItem: a, eventBus: s } = N(), { width: c, height: l } = a();
2503
2642
  return o(() => {
2504
2643
  if (!(i?.name === h.CROP || i?.name === h.PRESET_CROP)) return;
2505
2644
  let { xP: a, yP: o, wP: u, hP: d } = G(i.args.ratio, c, l);
@@ -2534,8 +2673,8 @@ var qt = ({ boxRef: e }) => {
2534
2673
  children: /* @__PURE__ */ (0, x.jsx)("b", { ref: r })
2535
2674
  })
2536
2675
  ] });
2537
- }, Xt = Re.map((e) => e.options).flat(), Zt = () => Xt, Qt = () => {
2538
- let { currentAction: e, getLastHistoryItem: t, addToHistory: n, setSidebar: r, setCurrentAction: i, eventBus: a } = P(), { width: s, height: c } = t(), l = e?.name === h.PRESET_CROP && Xt.some((t) => t.value === e.args.id) ? e.args.id : "", d = u({
2676
+ }, an = Ke.map((e) => e.options).flat(), on = () => an, sn = () => {
2677
+ let { currentAction: e, getLastHistoryItem: t, addToHistory: n, setSidebar: r, setCurrentAction: i, eventBus: a } = N(), { width: s, height: c } = t(), l = e?.name === h.PRESET_CROP && an.some((t) => t.value === e.args.id) ? e.args.id : "", d = u({
2539
2678
  x: 0,
2540
2679
  y: 0,
2541
2680
  w: 0,
@@ -2558,10 +2697,10 @@ var qt = ({ boxRef: e }) => {
2558
2697
  a
2559
2698
  ]), {
2560
2699
  currentValue: l,
2561
- presetsData: Re,
2700
+ presetsData: Ke,
2562
2701
  handleChange: (e) => {
2563
2702
  if (!e) return;
2564
- let t = Zt().find((t) => t.value === e);
2703
+ let t = on().find((t) => t.value === e);
2565
2704
  if (!t) return;
2566
2705
  let n = {
2567
2706
  id: e,
@@ -2594,20 +2733,20 @@ var qt = ({ boxRef: e }) => {
2594
2733
  i(null), r(!0);
2595
2734
  }
2596
2735
  };
2597
- }, $t = { select: "_select_1ieak_1" }, en = () => {
2598
- let { currentValue: e, presetsData: t, handleChange: n, handleSave: r, handleClose: i } = Qt();
2599
- return /* @__PURE__ */ (0, x.jsxs)(U, { children: [/* @__PURE__ */ (0, x.jsx)(Te, {
2736
+ }, cn = { select: "_select_1ieak_1" }, ln = () => {
2737
+ let { currentValue: e, presetsData: t, handleChange: n, handleSave: r, handleClose: i } = sn();
2738
+ return /* @__PURE__ */ (0, x.jsxs)(U, { children: [/* @__PURE__ */ (0, x.jsx)(De, {
2600
2739
  value: e,
2601
2740
  placeholder: "Select preset",
2602
2741
  onChange: n,
2603
2742
  items: t,
2604
- className: $t.select
2605
- }), /* @__PURE__ */ (0, x.jsx)(z, {
2743
+ className: cn.select
2744
+ }), /* @__PURE__ */ (0, x.jsx)(R, {
2606
2745
  onSave: r,
2607
2746
  onClose: i
2608
2747
  })] });
2609
- }, tn = () => {
2610
- let { getLastHistoryItem: e, setCurrentAction: t, addToHistory: n, setSidebar: r } = P(), { width: i, height: a } = e(), [o, s] = d(!1), [c, l] = d(!1), u = (e, n) => {
2748
+ }, un = () => {
2749
+ let { getLastHistoryItem: e, setCurrentAction: t, addToHistory: n, setSidebar: r } = N(), { width: i, height: a } = e(), [o, s] = d(!1), [c, l] = d(!1), u = (e, n) => {
2611
2750
  t({
2612
2751
  name: h.FLIP,
2613
2752
  args: {
@@ -2644,38 +2783,38 @@ var qt = ({ boxRef: e }) => {
2644
2783
  t(null), r(!0);
2645
2784
  }
2646
2785
  };
2647
- }, nn = {
2786
+ }, dn = {
2648
2787
  btnH: "_btnH_15adi_1",
2649
2788
  btnV: "_btnV_15adi_7"
2650
- }, rn = () => {
2651
- let { flipHorizontal: e, flipVertical: t, handleFlipHorizontal: n, handleFlipVertical: r, handleSave: i, handleClose: a } = tn();
2789
+ }, fn = () => {
2790
+ let { flipHorizontal: e, flipVertical: t, handleFlipHorizontal: n, handleFlipVertical: r, handleSave: i, handleClose: a } = un();
2652
2791
  return /* @__PURE__ */ (0, x.jsxs)(U, { children: [/* @__PURE__ */ (0, x.jsx)("div", {
2653
- className: nn.scGroup,
2654
- children: /* @__PURE__ */ (0, x.jsxs)(H, {
2792
+ className: dn.scGroup,
2793
+ children: /* @__PURE__ */ (0, x.jsxs)(V, {
2655
2794
  position: "top",
2656
- children: [/* @__PURE__ */ (0, x.jsx)(I, {
2795
+ children: [/* @__PURE__ */ (0, x.jsx)(F, {
2657
2796
  variant: "outline",
2658
- className: nn.btnH,
2797
+ className: dn.btnH,
2659
2798
  onClick: n,
2660
2799
  "aria-label": "Horizontal",
2661
2800
  "data-tooltip": "Horizontal",
2662
- children: /* @__PURE__ */ (0, x.jsx)(ue, { style: { color: e ? "var(--accent-blue)" : "var(--foreground)" } })
2663
- }), /* @__PURE__ */ (0, x.jsx)(I, {
2801
+ children: /* @__PURE__ */ (0, x.jsx)(de, { style: { color: e ? "var(--accent-blue)" : "var(--foreground)" } })
2802
+ }), /* @__PURE__ */ (0, x.jsx)(F, {
2664
2803
  variant: "outline",
2665
- className: nn.btnV,
2804
+ className: dn.btnV,
2666
2805
  onClick: r,
2667
2806
  "aria-label": "Vertical",
2668
2807
  "data-tooltip": "Vertical",
2669
- children: /* @__PURE__ */ (0, x.jsx)(de, { style: { color: t ? "var(--accent-blue)" : "var(--foreground)" } })
2808
+ children: /* @__PURE__ */ (0, x.jsx)(fe, { style: { color: t ? "var(--accent-blue)" : "var(--foreground)" } })
2670
2809
  })]
2671
2810
  })
2672
- }), /* @__PURE__ */ (0, x.jsx)(z, {
2811
+ }), /* @__PURE__ */ (0, x.jsx)(R, {
2673
2812
  disabled: !e && !t,
2674
2813
  onSave: i,
2675
2814
  onClose: a
2676
2815
  })] });
2677
- }, an = () => {
2678
- let { getLastRotation: e, getLastHistoryItem: t, addToHistory: n, setSidebar: r, setCurrentAction: i } = P(), { width: a, height: o } = t(), s = e(), c = u(s), l = u(s);
2816
+ }, pn = () => {
2817
+ let { getLastRotation: e, getLastHistoryItem: t, addToHistory: n, setSidebar: r, setCurrentAction: i } = N(), { width: a, height: o } = t(), s = e(), c = u(s), l = u(s);
2679
2818
  return {
2680
2819
  handleRotate: (e) => {
2681
2820
  l.current += e, i({
@@ -2685,7 +2824,7 @@ var qt = ({ boxRef: e }) => {
2685
2824
  },
2686
2825
  handleSave: () => {
2687
2826
  n({
2688
- ...Je(a, o, c.current, l.current),
2827
+ ...nt(a, o, c.current, l.current),
2689
2828
  action: {
2690
2829
  name: h.ROTATE,
2691
2830
  args: { degrees: l.current }
@@ -2696,52 +2835,52 @@ var qt = ({ boxRef: e }) => {
2696
2835
  i(null), r(!0);
2697
2836
  }
2698
2837
  };
2699
- }, on = {
2838
+ }, mn = {
2700
2839
  btnH: "_btnH_15adi_1",
2701
2840
  btnV: "_btnV_15adi_7"
2702
- }, sn = () => {
2703
- let { handleRotate: e, handleSave: t, handleClose: n } = an();
2841
+ }, hn = () => {
2842
+ let { handleRotate: e, handleSave: t, handleClose: n } = pn();
2704
2843
  return /* @__PURE__ */ (0, x.jsxs)(U, { children: [/* @__PURE__ */ (0, x.jsx)("div", {
2705
- className: on.scGroup,
2706
- children: /* @__PURE__ */ (0, x.jsxs)(H, {
2844
+ className: mn.scGroup,
2845
+ children: /* @__PURE__ */ (0, x.jsxs)(V, {
2707
2846
  position: "top",
2708
- children: [/* @__PURE__ */ (0, x.jsx)(I, {
2847
+ children: [/* @__PURE__ */ (0, x.jsx)(F, {
2709
2848
  variant: "outline",
2710
- className: on.btnH,
2849
+ className: mn.btnH,
2711
2850
  onClick: () => e(90),
2712
2851
  "aria-label": "+90°",
2713
2852
  "data-tooltip": "+90°",
2714
- children: /* @__PURE__ */ (0, x.jsx)(fe, {})
2715
- }), /* @__PURE__ */ (0, x.jsx)(I, {
2853
+ children: /* @__PURE__ */ (0, x.jsx)(pe, {})
2854
+ }), /* @__PURE__ */ (0, x.jsx)(F, {
2716
2855
  variant: "outline",
2717
- className: on.btnV,
2856
+ className: mn.btnV,
2718
2857
  onClick: () => e(-90),
2719
2858
  "aria-label": "-90°",
2720
2859
  "data-tooltip": "-90°",
2721
- children: /* @__PURE__ */ (0, x.jsx)(pe, {})
2860
+ children: /* @__PURE__ */ (0, x.jsx)(me, {})
2722
2861
  })]
2723
2862
  })
2724
- }), /* @__PURE__ */ (0, x.jsx)(z, {
2863
+ }), /* @__PURE__ */ (0, x.jsx)(R, {
2725
2864
  onSave: t,
2726
2865
  onClose: n
2727
2866
  })] });
2728
- }, cn = { frame: "_frame_1p6kh_1" }, ln = () => {
2729
- let { currentAction: e } = P(), t = e?.name === h.RESIZE, n = e?.name === h.CROP, r = e?.name === h.PRESET_CROP, i = e?.name === h.FLIP, a = e?.name === h.ROTATE, o = e?.name === h.FILTERS, s = n || r;
2730
- return /* @__PURE__ */ (0, x.jsxs)("div", {
2731
- className: `${cn.frame} ${s ? R.mask : ""}`,
2732
- children: [
2733
- /* @__PURE__ */ (0, x.jsx)(vt, { faded: s }),
2734
- t && /* @__PURE__ */ (0, x.jsx)(Pt, {}),
2735
- n && /* @__PURE__ */ (0, x.jsx)(zt, {}),
2736
- r && /* @__PURE__ */ (0, x.jsx)(en, {}),
2737
- i && /* @__PURE__ */ (0, x.jsx)(rn, {}),
2738
- a && /* @__PURE__ */ (0, x.jsx)(sn, {}),
2739
- o && /* @__PURE__ */ (0, x.jsx)(gt, {}),
2740
- (n || r) && /* @__PURE__ */ (0, x.jsx)(Ft, {}, e?.args?.id),
2741
- o && /* @__PURE__ */ (0, x.jsx)(bt, {})
2742
- ]
2867
+ }, gn = { frame: "_frame_1p6kh_1" }, _n = () => {
2868
+ let { currentAction: e } = N(), t = e?.name === h.RESIZE, n = e?.name === h.CROP, r = e?.name === h.PRESET_CROP, i = e?.name === h.FLIP, a = e?.name === h.ROTATE, o = e?.name === h.FILTERS, s = n || r;
2869
+ return /* @__PURE__ */ (0, x.jsx)("div", {
2870
+ className: `${gn.frame} ${s ? L.mask : ""}`,
2871
+ children: /* @__PURE__ */ (0, x.jsxs)(Ue, { children: [
2872
+ /* @__PURE__ */ (0, x.jsx)(Et, { faded: s }),
2873
+ t && /* @__PURE__ */ (0, x.jsx)(Ht, {}),
2874
+ n && /* @__PURE__ */ (0, x.jsx)(qt, {}),
2875
+ r && /* @__PURE__ */ (0, x.jsx)(ln, {}),
2876
+ i && /* @__PURE__ */ (0, x.jsx)(fn, {}),
2877
+ a && /* @__PURE__ */ (0, x.jsx)(hn, {}),
2878
+ o && /* @__PURE__ */ (0, x.jsx)(wt, {}),
2879
+ (n || r) && /* @__PURE__ */ (0, x.jsx)(Ut, {}, e?.args?.id),
2880
+ o && /* @__PURE__ */ (0, x.jsx)(Ot, {})
2881
+ ] })
2743
2882
  });
2744
- }, un = () => /* @__PURE__ */ (0, x.jsx)("svg", {
2883
+ }, vn = () => /* @__PURE__ */ (0, x.jsx)("svg", {
2745
2884
  style: {
2746
2885
  position: "absolute",
2747
2886
  width: 0,
@@ -2883,7 +3022,7 @@ var qt = ({ boxRef: e }) => {
2883
3022
  })]
2884
3023
  })
2885
3024
  ] })
2886
- }), dn = ({ image: e, onSave: t, onBack: n, theme: r = "light", settings: i = g }) => {
3025
+ }), yn = ({ image: e, onSave: t, onBack: n, theme: r = "light", settings: i = g }) => {
2887
3026
  let [a, o] = d(null), s = k("sm", a), c = {
2888
3027
  ...g,
2889
3028
  ...i
@@ -2892,31 +3031,31 @@ var qt = ({ boxRef: e }) => {
2892
3031
  skip: c?.tools?.length === 0
2893
3032
  });
2894
3033
  return c?.tools?.length === 0 ? /* @__PURE__ */ (0, x.jsx)("div", {
2895
- className: `${R.root} ${R.wrapper}`,
3034
+ className: `${L.root} ${L.wrapper}`,
2896
3035
  "data-theme": r,
2897
3036
  children: /* @__PURE__ */ (0, x.jsx)("div", {
2898
- className: R.system,
3037
+ className: L.system,
2899
3038
  children: /* @__PURE__ */ (0, x.jsx)("div", {
2900
- className: R.textRed,
3039
+ className: L.textRed,
2901
3040
  children: "No tools selected."
2902
3041
  })
2903
3042
  })
2904
3043
  }) : l || u || !h || !f ? /* @__PURE__ */ (0, x.jsx)("div", {
2905
- className: `${R.root} ${R.wrapper}`,
3044
+ className: `${L.root} ${L.wrapper}`,
2906
3045
  "data-theme": r,
2907
3046
  children: /* @__PURE__ */ (0, x.jsxs)("div", {
2908
- className: R.system,
3047
+ className: L.system,
2909
3048
  children: [
2910
- l && /* @__PURE__ */ (0, x.jsx)(be, { style: {
3049
+ l && /* @__PURE__ */ (0, x.jsx)(Se, { style: {
2911
3050
  width: 48,
2912
3051
  height: 48
2913
3052
  } }),
2914
3053
  u && /* @__PURE__ */ (0, x.jsx)("div", {
2915
- className: R.textRed,
3054
+ className: L.textRed,
2916
3055
  children: u
2917
3056
  }),
2918
3057
  !l && !u && (!h || !f) && /* @__PURE__ */ (0, x.jsx)("div", {
2919
- className: R.textRed,
3058
+ className: L.textRed,
2920
3059
  children: "Failed to load image."
2921
3060
  })
2922
3061
  ]
@@ -2931,23 +3070,23 @@ var qt = ({ boxRef: e }) => {
2931
3070
  settings: c,
2932
3071
  children: /* @__PURE__ */ (0, x.jsxs)("div", {
2933
3072
  ref: o,
2934
- className: `${R.root} ${R.wrapper}`,
3073
+ className: `${L.root} ${L.wrapper}`,
2935
3074
  "data-theme": r,
2936
- children: [/* @__PURE__ */ (0, x.jsx)(un, {}), /* @__PURE__ */ (0, x.jsxs)("div", {
2937
- className: `${c?.infobar ? R.grid : R.gridNoInfobar} ${s ? R.mobile : ""}`,
3075
+ children: [/* @__PURE__ */ (0, x.jsx)(vn, {}), /* @__PURE__ */ (0, x.jsxs)("div", {
3076
+ className: `${c?.infobar ? L.grid : L.gridNoInfobar} ${s ? L.mobile : ""}`,
2938
3077
  children: [
2939
- /* @__PURE__ */ (0, x.jsx)(lt, {
3078
+ /* @__PURE__ */ (0, x.jsx)(_t, {
2940
3079
  onSave: t,
2941
3080
  onBack: n,
2942
3081
  isMobile: s
2943
3082
  }),
2944
- /* @__PURE__ */ (0, x.jsx)(Tt, { isMobile: s }),
2945
- /* @__PURE__ */ (0, x.jsx)(ln, {}),
2946
- c?.infobar && /* @__PURE__ */ (0, x.jsx)(Ot, {})
3083
+ /* @__PURE__ */ (0, x.jsx)(Nt, { isMobile: s }),
3084
+ /* @__PURE__ */ (0, x.jsx)(_n, {}),
3085
+ c?.infobar && /* @__PURE__ */ (0, x.jsx)(It, {})
2947
3086
  ]
2948
3087
  })]
2949
3088
  })
2950
3089
  });
2951
3090
  };
2952
3091
  //#endregion
2953
- export { dn as Pixedi };
3092
+ export { yn as Pixedi };