@cyberskill/cyber-editor 3.4.1 → 3.4.2
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/components/modal-edit.d.ts +1 -1
- package/dist/cyber-editor.cjs.js +243 -0
- package/dist/cyber-editor.cjs.js.map +1 -0
- package/dist/cyber-editor.es.js +614 -609
- package/dist/cyber-editor.es.js.map +1 -0
- package/dist/extensions/image/image-view.d.ts +4 -2
- package/dist/extensions/table/table-selector.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/utils/extensions.d.ts +1 -1
- package/package.json +34 -33
- package/dist/cyber-editor.umd.js +0 -243
- /package/dist/{assets/cyber.css → cyber-editor.css} +0 -0
package/dist/cyber-editor.umd.js
DELETED
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
(function(G,W){typeof exports=="object"&&typeof module<"u"?W(exports,require("react"),require("@tiptap/react"),require("antd"),require("@tiptap/extension-list-item"),require("@tiptap/extension-color"),require("@tiptap/extension-text-style"),require("@tiptap/starter-kit"),require("@tiptap/extension-highlight"),require("@tiptap/extension-underline"),require("@tiptap/extension-subscript"),require("@tiptap/extension-superscript"),require("@tiptap/extension-text-align"),require("@tiptap/extension-task-list"),require("@tiptap/extension-task-item"),require("@tiptap/extension-table"),require("@tiptap/extension-table-row"),require("@tiptap/extension-table-header"),require("@tiptap/extension-table-cell"),require("@tiptap/core"),require("@tiptap/extension-image"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@tiptap/react","antd","@tiptap/extension-list-item","@tiptap/extension-color","@tiptap/extension-text-style","@tiptap/starter-kit","@tiptap/extension-highlight","@tiptap/extension-underline","@tiptap/extension-subscript","@tiptap/extension-superscript","@tiptap/extension-text-align","@tiptap/extension-task-list","@tiptap/extension-task-item","@tiptap/extension-table","@tiptap/extension-table-row","@tiptap/extension-table-header","@tiptap/extension-table-cell","@tiptap/core","@tiptap/extension-image","react-dom"],W):(G=typeof globalThis<"u"?globalThis:G||self,W(G.CyberEditor={},G.React,G.TiptapReact,G.antd,G.TiptapListItem,G.TiptapColor,G.TiptapTextStyle,G.TiptapStarterKit,G.TiptapHighlight,G.TiptapUnderline,G.TiptapSubscript,G.TiptapSuperscript,G.TiptapTextAlign,G.TiptapTaskList,G.TiptapTaskItem,G.TiptapTable,G.TiptapTableRow,G.TiptapTableHeader,G.TiptapTableCell,G.TiptapCore,G.TiptapImage,G.ReactDOM))})(this,function(G,W,De,xe,Mr,zr,jt,Ar,Vr,Ir,$r,Hr,Lr,Wr,Yr,qr,Fr,Ur,Br,We,Xr,Mt){"use strict";var zt=document.createElement("style");zt.textContent=`.react-resizable{position:relative}.react-resizable-handle{position:absolute;width:20px;height:20px;background-repeat:no-repeat;background-origin:content-box;box-sizing:border-box;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+);background-position:bottom right;padding:0 3px 3px 0}.react-resizable-handle-sw{bottom:0;left:0;cursor:sw-resize;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;right:0;cursor:se-resize}.react-resizable-handle-nw{top:0;left:0;cursor:nw-resize;transform:rotate(180deg)}.react-resizable-handle-ne{top:0;right:0;cursor:ne-resize;transform:rotate(270deg)}.react-resizable-handle-w,.react-resizable-handle-e{top:50%;margin-top:-10px;cursor:ew-resize}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{left:50%;margin-left:-10px;cursor:ns-resize}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.fixed{position:fixed}.relative{position:relative}.bottom-20{bottom:5rem}.right-4{right:1rem}.z-40{z-index:40}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-3{margin-bottom:.75rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.block{display:block}.inline{display:inline}.flex{display:flex}.table-cell{display:table-cell}.grid{display:grid}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.max-h-0{max-height:0px}.max-h-96{max-height:24rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-64{width:16rem}.w-8{width:2rem}.w-\\[1px\\]{width:1px}.w-full{width:100%}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pt-4{padding-top:1rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.italic{font-style:italic}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ProseMirror:focus{outline:none!important;box-shadow:none!important}.is-active{background-color:#6c5ce7;color:#fff;padding:2px 12px;border-radius:6px;box-shadow:0 2px 4px #0003;transition:background-color .3s ease,color .3s ease;transform:scale(1.05)}.tiptap :first-child{margin-top:0}.tiptap strong{font-weight:700}.tiptap em{font-style:italic}.tiptap u{text-decoration:underline}.tiptap s{text-decoration:line-through}.tiptap sub{vertical-align:sub;font-size:.875rem}.tiptap sup{vertical-align:super;font-size:.875rem}.tiptap code{background-color:#f3e8ff;color:#581c87;border-radius:.25rem;padding:.125rem .375rem;font-size:.875rem;font-family:ui-monospace,monospace}.tiptap pre{background-color:#111827;color:#fff;border-radius:.5rem;padding:1rem;margin:1rem 0;font-family:ui-monospace,monospace;font-size:.875rem;overflow-x:auto}.tiptap pre code{background-color:transparent;color:inherit;padding:0}.tiptap h1,.tiptap h2,.tiptap h3,.tiptap h4,.tiptap h5,.tiptap h6{font-weight:700;line-height:1.25;margin-top:1.5rem;margin-bottom:1rem}.tiptap h1{font-size:1.875rem}.tiptap h2{font-size:1.5rem}.tiptap h3{font-size:1.25rem}.tiptap h4{font-size:1.125rem}.tiptap h5,.tiptap h6{font-size:1rem}.tiptap ul,.tiptap ol{padding-left:1.5rem;margin:1rem 0}.tiptap ul{list-style-type:disc}.tiptap ol{list-style-type:decimal}.tiptap li,.tiptap li p{margin:.25rem 0}.tiptap ul[data-type=taskList]{list-style:none;padding-left:.5rem}.tiptap ul[data-type=taskList] li{display:flex;gap:.5rem;align-items:flex-start}.tiptap ul[data-type=taskList] input[type=checkbox]{margin-top:.25rem}.tiptap blockquote{border-left:4px solid rgb(209 213 219);padding-left:1rem;margin:1rem 0;font-style:italic}.tiptap hr{border:none;border-top:2px solid rgb(229 231 235);margin:2rem 0}.tiptap table{width:100%;border-collapse:collapse;margin:1rem 0;border:1px solid rgb(229 231 235)}.tiptap th{background-color:#f9fafb;font-weight:600}.tiptap td,.tiptap th{padding:.5rem;text-align:left;border:1px solid rgb(229 231 235);min-width:100px}.tiptap .tableWrapper{position:relative;margin:1rem 0;overflow-x:auto}.tiptap .selectedCell{background-color:#eff6ff}.tiptap .column-resize-handle{position:absolute;top:0;right:0;width:4px;height:100%;background-color:#3b82f6;opacity:0;cursor:col-resize;transition:opacity .2s}.tiptap .column-resize-handle:hover{opacity:1}.tiptap .text-left{text-align:left}.tiptap .text-center{text-align:center}.tiptap .text-right{text-align:right}.tiptap .text-justify{text-align:justify}.ProseMirror{outline:none}.ProseMirror:focus{outline:none;box-shadow:0 0 0 3px #3b82f680}.editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;padding:.5rem;background-color:#fff;border-bottom:1px solid rgb(229 231 235)}.editor-toolbar button{padding:.5rem;border-radius:.375rem;transition:all .2s}.editor-toolbar button:hover,.editor-toolbar button.is-active{background-color:#dbeafe;color:#2563eb}.editor-toolbar button:disabled{opacity:.5;cursor:not-allowed}.editor-toolbar .divider{height:1.25rem;width:1px;background-color:#d1d5db;margin:0 .5rem}@media (max-width: 640px){.tiptap table{display:block;overflow-x:auto}.editor-toolbar{justify-content:center}}.animate-slide-up{animation:slide-up .3s ease-out}@keyframes slide-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.accordion-header:hover{opacity:.8;transition:all .2s ease}.hover\\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.hover\\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.hover\\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(zt);function Gr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var rt={exports:{}},Ye={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-jsx-dev-runtime.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var At;function Kr(){if(At)return Ye;At=1;var e=Symbol.for("react.fragment");return Ye.Fragment=e,Ye.jsxDEV=void 0,Ye}var qe={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-jsx-dev-runtime.development.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Vt;function Jr(){return Vt||(Vt=1,process.env.NODE_ENV!=="production"&&function(){var e=W,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),A=Symbol.iterator,V="@@iterator";function X(i){if(i===null||typeof i!="object")return null;var d=A&&i[A]||i[V];return typeof d=="function"?d:null}var Y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(i){{for(var d=arguments.length,h=new Array(d>1?d-1:0),S=1;S<d;S++)h[S-1]=arguments[S];w("error",i,h)}}function w(i,d,h){{var S=Y.ReactDebugCurrentFrame,q=S.getStackAddendum();q!==""&&(d+="%s",h=h.concat([q]));var K=h.map(function($){return String($)});K.unshift("Warning: "+d),Function.prototype.apply.call(console[i],console,K)}}var N=!1,c=!1,B=!1,R=!1,re=!1,pe;pe=Symbol.for("react.module.reference");function me(i){return!!(typeof i=="string"||typeof i=="function"||i===n||i===a||re||i===o||i===m||i===g||R||i===E||N||c||B||typeof i=="object"&&i!==null&&(i.$$typeof===O||i.$$typeof===y||i.$$typeof===s||i.$$typeof===u||i.$$typeof===p||i.$$typeof===pe||i.getModuleId!==void 0))}function ve(i,d,h){var S=i.displayName;if(S)return S;var q=d.displayName||d.name||"";return q!==""?h+"("+q+")":h}function Se(i){return i.displayName||"Context"}function ne(i){if(i==null)return null;if(typeof i.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case m:return"Suspense";case g:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case u:var d=i;return Se(d)+".Consumer";case s:var h=i;return Se(h._context)+".Provider";case p:return ve(i,i.render,"ForwardRef");case y:var S=i.displayName||null;return S!==null?S:ne(i.type)||"Memo";case O:{var q=i,K=q._payload,$=q._init;try{return ne($(K))}catch{return null}}}return null}var ee=Object.assign,be=0,le,fe,Ee,ke,f,x,P;function T(){}T.__reactDisabledLog=!0;function k(){{if(be===0){le=console.log,fe=console.info,Ee=console.warn,ke=console.error,f=console.group,x=console.groupCollapsed,P=console.groupEnd;var i={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:i,log:i,warn:i,error:i,group:i,groupCollapsed:i,groupEnd:i})}be++}}function I(){{if(be--,be===0){var i={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ee({},i,{value:le}),info:ee({},i,{value:fe}),warn:ee({},i,{value:Ee}),error:ee({},i,{value:ke}),group:ee({},i,{value:f}),groupCollapsed:ee({},i,{value:x}),groupEnd:ee({},i,{value:P})})}be<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var _=Y.ReactCurrentDispatcher,D;function j(i,d,h){{if(D===void 0)try{throw Error()}catch(q){var S=q.stack.trim().match(/\n( *(at )?)/);D=S&&S[1]||""}return`
|
|
19
|
-
`+D+i}}var L=!1,M;{var ie=typeof WeakMap=="function"?WeakMap:Map;M=new ie}function b(i,d){if(!i||L)return"";{var h=M.get(i);if(h!==void 0)return h}var S;L=!0;var q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var K;K=_.current,_.current=null,k();try{if(d){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(ce){S=ce}Reflect.construct(i,[],$)}else{try{$.call()}catch(ce){S=ce}i.call($.prototype)}}else{try{throw Error()}catch(ce){S=ce}i()}}catch(ce){if(ce&&S&&typeof ce.stack=="string"){for(var z=ce.stack.split(`
|
|
20
|
-
`),ae=S.stack.split(`
|
|
21
|
-
`),Z=z.length-1,Q=ae.length-1;Z>=1&&Q>=0&&z[Z]!==ae[Q];)Q--;for(;Z>=1&&Q>=0;Z--,Q--)if(z[Z]!==ae[Q]){if(Z!==1||Q!==1)do if(Z--,Q--,Q<0||z[Z]!==ae[Q]){var ge=`
|
|
22
|
-
`+z[Z].replace(" at new "," at ");return i.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",i.displayName)),typeof i=="function"&&M.set(i,ge),ge}while(Z>=1&&Q>=0);break}}}finally{L=!1,_.current=K,I(),Error.prepareStackTrace=q}var ze=i?i.displayName||i.name:"",Re=ze?j(ze):"";return typeof i=="function"&&M.set(i,Re),Re}function he(i,d,h){return b(i,!1)}function je(i){var d=i.prototype;return!!(d&&d.isReactComponent)}function Te(i,d,h){if(i==null)return"";if(typeof i=="function")return b(i,je(i));if(typeof i=="string")return j(i);switch(i){case m:return j("Suspense");case g:return j("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case p:return he(i.render);case y:return Te(i.type,d,h);case O:{var S=i,q=S._payload,K=S._init;try{return Te(K(q),d,h)}catch{}}}return""}var He=Object.prototype.hasOwnProperty,Nr={},Er=Y.ReactDebugCurrentFrame;function tt(i){if(i){var d=i._owner,h=Te(i.type,i._source,d?d.type:null);Er.setExtraStackFrame(h)}else Er.setExtraStackFrame(null)}function co(i,d,h,S,q){{var K=Function.call.bind(He);for(var $ in i)if(K(i,$)){var z=void 0;try{if(typeof i[$]!="function"){var ae=Error((S||"React class")+": "+h+" type `"+$+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[$]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ae.name="Invariant Violation",ae}z=i[$](d,$,S,h,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Z){z=Z}z&&!(z instanceof Error)&&(tt(q),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",S||"React class",h,$,typeof z),tt(null)),z instanceof Error&&!(z.message in Nr)&&(Nr[z.message]=!0,tt(q),v("Failed %s type: %s",h,z.message),tt(null))}}}var uo=Array.isArray;function _t(i){return uo(i)}function fo(i){{var d=typeof Symbol=="function"&&Symbol.toStringTag,h=d&&i[Symbol.toStringTag]||i.constructor.name||"Object";return h}}function po(i){try{return Sr(i),!1}catch{return!0}}function Sr(i){return""+i}function kr(i){if(po(i))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",fo(i)),Sr(i)}var Le=Y.ReactCurrentOwner,mo={key:!0,ref:!0,__self:!0,__source:!0},Cr,_r,Dt;Dt={};function bo(i){if(He.call(i,"ref")){var d=Object.getOwnPropertyDescriptor(i,"ref").get;if(d&&d.isReactWarning)return!1}return i.ref!==void 0}function ho(i){if(He.call(i,"key")){var d=Object.getOwnPropertyDescriptor(i,"key").get;if(d&&d.isReactWarning)return!1}return i.key!==void 0}function go(i,d){if(typeof i.ref=="string"&&Le.current&&d&&Le.current.stateNode!==d){var h=ne(Le.current.type);Dt[h]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',ne(Le.current.type),i.ref),Dt[h]=!0)}}function yo(i,d){{var h=function(){Cr||(Cr=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};h.isReactWarning=!0,Object.defineProperty(i,"key",{get:h,configurable:!0})}}function vo(i,d){{var h=function(){_r||(_r=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};h.isReactWarning=!0,Object.defineProperty(i,"ref",{get:h,configurable:!0})}}var xo=function(i,d,h,S,q,K,$){var z={$$typeof:t,type:i,key:d,ref:h,props:$,_owner:K};return z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(z,"_self",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.defineProperty(z,"_source",{configurable:!1,enumerable:!1,writable:!1,value:q}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z};function wo(i,d,h,S,q){{var K,$={},z=null,ae=null;h!==void 0&&(kr(h),z=""+h),ho(d)&&(kr(d.key),z=""+d.key),bo(d)&&(ae=d.ref,go(d,q));for(K in d)He.call(d,K)&&!mo.hasOwnProperty(K)&&($[K]=d[K]);if(i&&i.defaultProps){var Z=i.defaultProps;for(K in Z)$[K]===void 0&&($[K]=Z[K])}if(z||ae){var Q=typeof i=="function"?i.displayName||i.name||"Unknown":i;z&&yo($,Q),ae&&vo($,Q)}return xo(i,z,ae,q,S,Le.current,$)}}var Ot=Y.ReactCurrentOwner,Dr=Y.ReactDebugCurrentFrame;function Me(i){if(i){var d=i._owner,h=Te(i.type,i._source,d?d.type:null);Dr.setExtraStackFrame(h)}else Dr.setExtraStackFrame(null)}var Tt;Tt=!1;function Rt(i){return typeof i=="object"&&i!==null&&i.$$typeof===t}function Or(){{if(Ot.current){var i=ne(Ot.current.type);if(i)return`
|
|
23
|
-
|
|
24
|
-
Check the render method of \``+i+"`."}return""}}function No(i){{if(i!==void 0){var d=i.fileName.replace(/^.*[\\\/]/,""),h=i.lineNumber;return`
|
|
25
|
-
|
|
26
|
-
Check your code at `+d+":"+h+"."}return""}}var Tr={};function Eo(i){{var d=Or();if(!d){var h=typeof i=="string"?i:i.displayName||i.name;h&&(d=`
|
|
27
|
-
|
|
28
|
-
Check the top-level render call using <`+h+">.")}return d}}function Rr(i,d){{if(!i._store||i._store.validated||i.key!=null)return;i._store.validated=!0;var h=Eo(d);if(Tr[h])return;Tr[h]=!0;var S="";i&&i._owner&&i._owner!==Ot.current&&(S=" It was passed a child from "+ne(i._owner.type)+"."),Me(i),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',h,S),Me(null)}}function Pr(i,d){{if(typeof i!="object")return;if(_t(i))for(var h=0;h<i.length;h++){var S=i[h];Rt(S)&&Rr(S,d)}else if(Rt(i))i._store&&(i._store.validated=!0);else if(i){var q=X(i);if(typeof q=="function"&&q!==i.entries)for(var K=q.call(i),$;!($=K.next()).done;)Rt($.value)&&Rr($.value,d)}}}function So(i){{var d=i.type;if(d==null||typeof d=="string")return;var h;if(typeof d=="function")h=d.propTypes;else if(typeof d=="object"&&(d.$$typeof===p||d.$$typeof===y))h=d.propTypes;else return;if(h){var S=ne(d);co(h,i.props,"prop",S,i)}else if(d.PropTypes!==void 0&&!Tt){Tt=!0;var q=ne(d);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",q||"Unknown")}typeof d.getDefaultProps=="function"&&!d.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ko(i){{for(var d=Object.keys(i.props),h=0;h<d.length;h++){var S=d[h];if(S!=="children"&&S!=="key"){Me(i),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",S),Me(null);break}}i.ref!==null&&(Me(i),v("Invalid attribute `ref` supplied to `React.Fragment`."),Me(null))}}var jr={};function Co(i,d,h,S,q,K){{var $=me(i);if(!$){var z="";(i===void 0||typeof i=="object"&&i!==null&&Object.keys(i).length===0)&&(z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ae=No(q);ae?z+=ae:z+=Or();var Z;i===null?Z="null":_t(i)?Z="array":i!==void 0&&i.$$typeof===t?(Z="<"+(ne(i.type)||"Unknown")+" />",z=" Did you accidentally export a JSX literal instead of a component?"):Z=typeof i,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Z,z)}var Q=wo(i,d,h,q,K);if(Q==null)return Q;if($){var ge=d.children;if(ge!==void 0)if(S)if(_t(ge)){for(var ze=0;ze<ge.length;ze++)Pr(ge[ze],i);Object.freeze&&Object.freeze(ge)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Pr(ge,i)}if(He.call(d,"key")){var Re=ne(i),ce=Object.keys(d).filter(function(Oo){return Oo!=="key"}),Pt=ce.length>0?"{key: someKey, "+ce.join(": ..., ")+": ...}":"{key: someKey}";if(!jr[Re+Pt]){var Do=ce.length>0?"{"+ce.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s {...props} />
|
|
31
|
-
React keys must be passed directly to JSX without using spread:
|
|
32
|
-
let props = %s;
|
|
33
|
-
<%s key={someKey} {...props} />`,Pt,Re,Do,Re),jr[Re+Pt]=!0}}return i===n?ko(Q):So(Q),Q}}var _o=Co;qe.Fragment=n,qe.jsxDEV=_o}()),qe}process.env.NODE_ENV==="production"?rt.exports=Kr():rt.exports=Jr();var l=rt.exports;/**
|
|
34
|
-
* @license lucide-react v0.474.0 - ISC
|
|
35
|
-
*
|
|
36
|
-
* This source code is licensed under the ISC license.
|
|
37
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/const Zr=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),It=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
39
|
-
* @license lucide-react v0.474.0 - ISC
|
|
40
|
-
*
|
|
41
|
-
* This source code is licensed under the ISC license.
|
|
42
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/var Qr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
44
|
-
* @license lucide-react v0.474.0 - ISC
|
|
45
|
-
*
|
|
46
|
-
* This source code is licensed under the ISC license.
|
|
47
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/const en=W.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:s,...u},p)=>W.createElement("svg",{ref:p,...Qr,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:It("lucide",o),...u},[...s.map(([m,g])=>W.createElement(m,g)),...Array.isArray(a)?a:[a]]));/**
|
|
49
|
-
* @license lucide-react v0.474.0 - ISC
|
|
50
|
-
*
|
|
51
|
-
* This source code is licensed under the ISC license.
|
|
52
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/const H=(e,t)=>{const r=W.forwardRef(({className:n,...o},a)=>W.createElement(en,{ref:a,iconNode:t,className:It(`lucide-${Zr(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
54
|
-
* @license lucide-react v0.474.0 - ISC
|
|
55
|
-
*
|
|
56
|
-
* This source code is licensed under the ISC license.
|
|
57
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/const tn=H("AlignCenter",[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/**
|
|
59
|
-
* @license lucide-react v0.474.0 - ISC
|
|
60
|
-
*
|
|
61
|
-
* This source code is licensed under the ISC license.
|
|
62
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/const rn=H("AlignJustify",[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]]);/**
|
|
64
|
-
* @license lucide-react v0.474.0 - ISC
|
|
65
|
-
*
|
|
66
|
-
* This source code is licensed under the ISC license.
|
|
67
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/const nn=H("AlignLeft",[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/**
|
|
69
|
-
* @license lucide-react v0.474.0 - ISC
|
|
70
|
-
*
|
|
71
|
-
* This source code is licensed under the ISC license.
|
|
72
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/const on=H("AlignRight",[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/**
|
|
74
|
-
* @license lucide-react v0.474.0 - ISC
|
|
75
|
-
*
|
|
76
|
-
* This source code is licensed under the ISC license.
|
|
77
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const an=H("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
|
|
79
|
-
* @license lucide-react v0.474.0 - ISC
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the ISC license.
|
|
82
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const sn=H("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
84
|
-
* @license lucide-react v0.474.0 - ISC
|
|
85
|
-
*
|
|
86
|
-
* This source code is licensed under the ISC license.
|
|
87
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const ln=H("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
89
|
-
* @license lucide-react v0.474.0 - ISC
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the ISC license.
|
|
92
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const cn=H("CornerDownRight",[["polyline",{points:"15 10 20 15 15 20",key:"1q7qjw"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]]);/**
|
|
94
|
-
* @license lucide-react v0.474.0 - ISC
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the ISC license.
|
|
97
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const nt=H("Heading1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]);/**
|
|
99
|
-
* @license lucide-react v0.474.0 - ISC
|
|
100
|
-
*
|
|
101
|
-
* This source code is licensed under the ISC license.
|
|
102
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const $t=H("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]);/**
|
|
104
|
-
* @license lucide-react v0.474.0 - ISC
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the ISC license.
|
|
107
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const Ht=H("Heading3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);/**
|
|
109
|
-
* @license lucide-react v0.474.0 - ISC
|
|
110
|
-
*
|
|
111
|
-
* This source code is licensed under the ISC license.
|
|
112
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const Lt=H("Heading4",[["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17 10v3a1 1 0 0 0 1 1h3",key:"tj5zdr"}],["path",{d:"M21 10v8",key:"1kdml4"}],["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}]]);/**
|
|
114
|
-
* @license lucide-react v0.474.0 - ISC
|
|
115
|
-
*
|
|
116
|
-
* This source code is licensed under the ISC license.
|
|
117
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const Wt=H("Heading5",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17 13v-3h4",key:"1nvgqp"}],["path",{d:"M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17",key:"2nebdn"}]]);/**
|
|
119
|
-
* @license lucide-react v0.474.0 - ISC
|
|
120
|
-
*
|
|
121
|
-
* This source code is licensed under the ISC license.
|
|
122
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const Yt=H("Heading6",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["circle",{cx:"19",cy:"16",r:"2",key:"15mx69"}],["path",{d:"M20 10c-2 2-3 3.5-3 6",key:"f35dl0"}]]);/**
|
|
124
|
-
* @license lucide-react v0.474.0 - ISC
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the ISC license.
|
|
127
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const un=H("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
129
|
-
* @license lucide-react v0.474.0 - ISC
|
|
130
|
-
*
|
|
131
|
-
* This source code is licensed under the ISC license.
|
|
132
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
-
*/const dn=H("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
|
|
134
|
-
* @license lucide-react v0.474.0 - ISC
|
|
135
|
-
*
|
|
136
|
-
* This source code is licensed under the ISC license.
|
|
137
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const fn=H("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
139
|
-
* @license lucide-react v0.474.0 - ISC
|
|
140
|
-
*
|
|
141
|
-
* This source code is licensed under the ISC license.
|
|
142
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/const pn=H("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
|
144
|
-
* @license lucide-react v0.474.0 - ISC
|
|
145
|
-
*
|
|
146
|
-
* This source code is licensed under the ISC license.
|
|
147
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/const mn=H("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
149
|
-
* @license lucide-react v0.474.0 - ISC
|
|
150
|
-
*
|
|
151
|
-
* This source code is licensed under the ISC license.
|
|
152
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/const bn=H("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
154
|
-
* @license lucide-react v0.474.0 - ISC
|
|
155
|
-
*
|
|
156
|
-
* This source code is licensed under the ISC license.
|
|
157
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const hn=H("PaintBucket",[["path",{d:"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z",key:"irua1i"}],["path",{d:"m5 2 5 5",key:"1lls2c"}],["path",{d:"M2 13h15",key:"1hkzvu"}],["path",{d:"M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z",key:"xk76lq"}]]);/**
|
|
159
|
-
* @license lucide-react v0.474.0 - ISC
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the ISC license.
|
|
162
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/const gn=H("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
164
|
-
* @license lucide-react v0.474.0 - ISC
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the ISC license.
|
|
167
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/const yn=H("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
|
|
169
|
-
* @license lucide-react v0.474.0 - ISC
|
|
170
|
-
*
|
|
171
|
-
* This source code is licensed under the ISC license.
|
|
172
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/const vn=H("Redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);/**
|
|
174
|
-
* @license lucide-react v0.474.0 - ISC
|
|
175
|
-
*
|
|
176
|
-
* This source code is licensed under the ISC license.
|
|
177
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
-
*/const xn=H("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
179
|
-
* @license lucide-react v0.474.0 - ISC
|
|
180
|
-
*
|
|
181
|
-
* This source code is licensed under the ISC license.
|
|
182
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
-
*/const wn=H("Strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/**
|
|
184
|
-
* @license lucide-react v0.474.0 - ISC
|
|
185
|
-
*
|
|
186
|
-
* This source code is licensed under the ISC license.
|
|
187
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/const Nn=H("Subscript",[["path",{d:"m4 5 8 8",key:"1eunvl"}],["path",{d:"m12 5-8 8",key:"1ah0jp"}],["path",{d:"M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07",key:"e8ta8j"}]]);/**
|
|
189
|
-
* @license lucide-react v0.474.0 - ISC
|
|
190
|
-
*
|
|
191
|
-
* This source code is licensed under the ISC license.
|
|
192
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/const En=H("Superscript",[["path",{d:"m4 19 8-8",key:"hr47gm"}],["path",{d:"m12 19-8-8",key:"1dhhmo"}],["path",{d:"M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06",key:"1dfcux"}]]);/**
|
|
194
|
-
* @license lucide-react v0.474.0 - ISC
|
|
195
|
-
*
|
|
196
|
-
* This source code is licensed under the ISC license.
|
|
197
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/const Sn=H("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
|
|
199
|
-
* @license lucide-react v0.474.0 - ISC
|
|
200
|
-
*
|
|
201
|
-
* This source code is licensed under the ISC license.
|
|
202
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
-
*/const kn=H("TextCursor",[["path",{d:"M17 22h-1a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h1",key:"uvaxm9"}],["path",{d:"M7 22h1a4 4 0 0 0 4-4v-1",key:"11xy8d"}],["path",{d:"M7 2h1a4 4 0 0 1 4 4v1",key:"1uw06m"}]]);/**
|
|
204
|
-
* @license lucide-react v0.474.0 - ISC
|
|
205
|
-
*
|
|
206
|
-
* This source code is licensed under the ISC license.
|
|
207
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
-
*/const Cn=H("Underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/**
|
|
209
|
-
* @license lucide-react v0.474.0 - ISC
|
|
210
|
-
*
|
|
211
|
-
* This source code is licensed under the ISC license.
|
|
212
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
-
*/const _n=H("Undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);/**
|
|
214
|
-
* @license lucide-react v0.474.0 - ISC
|
|
215
|
-
*
|
|
216
|
-
* This source code is licensed under the ISC license.
|
|
217
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
-
*/const Dn=H("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function On({editor:e}){const[t,r]=W.useState(!1);return l.jsxDEV("div",{className:"relative",children:[l.jsxDEV("button",{type:"button",className:`p-1 text-black transition-all duration-300 rounded-md shadow-lg hover:bg-blue-100 hover:text-blue-600 ${t?"bg-blue-100 text-blue-600":""}`,onClick:n=>{n.preventDefault(),n.stopPropagation(),r(!t)},children:t?l.jsxDEV(Dn,{size:24},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/cyber-extensions.tsx",lineNumber:20,columnNumber:25},this):l.jsxDEV(fn,{size:24},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/cyber-extensions.tsx",lineNumber:20,columnNumber:43},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/cyber-extensions.tsx",lineNumber:9,columnNumber:13},this),t&&l.jsxDEV("div",{className:"fixed z-40 w-64 p-4 bg-white border border-gray-200 rounded-lg shadow-xl bottom-20 right-4 animate-slide-up",children:l.jsxDEV("div",{className:"space-y-2",children:[l.jsxDEV("h3",{className:"mb-3 font-bold text-center text-gray-700",children:"Cyber Extensions"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/cyber-extensions.tsx",lineNumber:26,columnNumber:25},this),l.jsxDEV("button",{type:"button",onClick:()=>{e.chain().focus().insertContent({type:"accordion",content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()},className:"flex items-center justify-center w-full gap-2 px-3 py-1 text-blue-600 duration-300 rounded-md bg-blue-50 hover:bg-blue-100 hover:text-blue-700",children:[l.jsxDEV(gn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/cyber-extensions.tsx",lineNumber:54,columnNumber:29},this)," Accordion"]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/cyber-extensions.tsx",lineNumber:30,columnNumber:25},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/cyber-extensions.tsx",lineNumber:25,columnNumber:21},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/cyber-extensions.tsx",lineNumber:24,columnNumber:17},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/cyber-extensions.tsx",lineNumber:8,columnNumber:9},this)}const Fe=({value:e,onChange:t})=>l.jsxDEV(xe.ColorPicker,{value:e,onChange:t,presets:[{label:"Recommended",colors:["#1677ff","#52c41a","#faad14","#ff4d4f","#722ed1","#13c2c2","#ffffff","#000000"]}]},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/components/color-picker.tsx",lineNumber:12,columnNumber:9},void 0),Tn=({editor:e})=>{const[t,r]=W.useState("#1677ff"),[n,o]=W.useState("#ffffff"),a=p=>{const m=p.toHexString();r(m),e.chain().focus().setColor(m).run()},s=p=>{const m=p.toHexString();o(m),e.chain().focus().setHighlight({color:m}).run()},u=p=>{p.preventDefault()};return l.jsxDEV("div",{className:"flex items-center gap-4",children:[l.jsxDEV(xe.Tooltip,{title:"Text Color",children:l.jsxDEV("div",{className:"flex items-center gap-2",onMouseDown:u,children:[l.jsxDEV(kn,{size:20,color:"black"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/color/color-picker.tsx",lineNumber:33,columnNumber:21},void 0),l.jsxDEV(Fe,{value:t,onChange:a},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/color/color-picker.tsx",lineNumber:34,columnNumber:21},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/color/color-picker.tsx",lineNumber:32,columnNumber:17},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/color/color-picker.tsx",lineNumber:31,columnNumber:13},void 0),l.jsxDEV(xe.Tooltip,{title:"Highlight Color",children:l.jsxDEV("div",{className:"flex items-center gap-2",onMouseDown:u,children:[l.jsxDEV(hn,{size:20,color:"black"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/color/color-picker.tsx",lineNumber:41,columnNumber:21},void 0),l.jsxDEV(Fe,{value:n,onChange:s},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/color/color-picker.tsx",lineNumber:42,columnNumber:21},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/color/color-picker.tsx",lineNumber:40,columnNumber:17},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/color/color-picker.tsx",lineNumber:39,columnNumber:13},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/color/color-picker.tsx",lineNumber:29,columnNumber:9},void 0)},Rn=({editor:e})=>{if(!e)return null;const t=()=>{for(let n=1;n<=6;n++)if(e.isActive("heading",{level:n}))switch(n){case 1:return l.jsxDEV(nt,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/heading/heading-dropdown.tsx",lineNumber:15,columnNumber:36},void 0);case 2:return l.jsxDEV($t,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/heading/heading-dropdown.tsx",lineNumber:16,columnNumber:36},void 0);case 3:return l.jsxDEV(Ht,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/heading/heading-dropdown.tsx",lineNumber:17,columnNumber:36},void 0);case 4:return l.jsxDEV(Lt,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/heading/heading-dropdown.tsx",lineNumber:18,columnNumber:36},void 0);case 5:return l.jsxDEV(Wt,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/heading/heading-dropdown.tsx",lineNumber:19,columnNumber:36},void 0);case 6:return l.jsxDEV(Yt,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/heading/heading-dropdown.tsx",lineNumber:20,columnNumber:36},void 0)}return l.jsxDEV(nt,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/heading/heading-dropdown.tsx",lineNumber:24,columnNumber:16},void 0)},r=[...Array.from({length:6},(n,o)=>({key:`${o+1}`,label:l.jsxDEV("div",{className:"flex items-center gap-2",onClick:()=>e.chain().focus().toggleHeading({level:o+1}).run(),children:[W.createElement([nt,$t,Ht,Lt,Wt,Yt][o],{size:16}),l.jsxDEV("span",{children:["Heading ",o+1]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/heading/heading-dropdown.tsx",lineNumber:33,columnNumber:21},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/heading/heading-dropdown.tsx",lineNumber:31,columnNumber:17},void 0),className:e.isActive("heading",{level:o+1})?"ant-dropdown-menu-item-active":""}))];return l.jsxDEV(xe.Dropdown,{menu:{items:r},trigger:["hover"],placement:"bottomLeft",children:l.jsxDEV("button",{className:"flex items-center gap-1 p-2 rounded-md hover:bg-blue-100 hover:text-blue-600",children:t()},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/heading/heading-dropdown.tsx",lineNumber:42,columnNumber:13},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/heading/heading-dropdown.tsx",lineNumber:41,columnNumber:9},void 0)},Pn=8,jn=8,Mn=({editor:e,buttonClass:t,activeClass:r})=>{const[n,o]=W.useState({rows:0,cols:0}),[a,s]=W.useState(!1),u=(p,m)=>{e.chain().focus().insertTable({rows:p,cols:m,withHeaderRow:!0}).run(),s(!1)};return l.jsxDEV(xe.Dropdown,{open:a,onOpenChange:s,trigger:["hover"],overlay:l.jsxDEV("div",{className:"w-56 p-4 bg-white border border-gray-300 rounded-lg shadow-xl",children:[l.jsxDEV("div",{className:"grid grid-cols-8 gap-1",children:Array.from({length:Pn}).map((p,m)=>Array.from({length:jn}).map((g,y)=>{const O=m<n.rows&&y<n.cols;return l.jsxDEV("div",{className:`w-5 h-5 border rounded-sm cursor-pointer transition-all duration-200 ${O?"bg-blue-400 border-white scale-110":"bg-gray-200 hover:bg-gray-300"}`,onMouseEnter:()=>o({rows:m+1,cols:y+1}),onClick:()=>u(m+1,y+1)},`${m}-${y}`,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/table/table-selector.tsx",lineNumber:40,columnNumber:37},void 0)}))},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/table/table-selector.tsx",lineNumber:35,columnNumber:21},void 0),l.jsxDEV("div",{className:"mt-3 text-sm font-medium text-center text-gray-700",children:n.rows>0&&n.cols>0?`${n.rows} × ${n.cols} Table`:"Insert Table"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/table/table-selector.tsx",lineNumber:53,columnNumber:21},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/table/table-selector.tsx",lineNumber:34,columnNumber:17},void 0),children:l.jsxDEV("button",{className:`${t} ${a?r:""} transition-all`,children:l.jsxDEV(Sn,{className:"w-5 h-5"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/table/table-selector.tsx",lineNumber:65,columnNumber:17},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/table/table-selector.tsx",lineNumber:61,columnNumber:13},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/table/table-selector.tsx",lineNumber:29,columnNumber:9},void 0)};function zn({editor:e}){if(!e)return null;const t="p-2 rounded-md transition-all duration-200 hover:bg-blue-100 hover:text-blue-600",r="bg-blue-100 text-blue-600",n=(o,a,s,u,p)=>l.jsxDEV(xe.Tooltip,{title:p,children:l.jsxDEV("button",{type:"button",onClick:a,disabled:u,className:`
|
|
219
|
-
${t}
|
|
220
|
-
${s?r:""}
|
|
221
|
-
${u?"opacity-50 cursor-not-allowed":""}
|
|
222
|
-
`,children:o},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:32,columnNumber:13},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:31,columnNumber:9},this);return l.jsxDEV("div",{className:"flex flex-wrap items-center gap-2 p-2 border-b border-gray-200 rounded-t-lg bg-gray-50",children:[l.jsxDEV("div",{className:"flex items-center gap-1",children:[n(l.jsxDEV(an,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:52,columnNumber:21},this),()=>e.chain().focus().toggleBold().run(),e.isActive("bold"),!1,"Bold"),n(l.jsxDEV(dn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:59,columnNumber:21},this),()=>e.chain().focus().toggleItalic().run(),e.isActive("italic"),!1,"Italic"),n(l.jsxDEV(Cn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:66,columnNumber:21},this),()=>e.chain().focus().toggleUnderline().run(),e.isActive("underline"),!1,"Underline"),n(l.jsxDEV(wn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:73,columnNumber:21},this),()=>e.chain().focus().toggleStrike().run(),e.isActive("strike"),!1,"Strikethrough"),n(l.jsxDEV(ln,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:80,columnNumber:21},this),()=>e.chain().focus().toggleCode().run(),e.isActive("code"),!1,"Code"),n(l.jsxDEV(Nn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:87,columnNumber:21},this),()=>e.chain().focus().toggleSubscript().run(),e.isActive("subscript"),!1,"Subscript"),n(l.jsxDEV(En,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:94,columnNumber:21},this),()=>e.chain().focus().toggleSuperscript().run(),e.isActive("superscript"),!1,"Superscript")]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:50,columnNumber:13},this),l.jsxDEV("div",{className:"h-5 w-[1px] bg-gray-300 mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:102,columnNumber:13},this),l.jsxDEV(Rn,{editor:e},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:105,columnNumber:13},this),l.jsxDEV("div",{className:"h-5 w-[1px] bg-gray-300 mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:107,columnNumber:13},this),l.jsxDEV("div",{className:"flex items-center gap-1",children:[n(l.jsxDEV(nn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:112,columnNumber:21},this),()=>e.chain().focus().setTextAlign("left").run(),e.isActive({textAlign:"left"}),!1,"Align Left"),n(l.jsxDEV(tn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:119,columnNumber:21},this),()=>e.chain().focus().setTextAlign("center").run(),e.isActive({textAlign:"center"}),!1,"Align Center"),n(l.jsxDEV(on,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:124,columnNumber:21},this),()=>e.chain().focus().setTextAlign("right").run(),e.isActive({textAlign:"right"}),!1,"Align Right"),n(l.jsxDEV(rn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:129,columnNumber:21},this),()=>e.chain().focus().setTextAlign("justify").run(),e.isActive({textAlign:"justify"}),!1,"Align Justify")]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:110,columnNumber:13},this),l.jsxDEV("div",{className:"h-5 w-[1px] bg-gray-300 mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:135,columnNumber:13},this),l.jsxDEV("div",{className:"flex items-center gap-1",children:[n(l.jsxDEV(mn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:140,columnNumber:21},this),()=>e.chain().focus().toggleBulletList().run(),e.isActive("bulletList"),!1,"Bullet List"),n(l.jsxDEV(pn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:145,columnNumber:21},this),()=>e.chain().focus().toggleOrderedList().run(),e.isActive("orderedList"),!1,"Ordered List"),n(l.jsxDEV(xn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:150,columnNumber:21},this),()=>e.chain().focus().toggleTaskList().run(),e.isActive("taskList"),!1,"Task List")]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:138,columnNumber:13},this),l.jsxDEV("div",{className:"h-5 w-[1px] bg-gray-300 mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:156,columnNumber:13},this),l.jsxDEV("div",{className:"flex items-center gap-1",children:[n(l.jsxDEV(yn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:161,columnNumber:21},this),()=>e.chain().focus().toggleBlockquote().run(),e.isActive("blockquote"),!1,"Blockquote"),l.jsxDEV(Mn,{editor:e,buttonClass:t,activeClass:r},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:165,columnNumber:17},this),n(l.jsxDEV(bn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:167,columnNumber:21},this),()=>e.chain().focus().setHorizontalRule().run(),!1,!1,"Horizontal Rule"),n(l.jsxDEV(cn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:171,columnNumber:21},this),()=>e.chain().focus().setHardBreak().run(),!1,!1,"Line Break")]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:159,columnNumber:13},this),l.jsxDEV("div",{className:"h-5 w-[1px] bg-gray-300 mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:176,columnNumber:13},this),l.jsxDEV("div",{className:"flex items-center gap-1",children:[n(l.jsxDEV(_n,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:181,columnNumber:21},this),()=>e.chain().focus().undo().run(),!1,!e.can().chain().focus().undo().run()),n(l.jsxDEV(vn,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:187,columnNumber:21},this),()=>e.chain().focus().redo().run(),!1,!e.can().chain().focus().redo().run())]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:179,columnNumber:13},this),l.jsxDEV("div",{className:"h-5 w-[1px] bg-gray-300 mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:194,columnNumber:13},this),n(l.jsxDEV(un,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:197,columnNumber:17},this),()=>{const o=prompt("Enter the image URL");o&&e.chain().focus().insertContent({type:"image",attrs:{src:o,width:300,height:300,marginLeft:0,marginRight:0}}).run()},!1,!1,"Insert Image"),l.jsxDEV("div",{className:"h-5 w-[1px] bg-gray-300 mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:218,columnNumber:13},this),l.jsxDEV(Tn,{editor:e},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:221,columnNumber:13},this),l.jsxDEV("div",{className:"h-5 w-[1px] bg-gray-300 mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:223,columnNumber:13},this),l.jsxDEV(On,{editor:e},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:224,columnNumber:13},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/tool-bar/tool-bar-tiptap.tsx",lineNumber:48,columnNumber:9},this)}const qt=({title:e,childrenContent:t,editable:r,childrenEdit:n})=>{const[o,a]=W.useState(!1),s=r?l.jsxDEV(xe.Menu,{children:l.jsxDEV(xe.Menu.Item,{onClick:()=>a(!0),children:"Edit"},"edit",!1,{fileName:"E:/CyberSkill/cyber-editor/src/components/modal-edit.tsx",lineNumber:19,columnNumber:13},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/components/modal-edit.tsx",lineNumber:18,columnNumber:9},void 0):null;return l.jsxDEV("div",{children:[r&&s?l.jsxDEV(xe.Dropdown,{overlay:s,trigger:["contextMenu"],children:t},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/components/modal-edit.tsx",lineNumber:28,columnNumber:17},void 0):t,l.jsxDEV(xe.Modal,{title:`Edit ${e}`,open:o,onOk:()=>a(!1),onCancel:()=>a(!1),children:n},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/components/modal-edit.tsx",lineNumber:35,columnNumber:13},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/components/modal-edit.tsx",lineNumber:26,columnNumber:9},void 0)},An=({node:e,editor:t})=>{const[r,n]=W.useState(!1),[o,a]=W.useState(e.attrs.bgColor||"#f3f4f6"),[s,u]=W.useState(e.attrs.titleColor||"#000000"),p=y=>{y.preventDefault()},m=y=>{a(y.toHexString())},g=y=>{u(y.toHexString())};return l.jsxDEV(De.NodeViewWrapper,{className:"accordion-wrapper",children:l.jsxDEV(qt,{title:"Accordion",childrenContent:l.jsxDEV("div",{className:"my-4 transition-all duration-300 border rounded-lg shadow-sm",onContextMenu:p,children:[l.jsxDEV("div",{className:"flex items-center justify-between p-4 transition-colors accordion-header",style:{backgroundColor:o},onClick:()=>n(!r),children:[l.jsxDEV("input",{className:"w-full text-lg font-medium bg-transparent border-none outline-none",style:{color:s},defaultValue:e.attrs.title||"Accordion Title",disabled:!t.isEditable,suppressContentEditableWarning:!0,contentEditable:!0,placeholder:"Accordion title"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:38,columnNumber:29},void 0),l.jsxDEV(sn,{className:`transition-transform duration-300 ${r?"rotate-180":""}`,size:20},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:47,columnNumber:29},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:33,columnNumber:25},void 0),l.jsxDEV("div",{className:`overflow-hidden duration-300 ease-in-out ${r?"max-h-96 opacity-100":"max-h-0 opacity-0"} `,children:l.jsxDEV("div",{className:"p-4 border-t",children:l.jsxDEV(De.NodeViewContent,{contentEditable:t.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:57,columnNumber:33},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:56,columnNumber:29},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:53,columnNumber:25},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:29,columnNumber:21},void 0),editable:t.isEditable,childrenEdit:l.jsxDEV("div",{className:"px-6 py-4 space-y-6 rounded-lg bg-gray-50",children:[l.jsxDEV("div",{className:"grid grid-cols-1 gap-6",children:[l.jsxDEV("div",{className:"flex flex-col space-y-2",children:[l.jsxDEV("label",{className:"font-medium text-gray-700",children:"Background Color"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:69,columnNumber:33},void 0),l.jsxDEV("div",{className:"flex items-center space-x-3",children:[l.jsxDEV("div",{className:"w-8 h-8 border rounded shadow",style:{backgroundColor:o}},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:71,columnNumber:37},void 0),l.jsxDEV(Fe,{value:o,onChange:m},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:75,columnNumber:37},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:70,columnNumber:33},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:68,columnNumber:29},void 0),l.jsxDEV("div",{className:"flex flex-col space-y-2",children:[l.jsxDEV("label",{className:"font-medium text-gray-700",children:"Title Color"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:80,columnNumber:33},void 0),l.jsxDEV("div",{className:"flex items-center space-x-3",children:[l.jsxDEV("div",{className:"w-8 h-8 border rounded shadow",style:{backgroundColor:s}},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:82,columnNumber:37},void 0),l.jsxDEV(Fe,{value:s,onChange:g},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:86,columnNumber:37},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:81,columnNumber:33},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:79,columnNumber:29},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:67,columnNumber:25},void 0),l.jsxDEV("div",{className:"pt-4 border-t border-gray-200",children:l.jsxDEV("div",{className:"p-3 bg-white border rounded-md",children:[l.jsxDEV("div",{className:"text-sm text-gray-600",children:"Preview"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:93,columnNumber:33},void 0),l.jsxDEV("div",{className:"p-2 mt-2 rounded",style:{backgroundColor:o},children:l.jsxDEV("span",{style:{color:s,fontWeight:500},children:"Accordion Title"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:95,columnNumber:37},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:94,columnNumber:33},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:92,columnNumber:29},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:91,columnNumber:25},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:66,columnNumber:21},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:26,columnNumber:13},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/accordion/accordion-view.tsx",lineNumber:25,columnNumber:9},void 0)},Vn=We.Node.create({name:"accordion",group:"block",content:"block+",atom:!1,draggable:!0,selectable:!0,inline:!1,defining:!0,addAttributes(){return{title:{default:"Accordion Title"},bgColor:{default:"#f3f4f6"},titleColor:{default:"#000000"}}},parseHTML(){return[{tag:"accordion"}]},renderHTML({HTMLAttributes:e}){return["accordion",We.mergeAttributes(e)]},addNodeView(){return De.ReactNodeViewRenderer(An)},addCommands(){return{setAccordion:e=>({chain:t})=>t().insertContent({type:"accordion",attrs:e,content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()}}});var it={exports:{}},Ae={},Ue={exports:{}},Ft={},ot={exports:{}},Be={exports:{}},F={};/** @license React v16.13.1
|
|
223
|
-
* react-is.production.min.js
|
|
224
|
-
*
|
|
225
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
226
|
-
*
|
|
227
|
-
* This source code is licensed under the MIT license found in the
|
|
228
|
-
* LICENSE file in the root directory of this source tree.
|
|
229
|
-
*/var Ut;function In(){if(Ut)return F;Ut=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,p=e?Symbol.for("react.async_mode"):60111,m=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,O=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,V=e?Symbol.for("react.block"):60121,X=e?Symbol.for("react.fundamental"):60117,Y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function w(c){if(typeof c=="object"&&c!==null){var B=c.$$typeof;switch(B){case t:switch(c=c.type,c){case p:case m:case n:case a:case o:case y:return c;default:switch(c=c&&c.$$typeof,c){case u:case g:case A:case E:case s:return c;default:return B}}case r:return B}}}function N(c){return w(c)===m}return F.AsyncMode=p,F.ConcurrentMode=m,F.ContextConsumer=u,F.ContextProvider=s,F.Element=t,F.ForwardRef=g,F.Fragment=n,F.Lazy=A,F.Memo=E,F.Portal=r,F.Profiler=a,F.StrictMode=o,F.Suspense=y,F.isAsyncMode=function(c){return N(c)||w(c)===p},F.isConcurrentMode=N,F.isContextConsumer=function(c){return w(c)===u},F.isContextProvider=function(c){return w(c)===s},F.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===t},F.isForwardRef=function(c){return w(c)===g},F.isFragment=function(c){return w(c)===n},F.isLazy=function(c){return w(c)===A},F.isMemo=function(c){return w(c)===E},F.isPortal=function(c){return w(c)===r},F.isProfiler=function(c){return w(c)===a},F.isStrictMode=function(c){return w(c)===o},F.isSuspense=function(c){return w(c)===y},F.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===n||c===m||c===a||c===o||c===y||c===O||typeof c=="object"&&c!==null&&(c.$$typeof===A||c.$$typeof===E||c.$$typeof===s||c.$$typeof===u||c.$$typeof===g||c.$$typeof===X||c.$$typeof===Y||c.$$typeof===v||c.$$typeof===V)},F.typeOf=w,F}var U={};/** @license React v16.13.1
|
|
230
|
-
* react-is.development.js
|
|
231
|
-
*
|
|
232
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the MIT license found in the
|
|
235
|
-
* LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/var Bt;function $n(){return Bt||(Bt=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,p=e?Symbol.for("react.async_mode"):60111,m=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,O=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,V=e?Symbol.for("react.block"):60121,X=e?Symbol.for("react.fundamental"):60117,Y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function w(b){return typeof b=="string"||typeof b=="function"||b===n||b===m||b===a||b===o||b===y||b===O||typeof b=="object"&&b!==null&&(b.$$typeof===A||b.$$typeof===E||b.$$typeof===s||b.$$typeof===u||b.$$typeof===g||b.$$typeof===X||b.$$typeof===Y||b.$$typeof===v||b.$$typeof===V)}function N(b){if(typeof b=="object"&&b!==null){var he=b.$$typeof;switch(he){case t:var je=b.type;switch(je){case p:case m:case n:case a:case o:case y:return je;default:var Te=je&&je.$$typeof;switch(Te){case u:case g:case A:case E:case s:return Te;default:return he}}case r:return he}}}var c=p,B=m,R=u,re=s,pe=t,me=g,ve=n,Se=A,ne=E,ee=r,be=a,le=o,fe=y,Ee=!1;function ke(b){return Ee||(Ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),f(b)||N(b)===p}function f(b){return N(b)===m}function x(b){return N(b)===u}function P(b){return N(b)===s}function T(b){return typeof b=="object"&&b!==null&&b.$$typeof===t}function k(b){return N(b)===g}function I(b){return N(b)===n}function _(b){return N(b)===A}function D(b){return N(b)===E}function j(b){return N(b)===r}function L(b){return N(b)===a}function M(b){return N(b)===o}function ie(b){return N(b)===y}U.AsyncMode=c,U.ConcurrentMode=B,U.ContextConsumer=R,U.ContextProvider=re,U.Element=pe,U.ForwardRef=me,U.Fragment=ve,U.Lazy=Se,U.Memo=ne,U.Portal=ee,U.Profiler=be,U.StrictMode=le,U.Suspense=fe,U.isAsyncMode=ke,U.isConcurrentMode=f,U.isContextConsumer=x,U.isContextProvider=P,U.isElement=T,U.isForwardRef=k,U.isFragment=I,U.isLazy=_,U.isMemo=D,U.isPortal=j,U.isProfiler=L,U.isStrictMode=M,U.isSuspense=ie,U.isValidElementType=w,U.typeOf=N}()),U}var Xt;function Gt(){return Xt||(Xt=1,process.env.NODE_ENV==="production"?Be.exports=In():Be.exports=$n()),Be.exports}/*
|
|
237
|
-
object-assign
|
|
238
|
-
(c) Sindre Sorhus
|
|
239
|
-
@license MIT
|
|
240
|
-
*/var at,Kt;function Hn(){if(Kt)return at;Kt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},u=0;u<10;u++)s["_"+String.fromCharCode(u)]=u;var p=Object.getOwnPropertyNames(s).map(function(g){return s[g]});if(p.join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(g){m[g]=g}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return at=o()?Object.assign:function(a,s){for(var u,p=n(a),m,g=1;g<arguments.length;g++){u=Object(arguments[g]);for(var y in u)t.call(u,y)&&(p[y]=u[y]);if(e){m=e(u);for(var O=0;O<m.length;O++)r.call(u,m[O])&&(p[m[O]]=u[m[O]])}}return p},at}var st,Jt;function lt(){if(Jt)return st;Jt=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return st=e,st}var ct,Zt;function Qt(){return Zt||(Zt=1,ct=Function.call.bind(Object.prototype.hasOwnProperty)),ct}var ut,er;function Ln(){if(er)return ut;er=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=lt(),r={},n=Qt();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(a,s,u,p,m){if(process.env.NODE_ENV!=="production"){for(var g in a)if(n(a,g)){var y;try{if(typeof a[g]!="function"){var O=Error((p||"React class")+": "+u+" type `"+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[g]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}y=a[g](s,g,p,u,null,t)}catch(A){y=A}if(y&&!(y instanceof Error)&&e((p||"React class")+": type specification of "+u+" `"+g+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof y+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),y instanceof Error&&!(y.message in r)){r[y.message]=!0;var E=m?m():"";e("Failed "+u+" type: "+y.message+(E??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ut=o,ut}var dt,tr;function Wn(){if(tr)return dt;tr=1;var e=Gt(),t=Hn(),r=lt(),n=Qt(),o=Ln(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(u){var p="Warning: "+u;typeof console<"u"&&console.error(p);try{throw new Error(p)}catch{}});function s(){return null}return dt=function(u,p){var m=typeof Symbol=="function"&&Symbol.iterator,g="@@iterator";function y(f){var x=f&&(m&&f[m]||f[g]);if(typeof x=="function")return x}var O="<<anonymous>>",E={array:Y("array"),bigint:Y("bigint"),bool:Y("boolean"),func:Y("function"),number:Y("number"),object:Y("object"),string:Y("string"),symbol:Y("symbol"),any:v(),arrayOf:w,element:N(),elementType:c(),instanceOf:B,node:me(),objectOf:re,oneOf:R,oneOfType:pe,shape:Se,exact:ne};function A(f,x){return f===x?f!==0||1/f===1/x:f!==f&&x!==x}function V(f,x){this.message=f,this.data=x&&typeof x=="object"?x:{},this.stack=""}V.prototype=Error.prototype;function X(f){if(process.env.NODE_ENV!=="production")var x={},P=0;function T(I,_,D,j,L,M,ie){if(j=j||O,M=M||D,ie!==r){if(p){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var he=j+":"+D;!x[he]&&P<3&&(a("You are manually calling a React.PropTypes validation function for the `"+M+"` prop on `"+j+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),x[he]=!0,P++)}}return _[D]==null?I?_[D]===null?new V("The "+L+" `"+M+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new V("The "+L+" `"+M+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:f(_,D,j,L,M)}var k=T.bind(null,!1);return k.isRequired=T.bind(null,!0),k}function Y(f){function x(P,T,k,I,_,D){var j=P[T],L=le(j);if(L!==f){var M=fe(j);return new V("Invalid "+I+" `"+_+"` of type "+("`"+M+"` supplied to `"+k+"`, expected ")+("`"+f+"`."),{expectedType:f})}return null}return X(x)}function v(){return X(s)}function w(f){function x(P,T,k,I,_){if(typeof f!="function")return new V("Property `"+_+"` of component `"+k+"` has invalid PropType notation inside arrayOf.");var D=P[T];if(!Array.isArray(D)){var j=le(D);return new V("Invalid "+I+" `"+_+"` of type "+("`"+j+"` supplied to `"+k+"`, expected an array."))}for(var L=0;L<D.length;L++){var M=f(D,L,k,I,_+"["+L+"]",r);if(M instanceof Error)return M}return null}return X(x)}function N(){function f(x,P,T,k,I){var _=x[P];if(!u(_)){var D=le(_);return new V("Invalid "+k+" `"+I+"` of type "+("`"+D+"` supplied to `"+T+"`, expected a single ReactElement."))}return null}return X(f)}function c(){function f(x,P,T,k,I){var _=x[P];if(!e.isValidElementType(_)){var D=le(_);return new V("Invalid "+k+" `"+I+"` of type "+("`"+D+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return X(f)}function B(f){function x(P,T,k,I,_){if(!(P[T]instanceof f)){var D=f.name||O,j=ke(P[T]);return new V("Invalid "+I+" `"+_+"` of type "+("`"+j+"` supplied to `"+k+"`, expected ")+("instance of `"+D+"`."))}return null}return X(x)}function R(f){if(!Array.isArray(f))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function x(P,T,k,I,_){for(var D=P[T],j=0;j<f.length;j++)if(A(D,f[j]))return null;var L=JSON.stringify(f,function(ie,b){var he=fe(b);return he==="symbol"?String(b):b});return new V("Invalid "+I+" `"+_+"` of value `"+String(D)+"` "+("supplied to `"+k+"`, expected one of "+L+"."))}return X(x)}function re(f){function x(P,T,k,I,_){if(typeof f!="function")return new V("Property `"+_+"` of component `"+k+"` has invalid PropType notation inside objectOf.");var D=P[T],j=le(D);if(j!=="object")return new V("Invalid "+I+" `"+_+"` of type "+("`"+j+"` supplied to `"+k+"`, expected an object."));for(var L in D)if(n(D,L)){var M=f(D,L,k,I,_+"."+L,r);if(M instanceof Error)return M}return null}return X(x)}function pe(f){if(!Array.isArray(f))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var x=0;x<f.length;x++){var P=f[x];if(typeof P!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ee(P)+" at index "+x+"."),s}function T(k,I,_,D,j){for(var L=[],M=0;M<f.length;M++){var ie=f[M],b=ie(k,I,_,D,j,r);if(b==null)return null;b.data&&n(b.data,"expectedType")&&L.push(b.data.expectedType)}var he=L.length>0?", expected one of type ["+L.join(", ")+"]":"";return new V("Invalid "+D+" `"+j+"` supplied to "+("`"+_+"`"+he+"."))}return X(T)}function me(){function f(x,P,T,k,I){return ee(x[P])?null:new V("Invalid "+k+" `"+I+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return X(f)}function ve(f,x,P,T,k){return new V((f||"React class")+": "+x+" type `"+P+"."+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+k+"`.")}function Se(f){function x(P,T,k,I,_){var D=P[T],j=le(D);if(j!=="object")return new V("Invalid "+I+" `"+_+"` of type `"+j+"` "+("supplied to `"+k+"`, expected `object`."));for(var L in f){var M=f[L];if(typeof M!="function")return ve(k,I,_,L,fe(M));var ie=M(D,L,k,I,_+"."+L,r);if(ie)return ie}return null}return X(x)}function ne(f){function x(P,T,k,I,_){var D=P[T],j=le(D);if(j!=="object")return new V("Invalid "+I+" `"+_+"` of type `"+j+"` "+("supplied to `"+k+"`, expected `object`."));var L=t({},P[T],f);for(var M in L){var ie=f[M];if(n(f,M)&&typeof ie!="function")return ve(k,I,_,M,fe(ie));if(!ie)return new V("Invalid "+I+" `"+_+"` key `"+M+"` supplied to `"+k+"`.\nBad object: "+JSON.stringify(P[T],null," ")+`
|
|
241
|
-
Valid keys: `+JSON.stringify(Object.keys(f),null," "));var b=ie(D,M,k,I,_+"."+M,r);if(b)return b}return null}return X(x)}function ee(f){switch(typeof f){case"number":case"string":case"undefined":return!0;case"boolean":return!f;case"object":if(Array.isArray(f))return f.every(ee);if(f===null||u(f))return!0;var x=y(f);if(x){var P=x.call(f),T;if(x!==f.entries){for(;!(T=P.next()).done;)if(!ee(T.value))return!1}else for(;!(T=P.next()).done;){var k=T.value;if(k&&!ee(k[1]))return!1}}else return!1;return!0;default:return!1}}function be(f,x){return f==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function le(f){var x=typeof f;return Array.isArray(f)?"array":f instanceof RegExp?"object":be(x,f)?"symbol":x}function fe(f){if(typeof f>"u"||f===null)return""+f;var x=le(f);if(x==="object"){if(f instanceof Date)return"date";if(f instanceof RegExp)return"regexp"}return x}function Ee(f){var x=fe(f);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function ke(f){return!f.constructor||!f.constructor.name?O:f.constructor.name}return E.checkPropTypes=o,E.resetWarningCache=o.resetWarningCache,E.PropTypes=E,E},dt}var ft,rr;function Yn(){if(rr)return ft;rr=1;var e=lt();function t(){}function r(){}return r.resetWarningCache=t,ft=function(){function n(s,u,p,m,g,y){if(y!==e){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}}n.isRequired=n;function o(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},ft}if(process.env.NODE_ENV!=="production"){var qn=Gt(),Fn=!0;ot.exports=Wn()(qn.isElement,Fn)}else ot.exports=Yn()();var Xe=ot.exports;function nr(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=nr(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ir(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=nr(e))&&(n&&(n+=" "),n+=t);return n}const Un=Gr(Object.freeze(Object.defineProperty({__proto__:null,clsx:ir,default:ir},Symbol.toStringTag,{value:"Module"})));var J={},we={};Object.defineProperty(we,"__esModule",{value:!0}),we.dontSetMe=Jn,we.findInArray=Bn,we.int=Kn,we.isFunction=Xn,we.isNum=Gn;function Bn(e,t){for(let r=0,n=e.length;r<n;r++)if(t.apply(t,[e[r],r,e]))return e[r]}function Xn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function Gn(e){return typeof e=="number"&&!isNaN(e)}function Kn(e){return parseInt(e,10)}function Jn(e,t,r){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(r," - do not set this, set it on the child."))}var Oe={};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.browserPrefixToKey=ar,Oe.browserPrefixToStyle=Zn,Oe.default=void 0,Oe.getPrefix=or;const pt=["Moz","Webkit","O","ms"];function or(){var e;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const r=(e=window.document)===null||e===void 0||(e=e.documentElement)===null||e===void 0?void 0:e.style;if(!r||t in r)return"";for(let n=0;n<pt.length;n++)if(ar(t,pt[n])in r)return pt[n];return""}function ar(e,t){return t?"".concat(t).concat(Qn(e)):e}function Zn(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e}function Qn(e){let t="",r=!0;for(let n=0;n<e.length;n++)r?(t+=e[n].toUpperCase(),r=!1):e[n]==="-"?r=!0:t+=e[n];return t}Oe.default=or(),Object.defineProperty(J,"__esModule",{value:!0}),J.addClassName=ur,J.addEvent=ri,J.addUserSelectStyles=pi,J.createCSSTransform=ci,J.createSVGTransform=ui,J.getTouch=di,J.getTouchIdentifier=fi,J.getTranslation=mt,J.innerHeight=ai,J.innerWidth=si,J.matchesSelector=cr,J.matchesSelectorAndParentsTo=ti,J.offsetXYFromParent=li,J.outerHeight=ii,J.outerWidth=oi,J.removeClassName=dr,J.removeEvent=ni,J.removeUserSelectStyles=mi;var ue=we,sr=ei(Oe);function lr(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(lr=function(n){return n?r:t})(e)}function ei(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=lr(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}let Ge="";function cr(e,t){return Ge||(Ge=(0,ue.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(r){return(0,ue.isFunction)(e[r])})),(0,ue.isFunction)(e[Ge])?e[Ge](t):!1}function ti(e,t,r){let n=e;do{if(cr(n,t))return!0;if(n===r)return!1;n=n.parentNode}while(n);return!1}function ri(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.addEventListener?e.addEventListener(t,r,o):e.attachEvent?e.attachEvent("on"+t,r):e["on"+t]=r}function ni(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.removeEventListener?e.removeEventListener(t,r,o):e.detachEvent?e.detachEvent("on"+t,r):e["on"+t]=null}function ii(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,ue.int)(r.borderTopWidth),t+=(0,ue.int)(r.borderBottomWidth),t}function oi(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,ue.int)(r.borderLeftWidth),t+=(0,ue.int)(r.borderRightWidth),t}function ai(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,ue.int)(r.paddingTop),t-=(0,ue.int)(r.paddingBottom),t}function si(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,ue.int)(r.paddingLeft),t-=(0,ue.int)(r.paddingRight),t}function li(e,t,r){const o=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),a=(e.clientX+t.scrollLeft-o.left)/r,s=(e.clientY+t.scrollTop-o.top)/r;return{x:a,y:s}}function ci(e,t){const r=mt(e,t,"px");return{[(0,sr.browserPrefixToKey)("transform",sr.default)]:r}}function ui(e,t){return mt(e,t,"")}function mt(e,t,r){let{x:n,y:o}=e,a="translate(".concat(n).concat(r,",").concat(o).concat(r,")");if(t){const s="".concat(typeof t.x=="string"?t.x:t.x+r),u="".concat(typeof t.y=="string"?t.y:t.y+r);a="translate(".concat(s,", ").concat(u,")")+a}return a}function di(e,t){return e.targetTouches&&(0,ue.findInArray)(e.targetTouches,r=>t===r.identifier)||e.changedTouches&&(0,ue.findInArray)(e.changedTouches,r=>t===r.identifier)}function fi(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function pi(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
242
|
-
`,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
243
|
-
`,e.getElementsByTagName("head")[0].appendChild(t)),e.body&&ur(e.body,"react-draggable-transparent-selection")}function mi(e){if(e)try{if(e.body&&dr(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&t.type!=="Caret"&&t.removeAllRanges()}}catch{}}function ur(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function dr(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Ne={};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.canDragX=gi,Ne.canDragY=yi,Ne.createCoreData=xi,Ne.createDraggableData=wi,Ne.getBoundPosition=bi,Ne.getControlPosition=vi,Ne.snapToGrid=hi;var de=we,Pe=J;function bi(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:n}=e.props;n=typeof n=="string"?n:Ni(n);const o=bt(e);if(typeof n=="string"){const{ownerDocument:a}=o,s=a.defaultView;let u;if(n==="parent"?u=o.parentNode:u=a.querySelector(n),!(u instanceof s.HTMLElement))throw new Error('Bounds selector "'+n+'" could not find an element.');const p=u,m=s.getComputedStyle(o),g=s.getComputedStyle(p);n={left:-o.offsetLeft+(0,de.int)(g.paddingLeft)+(0,de.int)(m.marginLeft),top:-o.offsetTop+(0,de.int)(g.paddingTop)+(0,de.int)(m.marginTop),right:(0,Pe.innerWidth)(p)-(0,Pe.outerWidth)(o)-o.offsetLeft+(0,de.int)(g.paddingRight)-(0,de.int)(m.marginRight),bottom:(0,Pe.innerHeight)(p)-(0,Pe.outerHeight)(o)-o.offsetTop+(0,de.int)(g.paddingBottom)-(0,de.int)(m.marginBottom)}}return(0,de.isNum)(n.right)&&(t=Math.min(t,n.right)),(0,de.isNum)(n.bottom)&&(r=Math.min(r,n.bottom)),(0,de.isNum)(n.left)&&(t=Math.max(t,n.left)),(0,de.isNum)(n.top)&&(r=Math.max(r,n.top)),[t,r]}function hi(e,t,r){const n=Math.round(t/e[0])*e[0],o=Math.round(r/e[1])*e[1];return[n,o]}function gi(e){return e.props.axis==="both"||e.props.axis==="x"}function yi(e){return e.props.axis==="both"||e.props.axis==="y"}function vi(e,t,r){const n=typeof t=="number"?(0,Pe.getTouch)(e,t):null;if(typeof t=="number"&&!n)return null;const o=bt(r),a=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,Pe.offsetXYFromParent)(n||e,a,r.props.scale)}function xi(e,t,r){const n=!(0,de.isNum)(e.lastX),o=bt(e);return n?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:o,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}}function wi(e,t){const r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}}function Ni(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function bt(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var Ke={},Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.default=Ei;function Ei(){}Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.default=void 0;var ht=ki(W),se=yt(Xe),Si=yt(Mt),te=J,Ce=Ne,gt=we,Ve=yt(Je);function yt(e){return e&&e.__esModule?e:{default:e}}function fr(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(fr=function(n){return n?r:t})(e)}function ki(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=fr(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}function oe(e,t,r){return t=Ci(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ci(e){var t=_i(e,"string");return typeof t=="symbol"?t:String(t)}function _i(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const ye={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let _e=ye.mouse,Ze=class extends ht.Component{constructor(){super(...arguments),oe(this,"dragging",!1),oe(this,"lastX",NaN),oe(this,"lastY",NaN),oe(this,"touchIdentifier",null),oe(this,"mounted",!1),oe(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&typeof t.button=="number"&&t.button!==0)return!1;const r=this.findDOMNode();if(!r||!r.ownerDocument||!r.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=r;if(this.props.disabled||!(t.target instanceof n.defaultView.Node)||this.props.handle&&!(0,te.matchesSelectorAndParentsTo)(t.target,this.props.handle,r)||this.props.cancel&&(0,te.matchesSelectorAndParentsTo)(t.target,this.props.cancel,r))return;t.type==="touchstart"&&t.preventDefault();const o=(0,te.getTouchIdentifier)(t);this.touchIdentifier=o;const a=(0,Ce.getControlPosition)(t,o,this);if(a==null)return;const{x:s,y:u}=a,p=(0,Ce.createCoreData)(this,s,u);(0,Ve.default)("DraggableCore: handleDragStart: %j",p),(0,Ve.default)("calling",this.props.onStart),!(this.props.onStart(t,p)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,te.addUserSelectStyles)(n),this.dragging=!0,this.lastX=s,this.lastY=u,(0,te.addEvent)(n,_e.move,this.handleDrag),(0,te.addEvent)(n,_e.stop,this.handleDragStop))}),oe(this,"handleDrag",t=>{const r=(0,Ce.getControlPosition)(t,this.touchIdentifier,this);if(r==null)return;let{x:n,y:o}=r;if(Array.isArray(this.props.grid)){let u=n-this.lastX,p=o-this.lastY;if([u,p]=(0,Ce.snapToGrid)(this.props.grid,u,p),!u&&!p)return;n=this.lastX+u,o=this.lastY+p}const a=(0,Ce.createCoreData)(this,n,o);if((0,Ve.default)("DraggableCore: handleDrag: %j",a),this.props.onDrag(t,a)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const p=document.createEvent("MouseEvents");p.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(p)}return}this.lastX=n,this.lastY=o}),oe(this,"handleDragStop",t=>{if(!this.dragging)return;const r=(0,Ce.getControlPosition)(t,this.touchIdentifier,this);if(r==null)return;let{x:n,y:o}=r;if(Array.isArray(this.props.grid)){let p=n-this.lastX||0,m=o-this.lastY||0;[p,m]=(0,Ce.snapToGrid)(this.props.grid,p,m),n=this.lastX+p,o=this.lastY+m}const a=(0,Ce.createCoreData)(this,n,o);if(this.props.onStop(t,a)===!1||this.mounted===!1)return!1;const u=this.findDOMNode();u&&this.props.enableUserSelectHack&&(0,te.removeUserSelectStyles)(u.ownerDocument),(0,Ve.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,u&&((0,Ve.default)("DraggableCore: Removing handlers"),(0,te.removeEvent)(u.ownerDocument,_e.move,this.handleDrag),(0,te.removeEvent)(u.ownerDocument,_e.stop,this.handleDragStop))}),oe(this,"onMouseDown",t=>(_e=ye.mouse,this.handleDragStart(t))),oe(this,"onMouseUp",t=>(_e=ye.mouse,this.handleDragStop(t))),oe(this,"onTouchStart",t=>(_e=ye.touch,this.handleDragStart(t))),oe(this,"onTouchEnd",t=>(_e=ye.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&(0,te.addEvent)(t,ye.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:r}=t;(0,te.removeEvent)(r,ye.mouse.move,this.handleDrag),(0,te.removeEvent)(r,ye.touch.move,this.handleDrag),(0,te.removeEvent)(r,ye.mouse.stop,this.handleDragStop),(0,te.removeEvent)(r,ye.touch.stop,this.handleDragStop),(0,te.removeEvent)(t,ye.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,te.removeUserSelectStyles)(r)}}findDOMNode(){var t,r;return(t=this.props)!==null&&t!==void 0&&t.nodeRef?(r=this.props)===null||r===void 0||(r=r.nodeRef)===null||r===void 0?void 0:r.current:Si.default.findDOMNode(this)}render(){return ht.cloneElement(ht.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Ke.default=Ze,oe(Ze,"displayName","DraggableCore"),oe(Ze,"propTypes",{allowAnyClick:se.default.bool,children:se.default.node.isRequired,disabled:se.default.bool,enableUserSelectHack:se.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:se.default.arrayOf(se.default.number),handle:se.default.string,cancel:se.default.string,nodeRef:se.default.object,onStart:se.default.func,onDrag:se.default.func,onStop:se.default.func,onMouseDown:se.default.func,scale:se.default.number,className:gt.dontSetMe,style:gt.dontSetMe,transform:gt.dontSetMe}),oe(Ze,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return p.default}}),e.default=void 0;var t=O(W),r=g(Xe),n=g(Mt),o=g(Un),a=J,s=Ne,u=we,p=g(Ke),m=g(Je);function g(v){return v&&v.__esModule?v:{default:v}}function y(v){if(typeof WeakMap!="function")return null;var w=new WeakMap,N=new WeakMap;return(y=function(c){return c?N:w})(v)}function O(v,w){if(v&&v.__esModule)return v;if(v===null||typeof v!="object"&&typeof v!="function")return{default:v};var N=y(w);if(N&&N.has(v))return N.get(v);var c={},B=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var R in v)if(R!=="default"&&Object.prototype.hasOwnProperty.call(v,R)){var re=B?Object.getOwnPropertyDescriptor(v,R):null;re&&(re.get||re.set)?Object.defineProperty(c,R,re):c[R]=v[R]}return c.default=v,N&&N.set(v,c),c}function E(){return E=Object.assign?Object.assign.bind():function(v){for(var w=1;w<arguments.length;w++){var N=arguments[w];for(var c in N)Object.prototype.hasOwnProperty.call(N,c)&&(v[c]=N[c])}return v},E.apply(this,arguments)}function A(v,w,N){return w=V(w),w in v?Object.defineProperty(v,w,{value:N,enumerable:!0,configurable:!0,writable:!0}):v[w]=N,v}function V(v){var w=X(v,"string");return typeof w=="symbol"?w:String(w)}function X(v,w){if(typeof v!="object"||v===null)return v;var N=v[Symbol.toPrimitive];if(N!==void 0){var c=N.call(v,w||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(v)}class Y extends t.Component{static getDerivedStateFromProps(w,N){let{position:c}=w,{prevPropsPosition:B}=N;return c&&(!B||c.x!==B.x||c.y!==B.y)?((0,m.default)("Draggable: getDerivedStateFromProps %j",{position:c,prevPropsPosition:B}),{x:c.x,y:c.y,prevPropsPosition:{...c}}):null}constructor(w){super(w),A(this,"onDragStart",(N,c)=>{if((0,m.default)("Draggable: onDragStart: %j",c),this.props.onStart(N,(0,s.createDraggableData)(this,c))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),A(this,"onDrag",(N,c)=>{if(!this.state.dragging)return!1;(0,m.default)("Draggable: onDrag: %j",c);const B=(0,s.createDraggableData)(this,c),R={x:B.x,y:B.y,slackX:0,slackY:0};if(this.props.bounds){const{x:pe,y:me}=R;R.x+=this.state.slackX,R.y+=this.state.slackY;const[ve,Se]=(0,s.getBoundPosition)(this,R.x,R.y);R.x=ve,R.y=Se,R.slackX=this.state.slackX+(pe-R.x),R.slackY=this.state.slackY+(me-R.y),B.x=R.x,B.y=R.y,B.deltaX=R.x-this.state.x,B.deltaY=R.y-this.state.y}if(this.props.onDrag(N,B)===!1)return!1;this.setState(R)}),A(this,"onDragStop",(N,c)=>{if(!this.state.dragging||this.props.onStop(N,(0,s.createDraggableData)(this,c))===!1)return!1;(0,m.default)("Draggable: onDragStop: %j",c);const R={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:pe,y:me}=this.props.position;R.x=pe,R.y=me}this.setState(R)}),this.state={dragging:!1,dragged:!1,x:w.position?w.position.x:w.defaultPosition.x,y:w.position?w.position.y:w.defaultPosition.y,prevPropsPosition:{...w.position},slackX:0,slackY:0,isElementSVG:!1},w.position&&!(w.onDrag||w.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var w,N;return(w=(N=this.props)===null||N===void 0||(N=N.nodeRef)===null||N===void 0?void 0:N.current)!==null&&w!==void 0?w:n.default.findDOMNode(this)}render(){const{axis:w,bounds:N,children:c,defaultPosition:B,defaultClassName:R,defaultClassNameDragging:re,defaultClassNameDragged:pe,position:me,positionOffset:ve,scale:Se,...ne}=this.props;let ee={},be=null;const fe=!!!me||this.state.dragging,Ee=me||B,ke={x:(0,s.canDragX)(this)&&fe?this.state.x:Ee.x,y:(0,s.canDragY)(this)&&fe?this.state.y:Ee.y};this.state.isElementSVG?be=(0,a.createSVGTransform)(ke,ve):ee=(0,a.createCSSTransform)(ke,ve);const f=(0,o.default)(c.props.className||"",R,{[re]:this.state.dragging,[pe]:this.state.dragged});return t.createElement(p.default,E({},ne,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(c),{className:f,style:{...c.props.style,...ee},transform:be}))}}e.default=Y,A(Y,"displayName","Draggable"),A(Y,"propTypes",{...p.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:u.dontSetMe,style:u.dontSetMe,transform:u.dontSetMe}),A(Y,"defaultProps",{...p.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(Ft);const{default:pr,DraggableCore:Di}=Ft;Ue.exports=pr,Ue.exports.default=pr,Ue.exports.DraggableCore=Di;var Oi=Ue.exports,vt={};vt.__esModule=!0,vt.cloneElement=zi;var Ti=Ri(W);function Ri(e){return e&&e.__esModule?e:{default:e}}function mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function br(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mr(Object(r),!0).forEach(function(n){Pi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pi(e,t,r){return t=ji(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ji(e){var t=Mi(e,"string");return typeof t=="symbol"?t:String(t)}function Mi(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zi(e,t){return t.style&&e.props.style&&(t.style=br(br({},e.props.style),t.style)),t.className&&e.props.className&&(t.className=e.props.className+" "+t.className),Ti.default.cloneElement(e,t)}var Ie={};Ie.__esModule=!0,Ie.resizableProps=void 0;var C=Ai(Xe);function Ai(e){return e&&e.__esModule?e:{default:e}}var Vi={axis:C.default.oneOf(["both","x","y","none"]),className:C.default.string,children:C.default.element.isRequired,draggableOpts:C.default.shape({allowAnyClick:C.default.bool,cancel:C.default.string,children:C.default.node,disabled:C.default.bool,enableUserSelectHack:C.default.bool,offsetParent:C.default.node,grid:C.default.arrayOf(C.default.number),handle:C.default.string,nodeRef:C.default.object,onStart:C.default.func,onDrag:C.default.func,onStop:C.default.func,onMouseDown:C.default.func,scale:C.default.number}),height:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r[0];if(o.axis==="both"||o.axis==="y"){var a;return(a=C.default.number).isRequired.apply(a,r)}return C.default.number.apply(C.default,r)},handle:C.default.oneOfType([C.default.node,C.default.func]),handleSize:C.default.arrayOf(C.default.number),lockAspectRatio:C.default.bool,maxConstraints:C.default.arrayOf(C.default.number),minConstraints:C.default.arrayOf(C.default.number),onResizeStop:C.default.func,onResizeStart:C.default.func,onResize:C.default.func,resizeHandles:C.default.arrayOf(C.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:C.default.number,width:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r[0];if(o.axis==="both"||o.axis==="x"){var a;return(a=C.default.number).isRequired.apply(a,r)}return C.default.number.apply(C.default,r)}};Ie.resizableProps=Vi,Ae.__esModule=!0,Ae.default=void 0;var $e=Wi(W),Ii=Oi,$i=vt,Hi=Ie,Li=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function hr(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(hr=function(o){return o?r:t})(e)}function Wi(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=hr(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}function xt(){return xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xt.apply(this,arguments)}function Yi(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function gr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gr(Object(r),!0).forEach(function(n){qi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qi(e,t,r){return t=Fi(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fi(e){var t=Ui(e,"string");return typeof t=="symbol"?t:String(t)}function Ui(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bi(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Nt(e,t)}function Nt(e,t){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Nt(e,t)}var Et=function(e){Bi(t,e);function t(){for(var n,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=e.call.apply(e,[this].concat(a))||this,n.handleRefs={},n.lastHandleRect=null,n.slack=null,n}var r=t.prototype;return r.componentWillUnmount=function(){this.resetData()},r.resetData=function(){this.lastHandleRect=this.slack=null},r.runConstraints=function(o,a){var s=this.props,u=s.minConstraints,p=s.maxConstraints,m=s.lockAspectRatio;if(!u&&!p&&!m)return[o,a];if(m){var g=this.props.width/this.props.height,y=o-this.props.width,O=a-this.props.height;Math.abs(y)>Math.abs(O*g)?a=o/g:o=a*g}var E=o,A=a,V=this.slack||[0,0],X=V[0],Y=V[1];return o+=X,a+=Y,u&&(o=Math.max(u[0],o),a=Math.max(u[1],a)),p&&(o=Math.min(p[0],o),a=Math.min(p[1],a)),this.slack=[X+(E-o),Y+(A-a)],[o,a]},r.resizeHandler=function(o,a){var s=this;return function(u,p){var m=p.node,g=p.deltaX,y=p.deltaY;o==="onResizeStart"&&s.resetData();var O=(s.props.axis==="both"||s.props.axis==="x")&&a!=="n"&&a!=="s",E=(s.props.axis==="both"||s.props.axis==="y")&&a!=="e"&&a!=="w";if(!(!O&&!E)){var A=a[0],V=a[a.length-1],X=m.getBoundingClientRect();if(s.lastHandleRect!=null){if(V==="w"){var Y=X.left-s.lastHandleRect.left;g+=Y}if(A==="n"){var v=X.top-s.lastHandleRect.top;y+=v}}s.lastHandleRect=X,V==="w"&&(g=-g),A==="n"&&(y=-y);var w=s.props.width+(O?g/s.props.transformScale:0),N=s.props.height+(E?y/s.props.transformScale:0),c=s.runConstraints(w,N);w=c[0],N=c[1];var B=w!==s.props.width||N!==s.props.height,R=typeof s.props[o]=="function"?s.props[o]:null,re=o==="onResize"&&!B;R&&!re&&(u.persist==null||u.persist(),R(u,{node:m,size:{width:w,height:N},handle:a})),o==="onResizeStop"&&s.resetData()}}},r.renderResizeHandle=function(o,a){var s=this.props.handle;if(!s)return $e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+o,ref:a});if(typeof s=="function")return s(o,a);var u=typeof s.type=="string",p=wt({ref:a},u?{}:{handleAxis:o});return $e.cloneElement(s,p)},r.render=function(){var o=this,a=this.props,s=a.children,u=a.className,p=a.draggableOpts;a.width,a.height,a.handle,a.handleSize,a.lockAspectRatio,a.axis,a.minConstraints,a.maxConstraints,a.onResize,a.onResizeStop,a.onResizeStart;var m=a.resizeHandles;a.transformScale;var g=Yi(a,Li);return(0,$i.cloneElement)(s,wt(wt({},g),{},{className:(u?u+" ":"")+"react-resizable",children:[].concat(s.props.children,m.map(function(y){var O,E=(O=o.handleRefs[y])!=null?O:o.handleRefs[y]=$e.createRef();return $e.createElement(Ii.DraggableCore,xt({},p,{nodeRef:E,key:"resizableHandle-"+y,onStop:o.resizeHandler("onResizeStop",y),onStart:o.resizeHandler("onResizeStart",y),onDrag:o.resizeHandler("onResize",y)}),o.renderResizeHandle(y,E))}))}))},t}($e.Component);Ae.default=Et,Et.propTypes=Hi.resizableProps,Et.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var Qe={};Qe.__esModule=!0,Qe.default=void 0;var St=Zi(W),Xi=yr(Xe),Gi=yr(Ae),Ki=Ie,Ji=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function yr(e){return e&&e.__esModule?e:{default:e}}function vr(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(vr=function(o){return o?r:t})(e)}function Zi(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=vr(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}function kt(){return kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kt.apply(this,arguments)}function xr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xr(Object(r),!0).forEach(function(n){Qi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qi(e,t,r){return t=eo(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eo(e){var t=to(e,"string");return typeof t=="symbol"?t:String(t)}function to(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ro(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function no(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ct(e,t)}function Ct(e,t){return Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Ct(e,t)}var wr=function(e){no(t,e);function t(){for(var n,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=e.call.apply(e,[this].concat(a))||this,n.state={width:n.props.width,height:n.props.height,propsWidth:n.props.width,propsHeight:n.props.height},n.onResize=function(u,p){var m=p.size;n.props.onResize?(u.persist==null||u.persist(),n.setState(m,function(){return n.props.onResize&&n.props.onResize(u,p)})):n.setState(m)},n}t.getDerivedStateFromProps=function(o,a){return a.propsWidth!==o.width||a.propsHeight!==o.height?{width:o.width,height:o.height,propsWidth:o.width,propsHeight:o.height}:null};var r=t.prototype;return r.render=function(){var o=this.props,a=o.handle,s=o.handleSize;o.onResize;var u=o.onResizeStart,p=o.onResizeStop,m=o.draggableOpts,g=o.minConstraints,y=o.maxConstraints,O=o.lockAspectRatio,E=o.axis;o.width,o.height;var A=o.resizeHandles,V=o.style,X=o.transformScale,Y=ro(o,Ji);return St.createElement(Gi.default,{axis:E,draggableOpts:m,handle:a,handleSize:s,height:this.state.height,lockAspectRatio:O,maxConstraints:y,minConstraints:g,onResizeStart:u,onResize:this.onResize,onResizeStop:p,resizeHandles:A,transformScale:X,width:this.state.width},St.createElement("div",kt({},Y,{style:et(et({},V),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},t}(St.Component);Qe.default=wr,wr.propTypes=et(et({},Ki.resizableProps),{},{children:Xi.default.element}),it.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},it.exports.Resizable=Ae.default;var io=it.exports.ResizableBox=Qe.default;const oo=({node:e,updateAttributes:t,editor:r})=>{const[n,o]=W.useState({width:e.attrs.width||300,height:e.attrs.height||300}),[a,s]=W.useState({left:e.attrs.marginLeft||0,right:e.attrs.marginRight||0}),[u,p]=W.useState(e.attrs.src||""),m=W.useRef(null);W.useEffect(()=>{if(e.attrs.src&&m.current){const E=new Image;E.onload=()=>{(!e.attrs.width||!e.attrs.height)&&o({width:E.width>600?600:E.width,height:E.width>600?600/E.width*E.height:E.height})},E.src=e.attrs.src}},[e.attrs.src]);const g=(E,{size:A})=>{o({width:A.width,height:A.height}),t({width:A.width,height:A.height})},y=()=>{t({src:u,width:n.width,height:n.height,marginLeft:a.left,marginRight:a.right})},O=E=>{E.preventDefault()};return l.jsxDEV(De.NodeViewWrapper,{className:"image-wrapper",children:l.jsxDEV(qt,{title:"Image",childrenContent:l.jsxDEV("div",{className:"relative",style:{marginLeft:a.left,marginRight:a.right},onContextMenu:O,children:r.isEditable?l.jsxDEV(io,{width:n.width,height:n.height,onResize:g,minConstraints:[100,100],maxConstraints:[800,800],lockAspectRatio:!0,className:"relative",children:l.jsxDEV("img",{ref:m,src:e.attrs.src,alt:"Uploaded",className:"object-contain w-full h-full",draggable:!1},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:89,columnNumber:33},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:80,columnNumber:29},void 0):l.jsxDEV("img",{ref:m,src:e.attrs.src,alt:"Uploaded",style:{width:n.width,height:n.height},className:"object-contain",draggable:!1},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:98,columnNumber:29},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:71,columnNumber:21},void 0),editable:r.isEditable,childrenEdit:l.jsxDEV("div",{className:"space-y-4",children:[l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-sm font-medium",children:"Image URL"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:116,columnNumber:29},void 0),l.jsxDEV("input",{type:"text",value:u,onChange:E=>p(E.target.value),className:"w-full p-2 border rounded",disabled:!r.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:117,columnNumber:29},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:115,columnNumber:25},void 0),l.jsxDEV("div",{className:"flex gap-2",children:[l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-sm font-medium",children:"Width"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:128,columnNumber:33},void 0),l.jsxDEV("input",{type:"number",value:n.width,onChange:E=>o({...n,width:Number(E.target.value)}),className:"w-full p-2 border rounded",disabled:!r.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:129,columnNumber:33},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:127,columnNumber:29},void 0),l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-sm font-medium",children:"Height"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:138,columnNumber:33},void 0),l.jsxDEV("input",{type:"number",value:n.height,onChange:E=>o({...n,height:Number(E.target.value)}),className:"w-full p-2 border rounded",disabled:!r.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:139,columnNumber:33},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:137,columnNumber:29},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:126,columnNumber:25},void 0),l.jsxDEV("div",{className:"flex gap-2",children:[l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-sm font-medium",children:"Margin Left"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:151,columnNumber:33},void 0),l.jsxDEV("input",{type:"number",value:a.left,onChange:E=>s({...a,left:Number(E.target.value)}),className:"w-full p-2 border rounded",disabled:!r.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:152,columnNumber:33},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:150,columnNumber:29},void 0),l.jsxDEV("div",{children:[l.jsxDEV("label",{className:"block text-sm font-medium",children:"Margin Right"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:161,columnNumber:33},void 0),l.jsxDEV("input",{type:"number",value:a.right,onChange:E=>s({...a,right:Number(E.target.value)}),className:"w-full p-2 border rounded",disabled:!r.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:162,columnNumber:33},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:160,columnNumber:29},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:149,columnNumber:25},void 0),l.jsxDEV("button",{onClick:y,className:"w-full p-2 text-white bg-blue-500 rounded hover:bg-blue-600",disabled:!r.isEditable,children:"Update Image"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:172,columnNumber:25},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:114,columnNumber:21},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:68,columnNumber:13},void 0)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/image/image-view.tsx",lineNumber:67,columnNumber:9},void 0)},ao=We.Node.create({name:"image",group:"block",content:"inline*",atom:!0,draggable:!0,selectable:!0,addAttributes(){return{src:{default:null},width:{default:300},height:{default:300},marginLeft:{default:0},marginRight:{default:0}}},parseHTML(){return[{tag:"img",getAttrs:e=>e instanceof HTMLElement?{src:e.getAttribute("src"),width:Number(e.getAttribute("width"))||300,height:Number(e.getAttribute("height"))||300,marginLeft:Number(e.getAttribute("marginleft"))||0,marginRight:Number(e.getAttribute("marginright"))||0}:null}]},renderHTML({HTMLAttributes:e}){return["img",We.mergeAttributes(e)]},addNodeView(){return De.ReactNodeViewRenderer(oo)},addCommands(){return{setImage:e=>({chain:t})=>t().insertContent({type:"image",attrs:e}).run()}}}),so=[zr.Color.configure({types:[jt.name,Mr.name]}),jt,Vr.configure({multicolor:!0}),Ar.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1}}),Vn,Ir,$r,Hr,Lr.configure({types:["heading","paragraph"]}),Wr,Yr,qr.configure({resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!0,HTMLAttributes:{class:"table-wrapper"}}),Fr,Ur,Br.configure({HTMLAttributes:{class:"table-cell"}}),Xr,ao],lo=({content:e="",slotBefore:t=!1,className:r="",editorClassName:n="",editable:o=!0,onChange:a})=>{const s=De.useEditor({extensions:so,content:e,editable:o,onUpdate:({editor:u})=>{a&&a(u.getHTML())}});return W.useEffect(()=>{s&&e!==s.getHTML()&&s.commands.setContent(e,!1)},[s,e]),s?l.jsxDEV("div",{className:`cyber-editor-container ${r}`,children:[t&&l.jsxDEV(zn,{editor:s},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/editor-provider.tsx",lineNumber:36,columnNumber:28},void 0),l.jsxDEV(De.EditorContent,{editor:s,className:n},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/editor-provider.tsx",lineNumber:37,columnNumber:13},void 0)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/extensions/editor-provider.tsx",lineNumber:35,columnNumber:9},void 0):null};G.CyberEditorProvider=lo,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})});
|
|
File without changes
|