forge-edit 0.1.0-beta.7 → 0.1.0-beta.9
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/index.js +2533 -619
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-gray-100:oklch(96.7% .003 264.542);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-sm:.25rem;--radius-md:.375rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:0}.top-\\[1px\\]{top:1px}.top-\\[calc\\(100\\%\\+4px\\)\\]{top:calc(100% + 4px)}.top-\\[calc\\(100\\%\\+8px\\)\\]{top:calc(100% + 8px)}.top-full{top:100%}.left-0{left:0}.left-1\\/2{left:50%}.left-\\[-7px\\]{left:-7px}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-\\[1\\]{z-index:1}.z-\\[2\\]{z-index:2}.z-\\[3\\]{z-index:3}.z-\\[5\\]{z-index:5}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.box-border{box-sizing:border-box}.block{display:block}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-40{height:calc(var(--spacing) * 40)}.h-\\[30px\\]{height:30px}.h-full{height:100%}.h-px{height:1px}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-\\[220px\\]{max-height:220px}.min-h-\\[60px\\]{min-height:60px}.min-h-\\[120px\\]{min-height:120px}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-40{width:calc(var(--spacing) * 40)}.w-\\[1px\\]{width:1px}.w-full{width:100%}.max-w-\\[65px\\]{max-width:65px}.min-w-4{min-width:calc(var(--spacing) * 4)}.min-w-\\[18px\\]{min-width:18px}.min-w-\\[28px\\]{min-width:28px}.min-w-\\[70px\\]{min-width:70px}.min-w-\\[110px\\]{min-width:110px}.min-w-\\[130px\\]{min-width:130px}.min-w-\\[150px\\]{min-width:150px}.min-w-\\[160px\\]{min-width:160px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[200px\\]{min-width:200px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.cursor-s-resize{cursor:s-resize}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-\\[4px\\]{gap:4px}.gap-px{gap:1px}:where(.-space-x-px>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(-1px * var(--tw-space-x-reverse));margin-inline-end:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-\\[\\#ccc\\]>:not(:last-child)){border-color:#ccc}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[3px\\]{border-top-left-radius:3px;border-top-right-radius:3px}.rounded-b-\\[3px\\]{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-7{border-right-style:var(--tw-border-style);border-right-width:7px}.border-r-8{border-right-style:var(--tw-border-style);border-right-width:8px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-7{border-bottom-style:var(--tw-border-style);border-bottom-width:7px}.border-b-8{border-bottom-style:var(--tw-border-style);border-bottom-width:8px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-7{border-left-style:var(--tw-border-style);border-left-width:7px}.border-l-8{border-left-style:var(--tw-border-style);border-left-width:8px}.border-none{--tw-border-style:none;border-style:none}.border-\\[\\#2c2c2c\\]{border-color:#2c2c2c}.border-\\[\\#4a90d9\\]{border-color:#4a90d9}.border-\\[\\#ccc\\]{border-color:#ccc}.border-\\[\\#d1d5db\\]{border-color:#d1d5db}.border-\\[\\#ddd\\]{border-color:#ddd}.border-\\[\\#eee\\]{border-color:#eee}.border-black{border-color:var(--color-black)}.border-r-transparent{border-right-color:#0000}.border-b-\\[\\#ccc\\]{border-bottom-color:#ccc}.border-b-white{border-bottom-color:var(--color-white)}.border-l-transparent{border-left-color:#0000}.bg-\\[\\#1e1e1e\\]{background-color:#1e1e1e}.bg-\\[\\#888\\]{background-color:#888}.bg-\\[\\#e2e8f0\\]{background-color:#e2e8f0}.bg-\\[\\#e5e7eb\\]{background-color:#e5e7eb}.bg-\\[\\#f0f0f0\\]{background-color:#f0f0f0}.bg-\\[\\#f5f5f5\\]{background-color:#f5f5f5}.bg-\\[rgba\\(74\\,144\\,217\\,0\\.4\\)\\]{background-color:#4a90d966}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.bg-white\\/30{background-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.bg-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\.05\\)_1px\\,transparent_1px\\)\\,linear-gradient\\(90deg\\,rgba\\(0\\,0\\,0\\,0\\.05\\)_1px\\,transparent_1px\\)\\]{background-image:linear-gradient(#0000000d 1px,#0000 1px),linear-gradient(90deg,#0000000d 1px,#0000 1px)}.bg-\\[size\\:16px_16px\\]{background-size:16px 16px}.fill-current{fill:currentColor}.fill-none{fill:none}.stroke-black{stroke:var(--color-black)}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-\\[5px\\]{padding:5px}.p-\\[10px\\]{padding:10px}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-\\[7px\\]{padding-inline:7px}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pr-1{padding-right:var(--spacing)}.pr-1\\.5{padding-right:calc(var(--spacing) * 1.5)}.pb-0\\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:var(--spacing)}.pb-12{padding-bottom:calc(var(--spacing) * 12)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-serif{font-family:var(--font-serif)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#333\\]{color:#333}.text-\\[\\#666\\]{color:#666}.text-black{color:var(--color-black)}.text-gray-700{color:var(--color-gray-700)}.text-white{color:var(--color-white)}.not-italic{font-style:normal}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.shadow-\\[0_2px_6px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 2px 6px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[inset_0_1px_3px_rgba\\(0\\,0\\,0\\,0\\.2\\)\\]{--tw-shadow:inset 0 1px 3px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-\\[width\\,height\\]{transition-property:width,height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-has-\\[\\.is-open\\]\\:hidden:is(:where(.group):has(.is-open) *){display:none}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:bottom-full:before{content:var(--tw-content);bottom:100%}.before\\:left-1\\/2:before{content:var(--tw-content);left:50%}.before\\:-translate-x-1\\/2:before{content:var(--tw-content);--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.before\\:border-x-\\[5px\\]:before{content:var(--tw-content);border-inline-style:var(--tw-border-style);border-inline-width:5px}.before\\:border-t-0:before{content:var(--tw-content);border-top-style:var(--tw-border-style);border-top-width:0}.before\\:border-b-\\[5px\\]:before{content:var(--tw-content);border-bottom-style:var(--tw-border-style);border-bottom-width:5px}.before\\:border-solid:before{content:var(--tw-content);--tw-border-style:solid;border-style:solid}.before\\:border-x-transparent:before{content:var(--tw-content);border-inline-color:#0000}.before\\:border-b-\\[\\#2c2c2c\\]:before{content:var(--tw-content);border-bottom-color:#2c2c2c}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:bottom-full:after{content:var(--tw-content);bottom:100%}.after\\:left-1\\/2:after{content:var(--tw-content);left:50%}.after\\:-translate-x-1\\/2:after{content:var(--tw-content);--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.after\\:translate-y-\\[1px\\]:after{content:var(--tw-content);--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.after\\:border-x-\\[4px\\]:after{content:var(--tw-content);border-inline-style:var(--tw-border-style);border-inline-width:4px}.after\\:border-t-0:after{content:var(--tw-content);border-top-style:var(--tw-border-style);border-top-width:0}.after\\:border-b-\\[4px\\]:after{content:var(--tw-content);border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.after\\:border-solid:after{content:var(--tw-content);--tw-border-style:solid;border-style:solid}.after\\:border-x-transparent:after{content:var(--tw-content);border-inline-color:#0000}.after\\:border-b-\\[\\#1e1e1e\\]:after{content:var(--tw-content);border-bottom-color:#1e1e1e}.last\\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\\:pr-0:last-child{padding-right:0}@media (hover:hover){.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-\\[\\#999\\]:hover{border-color:#999}.hover\\:border-\\[\\#aaa\\]:hover{border-color:#aaa}.hover\\:border-black:hover{border-color:var(--color-black)}.hover\\:bg-\\[\\#e6e6e6\\]:hover{background-color:#e6e6e6}.hover\\:bg-\\[\\#f0f0f0\\]:hover{background-color:#f0f0f0}.hover\\:bg-\\[\\#f5f5f5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#f9f9f9\\]:hover{background-color:#f9f9f9}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:translate-y-px:active{--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.active\\:bg-\\[\\#d0d0d0\\]:active{background-color:#d0d0d0}.active\\:bg-\\[\\#e8e8e8\\]:active{background-color:#e8e8e8}.rtl\\:right-0:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){right:0}.rtl\\:left-1\\/2:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){left:50%}.rtl\\:left-auto:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){left:auto}.rtl\\:-translate-x-1\\/2:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}:where(.rtl\\:divide-x-reverse:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *)>:not(:last-child)){--tw-divide-x-reverse:1}.\\[\\&_blockquote\\]\\:my-2 blockquote{margin-block:calc(var(--spacing) * 2)}.\\[\\&_blockquote\\]\\:border-l-4 blockquote{border-left-style:var(--tw-border-style);border-left-width:4px}.\\[\\&_blockquote\\]\\:border-\\[\\#ccc\\] blockquote{border-color:#ccc}.\\[\\&_blockquote\\]\\:pl-4 blockquote{padding-left:calc(var(--spacing) * 4)}.\\[\\&_blockquote\\]\\:italic blockquote{font-style:italic}.\\[\\&_h1\\]\\:text-2xl h1{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\\[\\&_h1\\]\\:font-bold h1{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\\[\\&_h2\\]\\:text-xl h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\\[\\&_h2\\]\\:font-bold h2{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\\[\\&_h3\\]\\:text-lg h3{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\\[\\&_h3\\]\\:font-bold h3{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\\[\\&_pre\\]\\:rounded pre{border-radius:.25rem}.\\[\\&_pre\\]\\:bg-\\[\\#f4f4f4\\] pre{background-color:#f4f4f4}.\\[\\&_pre\\]\\:p-2 pre{padding:calc(var(--spacing) * 2)}.\\[\\&\\.is-active\\]\\:bg-\\[\\#e5e5e5\\].is-active{background-color:#e5e5e5}.\\[\\&\\.is-open\\]\\:block.is-open{display:block}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
|
|
4
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
5
|
+
get: ((e) => i[e]).bind(null, d),
|
|
6
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
7
|
+
});
|
|
8
|
+
return e;
|
|
9
|
+
}, c = (n, r, o) => (o = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
|
|
10
|
+
value: n,
|
|
11
|
+
enumerable: !0
|
|
12
|
+
}) : o, n));
|
|
13
|
+
//#endregion
|
|
5
14
|
//#region src/components/shared/Hooks/options.js
|
|
6
|
-
function
|
|
15
|
+
function l(e) {
|
|
7
16
|
return {
|
|
8
17
|
type: e.getAttribute("type") || "light",
|
|
9
18
|
placeholder: e.getAttribute("placeholder") || "",
|
|
@@ -14,145 +23,395 @@ function o(e) {
|
|
|
14
23
|
};
|
|
15
24
|
}
|
|
16
25
|
//#endregion
|
|
26
|
+
//#region node_modules/preact/dist/preact.module.js
|
|
27
|
+
var u, d, f, p, m, h, g, _, v, y, b, x, S, C, w = {}, T = [], E = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, D = Array.isArray;
|
|
28
|
+
function O(e, t) {
|
|
29
|
+
for (var n in t) e[n] = t[n];
|
|
30
|
+
return e;
|
|
31
|
+
}
|
|
32
|
+
function ee(e) {
|
|
33
|
+
e && e.parentNode && e.parentNode.removeChild(e);
|
|
34
|
+
}
|
|
35
|
+
function te(e, t, n) {
|
|
36
|
+
var r, i, a, o = {};
|
|
37
|
+
for (a in t) a == "key" ? r = t[a] : a == "ref" ? i = t[a] : o[a] = t[a];
|
|
38
|
+
if (arguments.length > 2 && (o.children = arguments.length > 3 ? u.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (a in e.defaultProps) o[a] === void 0 && (o[a] = e.defaultProps[a]);
|
|
39
|
+
return k(e, o, r, i, null);
|
|
40
|
+
}
|
|
41
|
+
function k(e, t, n, r, i) {
|
|
42
|
+
var a = {
|
|
43
|
+
type: e,
|
|
44
|
+
props: t,
|
|
45
|
+
key: n,
|
|
46
|
+
ref: r,
|
|
47
|
+
__k: null,
|
|
48
|
+
__: null,
|
|
49
|
+
__b: 0,
|
|
50
|
+
__e: null,
|
|
51
|
+
__c: null,
|
|
52
|
+
constructor: void 0,
|
|
53
|
+
__v: i ?? ++f,
|
|
54
|
+
__i: -1,
|
|
55
|
+
__u: 0
|
|
56
|
+
};
|
|
57
|
+
return i == null && d.vnode != null && d.vnode(a), a;
|
|
58
|
+
}
|
|
59
|
+
function ne(e) {
|
|
60
|
+
return e.children;
|
|
61
|
+
}
|
|
62
|
+
function re(e, t) {
|
|
63
|
+
this.props = e, this.context = t;
|
|
64
|
+
}
|
|
65
|
+
function A(e, t) {
|
|
66
|
+
if (t == null) return e.__ ? A(e.__, e.__i + 1) : null;
|
|
67
|
+
for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
|
|
68
|
+
return typeof e.type == "function" ? A(e) : null;
|
|
69
|
+
}
|
|
70
|
+
function ie(e) {
|
|
71
|
+
if (e.__P && e.__d) {
|
|
72
|
+
var t = e.__v, n = t.__e, r = [], i = [], a = O({}, t);
|
|
73
|
+
a.__v = t.__v + 1, d.vnode && d.vnode(a), pe(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? A(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, P(r, a, i), t.__e = t.__ = null, a.__e != n && j(a);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function j(e) {
|
|
77
|
+
if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
|
|
78
|
+
if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
|
|
79
|
+
}), j(e);
|
|
80
|
+
}
|
|
81
|
+
function ae(e) {
|
|
82
|
+
(!e.__d && (e.__d = !0) && p.push(e) && !M.__r++ || m != d.debounceRendering) && ((m = d.debounceRendering) || h)(M);
|
|
83
|
+
}
|
|
84
|
+
function M() {
|
|
85
|
+
try {
|
|
86
|
+
for (var e, t = 1; p.length;) p.length > t && p.sort(g), e = p.shift(), t = p.length, ie(e);
|
|
87
|
+
} finally {
|
|
88
|
+
p.length = M.__r = 0;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function oe(e, t, n, r, i, a, o, s, c, l, u) {
|
|
92
|
+
var d, f, p, m, h, g, _ = r && r.__k || T, v = t.length;
|
|
93
|
+
for (c = se(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || w, p.__i = d, g = pe(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && he(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = ce(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);
|
|
94
|
+
return n.__e = h, c;
|
|
95
|
+
}
|
|
96
|
+
function se(e, t, n, r, i) {
|
|
97
|
+
var a, o, s, c, l, u = n.length, d = u, f = 0;
|
|
98
|
+
for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = k(null, o, null, null, null) : D(o) ? o = e.__k[a] = k(ne, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = k(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = le(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
|
|
99
|
+
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = A(s)), ge(s, s));
|
|
100
|
+
return r;
|
|
101
|
+
}
|
|
102
|
+
function ce(e, t, n) {
|
|
103
|
+
var r, i;
|
|
104
|
+
if (typeof e.type == "function") {
|
|
105
|
+
for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = ce(r[i], t, n));
|
|
106
|
+
return t;
|
|
107
|
+
}
|
|
108
|
+
e.__e != t && (t && e.type && !t.parentNode && (t = A(e)), t = n.insertBefore(e.__e, t || null));
|
|
109
|
+
do
|
|
110
|
+
t &&= t.nextSibling;
|
|
111
|
+
while (t != null && t.nodeType == 8);
|
|
112
|
+
return t;
|
|
113
|
+
}
|
|
114
|
+
function le(e, t, n, r) {
|
|
115
|
+
var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && !(2 & l.__u);
|
|
116
|
+
if (l === null && s == null || u && s == l.key && c == l.type) return n;
|
|
117
|
+
if (r > +!!u) {
|
|
118
|
+
for (i = n - 1, a = n + 1; i >= 0 || a < t.length;) if ((l = t[o = i >= 0 ? i-- : a++]) != null && !(2 & l.__u) && s == l.key && c == l.type) return o;
|
|
119
|
+
}
|
|
120
|
+
return -1;
|
|
121
|
+
}
|
|
122
|
+
function ue(e, t, n) {
|
|
123
|
+
t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || E.test(t) ? n : n + "px";
|
|
124
|
+
}
|
|
125
|
+
function de(e, t, n, r, i) {
|
|
126
|
+
var a, o;
|
|
127
|
+
n: if (t == "style") {
|
|
128
|
+
if (typeof n == "string") e.style.cssText = n;
|
|
129
|
+
else {
|
|
130
|
+
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || ue(e.style, t, "");
|
|
131
|
+
if (n) for (t in n) r && n[t] == r[t] || ue(e.style, t, n[t]);
|
|
132
|
+
}
|
|
133
|
+
} else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(b, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[y] = r[y] : (n[y] = x, e.addEventListener(t, a ? C : S, a)) : e.removeEventListener(t, a ? C : S, a);
|
|
134
|
+
else {
|
|
135
|
+
if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
136
|
+
else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
|
|
137
|
+
e[t] = n ?? "";
|
|
138
|
+
break n;
|
|
139
|
+
} catch {}
|
|
140
|
+
typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function fe(e) {
|
|
144
|
+
return function(t) {
|
|
145
|
+
if (this.l) {
|
|
146
|
+
var n = this.l[t.type + e];
|
|
147
|
+
if (t[v] == null) t[v] = x++;
|
|
148
|
+
else if (t[v] < n[y]) return;
|
|
149
|
+
return n(d.event ? d.event(t) : t);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function pe(e, t, n, r, i, a, o, s, c, l) {
|
|
154
|
+
var u, f, p, m, h, g, _, v, y, b, x, S, C, w, E, te, k = t.type;
|
|
155
|
+
if (t.constructor !== void 0) return null;
|
|
156
|
+
128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = d.__b) && u(t);
|
|
157
|
+
n: if (typeof k == "function") {
|
|
158
|
+
f = o.length;
|
|
159
|
+
try {
|
|
160
|
+
if (y = t.props, b = k.prototype && k.prototype.render, x = (u = k.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? v = (p = t.__c = n.__c).__ = p.__E : (b ? t.__c = p = new k(y, S) : (t.__c = p = new re(y, S), p.constructor = k, p.render = _e), x && x.sub(p), p.state || (p.state = {}), p.__n = r, m = p.__d = !0, p.__h = [], p._sb = []), b && p.__s == null && (p.__s = p.state), b && k.getDerivedStateFromProps != null && (p.__s == p.state && (p.__s = O({}, p.__s)), O(p.__s, k.getDerivedStateFromProps(y, p.__s))), h = p.props, g = p.state, p.__v = t, m) b && k.getDerivedStateFromProps == null && p.componentWillMount != null && p.componentWillMount(), b && p.componentDidMount != null && p.__h.push(p.componentDidMount);
|
|
161
|
+
else {
|
|
162
|
+
if (b && k.getDerivedStateFromProps == null && y !== h && p.componentWillReceiveProps != null && p.componentWillReceiveProps(y, S), t.__v == n.__v || !p.__e && p.shouldComponentUpdate != null && !1 === p.shouldComponentUpdate(y, p.__s, S)) {
|
|
163
|
+
t.__v != n.__v && (p.props = y, p.state = p.__s, p.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(e) {
|
|
164
|
+
e && (e.__ = t);
|
|
165
|
+
}), T.push.apply(p.__h, p._sb), p._sb = [], p.__h.length && o.push(p), s = A(n);
|
|
166
|
+
break n;
|
|
167
|
+
}
|
|
168
|
+
p.componentWillUpdate != null && p.componentWillUpdate(y, p.__s, S), b && p.componentDidUpdate != null && p.__h.push(function() {
|
|
169
|
+
p.componentDidUpdate(h, g, _);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
if (p.context = S, p.props = y, p.__P = e, p.__e = !1, C = d.__r, w = 0, b) p.state = p.__s, p.__d = !1, C && C(t), u = p.render(p.props, p.state, p.context), T.push.apply(p.__h, p._sb), p._sb = [];
|
|
173
|
+
else do
|
|
174
|
+
p.__d = !1, C && C(t), u = p.render(p.props, p.state, p.context), p.state = p.__s;
|
|
175
|
+
while (p.__d && ++w < 25);
|
|
176
|
+
p.state = p.__s, p.getChildContext != null && (r = O(O({}, r), p.getChildContext())), b && !m && p.getSnapshotBeforeUpdate != null && (_ = p.getSnapshotBeforeUpdate(h, g)), E = u != null && u.type === ne && u.key == null ? me(u.props.children) : u, s = oe(e, D(E) ? E : [E], t, n, r, i, a, o, s, c, l), p.base = t.__e, t.__u &= -161, p.__h.length && o.push(p), v && (p.__E = p.__ = null);
|
|
177
|
+
} catch (e) {
|
|
178
|
+
if (o.length = f, t.__v = null, c || a != null) {
|
|
179
|
+
if (e.then) {
|
|
180
|
+
for (t.__u |= c ? 160 : 128; s && s.nodeType == 8 && s.nextSibling;) s = s.nextSibling;
|
|
181
|
+
a != null && (a[a.indexOf(s)] = null), t.__e = s;
|
|
182
|
+
} else if (a != null) for (te = a.length; te--;) ee(a[te]);
|
|
183
|
+
} else t.__e = n.__e;
|
|
184
|
+
t.__k ??= n.__k || [], e.then || N(t), d.__e(e, t, n);
|
|
185
|
+
}
|
|
186
|
+
} else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = F(n.__e, t, n, r, i, a, o, c, l);
|
|
187
|
+
return (u = d.diffed) && u(t), 128 & t.__u ? void 0 : s;
|
|
188
|
+
}
|
|
189
|
+
function N(e) {
|
|
190
|
+
e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(N));
|
|
191
|
+
}
|
|
192
|
+
function P(e, t, n) {
|
|
193
|
+
for (var r = 0; r < n.length; r++) he(n[r], n[++r], n[++r]);
|
|
194
|
+
d.__c && d.__c(t, e), e.some(function(t) {
|
|
195
|
+
try {
|
|
196
|
+
e = t.__h, t.__h = [], e.some(function(e) {
|
|
197
|
+
e.call(t);
|
|
198
|
+
});
|
|
199
|
+
} catch (e) {
|
|
200
|
+
d.__e(e, t.__v);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function me(e) {
|
|
205
|
+
return typeof e != "object" || !e || e.__b > 0 ? e : D(e) ? e.map(me) : e.constructor === void 0 ? O({}, e) : null;
|
|
206
|
+
}
|
|
207
|
+
function F(e, t, n, r, i, a, o, s, c) {
|
|
208
|
+
var l, f, p, m, h, g, _, v = n.props || w, y = t.props, b = t.type;
|
|
209
|
+
if (b == "svg" ? i = "http://www.w3.org/2000/svg" : b == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i ||= "http://www.w3.org/1999/xhtml", a != null) {
|
|
210
|
+
for (l = 0; l < a.length; l++) if ((h = a[l]) && "setAttribute" in h == !!b && (b ? h.localName == b : h.nodeType == 3)) {
|
|
211
|
+
e = h, a[l] = null;
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (e == null) {
|
|
216
|
+
if (b == null) return document.createTextNode(y);
|
|
217
|
+
e = document.createElementNS(i, b, y.is && y), s &&= (d.__m && d.__m(t, a), !1), a = null;
|
|
218
|
+
}
|
|
219
|
+
if (b == null) v === y || s && e.data == y || (e.data = y);
|
|
220
|
+
else {
|
|
221
|
+
if (a = b == "textarea" && y.defaultValue != null ? null : a && u.call(e.childNodes), !s && a != null) for (v = {}, l = 0; l < e.attributes.length; l++) v[(h = e.attributes[l]).name] = h.value;
|
|
222
|
+
for (l in v) h = v[l], l == "dangerouslySetInnerHTML" ? p = h : l == "children" || l in y || l == "value" && "defaultValue" in y || l == "checked" && "defaultChecked" in y || de(e, l, null, h, i);
|
|
223
|
+
for (l in y) h = y[l], l == "children" ? m = h : l == "dangerouslySetInnerHTML" ? f = h : l == "value" ? g = h : l == "checked" ? _ = h : s && typeof h != "function" || v[l] === h || de(e, l, h, v[l], i);
|
|
224
|
+
if (f) s || p && (f.__html == p.__html || f.__html == e.innerHTML) || (e.innerHTML = f.__html), t.__k = [];
|
|
225
|
+
else if (p && (e.innerHTML = ""), oe(t.type == "template" ? e.content : e, D(m) ? m : [m], t, n, r, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && A(n, 0), s, c), a != null) for (l = a.length; l--;) ee(a[l]);
|
|
226
|
+
s && b != "textarea" || (l = "value", b == "progress" && g == null ? e.removeAttribute("value") : g != null && (g !== e[l] || b == "progress" && !g || b == "option" && g != v[l]) && de(e, l, g, v[l], i), l = "checked", _ != null && _ != e[l] && de(e, l, _, v[l], i));
|
|
227
|
+
}
|
|
228
|
+
return e;
|
|
229
|
+
}
|
|
230
|
+
function he(e, t, n) {
|
|
231
|
+
try {
|
|
232
|
+
if (typeof e == "function") {
|
|
233
|
+
var r = typeof e.__u == "function";
|
|
234
|
+
r && e.__u(), r && t == null || (e.__u = e(t));
|
|
235
|
+
} else e.current = t;
|
|
236
|
+
} catch (e) {
|
|
237
|
+
d.__e(e, n);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
function ge(e, t, n) {
|
|
241
|
+
var r, i;
|
|
242
|
+
if (d.unmount && d.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || he(r, null, t)), (r = e.__c) != null) {
|
|
243
|
+
if (r.componentWillUnmount) try {
|
|
244
|
+
r.componentWillUnmount();
|
|
245
|
+
} catch (e) {
|
|
246
|
+
d.__e(e, t);
|
|
247
|
+
}
|
|
248
|
+
r.base = r.__P = r.__n = null;
|
|
249
|
+
}
|
|
250
|
+
if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && ge(r[i], t, n || typeof e.type != "function");
|
|
251
|
+
n || ee(e.__e), e.__c = e.__ = e.__e = void 0;
|
|
252
|
+
}
|
|
253
|
+
function _e(e, t, n) {
|
|
254
|
+
return this.constructor(e, n);
|
|
255
|
+
}
|
|
256
|
+
function I(e, t, n) {
|
|
257
|
+
var r, i, a, o;
|
|
258
|
+
t == document && (t = document.documentElement), d.__ && d.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], pe(t, e = (!r && n || t).__k = te(ne, null, [e]), i || w, w, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? u.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), P(a, e, o), e.props.children = null;
|
|
259
|
+
}
|
|
260
|
+
u = T.slice, d = { __e: function(e, t, n, r) {
|
|
261
|
+
for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
|
|
262
|
+
if ((a = i.constructor) && a.getDerivedStateFromError != null && (i.setState(a.getDerivedStateFromError(e)), o = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, r || {}), o = i.__d), o) return i.__E = i;
|
|
263
|
+
} catch (t) {
|
|
264
|
+
e = t;
|
|
265
|
+
}
|
|
266
|
+
throw e;
|
|
267
|
+
} }, f = 0, re.prototype.setState = function(e, t) {
|
|
268
|
+
var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = O({}, this.state);
|
|
269
|
+
typeof e == "function" && (e = e(O({}, n), this.props)), e && O(n, e), e != null && this.__v && (t && this._sb.push(t), ae(this));
|
|
270
|
+
}, re.prototype.forceUpdate = function(e) {
|
|
271
|
+
this.__v && (this.__e = !0, e && this.__h.push(e), ae(this));
|
|
272
|
+
}, re.prototype.render = ne, p = [], h = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, g = function(e, t) {
|
|
273
|
+
return e.__v.__b - t.__v.__b;
|
|
274
|
+
}, M.__r = 0, _ = Math.random().toString(8), v = "__d" + _, y = "__a" + _, b = /(PointerCapture)$|Capture$/i, x = 0, S = fe(!1), C = fe(!0);
|
|
275
|
+
//#endregion
|
|
17
276
|
//#region node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
18
|
-
var
|
|
277
|
+
var L = 0;
|
|
19
278
|
Array.isArray;
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
if ("ref" in
|
|
24
|
-
var
|
|
25
|
-
type:
|
|
26
|
-
props:
|
|
27
|
-
key:
|
|
28
|
-
ref:
|
|
279
|
+
function R(e, t, n, r, i, a) {
|
|
280
|
+
t ||= {};
|
|
281
|
+
var o, s, c = t;
|
|
282
|
+
if ("ref" in c) for (s in c = {}, t) s == "ref" ? o = t[s] : c[s] = t[s];
|
|
283
|
+
var l = {
|
|
284
|
+
type: e,
|
|
285
|
+
props: c,
|
|
286
|
+
key: n,
|
|
287
|
+
ref: o,
|
|
29
288
|
__k: null,
|
|
30
289
|
__: null,
|
|
31
290
|
__b: 0,
|
|
32
291
|
__e: null,
|
|
33
292
|
__c: null,
|
|
34
293
|
constructor: void 0,
|
|
35
|
-
__v: --
|
|
294
|
+
__v: --L,
|
|
36
295
|
__i: -1,
|
|
37
296
|
__u: 0,
|
|
38
|
-
__source:
|
|
39
|
-
__self:
|
|
297
|
+
__source: i,
|
|
298
|
+
__self: a
|
|
40
299
|
};
|
|
41
|
-
if (typeof
|
|
42
|
-
return
|
|
300
|
+
if (typeof e == "function" && (o = e.defaultProps)) for (s in o) c[s] === void 0 && (c[s] = o[s]);
|
|
301
|
+
return d.vnode && d.vnode(l), l;
|
|
43
302
|
}
|
|
44
303
|
//#endregion
|
|
45
304
|
//#region src/components/shared/toolbar/Style/Components/StyleToolbar.jsx
|
|
46
|
-
function
|
|
305
|
+
function ve() {
|
|
47
306
|
let e = "forge-dropdown-item block w-full text-left cursor-pointer whitespace-nowrap px-3 py-1 text-[#333] no-underline transition-colors duration-100 hover:bg-[#f0f0f0]";
|
|
48
|
-
return /* @__PURE__ */
|
|
307
|
+
return /* @__PURE__ */ R("div", {
|
|
49
308
|
className: "forge-toolbar-group forge-toolbar-style flex items-center gap-0.5",
|
|
50
|
-
children: /* @__PURE__ */
|
|
309
|
+
children: /* @__PURE__ */ R("div", {
|
|
51
310
|
className: "relative group",
|
|
52
|
-
children: [/* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ R("button", {
|
|
53
312
|
type: "button",
|
|
54
313
|
className: "forge-toolbar-button group relative flex h-7 cursor-pointer items-center justify-center rounded-[2px] border border-[#ccc] bg-white px-2 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px [&.is-active]:bg-[#e5e5e5]",
|
|
55
314
|
"data-command": "style",
|
|
56
315
|
"aria-label": "Style",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ R("span", {
|
|
58
317
|
className: "forge-icon",
|
|
59
318
|
children: "✦"
|
|
60
|
-
}), /* @__PURE__ */
|
|
319
|
+
}), /* @__PURE__ */ R("span", {
|
|
61
320
|
className: "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 group-has-[.is-open]:hidden rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]",
|
|
62
321
|
"data-i18n": "style",
|
|
63
322
|
children: "Style"
|
|
64
323
|
})]
|
|
65
|
-
}), /* @__PURE__ */
|
|
324
|
+
}), /* @__PURE__ */ R("div", {
|
|
66
325
|
className: "forge-toolbar-dropdown forge-dropdown-style absolute left-0 top-[calc(100%+4px)] z-20 hidden [&.is-open]:block max-h-24 min-w-[110px] overflow-y-auto rounded-[2px] border border-[#ccc] bg-white p-0 shadow-[0_2px_6px_rgba(0,0,0,0.15)] rtl:left-auto rtl:right-0",
|
|
67
326
|
role: "list",
|
|
68
327
|
"aria-label": "Style",
|
|
69
328
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ R("button", {
|
|
71
330
|
type: "button",
|
|
72
331
|
className: e,
|
|
73
332
|
"data-value": "p",
|
|
74
333
|
role: "listitem",
|
|
75
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ R("p", {
|
|
76
335
|
className: "m-0 text-[13px] font-normal leading-[1.4]",
|
|
77
336
|
children: "Normal"
|
|
78
337
|
})
|
|
79
338
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ R("button", {
|
|
81
340
|
type: "button",
|
|
82
341
|
className: e,
|
|
83
342
|
"data-value": "blockquote",
|
|
84
343
|
role: "listitem",
|
|
85
|
-
children: /* @__PURE__ */
|
|
344
|
+
children: /* @__PURE__ */ R("blockquote", {
|
|
86
345
|
className: "m-0 text-[13px] font-normal leading-[1.4]",
|
|
87
346
|
children: "Blockquote"
|
|
88
347
|
})
|
|
89
348
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ R("button", {
|
|
91
350
|
type: "button",
|
|
92
351
|
className: e,
|
|
93
352
|
"data-value": "pre",
|
|
94
353
|
role: "listitem",
|
|
95
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */ R("pre", {
|
|
96
355
|
className: "m-0 font-mono text-[13px] leading-[1.4]",
|
|
97
356
|
children: "Code"
|
|
98
357
|
})
|
|
99
358
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ R("button", {
|
|
101
360
|
type: "button",
|
|
102
361
|
className: e,
|
|
103
362
|
"data-value": "h1",
|
|
104
363
|
role: "listitem",
|
|
105
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ R("h1", {
|
|
106
365
|
className: "m-0 text-[20px] font-normal leading-[1.4]",
|
|
107
366
|
children: "Heading 1"
|
|
108
367
|
})
|
|
109
368
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ R("button", {
|
|
111
370
|
type: "button",
|
|
112
371
|
className: e,
|
|
113
372
|
"data-value": "h2",
|
|
114
373
|
role: "listitem",
|
|
115
|
-
children: /* @__PURE__ */
|
|
374
|
+
children: /* @__PURE__ */ R("h2", {
|
|
116
375
|
className: "m-0 text-[18px] font-normal leading-[1.4]",
|
|
117
376
|
children: "Heading 2"
|
|
118
377
|
})
|
|
119
378
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ R("button", {
|
|
121
380
|
type: "button",
|
|
122
381
|
className: e,
|
|
123
382
|
"data-value": "h3",
|
|
124
383
|
role: "listitem",
|
|
125
|
-
children: /* @__PURE__ */
|
|
384
|
+
children: /* @__PURE__ */ R("h3", {
|
|
126
385
|
className: "m-0 text-[16px] font-normal leading-[1.4]",
|
|
127
386
|
children: "Heading 3"
|
|
128
387
|
})
|
|
129
388
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ R("button", {
|
|
131
390
|
type: "button",
|
|
132
391
|
className: e,
|
|
133
392
|
"data-value": "h4",
|
|
134
393
|
role: "listitem",
|
|
135
|
-
children: /* @__PURE__ */
|
|
394
|
+
children: /* @__PURE__ */ R("h4", {
|
|
136
395
|
className: "m-0 text-[15px] font-normal leading-[1.4]",
|
|
137
396
|
children: "Heading 4"
|
|
138
397
|
})
|
|
139
398
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ R("button", {
|
|
141
400
|
type: "button",
|
|
142
401
|
className: e,
|
|
143
402
|
"data-value": "h5",
|
|
144
403
|
role: "listitem",
|
|
145
|
-
children: /* @__PURE__ */
|
|
404
|
+
children: /* @__PURE__ */ R("h5", {
|
|
146
405
|
className: "m-0 text-[14px] font-normal leading-[1.4]",
|
|
147
406
|
children: "Heading 5"
|
|
148
407
|
})
|
|
149
408
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ R("button", {
|
|
151
410
|
type: "button",
|
|
152
411
|
className: e,
|
|
153
412
|
"data-value": "h6",
|
|
154
413
|
role: "listitem",
|
|
155
|
-
children: /* @__PURE__ */
|
|
414
|
+
children: /* @__PURE__ */ R("h6", {
|
|
156
415
|
className: "m-0 text-[13px] font-normal leading-[1.4]",
|
|
157
416
|
children: "Heading 6"
|
|
158
417
|
})
|
|
@@ -164,58 +423,58 @@ function l() {
|
|
|
164
423
|
}
|
|
165
424
|
//#endregion
|
|
166
425
|
//#region src/components/shared/toolbar/Style/Components/index.jsx
|
|
167
|
-
function
|
|
168
|
-
return
|
|
426
|
+
function z() {
|
|
427
|
+
return ve();
|
|
169
428
|
}
|
|
170
429
|
//#endregion
|
|
171
430
|
//#region src/components/shared/toolbar/font/Components/FontToolbar.jsx
|
|
172
|
-
function
|
|
431
|
+
function B({ onCommand: e, isBold: t, isUnderline: n }) {
|
|
173
432
|
let r = "group relative flex h-7 w-7 items-center justify-center p-0 text-sm leading-none cursor-pointer transition-colors duration-150 active:translate-y-px", i = "bg-white text-[#333] hover:bg-[#f0f0f0]", a = "bg-[#e2e8f0] text-black border-inner shadow-[inset_0_1px_3px_rgba(0,0,0,0.2)] font-bold", o = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
|
|
174
|
-
return /* @__PURE__ */
|
|
433
|
+
return /* @__PURE__ */ R("div", {
|
|
175
434
|
className: "forge-toolbar-group forge-toolbar-font inline-flex items-center rounded-sm border border-[#ccc] bg-white divide-x divide-[#ccc] rtl:divide-x-reverse",
|
|
176
435
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ R("button", {
|
|
178
437
|
type: "button",
|
|
179
438
|
className: `${r} ${t ? a : i}`,
|
|
180
439
|
onClick: () => e("bold"),
|
|
181
440
|
"aria-label": "Bold",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: [/* @__PURE__ */ R("span", {
|
|
183
442
|
className: "text-sm font-bold font-serif",
|
|
184
443
|
children: "B"
|
|
185
|
-
}), /* @__PURE__ */
|
|
444
|
+
}), /* @__PURE__ */ R("span", {
|
|
186
445
|
className: o,
|
|
187
446
|
"data-i18n": "bold",
|
|
188
447
|
children: "Bold"
|
|
189
448
|
})]
|
|
190
449
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ R("button", {
|
|
192
451
|
type: "button",
|
|
193
452
|
className: `${r} ${n ? a : i}`,
|
|
194
453
|
onClick: () => e("underline"),
|
|
195
454
|
"aria-label": "Underline",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ R("span", {
|
|
197
456
|
className: "text-sm font-bold font-serif underline",
|
|
198
457
|
children: "U"
|
|
199
|
-
}), /* @__PURE__ */
|
|
458
|
+
}), /* @__PURE__ */ R("span", {
|
|
200
459
|
className: o,
|
|
201
460
|
"data-i18n": "underline",
|
|
202
461
|
children: "Underline"
|
|
203
462
|
})]
|
|
204
463
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ R("button", {
|
|
206
465
|
type: "button",
|
|
207
466
|
className: `${r} ${i}`,
|
|
208
467
|
onClick: () => e("removeFormat"),
|
|
209
468
|
"aria-label": "Remove Font Style",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
469
|
+
children: [/* @__PURE__ */ R("span", {
|
|
211
470
|
className: "inline-block h-4 w-4 text-center text-sm leading-none",
|
|
212
|
-
children: /* @__PURE__ */
|
|
471
|
+
children: /* @__PURE__ */ R("svg", {
|
|
213
472
|
viewBox: "0 0 20 20",
|
|
214
473
|
className: "block h-4 w-4 fill-none stroke-black",
|
|
215
474
|
strokeWidth: "2",
|
|
216
|
-
children: /* @__PURE__ */
|
|
475
|
+
children: /* @__PURE__ */ R("path", { d: "M 4 4 L 16 16 M 16 4 L 4 16" })
|
|
217
476
|
})
|
|
218
|
-
}), /* @__PURE__ */
|
|
477
|
+
}), /* @__PURE__ */ R("span", {
|
|
219
478
|
className: o,
|
|
220
479
|
"data-i18n": "removeFormat",
|
|
221
480
|
children: "Remove Font Style"
|
|
@@ -225,8 +484,140 @@ function d({ onCommand: e, isBold: t, isUnderline: n }) {
|
|
|
225
484
|
});
|
|
226
485
|
}
|
|
227
486
|
//#endregion
|
|
487
|
+
//#region node_modules/preact/hooks/dist/hooks.module.js
|
|
488
|
+
var ye, V, be, H, xe = 0, Se = [], U = d, Ce = U.__b, we = U.__r, Te = U.diffed, Ee = U.__c, De = U.unmount, Oe = U.__;
|
|
489
|
+
function W(e, t) {
|
|
490
|
+
U.__h && U.__h(V, e, xe || t), xe = 0;
|
|
491
|
+
var n = V.__H || (V.__H = {
|
|
492
|
+
__: [],
|
|
493
|
+
__h: []
|
|
494
|
+
});
|
|
495
|
+
return e >= n.__.length && n.__.push({}), n.__[e];
|
|
496
|
+
}
|
|
497
|
+
function G(e) {
|
|
498
|
+
return xe = 1, ke(Le, e);
|
|
499
|
+
}
|
|
500
|
+
function ke(e, t, n) {
|
|
501
|
+
var r = W(ye++, 2);
|
|
502
|
+
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Le(void 0, t), function(e) {
|
|
503
|
+
var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
|
|
504
|
+
t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
|
|
505
|
+
}], r.__c = V, !V.__f)) {
|
|
506
|
+
var i = function(e, t, n) {
|
|
507
|
+
if (!r.__c.__H) return !0;
|
|
508
|
+
var i = !1, o = r.__c.props !== e;
|
|
509
|
+
if (r.__c.__H.__.some(function(e) {
|
|
510
|
+
if (e.__N) {
|
|
511
|
+
i = !0;
|
|
512
|
+
var t = e.__[0];
|
|
513
|
+
e.__ = e.__N, e.__N = void 0, t !== e.__[0] && (o = !0);
|
|
514
|
+
}
|
|
515
|
+
}), a) {
|
|
516
|
+
var s = a.call(this, e, t, n);
|
|
517
|
+
return i ? s || o : s;
|
|
518
|
+
}
|
|
519
|
+
return !i || o;
|
|
520
|
+
};
|
|
521
|
+
V.__f = !0;
|
|
522
|
+
var a = V.shouldComponentUpdate, o = V.componentWillUpdate;
|
|
523
|
+
V.componentWillUpdate = function(e, t, n) {
|
|
524
|
+
if (this.__e) {
|
|
525
|
+
var r = a;
|
|
526
|
+
a = void 0, i(e, t, n), a = r;
|
|
527
|
+
}
|
|
528
|
+
o && o.call(this, e, t, n);
|
|
529
|
+
}, V.shouldComponentUpdate = i;
|
|
530
|
+
}
|
|
531
|
+
return r.__N || r.__;
|
|
532
|
+
}
|
|
533
|
+
function K(e, t) {
|
|
534
|
+
var n = W(ye++, 3);
|
|
535
|
+
!U.__s && Ie(n.__H, t) && (n.__ = e, n.u = t, V.__H.__h.push(n));
|
|
536
|
+
}
|
|
537
|
+
function q(e) {
|
|
538
|
+
return xe = 5, Ae(function() {
|
|
539
|
+
return { current: e };
|
|
540
|
+
}, []);
|
|
541
|
+
}
|
|
542
|
+
function Ae(e, t) {
|
|
543
|
+
var n = W(ye++, 7);
|
|
544
|
+
return Ie(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
545
|
+
}
|
|
546
|
+
function je() {
|
|
547
|
+
for (var e; e = Se.shift();) {
|
|
548
|
+
var t = e.__H;
|
|
549
|
+
if (e.__P && t) try {
|
|
550
|
+
t.__h.some(Pe), t.__h.some(Fe), t.__h = [];
|
|
551
|
+
} catch (n) {
|
|
552
|
+
t.__h = [], U.__e(n, e.__v);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
U.__b = function(e) {
|
|
557
|
+
V = null, Ce && Ce(e);
|
|
558
|
+
}, U.__ = function(e, t) {
|
|
559
|
+
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Oe && Oe(e, t);
|
|
560
|
+
}, U.__r = function(e) {
|
|
561
|
+
we && we(e), ye = 0;
|
|
562
|
+
var t = (V = e.__c).__H;
|
|
563
|
+
t && (be === V ? (t.__h = [], V.__h = [], t.__.some(function(e) {
|
|
564
|
+
e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
|
|
565
|
+
})) : (t.__h.some(Pe), t.__h.some(Fe), t.__h = [], ye = 0)), be = V;
|
|
566
|
+
}, U.diffed = function(e) {
|
|
567
|
+
Te && Te(e);
|
|
568
|
+
var t = e.__c;
|
|
569
|
+
t && t.__H && (t.__H.__h.length && (Se.push(t) !== 1 && H === U.requestAnimationFrame || ((H = U.requestAnimationFrame) || Ne)(je)), t.__H.__.some(function(e) {
|
|
570
|
+
e.u &&= (e.__H = e.u, void 0);
|
|
571
|
+
})), be = V = null;
|
|
572
|
+
}, U.__c = function(e, t) {
|
|
573
|
+
t.some(function(e) {
|
|
574
|
+
try {
|
|
575
|
+
e.__h.some(Pe), e.__h = e.__h.filter(function(e) {
|
|
576
|
+
return !e.__ || Fe(e);
|
|
577
|
+
});
|
|
578
|
+
} catch (n) {
|
|
579
|
+
t.some(function(e) {
|
|
580
|
+
e.__h &&= [];
|
|
581
|
+
}), t = [], U.__e(n, e.__v);
|
|
582
|
+
}
|
|
583
|
+
}), Ee && Ee(e, t);
|
|
584
|
+
}, U.unmount = function(e) {
|
|
585
|
+
De && De(e);
|
|
586
|
+
var t, n = e.__c;
|
|
587
|
+
n && n.__H && (n.__H.__.some(function(e) {
|
|
588
|
+
try {
|
|
589
|
+
Pe(e);
|
|
590
|
+
} catch (e) {
|
|
591
|
+
t = e;
|
|
592
|
+
}
|
|
593
|
+
}), n.__H = void 0, t && U.__e(t, n.__v));
|
|
594
|
+
};
|
|
595
|
+
var Me = typeof requestAnimationFrame == "function";
|
|
596
|
+
function Ne(e) {
|
|
597
|
+
var t, n = function() {
|
|
598
|
+
clearTimeout(r), Me && cancelAnimationFrame(t), setTimeout(e);
|
|
599
|
+
}, r = setTimeout(n, 35);
|
|
600
|
+
Me && (t = requestAnimationFrame(n));
|
|
601
|
+
}
|
|
602
|
+
function Pe(e) {
|
|
603
|
+
var t = V, n = e.__c;
|
|
604
|
+
typeof n == "function" && (e.__c = void 0, n()), V = t;
|
|
605
|
+
}
|
|
606
|
+
function Fe(e) {
|
|
607
|
+
var t = V;
|
|
608
|
+
e.__c = e.__(), V = t;
|
|
609
|
+
}
|
|
610
|
+
function Ie(e, t) {
|
|
611
|
+
return !e || e.length !== t.length || t.some(function(t, n) {
|
|
612
|
+
return t !== e[n];
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
function Le(e, t) {
|
|
616
|
+
return typeof t == "function" ? t(e) : t;
|
|
617
|
+
}
|
|
618
|
+
//#endregion
|
|
228
619
|
//#region src/components/shared/toolbar/font/Hooks/boldHandler.jsx
|
|
229
|
-
var
|
|
620
|
+
var Re = (e, t, n) => {
|
|
230
621
|
if (!e.collapsed) {
|
|
231
622
|
if (n) {
|
|
232
623
|
let t = e.commonAncestorContainer;
|
|
@@ -260,7 +651,7 @@ var f = (e, t, n) => {
|
|
|
260
651
|
let r = document.createRange();
|
|
261
652
|
r.setStart(n, 1), r.collapse(!0), t.removeAllRanges(), t.addRange(r);
|
|
262
653
|
}
|
|
263
|
-
},
|
|
654
|
+
}, ze = (e, t, n) => {
|
|
264
655
|
if (!e.collapsed) {
|
|
265
656
|
if (n) {
|
|
266
657
|
let t = e.commonAncestorContainer;
|
|
@@ -294,10 +685,10 @@ var f = (e, t, n) => {
|
|
|
294
685
|
let r = document.createRange();
|
|
295
686
|
r.setStart(n, 1), r.collapse(!0), t.removeAllRanges(), t.addRange(r);
|
|
296
687
|
}
|
|
297
|
-
},
|
|
688
|
+
}, Be = (e) => {
|
|
298
689
|
let t = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, null, !1), n;
|
|
299
690
|
for (; n = t.nextNode();) n.nodeValue = n.nodeValue.replace(/\u00A0/g, " ");
|
|
300
|
-
},
|
|
691
|
+
}, Ve = (e) => {
|
|
301
692
|
e.querySelectorAll("span, b, u, strong").forEach((e) => {
|
|
302
693
|
let t = e.getAttribute("style") || e.getAttribute("class"), n = [
|
|
303
694
|
"B",
|
|
@@ -310,7 +701,7 @@ var f = (e, t, n) => {
|
|
|
310
701
|
t.removeChild(e);
|
|
311
702
|
} else (!e.textContent || e.textContent.replace(/\u200B/g, "").length === 0) && e.remove();
|
|
312
703
|
});
|
|
313
|
-
},
|
|
704
|
+
}, He = (e, t) => {
|
|
314
705
|
if (e.collapsed) return;
|
|
315
706
|
let n = e.commonAncestorContainer;
|
|
316
707
|
for (n.nodeType === 3 && (n = n.parentNode); n && n.getAttribute && n.getAttribute("contenteditable") !== "true";) {
|
|
@@ -319,42 +710,42 @@ var f = (e, t, n) => {
|
|
|
319
710
|
n = n.parentNode;
|
|
320
711
|
}
|
|
321
712
|
let r = e.extractContents().textContent.replace(/\u00A0/g, " "), i = document.createTextNode(r);
|
|
322
|
-
e.insertNode(i), n && n.getAttribute("contenteditable") !== "true" && (
|
|
713
|
+
e.insertNode(i), n && n.getAttribute("contenteditable") !== "true" && (Ve(n), Be(n), n.normalize());
|
|
323
714
|
let a = document.createRange();
|
|
324
715
|
a.selectNodeContents(i), t.removeAllRanges(), t.addRange(a);
|
|
325
716
|
};
|
|
326
717
|
//#endregion
|
|
327
718
|
//#region src/components/shared/toolbar/font/Hooks/fontLogic.jsx
|
|
328
|
-
function
|
|
329
|
-
let [e, t] =
|
|
719
|
+
function Ue() {
|
|
720
|
+
let [e, t] = G(!1), [n, r] = G(!1), i = () => {
|
|
330
721
|
let e = window.getSelection();
|
|
331
722
|
if (!e || e.rangeCount === 0) return;
|
|
332
723
|
let n = e.anchorNode;
|
|
333
724
|
if (!n) return;
|
|
334
725
|
n.nodeType === 3 && (n = n.parentNode);
|
|
335
|
-
let
|
|
726
|
+
let i = !1, a = !1;
|
|
336
727
|
for (; n && n.getAttribute && n.getAttribute("contenteditable") !== "true";) {
|
|
337
728
|
let e = window.getComputedStyle(n).fontWeight, t = window.getComputedStyle(n).textDecoration;
|
|
338
|
-
(e === "bold" || parseInt(e) >= 700 || n.tagName === "B" || n.tagName === "STRONG") && (
|
|
729
|
+
(e === "bold" || parseInt(e) >= 700 || n.tagName === "B" || n.tagName === "STRONG") && (i = !0), (t.includes("underline") || n.tagName === "U") && (a = !0), n = n.parentNode;
|
|
339
730
|
}
|
|
340
|
-
t(
|
|
731
|
+
t(i), r(a);
|
|
341
732
|
};
|
|
342
|
-
return
|
|
733
|
+
return K(() => (document.addEventListener("selectionchange", i), () => document.removeEventListener("selectionchange", i)), []), {
|
|
343
734
|
executeCommand: (t) => {
|
|
344
|
-
let
|
|
345
|
-
if (!
|
|
346
|
-
let
|
|
347
|
-
t === "bold" ?
|
|
735
|
+
let r = window.getSelection();
|
|
736
|
+
if (!r || r.rangeCount === 0) return;
|
|
737
|
+
let a = r.getRangeAt(0);
|
|
738
|
+
t === "bold" ? Re(a, r, e) : t === "underline" ? ze(a, r, n) : t === "removeFormat" && He(a, r), i();
|
|
348
739
|
},
|
|
349
740
|
isBold: e,
|
|
350
|
-
isUnderline:
|
|
741
|
+
isUnderline: n
|
|
351
742
|
};
|
|
352
743
|
}
|
|
353
744
|
//#endregion
|
|
354
745
|
//#region src/components/shared/toolbar/font/Components/index.jsx
|
|
355
|
-
function
|
|
356
|
-
let { executeCommand: e, isBold: t, isUnderline: n } =
|
|
357
|
-
return /* @__PURE__ */
|
|
746
|
+
function J() {
|
|
747
|
+
let { executeCommand: e, isBold: t, isUnderline: n } = Ue();
|
|
748
|
+
return /* @__PURE__ */ R(B, {
|
|
358
749
|
onCommand: e,
|
|
359
750
|
isBold: t,
|
|
360
751
|
isUnderline: n
|
|
@@ -362,7 +753,7 @@ function v() {
|
|
|
362
753
|
}
|
|
363
754
|
//#endregion
|
|
364
755
|
//#region src/components/shared/toolbar/FontName/Hooks/fontNameHandler.jsx
|
|
365
|
-
var
|
|
756
|
+
var We = (e, t, n) => {
|
|
366
757
|
let r = n || "Arial";
|
|
367
758
|
if (!e || !t) return;
|
|
368
759
|
if (!e.collapsed) {
|
|
@@ -384,7 +775,7 @@ var y = (e, t, n) => {
|
|
|
384
775
|
i.appendChild(a), e.insertNode(i);
|
|
385
776
|
let o = document.createRange();
|
|
386
777
|
o.setStart(i.firstChild, 1), o.collapse(!0), t.removeAllRanges(), t.addRange(o);
|
|
387
|
-
},
|
|
778
|
+
}, Ge = (e) => {
|
|
388
779
|
let t = window.getSelection();
|
|
389
780
|
if (!t || t.rangeCount === 0) return null;
|
|
390
781
|
let n = t.anchorNode;
|
|
@@ -401,63 +792,63 @@ var y = (e, t, n) => {
|
|
|
401
792
|
};
|
|
402
793
|
//#endregion
|
|
403
794
|
//#region src/components/shared/toolbar/FontName/Hooks/fontNameLogic.jsx
|
|
404
|
-
function
|
|
405
|
-
let [t,
|
|
795
|
+
function Ke(e) {
|
|
796
|
+
let [t, n] = G("Arial"), r = q("Arial"), i = q(null), a = () => {
|
|
406
797
|
let t = window.getSelection();
|
|
407
798
|
if (t && t.rangeCount > 0) {
|
|
408
799
|
let n = t.getRangeAt(0), r = e?.current;
|
|
409
|
-
r && r.contains(n.commonAncestorContainer) && (
|
|
800
|
+
r && r.contains(n.commonAncestorContainer) && (i.current = n.cloneRange());
|
|
410
801
|
}
|
|
411
|
-
},
|
|
802
|
+
}, o = () => {
|
|
412
803
|
let t = e?.current;
|
|
413
804
|
if (!t) return;
|
|
414
|
-
let
|
|
415
|
-
|
|
805
|
+
let i = Ge(t);
|
|
806
|
+
i && (n(i), r.current = i);
|
|
416
807
|
};
|
|
417
|
-
return
|
|
808
|
+
return K(() => {
|
|
418
809
|
let t = () => {
|
|
419
|
-
|
|
810
|
+
a(), o();
|
|
420
811
|
};
|
|
421
812
|
document.addEventListener("selectionchange", t);
|
|
422
813
|
let n = e?.current;
|
|
423
814
|
if (!n) return () => {
|
|
424
815
|
document.removeEventListener("selectionchange", t);
|
|
425
816
|
};
|
|
426
|
-
let
|
|
817
|
+
let i = (e) => {
|
|
427
818
|
if (e.inputType !== "insertText" || !e.data) return;
|
|
428
819
|
let t = window.getSelection();
|
|
429
820
|
if (!t || t.rangeCount === 0) return;
|
|
430
|
-
let n = t.getRangeAt(0),
|
|
431
|
-
if (
|
|
821
|
+
let n = t.getRangeAt(0), i = n.startContainer;
|
|
822
|
+
if (i.nodeType === 3 && (i = i.parentNode), i && i.tagName === "SPAN" && i.style.fontFamily && i.style.fontFamily.replace(/['"]/g, "").toLowerCase() === r.current.toLowerCase()) return;
|
|
432
823
|
e.preventDefault();
|
|
433
|
-
let
|
|
434
|
-
|
|
435
|
-
let
|
|
436
|
-
|
|
824
|
+
let a = document.createElement("span");
|
|
825
|
+
a.style.fontFamily = r.current, a.textContent = e.data, n.deleteContents(), n.insertNode(a);
|
|
826
|
+
let o = document.createRange();
|
|
827
|
+
o.setStart(a.firstChild, a.textContent.length), o.collapse(!0), t.removeAllRanges(), t.addRange(o);
|
|
437
828
|
};
|
|
438
|
-
return n.addEventListener("beforeinput",
|
|
439
|
-
document.removeEventListener("selectionchange", t), n.removeEventListener("beforeinput",
|
|
829
|
+
return n.addEventListener("beforeinput", i), () => {
|
|
830
|
+
document.removeEventListener("selectionchange", t), n.removeEventListener("beforeinput", i);
|
|
440
831
|
};
|
|
441
832
|
}, [e, e?.current]), {
|
|
442
833
|
currentFont: t,
|
|
443
834
|
applyFont: (t) => {
|
|
444
|
-
let
|
|
445
|
-
|
|
446
|
-
let
|
|
447
|
-
if (!
|
|
448
|
-
|
|
449
|
-
let
|
|
450
|
-
if (
|
|
835
|
+
let o = t || "Arial";
|
|
836
|
+
r.current = o, n(o);
|
|
837
|
+
let s = e?.current;
|
|
838
|
+
if (!s) return;
|
|
839
|
+
s.focus();
|
|
840
|
+
let c = window.getSelection(), l = null;
|
|
841
|
+
if (i.current ? (c.removeAllRanges(), c.addRange(i.current), l = i.current) : c.rangeCount > 0 && (l = c.getRangeAt(0)), !l) {
|
|
451
842
|
let e = document.createRange();
|
|
452
|
-
e.selectNodeContents(
|
|
843
|
+
e.selectNodeContents(s), e.collapse(!1), c.removeAllRanges(), c.addRange(e), l = e;
|
|
453
844
|
}
|
|
454
|
-
|
|
845
|
+
We(l, c, o), a();
|
|
455
846
|
}
|
|
456
847
|
};
|
|
457
848
|
}
|
|
458
849
|
//#endregion
|
|
459
850
|
//#region src/components/shared/toolbar/Hooks/dropdown.js
|
|
460
|
-
function
|
|
851
|
+
function qe(e, t) {
|
|
461
852
|
function n() {
|
|
462
853
|
t.classList.remove("is-open"), e.classList.remove("is-active"), document.removeEventListener("click", r);
|
|
463
854
|
}
|
|
@@ -479,7 +870,7 @@ function x(e, t) {
|
|
|
479
870
|
}
|
|
480
871
|
//#endregion
|
|
481
872
|
//#region src/components/shared/toolbar/FontName/Components/FontNameToolbar.jsx
|
|
482
|
-
var
|
|
873
|
+
var Je = [
|
|
483
874
|
"Arial",
|
|
484
875
|
"Arial Black",
|
|
485
876
|
"Comic Sans MS",
|
|
@@ -491,66 +882,66 @@ var S = [
|
|
|
491
882
|
"Verdana",
|
|
492
883
|
"Nunito Sans",
|
|
493
884
|
"Segoe UI"
|
|
494
|
-
],
|
|
495
|
-
function
|
|
496
|
-
let
|
|
497
|
-
|
|
498
|
-
if (
|
|
885
|
+
], Ye = 32;
|
|
886
|
+
function Xe({ currentFont: e, applyFont: t }) {
|
|
887
|
+
let n = q(null), r = q(null);
|
|
888
|
+
K(() => {
|
|
889
|
+
if (n.current && r.current) return qe(n.current, r.current);
|
|
499
890
|
}, []);
|
|
500
|
-
let
|
|
501
|
-
t(e),
|
|
502
|
-
},
|
|
503
|
-
return /* @__PURE__ */
|
|
891
|
+
let i = (e) => {
|
|
892
|
+
t(e), r.current && r.current.classList.remove("is-open"), n.current && n.current.classList.remove("is-active");
|
|
893
|
+
}, a = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
|
|
894
|
+
return /* @__PURE__ */ R("div", {
|
|
504
895
|
className: "forge-toolbar-group forge-toolbar-fontname relative flex items-center",
|
|
505
|
-
children: [/* @__PURE__ */
|
|
896
|
+
children: [/* @__PURE__ */ R("div", {
|
|
506
897
|
className: "forge-color-button-group flex h-[30px] items-center overflow-visible rounded border border-[#ccc] bg-white hover:border-[#aaa] hover:bg-[#f9f9f9]",
|
|
507
|
-
children: [/* @__PURE__ */
|
|
898
|
+
children: [/* @__PURE__ */ R("button", {
|
|
508
899
|
type: "button",
|
|
509
900
|
className: "forge-fontname-main group relative flex h-full items-center justify-center min-w-[70px] cursor-pointer border-none bg-transparent px-2 hover:bg-black/5",
|
|
510
901
|
onMouseDown: (e) => e.preventDefault(),
|
|
511
902
|
onClick: () => {
|
|
512
|
-
|
|
903
|
+
n.current && n.current.click();
|
|
513
904
|
},
|
|
514
905
|
"aria-label": "Current font",
|
|
515
|
-
children: [/* @__PURE__ */
|
|
906
|
+
children: [/* @__PURE__ */ R("span", {
|
|
516
907
|
className: "forge-current-fontname max-w-[65px] truncate text-xs text-[#333]",
|
|
517
908
|
style: { fontFamily: e },
|
|
518
909
|
children: e
|
|
519
|
-
}), /* @__PURE__ */
|
|
520
|
-
className:
|
|
910
|
+
}), /* @__PURE__ */ R("span", {
|
|
911
|
+
className: a,
|
|
521
912
|
"data-i18n": "fontName",
|
|
522
913
|
children: "Font Family"
|
|
523
914
|
})]
|
|
524
|
-
}), /* @__PURE__ */
|
|
525
|
-
ref:
|
|
915
|
+
}), /* @__PURE__ */ R("button", {
|
|
916
|
+
ref: n,
|
|
526
917
|
type: "button",
|
|
527
918
|
className: "forge-fontname-dropdown-btn group relative flex h-full items-center justify-center min-w-[18px] cursor-pointer border-l border-[#ccc] bg-transparent px-1 hover:bg-black/5",
|
|
528
919
|
onMouseDown: (e) => e.preventDefault(),
|
|
529
920
|
"aria-label": "More fonts",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
921
|
+
children: [/* @__PURE__ */ R(() => /* @__PURE__ */ R("svg", {
|
|
531
922
|
className: "h-2 w-2 fill-current text-[#666]",
|
|
532
923
|
viewBox: "0 0 10 6",
|
|
533
924
|
xmlns: "http://www.w3.org/2000/svg",
|
|
534
|
-
children: /* @__PURE__ */
|
|
535
|
-
}), {}), /* @__PURE__ */
|
|
536
|
-
className:
|
|
925
|
+
children: /* @__PURE__ */ R("path", { d: "M0 0l5 6 5-6H0z" })
|
|
926
|
+
}), {}), /* @__PURE__ */ R("span", {
|
|
927
|
+
className: a,
|
|
537
928
|
"data-i18n": "moreFont",
|
|
538
929
|
children: "More Fonts"
|
|
539
930
|
})]
|
|
540
931
|
})]
|
|
541
|
-
}), /* @__PURE__ */
|
|
542
|
-
ref:
|
|
932
|
+
}), /* @__PURE__ */ R("div", {
|
|
933
|
+
ref: r,
|
|
543
934
|
className: "forge-toolbar-dropdown forge-dropdown-fontname absolute left-0 top-full z-20 hidden mt-1 min-w-[150px] overflow-y-auto rounded border border-[#ccc] bg-white p-1 shadow-md rtl:left-auto rtl:right-0 [&.is-open]:block",
|
|
544
935
|
style: { maxHeight: "128px" },
|
|
545
|
-
children:
|
|
936
|
+
children: Je.map((e) => /* @__PURE__ */ R("button", {
|
|
546
937
|
type: "button",
|
|
547
938
|
className: "forge-dropdown-item flex w-full cursor-pointer items-center whitespace-nowrap rounded-sm px-2 text-left text-xs text-[#333] hover:bg-[#f0f0f0]",
|
|
548
939
|
style: {
|
|
549
940
|
fontFamily: e,
|
|
550
|
-
height: `${
|
|
941
|
+
height: `${Ye}px`
|
|
551
942
|
},
|
|
552
943
|
onMouseDown: (e) => e.preventDefault(),
|
|
553
|
-
onClick: () =>
|
|
944
|
+
onClick: () => i(e),
|
|
554
945
|
children: e
|
|
555
946
|
}, e))
|
|
556
947
|
})]
|
|
@@ -558,16 +949,16 @@ function w({ currentFont: e, applyFont: t }) {
|
|
|
558
949
|
}
|
|
559
950
|
//#endregion
|
|
560
951
|
//#region src/components/shared/toolbar/FontName/Components/index.jsx
|
|
561
|
-
function
|
|
562
|
-
let { currentFont: t, applyFont: n } =
|
|
563
|
-
return /* @__PURE__ */
|
|
952
|
+
function Ze({ editorRef: e }) {
|
|
953
|
+
let { currentFont: t, applyFont: n } = Ke(e);
|
|
954
|
+
return /* @__PURE__ */ R(Xe, {
|
|
564
955
|
currentFont: t,
|
|
565
956
|
applyFont: n
|
|
566
957
|
});
|
|
567
958
|
}
|
|
568
959
|
//#endregion
|
|
569
960
|
//#region src/components/shared/toolbar/Color/Components/colorPalette.jsx
|
|
570
|
-
var
|
|
961
|
+
var Qe = [
|
|
571
962
|
[
|
|
572
963
|
"#000000",
|
|
573
964
|
"#424242",
|
|
@@ -649,14 +1040,14 @@ var E = [
|
|
|
649
1040
|
"#4A1031"
|
|
650
1041
|
]
|
|
651
1042
|
];
|
|
652
|
-
function
|
|
653
|
-
return /* @__PURE__ */
|
|
1043
|
+
function $e({ event: e, onApply: t, currentColor: n }) {
|
|
1044
|
+
return /* @__PURE__ */ R("div", {
|
|
654
1045
|
className: "forge-color-palette flex flex-col gap-1",
|
|
655
|
-
children:
|
|
1046
|
+
children: Qe.map((r, i) => /* @__PURE__ */ R("div", {
|
|
656
1047
|
className: "forge-color-row flex gap-1 justify-between",
|
|
657
1048
|
children: r.map((r) => {
|
|
658
1049
|
let i = n?.toLowerCase() === r.toLowerCase();
|
|
659
|
-
return /* @__PURE__ */
|
|
1050
|
+
return /* @__PURE__ */ R("button", {
|
|
660
1051
|
type: "button",
|
|
661
1052
|
title: r,
|
|
662
1053
|
className: `forge-color-button h-4 w-4 cursor-pointer rounded-[2px] border p-0 hover:scale-110 hover:border-black transition-transform ${i ? "border-2 border-black" : "border-[#ccc]"}`,
|
|
@@ -672,140 +1063,140 @@ function D({ event: e, onApply: t, currentColor: n }) {
|
|
|
672
1063
|
}
|
|
673
1064
|
//#endregion
|
|
674
1065
|
//#region src/components/shared/toolbar/Color/Components/ColorToolbar.jsx
|
|
675
|
-
function
|
|
676
|
-
let { applyColor: t, applyRecentColor:
|
|
677
|
-
|
|
678
|
-
if (
|
|
679
|
-
}, []),
|
|
680
|
-
if (
|
|
1066
|
+
function Y({ logic: e }) {
|
|
1067
|
+
let { applyColor: t, applyRecentColor: n, resetColor: r, recentForeColor: i, recentBackColor: a } = e, o = q(null), s = q(null), c = q(null), l = q(null);
|
|
1068
|
+
K(() => {
|
|
1069
|
+
if (o.current && s.current) return qe(o.current, s.current);
|
|
1070
|
+
}, []), K(() => {
|
|
1071
|
+
if (c.current && l.current) return qe(c.current, l.current);
|
|
681
1072
|
}, []);
|
|
682
|
-
let
|
|
683
|
-
t(e, n),
|
|
684
|
-
},
|
|
685
|
-
t(e, n),
|
|
686
|
-
},
|
|
687
|
-
|
|
688
|
-
},
|
|
689
|
-
|
|
690
|
-
},
|
|
1073
|
+
let u = (e, n) => {
|
|
1074
|
+
t(e, n), s.current && s.current.classList.remove("is-open"), o.current && o.current.classList.remove("is-active");
|
|
1075
|
+
}, d = (e, n) => {
|
|
1076
|
+
t(e, n), l.current && l.current.classList.remove("is-open"), c.current && c.current.classList.remove("is-active");
|
|
1077
|
+
}, f = () => {
|
|
1078
|
+
r("foreColor"), s.current && s.current.classList.remove("is-open"), o.current && o.current.classList.remove("is-active");
|
|
1079
|
+
}, p = () => {
|
|
1080
|
+
r("backColor"), l.current && l.current.classList.remove("is-open"), c.current && c.current.classList.remove("is-active");
|
|
1081
|
+
}, m = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 group-has-[.is-open]:hidden rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]", h = () => /* @__PURE__ */ R("svg", {
|
|
691
1082
|
className: "h-2 w-2 fill-current text-[#666]",
|
|
692
1083
|
viewBox: "0 0 10 6",
|
|
693
1084
|
xmlns: "http://www.w3.org/2000/svg",
|
|
694
|
-
children: /* @__PURE__ */
|
|
1085
|
+
children: /* @__PURE__ */ R("path", { d: "M0 0l5 6 5-6H0z" })
|
|
695
1086
|
});
|
|
696
|
-
return /* @__PURE__ */
|
|
1087
|
+
return /* @__PURE__ */ R("div", {
|
|
697
1088
|
className: "forge-toolbar-group forge-toolbar-color flex items-center gap-1",
|
|
698
|
-
children: [/* @__PURE__ */
|
|
1089
|
+
children: [/* @__PURE__ */ R("div", {
|
|
699
1090
|
className: "forge-color-item relative flex items-center",
|
|
700
|
-
children: [/* @__PURE__ */
|
|
1091
|
+
children: [/* @__PURE__ */ R("div", {
|
|
701
1092
|
className: "forge-color-button-group flex h-[30px] items-center overflow-visible rounded border border-[#ccc] bg-white hover:border-[#aaa] hover:bg-[#f9f9f9]",
|
|
702
|
-
children: [/* @__PURE__ */
|
|
1093
|
+
children: [/* @__PURE__ */ R("button", {
|
|
703
1094
|
type: "button",
|
|
704
1095
|
className: "forge-color-main group relative flex h-full items-center justify-center min-w-[28px] cursor-pointer border-none bg-transparent p-0 hover:bg-black/5",
|
|
705
1096
|
onMouseDown: (e) => e.preventDefault(),
|
|
706
|
-
onClick: () =>
|
|
1097
|
+
onClick: () => n("foreColor"),
|
|
707
1098
|
"aria-label": "Apply text color",
|
|
708
|
-
children: [/* @__PURE__ */
|
|
1099
|
+
children: [/* @__PURE__ */ R("span", {
|
|
709
1100
|
className: "forge-recent-color flex h-5 w-5 items-center justify-center rounded-[2px] border border-[#ccc] text-xs font-bold",
|
|
710
1101
|
style: {
|
|
711
1102
|
backgroundColor: "transparent",
|
|
712
|
-
color:
|
|
1103
|
+
color: i
|
|
713
1104
|
},
|
|
714
1105
|
children: "A"
|
|
715
|
-
}), /* @__PURE__ */
|
|
716
|
-
className:
|
|
1106
|
+
}), /* @__PURE__ */ R("span", {
|
|
1107
|
+
className: m,
|
|
717
1108
|
"data-i18n": "recentColor",
|
|
718
1109
|
children: "Recent Color"
|
|
719
1110
|
})]
|
|
720
|
-
}), /* @__PURE__ */
|
|
721
|
-
ref:
|
|
1111
|
+
}), /* @__PURE__ */ R("button", {
|
|
1112
|
+
ref: o,
|
|
722
1113
|
type: "button",
|
|
723
1114
|
className: "forge-color-dropdown-btn group relative flex h-full items-center justify-center min-w-[18px] cursor-pointer border-l border-[#ccc] bg-transparent px-1 hover:bg-black/5",
|
|
724
1115
|
onMouseDown: (e) => e.preventDefault(),
|
|
725
1116
|
"aria-label": "More text colors",
|
|
726
|
-
children: [/* @__PURE__ */
|
|
727
|
-
className:
|
|
1117
|
+
children: [/* @__PURE__ */ R(h, {}), /* @__PURE__ */ R("span", {
|
|
1118
|
+
className: m,
|
|
728
1119
|
"data-i18n": "moreColor",
|
|
729
1120
|
children: "More Color"
|
|
730
1121
|
})]
|
|
731
1122
|
})]
|
|
732
|
-
}), /* @__PURE__ */
|
|
733
|
-
ref:
|
|
1123
|
+
}), /* @__PURE__ */ R("div", {
|
|
1124
|
+
ref: s,
|
|
734
1125
|
className: "forge-toolbar-dropdown forge-dropdown-color absolute left-0 top-full z-20 hidden mt-1 max-h-[220px] min-w-[180px] overflow-y-auto rounded border border-[#ccc] bg-white p-2 shadow-md rtl:left-auto rtl:right-0 [&.is-open]:block",
|
|
735
|
-
children: /* @__PURE__ */
|
|
1126
|
+
children: /* @__PURE__ */ R("div", {
|
|
736
1127
|
className: "forge-color-section",
|
|
737
|
-
children: [/* @__PURE__ */
|
|
1128
|
+
children: [/* @__PURE__ */ R("div", {
|
|
738
1129
|
className: "forge-color-section-header mb-1.5 flex items-center justify-between",
|
|
739
|
-
children: [/* @__PURE__ */
|
|
1130
|
+
children: [/* @__PURE__ */ R("span", {
|
|
740
1131
|
className: "forge-color-title text-xs font-bold text-[#333]",
|
|
741
1132
|
children: "Text Color"
|
|
742
|
-
}), /* @__PURE__ */
|
|
1133
|
+
}), /* @__PURE__ */ R("button", {
|
|
743
1134
|
type: "button",
|
|
744
1135
|
className: "forge-color-reset cursor-pointer rounded border border-[#ccc] bg-[#f5f5f5] px-2 py-0.5 text-[11px] font-medium text-[#333] hover:border-[#999] hover:bg-[#e6e6e6]",
|
|
745
1136
|
onMouseDown: (e) => e.preventDefault(),
|
|
746
|
-
onClick:
|
|
1137
|
+
onClick: f,
|
|
747
1138
|
children: "Reset"
|
|
748
1139
|
})]
|
|
749
|
-
}), /* @__PURE__ */
|
|
1140
|
+
}), /* @__PURE__ */ R($e, {
|
|
750
1141
|
event: "foreColor",
|
|
751
|
-
onApply:
|
|
1142
|
+
onApply: u
|
|
752
1143
|
})]
|
|
753
1144
|
})
|
|
754
1145
|
})]
|
|
755
|
-
}), /* @__PURE__ */
|
|
1146
|
+
}), /* @__PURE__ */ R("div", {
|
|
756
1147
|
className: "forge-color-item relative flex items-center",
|
|
757
|
-
children: [/* @__PURE__ */
|
|
1148
|
+
children: [/* @__PURE__ */ R("div", {
|
|
758
1149
|
className: "forge-color-button-group flex h-[30px] items-center overflow-visible rounded border border-[#ccc] bg-white hover:border-[#aaa] hover:bg-[#f9f9f9]",
|
|
759
|
-
children: [/* @__PURE__ */
|
|
1150
|
+
children: [/* @__PURE__ */ R("button", {
|
|
760
1151
|
type: "button",
|
|
761
1152
|
className: "forge-color-main group relative flex h-full items-center justify-center min-w-[28px] cursor-pointer border-none bg-transparent p-0 hover:bg-black/5",
|
|
762
1153
|
onMouseDown: (e) => e.preventDefault(),
|
|
763
|
-
onClick: () =>
|
|
1154
|
+
onClick: () => n("backColor"),
|
|
764
1155
|
"aria-label": "Apply background color",
|
|
765
|
-
children: [/* @__PURE__ */
|
|
1156
|
+
children: [/* @__PURE__ */ R("span", {
|
|
766
1157
|
className: "forge-recent-color flex h-5 w-5 items-center justify-center rounded-[2px] border border-[#ccc] text-xs font-bold",
|
|
767
1158
|
style: {
|
|
768
|
-
backgroundColor:
|
|
1159
|
+
backgroundColor: a || "#FFFFFF",
|
|
769
1160
|
color: "#000"
|
|
770
1161
|
},
|
|
771
1162
|
children: "A"
|
|
772
|
-
}), /* @__PURE__ */
|
|
773
|
-
className:
|
|
1163
|
+
}), /* @__PURE__ */ R("span", {
|
|
1164
|
+
className: m,
|
|
774
1165
|
"data-i18n": "recentBackColor",
|
|
775
1166
|
children: "Recent Background Color"
|
|
776
1167
|
})]
|
|
777
|
-
}), /* @__PURE__ */
|
|
778
|
-
ref:
|
|
1168
|
+
}), /* @__PURE__ */ R("button", {
|
|
1169
|
+
ref: c,
|
|
779
1170
|
type: "button",
|
|
780
1171
|
className: "forge-color-dropdown-btn group relative flex h-full items-center justify-center min-w-[18px] cursor-pointer border-l border-[#ccc] bg-transparent px-1 hover:bg-black/5",
|
|
781
1172
|
onMouseDown: (e) => e.preventDefault(),
|
|
782
1173
|
"aria-label": "More background colors",
|
|
783
|
-
children: [/* @__PURE__ */
|
|
784
|
-
className:
|
|
1174
|
+
children: [/* @__PURE__ */ R(h, {}), /* @__PURE__ */ R("span", {
|
|
1175
|
+
className: m,
|
|
785
1176
|
"data-i18n": "moreBackColor",
|
|
786
1177
|
children: "More Background Colors"
|
|
787
1178
|
})]
|
|
788
1179
|
})]
|
|
789
|
-
}), /* @__PURE__ */
|
|
790
|
-
ref:
|
|
1180
|
+
}), /* @__PURE__ */ R("div", {
|
|
1181
|
+
ref: l,
|
|
791
1182
|
className: "forge-toolbar-dropdown forge-dropdown-color absolute left-0 top-full z-20 hidden mt-1 max-h-[220px] min-w-[180px] overflow-y-auto rounded border border-[#ccc] bg-white p-2 shadow-md rtl:left-auto rtl:right-0 [&.is-open]:block",
|
|
792
|
-
children: /* @__PURE__ */
|
|
1183
|
+
children: /* @__PURE__ */ R("div", {
|
|
793
1184
|
className: "forge-color-section",
|
|
794
|
-
children: [/* @__PURE__ */
|
|
1185
|
+
children: [/* @__PURE__ */ R("div", {
|
|
795
1186
|
className: "forge-color-section-header mb-1.5 flex items-center justify-between",
|
|
796
|
-
children: [/* @__PURE__ */
|
|
1187
|
+
children: [/* @__PURE__ */ R("span", {
|
|
797
1188
|
className: "forge-color-title text-xs font-bold text-[#333]",
|
|
798
1189
|
children: "Background Color"
|
|
799
|
-
}), /* @__PURE__ */
|
|
1190
|
+
}), /* @__PURE__ */ R("button", {
|
|
800
1191
|
type: "button",
|
|
801
1192
|
className: "forge-color-reset cursor-pointer rounded border border-[#ccc] bg-[#f5f5f5] px-2 py-0.5 text-[11px] font-medium text-[#333] hover:border-[#999] hover:bg-[#e6e6e6]",
|
|
802
1193
|
onMouseDown: (e) => e.preventDefault(),
|
|
803
|
-
onClick:
|
|
1194
|
+
onClick: p,
|
|
804
1195
|
children: "White"
|
|
805
1196
|
})]
|
|
806
|
-
}), /* @__PURE__ */
|
|
1197
|
+
}), /* @__PURE__ */ R($e, {
|
|
807
1198
|
event: "backColor",
|
|
808
|
-
onApply:
|
|
1199
|
+
onApply: d
|
|
809
1200
|
})]
|
|
810
1201
|
})
|
|
811
1202
|
})]
|
|
@@ -814,24 +1205,24 @@ function te({ logic: e }) {
|
|
|
814
1205
|
}
|
|
815
1206
|
//#endregion
|
|
816
1207
|
//#region src/components/shared/toolbar/Color/Hooks/colorUtils.jsx
|
|
817
|
-
function
|
|
1208
|
+
function et(e) {
|
|
818
1209
|
let t = document.createElement("span");
|
|
819
1210
|
t.style.color = e, document.body.appendChild(t);
|
|
820
1211
|
let n = window.getComputedStyle(t).color;
|
|
821
1212
|
return document.body.removeChild(t), n;
|
|
822
1213
|
}
|
|
823
|
-
function
|
|
1214
|
+
function tt(e, t) {
|
|
824
1215
|
let n = e;
|
|
825
1216
|
for (; n && n !== document.body;) {
|
|
826
|
-
if (n.nodeType === Node.ELEMENT_NODE && n.tagName === "SPAN" && n.style.color &&
|
|
1217
|
+
if (n.nodeType === Node.ELEMENT_NODE && n.tagName === "SPAN" && n.style.color && et(n.style.color) === t) return n;
|
|
827
1218
|
n = n.parentElement;
|
|
828
1219
|
}
|
|
829
1220
|
return null;
|
|
830
1221
|
}
|
|
831
1222
|
//#endregion
|
|
832
1223
|
//#region src/components/shared/toolbar/Color/Hooks/usePenMode.jsx
|
|
833
|
-
function
|
|
834
|
-
|
|
1224
|
+
function nt(e, t) {
|
|
1225
|
+
K(() => {
|
|
835
1226
|
function n(n) {
|
|
836
1227
|
if (n.inputType !== "insertText" || !n.data || !e.current) return;
|
|
837
1228
|
let r = n.target;
|
|
@@ -840,9 +1231,9 @@ function re(e, t) {
|
|
|
840
1231
|
if (!i || !i.rangeCount) return;
|
|
841
1232
|
let a = i.getRangeAt(0);
|
|
842
1233
|
if (!a.collapsed) return;
|
|
843
|
-
let o =
|
|
1234
|
+
let o = et(e.current), s = a.startContainer;
|
|
844
1235
|
s.nodeType === Node.TEXT_NODE && (s = s.parentElement);
|
|
845
|
-
let c =
|
|
1236
|
+
let c = tt(s, o);
|
|
846
1237
|
if (n.preventDefault(), c) {
|
|
847
1238
|
let e = document.createTextNode(n.data);
|
|
848
1239
|
a.insertNode(e), a.setStartAfter(e), a.collapse(!0), i.removeAllRanges(), i.addRange(a);
|
|
@@ -858,7 +1249,7 @@ function re(e, t) {
|
|
|
858
1249
|
}
|
|
859
1250
|
//#endregion
|
|
860
1251
|
//#region src/components/shared/toolbar/Color/Hooks/foreColorHandler.jsx
|
|
861
|
-
var
|
|
1252
|
+
var rt = (e, t, n) => {
|
|
862
1253
|
let r = n || "#000000";
|
|
863
1254
|
if (!e) return;
|
|
864
1255
|
if (!e.collapsed) {
|
|
@@ -875,28 +1266,28 @@ var ie = (e, t, n) => {
|
|
|
875
1266
|
};
|
|
876
1267
|
//#endregion
|
|
877
1268
|
//#region src/components/shared/toolbar/Color/Hooks/useForeColor.jsx
|
|
878
|
-
function
|
|
879
|
-
let [t, n] =
|
|
880
|
-
|
|
881
|
-
let
|
|
882
|
-
let t = e || "#000000",
|
|
883
|
-
|
|
1269
|
+
function it(e = "forge-editor__content") {
|
|
1270
|
+
let [t, n] = G("#000000"), r = q(null);
|
|
1271
|
+
nt(r, e);
|
|
1272
|
+
let i = (e) => {
|
|
1273
|
+
let t = e || "#000000", i = window.getSelection();
|
|
1274
|
+
i && i.rangeCount > 0 && rt(i.getRangeAt(0), i, t), r.current = t, n(t);
|
|
884
1275
|
};
|
|
885
1276
|
return {
|
|
886
1277
|
recentForeColor: t,
|
|
887
|
-
applyForeColor:
|
|
1278
|
+
applyForeColor: i,
|
|
888
1279
|
applyRecentForeColor: () => {
|
|
889
|
-
|
|
1280
|
+
i(t);
|
|
890
1281
|
},
|
|
891
1282
|
resetForeColor: () => {
|
|
892
|
-
|
|
1283
|
+
i("#000000"), r.current = null;
|
|
893
1284
|
}
|
|
894
1285
|
};
|
|
895
1286
|
}
|
|
896
1287
|
//#endregion
|
|
897
1288
|
//#region src/components/shared/toolbar/Color/Hooks/usePenModeBack.jsx
|
|
898
|
-
function
|
|
899
|
-
|
|
1289
|
+
function at(e, t) {
|
|
1290
|
+
K(() => {
|
|
900
1291
|
let n = (n) => {
|
|
901
1292
|
if (!e.current || n.inputType !== "insertText" || !n.data) return;
|
|
902
1293
|
let r = window.getSelection();
|
|
@@ -916,7 +1307,7 @@ function k(e, t) {
|
|
|
916
1307
|
}
|
|
917
1308
|
//#endregion
|
|
918
1309
|
//#region src/components/shared/toolbar/Color/Hooks/backColorHandler.jsx
|
|
919
|
-
var
|
|
1310
|
+
var ot = (e, t, n) => {
|
|
920
1311
|
let r = n || "#FFFFFF";
|
|
921
1312
|
if (!e) return;
|
|
922
1313
|
if (!e.collapsed) {
|
|
@@ -933,28 +1324,28 @@ var A = (e, t, n) => {
|
|
|
933
1324
|
};
|
|
934
1325
|
//#endregion
|
|
935
1326
|
//#region src/components/shared/toolbar/Color/Hooks/useBackColor.jsx
|
|
936
|
-
function
|
|
937
|
-
let [t, n] =
|
|
938
|
-
|
|
939
|
-
let
|
|
940
|
-
let t = e || "#FFFFFF",
|
|
941
|
-
|
|
1327
|
+
function st(e = "forge-editor__content") {
|
|
1328
|
+
let [t, n] = G("#FFFFFF"), r = q(null);
|
|
1329
|
+
at(r, e);
|
|
1330
|
+
let i = (e) => {
|
|
1331
|
+
let t = e || "#FFFFFF", i = window.getSelection();
|
|
1332
|
+
i && i.rangeCount > 0 && ot(i.getRangeAt(0), i, t), r.current = t, n(t);
|
|
942
1333
|
};
|
|
943
1334
|
return {
|
|
944
1335
|
recentBackColor: t,
|
|
945
|
-
applyBackColor:
|
|
1336
|
+
applyBackColor: i,
|
|
946
1337
|
applyRecentBackColor: () => {
|
|
947
|
-
|
|
1338
|
+
i(t);
|
|
948
1339
|
},
|
|
949
1340
|
resetBackColor: () => {
|
|
950
|
-
|
|
1341
|
+
i("#FFFFFF"), r.current = null;
|
|
951
1342
|
}
|
|
952
1343
|
};
|
|
953
1344
|
}
|
|
954
1345
|
//#endregion
|
|
955
1346
|
//#region src/components/shared/toolbar/Color/Hooks/colorLogic.jsx
|
|
956
|
-
function
|
|
957
|
-
let e =
|
|
1347
|
+
function ct() {
|
|
1348
|
+
let e = it(), t = st();
|
|
958
1349
|
return {
|
|
959
1350
|
applyColor: (n, r) => {
|
|
960
1351
|
n === "foreColor" ? e.applyForeColor(r) : n === "backColor" && t.applyBackColor(r);
|
|
@@ -971,60 +1362,60 @@ function se() {
|
|
|
971
1362
|
}
|
|
972
1363
|
//#endregion
|
|
973
1364
|
//#region src/components/shared/toolbar/Color/Components/index.jsx
|
|
974
|
-
function
|
|
975
|
-
return /* @__PURE__ */
|
|
1365
|
+
function lt() {
|
|
1366
|
+
return /* @__PURE__ */ R(Y, { logic: ct() });
|
|
976
1367
|
}
|
|
977
1368
|
//#endregion
|
|
978
1369
|
//#region src/components/shared/toolbar/Paragraph/Components/ParagraphToolbar.jsx
|
|
979
|
-
function
|
|
980
|
-
let { saveSelectionRange: t, toggleUnorderedList:
|
|
981
|
-
|
|
1370
|
+
function ut({ logic: e = {} }) {
|
|
1371
|
+
let { saveSelectionRange: t, toggleUnorderedList: n, toggleOrderedList: r, setAlignment: i, outdent: a, indent: o } = e, [s, c] = G(!1), l = q(null);
|
|
1372
|
+
K(() => {
|
|
982
1373
|
let e = (e) => {
|
|
983
|
-
|
|
1374
|
+
l.current && !l.current.contains(e.target) && c(!1);
|
|
984
1375
|
};
|
|
985
1376
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
986
1377
|
}, []);
|
|
987
|
-
let
|
|
1378
|
+
let u = (e, n, r = null) => {
|
|
988
1379
|
e.preventDefault(), typeof t == "function" && t(), typeof n == "function" && n(r);
|
|
989
|
-
},
|
|
990
|
-
return /* @__PURE__ */
|
|
991
|
-
ref:
|
|
1380
|
+
}, d = "forge-toolbar-button group relative flex h-8 items-center justify-center bg-white px-2.5 text-sm transition-all duration-150 hover:bg-[#f5f5f5] active:bg-[#e8e8e8] focus:outline-none", f = "forge-toolbar-icon inline-block h-4 w-4", p = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]", m = "group relative flex h-7 w-7 items-center justify-center rounded hover:bg-gray-100";
|
|
1381
|
+
return /* @__PURE__ */ R("div", {
|
|
1382
|
+
ref: l,
|
|
992
1383
|
className: "forge-toolbar-group forge-toolbar-paragraph relative inline-flex items-center text-black",
|
|
993
1384
|
children: [
|
|
994
|
-
/* @__PURE__ */
|
|
995
|
-
/* @__PURE__ */
|
|
1385
|
+
/* @__PURE__ */ R("style", { children: "\n .forge-toolbar-paragraph svg * {\n vector-effect: non-scaling-stroke;\n }\n " }),
|
|
1386
|
+
/* @__PURE__ */ R("div", {
|
|
996
1387
|
className: "inline-flex rounded-md border border-[#d1d5db] bg-white shadow-sm -space-x-px",
|
|
997
1388
|
children: [
|
|
998
|
-
/* @__PURE__ */
|
|
1389
|
+
/* @__PURE__ */ R("button", {
|
|
999
1390
|
type: "button",
|
|
1000
|
-
className:
|
|
1001
|
-
onMouseDown: (e) =>
|
|
1391
|
+
className: d,
|
|
1392
|
+
onMouseDown: (e) => u(e, n),
|
|
1002
1393
|
"aria-label": "Unordered list",
|
|
1003
|
-
children: [/* @__PURE__ */
|
|
1004
|
-
className:
|
|
1005
|
-
children: /* @__PURE__ */
|
|
1394
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1395
|
+
className: f,
|
|
1396
|
+
children: /* @__PURE__ */ R("svg", {
|
|
1006
1397
|
viewBox: "0 0 20 20",
|
|
1007
1398
|
className: "block h-4 w-4",
|
|
1008
1399
|
children: [
|
|
1009
|
-
/* @__PURE__ */
|
|
1400
|
+
/* @__PURE__ */ R("circle", {
|
|
1010
1401
|
cx: "3",
|
|
1011
1402
|
cy: "5",
|
|
1012
1403
|
r: "1.5",
|
|
1013
1404
|
fill: "black"
|
|
1014
1405
|
}),
|
|
1015
|
-
/* @__PURE__ */
|
|
1406
|
+
/* @__PURE__ */ R("circle", {
|
|
1016
1407
|
cx: "3",
|
|
1017
1408
|
cy: "10",
|
|
1018
1409
|
r: "1.5",
|
|
1019
1410
|
fill: "black"
|
|
1020
1411
|
}),
|
|
1021
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ R("circle", {
|
|
1022
1413
|
cx: "3",
|
|
1023
1414
|
cy: "15",
|
|
1024
1415
|
r: "1.5",
|
|
1025
1416
|
fill: "black"
|
|
1026
1417
|
}),
|
|
1027
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ R("rect", {
|
|
1028
1419
|
x: "7",
|
|
1029
1420
|
y: "4",
|
|
1030
1421
|
width: "11",
|
|
@@ -1032,7 +1423,7 @@ function le({ logic: e = {} }) {
|
|
|
1032
1423
|
rx: "1",
|
|
1033
1424
|
fill: "black"
|
|
1034
1425
|
}),
|
|
1035
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ R("rect", {
|
|
1036
1427
|
x: "7",
|
|
1037
1428
|
y: "9",
|
|
1038
1429
|
width: "11",
|
|
@@ -1040,7 +1431,7 @@ function le({ logic: e = {} }) {
|
|
|
1040
1431
|
rx: "1",
|
|
1041
1432
|
fill: "black"
|
|
1042
1433
|
}),
|
|
1043
|
-
/* @__PURE__ */
|
|
1434
|
+
/* @__PURE__ */ R("rect", {
|
|
1044
1435
|
x: "7",
|
|
1045
1436
|
y: "14",
|
|
1046
1437
|
width: "11",
|
|
@@ -1050,25 +1441,25 @@ function le({ logic: e = {} }) {
|
|
|
1050
1441
|
})
|
|
1051
1442
|
]
|
|
1052
1443
|
})
|
|
1053
|
-
}), /* @__PURE__ */
|
|
1054
|
-
className:
|
|
1444
|
+
}), /* @__PURE__ */ R("span", {
|
|
1445
|
+
className: p,
|
|
1055
1446
|
"data-i18n": "unorderedList",
|
|
1056
1447
|
children: "Bullet list"
|
|
1057
1448
|
})]
|
|
1058
1449
|
}),
|
|
1059
|
-
/* @__PURE__ */
|
|
1060
|
-
/* @__PURE__ */
|
|
1450
|
+
/* @__PURE__ */ R("div", { className: "w-[1px] bg-[#e5e7eb] my-1" }),
|
|
1451
|
+
/* @__PURE__ */ R("button", {
|
|
1061
1452
|
type: "button",
|
|
1062
|
-
className:
|
|
1063
|
-
onMouseDown: (e) =>
|
|
1453
|
+
className: d,
|
|
1454
|
+
onMouseDown: (e) => u(e, r),
|
|
1064
1455
|
"aria-label": "Ordered list",
|
|
1065
|
-
children: [/* @__PURE__ */
|
|
1066
|
-
className:
|
|
1067
|
-
children: /* @__PURE__ */
|
|
1456
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1457
|
+
className: f,
|
|
1458
|
+
children: /* @__PURE__ */ R("svg", {
|
|
1068
1459
|
viewBox: "0 0 20 20",
|
|
1069
1460
|
className: "block h-4 w-4",
|
|
1070
1461
|
children: [
|
|
1071
|
-
/* @__PURE__ */
|
|
1462
|
+
/* @__PURE__ */ R("rect", {
|
|
1072
1463
|
x: "7",
|
|
1073
1464
|
y: "4",
|
|
1074
1465
|
width: "11",
|
|
@@ -1076,7 +1467,7 @@ function le({ logic: e = {} }) {
|
|
|
1076
1467
|
rx: "1",
|
|
1077
1468
|
fill: "black"
|
|
1078
1469
|
}),
|
|
1079
|
-
/* @__PURE__ */
|
|
1470
|
+
/* @__PURE__ */ R("rect", {
|
|
1080
1471
|
x: "7",
|
|
1081
1472
|
y: "9",
|
|
1082
1473
|
width: "11",
|
|
@@ -1084,7 +1475,7 @@ function le({ logic: e = {} }) {
|
|
|
1084
1475
|
rx: "1",
|
|
1085
1476
|
fill: "black"
|
|
1086
1477
|
}),
|
|
1087
|
-
/* @__PURE__ */
|
|
1478
|
+
/* @__PURE__ */ R("rect", {
|
|
1088
1479
|
x: "7",
|
|
1089
1480
|
y: "14",
|
|
1090
1481
|
width: "11",
|
|
@@ -1092,7 +1483,7 @@ function le({ logic: e = {} }) {
|
|
|
1092
1483
|
rx: "1",
|
|
1093
1484
|
fill: "black"
|
|
1094
1485
|
}),
|
|
1095
|
-
/* @__PURE__ */
|
|
1486
|
+
/* @__PURE__ */ R("path", {
|
|
1096
1487
|
d: "M 1.5 4.5 L 3.5 3 L 3.5 10 M 2 10 L 5 10",
|
|
1097
1488
|
fill: "none",
|
|
1098
1489
|
stroke: "black",
|
|
@@ -1100,7 +1491,7 @@ function le({ logic: e = {} }) {
|
|
|
1100
1491
|
strokeLinecap: "round",
|
|
1101
1492
|
strokeLinejoin: "round"
|
|
1102
1493
|
}),
|
|
1103
|
-
/* @__PURE__ */
|
|
1494
|
+
/* @__PURE__ */ R("path", {
|
|
1104
1495
|
d: "M 1.5 14 C 1.5 12.8 4.5 12.8 4.5 14.5 C 4.5 16 1.5 16.5 1.5 18 L 5 18",
|
|
1105
1496
|
fill: "none",
|
|
1106
1497
|
stroke: "black",
|
|
@@ -1110,29 +1501,29 @@ function le({ logic: e = {} }) {
|
|
|
1110
1501
|
})
|
|
1111
1502
|
]
|
|
1112
1503
|
})
|
|
1113
|
-
}), /* @__PURE__ */
|
|
1114
|
-
className:
|
|
1504
|
+
}), /* @__PURE__ */ R("span", {
|
|
1505
|
+
className: p,
|
|
1115
1506
|
"data-i18n": "orderedList",
|
|
1116
1507
|
children: "Numbered list"
|
|
1117
1508
|
})]
|
|
1118
1509
|
}),
|
|
1119
|
-
/* @__PURE__ */
|
|
1120
|
-
/* @__PURE__ */
|
|
1510
|
+
/* @__PURE__ */ R("div", { className: "w-[1px] bg-[#e5e7eb] my-1" }),
|
|
1511
|
+
/* @__PURE__ */ R("button", {
|
|
1121
1512
|
type: "button",
|
|
1122
|
-
className: `${
|
|
1513
|
+
className: `${d} gap-1 pr-1.5`,
|
|
1123
1514
|
onMouseDown: (e) => {
|
|
1124
1515
|
e.preventDefault(), typeof t == "function" && t();
|
|
1125
1516
|
},
|
|
1126
|
-
onClick: () =>
|
|
1517
|
+
onClick: () => c(!s),
|
|
1127
1518
|
"aria-label": "Paragraph",
|
|
1128
1519
|
children: [
|
|
1129
|
-
/* @__PURE__ */
|
|
1130
|
-
className:
|
|
1131
|
-
children: /* @__PURE__ */
|
|
1520
|
+
/* @__PURE__ */ R("span", {
|
|
1521
|
+
className: f,
|
|
1522
|
+
children: /* @__PURE__ */ R("svg", {
|
|
1132
1523
|
viewBox: "0 0 20 20",
|
|
1133
1524
|
className: "block h-4 w-4",
|
|
1134
1525
|
children: [
|
|
1135
|
-
/* @__PURE__ */
|
|
1526
|
+
/* @__PURE__ */ R("rect", {
|
|
1136
1527
|
x: "1",
|
|
1137
1528
|
y: "4",
|
|
1138
1529
|
width: "18",
|
|
@@ -1140,7 +1531,7 @@ function le({ logic: e = {} }) {
|
|
|
1140
1531
|
rx: "1",
|
|
1141
1532
|
fill: "black"
|
|
1142
1533
|
}),
|
|
1143
|
-
/* @__PURE__ */
|
|
1534
|
+
/* @__PURE__ */ R("rect", {
|
|
1144
1535
|
x: "1",
|
|
1145
1536
|
y: "9",
|
|
1146
1537
|
width: "18",
|
|
@@ -1148,7 +1539,7 @@ function le({ logic: e = {} }) {
|
|
|
1148
1539
|
rx: "1",
|
|
1149
1540
|
fill: "black"
|
|
1150
1541
|
}),
|
|
1151
|
-
/* @__PURE__ */
|
|
1542
|
+
/* @__PURE__ */ R("rect", {
|
|
1152
1543
|
x: "1",
|
|
1153
1544
|
y: "14",
|
|
1154
1545
|
width: "12",
|
|
@@ -1159,13 +1550,13 @@ function le({ logic: e = {} }) {
|
|
|
1159
1550
|
]
|
|
1160
1551
|
})
|
|
1161
1552
|
}),
|
|
1162
|
-
/* @__PURE__ */
|
|
1163
|
-
className: `h-2.5 w-2.5 fill-current text-gray-700 transition-transform ${
|
|
1553
|
+
/* @__PURE__ */ R("svg", {
|
|
1554
|
+
className: `h-2.5 w-2.5 fill-current text-gray-700 transition-transform ${s ? "rotate-180" : ""}`,
|
|
1164
1555
|
viewBox: "0 0 20 20",
|
|
1165
|
-
children: /* @__PURE__ */
|
|
1556
|
+
children: /* @__PURE__ */ R("path", { d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" })
|
|
1166
1557
|
}),
|
|
1167
|
-
/* @__PURE__ */
|
|
1168
|
-
className:
|
|
1558
|
+
/* @__PURE__ */ R("span", {
|
|
1559
|
+
className: p,
|
|
1169
1560
|
"data-i18n": "paragraph",
|
|
1170
1561
|
children: "Paragraph options"
|
|
1171
1562
|
})
|
|
@@ -1173,27 +1564,27 @@ function le({ logic: e = {} }) {
|
|
|
1173
1564
|
})
|
|
1174
1565
|
]
|
|
1175
1566
|
}),
|
|
1176
|
-
|
|
1567
|
+
s && /* @__PURE__ */ R("div", {
|
|
1177
1568
|
className: "forge-toolbar-dropdown absolute left-0 top-full mt-1 z-20 min-w-[130px] rounded-md border border-[#ccc] bg-white p-1 shadow-lg rtl:left-auto rtl:right-0 block",
|
|
1178
1569
|
role: "list",
|
|
1179
1570
|
"aria-label": "Paragraph options",
|
|
1180
|
-
children: [/* @__PURE__ */
|
|
1571
|
+
children: [/* @__PURE__ */ R("div", {
|
|
1181
1572
|
className: "forge-toolbar-group forge-toolbar-align mb-0.5 flex gap-0.5 border-b border-[#eee] pb-1",
|
|
1182
1573
|
children: [
|
|
1183
|
-
/* @__PURE__ */
|
|
1574
|
+
/* @__PURE__ */ R("button", {
|
|
1184
1575
|
type: "button",
|
|
1185
|
-
className:
|
|
1576
|
+
className: m,
|
|
1186
1577
|
onMouseDown: (e) => {
|
|
1187
|
-
|
|
1578
|
+
u(e, i, "left"), c(!1);
|
|
1188
1579
|
},
|
|
1189
1580
|
"aria-label": "Align left",
|
|
1190
|
-
children: [/* @__PURE__ */
|
|
1191
|
-
className:
|
|
1192
|
-
children: /* @__PURE__ */
|
|
1581
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1582
|
+
className: f,
|
|
1583
|
+
children: /* @__PURE__ */ R("svg", {
|
|
1193
1584
|
viewBox: "0 0 20 20",
|
|
1194
1585
|
className: "block h-4 w-4",
|
|
1195
1586
|
children: [
|
|
1196
|
-
/* @__PURE__ */
|
|
1587
|
+
/* @__PURE__ */ R("rect", {
|
|
1197
1588
|
x: "1",
|
|
1198
1589
|
y: "4",
|
|
1199
1590
|
width: "18",
|
|
@@ -1201,7 +1592,7 @@ function le({ logic: e = {} }) {
|
|
|
1201
1592
|
rx: "1",
|
|
1202
1593
|
fill: "black"
|
|
1203
1594
|
}),
|
|
1204
|
-
/* @__PURE__ */
|
|
1595
|
+
/* @__PURE__ */ R("rect", {
|
|
1205
1596
|
x: "1",
|
|
1206
1597
|
y: "9",
|
|
1207
1598
|
width: "12",
|
|
@@ -1209,7 +1600,7 @@ function le({ logic: e = {} }) {
|
|
|
1209
1600
|
rx: "1",
|
|
1210
1601
|
fill: "black"
|
|
1211
1602
|
}),
|
|
1212
|
-
/* @__PURE__ */
|
|
1603
|
+
/* @__PURE__ */ R("rect", {
|
|
1213
1604
|
x: "1",
|
|
1214
1605
|
y: "14",
|
|
1215
1606
|
width: "18",
|
|
@@ -1219,26 +1610,26 @@ function le({ logic: e = {} }) {
|
|
|
1219
1610
|
})
|
|
1220
1611
|
]
|
|
1221
1612
|
})
|
|
1222
|
-
}), /* @__PURE__ */
|
|
1223
|
-
className:
|
|
1613
|
+
}), /* @__PURE__ */ R("span", {
|
|
1614
|
+
className: p,
|
|
1224
1615
|
"data-i18n": "alignLeft",
|
|
1225
1616
|
children: "Align left"
|
|
1226
1617
|
})]
|
|
1227
1618
|
}),
|
|
1228
|
-
/* @__PURE__ */
|
|
1619
|
+
/* @__PURE__ */ R("button", {
|
|
1229
1620
|
type: "button",
|
|
1230
|
-
className:
|
|
1621
|
+
className: m,
|
|
1231
1622
|
onMouseDown: (e) => {
|
|
1232
|
-
|
|
1623
|
+
u(e, i, "center"), c(!1);
|
|
1233
1624
|
},
|
|
1234
1625
|
"aria-label": "Align center",
|
|
1235
|
-
children: [/* @__PURE__ */
|
|
1236
|
-
className:
|
|
1237
|
-
children: /* @__PURE__ */
|
|
1626
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1627
|
+
className: f,
|
|
1628
|
+
children: /* @__PURE__ */ R("svg", {
|
|
1238
1629
|
viewBox: "0 0 20 20",
|
|
1239
1630
|
className: "block h-4 w-4",
|
|
1240
1631
|
children: [
|
|
1241
|
-
/* @__PURE__ */
|
|
1632
|
+
/* @__PURE__ */ R("rect", {
|
|
1242
1633
|
x: "1",
|
|
1243
1634
|
y: "4",
|
|
1244
1635
|
width: "18",
|
|
@@ -1246,7 +1637,7 @@ function le({ logic: e = {} }) {
|
|
|
1246
1637
|
rx: "1",
|
|
1247
1638
|
fill: "black"
|
|
1248
1639
|
}),
|
|
1249
|
-
/* @__PURE__ */
|
|
1640
|
+
/* @__PURE__ */ R("rect", {
|
|
1250
1641
|
x: "4",
|
|
1251
1642
|
y: "9",
|
|
1252
1643
|
width: "12",
|
|
@@ -1254,7 +1645,7 @@ function le({ logic: e = {} }) {
|
|
|
1254
1645
|
rx: "1",
|
|
1255
1646
|
fill: "black"
|
|
1256
1647
|
}),
|
|
1257
|
-
/* @__PURE__ */
|
|
1648
|
+
/* @__PURE__ */ R("rect", {
|
|
1258
1649
|
x: "1",
|
|
1259
1650
|
y: "14",
|
|
1260
1651
|
width: "18",
|
|
@@ -1264,26 +1655,26 @@ function le({ logic: e = {} }) {
|
|
|
1264
1655
|
})
|
|
1265
1656
|
]
|
|
1266
1657
|
})
|
|
1267
|
-
}), /* @__PURE__ */
|
|
1268
|
-
className:
|
|
1658
|
+
}), /* @__PURE__ */ R("span", {
|
|
1659
|
+
className: p,
|
|
1269
1660
|
"data-i18n": "alignCenter",
|
|
1270
1661
|
children: "Align center"
|
|
1271
1662
|
})]
|
|
1272
1663
|
}),
|
|
1273
|
-
/* @__PURE__ */
|
|
1664
|
+
/* @__PURE__ */ R("button", {
|
|
1274
1665
|
type: "button",
|
|
1275
|
-
className:
|
|
1666
|
+
className: m,
|
|
1276
1667
|
onMouseDown: (e) => {
|
|
1277
|
-
|
|
1668
|
+
u(e, i, "right"), c(!1);
|
|
1278
1669
|
},
|
|
1279
1670
|
"aria-label": "Align right",
|
|
1280
|
-
children: [/* @__PURE__ */
|
|
1281
|
-
className:
|
|
1282
|
-
children: /* @__PURE__ */
|
|
1671
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1672
|
+
className: f,
|
|
1673
|
+
children: /* @__PURE__ */ R("svg", {
|
|
1283
1674
|
viewBox: "0 0 20 20",
|
|
1284
1675
|
className: "block h-4 w-4",
|
|
1285
1676
|
children: [
|
|
1286
|
-
/* @__PURE__ */
|
|
1677
|
+
/* @__PURE__ */ R("rect", {
|
|
1287
1678
|
x: "1",
|
|
1288
1679
|
y: "4",
|
|
1289
1680
|
width: "18",
|
|
@@ -1291,7 +1682,7 @@ function le({ logic: e = {} }) {
|
|
|
1291
1682
|
rx: "1",
|
|
1292
1683
|
fill: "black"
|
|
1293
1684
|
}),
|
|
1294
|
-
/* @__PURE__ */
|
|
1685
|
+
/* @__PURE__ */ R("rect", {
|
|
1295
1686
|
x: "7",
|
|
1296
1687
|
y: "9",
|
|
1297
1688
|
width: "12",
|
|
@@ -1299,7 +1690,7 @@ function le({ logic: e = {} }) {
|
|
|
1299
1690
|
rx: "1",
|
|
1300
1691
|
fill: "black"
|
|
1301
1692
|
}),
|
|
1302
|
-
/* @__PURE__ */
|
|
1693
|
+
/* @__PURE__ */ R("rect", {
|
|
1303
1694
|
x: "1",
|
|
1304
1695
|
y: "14",
|
|
1305
1696
|
width: "18",
|
|
@@ -1309,26 +1700,26 @@ function le({ logic: e = {} }) {
|
|
|
1309
1700
|
})
|
|
1310
1701
|
]
|
|
1311
1702
|
})
|
|
1312
|
-
}), /* @__PURE__ */
|
|
1313
|
-
className:
|
|
1703
|
+
}), /* @__PURE__ */ R("span", {
|
|
1704
|
+
className: p,
|
|
1314
1705
|
"data-i18n": "alignRight",
|
|
1315
1706
|
children: "Align right"
|
|
1316
1707
|
})]
|
|
1317
1708
|
}),
|
|
1318
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ R("button", {
|
|
1319
1710
|
type: "button",
|
|
1320
|
-
className:
|
|
1711
|
+
className: m,
|
|
1321
1712
|
onMouseDown: (e) => {
|
|
1322
|
-
|
|
1713
|
+
u(e, i, "justify"), c(!1);
|
|
1323
1714
|
},
|
|
1324
1715
|
"aria-label": "Justify",
|
|
1325
|
-
children: [/* @__PURE__ */
|
|
1326
|
-
className:
|
|
1327
|
-
children: /* @__PURE__ */
|
|
1716
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1717
|
+
className: f,
|
|
1718
|
+
children: /* @__PURE__ */ R("svg", {
|
|
1328
1719
|
viewBox: "0 0 20 20",
|
|
1329
1720
|
className: "block h-4 w-4",
|
|
1330
1721
|
children: [
|
|
1331
|
-
/* @__PURE__ */
|
|
1722
|
+
/* @__PURE__ */ R("rect", {
|
|
1332
1723
|
x: "1",
|
|
1333
1724
|
y: "4",
|
|
1334
1725
|
width: "18",
|
|
@@ -1336,7 +1727,7 @@ function le({ logic: e = {} }) {
|
|
|
1336
1727
|
rx: "1",
|
|
1337
1728
|
fill: "black"
|
|
1338
1729
|
}),
|
|
1339
|
-
/* @__PURE__ */
|
|
1730
|
+
/* @__PURE__ */ R("rect", {
|
|
1340
1731
|
x: "1",
|
|
1341
1732
|
y: "9",
|
|
1342
1733
|
width: "18",
|
|
@@ -1344,7 +1735,7 @@ function le({ logic: e = {} }) {
|
|
|
1344
1735
|
rx: "1",
|
|
1345
1736
|
fill: "black"
|
|
1346
1737
|
}),
|
|
1347
|
-
/* @__PURE__ */
|
|
1738
|
+
/* @__PURE__ */ R("rect", {
|
|
1348
1739
|
x: "1",
|
|
1349
1740
|
y: "14",
|
|
1350
1741
|
width: "18",
|
|
@@ -1354,25 +1745,25 @@ function le({ logic: e = {} }) {
|
|
|
1354
1745
|
})
|
|
1355
1746
|
]
|
|
1356
1747
|
})
|
|
1357
|
-
}), /* @__PURE__ */
|
|
1358
|
-
className:
|
|
1748
|
+
}), /* @__PURE__ */ R("span", {
|
|
1749
|
+
className: p,
|
|
1359
1750
|
"data-i18n": "justify",
|
|
1360
1751
|
children: "Justify"
|
|
1361
1752
|
})]
|
|
1362
1753
|
})
|
|
1363
1754
|
]
|
|
1364
|
-
}), /* @__PURE__ */
|
|
1755
|
+
}), /* @__PURE__ */ R("div", {
|
|
1365
1756
|
className: "forge-toolbar-group forge-toolbar-list flex gap-0.5 py-0.5",
|
|
1366
|
-
children: [/* @__PURE__ */
|
|
1757
|
+
children: [/* @__PURE__ */ R("button", {
|
|
1367
1758
|
type: "button",
|
|
1368
|
-
className:
|
|
1759
|
+
className: m,
|
|
1369
1760
|
onMouseDown: (e) => {
|
|
1370
|
-
|
|
1761
|
+
u(e, a), c(!1);
|
|
1371
1762
|
},
|
|
1372
1763
|
"aria-label": "Outdent",
|
|
1373
|
-
children: [/* @__PURE__ */
|
|
1374
|
-
className:
|
|
1375
|
-
children: /* @__PURE__ */
|
|
1764
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1765
|
+
className: f,
|
|
1766
|
+
children: /* @__PURE__ */ R("svg", {
|
|
1376
1767
|
viewBox: "0 0 20 20",
|
|
1377
1768
|
className: "block h-4 w-4",
|
|
1378
1769
|
fill: "none",
|
|
@@ -1381,42 +1772,42 @@ function le({ logic: e = {} }) {
|
|
|
1381
1772
|
strokeLinecap: "round",
|
|
1382
1773
|
strokeLinejoin: "round",
|
|
1383
1774
|
children: [
|
|
1384
|
-
/* @__PURE__ */
|
|
1775
|
+
/* @__PURE__ */ R("line", {
|
|
1385
1776
|
x1: "9",
|
|
1386
1777
|
y1: "4",
|
|
1387
1778
|
x2: "19",
|
|
1388
1779
|
y2: "4"
|
|
1389
1780
|
}),
|
|
1390
|
-
/* @__PURE__ */
|
|
1781
|
+
/* @__PURE__ */ R("line", {
|
|
1391
1782
|
x1: "9",
|
|
1392
1783
|
y1: "10",
|
|
1393
1784
|
x2: "19",
|
|
1394
1785
|
y2: "10"
|
|
1395
1786
|
}),
|
|
1396
|
-
/* @__PURE__ */
|
|
1787
|
+
/* @__PURE__ */ R("line", {
|
|
1397
1788
|
x1: "9",
|
|
1398
1789
|
y1: "16",
|
|
1399
1790
|
x2: "19",
|
|
1400
1791
|
y2: "16"
|
|
1401
1792
|
}),
|
|
1402
|
-
/* @__PURE__ */
|
|
1793
|
+
/* @__PURE__ */ R("polyline", { points: "6,8 2,12 6,16" })
|
|
1403
1794
|
]
|
|
1404
1795
|
})
|
|
1405
|
-
}), /* @__PURE__ */
|
|
1406
|
-
className:
|
|
1796
|
+
}), /* @__PURE__ */ R("span", {
|
|
1797
|
+
className: p,
|
|
1407
1798
|
"data-i18n": "outdent",
|
|
1408
1799
|
children: "Outdent"
|
|
1409
1800
|
})]
|
|
1410
|
-
}), /* @__PURE__ */
|
|
1801
|
+
}), /* @__PURE__ */ R("button", {
|
|
1411
1802
|
type: "button",
|
|
1412
|
-
className:
|
|
1803
|
+
className: m,
|
|
1413
1804
|
onMouseDown: (e) => {
|
|
1414
|
-
|
|
1805
|
+
u(e, o), c(!1);
|
|
1415
1806
|
},
|
|
1416
1807
|
"aria-label": "Indent",
|
|
1417
|
-
children: [/* @__PURE__ */
|
|
1418
|
-
className:
|
|
1419
|
-
children: /* @__PURE__ */
|
|
1808
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1809
|
+
className: f,
|
|
1810
|
+
children: /* @__PURE__ */ R("svg", {
|
|
1420
1811
|
viewBox: "0 0 20 20",
|
|
1421
1812
|
className: "block h-4 w-4",
|
|
1422
1813
|
fill: "none",
|
|
@@ -1425,29 +1816,29 @@ function le({ logic: e = {} }) {
|
|
|
1425
1816
|
strokeLinecap: "round",
|
|
1426
1817
|
strokeLinejoin: "round",
|
|
1427
1818
|
children: [
|
|
1428
|
-
/* @__PURE__ */
|
|
1819
|
+
/* @__PURE__ */ R("line", {
|
|
1429
1820
|
x1: "9",
|
|
1430
1821
|
y1: "4",
|
|
1431
1822
|
x2: "19",
|
|
1432
1823
|
y2: "4"
|
|
1433
1824
|
}),
|
|
1434
|
-
/* @__PURE__ */
|
|
1825
|
+
/* @__PURE__ */ R("line", {
|
|
1435
1826
|
x1: "9",
|
|
1436
1827
|
y1: "10",
|
|
1437
1828
|
x2: "19",
|
|
1438
1829
|
y2: "10"
|
|
1439
1830
|
}),
|
|
1440
|
-
/* @__PURE__ */
|
|
1831
|
+
/* @__PURE__ */ R("line", {
|
|
1441
1832
|
x1: "9",
|
|
1442
1833
|
y1: "16",
|
|
1443
1834
|
x2: "19",
|
|
1444
1835
|
y2: "16"
|
|
1445
1836
|
}),
|
|
1446
|
-
/* @__PURE__ */
|
|
1837
|
+
/* @__PURE__ */ R("polyline", { points: "2,8 6,12 2,16" })
|
|
1447
1838
|
]
|
|
1448
1839
|
})
|
|
1449
|
-
}), /* @__PURE__ */
|
|
1450
|
-
className:
|
|
1840
|
+
}), /* @__PURE__ */ R("span", {
|
|
1841
|
+
className: p,
|
|
1451
1842
|
"data-i18n": "indent",
|
|
1452
1843
|
children: "Indent"
|
|
1453
1844
|
})]
|
|
@@ -1459,23 +1850,23 @@ function le({ logic: e = {} }) {
|
|
|
1459
1850
|
}
|
|
1460
1851
|
//#endregion
|
|
1461
1852
|
//#region src/components/shared/toolbar/Paragraph/Hooks/paragraphLogic.jsx
|
|
1462
|
-
function
|
|
1853
|
+
function dt() {
|
|
1463
1854
|
let e = window.getSelection();
|
|
1464
1855
|
return e && e.rangeCount > 0 ? e.getRangeAt(0).cloneRange() : null;
|
|
1465
1856
|
}
|
|
1466
|
-
function
|
|
1857
|
+
function ft(e) {
|
|
1467
1858
|
if (!e) return;
|
|
1468
1859
|
let t = window.getSelection();
|
|
1469
1860
|
t && (t.removeAllRanges(), t.addRange(e));
|
|
1470
1861
|
}
|
|
1471
|
-
function
|
|
1862
|
+
function X(e) {
|
|
1472
1863
|
if (!e) return;
|
|
1473
1864
|
let t = document.createRange();
|
|
1474
1865
|
t.selectNodeContents(e), t.collapse(!1);
|
|
1475
1866
|
let n = window.getSelection();
|
|
1476
1867
|
n && (n.removeAllRanges(), n.addRange(t));
|
|
1477
1868
|
}
|
|
1478
|
-
function
|
|
1869
|
+
function pt(e) {
|
|
1479
1870
|
if (!e || e.nodeType !== 1) return !1;
|
|
1480
1871
|
let t = e.tagName.toLowerCase();
|
|
1481
1872
|
return [
|
|
@@ -1492,69 +1883,69 @@ function P(e) {
|
|
|
1492
1883
|
"pre"
|
|
1493
1884
|
].includes(t);
|
|
1494
1885
|
}
|
|
1495
|
-
function
|
|
1886
|
+
function mt(e) {
|
|
1496
1887
|
if (!e) return null;
|
|
1497
1888
|
let t = e.nodeType === 3 ? e.parentNode : e;
|
|
1498
|
-
for (; t && t !== document.body && !
|
|
1499
|
-
return t &&
|
|
1889
|
+
for (; t && t !== document.body && !pt(t);) t = t.parentNode;
|
|
1890
|
+
return t && pt(t) ? t : null;
|
|
1500
1891
|
}
|
|
1501
|
-
function
|
|
1892
|
+
function ht(e) {
|
|
1502
1893
|
if (!e) return null;
|
|
1503
1894
|
let t = e.nodeType === 3 ? e.parentNode : e;
|
|
1504
1895
|
for (; t && t !== document.body && t.tagName !== "LI";) t = t.parentNode;
|
|
1505
1896
|
return t && t.tagName === "LI" ? t : null;
|
|
1506
1897
|
}
|
|
1507
|
-
function
|
|
1898
|
+
function gt(e) {
|
|
1508
1899
|
let t = document.createElement(e);
|
|
1509
1900
|
return t.className = e === "ul" ? "list-disc pl-5 my-2" : "list-decimal pl-5 my-2", t;
|
|
1510
1901
|
}
|
|
1511
|
-
function
|
|
1512
|
-
let n =
|
|
1902
|
+
function _t(e, t) {
|
|
1903
|
+
let n = gt(t), r = document.createElement("li");
|
|
1513
1904
|
return r.innerHTML = e.innerHTML, n.appendChild(r), e.parentNode.replaceChild(n, e), r;
|
|
1514
1905
|
}
|
|
1515
|
-
function
|
|
1906
|
+
function vt(e) {
|
|
1516
1907
|
let t = e.parentNode, n = document.createDocumentFragment(), r = Array.from(e.children), i = null;
|
|
1517
1908
|
return r.forEach((e) => {
|
|
1518
1909
|
let t = document.createElement("div");
|
|
1519
1910
|
t.innerHTML = e.innerHTML, n.appendChild(t), i = t;
|
|
1520
1911
|
}), t.replaceChild(n, e), i;
|
|
1521
1912
|
}
|
|
1522
|
-
function
|
|
1523
|
-
let n =
|
|
1913
|
+
function yt(e, t) {
|
|
1914
|
+
let n = gt(t);
|
|
1524
1915
|
return n.innerHTML = e.innerHTML, e.parentNode.replaceChild(n, e), n;
|
|
1525
1916
|
}
|
|
1526
|
-
function
|
|
1527
|
-
let e =
|
|
1528
|
-
e.current =
|
|
1917
|
+
function bt() {
|
|
1918
|
+
let e = q(null), t = () => {
|
|
1919
|
+
e.current = dt();
|
|
1529
1920
|
}, n = (t) => {
|
|
1530
|
-
|
|
1921
|
+
ft(e.current);
|
|
1531
1922
|
let n = window.getSelection();
|
|
1532
1923
|
if (!n || !n.rangeCount) return;
|
|
1533
1924
|
let r = n.anchorNode;
|
|
1534
1925
|
if (!r) return;
|
|
1535
1926
|
r.nodeType === 3 && (r = r.parentNode);
|
|
1536
|
-
let i =
|
|
1927
|
+
let i = ht(r);
|
|
1537
1928
|
if (i) {
|
|
1538
1929
|
let n = i.parentNode;
|
|
1539
1930
|
if (n && (n.tagName === "UL" || n.tagName === "OL")) {
|
|
1540
1931
|
if (n.tagName.toLowerCase() === t) {
|
|
1541
|
-
let e =
|
|
1542
|
-
e &&
|
|
1932
|
+
let e = vt(n);
|
|
1933
|
+
e && X(e);
|
|
1543
1934
|
} else {
|
|
1544
|
-
let e =
|
|
1545
|
-
e &&
|
|
1935
|
+
let e = yt(n, t).lastElementChild;
|
|
1936
|
+
e && X(e);
|
|
1546
1937
|
}
|
|
1547
|
-
e.current =
|
|
1938
|
+
e.current = dt();
|
|
1548
1939
|
return;
|
|
1549
1940
|
}
|
|
1550
1941
|
}
|
|
1551
|
-
let a =
|
|
1942
|
+
let a = mt(r);
|
|
1552
1943
|
if (a) {
|
|
1553
1944
|
if (a.getAttribute && a.getAttribute("contenteditable") === "true") {
|
|
1554
1945
|
let e = document.createElement("div");
|
|
1555
|
-
e.innerHTML = a.innerHTML, a.innerHTML = "", a.appendChild(e),
|
|
1556
|
-
} else
|
|
1557
|
-
e.current =
|
|
1946
|
+
e.innerHTML = a.innerHTML, a.innerHTML = "", a.appendChild(e), X(_t(e, t));
|
|
1947
|
+
} else X(_t(a, t));
|
|
1948
|
+
e.current = dt();
|
|
1558
1949
|
}
|
|
1559
1950
|
};
|
|
1560
1951
|
return {
|
|
@@ -1562,138 +1953,138 @@ function V() {
|
|
|
1562
1953
|
toggleUnorderedList: () => n("ul"),
|
|
1563
1954
|
toggleOrderedList: () => n("ol"),
|
|
1564
1955
|
setAlignment: (t) => {
|
|
1565
|
-
|
|
1956
|
+
ft(e.current);
|
|
1566
1957
|
let n = window.getSelection();
|
|
1567
1958
|
if (!n || !n.rangeCount) return;
|
|
1568
1959
|
let r = n.anchorNode;
|
|
1569
1960
|
if (!r) return;
|
|
1570
1961
|
r.nodeType === 3 && (r = r.parentNode);
|
|
1571
1962
|
let i = r.closest("p, div, h1, h2, h3, h4, h5, h6, li, blockquote, pre");
|
|
1572
|
-
i && (i.style.textAlign = t), e.current =
|
|
1963
|
+
i && (i.style.textAlign = t), e.current = dt();
|
|
1573
1964
|
},
|
|
1574
1965
|
indent: () => {
|
|
1575
|
-
|
|
1966
|
+
ft(e.current);
|
|
1576
1967
|
let t = window.getSelection();
|
|
1577
1968
|
if (!t || !t.rangeCount) return;
|
|
1578
1969
|
let n = t.anchorNode;
|
|
1579
1970
|
if (!n) return;
|
|
1580
1971
|
n.nodeType === 3 && (n = n.parentNode);
|
|
1581
|
-
let r =
|
|
1972
|
+
let r = ht(n);
|
|
1582
1973
|
if (r) {
|
|
1583
1974
|
let e = r.parentNode;
|
|
1584
1975
|
if (!e || e.tagName !== "UL" && e.tagName !== "OL") return;
|
|
1585
1976
|
let t = r.previousElementSibling;
|
|
1586
1977
|
if (!t || t.tagName !== "LI") return;
|
|
1587
1978
|
let n = t.querySelector(":scope > ul, :scope > ol");
|
|
1588
|
-
n || (n =
|
|
1979
|
+
n || (n = gt(e.tagName.toLowerCase()), t.appendChild(n)), n.appendChild(r), X(r);
|
|
1589
1980
|
} else {
|
|
1590
|
-
let e =
|
|
1981
|
+
let e = mt(n);
|
|
1591
1982
|
if (!e) return;
|
|
1592
1983
|
let t = parseInt(e.style.marginLeft) || 0;
|
|
1593
1984
|
e.style.marginLeft = t + 20 + "px";
|
|
1594
1985
|
}
|
|
1595
|
-
e.current =
|
|
1986
|
+
e.current = dt();
|
|
1596
1987
|
},
|
|
1597
1988
|
outdent: () => {
|
|
1598
|
-
|
|
1989
|
+
ft(e.current);
|
|
1599
1990
|
let t = window.getSelection();
|
|
1600
1991
|
if (!t || !t.rangeCount) return;
|
|
1601
1992
|
let n = t.anchorNode;
|
|
1602
1993
|
if (!n) return;
|
|
1603
1994
|
n.nodeType === 3 && (n = n.parentNode);
|
|
1604
|
-
let r =
|
|
1995
|
+
let r = ht(n);
|
|
1605
1996
|
if (r) {
|
|
1606
1997
|
let e = r.parentNode;
|
|
1607
1998
|
if (!e || e.tagName !== "UL" && e.tagName !== "OL") return;
|
|
1608
1999
|
let t = e.parentNode;
|
|
1609
|
-
if (t && t.tagName === "LI") t.parentNode.insertBefore(r, t.nextSibling), e.children.length === 0 && e.remove(),
|
|
2000
|
+
if (t && t.tagName === "LI") t.parentNode.insertBefore(r, t.nextSibling), e.children.length === 0 && e.remove(), X(r);
|
|
1610
2001
|
else {
|
|
1611
2002
|
let t = document.createElement("div");
|
|
1612
2003
|
t.innerHTML = r.innerHTML;
|
|
1613
2004
|
let n = e.parentNode;
|
|
1614
|
-
e.children.length === 1 ? n.replaceChild(t, e) : (n.insertBefore(t, e.nextSibling), e.removeChild(r)),
|
|
2005
|
+
e.children.length === 1 ? n.replaceChild(t, e) : (n.insertBefore(t, e.nextSibling), e.removeChild(r)), X(t);
|
|
1615
2006
|
}
|
|
1616
2007
|
} else {
|
|
1617
|
-
let e =
|
|
2008
|
+
let e = mt(n);
|
|
1618
2009
|
if (!e) return;
|
|
1619
2010
|
let t = parseInt(e.style.marginLeft) || 0;
|
|
1620
2011
|
e.style.marginLeft = Math.max(0, t - 20) + "px";
|
|
1621
2012
|
}
|
|
1622
|
-
e.current =
|
|
2013
|
+
e.current = dt();
|
|
1623
2014
|
}
|
|
1624
2015
|
};
|
|
1625
2016
|
}
|
|
1626
2017
|
//#endregion
|
|
1627
2018
|
//#region src/components/shared/toolbar/Paragraph/Components/index.jsx
|
|
1628
|
-
function
|
|
1629
|
-
return /* @__PURE__ */
|
|
2019
|
+
function xt() {
|
|
2020
|
+
return /* @__PURE__ */ R(ut, { logic: bt() });
|
|
1630
2021
|
}
|
|
1631
2022
|
//#endregion
|
|
1632
2023
|
//#region src/components/shared/toolbar/Table/Components/TableToolbar.jsx
|
|
1633
|
-
var
|
|
1634
|
-
function
|
|
1635
|
-
let { insertTable: t } = e, [
|
|
1636
|
-
|
|
1637
|
-
if (!
|
|
2024
|
+
var St = 10;
|
|
2025
|
+
function Ct({ logic: e }) {
|
|
2026
|
+
let { insertTable: t } = e, [n, r] = G(1), [i, a] = G(1), [o, s] = G(!1), c = q(null), l = q(null), u = q(null);
|
|
2027
|
+
K(() => {
|
|
2028
|
+
if (!o) return;
|
|
1638
2029
|
function e(e) {
|
|
1639
|
-
|
|
2030
|
+
l.current && !l.current.contains(e.target) && c.current && !c.current.contains(e.target) && s(!1);
|
|
1640
2031
|
}
|
|
1641
2032
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1642
|
-
}, [
|
|
1643
|
-
let
|
|
1644
|
-
if (!
|
|
1645
|
-
let t =
|
|
1646
|
-
|
|
1647
|
-
},
|
|
1648
|
-
|
|
1649
|
-
},
|
|
1650
|
-
t(
|
|
1651
|
-
},
|
|
1652
|
-
return /* @__PURE__ */
|
|
2033
|
+
}, [o]);
|
|
2034
|
+
let d = (e) => {
|
|
2035
|
+
if (!u.current) return;
|
|
2036
|
+
let t = u.current.getBoundingClientRect(), n = e.clientX - t.left, i = e.clientY - t.top, o = t.width / St, s = Math.min(Math.floor(n / o) + 1, St), c = Math.min(Math.floor(i / o) + 1, St);
|
|
2037
|
+
a(s), r(c);
|
|
2038
|
+
}, f = () => {
|
|
2039
|
+
r(1), a(1);
|
|
2040
|
+
}, p = () => {
|
|
2041
|
+
t(n, i), s(!1), r(1), a(1);
|
|
2042
|
+
}, m = i / St * 100, h = n / St * 100;
|
|
2043
|
+
return /* @__PURE__ */ R("div", {
|
|
1653
2044
|
className: "forge-toolbar-group forge-toolbar-table relative flex items-center gap-0.5",
|
|
1654
|
-
children: [/* @__PURE__ */
|
|
1655
|
-
ref:
|
|
2045
|
+
children: [/* @__PURE__ */ R("button", {
|
|
2046
|
+
ref: c,
|
|
1656
2047
|
type: "button",
|
|
1657
2048
|
className: "forge-toolbar-button group relative flex h-8 cursor-pointer items-center justify-center rounded-[2px] border border-[#ccc] bg-white px-2 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px",
|
|
1658
2049
|
"aria-label": "Table",
|
|
1659
|
-
onClick: () =>
|
|
1660
|
-
children: [/* @__PURE__ */
|
|
2050
|
+
onClick: () => s(!o),
|
|
2051
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1661
2052
|
className: "forge-toolbar-icon",
|
|
1662
2053
|
children: "▦"
|
|
1663
|
-
}), /* @__PURE__ */
|
|
2054
|
+
}), /* @__PURE__ */ R("span", {
|
|
1664
2055
|
className: "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]",
|
|
1665
2056
|
"data-i18n": "table",
|
|
1666
2057
|
children: "Table"
|
|
1667
2058
|
})]
|
|
1668
|
-
}), /* @__PURE__ */
|
|
1669
|
-
ref:
|
|
1670
|
-
className: `forge-toolbar-dropdown forge-dropdown-table absolute left-0 top-full z-10 mt-1 min-w-[160px] rounded-[3px] border border-[#ccc] bg-white p-2 shadow-[0_2px_6px_rgba(0,0,0,0.15)] rtl:left-auto rtl:right-0 ${
|
|
2059
|
+
}), /* @__PURE__ */ R("div", {
|
|
2060
|
+
ref: l,
|
|
2061
|
+
className: `forge-toolbar-dropdown forge-dropdown-table absolute left-0 top-full z-10 mt-1 min-w-[160px] rounded-[3px] border border-[#ccc] bg-white p-2 shadow-[0_2px_6px_rgba(0,0,0,0.15)] rtl:left-auto rtl:right-0 ${o ? "block" : "hidden"}`,
|
|
1671
2062
|
role: "list",
|
|
1672
2063
|
"aria-label": "Insert table",
|
|
1673
|
-
children: [/* @__PURE__ */
|
|
1674
|
-
ref:
|
|
2064
|
+
children: [/* @__PURE__ */ R("div", {
|
|
2065
|
+
ref: u,
|
|
1675
2066
|
className: "note-dimension-picker relative mx-auto h-40 w-40 cursor-pointer overflow-hidden rounded-[3px] border border-[#ccc] bg-[#f5f5f5]",
|
|
1676
|
-
onMouseMove:
|
|
1677
|
-
onMouseLeave:
|
|
1678
|
-
onClick:
|
|
2067
|
+
onMouseMove: d,
|
|
2068
|
+
onMouseLeave: f,
|
|
2069
|
+
onClick: p,
|
|
1679
2070
|
children: [
|
|
1680
|
-
/* @__PURE__ */
|
|
1681
|
-
/* @__PURE__ */
|
|
2071
|
+
/* @__PURE__ */ R("div", { className: "absolute inset-0 z-[5]" }),
|
|
2072
|
+
/* @__PURE__ */ R("div", {
|
|
1682
2073
|
className: "pointer-events-none absolute left-0 top-0 z-[3] border-2 border-[#4a90d9] bg-[rgba(74,144,217,0.4)] transition-[width,height] duration-75 ease-in-out",
|
|
1683
2074
|
style: {
|
|
1684
|
-
width:
|
|
1685
|
-
height:
|
|
2075
|
+
width: m + "%",
|
|
2076
|
+
height: h + "%"
|
|
1686
2077
|
}
|
|
1687
2078
|
}),
|
|
1688
|
-
/* @__PURE__ */
|
|
1689
|
-
/* @__PURE__ */
|
|
2079
|
+
/* @__PURE__ */ R("div", { className: "pointer-events-none absolute inset-0 z-[2] bg-white/30" }),
|
|
2080
|
+
/* @__PURE__ */ R("div", { className: "pointer-events-none absolute inset-0 z-[1] bg-[linear-gradient(rgba(0,0,0,0.05)_1px,transparent_1px),linear-gradient(90deg,rgba(0,0,0,0.05)_1px,transparent_1px)] bg-[size:16px_16px]" })
|
|
1690
2081
|
]
|
|
1691
|
-
}), /* @__PURE__ */
|
|
2082
|
+
}), /* @__PURE__ */ R("div", {
|
|
1692
2083
|
className: "note-dimension-display px-0 pt-1.5 pb-0.5 text-center text-[13px] font-semibold text-[#333]",
|
|
1693
2084
|
children: [
|
|
1694
|
-
|
|
2085
|
+
n,
|
|
1695
2086
|
" x ",
|
|
1696
|
-
|
|
2087
|
+
i
|
|
1697
2088
|
]
|
|
1698
2089
|
})]
|
|
1699
2090
|
})]
|
|
@@ -1701,7 +2092,7 @@ function W({ logic: e }) {
|
|
|
1701
2092
|
}
|
|
1702
2093
|
//#endregion
|
|
1703
2094
|
//#region src/components/shared/toolbar/Table/Hooks/tableLogic.jsx
|
|
1704
|
-
function
|
|
2095
|
+
function wt() {
|
|
1705
2096
|
let e = document.querySelector(".forge-editor__content");
|
|
1706
2097
|
if (e) {
|
|
1707
2098
|
e.focus();
|
|
@@ -1712,10 +2103,10 @@ function G() {
|
|
|
1712
2103
|
}
|
|
1713
2104
|
}
|
|
1714
2105
|
}
|
|
1715
|
-
function
|
|
2106
|
+
function Tt(e) {
|
|
1716
2107
|
let t = window.getSelection();
|
|
1717
2108
|
if (!t || !t.rangeCount) {
|
|
1718
|
-
|
|
2109
|
+
wt(), setTimeout(() => Tt(e), 50);
|
|
1719
2110
|
return;
|
|
1720
2111
|
}
|
|
1721
2112
|
let n = t.getRangeAt(0);
|
|
@@ -1723,7 +2114,7 @@ function K(e) {
|
|
|
1723
2114
|
let r = n.createContextualFragment(e), i = r.lastChild;
|
|
1724
2115
|
n.insertNode(r), i ? (n.setStartAfter(i), n.collapse(!0)) : n.collapse(!1), t.removeAllRanges(), t.addRange(n);
|
|
1725
2116
|
}
|
|
1726
|
-
function
|
|
2117
|
+
function Et() {
|
|
1727
2118
|
return { insertTable: (e, t) => {
|
|
1728
2119
|
let n = (100 / t).toFixed(2) + "%", r = "<table style=\"width:100%;table-layout:fixed;border-collapse:collapse;border:1px solid #ddd;\">";
|
|
1729
2120
|
for (let i = 0; i < e; i++) {
|
|
@@ -1731,58 +2122,58 @@ function q() {
|
|
|
1731
2122
|
for (let e = 0; e < t; e++) r += `<td style="border:1px solid #ddd;padding:8px;width:${n};text-align:center;vertical-align:middle;overflow:hidden;word-break:break-word;"><br></td>`;
|
|
1732
2123
|
r += "</tr>";
|
|
1733
2124
|
}
|
|
1734
|
-
r += "</table><br>",
|
|
2125
|
+
r += "</table><br>", wt(), Tt(r);
|
|
1735
2126
|
} };
|
|
1736
2127
|
}
|
|
1737
2128
|
//#endregion
|
|
1738
2129
|
//#region src/components/shared/toolbar/Table/Components/index.jsx
|
|
1739
|
-
function
|
|
1740
|
-
return /* @__PURE__ */
|
|
2130
|
+
function Dt() {
|
|
2131
|
+
return /* @__PURE__ */ R(Ct, { logic: Et() });
|
|
1741
2132
|
}
|
|
1742
2133
|
//#endregion
|
|
1743
2134
|
//#region src/components/shared/toolbar/Insert/Components/InsertToolbar.jsx
|
|
1744
|
-
function
|
|
2135
|
+
function Ot({ logic: e }) {
|
|
1745
2136
|
let { insertLink: t, insertImage: n, insertVideo: r } = e, i = "forge-toolbar-button group relative flex h-8 cursor-pointer items-center justify-center gap-0.5 rounded-[2px] border border-[#ccc] bg-white px-[7px] py-1 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px", a = "forge-toolbar-icon inline-block min-w-4 text-center text-sm font-medium leading-none", o = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
|
|
1746
|
-
return /* @__PURE__ */
|
|
2137
|
+
return /* @__PURE__ */ R("div", {
|
|
1747
2138
|
className: "forge-toolbar-group forge-toolbar-insert flex items-center gap-0.5",
|
|
1748
2139
|
children: [
|
|
1749
|
-
/* @__PURE__ */
|
|
2140
|
+
/* @__PURE__ */ R("button", {
|
|
1750
2141
|
type: "button",
|
|
1751
2142
|
className: i,
|
|
1752
2143
|
onClick: t,
|
|
1753
2144
|
"aria-label": "Link",
|
|
1754
|
-
children: [/* @__PURE__ */
|
|
2145
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1755
2146
|
className: a,
|
|
1756
2147
|
children: "🔗"
|
|
1757
|
-
}), /* @__PURE__ */
|
|
2148
|
+
}), /* @__PURE__ */ R("span", {
|
|
1758
2149
|
className: o,
|
|
1759
2150
|
"data-i18n": "link",
|
|
1760
2151
|
children: "Link"
|
|
1761
2152
|
})]
|
|
1762
2153
|
}),
|
|
1763
|
-
/* @__PURE__ */
|
|
2154
|
+
/* @__PURE__ */ R("button", {
|
|
1764
2155
|
type: "button",
|
|
1765
2156
|
className: i,
|
|
1766
2157
|
onClick: n,
|
|
1767
2158
|
"aria-label": "Image",
|
|
1768
|
-
children: [/* @__PURE__ */
|
|
2159
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1769
2160
|
className: a,
|
|
1770
2161
|
children: "🖼"
|
|
1771
|
-
}), /* @__PURE__ */
|
|
2162
|
+
}), /* @__PURE__ */ R("span", {
|
|
1772
2163
|
className: o,
|
|
1773
2164
|
"data-i18n": "image",
|
|
1774
2165
|
children: "Image"
|
|
1775
2166
|
})]
|
|
1776
2167
|
}),
|
|
1777
|
-
/* @__PURE__ */
|
|
2168
|
+
/* @__PURE__ */ R("button", {
|
|
1778
2169
|
type: "button",
|
|
1779
2170
|
className: i,
|
|
1780
2171
|
onClick: r,
|
|
1781
2172
|
"aria-label": "Video",
|
|
1782
|
-
children: [/* @__PURE__ */
|
|
2173
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1783
2174
|
className: a,
|
|
1784
2175
|
children: "▶"
|
|
1785
|
-
}), /* @__PURE__ */
|
|
2176
|
+
}), /* @__PURE__ */ R("span", {
|
|
1786
2177
|
className: o,
|
|
1787
2178
|
"data-i18n": "video",
|
|
1788
2179
|
children: "Video"
|
|
@@ -1793,9 +2184,1532 @@ function de({ logic: e }) {
|
|
|
1793
2184
|
}
|
|
1794
2185
|
//#endregion
|
|
1795
2186
|
//#region src/components/shared/Hooks/sweetAlert.jsx
|
|
1796
|
-
|
|
2187
|
+
var kt = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
2188
|
+
(function(n, r) {
|
|
2189
|
+
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self, n.Sweetalert2 = r());
|
|
2190
|
+
})(e, (function() {
|
|
2191
|
+
function e(e, t, n) {
|
|
2192
|
+
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
2193
|
+
throw TypeError("Private element is not present on this object");
|
|
2194
|
+
}
|
|
2195
|
+
function t(e, t) {
|
|
2196
|
+
if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
|
|
2197
|
+
}
|
|
2198
|
+
function n(t, n) {
|
|
2199
|
+
return t.get(e(t, n));
|
|
2200
|
+
}
|
|
2201
|
+
function r(e, n, r) {
|
|
2202
|
+
t(e, n), n.set(e, r);
|
|
2203
|
+
}
|
|
2204
|
+
function i(t, n, r) {
|
|
2205
|
+
return t.set(e(t, n), r), r;
|
|
2206
|
+
}
|
|
2207
|
+
let a = {}, o = () => {
|
|
2208
|
+
a.previousActiveElement instanceof HTMLElement ? (a.previousActiveElement.focus(), a.previousActiveElement = null) : document.body && document.body.focus();
|
|
2209
|
+
}, s = (e) => new Promise((t) => {
|
|
2210
|
+
if (!e) return t();
|
|
2211
|
+
let n = window.scrollX, r = window.scrollY;
|
|
2212
|
+
a.restoreFocusTimeout = setTimeout(() => {
|
|
2213
|
+
o(), t();
|
|
2214
|
+
}, 100), window.scrollTo(n, r);
|
|
2215
|
+
}), c = "swal2-", l = (/* @__PURE__ */ "container.shown.height-auto.iosfix.popup.modal.no-backdrop.no-transition.toast.toast-shown.show.hide.close.title.html-container.actions.confirm.deny.cancel.footer.icon.icon-content.image.input.file.range.select.radio.checkbox.label.textarea.inputerror.input-label.validation-message.progress-steps.active-progress-step.progress-step.progress-step-line.loader.loading.styled.top.top-start.top-end.top-left.top-right.center.center-start.center-end.center-left.center-right.bottom.bottom-start.bottom-end.bottom-left.bottom-right.grow-row.grow-column.grow-fullscreen.rtl.timer-progress-bar.timer-progress-bar-container.scrollbar-measure.icon-success.icon-warning.icon-info.icon-question.icon-error.draggable.dragging".split(".")).reduce((e, t) => (e[t] = c + t, e), {}), u = [
|
|
2216
|
+
"success",
|
|
2217
|
+
"warning",
|
|
2218
|
+
"info",
|
|
2219
|
+
"question",
|
|
2220
|
+
"error"
|
|
2221
|
+
].reduce((e, t) => (e[t] = c + t, e), {}), d = "SweetAlert2:", f = (e) => e.charAt(0).toUpperCase() + e.slice(1), p = (e) => {
|
|
2222
|
+
console.warn(`${d} ${typeof e == "object" ? e.join(" ") : e}`);
|
|
2223
|
+
}, m = (e) => {
|
|
2224
|
+
console.error(`${d} ${e}`);
|
|
2225
|
+
}, h = [], g = (e) => {
|
|
2226
|
+
h.includes(e) || (h.push(e), p(e));
|
|
2227
|
+
}, _ = (e, t = null) => {
|
|
2228
|
+
g(`"${e}" is deprecated and will be removed in the next major release.${t ? ` Use "${t}" instead.` : ""}`);
|
|
2229
|
+
}, v = (e) => typeof e == "function" ? e() : e, y = (e) => e && typeof e.toPromise == "function", b = (e) => y(e) ? e.toPromise() : Promise.resolve(e), x = (e) => e && Promise.resolve(e) === e, S = () => navigator.userAgent.includes("Firefox"), C = () => document.body.querySelector(`.${l.container}`), w = (e) => {
|
|
2230
|
+
let t = C();
|
|
2231
|
+
return t ? t.querySelector(e) : null;
|
|
2232
|
+
}, T = (e) => w(`.${e}`), E = () => T(l.popup), D = () => T(l.icon), O = () => T(l["icon-content"]), ee = () => T(l.title), te = () => T(l["html-container"]), k = () => T(l.image), ne = () => T(l["progress-steps"]), re = () => T(l["validation-message"]), A = () => w(`.${l.actions} .${l.confirm}`), ie = () => w(`.${l.actions} .${l.cancel}`), j = () => w(`.${l.actions} .${l.deny}`), ae = () => T(l["input-label"]), M = () => w(`.${l.loader}`), oe = () => T(l.actions), se = () => T(l.footer), ce = () => T(l["timer-progress-bar"]), le = () => T(l.close), ue = () => {
|
|
2233
|
+
let e = E();
|
|
2234
|
+
if (!e) return [];
|
|
2235
|
+
let t = e.querySelectorAll("[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])"), n = Array.from(t).sort((e, t) => {
|
|
2236
|
+
let n = parseInt(e.getAttribute("tabindex") || "0"), r = parseInt(t.getAttribute("tabindex") || "0");
|
|
2237
|
+
return n > r ? 1 : n < r ? -1 : 0;
|
|
2238
|
+
}), r = e.querySelectorAll("\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"), i = Array.from(r).filter((e) => e.getAttribute("tabindex") !== "-1");
|
|
2239
|
+
return [...new Set(n.concat(i))].filter((e) => H(e));
|
|
2240
|
+
}, de = () => P(document.body, l.shown) && !P(document.body, l["toast-shown"]) && !P(document.body, l["no-backdrop"]), fe = () => {
|
|
2241
|
+
let e = E();
|
|
2242
|
+
return e ? P(e, l.toast) : !1;
|
|
2243
|
+
}, pe = () => {
|
|
2244
|
+
let e = E();
|
|
2245
|
+
return e ? e.hasAttribute("data-loading") : !1;
|
|
2246
|
+
}, N = (e, t) => {
|
|
2247
|
+
if (e.textContent = "", t) {
|
|
2248
|
+
let n = new DOMParser().parseFromString(t, "text/html"), r = n.querySelector("head");
|
|
2249
|
+
r && Array.from(r.childNodes).forEach((t) => {
|
|
2250
|
+
e.appendChild(t);
|
|
2251
|
+
});
|
|
2252
|
+
let i = n.querySelector("body");
|
|
2253
|
+
i && Array.from(i.childNodes).forEach((t) => {
|
|
2254
|
+
t instanceof HTMLVideoElement || t instanceof HTMLAudioElement ? e.appendChild(t.cloneNode(!0)) : e.appendChild(t);
|
|
2255
|
+
});
|
|
2256
|
+
}
|
|
2257
|
+
}, P = (e, t) => t ? t.split(/\s+/).every((t) => e.classList.contains(t)) : !1, me = (e, t) => {
|
|
2258
|
+
Array.from(e.classList).forEach((n) => {
|
|
2259
|
+
!Object.values(l).includes(n) && !Object.values(u).includes(n) && !Object.values(t.showClass || {}).includes(n) && e.classList.remove(n);
|
|
2260
|
+
});
|
|
2261
|
+
}, F = (e, t, n) => {
|
|
2262
|
+
if (me(e, t), !t.customClass) return;
|
|
2263
|
+
let r = t.customClass[n];
|
|
2264
|
+
if (r) {
|
|
2265
|
+
if (typeof r != "string" && !r.forEach) {
|
|
2266
|
+
p(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof r}"`);
|
|
2267
|
+
return;
|
|
2268
|
+
}
|
|
2269
|
+
I(e, r);
|
|
2270
|
+
}
|
|
2271
|
+
}, he = (e, t) => {
|
|
2272
|
+
if (!t) return null;
|
|
2273
|
+
switch (t) {
|
|
2274
|
+
case "select":
|
|
2275
|
+
case "textarea":
|
|
2276
|
+
case "file": return e.querySelector(`.${l.popup} > .${l[t]}`);
|
|
2277
|
+
case "checkbox": return e.querySelector(`.${l.popup} > .${l.checkbox} input`);
|
|
2278
|
+
case "radio": return e.querySelector(`.${l.popup} > .${l.radio} input:checked`) || e.querySelector(`.${l.popup} > .${l.radio} input:first-child`);
|
|
2279
|
+
case "range": return e.querySelector(`.${l.popup} > .${l.range} input`);
|
|
2280
|
+
default: return e.querySelector(`.${l.popup} > .${l.input}`);
|
|
2281
|
+
}
|
|
2282
|
+
}, ge = (e) => {
|
|
2283
|
+
if (e.focus(), e.type !== "file") {
|
|
2284
|
+
let t = e.value;
|
|
2285
|
+
e.value = "", e.value = t;
|
|
2286
|
+
}
|
|
2287
|
+
}, _e = (e, t, n) => {
|
|
2288
|
+
if (!e || !t) return;
|
|
2289
|
+
let r = typeof t == "string" ? t.split(/\s+/).filter(Boolean) : t;
|
|
2290
|
+
(Array.isArray(e) ? e : [e]).forEach((e) => {
|
|
2291
|
+
r.forEach((t) => {
|
|
2292
|
+
n ? e.classList.add(t) : e.classList.remove(t);
|
|
2293
|
+
});
|
|
2294
|
+
});
|
|
2295
|
+
}, I = (e, t) => {
|
|
2296
|
+
_e(e, t, !0);
|
|
2297
|
+
}, L = (e, t) => {
|
|
2298
|
+
_e(e, t, !1);
|
|
2299
|
+
}, R = (e, t) => Array.from(e.children).find((e) => e instanceof HTMLElement && P(e, t)), ve = (e, t, n) => {
|
|
2300
|
+
n === `${parseInt(`${n}`)}` && (n = parseInt(n)), n || n === 0 ? e.style.setProperty(t, typeof n == "number" ? `${n}px` : n) : e.style.removeProperty(t);
|
|
2301
|
+
}, z = (e, t = "flex") => {
|
|
2302
|
+
e && (e.style.display = t);
|
|
2303
|
+
}, B = (e) => {
|
|
2304
|
+
e && (e.style.display = "none");
|
|
2305
|
+
}, ye = (e, t = "block") => {
|
|
2306
|
+
e && new MutationObserver(() => {
|
|
2307
|
+
be(e, e.innerHTML, t);
|
|
2308
|
+
}).observe(e, {
|
|
2309
|
+
childList: !0,
|
|
2310
|
+
subtree: !0
|
|
2311
|
+
});
|
|
2312
|
+
}, V = (e, t, n, r) => {
|
|
2313
|
+
let i = e.querySelector(t);
|
|
2314
|
+
i && i.style.setProperty(n, r);
|
|
2315
|
+
}, be = (e, t, n = "flex") => {
|
|
2316
|
+
t ? z(e, n) : B(e);
|
|
2317
|
+
}, H = (e) => !!(e && (e.offsetWidth || e.offsetHeight || e.getClientRects().length)), xe = () => !H(A()) && !H(j()) && !H(ie()), Se = (e) => e.scrollHeight > e.clientHeight, U = (e, t) => {
|
|
2318
|
+
let n = e;
|
|
2319
|
+
for (; n && n !== t;) {
|
|
2320
|
+
if (Se(n)) return !0;
|
|
2321
|
+
n = n.parentElement;
|
|
2322
|
+
}
|
|
2323
|
+
return !1;
|
|
2324
|
+
}, Ce = (e) => {
|
|
2325
|
+
let t = window.getComputedStyle(e), n = parseFloat(t.getPropertyValue("animation-duration") || "0"), r = parseFloat(t.getPropertyValue("transition-duration") || "0");
|
|
2326
|
+
return n > 0 || r > 0;
|
|
2327
|
+
}, we = (e, t = !1) => {
|
|
2328
|
+
let n = ce();
|
|
2329
|
+
n && H(n) && (t && (n.style.transition = "none", n.style.width = "100%"), setTimeout(() => {
|
|
2330
|
+
n.style.transition = `width ${e / 1e3}s linear`, n.style.width = "0%";
|
|
2331
|
+
}, 10));
|
|
2332
|
+
}, Te = () => {
|
|
2333
|
+
let e = ce();
|
|
2334
|
+
if (!e) return;
|
|
2335
|
+
let t = parseInt(window.getComputedStyle(e).width);
|
|
2336
|
+
e.style.removeProperty("transition"), e.style.width = "100%";
|
|
2337
|
+
let n = t / parseInt(window.getComputedStyle(e).width) * 100;
|
|
2338
|
+
e.style.width = `${n}%`;
|
|
2339
|
+
}, Ee = () => typeof window > "u" || typeof document > "u", De = `
|
|
2340
|
+
<div aria-labelledby="${l.title}" aria-describedby="${l["html-container"]}" class="${l.popup}" tabindex="-1">
|
|
2341
|
+
<button type="button" class="${l.close}"></button>
|
|
2342
|
+
<ul class="${l["progress-steps"]}"></ul>
|
|
2343
|
+
<div class="${l.icon}"></div>
|
|
2344
|
+
<img class="${l.image}" />
|
|
2345
|
+
<h2 class="${l.title}" id="${l.title}"></h2>
|
|
2346
|
+
<div class="${l["html-container"]}" id="${l["html-container"]}"></div>
|
|
2347
|
+
<input class="${l.input}" id="${l.input}" />
|
|
2348
|
+
<input type="file" class="${l.file}" />
|
|
2349
|
+
<div class="${l.range}">
|
|
2350
|
+
<input type="range" />
|
|
2351
|
+
<output></output>
|
|
2352
|
+
</div>
|
|
2353
|
+
<select class="${l.select}" id="${l.select}"></select>
|
|
2354
|
+
<div class="${l.radio}"></div>
|
|
2355
|
+
<label class="${l.checkbox}">
|
|
2356
|
+
<input type="checkbox" id="${l.checkbox}" />
|
|
2357
|
+
<span class="${l.label}"></span>
|
|
2358
|
+
</label>
|
|
2359
|
+
<textarea class="${l.textarea}" id="${l.textarea}"></textarea>
|
|
2360
|
+
<div class="${l["validation-message"]}" id="${l["validation-message"]}"></div>
|
|
2361
|
+
<div class="${l.actions}">
|
|
2362
|
+
<div class="${l.loader}"></div>
|
|
2363
|
+
<button type="button" class="${l.confirm}"></button>
|
|
2364
|
+
<button type="button" class="${l.deny}"></button>
|
|
2365
|
+
<button type="button" class="${l.cancel}"></button>
|
|
2366
|
+
</div>
|
|
2367
|
+
<div class="${l.footer}"></div>
|
|
2368
|
+
<div class="${l["timer-progress-bar-container"]}">
|
|
2369
|
+
<div class="${l["timer-progress-bar"]}"></div>
|
|
2370
|
+
</div>
|
|
2371
|
+
</div>
|
|
2372
|
+
`.replace(/(^|\n)\s*/g, ""), Oe = () => {
|
|
2373
|
+
let e = C();
|
|
2374
|
+
return e ? (e.remove(), L([document.documentElement, document.body], [
|
|
2375
|
+
l["no-backdrop"],
|
|
2376
|
+
l["toast-shown"],
|
|
2377
|
+
l["has-column"]
|
|
2378
|
+
]), !0) : !1;
|
|
2379
|
+
}, W = () => {
|
|
2380
|
+
a.currentInstance && a.currentInstance.resetValidationMessage();
|
|
2381
|
+
}, G = () => {
|
|
2382
|
+
let e = E();
|
|
2383
|
+
if (!e) return;
|
|
2384
|
+
let t = R(e, l.input), n = R(e, l.file), r = e.querySelector(`.${l.range} input`), i = e.querySelector(`.${l.range} output`), a = R(e, l.select), o = e.querySelector(`.${l.checkbox} input`), s = R(e, l.textarea);
|
|
2385
|
+
t && (t.oninput = W), n && (n.onchange = W), a && (a.onchange = W), o && (o.onchange = W), s && (s.oninput = W), r && i && (r.oninput = () => {
|
|
2386
|
+
W(), i.value = r.value;
|
|
2387
|
+
}, r.onchange = () => {
|
|
2388
|
+
W(), i.value = r.value;
|
|
2389
|
+
});
|
|
2390
|
+
}, ke = (e) => {
|
|
2391
|
+
if (typeof e == "string") {
|
|
2392
|
+
let t = document.querySelector(e);
|
|
2393
|
+
if (!t) throw Error(`Target element "${e}" not found`);
|
|
2394
|
+
return t;
|
|
2395
|
+
}
|
|
2396
|
+
return e;
|
|
2397
|
+
}, K = (e) => {
|
|
2398
|
+
let t = E();
|
|
2399
|
+
t && (t.setAttribute("role", e.toast ? "alert" : "dialog"), t.setAttribute("aria-live", e.toast ? "polite" : "assertive"), e.toast || t.setAttribute("aria-modal", "true"));
|
|
2400
|
+
}, q = (e) => {
|
|
2401
|
+
window.getComputedStyle(e).direction === "rtl" && (I(C(), l.rtl), a.isRTL = !0);
|
|
2402
|
+
}, Ae = (e) => {
|
|
2403
|
+
let t = Oe();
|
|
2404
|
+
if (Ee()) {
|
|
2405
|
+
m("SweetAlert2 requires document to initialize");
|
|
2406
|
+
return;
|
|
2407
|
+
}
|
|
2408
|
+
let n = document.createElement("div");
|
|
2409
|
+
n.className = l.container, t && I(n, l["no-transition"]), N(n, De), n.dataset.swal2Theme = e.theme;
|
|
2410
|
+
let r = ke(e.target || "body");
|
|
2411
|
+
r.appendChild(n), e.topLayer && (n.setAttribute("popover", ""), n.showPopover()), K(e), q(r), G();
|
|
2412
|
+
}, je = (e, t) => {
|
|
2413
|
+
e instanceof HTMLElement ? t.appendChild(e) : typeof e == "object" ? Me(e, t) : e && N(t, e);
|
|
2414
|
+
}, Me = (e, t) => {
|
|
2415
|
+
"jquery" in e ? Ne(t, e) : N(t, e.toString());
|
|
2416
|
+
}, Ne = (e, t) => {
|
|
2417
|
+
if (e.textContent = "", 0 in t) for (let n = 0; n in t; n++) e.appendChild(t[n].cloneNode(!0));
|
|
2418
|
+
else e.appendChild(t.cloneNode(!0));
|
|
2419
|
+
}, Pe = (e, t) => {
|
|
2420
|
+
let n = oe(), r = M();
|
|
2421
|
+
!n || !r || (!t.showConfirmButton && !t.showDenyButton && !t.showCancelButton ? B(n) : z(n), F(n, t, "actions"), Fe(n, r, t), N(r, t.loaderHtml || ""), F(r, t, "loader"));
|
|
2422
|
+
};
|
|
2423
|
+
function Fe(e, t, n) {
|
|
2424
|
+
let r = A(), i = j(), a = ie();
|
|
2425
|
+
!r || !i || !a || (Re(r, "confirm", n), Re(i, "deny", n), Re(a, "cancel", n), Ie(r, i, a, n), n.reverseButtons && (n.toast ? (e.insertBefore(a, r), e.insertBefore(i, r)) : (e.insertBefore(a, t), e.insertBefore(i, t), e.insertBefore(r, t))));
|
|
2426
|
+
}
|
|
2427
|
+
function Ie(e, t, n, r) {
|
|
2428
|
+
if (!r.buttonsStyling) {
|
|
2429
|
+
L([
|
|
2430
|
+
e,
|
|
2431
|
+
t,
|
|
2432
|
+
n
|
|
2433
|
+
], l.styled);
|
|
2434
|
+
return;
|
|
2435
|
+
}
|
|
2436
|
+
I([
|
|
2437
|
+
e,
|
|
2438
|
+
t,
|
|
2439
|
+
n
|
|
2440
|
+
], l.styled), [
|
|
2441
|
+
[
|
|
2442
|
+
e,
|
|
2443
|
+
"confirm",
|
|
2444
|
+
r.confirmButtonColor
|
|
2445
|
+
],
|
|
2446
|
+
[
|
|
2447
|
+
t,
|
|
2448
|
+
"deny",
|
|
2449
|
+
r.denyButtonColor
|
|
2450
|
+
],
|
|
2451
|
+
[
|
|
2452
|
+
n,
|
|
2453
|
+
"cancel",
|
|
2454
|
+
r.cancelButtonColor
|
|
2455
|
+
]
|
|
2456
|
+
].forEach(([e, t, n]) => {
|
|
2457
|
+
n && e.style.setProperty(`--swal2-${t}-button-background-color`, n), Le(e);
|
|
2458
|
+
});
|
|
2459
|
+
}
|
|
2460
|
+
function Le(e) {
|
|
2461
|
+
let t = window.getComputedStyle(e);
|
|
2462
|
+
if (t.getPropertyValue("--swal2-action-button-focus-box-shadow")) return;
|
|
2463
|
+
let n = t.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/, "rgba($1, $2, $3, 0.5)");
|
|
2464
|
+
e.style.setProperty("--swal2-action-button-focus-box-shadow", t.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/, ` ${n}`));
|
|
2465
|
+
}
|
|
2466
|
+
function Re(e, t, n) {
|
|
2467
|
+
let r = f(t);
|
|
2468
|
+
be(e, n[`show${r}Button`], "inline-block"), N(e, n[`${t}ButtonText`] || ""), e.setAttribute("aria-label", n[`${t}ButtonAriaLabel`] || ""), e.className = l[t], F(e, n, `${t}Button`);
|
|
2469
|
+
}
|
|
2470
|
+
let ze = (e, t) => {
|
|
2471
|
+
let n = le();
|
|
2472
|
+
n && (N(n, t.closeButtonHtml || ""), F(n, t, "closeButton"), be(n, t.showCloseButton), n.setAttribute("aria-label", t.closeButtonAriaLabel || ""));
|
|
2473
|
+
}, Be = (e, t) => {
|
|
2474
|
+
let n = C();
|
|
2475
|
+
n && (Ve(n, t.backdrop), He(n, t.position), Ue(n, t.grow), F(n, t, "container"));
|
|
2476
|
+
};
|
|
2477
|
+
function Ve(e, t) {
|
|
2478
|
+
typeof t == "string" ? e.style.background = t : t || I([document.documentElement, document.body], l["no-backdrop"]);
|
|
2479
|
+
}
|
|
2480
|
+
function He(e, t) {
|
|
2481
|
+
t && (t in l ? I(e, l[t]) : (p("The \"position\" parameter is not valid, defaulting to \"center\""), I(e, l.center)));
|
|
2482
|
+
}
|
|
2483
|
+
function Ue(e, t) {
|
|
2484
|
+
t && I(e, l[`grow-${t}`]);
|
|
2485
|
+
}
|
|
2486
|
+
var J = {
|
|
2487
|
+
innerParams: /* @__PURE__ */ new WeakMap(),
|
|
2488
|
+
domCache: /* @__PURE__ */ new WeakMap(),
|
|
2489
|
+
focusedElement: /* @__PURE__ */ new WeakMap()
|
|
2490
|
+
};
|
|
2491
|
+
let We = [
|
|
2492
|
+
"input",
|
|
2493
|
+
"file",
|
|
2494
|
+
"range",
|
|
2495
|
+
"select",
|
|
2496
|
+
"radio",
|
|
2497
|
+
"checkbox",
|
|
2498
|
+
"textarea"
|
|
2499
|
+
], Ge = (e, t) => {
|
|
2500
|
+
let n = E();
|
|
2501
|
+
if (!n) return;
|
|
2502
|
+
let r = J.innerParams.get(e), i = !r || t.input !== r.input;
|
|
2503
|
+
We.forEach((e) => {
|
|
2504
|
+
let r = R(n, l[e]);
|
|
2505
|
+
r && (Je(e, t.inputAttributes), r.className = l[e], i && B(r));
|
|
2506
|
+
}), t.input && (i && Ke(t), Ye(t));
|
|
2507
|
+
}, Ke = (e) => {
|
|
2508
|
+
if (!e.input) return;
|
|
2509
|
+
if (!Y[e.input]) {
|
|
2510
|
+
m(`Unexpected type of input! Expected ${Object.keys(Y).join(" | ")}, got "${e.input}"`);
|
|
2511
|
+
return;
|
|
2512
|
+
}
|
|
2513
|
+
let t = Qe(e.input);
|
|
2514
|
+
if (!t) return;
|
|
2515
|
+
let n = Y[e.input](t, e);
|
|
2516
|
+
z(t), e.inputAutoFocus && setTimeout(() => {
|
|
2517
|
+
ge(n);
|
|
2518
|
+
});
|
|
2519
|
+
}, qe = (e) => {
|
|
2520
|
+
for (let { name: t } of Array.from(e.attributes)) [
|
|
2521
|
+
"id",
|
|
2522
|
+
"type",
|
|
2523
|
+
"value",
|
|
2524
|
+
"style"
|
|
2525
|
+
].includes(t) || e.removeAttribute(t);
|
|
2526
|
+
}, Je = (e, t) => {
|
|
2527
|
+
let n = E();
|
|
2528
|
+
if (!n) return;
|
|
2529
|
+
let r = he(n, e);
|
|
2530
|
+
if (r) {
|
|
2531
|
+
qe(r);
|
|
2532
|
+
for (let e in t) r.setAttribute(e, t[e]);
|
|
2533
|
+
}
|
|
2534
|
+
}, Ye = (e) => {
|
|
2535
|
+
if (!e.input) return;
|
|
2536
|
+
let t = Qe(e.input);
|
|
2537
|
+
t && F(t, e, "input");
|
|
2538
|
+
}, Xe = (e, t) => {
|
|
2539
|
+
!e.placeholder && t.inputPlaceholder && (e.placeholder = t.inputPlaceholder);
|
|
2540
|
+
}, Ze = (e, t, n) => {
|
|
2541
|
+
if (n.inputLabel) {
|
|
2542
|
+
let r = document.createElement("label"), i = l["input-label"];
|
|
2543
|
+
r.setAttribute("for", e.id), r.className = i, typeof n.customClass == "object" && I(r, n.customClass.inputLabel), r.innerText = n.inputLabel, t.insertAdjacentElement("beforebegin", r);
|
|
2544
|
+
}
|
|
2545
|
+
}, Qe = (e) => {
|
|
2546
|
+
let t = E();
|
|
2547
|
+
if (t) return R(t, l[e] || l.input);
|
|
2548
|
+
}, $e = (e, t) => {
|
|
2549
|
+
["string", "number"].includes(typeof t) ? e.value = `${t}` : x(t) || p(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`);
|
|
2550
|
+
}, Y = {};
|
|
2551
|
+
Y.text = Y.email = Y.password = Y.number = Y.tel = Y.url = Y.search = Y.date = Y["datetime-local"] = Y.time = Y.week = Y.month = (e, t) => {
|
|
2552
|
+
let n = e;
|
|
2553
|
+
return $e(n, t.inputValue), Ze(n, n, t), Xe(n, t), n.type = t.input, n;
|
|
2554
|
+
}, Y.file = (e, t) => {
|
|
2555
|
+
let n = e;
|
|
2556
|
+
return Ze(n, n, t), Xe(n, t), n;
|
|
2557
|
+
}, Y.range = (e, t) => {
|
|
2558
|
+
let n = e, r = n.querySelector("input"), i = n.querySelector("output");
|
|
2559
|
+
return r && ($e(r, t.inputValue), r.type = t.input, Ze(r, e, t)), i && $e(i, t.inputValue), e;
|
|
2560
|
+
}, Y.select = (e, t) => {
|
|
2561
|
+
let n = e;
|
|
2562
|
+
if (n.textContent = "", t.inputPlaceholder) {
|
|
2563
|
+
let e = document.createElement("option");
|
|
2564
|
+
N(e, t.inputPlaceholder), e.value = "", e.disabled = !0, e.selected = !0, n.appendChild(e);
|
|
2565
|
+
}
|
|
2566
|
+
return Ze(n, n, t), n;
|
|
2567
|
+
}, Y.radio = (e) => {
|
|
2568
|
+
let t = e;
|
|
2569
|
+
return t.textContent = "", e;
|
|
2570
|
+
}, Y.checkbox = (e, t) => {
|
|
2571
|
+
let n = E();
|
|
2572
|
+
if (!n) throw Error("Popup not found");
|
|
2573
|
+
let r = he(n, "checkbox");
|
|
2574
|
+
if (!r) throw Error("Checkbox input not found");
|
|
2575
|
+
r.value = "1", r.checked = !!t.inputValue;
|
|
2576
|
+
let i = e.querySelector("span");
|
|
2577
|
+
if (i) {
|
|
2578
|
+
let e = t.inputPlaceholder || t.inputLabel;
|
|
2579
|
+
e && N(i, e);
|
|
2580
|
+
}
|
|
2581
|
+
return r;
|
|
2582
|
+
}, Y.textarea = (e, t) => {
|
|
2583
|
+
let n = e;
|
|
2584
|
+
$e(n, t.inputValue), Xe(n, t), Ze(n, n, t);
|
|
2585
|
+
let r = (e) => parseInt(window.getComputedStyle(e).marginLeft) + parseInt(window.getComputedStyle(e).marginRight);
|
|
2586
|
+
return setTimeout(() => {
|
|
2587
|
+
if ("MutationObserver" in window) {
|
|
2588
|
+
let e = E();
|
|
2589
|
+
if (!e) return;
|
|
2590
|
+
let i = parseInt(window.getComputedStyle(e).width);
|
|
2591
|
+
new MutationObserver(() => {
|
|
2592
|
+
if (!document.body.contains(n)) return;
|
|
2593
|
+
let e = n.offsetWidth + r(n), a = E();
|
|
2594
|
+
a && (e > i ? a.style.width = `${e}px` : ve(a, "width", t.width));
|
|
2595
|
+
}).observe(n, {
|
|
2596
|
+
attributes: !0,
|
|
2597
|
+
attributeFilter: ["style"]
|
|
2598
|
+
});
|
|
2599
|
+
}
|
|
2600
|
+
}), n;
|
|
2601
|
+
};
|
|
2602
|
+
let et = (e, t) => {
|
|
2603
|
+
let n = te();
|
|
2604
|
+
n && (ye(n), F(n, t, "htmlContainer"), t.html ? (je(t.html, n), z(n, "block")) : t.text ? (n.textContent = t.text, z(n, "block")) : B(n), Ge(e, t));
|
|
2605
|
+
}, tt = (e, t) => {
|
|
2606
|
+
let n = se();
|
|
2607
|
+
n && (ye(n), be(n, !!t.footer, "block"), t.footer && je(t.footer, n), F(n, t, "footer"));
|
|
2608
|
+
}, nt = (e, t) => {
|
|
2609
|
+
let n = J.innerParams.get(e), r = D();
|
|
2610
|
+
if (r) {
|
|
2611
|
+
if (n && t.icon === n.icon) {
|
|
2612
|
+
ot(r, t), rt(r, t);
|
|
2613
|
+
return;
|
|
2614
|
+
}
|
|
2615
|
+
if (!t.icon && !t.iconHtml) {
|
|
2616
|
+
B(r);
|
|
2617
|
+
return;
|
|
2618
|
+
}
|
|
2619
|
+
if (t.icon && Object.keys(u).indexOf(t.icon) === -1) {
|
|
2620
|
+
m(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`), B(r);
|
|
2621
|
+
return;
|
|
2622
|
+
}
|
|
2623
|
+
z(r), ot(r, t), rt(r, t), I(r, t.showClass && t.showClass.icon), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", it);
|
|
2624
|
+
}
|
|
2625
|
+
}, rt = (e, t) => {
|
|
2626
|
+
for (let [n, r] of Object.entries(u)) t.icon !== n && L(e, r);
|
|
2627
|
+
I(e, t.icon && u[t.icon]), st(e, t), it(), F(e, t, "icon");
|
|
2628
|
+
}, it = () => {
|
|
2629
|
+
let e = E();
|
|
2630
|
+
if (!e) return;
|
|
2631
|
+
let t = window.getComputedStyle(e).getPropertyValue("background-color");
|
|
2632
|
+
e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix").forEach((e) => {
|
|
2633
|
+
e.style.backgroundColor = t;
|
|
2634
|
+
});
|
|
2635
|
+
}, at = (e) => `
|
|
2636
|
+
${e.animation ? "<div class=\"swal2-success-circular-line-left\"></div>" : ""}
|
|
2637
|
+
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
|
|
2638
|
+
<div class="swal2-success-ring"></div>
|
|
2639
|
+
${e.animation ? "<div class=\"swal2-success-fix\"></div>" : ""}
|
|
2640
|
+
${e.animation ? "<div class=\"swal2-success-circular-line-right\"></div>" : ""}
|
|
2641
|
+
`, ot = (e, t) => {
|
|
2642
|
+
if (!t.icon && !t.iconHtml) return;
|
|
2643
|
+
let n = e.innerHTML, r = "";
|
|
2644
|
+
t.iconHtml ? r = ct(t.iconHtml) : t.icon === "success" ? (r = at(t), n = n.replace(/ style=".*?"/g, "")) : t.icon === "error" ? r = "\n <span class=\"swal2-x-mark\">\n <span class=\"swal2-x-mark-line-left\"></span>\n <span class=\"swal2-x-mark-line-right\"></span>\n </span>\n" : t.icon && (r = ct({
|
|
2645
|
+
question: "?",
|
|
2646
|
+
warning: "!",
|
|
2647
|
+
info: "i"
|
|
2648
|
+
}[t.icon])), n.trim() !== r.trim() && N(e, r);
|
|
2649
|
+
}, st = (e, t) => {
|
|
2650
|
+
if (t.iconColor) {
|
|
2651
|
+
e.style.color = t.iconColor, e.style.borderColor = t.iconColor;
|
|
2652
|
+
for (let n of [
|
|
2653
|
+
".swal2-success-line-tip",
|
|
2654
|
+
".swal2-success-line-long",
|
|
2655
|
+
".swal2-x-mark-line-left",
|
|
2656
|
+
".swal2-x-mark-line-right"
|
|
2657
|
+
]) V(e, n, "background-color", t.iconColor);
|
|
2658
|
+
V(e, ".swal2-success-ring", "border-color", t.iconColor);
|
|
2659
|
+
}
|
|
2660
|
+
}, ct = (e) => `<div class="${l["icon-content"]}">${e}</div>`, lt = (e, t) => {
|
|
2661
|
+
let n = k();
|
|
2662
|
+
if (n) {
|
|
2663
|
+
if (!t.imageUrl) {
|
|
2664
|
+
B(n);
|
|
2665
|
+
return;
|
|
2666
|
+
}
|
|
2667
|
+
z(n, ""), n.setAttribute("src", t.imageUrl), n.setAttribute("alt", t.imageAlt || ""), ve(n, "width", t.imageWidth), ve(n, "height", t.imageHeight), n.className = l.image, F(n, t, "image");
|
|
2668
|
+
}
|
|
2669
|
+
}, ut = !1, dt = 0, ft = 0, X = 0, pt = 0, mt = (e) => {
|
|
2670
|
+
e.addEventListener("mousedown", gt), document.body.addEventListener("mousemove", _t), e.addEventListener("mouseup", vt), e.addEventListener("touchstart", gt), document.body.addEventListener("touchmove", _t), e.addEventListener("touchend", vt);
|
|
2671
|
+
}, ht = (e) => {
|
|
2672
|
+
e.removeEventListener("mousedown", gt), document.body.removeEventListener("mousemove", _t), e.removeEventListener("mouseup", vt), e.removeEventListener("touchstart", gt), document.body.removeEventListener("touchmove", _t), e.removeEventListener("touchend", vt);
|
|
2673
|
+
}, gt = (e) => {
|
|
2674
|
+
let t = E();
|
|
2675
|
+
if (!t) return;
|
|
2676
|
+
let n = D();
|
|
2677
|
+
if (e.target === t || n && n.contains(e.target)) {
|
|
2678
|
+
ut = !0;
|
|
2679
|
+
let n = yt(e);
|
|
2680
|
+
dt = n.clientX, ft = n.clientY, X = parseInt(t.style.insetInlineStart) || 0, pt = parseInt(t.style.insetBlockStart) || 0, I(t, "swal2-dragging");
|
|
2681
|
+
}
|
|
2682
|
+
}, _t = (e) => {
|
|
2683
|
+
let t = E();
|
|
2684
|
+
if (t && ut) {
|
|
2685
|
+
let { clientX: n, clientY: r } = yt(e), i = n - dt;
|
|
2686
|
+
t.style.insetInlineStart = `${X + (a.isRTL ? -i : i)}px`, t.style.insetBlockStart = `${pt + (r - ft)}px`;
|
|
2687
|
+
}
|
|
2688
|
+
}, vt = () => {
|
|
2689
|
+
let e = E();
|
|
2690
|
+
ut = !1, L(e, "swal2-dragging");
|
|
2691
|
+
}, yt = (e) => {
|
|
2692
|
+
let t = e.type.startsWith("touch") ? e.touches[0] : e;
|
|
2693
|
+
return {
|
|
2694
|
+
clientX: t.clientX,
|
|
2695
|
+
clientY: t.clientY
|
|
2696
|
+
};
|
|
2697
|
+
}, bt = (e, t) => {
|
|
2698
|
+
let n = C(), r = E();
|
|
2699
|
+
if (!(!n || !r)) {
|
|
2700
|
+
if (t.toast) {
|
|
2701
|
+
ve(n, "width", t.width), r.style.width = "100%";
|
|
2702
|
+
let e = M();
|
|
2703
|
+
e && r.insertBefore(e, D());
|
|
2704
|
+
} else ve(r, "width", t.width);
|
|
2705
|
+
ve(r, "padding", t.padding), t.color && (r.style.color = t.color), t.background && (r.style.background = t.background), B(re()), xt(r, t), t.draggable && !t.toast ? (I(r, l.draggable), mt(r)) : (L(r, l.draggable), ht(r));
|
|
2706
|
+
}
|
|
2707
|
+
}, xt = (e, t) => {
|
|
2708
|
+
let n = t.showClass || {};
|
|
2709
|
+
e.className = `${l.popup} ${H(e) ? n.popup : ""}`, t.toast ? (I([document.documentElement, document.body], l["toast-shown"]), I(e, l.toast)) : I(e, l.modal), F(e, t, "popup"), typeof t.customClass == "string" && I(e, t.customClass), t.icon && I(e, l[`icon-${t.icon}`]);
|
|
2710
|
+
}, St = (e, t) => {
|
|
2711
|
+
let n = ne();
|
|
2712
|
+
if (!n) return;
|
|
2713
|
+
let { progressSteps: r, currentProgressStep: i } = t;
|
|
2714
|
+
if (!r || r.length === 0 || i === void 0) {
|
|
2715
|
+
B(n);
|
|
2716
|
+
return;
|
|
2717
|
+
}
|
|
2718
|
+
z(n), n.textContent = "", i >= r.length && p("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), r.forEach((e, a) => {
|
|
2719
|
+
let o = Ct(e);
|
|
2720
|
+
if (n.appendChild(o), a === i && I(o, l["active-progress-step"]), a !== r.length - 1) {
|
|
2721
|
+
let e = wt(t);
|
|
2722
|
+
n.appendChild(e);
|
|
2723
|
+
}
|
|
2724
|
+
});
|
|
2725
|
+
}, Ct = (e) => {
|
|
2726
|
+
let t = document.createElement("li");
|
|
2727
|
+
return I(t, l["progress-step"]), N(t, e), t;
|
|
2728
|
+
}, wt = (e) => {
|
|
2729
|
+
let t = document.createElement("li");
|
|
2730
|
+
return I(t, l["progress-step-line"]), e.progressStepsDistance && ve(t, "width", e.progressStepsDistance), t;
|
|
2731
|
+
}, Tt = (e, t) => {
|
|
2732
|
+
let n = ee();
|
|
2733
|
+
n && (ye(n), be(n, !!(t.title || t.titleText), "block"), t.title && je(t.title, n), t.titleText && (n.innerText = t.titleText), F(n, t, "title"));
|
|
2734
|
+
}, Et = (e, t) => {
|
|
2735
|
+
var n;
|
|
2736
|
+
bt(e, t), Be(e, t), St(e, t), nt(e, t), lt(e, t), Tt(e, t), ze(e, t), et(e, t), Pe(e, t), tt(e, t);
|
|
2737
|
+
let r = E();
|
|
2738
|
+
typeof t.didRender == "function" && r && t.didRender(r), (n = a.eventEmitter) == null || n.emit("didRender", r);
|
|
2739
|
+
}, Dt = () => H(E()), Ot = () => A()?.click(), kt = () => j()?.click(), At = () => ie()?.click(), Z = Object.freeze({
|
|
2740
|
+
cancel: "cancel",
|
|
2741
|
+
backdrop: "backdrop",
|
|
2742
|
+
close: "close",
|
|
2743
|
+
esc: "esc",
|
|
2744
|
+
timer: "timer"
|
|
2745
|
+
}), jt = (e) => {
|
|
2746
|
+
if (e.keydownTarget && e.keydownHandlerAdded && e.keydownHandler) {
|
|
2747
|
+
let t = e.keydownHandler;
|
|
2748
|
+
e.keydownTarget.removeEventListener("keydown", t, { capture: e.keydownListenerCapture }), e.keydownHandlerAdded = !1;
|
|
2749
|
+
}
|
|
2750
|
+
}, Mt = (e, t, n) => {
|
|
2751
|
+
if (jt(e), !t.toast) {
|
|
2752
|
+
let r = (e) => It(t, e, n);
|
|
2753
|
+
e.keydownHandler = r;
|
|
2754
|
+
let i = t.keydownListenerCapture ? window : E();
|
|
2755
|
+
if (i) {
|
|
2756
|
+
e.keydownTarget = i, e.keydownListenerCapture = t.keydownListenerCapture;
|
|
2757
|
+
let n = r;
|
|
2758
|
+
e.keydownTarget.addEventListener("keydown", n, { capture: e.keydownListenerCapture }), e.keydownHandlerAdded = !0;
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
}, Nt = (e, t) => {
|
|
2762
|
+
var n;
|
|
2763
|
+
let r = ue();
|
|
2764
|
+
return r.length ? (e += t, e === -2 && (e = r.length - 1), e === r.length ? e = 0 : e === -1 && (e = r.length - 1), r[e].focus(), !(S() && r[e] instanceof HTMLIFrameElement)) : ((n = E()) == null || n.focus(), !0);
|
|
2765
|
+
}, Pt = ["ArrowRight", "ArrowDown"], Ft = ["ArrowLeft", "ArrowUp"], It = (e, t, n) => {
|
|
2766
|
+
e && (t.isComposing || t.keyCode === 229 || (e.stopKeydownPropagation && t.stopPropagation(), t.key === "Enter" ? Lt(t, e) : t.key === "Tab" ? Rt(t) : [...Pt, ...Ft].includes(t.key) ? zt(t.key) : t.key === "Escape" && Bt(t, e, n)));
|
|
2767
|
+
}, Lt = (e, t) => {
|
|
2768
|
+
if (!v(t.allowEnterKey)) return;
|
|
2769
|
+
let n = E();
|
|
2770
|
+
if (!n || !t.input) return;
|
|
2771
|
+
let r = he(n, t.input);
|
|
2772
|
+
if (e.target && r && e.target instanceof HTMLElement && e.target.outerHTML === r.outerHTML) {
|
|
2773
|
+
if (["textarea", "file"].includes(t.input)) return;
|
|
2774
|
+
Ot(), e.preventDefault();
|
|
2775
|
+
}
|
|
2776
|
+
}, Rt = (e) => {
|
|
2777
|
+
let t = e.target, n = ue().findIndex((e) => e === t), r = !0;
|
|
2778
|
+
r = e.shiftKey ? Nt(n, -1) : Nt(n, 1), e.stopPropagation(), r && e.preventDefault();
|
|
2779
|
+
}, zt = (e) => {
|
|
2780
|
+
let t = oe(), n = A(), r = j(), i = ie();
|
|
2781
|
+
if (!t || !n || !r || !i) return;
|
|
2782
|
+
let a = [
|
|
2783
|
+
n,
|
|
2784
|
+
r,
|
|
2785
|
+
i
|
|
2786
|
+
];
|
|
2787
|
+
if (document.activeElement instanceof HTMLElement && !a.includes(document.activeElement)) return;
|
|
2788
|
+
let o = Pt.includes(e) ? "nextElementSibling" : "previousElementSibling", s = document.activeElement;
|
|
2789
|
+
if (s) {
|
|
2790
|
+
for (let e = 0; e < t.children.length; e++) {
|
|
2791
|
+
if (s = s[o], !s) return;
|
|
2792
|
+
if (s instanceof HTMLButtonElement && H(s)) break;
|
|
2793
|
+
}
|
|
2794
|
+
s instanceof HTMLButtonElement && s.focus();
|
|
2795
|
+
}
|
|
2796
|
+
}, Bt = (e, t, n) => {
|
|
2797
|
+
e.preventDefault(), v(t.allowEscapeKey) && n(Z.esc);
|
|
2798
|
+
};
|
|
2799
|
+
var Vt = {
|
|
2800
|
+
swalPromiseResolve: /* @__PURE__ */ new WeakMap(),
|
|
2801
|
+
swalPromiseReject: /* @__PURE__ */ new WeakMap()
|
|
2802
|
+
};
|
|
2803
|
+
let Ht = () => {
|
|
2804
|
+
let e = C();
|
|
2805
|
+
Array.from(document.body.children).forEach((t) => {
|
|
2806
|
+
t.contains(e) || (t.hasAttribute("aria-hidden") && t.setAttribute("data-previous-aria-hidden", t.getAttribute("aria-hidden") || ""), t.setAttribute("aria-hidden", "true"));
|
|
2807
|
+
});
|
|
2808
|
+
}, Ut = () => {
|
|
2809
|
+
Array.from(document.body.children).forEach((e) => {
|
|
2810
|
+
e.hasAttribute("data-previous-aria-hidden") ? (e.setAttribute("aria-hidden", e.getAttribute("data-previous-aria-hidden") || ""), e.removeAttribute("data-previous-aria-hidden")) : e.removeAttribute("aria-hidden");
|
|
2811
|
+
});
|
|
2812
|
+
}, Wt = typeof window < "u" && !!window.GestureEvent, Gt = Wt && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Kt = () => {
|
|
2813
|
+
if (Wt && !P(document.body, l.iosfix)) {
|
|
2814
|
+
let e = document.body.scrollTop;
|
|
2815
|
+
document.body.style.top = `${e * -1}px`, I(document.body, l.iosfix), qt();
|
|
2816
|
+
}
|
|
2817
|
+
}, qt = () => {
|
|
2818
|
+
let e = C();
|
|
2819
|
+
if (!e) return;
|
|
2820
|
+
let t;
|
|
2821
|
+
e.ontouchstart = (e) => {
|
|
2822
|
+
t = Jt(e);
|
|
2823
|
+
}, e.ontouchmove = (e) => {
|
|
2824
|
+
t && (e.preventDefault(), e.stopPropagation());
|
|
2825
|
+
};
|
|
2826
|
+
}, Jt = (e) => {
|
|
2827
|
+
let t = e.target, n = C(), r = te();
|
|
2828
|
+
return !n || !r || Yt(e) || Xt(e) ? !1 : t === n || !Se(n) && t instanceof HTMLElement && !U(t, r) && t.tagName !== "INPUT" && t.tagName !== "TEXTAREA" && !(Se(r) && r.contains(t));
|
|
2829
|
+
}, Yt = (e) => !!(e.touches && e.touches.length && e.touches[0].touchType === "stylus"), Xt = (e) => e.touches && e.touches.length > 1, Zt = () => {
|
|
2830
|
+
if (P(document.body, l.iosfix)) {
|
|
2831
|
+
let e = parseInt(document.body.style.top, 10);
|
|
2832
|
+
L(document.body, l.iosfix), document.body.style.top = "", document.body.scrollTop = e * -1;
|
|
2833
|
+
}
|
|
2834
|
+
}, Qt = () => {
|
|
2835
|
+
let e = document.createElement("div");
|
|
2836
|
+
e.className = l["scrollbar-measure"], document.body.appendChild(e);
|
|
2837
|
+
let t = e.getBoundingClientRect().width - e.clientWidth;
|
|
2838
|
+
return document.body.removeChild(e), t;
|
|
2839
|
+
}, $t = null, en = (e) => {
|
|
2840
|
+
$t === null && (document.body.scrollHeight > window.innerHeight || e === "scroll") && ($t = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${$t + Qt()}px`);
|
|
2841
|
+
}, tn = () => {
|
|
2842
|
+
$t !== null && (document.body.style.paddingRight = `${$t}px`, $t = null);
|
|
2843
|
+
};
|
|
2844
|
+
function nn(e, t, n, r) {
|
|
2845
|
+
fe() ? fn(e, r) : (s(n).then(() => fn(e, r)), jt(a)), Wt ? (t.setAttribute("style", "display:none !important"), t.removeAttribute("class"), t.innerHTML = "") : t.remove(), de() && (tn(), Zt(), Ut()), rn();
|
|
2846
|
+
}
|
|
2847
|
+
function rn() {
|
|
2848
|
+
L([document.documentElement, document.body], [
|
|
2849
|
+
l.shown,
|
|
2850
|
+
l["height-auto"],
|
|
2851
|
+
l["no-backdrop"],
|
|
2852
|
+
l["toast-shown"]
|
|
2853
|
+
]);
|
|
2854
|
+
}
|
|
2855
|
+
function an(e) {
|
|
2856
|
+
e = ln(e);
|
|
2857
|
+
let t = Vt.swalPromiseResolve.get(this), n = on(this);
|
|
2858
|
+
this.isAwaitingPromise ? e.isDismissed || (cn(this), t(e)) : n && t(e);
|
|
2859
|
+
}
|
|
2860
|
+
let on = (e) => {
|
|
2861
|
+
let t = E();
|
|
2862
|
+
if (!t) return !1;
|
|
2863
|
+
let n = J.innerParams.get(e);
|
|
2864
|
+
if (!n || P(t, n.hideClass.popup)) return !1;
|
|
2865
|
+
L(t, n.showClass.popup), I(t, n.hideClass.popup);
|
|
2866
|
+
let r = C();
|
|
2867
|
+
return L(r, n.showClass.backdrop), I(r, n.hideClass.backdrop), un(e, t, n), !0;
|
|
2868
|
+
};
|
|
2869
|
+
function sn(e) {
|
|
2870
|
+
let t = Vt.swalPromiseReject.get(this);
|
|
2871
|
+
cn(this), t && t(e);
|
|
2872
|
+
}
|
|
2873
|
+
let cn = (e) => {
|
|
2874
|
+
e.isAwaitingPromise && (delete e.isAwaitingPromise, J.innerParams.get(e) || e._destroy());
|
|
2875
|
+
}, ln = (e) => e === void 0 ? {
|
|
2876
|
+
isConfirmed: !1,
|
|
2877
|
+
isDenied: !1,
|
|
2878
|
+
isDismissed: !0
|
|
2879
|
+
} : Object.assign({
|
|
2880
|
+
isConfirmed: !1,
|
|
2881
|
+
isDenied: !1,
|
|
2882
|
+
isDismissed: !1
|
|
2883
|
+
}, e), un = (e, t, n) => {
|
|
2884
|
+
var r;
|
|
2885
|
+
let i = C(), o = Ce(t);
|
|
2886
|
+
typeof n.willClose == "function" && n.willClose(t), (r = a.eventEmitter) == null || r.emit("willClose", t), o && i ? dn(e, t, i, !!n.returnFocus, n.didClose) : i && nn(e, i, !!n.returnFocus, n.didClose);
|
|
2887
|
+
}, dn = (e, t, n, r, i) => {
|
|
2888
|
+
a.swalCloseEventFinishedCallback = nn.bind(null, e, n, r, i);
|
|
2889
|
+
let o = function(e) {
|
|
2890
|
+
if (e.target === t) {
|
|
2891
|
+
var n;
|
|
2892
|
+
(n = a.swalCloseEventFinishedCallback) == null || n.call(a), delete a.swalCloseEventFinishedCallback, t.removeEventListener("animationend", o), t.removeEventListener("transitionend", o);
|
|
2893
|
+
}
|
|
2894
|
+
};
|
|
2895
|
+
t.addEventListener("animationend", o), t.addEventListener("transitionend", o);
|
|
2896
|
+
}, fn = (e, t) => {
|
|
2897
|
+
setTimeout(() => {
|
|
2898
|
+
var n;
|
|
2899
|
+
typeof t == "function" && t.bind(e.params)(), (n = a.eventEmitter) == null || n.emit("didClose"), e._destroy && e._destroy();
|
|
2900
|
+
});
|
|
2901
|
+
}, pn = (e) => {
|
|
2902
|
+
let t = E();
|
|
2903
|
+
if (t || new li(), t = E(), !t) return;
|
|
2904
|
+
let n = M();
|
|
2905
|
+
fe() ? B(D()) : mn(t, e), z(n), t.setAttribute("data-loading", "true"), t.setAttribute("aria-busy", "true"), t.focus();
|
|
2906
|
+
}, mn = (e, t) => {
|
|
2907
|
+
let n = oe(), r = M();
|
|
2908
|
+
!n || !r || (!t && H(A()) && (t = A()), z(n), t && (B(t), r.setAttribute("data-button-to-replace", t.className), n.insertBefore(r, t)), I([e, n], l.loading));
|
|
2909
|
+
}, hn = (e, t) => {
|
|
2910
|
+
t.input === "select" || t.input === "radio" ? bn(e, t) : [
|
|
2911
|
+
"text",
|
|
2912
|
+
"email",
|
|
2913
|
+
"number",
|
|
2914
|
+
"tel",
|
|
2915
|
+
"textarea"
|
|
2916
|
+
].some((e) => e === t.input) && (y(t.inputValue) || x(t.inputValue)) && (pn(A()), xn(e, t));
|
|
2917
|
+
}, gn = (e, t) => {
|
|
2918
|
+
let n = e.getInput();
|
|
2919
|
+
if (!n) return null;
|
|
2920
|
+
switch (t.input) {
|
|
2921
|
+
case "checkbox": return _n(n);
|
|
2922
|
+
case "radio": return vn(n);
|
|
2923
|
+
case "file": return yn(n);
|
|
2924
|
+
default: return t.inputAutoTrim ? n.value.trim() : n.value;
|
|
2925
|
+
}
|
|
2926
|
+
}, _n = (e) => +!!e.checked, vn = (e) => e.checked ? e.value : null, yn = (e) => e.files && e.files.length ? e.getAttribute("multiple") === null ? e.files[0] : e.files : null, bn = (e, t) => {
|
|
2927
|
+
let n = E();
|
|
2928
|
+
if (!n) return;
|
|
2929
|
+
let r = (e) => {
|
|
2930
|
+
t.input === "select" ? Sn(n, wn(e), t) : t.input === "radio" && Cn(n, wn(e), t);
|
|
2931
|
+
};
|
|
2932
|
+
y(t.inputOptions) || x(t.inputOptions) ? (pn(A()), b(t.inputOptions).then((t) => {
|
|
2933
|
+
e.hideLoading(), r(t);
|
|
2934
|
+
})) : typeof t.inputOptions == "object" ? r(t.inputOptions) : m(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof t.inputOptions}`);
|
|
2935
|
+
}, xn = (e, t) => {
|
|
2936
|
+
let n = e.getInput();
|
|
2937
|
+
n && (B(n), b(t.inputValue).then((r) => {
|
|
2938
|
+
n.value = t.input === "number" ? `${parseFloat(r) || 0}` : `${r}`, z(n), n.focus(), e.hideLoading();
|
|
2939
|
+
}).catch((t) => {
|
|
2940
|
+
m(`Error in inputValue promise: ${t}`), n.value = "", z(n), n.focus(), e.hideLoading();
|
|
2941
|
+
}));
|
|
2942
|
+
};
|
|
2943
|
+
function Sn(e, t, n) {
|
|
2944
|
+
let r = R(e, l.select);
|
|
2945
|
+
if (!r) return;
|
|
2946
|
+
let i = (e, t, r) => {
|
|
2947
|
+
let i = document.createElement("option");
|
|
2948
|
+
i.value = r, N(i, t), i.selected = Tn(r, n.inputValue), e.appendChild(i);
|
|
2949
|
+
};
|
|
2950
|
+
t.forEach((e) => {
|
|
2951
|
+
let t = e[0], n = e[1];
|
|
2952
|
+
if (Array.isArray(n)) {
|
|
2953
|
+
let e = document.createElement("optgroup");
|
|
2954
|
+
e.label = t, e.disabled = !1, r.appendChild(e), n.forEach((t) => i(e, t[1], t[0]));
|
|
2955
|
+
} else i(r, n, t);
|
|
2956
|
+
}), r.focus();
|
|
2957
|
+
}
|
|
2958
|
+
function Cn(e, t, n) {
|
|
2959
|
+
let r = R(e, l.radio);
|
|
2960
|
+
if (!r) return;
|
|
2961
|
+
t.forEach((e) => {
|
|
2962
|
+
let t = e[0], i = e[1], a = document.createElement("input"), o = document.createElement("label");
|
|
2963
|
+
a.type = "radio", a.name = l.radio, a.value = t, Tn(t, n.inputValue) && (a.checked = !0);
|
|
2964
|
+
let s = document.createElement("span");
|
|
2965
|
+
N(s, i), s.className = l.label, o.appendChild(a), o.appendChild(s), r.appendChild(o);
|
|
2966
|
+
});
|
|
2967
|
+
let i = r.querySelectorAll("input");
|
|
2968
|
+
i.length && i[0].focus();
|
|
2969
|
+
}
|
|
2970
|
+
let wn = (e) => (e instanceof Map ? Array.from(e) : Object.entries(e)).map(([e, t]) => [e, typeof t == "object" ? wn(t) : t]), Tn = (e, t) => !!t && t != null && t.toString() === e.toString(), En = (e) => {
|
|
2971
|
+
let t = J.innerParams.get(e);
|
|
2972
|
+
e.disableButtons(), t.input ? kn(e, "confirm") : Pn(e, !0);
|
|
2973
|
+
}, Dn = (e) => {
|
|
2974
|
+
let t = J.innerParams.get(e);
|
|
2975
|
+
e.disableButtons(), t.returnInputValueOnDeny ? kn(e, "deny") : jn(e, !1);
|
|
2976
|
+
}, On = (e, t) => {
|
|
2977
|
+
e.disableButtons(), t(Z.cancel);
|
|
2978
|
+
}, kn = (e, t) => {
|
|
2979
|
+
let n = J.innerParams.get(e);
|
|
2980
|
+
if (!n.input) {
|
|
2981
|
+
m(`The "input" parameter is needed to be set when using returnInputValueOn${f(t)}`);
|
|
2982
|
+
return;
|
|
2983
|
+
}
|
|
2984
|
+
let r = e.getInput(), i = gn(e, n);
|
|
2985
|
+
n.inputValidator ? An(e, i, t) : r && !r.checkValidity() ? (e.enableButtons(), e.showValidationMessage(n.validationMessage || r.validationMessage)) : t === "deny" ? jn(e, i) : Pn(e, i);
|
|
2986
|
+
}, An = (e, t, n) => {
|
|
2987
|
+
let r = J.innerParams.get(e);
|
|
2988
|
+
e.disableInput(), Promise.resolve().then(() => b(r.inputValidator(t, r.validationMessage))).then((r) => {
|
|
2989
|
+
e.enableButtons(), e.enableInput(), r ? e.showValidationMessage(r) : n === "deny" ? jn(e, t) : Pn(e, t);
|
|
2990
|
+
});
|
|
2991
|
+
}, jn = (e, t) => {
|
|
2992
|
+
let n = J.innerParams.get(e);
|
|
2993
|
+
n.showLoaderOnDeny && pn(j()), n.preDeny ? (e.isAwaitingPromise = !0, Promise.resolve().then(() => b(n.preDeny(t, n.validationMessage))).then((n) => {
|
|
2994
|
+
n === !1 ? (e.hideLoading(), cn(e)) : e.close({
|
|
2995
|
+
isDenied: !0,
|
|
2996
|
+
value: n === void 0 ? t : n
|
|
2997
|
+
});
|
|
2998
|
+
}).catch((t) => Nn(e, t))) : e.close({
|
|
2999
|
+
isDenied: !0,
|
|
3000
|
+
value: t
|
|
3001
|
+
});
|
|
3002
|
+
}, Mn = (e, t) => {
|
|
3003
|
+
e.close({
|
|
3004
|
+
isConfirmed: !0,
|
|
3005
|
+
value: t
|
|
3006
|
+
});
|
|
3007
|
+
}, Nn = (e, t) => {
|
|
3008
|
+
e.rejectPromise(t);
|
|
3009
|
+
}, Pn = (e, t) => {
|
|
3010
|
+
let n = J.innerParams.get(e);
|
|
3011
|
+
n.showLoaderOnConfirm && pn(), n.preConfirm ? (e.resetValidationMessage(), e.isAwaitingPromise = !0, Promise.resolve().then(() => b(n.preConfirm(t, n.validationMessage))).then((n) => {
|
|
3012
|
+
H(re()) || n === !1 ? (e.hideLoading(), cn(e)) : Mn(e, n === void 0 ? t : n);
|
|
3013
|
+
}).catch((t) => Nn(e, t))) : Mn(e, t);
|
|
3014
|
+
};
|
|
3015
|
+
function Fn() {
|
|
3016
|
+
let e = J.innerParams.get(this);
|
|
3017
|
+
if (!e) return;
|
|
3018
|
+
let t = J.domCache.get(this);
|
|
3019
|
+
B(t.loader), fe() ? e.icon && z(D()) : In(t), L([t.popup, t.actions], l.loading), t.popup.removeAttribute("aria-busy"), t.popup.removeAttribute("data-loading"), this.enableButtons();
|
|
3020
|
+
}
|
|
3021
|
+
let In = (e) => {
|
|
3022
|
+
let t = e.loader.getAttribute("data-button-to-replace"), n = t ? e.popup.getElementsByClassName(t) : [];
|
|
3023
|
+
n.length ? z(n[0], "inline-block") : xe() && B(e.actions);
|
|
3024
|
+
};
|
|
3025
|
+
function Ln() {
|
|
3026
|
+
let e = J.innerParams.get(this), t = J.domCache.get(this);
|
|
3027
|
+
return t ? he(t.popup, e.input) : null;
|
|
3028
|
+
}
|
|
3029
|
+
function Rn(e, t, n) {
|
|
3030
|
+
let r = J.domCache.get(e);
|
|
3031
|
+
t.forEach((e) => {
|
|
3032
|
+
r[e].disabled = n;
|
|
3033
|
+
});
|
|
3034
|
+
}
|
|
3035
|
+
function zn(e, t) {
|
|
3036
|
+
let n = E();
|
|
3037
|
+
!n || !e || (e.type === "radio" ? n.querySelectorAll(`[name="${l.radio}"]`).forEach((e) => {
|
|
3038
|
+
e.disabled = t;
|
|
3039
|
+
}) : e.disabled = t);
|
|
3040
|
+
}
|
|
3041
|
+
function Bn() {
|
|
3042
|
+
Rn(this, [
|
|
3043
|
+
"confirmButton",
|
|
3044
|
+
"denyButton",
|
|
3045
|
+
"cancelButton"
|
|
3046
|
+
], !1);
|
|
3047
|
+
let e = J.focusedElement.get(this);
|
|
3048
|
+
e instanceof HTMLElement && document.activeElement === document.body && e.focus(), J.focusedElement.delete(this);
|
|
3049
|
+
}
|
|
3050
|
+
function Vn() {
|
|
3051
|
+
J.focusedElement.set(this, document.activeElement), Rn(this, [
|
|
3052
|
+
"confirmButton",
|
|
3053
|
+
"denyButton",
|
|
3054
|
+
"cancelButton"
|
|
3055
|
+
], !0);
|
|
3056
|
+
}
|
|
3057
|
+
function Hn() {
|
|
3058
|
+
zn(this.getInput(), !1);
|
|
3059
|
+
}
|
|
3060
|
+
function Un() {
|
|
3061
|
+
zn(this.getInput(), !0);
|
|
3062
|
+
}
|
|
3063
|
+
function Wn(e) {
|
|
3064
|
+
let t = J.domCache.get(this), n = J.innerParams.get(this);
|
|
3065
|
+
N(t.validationMessage, e), t.validationMessage.className = l["validation-message"], n.customClass && n.customClass.validationMessage && I(t.validationMessage, n.customClass.validationMessage), z(t.validationMessage);
|
|
3066
|
+
let r = this.getInput();
|
|
3067
|
+
r && (r.setAttribute("aria-invalid", "true"), r.setAttribute("aria-describedby", l["validation-message"]), ge(r), I(r, l.inputerror));
|
|
3068
|
+
}
|
|
3069
|
+
function Gn() {
|
|
3070
|
+
let e = J.domCache.get(this);
|
|
3071
|
+
e.validationMessage && B(e.validationMessage);
|
|
3072
|
+
let t = this.getInput();
|
|
3073
|
+
t && (t.removeAttribute("aria-invalid"), t.removeAttribute("aria-describedby"), L(t, l.inputerror));
|
|
3074
|
+
}
|
|
3075
|
+
let Kn = {
|
|
3076
|
+
title: "",
|
|
3077
|
+
titleText: "",
|
|
3078
|
+
text: "",
|
|
3079
|
+
html: "",
|
|
3080
|
+
footer: "",
|
|
3081
|
+
icon: void 0,
|
|
3082
|
+
iconColor: void 0,
|
|
3083
|
+
iconHtml: void 0,
|
|
3084
|
+
template: void 0,
|
|
3085
|
+
toast: !1,
|
|
3086
|
+
draggable: !1,
|
|
3087
|
+
animation: !0,
|
|
3088
|
+
theme: "light",
|
|
3089
|
+
showClass: {
|
|
3090
|
+
popup: "swal2-show",
|
|
3091
|
+
backdrop: "swal2-backdrop-show",
|
|
3092
|
+
icon: "swal2-icon-show"
|
|
3093
|
+
},
|
|
3094
|
+
hideClass: {
|
|
3095
|
+
popup: "swal2-hide",
|
|
3096
|
+
backdrop: "swal2-backdrop-hide",
|
|
3097
|
+
icon: "swal2-icon-hide"
|
|
3098
|
+
},
|
|
3099
|
+
customClass: {},
|
|
3100
|
+
target: "body",
|
|
3101
|
+
color: void 0,
|
|
3102
|
+
backdrop: !0,
|
|
3103
|
+
heightAuto: !0,
|
|
3104
|
+
allowOutsideClick: !0,
|
|
3105
|
+
allowEscapeKey: !0,
|
|
3106
|
+
allowEnterKey: !0,
|
|
3107
|
+
stopKeydownPropagation: !0,
|
|
3108
|
+
keydownListenerCapture: !1,
|
|
3109
|
+
showConfirmButton: !0,
|
|
3110
|
+
showDenyButton: !1,
|
|
3111
|
+
showCancelButton: !1,
|
|
3112
|
+
preConfirm: void 0,
|
|
3113
|
+
preDeny: void 0,
|
|
3114
|
+
confirmButtonText: "OK",
|
|
3115
|
+
confirmButtonAriaLabel: "",
|
|
3116
|
+
confirmButtonColor: void 0,
|
|
3117
|
+
denyButtonText: "No",
|
|
3118
|
+
denyButtonAriaLabel: "",
|
|
3119
|
+
denyButtonColor: void 0,
|
|
3120
|
+
cancelButtonText: "Cancel",
|
|
3121
|
+
cancelButtonAriaLabel: "",
|
|
3122
|
+
cancelButtonColor: void 0,
|
|
3123
|
+
buttonsStyling: !0,
|
|
3124
|
+
reverseButtons: !1,
|
|
3125
|
+
focusConfirm: !0,
|
|
3126
|
+
focusDeny: !1,
|
|
3127
|
+
focusCancel: !1,
|
|
3128
|
+
returnFocus: !0,
|
|
3129
|
+
showCloseButton: !1,
|
|
3130
|
+
closeButtonHtml: "×",
|
|
3131
|
+
closeButtonAriaLabel: "Close this dialog",
|
|
3132
|
+
loaderHtml: "",
|
|
3133
|
+
showLoaderOnConfirm: !1,
|
|
3134
|
+
showLoaderOnDeny: !1,
|
|
3135
|
+
imageUrl: void 0,
|
|
3136
|
+
imageWidth: void 0,
|
|
3137
|
+
imageHeight: void 0,
|
|
3138
|
+
imageAlt: "",
|
|
3139
|
+
timer: void 0,
|
|
3140
|
+
timerProgressBar: !1,
|
|
3141
|
+
width: void 0,
|
|
3142
|
+
padding: void 0,
|
|
3143
|
+
background: void 0,
|
|
3144
|
+
input: void 0,
|
|
3145
|
+
inputPlaceholder: "",
|
|
3146
|
+
inputLabel: "",
|
|
3147
|
+
inputValue: "",
|
|
3148
|
+
inputOptions: {},
|
|
3149
|
+
inputAutoFocus: !0,
|
|
3150
|
+
inputAutoTrim: !0,
|
|
3151
|
+
inputAttributes: {},
|
|
3152
|
+
inputValidator: void 0,
|
|
3153
|
+
returnInputValueOnDeny: !1,
|
|
3154
|
+
validationMessage: void 0,
|
|
3155
|
+
grow: !1,
|
|
3156
|
+
position: "center",
|
|
3157
|
+
progressSteps: [],
|
|
3158
|
+
currentProgressStep: void 0,
|
|
3159
|
+
progressStepsDistance: void 0,
|
|
3160
|
+
willOpen: void 0,
|
|
3161
|
+
didOpen: void 0,
|
|
3162
|
+
didRender: void 0,
|
|
3163
|
+
willClose: void 0,
|
|
3164
|
+
didClose: void 0,
|
|
3165
|
+
didDestroy: void 0,
|
|
3166
|
+
scrollbarPadding: !0,
|
|
3167
|
+
topLayer: !1
|
|
3168
|
+
}, qn = /* @__PURE__ */ "allowEscapeKey.allowOutsideClick.background.buttonsStyling.cancelButtonAriaLabel.cancelButtonColor.cancelButtonText.closeButtonAriaLabel.closeButtonHtml.color.confirmButtonAriaLabel.confirmButtonColor.confirmButtonText.currentProgressStep.customClass.denyButtonAriaLabel.denyButtonColor.denyButtonText.didClose.didDestroy.draggable.footer.hideClass.html.icon.iconColor.iconHtml.imageAlt.imageHeight.imageUrl.imageWidth.preConfirm.preDeny.progressSteps.returnFocus.reverseButtons.showCancelButton.showCloseButton.showConfirmButton.showDenyButton.text.title.titleText.theme.willClose".split("."), Jn = { allowEnterKey: void 0 }, Yn = [
|
|
3169
|
+
"allowOutsideClick",
|
|
3170
|
+
"allowEnterKey",
|
|
3171
|
+
"backdrop",
|
|
3172
|
+
"draggable",
|
|
3173
|
+
"focusConfirm",
|
|
3174
|
+
"focusDeny",
|
|
3175
|
+
"focusCancel",
|
|
3176
|
+
"returnFocus",
|
|
3177
|
+
"heightAuto",
|
|
3178
|
+
"keydownListenerCapture"
|
|
3179
|
+
], Xn = (e) => Object.prototype.hasOwnProperty.call(Kn, e), Zn = (e) => qn.indexOf(e) !== -1, Qn = (e) => Jn[e], $n = (e) => {
|
|
3180
|
+
Xn(e) || p(`Unknown parameter "${e}"`);
|
|
3181
|
+
}, er = (e) => {
|
|
3182
|
+
Yn.includes(e) && p(`The parameter "${e}" is incompatible with toasts`);
|
|
3183
|
+
}, tr = (e) => {
|
|
3184
|
+
let t = Qn(e);
|
|
3185
|
+
t && _(e, t);
|
|
3186
|
+
}, nr = (e) => {
|
|
3187
|
+
e.backdrop === !1 && e.allowOutsideClick && p("\"allowOutsideClick\" parameter requires `backdrop` parameter to be set to `true`"), e.theme && ![
|
|
3188
|
+
"light",
|
|
3189
|
+
"dark",
|
|
3190
|
+
"auto",
|
|
3191
|
+
"minimal",
|
|
3192
|
+
"borderless",
|
|
3193
|
+
"bootstrap-4",
|
|
3194
|
+
"bootstrap-4-light",
|
|
3195
|
+
"bootstrap-4-dark",
|
|
3196
|
+
"bootstrap-5",
|
|
3197
|
+
"bootstrap-5-light",
|
|
3198
|
+
"bootstrap-5-dark",
|
|
3199
|
+
"material-ui",
|
|
3200
|
+
"material-ui-light",
|
|
3201
|
+
"material-ui-dark",
|
|
3202
|
+
"embed-iframe",
|
|
3203
|
+
"bulma",
|
|
3204
|
+
"bulma-light",
|
|
3205
|
+
"bulma-dark"
|
|
3206
|
+
].includes(e.theme) && p(`Invalid theme "${e.theme}"`);
|
|
3207
|
+
for (let t in e) $n(t), e.toast && er(t), tr(t);
|
|
3208
|
+
};
|
|
3209
|
+
function rr(e) {
|
|
3210
|
+
let t = C(), n = E(), r = J.innerParams.get(this);
|
|
3211
|
+
if (!n || P(n, r.hideClass.popup)) {
|
|
3212
|
+
p("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");
|
|
3213
|
+
return;
|
|
3214
|
+
}
|
|
3215
|
+
let i = ir(e), a = Object.assign({}, r, i);
|
|
3216
|
+
nr(a), t && (t.dataset.swal2Theme = a.theme), Et(this, a), J.innerParams.set(this, a), Object.defineProperties(this, { params: {
|
|
3217
|
+
value: Object.assign({}, this.params, e),
|
|
3218
|
+
writable: !1,
|
|
3219
|
+
enumerable: !0
|
|
3220
|
+
} });
|
|
3221
|
+
}
|
|
3222
|
+
let ir = (e) => {
|
|
3223
|
+
let t = {};
|
|
3224
|
+
return Object.keys(e).forEach((n) => {
|
|
3225
|
+
Zn(n) ? t[n] = e[n] : p(`Invalid parameter to update: ${n}`);
|
|
3226
|
+
}), t;
|
|
3227
|
+
};
|
|
3228
|
+
function ar() {
|
|
3229
|
+
var e;
|
|
3230
|
+
let t = J.domCache.get(this), n = J.innerParams.get(this);
|
|
3231
|
+
if (!n) {
|
|
3232
|
+
sr(this);
|
|
3233
|
+
return;
|
|
3234
|
+
}
|
|
3235
|
+
t.popup && a.swalCloseEventFinishedCallback && (a.swalCloseEventFinishedCallback(), delete a.swalCloseEventFinishedCallback), typeof n.didDestroy == "function" && n.didDestroy(), (e = a.eventEmitter) == null || e.emit("didDestroy"), or(this);
|
|
3236
|
+
}
|
|
3237
|
+
let or = (e) => {
|
|
3238
|
+
sr(e), delete e.params, delete a.keydownHandler, delete a.keydownTarget, delete a.currentInstance;
|
|
3239
|
+
}, sr = (e) => {
|
|
3240
|
+
e.isAwaitingPromise ? (cr(J, e), e.isAwaitingPromise = !0) : (cr(Vt, e), cr(J, e), delete e.isAwaitingPromise, delete e.disableButtons, delete e.enableButtons, delete e.getInput, delete e.disableInput, delete e.enableInput, delete e.hideLoading, delete e.disableLoading, delete e.showValidationMessage, delete e.resetValidationMessage, delete e.close, delete e.closePopup, delete e.closeModal, delete e.closeToast, delete e.rejectPromise, delete e.update, delete e._destroy);
|
|
3241
|
+
}, cr = (e, t) => {
|
|
3242
|
+
for (let n in e) e[n].delete(t);
|
|
3243
|
+
};
|
|
3244
|
+
var lr = /*#__PURE__*/ Object.freeze({
|
|
3245
|
+
__proto__: null,
|
|
3246
|
+
_destroy: ar,
|
|
3247
|
+
close: an,
|
|
3248
|
+
closeModal: an,
|
|
3249
|
+
closePopup: an,
|
|
3250
|
+
closeToast: an,
|
|
3251
|
+
disableButtons: Vn,
|
|
3252
|
+
disableInput: Un,
|
|
3253
|
+
disableLoading: Fn,
|
|
3254
|
+
enableButtons: Bn,
|
|
3255
|
+
enableInput: Hn,
|
|
3256
|
+
getInput: Ln,
|
|
3257
|
+
handleAwaitingPromise: cn,
|
|
3258
|
+
hideLoading: Fn,
|
|
3259
|
+
rejectPromise: sn,
|
|
3260
|
+
resetValidationMessage: Gn,
|
|
3261
|
+
showValidationMessage: Wn,
|
|
3262
|
+
update: rr
|
|
3263
|
+
});
|
|
3264
|
+
let ur = (e, t, n) => {
|
|
3265
|
+
e.toast ? dr(e, t, n) : (mr(t), hr(t), gr(e, t, n));
|
|
3266
|
+
}, dr = (e, t, n) => {
|
|
3267
|
+
t.popup.onclick = () => {
|
|
3268
|
+
e && (fr(e) || e.timer || e.input) || n(Z.close);
|
|
3269
|
+
};
|
|
3270
|
+
}, fr = (e) => !!(e.showConfirmButton || e.showDenyButton || e.showCancelButton || e.showCloseButton), pr = !1, mr = (e) => {
|
|
3271
|
+
e.popup.onmousedown = () => {
|
|
3272
|
+
e.container.onmouseup = function(t) {
|
|
3273
|
+
e.container.onmouseup = () => {}, t.target === e.container && (pr = !0);
|
|
3274
|
+
};
|
|
3275
|
+
};
|
|
3276
|
+
}, hr = (e) => {
|
|
3277
|
+
e.container.onmousedown = (t) => {
|
|
3278
|
+
t.target === e.container && t.preventDefault(), e.popup.onmouseup = function(t) {
|
|
3279
|
+
e.popup.onmouseup = () => {}, (t.target === e.popup || t.target instanceof HTMLElement && e.popup.contains(t.target)) && (pr = !0);
|
|
3280
|
+
};
|
|
3281
|
+
};
|
|
3282
|
+
}, gr = (e, t, n) => {
|
|
3283
|
+
t.container.onclick = (r) => {
|
|
3284
|
+
if (pr) {
|
|
3285
|
+
pr = !1;
|
|
3286
|
+
return;
|
|
3287
|
+
}
|
|
3288
|
+
r.target === t.container && v(e.allowOutsideClick) && n(Z.backdrop);
|
|
3289
|
+
};
|
|
3290
|
+
}, _r = (e) => typeof e == "object" && !!e && "jquery" in e, vr = (e) => e instanceof Element || _r(e), yr = (e) => {
|
|
3291
|
+
let t = {};
|
|
3292
|
+
return typeof e[0] == "object" && !vr(e[0]) ? Object.assign(t, e[0]) : [
|
|
3293
|
+
"title",
|
|
3294
|
+
"html",
|
|
3295
|
+
"icon"
|
|
3296
|
+
].forEach((n, r) => {
|
|
3297
|
+
let i = e[r];
|
|
3298
|
+
typeof i == "string" || vr(i) ? t[n] = i : i !== void 0 && m(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`);
|
|
3299
|
+
}), t;
|
|
3300
|
+
};
|
|
3301
|
+
function br(...e) {
|
|
3302
|
+
return new this(...e);
|
|
3303
|
+
}
|
|
3304
|
+
function xr(e) {
|
|
3305
|
+
class t extends this {
|
|
3306
|
+
_main(t, n) {
|
|
3307
|
+
return super._main(t, Object.assign({}, e, n));
|
|
3308
|
+
}
|
|
3309
|
+
}
|
|
3310
|
+
return t;
|
|
3311
|
+
}
|
|
3312
|
+
let Sr = () => a.timeout && a.timeout.getTimerLeft(), Cr = () => {
|
|
3313
|
+
if (a.timeout) return Te(), a.timeout.stop();
|
|
3314
|
+
}, wr = () => {
|
|
3315
|
+
if (a.timeout) {
|
|
3316
|
+
let e = a.timeout.start();
|
|
3317
|
+
return we(e), e;
|
|
3318
|
+
}
|
|
3319
|
+
}, Tr = () => {
|
|
3320
|
+
let e = a.timeout;
|
|
3321
|
+
return e && (e.running ? Cr() : wr());
|
|
3322
|
+
}, Er = (e) => {
|
|
3323
|
+
if (a.timeout) {
|
|
3324
|
+
let t = a.timeout.increase(e);
|
|
3325
|
+
return we(t, !0), t;
|
|
3326
|
+
}
|
|
3327
|
+
}, Dr = () => !!(a.timeout && a.timeout.isRunning()), Or = !1, kr = {};
|
|
3328
|
+
function Ar(e = "data-swal-template") {
|
|
3329
|
+
kr[e] = this, Or ||= (document.body.addEventListener("click", jr), !0);
|
|
3330
|
+
}
|
|
3331
|
+
let jr = (e) => {
|
|
3332
|
+
for (let t = e.target; t && t !== document; t = t.parentNode) for (let e in kr) {
|
|
3333
|
+
let n = t.getAttribute && t.getAttribute(e);
|
|
3334
|
+
if (n) {
|
|
3335
|
+
kr[e].fire({ template: n });
|
|
3336
|
+
return;
|
|
3337
|
+
}
|
|
3338
|
+
}
|
|
3339
|
+
};
|
|
3340
|
+
class Mr {
|
|
3341
|
+
constructor() {
|
|
3342
|
+
this.events = {};
|
|
3343
|
+
}
|
|
3344
|
+
_getHandlersByEventName(e) {
|
|
3345
|
+
return this.events[e] === void 0 && (this.events[e] = []), this.events[e];
|
|
3346
|
+
}
|
|
3347
|
+
on(e, t) {
|
|
3348
|
+
let n = this._getHandlersByEventName(e);
|
|
3349
|
+
n.includes(t) || n.push(t);
|
|
3350
|
+
}
|
|
3351
|
+
once(e, t) {
|
|
3352
|
+
let n = (...r) => {
|
|
3353
|
+
this.removeListener(e, n), t.apply(this, r);
|
|
3354
|
+
};
|
|
3355
|
+
this.on(e, n);
|
|
3356
|
+
}
|
|
3357
|
+
emit(e, ...t) {
|
|
3358
|
+
this._getHandlersByEventName(e).forEach((e) => {
|
|
3359
|
+
try {
|
|
3360
|
+
e.apply(this, t);
|
|
3361
|
+
} catch (e) {
|
|
3362
|
+
console.error(e);
|
|
3363
|
+
}
|
|
3364
|
+
});
|
|
3365
|
+
}
|
|
3366
|
+
removeListener(e, t) {
|
|
3367
|
+
let n = this._getHandlersByEventName(e), r = n.indexOf(t);
|
|
3368
|
+
r > -1 && n.splice(r, 1);
|
|
3369
|
+
}
|
|
3370
|
+
removeAllListeners(e) {
|
|
3371
|
+
this.events[e] !== void 0 && (this.events[e].length = 0);
|
|
3372
|
+
}
|
|
3373
|
+
reset() {
|
|
3374
|
+
this.events = {};
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
a.eventEmitter = new Mr();
|
|
3378
|
+
var Nr = /*#__PURE__*/ Object.freeze({
|
|
3379
|
+
__proto__: null,
|
|
3380
|
+
argsToParams: yr,
|
|
3381
|
+
bindClickHandler: Ar,
|
|
3382
|
+
clickCancel: At,
|
|
3383
|
+
clickConfirm: Ot,
|
|
3384
|
+
clickDeny: kt,
|
|
3385
|
+
enableLoading: pn,
|
|
3386
|
+
fire: br,
|
|
3387
|
+
getActions: oe,
|
|
3388
|
+
getCancelButton: ie,
|
|
3389
|
+
getCloseButton: le,
|
|
3390
|
+
getConfirmButton: A,
|
|
3391
|
+
getContainer: C,
|
|
3392
|
+
getDenyButton: j,
|
|
3393
|
+
getFocusableElements: ue,
|
|
3394
|
+
getFooter: se,
|
|
3395
|
+
getHtmlContainer: te,
|
|
3396
|
+
getIcon: D,
|
|
3397
|
+
getIconContent: O,
|
|
3398
|
+
getImage: k,
|
|
3399
|
+
getInputLabel: ae,
|
|
3400
|
+
getLoader: M,
|
|
3401
|
+
getPopup: E,
|
|
3402
|
+
getProgressSteps: ne,
|
|
3403
|
+
getTimerLeft: Sr,
|
|
3404
|
+
getTimerProgressBar: ce,
|
|
3405
|
+
getTitle: ee,
|
|
3406
|
+
getValidationMessage: re,
|
|
3407
|
+
increaseTimer: Er,
|
|
3408
|
+
isDeprecatedParameter: Qn,
|
|
3409
|
+
isLoading: pe,
|
|
3410
|
+
isTimerRunning: Dr,
|
|
3411
|
+
isUpdatableParameter: Zn,
|
|
3412
|
+
isValidParameter: Xn,
|
|
3413
|
+
isVisible: Dt,
|
|
3414
|
+
mixin: xr,
|
|
3415
|
+
off: (e, t) => {
|
|
3416
|
+
if (a.eventEmitter) {
|
|
3417
|
+
if (!e) {
|
|
3418
|
+
a.eventEmitter.reset();
|
|
3419
|
+
return;
|
|
3420
|
+
}
|
|
3421
|
+
t ? a.eventEmitter.removeListener(e, t) : a.eventEmitter.removeAllListeners(e);
|
|
3422
|
+
}
|
|
3423
|
+
},
|
|
3424
|
+
on: (e, t) => {
|
|
3425
|
+
a.eventEmitter && a.eventEmitter.on(e, t);
|
|
3426
|
+
},
|
|
3427
|
+
once: (e, t) => {
|
|
3428
|
+
a.eventEmitter && a.eventEmitter.once(e, t);
|
|
3429
|
+
},
|
|
3430
|
+
resumeTimer: wr,
|
|
3431
|
+
showLoading: pn,
|
|
3432
|
+
stopTimer: Cr,
|
|
3433
|
+
toggleTimer: Tr
|
|
3434
|
+
});
|
|
3435
|
+
class Pr {
|
|
3436
|
+
constructor(e, t) {
|
|
3437
|
+
this.callback = e, this.remaining = t, this.running = !1, this.start();
|
|
3438
|
+
}
|
|
3439
|
+
start() {
|
|
3440
|
+
return this.running || (this.running = !0, this.started = /* @__PURE__ */ new Date(), this.id = setTimeout(this.callback, this.remaining)), this.remaining;
|
|
3441
|
+
}
|
|
3442
|
+
stop() {
|
|
3443
|
+
return this.started && this.running && (this.running = !1, clearTimeout(this.id), this.remaining -= (/* @__PURE__ */ new Date()).getTime() - this.started.getTime()), this.remaining;
|
|
3444
|
+
}
|
|
3445
|
+
increase(e) {
|
|
3446
|
+
let t = this.running;
|
|
3447
|
+
return t && this.stop(), this.remaining += e, t && this.start(), this.remaining;
|
|
3448
|
+
}
|
|
3449
|
+
getTimerLeft() {
|
|
3450
|
+
return this.running && (this.stop(), this.start()), this.remaining;
|
|
3451
|
+
}
|
|
3452
|
+
isRunning() {
|
|
3453
|
+
return this.running;
|
|
3454
|
+
}
|
|
3455
|
+
}
|
|
3456
|
+
let Fr = [
|
|
3457
|
+
"swal-title",
|
|
3458
|
+
"swal-html",
|
|
3459
|
+
"swal-footer"
|
|
3460
|
+
], Ir = (e) => {
|
|
3461
|
+
let t = typeof e.template == "string" ? document.querySelector(e.template) : e.template;
|
|
3462
|
+
if (!t) return {};
|
|
3463
|
+
let n = t.content;
|
|
3464
|
+
return Wr(n), Object.assign(Lr(n), Rr(n), zr(n), Br(n), Vr(n), Hr(n), Ur(n, Fr));
|
|
3465
|
+
}, Lr = (e) => {
|
|
3466
|
+
let t = {};
|
|
3467
|
+
return Array.from(e.querySelectorAll("swal-param")).forEach((e) => {
|
|
3468
|
+
Gr(e, ["name", "value"]);
|
|
3469
|
+
let n = e.getAttribute("name"), r = e.getAttribute("value");
|
|
3470
|
+
!n || !r || (n in Kn && typeof Kn[n] == "boolean" ? t[n] = r !== "false" : n in Kn && typeof Kn[n] == "object" ? t[n] = JSON.parse(r) : t[n] = r);
|
|
3471
|
+
}), t;
|
|
3472
|
+
}, Rr = (e) => {
|
|
3473
|
+
let t = {};
|
|
3474
|
+
return Array.from(e.querySelectorAll("swal-function-param")).forEach((e) => {
|
|
3475
|
+
let n = e.getAttribute("name"), r = e.getAttribute("value");
|
|
3476
|
+
!n || !r || (t[n] = Function(`return ${r}`)());
|
|
3477
|
+
}), t;
|
|
3478
|
+
}, zr = (e) => {
|
|
3479
|
+
let t = {};
|
|
3480
|
+
return Array.from(e.querySelectorAll("swal-button")).forEach((e) => {
|
|
3481
|
+
Gr(e, [
|
|
3482
|
+
"type",
|
|
3483
|
+
"color",
|
|
3484
|
+
"aria-label"
|
|
3485
|
+
]);
|
|
3486
|
+
let n = e.getAttribute("type");
|
|
3487
|
+
if (!n || ![
|
|
3488
|
+
"confirm",
|
|
3489
|
+
"cancel",
|
|
3490
|
+
"deny"
|
|
3491
|
+
].includes(n)) return;
|
|
3492
|
+
t[`${n}ButtonText`] = e.innerHTML, t[`show${f(n)}Button`] = !0;
|
|
3493
|
+
let r = e.getAttribute("color");
|
|
3494
|
+
r !== null && (t[`${n}ButtonColor`] = r);
|
|
3495
|
+
let i = e.getAttribute("aria-label");
|
|
3496
|
+
i !== null && (t[`${n}ButtonAriaLabel`] = i);
|
|
3497
|
+
}), t;
|
|
3498
|
+
}, Br = (e) => {
|
|
3499
|
+
let t = {}, n = e.querySelector("swal-image");
|
|
3500
|
+
if (n) {
|
|
3501
|
+
Gr(n, [
|
|
3502
|
+
"src",
|
|
3503
|
+
"width",
|
|
3504
|
+
"height",
|
|
3505
|
+
"alt"
|
|
3506
|
+
]);
|
|
3507
|
+
let e = n.getAttribute("src");
|
|
3508
|
+
e !== null && (t.imageUrl = e || void 0);
|
|
3509
|
+
let r = n.getAttribute("width");
|
|
3510
|
+
r !== null && (t.imageWidth = r || void 0);
|
|
3511
|
+
let i = n.getAttribute("height");
|
|
3512
|
+
i !== null && (t.imageHeight = i || void 0);
|
|
3513
|
+
let a = n.getAttribute("alt");
|
|
3514
|
+
a !== null && (t.imageAlt = a || void 0);
|
|
3515
|
+
}
|
|
3516
|
+
return t;
|
|
3517
|
+
}, Vr = (e) => {
|
|
3518
|
+
let t = {}, n = e.querySelector("swal-icon");
|
|
3519
|
+
return n && (Gr(n, ["type", "color"]), n.hasAttribute("type") && (t.icon = n.getAttribute("type")), n.hasAttribute("color") && (t.iconColor = n.getAttribute("color")), t.iconHtml = n.innerHTML), t;
|
|
3520
|
+
}, Hr = (e) => {
|
|
3521
|
+
let t = {}, n = e.querySelector("swal-input");
|
|
3522
|
+
n && (Gr(n, [
|
|
3523
|
+
"type",
|
|
3524
|
+
"label",
|
|
3525
|
+
"placeholder",
|
|
3526
|
+
"value"
|
|
3527
|
+
]), t.input = n.getAttribute("type") || "text", n.hasAttribute("label") && (t.inputLabel = n.getAttribute("label")), n.hasAttribute("placeholder") && (t.inputPlaceholder = n.getAttribute("placeholder")), n.hasAttribute("value") && (t.inputValue = n.getAttribute("value")));
|
|
3528
|
+
let r = Array.from(e.querySelectorAll("swal-input-option"));
|
|
3529
|
+
return r.length && (t.inputOptions = {}, r.forEach((e) => {
|
|
3530
|
+
Gr(e, ["value"]);
|
|
3531
|
+
let n = e.getAttribute("value");
|
|
3532
|
+
if (!n) return;
|
|
3533
|
+
let r = e.innerHTML;
|
|
3534
|
+
t.inputOptions[n] = r;
|
|
3535
|
+
})), t;
|
|
3536
|
+
}, Ur = (e, t) => {
|
|
3537
|
+
let n = {};
|
|
3538
|
+
for (let r in t) {
|
|
3539
|
+
let i = t[r], a = e.querySelector(i);
|
|
3540
|
+
a && (Gr(a, []), n[i.replace(/^swal-/, "")] = a.innerHTML.trim());
|
|
3541
|
+
}
|
|
3542
|
+
return n;
|
|
3543
|
+
}, Wr = (e) => {
|
|
3544
|
+
let t = Fr.concat([
|
|
3545
|
+
"swal-param",
|
|
3546
|
+
"swal-function-param",
|
|
3547
|
+
"swal-button",
|
|
3548
|
+
"swal-image",
|
|
3549
|
+
"swal-icon",
|
|
3550
|
+
"swal-input",
|
|
3551
|
+
"swal-input-option"
|
|
3552
|
+
]);
|
|
3553
|
+
Array.from(e.children).forEach((e) => {
|
|
3554
|
+
let n = e.tagName.toLowerCase();
|
|
3555
|
+
t.includes(n) || p(`Unrecognized element <${n}>`);
|
|
3556
|
+
});
|
|
3557
|
+
}, Gr = (e, t) => {
|
|
3558
|
+
Array.from(e.attributes).forEach((n) => {
|
|
3559
|
+
t.indexOf(n.name) === -1 && p([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`, `${t.length ? `Allowed attributes are: ${t.join(", ")}` : "To set the value, use HTML within the element."}`]);
|
|
3560
|
+
});
|
|
3561
|
+
}, Kr = (e) => {
|
|
3562
|
+
var t, n;
|
|
3563
|
+
let r = C(), i = E();
|
|
3564
|
+
if (!r || !i) return;
|
|
3565
|
+
typeof e.willOpen == "function" && e.willOpen(i), (t = a.eventEmitter) == null || t.emit("willOpen", i);
|
|
3566
|
+
let o = window.getComputedStyle(document.body).overflowY;
|
|
3567
|
+
if (Xr(r, i, e), setTimeout(() => {
|
|
3568
|
+
Jr(r, i);
|
|
3569
|
+
}, 10), de() && (Yr(r, e.scrollbarPadding !== void 0 && e.scrollbarPadding, o), Ht()), Gt && e.backdrop === !1 && i.scrollHeight > r.clientHeight && (r.style.pointerEvents = "auto"), !fe() && !a.previousActiveElement && (a.previousActiveElement = document.activeElement), typeof e.didOpen == "function") {
|
|
3570
|
+
let t = e.didOpen;
|
|
3571
|
+
setTimeout(() => t(i));
|
|
3572
|
+
}
|
|
3573
|
+
(n = a.eventEmitter) == null || n.emit("didOpen", i);
|
|
3574
|
+
}, qr = (e) => {
|
|
3575
|
+
let t = E();
|
|
3576
|
+
if (!t || e.target !== t) return;
|
|
3577
|
+
let n = C();
|
|
3578
|
+
n && (t.removeEventListener("animationend", qr), t.removeEventListener("transitionend", qr), n.style.overflowY = "auto", L(n, l["no-transition"]));
|
|
3579
|
+
}, Jr = (e, t) => {
|
|
3580
|
+
Ce(t) ? (e.style.overflowY = "hidden", t.addEventListener("animationend", qr), t.addEventListener("transitionend", qr)) : e.style.overflowY = "auto";
|
|
3581
|
+
}, Yr = (e, t, n) => {
|
|
3582
|
+
Kt(), t && n !== "hidden" && en(n), setTimeout(() => {
|
|
3583
|
+
e.scrollTop = 0;
|
|
3584
|
+
});
|
|
3585
|
+
}, Xr = (e, t, n) => {
|
|
3586
|
+
var r;
|
|
3587
|
+
(r = n.showClass) != null && r.backdrop && I(e, n.showClass.backdrop), n.animation ? (t.style.setProperty("opacity", "0", "important"), z(t, "grid"), setTimeout(() => {
|
|
3588
|
+
var e;
|
|
3589
|
+
(e = n.showClass) != null && e.popup && I(t, n.showClass.popup), t.style.removeProperty("opacity");
|
|
3590
|
+
}, 10)) : z(t, "grid"), I([document.documentElement, document.body], l.shown), n.heightAuto && n.backdrop && !n.toast && I([document.documentElement, document.body], l["height-auto"]);
|
|
3591
|
+
};
|
|
3592
|
+
var Zr = {
|
|
3593
|
+
email: (e, t) => /^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e) ? Promise.resolve() : Promise.resolve(t || "Invalid email address"),
|
|
3594
|
+
url: (e, t) => /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e) ? Promise.resolve() : Promise.resolve(t || "Invalid URL")
|
|
3595
|
+
};
|
|
3596
|
+
function Qr(e) {
|
|
3597
|
+
e.inputValidator || (e.input === "email" && (e.inputValidator = Zr.email), e.input === "url" && (e.inputValidator = Zr.url));
|
|
3598
|
+
}
|
|
3599
|
+
function $r(e) {
|
|
3600
|
+
(!e.target || typeof e.target == "string" && !document.querySelector(e.target) || typeof e.target != "string" && !e.target.appendChild) && (p("Target parameter is not valid, defaulting to \"body\""), e.target = "body");
|
|
3601
|
+
}
|
|
3602
|
+
function ei(e) {
|
|
3603
|
+
Qr(e), e.showLoaderOnConfirm && !e.preConfirm && p("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"), $r(e), typeof e.title == "string" && (e.title = e.title.split("\n").join("<br />")), Ae(e);
|
|
3604
|
+
}
|
|
3605
|
+
let Q;
|
|
3606
|
+
var ti = /*#__PURE__*/ new WeakMap();
|
|
3607
|
+
class $ {
|
|
3608
|
+
constructor(...e) {
|
|
3609
|
+
if (r(this, ti, Promise.resolve({
|
|
3610
|
+
isConfirmed: !1,
|
|
3611
|
+
isDenied: !1,
|
|
3612
|
+
isDismissed: !0
|
|
3613
|
+
})), typeof window > "u") return;
|
|
3614
|
+
Q = this;
|
|
3615
|
+
let t = Object.freeze(this.constructor.argsToParams(e));
|
|
3616
|
+
this.params = t, this.isAwaitingPromise = !1, i(ti, this, this._main(Q.params));
|
|
3617
|
+
}
|
|
3618
|
+
_main(e, t = {}) {
|
|
3619
|
+
if (nr(Object.assign({}, t, e)), a.currentInstance) {
|
|
3620
|
+
let e = Vt.swalPromiseResolve.get(a.currentInstance), { isAwaitingPromise: t } = a.currentInstance;
|
|
3621
|
+
a.currentInstance._destroy(), t || e({ isDismissed: !0 }), de() && Ut();
|
|
3622
|
+
}
|
|
3623
|
+
a.currentInstance = Q;
|
|
3624
|
+
let n = ri(e, t);
|
|
3625
|
+
ei(n), Object.freeze(n), a.timeout && (a.timeout.stop(), delete a.timeout), clearTimeout(a.restoreFocusTimeout);
|
|
3626
|
+
let r = ii(Q);
|
|
3627
|
+
return Et(Q, n), J.innerParams.set(Q, n), ni(Q, r, n);
|
|
3628
|
+
}
|
|
3629
|
+
then(e) {
|
|
3630
|
+
return n(ti, this).then(e);
|
|
3631
|
+
}
|
|
3632
|
+
finally(e) {
|
|
3633
|
+
return n(ti, this).finally(e);
|
|
3634
|
+
}
|
|
3635
|
+
}
|
|
3636
|
+
let ni = (e, t, n) => new Promise((r, i) => {
|
|
3637
|
+
let o = (t) => {
|
|
3638
|
+
e.close({
|
|
3639
|
+
isDismissed: !0,
|
|
3640
|
+
dismiss: t,
|
|
3641
|
+
isConfirmed: !1,
|
|
3642
|
+
isDenied: !1
|
|
3643
|
+
});
|
|
3644
|
+
};
|
|
3645
|
+
Vt.swalPromiseResolve.set(e, r), Vt.swalPromiseReject.set(e, i), t.confirmButton.onclick = () => {
|
|
3646
|
+
En(e);
|
|
3647
|
+
}, t.denyButton.onclick = () => {
|
|
3648
|
+
Dn(e);
|
|
3649
|
+
}, t.cancelButton.onclick = () => {
|
|
3650
|
+
On(e, o);
|
|
3651
|
+
}, t.closeButton.onclick = () => {
|
|
3652
|
+
o(Z.close);
|
|
3653
|
+
}, ur(n, t, o), Mt(a, n, o), hn(e, n), Kr(n), ai(a, n, o), oi(t, n), setTimeout(() => {
|
|
3654
|
+
t.container.scrollTop = 0;
|
|
3655
|
+
});
|
|
3656
|
+
}), ri = (e, t) => {
|
|
3657
|
+
let n = Ir(e), r = Object.assign({}, Kn, t, n, e);
|
|
3658
|
+
return r.showClass = Object.assign({}, Kn.showClass, r.showClass), r.hideClass = Object.assign({}, Kn.hideClass, r.hideClass), r.animation === !1 && (r.showClass = { backdrop: "swal2-noanimation" }, r.hideClass = {}), r;
|
|
3659
|
+
}, ii = (e) => {
|
|
3660
|
+
let t = {
|
|
3661
|
+
popup: E(),
|
|
3662
|
+
container: C(),
|
|
3663
|
+
actions: oe(),
|
|
3664
|
+
confirmButton: A(),
|
|
3665
|
+
denyButton: j(),
|
|
3666
|
+
cancelButton: ie(),
|
|
3667
|
+
loader: M(),
|
|
3668
|
+
closeButton: le(),
|
|
3669
|
+
validationMessage: re(),
|
|
3670
|
+
progressSteps: ne()
|
|
3671
|
+
};
|
|
3672
|
+
return J.domCache.set(e, t), t;
|
|
3673
|
+
}, ai = (e, t, n) => {
|
|
3674
|
+
let r = ce();
|
|
3675
|
+
B(r), t.timer && (e.timeout = new Pr(() => {
|
|
3676
|
+
n("timer"), delete e.timeout;
|
|
3677
|
+
}, t.timer), t.timerProgressBar && r && (z(r), F(r, t, "timerProgressBar"), setTimeout(() => {
|
|
3678
|
+
e.timeout && e.timeout.running && we(t.timer);
|
|
3679
|
+
})));
|
|
3680
|
+
}, oi = (e, t) => {
|
|
3681
|
+
if (!t.toast) {
|
|
3682
|
+
if (!v(t.allowEnterKey)) {
|
|
3683
|
+
_("allowEnterKey", "preConfirm: () => false"), e.popup.focus();
|
|
3684
|
+
return;
|
|
3685
|
+
}
|
|
3686
|
+
si(e) || ci(e, t) || Nt(-1, 1);
|
|
3687
|
+
}
|
|
3688
|
+
}, si = (e) => {
|
|
3689
|
+
let t = Array.from(e.popup.querySelectorAll("[autofocus]"));
|
|
3690
|
+
for (let e of t) if (e instanceof HTMLElement && H(e)) return e.focus(), !0;
|
|
3691
|
+
return !1;
|
|
3692
|
+
}, ci = (e, t) => t.focusDeny && H(e.denyButton) ? (e.denyButton.focus(), !0) : t.focusCancel && H(e.cancelButton) ? (e.cancelButton.focus(), !0) : t.focusConfirm && H(e.confirmButton) ? (e.confirmButton.focus(), !0) : !1;
|
|
3693
|
+
$.prototype.disableButtons = Vn, $.prototype.enableButtons = Bn, $.prototype.getInput = Ln, $.prototype.disableInput = Un, $.prototype.enableInput = Hn, $.prototype.hideLoading = Fn, $.prototype.disableLoading = Fn, $.prototype.showValidationMessage = Wn, $.prototype.resetValidationMessage = Gn, $.prototype.close = an, $.prototype.closePopup = an, $.prototype.closeModal = an, $.prototype.closeToast = an, $.prototype.rejectPromise = sn, $.prototype.update = rr, $.prototype._destroy = ar, Object.assign($, Nr), Object.keys(lr).forEach((e) => {
|
|
3694
|
+
$[e] = function(...t) {
|
|
3695
|
+
if (Q && Q[e]) return Q[e](...t);
|
|
3696
|
+
};
|
|
3697
|
+
}), $.DismissReason = Z, $.version = "11.26.25";
|
|
3698
|
+
let li = $;
|
|
3699
|
+
return li.default = li, li;
|
|
3700
|
+
})), e !== void 0 && e.Sweetalert2 && (e.swal = e.sweetAlert = e.Swal = e.SweetAlert = e.Sweetalert2), typeof document < "u" && function(e, t) {
|
|
3701
|
+
var n = e.createElement("style");
|
|
3702
|
+
if (e.getElementsByTagName("head")[0].appendChild(n), n.styleSheet) n.styleSheet.disabled || (n.styleSheet.cssText = t);
|
|
3703
|
+
else try {
|
|
3704
|
+
n.innerHTML = t;
|
|
3705
|
+
} catch {
|
|
3706
|
+
n.innerText = t;
|
|
3707
|
+
}
|
|
3708
|
+
}(document, ":root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:auto}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:auto}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}");
|
|
3709
|
+
})))(), 1);
|
|
3710
|
+
function At({ title: e, inputs: t, confirmText: n, cancelText: r }) {
|
|
1797
3711
|
let i = t.map((e, t) => `<input id="${`swal-input-${t}`}" class="swal2-input" placeholder="${e.placeholder || ""}" value="${e.value || ""}">`).join("");
|
|
1798
|
-
return
|
|
3712
|
+
return kt.default.fire({
|
|
1799
3713
|
title: e,
|
|
1800
3714
|
html: i,
|
|
1801
3715
|
focusConfirm: !1,
|
|
@@ -1804,7 +3718,7 @@ function J({ title: e, inputs: t, confirmText: n, cancelText: r }) {
|
|
|
1804
3718
|
let n = `swal-input-${t}`, r = document.getElementById(n);
|
|
1805
3719
|
if (!r) return null;
|
|
1806
3720
|
let i = r.value;
|
|
1807
|
-
return e.required && !i ? (
|
|
3721
|
+
return e.required && !i ? (kt.default.showValidationMessage(e.requiredMessage || "This field is required"), !1) : i;
|
|
1808
3722
|
});
|
|
1809
3723
|
return !e.includes(!1) && e;
|
|
1810
3724
|
},
|
|
@@ -1815,16 +3729,16 @@ function J({ title: e, inputs: t, confirmText: n, cancelText: r }) {
|
|
|
1815
3729
|
}
|
|
1816
3730
|
//#endregion
|
|
1817
3731
|
//#region src/components/shared/toolbar/Insert/Hooks/insertLogic.jsx
|
|
1818
|
-
function
|
|
3732
|
+
function Z() {
|
|
1819
3733
|
let e = window.getSelection();
|
|
1820
3734
|
return e && e.rangeCount > 0 ? e.getRangeAt(0).cloneRange() : null;
|
|
1821
3735
|
}
|
|
1822
|
-
function
|
|
3736
|
+
function jt(e) {
|
|
1823
3737
|
if (!e) return;
|
|
1824
3738
|
let t = window.getSelection();
|
|
1825
3739
|
t && (t.removeAllRanges(), t.addRange(e));
|
|
1826
3740
|
}
|
|
1827
|
-
function
|
|
3741
|
+
function Mt() {
|
|
1828
3742
|
let e = document.querySelector(".forge-editor__content");
|
|
1829
3743
|
if (e) {
|
|
1830
3744
|
e.focus();
|
|
@@ -1835,10 +3749,10 @@ function fe() {
|
|
|
1835
3749
|
}
|
|
1836
3750
|
}
|
|
1837
3751
|
}
|
|
1838
|
-
function
|
|
3752
|
+
function Nt(e) {
|
|
1839
3753
|
let t = window.getSelection();
|
|
1840
3754
|
if (!t || !t.rangeCount) {
|
|
1841
|
-
|
|
3755
|
+
Mt(), setTimeout(() => Nt(e), 50);
|
|
1842
3756
|
return;
|
|
1843
3757
|
}
|
|
1844
3758
|
let n = t.getRangeAt(0);
|
|
@@ -1846,10 +3760,10 @@ function Z(e) {
|
|
|
1846
3760
|
let r = n.createContextualFragment(e), i = r.lastChild;
|
|
1847
3761
|
n.insertNode(r), i ? (n.setStartAfter(i), n.collapse(!0)) : n.collapse(!1), t.removeAllRanges(), t.addRange(n);
|
|
1848
3762
|
}
|
|
1849
|
-
function
|
|
3763
|
+
function Pt() {
|
|
1850
3764
|
return {
|
|
1851
3765
|
insertLink: async () => {
|
|
1852
|
-
let e =
|
|
3766
|
+
let e = Z(), t = await At({
|
|
1853
3767
|
title: "Insert Link",
|
|
1854
3768
|
inputs: [{
|
|
1855
3769
|
placeholder: "URL",
|
|
@@ -1861,13 +3775,13 @@ function pe() {
|
|
|
1861
3775
|
cancelText: "Cancel"
|
|
1862
3776
|
});
|
|
1863
3777
|
if (t.isConfirmed && t.value) {
|
|
1864
|
-
|
|
3778
|
+
jt(e);
|
|
1865
3779
|
let [n, r] = t.value;
|
|
1866
|
-
|
|
3780
|
+
Nt(r ? `<a href="${n}" target="_blank" rel="noopener">${r}</a>` : `<a href="${n}" target="_blank" rel="noopener">${n}</a>`);
|
|
1867
3781
|
}
|
|
1868
3782
|
},
|
|
1869
3783
|
insertImage: async () => {
|
|
1870
|
-
let e =
|
|
3784
|
+
let e = Z(), t = await At({
|
|
1871
3785
|
title: "Insert Image",
|
|
1872
3786
|
inputs: [{
|
|
1873
3787
|
placeholder: "Image URL",
|
|
@@ -1882,13 +3796,13 @@ function pe() {
|
|
|
1882
3796
|
cancelText: "Cancel"
|
|
1883
3797
|
});
|
|
1884
3798
|
if (t.isConfirmed && t.value) {
|
|
1885
|
-
|
|
3799
|
+
jt(e);
|
|
1886
3800
|
let [n, r] = t.value;
|
|
1887
|
-
|
|
3801
|
+
Nt(`<img src="${n}" alt="${r}" style="max-width: 100%;">`);
|
|
1888
3802
|
}
|
|
1889
3803
|
},
|
|
1890
3804
|
insertVideo: async () => {
|
|
1891
|
-
let e =
|
|
3805
|
+
let e = Z(), t = await At({
|
|
1892
3806
|
title: "Insert Video",
|
|
1893
3807
|
inputs: [{
|
|
1894
3808
|
placeholder: "Video URL (YouTube/Vimeo)",
|
|
@@ -1900,46 +3814,46 @@ function pe() {
|
|
|
1900
3814
|
cancelText: "Cancel"
|
|
1901
3815
|
});
|
|
1902
3816
|
if (t.isConfirmed && t.value) {
|
|
1903
|
-
|
|
3817
|
+
jt(e);
|
|
1904
3818
|
let [n] = t.value, r;
|
|
1905
|
-
r = n.includes("youtube.com") || n.includes("youtu.be") ? `<iframe width="560" height="315" src="${n.replace("watch?v=", "embed/").replace("youtu.be/", "youtube.com/embed/")}" frameborder="0" allowfullscreen></iframe>` : `<video controls src="${n}" style="max-width: 100%;"></video>`,
|
|
3819
|
+
r = n.includes("youtube.com") || n.includes("youtu.be") ? `<iframe width="560" height="315" src="${n.replace("watch?v=", "embed/").replace("youtu.be/", "youtube.com/embed/")}" frameborder="0" allowfullscreen></iframe>` : `<video controls src="${n}" style="max-width: 100%;"></video>`, Nt(r);
|
|
1906
3820
|
}
|
|
1907
3821
|
}
|
|
1908
3822
|
};
|
|
1909
3823
|
}
|
|
1910
3824
|
//#endregion
|
|
1911
3825
|
//#region src/components/shared/toolbar/Insert/Components/index.jsx
|
|
1912
|
-
function
|
|
1913
|
-
return /* @__PURE__ */
|
|
3826
|
+
function Ft() {
|
|
3827
|
+
return /* @__PURE__ */ R(Ot, { logic: Pt() });
|
|
1914
3828
|
}
|
|
1915
3829
|
//#endregion
|
|
1916
3830
|
//#region src/components/shared/toolbar/View/Components/ViewToolbar.jsx
|
|
1917
|
-
function
|
|
3831
|
+
function It({ logic: e }) {
|
|
1918
3832
|
let { toggleFullscreen: t, toggleCodeView: n, showHelp: r } = e, i = "forge-toolbar-button group relative flex h-8 cursor-pointer items-center justify-center rounded-[2px] border border-[#ccc] bg-white px-2 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px", a = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
|
|
1919
|
-
return /* @__PURE__ */
|
|
3833
|
+
return /* @__PURE__ */ R("div", {
|
|
1920
3834
|
className: "forge-toolbar-group forge-toolbar-view flex items-center gap-0.5",
|
|
1921
|
-
children: [/* @__PURE__ */
|
|
3835
|
+
children: [/* @__PURE__ */ R("button", {
|
|
1922
3836
|
type: "button",
|
|
1923
3837
|
className: i,
|
|
1924
3838
|
onClick: t,
|
|
1925
3839
|
"aria-label": "Full Screen",
|
|
1926
|
-
children: [/* @__PURE__ */
|
|
3840
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1927
3841
|
className: "forge-toolbar-icon",
|
|
1928
3842
|
children: "⛶"
|
|
1929
|
-
}), /* @__PURE__ */
|
|
3843
|
+
}), /* @__PURE__ */ R("span", {
|
|
1930
3844
|
className: a,
|
|
1931
3845
|
"data-i18n": "fullscreen",
|
|
1932
3846
|
children: "Full Screen"
|
|
1933
3847
|
})]
|
|
1934
|
-
}), /* @__PURE__ */
|
|
3848
|
+
}), /* @__PURE__ */ R("button", {
|
|
1935
3849
|
type: "button",
|
|
1936
3850
|
className: i,
|
|
1937
3851
|
onClick: n,
|
|
1938
3852
|
"aria-label": "Code View",
|
|
1939
|
-
children: [/* @__PURE__ */
|
|
3853
|
+
children: [/* @__PURE__ */ R("span", {
|
|
1940
3854
|
className: "forge-toolbar-icon",
|
|
1941
3855
|
children: "</>"
|
|
1942
|
-
}), /* @__PURE__ */
|
|
3856
|
+
}), /* @__PURE__ */ R("span", {
|
|
1943
3857
|
className: a,
|
|
1944
3858
|
"data-i18n": "codeview",
|
|
1945
3859
|
children: "Code View"
|
|
@@ -1949,7 +3863,7 @@ function he({ logic: e }) {
|
|
|
1949
3863
|
}
|
|
1950
3864
|
//#endregion
|
|
1951
3865
|
//#region src/components/shared/toolbar/View/Hooks/viewLogic.jsx
|
|
1952
|
-
function
|
|
3866
|
+
function Lt() {
|
|
1953
3867
|
return {
|
|
1954
3868
|
toggleFullscreen: () => {
|
|
1955
3869
|
let e = document.querySelector(".forge-editor");
|
|
@@ -1977,50 +3891,50 @@ function ge() {
|
|
|
1977
3891
|
}
|
|
1978
3892
|
//#endregion
|
|
1979
3893
|
//#region src/components/shared/toolbar/View/Components/index.jsx
|
|
1980
|
-
function
|
|
1981
|
-
return /* @__PURE__ */
|
|
3894
|
+
function Rt() {
|
|
3895
|
+
return /* @__PURE__ */ R(It, { logic: Lt() });
|
|
1982
3896
|
}
|
|
1983
3897
|
//#endregion
|
|
1984
3898
|
//#region src/components/shared/toolbar/Index/index.jsx
|
|
1985
|
-
function
|
|
1986
|
-
return /* @__PURE__ */
|
|
3899
|
+
function zt({ editorRef: e }) {
|
|
3900
|
+
return /* @__PURE__ */ R("div", {
|
|
1987
3901
|
className: "forge-editor__toolbar sticky top-0 z-10 m-0 flex flex-shrink-0 flex-wrap items-center gap-[4px] rounded-t-[3px] border-b border-[#ddd] bg-[#f5f5f5] p-[5px] text-[#333]",
|
|
1988
3902
|
role: "toolbar",
|
|
1989
3903
|
children: [
|
|
1990
|
-
/* @__PURE__ */
|
|
1991
|
-
/* @__PURE__ */
|
|
1992
|
-
/* @__PURE__ */
|
|
1993
|
-
/* @__PURE__ */
|
|
1994
|
-
/* @__PURE__ */
|
|
1995
|
-
/* @__PURE__ */
|
|
1996
|
-
/* @__PURE__ */
|
|
1997
|
-
/* @__PURE__ */
|
|
3904
|
+
/* @__PURE__ */ R(z, {}),
|
|
3905
|
+
/* @__PURE__ */ R(J, {}),
|
|
3906
|
+
/* @__PURE__ */ R(Ze, { editorRef: e }),
|
|
3907
|
+
/* @__PURE__ */ R(lt, {}),
|
|
3908
|
+
/* @__PURE__ */ R(xt, {}),
|
|
3909
|
+
/* @__PURE__ */ R(Dt, {}),
|
|
3910
|
+
/* @__PURE__ */ R(Ft, {}),
|
|
3911
|
+
/* @__PURE__ */ R(Rt, {})
|
|
1998
3912
|
]
|
|
1999
3913
|
});
|
|
2000
3914
|
}
|
|
2001
3915
|
//#endregion
|
|
2002
3916
|
//#region src/components/shared/statusbar/Components/index.jsx
|
|
2003
|
-
function
|
|
2004
|
-
return /* @__PURE__ */
|
|
3917
|
+
function Bt() {
|
|
3918
|
+
return /* @__PURE__ */ R("div", {
|
|
2005
3919
|
className: "forge-statusbar box-border flex h-2.5 w-full flex-shrink-0 cursor-s-resize items-center justify-center rounded-b-[3px] border-t border-[#ccc] bg-[#f0f0f0]",
|
|
2006
3920
|
role: "status",
|
|
2007
|
-
children: /* @__PURE__ */
|
|
3921
|
+
children: /* @__PURE__ */ R("div", {
|
|
2008
3922
|
className: "flex flex-col items-center gap-px",
|
|
2009
3923
|
"aria-label": "resize",
|
|
2010
3924
|
children: [
|
|
2011
|
-
/* @__PURE__ */
|
|
2012
|
-
/* @__PURE__ */
|
|
2013
|
-
/* @__PURE__ */
|
|
3925
|
+
/* @__PURE__ */ R("div", { className: "h-px w-3 rounded-[1px] bg-[#888]" }),
|
|
3926
|
+
/* @__PURE__ */ R("div", { className: "h-px w-3 rounded-[1px] bg-[#888]" }),
|
|
3927
|
+
/* @__PURE__ */ R("div", { className: "h-px w-3 rounded-[1px] bg-[#888]" })
|
|
2014
3928
|
]
|
|
2015
3929
|
})
|
|
2016
3930
|
});
|
|
2017
3931
|
}
|
|
2018
3932
|
//#endregion
|
|
2019
3933
|
//#region src/components/shared/statusbar/Hooks/resize.js
|
|
2020
|
-
var
|
|
2021
|
-
function
|
|
3934
|
+
var Vt = 100;
|
|
3935
|
+
function Ht(e, t, n = {}) {
|
|
2022
3936
|
if (!e || !t) return () => {};
|
|
2023
|
-
let r = n.minHeight ??
|
|
3937
|
+
let r = n.minHeight ?? Vt, i = n.maxHeight ?? Infinity, a = 0, o = 0;
|
|
2024
3938
|
function s(e) {
|
|
2025
3939
|
let n = e.clientY - a, s = o + n;
|
|
2026
3940
|
s = Math.min(Math.max(s, r), i), t.style.height = `${s}px`;
|
|
@@ -2037,7 +3951,7 @@ function xe(e, t, n = {}) {
|
|
|
2037
3951
|
}
|
|
2038
3952
|
//#endregion
|
|
2039
3953
|
//#region src/components/shared/toolbar/Style/Hooks/styleLogic.jsx
|
|
2040
|
-
function
|
|
3954
|
+
function Ut(e) {
|
|
2041
3955
|
let t = window.getSelection();
|
|
2042
3956
|
if (!t || !t.rangeCount) return;
|
|
2043
3957
|
let n = t.getRangeAt(0).commonAncestorContainer;
|
|
@@ -2051,20 +3965,20 @@ function Se(e) {
|
|
|
2051
3965
|
i.selectNodeContents(n), i.collapse(!1), t.removeAllRanges(), t.addRange(i);
|
|
2052
3966
|
}
|
|
2053
3967
|
}
|
|
2054
|
-
function
|
|
3968
|
+
function Wt(e) {
|
|
2055
3969
|
if (!e) return;
|
|
2056
3970
|
let t = e.querySelector("[data-command='style']"), n = e.querySelector(".forge-dropdown-style");
|
|
2057
|
-
!t || !n || (
|
|
3971
|
+
!t || !n || (qe(t, n), n.querySelectorAll(".forge-dropdown-item").forEach((e) => {
|
|
2058
3972
|
e.addEventListener("mousedown", (r) => {
|
|
2059
3973
|
r.preventDefault(), r.stopPropagation();
|
|
2060
3974
|
let i = e.dataset.value || e.getAttribute("data-value");
|
|
2061
|
-
i &&
|
|
3975
|
+
i && Ut(i), n.classList.remove("is-open"), t.classList.remove("is-active");
|
|
2062
3976
|
});
|
|
2063
3977
|
}));
|
|
2064
3978
|
}
|
|
2065
3979
|
//#endregion
|
|
2066
3980
|
//#region src/components/shared/i18n/index.js
|
|
2067
|
-
var
|
|
3981
|
+
var Gt = {
|
|
2068
3982
|
en: {
|
|
2069
3983
|
style: "Style",
|
|
2070
3984
|
normal: "Normal",
|
|
@@ -2137,20 +4051,20 @@ var Q = {
|
|
|
2137
4051
|
codeview: "عرض الكود",
|
|
2138
4052
|
help: "مساعدة"
|
|
2139
4053
|
}
|
|
2140
|
-
},
|
|
2141
|
-
function
|
|
2142
|
-
return (
|
|
4054
|
+
}, Kt = "en";
|
|
4055
|
+
function qt(e, t) {
|
|
4056
|
+
return (Gt[e] || Gt[Kt])[t] || Gt[Kt][t] || t;
|
|
2143
4057
|
}
|
|
2144
4058
|
//#endregion
|
|
2145
4059
|
//#region src/components/shared/i18n/apply.js
|
|
2146
|
-
function
|
|
4060
|
+
function Jt(e, t) {
|
|
2147
4061
|
e.querySelectorAll("[data-i18n]").forEach((e) => {
|
|
2148
|
-
e.textContent =
|
|
4062
|
+
e.textContent = qt(t, e.getAttribute("data-i18n"));
|
|
2149
4063
|
});
|
|
2150
4064
|
}
|
|
2151
4065
|
//#endregion
|
|
2152
4066
|
//#region src/components/shared/toolbar/Style/Utils/ensureParagraph.jsx
|
|
2153
|
-
function
|
|
4067
|
+
function Yt(e) {
|
|
2154
4068
|
if (e && !(e.children.length > 0 || e.textContent.trim().length > 0)) {
|
|
2155
4069
|
let t = document.createElement("p");
|
|
2156
4070
|
t.innerHTML = "<br>", e.appendChild(t);
|
|
@@ -2158,7 +4072,7 @@ function Ee(e) {
|
|
|
2158
4072
|
}
|
|
2159
4073
|
//#endregion
|
|
2160
4074
|
//#region src/components/shared/toolbar/Hooks/contentClick.js
|
|
2161
|
-
function
|
|
4075
|
+
function Xt(e) {
|
|
2162
4076
|
e.addEventListener("click", (t) => {
|
|
2163
4077
|
if (t.target === e) {
|
|
2164
4078
|
let t = window.getSelection();
|
|
@@ -2175,131 +4089,131 @@ function De(e) {
|
|
|
2175
4089
|
}
|
|
2176
4090
|
//#endregion
|
|
2177
4091
|
//#region src/components/shared/toolbar/ImagePopover/Components/ImagePopover.jsx
|
|
2178
|
-
function
|
|
2179
|
-
let
|
|
4092
|
+
function Zt({ target: e, onClose: t, onResize: n, onFloat: r, onRemove: i }) {
|
|
4093
|
+
let a = q(null);
|
|
2180
4094
|
if (!e) return null;
|
|
2181
|
-
let
|
|
2182
|
-
left:
|
|
2183
|
-
top:
|
|
2184
|
-
},
|
|
2185
|
-
return /* @__PURE__ */
|
|
2186
|
-
ref:
|
|
4095
|
+
let o = e.getBoundingClientRect(), s = {
|
|
4096
|
+
left: o.left + o.width / 2 - 100 + "px",
|
|
4097
|
+
top: o.bottom + 10 + "px"
|
|
4098
|
+
}, c = "note-btn cursor-pointer rounded-[2px] border border-[#ccc] bg-[#f5f5f5] px-2 py-1 text-xs leading-[1.4] transition-all duration-100 ease-in-out hover:border-[#999] hover:bg-[#e6e6e6] active:translate-y-px active:bg-[#d0d0d0]", l = "note-btn-group flex gap-0.5 border-r border-[#ddd] pr-1 last:border-r-0 last:pr-0", u = "not-italic text-sm leading-none";
|
|
4099
|
+
return /* @__PURE__ */ R("div", {
|
|
4100
|
+
ref: a,
|
|
2187
4101
|
className: "note-popover bottom note-image-popover fixed z-[9999] min-w-[200px] rounded-[4px] border border-[#ccc] bg-white p-1.5 shadow-[0_2px_8px_rgba(0,0,0,0.15)]",
|
|
2188
|
-
style:
|
|
2189
|
-
children: [/* @__PURE__ */
|
|
4102
|
+
style: s,
|
|
4103
|
+
children: [/* @__PURE__ */ R("div", {
|
|
2190
4104
|
className: "absolute -top-2 left-1/2 -translate-x-1/2",
|
|
2191
|
-
children: [/* @__PURE__ */
|
|
2192
|
-
}), /* @__PURE__ */
|
|
4105
|
+
children: [/* @__PURE__ */ R("div", { className: "border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent border-b-[#ccc]" }), /* @__PURE__ */ R("div", { className: "absolute top-[1px] left-[-7px] border-l-7 border-r-7 border-b-7 border-l-transparent border-r-transparent border-b-white" })]
|
|
4106
|
+
}), /* @__PURE__ */ R("div", {
|
|
2193
4107
|
className: "popover-content note-children-container flex flex-wrap items-center gap-1",
|
|
2194
4108
|
children: [
|
|
2195
|
-
/* @__PURE__ */
|
|
2196
|
-
className: `${
|
|
4109
|
+
/* @__PURE__ */ R("div", {
|
|
4110
|
+
className: `${l} note-resize`,
|
|
2197
4111
|
children: [
|
|
2198
|
-
/* @__PURE__ */
|
|
4112
|
+
/* @__PURE__ */ R("button", {
|
|
2199
4113
|
type: "button",
|
|
2200
|
-
className:
|
|
4114
|
+
className: c,
|
|
2201
4115
|
tabIndex: "-1",
|
|
2202
4116
|
"aria-label": "Resize full",
|
|
2203
4117
|
onClick: () => n(e, 1),
|
|
2204
|
-
children: /* @__PURE__ */
|
|
4118
|
+
children: /* @__PURE__ */ R("span", {
|
|
2205
4119
|
className: "note-fontsize-10 text-[10px]",
|
|
2206
4120
|
children: "100%"
|
|
2207
4121
|
})
|
|
2208
4122
|
}),
|
|
2209
|
-
/* @__PURE__ */
|
|
4123
|
+
/* @__PURE__ */ R("button", {
|
|
2210
4124
|
type: "button",
|
|
2211
|
-
className:
|
|
4125
|
+
className: c,
|
|
2212
4126
|
tabIndex: "-1",
|
|
2213
4127
|
"aria-label": "Resize half",
|
|
2214
4128
|
onClick: () => n(e, .5),
|
|
2215
|
-
children: /* @__PURE__ */
|
|
4129
|
+
children: /* @__PURE__ */ R("span", {
|
|
2216
4130
|
className: "note-fontsize-10 text-[10px]",
|
|
2217
4131
|
children: "50%"
|
|
2218
4132
|
})
|
|
2219
4133
|
}),
|
|
2220
|
-
/* @__PURE__ */
|
|
4134
|
+
/* @__PURE__ */ R("button", {
|
|
2221
4135
|
type: "button",
|
|
2222
|
-
className:
|
|
4136
|
+
className: c,
|
|
2223
4137
|
tabIndex: "-1",
|
|
2224
4138
|
"aria-label": "Resize quarter",
|
|
2225
4139
|
onClick: () => n(e, .25),
|
|
2226
|
-
children: /* @__PURE__ */
|
|
4140
|
+
children: /* @__PURE__ */ R("span", {
|
|
2227
4141
|
className: "note-fontsize-10 text-[10px]",
|
|
2228
4142
|
children: "25%"
|
|
2229
4143
|
})
|
|
2230
4144
|
}),
|
|
2231
|
-
/* @__PURE__ */
|
|
4145
|
+
/* @__PURE__ */ R("button", {
|
|
2232
4146
|
type: "button",
|
|
2233
|
-
className:
|
|
4147
|
+
className: c,
|
|
2234
4148
|
tabIndex: "-1",
|
|
2235
4149
|
"aria-label": "Original size",
|
|
2236
4150
|
onClick: () => n(e, "original"),
|
|
2237
|
-
children: /* @__PURE__ */
|
|
2238
|
-
className: `note-icon-rollback ${
|
|
4151
|
+
children: /* @__PURE__ */ R("i", {
|
|
4152
|
+
className: `note-icon-rollback ${u}`,
|
|
2239
4153
|
children: "↺"
|
|
2240
4154
|
})
|
|
2241
4155
|
})
|
|
2242
4156
|
]
|
|
2243
4157
|
}),
|
|
2244
|
-
/* @__PURE__ */
|
|
2245
|
-
className: `${
|
|
4158
|
+
/* @__PURE__ */ R("div", {
|
|
4159
|
+
className: `${l} note-float`,
|
|
2246
4160
|
children: [
|
|
2247
|
-
/* @__PURE__ */
|
|
4161
|
+
/* @__PURE__ */ R("button", {
|
|
2248
4162
|
type: "button",
|
|
2249
|
-
className:
|
|
4163
|
+
className: c,
|
|
2250
4164
|
tabIndex: "-1",
|
|
2251
4165
|
"aria-label": "Float Left",
|
|
2252
|
-
onClick: () =>
|
|
2253
|
-
children: /* @__PURE__ */
|
|
2254
|
-
className: `note-icon-float-left ${
|
|
4166
|
+
onClick: () => r(e, "left"),
|
|
4167
|
+
children: /* @__PURE__ */ R("i", {
|
|
4168
|
+
className: `note-icon-float-left ${u}`,
|
|
2255
4169
|
children: "◀"
|
|
2256
4170
|
})
|
|
2257
4171
|
}),
|
|
2258
|
-
/* @__PURE__ */
|
|
4172
|
+
/* @__PURE__ */ R("button", {
|
|
2259
4173
|
type: "button",
|
|
2260
|
-
className:
|
|
4174
|
+
className: c,
|
|
2261
4175
|
tabIndex: "-1",
|
|
2262
4176
|
"aria-label": "Center",
|
|
2263
|
-
onClick: () =>
|
|
2264
|
-
children: /* @__PURE__ */
|
|
2265
|
-
className: `note-icon-float-center ${
|
|
4177
|
+
onClick: () => r(e, "center"),
|
|
4178
|
+
children: /* @__PURE__ */ R("i", {
|
|
4179
|
+
className: `note-icon-float-center ${u}`,
|
|
2266
4180
|
children: "↔"
|
|
2267
4181
|
})
|
|
2268
4182
|
}),
|
|
2269
|
-
/* @__PURE__ */
|
|
4183
|
+
/* @__PURE__ */ R("button", {
|
|
2270
4184
|
type: "button",
|
|
2271
|
-
className:
|
|
4185
|
+
className: c,
|
|
2272
4186
|
tabIndex: "-1",
|
|
2273
4187
|
"aria-label": "Float Right",
|
|
2274
|
-
onClick: () =>
|
|
2275
|
-
children: /* @__PURE__ */
|
|
2276
|
-
className: `note-icon-float-right ${
|
|
4188
|
+
onClick: () => r(e, "right"),
|
|
4189
|
+
children: /* @__PURE__ */ R("i", {
|
|
4190
|
+
className: `note-icon-float-right ${u}`,
|
|
2277
4191
|
children: "▶"
|
|
2278
4192
|
})
|
|
2279
4193
|
}),
|
|
2280
|
-
/* @__PURE__ */
|
|
4194
|
+
/* @__PURE__ */ R("button", {
|
|
2281
4195
|
type: "button",
|
|
2282
|
-
className:
|
|
4196
|
+
className: c,
|
|
2283
4197
|
tabIndex: "-1",
|
|
2284
4198
|
"aria-label": "Remove float",
|
|
2285
|
-
onClick: () =>
|
|
2286
|
-
children: /* @__PURE__ */
|
|
2287
|
-
className: `note-icon-rollback ${
|
|
4199
|
+
onClick: () => r(e, "none"),
|
|
4200
|
+
children: /* @__PURE__ */ R("i", {
|
|
4201
|
+
className: `note-icon-rollback ${u}`,
|
|
2288
4202
|
children: "↺"
|
|
2289
4203
|
})
|
|
2290
4204
|
})
|
|
2291
4205
|
]
|
|
2292
4206
|
}),
|
|
2293
|
-
/* @__PURE__ */
|
|
2294
|
-
className: `${
|
|
2295
|
-
children: /* @__PURE__ */
|
|
4207
|
+
/* @__PURE__ */ R("div", {
|
|
4208
|
+
className: `${l} note-remove`,
|
|
4209
|
+
children: /* @__PURE__ */ R("button", {
|
|
2296
4210
|
type: "button",
|
|
2297
|
-
className:
|
|
4211
|
+
className: c,
|
|
2298
4212
|
tabIndex: "-1",
|
|
2299
4213
|
"aria-label": "Remove Image",
|
|
2300
|
-
onClick: () =>
|
|
2301
|
-
children: /* @__PURE__ */
|
|
2302
|
-
className: `note-icon-trash ${
|
|
4214
|
+
onClick: () => i(e),
|
|
4215
|
+
children: /* @__PURE__ */ R("i", {
|
|
4216
|
+
className: `note-icon-trash ${u}`,
|
|
2303
4217
|
children: "🗑"
|
|
2304
4218
|
})
|
|
2305
4219
|
})
|
|
@@ -2310,22 +4224,22 @@ function Oe({ target: e, onClose: t, onResize: n, onFloat: i, onRemove: a }) {
|
|
|
2310
4224
|
}
|
|
2311
4225
|
//#endregion
|
|
2312
4226
|
//#region src/components/shared/toolbar/ImagePopover/Hooks/useImagePopover.jsx
|
|
2313
|
-
function
|
|
2314
|
-
let [e, t] =
|
|
2315
|
-
return
|
|
4227
|
+
function Qt() {
|
|
4228
|
+
let [e, t] = G(null), [n, r] = G(!1);
|
|
4229
|
+
return K(() => {
|
|
2316
4230
|
let e = (e) => {
|
|
2317
|
-
let
|
|
2318
|
-
|
|
2319
|
-
},
|
|
2320
|
-
e.key === "Escape" &&
|
|
4231
|
+
let i = e.target.closest("img");
|
|
4232
|
+
i ? (t(i), r(!0)) : n && (r(!1), t(null));
|
|
4233
|
+
}, i = (e) => {
|
|
4234
|
+
e.key === "Escape" && n && (r(!1), t(null));
|
|
2321
4235
|
};
|
|
2322
|
-
return document.addEventListener("click", e), document.addEventListener("keydown",
|
|
2323
|
-
document.removeEventListener("click", e), document.removeEventListener("keydown",
|
|
4236
|
+
return document.addEventListener("click", e), document.addEventListener("keydown", i), () => {
|
|
4237
|
+
document.removeEventListener("click", e), document.removeEventListener("keydown", i);
|
|
2324
4238
|
};
|
|
2325
|
-
}, [
|
|
2326
|
-
target:
|
|
4239
|
+
}, [n]), {
|
|
4240
|
+
target: n ? e : null,
|
|
2327
4241
|
onClose: () => {
|
|
2328
|
-
|
|
4242
|
+
r(!1), t(null);
|
|
2329
4243
|
},
|
|
2330
4244
|
onResize: (e, n) => {
|
|
2331
4245
|
if (n === "original") e.style.width = "", e.style.height = "", e.removeAttribute("width"), e.removeAttribute("height");
|
|
@@ -2333,24 +4247,24 @@ function ke() {
|
|
|
2333
4247
|
let t = e.naturalWidth || e.width, r = e.naturalHeight || e.height;
|
|
2334
4248
|
e.style.width = t * n + "px", e.style.height = r * n + "px";
|
|
2335
4249
|
}
|
|
2336
|
-
|
|
4250
|
+
r(!1), t(null);
|
|
2337
4251
|
},
|
|
2338
4252
|
onFloat: (e, n) => {
|
|
2339
|
-
n === "none" ? (e.style.float = "", e.style.margin = "", e.style.display = "") : n === "center" ? (e.style.float = "none", e.style.display = "block", e.style.margin = "0 auto") : (e.style.float = n, e.style.display = "", e.style.margin = n === "left" ? "0 10px 5px 0" : "0 0 5px 10px"),
|
|
4253
|
+
n === "none" ? (e.style.float = "", e.style.margin = "", e.style.display = "") : n === "center" ? (e.style.float = "none", e.style.display = "block", e.style.margin = "0 auto") : (e.style.float = n, e.style.display = "", e.style.margin = n === "left" ? "0 10px 5px 0" : "0 0 5px 10px"), r(!1), t(null);
|
|
2340
4254
|
},
|
|
2341
4255
|
onRemove: (e) => {
|
|
2342
|
-
e.parentElement.removeChild(e),
|
|
4256
|
+
e.parentElement.removeChild(e), r(!1), t(null);
|
|
2343
4257
|
}
|
|
2344
4258
|
};
|
|
2345
4259
|
}
|
|
2346
4260
|
//#endregion
|
|
2347
4261
|
//#region src/components/shared/toolbar/ImagePopover/Components/index.jsx
|
|
2348
|
-
function
|
|
2349
|
-
return /* @__PURE__ */
|
|
4262
|
+
function $t() {
|
|
4263
|
+
return /* @__PURE__ */ R(Zt, { ...Qt() });
|
|
2350
4264
|
}
|
|
2351
4265
|
//#endregion
|
|
2352
4266
|
//#region src/components/light/index.jsx
|
|
2353
|
-
function
|
|
4267
|
+
function en(e) {
|
|
2354
4268
|
return {
|
|
2355
4269
|
getHTML() {
|
|
2356
4270
|
return e.innerHTML;
|
|
@@ -2367,41 +4281,41 @@ function je(e) {
|
|
|
2367
4281
|
}
|
|
2368
4282
|
};
|
|
2369
4283
|
}
|
|
2370
|
-
function
|
|
2371
|
-
let
|
|
4284
|
+
function tn(e) {
|
|
4285
|
+
let t = e.lang || "en", n = e.dir || "ltr", r = { current: null }, i = /* @__PURE__ */ R("div", {
|
|
2372
4286
|
className: "forge-editor forge-editor--light flex flex-col w-full rounded-[3px] border border-[#ddd] bg-white box-border align-top min-h-[120px]",
|
|
2373
|
-
lang:
|
|
2374
|
-
dir:
|
|
4287
|
+
lang: t,
|
|
4288
|
+
dir: n,
|
|
2375
4289
|
children: [
|
|
2376
|
-
/* @__PURE__ */
|
|
2377
|
-
/* @__PURE__ */
|
|
4290
|
+
/* @__PURE__ */ R(zt, { editorRef: r }),
|
|
4291
|
+
/* @__PURE__ */ R("div", {
|
|
2378
4292
|
className: "forge-editor__content flex-1 min-h-[60px] overflow-auto p-[10px] pb-12 outline-none box-border [&_blockquote]:my-2 [&_blockquote]:border-l-4 [&_blockquote]:border-[#ccc] [&_blockquote]:pl-4 [&_blockquote]:italic [&_pre]:bg-[#f4f4f4] [&_pre]:p-2 [&_pre]:rounded [&_h1]:text-2xl [&_h1]:font-bold [&_h2]:text-xl [&_h2]:font-bold [&_h3]:text-lg [&_h3]:font-bold",
|
|
2379
4293
|
contentEditable: "true",
|
|
2380
4294
|
"data-placeholder": e.placeholder || ""
|
|
2381
4295
|
}),
|
|
2382
|
-
/* @__PURE__ */
|
|
2383
|
-
/* @__PURE__ */
|
|
4296
|
+
/* @__PURE__ */ R(Bt, {}),
|
|
4297
|
+
/* @__PURE__ */ R($t, {})
|
|
2384
4298
|
]
|
|
2385
|
-
}),
|
|
2386
|
-
|
|
2387
|
-
let
|
|
2388
|
-
|
|
2389
|
-
let
|
|
2390
|
-
|
|
2391
|
-
let
|
|
2392
|
-
|
|
2393
|
-
let
|
|
2394
|
-
return
|
|
2395
|
-
element:
|
|
2396
|
-
...
|
|
4299
|
+
}), a = document.createElement("div");
|
|
4300
|
+
I(i, a);
|
|
4301
|
+
let o = a.firstElementChild, s = o.querySelector(".forge-editor__content");
|
|
4302
|
+
r.current = s, Yt(s), Xt(s);
|
|
4303
|
+
let c = o.querySelector(".forge-toolbar-style");
|
|
4304
|
+
c && Wt(c);
|
|
4305
|
+
let l = o.querySelector(".forge-editor__toolbar");
|
|
4306
|
+
l && Jt(l, t);
|
|
4307
|
+
let u = o.querySelector(".forge-statusbar");
|
|
4308
|
+
return u && Ht(u, o, { minHeight: 120 }), {
|
|
4309
|
+
element: o,
|
|
4310
|
+
...en(s)
|
|
2397
4311
|
};
|
|
2398
4312
|
}
|
|
2399
4313
|
//#endregion
|
|
2400
4314
|
//#region src/main/index.jsx
|
|
2401
|
-
function
|
|
2402
|
-
let t =
|
|
4315
|
+
function nn(e) {
|
|
4316
|
+
let t = l(e);
|
|
2403
4317
|
if (t.type === "light") {
|
|
2404
|
-
let { element: n, getHTML: r, setHTML: i, getText: a, getSelection: o } =
|
|
4318
|
+
let { element: n, getHTML: r, setHTML: i, getText: a, getSelection: o } = tn(t);
|
|
2405
4319
|
return e.innerHTML = "", e.appendChild(n), n.style.width = t.width, n.style.height = t.height, {
|
|
2406
4320
|
element: n,
|
|
2407
4321
|
getHTML: r,
|
|
@@ -2413,4 +4327,4 @@ function Ne(e) {
|
|
|
2413
4327
|
return null;
|
|
2414
4328
|
}
|
|
2415
4329
|
//#endregion
|
|
2416
|
-
export {
|
|
4330
|
+
export { nn as default };
|