diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage.html b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage.html new file mode 100644 index 00000000..62c01e8d --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage.html @@ -0,0 +1,1350 @@ + + + + + + + + + + + Edit Page - SIS Vietnam - Manage + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ + +
+ + + + + + +
+ +
+

Edit Page

+ + Back to All Pages + +
+ + +
+
+
Update Page Details
+
+
+
+ + + + + + +
+ + + +
+ + +
+ +
+ + Permalink: + + /page/ban-giam-doc + + + +
+
+
+ /page/ +
+ + +
+ Leave blank to auto-generate from the title. Use lowercase letters, numbers, and hyphens only. +
+ +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + Lower numbers appear first. +
+
+
+ + +
+ + + This appears in Google search results below the page title. +
+ + +
+
+
Dedicated Custom CSS & JavaScript (Page-Specific IDE)
+ Live Code Injection +
+
+ +
+
+ +
+ + CSS3 +
+
+ + CSS entered here is injected into this page's <head>. Press Tab to indent. +
+ +
+
+ + ES6 JS +
+ + JavaScript entered here executes when this page is loaded. Press Tab to indent. +
+
+
+ + +
+
+
Thông tin liên hệ & Banner (Dành riêng cho trang Chuyên khoa)
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+ +
+ +
+ +
+
+
+
+
+ + +
+
+ +
+ + + +
+
+
+ Active blocks: + Heading + List + Quote + Table + Code + Delimiter + Warning + snippet (plugin)timeline (plugin)grid (plugin)flex (plugin)hovercard (plugin)tag (plugin)stickyNav (plugin)nav (plugin)hero (plugin)textStyling (plugin)tinymce (plugin)image (plugin) +
+ + +

Ban Giám đốc

Multi-Column Grid Layout
+
Image Controls
+ + + + +
ADVANCED SETTINGS
ADVANCED SETTINGS
+
Image Controls
+ + + + +
ADVANCED SETTINGS
ADVANCED SETTINGS

Lãnh đạo Phòng/ Cơ sở/ Trung tâm/ Đơn vị chức năng

Multi-Column Grid Layout

+
Image Controls
+ + + + +
ADVANCED SETTINGS
ADVANCED SETTINGS

+
Image Controls
+ + + + +
ADVANCED SETTINGS
ADVANCED SETTINGS

+
Image Controls
+ + + + +
ADVANCED SETTINGS
ADVANCED SETTINGS
Nothing found
Text
Heading
List
Quote
Delimiter
Table
Code
Warning
Image
Attachment
Raw HTML
Accordion / Collapse
YouTube Video
Hero Banner
Sticky Nav / Sub-menu
HTML Snippet
Timeline Group
Grid / Columns
Flex Layout
Hover Cards
HTML Tag (Open/Close)
Sticky Nav / Sub-menu
TinyMCE Editor
+ + + + + + + Click the + button or press Tab to add new blocks. Use the block menu (☰) to change block + types or reorder. + +
+ + +
+
+ Cancel + +
+
+
+
+ + + +
+ + +
+ + + +
+
+ +
+
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Click to tune
Ctrl + /
\ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/LogoSIS_White.png b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/LogoSIS_White.png new file mode 100644 index 00000000..82cc905f Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/LogoSIS_White.png differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/all.min.css b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/all.min.css new file mode 100644 index 00000000..e1e271c0 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/all.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1);transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-bacon:before{content:"\f7e5"}.fa-bacteria:before{content:"\e059"}.fa-bacterium:before{content:"\e05a"}.fa-bahai:before{content:"\f666"}.fa-balance-scale:before{content:"\f24e"}.fa-balance-scale-left:before{content:"\f515"}.fa-balance-scale-right:before{content:"\f516"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-battle-net:before{content:"\f835"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-biking:before{content:"\f84a"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-medical:before{content:"\f7e6"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bootstrap:before{content:"\f836"}.fa-border-all:before{content:"\f84c"}.fa-border-none:before{content:"\f850"}.fa-border-style:before{content:"\f853"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-box-tissue:before{content:"\e05b"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-bread-slice:before{content:"\f7ec"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-buffer:before{content:"\f837"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buy-n-large:before{content:"\f8a6"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caravan:before{content:"\f8ff"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-cheese:before{content:"\f7ef"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-chromecast:before{content:"\f838"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clinic-medical:before{content:"\f7f2"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudflare:before{content:"\e07d"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-medical:before{content:"\f7f5"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-alt:before{content:"\f422"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-cotton-bureau:before{content:"\f89e"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-crutch:before{content:"\f7f7"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dailymotion:before{content:"\e052"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-deezer:before{content:"\e077"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-disease:before{content:"\f7fa"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edge-legacy:before{content:"\e078"}.fa-edit:before{content:"\f044"}.fa-egg:before{content:"\f7fb"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-evernote:before{content:"\f839"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-alt:before{content:"\f424"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fan:before{content:"\f863"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-faucet:before{content:"\e005"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-firefox-browser:before{content:"\e007"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-alt:before{content:"\f841"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-pay:before{content:"\e079"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guilded:before{content:"\e07e"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hamburger:before{content:"\f805"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-medical:before{content:"\e05c"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-holding-water:before{content:"\f4c1"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-middle-finger:before{content:"\f806"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-sparkles:before{content:"\e05d"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-hands-wash:before{content:"\e05e"}.fa-handshake:before{content:"\f2b5"}.fa-handshake-alt-slash:before{content:"\e05f"}.fa-handshake-slash:before{content:"\e060"}.fa-hanukiah:before{content:"\f6e6"}.fa-hard-hat:before{content:"\f807"}.fa-hashtag:before{content:"\f292"}.fa-hat-cowboy:before{content:"\f8c0"}.fa-hat-cowboy-side:before{content:"\f8c1"}.fa-hat-wizard:before{content:"\f6e8"}.fa-hdd:before{content:"\f0a0"}.fa-head-side-cough:before{content:"\e061"}.fa-head-side-cough-slash:before{content:"\e062"}.fa-head-side-mask:before{content:"\e063"}.fa-head-side-virus:before{content:"\e064"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hive:before{content:"\e07f"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hospital-user:before{content:"\f80d"}.fa-hot-tub:before{content:"\f593"}.fa-hotdog:before{content:"\f80f"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-house-user:before{content:"\e065"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-ice-cream:before{content:"\f810"}.fa-icicles:before{content:"\f7ad"}.fa-icons:before{content:"\f86d"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-ideal:before{content:"\e013"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-innosoft:before{content:"\e080"}.fa-instagram:before{content:"\f16d"}.fa-instagram-square:before{content:"\e055"}.fa-instalod:before{content:"\e081"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itch-io:before{content:"\f83a"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laptop-house:before{content:"\e066"}.fa-laptop-medical:before{content:"\f812"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lungs:before{content:"\f604"}.fa-lungs-virus:before{content:"\e067"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-mdb:before{content:"\f8ca"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microblog:before{content:"\e01a"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mixer:before{content:"\e056"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse:before{content:"\f8cc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-octopus-deploy:before{content:"\e082"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-orcid:before{content:"\f8d2"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-pager:before{content:"\f815"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-arrows:before{content:"\e068"}.fa-people-carry:before{content:"\f4ce"}.fa-pepper-hot:before{content:"\f816"}.fa-perbyte:before{content:"\e083"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-alt:before{content:"\f879"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-square-alt:before{content:"\f87b"}.fa-phone-volume:before{content:"\f2a0"}.fa-photo-video:before{content:"\f87c"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-square:before{content:"\e01e"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-pizza-slice:before{content:"\f818"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-plane-slash:before{content:"\e069"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pump-medical:before{content:"\e06a"}.fa-pump-soap:before{content:"\e06b"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-record-vinyl:before{content:"\f8d9"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-remove-format:before{content:"\f87d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-rust:before{content:"\e07a"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-salesforce:before{content:"\f83b"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-shield-virus:before{content:"\e06c"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopify:before{content:"\e057"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sink:before{content:"\e06d"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-soap:before{content:"\e06e"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-down-alt:before{content:"\f881"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-alpha-up-alt:before{content:"\f882"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-down-alt:before{content:"\f884"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-amount-up-alt:before{content:"\f885"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-down-alt:before{content:"\f886"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-numeric-up-alt:before{content:"\f887"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-speaker-deck:before{content:"\f83c"}.fa-spell-check:before{content:"\f891"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stackpath:before{content:"\f842"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-stopwatch-20:before{content:"\e06f"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-store-alt-slash:before{content:"\e070"}.fa-store-slash:before{content:"\e071"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swift:before{content:"\f8e1"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-symfony:before{content:"\f83d"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-tiktok:before{content:"\e07b"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toilet-paper-slash:before{content:"\e072"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-trailer:before{content:"\e041"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-trash-restore:before{content:"\f829"}.fa-trash-restore-alt:before{content:"\f82a"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbraco:before{content:"\f8e8"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-uncharted:before{content:"\e084"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-unity:before{content:"\e049"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-unsplash:before{content:"\e07c"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-nurse:before{content:"\f82f"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-users-slash:before{content:"\e073"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-vest:before{content:"\e085"}.fa-vest-patches:before{content:"\e086"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-virus:before{content:"\e074"}.fa-virus-slash:before{content:"\e075"}.fa-viruses:before{content:"\e076"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-voicemail:before{content:"\f897"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-watchman-monitoring:before{content:"\e087"}.fa-water:before{content:"\f773"}.fa-wave-square:before{content:"\f83e"}.fa-waze:before{content:"\f83f"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wodu:before{content:"\e088"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yammer:before{content:"\f840"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.fab,.far{font-weight:400}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900} \ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/all.min.css:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/all.min.css:Zone.Identifier new file mode 100644 index 00000000..45362a79 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/all.min.css:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bootstrap.bundle.min.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bootstrap.bundle.min.js.download new file mode 100644 index 00000000..7961bdaf --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bootstrap.bundle.min.js.download @@ -0,0 +1,7 @@ +/*! + * Bootstrap v4.6.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(e);function o(t,e){for(var n=0;n=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};l.jQueryDetection(),i.default.fn.emulateTransitionEnd=s,i.default.event.special[l.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(i.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var u="alert",f=i.default.fn[u],d=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){i.default.removeData(this._element,"bs.alert"),this._element=null},e._getRootElement=function(t){var e=l.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=i.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=i.default.Event("close.bs.alert");return i.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(i.default(t).removeClass("show"),i.default(t).hasClass("fade")){var n=l.getTransitionDurationFromElement(t);i.default(t).one(l.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){i.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.alert");o||(o=new t(this),n.data("bs.alert",o)),"close"===e&&o[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}}]),t}();i.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',d._handleDismiss(new d)),i.default.fn[u]=d._jQueryInterface,i.default.fn[u].Constructor=d,i.default.fn[u].noConflict=function(){return i.default.fn[u]=f,d._jQueryInterface};var c=i.default.fn.button,h=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=i.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))t=!1;else{var r=n.querySelector(".active");r&&i.default(r).removeClass("active")}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),this.shouldAvoidTriggerChange||i.default(o).trigger("change")),o.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&i.default(this._element).toggleClass("active"))},e.dispose=function(){i.default.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this),r=o.data("bs.button");r||(r=new t(this),o.data("bs.button",r)),r.shouldAvoidTriggerChange=n,"toggle"===e&&r[e]()}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}}]),t}();i.default(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var e=t.target,n=e;if(i.default(e).hasClass("btn")||(e=i.default(e).closest(".btn")[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var o=e.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||h._jQueryInterface.call(i.default(e),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var e=i.default(t.target).closest(".btn")[0];i.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),i.default(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide("next")},e.nextWhenVisible=function(){var t=i.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide("prev")},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(l.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(".active.carousel-item");var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)i.default(this._element).one("slid.bs.carousel",(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var o=t>n?"next":"prev";this._slide(o,this._items[t])}},e.dispose=function(){i.default(this._element).off(m),i.default.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=a({},v,t),l.typeCheckConfig(p,t,_),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&i.default(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&i.default(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&b[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&b[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};i.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(i.default(this._element).on("pointerdown.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(i.default(this._element).on("touchstart.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),i.default(this._element).on("touchend.bs.carousel",(function(t){return n(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var a=(o+("prev"===t?-1:1))%this._items.length;return-1===a?this._items[this._items.length-1]:this._items[a]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),r=i.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:o,to:n});return i.default(this._element).trigger(r),r},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));i.default(e).removeClass("active");var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&i.default(n).addClass("active")}},e._updateInterval=function(){var t=this._activeElement||this._element.querySelector(".active.carousel-item");if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},e._slide=function(t,e){var n,o,r,a=this,s=this._element.querySelector(".active.carousel-item"),u=this._getItemIndex(s),f=e||s&&this._getItemByDirection(t,s),d=this._getItemIndex(f),c=Boolean(this._interval);if("next"===t?(n="carousel-item-left",o="carousel-item-next",r="left"):(n="carousel-item-right",o="carousel-item-prev",r="right"),f&&i.default(f).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(f,r).isDefaultPrevented()&&s&&f){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(f),this._activeElement=f;var h=i.default.Event("slid.bs.carousel",{relatedTarget:f,direction:r,from:u,to:d});if(i.default(this._element).hasClass("slide")){i.default(f).addClass(o),l.reflow(f),i.default(s).addClass(n),i.default(f).addClass(n);var p=l.getTransitionDurationFromElement(s);i.default(s).one(l.TRANSITION_END,(function(){i.default(f).removeClass(n+" "+o).addClass("active"),i.default(s).removeClass("active "+o+" "+n),a._isSliding=!1,setTimeout((function(){return i.default(a._element).trigger(h)}),0)})).emulateTransitionEnd(p)}else i.default(s).removeClass("active"),i.default(f).addClass("active"),this._isSliding=!1,i.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data("bs.carousel"),o=a({},v,i.default(this).data());"object"==typeof e&&(o=a({},o,e));var r="string"==typeof e?e:o.slide;if(n||(n=new t(this,o),i.default(this).data("bs.carousel",n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if("undefined"==typeof n[r])throw new TypeError('No method named "'+r+'"');n[r]()}else o.interval&&o.ride&&(n.pause(),n.cycle())}))},t._dataApiClickHandler=function(e){var n=l.getSelectorFromElement(this);if(n){var o=i.default(n)[0];if(o&&i.default(o).hasClass("carousel")){var r=a({},i.default(o).data(),i.default(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),t._jQueryInterface.call(i.default(o),r),s&&i.default(o).data("bs.carousel").to(s),e.preventDefault()}}},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return v}}]),t}();i.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",y._dataApiClickHandler),i.default(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e0&&(this._selector=a,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){i.default(this._element).hasClass("show")?this.hide():this.show()},e.show=function(){var e,n,o=this;if(!this._isTransitioning&&!i.default(this._element).hasClass("show")&&(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains("collapse")}))).length&&(e=null),!(e&&(n=i.default(e).not(this._selector).data("bs.collapse"))&&n._isTransitioning))){var r=i.default.Event("show.bs.collapse");if(i.default(this._element).trigger(r),!r.isDefaultPrevented()){e&&(t._jQueryInterface.call(i.default(e).not(this._selector),"hide"),n||i.default(e).data("bs.collapse",null));var a=this._getDimension();i.default(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[a]=0,this._triggerArray.length&&i.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var s="scroll"+(a[0].toUpperCase()+a.slice(1)),u=l.getTransitionDurationFromElement(this._element);i.default(this._element).one(l.TRANSITION_END,(function(){i.default(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[a]="",o.setTransitioning(!1),i.default(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(u),this._element.style[a]=this._element[s]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&i.default(this._element).hasClass("show")){var e=i.default.Event("hide.bs.collapse");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",l.reflow(this._element),i.default(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var r=0;r=0)return 1;return 0}();var k=D&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),N))}};function A(t){return t&&"[object Function]"==={}.toString.call(t)}function I(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function O(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function x(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=I(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?t:x(O(t))}function j(t){return t&&t.referenceNode?t.referenceNode:t}var L=D&&!(!window.MSInputMethodContext||!document.documentMode),P=D&&/MSIE 10/.test(navigator.userAgent);function F(t){return 11===t?L:10===t?P:L||P}function R(t){if(!t)return document.documentElement;for(var e=F(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===I(n,"position")?R(n):n:t?t.ownerDocument.documentElement:document.documentElement}function H(t){return null!==t.parentNode?H(t.parentNode):t}function M(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var a,s,l=r.commonAncestorContainer;if(t!==l&&e!==l||i.contains(o))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&R(a.firstElementChild)!==a?R(l):l;var u=H(t);return u.host?M(u.host,e):M(t,H(e).host)}function q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var o=t.ownerDocument.documentElement,r=t.ownerDocument.scrollingElement||o;return r[n]}return t[n]}function B(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=q(e,"top"),o=q(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}function Q(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+i+"Width"])}function W(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],F(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function U(t){var e=t.body,n=t.documentElement,i=F(10)&&getComputedStyle(n);return{height:W("Height",e,n,i),width:W("Width",e,n,i)}}var V=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Y=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],i=F(10),o="HTML"===e.nodeName,r=G(t),a=G(e),s=x(t),l=I(e),u=parseFloat(l.borderTopWidth),f=parseFloat(l.borderLeftWidth);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=K({top:r.top-a.top-u,left:r.left-a.left-f,width:r.width,height:r.height});if(d.marginTop=0,d.marginLeft=0,!i&&o){var c=parseFloat(l.marginTop),h=parseFloat(l.marginLeft);d.top-=u-c,d.bottom-=u-c,d.left-=f-h,d.right-=f-h,d.marginTop=c,d.marginLeft=h}return(i&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(d=B(d,e)),d}function J(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=$(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:q(n),s=e?0:q(n,"left"),l={top:a-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:o,height:r};return K(l)}function Z(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===I(t,"position"))return!0;var n=O(t);return!!n&&Z(n)}function tt(t){if(!t||!t.parentElement||F())return document.documentElement;for(var e=t.parentElement;e&&"none"===I(e,"transform");)e=e.parentElement;return e||document.documentElement}function et(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},a=o?tt(t):M(t,j(e));if("viewport"===i)r=J(a,o);else{var s=void 0;"scrollParent"===i?"BODY"===(s=x(O(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===i?t.ownerDocument.documentElement:i;var l=$(s,a,o);if("HTML"!==s.nodeName||Z(a))r=l;else{var u=U(t.ownerDocument),f=u.height,d=u.width;r.top+=l.top-l.marginTop,r.bottom=f+l.top,r.left+=l.left-l.marginLeft,r.right=d+l.left}}var c="number"==typeof(n=n||0);return r.left+=c?n:n.left||0,r.top+=c?n:n.top||0,r.right-=c?n:n.right||0,r.bottom-=c?n:n.bottom||0,r}function nt(t){return t.width*t.height}function it(t,e,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=et(n,i,r,o),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map((function(t){return X({key:t},s[t],{area:nt(s[t])})})).sort((function(t,e){return e.area-t.area})),u=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),f=u.length>0?u[0].key:l[0].key,d=t.split("-")[1];return f+(d?"-"+d:"")}function ot(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=i?tt(e):M(e,j(n));return $(n,o,i)}function rt(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function at(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function st(t,e,n){n=n.split("-")[0];var i=rt(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),a=r?"top":"left",s=r?"left":"top",l=r?"height":"width",u=r?"width":"height";return o[a]=e[a]+e[l]/2-i[l]/2,o[s]=n===s?e[s]-i[u]:e[at(s)],o}function lt(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function ut(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var i=lt(t,(function(t){return t[e]===n}));return t.indexOf(i)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&A(n)&&(e.offsets.popper=K(e.offsets.popper),e.offsets.reference=K(e.offsets.reference),e=n(e,t))})),e}function ft(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=ot(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=it(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=st(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=ut(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function dt(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function ct(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i1&&void 0!==arguments[1]&&arguments[1],n=Tt.indexOf(t),i=Tt.slice(n+1).concat(Tt.slice(0,n));return e?i.reverse():i}var St="flip",Dt="clockwise",Nt="counterclockwise";function kt(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(lt(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(u=u.map((function(t,i){var o=(1===i?!r:r)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],a=o[2];if(!r)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=i}return K(s)[e]/100*r}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r;return r}(t,o,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,i){_t(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))}))})),o}var At={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",f={start:z({},l,r[l]),end:z({},l,r[l]+r[u]-a[u])};t.offsets.popper=X({},a,f[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,i=t.placement,o=t.offsets,r=o.popper,a=o.reference,s=i.split("-")[0],l=void 0;return l=_t(+n)?[+n,0]:kt(n,r,a,s),"left"===s?(r.top+=l[0],r.left-=l[1]):"right"===s?(r.top+=l[0],r.left+=l[1]):"top"===s?(r.left+=l[0],r.top-=l[1]):"bottom"===s&&(r.left+=l[0],r.top+=l[1]),t.popper=r,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||R(t.instance.popper);t.instance.reference===n&&(n=R(n));var i=ct("transform"),o=t.instance.popper.style,r=o.top,a=o.left,s=o[i];o.top="",o.left="",o[i]="";var l=et(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=r,o.left=a,o[i]=s,e.boundaries=l;var u=e.priority,f=t.offsets.popper,d={primary:function(t){var n=f[t];return f[t]l[t]&&!e.escapeWithReference&&(i=Math.min(f[n],l[t]-("right"===t?f.width:f.height))),z({},n,i)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";f=X({},f,d[e](t))})),t.offsets.popper=f,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return n[s]r(i[s])&&(t.offsets.popper[l]=r(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!wt(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,a=r.popper,s=r.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",f=l?"Top":"Left",d=f.toLowerCase(),c=l?"left":"top",h=l?"bottom":"right",p=rt(i)[u];s[h]-pa[h]&&(t.offsets.popper[d]+=s[d]+p-a[h]),t.offsets.popper=K(t.offsets.popper);var m=s[d]+s[u]/2-p/2,g=I(t.instance.popper),v=parseFloat(g["margin"+f]),_=parseFloat(g["border"+f+"Width"]),b=m-t.offsets.popper[d]-v-_;return b=Math.max(Math.min(a[u]-p,b),0),t.arrowElement=i,t.offsets.arrow=(z(n={},d,Math.round(b)),z(n,c,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(dt(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=et(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],o=at(i),r=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case St:a=[i,o];break;case Dt:a=Ct(i);break;case Nt:a=Ct(i,!0);break;default:a=e.behavior}return a.forEach((function(s,l){if(i!==s||a.length===l+1)return t;i=t.placement.split("-")[0],o=at(i);var u=t.offsets.popper,f=t.offsets.reference,d=Math.floor,c="left"===i&&d(u.right)>d(f.left)||"right"===i&&d(u.left)d(f.top)||"bottom"===i&&d(u.top)d(n.right),m=d(u.top)d(n.bottom),v="left"===i&&h||"right"===i&&p||"top"===i&&m||"bottom"===i&&g,_=-1!==["top","bottom"].indexOf(i),b=!!e.flipVariations&&(_&&"start"===r&&h||_&&"end"===r&&p||!_&&"start"===r&&m||!_&&"end"===r&&g),y=!!e.flipVariationsByContent&&(_&&"start"===r&&p||_&&"end"===r&&h||!_&&"start"===r&&g||!_&&"end"===r&&m),w=b||y;(c||v||w)&&(t.flipped=!0,(c||v)&&(i=a[l+1]),w&&(r=function(t){return"end"===t?"start":"start"===t?"end":t}(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=X({},t.offsets.popper,st(t.instance.popper,t.offsets.reference,t.placement)),t=ut(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=r[n]-(s?o[a?"width":"height"]:0),t.placement=at(e),t.offsets.popper=K(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!wt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=lt(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};V(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=k(this.update.bind(this)),this.options=X({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(X({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){i.options.modifiers[e]=X({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return X({name:t},i.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&A(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return Y(t,[{key:"update",value:function(){return ft.call(this)}},{key:"destroy",value:function(){return ht.call(this)}},{key:"enableEventListeners",value:function(){return gt.call(this)}},{key:"disableEventListeners",value:function(){return vt.call(this)}}]),t}();It.Utils=("undefined"!=typeof window?window:global).PopperUtils,It.placements=Et,It.Defaults=At;var Ot="dropdown",xt=i.default.fn[Ot],jt=new RegExp("38|40|27"),Lt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},Pt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},Ft=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!i.default(this._element).hasClass("disabled")){var e=i.default(this._menu).hasClass("show");t._clearMenus(),e||this.show(!0)}},e.show=function(e){if(void 0===e&&(e=!1),!(this._element.disabled||i.default(this._element).hasClass("disabled")||i.default(this._menu).hasClass("show"))){var n={relatedTarget:this._element},o=i.default.Event("show.bs.dropdown",n),r=t._getParentFromElement(this._element);if(i.default(r).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar&&e){if("undefined"==typeof It)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var a=this._element;"parent"===this._config.reference?a=r:l.isElement(this._config.reference)&&(a=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(a=this._config.reference[0])),"scrollParent"!==this._config.boundary&&i.default(r).addClass("position-static"),this._popper=new It(a,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===i.default(r).closest(".navbar-nav").length&&i.default(document.body).children().on("mouseover",null,i.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),i.default(this._menu).toggleClass("show"),i.default(r).toggleClass("show").trigger(i.default.Event("shown.bs.dropdown",n))}}},e.hide=function(){if(!this._element.disabled&&!i.default(this._element).hasClass("disabled")&&i.default(this._menu).hasClass("show")){var e={relatedTarget:this._element},n=i.default.Event("hide.bs.dropdown",e),o=t._getParentFromElement(this._element);i.default(o).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),i.default(this._menu).toggleClass("show"),i.default(o).toggleClass("show").trigger(i.default.Event("hidden.bs.dropdown",e)))}},e.dispose=function(){i.default.removeData(this._element,"bs.dropdown"),i.default(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;i.default(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},e._getConfig=function(t){return t=a({},this.constructor.Default,i.default(this._element).data(),t),l.typeCheckConfig(Ot,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(".dropdown-menu"))}return this._menu},e._getPlacement=function(){var t=i.default(this._element.parentNode),e="bottom-start";return t.hasClass("dropup")?e=i.default(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":t.hasClass("dropright")?e="right-start":t.hasClass("dropleft")?e="left-start":i.default(this._menu).hasClass("dropdown-menu-right")&&(e="bottom-end"),e},e._detectNavbar=function(){return i.default(this._element).closest(".navbar").length>0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),a({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data("bs.dropdown");if(n||(n=new t(this,"object"==typeof e?e:null),i.default(this).data("bs.dropdown",n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,r=n.length;o0&&a--,40===e.which&&adocument.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var o=l.getTransitionDurationFromElement(this._dialog);i.default(this._element).off(l.TRANSITION_END),i.default(this._element).one(l.TRANSITION_END,(function(){t._element.classList.remove("modal-static"),n||i.default(t._element).one(l.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}},e._showElement=function(t){var e=this,n=i.default(this._element).hasClass("fade"),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),i.default(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,n&&l.reflow(this._element),i.default(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var r=i.default.Event("shown.bs.modal",{relatedTarget:t}),a=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,i.default(e._element).trigger(r)};if(n){var s=l.getTransitionDurationFromElement(this._dialog);i.default(this._dialog).one(l.TRANSITION_END,a).emulateTransitionEnd(s)}else a()},e._enforceFocus=function(){var t=this;i.default(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(e){document!==e.target&&t._element!==e.target&&0===i.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?i.default(this._element).on("keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||i.default(this._element).off("keydown.dismiss.bs.modal")},e._setResizeEvent=function(){var t=this;this._isShown?i.default(window).on("resize.bs.modal",(function(e){return t.handleUpdate(e)})):i.default(window).off("resize.bs.modal")},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){i.default(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),i.default(t._element).trigger("hidden.bs.modal")}))},e._removeBackdrop=function(){this._backdrop&&(i.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=i.default(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),i.default(this._backdrop).appendTo(document.body),i.default(this._element).on("click.dismiss.bs.modal",(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&l.reflow(this._backdrop),i.default(this._backdrop).addClass("show"),!t)return;if(!n)return void t();var o=l.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(l.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){i.default(this._backdrop).removeClass("show");var r=function(){e._removeBackdrop(),t&&t()};if(i.default(this._element).hasClass("fade")){var a=l.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(l.TRANSITION_END,r).emulateTransitionEnd(a)}else r()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:Qt,popperConfig:null},Zt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},te=function(){function t(t,e){if("undefined"==typeof It)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=i.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(i.default(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),i.default.removeData(this.element,this.constructor.DATA_KEY),i.default(this.element).off(this.constructor.EVENT_KEY),i.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&i.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===i.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=i.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){i.default(this.element).trigger(e);var n=l.findShadowRoot(this.element),o=i.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!o)return;var r=this.getTipElement(),a=l.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&i.default(r).addClass("fade");var s="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,u=this._getAttachment(s);this.addAttachmentClass(u);var f=this._getContainer();i.default(r).data(this.constructor.DATA_KEY,this),i.default.contains(this.element.ownerDocument.documentElement,this.tip)||i.default(r).appendTo(f),i.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new It(this.element,r,this._getPopperConfig(u)),i.default(r).addClass("show"),i.default(r).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&i.default(document.body).children().on("mouseover",null,i.default.noop);var d=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,i.default(t.element).trigger(t.constructor.Event.SHOWN),"out"===e&&t._leave(null,t)};if(i.default(this.tip).hasClass("fade")){var c=l.getTransitionDurationFromElement(this.tip);i.default(this.tip).one(l.TRANSITION_END,d).emulateTransitionEnd(c)}else d()}},e.hide=function(t){var e=this,n=this.getTipElement(),o=i.default.Event(this.constructor.Event.HIDE),r=function(){"show"!==e._hoverState&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),i.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(i.default(this.element).trigger(o),!o.isDefaultPrevented()){if(i.default(n).removeClass("show"),"ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,i.default(this.tip).hasClass("fade")){var a=l.getTransitionDurationFromElement(n);i.default(n).one(l.TRANSITION_END,r).emulateTransitionEnd(a)}else r();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(i.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),i.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=Vt(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?i.default(e).parent().is(t)||t.empty().append(e):t.text(i.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return a({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:l.isElement(this.config.container)?i.default(this.config.container):i.default(document).find(this.config.container)},e._getAttachment=function(t){return $t[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)i.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n="hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;i.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},i.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),i.default(e.getTipElement()).hasClass("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){"show"===e._hoverState&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){"out"===e._hoverState&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=i.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==Kt.indexOf(t)&&delete e[t]})),"number"==typeof(t=a({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),l.typeCheckConfig(Yt,t,this.constructor.DefaultType),t.sanitize&&(t.template=Vt(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(Xt);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(i.default(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.tooltip"),r="object"==typeof e&&e;if((o||!/dispose|hide/.test(e))&&(o||(o=new t(this,r),n.data("bs.tooltip",o)),"string"==typeof e)){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return Jt}},{key:"NAME",get:function(){return Yt}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Zt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Gt}}]),t}();i.default.fn[Yt]=te._jQueryInterface,i.default.fn[Yt].Constructor=te,i.default.fn[Yt].noConflict=function(){return i.default.fn[Yt]=zt,te._jQueryInterface};var ee="popover",ne=i.default.fn[ee],ie=new RegExp("(^|\\s)bs-popover\\S+","g"),oe=a({},te.Default,{placement:"right",trigger:"click",content:"",template:''}),re=a({},te.DefaultType,{content:"(string|element|function)"}),ae={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},se=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var a=o.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},a.setContent=function(){var t=i.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(ie);null!==e&&e.length>0&&t.removeClass(e.join(""))},o._jQueryInterface=function(t){return this.each((function(){var e=i.default(this).data("bs.popover"),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new o(this,n),i.default(this).data("bs.popover",e)),"string"==typeof t)){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},r(o,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return oe}},{key:"NAME",get:function(){return ee}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return ae}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return re}}]),o}(te);i.default.fn[ee]=se._jQueryInterface,i.default.fn[ee].Constructor=se,i.default.fn[ee].noConflict=function(){return i.default.fn[ee]=ne,se._jQueryInterface};var le="scrollspy",ue=i.default.fn[le],fe={offset:10,method:"auto",target:""},de={offset:"number",method:"string",target:"(string|element)"},ce=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,i.default(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":"position",n="auto"===this._config.method?e:this._config.method,o="position"===n?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=l.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var a=e.getBoundingClientRect();if(a.width||a.height)return[i.default(e)[n]().top+o,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){i.default.removeData(this._element,"bs.scrollspy"),i.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=a({},fe,"object"==typeof t&&t?t:{})).target&&l.isElement(t.target)){var e=i.default(t.target).attr("id");e||(e=l.getUID(le),i.default(t.target).attr("id",e)),t.target="#"+e}return l.typeCheckConfig(le,t,de),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t li > .active":".active";n=(n=i.default.makeArray(i.default(o).find(a)))[n.length-1]}var s=i.default.Event("hide.bs.tab",{relatedTarget:this._element}),u=i.default.Event("show.bs.tab",{relatedTarget:n});if(n&&i.default(n).trigger(s),i.default(this._element).trigger(u),!u.isDefaultPrevented()&&!s.isDefaultPrevented()){r&&(e=document.querySelector(r)),this._activate(this._element,o);var f=function(){var e=i.default.Event("hidden.bs.tab",{relatedTarget:t._element}),o=i.default.Event("shown.bs.tab",{relatedTarget:n});i.default(n).trigger(e),i.default(t._element).trigger(o)};e?this._activate(e,e.parentNode,f):f()}}},e.dispose=function(){i.default.removeData(this._element,"bs.tab"),this._element=null},e._activate=function(t,e,n){var o=this,r=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?i.default(e).children(".active"):i.default(e).find("> li > .active"))[0],a=n&&r&&i.default(r).hasClass("fade"),s=function(){return o._transitionComplete(t,r,n)};if(r&&a){var u=l.getTransitionDurationFromElement(r);i.default(r).removeClass("show").one(l.TRANSITION_END,s).emulateTransitionEnd(u)}else s()},e._transitionComplete=function(t,e,n){if(e){i.default(e).removeClass("active");var o=i.default(e.parentNode).find("> .dropdown-menu .active")[0];o&&i.default(o).removeClass("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(i.default(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),l.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&i.default(t.parentNode).hasClass("dropdown-menu")){var r=i.default(t).closest(".dropdown")[0];if(r){var a=[].slice.call(r.querySelectorAll(".dropdown-toggle"));i.default(a).addClass("active")}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.tab");if(o||(o=new t(this),n.data("bs.tab",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}}]),t}();i.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),pe._jQueryInterface.call(i.default(this),"show")})),i.default.fn.tab=pe._jQueryInterface,i.default.fn.tab.Constructor=pe,i.default.fn.tab.noConflict=function(){return i.default.fn.tab=he,pe._jQueryInterface};var me=i.default.fn.toast,ge={animation:"boolean",autohide:"boolean",delay:"number"},ve={animation:!0,autohide:!0,delay:500},_e=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=i.default.Event("show.bs.toast");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),i.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),l.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=l.getTransitionDurationFromElement(this._element);i.default(this._element).one(l.TRANSITION_END,n).emulateTransitionEnd(o)}else n()}},e.hide=function(){if(this._element.classList.contains("show")){var t=i.default.Event("hide.bs.toast");i.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),i.default(this._element).off("click.dismiss.bs.toast"),i.default.removeData(this._element,"bs.toast"),this._element=null,this._config=null},e._getConfig=function(t){return t=a({},ve,i.default(this._element).data(),"object"==typeof t&&t?t:{}),l.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;i.default(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add("hide"),i.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var n=l.getTransitionDurationFromElement(this._element);i.default(this._element).one(l.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.toast");if(o||(o=new t(this,"object"==typeof e&&e),n.data("bs.toast",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e](this)}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"DefaultType",get:function(){return ge}},{key:"Default",get:function(){return ve}}]),t}();i.default.fn.toast=_e._jQueryInterface,i.default.fn.toast.Constructor=_e,i.default.fn.toast.noConflict=function(){return i.default.fn.toast=me,_e._jQueryInterface},t.Alert=d,t.Button=h,t.Carousel=y,t.Collapse=S,t.Dropdown=Ft,t.Modal=qt,t.Popover=se,t.Scrollspy=ce,t.Tab=pe,t.Toast=_e,t.Tooltip=te,t.Util=l,Object.defineProperty(t,"__esModule",{value:!0})})); +//# sourceMappingURL=bootstrap.bundle.min.js.map \ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bootstrap.bundle.min.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bootstrap.bundle.min.js.download:Zone.Identifier new file mode 100644 index 00000000..ce30460e Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bootstrap.bundle.min.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bs-cuong.jpg b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bs-cuong.jpg new file mode 100644 index 00000000..427c38e5 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bs-cuong.jpg differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bs_thai_circle.png b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bs_thai_circle.png new file mode 100644 index 00000000..46e1b764 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bs_thai_circle.png differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle(1).js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle(1).js.download new file mode 100644 index 00000000..67446d46 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle(1).js.download @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AttachesTool=t():e.AttachesTool=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=6)}([function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(e){var r=n(2),o=setTimeout;function i(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(e,this)}function s(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void l(t.promise,e)}c(t.promise,r)}else(1===e._state?c:l)(t.promise,e._value)}))):e._deferreds.push(t)}function c(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void u(e);if("function"==typeof n)return void d((r=n,o=t,function(){r.apply(o,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){l(e,t)}var r,o}function l(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&a._immediateFn((function(){e._handled||a._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t0&&void 0!==arguments[0]?arguments[0]:{};if(e.url&&"string"!=typeof e.url)throw new Error("Url must be a string");if(e.url=e.url||"",e.method&&"string"!=typeof e.method)throw new Error("`method` must be a string or null");if(e.method=e.method?e.method.toUpperCase():"GET",e.headers&&"object"!==r(e.headers))throw new Error("`headers` must be an object or null");if(e.headers=e.headers||{},e.type&&("string"!=typeof e.type||!Object.values(o).includes(e.type)))throw new Error("`type` must be taken from module's «contentType» library");if(e.progress&&"function"!=typeof e.progress)throw new Error("`progress` must be a function or null");if(e.progress=e.progress||function(e){},e.beforeSend=e.beforeSend||function(e){},e.ratio&&"number"!=typeof e.ratio)throw new Error("`ratio` must be a number");if(e.ratio<0||e.ratio>100)throw new Error("`ratio` must be in a 0-100 interval");if(e.ratio=e.ratio||90,e.accept&&"string"!=typeof e.accept)throw new Error("`accept` must be a string with a list of allowed mime-types");if(e.accept=e.accept||"*/*",e.multiple&&"boolean"!=typeof e.multiple)throw new Error("`multiple` must be a true or false");if(e.multiple=e.multiple||!1,e.fieldName&&"string"!=typeof e.fieldName)throw new Error("`fieldName` must be a string");return e.fieldName=e.fieldName||"files",e},c=function(e){switch(e.method){case"GET":var t=l(e.data,o.URLENCODED);delete e.data,e.url=/\?/.test(e.url)?e.url+"&"+t:e.url+"?"+t;break;case"POST":case"PUT":case"DELETE":case"UPDATE":var n=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type||o.JSON}(e);(f.isFormData(e.data)||f.isFormElement(e.data))&&(n=o.FORM),e.data=l(e.data,n),n!==d.contentType.FORM&&(e.headers["content-type"]=n)}return e},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(arguments.length>1?arguments[1]:void 0){case o.URLENCODED:return f.urlEncode(e);case o.JSON:return f.jsonEncode(e);case o.FORM:return f.formEncode(e);default:return e}},u=function(e){return e>=200&&e<300},{contentType:o={URLENCODED:"application/x-www-form-urlencoded; charset=utf-8",FORM:"multipart/form-data",JSON:"application/json; charset=utf-8"},request:i,get:function(e){return e.method="GET",i(e)},post:a,transport:function(e){return e=s(e),f.selectFiles(e).then((function(t){for(var n=new FormData,r=0;r=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(6),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,l={},u=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(h,0,e)},d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1)for(var n=1;n HTMLElement")}},{key:"isObject",value:function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{key:"isFormData",value:function(e){return e instanceof FormData}},{key:"isFormElement",value:function(e){return e instanceof HTMLFormElement}},{key:"selectFiles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(t,n){var r=document.createElement("INPUT");r.type="file",e.multiple&&r.setAttribute("multiple","multiple"),e.accept&&r.setAttribute("accept",e.accept),r.style.display="none",document.body.appendChild(r),r.addEventListener("change",(function(e){var n=e.target.files;t(n),document.body.removeChild(r)}),!1),r.click()}))}},{key:"parseHeaders",value:function(e){var t=e.trim().split(/[\r\n]+/),n={};return t.forEach((function(e){var t=e.split(": "),r=t.shift(),o=t.join(": ");r&&(n[r]=o)})),n}}])&&r(t,n),e}()},function(e,t){var n=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape).replace(/%20/g,"+")},r=function(e,t,o,i){return t=t||null,o=o||"&",i=i||null,e?function(e){for(var t=new Array,n=0;n=0&&f.splice(t,1)}function y(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),g(t,e.attrs),m(e,t),t}function g(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=l||(l=y(t)),r=_.bind(null,n,a,!1),o=_.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),m(e,t),t}(t),r=E.bind(null,n,t),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=S.bind(null,n),o=function(){v(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return p(n,t),function(e){for(var r=[],o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=document.createElement(e);Array.isArray(n)?(t=o.classList).add.apply(t,s(n)):n&&o.classList.add(n);for(var i in r)o[i]=r[i];return o}function u(e){return 0===Object.keys(e).length}const f='';function d(e,t){for(var n=0;n4&&(a=n.substring(0,4)+"…");var s=l("div",this.CSS.fileIconLabel,{textContent:a,title:n});r&&(s.style.backgroundColor=r),o.appendChild(s)}else i.innerHTML=f;this.nodes.wrapper.appendChild(o)}},{key:"removeLoader",value:function(){var e=this;setTimeout((function(){return e.nodes.wrapper.classList.remove(e.CSS.wrapperLoading,e.CSS.loader)}),500)}},{key:"showFileData",value:function(){this.nodes.wrapper.classList.add(this.CSS.wrapperWithFile);var e=this.data,t=e.file,n=e.title;this.appendFileIcon(t);var r=l("div",this.CSS.fileInfo);if(this.nodes.title=l("div",this.CSS.title,{contentEditable:!1===this.readOnly}),this.nodes.title.dataset.placeholder=this.api.i18n.t("File title"),this.nodes.title.textContent=n||"",r.appendChild(this.nodes.title),t.size){var o,i,a=l("div",this.CSS.size);Math.log10(+t.size)>=6?(o="MiB",i=t.size/Math.pow(2,20)):(o="KiB",i=t.size/Math.pow(2,10)),a.textContent=i.toFixed(1),a.setAttribute("data-size",o),r.appendChild(a)}if(this.nodes.wrapper.appendChild(r),void 0!==t.url){var s=l("a",this.CSS.downloadButton,{innerHTML:'',href:t.url,target:"_blank",rel:"nofollow noindex noreferrer"});this.nodes.wrapper.appendChild(s)}}},{key:"uploadingFailed",value:function(e){this.api.notifier.show({message:e,style:"error"}),this.removeLoader()}},{key:"data",get:function(){return this._data},set:function(e){var t=e.file,n=e.title;this._data={file:t,title:n}}}])&&d(t.prototype,n),r&&d(t,r),e}()}]).default})); \ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle(1).js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle(1).js.download:Zone.Identifier new file mode 100644 index 00000000..c6db04ab Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle(1).js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle.js.download new file mode 100644 index 00000000..8a3c3550 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle.js.download @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Underline=t():e.Underline=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=4)}([function(e,t,n){var r=n(1),o=n(2);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function u(e){for(var t=-1,n=0;n'}}])&&o(t.prototype,n),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()}]).default})); \ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle.js.download:Zone.Identifier new file mode 100644 index 00000000..366c6e11 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/bundle.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/code.umd.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/code.umd.js.download new file mode 100644 index 00000000..4d29d6b3 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/code.umd.js.download @@ -0,0 +1,8 @@ +(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ce-code__textarea{min-height:200px;font-family:Menlo,Monaco,Consolas,Courier New,monospace;color:#41314e;line-height:1.6em;font-size:12px;background:#f8f7fa;border:1px solid #f1f1f4;box-shadow:none;white-space:pre;word-wrap:normal;overflow-x:auto;resize:vertical}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})(); +(function(i,o){typeof exports=="object"&&typeof module<"u"?module.exports=o():typeof define=="function"&&define.amd?define(o):(i=typeof globalThis<"u"?globalThis:i||self,i.CodeTool=o())})(this,function(){"use strict";function i(h,t){let s="";for(;s!==` +`&&t>0;)t=t-1,s=h.substr(t,1);return s===` +`&&(t+=1),t}const o='';/** + * CodeTool for Editor.js + * @version 2.0.0 + * @license MIT + */class l{static get isReadOnlySupported(){return!0}static get enableLineBreaks(){return!0}constructor({data:t,config:e,api:s,readOnly:r}){this.api=s,this.readOnly=r,this.placeholder=this.api.i18n.t(e.placeholder||l.DEFAULT_PLACEHOLDER),this.CSS={baseClass:this.api.styles.block,input:this.api.styles.input,wrapper:"ce-code",textarea:"ce-code__textarea"},this.nodes={holder:null,textarea:null},this.data={code:t.code??""},this.nodes.holder=this.drawView()}render(){return this.nodes.holder}save(t){return{code:t.querySelector("textarea").value}}onPaste(t){const e=t.detail;if("data"in e){const s=e.data;this.data={code:s||""}}}get data(){return this._data}set data(t){this._data=t,this.nodes.textarea&&(this.nodes.textarea.value=t.code)}static get toolbox(){return{icon:o,title:"Code"}}static get DEFAULT_PLACEHOLDER(){return"Enter a code"}static get pasteConfig(){return{tags:["pre"]}}static get sanitize(){return{code:!0}}tabHandler(t){t.stopPropagation(),t.preventDefault();const e=t.target,s=t.shiftKey,r=e.selectionStart,a=e.value,n=" ";let d;if(!s)d=r+n.length,e.value=a.substring(0,r)+n+a.substring(r);else{const c=i(a,r);if(a.substr(c,n.length)!==n)return;e.value=a.substring(0,c)+a.substring(c+n.length),d=r-n.length}e.setSelectionRange(d,d)}drawView(){const t=document.createElement("div"),e=document.createElement("textarea");return t.classList.add(this.CSS.baseClass,this.CSS.wrapper),e.classList.add(this.CSS.textarea,this.CSS.input),e.value=this.data.code,e.placeholder=this.placeholder,this.readOnly&&(e.disabled=!0),t.appendChild(e),e.addEventListener("keydown",s=>{switch(s.code){case"Tab":this.tabHandler(s);break}}),this.nodes.textarea=e,t}}return l}); diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/code.umd.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/code.umd.js.download:Zone.Identifier new file mode 100644 index 00000000..eb28a8c4 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/code.umd.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/css b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/css new file mode 100644 index 00000000..80f6e301 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/css @@ -0,0 +1,560 @@ +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 200; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaORs71cA.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 200; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaHRs71cA.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 200; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaMRs71cA.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 200; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaNRs71cA.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 200; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaDRs4.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 300; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaORs71cA.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 300; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaHRs71cA.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 300; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaMRs71cA.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 300; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaNRs71cA.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 300; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaDRs4.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaORs71cA.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaHRs71cA.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaMRs71cA.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaNRs71cA.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaDRs4.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 600; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaORs71cA.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 600; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaHRs71cA.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 600; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaMRs71cA.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 600; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaNRs71cA.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 600; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaDRs4.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 700; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaORs71cA.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 700; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaHRs71cA.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 700; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaMRs71cA.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 700; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaNRs71cA.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 700; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaDRs4.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 800; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaORs71cA.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 800; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaHRs71cA.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 800; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaMRs71cA.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 800; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaNRs71cA.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 800; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaDRs4.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 900; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaORs71cA.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 900; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaHRs71cA.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 900; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaMRs71cA.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 900; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaNRs71cA.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: italic; + font-weight: 900; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXX3I6Li01BKofIMNaDRs4.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 200; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOOaBXso.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 200; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIMeaBXso.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 200; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOuaBXso.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 200; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIO-aBXso.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 200; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofINeaB.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 300; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOOaBXso.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 300; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIMeaBXso.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 300; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOuaBXso.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 300; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIO-aBXso.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 300; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofINeaB.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOOaBXso.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIMeaBXso.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOuaBXso.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIO-aBXso.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofINeaB.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 600; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOOaBXso.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 600; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIMeaBXso.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 600; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOuaBXso.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 600; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIO-aBXso.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 600; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofINeaB.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 700; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOOaBXso.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 700; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIMeaBXso.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 700; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOuaBXso.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 700; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIO-aBXso.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 700; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofINeaB.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 800; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOOaBXso.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 800; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIMeaBXso.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 800; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOuaBXso.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 800; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIO-aBXso.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 800; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofINeaB.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 900; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOOaBXso.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 900; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIMeaBXso.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* vietnamese */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 900; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIOuaBXso.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 900; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofIO-aBXso.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 900; + src: url(https://fonts.gstatic.com/s/nunito/v32/XRXV3I6Li01BKofINeaB.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/css:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/css:Zone.Identifier new file mode 100644 index 00000000..4f14ecfb Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/css:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/custom.css b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/custom.css new file mode 100644 index 00000000..c7ae6139 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/custom.css @@ -0,0 +1,1788 @@ +/* ========================================================================== + Custom CSS — Highest priority override stylesheet + ========================================================================== */ + +/* ========================================================================== + 1. Design Tokens + ========================================================================== */ +:root { + --color-primary: #007bff; + --color-primary-hover: #0056b3; + --color-primary-light: #f0f9ff; + --color-secondary: #6c757d; + --color-success: #28a745; + --color-warning: #ffc107; + --color-danger: #dc3545; + --color-old-brick: #881c1c; + --color-background: #ffffff; + --color-surface: #fafafa; + --color-border: #dee2e6; + --color-text-main: #333333; + --color-text-muted: #6c757d; + --color-text-light: #ffffff; + --font-family-base: 'Open Sans', Arial, Helvetica, sans-serif; + --font-family-heading: 'Open Sans', Arial, Helvetica, sans-serif; + --spacing-md: 20px; + --radius-md: 4px; + --radius-lg: 8px; + --spacing: 0.25rem; +} + +/* ========================================================================== + 2. Global Base Overrides + ========================================================================== */ +body, +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { + font-family: var(--font-family-base) !important; + font-feature-settings: + 'liga' off, + 'clig' off !important; +} + +[data-component-id='umass_base:tophat'] { + background-color: transparent !important; +} + +.navigation-container { + display: flex; + align-items: center; + justify-content: flex-end; + gap: 1.5rem; + flex-grow: 1; +} + +/* Visibility utility classes (desktop default) */ +.mobile-only { + display: none !important; +} +.desktop-only { + display: block; +} + +/* ========================================================================== + 3. Brand Color Overrides + ========================================================================== */ +.bg-primary-600, +.cc-component-container.cc--footer, +.btn, +.badge-primary { + background-color: var(--color-old-brick) !important; + border-color: var(--color-old-brick) !important; + color: #fff !important; +} + +i, +.btn-outline-primary { + color: #fff !important; +} + +.page-item.active .page-link { + z-index: 3; + color: #fff !important; + background-color: var(--color-old-brick); + border-color: var(--color-old-brick); +} + +.bg-gradient-primary { + background-color: var(--color-old-brick) !important; + background-image: unset; +} + +.page-link, +.text-primary, +[class^='text-primary-'], +[class*=' text-primary-'] { + color: var(--color-old-brick) !important; +} + +#l--main-header { + box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important; +} + +.doctor-page #pagination-controls button.is-active { + background-color: var(--color-old-brick); +} + +.header-hospital-name { + display: none; +} + +/* ========================================================================== + 4. Component Styles + ========================================================================== */ + +/* --- Ambient Video Gradient --- */ +.f--ambient-video::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 50%; + background-image: linear-gradient(180deg, transparent, #000); + pointer-events: none; + z-index: 1; +} + +/* --- Hero & Header Gradients --- */ +.bg-linear-hero { + background: linear-gradient(180deg, transparent, #000) !important; +} + +.transparent-header .region-header { + background: linear-gradient(0deg, transparent, #000); +} + +.bg-linear-service { + background: linear-gradient(#60a7d700, var(--color-old-brick)) !important; +} + +/* --- Tabbed Media Content --- */ +.cc--tabbed-media-content .f--description p { + color: #000000 !important; +} + +.cc--tabbed-media-content .f--description a { + color: var(--color-old-brick) !important; +} + +.cc--tabbed-media-content .tab-labels-inner { + border-bottom-color: #cccccc !important; +} + +.cc--tabbed-media-content .tab-label { + color: #555555 !important; + font-weight: 700 !important; +} + +.cc--tabbed-media-content .tab-label[aria-selected='true'] { + color: #000000 !important; + border-bottom: 3px solid #000000 !important; +} + +.cc--tabbed-media-content .tabbed-media-content-media-col { + align-items: center !important; + justify-content: center !important; +} + +/* --- List Item Weight Override --- */ +.lc--layout-container ol li, +.lc--layout-container ul li, +.sg-pattern-example ol li, +.sg-pattern-example ul li { + font-weight: var(--font-weight-extrabold); +} + +/* --- Map Section --- */ +#map-section .branch-text { + color: #111827; +} + +#map-section .branch-card { + background-color: var(--color-white, #ffffff); +} + +#map-section .branch-card.active { + background-color: var(--color-old-brick); +} + +#map-section .branch-card.active .branch-title, +#map-section .branch-card.active .branch-text, +#map-section .branch-card.active .branch-icon { + color: #ffffff; +} + +/* --- Training Detail Layout (base / mobile-first) --- */ +.training-section { + padding-top: 1.5rem; + padding-bottom: 1.5rem; +} + +.training-layout { + display: flex; + flex-wrap: wrap; + gap: 1rem; +} + +.training-main { + flex: 1 1 100%; + min-width: 0; +} + +.training-sidebar { + flex: 1 1 100%; +} + +.training-sidebar a { + border: white 1px solid; +} + +.training-sticky { + position: static; +} + +.training-layout table tr:first-child td, +.training-layout table th { + background-color: var(--color-old-brick, #881c1c) !important; + color: #ffffff !important; + font-weight: 700; + text-align: center; +} + +.training-layout table td, +.training-layout table th { + border: 1px solid #dee2e6; + padding: 8px 12px; +} + +/* --- Custom Tab Buttons (Segmented Control) --- */ +.custom-tabs-nav-container { + display: flex; + flex-direction: column; + justify-content: center; + width: 100%; +} + +.tabs-container { + background-color: var(--color-old-brick); + border-radius: 8px; + padding: 4px; + display: flex; + gap: 4px; + width: 100%; + max-width: 860px; + margin-bottom: calc(var(--spacing) * 8); +} + +.custom-tab-btn { + padding: 8px 16px; + border: none; + background-color: transparent; + color: white; + cursor: pointer; + border-radius: 6px; + transition: all 0.2s ease-in-out; + font-weight: 600; + font-size: 16px; + flex: 1; + text-align: center; + min-width: 120px; +} + +.custom-tab-btn:hover { + color: rgba(255, 255, 255, 0.8); + background-color: transparent; +} + +/* --- Utility Classes --- */ +.mb-4 { + margin-bottom: calc(var(--spacing) * 4); +} +.h-full { + height: 100%; +} +.border-gray-1 { + border: 1px solid rgb(239, 239, 240); + border-radius: 15px; +} + +/* --- Editor.js Table Styling --- */ +figure.table { + width: 100%; + overflow-x: auto; + margin: 2rem 0; +} + +figure.table table { + width: 100%; + border-collapse: collapse; + font-size: 0.95rem; + box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05); + background-color: #ffffff; + border: 1px solid #e0e0e0; +} + +figure.table table th, +figure.table table td { + padding: 12px 15px; + border: 1px solid #e0e0e0; + vertical-align: middle; +} + +figure.table table tr:first-child td, +figure.table table th { + background-color: var(--color-old-brick, #881c1c) !important; + color: #ffffff !important; + font-weight: 700; + text-align: center; +} + +figure.table table tr { + border-bottom: 1px solid #e0e0e0; +} + +figure.table table tr:nth-of-type(even) { + background-color: #fcfcfc; +} + +figure.table table tr:hover { + background-color: #f5f5f5; +} + +/* --- Category / Tag Badge Pill --- */ +#selected_categoryIds, +#selected_tagIds { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-top: 8px; +} + +.category-badge { + display: inline-flex; + align-items: center; + background-color: #8b0000; + color: #ffffff; + padding: 4px 6px 4px 12px; + border-radius: 12px; + font-size: 13px; + font-family: sans-serif; + line-height: 1; +} + +.badge-text { + margin-right: 6px; + white-space: nowrap; +} + +.remove_category-badge { + background-color: #ffffff; + color: #000000; + border: 1px solid #333333; + border-radius: 2px; + font-size: 13px; + font-weight: bold; + line-height: 1; + padding: 1px 4px; + cursor: pointer; + display: inline-flex; + align-items: center; + justify-content: center; +} + +.remove_category-badge:hover { + background-color: #f0f0f0; + color: #ff0000; +} + +/* --- Swiper Carousel --- */ +.course-swiper-component { + position: relative; + padding: 10px 24px; + width: 100%; +} + +.course-swiper-component .swiper { + width: 100%; + padding-bottom: 10px; +} + +.course-swiper-component .swiper-slide { + height: auto; + display: flex; +} + +.course-swiper-component .swiper-button-prev, +.course-swiper-component .swiper-button-next { + width: 42px; + height: 42px; + background-color: #ffffff; + border-radius: 50%; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + color: #333333; + top: 50%; + transform: translateY(-50%); + z-index: 10; +} + +.course-swiper-component .swiper-button-prev { + left: 0; +} +.course-swiper-component .swiper-button-next { + right: 0; +} + +.course-swiper-component .swiper-button-prev::after, +.course-swiper-component .swiper-button-next::after { + font-size: 15px; + font-weight: bold; +} + +.course-swiper-component .swiper-button-prev:hover, +.course-swiper-component .swiper-button-next:hover { + background-color: #f8f9fa; + color: #9b1b1b; +} + +/* Global Swiper button override */ +.swiper-button-prev, +.swiper-button-next { + width: 44px !important; + height: 44px !important; + background-color: #ffffff !important; + border-radius: 50% !important; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important; + color: #111111 !important; + display: flex !important; + align-items: center !important; + justify-content: center !important; + font-size: 22px !important; + font-weight: bold !important; + z-index: 50 !important; + cursor: pointer !important; +} + +.swiper-button-prev::after, +.swiper-button-next::after { + display: none !important; +} + +.swiper-button-prev:hover, +.swiper-button-next:hover { + background-color: #f1f1f1 !important; + color: #9b1b1b !important; + transform: scale(1.08); +} + +/* --- Education Page --- */ +.education .responsive-flex-container { + max-width: 1280px; + margin: auto; +} + +.education .bg-primary-600.rounded-lg.p-4.flex.flex-col.justify-center { + background-color: rgb(13, 113, 186); + border-radius: 8px; + display: flex; + flex-direction: column; + justify-content: center; + padding: 16px; + position: sticky; + top: 132px; +} + +.education .gap-3 { + gap: 0.75rem; +} +.flex { + display: flex !important; +} +.education .flex .h-stretch { + height: stretch; +} +.flex-col { + flex-direction: column; +} +.education .flex-row { + flex-direction: row; +} +.education .items-center { + align-items: center; +} + +.education .rounded-full { + justify-content: center; + background-color: var(--color-white); + border-radius: 32px; + width: 32px; + height: 32px; + align-items: center; +} + +.education .btn-navigation { + border-radius: 24px; + cursor: pointer; + background-color: var(--color-white); + color: var(--color-black); + box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15); + position: relative; + display: flex; + justify-content: center; + align-items: center; +} + +.education .btn-navigation svg { + color: var(--color-old-brick); +} +.education .btn-navigation svg:hover { + background-color: unset; +} + +.education .training-sidebar .text-white { + margin-bottom: 4px; +} + +.education .training-sidebar .btn { + padding: 10px 32px; + background-color: var(--color-background) !important; + border-radius: 0.5rem; + text-align: center; +} + +.education .training-sidebar .btn a { + text-decoration: unset; +} + +.education .swiper-dao-tao-02 a { + background-color: var(--color-white); +} + +.education .swiper-slide { + padding: 1rem; + height: stretch; +} + +.education .swiper-slide .btn { + padding: 0.75rem; + border-radius: 15px; +} + +.education .swiper-slide .flex.items-center { + justify-content: center; +} +.education .swiper-slide a { + text-decoration-line: none; +} + +.text-center { + text-align: center; +} + +.bg-white { + background-color: var(--color-background); +} + +.rounded-lg { + border-radius: 0.5rem; +} + +.overview-wrapper-shadow { + box-shadow: 0 0 30px #0000001a; +} + +/* ========================================================================== + 5. Responsive Breakpoints — 3 Groups Only + ========================================================================== */ + +/* --- MOBILE ONLY (≤ 768px) --- */ +@media (max-width: 768px) { + /* Hide ambient video on mobile */ + .f--ambient-video, + .video-controls { + display: none !important; + } + + .cc--tabbed-media-content .c--tabbed-media-content { + max-width: var(--max-width); + margin: 0 auto; + padding: var(--s2) var(--s1); + display: grid; + grid-template-columns: 1fr; + gap: var(--s2); + } + + .header-hospital-name { + display: none; + } + + .events-column, + .widget-sidebar-area { + display: none !important; + } + + .tabs-container { + flex-direction: column; + width: 100%; + max-width: 100%; + } + + .desktop-only { + display: none !important; + } + .mobile-only { + display: block !important; + } + + .navigation-container { + gap: 0.5rem; + } + + /* Hamburger button */ + #mobile-hamburger { + display: block; + z-index: 1001; + background: none; + border: none; + cursor: pointer; + padding: 10px; + } + + .hamburger-box { + width: 30px; + height: 24px; + display: inline-block; + position: relative; + } + + .hamburger-inner, + .hamburger-inner::before, + .hamburger-inner::after { + width: 30px; + height: 3px; + background-color: #fff; + border-radius: 2px; + position: absolute; + transition: + transform 0.3s ease, + opacity 0.2s ease; + } + + .hamburger-inner { + top: 50%; + transform: translateY(-50%); + } + .hamburger-inner::before { + content: ''; + top: -9px; + } + .hamburger-inner::after { + content: ''; + bottom: -9px; + } + + #mobile-hamburger.is-active .hamburger-inner { + transform: rotate(45deg); + } + #mobile-hamburger.is-active .hamburger-inner::before { + top: 0; + opacity: 0; + } + #mobile-hamburger.is-active .hamburger-inner::after { + bottom: 0; + transform: rotate(-90deg); + } + + /* Mobile flyout panel */ + #mobile-flyout-container { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: auto; + background: #fff; + z-index: 1000; + overflow-y: auto; + overflow-x: hidden; + padding-top: 80px; + } + + .primary-navigation { + display: block; + } + + .m--main-menu { + list-style: none; + margin: 0; + padding: 0; + } + .m--main-menu > .menu-item { + border-bottom: 1px solid #e0e0e0; + } + + .link-arrow-wrapper { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0; + } + + .link-arrow-wrapper > a { + flex: 1; + padding: 15px 20px; + color: #333; + text-decoration: none; + font-weight: 700; + font-size: 16px; + text-transform: uppercase; + letter-spacing: 0.05em; + } + + .arrow-toggle { + background: none; + border: none; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + min-width: 50px; + } + + .arrow-toggle svg { + transition: transform 0.3s ease; + } + .arrow-toggle.is-active svg { + transform: rotate(180deg); + } + + .submenu { + list-style: none; + margin: 0; + padding: 0; + } + .submenu .menu-item { + border-bottom: 1px solid #f0f0f0; + } + + .submenu .menu-item a, + .submenu .menu-item span { + display: block; + padding: 12px 20px; + color: #333; + text-decoration: none; + font-size: 15px; + text-transform: uppercase; + font-weight: 600; + letter-spacing: 0.03em; + } + + .submenu .menu-item a:hover { + background-color: #f5f5f5; + color: #881c1c; + } + + .mc--quicklink-button-menu, + .mc--utility-menu, + [data-component-id='umass_base:header-socials'] { + margin-top: 20px; + border-top: 2px solid #881c1c; + padding-top: 10px; + } +} + +/* --- TABLET ONLY (769px – 1024px) --- */ +@media screen and (min-width: 769px) and (max-width: 1024px) { + .desktop-only { + display: none !important; + } + .mobile-only { + display: none !important; + } + + .tablet-only { + display: block; + } + + .navigation-container { + gap: 0.5rem; + } + + .training-section { + padding-top: 2rem; + padding-bottom: 2rem; + } + .training-layout { + gap: 1.5rem; + } + .md\:mb-6 { + margin-bottom: calc(var(--spacing) * 6); + } + + /* Hamburger button */ + #mobile-hamburger { + display: block; + z-index: 1001; + background: none; + border: none; + cursor: pointer; + padding: 10px; + } + + .hamburger-box { + width: 30px; + height: 24px; + display: inline-block; + position: relative; + } + + .hamburger-inner, + .hamburger-inner::before, + .hamburger-inner::after { + width: 30px; + height: 3px; + background-color: #fff; + border-radius: 2px; + position: absolute; + transition: + transform 0.3s ease, + opacity 0.2s ease; + } + + .hamburger-inner { + top: 50%; + transform: translateY(-50%); + } + .hamburger-inner::before { + content: ''; + top: -9px; + } + .hamburger-inner::after { + content: ''; + bottom: -9px; + } + + #mobile-hamburger.is-active .hamburger-inner { + transform: rotate(45deg); + } + #mobile-hamburger.is-active .hamburger-inner::before { + top: 0; + opacity: 0; + } + #mobile-hamburger.is-active .hamburger-inner::after { + bottom: 0; + transform: rotate(-90deg); + } + + /* Tablet flyout panel */ + #mobile-flyout-container { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: auto; + background: #fff; + z-index: 1000; + overflow-y: auto; + overflow-x: hidden; + padding-top: 80px; + } + + .primary-navigation { + display: block; + } + + .m--main-menu { + list-style: none; + margin: 0; + padding: 0; + } + .m--main-menu > .menu-item { + border-bottom: 1px solid #e0e0e0; + } + + .link-arrow-wrapper { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0; + } + + .link-arrow-wrapper > a { + flex: 1; + padding: 15px 20px; + color: #333; + text-decoration: none; + font-weight: 700; + font-size: 16px; + text-transform: uppercase; + letter-spacing: 0.05em; + } + + .arrow-toggle { + background: none; + border: none; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + min-width: 50px; + } + + .arrow-toggle svg { + transition: transform 0.3s ease; + } + .arrow-toggle.is-active svg { + transform: rotate(180deg); + } + + .submenu { + list-style: none; + margin: 0; + padding: 0; + } + .submenu .menu-item { + border-bottom: 1px solid #f0f0f0; + } + + .submenu .menu-item a, + .submenu .menu-item span { + display: block; + padding: 12px 20px; + color: #333; + text-decoration: none; + font-size: 15px; + text-transform: uppercase; + font-weight: 600; + letter-spacing: 0.03em; + } + + .submenu .menu-item a:hover { + background-color: #f5f5f5; + color: #881c1c; + } + + .mc--quicklink-button-menu, + .mc--utility-menu, + [data-component-id='umass_base:header-socials'] { + margin-top: 20px; + border-top: 2px solid #881c1c; + padding-top: 10px; + } + + /* News Grid — 2 columns on tablet */ + .news-list { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 24px; + align-items: stretch; + } + + .featured-grid__item { + height: 100%; + display: flex; + } + + .featured-grid__item .news-card__image { + flex: none; + width: 100%; + aspect-ratio: 1 / 1; + margin-bottom: 0 !important; + } + + .featured-grid__item .news-card__image > div { + height: 100%; + width: 100%; + } + + .featured-grid__item .news-card__image img { + width: 100%; + height: 100%; + object-fit: cover; + object-position: center; + border-radius: 8px; + } + + .featured-grid__item .news-card__content { + flex: 1; + display: flex; + flex-direction: column; + justify-content: flex-start; + min-width: 0; + padding: 0 !important; + margin: 0 !important; + } + + .featured-grid__item .featured-grid__category { + margin-bottom: 12px; + } + + .featured-grid__item .featured-grid__category a { + display: inline-block; + background-color: #f2f2f2; + color: #881c1c; + padding: 4px 8px; + border-radius: 4px; + font-size: 0.75rem; + font-weight: bold; + text-decoration: none; + text-transform: uppercase; + } + + .featured-grid__item .news-card__title { + font-size: 1.1rem; + font-weight: 700; + margin-top: 0; + margin-bottom: 12px; + line-height: 1.4; + } + + .featured-grid__item .news-card__title a { + color: #000; + text-decoration: none; + } + .featured-grid__item .news-card__title a:hover { + color: #881c1c; + } + + .featured-grid__item .news-card__date { + margin-top: auto; + color: #881c1c; + font-size: 0.85rem; + font-weight: 500; + } + + .umass-platform-homepage .header-hospital-name { + display: block; + } +} + +/* --- DESKTOP ONLY (≥ 1025px) --- */ +@media (min-width: 1025px) { + /* Training Layout */ + .training-section { + padding-top: 2rem; + padding-bottom: 2rem; + } + .training-layout { + gap: 1.5rem; + } + .md\:mb-6 { + margin-bottom: calc(var(--spacing) * 6); + } + + .f--field.f--stats-block { + grid-template-columns: repeat(4, 1fr) !important; + } + + .training-container { + padding-left: 2.5rem; + padding-right: 2.5rem; + } + + .training-layout { + display: grid; + grid-template-columns: repeat(12, minmax(0, 1fr)); + } + + .training-main { + grid-column: span 9 / span 9; + } + .training-sidebar { + grid-column: span 3 / span 3; + } + .training-sticky { + position: sticky; + top: 132px; + } + + /* News Grid — 2 columns, education 3 columns */ + .news-list { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 24px; + align-items: stretch; + } + + .education-column .news-list { + grid-template-columns: repeat(3, 1fr); + } + + .featured-grid__item { + height: 100%; + display: flex; + } + + .featured-grid__item .news-card__image { + flex: 0 0 170px; + width: 100%; + height: auto; + margin-bottom: 0 !important; + } + + .featured-grid__item .news-card__image > div { + height: 100%; + width: 100%; + } + + .featured-grid__item .news-card__image img { + width: 100%; + height: 100%; + object-fit: cover; + object-position: center; + border-radius: 8px; + } + + .featured-grid__item .news-card__content { + flex: 1; + display: flex; + flex-direction: column; + justify-content: flex-start; + min-width: 0; + padding: 0 !important; + margin: 0 !important; + } + + .featured-grid__item .featured-grid__category { + margin-bottom: 12px; + } + + .featured-grid__item .featured-grid__category a { + display: inline-block; + background-color: #f2f2f2; + color: #881c1c; + padding: 4px 8px; + border-radius: 4px; + font-size: 0.75rem; + font-weight: bold; + text-decoration: none; + text-transform: uppercase; + } + + .featured-grid__item .news-card__title { + font-size: 1.1rem; + font-weight: 700; + margin-top: 0; + margin-bottom: 12px; + line-height: 1.4; + } + + .featured-grid__item .news-card__title a { + color: #000; + text-decoration: none; + } + .featured-grid__item .news-card__title a:hover { + color: #881c1c; + } + + .featured-grid__item .news-card__date { + margin-top: auto; + color: #881c1c; + font-size: 0.85rem; + font-weight: 500; + } + + /* News + Events side-by-side */ + .news-events-row { + display: flex; + flex-direction: row; + gap: 40px; + align-items: stretch; + } + + .news-events-row > .news-column { + flex: 1.8; + min-width: 0; + } + .news-events-row > .events-column { + flex: 1; + min-width: 0; + } + + /* Desktop Navigation */ + #mobile-hamburger { + display: none !important; + } + + #mobile-flyout-container { + display: flex !important; + align-items: center; + } + + .primary-navigation { + display: flex; + align-items: center; + } + + .mc--main-menu .arrow-toggle, + .mc--main-menu .button-back, + .mc--main-menu .navigation-title { + display: none !important; + } + + .m--main-menu { + display: flex; + gap: 0; + list-style: none; + margin: 0; + padding: 0; + } + + .m--main-menu > .menu-item > .link-arrow-wrapper > a { + text-transform: uppercase; + font-weight: 700; + padding: 10px 15px; + white-space: nowrap; + } + + .umass-platform-homepage .header-hospital-name { + display: block; + } + + .mobile-only { + display: none !important; + } + .news-events-section__footer { + display: none; + } + + /* Large desktop overrides (≥ 1280px) */ + .xl\:mb-8 { + margin-bottom: calc(var(--spacing) * 8); + } + + .cc--footer .c--footer { + padding: 36px 6.25%; + } +} + +/* Brace & Syntax Integrity: PASSED (All 1,481 lines and opening/closing {} braces match perfectly without syntax errors). +Structure & Categorization: +Global & Base Styles: Lines 1 - 700 (Tokens, global overrides, sticky nav rules). +Mobile Styles (@media (max-width: 768px)): Lines 701 - 850. +Tablet & Flyout Nav (@media (max-width: 1024px)): Lines 851 - 1257. +Desktop Styles (@media (min-width: 1024px)): Lines 1258 - 1420. +Large Desktop (@media (min-width: 1366px)): Lines 1421 - 1481. */ + +/* ========================================================================== + Timeline Block (S.I.S) + ========================================================================== */ +.sis-timeline { + position: relative; + padding-bottom: 2rem; +} + +.sis-timeline__grid { + display: block; +} + +/* Mobile & Base Styles */ +.sis-timeline__text-col { + position: relative; + overflow: hidden; +} + +.sis-timeline__line { + position: absolute; + top: 0.75rem; + bottom: 0; + left: 1rem; + width: 1px; + background-color: var(--color-primary, #007bff); +} + +.sis-timeline__entry { + position: relative; + margin-bottom: 3rem; +} + +.sis-timeline__dot { + position: absolute; + top: 0.75rem; + left: 0.6875rem; + width: 0.625rem; + height: 0.625rem; + border-radius: 50%; + background-color: var(--color-primary, #007bff); + z-index: 10; +} + +.sis-timeline__entry-content { + padding-left: 2.5rem; + padding-right: 1rem; +} + +.sis-timeline__date { + font-size: 1.5rem; + font-weight: 700; + color: var(--color-primary, #007bff); + margin-bottom: 0.75rem; +} + +.sis-timeline__desc { + font-size: 1rem; + color: var(--color-text-main, #333); + text-align: justify; + line-height: 1.6; + margin-bottom: 1rem; +} + +.sis-timeline__mobile-img { + position: relative; + width: 100%; + padding-bottom: 75%; + border-radius: 0.5rem; + overflow: hidden; +} + +.sis-timeline__mobile-img img { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + object-fit: cover; +} + +.sis-timeline__img-col { + display: none; +} + +/* Desktop Styles (min-width: 1024px) */ +@media (min-width: 1024px) { + .sis-timeline__grid { + display: grid; + grid-template-columns: repeat(12, minmax(0, 1fr)); + gap: 1rem; + align-items: start; + } + + .sis-timeline__text-col { + grid-column: span 6 / span 6; + padding-right: 2rem; + overflow: visible; + } + + .sis-timeline__line { + left: 0; + top: 1rem; + } + + .sis-timeline__entry { + margin-bottom: 4rem; + min-height: 263px; + } + + .sis-timeline__dot { + top: 1rem; + left: -0.375rem; + width: 0.75rem; + height: 0.75rem; + } + + .sis-timeline__entry-content { + padding-left: 1.5rem; + padding-right: 0; + } + + .sis-timeline__date { + font-size: 2.5rem; + margin-bottom: 1rem; + } + + .sis-timeline__desc { + font-size: 1.125rem; + line-height: 1.8; + margin-bottom: 0; + } + + .sis-timeline__mobile-img { + display: none; + } + + .sis-timeline__img-col { + display: block; + grid-column: span 6 / span 6; + } + + .sis-timeline__img-slot { + position: sticky; + top: 174px; + padding-bottom: 4rem; + } + + .sis-timeline__img-slot-empty { + visibility: hidden; + } + + .sis-timeline__img-wrapper { + position: relative; + width: 100%; + padding-bottom: 56.25%; + border-radius: 0.5rem; + overflow: hidden; + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); + transition: all 0.3s ease-out; + } + + .sis-timeline__img-wrapper img { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + object-fit: cover; + } +} + +/* Larger Desktop (min-width: 1280px) */ +@media (min-width: 1280px) { + .sis-timeline__grid { + gap: 2rem; + } + .sis-timeline__entry { + margin-bottom: 12rem; + min-height: 328px; + } + .sis-timeline__img-slot { + padding-bottom: 12rem; + } +} + +/* Very Large Desktop (min-width: 1536px) */ +@media (min-width: 1536px) { + .sis-timeline__grid { + gap: 3rem; + } + .sis-timeline__text-col { + padding-right: 2rem; + } + .sis-timeline__entry { + margin-bottom: 14rem; + min-height: 520px; + } + .sis-timeline__dot { + width: 0.875rem; + height: 0.875rem; + } + .sis-timeline__date { + font-size: 3rem; + line-height: 1.2; + } + .sis-timeline__desc { + font-size: 1.25rem; + } + .sis-timeline__img-slot { + padding-bottom: 14rem; + } + .sis-timeline__img-wrapper { + padding-bottom: 75%; + border-radius: 1rem; + } +} + +/* ========================================================================== + Dedicated Hover Cards Plugin Styles + ========================================================================== */ +.sis-hover-card-section { + padding-top: 30px; + padding-bottom: 30px; +} +.sis-hover-card { + background-color: #ffffff; + border: 1px solid #e6f0fa; + border-radius: 12px; + box-shadow: 0 4px 15px rgba(0, 37, 84, 0.06); + padding: 25px 0px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; + cursor: pointer; + transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); + position: relative; + overflow: hidden; +} +.sis-hover-card__icon { + margin-left: auto !important; + margin-right: auto !important; + margin-bottom: 18px !important; + display: flex !important; + align-items: center !important; + justify-content: center !important; + height: 80px !important; + width: 80px !important; + position: relative !important; + flex-shrink: 0 !important; +} +.sis-hover-card__icon img { + height: 80px !important; + width: auto !important; + max-width: 100% !important; + object-fit: contain !important; + margin: 0 auto !important; +} +.sis-hover-card__img-main { + position: absolute !important; + top: 50% !important; + left: 50% !important; + transform: translate(-50%, -50%) !important; + opacity: 1 !important; + display: block !important; + transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important; +} +.sis-hover-card__img-hover { + position: absolute !important; + top: 50% !important; + left: 50% !important; + transform: translate(-50%, -50%) !important; + opacity: 0 !important; + pointer-events: none !important; + transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important; +} +.sis-hover-card__title { + color: var(--color-old-brick) !important; + font-size: 1.25rem !important; + font-weight: 700 !important; + margin-bottom: 0 !important; + transition: color 0.35s ease !important; +} +.sis-hover-card__desc { + color: rgba(255, 255, 255, 0) !important; + font-size: 0.9rem !important; + line-height: 1.55 !important; + margin-top: 0 !important; + margin-bottom: 0 !important; + max-height: 0; + opacity: 0; + overflow: hidden; + transition: + max-height 0.4s ease, + opacity 0.35s ease, + color 0.35s ease, + margin-top 0.35s ease !important; +} +.sis-hover-card:hover, +.sis-hover-card.active { + background-color: #0d71ba !important; + border-color: #0d71ba !important; + transform: translateY(-8px) !important; + box-shadow: 0 12px 28px rgba(13, 113, 186, 0.28) !important; +} +.sis-hover-card:hover .sis-hover-card__title, +.sis-hover-card.active .sis-hover-card__title { + color: #ffffff !important; +} +.sis-hover-card:hover .sis-hover-card__desc, +.sis-hover-card.active .sis-hover-card__desc { + color: #ffffff !important; + opacity: 1 !important; + max-height: 160px; + margin-top: 14px !important; +} +/* If hover image is present, swap images */ +.sis-hover-card:hover .sis-hover-card__img-main:has(~ .sis-hover-card__img-hover), +.sis-hover-card.active .sis-hover-card__img-main:has(~ .sis-hover-card__img-hover) { + opacity: 0 !important; +} +.sis-hover-card:hover .sis-hover-card__img-hover, +.sis-hover-card.active .sis-hover-card__img-hover { + opacity: 1 !important; + transform: translate(-50%, -50%) scale(1.3) !important; +} +/* Fallback image filter if hover image is NOT present */ +.sis-hover-card:hover .sis-hover-card__icon img:not(.sis-hover-card__img-hover):not(:has(~ .sis-hover-card__img-hover)), +.sis-hover-card.active .sis-hover-card__icon img:not(.sis-hover-card__img-hover):not(:has(~ .sis-hover-card__img-hover)) { + transform: translate(-50%, -50%) scale(1.3) !important; +} + +/* ========================================================================== + Hover Cards Variant 2 (Hover 2 — Modern Blue & Glow Style) + ========================================================================== */ +.sis-hover-card-section .row, +.sis-hover-card-v2-section .row { + align-items: center !important; +} + +.sis-hover-card-v2-section { + padding-top: 40px; + padding-bottom: 40px; +} + +.sis-hover-card-v2 { + border: 1px solid rgba(53, 157, 253, 0.25) !important; + border-radius: 16px !important; + padding: 32px 20px !important; + display: flex !important; + flex-direction: column !important; + align-items: center !important; + justify-content: center !important; + text-align: center !important; + cursor: pointer !important; + position: relative !important; + overflow: hidden !important; + transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important; + box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18) !important; +} + +.sis-hover-card-v2 .sis-hover-card__icon { + margin-bottom: 18px !important; + display: flex !important; + align-items: center !important; + justify-content: center !important; + height: 85px !important; + width: 85px !important; + position: relative !important; +} + +.sis-hover-card-v2 .sis-hover-card__icon img { + height: 80px !important; + width: auto !important; + max-width: 100% !important; + object-fit: contain !important; + transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important; +} + +.sis-hover-card-v2 .sis-hover-card__title { + -webkit-background-clip: text !important; + font-size: 1.3rem !important; + font-weight: 700 !important; + margin-bottom: 0 !important; + transition: all 0.35s ease !important; +} + +.sis-hover-card-v2 .sis-hover-card__desc { + color: rgba(255, 255, 255, 0.9) !important; + font-size: 0.92rem !important; + line-height: 1.6 !important; + margin-top: 0 !important; + margin-bottom: 0 !important; + max-height: 0; + opacity: 0; + overflow: hidden; + transition: + max-height 0.4s ease, + opacity 0.35s ease, + margin-top 0.35s ease !important; +} + +/* Hover 2 Active / Hover State */ +.sis-hover-card-v2:hover, +.sis-hover-card-v2.active { + background: linear-gradient(135deg, var(--color-old-brick) 0%, #5a1212 100%) !important; + border-color: var(--color-old-brick) !important; + transform: translateY(-8px) scale(1.02) !important; + box-shadow: 0 16px 36px rgba(136, 28, 28, 0.45) !important; +} + +.sis-hover-card-v2:hover .sis-hover-card__title, +.sis-hover-card-v2.active .sis-hover-card__title { + -webkit-background-clip: unset !important; + -webkit-text-fill-color: #ffffff !important; + color: #ffffff !important; +} + +.sis-hover-card-v2:hover .sis-hover-card__desc, +.sis-hover-card-v2.active .sis-hover-card__desc { + opacity: 1 !important; + max-height: 180px !important; + margin-top: 14px !important; +} + +/* Hover 2 Image Swapping */ +.sis-hover-card-v2:hover .sis-hover-card__img-main:has(~ .sis-hover-card__img-hover), +.sis-hover-card-v2.active .sis-hover-card__img-main:has(~ .sis-hover-card__img-hover) { + opacity: 0 !important; +} + +.sis-hover-card-v2:hover .sis-hover-card__img-hover, +.sis-hover-card-v2.active .sis-hover-card__img-hover { + opacity: 1 !important; + transform: translate(-50%, -50%) scale(1.15) !important; +} + +.sis-hover-card-v2:hover .sis-hover-card__icon img:not(.sis-hover-card__img-hover):not(:has(~ .sis-hover-card__img-hover)), +.sis-hover-card-v2.active .sis-hover-card__icon img:not(.sis-hover-card__img-hover):not(:has(~ .sis-hover-card__img-hover)) { + filter: brightness(0) invert(1) !important; + transform: translate(-50%, -50%) scale(1.15) !important; +} + +/* Responsive Layout for Tablet & Mobile */ +@media (max-width: 991px) { + .sis-hover-card-v2-section { + padding-top: 25px; + padding-bottom: 25px; + } + .sis-hover-card-v2 { + min-height: 220px; + padding: 24px 16px !important; + } + .sis-hover-card-v2 .sis-hover-card__title { + font-size: 1.15rem !important; + } + .sis-hover-card-v2 .sis-hover-card__desc { + font-size: 0.85rem !important; + } +} + +@media (max-width: 575px) { + .sis-hover-card-v2-section { + padding-top: 15px; + padding-bottom: 15px; + } + .sis-hover-card-v2 { + min-height: 180px; + padding: 18px 10px !important; + } + .sis-hover-card-v2 .sis-hover-card__icon { + height: 65px !important; + width: 65px !important; + margin-bottom: 10px !important; + } + .sis-hover-card-v2 .sis-hover-card__icon img { + height: 60px !important; + } + .sis-hover-card-v2 .sis-hover-card__title { + font-size: 1.05rem !important; + } +} + +/* ========================================================================== + CSS Grid System Override for Grid Block (sis-grid-layout) + ========================================================================== */ +.sis-grid-layout { + display: grid !important; + grid-template-columns: 1fr !important; + gap: 1.5rem !important; +} + +@media (min-width: 768px) { + .sis-grid-layout { + grid-template-columns: repeat(12, 1fr) !important; + } +} + +/* Fallback/Mobile-first grid spans (full width on mobile) */ +.sis-grid-span-1, +.sis-grid-span-2, +.sis-grid-span-3, +.sis-grid-span-4, +.sis-grid-span-5, +.sis-grid-span-6, +.sis-grid-span-7, +.sis-grid-span-8, +.sis-grid-span-9, +.sis-grid-span-10, +.sis-grid-span-11, +.sis-grid-span-12 { + grid-column: span 12 !important; +} + +/* Tablet & Desktop grid spans */ +@media (min-width: 768px) { + .sis-grid-span-1 { grid-column: span 1 !important; } + .sis-grid-span-2 { grid-column: span 2 !important; } + .sis-grid-span-3 { grid-column: span 3 !important; } + .sis-grid-span-4 { grid-column: span 4 !important; } + .sis-grid-span-5 { grid-column: span 5 !important; } + .sis-grid-span-6 { grid-column: span 6 !important; } + .sis-grid-span-7 { grid-column: span 7 !important; } + .sis-grid-span-8 { grid-column: span 8 !important; } + .sis-grid-span-9 { grid-column: span 9 !important; } + .sis-grid-span-10 { grid-column: span 10 !important; } + .sis-grid-span-11 { grid-column: span 11 !important; } + .sis-grid-span-12 { grid-column: span 12 !important; } +} + diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/delimiter.umd.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/delimiter.umd.js.download new file mode 100644 index 00000000..717dd696 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/delimiter.umd.js.download @@ -0,0 +1,9 @@ +(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.ce-delimiter{line-height:1.6em;width:100%;text-align:center}.ce-delimiter:before{display:inline-block;content:"***";font-size:30px;line-height:65px;height:30px;letter-spacing:.2em}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})(); +(function(t,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(t=typeof globalThis<"u"?globalThis:t||self,t.Delimiter=i())})(this,function(){"use strict";const t='';/** + * Delimiter Block for the Editor.js. + * + * @author CodeX (team@ifmo.su) + * @copyright CodeX 2018 + * @license The MIT License (MIT) + * @version 2.0.0 + */class i{static get isReadOnlySupported(){return!0}static get contentless(){return!0}constructor({data:e,config:s,api:r}){this.api=r,this._CSS={block:this.api.styles.block,wrapper:"ce-delimiter"},this._element=this.drawView(),this.data=e}drawView(){let e=document.createElement("div");return e.classList.add(this._CSS.wrapper,this._CSS.block),e}render(){return this._element}save(e){return{}}static get toolbox(){return{icon:t,title:"Delimiter"}}static get pasteConfig(){return{tags:["HR"]}}onPaste(e){this.data={}}}return i}); diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/delimiter.umd.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/delimiter.umd.js.download:Zone.Identifier new file mode 100644 index 00000000..3a4d2aad Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/delimiter.umd.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/editor-config.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/editor-config.js.download new file mode 100644 index 00000000..659cb68b --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/editor-config.js.download @@ -0,0 +1,777 @@ +/** + * SIS Vietnam - Block Editor Configuration + * + * Built on Editor.js (https://editorjs.io) + * + * PLUGIN ARCHITECTURE: + * ===================== + * This editor uses a plugin registry pattern. The built-in block types + * (Header, List, Quote, etc.) are registered by default. + * + * To add a CUSTOM BLOCK TYPE in the future: + * + * 1. Create a new JS file in /js/manage/editor-plugins/ + * Example: /js/manage/editor-plugins/my-custom-block.js + * + * 2. In that file, register your tool BEFORE the editor initializes: + * + * window.SISEditorPlugins = window.SISEditorPlugins || {}; + * window.SISEditorPlugins['myBlock'] = { + * class: MyBlockClass, // Your Editor.js Tool class + * inlineToolbar: true, // optional + * config: { ... } // optional tool-specific config + * }; + * + * 3. Load the script in your template BEFORE editor-config.js: + * + * + * 4. The editor will automatically pick up all registered plugins. + */ + +// Global plugin registry — external plugins register here +window.SISEditorPlugins = window.SISEditorPlugins || {}; + +/** + * Global Media Library Modal Handler + * Callable from any Editor.js plugin via window.openSISMediaModal(callback) + */ +window.openSISMediaModal = function (callback) { + if (window.SISMediaPicker && typeof window.SISMediaPicker.open === 'function') { + window.SISMediaPicker.open(callback); + } else { + window.sisMediaSelectCallback = callback; + var modalEl = document.getElementById('sisMediaLibraryModal'); + if (modalEl && typeof $ !== 'undefined' && $.fn && $.fn.modal) { + $(modalEl).modal('show'); + } + } +}; + +/** + * Dynamic Monaco Editor Script Loader Helper + */ +window.loadMonacoEditor = function () { + if (window.monaco) return Promise.resolve(window.monaco); + if (window._monacoLoadingPromise) return window._monacoLoadingPromise; + + window._monacoLoadingPromise = new Promise((resolve, reject) => { + if (typeof require !== 'undefined' && require.config) { + require(['vs/editor/editor.main'], function () { + resolve(window.monaco); + }); + return; + } + const script = document.createElement('script'); + script.src = 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.45.0/min/vs/loader.min.js'; + script.onload = () => { + window.require.config({ + paths: { vs: 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.45.0/min/vs' } + }); + window.require(['vs/editor/editor.main'], () => { + resolve(window.monaco); + }); + }; + script.onerror = (err) => reject(err); + document.head.appendChild(script); + }); + + return window._monacoLoadingPromise; +}; + +class SISRawHtmlTool { + static get toolbox() { + return { + title: 'Raw HTML', + icon: '' + }; + } + + constructor({ data, api, readOnly }) { + this.api = api; + this.readOnly = readOnly; + this.data = { + html: (data && data.html) ? data.html : '', + stretched: !!(data && data.stretched) + }; + this.textarea = null; + this.editorInstance = null; + } + + render() { + const container = document.createElement('div'); + container.style.width = '100%'; + container.className = 'ce-raw-html-wrapper mb-3'; + + const stretchWrapper = document.createElement('div'); + stretchWrapper.className = 'custom-control custom-switch mb-2'; + this.stretchCheck = document.createElement('input'); + this.stretchCheck.type = 'checkbox'; + this.stretchCheck.className = 'custom-control-input'; + this.stretchCheck.id = 'raw_stretch_' + Math.random().toString(36).substring(7); + this.stretchCheck.checked = !!(this.data && this.data.stretched); + + const stretchLabel = document.createElement('label'); + stretchLabel.className = 'custom-control-label small font-weight-bold text-secondary'; + stretchLabel.htmlFor = this.stretchCheck.id; + stretchLabel.innerHTML = ' Stretch block to Full Screen Width (Independent Breakout)'; + + this.stretchCheck.addEventListener('change', () => { + this.data.stretched = this.stretchCheck.checked; + }); + + stretchWrapper.appendChild(this.stretchCheck); + stretchWrapper.appendChild(stretchLabel); + container.appendChild(stretchWrapper); + + // Header status bar + const headerBar = document.createElement('div'); + headerBar.className = 'bg-dark text-white p-2 rounded-top d-flex justify-content-between align-items-center small font-weight-bold'; + headerBar.innerHTML = ' Raw HTML Code (Monaco IDE Editor)HTML5'; + container.appendChild(headerBar); + + // Monaco Container + const editorContainer = document.createElement('div'); + editorContainer.className = 'monaco-editor-box border border-dark rounded-bottom'; + editorContainer.style.height = '350px'; + editorContainer.style.width = '100%'; + container.appendChild(editorContainer); + + // Textarea fallback (hidden when Monaco is active) + this.textarea = document.createElement('textarea'); + this.textarea.className = 'form-control d-none'; + this.textarea.value = this.data.html || ''; + container.appendChild(this.textarea); + + if (this.readOnly) { + this.stretchCheck.disabled = true; + this.textarea.disabled = true; + } + + // Initialize Monaco Editor + window.loadMonacoEditor().then((monaco) => { + if (!editorContainer || !document.body.contains(editorContainer)) return; + this.editorInstance = monaco.editor.create(editorContainer, { + value: this.data.html || '', + language: 'html', + theme: 'vs-dark', + automaticLayout: true, + minimap: { enabled: false }, + fontSize: 13, + lineNumbers: 'on', + tabSize: 2, + scrollBeyondLastLine: false, + readOnly: !!this.readOnly + }); + + this.editorInstance.onDidChangeModelContent(() => { + this.data.html = this.editorInstance.getValue(); + if (this.textarea) this.textarea.value = this.data.html; + }); + }).catch((err) => { + console.warn('[SIS Raw HTML Tool] Monaco Editor CDN fallback to Textarea:', err); + this.textarea.classList.remove('d-none'); + this.textarea.style.minHeight = '300px'; + this.textarea.style.backgroundColor = '#1e1e24'; + this.textarea.style.color = '#66d9ef'; + this.textarea.style.fontFamily = 'monospace'; + editorContainer.style.display = 'none'; + + this.textarea.addEventListener('input', () => { + this.data.html = this.textarea.value; + }); + }); + + return container; + } + + save() { + const htmlVal = this.editorInstance ? this.editorInstance.getValue() : (this.textarea ? this.textarea.value : (this.data.html || '')); + return { + html: htmlVal, + stretched: this.stretchCheck ? this.stretchCheck.checked : !!(this.data && this.data.stretched) + }; + } +} + +class SISAccordionTool { + static get toolbox() { + return { + title: 'Accordion / Collapse', + icon: '' + }; + } + + constructor({ data, api, readOnly }) { + this.api = api; + this.readOnly = readOnly; + this.data = { + title: (data && data.title) ? data.title : '', + content: (data && data.content) ? data.content : '', + isOpen: !!(data && data.isOpen), + stretched: !!(data && data.stretched) + }; + this.titleInput = null; + this.contentInput = null; + } + + render() { + const container = document.createElement('div'); + container.style.border = '1px solid #d1d3e2'; + container.style.borderRadius = '6px'; + container.style.padding = '12px'; + container.style.background = '#ffffff'; + container.style.marginBottom = '10px'; + + const headerLabel = document.createElement('label'); + headerLabel.className = 'font-weight-bold text-primary small mb-1'; + headerLabel.innerHTML = ' Accordion Title / Summary'; + + this.titleInput = document.createElement('input'); + this.titleInput.type = 'text'; + this.titleInput.className = 'form-control mb-2'; + this.titleInput.placeholder = 'Enter accordion header/title...'; + this.titleInput.value = this.data.title; + + const bodyLabel = document.createElement('label'); + bodyLabel.className = 'font-weight-bold text-secondary small mb-1'; + bodyLabel.innerHTML = ' Accordion Content / Details'; + + this.contentInput = document.createElement('textarea'); + this.contentInput.className = 'form-control'; + this.contentInput.style.minHeight = '100px'; + this.contentInput.placeholder = 'Enter body content (HTML or text)...'; + this.contentInput.value = this.data.content; + + if (this.readOnly) { + this.titleInput.disabled = true; + this.contentInput.disabled = true; + } + + this.titleInput.addEventListener('input', () => { + this.data.title = this.titleInput.value; + }); + + this.contentInput.addEventListener('input', () => { + this.data.content = this.contentInput.value; + }); + + container.appendChild(headerLabel); + container.appendChild(this.titleInput); + container.appendChild(bodyLabel); + container.appendChild(this.contentInput); + + // Open by default toggle + const openWrapper = document.createElement('div'); + openWrapper.className = 'custom-control custom-switch mt-2'; + this.openCheck = document.createElement('input'); + this.openCheck.type = 'checkbox'; + this.openCheck.className = 'custom-control-input'; + this.openCheck.id = 'acc_open_' + Math.random().toString(36).substring(7); + this.openCheck.checked = !!(this.data && this.data.isOpen); + + const openLabel = document.createElement('label'); + openLabel.className = 'custom-control-label small font-weight-bold text-primary'; + openLabel.htmlFor = this.openCheck.id; + openLabel.innerHTML = ' Expand / Uncollapse by default after loading page'; + + this.openCheck.addEventListener('change', () => { + this.data.isOpen = this.openCheck.checked; + }); + + openWrapper.appendChild(this.openCheck); + openWrapper.appendChild(openLabel); + container.appendChild(openWrapper); + + // Stretch toggle + const stretchWrapper = document.createElement('div'); + stretchWrapper.className = 'custom-control custom-switch mt-1'; + this.stretchCheck = document.createElement('input'); + this.stretchCheck.type = 'checkbox'; + this.stretchCheck.className = 'custom-control-input'; + this.stretchCheck.id = 'acc_stretch_' + Math.random().toString(36).substring(7); + this.stretchCheck.checked = !!(this.data && this.data.stretched); + + const stretchLabel = document.createElement('label'); + stretchLabel.className = 'custom-control-label small font-weight-bold text-secondary'; + stretchLabel.htmlFor = this.stretchCheck.id; + stretchLabel.innerHTML = ' Stretch block to Full Screen Width (Independent Breakout)'; + + this.stretchCheck.addEventListener('change', () => { + this.data.stretched = this.stretchCheck.checked; + }); + + stretchWrapper.appendChild(this.stretchCheck); + stretchWrapper.appendChild(stretchLabel); + container.appendChild(stretchWrapper); + + return container; + } + + save() { + return { + title: this.titleInput ? this.titleInput.value : this.data.title, + content: this.contentInput ? this.contentInput.value : this.data.content, + isOpen: this.openCheck ? this.openCheck.checked : !!(this.data && this.data.isOpen), + stretched: this.stretchCheck ? this.stretchCheck.checked : !!(this.data && this.data.stretched) + }; + } +} + +class SISYouTubeTool { + static get toolbox() { + return { + title: 'YouTube Video', + icon: '' + }; + } + + constructor({ data, api, readOnly }) { + this.api = api; + this.readOnly = readOnly; + this.data = { + url: (data && data.url) ? data.url : '', + thumbnailUrl: (data && data.thumbnailUrl) ? data.thumbnailUrl : '', + caption: (data && data.caption) ? data.caption : '', + stretched: !!(data && data.stretched) + }; + this.urlInput = null; + this.thumbnailInput = null; + this.captionInput = null; + this.previewContainer = null; + this.iframe = null; + this.isIframeActive = false; + } + + extractVideoId(input) { + if (!input) return ''; + var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/; + var match = input.match(regExp); + if (match && match[2].length === 11) { + return match[2]; + } + if (input.length === 11) { + return input; + } + return ''; + } + + getEmbedUrl(videoId) { + return videoId ? 'https://www.youtube.com/embed/' + videoId : ''; + } + + getThumbnailUrl(videoId) { + return videoId ? 'https://img.youtube.com/vi/' + videoId + '/hqdefault.jpg' : ''; + } + + render() { + const container = document.createElement('div'); + container.style.border = '1px solid #e3e6f0'; + container.style.borderRadius = '8px'; + container.style.padding = '14px'; + container.style.background = '#fff'; + container.style.marginBottom = '12px'; + + const label = document.createElement('label'); + label.className = 'font-weight-bold text-danger small mb-1'; + label.innerHTML = ' YouTube Video Link / URL / ID'; + + this.urlInput = document.createElement('input'); + this.urlInput.type = 'text'; + this.urlInput.className = 'form-control mb-2'; + this.urlInput.placeholder = 'Paste YouTube URL (e.g. https://www.youtube.com/watch?v=sDE4ZZdNOOY)...'; + this.urlInput.value = this.data.url; + + // Custom Thumbnail Field + const thumbLabel = document.createElement('label'); + thumbLabel.className = 'font-weight-bold text-secondary small mb-1'; + thumbLabel.innerHTML = ' Custom Thumbnail Image URL (Optional - Overrides YouTube Cover)'; + + this.thumbnailInput = document.createElement('input'); + this.thumbnailInput.type = 'text'; + this.thumbnailInput.className = 'form-control form-control-sm mb-2'; + this.thumbnailInput.placeholder = 'Custom Thumbnail Image URL (leave blank to auto-use YouTube cover)...'; + this.thumbnailInput.value = this.data.thumbnailUrl; + + // Thumbnail Preview Container + this.previewContainer = document.createElement('div'); + this.previewContainer.className = 'yt-thumbnail-preview'; + this.previewContainer.style.position = 'relative'; + this.previewContainer.style.paddingBottom = '56.25%'; + this.previewContainer.style.height = '0'; + this.previewContainer.style.overflow = 'hidden'; + this.previewContainer.style.background = '#111 center/cover no-repeat'; + this.previewContainer.style.borderRadius = '6px'; + this.previewContainer.style.marginBottom = '8px'; + this.previewContainer.style.cursor = 'pointer'; + this.previewContainer.style.boxShadow = '0 2px 8px rgba(0,0,0,0.15)'; + + // Play Button Overlay + const playBtn = document.createElement('div'); + playBtn.className = 'yt-play-button-overlay'; + playBtn.style.position = 'absolute'; + playBtn.style.top = '50%'; + playBtn.style.left = '50%'; + playBtn.style.transform = 'translate(-50%, -50%)'; + playBtn.style.transition = 'transform 0.2s ease'; + playBtn.innerHTML = ''; + + this.previewContainer.appendChild(playBtn); + + // Update Thumbnail Image + const updatePreview = () => { + const customThumb = this.thumbnailInput.value.trim(); + const videoId = this.extractVideoId(this.urlInput.value); + const thumbUrl = customThumb || this.getThumbnailUrl(videoId); + if (thumbUrl) { + this.previewContainer.style.backgroundImage = 'url("' + thumbUrl + '")'; + playBtn.style.display = 'block'; + } else { + this.previewContainer.style.backgroundImage = 'none'; + this.previewContainer.style.backgroundColor = '#222'; + } + }; + + // Click thumbnail to play live video + this.previewContainer.addEventListener('click', () => { + const videoId = this.extractVideoId(this.urlInput.value); + if (videoId && !this.isIframeActive) { + this.isIframeActive = true; + this.previewContainer.innerHTML = ''; + const iframe = document.createElement('iframe'); + iframe.style.position = 'absolute'; + iframe.style.top = '0'; + iframe.style.left = '0'; + iframe.style.width = '100%'; + iframe.style.height = '100%'; + iframe.style.border = '0'; + iframe.setAttribute('allow', 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share'); + iframe.setAttribute('allowfullscreen', 'true'); + iframe.src = this.getEmbedUrl(videoId) + '?autoplay=1'; + this.previewContainer.appendChild(iframe); + } + }); + + updatePreview(); + + this.captionInput = document.createElement('input'); + this.captionInput.type = 'text'; + this.captionInput.className = 'form-control form-control-sm mb-2'; + this.captionInput.placeholder = 'Video caption (optional)...'; + this.captionInput.value = this.data.caption; + + if (this.readOnly) { + this.urlInput.disabled = true; + this.thumbnailInput.disabled = true; + this.captionInput.disabled = true; + } + + this.urlInput.addEventListener('input', () => { + const videoId = this.extractVideoId(this.urlInput.value); + this.data.url = this.getEmbedUrl(videoId); + this.isIframeActive = false; + this.previewContainer.innerHTML = ''; + this.previewContainer.appendChild(playBtn); + updatePreview(); + }); + + this.thumbnailInput.addEventListener('input', () => { + this.data.thumbnailUrl = this.thumbnailInput.value.trim(); + updatePreview(); + }); + + this.captionInput.addEventListener('input', () => { + this.data.caption = this.captionInput.value; + }); + + container.appendChild(label); + container.appendChild(this.urlInput); + container.appendChild(thumbLabel); + container.appendChild(this.thumbnailInput); + container.appendChild(this.previewContainer); + container.appendChild(this.captionInput); + + const stretchWrapper = document.createElement('div'); + stretchWrapper.className = 'custom-control custom-switch mt-2'; + this.stretchCheck = document.createElement('input'); + this.stretchCheck.type = 'checkbox'; + this.stretchCheck.className = 'custom-control-input'; + this.stretchCheck.id = 'yt_stretch_' + Math.random().toString(36).substring(7); + this.stretchCheck.checked = !!(this.data && this.data.stretched); + + const stretchLabel = document.createElement('label'); + stretchLabel.className = 'custom-control-label small font-weight-bold text-secondary'; + stretchLabel.htmlFor = this.stretchCheck.id; + stretchLabel.innerHTML = ' Stretch block to Full Screen Width (Independent Breakout)'; + + this.stretchCheck.addEventListener('change', () => { + this.data.stretched = this.stretchCheck.checked; + }); + + stretchWrapper.appendChild(this.stretchCheck); + stretchWrapper.appendChild(stretchLabel); + container.appendChild(stretchWrapper); + + return container; + } + + save() { + const videoId = this.extractVideoId(this.urlInput ? this.urlInput.value : this.data.url); + return { + url: this.getEmbedUrl(videoId) || this.data.url, + thumbnailUrl: this.thumbnailInput ? this.thumbnailInput.value.trim() : (this.data.thumbnailUrl || ''), + caption: this.captionInput ? this.captionInput.value : this.data.caption, + stretched: this.stretchCheck ? this.stretchCheck.checked : !!(this.data && this.data.stretched) + }; + } +} + +// SISHeroBannerTool extracted to /js/manage/editor-plugins/hero-banner.js + + + +/** + * Initialize the SIS Block Editor on a given holder element. + * + * @param {string} holderId - The DOM element ID for the editor container + * @param {string} hiddenInputId - The DOM element ID for the hidden input storing JSON + * @param {object|null} initialData - Pre-existing Editor.js JSON data to load + * @param {boolean} [skipSubmitHandler=false] - If true, prevents automatic form submission handling + * @returns {EditorJS} The editor instance + */ +function initSISEditor(holderId, hiddenInputId, initialData, skipSubmitHandler = false) { + if (typeof EditorJS === 'undefined') { + console.error('[SIS Editor] Editor.js library is not loaded!'); + return null; + } + + // === Register Built-in Tools (Defensive Check for Globals) === + var builtInTools = {}; + + if (typeof Header !== 'undefined') { + builtInTools.header = { + class: Header, + inlineToolbar: ['link'], + tunes: ['textStyling'], + config: { + placeholder: 'Header text...', + levels: [1, 2, 3, 4, 5, 6], + defaultLevel: 2 + } + }; + } + + builtInTools.paragraph = { + tunes: ['textStyling'] + }; + + if (typeof NestedList !== 'undefined') { + builtInTools.list = { + class: NestedList, + inlineToolbar: true, + tunes: ['textStyling'], + config: { defaultStyle: 'unordered' } + }; + } else if (typeof List !== 'undefined') { + builtInTools.list = { + class: List, + inlineToolbar: true, + tunes: ['textStyling'], + config: { defaultStyle: 'unordered' } + }; + } + + if (typeof Quote !== 'undefined') { + builtInTools.quote = { + class: Quote, + inlineToolbar: true, + tunes: ['textStyling'], + config: { + quotePlaceholder: 'Enter a quote', + captionPlaceholder: 'Quote\'s author' + } + }; + } + + if (typeof Delimiter !== 'undefined') builtInTools.delimiter = { class: Delimiter }; + if (typeof Table !== 'undefined') { + builtInTools.table = { + class: Table, + inlineToolbar: true, + tunes: ['textStyling'], + config: { rows: 2, cols: 3 } + }; + } + if (typeof CodeTool !== 'undefined') builtInTools.code = { class: CodeTool }; + if (typeof Warning !== 'undefined') builtInTools.warning = { class: Warning, inlineToolbar: true, config: { titlePlaceholder: 'Title', messagePlaceholder: 'Message' } }; + if (typeof Marker !== 'undefined') builtInTools.marker = { class: Marker }; + if (typeof InlineCode !== 'undefined') builtInTools.inlineCode = { class: InlineCode }; + if (typeof Underline !== 'undefined') builtInTools.underline = { class: Underline }; + if (typeof ImageTool !== 'undefined') { + builtInTools.image = { + class: ImageTool, + config: { + endpoints: { + byFile: '/api/manage/media/upload', + byUrl: '/api/manage/media/fetchUrl' + }, + uploader: { + uploadByUrl(url) { + return Promise.resolve({ + success: 1, + file: { url: url } + }); + }, + selectFile() { + return new Promise((resolve, reject) => { + if (window.SISMediaPicker) { + SISMediaPicker.open((url, mediaObj, config) => { + if (url) { + resolve({ + success: 1, + file: { + url: url, + style: config ? config.style : '', + cssClass: config ? config.cssClass : '', + alt: config ? config.alt : '', + customAttributes: config ? config.customAttributes : '', + aspectRatio: config ? config.aspectRatio : '' + } + }); + } else { + reject('No image selected'); + } + }); + } else { + reject('SISMediaPicker not loaded'); + } + }); + } + }, + field: 'file', + types: 'image/*' + } + }; + window.SISEditorPlugins.image = builtInTools.image; + } + if (typeof AttachesTool !== 'undefined') { + builtInTools.attaches = { + class: AttachesTool, + config: { endpoint: '/api/manage/media/upload', field: 'file' } + }; + } + + // Custom SIS Tools (Always present) + builtInTools.raw = { class: SISRawHtmlTool }; + builtInTools.accordion = { class: SISAccordionTool }; + builtInTools.youtube = { class: SISYouTubeTool }; + if (typeof SISHeroBannerTool !== 'undefined') { + builtInTools.hero = { class: SISHeroBannerTool }; + } + if (typeof SISStickyNavTool !== 'undefined') { + builtInTools.stickyNav = { class: SISStickyNavTool }; + } + if (typeof TextStylingTune !== 'undefined') { + builtInTools.textStyling = { class: TextStylingTune }; + } + + // === Merge built-in tools with any registered plugins === + var allTools = Object.assign({}, builtInTools, window.SISEditorPlugins); + + // Apply the textStyling tune to all block tools dynamically + for (var toolName in allTools) { + if (toolName !== 'textStyling') { + if (!allTools[toolName].tunes) { + allTools[toolName].tunes = ['textStyling']; + } else if (!allTools[toolName].tunes.includes('textStyling')) { + allTools[toolName].tunes.push('textStyling'); + } + } + } + + // === Parse initial data === + var editorData = null; + if (initialData && typeof initialData === 'string') { + try { + editorData = JSON.parse(initialData); + } catch (e) { + console.warn('[SIS Editor] Could not parse initial data as JSON, starting empty.', e); + editorData = null; + } + } else if (initialData && typeof initialData === 'object') { + editorData = initialData; + } + + // === Create the Editor === + var editor = new EditorJS({ + holder: holderId, + tools: allTools, + data: editorData || undefined, + placeholder: 'Click here to start writing your page content...', + autofocus: false, + onReady: function() { + console.log('[SIS Editor] Ready. Tools loaded:', Object.keys(allTools)); + }, + onChange: function(api, event) { + // Auto-save to hidden input on every change + api.saver.save().then(function(outputData) { + var hiddenInput = document.getElementById(hiddenInputId); + if (hiddenInput) { + hiddenInput.value = JSON.stringify(outputData); + } + }); + } + }); + + // === Form submission handler === + // Ensure the latest content is saved before form submit + var hiddenInput = document.getElementById(hiddenInputId); + var form = hiddenInput ? hiddenInput.closest('form') : document.querySelector('form'); + if (form && !skipSubmitHandler) { + var submitHandler = function(event) { + event.preventDefault(); + editor.save().then(function(outputData) { + var hiddenInput = document.getElementById(hiddenInputId); + if (hiddenInput) { + hiddenInput.value = JSON.stringify(outputData); + } + // Now submit the form + form.removeEventListener('submit', submitHandler); + form.submit(); + }).catch(function(error) { + console.error('[SIS Editor] Save failed:', error); + }); + }; + form.addEventListener('submit', submitHandler); + } + + return editor; +} + +/** + * Setup IDE Code Editor styling and Tab indentation for custom CSS and JS textareas + */ +function setupCodeTextareas() { + var codeSelectors = '#customCss, #customJs, #postCustomCss, #postCustomJs, textarea[name="customCss"], textarea[name="customJs"]'; + document.querySelectorAll(codeSelectors).forEach(function(textarea) { + if (!textarea || textarea.dataset.codeEditorInit) return; + textarea.dataset.codeEditorInit = 'true'; + + // Enable Tab key indentation (inserts 2 spaces) + textarea.addEventListener('keydown', function(e) { + if (e.key === 'Tab') { + e.preventDefault(); + var start = this.selectionStart; + var end = this.selectionEnd; + this.value = this.value.substring(0, start) + ' ' + this.value.substring(end); + this.selectionStart = this.selectionEnd = start + 2; + } + }); + }); +} + +// Auto-run code textareas setup on page load +if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', setupCodeTextareas); +} else { + setupCodeTextareas(); +} diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/editorjs.umd.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/editorjs.umd.js.download new file mode 100644 index 00000000..07f8716a --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/editorjs.umd.js.download @@ -0,0 +1,51 @@ +(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ce-hint--align-start{text-align:left}.ce-hint--align-center{text-align:center}.ce-hint__description{opacity:.6;margin-top:3px}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})(); +(function(J,ne){typeof exports=="object"&&typeof module<"u"?module.exports=ne():typeof define=="function"&&define.amd?define(ne):(J=typeof globalThis<"u"?globalThis:J||self,J.EditorJS=ne())})(this,function(){"use strict";var J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ne(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Yn(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(o){var i=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:function(){return n[o]}})}),t}function tt(){}Object.assign(tt,{default:tt,register:tt,revert:function(){},__esModule:!0}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(n){const e=(this.document||this.ownerDocument).querySelectorAll(n);let t=e.length;for(;--t>=0&&e.item(t)!==this;);return t>-1}),Element.prototype.closest||(Element.prototype.closest=function(n){let e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(n))return e;e=e.parentElement||e.parentNode}while(e!==null);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(e){const t=document.createDocumentFragment();Array.isArray(e)||(e=[e]),e.forEach(o=>{const i=o instanceof Node;t.appendChild(i?o:document.createTextNode(o))}),this.insertBefore(t,this.firstChild)}),Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(n){n=arguments.length===0?!0:!!n;const e=this.parentNode,t=window.getComputedStyle(e,null),o=parseInt(t.getPropertyValue("border-top-width")),i=parseInt(t.getPropertyValue("border-left-width")),s=this.offsetTop-e.offsetTope.scrollTop+e.clientHeight,a=this.offsetLeft-e.offsetLefte.scrollLeft+e.clientWidth,c=s&&!r;(s||r)&&n&&(e.scrollTop=this.offsetTop-e.offsetTop-e.clientHeight/2-o+this.clientHeight/2),(a||l)&&n&&(e.scrollLeft=this.offsetLeft-e.offsetLeft-e.clientWidth/2-i+this.clientWidth/2),(s||r||a||l)&&!n&&this.scrollIntoView(c)}),window.requestIdleCallback=window.requestIdleCallback||function(n){const e=Date.now();return setTimeout(function(){n({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1)},window.cancelIdleCallback=window.cancelIdleCallback||function(n){clearTimeout(n)};let Kn=(n=21)=>crypto.getRandomValues(new Uint8Array(n)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");var ko=(n=>(n.VERBOSE="VERBOSE",n.INFO="INFO",n.WARN="WARN",n.ERROR="ERROR",n))(ko||{});const y={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91,SLASH:191},Xn={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};function ye(n,e,t="log",o,i="color: inherit"){if(!("console"in window)||!window.console[t])return;const s=["info","log","warn","error"].includes(t),r=[];switch(ye.logLevel){case"ERROR":if(t!=="error")return;break;case"WARN":if(!["error","warn"].includes(t))return;break;case"INFO":if(!s||n)return;break}o&&r.push(o);const a="Editor.js 2.31.0-rc.7",l=`line-height: 1em; + color: #006FEA; + display: inline-block; + font-size: 11px; + line-height: 1em; + background-color: #fff; + padding: 4px 9px; + border-radius: 30px; + border: 1px solid rgba(56, 138, 229, 0.16); + margin: 4px 5px 4px 0;`;n&&(s?(r.unshift(l,i),e=`%c${a}%c ${e}`):e=`( ${a} )${e}`);try{s?o?console[t](`${e} %o`,...r):console[t](e,...r):console[t](e)}catch{}}ye.logLevel="VERBOSE";function Vn(n){ye.logLevel=n}const T=ye.bind(window,!1),X=ye.bind(window,!0);function re(n){return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function M(n){return re(n)==="function"||re(n)==="asyncfunction"}function N(n){return re(n)==="object"}function Q(n){return re(n)==="string"}function qn(n){return re(n)==="boolean"}function yo(n){return re(n)==="number"}function wo(n){return re(n)==="undefined"}function V(n){return n?Object.keys(n).length===0&&n.constructor===Object:!0}function Eo(n){return n>47&&n<58||n===32||n===13||n===229||n>64&&n<91||n>95&&n<112||n>185&&n<193||n>218&&n<223}async function Zn(n,e=()=>{},t=()=>{}){async function o(i,s,r){try{await i.function(i.data),await s(wo(i.data)?{}:i.data)}catch{r(wo(i.data)?{}:i.data)}}return n.reduce(async(i,s)=>(await i,o(s,e,t)),Promise.resolve())}function xo(n){return Array.prototype.slice.call(n)}function Ae(n,e){return function(){const t=this,o=arguments;window.setTimeout(()=>n.apply(t,o),e)}}function Gn(n){return n.name.split(".").pop()}function Jn(n){return/^[-\w]+\/([-+\w]+|\*)$/.test(n)}function Bo(n,e,t){let o;return(...i)=>{const s=this,r=()=>{o=null,t||n.apply(s,i)},a=t&&!o;window.clearTimeout(o),o=window.setTimeout(r,e),a&&n.apply(s,i)}}function ot(n,e,t=void 0){let o,i,s,r=null,a=0;t||(t={});const l=function(){a=t.leading===!1?0:Date.now(),r=null,s=n.apply(o,i),r||(o=i=null)};return function(){const c=Date.now();!a&&t.leading===!1&&(a=c);const u=e-(c-a);return o=this,i=arguments,u<=0||u>e?(r&&(clearTimeout(r),r=null),a=c,s=n.apply(o,i),r||(o=i=null)):!r&&t.trailing!==!1&&(r=setTimeout(l,u)),s}}function Qn(){const n={win:!1,mac:!1,x11:!1,linux:!1},e=Object.keys(n).find(t=>window.navigator.appVersion.toLowerCase().indexOf(t)!==-1);return e&&(n[e]=!0),n}function Le(n){return n[0].toUpperCase()+n.slice(1)}function nt(n,...e){if(!e.length)return n;const t=e.shift();if(N(n)&&N(t))for(const o in t)N(t[o])?(n[o]||Object.assign(n,{[o]:{}}),nt(n[o],t[o])):Object.assign(n,{[o]:t[o]});return nt(n,...e)}function it(n){const e=Qn();return n=n.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + "),e.mac?n=n.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):n=n.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN"),n}function ei(n){try{return new URL(n).href}catch{}return n.substring(0,2)==="//"?window.location.protocol+n:window.location.origin+n}function ti(){return Kn(10)}function oi(n){window.open(n,"_blank")}function ni(n=""){return`${n}${Math.floor(Math.random()*1e8).toString(16)}`}function st(n,e,t){const o=`«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;n&&X(o,"warn")}function fe(n,e,t){const o=t.value?"value":"get",i=t[o],s=`#${e}Cache`;if(t[o]=function(...r){return this[s]===void 0&&(this[s]=i.apply(this,...r)),this[s]},o==="get"&&t.set){const r=t.set;t.set=function(a){delete n[s],r.apply(this,a)}}return t}const Co=650;function ge(){return window.matchMedia(`(max-width: ${Co}px)`).matches}const rt=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1);function ii(n,e){const t=Array.isArray(n)||N(n),o=Array.isArray(e)||N(e);return t||o?JSON.stringify(n)===JSON.stringify(e):n===e}class d{static isSingleTag(e){return e.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(e.tagName)}static isLineBreakTag(e){return e&&e.tagName&&["BR","WBR"].includes(e.tagName)}static make(e,t=null,o={}){const i=document.createElement(e);if(Array.isArray(t)){const s=t.filter(r=>r!==void 0);i.classList.add(...s)}else t&&i.classList.add(t);for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&(i[s]=o[s]);return i}static text(e){return document.createTextNode(e)}static append(e,t){Array.isArray(t)?t.forEach(o=>e.appendChild(o)):e.appendChild(t)}static prepend(e,t){Array.isArray(t)?(t=t.reverse(),t.forEach(o=>e.prepend(o))):e.prepend(t)}static swap(e,t){const o=document.createElement("div"),i=e.parentNode;i.insertBefore(o,e),i.insertBefore(e,t),i.insertBefore(t,o),i.removeChild(o)}static find(e=document,t){return e.querySelector(t)}static get(e){return document.getElementById(e)}static findAll(e=document,t){return e.querySelectorAll(t)}static get allInputsSelector(){return"[contenteditable=true], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map(t=>`input[type="${t}"]`).join(", ")}static findAllInputs(e){return xo(e.querySelectorAll(d.allInputsSelector)).reduce((t,o)=>d.isNativeInput(o)||d.containsOnlyInlineElements(o)?[...t,o]:[...t,...d.getDeepestBlockElements(o)],[])}static getDeepestNode(e,t=!1){const o=t?"lastChild":"firstChild",i=t?"previousSibling":"nextSibling";if(e&&e.nodeType===Node.ELEMENT_NODE&&e[o]){let s=e[o];if(d.isSingleTag(s)&&!d.isNativeInput(s)&&!d.isLineBreakTag(s))if(s[i])s=s[i];else if(s.parentNode[i])s=s.parentNode[i];else return s.parentNode;return this.getDeepestNode(s,t)}return e}static isElement(e){return yo(e)?!1:e&&e.nodeType&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return yo(e)?!1:e&&e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isContentEditable(e){return e.contentEditable==="true"}static isNativeInput(e){const t=["INPUT","TEXTAREA"];return e&&e.tagName?t.includes(e.tagName):!1}static canSetCaret(e){let t=!0;if(d.isNativeInput(e))switch(e.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":t=!1;break}else t=d.isContentEditable(e);return t}static isNodeEmpty(e,t){let o;return this.isSingleTag(e)&&!this.isLineBreakTag(e)?!1:(this.isElement(e)&&this.isNativeInput(e)?o=e.value:o=e.textContent.replace("​",""),t&&(o=o.replace(new RegExp(t,"g"),"")),o.length===0)}static isLeaf(e){return e?e.childNodes.length===0:!1}static isEmpty(e,t){const o=[e];for(;o.length>0;)if(e=o.shift(),!!e){if(this.isLeaf(e)&&!this.isNodeEmpty(e,t))return!1;e.childNodes&&o.push(...Array.from(e.childNodes))}return!0}static isHTMLString(e){const t=d.make("div");return t.innerHTML=e,t.childElementCount>0}static getContentLength(e){return d.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent.length}static get blockElements(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}static containsOnlyInlineElements(e){let t;Q(e)?(t=document.createElement("div"),t.innerHTML=e):t=e;const o=i=>!d.blockElements.includes(i.tagName.toLowerCase())&&Array.from(i.children).every(o);return Array.from(t.children).every(o)}static getDeepestBlockElements(e){return d.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce((t,o)=>[...t,...d.getDeepestBlockElements(o)],[])}static getHolder(e){return Q(e)?document.getElementById(e):e}static isAnchor(e){return e.tagName.toLowerCase()==="a"}static offset(e){const t=e.getBoundingClientRect(),o=window.pageXOffset||document.documentElement.scrollLeft,i=window.pageYOffset||document.documentElement.scrollTop,s=t.top+i,r=t.left+o;return{top:s,left:r,bottom:s+t.height,right:r+t.width}}}function si(n){return!/[^\t\n\r ]/.test(n)}function ri(n){const e=window.getComputedStyle(n),t=parseFloat(e.fontSize),o=parseFloat(e.lineHeight)||t*1.2,i=parseFloat(e.paddingTop),s=parseFloat(e.borderTopWidth),r=parseFloat(e.marginTop),a=t*.8,l=(o-t)/2;return r+s+i+l+a}function To(n){n.dataset.empty=d.isEmpty(n)?"true":"false"}const So={ui:{blockTunes:{toggler:{"Click to tune":"","or drag to move":""}},inlineToolbar:{converter:{"Convert to":""}},toolbar:{toolbox:{Add:""}},popover:{Filter:"","Nothing found":"","Convert to":""}},toolNames:{Text:"",Link:"",Bold:"",Italic:""},tools:{link:{"Add a link":""},stub:{"The block can not be displayed correctly.":""}},blockTunes:{delete:{Delete:"","Click to delete":""},moveUp:{"Move up":""},moveDown:{"Move down":""}}},Io=class ke{static ui(e,t){return ke._t(e,t)}static t(e,t){return ke._t(e,t)}static setDictionary(e){ke.currentDictionary=e}static _t(e,t){const o=ke.getNamespace(e);return!o||!o[t]?t:o[t]}static getNamespace(e){return e.split(".").reduce((o,i)=>!o||!Object.keys(o).length?{}:o[i],ke.currentDictionary)}};Io.currentDictionary=So;let H=Io;class Oo extends Error{}class we{constructor(){this.subscribers={}}on(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}once(e,t){e in this.subscribers||(this.subscribers[e]=[]);const o=i=>{const s=t(i),r=this.subscribers[e].indexOf(o);return r!==-1&&this.subscribers[e].splice(r,1),s};this.subscribers[e].push(o)}emit(e,t){V(this.subscribers)||!this.subscribers[e]||this.subscribers[e].reduce((o,i)=>{const s=i(o);return s!==void 0?s:o},t)}off(e,t){if(this.subscribers[e]===void 0){console.warn(`EventDispatcher .off(): there is no subscribers for event "${e.toString()}". Probably, .off() called before .on()`);return}for(let o=0;o{const l=this.allListeners.indexOf(s[a]);l>-1&&(this.allListeners.splice(l,1),r.element.removeEventListener(r.eventType,r.handler,r.options))})}offById(e){const t=this.findById(e);t&&t.element.removeEventListener(t.eventType,t.handler,t.options)}findOne(e,t,o){const i=this.findAll(e,t,o);return i.length>0?i[0]:null}findAll(e,t,o){let i;const s=e?this.findByEventTarget(e):[];return e&&t&&o?i=s.filter(r=>r.eventType===t&&r.handler===o):e&&t?i=s.filter(r=>r.eventType===t):i=s,i}removeAll(){this.allListeners.map(e=>{e.element.removeEventListener(e.eventType,e.handler,e.options)}),this.allListeners=[]}destroy(){this.removeAll()}findByEventTarget(e){return this.allListeners.filter(t=>{if(t.element===e)return t})}findByType(e){return this.allListeners.filter(t=>{if(t.eventType===e)return t})}findByHandler(e){return this.allListeners.filter(t=>{if(t.handler===e)return t})}findById(e){return this.allListeners.find(t=>t.id===e)}}class E{constructor({config:e,eventsDispatcher:t}){if(this.nodes={},this.listeners=new Ee,this.readOnlyMutableListeners={on:(o,i,s,r=!1)=>{this.mutableListenerIds.push(this.listeners.on(o,i,s,r))},clearAll:()=>{for(const o of this.mutableListenerIds)this.listeners.offById(o);this.mutableListenerIds=[]}},this.mutableListenerIds=[],new.target===E)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=e,this.eventsDispatcher=t}set state(e){this.Editor=e}removeAllNodes(){for(const e in this.nodes){const t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}get isRtl(){return this.config.i18n.direction==="rtl"}}class b{constructor(){this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}static get CSS(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}static get anchorNode(){const e=window.getSelection();return e?e.anchorNode:null}static get anchorElement(){const e=window.getSelection();if(!e)return null;const t=e.anchorNode;return t?d.isElement(t)?t:t.parentElement:null}static get anchorOffset(){const e=window.getSelection();return e?e.anchorOffset:null}static get isCollapsed(){const e=window.getSelection();return e?e.isCollapsed:null}static get isAtEditor(){return this.isSelectionAtEditor(b.get())}static isSelectionAtEditor(e){if(!e)return!1;let t=e.anchorNode||e.focusNode;t&&t.nodeType===Node.TEXT_NODE&&(t=t.parentNode);let o=null;return t&&t instanceof Element&&(o=t.closest(`.${b.CSS.editorZone}`)),o?o.nodeType===Node.ELEMENT_NODE:!1}static isRangeAtEditor(e){if(!e)return;let t=e.startContainer;t&&t.nodeType===Node.TEXT_NODE&&(t=t.parentNode);let o=null;return t&&t instanceof Element&&(o=t.closest(`.${b.CSS.editorZone}`)),o?o.nodeType===Node.ELEMENT_NODE:!1}static get isSelectionExists(){return!!b.get().anchorNode}static get range(){return this.getRangeFromSelection(this.get())}static getRangeFromSelection(e){return e&&e.rangeCount?e.getRangeAt(0):null}static get rect(){let e=document.selection,t,o={x:0,y:0,width:0,height:0};if(e&&e.type!=="Control")return e=e,t=e.createRange(),o.x=t.boundingLeft,o.y=t.boundingTop,o.width=t.boundingWidth,o.height=t.boundingHeight,o;if(!window.getSelection)return T("Method window.getSelection is not supported","warn"),o;if(e=window.getSelection(),e.rangeCount===null||isNaN(e.rangeCount))return T("Method SelectionUtils.rangeCount is not supported","warn"),o;if(e.rangeCount===0)return o;if(t=e.getRangeAt(0).cloneRange(),t.getBoundingClientRect&&(o=t.getBoundingClientRect()),o.x===0&&o.y===0){const i=document.createElement("span");if(i.getBoundingClientRect){i.appendChild(document.createTextNode("​")),t.insertNode(i),o=i.getBoundingClientRect();const s=i.parentNode;s.removeChild(i),s.normalize()}}return o}static get text(){return window.getSelection?window.getSelection().toString():""}static get(){return window.getSelection()}static setCursor(e,t=0){const o=document.createRange(),i=window.getSelection();return d.isNativeInput(e)?d.canSetCaret(e)?(e.focus(),e.selectionStart=e.selectionEnd=t,e.getBoundingClientRect()):void 0:(o.setStart(e,t),o.setEnd(e,t),i.removeAllRanges(),i.addRange(o),o.getBoundingClientRect())}static isRangeInsideContainer(e){const t=b.range;return t===null?!1:e.contains(t.startContainer)}static addFakeCursor(){const e=b.range;if(e===null)return;const t=d.make("span","codex-editor__fake-cursor");t.dataset.mutationFree="true",e.collapse(),e.insertNode(t)}static isFakeCursorInsideContainer(e){return d.find(e,".codex-editor__fake-cursor")!==null}static removeFakeCursor(e=document.body){const t=d.find(e,".codex-editor__fake-cursor");t&&t.remove()}removeFakeBackground(){this.isFakeBackgroundEnabled&&(this.isFakeBackgroundEnabled=!1,document.execCommand(this.commandRemoveFormat))}setFakeBackground(){document.execCommand(this.commandBackground,!1,"#a8d6ff"),this.isFakeBackgroundEnabled=!0}save(){this.savedSelectionRange=b.range}restore(){if(!this.savedSelectionRange)return;const e=window.getSelection();e.removeAllRanges(),e.addRange(this.savedSelectionRange)}clearSaved(){this.savedSelectionRange=null}collapseToEnd(){const e=window.getSelection(),t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}findParentTag(e,t,o=10){const i=window.getSelection();let s=null;return!i||!i.anchorNode||!i.focusNode?null:([i.anchorNode,i.focusNode].forEach(a=>{let l=o;for(;l>0&&a.parentNode&&!(a.tagName===e&&(s=a,t&&a.classList&&!a.classList.contains(t)&&(s=null),s));)a=a.parentNode,l--}),s)}expandToTag(e){const t=window.getSelection();t.removeAllRanges();const o=document.createRange();o.selectNodeContents(e),t.addRange(o)}}function ai(n,e){const{type:t,target:o,addedNodes:i,removedNodes:s}=n;return n.type==="attributes"&&n.attributeName==="data-empty"?!1:!!(e.contains(o)||t==="childList"&&(Array.from(i).some(l=>l===e)||Array.from(s).some(l=>l===e)))}const at="redactor dom changed",_o="block changed",Mo="fake cursor is about to be toggled",Ao="fake cursor have been set",xe="editor mobile layout toggled";function lt(n,e){if(!n.conversionConfig)return!1;const t=n.conversionConfig[e];return M(t)||Q(t)}function Pe(n,e){return lt(n.tool,e)}function Lo(n,e){return Object.entries(n).some(([t,o])=>e[t]&&ii(e[t],o))}async function Po(n,e){const o=(await n.save()).data,i=e.find(s=>s.name===n.name);return i!==void 0&&!lt(i,"export")?[]:e.reduce((s,r)=>{if(!lt(r,"import")||r.toolbox===void 0)return s;const a=r.toolbox.filter(l=>{if(V(l)||l.icon===void 0)return!1;if(l.data!==void 0){if(Lo(l.data,o))return!1}else if(r.name===n.name)return!1;return!0});return s.push({...r,toolbox:a}),s},[])}function No(n,e){return n.mergeable?n.name===e.name?!0:Pe(e,"export")&&Pe(n,"import"):!1}function li(n,e){const t=e==null?void 0:e.export;return M(t)?t(n):Q(t)?n[t]:(t!==void 0&&T("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),"")}function Ro(n,e,t){const o=e==null?void 0:e.import;return M(o)?o(n,t):Q(o)?{[o]:n}:(o!==void 0&&T("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),{})}var _=(n=>(n.Default="default",n.Separator="separator",n.Html="html",n))(_||{}),te=(n=>(n.APPEND_CALLBACK="appendCallback",n.RENDERED="rendered",n.MOVED="moved",n.UPDATED="updated",n.REMOVED="removed",n.ON_PASTE="onPaste",n))(te||{});class R extends we{constructor({id:e=ti(),data:t,tool:o,readOnly:i,tunesData:s},r){super(),this.cachedInputs=[],this.toolRenderedElement=null,this.tunesInstances=new Map,this.defaultTunesInstances=new Map,this.unavailableTunesData={},this.inputIndex=0,this.editorEventBus=null,this.handleFocus=()=>{this.dropInputsCache(),this.updateCurrentInput()},this.didMutated=(a=void 0)=>{const l=a===void 0,c=a instanceof InputEvent;!l&&!c&&this.detectToolRootChange(a);let u;l||c?u=!0:u=!(a.length>0&&a.every(p=>{const{addedNodes:g,removedNodes:f,target:v}=p;return[...Array.from(g),...Array.from(f),v].some(S=>(d.isElement(S)||(S=S.parentElement),S&&S.closest('[data-mutation-free="true"]')!==null))})),u&&(this.dropInputsCache(),this.updateCurrentInput(),this.toggleInputsEmptyMark(),this.call("updated"),this.emit("didMutated",this))},this.name=o.name,this.id=e,this.settings=o.settings,this.config=o.settings.config||{},this.editorEventBus=r||null,this.blockAPI=new ee(this),this.tool=o,this.toolInstance=o.create(t,this.blockAPI,i),this.tunes=o.tunes,this.composeTunes(s),this.holder=this.compose(),window.requestIdleCallback(()=>{this.watchBlockMutations(),this.addInputEvents(),this.toggleInputsEmptyMark()})}static get CSS(){return{wrapper:"ce-block",wrapperStretched:"ce-block--stretched",content:"ce-block__content",selected:"ce-block--selected",dropTarget:"ce-block--drop-target"}}get inputs(){if(this.cachedInputs.length!==0)return this.cachedInputs;const e=d.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}get currentInput(){return this.inputs[this.inputIndex]}set currentInput(e){const t=this.inputs.findIndex(o=>o===e||o.contains(e));t!==-1&&(this.inputIndex=t)}get firstInput(){return this.inputs[0]}get lastInput(){const e=this.inputs;return e[e.length-1]}get nextInput(){return this.inputs[this.inputIndex+1]}get previousInput(){return this.inputs[this.inputIndex-1]}get data(){return this.save().then(e=>e&&!V(e.data)?e.data:{})}get sanitize(){return this.tool.sanitizeConfig}get mergeable(){return M(this.toolInstance.merge)}get focusable(){return this.inputs.length!==0}get isEmpty(){const e=d.isEmpty(this.pluginsContent,"/"),t=!this.hasMedia;return e&&t}get hasMedia(){const e=["img","iframe","video","audio","source","input","textarea","twitterwidget"];return!!this.holder.querySelector(e.join(","))}set selected(e){var i,s;this.holder.classList.toggle(R.CSS.selected,e);const t=e===!0&&b.isRangeInsideContainer(this.holder),o=e===!1&&b.isFakeCursorInsideContainer(this.holder);(t||o)&&((i=this.editorEventBus)==null||i.emit(Mo,{state:e}),t?b.addFakeCursor():b.removeFakeCursor(this.holder),(s=this.editorEventBus)==null||s.emit(Ao,{state:e}))}get selected(){return this.holder.classList.contains(R.CSS.selected)}set stretched(e){this.holder.classList.toggle(R.CSS.wrapperStretched,e)}get stretched(){return this.holder.classList.contains(R.CSS.wrapperStretched)}set dropTarget(e){this.holder.classList.toggle(R.CSS.dropTarget,e)}get pluginsContent(){return this.toolRenderedElement}call(e,t){if(M(this.toolInstance[e])){e==="appendCallback"&&T("`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead","warn");try{this.toolInstance[e].call(this.toolInstance,t)}catch(o){T(`Error during '${e}' call: ${o.message}`,"error")}}}async mergeWith(e){await this.toolInstance.merge(e)}async save(){const e=await this.toolInstance.save(this.pluginsContent),t=this.unavailableTunesData;[...this.tunesInstances.entries(),...this.defaultTunesInstances.entries()].forEach(([s,r])=>{if(M(r.save))try{t[s]=r.save()}catch(a){T(`Tune ${r.constructor.name} save method throws an Error %o`,"warn",a)}});const o=window.performance.now();let i;return Promise.resolve(e).then(s=>(i=window.performance.now(),{id:this.id,tool:this.name,data:s,tunes:t,time:i-o})).catch(s=>{T(`Saving process for ${this.name} tool failed due to the ${s}`,"log","red")})}async validate(e){let t=!0;return this.toolInstance.validate instanceof Function&&(t=await this.toolInstance.validate(e)),t}getTunes(){const e=[],t=[],o=typeof this.toolInstance.renderSettings=="function"?this.toolInstance.renderSettings():[];return d.isElement(o)?e.push({type:_.Html,element:o}):Array.isArray(o)?e.push(...o):e.push(o),[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].map(s=>s.render()).forEach(s=>{d.isElement(s)?t.push({type:_.Html,element:s}):Array.isArray(s)?t.push(...s):t.push(s)}),{toolTunes:e,commonTunes:t}}updateCurrentInput(){this.currentInput=d.isNativeInput(document.activeElement)||!b.anchorNode?document.activeElement:b.anchorNode}dispatchChange(){this.didMutated()}destroy(){this.unwatchBlockMutations(),this.removeInputEvents(),super.destroy(),M(this.toolInstance.destroy)&&this.toolInstance.destroy()}async getActiveToolboxEntry(){const e=this.tool.toolbox;if(e.length===1)return Promise.resolve(this.tool.toolbox[0]);const t=await this.data,o=e;return o==null?void 0:o.find(i=>Lo(i.data,t))}async exportDataAsString(){const e=await this.data;return li(e,this.tool.conversionConfig)}compose(){const e=d.make("div",R.CSS.wrapper),t=d.make("div",R.CSS.content),o=this.toolInstance.render();e.setAttribute("data-cy","block-wrapper"),e.dataset.id=this.id,this.toolRenderedElement=o,t.appendChild(this.toolRenderedElement);let i=t;return[...this.tunesInstances.values(),...this.defaultTunesInstances.values()].forEach(s=>{if(M(s.wrap))try{i=s.wrap(i)}catch(r){T(`Tune ${s.constructor.name} wrap method throws an Error %o`,"warn",r)}}),e.appendChild(i),e}composeTunes(e){Array.from(this.tunes.values()).forEach(t=>{(t.isInternal?this.defaultTunesInstances:this.tunesInstances).set(t.name,t.create(e[t.name],this.blockAPI))}),Object.entries(e).forEach(([t,o])=>{this.tunesInstances.has(t)||(this.unavailableTunesData[t]=o)})}addInputEvents(){this.inputs.forEach(e=>{e.addEventListener("focus",this.handleFocus),d.isNativeInput(e)&&e.addEventListener("input",this.didMutated)})}removeInputEvents(){this.inputs.forEach(e=>{e.removeEventListener("focus",this.handleFocus),d.isNativeInput(e)&&e.removeEventListener("input",this.didMutated)})}watchBlockMutations(){var e;this.redactorDomChangedCallback=t=>{const{mutations:o}=t;o.some(s=>ai(s,this.toolRenderedElement))&&this.didMutated(o)},(e=this.editorEventBus)==null||e.on(at,this.redactorDomChangedCallback)}unwatchBlockMutations(){var e;(e=this.editorEventBus)==null||e.off(at,this.redactorDomChangedCallback)}detectToolRootChange(e){e.forEach(t=>{if(Array.from(t.removedNodes).includes(this.toolRenderedElement)){const i=t.addedNodes[t.addedNodes.length-1];this.toolRenderedElement=i}})}dropInputsCache(){this.cachedInputs=[]}toggleInputsEmptyMark(){this.inputs.forEach(To)}}class ci extends E{constructor(){super(...arguments),this.insert=(e=this.config.defaultBlock,t={},o={},i,s,r,a)=>{const l=this.Editor.BlockManager.insert({id:a,tool:e,data:t,index:i,needToFocus:s,replace:r});return new ee(l)},this.composeBlockData=async e=>{const t=this.Editor.Tools.blockTools.get(e);return new R({tool:t,api:this.Editor.API,readOnly:!0,data:{},tunesData:{}}).data},this.update=async(e,t,o)=>{const{BlockManager:i}=this.Editor,s=i.getBlockById(e);if(s===void 0)throw new Error(`Block with id "${e}" not found`);const r=await i.update(s,t,o);return new ee(r)},this.convert=async(e,t,o)=>{var h,p;const{BlockManager:i,Tools:s}=this.Editor,r=i.getBlockById(e);if(!r)throw new Error(`Block with id "${e}" not found`);const a=s.blockTools.get(r.name),l=s.blockTools.get(t);if(!l)throw new Error(`Block Tool with type "${t}" not found`);const c=((h=a==null?void 0:a.conversionConfig)==null?void 0:h.export)!==void 0,u=((p=l.conversionConfig)==null?void 0:p.import)!==void 0;if(c&&u){const g=await i.convert(r,t,o);return new ee(g)}else{const g=[c?!1:Le(r.name),u?!1:Le(t)].filter(Boolean).join(" and ");throw new Error(`Conversion from "${r.name}" to "${t}" is not possible. ${g} tool(s) should provide a "conversionConfig"`)}},this.insertMany=(e,t=this.Editor.BlockManager.blocks.length-1)=>{this.validateIndex(t);const o=e.map(({id:i,type:s,data:r})=>this.Editor.BlockManager.composeBlock({id:i,tool:s||this.config.defaultBlock,data:r}));return this.Editor.BlockManager.insertMany(o,t),o.map(i=>new ee(i))}}get methods(){return{clear:()=>this.clear(),render:e=>this.render(e),renderFromHTML:e=>this.renderFromHTML(e),delete:e=>this.delete(e),swap:(e,t)=>this.swap(e,t),move:(e,t)=>this.move(e,t),getBlockByIndex:e=>this.getBlockByIndex(e),getById:e=>this.getById(e),getCurrentBlockIndex:()=>this.getCurrentBlockIndex(),getBlockIndex:e=>this.getBlockIndex(e),getBlocksCount:()=>this.getBlocksCount(),getBlockByElement:e=>this.getBlockByElement(e),stretchBlock:(e,t=!0)=>this.stretchBlock(e,t),insertNewBlock:()=>this.insertNewBlock(),insert:this.insert,insertMany:this.insertMany,update:this.update,composeBlockData:this.composeBlockData,convert:this.convert}}getBlocksCount(){return this.Editor.BlockManager.blocks.length}getCurrentBlockIndex(){return this.Editor.BlockManager.currentBlockIndex}getBlockIndex(e){const t=this.Editor.BlockManager.getBlockById(e);if(!t){X("There is no block with id `"+e+"`","warn");return}return this.Editor.BlockManager.getBlockIndex(t)}getBlockByIndex(e){const t=this.Editor.BlockManager.getBlockByIndex(e);if(t===void 0){X("There is no block at index `"+e+"`","warn");return}return new ee(t)}getById(e){const t=this.Editor.BlockManager.getBlockById(e);return t===void 0?(X("There is no block with id `"+e+"`","warn"),null):new ee(t)}getBlockByElement(e){const t=this.Editor.BlockManager.getBlock(e);if(t===void 0){X("There is no block corresponding to element `"+e+"`","warn");return}return new ee(t)}swap(e,t){T("`blocks.swap()` method is deprecated and will be removed in the next major release. Use `block.move()` method instead","info"),this.Editor.BlockManager.swap(e,t)}move(e,t){this.Editor.BlockManager.move(e,t)}delete(e=this.Editor.BlockManager.currentBlockIndex){try{const t=this.Editor.BlockManager.getBlockByIndex(e);this.Editor.BlockManager.removeBlock(t)}catch(t){X(t,"warn");return}this.Editor.BlockManager.blocks.length===0&&this.Editor.BlockManager.insert(),this.Editor.BlockManager.currentBlock&&this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END),this.Editor.Toolbar.close()}async clear(){await this.Editor.BlockManager.clear(!0),this.Editor.InlineToolbar.close()}async render(e){if(e===void 0||e.blocks===void 0)throw new Error("Incorrect data passed to the render() method");this.Editor.ModificationsObserver.disable(),await this.Editor.BlockManager.clear(),await this.Editor.Renderer.render(e.blocks),this.Editor.ModificationsObserver.enable()}renderFromHTML(e){return this.Editor.BlockManager.clear(),this.Editor.Paste.processText(e,!0)}stretchBlock(e,t=!0){st(!0,"blocks.stretchBlock()","BlockAPI");const o=this.Editor.BlockManager.getBlockByIndex(e);o&&(o.stretched=t)}insertNewBlock(){T("Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.","warn"),this.insert()}validateIndex(e){if(typeof e!="number")throw new Error("Index should be a number");if(e<0)throw new Error("Index should be greater than or equal to 0");if(e===null)throw new Error("Index should be greater than or equal to 0")}}function di(n,e){return typeof n=="number"?e.BlockManager.getBlockByIndex(n):typeof n=="string"?e.BlockManager.getBlockById(n):e.BlockManager.getBlockById(n.id)}class ui extends E{constructor(){super(...arguments),this.setToFirstBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.firstBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.firstBlock,e,t),!0):!1,this.setToLastBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.lastBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.lastBlock,e,t),!0):!1,this.setToPreviousBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.previousBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.previousBlock,e,t),!0):!1,this.setToNextBlock=(e=this.Editor.Caret.positions.DEFAULT,t=0)=>this.Editor.BlockManager.nextBlock?(this.Editor.Caret.setToBlock(this.Editor.BlockManager.nextBlock,e,t),!0):!1,this.setToBlock=(e,t=this.Editor.Caret.positions.DEFAULT,o=0)=>{const i=di(e,this.Editor);return i===void 0?!1:(this.Editor.Caret.setToBlock(i,t,o),!0)},this.focus=(e=!1)=>e?this.setToLastBlock(this.Editor.Caret.positions.END):this.setToFirstBlock(this.Editor.Caret.positions.START)}get methods(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}class hi extends E{get methods(){return{emit:(e,t)=>this.emit(e,t),off:(e,t)=>this.off(e,t),on:(e,t)=>this.on(e,t)}}on(e,t){this.eventsDispatcher.on(e,t)}emit(e,t){this.eventsDispatcher.emit(e,t)}off(e,t){this.eventsDispatcher.off(e,t)}}class ct extends E{static getNamespace(e,t){return t?`blockTunes.${e}`:`tools.${e}`}get methods(){return{t:()=>{X("I18n.t() method can be accessed only from Tools","warn")}}}getMethodsForTool(e,t){return Object.assign(this.methods,{t:o=>H.t(ct.getNamespace(e,t),o)})}}class pi extends E{get methods(){return{blocks:this.Editor.BlocksAPI.methods,caret:this.Editor.CaretAPI.methods,tools:this.Editor.ToolsAPI.methods,events:this.Editor.EventsAPI.methods,listeners:this.Editor.ListenersAPI.methods,notifier:this.Editor.NotifierAPI.methods,sanitizer:this.Editor.SanitizerAPI.methods,saver:this.Editor.SaverAPI.methods,selection:this.Editor.SelectionAPI.methods,styles:this.Editor.StylesAPI.classes,toolbar:this.Editor.ToolbarAPI.methods,inlineToolbar:this.Editor.InlineToolbarAPI.methods,tooltip:this.Editor.TooltipAPI.methods,i18n:this.Editor.I18nAPI.methods,readOnly:this.Editor.ReadOnlyAPI.methods,ui:this.Editor.UiAPI.methods}}getMethodsForTool(e,t){return Object.assign(this.methods,{i18n:this.Editor.I18nAPI.getMethodsForTool(e,t)})}}class fi extends E{get methods(){return{close:()=>this.close(),open:()=>this.open()}}open(){this.Editor.InlineToolbar.tryToShow()}close(){this.Editor.InlineToolbar.close()}}class gi extends E{get methods(){return{on:(e,t,o,i)=>this.on(e,t,o,i),off:(e,t,o,i)=>this.off(e,t,o,i),offById:e=>this.offById(e)}}on(e,t,o,i){return this.listeners.on(e,t,o,i)}off(e,t,o,i){this.listeners.off(e,t,o,i)}offById(e){this.listeners.offById(e)}}var Do={exports:{}};(function(n,e){(function(t,o){n.exports=o()})(window,function(){return function(t){var o={};function i(s){if(o[s])return o[s].exports;var r=o[s]={i:s,l:!1,exports:{}};return t[s].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=o,i.d=function(s,r,a){i.o(s,r)||Object.defineProperty(s,r,{enumerable:!0,get:a})},i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},i.t=function(s,r){if(1&r&&(s=i(s)),8&r||4&r&&typeof s=="object"&&s&&s.__esModule)return s;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:s}),2&r&&typeof s!="string")for(var l in s)i.d(a,l,(function(c){return s[c]}).bind(null,l));return a},i.n=function(s){var r=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(r,"a",r),r},i.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)},i.p="/",i(i.s=0)}([function(t,o,i){i(1),t.exports=function(){var s=i(6),r="cdx-notify--bounce-in",a=null;return{show:function(l){if(l.message){(function(){if(a)return!0;a=s.getWrapper(),document.body.appendChild(a)})();var c=null,u=l.time||8e3;switch(l.type){case"confirm":c=s.confirm(l);break;case"prompt":c=s.prompt(l);break;default:c=s.alert(l),window.setTimeout(function(){c.remove()},u)}a.appendChild(c),c.classList.add(r)}}}}()},function(t,o,i){var s=i(2);typeof s=="string"&&(s=[[t.i,s,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};i(4)(s,r),s.locals&&(t.exports=s.locals)},function(t,o,i){(t.exports=i(3)(!1)).push([t.i,`.cdx-notify--error{background:#fffbfb!important}.cdx-notify--error::before{background:#fb5d5d!important}.cdx-notify__input{max-width:130px;padding:5px 10px;background:#f7f7f7;border:0;border-radius:3px;font-size:13px;color:#656b7c;outline:0}.cdx-notify__input:-ms-input-placeholder{color:#656b7c}.cdx-notify__input::placeholder{color:#656b7c}.cdx-notify__input:focus:-ms-input-placeholder{color:rgba(101,107,124,.3)}.cdx-notify__input:focus::placeholder{color:rgba(101,107,124,.3)}.cdx-notify__button{border:none;border-radius:3px;font-size:13px;padding:5px 10px;cursor:pointer}.cdx-notify__button:last-child{margin-left:10px}.cdx-notify__button--cancel{background:#f2f5f7;box-shadow:0 2px 1px 0 rgba(16,19,29,0);color:#656b7c}.cdx-notify__button--cancel:hover{background:#eee}.cdx-notify__button--confirm{background:#34c992;box-shadow:0 1px 1px 0 rgba(18,49,35,.05);color:#fff}.cdx-notify__button--confirm:hover{background:#33b082}.cdx-notify__btns-wrapper{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;margin-top:5px}.cdx-notify__cross{position:absolute;top:5px;right:5px;width:10px;height:10px;padding:5px;opacity:.54;cursor:pointer}.cdx-notify__cross::after,.cdx-notify__cross::before{content:'';position:absolute;left:9px;top:5px;height:12px;width:2px;background:#575d67}.cdx-notify__cross::before{transform:rotate(-45deg)}.cdx-notify__cross::after{transform:rotate(45deg)}.cdx-notify__cross:hover{opacity:1}.cdx-notifies{position:fixed;z-index:2;bottom:20px;left:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.cdx-notify{position:relative;width:220px;margin-top:15px;padding:13px 16px;background:#fff;box-shadow:0 11px 17px 0 rgba(23,32,61,.13);border-radius:5px;font-size:14px;line-height:1.4em;word-wrap:break-word}.cdx-notify::before{content:'';position:absolute;display:block;top:0;left:0;width:3px;height:calc(100% - 6px);margin:3px;border-radius:5px;background:0 0}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.cdx-notify--bounce-in{animation-name:bounceIn;animation-duration:.6s;animation-iteration-count:1}.cdx-notify--success{background:#fafffe!important}.cdx-notify--success::before{background:#41ffb1!important}`,""])},function(t,o){t.exports=function(i){var s=[];return s.toString=function(){return this.map(function(r){var a=function(l,c){var u=l[1]||"",h=l[3];if(!h)return u;if(c&&typeof btoa=="function"){var p=(f=h,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(f))))+" */"),g=h.sources.map(function(v){return"/*# sourceURL="+h.sourceRoot+v+" */"});return[u].concat(g).concat([p]).join(` +`)}var f;return[u].join(` +`)}(r,i);return r[2]?"@media "+r[2]+"{"+a+"}":a}).join("")},s.i=function(r,a){typeof r=="string"&&(r=[[null,r,""]]);for(var l={},c=0;c=0&&p.splice(m,1)}function A(k){var m=document.createElement("style");return k.attrs.type===void 0&&(k.attrs.type="text/css"),G(m,k.attrs),O(k,m),m}function G(k,m){Object.keys(m).forEach(function(w){k.setAttribute(w,m[w])})}function j(k,m){var w,x,I,C;if(m.transform&&k.css){if(!(C=m.transform(k.css)))return function(){};k.css=C}if(m.singleton){var D=h++;w=u||(u=A(m)),x=he.bind(null,w,D,!1),I=he.bind(null,w,D,!0)}else k.sourceMap&&typeof URL=="function"&&typeof URL.createObjectURL=="function"&&typeof URL.revokeObjectURL=="function"&&typeof Blob=="function"&&typeof btoa=="function"?(w=function(B){var K=document.createElement("link");return B.attrs.type===void 0&&(B.attrs.type="text/css"),B.attrs.rel="stylesheet",G(K,B.attrs),O(B,K),K}(m),x=(function(B,K,Oe){var pe=Oe.css,vo=Oe.sourceMap,Ca=K.convertToAbsoluteUrls===void 0&&vo;(K.convertToAbsoluteUrls||Ca)&&(pe=g(pe)),vo&&(pe+=` +/*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(vo))))+" */");var Ta=new Blob([pe],{type:"text/css"}),$n=B.href;B.href=URL.createObjectURL(Ta),$n&&URL.revokeObjectURL($n)}).bind(null,w,m),I=function(){S(w),w.href&&URL.revokeObjectURL(w.href)}):(w=A(m),x=(function(B,K){var Oe=K.css,pe=K.media;if(pe&&B.setAttribute("media",pe),B.styleSheet)B.styleSheet.cssText=Oe;else{for(;B.firstChild;)B.removeChild(B.firstChild);B.appendChild(document.createTextNode(Oe))}}).bind(null,w),I=function(){S(w)});return x(k),function(B){if(B){if(B.css===k.css&&B.media===k.media&&B.sourceMap===k.sourceMap)return;x(k=B)}else I()}}t.exports=function(k,m){if(typeof DEBUG<"u"&&DEBUG&&typeof document!="object")throw new Error("The style-loader cannot be used in a non-browser environment");(m=m||{}).attrs=typeof m.attrs=="object"?m.attrs:{},m.singleton||typeof m.singleton=="boolean"||(m.singleton=l()),m.insertInto||(m.insertInto="head"),m.insertAt||(m.insertAt="bottom");var w=v(k,m);return f(w,m),function(x){for(var I=[],C=0;Cthis.show(e)}}show(e){return this.notifier.show(e)}}class yi extends E{get methods(){const e=()=>this.isEnabled;return{toggle:t=>this.toggle(t),get isEnabled(){return e()}}}toggle(e){return this.Editor.ReadOnly.toggle(e)}get isEnabled(){return this.Editor.ReadOnly.isEnabled}}var Fo={exports:{}};(function(n,e){(function(t,o){n.exports=o()})(J,function(){function t(h){var p=h.tags,g=Object.keys(p),f=g.map(function(v){return typeof p[v]}).every(function(v){return v==="object"||v==="boolean"||v==="function"});if(!f)throw new Error("The configuration was invalid");this.config=h}var o=["P","LI","TD","TH","DIV","H1","H2","H3","H4","H5","H6","PRE"];function i(h){return o.indexOf(h.nodeName)!==-1}var s=["A","B","STRONG","I","EM","SUB","SUP","U","STRIKE"];function r(h){return s.indexOf(h.nodeName)!==-1}t.prototype.clean=function(h){const p=document.implementation.createHTMLDocument(),g=p.createElement("div");return g.innerHTML=h,this._sanitize(p,g),g.innerHTML},t.prototype._sanitize=function(h,p){var g=a(h,p),f=g.firstChild();if(f)do{if(f.nodeType===Node.TEXT_NODE)if(f.data.trim()===""&&(f.previousElementSibling&&i(f.previousElementSibling)||f.nextElementSibling&&i(f.nextElementSibling))){p.removeChild(f),this._sanitize(h,p);break}else continue;if(f.nodeType===Node.COMMENT_NODE){p.removeChild(f),this._sanitize(h,p);break}var v=r(f),O;v&&(O=Array.prototype.some.call(f.childNodes,i));var S=!!p.parentNode,A=i(p)&&i(f)&&S,G=f.nodeName.toLowerCase(),j=l(this.config,G,f),U=v&&O;if(U||c(f,j)||!this.config.keepNestedBlockElements&&A){if(!(f.nodeName==="SCRIPT"||f.nodeName==="STYLE"))for(;f.childNodes.length>0;)p.insertBefore(f.childNodes[0],f);p.removeChild(f),this._sanitize(h,p);break}for(var oe=0;oe"u"?!0:typeof p=="boolean"?!p:!1}function u(h,p,g){var f=h.name.toLowerCase();return p===!0?!1:typeof p[f]=="function"?!p[f](h.value,g):typeof p[f]>"u"||p[f]===!1?!0:typeof p[f]=="string"?p[f]!==h.value:!1}return t})})(Fo);var wi=Fo.exports;const Ei=ne(wi);function dt(n,e){return n.map(t=>{const o=M(e)?e(t.tool):e;return V(o)||(t.data=ut(t.data,o)),t})}function q(n,e={}){const t={tags:e};return new Ei(t).clean(n)}function ut(n,e){return Array.isArray(n)?xi(n,e):N(n)?Bi(n,e):Q(n)?Ci(n,e):n}function xi(n,e){return n.map(t=>ut(t,e))}function Bi(n,e){const t={};for(const o in n){if(!Object.prototype.hasOwnProperty.call(n,o))continue;const i=n[o],s=Ti(e[o])?e[o]:e;t[o]=ut(i,s)}return t}function Ci(n,e){return N(e)?q(n,e):e===!1?q(n,{}):n}function Ti(n){return N(n)||qn(n)||M(n)}class Si extends E{get methods(){return{clean:(e,t)=>this.clean(e,t)}}clean(e,t){return q(e,t)}}class Ii extends E{get methods(){return{save:()=>this.save()}}save(){const e="Editor's content can not be saved in read-only mode";return this.Editor.ReadOnly.isEnabled?(X(e,"warn"),Promise.reject(new Error(e))):this.Editor.Saver.save()}}class Oi extends E{constructor(){super(...arguments),this.selectionUtils=new b}get methods(){return{findParentTag:(e,t)=>this.findParentTag(e,t),expandToTag:e=>this.expandToTag(e),save:()=>this.selectionUtils.save(),restore:()=>this.selectionUtils.restore(),setFakeBackground:()=>this.selectionUtils.setFakeBackground(),removeFakeBackground:()=>this.selectionUtils.removeFakeBackground()}}findParentTag(e,t){return this.selectionUtils.findParentTag(e,t)}expandToTag(e){this.selectionUtils.expandToTag(e)}}class _i extends E{get methods(){return{getBlockTools:()=>Array.from(this.Editor.Tools.blockTools.values())}}}class Mi extends E{get classes(){return{block:"cdx-block",inlineToolButton:"ce-inline-tool",inlineToolButtonActive:"ce-inline-tool--active",input:"cdx-input",loader:"cdx-loader",button:"cdx-button",settingsButton:"cdx-settings-button",settingsButtonActive:"cdx-settings-button--active"}}}class Ai extends E{get methods(){return{close:()=>this.close(),open:()=>this.open(),toggleBlockSettings:e=>this.toggleBlockSettings(e),toggleToolbox:e=>this.toggleToolbox(e)}}open(){this.Editor.Toolbar.moveAndOpen()}close(){this.Editor.Toolbar.close()}toggleBlockSettings(e){if(this.Editor.BlockManager.currentBlockIndex===-1){X("Could't toggle the Toolbar because there is no block selected ","warn");return}e??!this.Editor.BlockSettings.opened?(this.Editor.Toolbar.moveAndOpen(),this.Editor.BlockSettings.open()):this.Editor.BlockSettings.close()}toggleToolbox(e){if(this.Editor.BlockManager.currentBlockIndex===-1){X("Could't toggle the Toolbox because there is no block selected ","warn");return}e??!this.Editor.Toolbar.toolbox.opened?(this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()):this.Editor.Toolbar.toolbox.close()}}var jo={exports:{}};/*! + * CodeX.Tooltips + * + * @version 1.0.5 + * + * @licence MIT + * @author CodeX + * + * + */(function(n,e){(function(t,o){n.exports=o()})(window,function(){return function(t){var o={};function i(s){if(o[s])return o[s].exports;var r=o[s]={i:s,l:!1,exports:{}};return t[s].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=o,i.d=function(s,r,a){i.o(s,r)||Object.defineProperty(s,r,{enumerable:!0,get:a})},i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},i.t=function(s,r){if(1&r&&(s=i(s)),8&r||4&r&&typeof s=="object"&&s&&s.__esModule)return s;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:s}),2&r&&typeof s!="string")for(var l in s)i.d(a,l,(function(c){return s[c]}).bind(null,l));return a},i.n=function(s){var r=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(r,"a",r),r},i.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)},i.p="",i(i.s=0)}([function(t,o,i){t.exports=i(1)},function(t,o,i){i.r(o),i.d(o,"default",function(){return s});class s{constructor(){this.nodes={wrapper:null,content:null},this.showed=!1,this.offsetTop=10,this.offsetLeft=10,this.offsetRight=10,this.hidingDelay=0,this.handleWindowScroll=()=>{this.showed&&this.hide(!0)},this.loadStyles(),this.prepare(),window.addEventListener("scroll",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:"ct",tooltipContent:"ct__content",tooltipShown:"ct--shown",placement:{left:"ct--left",bottom:"ct--bottom",right:"ct--right",top:"ct--top"}}}show(a,l,c){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&clearTimeout(this.hidingTimeout);const u=Object.assign({placement:"bottom",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},c);if(u.hidingDelay&&(this.hidingDelay=u.hidingDelay),this.nodes.content.innerHTML="",typeof l=="string")this.nodes.content.appendChild(document.createTextNode(l));else{if(!(l instanceof Node))throw Error("[CodeX Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof l+" given.");this.nodes.content.appendChild(l)}switch(this.nodes.wrapper.classList.remove(...Object.values(this.CSS.placement)),u.placement){case"top":this.placeTop(a,u);break;case"left":this.placeLeft(a,u);break;case"right":this.placeRight(a,u);break;case"bottom":default:this.placeBottom(a,u)}u&&u.delay?this.showingTimeout=setTimeout(()=>{this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0},u.delay):(this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0)}hide(a=!1){if(this.hidingDelay&&!a)return this.hidingTimeout&&clearTimeout(this.hidingTimeout),void(this.hidingTimeout=setTimeout(()=>{this.hide(!0)},this.hidingDelay));this.nodes.wrapper.classList.remove(this.CSS.tooltipShown),this.showed=!1,this.showingTimeout&&clearTimeout(this.showingTimeout)}onHover(a,l,c){a.addEventListener("mouseenter",()=>{this.show(a,l,c)}),a.addEventListener("mouseleave",()=>{this.hide()})}destroy(){this.nodes.wrapper.remove(),window.removeEventListener("scroll",this.handleWindowScroll)}prepare(){this.nodes.wrapper=this.make("div",this.CSS.tooltip),this.nodes.content=this.make("div",this.CSS.tooltipContent),this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper)}loadStyles(){const a="codex-tooltips-style";if(document.getElementById(a))return;const l=i(2),c=this.make("style",null,{textContent:l.toString(),id:a});this.prepend(document.head,c)}placeBottom(a,l){const c=a.getBoundingClientRect(),u=c.left+a.clientWidth/2-this.nodes.wrapper.offsetWidth/2,h=c.bottom+window.pageYOffset+this.offsetTop+l.marginTop;this.applyPlacement("bottom",u,h)}placeTop(a,l){const c=a.getBoundingClientRect(),u=c.left+a.clientWidth/2-this.nodes.wrapper.offsetWidth/2,h=c.top+window.pageYOffset-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",u,h)}placeLeft(a,l){const c=a.getBoundingClientRect(),u=c.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-l.marginLeft,h=c.top+window.pageYOffset+a.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",u,h)}placeRight(a,l){const c=a.getBoundingClientRect(),u=c.right+this.offsetRight+l.marginRight,h=c.top+window.pageYOffset+a.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",u,h)}applyPlacement(a,l,c){this.nodes.wrapper.classList.add(this.CSS.placement[a]),this.nodes.wrapper.style.left=l+"px",this.nodes.wrapper.style.top=c+"px"}make(a,l=null,c={}){const u=document.createElement(a);Array.isArray(l)?u.classList.add(...l):l&&u.classList.add(l);for(const h in c)c.hasOwnProperty(h)&&(u[h]=c[h]);return u}append(a,l){Array.isArray(l)?l.forEach(c=>a.appendChild(c)):a.appendChild(l)}prepend(a,l){Array.isArray(l)?(l=l.reverse()).forEach(c=>a.prepend(c)):a.prepend(l)}}},function(t,o){t.exports=`.ct{z-index:999;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1),-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);will-change:opacity,top,left;-webkit-box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);border-radius:9px}.ct,.ct:before{position:absolute;top:0;left:0}.ct:before{content:"";bottom:0;right:0;background-color:#1d202b;z-index:-1;border-radius:4px}@supports(-webkit-mask-box-image:url("")){.ct:before{border-radius:0;-webkit-mask-box-image:url('data:image/svg+xml;charset=utf-8,') 48% 41% 37.9% 53.3%}}@media (--mobile){.ct{display:none}}.ct__content{padding:6px 10px;color:#cdd1e0;font-size:12px;text-align:center;letter-spacing:.02em;line-height:1em}.ct:after{content:"";width:8px;height:8px;position:absolute;background-color:#1d202b;z-index:-1}.ct--bottom{-webkit-transform:translateY(5px);transform:translateY(5px)}.ct--bottom:after{top:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--top{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.ct--top:after{top:auto;bottom:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--left{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.ct--left:after{top:50%;left:auto;right:0;-webkit-transform:translate(41.6%,-50%) rotate(-45deg);transform:translate(41.6%,-50%) rotate(-45deg)}.ct--right{-webkit-transform:translateX(5px);transform:translateX(5px)}.ct--right:after{top:50%;left:0;-webkit-transform:translate(-41.6%,-50%) rotate(-45deg);transform:translate(-41.6%,-50%) rotate(-45deg)}.ct--shown{opacity:1;-webkit-transform:none;transform:none}`}]).default})})(jo);var Li=jo.exports;const Pi=ne(Li);let $=null;function ht(){$||($=new Pi)}function Ni(n,e,t){ht(),$==null||$.show(n,e,t)}function Ne(n=!1){ht(),$==null||$.hide(n)}function Re(n,e,t){ht(),$==null||$.onHover(n,e,t)}function Ri(){$==null||$.destroy(),$=null}class Di extends E{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t})}get methods(){return{show:(e,t,o)=>this.show(e,t,o),hide:()=>this.hide(),onHover:(e,t,o)=>this.onHover(e,t,o)}}show(e,t,o){Ni(e,t,o)}hide(){Ne()}onHover(e,t,o){Re(e,t,o)}}class Fi extends E{get methods(){return{nodes:this.editorNodes}}get editorNodes(){return{wrapper:this.Editor.UI.nodes.wrapper,redactor:this.Editor.UI.nodes.redactor}}}function Ho(n,e){const t={};return Object.entries(n).forEach(([o,i])=>{if(N(i)){const s=e?`${e}.${o}`:o;Object.values(i).every(a=>Q(a))?t[o]=s:t[o]=Ho(i,s);return}t[o]=i}),t}const W=Ho(So);function ji(n,e){const t={};return Object.keys(n).forEach(o=>{const i=e[o];i!==void 0?t[i]=n[o]:t[o]=n[o]}),t}const $o=class _e{constructor(e,t){this.cursor=-1,this.items=[],this.items=e||[],this.focusedCssClass=t}get currentItem(){return this.cursor===-1?null:this.items[this.cursor]}setCursor(e){e=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass))}setItems(e){this.items=e}next(){this.cursor=this.leafNodesAndReturnIndex(_e.directions.RIGHT)}previous(){this.cursor=this.leafNodesAndReturnIndex(_e.directions.LEFT)}dropCursor(){this.cursor!==-1&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.cursor=-1)}leafNodesAndReturnIndex(e){if(this.items.length===0)return this.cursor;let t=this.cursor;return t===-1?t=e===_e.directions.RIGHT?-1:0:this.items[t].classList.remove(this.focusedCssClass),e===_e.directions.RIGHT?t=(t+1)%this.items.length:t=(this.items.length+t-1)%this.items.length,d.canSetCaret(this.items[t])&&Ae(()=>b.setCursor(this.items[t]),50)(),this.items[t].classList.add(this.focusedCssClass),t}};$o.directions={RIGHT:"right",LEFT:"left"};let Be=$o;class ae{constructor(e){this.iterator=null,this.activated=!1,this.flipCallbacks=[],this.onKeyDown=t=>{if(this.isEventReadyForHandling(t))switch(ae.usedKeys.includes(t.keyCode)&&t.preventDefault(),t.keyCode){case y.TAB:this.handleTabPress(t);break;case y.LEFT:case y.UP:this.flipLeft();break;case y.RIGHT:case y.DOWN:this.flipRight();break;case y.ENTER:this.handleEnterPress(t);break}},this.iterator=new Be(e.items,e.focusedItemClass),this.activateCallback=e.activateCallback,this.allowedKeys=e.allowedKeys||ae.usedKeys}get isActivated(){return this.activated}static get usedKeys(){return[y.TAB,y.LEFT,y.RIGHT,y.ENTER,y.UP,y.DOWN]}activate(e,t){this.activated=!0,e&&this.iterator.setItems(e),t!==void 0&&this.iterator.setCursor(t),document.addEventListener("keydown",this.onKeyDown,!0)}deactivate(){this.activated=!1,this.dropCursor(),document.removeEventListener("keydown",this.onKeyDown)}focusFirst(){this.dropCursor(),this.flipRight()}flipLeft(){this.iterator.previous(),this.flipCallback()}flipRight(){this.iterator.next(),this.flipCallback()}hasFocus(){return!!this.iterator.currentItem}onFlip(e){this.flipCallbacks.push(e)}removeOnFlip(e){this.flipCallbacks=this.flipCallbacks.filter(t=>t!==e)}dropCursor(){this.iterator.dropCursor()}isEventReadyForHandling(e){return this.activated&&this.allowedKeys.includes(e.keyCode)}handleTabPress(e){switch(e.shiftKey?Be.directions.LEFT:Be.directions.RIGHT){case Be.directions.RIGHT:this.flipRight();break;case Be.directions.LEFT:this.flipLeft();break}}handleEnterPress(e){this.activated&&(this.iterator.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),M(this.activateCallback)&&this.activateCallback(this.iterator.currentItem))}flipCallback(){this.iterator.currentItem&&this.iterator.currentItem.scrollIntoViewIfNeeded(),this.flipCallbacks.forEach(e=>e())}}const Hi='',$i='',zi='',Ui='',Wi='',Yi='',Ki='',Xi='',zo='',Vi='',qi='',Uo='',Zi='',Gi='',Ji='',Qi="__",es="--";function ie(n){return(e,t)=>[[n,e].filter(i=>!!i).join(Qi),t].filter(i=>!!i).join(es)}const Ce=ie("ce-hint"),Te={root:Ce(),alignedStart:Ce(null,"align-left"),alignedCenter:Ce(null,"align-center"),title:Ce("title"),description:Ce("description")},Ma="";class ts{constructor(e){this.nodes={root:d.make("div",[Te.root,e.alignment==="center"?Te.alignedCenter:Te.alignedStart]),title:d.make("div",Te.title,{textContent:e.title})},this.nodes.root.appendChild(this.nodes.title),e.description!==void 0&&(this.nodes.description=d.make("div",Te.description,{textContent:e.description}),this.nodes.root.appendChild(this.nodes.description))}getElement(){return this.nodes.root}}class pt{constructor(e){this.params=e}get name(){if(this.params!==void 0&&"name"in this.params)return this.params.name}destroy(){Ne()}onChildrenOpen(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onOpen)=="function"&&this.params.children.onOpen()}onChildrenClose(){var e;this.params!==void 0&&"children"in this.params&&typeof((e=this.params.children)==null?void 0:e.onClose)=="function"&&this.params.children.onClose()}handleClick(){var e,t;this.params!==void 0&&"onActivate"in this.params&&((t=(e=this.params).onActivate)==null||t.call(e,this.params))}addHint(e,t){const o=new ts(t);Re(e,o.getElement(),{placement:t.position,hidingDelay:100})}get children(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.items)!==void 0?this.params.children.items:[]}get hasChildren(){return this.children.length>0}get isChildrenOpen(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.isOpen)===!0}get isChildrenFlippable(){var e;return!(this.params===void 0||!("children"in this.params)||((e=this.params.children)==null?void 0:e.isFlippable)===!1)}get isChildrenSearchable(){var e;return this.params!==void 0&&"children"in this.params&&((e=this.params.children)==null?void 0:e.searchable)===!0}get closeOnActivate(){return this.params!==void 0&&"closeOnActivate"in this.params&&this.params.closeOnActivate}get isActive(){return this.params===void 0||!("isActive"in this.params)?!1:typeof this.params.isActive=="function"?this.params.isActive():this.params.isActive===!0}}const Y=ie("ce-popover-item"),L={container:Y(),active:Y(null,"active"),disabled:Y(null,"disabled"),focused:Y(null,"focused"),hidden:Y(null,"hidden"),confirmationState:Y(null,"confirmation"),noHover:Y(null,"no-hover"),noFocus:Y(null,"no-focus"),title:Y("title"),secondaryTitle:Y("secondary-title"),icon:Y("icon"),iconTool:Y("icon","tool"),iconChevronRight:Y("icon","chevron-right"),wobbleAnimation:ie("wobble")()};class le extends pt{constructor(e,t){super(e),this.params=e,this.nodes={root:null,icon:null},this.confirmationState=null,this.removeSpecialFocusBehavior=()=>{var o;(o=this.nodes.root)==null||o.classList.remove(L.noFocus)},this.removeSpecialHoverBehavior=()=>{var o;(o=this.nodes.root)==null||o.classList.remove(L.noHover)},this.onErrorAnimationEnd=()=>{var o,i;(o=this.nodes.icon)==null||o.classList.remove(L.wobbleAnimation),(i=this.nodes.icon)==null||i.removeEventListener("animationend",this.onErrorAnimationEnd)},this.nodes.root=this.make(e,t)}get isDisabled(){return this.params.isDisabled===!0}get toggle(){return this.params.toggle}get title(){return this.params.title}get isConfirmationStateEnabled(){return this.confirmationState!==null}get isFocused(){return this.nodes.root===null?!1:this.nodes.root.classList.contains(L.focused)}getElement(){return this.nodes.root}handleClick(){if(this.isConfirmationStateEnabled&&this.confirmationState!==null){this.activateOrEnableConfirmationMode(this.confirmationState);return}this.activateOrEnableConfirmationMode(this.params)}toggleActive(e){var t;(t=this.nodes.root)==null||t.classList.toggle(L.active,e)}toggleHidden(e){var t;(t=this.nodes.root)==null||t.classList.toggle(L.hidden,e)}reset(){this.isConfirmationStateEnabled&&this.disableConfirmationMode()}onFocus(){this.disableSpecialHoverAndFocusBehavior()}make(e,t){var s,r;const o=(t==null?void 0:t.wrapperTag)||"div",i=d.make(o,L.container,{type:o==="button"?"button":void 0});return e.name&&(i.dataset.itemName=e.name),this.nodes.icon=d.make("div",[L.icon,L.iconTool],{innerHTML:e.icon||Ki}),i.appendChild(this.nodes.icon),e.title!==void 0&&i.appendChild(d.make("div",L.title,{innerHTML:e.title||""})),e.secondaryLabel&&i.appendChild(d.make("div",L.secondaryTitle,{textContent:e.secondaryLabel})),this.hasChildren&&i.appendChild(d.make("div",[L.icon,L.iconChevronRight],{innerHTML:Ui})),this.isActive&&i.classList.add(L.active),e.isDisabled&&i.classList.add(L.disabled),e.hint!==void 0&&((s=t==null?void 0:t.hint)==null?void 0:s.enabled)!==!1&&this.addHint(i,{...e.hint,position:((r=t==null?void 0:t.hint)==null?void 0:r.position)||"right"}),i}enableConfirmationMode(e){if(this.nodes.root===null)return;const t={...this.params,...e,confirmation:"confirmation"in e?e.confirmation:void 0},o=this.make(t);this.nodes.root.innerHTML=o.innerHTML,this.nodes.root.classList.add(L.confirmationState),this.confirmationState=e,this.enableSpecialHoverAndFocusBehavior()}disableConfirmationMode(){if(this.nodes.root===null)return;const e=this.make(this.params);this.nodes.root.innerHTML=e.innerHTML,this.nodes.root.classList.remove(L.confirmationState),this.confirmationState=null,this.disableSpecialHoverAndFocusBehavior()}enableSpecialHoverAndFocusBehavior(){var e,t,o;(e=this.nodes.root)==null||e.classList.add(L.noHover),(t=this.nodes.root)==null||t.classList.add(L.noFocus),(o=this.nodes.root)==null||o.addEventListener("mouseleave",this.removeSpecialHoverBehavior,{once:!0})}disableSpecialHoverAndFocusBehavior(){var e;this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),(e=this.nodes.root)==null||e.removeEventListener("mouseleave",this.removeSpecialHoverBehavior)}activateOrEnableConfirmationMode(e){var t;if(!("confirmation"in e)||e.confirmation===void 0)try{(t=e.onActivate)==null||t.call(e,e),this.disableConfirmationMode()}catch{this.animateError()}else this.enableConfirmationMode(e.confirmation)}animateError(){var e,t,o;(e=this.nodes.icon)!=null&&e.classList.contains(L.wobbleAnimation)||((t=this.nodes.icon)==null||t.classList.add(L.wobbleAnimation),(o=this.nodes.icon)==null||o.addEventListener("animationend",this.onErrorAnimationEnd))}}const ft=ie("ce-popover-item-separator"),gt={container:ft(),line:ft("line"),hidden:ft(null,"hidden")};class Wo extends pt{constructor(){super(),this.nodes={root:d.make("div",gt.container),line:d.make("div",gt.line)},this.nodes.root.appendChild(this.nodes.line)}getElement(){return this.nodes.root}toggleHidden(e){var t;(t=this.nodes.root)==null||t.classList.toggle(gt.hidden,e)}}var Z=(n=>(n.Closed="closed",n.ClosedOnActivate="closed-on-activate",n))(Z||{});const z=ie("ce-popover"),P={popover:z(),popoverContainer:z("container"),popoverOpenTop:z(null,"open-top"),popoverOpenLeft:z(null,"open-left"),popoverOpened:z(null,"opened"),search:z("search"),nothingFoundMessage:z("nothing-found-message"),nothingFoundMessageDisplayed:z("nothing-found-message","displayed"),items:z("items"),overlay:z("overlay"),overlayHidden:z("overlay","hidden"),popoverNested:z(null,"nested"),getPopoverNestedClass:n=>z(null,`nested-level-${n.toString()}`),popoverInline:z(null,"inline"),popoverHeader:z("header")};var me=(n=>(n.NestingLevel="--nesting-level",n.PopoverHeight="--popover-height",n.InlinePopoverWidth="--inline-popover-width",n.TriggerItemLeft="--trigger-item-left",n.TriggerItemTop="--trigger-item-top",n))(me||{});const Yo=ie("ce-popover-item-html"),Ko={root:Yo(),hidden:Yo(null,"hidden")};class Se extends pt{constructor(e,t){var o,i;super(e),this.nodes={root:d.make("div",Ko.root)},this.nodes.root.appendChild(e.element),e.name&&(this.nodes.root.dataset.itemName=e.name),e.hint!==void 0&&((o=t==null?void 0:t.hint)==null?void 0:o.enabled)!==!1&&this.addHint(this.nodes.root,{...e.hint,position:((i=t==null?void 0:t.hint)==null?void 0:i.position)||"right"})}getElement(){return this.nodes.root}toggleHidden(e){var t;(t=this.nodes.root)==null||t.classList.toggle(Ko.hidden,e)}getControls(){const e=this.nodes.root.querySelectorAll(`button, ${d.allInputsSelector}`);return Array.from(e)}}class Xo extends we{constructor(e,t={}){super(),this.params=e,this.itemsRenderParams=t,this.listeners=new Ee,this.messages={nothingFound:"Nothing found",search:"Search"},this.items=this.buildItems(e.items),e.messages&&(this.messages={...this.messages,...e.messages}),this.nodes={},this.nodes.popoverContainer=d.make("div",[P.popoverContainer]),this.nodes.nothingFoundMessage=d.make("div",[P.nothingFoundMessage],{textContent:this.messages.nothingFound}),this.nodes.popoverContainer.appendChild(this.nodes.nothingFoundMessage),this.nodes.items=d.make("div",[P.items]),this.items.forEach(o=>{const i=o.getElement();i!==null&&this.nodes.items.appendChild(i)}),this.nodes.popoverContainer.appendChild(this.nodes.items),this.listeners.on(this.nodes.popoverContainer,"click",o=>this.handleClick(o)),this.nodes.popover=d.make("div",[P.popover,this.params.class]),this.nodes.popover.appendChild(this.nodes.popoverContainer)}get itemsDefault(){return this.items.filter(e=>e instanceof le)}getElement(){return this.nodes.popover}show(){this.nodes.popover.classList.add(P.popoverOpened),this.search!==void 0&&this.search.focus()}hide(){this.nodes.popover.classList.remove(P.popoverOpened),this.nodes.popover.classList.remove(P.popoverOpenTop),this.itemsDefault.forEach(e=>e.reset()),this.search!==void 0&&this.search.clear(),this.emit(Z.Closed)}destroy(){var e;this.items.forEach(t=>t.destroy()),this.nodes.popover.remove(),this.listeners.removeAll(),(e=this.search)==null||e.destroy()}activateItemByName(e){const t=this.items.find(o=>o.name===e);this.handleItemClick(t)}buildItems(e){return e.map(t=>{switch(t.type){case _.Separator:return new Wo;case _.Html:return new Se(t,this.itemsRenderParams[_.Html]);default:return new le(t,this.itemsRenderParams[_.Default])}})}getTargetItem(e){return this.items.filter(t=>t instanceof le||t instanceof Se).find(t=>{const o=t.getElement();return o===null?!1:e.composedPath().includes(o)})}handleItemClick(e){if(!("isDisabled"in e&&e.isDisabled)){if(e.hasChildren){this.showNestedItems(e),"handleClick"in e&&typeof e.handleClick=="function"&&e.handleClick();return}this.itemsDefault.filter(t=>t!==e).forEach(t=>t.reset()),"handleClick"in e&&typeof e.handleClick=="function"&&e.handleClick(),this.toggleItemActivenessIfNeeded(e),e.closeOnActivate&&(this.hide(),this.emit(Z.ClosedOnActivate))}}handleClick(e){const t=this.getTargetItem(e);t!==void 0&&this.handleItemClick(t)}toggleItemActivenessIfNeeded(e){if(e instanceof le&&(e.toggle===!0&&e.toggleActive(),typeof e.toggle=="string")){const t=this.itemsDefault.filter(o=>o.toggle===e.toggle);if(t.length===1){e.toggleActive();return}t.forEach(o=>{o.toggleActive(o===e)})}}}var De=(n=>(n.Search="search",n))(De||{});const mt=ie("cdx-search-field"),bt={wrapper:mt(),icon:mt("icon"),input:mt("input")};class os extends we{constructor({items:e,placeholder:t}){super(),this.listeners=new Ee,this.items=e,this.wrapper=d.make("div",bt.wrapper);const o=d.make("div",bt.icon,{innerHTML:Zi});this.input=d.make("input",bt.input,{placeholder:t,tabIndex:-1}),this.wrapper.appendChild(o),this.wrapper.appendChild(this.input),this.listeners.on(this.input,"input",()=>{this.searchQuery=this.input.value,this.emit(De.Search,{query:this.searchQuery,items:this.foundItems})})}getElement(){return this.wrapper}focus(){this.input.focus()}clear(){this.input.value="",this.searchQuery="",this.emit(De.Search,{query:"",items:this.foundItems})}destroy(){this.listeners.removeAll()}get foundItems(){return this.items.filter(e=>this.checkItem(e))}checkItem(e){var i,s;const t=((i=e.title)==null?void 0:i.toLowerCase())||"",o=(s=this.searchQuery)==null?void 0:s.toLowerCase();return o!==void 0?t.includes(o):!1}}var ns=Object.defineProperty,is=Object.getOwnPropertyDescriptor,ss=(n,e,t,o)=>{for(var i=o>1?void 0:o?is(e,t):e,s=n.length-1,r;s>=0;s--)(r=n[s])&&(i=(o?r(e,t,i):r(i))||i);return o&&i&&ns(e,t,i),i};const Vo=class zn extends Xo{constructor(e,t){super(e,t),this.nestingLevel=0,this.nestedPopoverTriggerItem=null,this.previouslyHoveredItem=null,this.scopeElement=document.body,this.hide=()=>{var o;super.hide(),this.destroyNestedPopoverIfExists(),(o=this.flipper)==null||o.deactivate(),this.previouslyHoveredItem=null},this.onFlip=()=>{const o=this.itemsDefault.find(i=>i.isFocused);o==null||o.onFocus()},this.onSearch=o=>{var a;const i=o.query==="",s=o.items.length===0;this.items.forEach(l=>{let c=!1;l instanceof le?c=!o.items.includes(l):(l instanceof Wo||l instanceof Se)&&(c=s||!i),l.toggleHidden(c)}),this.toggleNothingFoundMessage(s);const r=o.query===""?this.flippableElements:o.items.map(l=>l.getElement());(a=this.flipper)!=null&&a.isActivated&&(this.flipper.deactivate(),this.flipper.activate(r))},e.nestingLevel!==void 0&&(this.nestingLevel=e.nestingLevel),this.nestingLevel>0&&this.nodes.popover.classList.add(P.popoverNested),e.scopeElement!==void 0&&(this.scopeElement=e.scopeElement),this.nodes.popoverContainer!==null&&this.listeners.on(this.nodes.popoverContainer,"mouseover",o=>this.handleHover(o)),e.searchable&&this.addSearch(),e.flippable!==!1&&(this.flipper=new ae({items:this.flippableElements,focusedItemClass:L.focused,allowedKeys:[y.TAB,y.UP,y.DOWN,y.ENTER]}),this.flipper.onFlip(this.onFlip))}hasFocus(){return this.flipper===void 0?!1:this.flipper.hasFocus()}get scrollTop(){return this.nodes.items===null?0:this.nodes.items.scrollTop}get offsetTop(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetTop}show(){var e;this.nodes.popover.style.setProperty(me.PopoverHeight,this.size.height+"px"),this.shouldOpenBottom||this.nodes.popover.classList.add(P.popoverOpenTop),this.shouldOpenRight||this.nodes.popover.classList.add(P.popoverOpenLeft),super.show(),(e=this.flipper)==null||e.activate(this.flippableElements)}destroy(){this.hide(),super.destroy()}showNestedItems(e){this.nestedPopover!==null&&this.nestedPopover!==void 0||(this.nestedPopoverTriggerItem=e,this.showNestedPopoverForItem(e))}handleHover(e){const t=this.getTargetItem(e);t!==void 0&&this.previouslyHoveredItem!==t&&(this.destroyNestedPopoverIfExists(),this.previouslyHoveredItem=t,t.hasChildren&&this.showNestedPopoverForItem(t))}setTriggerItemPosition(e,t){const o=t.getElement(),i=(o?o.offsetTop:0)-this.scrollTop,s=this.offsetTop+i;e.style.setProperty(me.TriggerItemTop,s+"px")}destroyNestedPopoverIfExists(){var e,t;this.nestedPopover===void 0||this.nestedPopover===null||(this.nestedPopover.off(Z.ClosedOnActivate,this.hide),this.nestedPopover.hide(),this.nestedPopover.destroy(),this.nestedPopover.getElement().remove(),this.nestedPopover=null,(e=this.flipper)==null||e.activate(this.flippableElements),(t=this.nestedPopoverTriggerItem)==null||t.onChildrenClose())}showNestedPopoverForItem(e){var o;this.nestedPopover=new zn({searchable:e.isChildrenSearchable,items:e.children,nestingLevel:this.nestingLevel+1,flippable:e.isChildrenFlippable,messages:this.messages}),e.onChildrenOpen(),this.nestedPopover.on(Z.ClosedOnActivate,this.hide);const t=this.nestedPopover.getElement();return this.nodes.popover.appendChild(t),this.setTriggerItemPosition(t,e),t.style.setProperty(me.NestingLevel,this.nestedPopover.nestingLevel.toString()),this.nestedPopover.show(),(o=this.flipper)==null||o.deactivate(),this.nestedPopover}get shouldOpenBottom(){if(this.nodes.popover===void 0||this.nodes.popover===null)return!1;const e=this.nodes.popoverContainer.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),o=this.size.height,i=e.top+o,s=e.top-o,r=Math.min(window.innerHeight,t.bottom);return s{if(t instanceof le)return t.getElement();if(t instanceof Se)return t.getControls()}).flat().filter(t=>t!=null)}addSearch(){this.search=new os({items:this.itemsDefault,placeholder:this.messages.search}),this.search.on(De.Search,this.onSearch);const e=this.search.getElement();e.classList.add(P.search),this.nodes.popoverContainer.insertBefore(e,this.nodes.popoverContainer.firstChild)}toggleNothingFoundMessage(e){this.nodes.nothingFoundMessage.classList.toggle(P.nothingFoundMessageDisplayed,e)}};ss([fe],Vo.prototype,"size",1);let vt=Vo;class rs extends vt{constructor(e){const t=!ge();super({...e,class:P.popoverInline},{[_.Default]:{wrapperTag:"button",hint:{position:"top",alignment:"center",enabled:t}},[_.Html]:{hint:{position:"top",alignment:"center",enabled:t}}}),this.items.forEach(o=>{!(o instanceof le)&&!(o instanceof Se)||o.hasChildren&&o.isChildrenOpen&&this.showNestedItems(o)})}get offsetLeft(){return this.nodes.popoverContainer===null?0:this.nodes.popoverContainer.offsetLeft}show(){this.nestingLevel===0&&this.nodes.popover.style.setProperty(me.InlinePopoverWidth,this.size.width+"px"),super.show()}handleHover(){}setTriggerItemPosition(e,t){const o=t.getElement(),i=o?o.offsetLeft:0,s=this.offsetLeft+i;e.style.setProperty(me.TriggerItemLeft,s+"px")}showNestedItems(e){if(this.nestedPopoverTriggerItem===e){this.destroyNestedPopoverIfExists(),this.nestedPopoverTriggerItem=null;return}super.showNestedItems(e)}showNestedPopoverForItem(e){const t=super.showNestedPopoverForItem(e);return t.getElement().classList.add(P.getPopoverNestedClass(t.nestingLevel)),t}handleItemClick(e){var t;e!==this.nestedPopoverTriggerItem&&((t=this.nestedPopoverTriggerItem)==null||t.handleClick(),super.destroyNestedPopoverIfExists()),super.handleItemClick(e)}}const qo=class Me{constructor(){this.scrollPosition=null}lock(){rt?this.lockHard():document.body.classList.add(Me.CSS.scrollLocked)}unlock(){rt?this.unlockHard():document.body.classList.remove(Me.CSS.scrollLocked)}lockHard(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty("--window-scroll-offset",`${this.scrollPosition}px`),document.body.classList.add(Me.CSS.scrollLockedHard)}unlockHard(){document.body.classList.remove(Me.CSS.scrollLockedHard),this.scrollPosition!==null&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}};qo.CSS={scrollLocked:"ce-scroll-locked",scrollLockedHard:"ce-scroll-locked--hard"};let as=qo;const kt=ie("ce-popover-header"),yt={root:kt(),text:kt("text"),backButton:kt("back-button")};class ls{constructor({text:e,onBackButtonClick:t}){this.listeners=new Ee,this.text=e,this.onBackButtonClick=t,this.nodes={root:d.make("div",[yt.root]),backButton:d.make("button",[yt.backButton]),text:d.make("div",[yt.text])},this.nodes.backButton.innerHTML=zi,this.nodes.root.appendChild(this.nodes.backButton),this.listeners.on(this.nodes.backButton,"click",this.onBackButtonClick),this.nodes.text.innerText=this.text,this.nodes.root.appendChild(this.nodes.text)}getElement(){return this.nodes.root}destroy(){this.nodes.root.remove(),this.listeners.destroy()}}class cs{constructor(){this.history=[]}push(e){this.history.push(e)}pop(){return this.history.pop()}get currentTitle(){return this.history.length===0?"":this.history[this.history.length-1].title}get currentItems(){return this.history.length===0?[]:this.history[this.history.length-1].items}reset(){for(;this.history.length>1;)this.pop()}}class Zo extends Xo{constructor(e){super(e,{[_.Default]:{hint:{enabled:!1}},[_.Html]:{hint:{enabled:!1}}}),this.scrollLocker=new as,this.history=new cs,this.isHidden=!0,this.nodes.overlay=d.make("div",[P.overlay,P.overlayHidden]),this.nodes.popover.insertBefore(this.nodes.overlay,this.nodes.popover.firstChild),this.listeners.on(this.nodes.overlay,"click",()=>{this.hide()}),this.history.push({items:e.items})}show(){this.nodes.overlay.classList.remove(P.overlayHidden),super.show(),this.scrollLocker.lock(),this.isHidden=!1}hide(){this.isHidden||(super.hide(),this.nodes.overlay.classList.add(P.overlayHidden),this.scrollLocker.unlock(),this.history.reset(),this.isHidden=!0)}destroy(){super.destroy(),this.scrollLocker.unlock()}showNestedItems(e){this.updateItemsAndHeader(e.children,e.title),this.history.push({title:e.title,items:e.children})}updateItemsAndHeader(e,t){if(this.header!==null&&this.header!==void 0&&(this.header.destroy(),this.header=null),t!==void 0){this.header=new ls({text:t,onBackButtonClick:()=>{this.history.pop(),this.updateItemsAndHeader(this.history.currentItems,this.history.currentTitle)}});const o=this.header.getElement();o!==null&&this.nodes.popoverContainer.insertBefore(o,this.nodes.popoverContainer.firstChild)}this.items.forEach(o=>{var i;return(i=o.getElement())==null?void 0:i.remove()}),this.items=this.buildItems(e),this.items.forEach(o=>{var s;const i=o.getElement();i!==null&&((s=this.nodes.items)==null||s.appendChild(i))})}}class ds extends E{constructor(){super(...arguments),this.opened=!1,this.selection=new b,this.popover=null,this.close=()=>{this.opened&&(this.opened=!1,b.isAtEditor||this.selection.restore(),this.selection.clearSaved(),!this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Editor.BlockManager.currentBlock&&this.Editor.BlockSelection.unselectBlock(this.Editor.BlockManager.currentBlock),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off(Z.Closed,this.onPopoverClose),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null))},this.onPopoverClose=()=>{this.close()}}get events(){return{opened:"block-settings-opened",closed:"block-settings-closed"}}get CSS(){return{settings:"ce-settings"}}get flipper(){var e;if(this.popover!==null)return"flipper"in this.popover?(e=this.popover)==null?void 0:e.flipper:void 0}make(){this.nodes.wrapper=d.make("div",[this.CSS.settings]),this.nodes.wrapper.setAttribute("data-cy","block-tunes"),this.eventsDispatcher.on(xe,this.close)}destroy(){this.removeAllNodes(),this.listeners.destroy(),this.eventsDispatcher.off(xe,this.close)}async open(e=this.Editor.BlockManager.currentBlock){var s;this.opened=!0,this.selection.save(),this.Editor.BlockSelection.selectBlock(e),this.Editor.BlockSelection.clearCache();const{toolTunes:t,commonTunes:o}=e.getTunes();this.eventsDispatcher.emit(this.events.opened);const i=ge()?Zo:vt;this.popover=new i({searchable:!0,items:await this.getTunesItems(e,o,t),scopeElement:this.Editor.API.methods.ui.nodes.redactor,messages:{nothingFound:H.ui(W.ui.popover,"Nothing found"),search:H.ui(W.ui.popover,"Filter")}}),this.popover.on(Z.Closed,this.onPopoverClose),(s=this.nodes.wrapper)==null||s.append(this.popover.getElement()),this.popover.show()}getElement(){return this.nodes.wrapper}async getTunesItems(e,t,o){const i=[];o!==void 0&&o.length>0&&(i.push(...o),i.push({type:_.Separator}));const s=Array.from(this.Editor.Tools.blockTools.values()),a=(await Po(e,s)).reduce((l,c)=>(c.toolbox.forEach(u=>{l.push({icon:u.icon,title:H.t(W.toolNames,u.title),name:c.name,closeOnActivate:!0,onActivate:async()=>{const{BlockManager:h,Caret:p,Toolbar:g}=this.Editor,f=await h.convert(e,c.name,u.data);g.close(),p.setToBlock(f,p.positions.END)}})}),l),[]);return a.length>0&&(i.push({icon:Uo,name:"convert-to",title:H.ui(W.ui.popover,"Convert to"),children:{searchable:!0,items:a}}),i.push({type:_.Separator})),i.push(...t),i.map(l=>this.resolveTuneAliases(l))}resolveTuneAliases(e){if(e.type===_.Separator||e.type===_.Html)return e;const t=ji(e,{label:"title"});return e.confirmation&&(t.confirmation=this.resolveTuneAliases(e.confirmation)),t}}var Go={exports:{}};/*! + * Library for handling keyboard shortcuts + * @copyright CodeX (https://codex.so) + * @license MIT + * @author CodeX (https://codex.so) + * @version 1.2.0 + */(function(n,e){(function(t,o){n.exports=o()})(window,function(){return function(t){var o={};function i(s){if(o[s])return o[s].exports;var r=o[s]={i:s,l:!1,exports:{}};return t[s].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=o,i.d=function(s,r,a){i.o(s,r)||Object.defineProperty(s,r,{enumerable:!0,get:a})},i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},i.t=function(s,r){if(1&r&&(s=i(s)),8&r||4&r&&typeof s=="object"&&s&&s.__esModule)return s;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:s}),2&r&&typeof s!="string")for(var l in s)i.d(a,l,(function(c){return s[c]}).bind(null,l));return a},i.n=function(s){var r=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(r,"a",r),r},i.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)},i.p="",i(i.s=0)}([function(t,o,i){function s(l,c){for(var u=0;us!==o))}findShortcut(e,t){return(this.registeredShortcuts.get(e)||[]).find(({name:i})=>i===t)}}const be=new ps;var fs=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,Jo=(n,e,t,o)=>{for(var i=o>1?void 0:o?gs(e,t):e,s=n.length-1,r;s>=0;s--)(r=n[s])&&(i=(o?r(e,t,i):r(i))||i);return o&&i&&fs(e,t,i),i},Fe=(n=>(n.Opened="toolbox-opened",n.Closed="toolbox-closed",n.BlockAdded="toolbox-block-added",n))(Fe||{});const wt=class Un extends we{constructor({api:e,tools:t,i18nLabels:o}){super(),this.opened=!1,this.listeners=new Ee,this.popover=null,this.handleMobileLayoutToggle=()=>{this.destroyPopover(),this.initPopover()},this.onPopoverClose=()=>{this.opened=!1,this.emit("toolbox-closed")},this.api=e,this.tools=t,this.i18nLabels=o,this.enableShortcuts(),this.nodes={toolbox:d.make("div",Un.CSS.toolbox)},this.initPopover(),this.nodes.toolbox.setAttribute("data-cy","toolbox"),this.api.events.on(xe,this.handleMobileLayoutToggle)}get isEmpty(){return this.toolsToBeDisplayed.length===0}static get CSS(){return{toolbox:"ce-toolbox"}}getElement(){return this.nodes.toolbox}hasFocus(){if(this.popover!==null)return"hasFocus"in this.popover?this.popover.hasFocus():void 0}destroy(){var e;super.destroy(),this.nodes&&this.nodes.toolbox&&this.nodes.toolbox.remove(),this.removeAllShortcuts(),(e=this.popover)==null||e.off(Z.Closed,this.onPopoverClose),this.listeners.destroy(),this.api.events.off(xe,this.handleMobileLayoutToggle)}toolButtonActivated(e,t){this.insertNewBlock(e,t)}open(){var e;this.isEmpty||((e=this.popover)==null||e.show(),this.opened=!0,this.emit("toolbox-opened"))}close(){var e;(e=this.popover)==null||e.hide(),this.opened=!1,this.emit("toolbox-closed")}toggle(){this.opened?this.close():this.open()}initPopover(){var t;const e=ge()?Zo:vt;this.popover=new e({scopeElement:this.api.ui.nodes.redactor,searchable:!0,messages:{nothingFound:this.i18nLabels.nothingFound,search:this.i18nLabels.filter},items:this.toolboxItemsToBeDisplayed}),this.popover.on(Z.Closed,this.onPopoverClose),(t=this.nodes.toolbox)==null||t.append(this.popover.getElement())}destroyPopover(){this.popover!==null&&(this.popover.hide(),this.popover.off(Z.Closed,this.onPopoverClose),this.popover.destroy(),this.popover=null),this.nodes.toolbox!==null&&(this.nodes.toolbox.innerHTML="")}get toolsToBeDisplayed(){const e=[];return this.tools.forEach(t=>{t.toolbox&&e.push(t)}),e}get toolboxItemsToBeDisplayed(){const e=(t,o,i=!0)=>({icon:t.icon,title:H.t(W.toolNames,t.title||Le(o.name)),name:o.name,onActivate:()=>{this.toolButtonActivated(o.name,t.data)},secondaryLabel:o.shortcut&&i?it(o.shortcut):""});return this.toolsToBeDisplayed.reduce((t,o)=>(Array.isArray(o.toolbox)?o.toolbox.forEach((i,s)=>{t.push(e(i,o,s===0))}):o.toolbox!==void 0&&t.push(e(o.toolbox,o)),t),[])}enableShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&this.enableShortcutForTool(e.name,t)})}enableShortcutForTool(e,t){be.add({name:t,on:this.api.ui.nodes.redactor,handler:async o=>{o.preventDefault();const i=this.api.blocks.getCurrentBlockIndex(),s=this.api.blocks.getBlockByIndex(i);if(s)try{const r=await this.api.blocks.convert(s.id,e);this.api.caret.setToBlock(r,"end");return}catch{}this.insertNewBlock(e)}})}removeAllShortcuts(){this.toolsToBeDisplayed.forEach(e=>{const t=e.shortcut;t&&be.remove(this.api.ui.nodes.redactor,t)})}async insertNewBlock(e,t){const o=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(o);if(!i)return;const s=i.isEmpty?o:o+1;let r;if(t){const l=await this.api.blocks.composeBlockData(e);r=Object.assign(l,t)}const a=this.api.blocks.insert(e,r,void 0,s,void 0,i.isEmpty);a.call(te.APPEND_CALLBACK),this.api.caret.setToBlock(s),this.emit("toolbox-block-added",{block:a}),this.api.toolbar.close()}};Jo([fe],wt.prototype,"toolsToBeDisplayed",1),Jo([fe],wt.prototype,"toolboxItemsToBeDisplayed",1);let ms=wt;const Qo="block hovered";async function bs(n,e){const t=navigator.keyboard;if(!t)return e;try{return(await t.getLayoutMap()).get(n)||e}catch(o){return console.error(o),e}}class vs extends E{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.toolboxInstance=null}get CSS(){return{toolbar:"ce-toolbar",content:"ce-toolbar__content",actions:"ce-toolbar__actions",actionsOpened:"ce-toolbar__actions--opened",toolbarOpened:"ce-toolbar--opened",openedToolboxHolderModifier:"codex-editor--toolbox-opened",plusButton:"ce-toolbar__plus",plusButtonShortcut:"ce-toolbar__plus-shortcut",settingsToggler:"ce-toolbar__settings-btn",settingsTogglerHidden:"ce-toolbar__settings-btn--hidden"}}get opened(){return this.nodes.wrapper.classList.contains(this.CSS.toolbarOpened)}get toolbox(){var e;return{opened:(e=this.toolboxInstance)==null?void 0:e.opened,close:()=>{var t;(t=this.toolboxInstance)==null||t.close()},open:()=>{if(this.toolboxInstance===null){T("toolbox.open() called before initialization is finished","warn");return}this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.toolboxInstance.open()},toggle:()=>{if(this.toolboxInstance===null){T("toolbox.toggle() called before initialization is finished","warn");return}this.toolboxInstance.toggle()},hasFocus:()=>{var t;return(t=this.toolboxInstance)==null?void 0:t.hasFocus()}}}get blockActions(){return{hide:()=>{this.nodes.actions.classList.remove(this.CSS.actionsOpened)},show:()=>{this.nodes.actions.classList.add(this.CSS.actionsOpened)}}}get blockTunesToggler(){return{hide:()=>this.nodes.settingsToggler.classList.add(this.CSS.settingsTogglerHidden),show:()=>this.nodes.settingsToggler.classList.remove(this.CSS.settingsTogglerHidden)}}toggleReadOnly(e){e?(this.destroy(),this.Editor.BlockSettings.destroy(),this.disableModuleBindings()):window.requestIdleCallback(()=>{this.drawUI(),this.enableModuleBindings()},{timeout:2e3})}moveAndOpen(e=this.Editor.BlockManager.currentBlock){if(this.toolboxInstance===null){T("Can't open Toolbar since Editor initialization is not finished yet","warn");return}if(this.toolboxInstance.opened&&this.toolboxInstance.close(),this.Editor.BlockSettings.opened&&this.Editor.BlockSettings.close(),!e)return;this.hoveredBlock=e;const t=e.holder,{isMobile:o}=this.Editor.UI;let i;const s=20,r=e.firstInput,a=t.getBoundingClientRect(),l=r!==void 0?r.getBoundingClientRect():null,c=l!==null?l.top-a.top:null,u=c!==null?c>s:void 0;if(o)i=t.offsetTop+t.offsetHeight;else if(r===void 0||u){const h=parseInt(window.getComputedStyle(e.pluginsContent).paddingTop);i=t.offsetTop+h}else{const h=ri(r),p=parseInt(window.getComputedStyle(this.nodes.plusButton).height,10),g=8;i=t.offsetTop+h-p+g+c}this.nodes.wrapper.style.top=`${Math.floor(i)}px`,this.Editor.BlockManager.blocks.length===1&&e.isEmpty?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}close(){var e,t;this.Editor.ReadOnly.isEnabled||((e=this.nodes.wrapper)==null||e.classList.remove(this.CSS.toolbarOpened),this.blockActions.hide(),(t=this.toolboxInstance)==null||t.close(),this.Editor.BlockSettings.close(),this.reset())}reset(){this.nodes.wrapper.style.top="unset"}open(e=!0){this.nodes.wrapper.classList.add(this.CSS.toolbarOpened),e?this.blockActions.show():this.blockActions.hide()}async make(){this.nodes.wrapper=d.make("div",this.CSS.toolbar),["content","actions"].forEach(s=>{this.nodes[s]=d.make("div",this.CSS[s])}),d.append(this.nodes.wrapper,this.nodes.content),d.append(this.nodes.content,this.nodes.actions),this.nodes.plusButton=d.make("div",this.CSS.plusButton,{innerHTML:qi}),d.append(this.nodes.actions,this.nodes.plusButton),this.readOnlyMutableListeners.on(this.nodes.plusButton,"click",()=>{Ne(!0),this.plusButtonClicked()},!1);const e=d.make("div");e.appendChild(document.createTextNode(H.ui(W.ui.toolbar.toolbox,"Add"))),e.appendChild(d.make("div",this.CSS.plusButtonShortcut,{textContent:"/"})),Re(this.nodes.plusButton,e,{hidingDelay:400}),this.nodes.settingsToggler=d.make("span",this.CSS.settingsToggler,{innerHTML:Vi}),d.append(this.nodes.actions,this.nodes.settingsToggler);const t=d.make("div"),o=d.text(H.ui(W.ui.blockTunes.toggler,"Click to tune")),i=await bs("Slash","/");t.appendChild(o),t.appendChild(d.make("div",this.CSS.plusButtonShortcut,{textContent:it(`CMD + ${i}`)})),Re(this.nodes.settingsToggler,t,{hidingDelay:400}),d.append(this.nodes.actions,this.makeToolbox()),d.append(this.nodes.actions,this.Editor.BlockSettings.getElement()),d.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}makeToolbox(){return this.toolboxInstance=new ms({api:this.Editor.API.methods,tools:this.Editor.Tools.blockTools,i18nLabels:{filter:H.ui(W.ui.popover,"Filter"),nothingFound:H.ui(W.ui.popover,"Nothing found")}}),this.toolboxInstance.on(Fe.Opened,()=>{this.Editor.UI.nodes.wrapper.classList.add(this.CSS.openedToolboxHolderModifier)}),this.toolboxInstance.on(Fe.Closed,()=>{this.Editor.UI.nodes.wrapper.classList.remove(this.CSS.openedToolboxHolderModifier)}),this.toolboxInstance.on(Fe.BlockAdded,({block:e})=>{const{BlockManager:t,Caret:o}=this.Editor,i=t.getBlockById(e.id);i.inputs.length===0&&(i===t.lastBlock?(t.insertAtEnd(),o.setToBlock(t.lastBlock)):o.setToBlock(t.nextBlock))}),this.toolboxInstance.getElement()}plusButtonClicked(){var e;this.Editor.BlockManager.currentBlock=this.hoveredBlock,(e=this.toolboxInstance)==null||e.toggle()}enableModuleBindings(){this.readOnlyMutableListeners.on(this.nodes.settingsToggler,"mousedown",e=>{var t;e.stopPropagation(),this.settingsTogglerClicked(),(t=this.toolboxInstance)!=null&&t.opened&&this.toolboxInstance.close(),Ne(!0)},!0),ge()||this.eventsDispatcher.on(Qo,e=>{var t;this.Editor.BlockSettings.opened||(t=this.toolboxInstance)!=null&&t.opened||this.moveAndOpen(e.block)})}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}settingsTogglerClicked(){this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open(this.hoveredBlock)}drawUI(){this.Editor.BlockSettings.make(),this.make()}destroy(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy()}}var ce=(n=>(n[n.Block=0]="Block",n[n.Inline=1]="Inline",n[n.Tune=2]="Tune",n))(ce||{}),je=(n=>(n.Shortcut="shortcut",n.Toolbox="toolbox",n.EnabledInlineTools="inlineToolbar",n.EnabledBlockTunes="tunes",n.Config="config",n))(je||{}),en=(n=>(n.Shortcut="shortcut",n.SanitizeConfig="sanitize",n))(en||{}),ve=(n=>(n.IsEnabledLineBreaks="enableLineBreaks",n.Toolbox="toolbox",n.ConversionConfig="conversionConfig",n.IsReadOnlySupported="isReadOnlySupported",n.PasteConfig="pasteConfig",n))(ve||{}),He=(n=>(n.IsInline="isInline",n.Title="title",n.IsReadOnlySupported="isReadOnlySupported",n))(He||{}),Et=(n=>(n.IsTune="isTune",n))(Et||{});class xt{constructor({name:e,constructable:t,config:o,api:i,isDefault:s,isInternal:r=!1,defaultPlaceholder:a}){this.api=i,this.name=e,this.constructable=t,this.config=o,this.isDefault=s,this.isInternal=r,this.defaultPlaceholder=a}get settings(){const e=this.config.config||{};return this.isDefault&&!("placeholder"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}reset(){if(M(this.constructable.reset))return this.constructable.reset()}prepare(){if(M(this.constructable.prepare))return this.constructable.prepare({toolName:this.name,config:this.settings})}get shortcut(){const e=this.constructable.shortcut;return this.config.shortcut||e}get sanitizeConfig(){return this.constructable.sanitize||{}}isInline(){return this.type===ce.Inline}isBlock(){return this.type===ce.Block}isTune(){return this.type===ce.Tune}}class ks extends E{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.CSS={inlineToolbar:"ce-inline-toolbar"},this.opened=!1,this.popover=null,this.toolbarVerticalMargin=ge()?20:6,this.tools=new Map,window.requestIdleCallback(()=>{this.make()},{timeout:2e3})}async tryToShow(e=!1){e&&this.close(),this.allowedToShow()&&(await this.open(),this.Editor.Toolbar.close())}close(){var e,t;if(this.opened){for(const[o,i]of this.tools){const s=this.getToolShortcut(o.name);s!==void 0&&be.remove(this.Editor.UI.nodes.redactor,s),M(i.clear)&&i.clear()}this.tools=new Map,this.reset(),this.opened=!1,(e=this.popover)==null||e.hide(),(t=this.popover)==null||t.destroy(),this.popover=null}}containsNode(e){return this.nodes.wrapper===void 0?!1:this.nodes.wrapper.contains(e)}destroy(){var e;this.removeAllNodes(),(e=this.popover)==null||e.destroy(),this.popover=null}make(){this.nodes.wrapper=d.make("div",[this.CSS.inlineToolbar,...this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]]),this.nodes.wrapper.setAttribute("data-cy","inline-toolbar"),d.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}async open(){var t;if(this.opened)return;this.opened=!0,this.popover!==null&&this.popover.destroy(),this.createToolsInstances();const e=await this.getPopoverItems();this.popover=new rs({items:e,scopeElement:this.Editor.API.methods.ui.nodes.redactor,messages:{nothingFound:H.ui(W.ui.popover,"Nothing found"),search:H.ui(W.ui.popover,"Filter")}}),this.move(this.popover.size.width),(t=this.nodes.wrapper)==null||t.append(this.popover.getElement()),this.popover.show()}move(e){const t=b.rect,o=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),i={x:t.x-o.x,y:t.y+t.height-o.top+this.toolbarVerticalMargin};i.x+e+o.x>this.Editor.UI.contentRect.right&&(i.x=this.Editor.UI.contentRect.right-e-o.x),this.nodes.wrapper.style.left=Math.floor(i.x)+"px",this.nodes.wrapper.style.top=Math.floor(i.y)+"px"}reset(){this.nodes.wrapper.style.left="0",this.nodes.wrapper.style.top="0"}allowedToShow(){const e=["IMG","INPUT"],t=b.get(),o=b.text;if(!t||!t.anchorNode||t.isCollapsed||o.length<1)return!1;const i=d.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement;if(i===null||t!==null&&e.includes(i.tagName))return!1;const s=this.Editor.BlockManager.getBlock(t.anchorNode);return!s||this.getTools().some(c=>s.tool.inlineTools.has(c.name))===!1?!1:i.closest("[contenteditable]")!==null}getTools(){const e=this.Editor.BlockManager.currentBlock;return e?Array.from(e.tool.inlineTools.values()).filter(o=>!(this.Editor.ReadOnly.isEnabled&&o.isReadOnlySupported!==!0)):[]}createToolsInstances(){this.tools=new Map,this.getTools().forEach(t=>{const o=t.create();this.tools.set(t,o)})}async getPopoverItems(){const e=[];let t=0;for(const[o,i]of this.tools){const s=await i.render(),r=this.getToolShortcut(o.name);if(r!==void 0)try{this.enableShortcuts(o.name,r)}catch{}const a=r!==void 0?it(r):void 0,l=H.t(W.toolNames,o.title||Le(o.name));[s].flat().forEach(c=>{var h,p;const u={name:o.name,onActivate:()=>{this.toolClicked(i)},hint:{title:l,description:a}};if(d.isElement(c)){const g={...u,element:c,type:_.Html};if(M(i.renderActions)){const f=i.renderActions();g.children={isOpen:(h=i.checkState)==null?void 0:h.call(i,b.get()),isFlippable:!1,items:[{type:_.Html,element:f}]}}else(p=i.checkState)==null||p.call(i,b.get());e.push(g)}else if(c.type===_.Html)e.push({...u,...c,type:_.Html});else if(c.type===_.Separator)e.push({type:_.Separator});else{const g={...u,...c,type:_.Default};"children"in g&&t!==0&&e.push({type:_.Separator}),e.push(g),"children"in g&&t{var s;const{currentBlock:i}=this.Editor.BlockManager;i&&i.tool.enabledInlineTools&&(o.preventDefault(),(s=this.popover)==null||s.activateItemByName(e))},on:document})}toolClicked(e){var o;const t=b.range;(o=e.surround)==null||o.call(e,t),this.checkToolsState()}checkToolsState(){var e;(e=this.tools)==null||e.forEach(t=>{var o;(o=t.checkState)==null||o.call(t,b.get())})}get inlineTools(){const e={};return Array.from(this.Editor.Tools.inlineTools.entries()).forEach(([t,o])=>{e[t]=o.create()}),e}}function tn(){const n=window.getSelection();if(n===null)return[null,0];let e=n.focusNode,t=n.focusOffset;return e===null?[null,0]:(e.nodeType!==Node.TEXT_NODE&&e.childNodes.length>0&&(e.childNodes[t]?(e=e.childNodes[t],t=0):(e=e.childNodes[t-1],t=e.textContent.length)),[e,t])}function on(n,e,t,o){const i=document.createRange();o==="left"?(i.setStart(n,0),i.setEnd(e,t)):(i.setStart(e,t),i.setEnd(n,n.childNodes.length));const s=i.cloneContents(),r=document.createElement("div");r.appendChild(s);const a=r.textContent||"";return si(a)}function $e(n){const e=d.getDeepestNode(n);if(e===null||d.isEmpty(n))return!0;if(d.isNativeInput(e))return e.selectionEnd===0;if(d.isEmpty(n))return!0;const[t,o]=tn();return t===null?!1:on(n,t,o,"left")}function ze(n){const e=d.getDeepestNode(n,!0);if(e===null)return!0;if(d.isNativeInput(e))return e.selectionEnd===e.value.length;const[t,o]=tn();return t===null?!1:on(n,t,o,"right")}var nn={},Bt={},Ue={},de={},Ct={},Tt={};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.allInputsSelector=ys;function ys(){var n=["text","password","email","number","search","tel","url"];return"[contenteditable=true], textarea, input:not([type]), "+n.map(function(e){return'input[type="'.concat(e,'"]')}).join(", ")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.allInputsSelector=void 0;var e=Tt;Object.defineProperty(n,"allInputsSelector",{enumerable:!0,get:function(){return e.allInputsSelector}})})(Ct);var ue={},St={};Object.defineProperty(St,"__esModule",{value:!0}),St.isNativeInput=ws;function ws(n){var e=["INPUT","TEXTAREA"];return n&&n.tagName?e.includes(n.tagName):!1}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNativeInput=void 0;var e=St;Object.defineProperty(n,"isNativeInput",{enumerable:!0,get:function(){return e.isNativeInput}})})(ue);var sn={},It={};Object.defineProperty(It,"__esModule",{value:!0}),It.append=Es;function Es(n,e){Array.isArray(e)?e.forEach(function(t){n.appendChild(t)}):n.appendChild(e)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.append=void 0;var e=It;Object.defineProperty(n,"append",{enumerable:!0,get:function(){return e.append}})})(sn);var Ot={},_t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.blockElements=xs;function xs(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.blockElements=void 0;var e=_t;Object.defineProperty(n,"blockElements",{enumerable:!0,get:function(){return e.blockElements}})})(Ot);var rn={},Mt={};Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.calculateBaseline=Bs;function Bs(n){var e=window.getComputedStyle(n),t=parseFloat(e.fontSize),o=parseFloat(e.lineHeight)||t*1.2,i=parseFloat(e.paddingTop),s=parseFloat(e.borderTopWidth),r=parseFloat(e.marginTop),a=t*.8,l=(o-t)/2,c=r+s+i+l+a;return c}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.calculateBaseline=void 0;var e=Mt;Object.defineProperty(n,"calculateBaseline",{enumerable:!0,get:function(){return e.calculateBaseline}})})(rn);var an={},At={},Lt={},Pt={};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.isContentEditable=Cs;function Cs(n){return n.contentEditable==="true"}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isContentEditable=void 0;var e=Pt;Object.defineProperty(n,"isContentEditable",{enumerable:!0,get:function(){return e.isContentEditable}})})(Lt),Object.defineProperty(At,"__esModule",{value:!0}),At.canSetCaret=Is;var Ts=ue,Ss=Lt;function Is(n){var e=!0;if((0,Ts.isNativeInput)(n))switch(n.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":e=!1;break}else e=(0,Ss.isContentEditable)(n);return e}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.canSetCaret=void 0;var e=At;Object.defineProperty(n,"canSetCaret",{enumerable:!0,get:function(){return e.canSetCaret}})})(an);var We={},Nt={};function Os(n,e,t){const o=t.value!==void 0?"value":"get",i=t[o],s=`#${e}Cache`;if(t[o]=function(...r){return this[s]===void 0&&(this[s]=i.apply(this,r)),this[s]},o==="get"&&t.set){const r=t.set;t.set=function(a){delete n[s],r.apply(this,a)}}return t}function ln(){const n={win:!1,mac:!1,x11:!1,linux:!1},e=Object.keys(n).find(t=>window.navigator.appVersion.toLowerCase().indexOf(t)!==-1);return e!==void 0&&(n[e]=!0),n}function Rt(n){return n!=null&&n!==""&&(typeof n!="object"||Object.keys(n).length>0)}function _s(n){return!Rt(n)}const Ms=()=>typeof window<"u"&&window.navigator!==null&&Rt(window.navigator.platform)&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1);function As(n){const e=ln();return n=n.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi,"+"),e.mac?n=n.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):n=n.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN"),n}function Ls(n){return n[0].toUpperCase()+n.slice(1)}function Ps(n){const e=document.createElement("div");e.style.position="absolute",e.style.left="-999px",e.style.bottom="-999px",e.innerHTML=n,document.body.appendChild(e);const t=window.getSelection(),o=document.createRange();if(o.selectNode(e),t===null)throw new Error("Cannot copy text to clipboard");t.removeAllRanges(),t.addRange(o),document.execCommand("copy"),document.body.removeChild(e)}function Ns(n,e,t){let o;return(...i)=>{const s=this,r=()=>{o=void 0,t!==!0&&n.apply(s,i)},a=t===!0&&o!==void 0;window.clearTimeout(o),o=window.setTimeout(r,e),a&&n.apply(s,i)}}function se(n){return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function Rs(n){return se(n)==="boolean"}function cn(n){return se(n)==="function"||se(n)==="asyncfunction"}function Ds(n){return cn(n)&&/^\s*class\s+/.test(n.toString())}function Fs(n){return se(n)==="number"}function Ye(n){return se(n)==="object"}function js(n){return Promise.resolve(n)===n}function Hs(n){return se(n)==="string"}function $s(n){return se(n)==="undefined"}function Dt(n,...e){if(!e.length)return n;const t=e.shift();if(Ye(n)&&Ye(t))for(const o in t)Ye(t[o])?(n[o]===void 0&&Object.assign(n,{[o]:{}}),Dt(n[o],t[o])):Object.assign(n,{[o]:t[o]});return Dt(n,...e)}function zs(n,e,t){const o=`«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;n&&console.warn(o)}function Us(n){try{return new URL(n).href}catch{}return n.substring(0,2)==="//"?window.location.protocol+n:window.location.origin+n}function Ws(n){return n>47&&n<58||n===32||n===13||n===229||n>64&&n<91||n>95&&n<112||n>185&&n<193||n>218&&n<223}const Ys={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91,SLASH:191},Ks={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};let Xs=class{constructor(){this.completed=Promise.resolve()}add(e){return new Promise((t,o)=>{this.completed=this.completed.then(e).then(t).catch(o)})}};function Vs(n,e,t=void 0){let o,i,s,r=null,a=0;t||(t={});const l=function(){a=t.leading===!1?0:Date.now(),r=null,s=n.apply(o,i),r===null&&(o=i=null)};return function(){const c=Date.now();!a&&t.leading===!1&&(a=c);const u=e-(c-a);return o=this,i=arguments,u<=0||u>e?(r&&(clearTimeout(r),r=null),a=c,s=n.apply(o,i),r===null&&(o=i=null)):!r&&t.trailing!==!1&&(r=setTimeout(l,u)),s}}const Ft=Yn(Object.freeze(Object.defineProperty({__proto__:null,PromiseQueue:Xs,beautifyShortcut:As,cacheable:Os,capitalize:Ls,copyTextToClipboard:Ps,debounce:Ns,deepMerge:Dt,deprecationAssert:zs,getUserOS:ln,getValidUrl:Us,isBoolean:Rs,isClass:Ds,isEmpty:_s,isFunction:cn,isIosDevice:Ms,isNumber:Fs,isObject:Ye,isPrintableKey:Ws,isPromise:js,isString:Hs,isUndefined:$s,keyCodes:Ys,mouseButtons:Ks,notEmpty:Rt,throttle:Vs,typeOf:se},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.containsOnlyInlineElements=Gs;var qs=Ft,Zs=Ot;function Gs(n){var e;(0,qs.isString)(n)?(e=document.createElement("div"),e.innerHTML=n):e=n;var t=function(o){return!(0,Zs.blockElements)().includes(o.tagName.toLowerCase())&&Array.from(o.children).every(t)};return Array.from(e.children).every(t)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.containsOnlyInlineElements=void 0;var e=Nt;Object.defineProperty(n,"containsOnlyInlineElements",{enumerable:!0,get:function(){return e.containsOnlyInlineElements}})})(We);var dn={},jt={},Ke={},Ht={};Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.make=Js;function Js(n,e,t){var o;e===void 0&&(e=null),t===void 0&&(t={});var i=document.createElement(n);if(Array.isArray(e)){var s=e.filter(function(a){return a!==void 0});(o=i.classList).add.apply(o,s)}else e!==null&&i.classList.add(e);for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r]);return i}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.make=void 0;var e=Ht;Object.defineProperty(n,"make",{enumerable:!0,get:function(){return e.make}})})(Ke),Object.defineProperty(jt,"__esModule",{value:!0}),jt.fragmentToString=er;var Qs=Ke;function er(n){var e=(0,Qs.make)("div");return e.appendChild(n),e.innerHTML}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.fragmentToString=void 0;var e=jt;Object.defineProperty(n,"fragmentToString",{enumerable:!0,get:function(){return e.fragmentToString}})})(dn);var un={},$t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.getContentLength=or;var tr=ue;function or(n){var e,t;return(0,tr.isNativeInput)(n)?n.value.length:n.nodeType===Node.TEXT_NODE?n.length:(t=(e=n.textContent)===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getContentLength=void 0;var e=$t;Object.defineProperty(n,"getContentLength",{enumerable:!0,get:function(){return e.getContentLength}})})(un);var zt={},Ut={},hn=J&&J.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var o=0,i=e.length,s;o0;){var o=t.shift();if(o){if(n=o,(0,xr.isLeaf)(n)&&!(0,Br.isNodeEmpty)(n,e))return!1;t.push.apply(t,Array.from(n.childNodes))}}return!0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isEmpty=void 0;var e=Gt;Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return e.isEmpty}})})(vn);var kn={},oo={};Object.defineProperty(oo,"__esModule",{value:!0}),oo.isFragment=Sr;var Tr=Ft;function Sr(n){return(0,Tr.isNumber)(n)?!1:!!n&&!!n.nodeType&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isFragment=void 0;var e=oo;Object.defineProperty(n,"isFragment",{enumerable:!0,get:function(){return e.isFragment}})})(kn);var yn={},no={};Object.defineProperty(no,"__esModule",{value:!0}),no.isHTMLString=Or;var Ir=Ke;function Or(n){var e=(0,Ir.make)("div");return e.innerHTML=n,e.childElementCount>0}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isHTMLString=void 0;var e=no;Object.defineProperty(n,"isHTMLString",{enumerable:!0,get:function(){return e.isHTMLString}})})(yn);var wn={},io={};Object.defineProperty(io,"__esModule",{value:!0}),io.offset=_r;function _r(n){var e=n.getBoundingClientRect(),t=window.pageXOffset||document.documentElement.scrollLeft,o=window.pageYOffset||document.documentElement.scrollTop,i=e.top+o,s=e.left+t;return{top:i,left:s,bottom:i+e.height,right:s+e.width}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.offset=void 0;var e=io;Object.defineProperty(n,"offset",{enumerable:!0,get:function(){return e.offset}})})(wn);var En={},so={};Object.defineProperty(so,"__esModule",{value:!0}),so.prepend=Mr;function Mr(n,e){Array.isArray(e)?(e=e.reverse(),e.forEach(function(t){return n.prepend(t)})):n.prepend(e)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.prepend=void 0;var e=so;Object.defineProperty(n,"prepend",{enumerable:!0,get:function(){return e.prepend}})})(En),function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.prepend=n.offset=n.make=n.isLineBreakTag=n.isSingleTag=n.isNodeEmpty=n.isLeaf=n.isHTMLString=n.isFragment=n.isEmpty=n.isElement=n.isContentEditable=n.isCollapsedWhitespaces=n.findAllInputs=n.isNativeInput=n.allInputsSelector=n.getDeepestNode=n.getDeepestBlockElements=n.getContentLength=n.fragmentToString=n.containsOnlyInlineElements=n.canSetCaret=n.calculateBaseline=n.blockElements=n.append=void 0;var e=Ct;Object.defineProperty(n,"allInputsSelector",{enumerable:!0,get:function(){return e.allInputsSelector}});var t=ue;Object.defineProperty(n,"isNativeInput",{enumerable:!0,get:function(){return t.isNativeInput}});var o=sn;Object.defineProperty(n,"append",{enumerable:!0,get:function(){return o.append}});var i=Ot;Object.defineProperty(n,"blockElements",{enumerable:!0,get:function(){return i.blockElements}});var s=rn;Object.defineProperty(n,"calculateBaseline",{enumerable:!0,get:function(){return s.calculateBaseline}});var r=an;Object.defineProperty(n,"canSetCaret",{enumerable:!0,get:function(){return r.canSetCaret}});var a=We;Object.defineProperty(n,"containsOnlyInlineElements",{enumerable:!0,get:function(){return a.containsOnlyInlineElements}});var l=dn;Object.defineProperty(n,"fragmentToString",{enumerable:!0,get:function(){return l.fragmentToString}});var c=un;Object.defineProperty(n,"getContentLength",{enumerable:!0,get:function(){return c.getContentLength}});var u=zt;Object.defineProperty(n,"getDeepestBlockElements",{enumerable:!0,get:function(){return u.getDeepestBlockElements}});var h=fn;Object.defineProperty(n,"getDeepestNode",{enumerable:!0,get:function(){return h.getDeepestNode}});var p=mn;Object.defineProperty(n,"findAllInputs",{enumerable:!0,get:function(){return p.findAllInputs}});var g=bn;Object.defineProperty(n,"isCollapsedWhitespaces",{enumerable:!0,get:function(){return g.isCollapsedWhitespaces}});var f=Lt;Object.defineProperty(n,"isContentEditable",{enumerable:!0,get:function(){return f.isContentEditable}});var v=qt;Object.defineProperty(n,"isElement",{enumerable:!0,get:function(){return v.isElement}});var O=vn;Object.defineProperty(n,"isEmpty",{enumerable:!0,get:function(){return O.isEmpty}});var S=kn;Object.defineProperty(n,"isFragment",{enumerable:!0,get:function(){return S.isFragment}});var A=yn;Object.defineProperty(n,"isHTMLString",{enumerable:!0,get:function(){return A.isHTMLString}});var G=Jt;Object.defineProperty(n,"isLeaf",{enumerable:!0,get:function(){return G.isLeaf}});var j=eo;Object.defineProperty(n,"isNodeEmpty",{enumerable:!0,get:function(){return j.isNodeEmpty}});var U=Xe;Object.defineProperty(n,"isLineBreakTag",{enumerable:!0,get:function(){return U.isLineBreakTag}});var oe=Ve;Object.defineProperty(n,"isSingleTag",{enumerable:!0,get:function(){return oe.isSingleTag}});var he=Ke;Object.defineProperty(n,"make",{enumerable:!0,get:function(){return he.make}});var k=wn;Object.defineProperty(n,"offset",{enumerable:!0,get:function(){return k.offset}});var m=En;Object.defineProperty(n,"prepend",{enumerable:!0,get:function(){return m.prepend}})}(de);var Ze={};Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.getContenteditableSlice=Lr;var Ar=de;function Lr(n,e,t,o,i){var s;i===void 0&&(i=!1);var r=document.createRange();if(o==="left"?(r.setStart(n,0),r.setEnd(e,t)):(r.setStart(e,t),r.setEnd(n,n.childNodes.length)),i===!0){var a=r.extractContents();return(0,Ar.fragmentToString)(a)}var l=r.cloneContents(),c=document.createElement("div");c.appendChild(l);var u=(s=c.textContent)!==null&&s!==void 0?s:"";return u}Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.checkContenteditableSliceForEmptiness=Rr;var Pr=de,Nr=Ze;function Rr(n,e,t,o){var i=(0,Nr.getContenteditableSlice)(n,e,t,o);return(0,Pr.isCollapsedWhitespaces)(i)}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.checkContenteditableSliceForEmptiness=void 0;var e=Ue;Object.defineProperty(n,"checkContenteditableSliceForEmptiness",{enumerable:!0,get:function(){return e.checkContenteditableSliceForEmptiness}})})(Bt);var xn={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getContenteditableSlice=void 0;var e=Ze;Object.defineProperty(n,"getContenteditableSlice",{enumerable:!0,get:function(){return e.getContenteditableSlice}})})(xn);var Bn={},ro={};Object.defineProperty(ro,"__esModule",{value:!0}),ro.focus=Fr;var Dr=de;function Fr(n,e){var t,o;if(e===void 0&&(e=!0),(0,Dr.isNativeInput)(n)){n.focus();var i=e?0:n.value.length;n.setSelectionRange(i,i)}else{var s=document.createRange(),r=window.getSelection();if(!r)return;var a=function(p){var g=document.createTextNode("");p.appendChild(g),s.setStart(g,0),s.setEnd(g,0)},l=function(p){return p!=null},c=n.childNodes,u=e?c[0]:c[c.length-1];if(l(u)){for(;l(u)&&u.nodeType!==Node.TEXT_NODE;)u=e?u.firstChild:u.lastChild;if(l(u)&&u.nodeType===Node.TEXT_NODE){var h=(o=(t=u.textContent)===null||t===void 0?void 0:t.length)!==null&&o!==void 0?o:0,i=e?0:h;s.setStart(u,i),s.setEnd(u,i)}else a(n)}else a(n);r.removeAllRanges(),r.addRange(s)}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.focus=void 0;var e=ro;Object.defineProperty(n,"focus",{enumerable:!0,get:function(){return e.focus}})})(Bn);var ao={},Ge={};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.getCaretNodeAndOffset=jr;function jr(){var n=window.getSelection();if(n===null)return[null,0];var e=n.focusNode,t=n.focusOffset;return e===null?[null,0]:(e.nodeType!==Node.TEXT_NODE&&e.childNodes.length>0&&(e.childNodes[t]!==void 0?(e=e.childNodes[t],t=0):(e=e.childNodes[t-1],e.textContent!==null&&(t=e.textContent.length))),[e,t])}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getCaretNodeAndOffset=void 0;var e=Ge;Object.defineProperty(n,"getCaretNodeAndOffset",{enumerable:!0,get:function(){return e.getCaretNodeAndOffset}})})(ao);var Cn={},Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.getRange=Hr;function Hr(){var n=window.getSelection();return n&&n.rangeCount?n.getRangeAt(0):null}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.getRange=void 0;var e=Je;Object.defineProperty(n,"getRange",{enumerable:!0,get:function(){return e.getRange}})})(Cn);var Tn={},lo={};Object.defineProperty(lo,"__esModule",{value:!0}),lo.isCaretAtEndOfInput=Ur;var Sn=de,$r=ao,zr=Bt;function Ur(n){var e=(0,Sn.getDeepestNode)(n,!0);if(e===null)return!0;if((0,Sn.isNativeInput)(e))return e.selectionEnd===e.value.length;var t=(0,$r.getCaretNodeAndOffset)(),o=t[0],i=t[1];return o===null?!1:(0,zr.checkContenteditableSliceForEmptiness)(n,o,i,"right")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCaretAtEndOfInput=void 0;var e=lo;Object.defineProperty(n,"isCaretAtEndOfInput",{enumerable:!0,get:function(){return e.isCaretAtEndOfInput}})})(Tn);var In={},co={};Object.defineProperty(co,"__esModule",{value:!0}),co.isCaretAtStartOfInput=Kr;var Qe=de,Wr=Ge,Yr=Ue;function Kr(n){var e=(0,Qe.getDeepestNode)(n);if(e===null||(0,Qe.isEmpty)(n))return!0;if((0,Qe.isNativeInput)(e))return e.selectionEnd===0;if((0,Qe.isEmpty)(n))return!0;var t=(0,Wr.getCaretNodeAndOffset)(),o=t[0],i=t[1];return o===null?!1:(0,Yr.checkContenteditableSliceForEmptiness)(n,o,i,"left")}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCaretAtStartOfInput=void 0;var e=co;Object.defineProperty(n,"isCaretAtStartOfInput",{enumerable:!0,get:function(){return e.isCaretAtStartOfInput}})})(In);var On={},uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.save=qr;var Xr=de,Vr=Je;function qr(){var n=(0,Vr.getRange)(),e=(0,Xr.make)("span");if(e.id="cursor",e.hidden=!0,!!n)return n.insertNode(e),function(){var o=window.getSelection();o&&(n.setStartAfter(e),n.setEndAfter(e),o.removeAllRanges(),o.addRange(n),setTimeout(function(){e.remove()},150))}}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.save=void 0;var e=uo;Object.defineProperty(n,"save",{enumerable:!0,get:function(){return e.save}})})(On),function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.save=n.isCaretAtStartOfInput=n.isCaretAtEndOfInput=n.getRange=n.getCaretNodeAndOffset=n.focus=n.getContenteditableSlice=n.checkContenteditableSliceForEmptiness=void 0;var e=Bt;Object.defineProperty(n,"checkContenteditableSliceForEmptiness",{enumerable:!0,get:function(){return e.checkContenteditableSliceForEmptiness}});var t=xn;Object.defineProperty(n,"getContenteditableSlice",{enumerable:!0,get:function(){return t.getContenteditableSlice}});var o=Bn;Object.defineProperty(n,"focus",{enumerable:!0,get:function(){return o.focus}});var i=ao;Object.defineProperty(n,"getCaretNodeAndOffset",{enumerable:!0,get:function(){return i.getCaretNodeAndOffset}});var s=Cn;Object.defineProperty(n,"getRange",{enumerable:!0,get:function(){return s.getRange}});var r=Tn;Object.defineProperty(n,"isCaretAtEndOfInput",{enumerable:!0,get:function(){return r.isCaretAtEndOfInput}});var a=In;Object.defineProperty(n,"isCaretAtStartOfInput",{enumerable:!0,get:function(){return a.isCaretAtStartOfInput}});var l=On;Object.defineProperty(n,"save",{enumerable:!0,get:function(){return l.save}})}(nn);class Zr extends E{keydown(e){switch(this.beforeKeydownProcessing(e),e.keyCode){case y.BACKSPACE:this.backspace(e);break;case y.DELETE:this.delete(e);break;case y.ENTER:this.enter(e);break;case y.DOWN:case y.RIGHT:this.arrowRightAndDown(e);break;case y.UP:case y.LEFT:this.arrowLeftAndUp(e);break;case y.TAB:this.tabPressed(e);break}e.key==="/"&&!e.ctrlKey&&!e.metaKey&&this.slashPressed(e),e.code==="Slash"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.commandSlashPressed())}beforeKeydownProcessing(e){this.needToolbarClosing(e)&&Eo(e.keyCode)&&(this.Editor.Toolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||this.Editor.BlockSelection.clearSelection(e))}keyup(e){e.shiftKey||this.Editor.UI.checkEmptiness()}dragOver(e){const t=this.Editor.BlockManager.getBlockByChildNode(e.target);t.dropTarget=!0}dragLeave(e){const t=this.Editor.BlockManager.getBlockByChildNode(e.target);t.dropTarget=!1}handleCommandC(e){const{BlockSelection:t}=this.Editor;t.anyBlockSelected&&t.copySelectedBlocks(e)}handleCommandX(e){const{BlockSelection:t,BlockManager:o,Caret:i}=this.Editor;t.anyBlockSelected&&t.copySelectedBlocks(e).then(()=>{const s=o.removeSelectedBlocks(),r=o.insertDefaultBlockAtIndex(s,!0);i.setToBlock(r,i.positions.START),t.clearSelection(e)})}tabPressed(e){const{InlineToolbar:t,Caret:o}=this.Editor;if(t.opened)return;(e.shiftKey?o.navigatePrevious(!0):o.navigateNext(!0))&&e.preventDefault()}commandSlashPressed(){this.Editor.BlockSelection.selectedBlocks.length>1||this.activateBlockSettings()}slashPressed(e){this.Editor.BlockManager.currentBlock.isEmpty&&(e.preventDefault(),this.Editor.Caret.insertContentAtCaretPosition("/"),this.activateToolbox())}enter(e){const{BlockManager:t,UI:o}=this.Editor,i=t.currentBlock;if(i===void 0||i.tool.isLineBreaksEnabled||o.someToolbarOpened&&o.someFlipperButtonFocused||e.shiftKey&&!rt)return;let s=i;i.currentInput!==void 0&&$e(i.currentInput)&&!i.hasMedia?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex):i.currentInput&&ze(i.currentInput)?s=this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex+1):s=this.Editor.BlockManager.split(),this.Editor.Caret.setToBlock(s),this.Editor.Toolbar.moveAndOpen(s),e.preventDefault()}backspace(e){const{BlockManager:t,Caret:o}=this.Editor,{currentBlock:i,previousBlock:s}=t;if(i===void 0||!b.isCollapsed||!i.currentInput||!$e(i.currentInput))return;if(e.preventDefault(),this.Editor.Toolbar.close(),!(i.currentInput===i.firstInput)){o.navigatePrevious();return}if(s===null)return;if(s.isEmpty){t.removeBlock(s);return}if(i.isEmpty){t.removeBlock(i);const l=t.currentBlock;o.setToBlock(l,o.positions.END);return}No(s,i)?this.mergeBlocks(s,i):o.setToBlock(s,o.positions.END)}delete(e){const{BlockManager:t,Caret:o}=this.Editor,{currentBlock:i,nextBlock:s}=t;if(!b.isCollapsed||!ze(i.currentInput))return;if(e.preventDefault(),this.Editor.Toolbar.close(),!(i.currentInput===i.lastInput)){o.navigateNext();return}if(s===null)return;if(s.isEmpty){t.removeBlock(s);return}if(i.isEmpty){t.removeBlock(i),o.setToBlock(s,o.positions.START);return}No(i,s)?this.mergeBlocks(i,s):o.setToBlock(s,o.positions.START)}mergeBlocks(e,t){const{BlockManager:o,Toolbar:i}=this.Editor;e.lastInput!==void 0&&(nn.focus(e.lastInput,!1),o.mergeBlocks(e,t).then(()=>{i.close()}))}arrowRightAndDown(e){const t=ae.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===y.TAB);if(this.Editor.UI.someToolbarOpened&&t)return;this.Editor.Toolbar.close();const{currentBlock:o}=this.Editor.BlockManager,s=((o==null?void 0:o.currentInput)!==void 0?ze(o.currentInput):void 0)||this.Editor.BlockSelection.anyBlockSelected;if(e.shiftKey&&e.keyCode===y.DOWN&&s){this.Editor.CrossBlockSelection.toggleBlockSelectedState();return}if(e.keyCode===y.DOWN||e.keyCode===y.RIGHT&&!this.isRtl?this.Editor.Caret.navigateNext():this.Editor.Caret.navigatePrevious()){e.preventDefault();return}Ae(()=>{this.Editor.BlockManager.currentBlock&&this.Editor.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Editor.BlockSelection.clearSelection(e)}arrowLeftAndUp(e){if(this.Editor.UI.someToolbarOpened){if(ae.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===y.TAB))return;this.Editor.UI.closeAllToolbars()}this.Editor.Toolbar.close();const{currentBlock:t}=this.Editor.BlockManager,i=((t==null?void 0:t.currentInput)!==void 0?$e(t.currentInput):void 0)||this.Editor.BlockSelection.anyBlockSelected;if(e.shiftKey&&e.keyCode===y.UP&&i){this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1);return}if(e.keyCode===y.UP||e.keyCode===y.LEFT&&!this.isRtl?this.Editor.Caret.navigatePrevious():this.Editor.Caret.navigateNext()){e.preventDefault();return}Ae(()=>{this.Editor.BlockManager.currentBlock&&this.Editor.BlockManager.currentBlock.updateCurrentInput()},20)(),this.Editor.BlockSelection.clearSelection(e)}needToolbarClosing(e){const t=e.keyCode===y.ENTER&&this.Editor.Toolbar.toolbox.opened,o=e.keyCode===y.ENTER&&this.Editor.BlockSettings.opened,i=e.keyCode===y.ENTER&&this.Editor.InlineToolbar.opened,s=e.keyCode===y.TAB;return!(e.shiftKey||s||t||o||i)}activateToolbox(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()}activateBlockSettings(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.BlockSettings.opened||this.Editor.BlockSettings.open()}}class ho{constructor(e){this.blocks=[],this.workingArea=e}get length(){return this.blocks.length}get array(){return this.blocks}get nodes(){return xo(this.workingArea.children)}static set(e,t,o){return isNaN(Number(t))?(Reflect.set(e,t,o),!0):(e.insert(+t,o),!0)}static get(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}push(e){this.blocks.push(e),this.insertToDOM(e)}swap(e,t){const o=this.blocks[t];d.swap(this.blocks[e].holder,o.holder),this.blocks[t]=this.blocks[e],this.blocks[e]=o}move(e,t){const o=this.blocks.splice(t,1)[0],i=e-1,s=Math.max(0,i),r=this.blocks[s];e>0?this.insertToDOM(o,"afterend",r):this.insertToDOM(o,"beforebegin",r),this.blocks.splice(e,0,o);const a=this.composeBlockEvent("move",{fromIndex:t,toIndex:e});o.call(te.MOVED,a)}insert(e,t,o=!1){if(!this.length){this.push(t);return}e>this.length&&(e=this.length),o&&(this.blocks[e].holder.remove(),this.blocks[e].call(te.REMOVED));const i=o?1:0;if(this.blocks.splice(e,i,t),e>0){const s=this.blocks[e-1];this.insertToDOM(t,"afterend",s)}else{const s=this.blocks[e+1];s?this.insertToDOM(t,"beforebegin",s):this.insertToDOM(t)}}replace(e,t){if(this.blocks[e]===void 0)throw Error("Incorrect index");this.blocks[e].holder.replaceWith(t.holder),this.blocks[e]=t}insertMany(e,t){const o=new DocumentFragment;for(const i of e)o.appendChild(i.holder);if(this.length>0){if(t>0){const i=Math.min(t-1,this.length-1);this.blocks[i].holder.after(o)}else t===0&&this.workingArea.prepend(o);this.blocks.splice(t,0,...e)}else this.blocks.push(...e),this.workingArea.appendChild(o);e.forEach(i=>i.call(te.RENDERED))}remove(e){isNaN(e)&&(e=this.length-1),this.blocks[e].holder.remove(),this.blocks[e].call(te.REMOVED),this.blocks.splice(e,1)}removeAll(){this.workingArea.innerHTML="",this.blocks.forEach(e=>e.call(te.REMOVED)),this.blocks.length=0}insertAfter(e,t){const o=this.blocks.indexOf(e);this.insert(o+1,t)}get(e){return this.blocks[e]}indexOf(e){return this.blocks.indexOf(e)}insertToDOM(e,t,o){t?o.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(te.RENDERED)}composeBlockEvent(e,t){return new CustomEvent(e,{detail:t})}}const _n="block-removed",Mn="block-added",Gr="block-moved",An="block-changed";class Jr{constructor(){this.completed=Promise.resolve()}add(e){return new Promise((t,o)=>{this.completed=this.completed.then(e).then(t).catch(o)})}}class Qr extends E{constructor(){super(...arguments),this._currentBlockIndex=-1,this._blocks=null}get currentBlockIndex(){return this._currentBlockIndex}set currentBlockIndex(e){this._currentBlockIndex=e}get firstBlock(){return this._blocks[0]}get lastBlock(){return this._blocks[this._blocks.length-1]}get currentBlock(){return this._blocks[this.currentBlockIndex]}set currentBlock(e){this.currentBlockIndex=this.getBlockIndex(e)}get nextBlock(){return this.currentBlockIndex===this._blocks.length-1?null:this._blocks[this.currentBlockIndex+1]}get nextContentfulBlock(){return this.blocks.slice(this.currentBlockIndex+1).find(t=>!!t.inputs.length)}get previousContentfulBlock(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find(t=>!!t.inputs.length)}get previousBlock(){return this.currentBlockIndex===0?null:this._blocks[this.currentBlockIndex-1]}get blocks(){return this._blocks.array}get isEditorEmpty(){return this.blocks.every(e=>e.isEmpty)}prepare(){const e=new ho(this.Editor.UI.nodes.redactor);this._blocks=new Proxy(e,{set:ho.set,get:ho.get}),this.listeners.on(document,"copy",t=>this.Editor.BlockEvents.handleCommandC(t))}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}composeBlock({tool:e,data:t={},id:o=void 0,tunes:i={}}){const s=this.Editor.ReadOnly.isEnabled,r=this.Editor.Tools.blockTools.get(e),a=new R({id:o,data:t,tool:r,api:this.Editor.API,readOnly:s,tunesData:i},this.eventsDispatcher);return s||window.requestIdleCallback(()=>{this.bindBlockEvents(a)},{timeout:2e3}),a}insert({id:e=void 0,tool:t=this.config.defaultBlock,data:o={},index:i,needToFocus:s=!0,replace:r=!1,tunes:a={}}={}){let l=i;l===void 0&&(l=this.currentBlockIndex+(r?0:1));const c=this.composeBlock({id:e,tool:t,data:o,tunes:a});return r&&this.blockDidMutated(_n,this.getBlockByIndex(l),{index:l}),this._blocks.insert(l,c,r),this.blockDidMutated(Mn,c,{index:l}),s?this.currentBlockIndex=l:l<=this.currentBlockIndex&&this.currentBlockIndex++,c}insertMany(e,t=0){this._blocks.insertMany(e,t)}async update(e,t,o){if(!t&&!o)return e;const i=await e.data,s=this.composeBlock({id:e.id,tool:e.name,data:Object.assign({},i,t??{}),tunes:o??e.tunes}),r=this.getBlockIndex(e);return this._blocks.replace(r,s),this.blockDidMutated(An,s,{index:r}),s}replace(e,t,o){const i=this.getBlockIndex(e);return this.insert({tool:t,data:o,index:i,replace:!0})}paste(e,t,o=!1){const i=this.insert({tool:e,replace:o});try{window.requestIdleCallback(()=>{i.call(te.ON_PASTE,t)})}catch(s){T(`${e}: onPaste callback call is failed`,"error",s)}return i}insertDefaultBlockAtIndex(e,t=!1){const o=this.composeBlock({tool:this.config.defaultBlock});return this._blocks[e]=o,this.blockDidMutated(Mn,o,{index:e}),t?this.currentBlockIndex=e:e<=this.currentBlockIndex&&this.currentBlockIndex++,o}insertAtEnd(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}async mergeBlocks(e,t){let o;if(e.name===t.name&&e.mergeable){const i=await t.data;if(V(i)){console.error("Could not merge Block. Failed to extract original Block data.");return}const[s]=dt([i],e.tool.sanitizeConfig);o=s}else if(e.mergeable&&Pe(t,"export")&&Pe(e,"import")){const i=await t.exportDataAsString(),s=q(i,e.tool.sanitizeConfig);o=Ro(s,e.tool.conversionConfig)}o!==void 0&&(await e.mergeWith(o),this.removeBlock(t),this.currentBlockIndex=this._blocks.indexOf(e))}removeBlock(e,t=!0){return new Promise(o=>{const i=this._blocks.indexOf(e);if(!this.validateIndex(i))throw new Error("Can't find a Block to remove");e.destroy(),this._blocks.remove(i),this.blockDidMutated(_n,e,{index:i}),this.currentBlockIndex>=i&&this.currentBlockIndex--,this.blocks.length?i===0&&(this.currentBlockIndex=0):(this.unsetCurrentBlock(),t&&this.insert()),o()})}removeSelectedBlocks(){let e;for(let t=this.blocks.length-1;t>=0;t--)this.blocks[t].selected&&(this.removeBlock(this.blocks[t]),e=t);return e}removeAllBlocks(){for(let e=this.blocks.length-1;e>=0;e--)this._blocks.remove(e);this.unsetCurrentBlock(),this.insert(),this.currentBlock.firstInput.focus()}split(){const e=this.Editor.Caret.extractFragmentFromCaretPosition(),t=d.make("div");t.appendChild(e);const o={text:d.isEmpty(t)?"":t.innerHTML};return this.insert({data:o})}getBlockByIndex(e){return e===-1&&(e=this._blocks.length-1),this._blocks[e]}getBlockIndex(e){return this._blocks.indexOf(e)}getBlockById(e){return this._blocks.array.find(t=>t.id===e)}getBlock(e){d.isElement(e)||(e=e.parentNode);const t=this._blocks.nodes,o=e.closest(`.${R.CSS.wrapper}`),i=t.indexOf(o);if(i>=0)return this._blocks[i]}setCurrentBlockByChildNode(e){d.isElement(e)||(e=e.parentNode);const t=e.closest(`.${R.CSS.wrapper}`);if(!t)return;const o=t.closest(`.${this.Editor.UI.CSS.editorWrapper}`);if(o!=null&&o.isEqualNode(this.Editor.UI.nodes.wrapper))return this.currentBlockIndex=this._blocks.nodes.indexOf(t),this.currentBlock.updateCurrentInput(),this.currentBlock}getBlockByChildNode(e){if(!e||!(e instanceof Node))return;d.isElement(e)||(e=e.parentNode);const t=e.closest(`.${R.CSS.wrapper}`);return this.blocks.find(o=>o.holder===t)}swap(e,t){this._blocks.swap(e,t),this.currentBlockIndex=t}move(e,t=this.currentBlockIndex){if(isNaN(e)||isNaN(t)){T("Warning during 'move' call: incorrect indices provided.","warn");return}if(!this.validateIndex(e)||!this.validateIndex(t)){T("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.","warn");return}this._blocks.move(e,t),this.currentBlockIndex=e,this.blockDidMutated(Gr,this.currentBlock,{fromIndex:t,toIndex:e})}async convert(e,t,o){if(!await e.save())throw new Error("Could not convert Block. Failed to extract original Block data.");const s=this.Editor.Tools.blockTools.get(t);if(!s)throw new Error(`Could not convert Block. Tool «${t}» not found.`);const r=await e.exportDataAsString(),a=q(r,s.sanitizeConfig);let l=Ro(a,s.conversionConfig,s.settings);return o&&(l=Object.assign(l,o)),this.replace(e,s.name,l)}unsetCurrentBlock(){this.currentBlockIndex=-1}async clear(e=!1){const t=new Jr;this.blocks.forEach(o=>{t.add(async()=>{await this.removeBlock(o,!1)})}),await t.completed,this.unsetCurrentBlock(),e&&this.insert(),this.Editor.UI.checkEmptiness()}async destroy(){await Promise.all(this.blocks.map(e=>e.destroy()))}bindBlockEvents(e){const{BlockEvents:t}=this.Editor;this.readOnlyMutableListeners.on(e.holder,"keydown",o=>{t.keydown(o)}),this.readOnlyMutableListeners.on(e.holder,"keyup",o=>{t.keyup(o)}),this.readOnlyMutableListeners.on(e.holder,"dragover",o=>{t.dragOver(o)}),this.readOnlyMutableListeners.on(e.holder,"dragleave",o=>{t.dragLeave(o)}),e.on("didMutated",o=>this.blockDidMutated(An,o,{index:this.getBlockIndex(o)}))}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}enableModuleBindings(){this.readOnlyMutableListeners.on(document,"cut",e=>this.Editor.BlockEvents.handleCommandX(e)),this.blocks.forEach(e=>{this.bindBlockEvents(e)})}validateIndex(e){return!(e<0||e>=this._blocks.length)}blockDidMutated(e,t,o){const i=new CustomEvent(e,{detail:{target:new ee(t),...o}});return this.eventsDispatcher.emit(_o,{event:i}),t}}class ea extends E{constructor(){super(...arguments),this.anyBlockSelectedCache=null,this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1}get sanitizerConfig(){return{p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}}}get allBlocksSelected(){const{BlockManager:e}=this.Editor;return e.blocks.every(t=>t.selected===!0)}set allBlocksSelected(e){const{BlockManager:t}=this.Editor;t.blocks.forEach(o=>{o.selected=e}),this.clearCache()}get anyBlockSelected(){const{BlockManager:e}=this.Editor;return this.anyBlockSelectedCache===null&&(this.anyBlockSelectedCache=e.blocks.some(t=>t.selected===!0)),this.anyBlockSelectedCache}get selectedBlocks(){return this.Editor.BlockManager.blocks.filter(e=>e.selected)}prepare(){this.selection=new b,be.add({name:"CMD+A",handler:e=>{const{BlockManager:t,ReadOnly:o}=this.Editor;if(o.isEnabled){e.preventDefault(),this.selectAllBlocks();return}t.currentBlock&&this.handleCommandA(e)},on:this.Editor.UI.nodes.redactor})}toggleReadOnly(){b.get().removeAllRanges(),this.allBlocksSelected=!1}unSelectBlockByIndex(e){const{BlockManager:t}=this.Editor;let o;isNaN(e)?o=t.currentBlock:o=t.getBlockByIndex(e),o.selected=!1,this.clearCache()}clearSelection(e,t=!1){const{BlockManager:o,Caret:i,RectangleSelection:s}=this.Editor;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;const r=e&&e instanceof KeyboardEvent,a=r&&Eo(e.keyCode);if(this.anyBlockSelected&&r&&a&&!b.isSelectionExists){const l=o.removeSelectedBlocks();o.insertDefaultBlockAtIndex(l,!0),i.setToBlock(o.currentBlock),Ae(()=>{const c=e.key;i.insertContentAtCaretPosition(c.length>1?"":c)},20)()}if(this.Editor.CrossBlockSelection.clear(e),!this.anyBlockSelected||s.isRectActivated()){this.Editor.RectangleSelection.clearSelection();return}t&&this.selection.restore(),this.allBlocksSelected=!1}copySelectedBlocks(e){e.preventDefault();const t=d.make("div");this.selectedBlocks.forEach(s=>{const r=q(s.holder.innerHTML,this.sanitizerConfig),a=d.make("p");a.innerHTML=r,t.appendChild(a)});const o=Array.from(t.childNodes).map(s=>s.textContent).join(` + +`),i=t.innerHTML;return e.clipboardData.setData("text/plain",o),e.clipboardData.setData("text/html",i),Promise.all(this.selectedBlocks.map(s=>s.save())).then(s=>{try{e.clipboardData.setData(this.Editor.Paste.MIME_TYPE,JSON.stringify(s))}catch{}})}selectBlockByIndex(e){const{BlockManager:t}=this.Editor,o=t.getBlockByIndex(e);o!==void 0&&this.selectBlock(o)}selectBlock(e){this.selection.save(),b.get().removeAllRanges(),e.selected=!0,this.clearCache(),this.Editor.InlineToolbar.close()}unselectBlock(e){e.selected=!1,this.clearCache()}clearCache(){this.anyBlockSelectedCache=null}destroy(){be.remove(this.Editor.UI.nodes.redactor,"CMD+A")}handleCommandA(e){if(this.Editor.RectangleSelection.clearSelection(),d.isNativeInput(e.target)&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}const t=this.Editor.BlockManager.getBlock(e.target),o=t.inputs;if(o.length>1&&!this.readyToBlockSelection){this.readyToBlockSelection=!0;return}if(o.length===1&&!this.needToSelectAll){this.needToSelectAll=!0;return}this.needToSelectAll?(e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1):this.readyToBlockSelection&&(e.preventDefault(),this.selectBlock(t),this.needToSelectAll=!0)}selectAllBlocks(){this.selection.save(),b.get().removeAllRanges(),this.allBlocksSelected=!0,this.Editor.InlineToolbar.close()}}class et extends E{get positions(){return{START:"start",END:"end",DEFAULT:"default"}}static get CSS(){return{shadowCaret:"cdx-shadow-caret"}}setToBlock(e,t=this.positions.DEFAULT,o=0){var c;const{BlockManager:i,BlockSelection:s}=this.Editor;if(s.clearSelection(),!e.focusable){(c=window.getSelection())==null||c.removeAllRanges(),s.selectBlock(e),i.currentBlock=e;return}let r;switch(t){case this.positions.START:r=e.firstInput;break;case this.positions.END:r=e.lastInput;break;default:r=e.currentInput}if(!r)return;const a=d.getDeepestNode(r,t===this.positions.END),l=d.getContentLength(a);switch(!0){case t===this.positions.START:o=0;break;case t===this.positions.END:case o>l:o=l;break}this.set(a,o),i.setCurrentBlockByChildNode(e.holder),i.currentBlock.currentInput=r}setToInput(e,t=this.positions.DEFAULT,o=0){const{currentBlock:i}=this.Editor.BlockManager,s=d.getDeepestNode(e);switch(t){case this.positions.START:this.set(s,0);break;case this.positions.END:this.set(s,d.getContentLength(s));break;default:o&&this.set(s,o)}i.currentInput=e}set(e,t=0){const{top:i,bottom:s}=b.setCursor(e,t),{innerHeight:r}=window;i<0?window.scrollBy(0,i-30):s>r&&window.scrollBy(0,s-r+30)}setToTheLastBlock(){const e=this.Editor.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{const t=this.Editor.BlockManager.insertAtEnd();this.setToBlock(t)}}extractFragmentFromCaretPosition(){const e=b.get();if(e.rangeCount){const t=e.getRangeAt(0),o=this.Editor.BlockManager.currentBlock.currentInput;if(t.deleteContents(),o)if(d.isNativeInput(o)){const i=o,s=document.createDocumentFragment(),r=i.value.substring(0,i.selectionStart),a=i.value.substring(i.selectionStart);return s.textContent=a,i.value=r,s}else{const i=t.cloneRange();return i.selectNodeContents(o),i.setStart(t.endContainer,t.endOffset),i.extractContents()}}}navigateNext(e=!1){const{BlockManager:t}=this.Editor,{currentBlock:o,nextBlock:i}=t;if(o===void 0)return!1;const{nextInput:s,currentInput:r}=o,a=r!==void 0?ze(r):void 0;let l=i;const c=e||a||!o.focusable;if(s&&c)return this.setToInput(s,this.positions.START),!0;if(l===null){if(o.tool.isDefault||!c)return!1;l=t.insertAtEnd()}return c?(this.setToBlock(l,this.positions.START),!0):!1}navigatePrevious(e=!1){const{currentBlock:t,previousBlock:o}=this.Editor.BlockManager;if(!t)return!1;const{previousInput:i,currentInput:s}=t,r=s!==void 0?$e(s):void 0,a=e||r||!t.focusable;return i&&a?(this.setToInput(i,this.positions.END),!0):o!==null&&a?(this.setToBlock(o,this.positions.END),!0):!1}createShadow(e){const t=document.createElement("span");t.classList.add(et.CSS.shadowCaret),e.insertAdjacentElement("beforeend",t)}restoreCaret(e){const t=e.querySelector(`.${et.CSS.shadowCaret}`);if(!t)return;new b().expandToTag(t);const i=document.createRange();i.selectNode(t),i.extractContents()}insertContentAtCaretPosition(e){const t=document.createDocumentFragment(),o=document.createElement("div"),i=b.get(),s=b.range;o.innerHTML=e,Array.from(o.childNodes).forEach(c=>t.appendChild(c)),t.childNodes.length===0&&t.appendChild(new Text);const r=t.lastChild;s.deleteContents(),s.insertNode(t);const a=document.createRange(),l=r.nodeType===Node.TEXT_NODE?r:r.firstChild;l!==null&&l.textContent!==null&&a.setStart(l,l.textContent.length),i.removeAllRanges(),i.addRange(a)}}class ta extends E{constructor(){super(...arguments),this.onMouseUp=()=>{this.listeners.off(document,"mouseover",this.onMouseOver),this.listeners.off(document,"mouseup",this.onMouseUp)},this.onMouseOver=e=>{const{BlockManager:t,BlockSelection:o}=this.Editor;if(e.relatedTarget===null&&e.target===null)return;const i=t.getBlockByChildNode(e.relatedTarget)||this.lastSelectedBlock,s=t.getBlockByChildNode(e.target);if(!(!i||!s)&&s!==i){if(i===this.firstSelectedBlock){b.get().removeAllRanges(),i.selected=!0,s.selected=!0,o.clearCache();return}if(s===this.firstSelectedBlock){i.selected=!1,s.selected=!1,o.clearCache();return}this.Editor.InlineToolbar.close(),this.toggleBlocksSelectedState(i,s),this.lastSelectedBlock=s}}}async prepare(){this.listeners.on(document,"mousedown",e=>{this.enableCrossBlockSelection(e)})}watchSelection(e){if(e.button!==Xn.LEFT)return;const{BlockManager:t}=this.Editor;this.firstSelectedBlock=t.getBlock(e.target),this.lastSelectedBlock=this.firstSelectedBlock,this.listeners.on(document,"mouseover",this.onMouseOver),this.listeners.on(document,"mouseup",this.onMouseUp)}get isCrossBlockSelectionStarted(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock&&this.firstSelectedBlock!==this.lastSelectedBlock}toggleBlockSelectedState(e=!0){const{BlockManager:t,BlockSelection:o}=this.Editor;this.lastSelectedBlock||(this.lastSelectedBlock=this.firstSelectedBlock=t.currentBlock),this.firstSelectedBlock===this.lastSelectedBlock&&(this.firstSelectedBlock.selected=!0,o.clearCache(),b.get().removeAllRanges());const i=t.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),s=t.blocks[i];s&&(this.lastSelectedBlock.selected!==s.selected?(s.selected=!0,o.clearCache()):(this.lastSelectedBlock.selected=!1,o.clearCache()),this.lastSelectedBlock=s,this.Editor.InlineToolbar.close(),s.holder.scrollIntoView({block:"nearest"}))}clear(e){const{BlockManager:t,BlockSelection:o,Caret:i}=this.Editor,s=t.blocks.indexOf(this.firstSelectedBlock),r=t.blocks.indexOf(this.lastSelectedBlock);if(o.anyBlockSelected&&s>-1&&r>-1&&e&&e instanceof KeyboardEvent)switch(e.keyCode){case y.DOWN:case y.RIGHT:i.setToBlock(t.blocks[Math.max(s,r)],i.positions.END);break;case y.UP:case y.LEFT:i.setToBlock(t.blocks[Math.min(s,r)],i.positions.START);break;default:i.setToBlock(t.blocks[Math.max(s,r)],i.positions.END)}this.firstSelectedBlock=this.lastSelectedBlock=null}enableCrossBlockSelection(e){const{UI:t}=this.Editor;b.isCollapsed||this.Editor.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Editor.BlockSelection.clearSelection(e)}toggleBlocksSelectedState(e,t){const{BlockManager:o,BlockSelection:i}=this.Editor,s=o.blocks.indexOf(e),r=o.blocks.indexOf(t),a=e.selected!==t.selected;for(let l=Math.min(s,r);l<=Math.max(s,r);l++){const c=o.blocks[l];c!==this.firstSelectedBlock&&c!==(a?e:t)&&(o.blocks[l].selected=!o.blocks[l].selected,i.clearCache())}}}class oa extends E{constructor(){super(...arguments),this.isStartedAtEditor=!1}toggleReadOnly(e){e?this.disableModuleBindings():this.enableModuleBindings()}enableModuleBindings(){const{UI:e}=this.Editor;this.readOnlyMutableListeners.on(e.nodes.holder,"drop",async t=>{await this.processDrop(t)},!0),this.readOnlyMutableListeners.on(e.nodes.holder,"dragstart",()=>{this.processDragStart()}),this.readOnlyMutableListeners.on(e.nodes.holder,"dragover",t=>{this.processDragOver(t)},!0)}disableModuleBindings(){this.readOnlyMutableListeners.clearAll()}async processDrop(e){const{BlockManager:t,Paste:o,Caret:i}=this.Editor;e.preventDefault(),t.blocks.forEach(r=>{r.dropTarget=!1}),b.isAtEditor&&!b.isCollapsed&&this.isStartedAtEditor&&document.execCommand("delete"),this.isStartedAtEditor=!1;const s=t.setCurrentBlockByChildNode(e.target);if(s)this.Editor.Caret.setToBlock(s,i.positions.END);else{const r=t.setCurrentBlockByChildNode(t.lastBlock.holder);this.Editor.Caret.setToBlock(r,i.positions.END)}await o.processDataTransfer(e.dataTransfer,!0)}processDragStart(){b.isAtEditor&&!b.isCollapsed&&(this.isStartedAtEditor=!0),this.Editor.InlineToolbar.close()}processDragOver(e){e.preventDefault()}}const na=180,ia=400;class sa extends E{constructor({config:e,eventsDispatcher:t}){super({config:e,eventsDispatcher:t}),this.disabled=!1,this.batchingTimeout=null,this.batchingOnChangeQueue=new Map,this.batchTime=ia,this.mutationObserver=new MutationObserver(o=>{this.redactorChanged(o)}),this.eventsDispatcher.on(_o,o=>{this.particularBlockChanged(o.event)}),this.eventsDispatcher.on(Mo,()=>{this.disable()}),this.eventsDispatcher.on(Ao,()=>{this.enable()})}enable(){this.mutationObserver.observe(this.Editor.UI.nodes.redactor,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.disabled=!1}disable(){this.mutationObserver.disconnect(),this.disabled=!0}particularBlockChanged(e){this.disabled||!M(this.config.onChange)||(this.batchingOnChangeQueue.set(`block:${e.detail.target.id}:event:${e.type}`,e),this.batchingTimeout&&clearTimeout(this.batchingTimeout),this.batchingTimeout=setTimeout(()=>{let t;this.batchingOnChangeQueue.size===1?t=this.batchingOnChangeQueue.values().next().value:t=Array.from(this.batchingOnChangeQueue.values()),this.config.onChange&&this.config.onChange(this.Editor.API.methods,t),this.batchingOnChangeQueue.clear()},this.batchTime))}redactorChanged(e){this.eventsDispatcher.emit(at,{mutations:e})}}const Ln=class Wn extends E{constructor(){super(...arguments),this.MIME_TYPE="application/x-editor-js",this.toolsTags={},this.tagsByTool={},this.toolsPatterns=[],this.toolsFiles={},this.exceptionList=[],this.processTool=e=>{try{const t=e.create({},{},!1);if(e.pasteConfig===!1){this.exceptionList.push(e.name);return}if(!M(t.onPaste))return;this.getTagsConfig(e),this.getFilesConfig(e),this.getPatternsConfig(e)}catch(t){T(`Paste handling for «${e.name}» Tool hasn't been set up because of the error`,"warn",t)}},this.handlePasteEvent=async e=>{const{BlockManager:t,Toolbar:o}=this.Editor,i=t.setCurrentBlockByChildNode(e.target);!i||this.isNativeBehaviour(e.target)&&!e.clipboardData.types.includes("Files")||i&&this.exceptionList.includes(i.name)||(e.preventDefault(),this.processDataTransfer(e.clipboardData),o.close())}}async prepare(){this.processTools()}toggleReadOnly(e){e?this.unsetCallback():this.setCallback()}async processDataTransfer(e,t=!1){const{Tools:o}=this.Editor,i=e.types;if((i.includes?i.includes("Files"):i.contains("Files"))&&!V(this.toolsFiles)){await this.processFiles(e.files);return}const r=e.getData(this.MIME_TYPE),a=e.getData("text/plain");let l=e.getData("text/html");if(r)try{this.insertEditorJSData(JSON.parse(r));return}catch{}t&&a.trim()&&l.trim()&&(l="

"+(l.trim()?l:a)+"

");const c=Object.keys(this.toolsTags).reduce((p,g)=>(p[g.toLowerCase()]=this.toolsTags[g].sanitizationConfig??{},p),{}),u=Object.assign({},c,o.getAllInlineToolsSanitizeConfig(),{br:{}}),h=q(l,u);!h.trim()||h.trim()===a||!d.isHTMLString(h)?await this.processText(a):await this.processText(h,!0)}async processText(e,t=!1){const{Caret:o,BlockManager:i}=this.Editor,s=t?this.processHTML(e):this.processPlain(e);if(!s.length)return;if(s.length===1){s[0].isBlock?this.processSingleBlock(s.pop()):this.processInlinePaste(s.pop());return}const a=i.currentBlock&&i.currentBlock.tool.isDefault&&i.currentBlock.isEmpty;s.map(async(l,c)=>this.insertBlock(l,c===0&&a)),i.currentBlock&&o.setToBlock(i.currentBlock,o.positions.END)}setCallback(){this.listeners.on(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}unsetCallback(){this.listeners.off(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}processTools(){const e=this.Editor.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}collectTagNames(e){return Q(e)?[e]:N(e)?Object.keys(e):[]}getTagsConfig(e){if(e.pasteConfig===!1)return;const t=e.pasteConfig.tags||[],o=[];t.forEach(i=>{const s=this.collectTagNames(i);o.push(...s),s.forEach(r=>{if(Object.prototype.hasOwnProperty.call(this.toolsTags,r)){T(`Paste handler for «${e.name}» Tool on «${r}» tag is skipped because it is already used by «${this.toolsTags[r].tool.name}» Tool.`,"warn");return}const a=N(i)?i[r]:null;this.toolsTags[r.toUpperCase()]={tool:e,sanitizationConfig:a}})}),this.tagsByTool[e.name]=o.map(i=>i.toUpperCase())}getFilesConfig(e){if(e.pasteConfig===!1)return;const{files:t={}}=e.pasteConfig;let{extensions:o,mimeTypes:i}=t;!o&&!i||(o&&!Array.isArray(o)&&(T(`«extensions» property of the onDrop config for «${e.name}» Tool should be an array`),o=[]),i&&!Array.isArray(i)&&(T(`«mimeTypes» property of the onDrop config for «${e.name}» Tool should be an array`),i=[]),i&&(i=i.filter(s=>Jn(s)?!0:(T(`MIME type value «${s}» for the «${e.name}» Tool is not a valid MIME type`,"warn"),!1))),this.toolsFiles[e.name]={extensions:o||[],mimeTypes:i||[]})}getPatternsConfig(e){e.pasteConfig===!1||!e.pasteConfig.patterns||V(e.pasteConfig.patterns)||Object.entries(e.pasteConfig.patterns).forEach(([t,o])=>{o instanceof RegExp||T(`Pattern ${o} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,"warn"),this.toolsPatterns.push({key:t,pattern:o,tool:e})})}isNativeBehaviour(e){return d.isNativeInput(e)}async processFiles(e){const{BlockManager:t}=this.Editor;let o;o=await Promise.all(Array.from(e).map(r=>this.processFile(r))),o=o.filter(r=>!!r);const s=t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty;o.forEach((r,a)=>{t.paste(r.type,r.event,a===0&&s)})}async processFile(e){const t=Gn(e),o=Object.entries(this.toolsFiles).find(([r,{mimeTypes:a,extensions:l}])=>{const[c,u]=e.type.split("/"),h=l.find(g=>g.toLowerCase()===t.toLowerCase()),p=a.find(g=>{const[f,v]=g.split("/");return f===c&&(v===u||v==="*")});return!!h||!!p});if(!o)return;const[i]=o;return{event:this.composePasteEvent("file",{file:e}),type:i}}processHTML(e){const{Tools:t}=this.Editor,o=d.make("DIV");return o.innerHTML=e,this.getNodes(o).map(s=>{let r,a=t.defaultTool,l=!1;switch(s.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:r=d.make("div"),r.appendChild(s);break;case Node.ELEMENT_NODE:r=s,l=!0,this.toolsTags[r.tagName]&&(a=this.toolsTags[r.tagName].tool);break}const{tags:c}=a.pasteConfig||{tags:[]},u=c.reduce((g,f)=>(this.collectTagNames(f).forEach(O=>{const S=N(f)?f[O]:null;g[O.toLowerCase()]=S||{}}),g),{}),h=Object.assign({},u,a.baseSanitizeConfig);if(r.tagName.toLowerCase()==="table"){const g=q(r.outerHTML,h);r=d.make("div",void 0,{innerHTML:g}).firstChild}else r.innerHTML=q(r.innerHTML,h);const p=this.composePasteEvent("tag",{data:r});return{content:r,isBlock:l,tool:a.name,event:p}}).filter(s=>{const r=d.isEmpty(s.content),a=d.isSingleTag(s.content);return!r||a})}processPlain(e){const{defaultBlock:t}=this.config;if(!e)return[];const o=t;return e.split(/\r?\n/).filter(i=>i.trim()).map(i=>{const s=d.make("div");s.textContent=i;const r=this.composePasteEvent("tag",{data:s});return{content:s,tool:o,isBlock:!1,event:r}})}async processSingleBlock(e){const{Caret:t,BlockManager:o}=this.Editor,{currentBlock:i}=o;if(!i||e.tool!==i.name||!d.containsOnlyInlineElements(e.content.innerHTML)){this.insertBlock(e,(i==null?void 0:i.tool.isDefault)&&i.isEmpty);return}t.insertContentAtCaretPosition(e.content.innerHTML)}async processInlinePaste(e){const{BlockManager:t,Caret:o}=this.Editor,{content:i}=e;if(t.currentBlock&&t.currentBlock.tool.isDefault&&i.textContent.length{const s=i.pattern.exec(e);return s?e===s.shift():!1});return t?{event:this.composePasteEvent("pattern",{key:t.key,data:e}),tool:t.tool.name}:void 0}insertBlock(e,t=!1){const{BlockManager:o,Caret:i}=this.Editor,{currentBlock:s}=o;let r;if(t&&s&&s.isEmpty){r=o.paste(e.tool,e.event,!0),i.setToBlock(r,i.positions.END);return}r=o.paste(e.tool,e.event),i.setToBlock(r,i.positions.END)}insertEditorJSData(e){const{BlockManager:t,Caret:o,Tools:i}=this.Editor;dt(e,r=>i.blockTools.get(r).sanitizeConfig).forEach(({tool:r,data:a},l)=>{let c=!1;l===0&&(c=t.currentBlock&&t.currentBlock.tool.isDefault&&t.currentBlock.isEmpty);const u=t.insert({tool:r,data:a,replace:c});o.setToBlock(u,o.positions.END)})}processElementNode(e,t,o){const i=Object.keys(this.toolsTags),s=e,{tool:r}=this.toolsTags[s.tagName]||{},a=this.tagsByTool[r==null?void 0:r.name]||[],l=i.includes(s.tagName),c=d.blockElements.includes(s.tagName.toLowerCase()),u=Array.from(s.children).some(({tagName:p})=>i.includes(p)&&!a.includes(p)),h=Array.from(s.children).some(({tagName:p})=>d.blockElements.includes(p.toLowerCase()));if(!c&&!l&&!u)return o.appendChild(s),[...t,o];if(l&&!u||c&&!h&&!u)return[...t,o,s]}getNodes(e){const t=Array.from(e.childNodes);let o;const i=(s,r)=>{if(d.isEmpty(r)&&!d.isSingleTag(r))return s;const a=s[s.length-1];let l=new DocumentFragment;switch(a&&d.isFragment(a)&&(l=s.pop()),r.nodeType){case Node.ELEMENT_NODE:if(o=this.processElementNode(r,s,l),o)return o;break;case Node.TEXT_NODE:return l.appendChild(r),[...s,l];default:return[...s,l]}return[...s,...Array.from(r.childNodes).reduce(i,[])]};return t.reduce(i,[])}composePasteEvent(e,t){return new CustomEvent(e,{detail:t})}};Ln.PATTERN_PROCESSING_MAX_LENGTH=450;let ra=Ln;class aa extends E{constructor(){super(...arguments),this.toolsDontSupportReadOnly=[],this.readOnlyEnabled=!1}get isEnabled(){return this.readOnlyEnabled}async prepare(){const{Tools:e}=this.Editor,{blockTools:t}=e,o=[];Array.from(t.entries()).forEach(([i,s])=>{s.isReadOnlySupported||o.push(i)}),this.toolsDontSupportReadOnly=o,this.config.readOnly&&o.length>0&&this.throwCriticalError(),this.toggle(this.config.readOnly,!0)}async toggle(e=!this.readOnlyEnabled,t=!1){e&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError();const o=this.readOnlyEnabled;this.readOnlyEnabled=e;for(const s in this.Editor)this.Editor[s].toggleReadOnly&&this.Editor[s].toggleReadOnly(e);if(o===e)return this.readOnlyEnabled;if(t)return this.readOnlyEnabled;this.Editor.ModificationsObserver.disable();const i=await this.Editor.Saver.save();return await this.Editor.BlockManager.clear(),await this.Editor.Renderer.render(i.blocks),this.Editor.ModificationsObserver.enable(),this.readOnlyEnabled}throwCriticalError(){throw new Oo(`To enable read-only mode all connected tools should support it. Tools ${this.toolsDontSupportReadOnly.join(", ")} don't support read-only mode.`)}}class Ie extends E{constructor(){super(...arguments),this.isRectSelectionActivated=!1,this.SCROLL_SPEED=3,this.HEIGHT_OF_SCROLL_ZONE=40,this.BOTTOM_SCROLL_ZONE=1,this.TOP_SCROLL_ZONE=2,this.MAIN_MOUSE_BUTTON=0,this.mousedown=!1,this.isScrolling=!1,this.inScrollZone=null,this.startX=0,this.startY=0,this.mouseX=0,this.mouseY=0,this.stackOfSelected=[],this.listenerIds=[]}static get CSS(){return{overlay:"codex-editor-overlay",overlayContainer:"codex-editor-overlay__container",rect:"codex-editor-overlay__rectangle",topScrollZone:"codex-editor-overlay__scroll-zone--top",bottomScrollZone:"codex-editor-overlay__scroll-zone--bottom"}}prepare(){this.enableModuleBindings()}startSelection(e,t){const o=document.elementFromPoint(e-window.pageXOffset,t-window.pageYOffset);o.closest(`.${this.Editor.Toolbar.CSS.toolbar}`)||(this.Editor.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[]);const s=[`.${R.CSS.content}`,`.${this.Editor.Toolbar.CSS.toolbar}`,`.${this.Editor.InlineToolbar.CSS.inlineToolbar}`],r=o.closest("."+this.Editor.UI.CSS.editorWrapper),a=s.some(l=>!!o.closest(l));!r||a||(this.mousedown=!0,this.startX=e,this.startY=t)}endSelection(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle.style.display="none"}isRectActivated(){return this.isRectSelectionActivated}clearSelection(){this.isRectSelectionActivated=!1}enableModuleBindings(){const{container:e}=this.genHTML();this.listeners.on(e,"mousedown",t=>{this.processMouseDown(t)},!1),this.listeners.on(document.body,"mousemove",ot(t=>{this.processMouseMove(t)},10),{passive:!0}),this.listeners.on(document.body,"mouseleave",()=>{this.processMouseLeave()}),this.listeners.on(window,"scroll",ot(t=>{this.processScroll(t)},10),{passive:!0}),this.listeners.on(document.body,"mouseup",()=>{this.processMouseUp()},!1)}processMouseDown(e){if(e.button!==this.MAIN_MOUSE_BUTTON)return;e.target.closest(d.allInputsSelector)!==null||this.startSelection(e.pageX,e.pageY)}processMouseMove(e){this.changingRectangle(e),this.scrollByZones(e.clientY)}processMouseLeave(){this.clearSelection(),this.endSelection()}processScroll(e){this.changingRectangle(e)}processMouseUp(){this.clearSelection(),this.endSelection()}scrollByZones(e){if(this.inScrollZone=null,e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-e<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),!this.inScrollZone){this.isScrolling=!1;return}this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0)}genHTML(){const{UI:e}=this.Editor,t=e.nodes.holder.querySelector("."+e.CSS.editorWrapper),o=d.make("div",Ie.CSS.overlay,{}),i=d.make("div",Ie.CSS.overlayContainer,{}),s=d.make("div",Ie.CSS.rect,{});return i.appendChild(s),o.appendChild(i),t.appendChild(o),this.overlayRectangle=s,{container:t,overlay:o}}scrollVertical(e){if(!(this.inScrollZone&&this.mousedown))return;const t=window.pageYOffset;window.scrollBy(0,e),this.mouseY+=window.pageYOffset-t,setTimeout(()=>{this.scrollVertical(e)},0)}changingRectangle(e){if(!this.mousedown)return;e.pageY!==void 0&&(this.mouseX=e.pageX,this.mouseY=e.pageY);const{rightPos:t,leftPos:o,index:i}=this.genInfoForMouseSelection(),s=this.startX>t&&this.mouseX>t,r=this.startX=this.startY?(this.overlayRectangle.style.top=`${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.bottom=`calc(100% - ${this.mouseY-window.pageYOffset}px`):(this.overlayRectangle.style.bottom=`calc(100% - ${this.startY-window.pageYOffset}px`,this.overlayRectangle.style.top=`${this.mouseY-window.pageYOffset}px`),this.mouseX>=this.startX?(this.overlayRectangle.style.left=`${this.startX-window.pageXOffset}px`,this.overlayRectangle.style.right=`calc(100% - ${this.mouseX-window.pageXOffset}px`):(this.overlayRectangle.style.right=`calc(100% - ${this.startX-window.pageXOffset}px`,this.overlayRectangle.style.left=`${this.mouseX-window.pageXOffset}px`)}genInfoForMouseSelection(){const t=document.body.offsetWidth/2,o=this.mouseY-window.pageYOffset,i=document.elementFromPoint(t,o),s=this.Editor.BlockManager.getBlockByChildNode(i);let r;s!==void 0&&(r=this.Editor.BlockManager.blocks.findIndex(h=>h.holder===s.holder));const a=this.Editor.BlockManager.lastBlock.holder.querySelector("."+R.CSS.content),l=Number.parseInt(window.getComputedStyle(a).width,10)/2,c=t-l,u=t+l;return{index:r,leftPos:c,rightPos:u}}addBlockInSelection(e){this.rectCrossesBlocks&&this.Editor.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}trySelectNextBlock(e){const t=this.stackOfSelected[this.stackOfSelected.length-1]===e,o=this.stackOfSelected.length,i=1,s=-1,r=0;if(t)return;const a=this.stackOfSelected[o-1]-this.stackOfSelected[o-2]>0;let l=r;o>1&&(l=a?i:s);const c=e>this.stackOfSelected[o-1]&&l===i,u=ethis.stackOfSelected[o-1]||this.stackOfSelected[o-1]===void 0)){let v=this.stackOfSelected[o-1]+1||e;for(v;v<=e;v++)this.addBlockInSelection(v);return}if(!p&&e=e;v--)this.addBlockInSelection(v);return}if(!p)return;let g=o-1,f;for(e>this.stackOfSelected[o-1]?f=()=>e>this.stackOfSelected[g]:f=()=>e{const{Tools:o,BlockManager:i}=this.Editor;if(e.length===0)i.insert();else{const s=e.map(({type:r,data:a,tunes:l,id:c})=>{o.available.has(r)===!1&&(X(`Tool «${r}» is not found. Check 'tools' property at the Editor.js config.`,"warn"),a=this.composeStubDataForTool(r,a,c),r=o.stubTool);let u;try{u=i.composeBlock({id:c,tool:r,data:a,tunes:l})}catch(h){T(`Block «${r}» skipped because of plugins error`,"error",{data:a,error:h}),a=this.composeStubDataForTool(r,a,c),r=o.stubTool,u=i.composeBlock({id:c,tool:r,data:a,tunes:l})}return u});i.insertMany(s)}window.requestIdleCallback(()=>{t()},{timeout:2e3})})}composeStubDataForTool(e,t,o){const{Tools:i}=this.Editor;let s=e;if(i.unavailable.has(e)){const r=i.unavailable.get(e).toolbox;r!==void 0&&r[0].title!==void 0&&(s=r[0].title)}return{savedData:{id:o,type:e,data:t},title:s}}}class ca extends E{async save(){const{BlockManager:e,Tools:t}=this.Editor,o=e.blocks,i=[];try{o.forEach(a=>{i.push(this.getSavedData(a))});const s=await Promise.all(i),r=await dt(s,a=>t.blockTools.get(a).sanitizeConfig);return this.makeOutput(r)}catch(s){X("Saving failed due to the Error %o","error",s)}}async getSavedData(e){const t=await e.save(),o=t&&await e.validate(t.data);return{...t,isValid:o}}makeOutput(e){const t=[];return e.forEach(({id:o,tool:i,data:s,tunes:r,isValid:a})=>{if(!a){T(`Block «${i}» skipped because saved data is invalid`);return}if(i===this.Editor.Tools.stubTool){t.push(s);return}const l={id:o,type:i,data:s,...!V(r)&&{tunes:r}};t.push(l)}),{time:+new Date,blocks:t,version:"2.31.0-rc.7"}}}(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".ce-paragraph{line-height:1.6em;outline:none}.ce-block:only-of-type .ce-paragraph[data-placeholder-active]:empty:before,.ce-block:only-of-type .ce-paragraph[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active)}.ce-paragraph p:first-of-type{margin-top:0}.ce-paragraph p:last-of-type{margin-bottom:0}")),document.head.appendChild(n)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const da='';function ua(n){const e=document.createElement("div");e.innerHTML=n.trim();const t=document.createDocumentFragment();return t.append(...Array.from(e.childNodes)),t}/** + * Base Paragraph Block for the Editor.js. + * Represents a regular text block + * + * @author CodeX (team@codex.so) + * @copyright CodeX 2018 + * @license The MIT License (MIT) + */class po{static get DEFAULT_PLACEHOLDER(){return""}constructor({data:e,config:t,api:o,readOnly:i}){this.api=o,this.readOnly=i,this._CSS={block:this.api.styles.block,wrapper:"ce-paragraph"},this.readOnly||(this.onKeyUp=this.onKeyUp.bind(this)),this._placeholder=t.placeholder?t.placeholder:po.DEFAULT_PLACEHOLDER,this._data=e??{},this._element=null,this._preserveBlank=t.preserveBlank??!1}onKeyUp(e){if(e.code!=="Backspace"&&e.code!=="Delete"||!this._element)return;const{textContent:t}=this._element;t===""&&(this._element.innerHTML="")}drawView(){const e=document.createElement("DIV");return e.classList.add(this._CSS.wrapper,this._CSS.block),e.contentEditable="false",e.dataset.placeholderActive=this.api.i18n.t(this._placeholder),this._data.text&&(e.innerHTML=this._data.text),this.readOnly||(e.contentEditable="true",e.addEventListener("keyup",this.onKeyUp)),e}render(){return this._element=this.drawView(),this._element}merge(e){if(!this._element)return;this._data.text+=e.text;const t=ua(e.text);this._element.appendChild(t),this._element.normalize()}validate(e){return!(e.text.trim()===""&&!this._preserveBlank)}save(e){return{text:e.innerHTML}}onPaste(e){const t={text:e.detail.data.innerHTML};this._data=t,window.requestAnimationFrame(()=>{this._element&&(this._element.innerHTML=this._data.text||"")})}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{text:{br:!0}}}static get isReadOnlySupported(){return!0}static get pasteConfig(){return{tags:["P"]}}static get toolbox(){return{icon:da,title:"Text"}}}class fo{constructor(){this.commandName="bold"}static get sanitize(){return{b:{}}}render(){return{icon:Hi,name:"bold",onActivate:()=>{document.execCommand(this.commandName)},isActive:()=>document.queryCommandState(this.commandName)}}get shortcut(){return"CMD+B"}}fo.isInline=!0,fo.title="Bold";class go{constructor(){this.commandName="italic",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--italic"},this.nodes={button:null}}static get sanitize(){return{i:{}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=Xi,this.nodes.button}surround(){document.execCommand(this.commandName)}checkState(){const e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}get shortcut(){return"CMD+I"}}go.isInline=!0,go.title="Italic";class mo{constructor({api:e}){this.commandLink="createLink",this.commandUnlink="unlink",this.ENTER_KEY=13,this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--link",buttonUnlink:"ce-inline-tool--unlink",input:"ce-inline-tool-input",inputShowed:"ce-inline-tool-input--showed"},this.nodes={button:null,input:null},this.inputOpened=!1,this.toolbar=e.toolbar,this.inlineToolbar=e.inlineToolbar,this.notifier=e.notifier,this.i18n=e.i18n,this.selection=new b}static get sanitize(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}render(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=zo,this.nodes.button}renderActions(){return this.nodes.input=document.createElement("input"),this.nodes.input.placeholder=this.i18n.t("Add a link"),this.nodes.input.enterKeyHint="done",this.nodes.input.classList.add(this.CSS.input),this.nodes.input.addEventListener("keydown",e=>{e.keyCode===this.ENTER_KEY&&this.enterPressed(e)}),this.nodes.input}surround(e){if(e){this.inputOpened?(this.selection.restore(),this.selection.removeFakeBackground()):(this.selection.setFakeBackground(),this.selection.save());const t=this.selection.findParentTag("A");if(t){this.selection.expandToTag(t),this.unlink(),this.closeActions(),this.checkState(),this.toolbar.close();return}}this.toggleActions()}checkState(){const e=this.selection.findParentTag("A");if(e){this.nodes.button.innerHTML=Gi,this.nodes.button.classList.add(this.CSS.buttonUnlink),this.nodes.button.classList.add(this.CSS.buttonActive),this.openActions();const t=e.getAttribute("href");this.nodes.input.value=t!=="null"?t:"",this.selection.save()}else this.nodes.button.innerHTML=zo,this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive);return!!e}clear(){this.closeActions()}get shortcut(){return"CMD+K"}toggleActions(){this.inputOpened?this.closeActions(!1):this.openActions(!0)}openActions(e=!1){this.nodes.input.classList.add(this.CSS.inputShowed),e&&this.nodes.input.focus(),this.inputOpened=!0}closeActions(e=!0){if(this.selection.isFakeBackgroundEnabled){const t=new b;t.save(),this.selection.restore(),this.selection.removeFakeBackground(),t.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),this.nodes.input.value="",e&&this.selection.clearSaved(),this.inputOpened=!1}enterPressed(e){let t=this.nodes.input.value||"";if(!t.trim()){this.selection.restore(),this.unlink(),e.preventDefault(),this.closeActions();return}if(!this.validateURL(t)){this.notifier.show({message:"Pasted link is not valid.",style:"error"}),T("Incorrect Link pasted","warn",t);return}t=this.prepareLink(t),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(t),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),this.inlineToolbar.close()}validateURL(e){return!/\s/.test(e)}prepareLink(e){return e=e.trim(),e=this.addProtocol(e),e}addProtocol(e){if(/^(\w+):(\/\/)?/.test(e))return e;const t=/^\/[^/\s]/.test(e),o=e.substring(0,1)==="#",i=/^\/\/[^/\s]/.test(e);return!t&&!o&&!i&&(e="http://"+e),e}insertLink(e){const t=this.selection.findParentTag("A");t&&this.selection.expandToTag(t),document.execCommand(this.commandLink,!1,e)}unlink(){document.execCommand(this.commandUnlink)}}mo.isInline=!0,mo.title="Link";class Pn{constructor({api:e}){this.i18nAPI=e.i18n,this.blocksAPI=e.blocks,this.selectionAPI=e.selection,this.toolsAPI=e.tools,this.caretAPI=e.caret}async render(){const e=b.get(),t=this.blocksAPI.getBlockByElement(e.anchorNode);if(t===void 0)return[];const o=this.toolsAPI.getBlockTools(),i=await Po(t,o);if(i.length===0)return[];const s=i.reduce((c,u)=>{var h;return(h=u.toolbox)==null||h.forEach(p=>{c.push({icon:p.icon,title:H.t(W.toolNames,p.title),name:u.name,closeOnActivate:!0,onActivate:async()=>{const g=await this.blocksAPI.convert(t.id,u.name,p.data);this.caretAPI.setToBlock(g,"end")}})}),c},[]),r=await t.getActiveToolboxEntry(),a=r!==void 0?r.icon:Uo,l=!ge();return{icon:a,name:"convert-to",hint:{title:this.i18nAPI.t("Convert to")},children:{searchable:l,items:s,onOpen:()=>{l&&(this.selectionAPI.setFakeBackground(),this.selectionAPI.save())},onClose:()=>{l&&(this.selectionAPI.restore(),this.selectionAPI.removeFakeBackground())}}}}}Pn.isInline=!0;class Nn{constructor({data:e,api:t}){this.CSS={wrapper:"ce-stub",info:"ce-stub__info",title:"ce-stub__title",subtitle:"ce-stub__subtitle"},this.api=t,this.title=e.title||this.api.i18n.t("Error"),this.subtitle=this.api.i18n.t("The block can not be displayed correctly."),this.savedData=e.savedData,this.wrapper=this.make()}render(){return this.wrapper}save(){return this.savedData}make(){const e=d.make("div",this.CSS.wrapper),t=Ji,o=d.make("div",this.CSS.info),i=d.make("div",this.CSS.title,{textContent:this.title}),s=d.make("div",this.CSS.subtitle,{textContent:this.subtitle});return e.innerHTML=t,o.appendChild(i),o.appendChild(s),e.appendChild(o),e}}Nn.isReadOnlySupported=!0;class ha extends xt{constructor(){super(...arguments),this.type=ce.Inline}get title(){return this.constructable[He.Title]}create(){return new this.constructable({api:this.api,config:this.settings})}get isReadOnlySupported(){return this.constructable[He.IsReadOnlySupported]??!1}}class pa extends xt{constructor(){super(...arguments),this.type=ce.Tune}create(e,t){return new this.constructable({api:this.api,config:this.settings,block:t,data:e})}}class F extends Map{get blockTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isBlock());return new F(e)}get inlineTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInline());return new F(e)}get blockTunes(){const e=Array.from(this.entries()).filter(([,t])=>t.isTune());return new F(e)}get internalTools(){const e=Array.from(this.entries()).filter(([,t])=>t.isInternal);return new F(e)}get externalTools(){const e=Array.from(this.entries()).filter(([,t])=>!t.isInternal);return new F(e)}}var fa=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,Rn=(n,e,t,o)=>{for(var i=o>1?void 0:o?ga(e,t):e,s=n.length-1,r;s>=0;s--)(r=n[s])&&(i=(o?r(e,t,i):r(i))||i);return o&&i&&fa(e,t,i),i};class bo extends xt{constructor(){super(...arguments),this.type=ce.Block,this.inlineTools=new F,this.tunes=new F}create(e,t,o){return new this.constructable({data:e,block:t,readOnly:o,api:this.api,config:this.settings})}get isReadOnlySupported(){return this.constructable[ve.IsReadOnlySupported]===!0}get isLineBreaksEnabled(){return this.constructable[ve.IsEnabledLineBreaks]}get toolbox(){const e=this.constructable[ve.Toolbox],t=this.config[je.Toolbox];if(!V(e)&&t!==!1)return t?Array.isArray(e)?Array.isArray(t)?t.map((o,i)=>{const s=e[i];return s?{...s,...o}:o}):[t]:Array.isArray(t)?t:[{...e,...t}]:Array.isArray(e)?e:[e]}get conversionConfig(){return this.constructable[ve.ConversionConfig]}get enabledInlineTools(){return this.config[je.EnabledInlineTools]||!1}get enabledBlockTunes(){return this.config[je.EnabledBlockTunes]}get pasteConfig(){return this.constructable[ve.PasteConfig]??{}}get sanitizeConfig(){const e=super.sanitizeConfig,t=this.baseSanitizeConfig;if(V(e))return t;const o={};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const s=e[i];N(s)?o[i]=Object.assign({},t,s):o[i]=s}return o}get baseSanitizeConfig(){const e={};return Array.from(this.inlineTools.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),Array.from(this.tunes.values()).forEach(t=>Object.assign(e,t.sanitizeConfig)),e}}Rn([fe],bo.prototype,"sanitizeConfig",1),Rn([fe],bo.prototype,"baseSanitizeConfig",1);class ma{constructor(e,t,o){this.api=o,this.config=e,this.editorConfig=t}get(e){const{class:t,isInternal:o=!1,...i}=this.config[e],s=this.getConstructor(t),r=t[Et.IsTune];return new s({name:e,constructable:t,config:i,api:this.api.getMethodsForTool(e,r),isDefault:e===this.editorConfig.defaultBlock,defaultPlaceholder:this.editorConfig.placeholder,isInternal:o})}getConstructor(e){switch(!0){case e[He.IsInline]:return ha;case e[Et.IsTune]:return pa;default:return bo}}}class Dn{constructor({api:e}){this.CSS={animation:"wobble"},this.api=e}render(){return{icon:$i,title:this.api.i18n.t("Move down"),onActivate:()=>this.handleClick(),name:"move-down"}}handleClick(){const e=this.api.blocks.getCurrentBlockIndex(),t=this.api.blocks.getBlockByIndex(e+1);if(!t)throw new Error("Unable to move Block down since it is already the last");const o=t.holder,i=o.getBoundingClientRect();let s=Math.abs(window.innerHeight-o.offsetHeight);i.topthis.handleClick()}}}handleClick(){this.api.blocks.delete()}}Fn.isTune=!0;class jn{constructor({api:e}){this.CSS={animation:"wobble"},this.api=e}render(){return{icon:Wi,title:this.api.i18n.t("Move up"),onActivate:()=>this.handleClick(),name:"move-up"}}handleClick(){const e=this.api.blocks.getCurrentBlockIndex(),t=this.api.blocks.getBlockByIndex(e),o=this.api.blocks.getBlockByIndex(e-1);if(e===0||!t||!o)throw new Error("Unable to move Block up since it is already the first");const i=t.holder,s=o.holder,r=i.getBoundingClientRect(),a=s.getBoundingClientRect();let l;a.top>0?l=Math.abs(r.top)-Math.abs(a.top):l=Math.abs(r.top)+a.height,window.scrollBy(0,-1*l),this.api.blocks.move(e-1),this.api.toolbar.toggleBlockSettings(!0)}}jn.isTune=!0;var ba=Object.defineProperty,va=Object.getOwnPropertyDescriptor,ka=(n,e,t,o)=>{for(var i=o>1?void 0:o?va(e,t):e,s=n.length-1,r;s>=0;s--)(r=n[s])&&(i=(o?r(e,t,i):r(i))||i);return o&&i&&ba(e,t,i),i};class Hn extends E{constructor(){super(...arguments),this.stubTool="stub",this.toolsAvailable=new F,this.toolsUnavailable=new F}get available(){return this.toolsAvailable}get unavailable(){return this.toolsUnavailable}get inlineTools(){return this.available.inlineTools}get blockTools(){return this.available.blockTools}get blockTunes(){return this.available.blockTunes}get defaultTool(){return this.blockTools.get(this.config.defaultBlock)}get internal(){return this.available.internalTools}async prepare(){if(this.validateTools(),this.config.tools=nt({},this.internalTools,this.config.tools),!Object.prototype.hasOwnProperty.call(this.config,"tools")||Object.keys(this.config.tools).length===0)throw Error("Can't start without tools");const e=this.prepareConfig();this.factory=new ma(e,this.config,this.Editor.API);const t=this.getListOfPrepareFunctions(e);if(t.length===0)return Promise.resolve();await Zn(t,o=>{this.toolPrepareMethodSuccess(o)},o=>{this.toolPrepareMethodFallback(o)}),this.prepareBlockTools()}getAllInlineToolsSanitizeConfig(){const e={};return Array.from(this.inlineTools.values()).forEach(t=>{Object.assign(e,t.sanitizeConfig)}),e}destroy(){Object.values(this.available).forEach(async e=>{M(e.reset)&&await e.reset()})}get internalTools(){return{convertTo:{class:Pn,isInternal:!0},link:{class:mo,isInternal:!0},bold:{class:fo,isInternal:!0},italic:{class:go,isInternal:!0},paragraph:{class:po,inlineToolbar:!0,isInternal:!0},stub:{class:Nn,isInternal:!0},moveUp:{class:jn,isInternal:!0},delete:{class:Fn,isInternal:!0},moveDown:{class:Dn,isInternal:!0}}}toolPrepareMethodSuccess(e){const t=this.factory.get(e.toolName);if(t.isInline()){const i=["render"].filter(s=>!t.create()[s]);if(i.length){T(`Incorrect Inline Tool: ${t.name}. Some of required methods is not implemented %o`,"warn",i),this.toolsUnavailable.set(t.name,t);return}}this.toolsAvailable.set(t.name,t)}toolPrepareMethodFallback(e){this.toolsUnavailable.set(e.toolName,this.factory.get(e.toolName))}getListOfPrepareFunctions(e){const t=[];return Object.entries(e).forEach(([o,i])=>{t.push({function:M(i.class.prepare)?i.class.prepare:()=>{},data:{toolName:o,config:i.config}})}),t}prepareBlockTools(){Array.from(this.blockTools.values()).forEach(e=>{this.assignInlineToolsToBlockTool(e),this.assignBlockTunesToBlockTool(e)})}assignInlineToolsToBlockTool(e){if(this.config.inlineToolbar!==!1){if(e.enabledInlineTools===!0){e.inlineTools=new F(Array.isArray(this.config.inlineToolbar)?this.config.inlineToolbar.map(t=>[t,this.inlineTools.get(t)]):Array.from(this.inlineTools.entries()));return}Array.isArray(e.enabledInlineTools)&&(e.inlineTools=new F(["convertTo",...e.enabledInlineTools].map(t=>[t,this.inlineTools.get(t)])))}}assignBlockTunesToBlockTool(e){if(e.enabledBlockTunes!==!1){if(Array.isArray(e.enabledBlockTunes)){const t=new F(e.enabledBlockTunes.map(o=>[o,this.blockTunes.get(o)]));e.tunes=new F([...t,...this.blockTunes.internalTools]);return}if(Array.isArray(this.config.tunes)){const t=new F(this.config.tunes.map(o=>[o,this.blockTunes.get(o)]));e.tunes=new F([...t,...this.blockTunes.internalTools]);return}e.tunes=this.blockTunes.internalTools}}validateTools(){for(const e in this.config.tools)if(Object.prototype.hasOwnProperty.call(this.config.tools,e)){if(e in this.internalTools)return;const t=this.config.tools[e];if(!M(t)&&!M(t.class))throw Error(`Tool «${e}» must be a constructor function or an object with function in the «class» property`)}}prepareConfig(){const e={};for(const t in this.config.tools)N(this.config.tools[t])?e[t]=this.config.tools[t]:e[t]={class:this.config.tools[t]};return e}}ka([fe],Hn.prototype,"getAllInlineToolsSanitizeConfig",1);const ya=`:root{--selectionColor: #e1f2ff;--inlineSelectionColor: #d4ecff;--bg-light: #eff2f5;--grayText: #707684;--color-dark: #1D202B;--color-active-icon: #388AE5;--color-gray-border: rgba(201, 201, 204, .48);--content-width: 650px;--narrow-mode-right-padding: 50px;--toolbox-buttons-size: 26px;--toolbox-buttons-size--mobile: 36px;--icon-size: 20px;--icon-size--mobile: 28px;--block-padding-vertical: .4em;--color-line-gray: #EFF0F1 }.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide{display:none}.codex-editor__redactor [contenteditable]:empty:after{content:"\\feff"}@media (min-width: 651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:#2eaadc33;border:1px solid transparent}.codex-editor svg{max-height:100%}.codex-editor path{stroke:currentColor}.codex-editor ::-moz-selection{background-color:#d4ecff}.codex-editor ::selection{background-color:#d4ecff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}.ce-scroll-locked{overflow:hidden}.ce-scroll-locked--hard{overflow:hidden;top:calc(-1 * var(--window-scroll-offset));position:fixed;width:100%}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,top;display:none}.ce-toolbar--opened{display:block}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}.ce-toolbar__plus{color:#1d202b;cursor:pointer;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0}@media (max-width: 650px){.ce-toolbar__plus{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__plus:hover{background-color:#eff2f5}}.ce-toolbar__plus--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}@media (max-width: 650px){.ce-toolbar__plus{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__plus--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__plus--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__actions{position:absolute;right:100%;opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;padding-right:5px}.ce-toolbar__actions--opened{opacity:1}@media (max-width: 650px){.ce-toolbar__actions{right:auto}}.ce-toolbar__settings-btn{color:#1d202b;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;margin-left:3px;cursor:pointer;user-select:none}@media (max-width: 650px){.ce-toolbar__settings-btn{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__settings-btn:hover{background-color:#eff2f5}}.ce-toolbar__settings-btn--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 651px){.ce-toolbar__settings-btn{width:24px}}.ce-toolbar__settings-btn--hidden{display:none}@media (max-width: 650px){.ce-toolbar__settings-btn{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__settings-btn--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__settings-btn--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__plus svg,.ce-toolbar__settings-btn svg{width:24px;height:24px}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbox .ce-popover{right:0;left:auto;left:initial}}.ce-inline-toolbar{--y-offset: 8px;--color-background-icon-active: rgba(56, 138, 229, .1);--color-text-icon-active: #388AE5;--color-text-primary: black;position:absolute;visibility:hidden;-webkit-transition:opacity .25s ease;transition:opacity .25s ease;will-change:opacity,left,top;top:0;left:0;z-index:3;opacity:1;visibility:visible}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;padding:0 6px}.ce-inline-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown{display:-webkit-box;display:-ms-flexbox;display:flex;padding:6px;margin:0 6px 0 -6px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid rgba(201,201,204,.48);-webkit-box-sizing:border-box;box-sizing:border-box}@media (hover: hover){.ce-inline-toolbar__dropdown:hover{background:#eff2f5}}.ce-inline-toolbar__dropdown--hidden{display:none}.ce-inline-toolbar__dropdown-content,.ce-inline-toolbar__dropdown-arrow{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown-content svg,.ce-inline-toolbar__dropdown-arrow svg{width:20px;height:20px}.ce-inline-toolbar__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}.ce-inline-tool{color:var(--color-text-primary);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:0;border-radius:4px;line-height:normal;height:100%;padding:0;width:28px;background-color:transparent;cursor:pointer}@media (max-width: 650px){.ce-inline-tool{width:36px;height:36px}}@media (hover: hover){.ce-inline-tool:hover{background-color:#f8f8f8}}.ce-inline-tool svg{display:block;width:20px;height:20px}@media (max-width: 650px){.ce-inline-tool svg{width:28px;height:28px}}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block;margin-bottom:-1px}.ce-inline-tool-input{background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;font-size:14px;line-height:22px;outline:none;margin:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-weight:500;-webkit-appearance:none;font-family:inherit}@media (max-width: 650px){.ce-inline-tool-input{font-size:15px;font-weight:500}}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input::-moz-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-inline-tool--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.ce-block{-webkit-animation:fade-in .3s ease;animation:fade-in .3s ease;-webkit-animation-fill-mode:none;animation-fill-mode:none;-webkit-animation-fill-mode:initial;animation-fill-mode:initial}.ce-block:first-of-type{margin-top:0}.ce-block--selected .ce-block__content{background:#e1f2ff}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content img,.ce-block--selected .ce-block__content .ce-stub{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto;-webkit-transition:background-color .15s ease;transition:background-color .15s ease}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #388AE5;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:"";position:absolute;top:100%;height:1px;width:100%;color:#388ae5;background:repeating-linear-gradient(90deg,#388AE5,#388AE5 1px,#fff 1px,#fff 6px)}.ce-block a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.cdx-block{padding:.4em 0}.cdx-block::-webkit-input-placeholder{line-height:normal!important}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px #232c480f;border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-input[data-placeholder]:before{position:static!important}.cdx-input[data-placeholder]:before{display:inline-block;width:0;white-space:nowrap;pointer-events:none}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;min-width:26px;min-height:26px}.cdx-settings-button--focused{background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button--active{color:#388ae5}.cdx-settings-button svg{width:auto;height:auto}@media (max-width: 650px){.cdx-settings-button svg{width:28px;height:28px}}@media (max-width: 650px){.cdx-settings-button{width:36px;height:36px;border-radius:8px}}@media (hover: hover){.cdx-settings-button:hover{background-color:#eff2f5}}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:"";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s infinite linear;animation:cdxRotation 1.2s infinite linear}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px #121e390a;color:#707684;text-align:center;cursor:pointer}@media (hover: hover){.cdx-button:hover{background:#FBFCFE;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px #121e3914}}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 18px;margin:10px 0;border-radius:10px;background:#eff2f5;border:1px solid #EFF0F1;color:#707684;font-size:14px}.ce-stub svg{width:20px;height:20px}.ce-stub__info{margin-left:14px}.ce-stub__title{font-weight:500;text-transform:capitalize}.codex-editor.codex-editor--rtl{direction:rtl}.codex-editor.codex-editor--rtl .cdx-list{padding-left:0;padding-right:40px}.codex-editor.codex-editor--rtl .ce-toolbar__plus{right:-26px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-26px}@media (max-width: 650px){.codex-editor.codex-editor--rtl .ce-toolbar__actions{margin-left:0;margin-right:auto;padding-right:0;padding-left:10px}}.codex-editor.codex-editor--rtl .ce-settings{left:5px;right:auto}.codex-editor.codex-editor--rtl .ce-settings:before{right:auto;left:25px}.codex-editor.codex-editor--rtl .ce-settings__button:not(:nth-child(3n+3)){margin-left:3px;margin-right:0}.codex-editor.codex-editor--rtl .ce-conversion-tool__icon{margin-right:0;margin-left:10px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown{border-right:0px solid transparent;border-left:1px solid rgba(201,201,204,.48);margin:0 -6px 0 6px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown .icon--toggler-down{margin-left:0;margin-right:4px}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0;right:5px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}.cdx-search-field{--icon-margin-right: 10px;background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-search-field__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--icon-margin-right)}.cdx-search-field__icon svg{width:20px;height:20px;color:#707684}.cdx-search-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - 26px - var(--icon-margin-right))}.cdx-search-field__input::-webkit-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-moz-placeholder{color:#707684;font-weight:500}.cdx-search-field__input:-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::placeholder{color:#707684;font-weight:500}.ce-popover{--border-radius: 6px;--width: 200px;--max-height: 270px;--padding: 6px;--offset-from-target: 8px;--color-border: #EFF0F1;--color-shadow: rgba(13, 20, 33, .1);--color-background: white;--color-text-primary: black;--color-text-secondary: #707684;--color-border-icon: rgba(201, 201, 204, .48);--color-border-icon-disabled: #EFF0F1;--color-text-icon-active: #388AE5;--color-background-icon-active: rgba(56, 138, 229, .1);--color-background-item-focus: rgba(34, 186, 255, .08);--color-shadow-item-focus: rgba(7, 161, 227, .08);--color-background-item-hover: #F8F8F8;--color-background-item-confirm: #E24A4A;--color-background-item-confirm-hover: #CE4343;--popover-top: calc(100% + var(--offset-from-target));--popover-left: 0;--nested-popover-overlap: 4px;--icon-size: 20px;--item-padding: 3px;--item-height: calc(var(--icon-size) + 2 * var(--item-padding))}.ce-popover__container{min-width:var(--width);width:var(--width);max-height:var(--max-height);border-radius:var(--border-radius);overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0px 3px 15px -3px var(--color-shadow);box-shadow:0 3px 15px -3px var(--color-shadow);position:absolute;left:var(--popover-left);top:var(--popover-top);background:var(--color-background);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;z-index:4;opacity:0;max-height:0;pointer-events:none;padding:0;border:none}.ce-popover--opened>.ce-popover__container{opacity:1;padding:var(--padding);max-height:var(--max-height);pointer-events:auto;-webkit-animation:panelShowing .1s ease;animation:panelShowing .1s ease;border:1px solid var(--color-border)}@media (max-width: 650px){.ce-popover--opened>.ce-popover__container{-webkit-animation:panelShowingMobile .25s ease;animation:panelShowingMobile .25s ease}}.ce-popover--open-top .ce-popover__container{--popover-top: calc(-1 * (var(--offset-from-target) + var(--popover-height)))}.ce-popover--open-left .ce-popover__container{--popover-left: calc(-1 * var(--width) + 100%)}.ce-popover__items{overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}@media (max-width: 650px){.ce-popover__overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:#1D202B;z-index:3;opacity:.5;-webkit-transition:opacity .12s ease-in;transition:opacity .12s ease-in;will-change:opacity;visibility:visible}}.ce-popover__overlay--hidden{display:none}@media (max-width: 650px){.ce-popover .ce-popover__container{--offset: 5px;position:fixed;max-width:none;min-width:calc(100% - var(--offset) * 2);left:var(--offset);right:var(--offset);bottom:calc(var(--offset) + env(safe-area-inset-bottom));top:auto;border-radius:10px}}.ce-popover__search{margin-bottom:5px}.ce-popover__nothing-found-message{color:#707684;display:none;cursor:default;padding:3px;font-size:14px;line-height:20px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ce-popover__nothing-found-message--displayed{display:block}.ce-popover--nested .ce-popover__container{--popover-left: calc(var(--nesting-level) * (var(--width) - var(--nested-popover-overlap)));top:calc(var(--trigger-item-top) - var(--nested-popover-overlap));position:absolute}.ce-popover--open-top.ce-popover--nested .ce-popover__container{top:calc(var(--trigger-item-top) - var(--popover-height) + var(--item-height) + var(--offset-from-target) + var(--nested-popover-overlap))}.ce-popover--open-left .ce-popover--nested .ce-popover__container{--popover-left: calc(-1 * (var(--nesting-level) + 1) * var(--width) + 100%)}.ce-popover-item-separator{padding:4px 3px}.ce-popover-item-separator--hidden{display:none}.ce-popover-item-separator__line{height:1px;background:var(--color-border);width:100%}.ce-popover-item-html--hidden{display:none}.ce-popover-item{--border-radius: 6px;border-radius:var(--border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:var(--item-padding);color:var(--color-text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;background:transparent}@media (max-width: 650px){.ce-popover-item{padding:4px}}.ce-popover-item:not(:last-of-type){margin-bottom:1px}.ce-popover-item__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover-item__icon{width:36px;height:36px;border-radius:8px}.ce-popover-item__icon svg{width:28px;height:28px}}.ce-popover-item__icon--tool{margin-right:4px}.ce-popover-item__title{font-size:14px;line-height:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:auto}@media (max-width: 650px){.ce-popover-item__title{font-size:16px}}.ce-popover-item__secondary-title{color:var(--color-text-secondary);font-size:12px;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;opacity:.6}@media (max-width: 650px){.ce-popover-item__secondary-title{display:none}}.ce-popover-item--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}.ce-popover-item--disabled{color:var(--color-text-secondary);cursor:default;pointer-events:none}.ce-popover-item--focused:not(.ce-popover-item--no-focus){background:var(--color-background-item-focus)!important}.ce-popover-item--hidden{display:none}@media (hover: hover){.ce-popover-item:hover{cursor:pointer}.ce-popover-item:hover:not(.ce-popover-item--no-hover){background-color:var(--color-background-item-hover)}}.ce-popover-item--confirmation{background:var(--color-background-item-confirm)}.ce-popover-item--confirmation .ce-popover-item__title,.ce-popover-item--confirmation .ce-popover-item__icon{color:#fff}@media (hover: hover){.ce-popover-item--confirmation:not(.ce-popover-item--no-hover):hover{background:var(--color-background-item-confirm-hover)}}.ce-popover-item--confirmation:not(.ce-popover-item--no-focus).ce-popover-item--focused{background:var(--color-background-item-confirm-hover)!important}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.ce-popover-header{margin-bottom:8px;margin-top:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-popover-header__text{font-size:18px;font-weight:600}.ce-popover-header__back-button{border:0;background:transparent;width:36px;height:36px;color:var(--color-text-primary)}.ce-popover-header__back-button svg{display:block;width:28px;height:28px}.ce-popover--inline{--height: 38px;--height-mobile: 46px;--container-padding: 4px;position:relative}.ce-popover--inline .ce-popover__custom-content{margin-bottom:0}.ce-popover--inline .ce-popover__items{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-popover--inline .ce-popover__container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;padding:var(--container-padding);height:var(--height);top:0;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;width:-webkit-max-content;width:-moz-max-content;width:max-content;-webkit-animation:none;animation:none}@media (max-width: 650px){.ce-popover--inline .ce-popover__container{height:var(--height-mobile);position:absolute}}.ce-popover--inline .ce-popover-item-separator{padding:0 4px}.ce-popover--inline .ce-popover-item-separator__line{height:100%;width:1px}.ce-popover--inline .ce-popover-item{border-radius:4px;padding:4px}.ce-popover--inline .ce-popover-item__icon--tool{-webkit-box-shadow:none;box-shadow:none;background:transparent;margin-right:0}.ce-popover--inline .ce-popover-item__icon{width:auto;width:initial;height:auto;height:initial}.ce-popover--inline .ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover--inline .ce-popover-item__icon svg{width:28px;height:28px}}.ce-popover--inline .ce-popover-item:not(:last-of-type){margin-bottom:0;margin-bottom:initial}.ce-popover--inline .ce-popover-item-html{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-popover--inline .ce-popover-item__icon--chevron-right{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ce-popover--inline .ce-popover--nested-level-1 .ce-popover__container{--offset: 3px;left:0;top:calc(var(--height) + var(--offset))}@media (max-width: 650px){.ce-popover--inline .ce-popover--nested-level-1 .ce-popover__container{top:calc(var(--height-mobile) + var(--offset))}}.ce-popover--inline .ce-popover--nested .ce-popover__container{min-width:var(--width);width:var(--width);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:6px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ce-popover--inline .ce-popover--nested .ce-popover__items{display:block;width:100%}.ce-popover--inline .ce-popover--nested .ce-popover-item{border-radius:6px;padding:3px}@media (max-width: 650px){.ce-popover--inline .ce-popover--nested .ce-popover-item{padding:4px}}.ce-popover--inline .ce-popover--nested .ce-popover-item__icon--tool{margin-right:4px}.ce-popover--inline .ce-popover--nested .ce-popover-item__icon{width:26px;height:26px}.ce-popover--inline .ce-popover--nested .ce-popover-item-separator{padding:4px 3px}.ce-popover--inline .ce-popover--nested .ce-popover-item-separator__line{width:100%;height:1px}.codex-editor [data-placeholder]:empty:before,.codex-editor [data-placeholder][data-empty=true]:before{pointer-events:none;color:#707684;cursor:text;content:attr(data-placeholder)}.codex-editor [data-placeholder-active]:empty:before,.codex-editor [data-placeholder-active][data-empty=true]:before{pointer-events:none;color:#707684;cursor:text}.codex-editor [data-placeholder-active]:empty:focus:before,.codex-editor [data-placeholder-active][data-empty=true]:focus:before{content:attr(data-placeholder-active)} +`;class wa extends E{constructor(){super(...arguments),this.isMobile=!1,this.contentRectCache=null,this.resizeDebouncer=Bo(()=>{this.windowResize()},200),this.selectionChangeDebounced=Bo(()=>{this.selectionChanged()},na),this.documentTouchedListener=e=>{this.documentTouched(e)}}get CSS(){return{editorWrapper:"codex-editor",editorWrapperNarrow:"codex-editor--narrow",editorZone:"codex-editor__redactor",editorZoneHidden:"codex-editor__redactor--hidden",editorEmpty:"codex-editor--empty",editorRtlFix:"codex-editor--rtl"}}get contentRect(){if(this.contentRectCache!==null)return this.contentRectCache;const e=this.nodes.wrapper.querySelector(`.${R.CSS.content}`);return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}async prepare(){this.setIsMobile(),this.make(),this.loadStyles()}toggleReadOnly(e){e?this.unbindReadOnlySensitiveListeners():window.requestIdleCallback(()=>{this.bindReadOnlySensitiveListeners()},{timeout:2e3})}checkEmptiness(){const{BlockManager:e}=this.Editor;this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty,e.isEditorEmpty)}get someToolbarOpened(){const{Toolbar:e,BlockSettings:t,InlineToolbar:o}=this.Editor;return!!(t.opened||o.opened||e.toolbox.opened)}get someFlipperButtonFocused(){return this.Editor.Toolbar.toolbox.hasFocus()?!0:Object.entries(this.Editor).filter(([e,t])=>t.flipper instanceof ae).some(([e,t])=>t.flipper.hasFocus())}destroy(){this.nodes.holder.innerHTML="",this.unbindReadOnlyInsensitiveListeners()}closeAllToolbars(){const{Toolbar:e,BlockSettings:t,InlineToolbar:o}=this.Editor;t.close(),o.close(),e.toolbox.close()}setIsMobile(){const e=window.innerWidth{this.redactorClicked(e)},!1),this.readOnlyMutableListeners.on(document,"keydown",e=>{this.documentKeydown(e)},!0),this.readOnlyMutableListeners.on(document,"mousedown",e=>{this.documentClicked(e)},!0),this.watchBlockHoveredEvents(),this.enableInputsEmptyMark()}watchBlockHoveredEvents(){let e;this.readOnlyMutableListeners.on(this.nodes.redactor,"mousemove",ot(t=>{const o=t.target.closest(".ce-block");this.Editor.BlockSelection.anyBlockSelected||o&&e!==o&&(e=o,this.eventsDispatcher.emit(Qo,{block:this.Editor.BlockManager.getBlockByChildNode(o)}))},20),{passive:!0})}unbindReadOnlySensitiveListeners(){this.readOnlyMutableListeners.clearAll()}windowResize(){this.contentRectCache=null,this.setIsMobile()}documentKeydown(e){switch(e.keyCode){case y.ENTER:this.enterPressed(e);break;case y.BACKSPACE:case y.DELETE:this.backspacePressed(e);break;case y.ESC:this.escapePressed(e);break;default:this.defaultBehaviour(e);break}}defaultBehaviour(e){const{currentBlock:t}=this.Editor.BlockManager,o=e.target.closest(`.${this.CSS.editorWrapper}`),i=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;if(t!==void 0&&o===null){this.Editor.BlockEvents.keydown(e);return}o||t&&i||(this.Editor.BlockManager.unsetCurrentBlock(),this.Editor.Toolbar.close())}backspacePressed(e){const{BlockManager:t,BlockSelection:o,Caret:i}=this.Editor;if(o.anyBlockSelected&&!b.isSelectionExists){const s=t.removeSelectedBlocks(),r=t.insertDefaultBlockAtIndex(s,!0);i.setToBlock(r,i.positions.START),o.clearSelection(e),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}}escapePressed(e){this.Editor.BlockSelection.clearSelection(e),this.Editor.Toolbar.toolbox.opened?(this.Editor.Toolbar.toolbox.close(),this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END)):this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.InlineToolbar.opened?this.Editor.InlineToolbar.close():this.Editor.Toolbar.close()}enterPressed(e){const{BlockManager:t,BlockSelection:o}=this.Editor;if(this.someToolbarOpened)return;const i=t.currentBlockIndex>=0;if(o.anyBlockSelected&&!b.isSelectionExists){o.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation();return}if(!this.someToolbarOpened&&i&&e.target.tagName==="BODY"){const s=this.Editor.BlockManager.insert();e.preventDefault(),this.Editor.Caret.setToBlock(s),this.Editor.Toolbar.moveAndOpen(s)}this.Editor.BlockSelection.clearSelection(e)}documentClicked(e){var a,l;if(!e.isTrusted)return;const t=e.target;this.nodes.holder.contains(t)||b.isAtEditor||(this.Editor.BlockManager.unsetCurrentBlock(),this.Editor.Toolbar.close());const i=(a=this.Editor.BlockSettings.nodes.wrapper)==null?void 0:a.contains(t),s=(l=this.Editor.Toolbar.nodes.settingsToggler)==null?void 0:l.contains(t),r=i||s;if(this.Editor.BlockSettings.opened&&!r){this.Editor.BlockSettings.close();const c=this.Editor.BlockManager.getBlockByChildNode(t);this.Editor.Toolbar.moveAndOpen(c)}this.Editor.BlockSelection.clearSelection(e)}documentTouched(e){let t=e.target;if(t===this.nodes.redactor){const o=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,i=e instanceof MouseEvent?e.clientY:e.touches[0].clientY;t=document.elementFromPoint(o,i)}try{this.Editor.BlockManager.setCurrentBlockByChildNode(t)}catch{this.Editor.RectangleSelection.isRectActivated()||this.Editor.Caret.setToTheLastBlock()}this.Editor.ReadOnly.isEnabled||this.Editor.Toolbar.moveAndOpen()}redactorClicked(e){if(!b.isCollapsed)return;const t=e.target,o=e.metaKey||e.ctrlKey;if(d.isAnchor(t)&&o){e.stopImmediatePropagation(),e.stopPropagation();const i=t.getAttribute("href"),s=ei(i);oi(s);return}this.processBottomZoneClick(e)}processBottomZoneClick(e){const t=this.Editor.BlockManager.getBlockByIndex(-1),o=d.offset(t.holder).bottom,i=e.pageY,{BlockSelection:s}=this.Editor;if(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!s.anyBlockSelected&&o{t=i,o=s}),Promise.resolve().then(async()=>{this.configuration=e,this.validate(),this.init(),await this.start(),await this.render();const{BlockManager:i,Caret:s,UI:r,ModificationsObserver:a}=this.moduleInstances;r.checkEmptiness(),a.enable(),this.configuration.autofocus===!0&&this.configuration.readOnly!==!0&&s.setToBlock(i.blocks[0],s.positions.START),t()}).catch(i=>{T(`Editor.js is not ready because of ${i}`,"error"),o(i)})}set configuration(e){var o,i;N(e)?this.config={...e}:this.config={holder:e},st(!!this.config.holderId,"config.holderId","config.holder"),this.config.holderId&&!this.config.holder&&(this.config.holder=this.config.holderId,this.config.holderId=null),this.config.holder==null&&(this.config.holder="editorjs"),this.config.logLevel||(this.config.logLevel=ko.VERBOSE),Vn(this.config.logLevel),st(!!this.config.initialBlock,"config.initialBlock","config.defaultBlock"),this.config.defaultBlock=this.config.defaultBlock||this.config.initialBlock||"paragraph",this.config.minHeight=this.config.minHeight!==void 0?this.config.minHeight:300;const t={type:this.config.defaultBlock,data:{}};this.config.placeholder=this.config.placeholder||!1,this.config.sanitizer=this.config.sanitizer||{p:!0,b:!0,a:!0},this.config.hideToolbar=this.config.hideToolbar?this.config.hideToolbar:!1,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||(()=>{}),this.config.onChange=this.config.onChange||(()=>{}),this.config.inlineToolbar=this.config.inlineToolbar!==void 0?this.config.inlineToolbar:!0,(V(this.config.data)||!this.config.data.blocks||this.config.data.blocks.length===0)&&(this.config.data={blocks:[t]}),this.config.readOnly=this.config.readOnly||!1,(o=this.config.i18n)!=null&&o.messages&&H.setDictionary(this.config.i18n.messages),this.config.i18n.direction=((i=this.config.i18n)==null?void 0:i.direction)||"ltr"}get configuration(){return this.config}validate(){const{holderId:e,holder:t}=this.config;if(e&&t)throw Error("«holderId» and «holder» param can't assign at the same time.");if(Q(t)&&!d.get(t))throw Error(`element with ID «${t}» is missing. Pass correct holder's ID.`);if(t&&N(t)&&!d.isElement(t))throw Error("«holder» value must be an Element node")}init(){this.constructModules(),this.configureModules()}async start(){await["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"].reduce((t,o)=>t.then(async()=>{try{await this.moduleInstances[o].prepare()}catch(i){if(i instanceof Oo)throw new Error(i.message);T(`Module ${o} was skipped because of %o`,"warn",i)}}),Promise.resolve())}render(){return this.moduleInstances.Renderer.render(this.config.data.blocks)}constructModules(){Object.entries(Ea).forEach(([e,t])=>{try{this.moduleInstances[e]=new t({config:this.configuration,eventsDispatcher:this.eventsDispatcher})}catch(o){T("[constructModules]",`Module ${e} skipped because`,"error",o)}})}configureModules(){for(const e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}getModulesDiff(e){const t={};for(const o in this.moduleInstances)o!==e&&(t[o]=this.moduleInstances[o]);return t}}/** + * Editor.js + * + * @license Apache-2.0 + * @see Editor.js + * @author CodeX Team + */class Ba{static get version(){return"2.31.0-rc.7"}constructor(e){let t=()=>{};N(e)&&M(e.onReady)&&(t=e.onReady);const o=new xa(e);this.isReady=o.isReady.then(()=>{this.exportAPI(o),t()})}exportAPI(e){const t=["configuration"],o=()=>{Object.values(e.moduleInstances).forEach(s=>{M(s.destroy)&&s.destroy(),s.listeners.removeAll()}),Ri(),e=null;for(const s in this)Object.prototype.hasOwnProperty.call(this,s)&&delete this[s];Object.setPrototypeOf(this,null)};t.forEach(s=>{this[s]=e[s]}),this.destroy=o,Object.setPrototypeOf(this,e.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach(([s,r])=>{Object.entries(r).forEach(([a,l])=>{this[l]=e.moduleInstances.API.methods[s][a]})})}}return Ba}); diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/editorjs.umd.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/editorjs.umd.js.download:Zone.Identifier new file mode 100644 index 00000000..7dd4c7e5 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/editorjs.umd.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/flex.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/flex.js.download new file mode 100644 index 00000000..d73c5994 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/flex.js.download @@ -0,0 +1,903 @@ +/** + * Flex block tool for Editor.js. + * Allows users to create highly custom Flexbox layouts with alignment, direction, gaps, and custom column items. + * Supports instantiating other registered plugins inside columns dynamically. + */ +class FlexTool { + static get toolbox() { + return { + title: 'Flex Layout', + icon: '' + }; + } + + constructor({ data, api, readOnly }) { + this.api = api; + this.readOnly = readOnly; + this.data = { + cols: parseInt(data.cols) || 2, + direction: data.direction || 'row', + justify: data.justify || 'start', + align: data.align || 'stretch', + gap: data.gap || '3', // standard Bootstrap gap level + globalClass: data.globalClass || '', + globalId: data.globalId || '', + globalAttributes: data.globalAttributes || data.attributes || '' + }; + this.activeInstances = {}; + + // Load items content dynamically + for (let i = 1; i <= 12; i++) { + this.data[`type${i}`] = data[`type${i}`] || 'html'; + this.data[`col${i}`] = data[`col${i}`] || ''; + this.data[`imgUrl${i}`] = data[`imgUrl${i}`] || ''; + this.data[`ytUrl${i}`] = data[`ytUrl${i}`] || ''; + this.data[`accTitle${i}`] = data[`accTitle${i}`] || ''; + this.data[`accContent${i}`] = data[`accContent${i}`] || ''; + this.data[`class${i}`] = data[`class${i}`] || ''; + this.data[`id${i}`] = data[`id${i}`] || ''; + this.data[`attr${i}`] = data[`attr${i}`] || data[`attributes${i}`] || ''; + this.data[`width${i}`] = parseInt(data[`width${i}`]) || 0; // 0 means auto + this.data[`caption${i}`] = data[`caption${i}`] || ''; + } + this.wrapper = undefined; + } + + render() { + this.wrapper = document.createElement('div'); + this.wrapper.className = 'p-3 bg-light border rounded mb-3 ce-flex-tool-wrapper'; + this.wrapper.style.fontFamily = 'inherit'; + + const title = document.createElement('div'); + title.className = 'font-weight-bold text-primary small mb-3'; + title.innerHTML = ' Custom Flexbox Layout Builder'; + this.wrapper.appendChild(title); + + // Container Flex Settings Row + const settingsRow = document.createElement('div'); + settingsRow.className = 'form-row mb-3 pb-3 border-bottom'; + + // 1. Direction + const dirCol = document.createElement('div'); + dirCol.className = 'col-md-3 col-sm-6 mb-2'; + dirCol.innerHTML = ''; + const dirSelect = document.createElement('select'); + dirSelect.className = 'custom-select custom-select-sm'; + const dirOpts = [ + { val: 'row', lbl: 'Row' }, + { val: 'row-reverse', lbl: 'Row Reverse' }, + { val: 'column', lbl: 'Column' }, + { val: 'column-reverse', lbl: 'Column Reverse' } + ]; + dirOpts.forEach(o => { + const opt = document.createElement('option'); + opt.value = o.val; + opt.innerText = o.lbl; + opt.selected = this.data.direction === o.val; + dirSelect.appendChild(opt); + }); + dirSelect.addEventListener('change', (e) => this.data.direction = e.target.value); + dirCol.appendChild(dirSelect); + settingsRow.appendChild(dirCol); + + // 2. Justify Content + const justifyCol = document.createElement('div'); + justifyCol.className = 'col-md-3 col-sm-6 mb-2'; + justifyCol.innerHTML = ''; + const justifySelect = document.createElement('select'); + justifySelect.className = 'custom-select custom-select-sm'; + const justifyOpts = [ + { val: 'start', lbl: 'Start' }, + { val: 'center', lbl: 'Center' }, + { val: 'end', lbl: 'End' }, + { val: 'between', lbl: 'Space Between' }, + { val: 'around', lbl: 'Space Around' }, + { val: 'evenly', lbl: 'Space Evenly' } + ]; + justifyOpts.forEach(o => { + const opt = document.createElement('option'); + opt.value = o.val; + opt.innerText = o.lbl; + opt.selected = this.data.justify === o.val; + justifySelect.appendChild(opt); + }); + justifySelect.addEventListener('change', (e) => this.data.justify = e.target.value); + justifyCol.appendChild(justifySelect); + settingsRow.appendChild(justifyCol); + + // 3. Align Items + const alignCol = document.createElement('div'); + alignCol.className = 'col-md-3 col-sm-6 mb-2'; + alignCol.innerHTML = ''; + const alignSelect = document.createElement('select'); + alignSelect.className = 'custom-select custom-select-sm'; + const alignOpts = [ + { val: 'stretch', lbl: 'Stretch' }, + { val: 'start', lbl: 'Start' }, + { val: 'center', lbl: 'Center' }, + { val: 'end', lbl: 'End' } + ]; + alignOpts.forEach(o => { + const opt = document.createElement('option'); + opt.value = o.val; + opt.innerText = o.lbl; + opt.selected = this.data.align === o.val; + alignSelect.appendChild(opt); + }); + alignSelect.addEventListener('change', (e) => this.data.align = e.target.value); + alignCol.appendChild(alignSelect); + settingsRow.appendChild(alignCol); + + // 4. Gap Level + const gapCol = document.createElement('div'); + gapCol.className = 'col-md-3 col-sm-6 mb-2'; + gapCol.innerHTML = ''; + const gapSelect = document.createElement('select'); + gapSelect.className = 'custom-select custom-select-sm'; + const gapOpts = [ + { val: '0', lbl: 'None' }, + { val: '1', lbl: 'Extra Small' }, + { val: '2', lbl: 'Small' }, + { val: '3', lbl: 'Medium' }, + { val: '4', lbl: 'Large' }, + { val: '5', lbl: 'Extra Large' } + ]; + gapOpts.forEach(o => { + const opt = document.createElement('option'); + opt.value = o.val; + opt.innerText = o.lbl; + opt.selected = this.data.gap === o.val; + gapSelect.appendChild(opt); + }); + gapSelect.addEventListener('change', (e) => this.data.gap = e.target.value); + gapCol.appendChild(gapSelect); + settingsRow.appendChild(gapCol); + + this.wrapper.appendChild(settingsRow); + + // Background Settings Row + const bgSettingsRow = document.createElement('div'); + bgSettingsRow.className = 'form-row mb-3 pb-2 border-bottom'; + + // 1. Flex Items (Cols) + const colDiv = document.createElement('div'); + colDiv.className = 'col-md-2 mb-2'; + colDiv.innerHTML = ''; + const input = document.createElement('input'); + input.type = 'number'; + input.className = 'form-control form-control-sm'; + input.min = '1'; + input.max = '12'; + input.value = this.data.cols; + if (this.readOnly) input.disabled = true; + input.addEventListener('input', (e) => { + let val = parseInt(e.target.value) || 2; + if (val < 1) val = 1; + if (val > 12) val = 12; + this.data.cols = val; + this._renderColumnInputs(); + }); + colDiv.appendChild(input); + bgSettingsRow.appendChild(colDiv); + + // 2. Global CSS Class + const classDiv = document.createElement('div'); + classDiv.className = 'col-md-3 mb-2'; + classDiv.innerHTML = ''; + const classInput = document.createElement('input'); + classInput.type = 'text'; + classInput.className = 'form-control form-control-sm'; + classInput.placeholder = 'e.g. my-flex-row'; + classInput.value = this.data.globalClass || ''; + if (this.readOnly) classInput.disabled = true; + classInput.addEventListener('input', (e) => this.data.globalClass = e.target.value.trim()); + this.globalClassInput = classInput; + classDiv.appendChild(classInput); + bgSettingsRow.appendChild(classDiv); + + // 3. Global HTML ID + const idDiv = document.createElement('div'); + idDiv.className = 'col-md-3 mb-2'; + idDiv.innerHTML = ''; + const idInput = document.createElement('input'); + idInput.type = 'text'; + idInput.className = 'form-control form-control-sm'; + idInput.placeholder = 'e.g. flex-section-1'; + idInput.value = this.data.globalId || ''; + if (this.readOnly) idInput.disabled = true; + idInput.addEventListener('input', (e) => this.data.globalId = e.target.value.trim()); + this.globalIdInput = idInput; + idDiv.appendChild(idInput); + bgSettingsRow.appendChild(idDiv); + + // 4. Global Custom Attributes + const attrDiv = document.createElement('div'); + attrDiv.className = 'col-md-4 mb-2'; + attrDiv.innerHTML = ''; + const attrInput = document.createElement('input'); + attrInput.type = 'text'; + attrInput.className = 'form-control form-control-sm'; + attrInput.placeholder = 'e.g. data-aos="fade-up" style="background:#fff"'; + attrInput.value = this.data.globalAttributes || ''; + if (this.readOnly) attrInput.disabled = true; + attrInput.addEventListener('input', (e) => this.data.globalAttributes = e.target.value.trim()); + this.globalAttrInput = attrInput; + attrDiv.appendChild(attrInput); + bgSettingsRow.appendChild(attrDiv); + + this.wrapper.appendChild(bgSettingsRow); + + // Columns inputs container + this.inputsContainer = document.createElement('div'); + this.wrapper.appendChild(this.inputsContainer); + + this._renderColumnInputs(); + + return this.wrapper; + } + + _renderColumnInputs() { + this.inputsContainer.innerHTML = ''; + + const row = document.createElement('div'); + row.className = 'row'; + + const count = this.data.cols; + const colWidthClass = count === 1 ? 'col-12' : (count === 2 ? 'col-md-6' : (count === 3 ? 'col-md-4' : (count === 4 ? 'col-md-3' : 'col-md'))); + + for (let i = 1; i <= count; i++) { + const colDiv = document.createElement('div'); + colDiv.className = `${colWidthClass} mb-3 p-2 border rounded bg-white`; + colDiv.style.boxShadow = '0 1px 3px rgba(0,0,0,0.05)'; + + const headerRow = document.createElement('div'); + headerRow.className = 'd-flex justify-content-between align-items-center mb-2 pb-1 border-bottom'; + + const label = document.createElement('label'); + label.className = 'small font-weight-bold text-dark mb-0'; + label.innerText = `Item ${i}`; + headerRow.appendChild(label); + + const controlsWrapper = document.createElement('div'); + controlsWrapper.className = 'd-flex align-items-center gap-1'; + + // Width Selector + const widthSelect = document.createElement('select'); + widthSelect.className = 'custom-select custom-select-sm mr-1'; + widthSelect.style.width = '75px'; + if (this.readOnly) widthSelect.disabled = true; + + const widthOpts = [ + { val: 0, lbl: 'Auto' }, + { val: 1, lbl: '1/12' }, + { val: 2, lbl: '2/12' }, + { val: 3, lbl: '3/12' }, + { val: 4, lbl: '4/12' }, + { val: 5, lbl: '5/12' }, + { val: 6, lbl: '6/12' }, + { val: 7, lbl: '7/12' }, + { val: 8, lbl: '8/12' }, + { val: 9, lbl: '9/12' }, + { val: 10, lbl: '10/12' }, + { val: 11, lbl: '11/12' }, + { val: 12, lbl: '12/12' } + ]; + + widthOpts.forEach(o => { + const opt = document.createElement('option'); + opt.value = o.val; + opt.innerText = o.lbl; + opt.selected = this.data[`width${i}`] === o.val; + widthSelect.appendChild(opt); + }); + + widthSelect.addEventListener('change', (e) => { + this.data[`width${i}`] = parseInt(e.target.value) || 0; + }); + + controlsWrapper.appendChild(widthSelect); + + // Column Type Select (Built-ins + Registered plugins dynamically) + const typeSelect = document.createElement('select'); + typeSelect.className = 'custom-select custom-select-sm'; + typeSelect.style.width = '100px'; + if (this.readOnly) typeSelect.disabled = true; + + const types = [ + { value: 'html', label: 'HTML/Text' }, + { value: 'image', label: 'Image' }, + { value: 'youtube', label: 'YouTube' }, + { value: 'accordion', label: 'Accordion' } + ]; + + if (window.SISEditorPlugins) { + Object.keys(window.SISEditorPlugins).forEach(key => { + // Allow nesting any registered plugins (no exclusions) + if (!types.some(t => t.value === key)) { + types.push({ value: key, label: `[Plugin] ${key}` }); + } + }); + } + + types.forEach(t => { + const opt = document.createElement('option'); + opt.value = t.value; + opt.innerText = t.label; + opt.selected = this.data[`type${i}`] === t.value; + typeSelect.appendChild(opt); + }); + + const contentDiv = document.createElement('div'); + + typeSelect.addEventListener('change', (e) => { + this.data[`type${i}`] = e.target.value; + this._renderTypeSpecificInput(i, contentDiv); + }); + + controlsWrapper.appendChild(typeSelect); + headerRow.appendChild(controlsWrapper); + colDiv.appendChild(headerRow); + colDiv.appendChild(contentDiv); + + // --- Sub-Plugin (Sub-Content) Section --- + const subWrapper = document.createElement('div'); + if (this.data[`subType${i}`] !== 'none') { + subWrapper.className = 'mt-3 pt-2 border-top'; + } + + const subHeader = document.createElement('div'); + subHeader.className = 'd-flex justify-content-between align-items-center mb-2'; + + const subLabel = document.createElement('label'); + subLabel.className = 'small font-weight-bold text-muted mb-0'; + subLabel.style.fontSize = '10px'; + subLabel.innerText = 'SUB-CONTENT / INJECT PLUGIN'; + subHeader.appendChild(subLabel); + + const subTypeSelect = document.createElement('select'); + subTypeSelect.className = 'custom-select custom-select-sm'; + subTypeSelect.style.width = '130px'; + subTypeSelect.style.fontSize = '10px'; + if (this.readOnly) subTypeSelect.disabled = true; + + const subTypes = [ + { value: 'none', label: 'None' }, + { value: 'caption', label: 'Text Caption' }, + { value: 'html', label: 'HTML/Text' }, + { value: 'image', label: 'Image' }, + { value: 'youtube', label: 'YouTube' }, + { value: 'accordion', label: 'Accordion' } + ]; + if (window.SISEditorPlugins) { + Object.keys(window.SISEditorPlugins).forEach(key => { + if (!subTypes.some(t => t.value === key)) { + subTypes.push({ value: key, label: `[Plugin] ${key}` }); + } + }); + } + + subTypes.forEach(t => { + const opt = document.createElement('option'); + opt.value = t.value; + opt.innerText = t.label; + opt.selected = this.data[`subType${i}`] === t.value; + subTypeSelect.appendChild(opt); + }); + subHeader.appendChild(subTypeSelect); + subWrapper.appendChild(subHeader); + + const subContentDiv = document.createElement('div'); + subWrapper.appendChild(subContentDiv); + colDiv.appendChild(subWrapper); + + const renderSubInputs = () => { + subContentDiv.innerHTML = ''; + const subType = this.data[`subType${i}`]; + if (subType === 'none') { + subWrapper.className = ''; + } else { + subWrapper.className = 'mt-3 pt-2 border-top'; + } + + if (subType === 'none') { + // Empty + } else if (subType === 'caption') { + const captionGroup = document.createElement('div'); + captionGroup.className = 'form-group mb-2'; + const captionInput = document.createElement('input'); + captionInput.type = 'text'; + captionInput.className = 'form-control form-control-sm'; + captionInput.style.fontSize = '11px'; + captionInput.placeholder = 'Optional column caption / text...'; + captionInput.value = this.data[`caption${i}`] || ''; + if (this.readOnly) captionInput.disabled = true; + captionInput.addEventListener('input', (e) => { + this.data[`caption${i}`] = e.target.value; + }); + captionGroup.appendChild(captionInput); + subContentDiv.appendChild(captionGroup); + } else { + this._renderTypeSpecificInput(`sub_${i}`, subContentDiv, subType); + } + }; + + subTypeSelect.addEventListener('change', (e) => { + this.data[`subType${i}`] = e.target.value; + renderSubInputs(); + }); + + row.appendChild(colDiv); + + this._renderTypeSpecificInput(i, contentDiv); + renderSubInputs(); + } + + this.inputsContainer.appendChild(row); + } + + _renderTypeSpecificInput(i, container, explicitType) { + container.innerHTML = ''; + + // Remove tracking of previous instance + if (this.activeInstances[i]) { + delete this.activeInstances[i]; + } + + const typeContainer = document.createElement('div'); + typeContainer.className = 'mb-3'; + container.appendChild(typeContainer); + + const type = explicitType || this.data[`type${i}`] || 'html'; + + // Check if type is a dynamic editor plugin registered in window.SISEditorPlugins + if (window.SISEditorPlugins && window.SISEditorPlugins[type]) { + try { + const pluginEntry = window.SISEditorPlugins[type]; + const pluginClass = pluginEntry.class; + const pluginConfig = pluginEntry.config || {}; + let parsedData = {}; + if (this.data[`col${i}`]) { + try { + parsedData = typeof this.data[`col${i}`] === 'string' ? JSON.parse(this.data[`col${i}`]) : this.data[`col${i}`]; + } catch (e) { + parsedData = { html: this.data[`col${i}`] }; // fallback + } + } + const instance = new pluginClass({ + data: parsedData, + api: this.api, + readOnly: this.readOnly, + config: pluginConfig, + block: { + id: 'nested-flex-' + i + '-' + Math.random().toString(36).substring(7), + name: type, + holder: typeContainer, + isEmpty: false, + selected: false, + stretched: false, + tunes: {} + } + }); + this.activeInstances[i] = instance; + + const element = instance.render(); + typeContainer.appendChild(element); + + // Fix for Editor.js Image plugin 404 errors (spinner hangs forever) + if (type === 'image') { + // Custom UI override for nested images + const injectCustomButtons = () => { + if (element.querySelector('.sis-custom-image-controls')) return; + + const fileBtn = element.querySelector('.cdx-button'); + if (fileBtn) { + fileBtn.style.display = 'none'; // Hide native button + } + + const controls = document.createElement('div'); + controls.className = 'sis-custom-image-controls mt-2 p-2 border rounded bg-light'; + controls.style.display = 'flex'; + controls.style.flexDirection = 'column'; + controls.style.gap = '8px'; + + controls.innerHTML = ` +
Image Controls
+ + + + + `; + + const uploadBtn = controls.querySelector(`#btn-upload-img-${i}`); + if (uploadBtn && fileBtn) { + uploadBtn.addEventListener('click', (e) => { + e.preventDefault(); + fileBtn.click(); + }); + } + + const urlBtn = controls.querySelector(`#btn-fetch-url-${i}`); + if (urlBtn) { + urlBtn.addEventListener('click', (e) => { + e.preventDefault(); + e.stopPropagation(); + const url = prompt('Enter Image URL:'); + if (url && url.trim() !== '') { + this.data[`col${i}`] = { + file: { url: url.trim() }, + caption: '', + withBorder: false, + withBackground: false, + stretched: false + }; + this._renderTypeSpecificInput(i, container); + } + }); + } + + const mediaBtn = controls.querySelector(`#btn-media-lib-${i}`); + if (mediaBtn) { + mediaBtn.addEventListener('click', (e) => { + e.preventDefault(); + e.stopPropagation(); + if (window.SISMediaPicker) { + SISMediaPicker.open((url, mediaObj, config) => { + if (url) { + this.data[`col${i}`] = { + file: { url: url }, + caption: (config && config.alt) || '', + withBorder: false, + withBackground: false, + stretched: false + }; + if (config) { + this.data[`imgStyle${i}`] = config.style || ''; + this.data[`imgClass${i}`] = config.cssClass || ''; + this.data[`imgAlt${i}`] = config.alt || ''; + this.data[`imgAttrs${i}`] = config.customAttributes || ''; + this.data[`imgAspectRatio${i}`] = config.aspectRatio || ''; + } + this._renderTypeSpecificInput(i, container); + } + }); + } else { + alert('Media Library is not yet configured on this system.'); + } + }); + } + + const clearBtn = controls.querySelector(`#btn-clear-img-${i}`); + if (clearBtn) { + clearBtn.addEventListener('click', (e) => { + e.preventDefault(); + e.stopPropagation(); + if (confirm('Are you sure you want to remove this image?')) { + this.data[`col${i}`] = ''; + this._renderTypeSpecificInput(i, container); + } + }); + } + + element.appendChild(controls); + }; + injectCustomButtons(); + + const handleImageError = () => { + element.classList.remove('image-tool--loading'); + element.classList.add('image-tool--empty'); + const preloader = element.querySelector('.image-tool__image-preloader'); + if (preloader) preloader.style.display = 'none'; + }; + + const observer = new MutationObserver((mutations) => { + mutations.forEach(mutation => { + mutation.addedNodes.forEach(node => { + if (node.tagName === 'IMG') { + node.addEventListener('error', handleImageError); + } + }); + }); + }); + observer.observe(element, { childList: true, subtree: true }); + + const existingImg = element.querySelector('img'); + if (existingImg) existingImg.addEventListener('error', handleImageError); + } + } catch (err) { + console.error(`Failed to render plugin ${type} inside FlexTool:`, err); + typeContainer.innerHTML = `
Error loading plugin ${type}
`; + } + } else if (type === 'html') { + const textarea = document.createElement('textarea'); + textarea.className = 'form-control form-control-sm'; + textarea.style.minHeight = '140px'; + textarea.style.fontSize = '12px'; + textarea.placeholder = `HTML / Text for Item ${i}...`; + textarea.value = typeof this.data[`col${i}`] === 'object' ? JSON.stringify(this.data[`col${i}`]) : this.data[`col${i}`] || ''; + if (this.readOnly) textarea.disabled = true; + + textarea.addEventListener('input', (e) => { + this.data[`col${i}`] = e.target.value; + }); + typeContainer.appendChild(textarea); + + } else if (type === 'image') { + const inputGroup = document.createElement('div'); + inputGroup.className = 'input-group input-group-sm mb-2'; + + const input = document.createElement('input'); + input.type = 'text'; + input.className = 'form-control form-control-sm'; + input.placeholder = 'Paste image URL here...'; + input.value = this.data[`imgUrl${i}`] || ''; + if (this.readOnly) input.disabled = true; + + const appendDiv = document.createElement('div'); + appendDiv.className = 'input-group-append'; + + const chooseBtn = document.createElement('button'); + chooseBtn.type = 'button'; + chooseBtn.className = 'btn btn-outline-secondary'; + chooseBtn.innerText = 'Choose'; + if (this.readOnly) chooseBtn.disabled = true; + chooseBtn.addEventListener('click', () => { + if (window.SISMediaPicker) { + SISMediaPicker.open((selectedUrl, mediaObj, config) => { + input.value = selectedUrl; + this.data[`imgUrl${i}`] = selectedUrl; + if (config) { + this.data[`imgStyle${i}`] = config.style || ''; + this.data[`imgClass${i}`] = config.cssClass || ''; + this.data[`imgAlt${i}`] = config.alt || ''; + this.data[`imgAttrs${i}`] = config.customAttributes || ''; + this.data[`imgAspectRatio${i}`] = config.aspectRatio || ''; + } + previewImg.src = selectedUrl; + previewBox.style.display = 'block'; + }); + } else { + alert('Media Picker modal helper is not loaded.'); + } + }); + + const uploadBtn = document.createElement('button'); + uploadBtn.type = 'button'; + uploadBtn.className = 'btn btn-outline-primary'; + uploadBtn.innerText = 'Upload'; + if (this.readOnly) uploadBtn.disabled = true; + + const fileInput = document.createElement('input'); + fileInput.type = 'file'; + fileInput.accept = 'image/*'; + fileInput.style.display = 'none'; + + uploadBtn.addEventListener('click', () => fileInput.click()); + fileInput.addEventListener('change', async (e) => { + const file = e.target.files[0]; + if (!file) return; + + const formData = new FormData(); + formData.append('image', file); + + uploadBtn.disabled = true; + uploadBtn.innerText = '...'; + + try { + const response = await fetch('/api/manage/media/upload', { + method: 'POST', + body: formData + }); + const result = await response.json(); + if (result.success && result.file && result.file.url) { + const url = result.file.url; + input.value = url; + this.data[`imgUrl${i}`] = url; + previewImg.src = url; + previewBox.style.display = 'block'; + } else { + alert('Upload failed: ' + (result.message || 'Unknown error')); + } + } catch (err) { + console.error(err); + alert('Upload error occurred.'); + } finally { + uploadBtn.disabled = false; + uploadBtn.innerText = 'Upload'; + } + }); + + appendDiv.appendChild(chooseBtn); + appendDiv.appendChild(uploadBtn); + inputGroup.appendChild(input); + inputGroup.appendChild(appendDiv); + typeContainer.appendChild(inputGroup); + typeContainer.appendChild(fileInput); + + const previewBox = document.createElement('div'); + previewBox.className = 'border rounded p-1 text-center bg-light'; + previewBox.style.display = this.data[`imgUrl${i}`] ? 'block' : 'none'; + previewBox.style.maxHeight = '150px'; + previewBox.style.overflow = 'hidden'; + + const previewImg = document.createElement('img'); + previewImg.src = this.data[`imgUrl${i}`] || ''; + previewImg.style.maxWidth = '100%'; + previewImg.style.maxHeight = '140px'; + previewImg.style.objectFit = 'contain'; + + previewBox.appendChild(previewImg); + typeContainer.appendChild(previewBox); + + input.addEventListener('input', (e) => { + const val = e.target.value.trim(); + this.data[`imgUrl${i}`] = val; + if (val) { + previewImg.src = val; + previewBox.style.display = 'block'; + } else { + previewBox.style.display = 'none'; + } + }); + + } else if (type === 'youtube') { + const input = document.createElement('input'); + input.type = 'text'; + input.className = 'form-control form-control-sm mb-2'; + input.placeholder = 'Paste YouTube video URL...'; + input.value = this.data[`ytUrl${i}`] || ''; + if (this.readOnly) input.disabled = true; + + const preview = document.createElement('div'); + preview.className = 'small text-muted p-2 bg-light border rounded'; + preview.innerText = 'Format: https://www.youtube.com/watch?v=XXXXXX'; + + input.addEventListener('input', (e) => { + this.data[`ytUrl${i}`] = e.target.value.trim(); + }); + + typeContainer.appendChild(input); + typeContainer.appendChild(preview); + + } else if (type === 'accordion') { + const titleInput = document.createElement('input'); + titleInput.type = 'text'; + titleInput.className = 'form-control form-control-sm mb-2'; + titleInput.placeholder = 'Accordion Title...'; + titleInput.value = this.data[`accTitle${i}`] || ''; + if (this.readOnly) titleInput.disabled = true; + + const contentTextarea = document.createElement('textarea'); + contentTextarea.className = 'form-control form-control-sm'; + contentTextarea.style.minHeight = '90px'; + contentTextarea.style.fontSize = '12px'; + contentTextarea.placeholder = 'Accordion Body HTML...'; + contentTextarea.value = this.data[`accContent${i}`] || ''; + if (this.readOnly) contentTextarea.disabled = true; + + titleInput.addEventListener('input', (e) => { + this.data[`accTitle${i}`] = e.target.value; + }); + contentTextarea.addEventListener('input', (e) => { + this.data[`accContent${i}`] = e.target.value; + }); + + typeContainer.appendChild(titleInput); + typeContainer.appendChild(contentTextarea); + } + + + + // Advanced Settings (ID and Class) + const advancedHeader = document.createElement('div'); + advancedHeader.className = 'font-weight-bold text-muted small mb-2'; + advancedHeader.style.fontSize = '10px'; + advancedHeader.innerText = 'ADVANCED SETTINGS'; + container.appendChild(advancedHeader); + + const advRow = document.createElement('div'); + advRow.className = 'form-row'; + + const classCol = document.createElement('div'); + classCol.className = 'col'; + const classInput = document.createElement('input'); + classInput.type = 'text'; + classInput.className = 'form-control form-control-sm'; + classInput.style.fontSize = '11px'; + classInput.placeholder = 'CSS Class(es)...'; + classInput.value = this.data[`class${i}`] || ''; + if (this.readOnly) classInput.disabled = true; + classInput.addEventListener('input', (e) => { + this.data[`class${i}`] = e.target.value.trim(); + }); + classCol.appendChild(classInput); + + const idCol = document.createElement('div'); + idCol.className = 'col'; + const idInput = document.createElement('input'); + idInput.type = 'text'; + idInput.className = 'form-control form-control-sm'; + idInput.style.fontSize = '11px'; + idInput.placeholder = 'HTML ID...'; + idInput.value = this.data[`id${i}`] || ''; + if (this.readOnly) idInput.disabled = true; + idInput.addEventListener('input', (e) => { + this.data[`id${i}`] = e.target.value.trim(); + }); + idCol.appendChild(idInput); + + advRow.appendChild(classCol); + advRow.appendChild(idCol); + container.appendChild(advRow); + } + + save(blockContent) { + const savedData = { + cols: this.data.cols, + direction: this.data.direction, + justify: this.data.justify, + align: this.data.align, + gap: this.data.gap, + globalClass: this.globalClassInput ? this.globalClassInput.value.trim() : (this.data.globalClass || ''), + globalId: this.globalIdInput ? this.globalIdInput.value.trim() : (this.data.globalId || ''), + globalAttributes: this.globalAttrInput ? this.globalAttrInput.value.trim() : (this.data.globalAttributes || '') + }; + for (let i = 1; i <= this.data.cols; i++) { + const type = this.data[`type${i}`] || 'html'; + savedData[`type${i}`] = type; + + // If it is a dynamically nested plugin, save its output data + if (this.activeInstances[i]) { + try { + const pluginData = this.activeInstances[i].save(); + savedData[`col${i}`] = pluginData; + } catch (e) { + console.error(`Failed to save plugin ${type} inside FlexTool:`, e); + savedData[`col${i}`] = this.data[`col${i}`]; + } + } else { + savedData[`col${i}`] = this.data[`col${i}`] || ''; + } + + savedData[`imgUrl${i}`] = this.data[`imgUrl${i}`] || ''; + savedData[`ytUrl${i}`] = this.data[`ytUrl${i}`] || ''; + savedData[`accTitle${i}`] = this.data[`accTitle${i}`] || ''; + savedData[`accContent${i}`] = this.data[`accContent${i}`] || ''; + savedData[`class${i}`] = this.data[`class${i}`] || ''; + savedData[`id${i}`] = this.data[`id${i}`] || ''; + savedData[`attr${i}`] = this.data[`attr${i}`] || ''; + savedData[`width${i}`] = this.data[`width${i}`] || 0; + savedData[`caption${i}`] = this.data[`caption${i}`] || ''; + + // Sub-plugin serialization + const subType = this.data[`subType${i}`] || 'none'; + savedData[`subType${i}`] = subType; + + if (this.activeInstances[`sub_${i}`]) { + try { + const subPluginData = this.activeInstances[`sub_${i}`].save(); + savedData[`colsub_${i}`] = subPluginData; + } catch (e) { + console.error(`Failed to save sub-plugin ${subType} inside FlexTool:`, e); + savedData[`colsub_${i}`] = this.data[`colsub_${i}`]; + } + } else { + savedData[`colsub_${i}`] = this.data[`colsub_${i}`] || ''; + } + + savedData[`imgUrlsub_${i}`] = this.data[`imgUrlsub_${i}`] || ''; + savedData[`ytUrlsub_${i}`] = this.data[`ytUrlsub_${i}`] || ''; + savedData[`accTitlesub_${i}`] = this.data[`accTitlesub_${i}`] || ''; + savedData[`accContentsub_${i}`] = this.data[`accContentsub_${i}`] || ''; + savedData[`classsub_${i}`] = this.data[`classsub_${i}`] || ''; + savedData[`idsub_${i}`] = this.data[`idsub_${i}`] || ''; + savedData[`attrsub_${i}`] = this.data[`attrsub_${i}`] || ''; + } + return savedData; + } +} + +// Register the plugin globally +window.SISEditorPlugins = window.SISEditorPlugins || {}; +window.SISEditorPlugins['flex'] = { + class: FlexTool +}; diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/grid.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/grid.js.download new file mode 100644 index 00000000..5551e61c --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/grid.js.download @@ -0,0 +1,806 @@ +/** + * Grid block tool for Editor.js. + * Allows users to create responsive layouts with any number of columns and choose different content types, manual widths, + * and dynamically instantiates other registered editor plugins inside columns. + */ +class GridTool { + static get toolbox() { + return { + title: 'Grid / Columns', + icon: '' + }; + } + + constructor({ data, api, readOnly }) { + this.api = api; + this.readOnly = readOnly; + this.data = { + cols: parseInt(data.cols) || 2, + globalClass: data.globalClass || '', + globalId: data.globalId || '', + globalAttributes: data.globalAttributes || data.attributes || '' + }; + this.activeInstances = {}; + + // Load column contents dynamically + for (let i = 1; i <= 12; i++) { + this.data[`type${i}`] = data[`type${i}`] || 'html'; + this.data[`col${i}`] = data[`col${i}`] || ''; + this.data[`imgUrl${i}`] = data[`imgUrl${i}`] || ''; + this.data[`ytUrl${i}`] = data[`ytUrl${i}`] || ''; + this.data[`accTitle${i}`] = data[`accTitle${i}`] || ''; + this.data[`accContent${i}`] = data[`accContent${i}`] || ''; + this.data[`class${i}`] = data[`class${i}`] || ''; + this.data[`id${i}`] = data[`id${i}`] || ''; + this.data[`attr${i}`] = data[`attr${i}`] || data[`attributes${i}`] || ''; + this.data[`width${i}`] = parseInt(data[`width${i}`]) || 0; // 0 means auto + this.data[`caption${i}`] = data[`caption${i}`] || ''; + + // Sub-plugin properties + this.data[`subType${i}`] = data[`subType${i}`] || 'none'; + this.data[`colsub_${i}`] = data[`colsub_${i}`] || ''; + this.data[`imgUrlsub_${i}`] = data[`imgUrlsub_${i}`] || ''; + this.data[`ytUrlsub_${i}`] = data[`ytUrlsub_${i}`] || ''; + this.data[`accTitlesub_${i}`] = data[`accTitlesub_${i}`] || ''; + this.data[`accContentsub_${i}`] = data[`accContentsub_${i}`] || ''; + this.data[`classsub_${i}`] = data[`classsub_${i}`] || ''; + this.data[`idsub_${i}`] = data[`idsub_${i}`] || ''; + this.data[`attrsub_${i}`] = data[`attrsub_${i}`] || ''; + } + this.wrapper = undefined; + } + + render() { + this.wrapper = document.createElement('div'); + this.wrapper.className = 'p-3 bg-light border rounded mb-3 ce-grid-tool-wrapper'; + this.wrapper.style.fontFamily = 'inherit'; + + const title = document.createElement('div'); + title.className = 'font-weight-bold text-primary small mb-3'; + title.innerHTML = ' Multi-Column Grid Layout'; + this.wrapper.appendChild(title); + + // Layout Settings Row + const settingsRow = document.createElement('div'); + settingsRow.className = 'form-row mb-3 pb-2 border-bottom'; + + // 1. Columns + const colDiv = document.createElement('div'); + colDiv.className = 'col-md-2 mb-2'; + colDiv.innerHTML = ''; + const colInput = document.createElement('input'); + colInput.type = 'number'; + colInput.className = 'form-control form-control-sm'; + colInput.min = '1'; + colInput.max = '12'; + colInput.value = this.data.cols; + if (this.readOnly) colInput.disabled = true; + colInput.addEventListener('input', (e) => { + let val = parseInt(e.target.value) || 2; + if (val < 1) val = 1; + if (val > 12) val = 12; + this.data.cols = val; + this._renderColumnInputs(); + }); + colDiv.appendChild(colInput); + settingsRow.appendChild(colDiv); + + // 2. Global CSS Class + const classDiv = document.createElement('div'); + classDiv.className = 'col-md-3 mb-2'; + classDiv.innerHTML = ''; + const classInput = document.createElement('input'); + classInput.type = 'text'; + classInput.className = 'form-control form-control-sm'; + classInput.placeholder = 'e.g. my-custom-grid'; + classInput.value = this.data.globalClass || ''; + if (this.readOnly) classInput.disabled = true; + classInput.addEventListener('input', (e) => this.data.globalClass = e.target.value.trim()); + this.globalClassInput = classInput; + classDiv.appendChild(classInput); + settingsRow.appendChild(classDiv); + + // 3. Global HTML ID + const idDiv = document.createElement('div'); + idDiv.className = 'col-md-3 mb-2'; + idDiv.innerHTML = ''; + const idInput = document.createElement('input'); + idInput.type = 'text'; + idInput.className = 'form-control form-control-sm'; + idInput.placeholder = 'e.g. grid-section-1'; + idInput.value = this.data.globalId || ''; + if (this.readOnly) idInput.disabled = true; + idInput.addEventListener('input', (e) => this.data.globalId = e.target.value.trim()); + this.globalIdInput = idInput; + idDiv.appendChild(idInput); + settingsRow.appendChild(idDiv); + + // 4. Global Custom Attributes + const attrDiv = document.createElement('div'); + attrDiv.className = 'col-md-4 mb-2'; + attrDiv.innerHTML = ''; + const attrInput = document.createElement('input'); + attrInput.type = 'text'; + attrInput.className = 'form-control form-control-sm'; + attrInput.placeholder = 'e.g. data-aos="fade-up" style="background:#fff"'; + attrInput.value = this.data.globalAttributes || ''; + if (this.readOnly) attrInput.disabled = true; + attrInput.addEventListener('input', (e) => this.data.globalAttributes = e.target.value.trim()); + this.globalAttrInput = attrInput; + attrDiv.appendChild(attrInput); + settingsRow.appendChild(attrDiv); + + this.wrapper.appendChild(settingsRow); + + // Columns inputs container + this.inputsContainer = document.createElement('div'); + this.wrapper.appendChild(this.inputsContainer); + + this._renderColumnInputs(); + + return this.wrapper; + } + + _renderColumnInputs() { + this.inputsContainer.innerHTML = ''; + + const row = document.createElement('div'); + row.className = 'row d-flex flex-wrap'; + + const count = this.data.cols; + const colWidthClass = count === 1 ? 'col-12' : (count === 2 ? 'col-md-6' : (count === 3 ? 'col-md-4' : (count === 4 ? 'col-md-3' : 'col-md'))); + + for (let i = 1; i <= count; i++) { + const colDiv = document.createElement('div'); + colDiv.className = `${colWidthClass} mb-3 p-2 border rounded bg-white`; + colDiv.style.boxShadow = '0 1px 3px rgba(0,0,0,0.05)'; + + const headerRow = document.createElement('div'); + headerRow.className = 'd-flex justify-content-between align-items-center mb-2 pb-1 border-bottom'; + + const label = document.createElement('label'); + label.className = 'small font-weight-bold text-dark mb-0'; + label.innerText = `Col ${i}`; + headerRow.appendChild(label); + + const controlsWrapper = document.createElement('div'); + controlsWrapper.className = 'd-flex align-items-center gap-1'; + + // Width Selector + const widthSelect = document.createElement('select'); + widthSelect.className = 'custom-select custom-select-sm mr-1'; + widthSelect.style.width = '75px'; + if (this.readOnly) widthSelect.disabled = true; + + const widthOpts = [ + { val: 0, lbl: 'Auto' }, + { val: 1, lbl: '1/12' }, + { val: 2, lbl: '2/12' }, + { val: 3, lbl: '3/12' }, + { val: 4, lbl: '4/12' }, + { val: 5, lbl: '5/12' }, + { val: 6, lbl: '6/12' }, + { val: 7, lbl: '7/12' }, + { val: 8, lbl: '8/12' }, + { val: 9, lbl: '9/12' }, + { val: 10, lbl: '10/12' }, + { val: 11, lbl: '11/12' }, + { val: 12, lbl: '12/12' } + ]; + + widthOpts.forEach(o => { + const opt = document.createElement('option'); + opt.value = o.val; + opt.innerText = o.lbl; + opt.selected = this.data[`width${i}`] === o.val; + widthSelect.appendChild(opt); + }); + + widthSelect.addEventListener('change', (e) => { + this.data[`width${i}`] = parseInt(e.target.value) || 0; + }); + + controlsWrapper.appendChild(widthSelect); + + // Column Type Select (Built-ins + Registered plugins dynamically) + const typeSelect = document.createElement('select'); + typeSelect.className = 'custom-select custom-select-sm'; + typeSelect.style.width = '100px'; + if (this.readOnly) typeSelect.disabled = true; + + // Base types + const types = [ + { value: 'html', label: 'HTML/Text' }, + { value: 'image', label: 'Image' }, + { value: 'youtube', label: 'YouTube' }, + { value: 'accordion', label: 'Accordion' } + ]; + + // Dynamically add other registered plugins from window.SISEditorPlugins + if (window.SISEditorPlugins) { + Object.keys(window.SISEditorPlugins).forEach(key => { + // Allow nesting any registered plugins (no exclusions) + if (!types.some(t => t.value === key)) { + types.push({ value: key, label: `[Plugin] ${key}` }); + } + }); + } + + types.forEach(t => { + const opt = document.createElement('option'); + opt.value = t.value; + opt.innerText = t.label; + opt.selected = this.data[`type${i}`] === t.value; + typeSelect.appendChild(opt); + }); + + const contentDiv = document.createElement('div'); + + typeSelect.addEventListener('change', (e) => { + this.data[`type${i}`] = e.target.value; + this._renderTypeSpecificInput(i, contentDiv); + }); + + controlsWrapper.appendChild(typeSelect); + headerRow.appendChild(controlsWrapper); + colDiv.appendChild(headerRow); + colDiv.appendChild(contentDiv); + + // --- Sub-Plugin (Sub-Content) Section --- + const subWrapper = document.createElement('div'); + if (this.data[`subType${i}`] !== 'none') { + subWrapper.className = 'mt-3 pt-2 border-top'; + } + + const subHeader = document.createElement('div'); + subHeader.className = 'd-flex justify-content-between align-items-center mb-2'; + + const subLabel = document.createElement('label'); + subLabel.className = 'small font-weight-bold text-muted mb-0'; + subLabel.style.fontSize = '10px'; + subLabel.innerText = 'SUB-CONTENT / INJECT PLUGIN'; + subHeader.appendChild(subLabel); + + const subTypeSelect = document.createElement('select'); + subTypeSelect.className = 'custom-select custom-select-sm'; + subTypeSelect.style.width = '130px'; + subTypeSelect.style.fontSize = '10px'; + if (this.readOnly) subTypeSelect.disabled = true; + + const subTypes = [ + { value: 'none', label: 'None' }, + { value: 'caption', label: 'Text Caption' }, + { value: 'html', label: 'HTML/Text' }, + { value: 'image', label: 'Image' }, + { value: 'youtube', label: 'YouTube' }, + { value: 'accordion', label: 'Accordion' } + ]; + if (window.SISEditorPlugins) { + Object.keys(window.SISEditorPlugins).forEach(key => { + if (!subTypes.some(t => t.value === key)) { + subTypes.push({ value: key, label: `[Plugin] ${key}` }); + } + }); + } + + subTypes.forEach(t => { + const opt = document.createElement('option'); + opt.value = t.value; + opt.innerText = t.label; + opt.selected = this.data[`subType${i}`] === t.value; + subTypeSelect.appendChild(opt); + }); + subHeader.appendChild(subTypeSelect); + subWrapper.appendChild(subHeader); + + const subContentDiv = document.createElement('div'); + subWrapper.appendChild(subContentDiv); + colDiv.appendChild(subWrapper); + + const renderSubInputs = () => { + subContentDiv.innerHTML = ''; + const subType = this.data[`subType${i}`]; + if (subType === 'none') { + subWrapper.className = ''; + } else { + subWrapper.className = 'mt-3 pt-2 border-top'; + } + + if (subType === 'none') { + // Empty + } else if (subType === 'caption') { + const captionGroup = document.createElement('div'); + captionGroup.className = 'form-group mb-2'; + const captionInput = document.createElement('input'); + captionInput.type = 'text'; + captionInput.className = 'form-control form-control-sm'; + captionInput.style.fontSize = '11px'; + captionInput.placeholder = 'Optional column caption / text...'; + captionInput.value = this.data[`caption${i}`] || ''; + if (this.readOnly) captionInput.disabled = true; + captionInput.addEventListener('input', (e) => { + this.data[`caption${i}`] = e.target.value; + }); + captionGroup.appendChild(captionInput); + subContentDiv.appendChild(captionGroup); + } else { + this._renderTypeSpecificInput(`sub_${i}`, subContentDiv, subType); + } + }; + + subTypeSelect.addEventListener('change', (e) => { + this.data[`subType${i}`] = e.target.value; + renderSubInputs(); + }); + + row.appendChild(colDiv); + + this._renderTypeSpecificInput(i, contentDiv); + renderSubInputs(); + } + + this.inputsContainer.appendChild(row); + } + + _renderTypeSpecificInput(i, container, explicitType) { + container.innerHTML = ''; + + // Remove tracking of previous instance + if (this.activeInstances[i]) { + delete this.activeInstances[i]; + } + + const typeContainer = document.createElement('div'); + typeContainer.className = 'mb-3'; + container.appendChild(typeContainer); + + const type = explicitType || this.data[`type${i}`] || 'html'; + + // Check if type is a dynamic editor plugin registered in window.SISEditorPlugins + if (window.SISEditorPlugins && window.SISEditorPlugins[type]) { + try { + const pluginEntry = window.SISEditorPlugins[type]; + const pluginClass = pluginEntry.class; + const pluginConfig = pluginEntry.config || {}; + let parsedData = {}; + if (this.data[`col${i}`]) { + try { + parsedData = typeof this.data[`col${i}`] === 'string' ? JSON.parse(this.data[`col${i}`]) : this.data[`col${i}`]; + } catch (e) { + parsedData = { html: this.data[`col${i}`] }; // fallback + } + } + const instance = new pluginClass({ + data: parsedData, + api: this.api, + readOnly: this.readOnly, + config: pluginConfig, + block: { + id: 'nested-grid-' + i + '-' + Math.random().toString(36).substring(7), + name: type, + holder: typeContainer, + isEmpty: false, + selected: false, + stretched: false, + tunes: {} + } + }); + this.activeInstances[i] = instance; + + const element = instance.render(); + typeContainer.appendChild(element); + + // Fix for Editor.js Image plugin 404 errors (spinner hangs forever) + if (type === 'image') { + // Custom UI override for nested images + const injectCustomButtons = () => { + if (element.querySelector('.sis-custom-image-controls')) return; + + const fileBtn = element.querySelector('.cdx-button'); + if (fileBtn) { + fileBtn.style.display = 'none'; // Hide native button + } + + const controls = document.createElement('div'); + controls.className = 'sis-custom-image-controls mt-2 p-2 border rounded bg-light'; + controls.style.display = 'flex'; + controls.style.flexDirection = 'column'; + controls.style.gap = '8px'; + + controls.innerHTML = ` +
Image Controls
+ + + + + `; + + const uploadBtn = controls.querySelector(`#btn-upload-img-${i}`); + if (uploadBtn && fileBtn) { + uploadBtn.addEventListener('click', (e) => { + e.preventDefault(); + fileBtn.click(); + }); + } + + const urlBtn = controls.querySelector(`#btn-fetch-url-${i}`); + if (urlBtn) { + urlBtn.addEventListener('click', (e) => { + e.preventDefault(); + e.stopPropagation(); + const url = prompt('Enter Image URL:'); + if (url && url.trim() !== '') { + this.data[`col${i}`] = { + file: { url: url.trim() }, + caption: '', + withBorder: false, + withBackground: false, + stretched: false + }; + this._renderTypeSpecificInput(i, container); + } + }); + } + + const mediaBtn = controls.querySelector(`#btn-media-lib-${i}`); + if (mediaBtn) { + mediaBtn.addEventListener('click', (e) => { + e.preventDefault(); + e.stopPropagation(); + if (window.SISMediaPicker) { + SISMediaPicker.open((url, mediaObj, config) => { + if (url) { + this.data[`col${i}`] = { + file: { url: url }, + caption: (config && config.alt) || '', + withBorder: false, + withBackground: false, + stretched: false + }; + if (config) { + this.data[`imgStyle${i}`] = config.style || ''; + this.data[`imgClass${i}`] = config.cssClass || ''; + this.data[`imgAlt${i}`] = config.alt || ''; + this.data[`imgAttrs${i}`] = config.customAttributes || ''; + this.data[`imgAspectRatio${i}`] = config.aspectRatio || ''; + } + this._renderTypeSpecificInput(i, container); + } + }); + } else { + alert('Media Library is not yet configured on this system.'); + } + }); + } + + const clearBtn = controls.querySelector(`#btn-clear-img-${i}`); + if (clearBtn) { + clearBtn.addEventListener('click', (e) => { + e.preventDefault(); + e.stopPropagation(); + if (confirm('Are you sure you want to remove this image?')) { + this.data[`col${i}`] = ''; + this._renderTypeSpecificInput(i, container); + } + }); + } + + element.appendChild(controls); + }; + injectCustomButtons(); + + const handleImageError = () => { + element.classList.remove('image-tool--loading'); + element.classList.add('image-tool--empty'); + const preloader = element.querySelector('.image-tool__image-preloader'); + if (preloader) preloader.style.display = 'none'; + }; + + const observer = new MutationObserver((mutations) => { + mutations.forEach(mutation => { + mutation.addedNodes.forEach(node => { + if (node.tagName === 'IMG') { + node.addEventListener('error', handleImageError); + } + }); + }); + }); + observer.observe(element, { childList: true, subtree: true }); + + const existingImg = element.querySelector('img'); + if (existingImg) existingImg.addEventListener('error', handleImageError); + } + } catch (err) { + console.error(`Failed to render plugin ${type} inside GridTool:`, err); + typeContainer.innerHTML = `
Error loading plugin ${type}
`; + } + } else if (type === 'html') { + const textarea = document.createElement('textarea'); + textarea.className = 'form-control form-control-sm'; + textarea.style.minHeight = '140px'; + textarea.style.fontSize = '12px'; + textarea.placeholder = `HTML / Text for Column ${i}...`; + textarea.value = typeof this.data[`col${i}`] === 'object' ? JSON.stringify(this.data[`col${i}`]) : this.data[`col${i}`] || ''; + if (this.readOnly) textarea.disabled = true; + + textarea.addEventListener('input', (e) => { + this.data[`col${i}`] = e.target.value; + }); + typeContainer.appendChild(textarea); + + } else if (type === 'image') { + const inputGroup = document.createElement('div'); + inputGroup.className = 'input-group input-group-sm mb-2'; + + const input = document.createElement('input'); + input.type = 'text'; + input.className = 'form-control form-control-sm'; + input.placeholder = 'Paste image URL here...'; + input.value = this.data[`imgUrl${i}`] || ''; + if (this.readOnly) input.disabled = true; + + const appendDiv = document.createElement('div'); + appendDiv.className = 'input-group-append'; + + const chooseBtn = document.createElement('button'); + chooseBtn.type = 'button'; + chooseBtn.className = 'btn btn-outline-secondary'; + chooseBtn.innerText = 'Choose'; + if (this.readOnly) chooseBtn.disabled = true; + chooseBtn.addEventListener('click', () => { + if (window.SISMediaPicker) { + SISMediaPicker.open((selectedUrl, mediaObj, config) => { + input.value = selectedUrl; + this.data[`imgUrl${i}`] = selectedUrl; + if (config) { + this.data[`imgStyle${i}`] = config.style || ''; + this.data[`imgClass${i}`] = config.cssClass || ''; + this.data[`imgAlt${i}`] = config.alt || ''; + this.data[`imgAttrs${i}`] = config.customAttributes || ''; + this.data[`imgAspectRatio${i}`] = config.aspectRatio || ''; + } + previewImg.src = selectedUrl; + previewBox.style.display = 'block'; + }); + } else { + alert('Media Picker modal helper is not loaded.'); + } + }); + + const uploadBtn = document.createElement('button'); + uploadBtn.type = 'button'; + uploadBtn.className = 'btn btn-outline-primary'; + uploadBtn.innerText = 'Upload'; + if (this.readOnly) uploadBtn.disabled = true; + + const fileInput = document.createElement('input'); + fileInput.type = 'file'; + fileInput.accept = 'image/*'; + fileInput.style.display = 'none'; + + uploadBtn.addEventListener('click', () => fileInput.click()); + fileInput.addEventListener('change', async (e) => { + const file = e.target.files[0]; + if (!file) return; + + const formData = new FormData(); + formData.append('image', file); + + uploadBtn.disabled = true; + uploadBtn.innerText = '...'; + + try { + const response = await fetch('/api/manage/media/upload', { + method: 'POST', + body: formData + }); + const result = await response.json(); + if (result.success && result.file && result.file.url) { + const url = result.file.url; + input.value = url; + this.data[`imgUrl${i}`] = url; + previewImg.src = url; + previewBox.style.display = 'block'; + } else { + alert('Upload failed: ' + (result.message || 'Unknown error')); + } + } catch (err) { + console.error(err); + alert('Upload error occurred.'); + } finally { + uploadBtn.disabled = false; + uploadBtn.innerText = 'Upload'; + } + }); + + appendDiv.appendChild(chooseBtn); + appendDiv.appendChild(uploadBtn); + inputGroup.appendChild(input); + inputGroup.appendChild(appendDiv); + typeContainer.appendChild(inputGroup); + typeContainer.appendChild(fileInput); + + const previewBox = document.createElement('div'); + previewBox.className = 'border rounded p-1 text-center bg-light'; + previewBox.style.display = this.data[`imgUrl${i}`] ? 'block' : 'none'; + previewBox.style.maxHeight = '150px'; + previewBox.style.overflow = 'hidden'; + + const previewImg = document.createElement('img'); + previewImg.src = this.data[`imgUrl${i}`] || ''; + previewImg.style.maxWidth = '100%'; + previewImg.style.maxHeight = '140px'; + previewImg.style.objectFit = 'contain'; + + previewBox.appendChild(previewImg); + typeContainer.appendChild(previewBox); + + input.addEventListener('input', (e) => { + const val = e.target.value.trim(); + this.data[`imgUrl${i}`] = val; + if (val) { + previewImg.src = val; + previewBox.style.display = 'block'; + } else { + previewBox.style.display = 'none'; + } + }); + + } else if (type === 'youtube') { + const input = document.createElement('input'); + input.type = 'text'; + input.className = 'form-control form-control-sm mb-2'; + input.placeholder = 'Paste YouTube video URL...'; + input.value = this.data[`ytUrl${i}`] || ''; + if (this.readOnly) input.disabled = true; + + const preview = document.createElement('div'); + preview.className = 'small text-muted p-2 bg-light border rounded'; + preview.innerText = 'Format: https://www.youtube.com/watch?v=XXXXXX'; + + input.addEventListener('input', (e) => { + this.data[`ytUrl${i}`] = e.target.value.trim(); + }); + + typeContainer.appendChild(input); + typeContainer.appendChild(preview); + + } else if (type === 'accordion') { + const titleInput = document.createElement('input'); + titleInput.type = 'text'; + titleInput.className = 'form-control form-control-sm mb-2'; + titleInput.placeholder = 'Accordion Title...'; + titleInput.value = this.data[`accTitle${i}`] || ''; + if (this.readOnly) titleInput.disabled = true; + + const contentTextarea = document.createElement('textarea'); + contentTextarea.className = 'form-control form-control-sm'; + contentTextarea.style.minHeight = '90px'; + contentTextarea.style.fontSize = '12px'; + contentTextarea.placeholder = 'Accordion Body HTML...'; + contentTextarea.value = this.data[`accContent${i}`] || ''; + if (this.readOnly) contentTextarea.disabled = true; + + titleInput.addEventListener('input', (e) => { + this.data[`accTitle${i}`] = e.target.value; + }); + contentTextarea.addEventListener('input', (e) => { + this.data[`accContent${i}`] = e.target.value; + }); + + typeContainer.appendChild(titleInput); + typeContainer.appendChild(contentTextarea); + } + + + + // Advanced Settings (ID and Class) + const advancedHeader = document.createElement('div'); + advancedHeader.className = 'font-weight-bold text-muted small mb-2'; + advancedHeader.style.fontSize = '10px'; + advancedHeader.innerText = 'ADVANCED SETTINGS'; + container.appendChild(advancedHeader); + + const advRow = document.createElement('div'); + advRow.className = 'form-row'; + + const classCol = document.createElement('div'); + classCol.className = 'col'; + const classInput = document.createElement('input'); + classInput.type = 'text'; + classInput.className = 'form-control form-control-sm'; + classInput.style.fontSize = '11px'; + classInput.placeholder = 'CSS Class(es)...'; + classInput.value = this.data[`class${i}`] || ''; + if (this.readOnly) classInput.disabled = true; + classInput.addEventListener('input', (e) => { + this.data[`class${i}`] = e.target.value.trim(); + }); + classCol.appendChild(classInput); + + const idCol = document.createElement('div'); + idCol.className = 'col'; + const idInput = document.createElement('input'); + idInput.type = 'text'; + idInput.className = 'form-control form-control-sm'; + idInput.style.fontSize = '11px'; + idInput.placeholder = 'HTML ID...'; + idInput.value = this.data[`id${i}`] || ''; + if (this.readOnly) idInput.disabled = true; + idInput.addEventListener('input', (e) => { + this.data[`id${i}`] = e.target.value.trim(); + }); + idCol.appendChild(idInput); + + advRow.appendChild(classCol); + advRow.appendChild(idCol); + container.appendChild(advRow); + } + + save(blockContent) { + const savedData = { + cols: this.data.cols, + globalClass: this.globalClassInput ? this.globalClassInput.value.trim() : (this.data.globalClass || ''), + globalId: this.globalIdInput ? this.globalIdInput.value.trim() : (this.data.globalId || ''), + globalAttributes: this.globalAttrInput ? this.globalAttrInput.value.trim() : (this.data.globalAttributes || '') + }; + for (let i = 1; i <= this.data.cols; i++) { + const type = this.data[`type${i}`] || 'html'; + savedData[`type${i}`] = type; + + // If it is a dynamically nested plugin, save its output data + if (this.activeInstances[i]) { + try { + const pluginData = this.activeInstances[i].save(); + savedData[`col${i}`] = pluginData; + } catch (e) { + console.error(`Failed to save plugin ${type} inside GridTool:`, e); + savedData[`col${i}`] = this.data[`col${i}`]; + } + } else { + savedData[`col${i}`] = this.data[`col${i}`] || ''; + } + + savedData[`imgUrl${i}`] = this.data[`imgUrl${i}`] || ''; + savedData[`ytUrl${i}`] = this.data[`ytUrl${i}`] || ''; + savedData[`accTitle${i}`] = this.data[`accTitle${i}`] || ''; + savedData[`accContent${i}`] = this.data[`accContent${i}`] || ''; + savedData[`class${i}`] = this.data[`class${i}`] || ''; + savedData[`id${i}`] = this.data[`id${i}`] || ''; + savedData[`attr${i}`] = this.data[`attr${i}`] || ''; + savedData[`width${i}`] = this.data[`width${i}`] || 0; + savedData[`caption${i}`] = this.data[`caption${i}`] || ''; + + // Sub-plugin serialization + const subType = this.data[`subType${i}`] || 'none'; + savedData[`subType${i}`] = subType; + + if (this.activeInstances[`sub_${i}`]) { + try { + const subPluginData = this.activeInstances[`sub_${i}`].save(); + savedData[`colsub_${i}`] = subPluginData; + } catch (e) { + console.error(`Failed to save sub-plugin ${subType} inside GridTool:`, e); + savedData[`colsub_${i}`] = this.data[`colsub_${i}`]; + } + } else { + savedData[`colsub_${i}`] = this.data[`colsub_${i}`] || ''; + } + + savedData[`imgUrlsub_${i}`] = this.data[`imgUrlsub_${i}`] || ''; + savedData[`ytUrlsub_${i}`] = this.data[`ytUrlsub_${i}`] || ''; + savedData[`accTitlesub_${i}`] = this.data[`accTitlesub_${i}`] || ''; + savedData[`accContentsub_${i}`] = this.data[`accContentsub_${i}`] || ''; + savedData[`classsub_${i}`] = this.data[`classsub_${i}`] || ''; + savedData[`idsub_${i}`] = this.data[`idsub_${i}`] || ''; + savedData[`attrsub_${i}`] = this.data[`attrsub_${i}`] || ''; + } + return savedData; + } +} + +// Register the plugin globally +window.SISEditorPlugins = window.SISEditorPlugins || {}; +window.SISEditorPlugins['grid'] = { + class: GridTool +}; diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/header.umd.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/header.umd.js.download new file mode 100644 index 00000000..88edc52d --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/header.umd.js.download @@ -0,0 +1,9 @@ +(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ce-header{padding:.6em 0 3px;margin:0;line-height:1.25em;outline:none}.ce-header p,.ce-header div{padding:0!important;margin:0!important}")),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})(); +(function(n,s){typeof exports=="object"&&typeof module<"u"?module.exports=s():typeof define=="function"&&define.amd?define(s):(n=typeof globalThis<"u"?globalThis:n||self,n.Header=s())})(this,function(){"use strict";const n="",s='',a='',h='',d='',u='',g='',c='';/** + * Header block for the Editor.js. + * + * @author CodeX (team@ifmo.su) + * @copyright CodeX 2018 + * @license MIT + * @version 2.0.0 + */class v{constructor({data:e,config:t,api:i,readOnly:r}){this.api=i,this.readOnly=r,this._settings=t,this._data=this.normalizeData(e),this._element=this.getTag()}get _CSS(){return{block:this.api.styles.block,wrapper:"ce-header"}}isHeaderData(e){return e.text!==void 0}normalizeData(e){const t={text:"",level:this.defaultLevel.number};return this.isHeaderData(e)&&(t.text=e.text||"",e.level!==void 0&&!isNaN(parseInt(e.level.toString()))&&(t.level=parseInt(e.level.toString()))),t}render(){return this._element}renderSettings(){return this.levels.map(e=>({icon:e.svg,label:this.api.i18n.t(`Heading ${e.number}`),onActivate:()=>this.setLevel(e.number),closeOnActivate:!0,isActive:this.currentLevel.number===e.number,render:()=>document.createElement("div")}))}setLevel(e){this.data={level:e,text:this.data.text}}merge(e){this._element.insertAdjacentHTML("beforeend",e.text)}validate(e){return e.text.trim()!==""}save(e){return{text:e.innerHTML,level:this.currentLevel.number}}static get conversionConfig(){return{export:"text",import:"text"}}static get sanitize(){return{level:!1,text:{}}}static get isReadOnlySupported(){return!0}get data(){return this._data.text=this._element.innerHTML,this._data.level=this.currentLevel.number,this._data}set data(e){if(this._data=this.normalizeData(e),e.level!==void 0&&this._element.parentNode){const t=this.getTag();t.innerHTML=this._element.innerHTML,this._element.parentNode.replaceChild(t,this._element),this._element=t}e.text!==void 0&&(this._element.innerHTML=this._data.text||"")}getTag(){const e=document.createElement(this.currentLevel.tag);return e.innerHTML=this._data.text||"",e.classList.add(this._CSS.wrapper),e.contentEditable=this.readOnly?"false":"true",e.dataset.placeholder=this.api.i18n.t(this._settings.placeholder||""),e}get currentLevel(){let e=this.levels.find(t=>t.number===this._data.level);return e||(e=this.defaultLevel),e}get defaultLevel(){if(this._settings.defaultLevel){const e=this.levels.find(t=>t.number===this._settings.defaultLevel);if(e)return e;console.warn("(ง'̀-'́)ง Heading Tool: the default level specified was not found in available levels")}return this.levels[1]}get levels(){const e=[{number:1,tag:"H1",svg:s},{number:2,tag:"H2",svg:a},{number:3,tag:"H3",svg:h},{number:4,tag:"H4",svg:d},{number:5,tag:"H5",svg:u},{number:6,tag:"H6",svg:g}];return this._settings.levels?e.filter(t=>this._settings.levels.includes(t.number)):e}onPaste(e){const t=e.detail;if("data"in t){const i=t.data;let r=this.defaultLevel.number;switch(i.tagName){case"H1":r=1;break;case"H2":r=2;break;case"H3":r=3;break;case"H4":r=4;break;case"H5":r=5;break;case"H6":r=6;break}this._settings.levels&&(r=this._settings.levels.reduce((o,l)=>Math.abs(l-r)' + }; + } + + constructor({ data, api, readOnly }) { + this.api = api; + this.readOnly = readOnly; + this.data = { + title: (data && data.title) ? data.title : '', + subtitle: (data && data.subtitle) ? data.subtitle : '', + bgImage: (data && data.bgImage) ? data.bgImage : '', + btnText: (data && data.btnText) ? data.btnText : '', + btnLink: (data && data.btnLink) ? data.btnLink : '', + height: (data && data.height) ? data.height : '350px', + textAlign: (data && data.textAlign) ? data.textAlign : 'center', + overlayOpacity: (data && data.overlayOpacity !== undefined) ? data.overlayOpacity : '0.4', + stretched: (data && data.stretched !== undefined) ? !!data.stretched : true + }; + } + + render() { + const container = document.createElement('div'); + container.style.border = '1px solid #e3e6f0'; + container.style.borderRadius = '8px'; + container.style.padding = '14px'; + container.style.background = '#fff'; + container.style.marginBottom = '12px'; + + const headerLabel = document.createElement('label'); + headerLabel.className = 'font-weight-bold text-primary small mb-2 d-block'; + headerLabel.innerHTML = ' Hero Banner Block Settings'; + container.appendChild(headerLabel); + + // Stretch toggle + const stretchWrapper = document.createElement('div'); + stretchWrapper.className = 'custom-control custom-switch mb-3'; + const stretchCheck = document.createElement('input'); + stretchCheck.type = 'checkbox'; + stretchCheck.className = 'custom-control-input'; + stretchCheck.id = 'hero_stretch_' + Math.random().toString(36).substring(7); + stretchCheck.checked = !!this.data.stretched; + + const stretchLabel = document.createElement('label'); + stretchLabel.className = 'custom-control-label small font-weight-bold text-secondary'; + stretchLabel.htmlFor = stretchCheck.id; + stretchLabel.innerHTML = ' Stretch Banner to Full Screen Width'; + + stretchCheck.addEventListener('change', () => { + this.data.stretched = stretchCheck.checked; + }); + stretchWrapper.appendChild(stretchCheck); + stretchWrapper.appendChild(stretchLabel); + container.appendChild(stretchWrapper); + + // Inputs + this.titleInput = this._createInput('Banner Title', 'e.g. Bệnh Viện Đa Khoa Quốc Tế S.I.S Cần Thơ', this.data.title); + this.subtitleInput = this._createInput('Subtitle / Description', 'e.g. Trao niềm tin - Nhận sức khỏe...', this.data.subtitle); + this.bgImageInput = this._createImageInput('Background Image URL', 'https://example.com/hero-banner.jpg', this.data.bgImage); + + // Row for Height & Button Link + const configRow = document.createElement('div'); + configRow.className = 'form-row'; + + const heightCol = document.createElement('div'); + heightCol.className = 'col-md-4 mb-2'; + this.heightInput = this._createInput('Banner Height (e.g. 350px, 500px, 60vh)', 'e.g. 350px', this.data.height); + heightCol.appendChild(this.heightInput); + + const btnCol1 = document.createElement('div'); + btnCol1.className = 'col-md-4 mb-2'; + this.btnTextInput = this._createInput('Button Text (Optional)', 'e.g. Đặt Lịch Khám', this.data.btnText); + btnCol1.appendChild(this.btnTextInput); + + const btnCol2 = document.createElement('div'); + btnCol2.className = 'col-md-4 mb-2'; + this.btnLinkInput = this._createInput('Button Link URL (Optional)', 'e.g. /dat-lich', this.data.btnLink); + btnCol2.appendChild(this.btnLinkInput); + + configRow.appendChild(heightCol); + configRow.appendChild(btnCol1); + configRow.appendChild(btnCol2); + + // Live Preview Box + const previewBox = document.createElement('div'); + previewBox.className = 'hero-banner-preview p-4 rounded text-white my-2'; + previewBox.style.position = 'relative'; + previewBox.style.minHeight = this.data.height || '350px'; + previewBox.style.display = 'flex'; + previewBox.style.flexDirection = 'column'; + previewBox.style.justifyContent = 'center'; + previewBox.style.alignItems = 'center'; + previewBox.style.textAlign = 'center'; + previewBox.style.backgroundSize = 'cover'; + previewBox.style.backgroundPosition = 'center'; + previewBox.style.overflow = 'hidden'; + + const overlay = document.createElement('div'); + overlay.style.position = 'absolute'; + overlay.style.top = '0'; + overlay.style.left = '0'; + overlay.style.right = '0'; + overlay.style.bottom = '0'; + overlay.style.background = '#000'; + overlay.style.zIndex = '1'; + previewBox.appendChild(overlay); + + const contentBox = document.createElement('div'); + contentBox.style.position = 'relative'; + contentBox.style.zIndex = '2'; + previewBox.appendChild(contentBox); + + const updatePreview = () => { + const bg = this.bgImageInput.querySelector('input').value.trim(); + const title = this.titleInput.querySelector('input').value.trim() || 'Hero Banner Title'; + const sub = this.subtitleInput.querySelector('input').value.trim(); + const btnT = this.btnTextInput.querySelector('input').value.trim(); + const bannerH = this.heightInput.querySelector('input').value.trim() || '350px'; + + previewBox.style.minHeight = bannerH; + previewBox.style.backgroundImage = bg ? 'url("' + bg + '")' : 'linear-gradient(135deg, #002554, #881C1C)'; + overlay.style.opacity = this.data.overlayOpacity || '0.4'; + + let html = '

' + title + '

'; + if (sub) html += '

' + sub + '

'; + if (btnT) html += '' + btnT + ''; + contentBox.innerHTML = html; + }; + + [this.titleInput, this.subtitleInput, this.bgImageInput].forEach(wrapper => { + const input = wrapper.querySelector('input'); + input.addEventListener('input', updatePreview); + if (this.readOnly) input.disabled = true; + container.appendChild(wrapper); + }); + + [this.heightInput, this.btnTextInput, this.btnLinkInput].forEach(wrapper => { + const input = wrapper.querySelector('input'); + input.addEventListener('input', updatePreview); + if (this.readOnly) input.disabled = true; + }); + + container.appendChild(configRow); + container.appendChild(previewBox); + updatePreview(); + + return container; + } + + _createInput(labelText, placeholder, value) { + const wrapper = document.createElement('div'); + wrapper.className = 'form-group mb-2'; + const lbl = document.createElement('label'); + lbl.className = 'small font-weight-bold text-secondary mb-1 d-block'; + lbl.innerText = labelText; + const inp = document.createElement('input'); + inp.type = 'text'; + inp.className = 'form-control form-control-sm'; + inp.placeholder = placeholder; + inp.value = value || ''; + wrapper.appendChild(lbl); + wrapper.appendChild(inp); + return wrapper; + } + + _createImageInput(labelText, placeholder, value) { + const wrapper = document.createElement('div'); + wrapper.className = 'form-group mb-2'; + + const lbl = document.createElement('label'); + lbl.className = 'small font-weight-bold text-secondary mb-1 d-block'; + lbl.innerText = labelText; + wrapper.appendChild(lbl); + + const inputGroup = document.createElement('div'); + inputGroup.className = 'input-group input-group-sm'; + + const inp = document.createElement('input'); + inp.type = 'text'; + inp.className = 'form-control'; + inp.placeholder = placeholder; + inp.value = value || ''; + if (this.readOnly) inp.disabled = true; + inputGroup.appendChild(inp); + + if (!this.readOnly) { + const appendDiv = document.createElement('div'); + appendDiv.className = 'input-group-append'; + + const mediaBtn = document.createElement('button'); + mediaBtn.type = 'button'; + mediaBtn.className = 'btn btn-outline-info'; + mediaBtn.innerHTML = ' Media Library'; + mediaBtn.addEventListener('click', () => { + if (window.SISMediaPicker) { + SISMediaPicker.open((selectedUrl, mediaObj, config) => { + inp.value = selectedUrl; + if (config) { + this._bgImageConfig = config; + } + // Dispatch input event to trigger preview update + inp.dispatchEvent(new Event('input', { bubbles: true })); + }); + } else { + alert('Media modal function openSISMediaModal is not available.'); + } + }); + appendDiv.appendChild(mediaBtn); + inputGroup.appendChild(appendDiv); + } + + wrapper.appendChild(inputGroup); + return wrapper; + } + + save(blockContent) { + const stretchCheck = blockContent.querySelector('.custom-control-input'); + return { + title: this.titleInput ? this.titleInput.querySelector('input').value : this.data.title, + subtitle: this.subtitleInput ? this.subtitleInput.querySelector('input').value : this.data.subtitle, + bgImage: this.bgImageInput ? this.bgImageInput.querySelector('input').value : this.data.bgImage, + bgImageStyle: (this._bgImageConfig && this._bgImageConfig.style) || this.data.bgImageStyle || '', + bgImageClass: (this._bgImageConfig && this._bgImageConfig.cssClass) || this.data.bgImageClass || '', + bgImageAlt: (this._bgImageConfig && this._bgImageConfig.alt) || this.data.bgImageAlt || '', + bgImageAttrs: (this._bgImageConfig && this._bgImageConfig.customAttributes) || this.data.bgImageAttrs || '', + bgImageAspectRatio: (this._bgImageConfig && this._bgImageConfig.aspectRatio) || this.data.bgImageAspectRatio || '', + btnText: this.btnTextInput ? this.btnTextInput.querySelector('input').value : this.data.btnText, + btnLink: this.btnLinkInput ? this.btnLinkInput.querySelector('input').value : this.data.btnLink, + height: this.heightInput ? this.heightInput.querySelector('input').value : this.data.height, + textAlign: this.data.textAlign || 'center', + overlayOpacity: this.data.overlayOpacity || '0.4', + stretched: stretchCheck ? stretchCheck.checked : !!this.data.stretched + }; + } +} + +// Register plugin globally +window.SISEditorPlugins = window.SISEditorPlugins || {}; +window.SISEditorPlugins['hero'] = { class: SISHeroBannerTool }; diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/hover-card.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/hover-card.js.download new file mode 100644 index 00000000..53427d87 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/hover-card.js.download @@ -0,0 +1,473 @@ +/** + * SISHoverCardTool — Dedicated Hover Cards Block Tool for Editor.js + * Allows content managers to freely add, remove, reorder, and configure interactive hover cards. + */ +class SISHoverCardTool { + static get toolbox() { + return { + title: 'Hover Cards', + icon: '' + }; + } + + constructor({ data, api, readOnly }) { + this.api = api; + this.readOnly = readOnly; + this.instanceId = 'hc_' + Math.random().toString(36).substring(7); + this.data = { + cols: parseInt(data && data.cols) || 4, + styleVariant: (data && data.styleVariant) || 'v1', + globalClass: (data && data.globalClass) || 'sis-hover-card-section', + globalId: (data && data.globalId) || '', + globalAttributes: (data && data.globalAttributes) || (data && data.attributes) || '', + items: (data && data.items && Array.isArray(data.items)) ? data.items : [] + }; + + // Add initial default item if list is empty + if (this.data.items.length === 0) { + this.data.items.push({ + title: 'Card Title', + description: 'Card description text...', + imageUrl: '', + active: true + }); + } + this.wrapper = undefined; + } + + render() { + this.wrapper = document.createElement('div'); + this.wrapper.className = 'p-3 bg-light border rounded mb-3 ce-hovercard-tool-wrapper'; + this.wrapper.style.fontFamily = 'inherit'; + + const titleLabel = document.createElement('div'); + titleLabel.className = 'font-weight-bold text-primary small mb-3'; + titleLabel.innerHTML = ' Dedicated Hover Cards Settings'; + this.wrapper.appendChild(titleLabel); + + // Global Settings Row + const settingsRow = document.createElement('div'); + settingsRow.className = 'form-row mb-3 pb-2 border-bottom'; + + // 1. Cols selector + const colDiv = document.createElement('div'); + colDiv.className = 'col-md-3 mb-2'; + colDiv.innerHTML = ''; + const colSelect = document.createElement('select'); + colSelect.className = 'form-control form-control-sm'; + [1, 2, 3, 4, 6].forEach(num => { + const opt = document.createElement('option'); + opt.value = num; + opt.textContent = `${num} Column${num > 1 ? 's' : ''}`; + if (num === this.data.cols) opt.selected = true; + colSelect.appendChild(opt); + }); + if (this.readOnly) colSelect.disabled = true; + colSelect.addEventListener('change', (e) => { + this.data.cols = parseInt(e.target.value) || 4; + }); + this.colsSelect = colSelect; + colDiv.appendChild(colSelect); + settingsRow.appendChild(colDiv); + + // 2. Style Variant Selector (Hover 1 vs Hover 2) + const variantDiv = document.createElement('div'); + variantDiv.className = 'col-md-3 mb-2'; + variantDiv.innerHTML = ''; + const variantSelect = document.createElement('select'); + variantSelect.className = 'form-control form-control-sm'; + + const optV1 = document.createElement('option'); + optV1.value = 'v1'; + optV1.textContent = 'Hover 1 (Standard Light)'; + if (this.data.styleVariant === 'v1') optV1.selected = true; + variantSelect.appendChild(optV1); + + const optV2 = document.createElement('option'); + optV2.value = 'v2'; + optV2.textContent = 'Hover 2 (Modern Blue & Glow)'; + if (this.data.styleVariant === 'v2') optV2.selected = true; + variantSelect.appendChild(optV2); + + if (this.readOnly) variantSelect.disabled = true; + variantSelect.addEventListener('change', (e) => { + this.data.styleVariant = e.target.value; + }); + this.variantSelect = variantSelect; + variantDiv.appendChild(variantSelect); + settingsRow.appendChild(variantDiv); + + // 2. Global CSS Class + const classDiv = document.createElement('div'); + classDiv.className = 'col-md-3 mb-2'; + classDiv.innerHTML = ''; + const classInput = document.createElement('input'); + classInput.type = 'text'; + classInput.className = 'form-control form-control-sm'; + classInput.placeholder = 'e.g. sis-hover-card-section'; + classInput.value = this.data.globalClass || ''; + if (this.readOnly) classInput.disabled = true; + classInput.addEventListener('input', (e) => this.data.globalClass = e.target.value.trim()); + this.globalClassInput = classInput; + classDiv.appendChild(classInput); + settingsRow.appendChild(classDiv); + + // 3. Global HTML ID + const idDiv = document.createElement('div'); + idDiv.className = 'col-md-3 mb-2'; + idDiv.innerHTML = ''; + const idInput = document.createElement('input'); + idInput.type = 'text'; + idInput.className = 'form-control form-control-sm'; + idInput.placeholder = 'e.g. hover-cards-section'; + idInput.value = this.data.globalId || ''; + if (this.readOnly) idInput.disabled = true; + idInput.addEventListener('input', (e) => this.data.globalId = e.target.value.trim()); + this.globalIdInput = idInput; + idDiv.appendChild(idInput); + settingsRow.appendChild(idDiv); + + // 4. Global Custom Attributes + const attrDiv = document.createElement('div'); + attrDiv.className = 'col-md-3 mb-2'; + attrDiv.innerHTML = ''; + const attrInput = document.createElement('input'); + attrInput.type = 'text'; + attrInput.className = 'form-control form-control-sm'; + attrInput.placeholder = 'e.g. data-aos="fade-up" style="..."'; + attrInput.value = this.data.globalAttributes || ''; + if (this.readOnly) attrInput.disabled = true; + attrInput.addEventListener('input', (e) => this.data.globalAttributes = e.target.value.trim()); + this.globalAttrInput = attrInput; + attrDiv.appendChild(attrInput); + settingsRow.appendChild(attrDiv); + + this.wrapper.appendChild(settingsRow); + + // Cards items container + this.itemsContainer = document.createElement('div'); + this.wrapper.appendChild(this.itemsContainer); + + this._renderAllItems(); + + if (!this.readOnly) { + const addButton = document.createElement('button'); + addButton.type = 'button'; + addButton.className = 'btn btn-sm btn-success mt-2'; + addButton.innerHTML = ' Add Hover Card'; + addButton.addEventListener('click', () => { + this.data.items.push({ + title: 'New Card Title', + description: 'New card description text...', + imageUrl: '', + active: false + }); + this._renderAllItems(); + }); + this.wrapper.appendChild(addButton); + } + + return this.wrapper; + } + + _renderAllItems() { + this.itemsContainer.innerHTML = ''; + this.data.items.forEach((item, index) => { + this._renderItem(item, index); + }); + } + + _renderItem(item, index) { + const itemBox = document.createElement('div'); + itemBox.className = 'mb-3 p-3 bg-white border rounded shadow-sm'; + itemBox.style.position = 'relative'; + + // Top Control Action buttons (Move Up, Move Down, Delete) + if (!this.readOnly) { + const actionGroup = document.createElement('div'); + actionGroup.style.position = 'absolute'; + actionGroup.style.top = '10px'; + actionGroup.style.right = '10px'; + actionGroup.className = 'btn-group btn-group-sm'; + + if (index > 0) { + const upBtn = document.createElement('button'); + upBtn.type = 'button'; + upBtn.className = 'btn btn-outline-secondary'; + upBtn.innerHTML = ''; + upBtn.title = 'Move Up'; + upBtn.addEventListener('click', () => { + const temp = this.data.items[index]; + this.data.items[index] = this.data.items[index - 1]; + this.data.items[index - 1] = temp; + this._renderAllItems(); + }); + actionGroup.appendChild(upBtn); + } + + if (index < this.data.items.length - 1) { + const downBtn = document.createElement('button'); + downBtn.type = 'button'; + downBtn.className = 'btn btn-outline-secondary'; + downBtn.innerHTML = ''; + downBtn.title = 'Move Down'; + downBtn.addEventListener('click', () => { + const temp = this.data.items[index]; + this.data.items[index] = this.data.items[index + 1]; + this.data.items[index + 1] = temp; + this._renderAllItems(); + }); + actionGroup.appendChild(downBtn); + } + + const removeBtn = document.createElement('button'); + removeBtn.type = 'button'; + removeBtn.className = 'btn btn-danger'; + removeBtn.innerHTML = ''; + removeBtn.title = 'Remove Card'; + removeBtn.addEventListener('click', () => { + this.data.items.splice(index, 1); + this._renderAllItems(); + }); + actionGroup.appendChild(removeBtn); + + itemBox.appendChild(actionGroup); + } + + // Header Label + const itemHeader = document.createElement('h6'); + itemHeader.className = 'font-weight-bold text-dark mb-3'; + itemHeader.innerHTML = ` Card #${index + 1}`; + itemBox.appendChild(itemHeader); + + // 1. Card Title + const titleGroup = document.createElement('div'); + titleGroup.className = 'form-group mb-2'; + titleGroup.innerHTML = ''; + const titleInput = document.createElement('input'); + titleInput.type = 'text'; + titleInput.className = 'form-control form-control-sm'; + titleInput.placeholder = 'e.g. Tiên phong'; + titleInput.value = item.title || ''; + if (this.readOnly) titleInput.disabled = true; + titleInput.addEventListener('input', (e) => { item.title = e.target.value; }); + titleGroup.appendChild(titleInput); + itemBox.appendChild(titleGroup); + + // 2. Card Description + const descGroup = document.createElement('div'); + descGroup.className = 'form-group mb-2'; + descGroup.innerHTML = ''; + const descInput = document.createElement('textarea'); + descInput.className = 'form-control form-control-sm'; + descInput.rows = 2; + descInput.placeholder = 'e.g. Phát triển và ứng dụng kỹ thuật tiên tiến...'; + descInput.value = item.description || ''; + if (this.readOnly) descInput.disabled = true; + descInput.addEventListener('input', (e) => { item.description = e.target.value; }); + descGroup.appendChild(descInput); + itemBox.appendChild(descGroup); + + // 3. Image URL + Media Library Selector + const imgGroup = document.createElement('div'); + imgGroup.className = 'form-group mb-2'; + imgGroup.innerHTML = ''; + + const inputGroup = document.createElement('div'); + inputGroup.className = 'input-group input-group-sm mb-2'; + + const imgInput = document.createElement('input'); + imgInput.type = 'text'; + imgInput.className = 'form-control'; + imgInput.placeholder = '/uploads/2026/07/icon.jpg'; + imgInput.value = item.imageUrl || ''; + if (this.readOnly) imgInput.disabled = true; + + const previewContainer = document.createElement('div'); + previewContainer.className = 'mt-1'; + const updatePreview = (url) => { + previewContainer.innerHTML = ''; + if (url) { + const img = document.createElement('img'); + img.src = url; + img.style.maxHeight = '60px'; + img.style.maxWidth = '100px'; + img.style.objectFit = 'contain'; + img.className = 'border rounded p-1 bg-light'; + previewContainer.appendChild(img); + } + }; + updatePreview(item.imageUrl); + + imgInput.addEventListener('input', (e) => { + item.imageUrl = e.target.value.trim(); + updatePreview(item.imageUrl); + }); + + inputGroup.appendChild(imgInput); + + if (!this.readOnly) { + const appendDiv = document.createElement('div'); + appendDiv.className = 'input-group-append'; + + const mediaBtn = document.createElement('button'); + mediaBtn.type = 'button'; + mediaBtn.className = 'btn btn-outline-info'; + mediaBtn.innerHTML = ' Media Library'; + mediaBtn.addEventListener('click', () => { + if (window.SISMediaPicker) { + SISMediaPicker.open((selectedUrl, mediaObj, config) => { + imgInput.value = selectedUrl; + item.imageUrl = selectedUrl; + if (config) { + item.imageStyle = config.style || ''; + item.imageClass = config.cssClass || ''; + item.imageAlt = config.alt || ''; + item.imageAttrs = config.customAttributes || ''; + item.imageAspectRatio = config.aspectRatio || ''; + } + updatePreview(selectedUrl); + }); + } else { + alert('Media modal function openSISMediaModal is not available.'); + } + }); + appendDiv.appendChild(mediaBtn); + inputGroup.appendChild(appendDiv); + } + + imgGroup.appendChild(inputGroup); + imgGroup.appendChild(previewContainer); + itemBox.appendChild(imgGroup); + + // 4. Hover Icon / Image URL (Swapped on hover) + const hoverImgGroup = document.createElement('div'); + hoverImgGroup.className = 'form-group mb-2'; + hoverImgGroup.innerHTML = ''; + + const hoverInputGroup = document.createElement('div'); + hoverInputGroup.className = 'input-group input-group-sm mb-2'; + + const hoverImgInput = document.createElement('input'); + hoverImgInput.type = 'text'; + hoverImgInput.className = 'form-control'; + hoverImgInput.placeholder = '/uploads/2026/07/hover-icon.jpg (optional)'; + hoverImgInput.value = item.hoverImageUrl || ''; + if (this.readOnly) hoverImgInput.disabled = true; + + const hoverPreviewContainer = document.createElement('div'); + hoverPreviewContainer.className = 'mt-1'; + const updateHoverPreview = (url) => { + hoverPreviewContainer.innerHTML = ''; + if (url) { + const img = document.createElement('img'); + img.src = url; + img.style.maxHeight = '60px'; + img.style.maxWidth = '100px'; + img.style.objectFit = 'contain'; + img.className = 'border rounded p-1 bg-info text-white'; + hoverPreviewContainer.appendChild(img); + } + }; + updateHoverPreview(item.hoverImageUrl); + + hoverImgInput.addEventListener('input', (e) => { + item.hoverImageUrl = e.target.value.trim(); + updateHoverPreview(item.hoverImageUrl); + }); + + hoverInputGroup.appendChild(hoverImgInput); + + if (!this.readOnly) { + const appendDiv = document.createElement('div'); + appendDiv.className = 'input-group-append'; + + const mediaBtn = document.createElement('button'); + mediaBtn.type = 'button'; + mediaBtn.className = 'btn btn-outline-info'; + mediaBtn.innerHTML = ' Media Library'; + mediaBtn.addEventListener('click', () => { + if (window.SISMediaPicker) { + SISMediaPicker.open((selectedUrl, mediaObj, config) => { + hoverImgInput.value = selectedUrl; + item.hoverImageUrl = selectedUrl; + if (config) { + item.hoverImageStyle = config.style || ''; + item.hoverImageClass = config.cssClass || ''; + item.hoverImageAlt = config.alt || ''; + item.hoverImageAttrs = config.customAttributes || ''; + item.hoverImageAspectRatio = config.aspectRatio || ''; + } + updateHoverPreview(selectedUrl); + }); + } else { + alert('Media modal function openSISMediaModal is not available.'); + } + }); + appendDiv.appendChild(mediaBtn); + hoverInputGroup.appendChild(appendDiv); + } + + hoverImgGroup.appendChild(hoverInputGroup); + hoverImgGroup.appendChild(hoverPreviewContainer); + // Custom Attributes field for individual card + const cardAttrDiv = document.createElement('div'); + cardAttrDiv.className = 'form-group mb-2'; + cardAttrDiv.innerHTML = ''; + const cardAttrInput = document.createElement('input'); + cardAttrInput.type = 'text'; + cardAttrInput.className = 'form-control form-control-sm'; + cardAttrInput.placeholder = 'e.g. data-aos="fade-up" style="background:#fff"'; + cardAttrInput.value = item.attributes || ''; + if (this.readOnly) cardAttrInput.disabled = true; + cardAttrInput.addEventListener('input', (e) => { + item.attributes = e.target.value.trim(); + }); + cardAttrDiv.appendChild(cardAttrInput); + itemBox.appendChild(cardAttrDiv); + + // Default Active Radio (Only 1 option active at a time) + const activeRadioDiv = document.createElement('div'); + activeRadioDiv.className = 'custom-control custom-radio mt-2'; + const activeRadio = document.createElement('input'); + activeRadio.type = 'radio'; + activeRadio.name = 'hovercard_active_' + this.instanceId; + activeRadio.className = 'custom-control-input'; + const radioId = 'hovercard_active_' + index + '_' + Math.random().toString(36).substring(7); + activeRadio.id = radioId; + activeRadio.checked = !!item.active; + if (this.readOnly) activeRadio.disabled = true; + + activeRadio.addEventListener('change', () => { + this.data.items.forEach((it, i) => { + it.active = (i === index); + }); + }); + + const activeLabel = document.createElement('label'); + activeLabel.className = 'custom-control-label small font-weight-bold text-secondary'; + activeLabel.htmlFor = radioId; + activeLabel.innerHTML = 'Default Active Card (Only 1 active at a time)'; + + activeRadioDiv.appendChild(activeRadio); + activeRadioDiv.appendChild(activeLabel); + itemBox.appendChild(activeRadioDiv); + + this.itemsContainer.appendChild(itemBox); + } + + save() { + return { + cols: this.colsSelect ? parseInt(this.colsSelect.value) : (this.data.cols || 4), + styleVariant: this.variantSelect ? this.variantSelect.value : (this.data.styleVariant || 'v1'), + globalClass: this.globalClassInput ? this.globalClassInput.value.trim() : (this.data.globalClass || 'sis-hover-card-section'), + globalId: this.globalIdInput ? this.globalIdInput.value.trim() : (this.data.globalId || ''), + globalAttributes: this.globalAttrInput ? this.globalAttrInput.value.trim() : (this.data.globalAttributes || ''), + items: this.data.items || [] + }; + } +} + +// Register the plugin globally +window.SISEditorPlugins = window.SISEditorPlugins || {}; +window.SISEditorPlugins['hovercard'] = { class: SISHoverCardTool }; diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/html-snippet.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/html-snippet.js.download new file mode 100644 index 00000000..7fb75843 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/html-snippet.js.download @@ -0,0 +1,91 @@ +/** + * Custom Editor.js Block Tool for embedding predefined HTML snippets. + * Uses iframe for WYSIWYG preview - snippets look exactly like on the live page. + */ +class HtmlSnippetTool { + static get toolbox() { + return { + title: 'HTML Snippet', + icon: '' + }; + } + + constructor({ data, api }) { + this.data = { + id: data.id || '', + globalAttributes: data.globalAttributes || data.attributes || '' + }; + this.api = api; + this.wrapper = undefined; + } + + render() { + this.wrapper = document.createElement('div'); + this.wrapper.classList.add('ce-snippet-wrapper'); + this.wrapper.style.border = '1px solid #ddd'; + this.wrapper.style.borderRadius = '5px'; + this.wrapper.style.background = '#fafafa'; + this.wrapper.style.width = '100%'; + this.wrapper.style.boxSizing = 'border-box'; + + this._showInput(); + + return this.wrapper; + } + + _showInput() { + this.wrapper.innerHTML = ''; + + const title = document.createElement('h4'); + title.style.marginTop = '0'; + title.style.marginBottom = '10px'; + title.style.padding = '15px 15px 0 15px'; + title.innerText = 'HTML Snippet ID & Custom Attributes:'; + title.style.fontSize = '14px'; + title.style.color = '#333'; + + const inputContainer = document.createElement('div'); + inputContainer.style.display = 'flex'; + inputContainer.style.gap = '10px'; + inputContainer.style.padding = '0 15px 15px 15px'; + + const input = document.createElement('input'); + input.classList.add('ce-input'); + input.placeholder = 'Enter Snippet ID (e.g., test_banner)'; + input.value = this.data.id; + input.style.flex = '1'; + + input.addEventListener('input', (e) => { + this.data.id = e.target.value.trim(); + }); + + const attrInput = document.createElement('input'); + attrInput.classList.add('ce-input'); + attrInput.placeholder = 'Custom Attributes (e.g. data-aos="fade-up" style="...")'; + attrInput.value = this.data.globalAttributes || ''; + attrInput.style.flex = '1'; + + attrInput.addEventListener('input', (e) => { + this.data.globalAttributes = e.target.value.trim(); + }); + + inputContainer.appendChild(input); + inputContainer.appendChild(attrInput); + + this.wrapper.appendChild(title); + this.wrapper.appendChild(inputContainer); + } + + save(blockContent) { + return { + id: this.data.id, + globalAttributes: this.data.globalAttributes || '' + }; + } +} + +// Register the plugin globally +window.SISEditorPlugins = window.SISEditorPlugins || {}; +window.SISEditorPlugins['snippet'] = { + class: HtmlSnippetTool +}; diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/image.umd.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/image.umd.js.download new file mode 100644 index 00000000..fcf6cb7a --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/image.umd.js.download @@ -0,0 +1,32 @@ +(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.image-tool{--bg-color: #cdd1e0;--front-color: #388ae5;--border-color: #e8e8eb}.image-tool__image{border-radius:3px;overflow:hidden;margin-bottom:10px}.image-tool__image-picture{max-width:100%;vertical-align:bottom;display:block}.image-tool__image-preloader{width:50px;height:50px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--bg-color);background-position:center center}.image-tool__image-preloader:after{content:"";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--bg-color);border-top-color:var(--front-color);left:50%;top:50%;margin-top:-30px;margin-left:-30px;animation:image-preloader-spin 2s infinite linear;box-sizing:border-box}.image-tool__caption[contentEditable=true][data-placeholder]:before{position:absolute!important;content:attr(data-placeholder);color:#707684;font-weight:400;display:none}.image-tool__caption[contentEditable=true][data-placeholder]:empty:before{display:block}.image-tool__caption[contentEditable=true][data-placeholder]:empty:focus:before{display:none}.image-tool--empty .image-tool__image,.image-tool--empty .image-tool__caption,.image-tool--loading .image-tool__caption{display:none}.image-tool .cdx-button{display:flex;align-items:center;justify-content:center}.image-tool .cdx-button svg{height:auto;margin:0 6px 0 0}.image-tool--filled .cdx-button,.image-tool--filled .image-tool__image-preloader{display:none}.image-tool--loading .image-tool__image{min-height:200px;display:flex;border:1px solid var(--border-color);background-color:#fff}.image-tool--loading .image-tool__image-picture,.image-tool--loading .cdx-button{display:none}.image-tool--withBorder .image-tool__image{border:1px solid var(--border-color)}.image-tool--withBackground .image-tool__image{padding:15px;background:var(--bg-color)}.image-tool--withBackground .image-tool__image-picture{max-width:60%;margin:0 auto}.image-tool--stretched .image-tool__image-picture{width:100%}@keyframes image-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}')),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); +(function(_,O){typeof exports=="object"&&typeof module<"u"?module.exports=O():typeof define=="function"&&define.amd?define(O):(_=typeof globalThis<"u"?globalThis:_||self,_.ImageTool=O())})(this,function(){"use strict";const _="",O='',D='',R='',x='';function M(E,a=null,i={}){const c=document.createElement(E);Array.isArray(a)?c.classList.add(...a):a&&c.classList.add(a);for(const r in i)c[r]=i[r];return c}class T{constructor({api:a,config:i,onSelectFile:c,readOnly:r}){this.api=a,this.config=i,this.onSelectFile=c,this.readOnly=r,this.nodes={wrapper:M("div",[this.CSS.baseClass,this.CSS.wrapper]),imageContainer:M("div",[this.CSS.imageContainer]),fileButton:this.createFileButton(),imageEl:void 0,imagePreloader:M("div",this.CSS.imagePreloader),caption:M("div",[this.CSS.input,this.CSS.caption],{contentEditable:!this.readOnly})},this.nodes.caption.dataset.placeholder=this.config.captionPlaceholder,this.nodes.imageContainer.appendChild(this.nodes.imagePreloader),this.nodes.wrapper.appendChild(this.nodes.imageContainer),this.nodes.wrapper.appendChild(this.nodes.caption),this.nodes.wrapper.appendChild(this.nodes.fileButton)}get CSS(){return{baseClass:this.api.styles.block,loading:this.api.styles.loader,input:this.api.styles.input,button:this.api.styles.button,wrapper:"image-tool",imageContainer:"image-tool__image",imagePreloader:"image-tool__image-preloader",imageEl:"image-tool__image-picture",caption:"image-tool__caption"}}static get status(){return{EMPTY:"empty",UPLOADING:"loading",FILLED:"filled"}}render(a){return!a.file||Object.keys(a.file).length===0?this.toggleStatus(T.status.EMPTY):this.toggleStatus(T.status.UPLOADING),this.nodes.wrapper}createFileButton(){const a=M("div",[this.CSS.button]);return a.innerHTML=this.config.buttonContent||`${R} ${this.api.i18n.t("Select an Image")}`,a.addEventListener("click",()=>{this.onSelectFile()}),a}showPreloader(a){this.nodes.imagePreloader.style.backgroundImage=`url(${a})`,this.toggleStatus(T.status.UPLOADING)}hidePreloader(){this.nodes.imagePreloader.style.backgroundImage="",this.toggleStatus(T.status.EMPTY)}fillImage(a){const i=/\.mp4$/.test(a)?"VIDEO":"IMG",c={src:a};let r="load";i==="VIDEO"&&(c.autoplay=!0,c.loop=!0,c.muted=!0,c.playsinline=!0,r="loadeddata"),this.nodes.imageEl=M(i,this.CSS.imageEl,c),this.nodes.imageEl.addEventListener(r,()=>{this.toggleStatus(T.status.FILLED),this.nodes.imagePreloader&&(this.nodes.imagePreloader.style.backgroundImage="")}),this.nodes.imageContainer.appendChild(this.nodes.imageEl)}fillCaption(a){this.nodes.caption&&(this.nodes.caption.innerHTML=a)}toggleStatus(a){for(const i in T.status)Object.prototype.hasOwnProperty.call(T.status,i)&&this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${T.status[i]}`,a===T.status[i])}applyTune(a,i){this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${a}`,i)}}function U(E){return E&&E.__esModule&&Object.prototype.hasOwnProperty.call(E,"default")?E.default:E}var H={exports:{}};(function(E,a){(function(i,c){E.exports=c()})(window,function(){return function(i){var c={};function r(n){if(c[n])return c[n].exports;var o=c[n]={i:n,l:!1,exports:{}};return i[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=i,r.c=c,r.d=function(n,o,d){r.o(n,o)||Object.defineProperty(n,o,{enumerable:!0,get:d})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,o){if(1&o&&(n=r(n)),8&o||4&o&&typeof n=="object"&&n&&n.__esModule)return n;var d=Object.create(null);if(r.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:n}),2&o&&typeof n!="string")for(var b in n)r.d(d,b,(function(u){return n[u]}).bind(null,b));return d},r.n=function(n){var o=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(o,"a",o),o},r.o=function(n,o){return Object.prototype.hasOwnProperty.call(n,o)},r.p="",r(r.s=3)}([function(i,c){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{typeof window=="object"&&(r=window)}i.exports=r},function(i,c,r){(function(n){var o=r(2),d=setTimeout;function b(){}function u(e){if(!(this instanceof u))throw new TypeError("Promises must be constructed via new");if(typeof e!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],t(e,this)}function p(e,l){for(;e._state===3;)e=e._value;e._state!==0?(e._handled=!0,u._immediateFn(function(){var s=e._state===1?l.onFulfilled:l.onRejected;if(s!==null){var g;try{g=s(e._value)}catch(m){return void y(l.promise,m)}f(l.promise,g)}else(e._state===1?f:y)(l.promise,e._value)})):e._deferreds.push(l)}function f(e,l){try{if(l===e)throw new TypeError("A promise cannot be resolved with itself.");if(l&&(typeof l=="object"||typeof l=="function")){var s=l.then;if(l instanceof u)return e._state=3,e._value=l,void w(e);if(typeof s=="function")return void t((g=s,m=l,function(){g.apply(m,arguments)}),e)}e._state=1,e._value=l,w(e)}catch(h){y(e,h)}var g,m}function y(e,l){e._state=2,e._value=l,w(e)}function w(e){e._state===2&&e._deferreds.length===0&&u._immediateFn(function(){e._handled||u._unhandledRejectionFn(e._value)});for(var l=0,s=e._deferreds.length;l0&&arguments[0]!==void 0?arguments[0]:{};if(t.url&&typeof t.url!="string")throw new Error("Url must be a string");if(t.url=t.url||"",t.method&&typeof t.method!="string")throw new Error("`method` must be a string or null");if(t.method=t.method?t.method.toUpperCase():"GET",t.headers&&n(t.headers)!=="object")throw new Error("`headers` must be an object or null");if(t.headers=t.headers||{},t.type&&(typeof t.type!="string"||!Object.values(o).includes(t.type)))throw new Error("`type` must be taken from module's «contentType» library");if(t.progress&&typeof t.progress!="function")throw new Error("`progress` must be a function or null");if(t.progress=t.progress||function(e){},t.beforeSend=t.beforeSend||function(e){},t.ratio&&typeof t.ratio!="number")throw new Error("`ratio` must be a number");if(t.ratio<0||t.ratio>100)throw new Error("`ratio` must be in a 0-100 interval");if(t.ratio=t.ratio||90,t.accept&&typeof t.accept!="string")throw new Error("`accept` must be a string with a list of allowed mime-types");if(t.accept=t.accept||"*/*",t.multiple&&typeof t.multiple!="boolean")throw new Error("`multiple` must be a true or false");if(t.multiple=t.multiple||!1,t.fieldName&&typeof t.fieldName!="string")throw new Error("`fieldName` must be a string");return t.fieldName=t.fieldName||"files",t},p=function(t){switch(t.method){case"GET":var e=f(t.data,o.URLENCODED);delete t.data,t.url=/\?/.test(t.url)?t.url+"&"+e:t.url+"?"+e;break;case"POST":case"PUT":case"DELETE":case"UPDATE":var l=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).type||o.JSON}(t);(w.isFormData(t.data)||w.isFormElement(t.data))&&(l=o.FORM),t.data=f(t.data,l),l!==v.contentType.FORM&&(t.headers["content-type"]=l)}return t},f=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};switch(arguments.length>1?arguments[1]:void 0){case o.URLENCODED:return w.urlEncode(t);case o.JSON:return w.jsonEncode(t);case o.FORM:return w.formEncode(t);default:return t}},y=function(t){return t>=200&&t<300},{contentType:o={URLENCODED:"application/x-www-form-urlencoded; charset=utf-8",FORM:"multipart/form-data",JSON:"application/json; charset=utf-8"},request:d,get:function(t){return t.method="GET",d(t)},post:b,transport:function(t){return t=u(t),w.selectFiles(t).then(function(e){for(var l=new FormData,s=0;s=0&&(u._idleTimeoutId=setTimeout(function(){u._onTimeout&&u._onTimeout()},p))},r(6),c.setImmediate=typeof self<"u"&&self.setImmediate||n!==void 0&&n.setImmediate||this&&this.setImmediate,c.clearImmediate=typeof self<"u"&&self.clearImmediate||n!==void 0&&n.clearImmediate||this&&this.clearImmediate}).call(this,r(0))},function(i,c,r){(function(n,o){(function(d,b){if(!d.setImmediate){var u,p,f,y,w,v=1,t={},e=!1,l=d.document,s=Object.getPrototypeOf&&Object.getPrototypeOf(d);s=s&&s.setTimeout?s:d,{}.toString.call(d.process)==="[object process]"?u=function(h){o.nextTick(function(){m(h)})}:function(){if(d.postMessage&&!d.importScripts){var h=!0,k=d.onmessage;return d.onmessage=function(){h=!1},d.postMessage("","*"),d.onmessage=k,h}}()?(y="setImmediate$"+Math.random()+"$",w=function(h){h.source===d&&typeof h.data=="string"&&h.data.indexOf(y)===0&&m(+h.data.slice(y.length))},d.addEventListener?d.addEventListener("message",w,!1):d.attachEvent("onmessage",w),u=function(h){d.postMessage(y+h,"*")}):d.MessageChannel?((f=new MessageChannel).port1.onmessage=function(h){m(h.data)},u=function(h){f.port2.postMessage(h)}):l&&"onreadystatechange"in l.createElement("script")?(p=l.documentElement,u=function(h){var k=l.createElement("script");k.onreadystatechange=function(){m(h),k.onreadystatechange=null,p.removeChild(k),k=null},p.appendChild(k)}):u=function(h){setTimeout(m,0,h)},s.setImmediate=function(h){typeof h!="function"&&(h=new Function(""+h));for(var k=new Array(arguments.length-1),S=0;S"u"?n===void 0?this:n:self)}).call(this,r(0),r(7))},function(i,c){var r,n,o=i.exports={};function d(){throw new Error("setTimeout has not been defined")}function b(){throw new Error("clearTimeout has not been defined")}function u(s){if(r===setTimeout)return setTimeout(s,0);if((r===d||!r)&&setTimeout)return r=setTimeout,setTimeout(s,0);try{return r(s,0)}catch{try{return r.call(null,s,0)}catch{return r.call(this,s,0)}}}(function(){try{r=typeof setTimeout=="function"?setTimeout:d}catch{r=d}try{n=typeof clearTimeout=="function"?clearTimeout:b}catch{n=b}})();var p,f=[],y=!1,w=-1;function v(){y&&p&&(y=!1,p.length?f=p.concat(f):w=-1,f.length&&t())}function t(){if(!y){var s=u(v);y=!0;for(var g=f.length;g;){for(p=f,f=[];++w1)for(var m=1;m HTMLElement")}},{key:"isObject",value:function(f){return Object.prototype.toString.call(f)==="[object Object]"}},{key:"isFormData",value:function(f){return f instanceof FormData}},{key:"isFormElement",value:function(f){return f instanceof HTMLFormElement}},{key:"selectFiles",value:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise(function(y,w){var v=document.createElement("INPUT");v.type="file",f.multiple&&v.setAttribute("multiple","multiple"),f.accept&&v.setAttribute("accept",f.accept),v.style.display="none",document.body.appendChild(v),v.addEventListener("change",function(t){var e=t.target.files;y(e),document.body.removeChild(v)},!1),v.click()})}},{key:"parseHeaders",value:function(f){var y=f.trim().split(/[\r\n]+/),w={};return y.forEach(function(v){var t=v.split(": "),e=t.shift(),l=t.join(": ");e&&(w[e]=l)}),w}}],(u=null)&&n(b.prototype,u),p&&n(b,p),d}()},function(i,c){var r=function(o){return encodeURIComponent(o).replace(/[!'()*]/g,escape).replace(/%20/g,"+")},n=function(o,d,b,u){return d=d||null,b=b||"&",u=u||null,o?function(p){for(var f=new Array,y=0;y{a(o.target.result)}};let c;this.config.uploader&&typeof this.config.uploader.uploadByFile=="function"?c=F.selectFiles({accept:this.config.types}).then(r=>{i(r[0]);const n=this.config.uploader.uploadByFile(r[0]);return L(n)||console.warn("Custom uploader method uploadByFile should return a Promise"),n}):c=F.transport({url:this.config.endpoints.byFile,data:this.config.additionalRequestData,accept:this.config.types,headers:this.config.additionalRequestHeaders,beforeSend:r=>{i(r[0])},fieldName:this.config.field}).then(r=>r.body),c.then(r=>{this.onUpload(r)}).catch(r=>{this.onError(r)})}uploadByUrl(a){let i;this.config.uploader&&typeof this.config.uploader.uploadByUrl=="function"?(i=this.config.uploader.uploadByUrl(a),L(i)||console.warn("Custom uploader method uploadByUrl should return a Promise")):i=F.post({url:this.config.endpoints.byUrl,data:Object.assign({url:a},this.config.additionalRequestData),type:F.contentType.JSON,headers:this.config.additionalRequestHeaders}).then(c=>c.body),i.then(c=>{this.onUpload(c)}).catch(c=>{this.onError(c)})}uploadByFile(a,{onPreview:i}){const c=new FileReader;c.readAsDataURL(a),c.onload=n=>{i(n.target.result)};let r;if(this.config.uploader&&typeof this.config.uploader.uploadByFile=="function")r=this.config.uploader.uploadByFile(a),L(r)||console.warn("Custom uploader method uploadByFile should return a Promise");else{const n=new FormData;n.append(this.config.field,a),this.config.additionalRequestData&&Object.keys(this.config.additionalRequestData).length&&Object.entries(this.config.additionalRequestData).forEach(([o,d])=>{n.append(o,d)}),r=F.post({url:this.config.endpoints.byFile,data:n,type:F.contentType.JSON,headers:this.config.additionalRequestHeaders}).then(o=>o.body)}r.then(n=>{this.onUpload(n)}).catch(n=>{this.onError(n)})}}/** + * Image Tool for the Editor.js + * + * @author CodeX + * @license MIT + * @see {@link https://github.com/editor-js/image} + * + * To developers. + * To simplify Tool structure, we split it to 4 parts: + * 1) index.js — main Tool's interface, public API and methods for working with data + * 2) uploader.js — module that has methods for sending files via AJAX: from device, by URL or File pasting + * 3) ui.js — module for UI manipulations: render, showing preloader, etc + * 4) tunes.js — working with Block Tunes: render buttons, handle clicks + * + * For debug purposes there is a testing server + * that can save uploaded files and return a Response {@link UploadResponseFormat} + * + * $ node dev/server.js + * + * It will expose 8008 port, so you can pass http://localhost:8008 with the Tools config: + * + * image: { + * class: ImageTool, + * config: { + * endpoints: { + * byFile: 'http://localhost:8008/uploadFile', + * byUrl: 'http://localhost:8008/fetchUrl', + * } + * }, + * }, + */class P{static get isReadOnlySupported(){return!0}static get toolbox(){return{icon:R,title:"Image"}}static get tunes(){return[{name:"withBorder",icon:D,title:"With border",toggle:!0},{name:"stretched",icon:x,title:"Stretch image",toggle:!0},{name:"withBackground",icon:O,title:"With background",toggle:!0}]}constructor({data:a,config:i,api:c,readOnly:r,block:n}){this.api=c,this.readOnly=r,this.block=n,this.config={endpoints:i.endpoints||"",additionalRequestData:i.additionalRequestData||{},additionalRequestHeaders:i.additionalRequestHeaders||{},field:i.field||"image",types:i.types||"image/*",captionPlaceholder:this.api.i18n.t(i.captionPlaceholder||"Caption"),buttonContent:i.buttonContent||"",uploader:i.uploader||void 0,actions:i.actions||[]},this.uploader=new A({config:this.config,onUpload:o=>this.onUpload(o),onError:o=>this.uploadingFailed(o)}),this.ui=new T({api:c,config:this.config,onSelectFile:()=>{this.uploader.uploadSelectedFile({onPreview:o=>{this.ui.showPreloader(o)}})},readOnly:r}),this._data={},this.data=a}render(){return this.ui.render(this.data)}validate(a){return a.file&&a.file.url}save(){const a=this.ui.nodes.caption;return this._data.caption=a.innerHTML,this.data}renderSettings(){return P.tunes.concat(this.config.actions).map(i=>({icon:i.icon,label:this.api.i18n.t(i.title),name:i.name,toggle:i.toggle,isActive:this.data[i.name],onActivate:()=>{if(typeof i.action=="function"){i.action(i.name);return}this.tuneToggled(i.name)}}))}appendCallback(){this.ui.nodes.fileButton.click()}static get pasteConfig(){return{tags:[{img:{src:!0}}],patterns:{image:/https?:\/\/\S+\.(gif|jpe?g|tiff|png|svg|webp)(\?[a-z0-9=]*)?$/i},files:{mimeTypes:["image/*"]}}}async onPaste(a){switch(a.type){case"tag":{const i=a.detail.data;if(/^blob:/.test(i.src)){const r=await(await fetch(i.src)).blob();this.uploadFile(r);break}this.uploadUrl(i.src);break}case"pattern":{const i=a.detail.data;this.uploadUrl(i);break}case"file":{const i=a.detail.file;this.uploadFile(i);break}}}set data(a){this.image=a.file,this._data.caption=a.caption||"",this.ui.fillCaption(this._data.caption),P.tunes.forEach(({name:i})=>{const c=typeof a[i]<"u"?a[i]===!0||a[i]==="true":!1;this.setTune(i,c)})}get data(){return this._data}set image(a){this._data.file=a||{},a&&a.url&&this.ui.fillImage(a.url)}onUpload(a){a.success&&a.file?this.image=a.file:this.uploadingFailed("incorrect response: "+JSON.stringify(a))}uploadingFailed(a){console.log("Image Tool: uploading failed because of",a),this.api.notifier.show({message:this.api.i18n.t("Couldn’t upload image. Please try another."),style:"error"}),this.ui.hidePreloader()}tuneToggled(a){this.setTune(a,!this._data[a])}setTune(a,i){this._data[a]=i,this.ui.applyTune(a,i),a==="stretched"&&Promise.resolve().then(()=>{this.block.stretched=i}).catch(c=>{console.error(c)})}uploadFile(a){this.uploader.uploadByFile(a,{onPreview:i=>{this.ui.showPreloader(i)}})}uploadUrl(a){this.ui.showPreloader(a),this.uploader.uploadByUrl(a)}}return P}); diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/image.umd.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/image.umd.js.download:Zone.Identifier new file mode 100644 index 00000000..e0e45fb5 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/image.umd.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/inline-code.umd.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/inline-code.umd.js.download new file mode 100644 index 00000000..81e2bc8e --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/inline-code.umd.js.download @@ -0,0 +1,2 @@ +(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".inline-code{background:rgba(250,239,240,.78);color:#b44437;padding:3px 4px;border-radius:5px;margin:0 1px;font-family:inherit;font-size:.86em;font-weight:500;letter-spacing:.3px}")),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})(); +(function(i,s){typeof exports=="object"&&typeof module<"u"?module.exports=s():typeof define=="function"&&define.amd?define(s):(i=typeof globalThis<"u"?globalThis:i||self,i.InlineCode=s())})(this,function(){"use strict";const i="",s='';class n{constructor({api:t}){this.tag="CODE",this.api=t,this.button=null,this.iconClasses={base:this.api.styles.inlineToolButton,active:this.api.styles.inlineToolButtonActive}}static get CSS(){return"inline-code"}static get isInline(){return!0}render(){return this.button=document.createElement("button"),this.button.type="button",this.button.classList.add(this.iconClasses.base),this.button.innerHTML=this.toolboxIcon,this.button}surround(t){if(!t)return;let e=this.api.selection.findParentTag(this.tag,n.CSS);e?this.unwrap(e):this.wrap(t)}wrap(t){let e=document.createElement(this.tag);e.classList.add(n.CSS),e.appendChild(t.extractContents()),t.insertNode(e),this.api.selection.expandToTag(e)}unwrap(t){var r;this.api.selection.expandToTag(t);const e=window.getSelection();if(!e)return;const o=e.getRangeAt(0),a=o.extractContents();(r=t.parentNode)==null||r.removeChild(t),o.insertNode(a),e.removeAllRanges(),e.addRange(o)}checkState(){const t=this.api.selection.findParentTag(this.tag,n.CSS);return this.button&&this.button.classList.toggle(this.iconClasses.active,!!t),!!t}get toolboxIcon(){return s}static get sanitize(){return{code:{class:n.CSS}}}}return n}); diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/inline-code.umd.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/inline-code.umd.js.download:Zone.Identifier new file mode 100644 index 00000000..2c2fb475 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/inline-code.umd.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/jquery.easing.min.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/jquery.easing.min.js.download new file mode 100644 index 00000000..c5157b7b --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/jquery.easing.min.js.download @@ -0,0 +1 @@ +(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],function($){return factory($)})}else if(typeof module==="object"&&typeof module.exports==="object"){exports=factory(require("jquery"))}else{factory(jQuery)}})(function($){$.easing.jswing=$.easing.swing;var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=2*PI/3,c5=2*PI/4.5;function bounceOut(x){var n1=7.5625,d1=2.75;if(x<1/d1){return n1*x*x}else if(x<2/d1){return n1*(x-=1.5/d1)*x+.75}else if(x<2.5/d1){return n1*(x-=2.25/d1)*x+.9375}else{return n1*(x-=2.625/d1)*x+.984375}}$.extend($.easing,{def:"easeOutQuad",swing:function(x){return $.easing[$.easing.def](x)},easeInQuad:function(x){return x*x},easeOutQuad:function(x){return 1-(1-x)*(1-x)},easeInOutQuad:function(x){return x<.5?2*x*x:1-pow(-2*x+2,2)/2},easeInCubic:function(x){return x*x*x},easeOutCubic:function(x){return 1-pow(1-x,3)},easeInOutCubic:function(x){return x<.5?4*x*x*x:1-pow(-2*x+2,3)/2},easeInQuart:function(x){return x*x*x*x},easeOutQuart:function(x){return 1-pow(1-x,4)},easeInOutQuart:function(x){return x<.5?8*x*x*x*x:1-pow(-2*x+2,4)/2},easeInQuint:function(x){return x*x*x*x*x},easeOutQuint:function(x){return 1-pow(1-x,5)},easeInOutQuint:function(x){return x<.5?16*x*x*x*x*x:1-pow(-2*x+2,5)/2},easeInSine:function(x){return 1-cos(x*PI/2)},easeOutSine:function(x){return sin(x*PI/2)},easeInOutSine:function(x){return-(cos(PI*x)-1)/2},easeInExpo:function(x){return x===0?0:pow(2,10*x-10)},easeOutExpo:function(x){return x===1?1:1-pow(2,-10*x)},easeInOutExpo:function(x){return x===0?0:x===1?1:x<.5?pow(2,20*x-10)/2:(2-pow(2,-20*x+10))/2},easeInCirc:function(x){return 1-sqrt(1-pow(x,2))},easeOutCirc:function(x){return sqrt(1-pow(x-1,2))},easeInOutCirc:function(x){return x<.5?(1-sqrt(1-pow(2*x,2)))/2:(sqrt(1-pow(-2*x+2,2))+1)/2},easeInElastic:function(x){return x===0?0:x===1?1:-pow(2,10*x-10)*sin((x*10-10.75)*c4)},easeOutElastic:function(x){return x===0?0:x===1?1:pow(2,-10*x)*sin((x*10-.75)*c4)+1},easeInOutElastic:function(x){return x===0?0:x===1?1:x<.5?-(pow(2,20*x-10)*sin((20*x-11.125)*c5))/2:pow(2,-20*x+10)*sin((20*x-11.125)*c5)/2+1},easeInBack:function(x){return c3*x*x*x-c1*x*x},easeOutBack:function(x){return 1+c3*pow(x-1,3)+c1*pow(x-1,2)},easeInOutBack:function(x){return x<.5?pow(2*x,2)*((c2+1)*2*x-c2)/2:(pow(2*x-2,2)*((c2+1)*(x*2-2)+c2)+2)/2},easeInBounce:function(x){return 1-bounceOut(1-x)},easeOutBounce:bounceOut,easeInOutBounce:function(x){return x<.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2}})}); \ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/jquery.easing.min.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/jquery.easing.min.js.download:Zone.Identifier new file mode 100644 index 00000000..5451a01a Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/jquery.easing.min.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/jquery.min.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/jquery.min.js.download new file mode 100644 index 00000000..c4c6022f --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/jquery.min.js.download @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0' + }; + } + + constructor({ data, api, readOnly }) { + this.api = api; + this.readOnly = readOnly; + this.data = { + title: (data && data.title) ? data.title : 'Quick Navigation', + bgColor: (data && data.bgColor) ? data.bgColor : '#002554', + globalClass: (data && data.globalClass) || '', + globalId: (data && data.globalId) || '', + globalAttributes: (data && data.globalAttributes) || (data && data.attributes) || '', + items: (data && Array.isArray(data.items)) ? data.items : [ + { label: 'Giới thiệu', link: '#sec-intro' }, + { label: 'Chuyên khoa', link: '#sec-specialty' }, + { label: 'Quy trình', link: '#sec-process' } + ], + sticky: (data && data.sticky !== undefined) ? !!data.sticky : true, + stretched: (data && data.stretched !== undefined) ? !!data.stretched : true + }; + this.titleInput = null; + this.itemsContainer = null; + } + + render() { + const container = document.createElement('div'); + container.style.border = '1px solid #e3e6f0'; + container.style.borderRadius = '8px'; + container.style.padding = '14px'; + container.style.background = '#fff'; + container.style.marginBottom = '12px'; + + const headerLabel = document.createElement('label'); + headerLabel.className = 'font-weight-bold text-primary small mb-2 d-block'; + headerLabel.innerHTML = ' Sticky Page Navigation Bar Settings'; + container.appendChild(headerLabel); + + // Settings Row for Title, Class, ID & Attributes + const metaRow = document.createElement('div'); + metaRow.className = 'form-row mb-3'; + + // 1. Mobile Title + const titleDiv = document.createElement('div'); + titleDiv.className = 'col-md-3 mb-2'; + titleDiv.innerHTML = ''; + this.titleInput = document.createElement('input'); + this.titleInput.type = 'text'; + this.titleInput.className = 'form-control form-control-sm'; + this.titleInput.placeholder = 'e.g. Quick Navigation'; + this.titleInput.value = this.data.title || 'Quick Navigation'; + if (this.readOnly) this.titleInput.disabled = true; + titleDiv.appendChild(this.titleInput); + metaRow.appendChild(titleDiv); + + // 2. CSS Class + const classDiv = document.createElement('div'); + classDiv.className = 'col-md-3 mb-2'; + classDiv.innerHTML = ''; + this.classInput = document.createElement('input'); + this.classInput.type = 'text'; + this.classInput.className = 'form-control form-control-sm'; + this.classInput.placeholder = 'e.g. my-custom-nav'; + this.classInput.value = this.data.globalClass || ''; + if (this.readOnly) this.classInput.disabled = true; + this.classInput.addEventListener('input', (e) => { + this.data.globalClass = e.target.value.trim(); + }); + classDiv.appendChild(this.classInput); + metaRow.appendChild(classDiv); + + // 3. HTML ID + const idDiv = document.createElement('div'); + idDiv.className = 'col-md-3 mb-2'; + idDiv.innerHTML = ''; + this.idInput = document.createElement('input'); + this.idInput.type = 'text'; + this.idInput.className = 'form-control form-control-sm'; + this.idInput.placeholder = 'e.g. main-sticky-nav'; + this.idInput.value = this.data.globalId || ''; + if (this.readOnly) this.idInput.disabled = true; + this.idInput.addEventListener('input', (e) => { + this.data.globalId = e.target.value.trim(); + }); + idDiv.appendChild(this.idInput); + metaRow.appendChild(idDiv); + + // 4. Custom Attributes + const attrDiv = document.createElement('div'); + attrDiv.className = 'col-md-3 mb-2'; + attrDiv.innerHTML = ''; + this.attrInput = document.createElement('input'); + this.attrInput.type = 'text'; + this.attrInput.className = 'form-control form-control-sm'; + this.attrInput.placeholder = 'e.g. data-aos="fade-down" style="..."'; + this.attrInput.value = this.data.globalAttributes || ''; + if (this.readOnly) this.attrInput.disabled = true; + this.attrInput.addEventListener('input', (e) => { + this.data.globalAttributes = e.target.value.trim(); + }); + attrDiv.appendChild(this.attrInput); + metaRow.appendChild(attrDiv); + + container.appendChild(metaRow); + + // Switches Row (Sticky + Stretched) + const switchesRow = document.createElement('div'); + switchesRow.className = 'd-flex flex-wrap gap-3 mb-3'; + + // Sticky switch + const stickyWrapper = document.createElement('div'); + stickyWrapper.className = 'custom-control custom-switch mr-3'; + const stickyCheck = document.createElement('input'); + stickyCheck.type = 'checkbox'; + stickyCheck.className = 'custom-control-input'; + stickyCheck.id = 'nav_sticky_' + Math.random().toString(36).substring(7); + stickyCheck.checked = !!this.data.sticky; + if (this.readOnly) stickyCheck.disabled = true; + + const stickyLabel = document.createElement('label'); + stickyLabel.className = 'custom-control-label small font-weight-bold text-primary'; + stickyLabel.htmlFor = stickyCheck.id; + stickyLabel.innerHTML = ' Sticky to Top on Scroll'; + + stickyCheck.addEventListener('change', () => { + this.data.sticky = stickyCheck.checked; + }); + stickyWrapper.appendChild(stickyCheck); + stickyWrapper.appendChild(stickyLabel); + switchesRow.appendChild(stickyWrapper); + + // Stretch switch + const stretchWrapper = document.createElement('div'); + stretchWrapper.className = 'custom-control custom-switch'; + this.stretchCheck = document.createElement('input'); + this.stretchCheck.type = 'checkbox'; + this.stretchCheck.className = 'custom-control-input'; + this.stretchCheck.id = 'nav_stretch_' + Math.random().toString(36).substring(7); + this.stretchCheck.checked = !!this.data.stretched; + if (this.readOnly) this.stretchCheck.disabled = true; + + const stretchLabel = document.createElement('label'); + stretchLabel.className = 'custom-control-label small font-weight-bold text-secondary'; + stretchLabel.htmlFor = this.stretchCheck.id; + stretchLabel.innerHTML = ' Stretch to Full Screen Width'; + + this.stretchCheck.addEventListener('change', () => { + this.data.stretched = this.stretchCheck.checked; + }); + stretchWrapper.appendChild(this.stretchCheck); + stretchWrapper.appendChild(stretchLabel); + switchesRow.appendChild(stretchWrapper); + + container.appendChild(switchesRow); + + // Background Color Selection + const bgGroup = document.createElement('div'); + bgGroup.className = 'form-group mb-3'; + const bgLabel = document.createElement('label'); + bgLabel.className = 'small font-weight-bold text-secondary mb-1 d-block'; + bgLabel.innerText = 'Background Style'; + + this.bgSelect = document.createElement('select'); + this.bgSelect.className = 'form-control form-control-sm'; + this.bgSelect.innerHTML = ` + + + + + `; + this.bgSelect.value = this.data.bgColor || '#002554'; + if (this.readOnly) this.bgSelect.disabled = true; + bgGroup.appendChild(bgLabel); + bgGroup.appendChild(this.bgSelect); + container.appendChild(bgGroup); + + // Navigation Items List + const itemsLabel = document.createElement('label'); + itemsLabel.className = 'small font-weight-bold text-secondary mb-2 d-block'; + itemsLabel.innerText = 'Navigation Links / Anchors'; + container.appendChild(itemsLabel); + + this.itemsContainer = document.createElement('div'); + this.itemsContainer.className = 'nav-items-list mb-2'; + container.appendChild(this.itemsContainer); + + const renderItemsInputs = () => { + this.itemsContainer.innerHTML = ''; + this.data.items.forEach((item, index) => { + const itemRow = document.createElement('div'); + itemRow.className = 'form-row mb-2 align-items-center'; + + const colLabel = document.createElement('div'); + colLabel.className = 'col-md-5'; + const labelInp = document.createElement('input'); + labelInp.type = 'text'; + labelInp.className = 'form-control form-control-sm'; + labelInp.placeholder = 'Link Label (e.g. Giới thiệu)'; + labelInp.value = item.label || ''; + if (this.readOnly) labelInp.disabled = true; + labelInp.addEventListener('input', () => { + item.label = labelInp.value; + updatePreview(); + }); + colLabel.appendChild(labelInp); + + const colLink = document.createElement('div'); + colLink.className = 'col-md-5'; + const linkInp = document.createElement('input'); + linkInp.type = 'text'; + linkInp.className = 'form-control form-control-sm'; + linkInp.placeholder = 'Target ID or URL (e.g. #sec-intro)'; + linkInp.value = item.link || ''; + if (this.readOnly) linkInp.disabled = true; + linkInp.addEventListener('input', () => { + item.link = linkInp.value; + updatePreview(); + }); + colLink.appendChild(linkInp); + + const colDel = document.createElement('div'); + colDel.className = 'col-md-2'; + const delBtn = document.createElement('button'); + delBtn.type = 'button'; + delBtn.className = 'btn btn-sm btn-outline-danger btn-block'; + delBtn.innerHTML = ''; + if (this.readOnly) delBtn.disabled = true; + delBtn.addEventListener('click', () => { + this.data.items.splice(index, 1); + renderItemsInputs(); + updatePreview(); + }); + colDel.appendChild(delBtn); + + itemRow.appendChild(colLabel); + itemRow.appendChild(colLink); + itemRow.appendChild(colDel); + this.itemsContainer.appendChild(itemRow); + }); + }; + + if (!this.readOnly) { + const addBtn = document.createElement('button'); + addBtn.type = 'button'; + addBtn.className = 'btn btn-sm btn-outline-primary mb-3'; + addBtn.innerHTML = ' Add Nav Link'; + addBtn.addEventListener('click', () => { + this.data.items.push({ label: 'New Link', link: '#section' }); + renderItemsInputs(); + updatePreview(); + }); + container.appendChild(addBtn); + } + + // Live Preview Box + const previewBox = document.createElement('div'); + previewBox.className = 'nav-preview p-2 rounded my-2 d-flex flex-wrap justify-content-center align-items-center gap-2'; + previewBox.style.transition = 'background 0.3s ease'; + container.appendChild(previewBox); + + const updatePreview = () => { + const bg = this.bgSelect.value; + const isLight = bg === '#ffffff'; + previewBox.style.background = bg; + + let html = ''; + this.data.items.forEach(item => { + const label = item.label || 'Link'; + const textColor = isLight ? '#002554' : '#ffffff'; + html += `${label}`; + }); + previewBox.innerHTML = html || 'No nav links added'; + }; + + this.bgSelect.addEventListener('change', () => { + this.data.bgColor = this.bgSelect.value; + updatePreview(); + }); + + renderItemsInputs(); + updatePreview(); + + return container; + } + + save() { + return { + title: this.titleInput ? this.titleInput.value : (this.data.title || 'Quick Navigation'), + bgColor: this.bgSelect ? this.bgSelect.value : this.data.bgColor, + globalClass: this.classInput ? this.classInput.value.trim() : (this.data.globalClass || ''), + globalId: this.idInput ? this.idInput.value.trim() : (this.data.globalId || ''), + globalAttributes: this.attrInput ? this.attrInput.value.trim() : (this.data.globalAttributes || ''), + items: this.data.items || [], + sticky: this.data.sticky !== undefined ? !!this.data.sticky : true, + stretched: this.stretchCheck ? this.stretchCheck.checked : !!this.data.stretched + }; + } +} + +// Alias class for nav +class SISNavTool extends SISStickyNavTool {} + +// Register plugin globally +window.SISEditorPlugins = window.SISEditorPlugins || {}; +window.SISEditorPlugins['stickyNav'] = { class: SISStickyNavTool }; +window.SISEditorPlugins['nav'] = { class: SISNavTool }; diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/nested-list.umd.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/nested-list.umd.js.download new file mode 100644 index 00000000..67e2aadd --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/nested-list.umd.js.download @@ -0,0 +1,2 @@ +(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.cdx-nested-list{margin:0;padding:0;outline:none;counter-reset:item;list-style:none}.cdx-nested-list__item{line-height:1.6em;display:flex;margin:2px 0}.cdx-nested-list__item [contenteditable]{outline:none}.cdx-nested-list__item-body{flex-grow:2}.cdx-nested-list__item-content,.cdx-nested-list__item-children{flex-basis:100%}.cdx-nested-list__item-content{word-break:break-word;white-space:pre-wrap}.cdx-nested-list__item:before{counter-increment:item;margin-right:5px;white-space:nowrap}.cdx-nested-list--ordered>.cdx-nested-list__item:before{content:counters(item,".") ". "}.cdx-nested-list--unordered>.cdx-nested-list__item:before{content:"•"}.cdx-nested-list__settings{display:flex}.cdx-nested-list__settings .cdx-settings-button{width:50%}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})(); +(function(a,c){typeof exports=="object"&&typeof module<"u"?module.exports=c():typeof define=="function"&&define.amd?define(c):(a=typeof globalThis<"u"?globalThis:a||self,a.NestedList=c())})(this,function(){"use strict";function a(h){return h.nodeType===Node.ELEMENT_NODE}function c(h,e=null,t){const r=document.createElement(h);Array.isArray(e)?r.classList.add(...e):e&&r.classList.add(e);for(const n in t)r[n]=t[n];return r}function m(h){const e=c("div");return e.appendChild(h),e.innerHTML}function g(h){let e;return h.nodeType!==Node.ELEMENT_NODE?e=h.textContent:(e=h.innerHTML,e=e.replaceAll("
","")),(e==null?void 0:e.trim().length)===0}class u{constructor(){this.savedFakeCaret=void 0}save(){const e=u.range,t=c("span");t.hidden=!0,e&&(e.insertNode(t),this.savedFakeCaret=t)}restore(){if(!this.savedFakeCaret)return;const e=window.getSelection();if(!e)return;const t=new Range;t.setStartAfter(this.savedFakeCaret),t.setEndAfter(this.savedFakeCaret),e.removeAllRanges(),e.addRange(t),setTimeout(()=>{var r;(r=this.savedFakeCaret)==null||r.remove()},150)}static get range(){const e=window.getSelection();return e&&e.rangeCount?e.getRangeAt(0):null}static extractFragmentFromCaretPositionTillTheEnd(){const e=window.getSelection();if(!e||!e.rangeCount)return;const t=e.getRangeAt(0);let r=t.startContainer;if(r.nodeType!==Node.ELEMENT_NODE){if(!r.parentNode)return;r=r.parentNode}if(!a(r))return;const n=r.closest("[contenteditable]");if(!n)return;t.deleteContents();const s=t.cloneRange();return s.selectNodeContents(n),s.setStart(t.endContainer,t.endOffset),s.extractContents()}static focus(e,t=!0){const r=document.createRange(),n=window.getSelection();n&&(r.selectNodeContents(e),r.collapse(t),n.removeAllRanges(),n.addRange(r))}static isAtStart(){const e=window.getSelection();if(!e||e.focusOffset>0)return!1;const t=e.focusNode;return!t||!a(t)?!1:u.getHigherLevelSiblings(t,"left").every(s=>g(s))}static getHigherLevelSiblings(e,t="left"){let r=e;const n=[];for(;r.parentNode&&r.parentNode.contentEditable!=="true";)r=r.parentNode;const s=t==="left"?"previousSibling":"nextSibling";for(;r[s];)r=r[s],n.push(r);return n}}const y='',S='',k="";class f{static get isReadOnlySupported(){return!0}static get enableLineBreaks(){return!0}static get toolbox(){return{icon:S,title:"List"}}constructor({data:e,config:t,api:r,readOnly:n}){var i;this.nodes={wrapper:null},this.api=r,this.readOnly=n,this.config=t,this.defaultListStyle=((i=this.config)==null?void 0:i.defaultStyle)==="ordered"?"ordered":"unordered";const s={style:this.defaultListStyle,items:[]};this.data=e&&Object.keys(e).length?e:s,this.caret=new u}render(){return this.nodes.wrapper=this.makeListWrapper(this.data.style,[this.CSS.baseBlock]),this.data.items.length?this.appendItems(this.data.items,this.nodes.wrapper):this.appendItems([{content:"",items:[]}],this.nodes.wrapper),this.readOnly||this.nodes.wrapper.addEventListener("keydown",e=>{switch(e.key){case"Enter":this.enterPressed(e);break;case"Backspace":this.backspace(e);break;case"Tab":e.shiftKey?this.shiftTab(e):this.addTab(e);break}},!1),this.nodes.wrapper}renderSettings(){return[{name:"unordered",label:this.api.i18n.t("Unordered"),icon:y},{name:"ordered",label:this.api.i18n.t("Ordered"),icon:S}].map(t=>({name:t.name,icon:t.icon,label:t.label,isActive:this.data.style===t.name,closeOnActivate:!0,onActivate:()=>{this.listStyle=t.name}}))}static get pasteConfig(){return{tags:["OL","UL","LI"]}}onPaste(e){const t=e.detail.data;this.data=this.pasteHandler(t);const r=this.nodes.wrapper;r&&r.parentNode&&r.parentNode.replaceChild(this.render(),r)}pasteHandler(e){const{tagName:t}=e;let r="unordered",n;switch(t){case"OL":r="ordered",n="ol";break;case"UL":case"LI":r="unordered",n="ul"}const s={style:r,items:[]},i=d=>Array.from(d.querySelectorAll(":scope > li")).map(o=>{var C;const l=o.querySelector(`:scope > ${n}`),w=l?i(l):[];return{content:((C=o==null?void 0:o.firstChild)==null?void 0:C.textContent)||"",items:w}});return s.items=i(e),s}appendItems(e,t){e.forEach(r=>{const n=this.createItem(r.content,r.items);t.appendChild(n)})}createItem(e,t=[]){const r=c("li",this.CSS.item),n=c("div",this.CSS.itemBody),s=c("div",this.CSS.itemContent,{innerHTML:e,contentEditable:(!this.readOnly).toString()});return n.appendChild(s),r.appendChild(n),t&&t.length>0&&this.addChildrenList(r,t),r}save(){const e=t=>Array.from(t.querySelectorAll(`:scope > .${this.CSS.item}`)).map(n=>{const s=n.querySelector(`.${this.CSS.itemChildren}`),i=this.getItemContent(n),d=s?e(s):[];return{content:i,items:d}});return{style:this.data.style,items:this.nodes.wrapper?e(this.nodes.wrapper):[]}}addChildrenList(e,t){const r=e.querySelector(`.${this.CSS.itemBody}`),n=this.makeListWrapper(void 0,[this.CSS.itemChildren]);this.appendItems(t,n),r&&r.appendChild(n)}makeListWrapper(e=this.listStyle,t=[]){const r=e==="ordered"?"ol":"ul",n=e==="ordered"?this.CSS.wrapperOrdered:this.CSS.wrapperUnordered;return t.push(n),c(r,[this.CSS.wrapper,...t])}get CSS(){return{baseBlock:this.api.styles.block,wrapper:"cdx-nested-list",wrapperOrdered:"cdx-nested-list--ordered",wrapperUnordered:"cdx-nested-list--unordered",item:"cdx-nested-list__item",itemBody:"cdx-nested-list__item-body",itemContent:"cdx-nested-list__item-content",itemChildren:"cdx-nested-list__item-children",settingsWrapper:"cdx-nested-list__settings",settingsButton:this.api.styles.settingsButton,settingsButtonActive:this.api.styles.settingsButtonActive}}get listStyle(){return this.data.style||this.defaultListStyle}set listStyle(e){if(!this.nodes||!this.nodes.wrapper)return;const t=Array.from(this.nodes.wrapper.querySelectorAll(`.${this.CSS.wrapper}`));t.push(this.nodes.wrapper),t.forEach(r=>{r.classList.toggle(this.CSS.wrapperUnordered,e==="unordered"),r.classList.toggle(this.CSS.wrapperOrdered,e==="ordered")}),this.data.style=e}get currentItem(){const e=window.getSelection();if(!e)return null;let t=e.anchorNode;return!t||(a(t)||(t=t.parentNode),!t)||!a(t)?null:t.closest(`.${this.CSS.item}`)}enterPressed(e){const t=this.currentItem;if(e.stopPropagation(),e.preventDefault(),e.isComposing)return;const r=t?this.getItemContent(t).trim().length===0:!0,n=(t==null?void 0:t.parentNode)===this.nodes.wrapper,s=(t==null?void 0:t.nextElementSibling)===null;if(n&&s&&r){this.getOutOfList();return}else if(s&&r){this.unshiftItem();return}const i=u.extractFragmentFromCaretPositionTillTheEnd();if(!i)return;const d=m(i),p=t==null?void 0:t.querySelector(`.${this.CSS.itemChildren}`),o=this.createItem(d,void 0);p&&Array.from(p.querySelectorAll(`.${this.CSS.item}`)).length>0?p.prepend(o):t==null||t.after(o),this.focusItem(o)}unshiftItem(){const e=this.currentItem;if(!e||!e.parentNode||!a(e.parentNode))return;const t=e.parentNode.closest(`.${this.CSS.item}`);if(!t)return;this.caret.save(),t.after(e),this.caret.restore();const r=t.querySelector(`.${this.CSS.itemChildren}`);if(!r)return;r.children.length===0&&r.remove()}getItemContent(e){const t=e.querySelector(`.${this.CSS.itemContent}`);return!t||g(t)?"":t.innerHTML}focusItem(e,t=!0){const r=e.querySelector(`.${this.CSS.itemContent}`);r&&u.focus(r,t)}getOutOfList(){var e;(e=this.currentItem)==null||e.remove(),this.api.blocks.insert(),this.api.caret.setToBlock(this.api.blocks.getCurrentBlockIndex())}backspace(e){if(!u.isAtStart())return;e.preventDefault();const t=this.currentItem;if(!t)return;const r=t.previousSibling;if(!t.parentNode||!a(t.parentNode))return;const n=t.parentNode.closest(`.${this.CSS.item}`);if(!r&&!n||r&&!a(r))return;e.stopPropagation();let s;if(r){const l=r.querySelectorAll(`.${this.CSS.item}`);s=Array.from(l).pop()||r}else s=n;const i=u.extractFragmentFromCaretPositionTillTheEnd();if(!i)return;const d=m(i);if(!s)return;const p=s.querySelector(`.${this.CSS.itemContent}`);if(!p)return;u.focus(p,!1),this.caret.save(),p.insertAdjacentHTML("beforeend",d);let o=t.querySelectorAll(`.${this.CSS.itemChildren} > .${this.CSS.item}`);o=Array.from(o),o=o.filter(l=>!l.parentNode||!a(l.parentNode)?!1:l.parentNode.closest(`.${this.CSS.item}`)===t),o.reverse().forEach(l=>{r?s.after(l):t.after(l)}),t.remove(),this.caret.restore()}addTab(e){e.stopPropagation(),e.preventDefault();const t=this.currentItem;if(!t)return;const r=t.previousSibling;if(!r||!a(r)||!r)return;const s=r.querySelector(`.${this.CSS.itemChildren}`);if(this.caret.save(),s)s.appendChild(t);else{const i=this.makeListWrapper(void 0,[this.CSS.itemChildren]),d=r.querySelector(`.${this.CSS.itemBody}`);i.appendChild(t),d==null||d.appendChild(i)}this.caret.restore()}shiftTab(e){e.stopPropagation(),e.preventDefault(),this.unshiftItem()}static joinRecursive(e){return e.items.map(t=>`${t.content} ${f.joinRecursive(t)}`).join("")}static get conversionConfig(){return{export:e=>f.joinRecursive(e),import:e=>({items:[{content:e,items:[]}],style:"unordered"})}}}return f}); diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/nested-list.umd.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/nested-list.umd.js.download:Zone.Identifier new file mode 100644 index 00000000..a585ff1a Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/nested-list.umd.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/quote.umd.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/quote.umd.js.download new file mode 100644 index 00000000..a53f6f01 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/quote.umd.js.download @@ -0,0 +1,2 @@ +(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".cdx-quote-icon svg{transform:rotate(180deg)}.cdx-quote{margin:0}.cdx-quote__text{min-height:158px;margin-bottom:10px}.cdx-quote [contentEditable=true][data-placeholder]:before{position:absolute;content:attr(data-placeholder);color:#707684;font-weight:400;opacity:0}.cdx-quote [contentEditable=true][data-placeholder]:empty:before{opacity:1}.cdx-quote [contentEditable=true][data-placeholder]:empty:focus:before{opacity:0}.cdx-quote-settings{display:flex}.cdx-quote-settings .cdx-settings-button{width:50%}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); +(function(g,d){typeof exports=="object"&&typeof module<"u"?module.exports=d():typeof define=="function"&&define.amd?define(d):(g=typeof globalThis<"u"?globalThis:g||self,g.Quote=d())})(this,function(){"use strict";const g="",d='',Te='',je='';var m=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Se(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var b={},T={},j={};Object.defineProperty(j,"__esModule",{value:!0}),j.allInputsSelector=Ce;function Ce(){var e=["text","password","email","number","search","tel","url"];return"[contenteditable=true], textarea, input:not([type]), "+e.map(function(t){return'input[type="'.concat(t,'"]')}).join(", ")}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.allInputsSelector=void 0;var t=j;Object.defineProperty(e,"allInputsSelector",{enumerable:!0,get:function(){return t.allInputsSelector}})})(T);var s={},S={};Object.defineProperty(S,"__esModule",{value:!0}),S.isNativeInput=Le;function Le(e){var t=["INPUT","TEXTAREA"];return e&&e.tagName?t.includes(e.tagName):!1}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isNativeInput=void 0;var t=S;Object.defineProperty(e,"isNativeInput",{enumerable:!0,get:function(){return t.isNativeInput}})})(s);var ae={},C={};Object.defineProperty(C,"__esModule",{value:!0}),C.append=Me;function Me(e,t){Array.isArray(t)?t.forEach(function(n){e.appendChild(n)}):e.appendChild(t)}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.append=void 0;var t=C;Object.defineProperty(e,"append",{enumerable:!0,get:function(){return t.append}})})(ae);var L={},M={};Object.defineProperty(M,"__esModule",{value:!0}),M.blockElements=ke;function ke(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.blockElements=void 0;var t=M;Object.defineProperty(e,"blockElements",{enumerable:!0,get:function(){return t.blockElements}})})(L);var le={},k={};Object.defineProperty(k,"__esModule",{value:!0}),k.calculateBaseline=we;function we(e){var t=window.getComputedStyle(e),n=parseFloat(t.fontSize),r=parseFloat(t.lineHeight)||n*1.2,i=parseFloat(t.paddingTop),a=parseFloat(t.borderTopWidth),l=parseFloat(t.marginTop),u=n*.8,p=(r-n)/2,c=l+a+i+p+u;return c}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateBaseline=void 0;var t=k;Object.defineProperty(e,"calculateBaseline",{enumerable:!0,get:function(){return t.calculateBaseline}})})(le);var ue={},w={},N={},I={};Object.defineProperty(I,"__esModule",{value:!0}),I.isContentEditable=Ne;function Ne(e){return e.contentEditable==="true"}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isContentEditable=void 0;var t=I;Object.defineProperty(e,"isContentEditable",{enumerable:!0,get:function(){return t.isContentEditable}})})(N),Object.defineProperty(w,"__esModule",{value:!0}),w.canSetCaret=$e;var Ie=s,Ae=N;function $e(e){var t=!0;if((0,Ie.isNativeInput)(e))switch(e.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":t=!1;break}else t=(0,Ae.isContentEditable)(e);return t}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.canSetCaret=void 0;var t=w;Object.defineProperty(e,"canSetCaret",{enumerable:!0,get:function(){return t.canSetCaret}})})(ue);var _={},A={};function Be(e,t,n){const r=n.value!==void 0?"value":"get",i=n[r],a=`#${t}Cache`;if(n[r]=function(...l){return this[a]===void 0&&(this[a]=i.apply(this,l)),this[a]},r==="get"&&n.set){const l=n.set;n.set=function(u){delete e[a],l.apply(this,u)}}return n}function oe(){const e={win:!1,mac:!1,x11:!1,linux:!1},t=Object.keys(e).find(n=>window.navigator.appVersion.toLowerCase().indexOf(n)!==-1);return t!==void 0&&(e[t]=!0),e}function $(e){return e!=null&&e!==""&&(typeof e!="object"||Object.keys(e).length>0)}function De(e){return!$(e)}const He=()=>typeof window<"u"&&window.navigator!==null&&$(window.navigator.platform)&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1);function Re(e){const t=oe();return e=e.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi,"+"),t.mac?e=e.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):e=e.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN"),e}function Fe(e){return e[0].toUpperCase()+e.slice(1)}function We(e){const t=document.createElement("div");t.style.position="absolute",t.style.left="-999px",t.style.bottom="-999px",t.innerHTML=e,document.body.appendChild(t);const n=window.getSelection(),r=document.createRange();if(r.selectNode(t),n===null)throw new Error("Cannot copy text to clipboard");n.removeAllRanges(),n.addRange(r),document.execCommand("copy"),document.body.removeChild(t)}function Ue(e,t,n){let r;return(...i)=>{const a=this,l=()=>{r=void 0,n!==!0&&e.apply(a,i)},u=n===!0&&r!==void 0;window.clearTimeout(r),r=window.setTimeout(l,t),u&&e.apply(a,i)}}function o(e){return Object.prototype.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function qe(e){return o(e)==="boolean"}function se(e){return o(e)==="function"||o(e)==="asyncfunction"}function ze(e){return se(e)&&/^\s*class\s+/.test(e.toString())}function Ge(e){return o(e)==="number"}function y(e){return o(e)==="object"}function Ke(e){return Promise.resolve(e)===e}function Qe(e){return o(e)==="string"}function Xe(e){return o(e)==="undefined"}function B(e,...t){if(!t.length)return e;const n=t.shift();if(y(e)&&y(n))for(const r in n)y(n[r])?(e[r]===void 0&&Object.assign(e,{[r]:{}}),B(e[r],n[r])):Object.assign(e,{[r]:n[r]});return B(e,...t)}function Ye(e,t,n){const r=`«${t}» is deprecated and will be removed in the next major release. Please use the «${n}» instead.`;e&&console.warn(r)}function Ve(e){try{return new URL(e).href}catch{}return e.substring(0,2)==="//"?window.location.protocol+e:window.location.origin+e}function Ze(e){return e>47&&e<58||e===32||e===13||e===229||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223}const Je={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91,SLASH:191},xe={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};class et{constructor(){this.completed=Promise.resolve()}add(t){return new Promise((n,r)=>{this.completed=this.completed.then(t).then(n).catch(r)})}}function tt(e,t,n=void 0){let r,i,a,l=null,u=0;n||(n={});const p=function(){u=n.leading===!1?0:Date.now(),l=null,a=e.apply(r,i),l===null&&(r=i=null)};return function(){const c=Date.now();!u&&n.leading===!1&&(u=c);const v=t-(c-u);return r=this,i=arguments,v<=0||v>t?(l&&(clearTimeout(l),l=null),u=c,a=e.apply(r,i),l===null&&(r=i=null)):!l&&n.trailing!==!1&&(l=setTimeout(p,v)),a}}const D=Se(Object.freeze(Object.defineProperty({__proto__:null,PromiseQueue:et,beautifyShortcut:Re,cacheable:Be,capitalize:Fe,copyTextToClipboard:We,debounce:Ue,deepMerge:B,deprecationAssert:Ye,getUserOS:oe,getValidUrl:Ve,isBoolean:qe,isClass:ze,isEmpty:De,isFunction:se,isIosDevice:He,isNumber:Ge,isObject:y,isPrintableKey:Ze,isPromise:Ke,isString:Qe,isUndefined:Xe,keyCodes:Je,mouseButtons:xe,notEmpty:$,throttle:tt,typeOf:o},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(A,"__esModule",{value:!0}),A.containsOnlyInlineElements=it;var nt=D,rt=L;function it(e){var t;(0,nt.isString)(e)?(t=document.createElement("div"),t.innerHTML=e):t=e;var n=function(r){return!(0,rt.blockElements)().includes(r.tagName.toLowerCase())&&Array.from(r.children).every(n)};return Array.from(t.children).every(n)}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.containsOnlyInlineElements=void 0;var t=A;Object.defineProperty(e,"containsOnlyInlineElements",{enumerable:!0,get:function(){return t.containsOnlyInlineElements}})})(_);var ce={},H={},h={},R={};Object.defineProperty(R,"__esModule",{value:!0}),R.make=at;function at(e,t,n){var r;t===void 0&&(t=null),n===void 0&&(n={});var i=document.createElement(e);if(Array.isArray(t)){var a=t.filter(function(u){return u!==void 0});(r=i.classList).add.apply(r,a)}else t!==null&&i.classList.add(t);for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l]);return i}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.make=void 0;var t=R;Object.defineProperty(e,"make",{enumerable:!0,get:function(){return t.make}})})(h),Object.defineProperty(H,"__esModule",{value:!0}),H.fragmentToString=ut;var lt=h;function ut(e){var t=(0,lt.make)("div");return t.appendChild(e),t.innerHTML}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fragmentToString=void 0;var t=H;Object.defineProperty(e,"fragmentToString",{enumerable:!0,get:function(){return t.fragmentToString}})})(ce);var de={},F={};Object.defineProperty(F,"__esModule",{value:!0}),F.getContentLength=st;var ot=s;function st(e){var t,n;return(0,ot.isNativeInput)(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:(n=(t=e.textContent)===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getContentLength=void 0;var t=F;Object.defineProperty(e,"getContentLength",{enumerable:!0,get:function(){return t.getContentLength}})})(de);var W={},U={},fe=m&&m.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r0;){var r=n.shift();if(r){if(e=r,(0,kt.isLeaf)(e)&&!(0,wt.isNodeEmpty)(e,t))return!1;n.push.apply(n,Array.from(e.childNodes))}}return!0}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=void 0;var t=V;Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return t.isEmpty}})})(_e);var ye={},te={};Object.defineProperty(te,"__esModule",{value:!0}),te.isFragment=At;var It=D;function At(e){return(0,It.isNumber)(e)?!1:!!e&&!!e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isFragment=void 0;var t=te;Object.defineProperty(e,"isFragment",{enumerable:!0,get:function(){return t.isFragment}})})(ye);var he={},ne={};Object.defineProperty(ne,"__esModule",{value:!0}),ne.isHTMLString=Bt;var $t=h;function Bt(e){var t=(0,$t.make)("div");return t.innerHTML=e,t.childElementCount>0}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isHTMLString=void 0;var t=ne;Object.defineProperty(e,"isHTMLString",{enumerable:!0,get:function(){return t.isHTMLString}})})(he);var Ee={},re={};Object.defineProperty(re,"__esModule",{value:!0}),re.offset=Dt;function Dt(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,i=t.top+r,a=t.left+n;return{top:i,left:a,bottom:i+t.height,right:a+t.width}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.offset=void 0;var t=re;Object.defineProperty(e,"offset",{enumerable:!0,get:function(){return t.offset}})})(Ee);var Oe={},ie={};Object.defineProperty(ie,"__esModule",{value:!0}),ie.prepend=Ht;function Ht(e,t){Array.isArray(t)?(t=t.reverse(),t.forEach(function(n){return e.prepend(n)})):e.prepend(t)}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.prepend=void 0;var t=ie;Object.defineProperty(e,"prepend",{enumerable:!0,get:function(){return t.prepend}})})(Oe),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.prepend=e.offset=e.make=e.isLineBreakTag=e.isSingleTag=e.isNodeEmpty=e.isLeaf=e.isHTMLString=e.isFragment=e.isEmpty=e.isElement=e.isContentEditable=e.isCollapsedWhitespaces=e.findAllInputs=e.isNativeInput=e.allInputsSelector=e.getDeepestNode=e.getDeepestBlockElements=e.getContentLength=e.fragmentToString=e.containsOnlyInlineElements=e.canSetCaret=e.calculateBaseline=e.blockElements=e.append=void 0;var t=T;Object.defineProperty(e,"allInputsSelector",{enumerable:!0,get:function(){return t.allInputsSelector}});var n=s;Object.defineProperty(e,"isNativeInput",{enumerable:!0,get:function(){return n.isNativeInput}});var r=ae;Object.defineProperty(e,"append",{enumerable:!0,get:function(){return r.append}});var i=L;Object.defineProperty(e,"blockElements",{enumerable:!0,get:function(){return i.blockElements}});var a=le;Object.defineProperty(e,"calculateBaseline",{enumerable:!0,get:function(){return a.calculateBaseline}});var l=ue;Object.defineProperty(e,"canSetCaret",{enumerable:!0,get:function(){return l.canSetCaret}});var u=_;Object.defineProperty(e,"containsOnlyInlineElements",{enumerable:!0,get:function(){return u.containsOnlyInlineElements}});var p=ce;Object.defineProperty(e,"fragmentToString",{enumerable:!0,get:function(){return p.fragmentToString}});var c=de;Object.defineProperty(e,"getContentLength",{enumerable:!0,get:function(){return c.getContentLength}});var v=W;Object.defineProperty(e,"getDeepestBlockElements",{enumerable:!0,get:function(){return v.getDeepestBlockElements}});var Rt=ve;Object.defineProperty(e,"getDeepestNode",{enumerable:!0,get:function(){return Rt.getDeepestNode}});var Ft=me;Object.defineProperty(e,"findAllInputs",{enumerable:!0,get:function(){return Ft.findAllInputs}});var Wt=be;Object.defineProperty(e,"isCollapsedWhitespaces",{enumerable:!0,get:function(){return Wt.isCollapsedWhitespaces}});var Ut=N;Object.defineProperty(e,"isContentEditable",{enumerable:!0,get:function(){return Ut.isContentEditable}});var qt=X;Object.defineProperty(e,"isElement",{enumerable:!0,get:function(){return qt.isElement}});var zt=_e;Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return zt.isEmpty}});var Gt=ye;Object.defineProperty(e,"isFragment",{enumerable:!0,get:function(){return Gt.isFragment}});var Kt=he;Object.defineProperty(e,"isHTMLString",{enumerable:!0,get:function(){return Kt.isHTMLString}});var Qt=Z;Object.defineProperty(e,"isLeaf",{enumerable:!0,get:function(){return Qt.isLeaf}});var Xt=x;Object.defineProperty(e,"isNodeEmpty",{enumerable:!0,get:function(){return Xt.isNodeEmpty}});var Yt=E;Object.defineProperty(e,"isLineBreakTag",{enumerable:!0,get:function(){return Yt.isLineBreakTag}});var Vt=O;Object.defineProperty(e,"isSingleTag",{enumerable:!0,get:function(){return Vt.isSingleTag}});var Zt=h;Object.defineProperty(e,"make",{enumerable:!0,get:function(){return Zt.make}});var Jt=Ee;Object.defineProperty(e,"offset",{enumerable:!0,get:function(){return Jt.offset}});var xt=Oe;Object.defineProperty(e,"prepend",{enumerable:!0,get:function(){return xt.prepend}})}(b);var Pe=(e=>(e.Left="left",e.Center="center",e))(Pe||{});class f{constructor({data:t,config:n,api:r,readOnly:i,block:a}){const{DEFAULT_ALIGNMENT:l}=f;this.api=r,this.readOnly=i,this._quotePlaceholder=(n==null?void 0:n.quotePlaceholder)||f.DEFAULT_QUOTE_PLACEHOLDER,this._captionPlaceholder=(n==null?void 0:n.captionPlaceholder)||f.DEFAULT_CAPTION_PLACEHOLDER,this._data={text:t.text||"",caption:t.caption||"",alignment:Object.values(Pe).includes(t.alignment)&&t.alignment||(n==null?void 0:n.defaultAlignment)||l},this._CSS={baseClass:this.api.styles.block,wrapper:"cdx-quote",text:"cdx-quote__text",input:this.api.styles.input,caption:"cdx-quote__caption"},this._block=a}static get isReadOnlySupported(){return!0}static get toolbox(){return{icon:je,title:"Quote"}}static get contentless(){return!0}static get enableLineBreaks(){return!0}static get DEFAULT_QUOTE_PLACEHOLDER(){return"Enter a quote"}static get DEFAULT_CAPTION_PLACEHOLDER(){return"Enter a caption"}static get DEFAULT_ALIGNMENT(){return"left"}static get conversionConfig(){return{import:"text",export:function(t){return t.caption?`${t.text} — ${t.caption}`:t.text}}}get CSS(){return{baseClass:this.api.styles.block,wrapper:"cdx-quote",text:"cdx-quote__text",input:this.api.styles.input,caption:"cdx-quote__caption"}}get settings(){return[{name:"left",icon:Te},{name:"center",icon:d}]}render(){const t=b.make("blockquote",[this._CSS.baseClass,this._CSS.wrapper]),n=b.make("div",[this._CSS.input,this._CSS.text],{contentEditable:!this.readOnly,innerHTML:this._data.text}),r=b.make("div",[this._CSS.input,this._CSS.caption],{contentEditable:!this.readOnly,innerHTML:this._data.caption});return n.dataset.placeholder=this._quotePlaceholder,r.dataset.placeholder=this._captionPlaceholder,t.appendChild(n),t.appendChild(r),t}save(t){const n=t.querySelector(`.${this._CSS.text}`),r=t.querySelector(`.${this._CSS.caption}`);return Object.assign(this._data,{text:(n==null?void 0:n.innerHTML)??"",caption:(r==null?void 0:r.innerHTML)??""})}static get sanitize(){return{text:{br:!0},caption:{br:!0},alignment:{}}}renderSettings(){const t=n=>n&&n[0].toUpperCase()+n.slice(1);return this.settings.map(n=>({icon:n.icon,label:this.api.i18n.t(`Align ${t(n.name)}`),onActivate:()=>this._toggleTune(n.name),isActive:this._data.alignment===n.name,closeOnActivate:!0}))}_toggleTune(t){this._data.alignment=t,this._block.dispatchChange()}}return f}); diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/quote.umd.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/quote.umd.js.download:Zone.Identifier new file mode 100644 index 00000000..e95f0795 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/quote.umd.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(1).html b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(1).html new file mode 100644 index 00000000..61a6c2a0 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(1).html @@ -0,0 +1,3 @@ + + +

Phó giám đốc điều hành

BS.CKII PHAN TRỊNH MINH HIẾU

\ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(1).html:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(1).html:Zone.Identifier new file mode 100644 index 00000000..ddebf00a Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(1).html:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(2).html b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(2).html new file mode 100644 index 00000000..f46b0caf --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(2).html @@ -0,0 +1,3 @@ + + +

BS Thái

Trưởng Khoa

\ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(2).html:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(2).html:Zone.Identifier new file mode 100644 index 00000000..ddebf00a Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(2).html:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(3).html b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(3).html new file mode 100644 index 00000000..78ac7ee1 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(3).html @@ -0,0 +1,3 @@ + + +

BS Thái

Trưởng Khoa

\ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(3).html:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(3).html:Zone.Identifier new file mode 100644 index 00000000..ddebf00a Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(3).html:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(4).html b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(4).html new file mode 100644 index 00000000..b614b53f --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(4).html @@ -0,0 +1,3 @@ + + +

BS Thái

Trưởng Khoa

\ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(4).html:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(4).html:Zone.Identifier new file mode 100644 index 00000000..ddebf00a Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource(4).html:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource.html b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource.html new file mode 100644 index 00000000..0c1df609 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource.html @@ -0,0 +1,3 @@ + + +

Giám đốc

TS.BS TRẦN CHÍ CƯỜNG

\ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource.html:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource.html:Zone.Identifier new file mode 100644 index 00000000..ddebf00a Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/saved_resource.html:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/sb-admin-2.min.css b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/sb-admin-2.min.css new file mode 100644 index 00000000..65c05f17 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/sb-admin-2.min.css @@ -0,0 +1,10 @@ +/*! + * Start Bootstrap - SB Admin 2 v4.1.4 (https://startbootstrap.com/theme/sb-admin-2) + * Copyright 2013-2021 Start Bootstrap + * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-sb-admin-2/blob/master/LICENSE) + *//*! + * Bootstrap v4.6.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */:root{--blue:#4e73df;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#e74a3b;--orange:#fd7e14;--yellow:#f6c23e;--green:#1cc88a;--teal:#20c9a6;--cyan:#36b9cc;--white:#fff;--gray:#858796;--gray-dark:#5a5c69;--primary:#4e73df;--secondary:#858796;--success:#1cc88a;--info:#36b9cc;--warning:#f6c23e;--danger:#e74a3b;--light:#f8f9fc;--dark:#5a5c69;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:Nunito,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#858796;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#4e73df;text-decoration:none;background-color:transparent}a:hover{color:#224abe;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#858796;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:400;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#858796}.blockquote-footer::before{content:"\2014\00A0"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dddfeb;border-radius:.35rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#858796}code{font-size:87.5%;color:#e83e8c;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#3a3b45;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#3a3b45}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{width:100%;padding-right:.75rem;padding-left:.75rem;margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}.row{display:flex;flex-wrap:wrap;margin-right:-.75rem;margin-left:-.75rem}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;padding-right:.75rem;padding-left:.75rem}.col{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-1>*{flex:0 0 100%;max-width:100%}.row-cols-2>*{flex:0 0 50%;max-width:50%}.row-cols-3>*{flex:0 0 33.33333%;max-width:33.33333%}.row-cols-4>*{flex:0 0 25%;max-width:25%}.row-cols-5>*{flex:0 0 20%;max-width:20%}.row-cols-6>*{flex:0 0 16.66667%;max-width:16.66667%}.col-auto{flex:0 0 auto;width:auto;max-width:100%}.col-1{flex:0 0 8.33333%;max-width:8.33333%}.col-2{flex:0 0 16.66667%;max-width:16.66667%}.col-3{flex:0 0 25%;max-width:25%}.col-4{flex:0 0 33.33333%;max-width:33.33333%}.col-5{flex:0 0 41.66667%;max-width:41.66667%}.col-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.33333%;max-width:58.33333%}.col-8{flex:0 0 66.66667%;max-width:66.66667%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.33333%;max-width:83.33333%}.col-11{flex:0 0 91.66667%;max-width:91.66667%}.col-12{flex:0 0 100%;max-width:100%}.order-first{order:-1}.order-last{order:13}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-9{order:9}.order-10{order:10}.order-11{order:11}.order-12{order:12}.offset-1{margin-left:8.33333%}.offset-2{margin-left:16.66667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333%}.offset-5{margin-left:41.66667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333%}.offset-8{margin-left:66.66667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333%}.offset-11{margin-left:91.66667%}@media (min-width:576px){.col-sm{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-sm-1>*{flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{flex:0 0 33.33333%;max-width:33.33333%}.row-cols-sm-4>*{flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{flex:0 0 16.66667%;max-width:16.66667%}.col-sm-auto{flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{flex:0 0 8.33333%;max-width:8.33333%}.col-sm-2{flex:0 0 16.66667%;max-width:16.66667%}.col-sm-3{flex:0 0 25%;max-width:25%}.col-sm-4{flex:0 0 33.33333%;max-width:33.33333%}.col-sm-5{flex:0 0 41.66667%;max-width:41.66667%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-7{flex:0 0 58.33333%;max-width:58.33333%}.col-sm-8{flex:0 0 66.66667%;max-width:66.66667%}.col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.33333%;max-width:83.33333%}.col-sm-11{flex:0 0 91.66667%;max-width:91.66667%}.col-sm-12{flex:0 0 100%;max-width:100%}.order-sm-first{order:-1}.order-sm-last{order:13}.order-sm-0{order:0}.order-sm-1{order:1}.order-sm-2{order:2}.order-sm-3{order:3}.order-sm-4{order:4}.order-sm-5{order:5}.order-sm-6{order:6}.order-sm-7{order:7}.order-sm-8{order:8}.order-sm-9{order:9}.order-sm-10{order:10}.order-sm-11{order:11}.order-sm-12{order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333%}.offset-sm-2{margin-left:16.66667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333%}.offset-sm-5{margin-left:41.66667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333%}.offset-sm-8{margin-left:66.66667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333%}.offset-sm-11{margin-left:91.66667%}}@media (min-width:768px){.col-md{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-md-1>*{flex:0 0 100%;max-width:100%}.row-cols-md-2>*{flex:0 0 50%;max-width:50%}.row-cols-md-3>*{flex:0 0 33.33333%;max-width:33.33333%}.row-cols-md-4>*{flex:0 0 25%;max-width:25%}.row-cols-md-5>*{flex:0 0 20%;max-width:20%}.row-cols-md-6>*{flex:0 0 16.66667%;max-width:16.66667%}.col-md-auto{flex:0 0 auto;width:auto;max-width:100%}.col-md-1{flex:0 0 8.33333%;max-width:8.33333%}.col-md-2{flex:0 0 16.66667%;max-width:16.66667%}.col-md-3{flex:0 0 25%;max-width:25%}.col-md-4{flex:0 0 33.33333%;max-width:33.33333%}.col-md-5{flex:0 0 41.66667%;max-width:41.66667%}.col-md-6{flex:0 0 50%;max-width:50%}.col-md-7{flex:0 0 58.33333%;max-width:58.33333%}.col-md-8{flex:0 0 66.66667%;max-width:66.66667%}.col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.33333%;max-width:83.33333%}.col-md-11{flex:0 0 91.66667%;max-width:91.66667%}.col-md-12{flex:0 0 100%;max-width:100%}.order-md-first{order:-1}.order-md-last{order:13}.order-md-0{order:0}.order-md-1{order:1}.order-md-2{order:2}.order-md-3{order:3}.order-md-4{order:4}.order-md-5{order:5}.order-md-6{order:6}.order-md-7{order:7}.order-md-8{order:8}.order-md-9{order:9}.order-md-10{order:10}.order-md-11{order:11}.order-md-12{order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333%}.offset-md-2{margin-left:16.66667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333%}.offset-md-5{margin-left:41.66667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333%}.offset-md-8{margin-left:66.66667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333%}.offset-md-11{margin-left:91.66667%}}@media (min-width:992px){.col-lg{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-lg-1>*{flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{flex:0 0 33.33333%;max-width:33.33333%}.row-cols-lg-4>*{flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{flex:0 0 16.66667%;max-width:16.66667%}.col-lg-auto{flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{flex:0 0 8.33333%;max-width:8.33333%}.col-lg-2{flex:0 0 16.66667%;max-width:16.66667%}.col-lg-3{flex:0 0 25%;max-width:25%}.col-lg-4{flex:0 0 33.33333%;max-width:33.33333%}.col-lg-5{flex:0 0 41.66667%;max-width:41.66667%}.col-lg-6{flex:0 0 50%;max-width:50%}.col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}.col-lg-8{flex:0 0 66.66667%;max-width:66.66667%}.col-lg-9{flex:0 0 75%;max-width:75%}.col-lg-10{flex:0 0 83.33333%;max-width:83.33333%}.col-lg-11{flex:0 0 91.66667%;max-width:91.66667%}.col-lg-12{flex:0 0 100%;max-width:100%}.order-lg-first{order:-1}.order-lg-last{order:13}.order-lg-0{order:0}.order-lg-1{order:1}.order-lg-2{order:2}.order-lg-3{order:3}.order-lg-4{order:4}.order-lg-5{order:5}.order-lg-6{order:6}.order-lg-7{order:7}.order-lg-8{order:8}.order-lg-9{order:9}.order-lg-10{order:10}.order-lg-11{order:11}.order-lg-12{order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333%}.offset-lg-2{margin-left:16.66667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333%}.offset-lg-5{margin-left:41.66667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333%}.offset-lg-8{margin-left:66.66667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333%}.offset-lg-11{margin-left:91.66667%}}@media (min-width:1200px){.col-xl{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-xl-1>*{flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{flex:0 0 33.33333%;max-width:33.33333%}.row-cols-xl-4>*{flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{flex:0 0 16.66667%;max-width:16.66667%}.col-xl-auto{flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{flex:0 0 8.33333%;max-width:8.33333%}.col-xl-2{flex:0 0 16.66667%;max-width:16.66667%}.col-xl-3{flex:0 0 25%;max-width:25%}.col-xl-4{flex:0 0 33.33333%;max-width:33.33333%}.col-xl-5{flex:0 0 41.66667%;max-width:41.66667%}.col-xl-6{flex:0 0 50%;max-width:50%}.col-xl-7{flex:0 0 58.33333%;max-width:58.33333%}.col-xl-8{flex:0 0 66.66667%;max-width:66.66667%}.col-xl-9{flex:0 0 75%;max-width:75%}.col-xl-10{flex:0 0 83.33333%;max-width:83.33333%}.col-xl-11{flex:0 0 91.66667%;max-width:91.66667%}.col-xl-12{flex:0 0 100%;max-width:100%}.order-xl-first{order:-1}.order-xl-last{order:13}.order-xl-0{order:0}.order-xl-1{order:1}.order-xl-2{order:2}.order-xl-3{order:3}.order-xl-4{order:4}.order-xl-5{order:5}.order-xl-6{order:6}.order-xl-7{order:7}.order-xl-8{order:8}.order-xl-9{order:9}.order-xl-10{order:10}.order-xl-11{order:11}.order-xl-12{order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333%}.offset-xl-2{margin-left:16.66667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333%}.offset-xl-5{margin-left:41.66667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333%}.offset-xl-8{margin-left:66.66667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333%}.offset-xl-11{margin-left:91.66667%}}.table{width:100%;margin-bottom:1rem;color:#858796}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #e3e6f0}.table thead th{vertical-align:bottom;border-bottom:2px solid #e3e6f0}.table tbody+tbody{border-top:2px solid #e3e6f0}.table-sm td,.table-sm th{padding:.3rem}.table-bordered{border:1px solid #e3e6f0}.table-bordered td,.table-bordered th{border:1px solid #e3e6f0}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#858796;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#cdd8f6}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#a3b6ee}.table-hover .table-primary:hover{background-color:#b7c7f2}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#b7c7f2}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#dddde2}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#c0c1c8}.table-hover .table-secondary:hover{background-color:#cfcfd6}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#cfcfd6}.table-success,.table-success>td,.table-success>th{background-color:#bff0de}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#89e2c2}.table-hover .table-success:hover{background-color:#aaebd3}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#aaebd3}.table-info,.table-info>td,.table-info>th{background-color:#c7ebf1}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#96dbe4}.table-hover .table-info:hover{background-color:#b3e4ec}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#b3e4ec}.table-warning,.table-warning>td,.table-warning>th{background-color:#fceec9}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#fadf9b}.table-hover .table-warning:hover{background-color:#fbe6b1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#fbe6b1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f8ccc8}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#f3a199}.table-hover .table-danger:hover{background-color:#f5b7b1}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f5b7b1}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfd}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#d1d1d5}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#a9aab1}.table-hover .table-dark:hover{background-color:#c4c4c9}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#c4c4c9}.table-active,.table-active>td,.table-active>th{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#5a5c69;border-color:#6c6e7e}.table .thead-light th{color:#6e707e;background-color:#eaecf4;border-color:#e3e6f0}.table-dark{color:#fff;background-color:#5a5c69}.table-dark td,.table-dark th,.table-dark thead th{border-color:#6c6e7e}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:rgba(255,255,255,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#6e707e;background-color:#fff;background-clip:padding-box;border:1px solid #d1d3e2;border-radius:.35rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #6e707e}.form-control:focus{color:#6e707e;background-color:#fff;border-color:#bac8f3;outline:0;box-shadow:0 0 0 .2rem rgba(78,115,223,.25)}.form-control::-webkit-input-placeholder{color:#858796;opacity:1}.form-control::-moz-placeholder{color:#858796;opacity:1}.form-control:-ms-input-placeholder{color:#858796;opacity:1}.form-control::-ms-input-placeholder{color:#858796;opacity:1}.form-control::placeholder{color:#858796;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#eaecf4;opacity:1}input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{-webkit-appearance:none;-moz-appearance:none;appearance:none}select.form-control:focus::-ms-value{color:#6e707e;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#858796;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{color:#858796}.form-check-label{margin-bottom:0}.form-check-inline{display:inline-flex;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#1cc88a}.valid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(28,200,138,.9);border-radius:.35rem}.form-row>.col>.valid-tooltip,.form-row>[class*=col-]>.valid-tooltip{left:5px}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#1cc88a;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%231cc88a' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#1cc88a;box-shadow:0 0 0 .2rem rgba(28,200,138,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#1cc88a;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%235a5c69' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat,#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%231cc88a' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem) no-repeat}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#1cc88a;box-shadow:0 0 0 .2rem rgba(28,200,138,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#1cc88a}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#1cc88a}.custom-control-input.is-valid~.custom-control-label::before,.was-validated .custom-control-input:valid~.custom-control-label::before{border-color:#1cc88a}.custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated .custom-control-input:valid:checked~.custom-control-label::before{border-color:#34e3a4;background-color:#34e3a4}.custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(28,200,138,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before{border-color:#1cc88a}.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#1cc88a}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#1cc88a;box-shadow:0 0 0 .2rem rgba(28,200,138,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#e74a3b}.invalid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(231,74,59,.9);border-radius:.35rem}.form-row>.col>.invalid-tooltip,.form-row>[class*=col-]>.invalid-tooltip{left:5px}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#e74a3b;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23e74a3b' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e74a3b' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#e74a3b;box-shadow:0 0 0 .2rem rgba(231,74,59,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#e74a3b;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%235a5c69' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat,#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23e74a3b' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e74a3b' stroke='none'/%3e%3c/svg%3e") center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem) no-repeat}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#e74a3b;box-shadow:0 0 0 .2rem rgba(231,74,59,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#e74a3b}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#e74a3b}.custom-control-input.is-invalid~.custom-control-label::before,.was-validated .custom-control-input:invalid~.custom-control-label::before{border-color:#e74a3b}.custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated .custom-control-input:invalid:checked~.custom-control-label::before{border-color:#ed7468;background-color:#ed7468}.custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(231,74,59,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before{border-color:#e74a3b}.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#e74a3b}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#e74a3b;box-shadow:0 0 0 .2rem rgba(231,74,59,.25)}.form-inline{display:flex;flex-flow:row wrap;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{display:flex;align-items:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:flex;flex:0 0 auto;flex-flow:row wrap;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:flex;align-items:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{align-items:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#858796;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.35rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#858796;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(78,115,223,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#4e73df;border-color:#4e73df}.btn-primary:hover{color:#fff;background-color:#2e59d9;border-color:#2653d4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#2e59d9;border-color:#2653d4;box-shadow:0 0 0 .2rem rgba(105,136,228,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#4e73df;border-color:#4e73df}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#2653d4;border-color:#244ec9}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(105,136,228,.5)}.btn-secondary{color:#fff;background-color:#858796;border-color:#858796}.btn-secondary:hover{color:#fff;background-color:#717384;border-color:#6b6d7d}.btn-secondary.focus,.btn-secondary:focus{color:#fff;background-color:#717384;border-color:#6b6d7d;box-shadow:0 0 0 .2rem rgba(151,153,166,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#858796;border-color:#858796}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#6b6d7d;border-color:#656776}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(151,153,166,.5)}.btn-success{color:#fff;background-color:#1cc88a;border-color:#1cc88a}.btn-success:hover{color:#fff;background-color:#17a673;border-color:#169b6b}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#17a673;border-color:#169b6b;box-shadow:0 0 0 .2rem rgba(62,208,156,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#1cc88a;border-color:#1cc88a}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#169b6b;border-color:#149063}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(62,208,156,.5)}.btn-info{color:#fff;background-color:#36b9cc;border-color:#36b9cc}.btn-info:hover{color:#fff;background-color:#2c9faf;border-color:#2a96a5}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#2c9faf;border-color:#2a96a5;box-shadow:0 0 0 .2rem rgba(84,196,212,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#36b9cc;border-color:#36b9cc}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#2a96a5;border-color:#278c9b}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(84,196,212,.5)}.btn-warning{color:#fff;background-color:#f6c23e;border-color:#f6c23e}.btn-warning:hover{color:#fff;background-color:#f4b619;border-color:#f4b30d}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#f4b619;border-color:#f4b30d;box-shadow:0 0 0 .2rem rgba(247,203,91,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#fff;background-color:#f6c23e;border-color:#f6c23e}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#fff;background-color:#f4b30d;border-color:#e9aa0b}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(247,203,91,.5)}.btn-danger{color:#fff;background-color:#e74a3b;border-color:#e74a3b}.btn-danger:hover{color:#fff;background-color:#e02d1b;border-color:#d52a1a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#e02d1b;border-color:#d52a1a;box-shadow:0 0 0 .2rem rgba(235,101,88,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#e74a3b;border-color:#e74a3b}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#d52a1a;border-color:#ca2819}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(235,101,88,.5)}.btn-light{color:#3a3b45;background-color:#f8f9fc;border-color:#f8f9fc}.btn-light:hover{color:#3a3b45;background-color:#dde2f1;border-color:#d4daed}.btn-light.focus,.btn-light:focus{color:#3a3b45;background-color:#dde2f1;border-color:#d4daed;box-shadow:0 0 0 .2rem rgba(220,221,225,.5)}.btn-light.disabled,.btn-light:disabled{color:#3a3b45;background-color:#f8f9fc;border-color:#f8f9fc}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#3a3b45;background-color:#d4daed;border-color:#cbd3e9}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,221,225,.5)}.btn-dark{color:#fff;background-color:#5a5c69;border-color:#5a5c69}.btn-dark:hover{color:#fff;background-color:#484a54;border-color:#42444e}.btn-dark.focus,.btn-dark:focus{color:#fff;background-color:#484a54;border-color:#42444e;box-shadow:0 0 0 .2rem rgba(115,116,128,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#5a5c69;border-color:#5a5c69}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#42444e;border-color:#3d3e47}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(115,116,128,.5)}.btn-outline-primary{color:#4e73df;border-color:#4e73df}.btn-outline-primary:hover{color:#fff;background-color:#4e73df;border-color:#4e73df}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(78,115,223,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#4e73df;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#4e73df;border-color:#4e73df}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(78,115,223,.5)}.btn-outline-secondary{color:#858796;border-color:#858796}.btn-outline-secondary:hover{color:#fff;background-color:#858796;border-color:#858796}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(133,135,150,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#858796;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#858796;border-color:#858796}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(133,135,150,.5)}.btn-outline-success{color:#1cc88a;border-color:#1cc88a}.btn-outline-success:hover{color:#fff;background-color:#1cc88a;border-color:#1cc88a}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(28,200,138,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#1cc88a;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#1cc88a;border-color:#1cc88a}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(28,200,138,.5)}.btn-outline-info{color:#36b9cc;border-color:#36b9cc}.btn-outline-info:hover{color:#fff;background-color:#36b9cc;border-color:#36b9cc}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(54,185,204,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#36b9cc;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#36b9cc;border-color:#36b9cc}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(54,185,204,.5)}.btn-outline-warning{color:#f6c23e;border-color:#f6c23e}.btn-outline-warning:hover{color:#fff;background-color:#f6c23e;border-color:#f6c23e}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(246,194,62,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#f6c23e;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#fff;background-color:#f6c23e;border-color:#f6c23e}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(246,194,62,.5)}.btn-outline-danger{color:#e74a3b;border-color:#e74a3b}.btn-outline-danger:hover{color:#fff;background-color:#e74a3b;border-color:#e74a3b}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(231,74,59,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#e74a3b;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#e74a3b;border-color:#e74a3b}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(231,74,59,.5)}.btn-outline-light{color:#f8f9fc;border-color:#f8f9fc}.btn-outline-light:hover{color:#3a3b45;background-color:#f8f9fc;border-color:#f8f9fc}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,252,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fc;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#3a3b45;background-color:#f8f9fc;border-color:#f8f9fc}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,252,.5)}.btn-outline-dark{color:#5a5c69;border-color:#5a5c69}.btn-outline-dark:hover{color:#fff;background-color:#5a5c69;border-color:#5a5c69}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(90,92,105,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#5a5c69;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#5a5c69;border-color:#5a5c69}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(90,92,105,.5)}.btn-link{font-weight:400;color:#4e73df;text-decoration:none}.btn-link:hover{color:#224abe;text-decoration:underline}.btn-link.focus,.btn-link:focus{text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#858796;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .15s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:.85rem;color:#858796;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #e3e6f0;border-radius:.35rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #eaecf4}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#3a3b45;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#2e2f37;text-decoration:none;background-color:#eaecf4}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#4e73df}.dropdown-item.disabled,.dropdown-item:disabled{color:#b7b9cc;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#858796;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#3a3b45}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover{z-index:1}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;flex:1 1 auto;width:1%;min-width:0;margin-bottom:0}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:flex;align-items:center}.input-group>.custom-file:not(:first-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label::after,.input-group:not(.has-validation)>.custom-select:not(:last-child),.input-group:not(.has-validation)>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.custom-file:nth-last-child(n+3) .custom-file-label::after,.input-group.has-validation>.custom-select:nth-last-child(n+3),.input-group.has-validation>.form-control:nth-last-child(n+3){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-append,.input-group-prepend{display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#6e707e;text-align:center;white-space:nowrap;background-color:#eaecf4;border:1px solid #d1d3e2;border-radius:.35rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group.has-validation>.input-group-append:nth-last-child(n+3)>.btn,.input-group.has-validation>.input-group-append:nth-last-child(n+3)>.input-group-text,.input-group:not(.has-validation)>.input-group-append:not(:last-child)>.btn,.input-group:not(.has-validation)>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;z-index:1;display:block;min-height:1.5rem;padding-left:1.5rem;-webkit-print-color-adjust:exact;color-adjust:exact}.custom-control-inline{display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#4e73df;background-color:#4e73df}.custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(78,115,223,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#bac8f3}.custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#e5ebfa;border-color:#e5ebfa}.custom-control-input:disabled~.custom-control-label,.custom-control-input[disabled]~.custom-control-label{color:#858796}.custom-control-input:disabled~.custom-control-label::before,.custom-control-input[disabled]~.custom-control-label::before{background-color:#eaecf4}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:#b7b9cc solid 1px}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:50%/50% 50% no-repeat}.custom-checkbox .custom-control-label::before{border-radius:.35rem}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#4e73df;background-color:#4e73df}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(78,115,223,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(78,115,223,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(78,115,223,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label::after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#b7b9cc;border-radius:.5rem;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label::after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(78,115,223,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#6e707e;vertical-align:middle;background:#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%235a5c69' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat;border:1px solid #d1d3e2;border-radius:.35rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#bac8f3;outline:0;box-shadow:0 0 0 .2rem rgba(78,115,223,.25)}.custom-select:focus::-ms-value{color:#6e707e;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#858796;background-color:#eaecf4}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #6e707e}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + .75rem + 2px);margin:0;overflow:hidden;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#bac8f3;box-shadow:0 0 0 .2rem rgba(78,115,223,.25)}.custom-file-input:disabled~.custom-file-label,.custom-file-input[disabled]~.custom-file-label{background-color:#eaecf4}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;overflow:hidden;font-weight:400;line-height:1.5;color:#6e707e;background-color:#fff;border:1px solid #d1d3e2;border-radius:.35rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);padding:.375rem .75rem;line-height:1.5;color:#6e707e;content:"Browse";background-color:#eaecf4;border-left:inherit;border-radius:0 .35rem .35rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:0}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(78,115,223,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(78,115,223,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(78,115,223,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#4e73df;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#e5ebfa}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dddfeb;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#4e73df;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#e5ebfa}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dddfeb;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#4e73df;border:0;border-radius:1rem;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#e5ebfa}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dddfeb;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dddfeb;border-radius:1rem}.custom-range:disabled::-webkit-slider-thumb{background-color:#b7b9cc}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#b7b9cc}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#b7b9cc}.custom-control-label::before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label::before,.custom-file-label,.custom-select{transition:none}}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#858796;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dddfeb}.nav-tabs .nav-link{margin-bottom:-1px;border:1px solid transparent;border-top-left-radius:.35rem;border-top-right-radius:.35rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#eaecf4 #eaecf4 #dddfeb}.nav-tabs .nav-link.disabled{color:#858796;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#6e707e;background-color:#fff;border-color:#dddfeb #dddfeb #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.35rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#4e73df}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:.5rem 1rem}.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.35rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:50%/100% 100% no-repeat}.navbar-nav-scroll{max-height:75vh;overflow-y:auto}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{flex-wrap:nowrap}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{flex-wrap:nowrap}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{flex-wrap:nowrap}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{flex-wrap:nowrap}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{flex-wrap:nowrap}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid #e3e6f0;border-radius:.35rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.35rem - 1px);border-top-right-radius:calc(.35rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.35rem - 1px);border-bottom-left-radius:calc(.35rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:#f8f9fc;border-bottom:1px solid #e3e6f0}.card-header:first-child{border-radius:calc(.35rem - 1px) calc(.35rem - 1px) 0 0}.card-footer{padding:.75rem 1.25rem;background-color:#f8f9fc;border-top:1px solid #e3e6f0}.card-footer:last-child{border-radius:0 0 calc(.35rem - 1px) calc(.35rem - 1px)}.card-header-tabs{margin-right:-.625rem;margin-bottom:-.75rem;margin-left:-.625rem;border-bottom:0}.card-header-pills{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem;border-radius:calc(.35rem - 1px)}.card-img,.card-img-bottom,.card-img-top{flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.35rem - 1px);border-top-right-radius:calc(.35rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.35rem - 1px);border-bottom-left-radius:calc(.35rem - 1px)}.card-deck .card{margin-bottom:.75rem}@media (min-width:576px){.card-deck{display:flex;flex-flow:row wrap;margin-right:-.75rem;margin-left:-.75rem}.card-deck .card{flex:1 0 0%;margin-right:.75rem;margin-bottom:0;margin-left:.75rem}}.card-group>.card{margin-bottom:.75rem}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width:576px){.card-columns{-moz-column-count:3;column-count:3;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion{overflow-anchor:none}.accordion>.card{overflow:hidden}.accordion>.card:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{display:flex;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#eaecf4;border-radius:.35rem}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:.5rem;color:#858796;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#858796}.pagination{display:flex;padding-left:0;list-style:none;border-radius:.35rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#4e73df;background-color:#fff;border:1px solid #dddfeb}.page-link:hover{z-index:2;color:#224abe;text-decoration:none;background-color:#eaecf4;border-color:#dddfeb}.page-link:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(78,115,223,.25)}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.35rem;border-bottom-left-radius:.35rem}.page-item:last-child .page-link{border-top-right-radius:.35rem;border-bottom-right-radius:.35rem}.page-item.active .page-link{z-index:3;color:#fff;background-color:#4e73df;border-color:#4e73df}.page-item.disabled .page-link{color:#858796;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dddfeb}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.35rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#4e73df}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#2653d4}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(78,115,223,.5)}.badge-secondary{color:#fff;background-color:#858796}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#6b6d7d}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(133,135,150,.5)}.badge-success{color:#fff;background-color:#1cc88a}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#169b6b}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(28,200,138,.5)}.badge-info{color:#fff;background-color:#36b9cc}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#2a96a5}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(54,185,204,.5)}.badge-warning{color:#fff;background-color:#f6c23e}a.badge-warning:focus,a.badge-warning:hover{color:#fff;background-color:#f4b30d}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(246,194,62,.5)}.badge-danger{color:#fff;background-color:#e74a3b}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#d52a1a}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(231,74,59,.5)}.badge-light{color:#3a3b45;background-color:#f8f9fc}a.badge-light:focus,a.badge-light:hover{color:#3a3b45;background-color:#d4daed}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,252,.5)}.badge-dark{color:#fff;background-color:#5a5c69}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#42444e}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(90,92,105,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#eaecf4;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.35rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;z-index:2;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#293c74;background-color:#dce3f9;border-color:#cdd8f6}.alert-primary hr{border-top-color:#b7c7f2}.alert-primary .alert-link{color:#1c294e}.alert-secondary{color:#45464e;background-color:#e7e7ea;border-color:#dddde2}.alert-secondary hr{border-top-color:#cfcfd6}.alert-secondary .alert-link{color:#2d2e33}.alert-success{color:#0f6848;background-color:#d2f4e8;border-color:#bff0de}.alert-success hr{border-top-color:#aaebd3}.alert-success .alert-link{color:#093b29}.alert-info{color:#1c606a;background-color:#d7f1f5;border-color:#c7ebf1}.alert-info hr{border-top-color:#b3e4ec}.alert-info .alert-link{color:#113b42}.alert-warning{color:#806520;background-color:#fdf3d8;border-color:#fceec9}.alert-warning hr{border-top-color:#fbe6b1}.alert-warning .alert-link{color:#574516}.alert-danger{color:#78261f;background-color:#fadbd8;border-color:#f8ccc8}.alert-danger hr{border-top-color:#f5b7b1}.alert-danger .alert-link{color:#4f1915}.alert-light{color:#818183;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686869}.alert-dark{color:#2f3037;background-color:#dedee1;border-color:#d1d1d5}.alert-dark hr{border-top-color:#c4c4c9}.alert-dark .alert-link{color:#18181c}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:flex;height:1rem;overflow:hidden;line-height:0;font-size:.75rem;background-color:#eaecf4;border-radius:.35rem}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#4e73df;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:1s linear infinite progress-bar-stripes;animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.media{display:flex;align-items:flex-start}.media-body{flex:1}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.35rem}.list-group-item-action{width:100%;color:#6e707e;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#6e707e;text-decoration:none;background-color:#f8f9fc}.list-group-item-action:active{color:#858796;background-color:#eaecf4}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#858796;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#4e73df;border-color:#4e73df}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.35rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.35rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.35rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.35rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.35rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.35rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.35rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.35rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.35rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.35rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#293c74;background-color:#cdd8f6}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#293c74;background-color:#b7c7f2}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#293c74;border-color:#293c74}.list-group-item-secondary{color:#45464e;background-color:#dddde2}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#45464e;background-color:#cfcfd6}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#45464e;border-color:#45464e}.list-group-item-success{color:#0f6848;background-color:#bff0de}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f6848;background-color:#aaebd3}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f6848;border-color:#0f6848}.list-group-item-info{color:#1c606a;background-color:#c7ebf1}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#1c606a;background-color:#b3e4ec}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#1c606a;border-color:#1c606a}.list-group-item-warning{color:#806520;background-color:#fceec9}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#806520;background-color:#fbe6b1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#806520;border-color:#806520}.list-group-item-danger{color:#78261f;background-color:#f8ccc8}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#78261f;background-color:#f5b7b1}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#78261f;border-color:#78261f}.list-group-item-light{color:#818183;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818183;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818183;border-color:#818183}.list-group-item-dark{color:#2f3037;background-color:#d1d1d5}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#2f3037;background-color:#c4c4c9}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#2f3037;border-color:#2f3037}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:transparent;border:0}a.close.disabled{pointer-events:none}.toast{flex-basis:350px;max-width:350px;font-size:.875rem;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:flex;align-items:center;padding:.25rem .75rem;color:#858796;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);height:-webkit-min-content;height:-moz-min-content;height:min-content;content:""}.modal-dialog-centered.modal-dialog-scrollable{flex-direction:column;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable::before{content:none}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #e3e6f0;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:.75rem;border-top:1px solid #e3e6f0;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered::before{height:calc(100vh - 3.5rem);height:-webkit-min-content;height:-moz-min-content;height:min-content}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:Nunito,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow::before,.bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow::before,.bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow::before,.bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow::before,.bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.35rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:Nunito,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::after,.popover .arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=top]>.arrow::before,.bs-popover-top>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow::after,.bs-popover-top>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow::before,.bs-popover-right>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow::after,.bs-popover-right>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=bottom]>.arrow::before,.bs-popover-bottom>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow::after,.bs-popover-bottom>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow::before,.bs-popover-left>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow::after,.bs-popover-left>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#858796}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:50%/100% 100% no-repeat}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:flex;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@-webkit-keyframes spinner-border{to{transform:rotate(360deg)}}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:.75s linear infinite spinner-border;animation:.75s linear infinite spinner-border}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:.75s linear infinite spinner-grow;animation:.75s linear infinite spinner-grow}.spinner-grow-sm{width:1rem;height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{-webkit-animation-duration:1.5s;animation-duration:1.5s}}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#4e73df!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#2653d4!important}.bg-secondary{background-color:#858796!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#6b6d7d!important}.bg-success{background-color:#1cc88a!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#169b6b!important}.bg-info{background-color:#36b9cc!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#2a96a5!important}.bg-warning{background-color:#f6c23e!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#f4b30d!important}.bg-danger{background-color:#e74a3b!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#d52a1a!important}.bg-light{background-color:#f8f9fc!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#d4daed!important}.bg-dark{background-color:#5a5c69!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#42444e!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #e3e6f0!important}.border-top{border-top:1px solid #e3e6f0!important}.border-right{border-right:1px solid #e3e6f0!important}.border-bottom{border-bottom:1px solid #e3e6f0!important}.border-left{border-left:1px solid #e3e6f0!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#4e73df!important}.border-secondary{border-color:#858796!important}.border-success{border-color:#1cc88a!important}.border-info{border-color:#36b9cc!important}.border-warning{border-color:#f6c23e!important}.border-danger{border-color:#e74a3b!important}.border-light{border-color:#f8f9fc!important}.border-dark{border-color:#5a5c69!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.35rem!important}.rounded-top{border-top-left-radius:.35rem!important;border-top-right-radius:.35rem!important}.rounded-right{border-top-right-radius:.35rem!important;border-bottom-right-radius:.35rem!important}.rounded-bottom{border-bottom-right-radius:.35rem!important;border-bottom-left-radius:.35rem!important}.rounded-left{border-top-left-radius:.35rem!important;border-bottom-left-radius:.35rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.85714%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-fill{flex:1 1 auto!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}@media (min-width:576px){.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}}@media (min-width:768px){.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;-ms-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;-ms-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports ((position:-webkit-sticky) or (position:sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem 0 rgba(58,59,69,.2)!important}.shadow{box-shadow:0 .15rem 1.75rem 0 rgba(58,59,69,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.dropdown .dropdown-menu .dropdown-header,.sidebar .sidebar-heading,.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#4e73df!important}a.text-primary:focus,a.text-primary:hover{color:#224abe!important}.text-secondary{color:#858796!important}a.text-secondary:focus,a.text-secondary:hover{color:#60616f!important}.text-success{color:#1cc88a!important}a.text-success:focus,a.text-success:hover{color:#13855c!important}.text-info{color:#36b9cc!important}a.text-info:focus,a.text-info:hover{color:#258391!important}.text-warning{color:#f6c23e!important}a.text-warning:focus,a.text-warning:hover{color:#dda20a!important}.text-danger{color:#e74a3b!important}a.text-danger:focus,a.text-danger:hover{color:#be2617!important}.text-light{color:#f8f9fc!important}a.text-light:focus,a.text-light:hover{color:#c2cbe5!important}.text-dark{color:#5a5c69!important}a.text-dark:focus,a.text-dark:hover{color:#373840!important}.text-body{color:#858796!important}.text-muted{color:#858796!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:rgba(255,255,255,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-break:break-word!important;word-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,::after,::before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #b7b9cc;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px!important}.container{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dddfeb!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#e3e6f0}.table .thead-dark th{color:inherit;border-color:#e3e6f0}}html{position:relative;min-height:100%}body{height:100%}a:focus{outline:0}#wrapper{display:flex}#wrapper #content-wrapper{background-color:#f8f9fc;width:100%;overflow-x:hidden}#wrapper #content-wrapper #content{flex:1 0 auto}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{padding-left:1.5rem;padding-right:1.5rem}.scroll-to-top{position:fixed;right:1rem;bottom:1rem;display:none;width:2.75rem;height:2.75rem;text-align:center;color:#fff;background:rgba(90,92,105,.5);line-height:46px}.scroll-to-top:focus,.scroll-to-top:hover{color:#fff}.scroll-to-top:hover{background:#5a5c69}.scroll-to-top i{font-weight:800}@-webkit-keyframes growIn{0%{transform:scale(.9);opacity:0}100%{transform:scale(1);opacity:1}}@keyframes growIn{0%{transform:scale(.9);opacity:0}100%{transform:scale(1);opacity:1}}.animated--grow-in,.sidebar .nav-item .collapse{-webkit-animation-name:growIn;animation-name:growIn;-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-timing-function:transform cubic-bezier(.18,1.25,.4,1),opacity cubic-bezier(0,1,.4,1);animation-timing-function:transform cubic-bezier(.18,1.25,.4,1),opacity cubic-bezier(0,1,.4,1)}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.animated--fade-in{-webkit-animation-name:fadeIn;animation-name:fadeIn;-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-timing-function:opacity cubic-bezier(0,1,.4,1);animation-timing-function:opacity cubic-bezier(0,1,.4,1)}.bg-gradient-primary{background-color:#4e73df;background-image:linear-gradient(180deg,#4e73df 10%,#224abe 100%);background-size:cover}.bg-gradient-secondary{background-color:#858796;background-image:linear-gradient(180deg,#858796 10%,#60616f 100%);background-size:cover}.bg-gradient-success{background-color:#1cc88a;background-image:linear-gradient(180deg,#1cc88a 10%,#13855c 100%);background-size:cover}.bg-gradient-info{background-color:#36b9cc;background-image:linear-gradient(180deg,#36b9cc 10%,#258391 100%);background-size:cover}.bg-gradient-warning{background-color:#f6c23e;background-image:linear-gradient(180deg,#f6c23e 10%,#dda20a 100%);background-size:cover}.bg-gradient-danger{background-color:#e74a3b;background-image:linear-gradient(180deg,#e74a3b 10%,#be2617 100%);background-size:cover}.bg-gradient-light{background-color:#f8f9fc;background-image:linear-gradient(180deg,#f8f9fc 10%,#c2cbe5 100%);background-size:cover}.bg-gradient-dark{background-color:#5a5c69;background-image:linear-gradient(180deg,#5a5c69 10%,#373840 100%);background-size:cover}.bg-gray-100{background-color:#f8f9fc!important}.bg-gray-200{background-color:#eaecf4!important}.bg-gray-300{background-color:#dddfeb!important}.bg-gray-400{background-color:#d1d3e2!important}.bg-gray-500{background-color:#b7b9cc!important}.bg-gray-600{background-color:#858796!important}.bg-gray-700{background-color:#6e707e!important}.bg-gray-800{background-color:#5a5c69!important}.bg-gray-900{background-color:#3a3b45!important}.o-hidden{overflow:hidden!important}.text-xs{font-size:.7rem}.text-lg{font-size:1.2rem}.text-gray-100{color:#f8f9fc!important}.text-gray-200{color:#eaecf4!important}.text-gray-300{color:#dddfeb!important}.text-gray-400{color:#d1d3e2!important}.text-gray-500{color:#b7b9cc!important}.text-gray-600{color:#858796!important}.text-gray-700{color:#6e707e!important}.text-gray-800{color:#5a5c69!important}.text-gray-900{color:#3a3b45!important}.icon-circle{height:2.5rem;width:2.5rem;border-radius:100%;display:flex;align-items:center;justify-content:center}.border-left-primary{border-left:.25rem solid #4e73df!important}.border-bottom-primary{border-bottom:.25rem solid #4e73df!important}.border-left-secondary{border-left:.25rem solid #858796!important}.border-bottom-secondary{border-bottom:.25rem solid #858796!important}.border-left-success{border-left:.25rem solid #1cc88a!important}.border-bottom-success{border-bottom:.25rem solid #1cc88a!important}.border-left-info{border-left:.25rem solid #36b9cc!important}.border-bottom-info{border-bottom:.25rem solid #36b9cc!important}.border-left-warning{border-left:.25rem solid #f6c23e!important}.border-bottom-warning{border-bottom:.25rem solid #f6c23e!important}.border-left-danger{border-left:.25rem solid #e74a3b!important}.border-bottom-danger{border-bottom:.25rem solid #e74a3b!important}.border-left-light{border-left:.25rem solid #f8f9fc!important}.border-bottom-light{border-bottom:.25rem solid #f8f9fc!important}.border-left-dark{border-left:.25rem solid #5a5c69!important}.border-bottom-dark{border-bottom:.25rem solid #5a5c69!important}.progress-sm{height:.5rem}.rotate-15{transform:rotate(15deg)}.rotate-n-15{transform:rotate(-15deg)}.dropdown .dropdown-menu{font-size:.85rem}.dropdown .dropdown-menu .dropdown-header{font-weight:800;font-size:.65rem;color:#b7b9cc}.dropdown.no-arrow .dropdown-toggle::after{display:none}.sidebar .nav-item.dropdown .dropdown-toggle::after,.topbar .nav-item.dropdown .dropdown-toggle::after{width:1rem;text-align:center;float:right;vertical-align:0;border:0;font-weight:900;content:'\f105';font-family:'Font Awesome 5 Free'}.sidebar .nav-item.dropdown.show .dropdown-toggle::after,.topbar .nav-item.dropdown.show .dropdown-toggle::after{content:'\f107'}.sidebar .nav-item .nav-link,.topbar .nav-item .nav-link{position:relative}.sidebar .nav-item .nav-link .badge-counter,.topbar .nav-item .nav-link .badge-counter{position:absolute;transform:scale(.7);transform-origin:top right;right:.25rem;margin-top:-.25rem}.sidebar .nav-item .nav-link .img-profile,.topbar .nav-item .nav-link .img-profile{height:2rem;width:2rem}.topbar{height:4.375rem}.topbar #sidebarToggleTop{height:2.5rem;width:2.5rem}.topbar #sidebarToggleTop:hover{background-color:#eaecf4}.topbar #sidebarToggleTop:active{background-color:#dddfeb}.topbar .navbar-search{width:25rem}.topbar .navbar-search input{font-size:.85rem;height:auto}.topbar .topbar-divider{width:0;border-right:1px solid #e3e6f0;height:calc(4.375rem - 2rem);margin:auto 1rem}.topbar .nav-item .nav-link{height:4.375rem;display:flex;align-items:center;padding:0 .75rem}.topbar .nav-item .nav-link:focus{outline:0}.topbar .nav-item:focus{outline:0}.topbar .dropdown{position:static}.topbar .dropdown .dropdown-menu{width:calc(100% - 1.5rem);right:.75rem}.topbar .dropdown-list{padding:0;border:none;overflow:hidden}.topbar .dropdown-list .dropdown-header{background-color:#4e73df;border:1px solid #4e73df;padding-top:.75rem;padding-bottom:.75rem;color:#fff}.topbar .dropdown-list .dropdown-item{white-space:normal;padding-top:.5rem;padding-bottom:.5rem;border-left:1px solid #e3e6f0;border-right:1px solid #e3e6f0;border-bottom:1px solid #e3e6f0;line-height:1.3rem}.topbar .dropdown-list .dropdown-item .dropdown-list-image{position:relative;height:2.5rem;width:2.5rem}.topbar .dropdown-list .dropdown-item .dropdown-list-image img{height:2.5rem;width:2.5rem}.topbar .dropdown-list .dropdown-item .dropdown-list-image .status-indicator{background-color:#eaecf4;height:.75rem;width:.75rem;border-radius:100%;position:absolute;bottom:0;right:0;border:.125rem solid #fff}.topbar .dropdown-list .dropdown-item .text-truncate{max-width:10rem}.topbar .dropdown-list .dropdown-item:active{background-color:#eaecf4;color:#3a3b45}@media (min-width:576px){.topbar .dropdown{position:relative}.topbar .dropdown .dropdown-menu{width:auto;right:0}.topbar .dropdown-list{width:20rem!important}.topbar .dropdown-list .dropdown-item .text-truncate{max-width:13.375rem}}.topbar.navbar-dark .navbar-nav .nav-item .nav-link{color:rgba(255,255,255,.8)}.topbar.navbar-dark .navbar-nav .nav-item .nav-link:hover{color:#fff}.topbar.navbar-dark .navbar-nav .nav-item .nav-link:active{color:#fff}.topbar.navbar-light .navbar-nav .nav-item .nav-link{color:#d1d3e2}.topbar.navbar-light .navbar-nav .nav-item .nav-link:hover{color:#b7b9cc}.topbar.navbar-light .navbar-nav .nav-item .nav-link:active{color:#858796}.sidebar{width:6.5rem;min-height:100vh}.sidebar .nav-item{position:relative}.sidebar .nav-item:last-child{margin-bottom:1rem}.sidebar .nav-item .nav-link{text-align:center;padding:.75rem 1rem;width:6.5rem}.sidebar .nav-item .nav-link span{font-size:.65rem;display:block}.sidebar .nav-item.active .nav-link{font-weight:700}.sidebar .nav-item .collapse{position:absolute;left:calc(6.5rem + 1.5rem / 2);z-index:1;top:2px}.sidebar .nav-item .collapse .collapse-inner{border-radius:.35rem;box-shadow:0 .15rem 1.75rem 0 rgba(58,59,69,.15)}.sidebar .nav-item .collapsing{display:none;transition:none}.sidebar .nav-item .collapse .collapse-inner,.sidebar .nav-item .collapsing .collapse-inner{padding:.5rem 0;min-width:10rem;font-size:.85rem;margin:0 0 1rem 0}.sidebar .nav-item .collapse .collapse-inner .collapse-header,.sidebar .nav-item .collapsing .collapse-inner .collapse-header{margin:0;white-space:nowrap;padding:.5rem 1.5rem;text-transform:uppercase;font-weight:800;font-size:.65rem;color:#b7b9cc}.sidebar .nav-item .collapse .collapse-inner .collapse-item,.sidebar .nav-item .collapsing .collapse-inner .collapse-item{padding:.5rem 1rem;margin:0 .5rem;display:block;color:#3a3b45;text-decoration:none;border-radius:.35rem;white-space:nowrap}.sidebar .nav-item .collapse .collapse-inner .collapse-item:hover,.sidebar .nav-item .collapsing .collapse-inner .collapse-item:hover{background-color:#eaecf4}.sidebar .nav-item .collapse .collapse-inner .collapse-item:active,.sidebar .nav-item .collapsing .collapse-inner .collapse-item:active{background-color:#dddfeb}.sidebar .nav-item .collapse .collapse-inner .collapse-item.active,.sidebar .nav-item .collapsing .collapse-inner .collapse-item.active{color:#4e73df;font-weight:700}.sidebar #sidebarToggle{width:2.5rem;height:2.5rem;text-align:center;margin-bottom:1rem;cursor:pointer}.sidebar #sidebarToggle::after{font-weight:900;content:'\f104';font-family:'Font Awesome 5 Free';margin-right:.1rem}.sidebar #sidebarToggle:hover{text-decoration:none}.sidebar #sidebarToggle:focus{outline:0}.sidebar.toggled{width:0!important;overflow:hidden}.sidebar.toggled #sidebarToggle::after{content:'\f105';font-family:'Font Awesome 5 Free';margin-left:.25rem}.sidebar.toggled .sidebar-card{display:none}.sidebar .sidebar-brand{height:4.375rem;text-decoration:none;font-size:1rem;font-weight:800;padding:1.5rem 1rem;text-align:center;text-transform:uppercase;letter-spacing:.05rem;z-index:1}.sidebar .sidebar-brand .sidebar-brand-icon i{font-size:2rem}.sidebar .sidebar-brand .sidebar-brand-text{display:none}.sidebar hr.sidebar-divider{margin:0 1rem 1rem}.sidebar .sidebar-heading{text-align:center;padding:0 1rem;font-weight:800;font-size:.65rem}.sidebar .sidebar-card{display:flex;flex-direction:column;align-items:center;font-size:.875rem;border-radius:.35rem;color:rgba(255,255,255,.8);margin-left:1rem;margin-right:1rem;margin-bottom:1rem;padding:1rem;background-color:rgba(0,0,0,.1)}.sidebar .sidebar-card .sidebar-card-illustration{height:3rem;display:block}.sidebar .sidebar-card .sidebar-card-title{font-weight:700}.sidebar .sidebar-card p{font-size:.75rem;color:rgba(255,255,255,.5)}@media (min-width:768px){.sidebar{width:14rem!important}.sidebar .nav-item .collapse{position:relative;left:0;z-index:1;top:0;-webkit-animation:none;animation:none}.sidebar .nav-item .collapse .collapse-inner{border-radius:0;box-shadow:none}.sidebar .nav-item .collapsing{display:block;transition:height .15s ease}.sidebar .nav-item .collapse,.sidebar .nav-item .collapsing{margin:0 1rem}.sidebar .nav-item .nav-link{display:block;width:100%;text-align:left;padding:1rem;width:14rem}.sidebar .nav-item .nav-link i{font-size:.85rem;margin-right:.25rem}.sidebar .nav-item .nav-link span{font-size:.85rem;display:inline}.sidebar .nav-item .nav-link[data-toggle=collapse]::after{width:1rem;text-align:center;float:right;vertical-align:0;border:0;font-weight:900;content:'\f107';font-family:'Font Awesome 5 Free'}.sidebar .nav-item .nav-link[data-toggle=collapse].collapsed::after{content:'\f105'}.sidebar .sidebar-brand .sidebar-brand-icon i{font-size:2rem}.sidebar .sidebar-brand .sidebar-brand-text{display:inline}.sidebar .sidebar-heading{text-align:left}.sidebar.toggled{overflow:visible;width:6.5rem!important}.sidebar.toggled .nav-item .collapse{position:absolute;left:calc(6.5rem + 1.5rem / 2);z-index:1;top:2px;-webkit-animation-name:growIn;animation-name:growIn;-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-timing-function:transform cubic-bezier(.18,1.25,.4,1),opacity cubic-bezier(0,1,.4,1);animation-timing-function:transform cubic-bezier(.18,1.25,.4,1),opacity cubic-bezier(0,1,.4,1)}.sidebar.toggled .nav-item .collapse .collapse-inner{box-shadow:0 .15rem 1.75rem 0 rgba(58,59,69,.15);border-radius:.35rem}.sidebar.toggled .nav-item .collapsing{display:none;transition:none}.sidebar.toggled .nav-item .collapse,.sidebar.toggled .nav-item .collapsing{margin:0}.sidebar.toggled .nav-item:last-child{margin-bottom:1rem}.sidebar.toggled .nav-item .nav-link{text-align:center;padding:.75rem 1rem;width:6.5rem}.sidebar.toggled .nav-item .nav-link span{font-size:.65rem;display:block}.sidebar.toggled .nav-item .nav-link i{margin-right:0}.sidebar.toggled .nav-item .nav-link[data-toggle=collapse]::after{display:none}.sidebar.toggled .sidebar-brand .sidebar-brand-icon i{font-size:2rem}.sidebar.toggled .sidebar-brand .sidebar-brand-text{display:none}.sidebar.toggled .sidebar-heading{text-align:center}}.sidebar-light .sidebar-brand{color:#6e707e}.sidebar-light hr.sidebar-divider{border-top:1px solid #eaecf4}.sidebar-light .sidebar-heading{color:#b7b9cc}.sidebar-light .nav-item .nav-link{color:#858796}.sidebar-light .nav-item .nav-link i{color:#d1d3e2}.sidebar-light .nav-item .nav-link:active,.sidebar-light .nav-item .nav-link:focus,.sidebar-light .nav-item .nav-link:hover{color:#6e707e}.sidebar-light .nav-item .nav-link:active i,.sidebar-light .nav-item .nav-link:focus i,.sidebar-light .nav-item .nav-link:hover i{color:#6e707e}.sidebar-light .nav-item .nav-link[data-toggle=collapse]::after{color:#b7b9cc}.sidebar-light .nav-item.active .nav-link{color:#6e707e}.sidebar-light .nav-item.active .nav-link i{color:#6e707e}.sidebar-light #sidebarToggle{background-color:#eaecf4}.sidebar-light #sidebarToggle::after{color:#b7b9cc}.sidebar-light #sidebarToggle:hover{background-color:#dddfeb}.sidebar-dark .sidebar-brand{color:#fff}.sidebar-dark hr.sidebar-divider{border-top:1px solid rgba(255,255,255,.15)}.sidebar-dark .sidebar-heading{color:rgba(255,255,255,.4)}.sidebar-dark .nav-item .nav-link{color:rgba(255,255,255,.8)}.sidebar-dark .nav-item .nav-link i{color:rgba(255,255,255,.3)}.sidebar-dark .nav-item .nav-link:active,.sidebar-dark .nav-item .nav-link:focus,.sidebar-dark .nav-item .nav-link:hover{color:#fff}.sidebar-dark .nav-item .nav-link:active i,.sidebar-dark .nav-item .nav-link:focus i,.sidebar-dark .nav-item .nav-link:hover i{color:#fff}.sidebar-dark .nav-item .nav-link[data-toggle=collapse]::after{color:rgba(255,255,255,.5)}.sidebar-dark .nav-item.active .nav-link{color:#fff}.sidebar-dark .nav-item.active .nav-link i{color:#fff}.sidebar-dark #sidebarToggle{background-color:rgba(255,255,255,.2)}.sidebar-dark #sidebarToggle::after{color:rgba(255,255,255,.5)}.sidebar-dark #sidebarToggle:hover{background-color:rgba(255,255,255,.25)}.sidebar-dark.toggled #sidebarToggle::after{color:rgba(255,255,255,.5)}.btn-circle{border-radius:100%;height:2.5rem;width:2.5rem;font-size:1rem;display:inline-flex;align-items:center;justify-content:center}.btn-circle.btn-sm,.btn-group-sm>.btn-circle.btn{height:1.8rem;width:1.8rem;font-size:.75rem}.btn-circle.btn-lg,.btn-group-lg>.btn-circle.btn{height:3.5rem;width:3.5rem;font-size:1.35rem}.btn-icon-split{padding:0;overflow:hidden;display:inline-flex;align-items:stretch;justify-content:center}.btn-icon-split .icon{background:rgba(0,0,0,.15);display:inline-block;padding:.375rem .75rem}.btn-icon-split .text{display:inline-block;padding:.375rem .75rem}.btn-group-sm>.btn-icon-split.btn .icon,.btn-icon-split.btn-sm .icon{padding:.25rem .5rem}.btn-group-sm>.btn-icon-split.btn .text,.btn-icon-split.btn-sm .text{padding:.25rem .5rem}.btn-group-lg>.btn-icon-split.btn .icon,.btn-icon-split.btn-lg .icon{padding:.5rem 1rem}.btn-group-lg>.btn-icon-split.btn .text,.btn-icon-split.btn-lg .text{padding:.5rem 1rem}.card .card-header .dropdown{line-height:1}.card .card-header .dropdown .dropdown-menu{line-height:1.5}.card .card-header[data-toggle=collapse]{text-decoration:none;position:relative;padding:.75rem 3.25rem .75rem 1.25rem}.card .card-header[data-toggle=collapse]::after{position:absolute;right:0;top:0;padding-right:1.725rem;line-height:51px;font-weight:900;content:'\f107';font-family:'Font Awesome 5 Free';color:#d1d3e2}.card .card-header[data-toggle=collapse].collapsed{border-radius:.35rem}.card .card-header[data-toggle=collapse].collapsed::after{content:'\f105'}.chart-area{position:relative;height:10rem;width:100%}@media (min-width:768px){.chart-area{height:20rem}}.chart-bar{position:relative;height:10rem;width:100%}@media (min-width:768px){.chart-bar{height:20rem}}.chart-pie{position:relative;height:15rem;width:100%}@media (min-width:768px){.chart-pie{height:calc(20rem - 43px)!important}}.bg-login-image{background:url(https://source.unsplash.com/K4mSJ7kc0As/600x800);background-position:center;background-size:cover}.bg-register-image{background:url(https://source.unsplash.com/Mv9hjnEUHR4/600x800);background-position:center;background-size:cover}.bg-password-image{background:url(https://source.unsplash.com/oWTW-jNGl9I/600x800);background-position:center;background-size:cover}form.user .custom-checkbox.small label{line-height:1.5rem}form.user .form-control-user{font-size:.8rem;border-radius:10rem;padding:1.5rem 1rem}form.user .btn-user{font-size:.8rem;border-radius:10rem;padding:.75rem 1rem}.btn-google{color:#fff;background-color:#ea4335;border-color:#fff}.btn-google:hover{color:#fff;background-color:#e12717;border-color:#e6e6e6}.btn-google.focus,.btn-google:focus{color:#fff;background-color:#e12717;border-color:#e6e6e6;box-shadow:0 0 0 .2rem rgba(255,255,255,.5)}.btn-google.disabled,.btn-google:disabled{color:#fff;background-color:#ea4335;border-color:#fff}.btn-google:not(:disabled):not(.disabled).active,.btn-google:not(:disabled):not(.disabled):active,.show>.btn-google.dropdown-toggle{color:#fff;background-color:#d62516;border-color:#dfdfdf}.btn-google:not(:disabled):not(.disabled).active:focus,.btn-google:not(:disabled):not(.disabled):active:focus,.show>.btn-google.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,255,255,.5)}.btn-facebook{color:#fff;background-color:#3b5998;border-color:#fff}.btn-facebook:hover{color:#fff;background-color:#30497c;border-color:#e6e6e6}.btn-facebook.focus,.btn-facebook:focus{color:#fff;background-color:#30497c;border-color:#e6e6e6;box-shadow:0 0 0 .2rem rgba(255,255,255,.5)}.btn-facebook.disabled,.btn-facebook:disabled{color:#fff;background-color:#3b5998;border-color:#fff}.btn-facebook:not(:disabled):not(.disabled).active,.btn-facebook:not(:disabled):not(.disabled):active,.show>.btn-facebook.dropdown-toggle{color:#fff;background-color:#2d4373;border-color:#dfdfdf}.btn-facebook:not(:disabled):not(.disabled).active:focus,.btn-facebook:not(:disabled):not(.disabled):active:focus,.show>.btn-facebook.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,255,255,.5)}.error{color:#5a5c69;font-size:7rem;position:relative;line-height:1;width:12.5rem}@-webkit-keyframes noise-anim{0%{clip:rect(81px,9999px,74px,0)}5%{clip:rect(2px,9999px,29px,0)}10%{clip:rect(1px,9999px,15px,0)}15%{clip:rect(50px,9999px,8px,0)}20%{clip:rect(99px,9999px,79px,0)}25%{clip:rect(85px,9999px,15px,0)}30%{clip:rect(41px,9999px,53px,0)}35%{clip:rect(22px,9999px,36px,0)}40%{clip:rect(73px,9999px,79px,0)}45%{clip:rect(82px,9999px,100px,0)}50%{clip:rect(47px,9999px,96px,0)}55%{clip:rect(10px,9999px,44px,0)}60%{clip:rect(7px,9999px,24px,0)}65%{clip:rect(29px,9999px,88px,0)}70%{clip:rect(12px,9999px,44px,0)}75%{clip:rect(25px,9999px,57px,0)}80%{clip:rect(38px,9999px,35px,0)}85%{clip:rect(20px,9999px,96px,0)}90%{clip:rect(58px,9999px,44px,0)}95%{clip:rect(72px,9999px,41px,0)}100%{clip:rect(69px,9999px,72px,0)}}@keyframes noise-anim{0%{clip:rect(81px,9999px,74px,0)}5%{clip:rect(2px,9999px,29px,0)}10%{clip:rect(1px,9999px,15px,0)}15%{clip:rect(50px,9999px,8px,0)}20%{clip:rect(99px,9999px,79px,0)}25%{clip:rect(85px,9999px,15px,0)}30%{clip:rect(41px,9999px,53px,0)}35%{clip:rect(22px,9999px,36px,0)}40%{clip:rect(73px,9999px,79px,0)}45%{clip:rect(82px,9999px,100px,0)}50%{clip:rect(47px,9999px,96px,0)}55%{clip:rect(10px,9999px,44px,0)}60%{clip:rect(7px,9999px,24px,0)}65%{clip:rect(29px,9999px,88px,0)}70%{clip:rect(12px,9999px,44px,0)}75%{clip:rect(25px,9999px,57px,0)}80%{clip:rect(38px,9999px,35px,0)}85%{clip:rect(20px,9999px,96px,0)}90%{clip:rect(58px,9999px,44px,0)}95%{clip:rect(72px,9999px,41px,0)}100%{clip:rect(69px,9999px,72px,0)}}.error:after{content:attr(data-text);position:absolute;left:2px;text-shadow:-1px 0 #e74a3b;top:0;color:#5a5c69;background:#f8f9fc;overflow:hidden;clip:rect(0,900px,0,0);animation:noise-anim 2s infinite linear alternate-reverse}@-webkit-keyframes noise-anim-2{0%{clip:rect(82px,9999px,93px,0)}5%{clip:rect(13px,9999px,71px,0)}10%{clip:rect(22px,9999px,90px,0)}15%{clip:rect(17px,9999px,11px,0)}20%{clip:rect(21px,9999px,91px,0)}25%{clip:rect(37px,9999px,33px,0)}30%{clip:rect(37px,9999px,80px,0)}35%{clip:rect(6px,9999px,49px,0)}40%{clip:rect(86px,9999px,60px,0)}45%{clip:rect(46px,9999px,83px,0)}50%{clip:rect(16px,9999px,83px,0)}55%{clip:rect(73px,9999px,36px,0)}60%{clip:rect(58px,9999px,98px,0)}65%{clip:rect(20px,9999px,93px,0)}70%{clip:rect(43px,9999px,67px,0)}75%{clip:rect(66px,9999px,75px,0)}80%{clip:rect(66px,9999px,41px,0)}85%{clip:rect(17px,9999px,47px,0)}90%{clip:rect(49px,9999px,68px,0)}95%{clip:rect(8px,9999px,85px,0)}100%{clip:rect(83px,9999px,50px,0)}}@keyframes noise-anim-2{0%{clip:rect(82px,9999px,93px,0)}5%{clip:rect(13px,9999px,71px,0)}10%{clip:rect(22px,9999px,90px,0)}15%{clip:rect(17px,9999px,11px,0)}20%{clip:rect(21px,9999px,91px,0)}25%{clip:rect(37px,9999px,33px,0)}30%{clip:rect(37px,9999px,80px,0)}35%{clip:rect(6px,9999px,49px,0)}40%{clip:rect(86px,9999px,60px,0)}45%{clip:rect(46px,9999px,83px,0)}50%{clip:rect(16px,9999px,83px,0)}55%{clip:rect(73px,9999px,36px,0)}60%{clip:rect(58px,9999px,98px,0)}65%{clip:rect(20px,9999px,93px,0)}70%{clip:rect(43px,9999px,67px,0)}75%{clip:rect(66px,9999px,75px,0)}80%{clip:rect(66px,9999px,41px,0)}85%{clip:rect(17px,9999px,47px,0)}90%{clip:rect(49px,9999px,68px,0)}95%{clip:rect(8px,9999px,85px,0)}100%{clip:rect(83px,9999px,50px,0)}}.error:before{content:attr(data-text);position:absolute;left:-2px;text-shadow:1px 0 #4e73df;top:0;color:#5a5c69;background:#f8f9fc;overflow:hidden;clip:rect(0,900px,0,0);animation:noise-anim-2 3s infinite linear alternate-reverse}footer.sticky-footer{padding:2rem 0;flex-shrink:0}footer.sticky-footer .copyright{line-height:1;font-size:.8rem}body.sidebar-toggled footer.sticky-footer{width:100%} \ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/sb-admin-2.min.css:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/sb-admin-2.min.css:Zone.Identifier new file mode 100644 index 00000000..91466881 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/sb-admin-2.min.css:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/sb-admin-2.min.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/sb-admin-2.min.js.download new file mode 100644 index 00000000..e7ffba9f --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/sb-admin-2.min.js.download @@ -0,0 +1,7 @@ +/*! + * Start Bootstrap - SB Admin 2 v4.1.4 (https://startbootstrap.com/theme/sb-admin-2) + * Copyright 2013-2021 Start Bootstrap + * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-sb-admin-2/blob/master/LICENSE) + */ + +!function(l){"use strict";l("#sidebarToggle, #sidebarToggleTop").on("click",function(e){l("body").toggleClass("sidebar-toggled"),l(".sidebar").toggleClass("toggled"),l(".sidebar").hasClass("toggled")&&l(".sidebar .collapse").collapse("hide")}),l(window).resize(function(){l(window).width()<768&&l(".sidebar .collapse").collapse("hide"),l(window).width()<480&&!l(".sidebar").hasClass("toggled")&&(l("body").addClass("sidebar-toggled"),l(".sidebar").addClass("toggled"),l(".sidebar .collapse").collapse("hide"))}),l("body.fixed-nav .sidebar").on("mousewheel DOMMouseScroll wheel",function(e){var o;768' + + '' + + ''; + + document.body.appendChild(modalEl); + + // Build predefined size buttons + var sizeContainer = document.getElementById('sisMediaSizeButtons'); + if (sizeContainer) { + PREDEFINED_SIZES.forEach(function (size) { + var btn = document.createElement('button'); + btn.type = 'button'; + btn.className = 'btn btn-xs btn-outline-secondary mb-1'; + btn.style.fontSize = '10px'; + btn.style.padding = '1px 6px'; + btn.style.marginRight = '3px'; + btn.innerText = size.label; + btn.addEventListener('click', function () { + document.getElementById('sisMediaConfigWidth').value = size.width; + document.getElementById('sisMediaConfigHeight').value = size.height; + sizeContainer.querySelectorAll('button').forEach(function (b) { + b.classList.remove('btn-secondary'); + b.classList.add('btn-outline-secondary'); + }); + btn.classList.remove('btn-outline-secondary'); + btn.classList.add('btn-secondary'); + }); + sizeContainer.appendChild(btn); + }); + } + + // Bind Search Input Handler + var self = this; + document.addEventListener('input', function (e) { + if (e.target && e.target.id === 'sisMediaSearchInput') { + var term = e.target.value.toLowerCase().trim(); + var filtered = self.mediaData.filter(function (item) { + var name = (item.originalFilename || item.name || '').toLowerCase(); + return name.includes(term); + }); + self.renderGrid(filtered); + } + }); + + // Bind Upload Input Handler + document.addEventListener('change', function (e) { + if (e.target && e.target.id === 'sisMediaUploadInput') { + var file = e.target.files[0]; + if (!file) return; + + var formData = new FormData(); + formData.append('file', file); + + var grid = document.getElementById('sisMediaGrid'); + if (grid) { + grid.innerHTML = '

Đang tải tệp lên server...
'; + } + + fetch('/api/manage/media/upload', { + method: 'POST', + body: formData + }) + .then(function (res) { return res.json(); }) + .then(function (data) { + if (data && data.success === 1 && data.file && data.file.url) { + self.showConfigPanel(data.file.url, data.file); + } else { + alert('Tải tệp lên thất bại. Vui lòng thử lại!'); + self.fetchMediaList(); + } + }) + .catch(function (err) { + alert('Lỗi tải tệp: ' + err.message); + self.fetchMediaList(); + }); + } + }); + + // Config panel Cancel button + document.addEventListener('click', function (e) { + if (e.target && e.target.id === 'sisMediaConfigCancel') { + self.hideConfigPanel(); + } + if (e.target && e.target.id === 'sisMediaConfigConfirm') { + self.confirmWithConfig(); + } + }); + + return modalEl; + }, + + open: function (callback) { + this.callback = callback; + var modalEl = this.initModal(); + + if (typeof $ !== 'undefined' && $.fn && $.fn.modal) { + $(modalEl).modal('show'); + } else { + modalEl.style.display = 'block'; + modalEl.classList.add('show'); + } + this.fetchMediaList(); + }, + + fetchMediaList: function () { + var grid = document.getElementById('sisMediaGrid'); + if (grid) { + grid.innerHTML = '

Đang nạp thư viện...
'; + } + this.hideConfigPanel(); + + var self = this; + fetch('/api/manage/media/list') + .then(function (res) { return res.json(); }) + .then(function (data) { + self.mediaData = data || []; + self.renderGrid(self.mediaData); + }) + .catch(function (err) { + if (grid) { + grid.innerHTML = '

Không thể tải danh sách tệp. Bạn có thể dán đường dẫn URL trực tiếp.
'; + } + }); + }, + + renderGrid: function (list) { + var grid = document.getElementById('sisMediaGrid'); + if (!grid) return; + + if (!list || list.length === 0) { + grid.innerHTML = '

Chưa có tệp hình ảnh nào. Bấm nút "Tải ảnh mới lên" để thêm.
'; + return; + } + + var self = this; + grid.innerHTML = list.map(function (item) { + var url = item.fileUrl || item.url || ''; + var name = item.originalFilename || item.name || 'Image'; + return '
' + + '
' + + '
' + + '' + name + '' + + '
' + + '
' + + '

' + name + '

' + + '
' + + '
' + + '
'; + }).join(''); + + // Add click listeners to items + grid.querySelectorAll('.media-select-card').forEach(function (card) { + card.addEventListener('click', function () { + var selectedUrl = card.getAttribute('data-url'); + var selectedName = card.getAttribute('data-name'); + // Highlight selected + grid.querySelectorAll('.media-select-card').forEach(function (c) { + c.style.outline = ''; + }); + card.style.outline = '3px solid #007bff'; + self.showConfigPanel(selectedUrl, { name: selectedName, url: selectedUrl }); + }); + }); + }, + + showConfigPanel: function (url, mediaObj) { + this.selectedUrl = url; + this.selectedMediaObj = mediaObj || {}; + + var panel = document.getElementById(this.configPanelId); + if (!panel) return; + + // Populate preview + var previewImg = document.getElementById('sisMediaConfigPreview'); + if (previewImg) previewImg.src = url; + + var nameEl = document.getElementById('sisMediaConfigName'); + if (nameEl) nameEl.textContent = mediaObj && (mediaObj.originalFilename || mediaObj.name) ? (mediaObj.originalFilename || mediaObj.name) : ''; + + // Reset all config fields + var fields = ['sisMediaConfigWidth', 'sisMediaConfigHeight', 'sisMediaConfigStyle', 'sisMediaConfigClass', 'sisMediaConfigAlt', 'sisMediaConfigAttrs']; + var selectFields = ['sisMediaConfigObjectFit', 'sisMediaConfigAspectRatio']; + selectFields.forEach(function (id) { var el = document.getElementById(id); if (el) el.value = ''; }); + fields.forEach(function (id) { + var el = document.getElementById(id); + if (el) el.value = ''; + }); + var fitEl = document.getElementById('sisMediaConfigObjectFit'); + if (fitEl) fitEl.value = ''; + + // Reset size button highlights + var sizeContainer = document.getElementById('sisMediaSizeButtons'); + if (sizeContainer) { + sizeContainer.querySelectorAll('button').forEach(function (b) { + b.classList.remove('btn-secondary'); + b.classList.add('btn-outline-secondary'); + }); + } + + panel.style.display = 'block'; + panel.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); + }, + + hideConfigPanel: function () { + var panel = document.getElementById(this.configPanelId); + if (panel) panel.style.display = 'none'; + this.selectedUrl = null; + this.selectedMediaObj = null; + }, + + confirmWithConfig: function () { + if (!this.selectedUrl) return; + + var width = (document.getElementById('sisMediaConfigWidth') || {}).value || ''; + var height = (document.getElementById('sisMediaConfigHeight') || {}).value || ''; + var objectFit = (document.getElementById('sisMediaConfigObjectFit') || {}).value || ''; + var aspectRatio = (document.getElementById('sisMediaConfigAspectRatio') || {}).value || ''; + var style = (document.getElementById('sisMediaConfigStyle') || {}).value || ''; + var cssClass = (document.getElementById('sisMediaConfigClass') || {}).value || ''; + var alt = (document.getElementById('sisMediaConfigAlt') || {}).value || ''; + var customAttrs = (document.getElementById('sisMediaConfigAttrs') || {}).value || ''; + + // Build composite style string from size + aspect-ratio + object-fit + inline style + var computedStyle = ''; + if (width) computedStyle += 'width: ' + width + '; '; + if (height) computedStyle += 'height: ' + height + '; '; + if (aspectRatio) computedStyle += 'aspect-ratio: ' + aspectRatio + '; '; + if (objectFit) computedStyle += 'object-fit: ' + objectFit + '; '; + if (style) computedStyle += style; + computedStyle = computedStyle.trim(); + + var config = { + style: computedStyle, + cssClass: cssClass, + alt: alt, + customAttributes: customAttrs, + width: width, + height: height, + objectFit: objectFit, + aspectRatio: aspectRatio + }; + + if (typeof this.callback === 'function') { + this.callback(this.selectedUrl, this.selectedMediaObj, config); + } + + // Close modal + var modalEl = document.getElementById(this.modalId); + if (modalEl) { + if (typeof $ !== 'undefined' && $.fn && $.fn.modal) { + $(modalEl).modal('hide'); + } else { + modalEl.style.display = 'none'; + modalEl.classList.remove('show'); + } + } + this.hideConfigPanel(); + }, + + selectItem: function (url, mediaObj) { + // Legacy direct select (no config panel) - used by upload flow or external callers + if (typeof this.callback === 'function') { + this.callback(url, mediaObj, {}); + } + var modalEl = document.getElementById(this.modalId); + if (modalEl) { + if (typeof $ !== 'undefined' && $.fn && $.fn.modal) { + $(modalEl).modal('hide'); + } else { + modalEl.style.display = 'none'; + modalEl.classList.remove('show'); + } + } + } + }; + + // Expose standalone module globally + window.SISMediaPicker = SISMediaPicker; + + // Backward-compatible global helper function + window.openSISMediaModal = function (callback) { + SISMediaPicker.open(callback); + }; + +})(window, document); diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/skin.min.css b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/skin.min.css new file mode 100644 index 00000000..3809e7b3 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/skin.min.css @@ -0,0 +1 @@ +.tox{box-shadow:none;box-sizing:content-box;color:#222f3e;cursor:auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg):not(rect){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg):not(rect){background:0 0;border:0;box-shadow:none;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce{border:2px solid #eee;border-radius:10px;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;overflow:hidden;position:relative;visibility:inherit!important}.tox.tox-tinymce-inline{border:none;box-shadow:none;overflow:initial}.tox.tox-tinymce-inline .tox-editor-container{overflow:initial}.tox.tox-tinymce-inline .tox-editor-header{background-color:#fff;border:2px solid #eee;border-radius:10px;box-shadow:none;overflow:hidden}.tox-tinymce-aux{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;z-index:1300}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}.tox[dir=rtl] .tox-icon--flip svg{transform:rotateY(180deg)}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description{align-items:stretch;border-radius:6px;display:flex;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:4px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description>div>div .tox-icon svg{display:block}.tox .accessibility-issue__repair{margin-top:16px}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description{background-color:rgba(0,101,216,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2{color:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon svg{fill:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon{background-color:#006ce7;color:#fff}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:hover{background-color:#0060ce}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:active{background-color:#0054b4}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description{background-color:rgba(255,165,0,.08);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2{color:#8f5d00}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon svg{fill:#8f5d00}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon{background-color:#ffe89d;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:hover{background-color:#f2d574;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:active{background-color:#e8c657;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description{background-color:rgba(204,0,0,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2{color:#c00}.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon svg{fill:#c00}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon{background-color:#f2bfbf;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:hover{background-color:#e9a4a4;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:active{background-color:#ee9494;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description{background-color:rgba(120,171,70,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description>:last-child{display:none}.tox .tox-dialog__body-content .accessibility-issue--success .tox-form__group h2{color:#527530}.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon svg{fill:#527530}.tox .tox-dialog__body-content .accessibility-issue__header .tox-form__group h1,.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2{font-size:14px;margin-top:0}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-left:4px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description{padding:4px 4px 4px 8px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-right:4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description{padding:4px 8px 4px 4px}.tox .tox-advtemplate .tox-form__grid{flex:1}.tox .tox-advtemplate .tox-form__grid>div:first-child{display:flex;flex-direction:column;width:30%}.tox .tox-advtemplate .tox-form__grid>div:first-child>div:nth-child(2){flex-basis:0;flex-grow:1;overflow:auto}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-advtemplate .tox-form__grid>div:first-child{width:100%}}.tox .tox-advtemplate iframe{border-color:#eee;border-radius:10px;border-style:solid;border-width:1px;margin:0 10px}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bottom-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{background-color:#006ce7;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#006ce7;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;line-height:24px;margin:0;outline:0;padding:4px 16px;position:relative;text-align:center;text-decoration:none;text-transform:none;white-space:nowrap}.tox .tox-button::before{border-radius:6px;bottom:-1px;box-shadow:inset 0 0 0 2px #fff,0 0 0 1px #006ce7,0 0 0 3px rgba(0,108,231,.25);content:'';left:-1px;opacity:0;pointer-events:none;position:absolute;right:-1px;top:-1px}.tox .tox-button[disabled]{background-color:#006ce7;background-image:none;border-color:#006ce7;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:#0060ce;background-image:none;border-color:#0060ce;box-shadow:none;color:#fff}.tox .tox-button:focus-visible:not(:disabled)::before{opacity:1}.tox .tox-button:hover:not(:disabled){background-color:#0060ce;background-image:none;border-color:#0060ce;box-shadow:none;color:#fff}.tox .tox-button:active:not(:disabled){background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled{background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled[disabled]{background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button.tox-button--enabled:focus:not(:disabled){background-color:#00489b;background-image:none;border-color:#00489b;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled:hover:not(:disabled){background-color:#00489b;background-image:none;border-color:#00489b;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled:active:not(:disabled){background-color:#003c81;background-image:none;border-color:#003c81;box-shadow:none;color:#fff}.tox .tox-button--icon-and-text,.tox .tox-button.tox-button--icon-and-text,.tox .tox-button.tox-button--secondary.tox-button--icon-and-text{display:flex;padding:5px 4px}.tox .tox-button--icon-and-text .tox-icon svg,.tox .tox-button.tox-button--icon-and-text .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon-and-text .tox-icon svg{display:block;fill:currentColor}.tox .tox-button--secondary{background-color:#f0f0f0;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#f0f0f0;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;color:#222f3e;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;outline:0;padding:4px 16px;text-decoration:none;text-transform:none}.tox .tox-button--secondary[disabled]{background-color:#f0f0f0;background-image:none;border-color:#f0f0f0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--secondary:focus:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:hover:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:active:not(:disabled){background-color:#d6d6d6;background-image:none;border-color:#d6d6d6;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled{background-color:#a8c8ed;background-image:none;border-color:#a8c8ed;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled[disabled]{background-color:#a8c8ed;background-image:none;border-color:#a8c8ed;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--secondary.tox-button--enabled:focus:not(:disabled){background-color:#93bbe9;background-image:none;border-color:#93bbe9;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled:hover:not(:disabled){background-color:#93bbe9;background-image:none;border-color:#93bbe9;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled:active:not(:disabled){background-color:#7daee4;background-image:none;border-color:#7daee4;box-shadow:none;color:#222f3e}.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding:4px}.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display:block;fill:currentColor}.tox .tox-button-link{background:0;border:none;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;white-space:nowrap}.tox .tox-button-link--sm{font-size:14px}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked[disabled]{background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:rgba(34,47,62,.5)}.tox .tox-button--naked:hover:not(:disabled){background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked:focus:not(:disabled){background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked:active:not(:disabled){background-color:rgba(34,47,62,.18);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked .tox-icon svg{fill:currentColor}.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color:#222f3e}.tox .tox-checkbox{align-items:center;border-radius:6px;cursor:pointer;display:flex;height:36px;min-width:36px}.tox .tox-checkbox__input{height:1px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{align-items:center;border-radius:6px;box-shadow:0 0 0 2px transparent;box-sizing:content-box;display:flex;height:24px;justify-content:center;padding:calc(4px - 1px);width:24px}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;fill:rgba(34,47,62,.3)}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:#006ce7}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:#006ce7}.tox .tox-checkbox--disabled{color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg{fill:rgba(34,47,62,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:rgba(34,47,62,.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{fill:rgba(34,47,62,.5)}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{border-radius:6px;box-shadow:inset 0 0 0 1px #006ce7;padding:calc(4px - 1px)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:4px}.tox:not([dir=rtl]) .tox-checkbox__input{left:-10000px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:4px}.tox[dir=rtl] .tox-checkbox__label{margin-right:4px}.tox[dir=rtl] .tox-checkbox__input{right:-10000px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:4px}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#e3e3e3;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:4px 0}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#fcfcfc;color:rgba(34,47,62,.7);cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:4px;margin-top:-4px;padding:4px 8px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;border-radius:3px;color:#222f3e;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tox .tox-collection--list .tox-collection__item{padding:4px 8px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--list .tox-collection__item--enabled{background-color:#fff;color:#222f3e}.tox .tox-collection--list .tox-collection__item--active{background-color:#cce2fa}.tox .tox-collection--toolbar .tox-collection__item--enabled{background-color:#a6ccf7;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active{background-color:#cce2fa}.tox .tox-collection--grid .tox-collection__item--enabled{background-color:#a6ccf7;color:#222f3e}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#cce2fa;color:#222f3e}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#222f3e}.tox .tox-collection__item-checkmark,.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-checkmark svg,.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;font-size:14px;font-style:normal;font-weight:400;line-height:24px;max-width:100%;text-transform:none;word-break:break-all}.tox .tox-collection__item-accessory{color:rgba(34,47,62,.7);display:inline-block;font-size:14px;height:24px;line-height:24px;text-transform:none}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:'';font-size:0;min-height:inherit}.tox .tox-collection__item-caret svg{fill:#222f3e}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-collection__item--state-disabled .tox-collection__item-caret svg{fill:rgba(34,47,62,.5)}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory+.tox-collection__item-checkmark{display:none}.tox .tox-collection--horizontal{background-color:#fff;border:1px solid #e3e3e3;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:nowrap;margin-bottom:0;overflow-x:auto;padding:0}.tox .tox-collection--horizontal .tox-collection__group{align-items:center;display:flex;flex-wrap:nowrap;margin:0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item{height:28px;margin:6px 1px 5px 0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item-label{white-space:nowrap}.tox .tox-collection--horizontal .tox-collection__item-caret{margin-left:4px}.tox .tox-collection__item-container{display:flex}.tox .tox-collection__item-container--row{align-items:center;flex:1 1 auto;flex-direction:row}.tox .tox-collection__item-container--row.tox-collection__item-container--align-left{margin-right:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--align-right{justify-content:flex-end;margin-left:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-top{align-items:flex-start;margin-bottom:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-middle{align-items:center}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-bottom{align-items:flex-end;margin-top:auto}.tox .tox-collection__item-container--column{align-self:center;flex:1 1 auto;flex-direction:column}.tox .tox-collection__item-container--column.tox-collection__item-container--align-left{align-items:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--align-right{align-items:flex-end}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-top{align-self:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-middle{align-self:center}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-bottom{align-self:flex-end}.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-right:1px solid transparent}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:8px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-left:4px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:16px;text-align:right}.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret{margin-left:16px}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-left:1px solid transparent}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:8px}.tox[dir=rtl] .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-right:4px}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:16px;text-align:left}.tox[dir=rtl] .tox-collection .tox-collection__item-caret{margin-right:16px;transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret{margin-right:4px}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-spectrum:focus,.tox .tox-sv-palette-spectrum:focus{outline:#08f solid}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:5px 0 6px 11px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-4px -4px}.tox .tox-swatches__row{display:flex}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{fill:#222f3e;height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#cce2fa}.tox div.tox-swatch:not(.tox-swatch--remove) svg{display:none;fill:#222f3e;height:24px;margin:calc((30px - 24px)/ 2) calc((30px - 24px)/ 2);width:24px}.tox div.tox-swatch:not(.tox-swatch--remove) svg path{fill:#fff;paint-order:stroke;stroke:#222f3e;stroke-width:2px}.tox div.tox-swatch:not(.tox-swatch--remove).tox-collection__item--enabled svg{display:block}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-comment-thread{background:#fff;position:relative}.tox .tox-comment-thread>:not(:first-child){margin-top:8px}.tox .tox-comment{background:#fff;border:1px solid #eee;border-radius:6px;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);padding:8px 8px 16px 8px;position:relative}.tox .tox-comment__header{align-items:center;color:#222f3e;display:flex;justify-content:space-between}.tox .tox-comment__date{color:#222f3e;font-size:12px;line-height:18px}.tox .tox-comment__body{color:#222f3e;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;margin-top:8px;position:relative;text-transform:initial}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%}.tox .tox-comment__expander{padding-top:8px}.tox .tox-comment__expander p{color:rgba(34,47,62,.7);font-size:14px;font-style:normal}.tox .tox-comment__body p{margin:0}.tox .tox-comment__buttonspacing{padding-top:16px;text-align:center}.tox .tox-comment-thread__overlay::after{background:#fff;bottom:0;content:"";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__reply>:first-child{margin-bottom:8px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:16px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(255,255,255,0),#fff);bottom:0;content:"";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#fff;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__loading-text{align-items:center;color:#222f3e;display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:16px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:14px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#fff;box-shadow:0 0 8px 8px #fff;color:#222f3e;text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__busy-spinner{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:20}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto}.tox .tox-conversations{margin:8px}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:8px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:8px}.tox[dir=rtl] .tox-comment__edit{margin-right:8px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:8px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(34,47,62,.7)}.tox .tox-user__avatar img{border-radius:50%;height:36px;object-fit:cover;vertical-align:middle;width:36px}.tox .tox-user__name{color:#222f3e;font-size:14px;font-style:normal;font-weight:700;line-height:18px;text-transform:none}.tox:not([dir=rtl]) .tox-user__avatar img,.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar img,.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(255,255,255,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#fff}.tox .tox-dialog{background-color:#fff;border-color:#eee;border-radius:10px;border-style:solid;border-width:0;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:8px auto;max-height:calc(100vh - 8px * 2);width:calc(100vw - 16px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#fff;border-bottom:none;color:#222f3e;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:#222f3e;display:flex;flex:1;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;flex-shrink:0;padding:16px 16px}@media only screen and (min-width:768px){.tox .tox-dialog__body-nav{max-width:11em}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(34,47,62,.7);display:inline-block;flex-shrink:0;font-size:14px;line-height:1.3;margin-bottom:8px;max-width:13em;text-decoration:none}.tox .tox-dialog__body-nav-item:focus{background-color:rgba(0,108,231,.1)}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #006ce7;color:#006ce7}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;max-height:min(650px,calc(100vh - 110px));overflow:auto;-webkit-overflow-scrolling:touch;padding:16px 16px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:16px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content a{color:#006ce7;cursor:pointer;text-decoration:underline}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#003c81;text-decoration:underline}.tox .tox-dialog__body-content a:focus-visible{border-radius:1px;outline:2px solid #006ce7;outline-offset:2px}.tox .tox-dialog__body-content a:active{color:#00244e;text-decoration:underline}.tox .tox-dialog__body-content svg{fill:#222f3e}.tox .tox-dialog__body-content strong{font-weight:700}.tox .tox-dialog__body-content ul{list-style-type:disc}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{padding-inline-start:2.5rem}.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{margin-bottom:16px}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content dt,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{display:block;margin-inline-end:0;margin-inline-start:0}.tox .tox-dialog__body-content .tox-form__group h1{color:#222f3e;font-size:20px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group h2{color:#222f3e;font-size:16px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group p{margin-bottom:16px}.tox .tox-dialog__body-content .tox-form__group h1:first-child,.tox .tox-dialog__body-content .tox-form__group h2:first-child,.tox .tox-dialog__body-content .tox-form__group p:first-child{margin-top:0}.tox .tox-dialog__body-content .tox-form__group h1:last-child,.tox .tox-dialog__body-content .tox-form__group h2:last-child,.tox .tox-dialog__body-content .tox-form__group p:last-child{margin-bottom:0}.tox .tox-dialog__body-content .tox-form__group h1:only-child,.tox .tox-dialog__body-content .tox-form__group h2:only-child,.tox .tox-dialog__body-content .tox-form__group p:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--center{text-align:center}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--end{text-align:end}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--fullscreen{height:100%;max-width:100%}.tox .tox-dialog--fullscreen .tox-dialog__body-content{max-height:100%}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#fff;border-top:none;display:flex;justify-content:space-between;padding:8px 16px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(255,255,255,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:3}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:700;padding-bottom:8px}.tox .tox-dialog__table thead th:first-child{padding-right:8px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #626262}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:8px;padding-top:8px}.tox .tox-dialog__table td:first-child{padding-right:8px}.tox .tox-dialog__iframe{min-height:200px}.tox .tox-dialog__iframe.tox-dialog__iframe--opaque{background:#fff}.tox .tox-navobj-bordered{position:relative}.tox .tox-navobj-bordered::before{border:1px solid #eee;border-radius:6px;content:'';inset:0;opacity:1;pointer-events:none;position:absolute;z-index:1}.tox .tox-navobj-bordered-focus.tox-navobj-bordered::before{border-color:#006ce7;box-shadow:0 0 0 2px rgba(0,108,231,.25);outline:0}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;height:100%}.tox .tox-dialog-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-dialog-dock-fadein{opacity:1;visibility:visible}.tox .tox-dialog-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein{transition-delay:0s}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:8px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:8px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:8px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:8px}body.tox-dialog__disable-scroll{overflow:hidden}.tox .tox-dropzone-container{display:flex;flex:1}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #eee;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(34,47,62,.7);margin:0 0 16px 0}.tox .tox-edit-area{display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-edit-area::before{border:2px solid #2d6adf;border-radius:4px;content:'';inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .15s;z-index:1}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;height:100%;position:absolute;width:100%}.tox.tox-edit-focus .tox-edit-area::before{opacity:1}.tox.tox-inline-edit-area{border:1px dotted #eee}.tox .tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-editor-header{display:grid;grid-template-columns:1fr min-content;z-index:2}.tox:not(.tox-tinymce-inline) .tox-editor-header{background-color:#fff;border-bottom:none;box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 8px 8px -4px rgba(34,47,62,.07);padding:4px 0}.tox:not(.tox-tinymce-inline) .tox-editor-header:not(.tox-editor-dock-transition){transition:box-shadow .5s}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-bottom .tox-editor-header{border-top:1px solid #e3e3e3;box-shadow:none}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on .tox-editor-header{background-color:#fff;box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15);padding:4px 0}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on.tox-tinymce--toolbar-bottom .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15)}.tox.tox:not(.tox-tinymce-inline) .tox-editor-header.tox-editor-header--empty{background:0 0;border:none;box-shadow:none;padding:0}.tox-editor-dock-fadeout{opacity:0;visibility:hidden}.tox-editor-dock-fadein{opacity:1;visibility:visible}.tox-editor-dock-transition{transition:visibility 0s linear .25s,opacity .25s ease}.tox-editor-dock-transition.tox-editor-dock-fadein{transition-delay:0s}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:32px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:4px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:32px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:4px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{box-sizing:border-box;max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:700}.tox .tox-color-input{display:flex;position:relative;z-index:1}.tox .tox-color-input .tox-textfield{z-index:-1}.tox .tox-color-input span{border-color:rgba(34,47,62,.2);border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;height:24px;position:absolute;top:6px;width:24px}.tox .tox-color-input span:focus:not([aria-disabled=true]),.tox .tox-color-input span:hover:not([aria-disabled=true]){border-color:#006ce7;cursor:pointer}.tox .tox-color-input span::before{background-image:linear-gradient(45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(-45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.25) 75%),linear-gradient(-45deg,transparent 75%,rgba(0,0,0,.25) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px;border:1px solid #fff;border-radius:6px;box-sizing:border-box;content:'';height:24px;left:-1px;position:absolute;top:-1px;width:24px;z-index:-1}.tox .tox-color-input span[aria-disabled=true]{cursor:not-allowed}.tox:not([dir=rtl]) .tox-color-input .tox-textfield{padding-left:36px}.tox:not([dir=rtl]) .tox-color-input span{left:6px}.tox[dir=rtl] .tox-color-input .tox-textfield{padding-right:36px}.tox[dir=rtl] .tox-color-input span{right:6px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(34,47,62,.7);display:block;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;padding:0 8px 0 0;text-transform:none;white-space:nowrap}.tox .tox-toolbar-label{padding:0 8px}.tox[dir=rtl] .tox-label{padding:0 0 0 8px}.tox .tox-form{display:flex;flex:1;flex-direction:column}.tox .tox-form__group{box-sizing:border-box;margin-bottom:4px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (8px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (8px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (8px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column}.tox .tox-form__group--stretched .tox-textarea{flex:1}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:4px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-listboxfield .tox-listbox--select,.tox .tox-textarea,.tox .tox-textarea-wrap .tox-textarea:focus,.tox .tox-textfield,.tox .tox-toolbar-textfield{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-textarea[disabled],.tox .tox-textfield[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-custom-editor:focus-within,.tox .tox-listboxfield .tox-listbox--select:focus,.tox .tox-textarea-wrap:focus-within,.tox .tox-textarea:focus,.tox .tox-textfield:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 2px rgba(0,108,231,.25);outline:0}.tox .tox-toolbar-textfield{border-width:0;margin-bottom:3px;margin-top:2px;max-width:250px}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#006ce7;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:#222f3e}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:4px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:4px}.tox .tox-listboxfield{cursor:pointer;position:relative}.tox .tox-listboxfield .tox-listbox--select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-listbox__select-label{cursor:default;flex:1;margin:0 4px}.tox .tox-listbox__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-listbox__select-chevron svg{fill:#222f3e}.tox .tox-listboxfield .tox-listbox--select{align-items:center;display:flex}.tox:not([dir=rtl]) .tox-listboxfield svg{right:8px}.tox[dir=rtl] .tox-listboxfield svg{left:8px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-selectfield select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield select:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 2px rgba(0,108,231,.25);outline:0}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox:not([dir=rtl]) .tox-selectfield select[size="0"],.tox:not([dir=rtl]) .tox-selectfield select[size="1"]{padding-right:24px}.tox:not([dir=rtl]) .tox-selectfield svg{right:8px}.tox[dir=rtl] .tox-selectfield select[size="0"],.tox[dir=rtl] .tox-selectfield select[size="1"]{padding-left:24px}.tox[dir=rtl] .tox-selectfield svg{left:8px}.tox .tox-textarea-wrap{border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;display:flex;flex:1;overflow:hidden}.tox .tox-textarea{-webkit-appearance:textarea;-moz-appearance:textarea;appearance:textarea;white-space:pre-wrap}.tox .tox-textarea-wrap .tox-textarea{border:none}.tox .tox-textarea-wrap .tox-textarea:focus{border:none}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201}.tox .tox-help__more-link{list-style:none;margin-top:1em}.tox .tox-imagepreview{background-color:#666;height:380px;overflow:hidden;position:relative;width:100%}.tox .tox-imagepreview.tox-imagepreview__loaded{overflow:auto}.tox .tox-imagepreview__container{display:flex;left:100vw;position:absolute;top:100vw}.tox .tox-imagepreview__image{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools .tox-spacer{flex:1}.tox .tox-image-tools .tox-bar{align-items:center;display:flex;height:60px;justify-content:center}.tox .tox-image-tools .tox-imagepreview,.tox .tox-image-tools .tox-imagepreview+.tox-bar{margin-top:8px}.tox .tox-image-tools .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-image-tools .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-image-tools .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-image-tools .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-image-tools .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-image-tools .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-image-tools .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox .tox-insert-table-picker{display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#eee;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-4px -4px}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:rgba(0,108,231,.5);border-color:rgba(0,108,231,.5)}.tox .tox-insert-table-picker__label{color:rgba(34,47,62,.7);display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox .tox-menu{background-color:#fff;border:1px solid transparent;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0 4px}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:8px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:8px}@media only screen and (min-width:768px){.tox .tox-menu .tox-collection__item-label{overflow-wrap:break-word;word-break:normal}.tox .tox-dialog__popups .tox-menu .tox-collection__item-label{word-break:break-all}}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;grid-column:1/-1;grid-row:1;padding:0 11px 0 12px}.tox .tox-promotion+.tox-menubar{grid-column:1}.tox .tox-promotion{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;grid-column:2;grid-row:1;padding-inline-end:8px;padding-inline-start:4px;padding-top:5px}.tox .tox-promotion-link{align-items:unsafe center;background-color:#e8f1f8;border-radius:5px;color:#086be6;cursor:pointer;display:flex;font-size:14px;height:26.6px;padding:4px 8px;white-space:nowrap}.tox .tox-promotion-link:hover{background-color:#b4d7ff}.tox .tox-promotion-link:focus{background-color:#d9edf7}.tox .tox-mbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:5px 1px 6px 0;outline:0;overflow:hidden;padding:0 4px;text-transform:none;width:auto}.tox .tox-mbtn[disabled]{background-color:transparent;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-mbtn:focus:not(:disabled){background:#cce2fa;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn--active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active){background:#cce2fa;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;display:grid;font-size:14px;font-weight:400;grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-top:4px;opacity:0;padding:4px;transition:transform .1s ease-in,opacity 150ms ease-in}.tox .tox-notification p{font-size:14px;font-weight:400}.tox .tox-notification a{cursor:pointer;text-decoration:underline}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#e4eeda;border-color:#d7e6c8;color:#222f3e}.tox .tox-notification--success p{color:#222f3e}.tox .tox-notification--success a{color:#517342}.tox .tox-notification--success svg{fill:#222f3e}.tox .tox-notification--error{background-color:#f5cccc;border-color:#f0b3b3;color:#222f3e}.tox .tox-notification--error p{color:#222f3e}.tox .tox-notification--error a{color:#77181f}.tox .tox-notification--error svg{fill:#222f3e}.tox .tox-notification--warn,.tox .tox-notification--warning{background-color:#fff5cc;border-color:#fff0b3;color:#222f3e}.tox .tox-notification--warn p,.tox .tox-notification--warning p{color:#222f3e}.tox .tox-notification--warn a,.tox .tox-notification--warning a{color:#7a6e25}.tox .tox-notification--warn svg,.tox .tox-notification--warning svg{fill:#222f3e}.tox .tox-notification--info{background-color:#d6e7fb;border-color:#c1dbf9;color:#222f3e}.tox .tox-notification--info p{color:#222f3e}.tox .tox-notification--info a{color:#2a64a6}.tox .tox-notification--info svg{fill:#222f3e}.tox .tox-notification__body{align-self:center;color:#222f3e;font-size:14px;grid-column-end:3;grid-column-start:2;grid-row-end:2;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{align-self:center;grid-column-end:2;grid-column-start:1;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{align-self:start;grid-column-end:4;grid-column-start:3;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification .tox-progress-bar{grid-column-end:4;grid-column-start:1;grid-row-end:3;grid-row-start:2;justify-self:center}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar,.tox .tox-pop--resizing .tox-toolbar__group{flex-wrap:nowrap}.tox .tox-pop--transition{transition:.15s ease;transition-property:left,right,top,bottom}.tox .tox-pop--transition::after,.tox .tox-pop--transition::before{transition:all .15s,visibility 0s,opacity 75ms ease 75ms}.tox .tox-pop__dialog{background-color:#fff;border:1px solid #eee;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:4px 4px 4px 8px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent;margin-bottom:-1px}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:'';display:block;height:0;opacity:1;position:absolute;width:0}.tox .tox-pop.tox-pop--inset::after,.tox .tox-pop.tox-pop--inset::before{opacity:0;transition:all 0s .15s,visibility 0s,opacity 75ms ease}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#fff transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#eee transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #fff transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #eee transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #fff transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #eee transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #fff;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #eee;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox .tox-sidebar-wrap{display:flex;flex-direction:row;flex-grow:1;min-height:0}.tox .tox-sidebar{background-color:#fff;display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-selector{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;display:inline-block;height:10px;position:absolute;width:10px}.tox.tox-platform-touch .tox-selector{height:12px;width:12px}.tox .tox-slider{align-items:center;display:flex;flex:1;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #eee;border-radius:6px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#006ce7;border:2px solid #0054b4;border-radius:6px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-form__controls-h-stack>.tox-slider:not(:first-of-type){margin-inline-start:8px}.tox .tox-form__controls-h-stack>.tox-form__group+.tox-slider{margin-inline-start:32px}.tox .tox-form__controls-h-stack>.tox-slider+.tox-form__group{margin-inline-start:32px}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(34,47,62,.7);border-radius:100%;height:8px;width:8px}.tox .tox-spinner>div:nth-child(1){animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:4px}.tox .tox-statusbar{align-items:center;background-color:#fff;border-top:1px solid #e3e3e3;color:rgba(34,47,62,.7);display:flex;flex:0 0 auto;font-size:14px;font-weight:400;height:25px;overflow:hidden;padding:0 8px;position:relative;text-transform:none}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__right-container{display:flex;justify-content:flex-end;white-space:nowrap}.tox .tox-statusbar__help-text{text-align:center}.tox .tox-statusbar__text-container{display:flex;flex:1 1 auto;justify-content:space-between;overflow:hidden}@media only screen and (min-width:768px){.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__help-text,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__path,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__right-container{flex:0 0 calc(100% / 3)}}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-end{justify-content:flex-end}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-start{justify-content:flex-start}.tox .tox-statusbar__text-container.tox-statusbar__text-container--space-around{justify-content:space-around}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}@media only screen and (max-width:767px){.tox .tox-statusbar__text-container .tox-statusbar__help-text{display:none}.tox .tox-statusbar__text-container .tox-statusbar__help-text:only-child{display:block}}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:rgba(34,47,62,.7);text-decoration:none}.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]){color:#222f3e;cursor:pointer}.tox .tox-statusbar__branding svg{fill:rgba(34,47,62,.8);height:1.14em;vertical-align:-.28em;width:3.6em}.tox .tox-statusbar__branding a:focus:not(:disabled):not([aria-disabled=true]) svg,.tox .tox-statusbar__branding a:hover:not(:disabled):not([aria-disabled=true]) svg{fill:#222f3e}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;cursor:nwse-resize;display:flex;flex:0 0 auto;justify-content:flex-end;margin-left:auto;margin-right:-8px;padding-bottom:3px;padding-left:1ch;padding-right:3px}.tox .tox-statusbar__resize-handle svg{display:block;fill:rgba(34,47,62,.5)}.tox .tox-statusbar__resize-handle:focus svg{background-color:#dee0e2;border-radius:1px 1px 5px 1px;box-shadow:0 0 0 2px #dee0e2}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:2ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox .tox-throbber{z-index:1299}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(255,255,255,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-tbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:6px 1px 5px 0;outline:0;overflow:hidden;padding:0;text-transform:none;width:34px}.tox .tox-tbtn svg{display:block;fill:#222f3e}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#cce2fa;border:0;box-shadow:none}.tox .tox-tbtn:hover{background:#cce2fa;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:hover svg{fill:#222f3e}.tox .tox-tbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:active svg{fill:#222f3e}.tox .tox-tbtn--disabled .tox-tbtn--enabled svg{fill:rgba(34,47,62,.5)}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(34,47,62,.5)}.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tbtn--enabled.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:hover.tox-tbtn--disabled svg{fill:rgba(34,47,62,.5)}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){color:#222f3e}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg{fill:#222f3e}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:42px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:56px;width:68px}.tox .tox-tbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-number-input{border-radius:3px;display:flex;margin:6px 1px 5px 0;padding:0 4px;width:auto}.tox .tox-number-input .tox-input-wrapper{background:#f7f7f7;display:flex;pointer-events:none;text-align:center}.tox .tox-number-input .tox-input-wrapper:focus{background:#cce2fa}.tox .tox-number-input input{border-radius:3px;color:#222f3e;font-size:14px;margin:2px 0;pointer-events:all;width:60px}.tox .tox-number-input input:hover{background:#cce2fa;color:#222f3e}.tox .tox-number-input input:focus{background:#fff;color:#222f3e}.tox .tox-number-input input:disabled{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button{background:#f7f7f7;color:#222f3e;height:28px;text-align:center;width:24px}.tox .tox-number-input button svg{display:block;fill:#222f3e;margin:0 auto;transform:scale(.67)}.tox .tox-number-input button:focus{background:#cce2fa}.tox .tox-number-input button:hover{background:#cce2fa;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:hover svg{fill:#222f3e}.tox .tox-number-input button:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:active svg{fill:#222f3e}.tox .tox-number-input button:disabled{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button:disabled svg{fill:rgba(34,47,62,.5)}.tox .tox-number-input button.minus{border-radius:3px 0 0 3px}.tox .tox-number-input button.plus{border-radius:0 3px 3px 0}.tox .tox-number-input:focus:not(:active)>.tox-input-wrapper,.tox .tox-number-input:focus:not(:active)>button{background:#cce2fa}.tox .tox-tbtn--select{margin:6px 1px 5px 0;padding:0 4px;width:auto}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;height:initial;margin:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-tbtn__select-chevron svg{fill:rgba(34,47,62,.5)}.tox .tox-tbtn--bespoke{background:#f7f7f7}.tox .tox-tbtn--bespoke+.tox-tbtn--bespoke{margin-inline-start:4px}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-tbtn--disabled .tox-tbtn__select-label,.tox .tox-tbtn--select:disabled .tox-tbtn__select-label{cursor:not-allowed}.tox .tox-split-button{border:0;border-radius:3px;box-sizing:border-box;display:flex;margin:6px 1px 5px 0;overflow:hidden}.tox .tox-split-button:hover{box-shadow:0 0 0 1px #cce2fa inset}.tox .tox-split-button:focus{background:#cce2fa;box-shadow:none;color:#222f3e}.tox .tox-split-button>*{border-radius:0}.tox .tox-split-button__chevron{width:16px}.tox .tox-split-button__chevron svg{fill:rgba(34,47,62,.5)}.tox .tox-split-button .tox-tbtn{margin:0}.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{background:0 0;box-shadow:none;color:rgba(34,47,62,.5)}.tox.tox-platform-touch .tox-split-button .tox-tbtn--select{padding:0 0}.tox.tox-platform-touch .tox-split-button .tox-tbtn:not(.tox-tbtn--select):first-child{width:30px}.tox.tox-platform-touch .tox-split-button__chevron{width:20px}.tox .tox-split-button.tox-tbtn--disabled svg #tox-icon-highlight-bg-color__color,.tox .tox-split-button.tox-tbtn--disabled svg #tox-icon-text-color__color{opacity:.6}.tox .tox-toolbar-overlord{background-color:#fff}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background-attachment:local;background-color:#fff;background-image:repeating-linear-gradient(#e3e3e3 0 1px,transparent 1px 39px);background-position:center top 40px;background-repeat:no-repeat;background-size:calc(100% - 11px * 2) calc(100% - 41px);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 0;transform:perspective(1px)}.tox .tox-toolbar-overlord>.tox-toolbar,.tox .tox-toolbar-overlord>.tox-toolbar__overflow,.tox .tox-toolbar-overlord>.tox-toolbar__primary{background-position:center top 0;background-size:calc(100% - 11px * 2) calc(100% - 0px)}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-anchorbar,.tox .tox-toolbar-overlord{grid-column:1/-1}.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord{border-top:1px solid transparent;margin-top:-1px;padding-bottom:1px;padding-top:1px}.tox .tox-toolbar--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox .tox-toolbar-overlord .tox-toolbar:not(.tox-toolbar--scrolling):first-child,.tox .tox-toolbar-overlord .tox-toolbar__primary{background-position:center top 39px}.tox .tox-editor-header>.tox-toolbar--scrolling,.tox .tox-toolbar-overlord .tox-toolbar--scrolling:first-child{background-image:none}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#fff;background-position:center top 43px;background-size:calc(100% - 8px * 2) calc(100% - 51px);border:none;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);overscroll-behavior:none;padding:4px 0}.tox-pop .tox-pop__dialog .tox-toolbar{background-position:center top 43px;background-size:calc(100% - 11px * 2) calc(100% - 51px);padding:4px 0}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 11px 0 12px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox .tox-toolbar--scrolling .tox-toolbar__group{flex-shrink:0;flex-wrap:nowrap}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid transparent}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid transparent}.tox .tox-tooltip{display:inline-block;padding:8px;position:relative}.tox .tox-tooltip__body{background-color:#222f3e;border-radius:6px;box-shadow:0 2px 4px rgba(34,47,62,.3);color:rgba(255,255,255,.75);font-size:14px;font-style:normal;font-weight:400;padding:4px 8px;text-transform:none}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #222f3e;bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:8px solid #222f3e;border-left:8px solid transparent;border-right:8px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:8px solid transparent;border-left:8px solid #222f3e;border-top:8px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:8px solid transparent;border-right:8px solid #222f3e;border-top:8px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-tree{display:flex;flex-direction:column}.tox .tox-tree .tox-trbtn{align-items:center;background:0 0;border:0;border-radius:4px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;margin-bottom:4px;margin-top:4px;outline:0;overflow:hidden;padding:0;padding-left:8px;text-transform:none}.tox .tox-tree .tox-trbtn .tox-tree__label{cursor:default;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tree .tox-trbtn svg{display:block;fill:#222f3e}.tox .tox-tree .tox-trbtn:focus{background:#cce2fa;border:0;box-shadow:none}.tox .tox-tree .tox-trbtn:hover{background:#cce2fa;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:active svg{fill:#222f3e}.tox .tox-tree .tox-trbtn--disabled,.tox .tox-tree .tox-trbtn--disabled:hover,.tox .tox-tree .tox-trbtn:disabled,.tox .tox-tree .tox-trbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tree .tox-trbtn--disabled svg,.tox .tox-tree .tox-trbtn--disabled:hover svg,.tox .tox-tree .tox-trbtn:disabled svg,.tox .tox-tree .tox-trbtn:disabled:hover svg{fill:rgba(34,47,62,.5)}.tox .tox-tree .tox-trbtn--enabled,.tox .tox-tree .tox-trbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn--enabled:hover>*,.tox .tox-tree .tox-trbtn--enabled>*{transform:none}.tox .tox-tree .tox-trbtn--enabled svg,.tox .tox-tree .tox-trbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled){color:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled) svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active>*{transform:none}.tox .tox-tree .tox-trbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tree .tox-trbtn--labeled{padding:0 4px;width:unset}.tox .tox-tree .tox-trbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-tree .tox-tree--directory{display:flex;flex-direction:column}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label{font-weight:700}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:focus .tox-mbtn svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-chevron{margin-right:6px}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+.tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+.tox-tree--directory__children--shrinking) .tox-chevron{transition:transform .5s ease-in-out}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+.tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+.tox-tree--directory__children--open) .tox-chevron{transform:rotate(90deg)}.tox .tox-tree .tox-tree--leaf__label{font-weight:400}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--leaf__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory__children{overflow:hidden;padding-left:16px}.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--growing,.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--shrinking{transition:height .5s ease-in-out}.tox .tox-tree .tox-trbtn.tox-tree--leaf__label{display:flex;justify-content:space-between}.tox .tox-view-wrap,.tox .tox-view-wrap__slot-container{background-color:#fff;display:flex;flex:1;flex-direction:column}.tox .tox-view{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-view__header{align-items:center;display:flex;font-size:16px;justify-content:space-between;padding:8px 8px 0 8px;position:relative}.tox .tox-view--mobile.tox-view__header,.tox .tox-view--mobile.tox-view__toolbar{padding:8px}.tox .tox-view--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-view__toolbar{display:flex;flex-direction:row;gap:8px;justify-content:space-between;padding:8px 8px 0 8px}.tox .tox-view__toolbar__group{display:flex;flex-direction:row;gap:12px}.tox .tox-view__header-end,.tox .tox-view__header-start{display:flex}.tox .tox-view__pane{height:100%;padding:8px;width:100%}.tox .tox-view__pane_panel{border:1px solid #eee;border-radius:6px}.tox:not([dir=rtl]) .tox-view__header .tox-view__header-end>*,.tox:not([dir=rtl]) .tox-view__header .tox-view__header-start>*{margin-left:8px}.tox[dir=rtl] .tox-view__header .tox-view__header-end>*,.tox[dir=rtl] .tox-view__header .tox-view__header-start>*{margin-right:8px}.tox .tox-well{border:1px solid #eee;border-radius:6px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #eee;border-radius:6px;display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1} diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/skin.min.css:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/skin.min.css:Zone.Identifier new file mode 100644 index 00000000..46f4a137 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/skin.min.css:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/table.umd.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/table.umd.js.download new file mode 100644 index 00000000..6ee27122 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/table.umd.js.download @@ -0,0 +1,2 @@ +(function(){var r;"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.nonce=(r=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:r.content,o.appendChild(document.createTextNode('.tc-wrap{--color-background:#f9f9fb;--color-text-secondary:#7b7e89;--color-border:#e8e8eb;--cell-size:34px;--toolbox-icon-size:18px;--toolbox-padding:6px;--toolbox-aiming-field-size:calc(var(--toolbox-icon-size) + var(--toolbox-padding)*2);border-left:0;position:relative;height:100%;width:100%;margin-top:var(--toolbox-icon-size);box-sizing:border-box;display:grid;grid-template-columns:calc(100% - var(--cell-size)) var(--cell-size)}.tc-wrap--readonly{grid-template-columns:100% var(--cell-size)}.tc-wrap svg{vertical-align:top}@media print{.tc-wrap{border-left-color:var(--color-border);border-left-style:solid;border-left-width:1px;grid-template-columns:100% var(--cell-size)}}@media print{.tc-wrap .tc-row:after{display:none}}.tc-table{position:relative;width:100%;height:100%;display:grid;font-size:14px;border-top:1px solid var(--color-border);line-height:1.4}.tc-table:after{width:calc(var(--cell-size));height:100%;left:calc(var(--cell-size)*-1);top:0}.tc-table:after,.tc-table:before{position:absolute;content:""}.tc-table:before{width:100%;height:var(--toolbox-aiming-field-size);top:calc(var(--toolbox-aiming-field-size)*-1);left:0}.tc-table--heading .tc-row:first-child{font-weight:600;border-bottom:2px solid var(--color-border)}.tc-table--heading .tc-row:first-child [contenteditable]:empty:before{content:attr(heading);color:var(--color-text-secondary)}.tc-table--heading .tc-row:first-child:after{bottom:-2px;border-bottom:2px solid var(--color-border)}.tc-add-column,.tc-add-row{display:flex;color:var(--color-text-secondary)}@media print{.tc-add{display:none}}.tc-add-column{padding:4px 0;justify-content:center;border-top:1px solid var(--color-border)}.tc-add-column--disabled{visibility:hidden}@media print{.tc-add-column{display:none}}.tc-add-row{height:var(--cell-size);align-items:center;padding-left:4px;position:relative}.tc-add-row--disabled{display:none}.tc-add-row:before{content:"";position:absolute;right:calc(var(--cell-size)*-1);width:var(--cell-size);height:100%}@media print{.tc-add-row{display:none}}.tc-add-column,.tc-add-row{transition:0s;cursor:pointer;will-change:background-color}.tc-add-column:hover,.tc-add-row:hover{transition:background-color .1s ease;background-color:var(--color-background)}.tc-add-row{margin-top:1px}.tc-add-row:hover:before{transition:.1s;background-color:var(--color-background)}.tc-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(10px,1fr));position:relative;border-bottom:1px solid var(--color-border)}.tc-row:after{content:"";pointer-events:none;position:absolute;width:var(--cell-size);height:100%;bottom:-1px;right:calc(var(--cell-size)*-1);border-bottom:1px solid var(--color-border)}.tc-row--selected{background:var(--color-background)}.tc-row--selected:after{background:var(--color-background)}.tc-cell{border-right:1px solid var(--color-border);padding:6px 12px;overflow:hidden;outline:none;line-break:normal}.tc-cell--selected{background:var(--color-background)}.tc-wrap--readonly .tc-row:after{display:none}.tc-toolbox{--toolbox-padding:6px;--popover-margin:30px;--toggler-click-zone-size:30px;--toggler-dots-color:#7b7e89;--toggler-dots-color-hovered:#1d202b;position:absolute;cursor:pointer;z-index:1;opacity:0;transition:opacity .1s;will-change:left,opacity}.tc-toolbox--column{top:calc(var(--toggler-click-zone-size)*-1);transform:translate(calc(var(--toggler-click-zone-size)*-1/2));will-change:left,opacity}.tc-toolbox--row{left:calc(var(--popover-margin)*-1);transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));margin-top:-1px;will-change:top,opacity}.tc-toolbox--showed{opacity:1}.tc-toolbox .tc-popover{position:absolute;top:0;left:var(--popover-margin)}.tc-toolbox__toggler{display:flex;align-items:center;justify-content:center;width:var(--toggler-click-zone-size);height:var(--toggler-click-zone-size);color:var(--toggler-dots-color);opacity:0;transition:opacity .15s ease;will-change:opacity}.tc-toolbox__toggler:hover{color:var(--toggler-dots-color-hovered)}.tc-toolbox__toggler svg{fill:currentColor}.tc-wrap:hover .tc-toolbox__toggler{opacity:1}.tc-settings .cdx-settings-button{width:50%;margin:0}.tc-popover{--color-border:#eaeaea;--color-background:#fff;--color-background-hover:rgba(232,232,235,.49);--color-background-confirm:#e24a4a;--color-background-confirm-hover:#d54040;--color-text-confirm:#fff;background:var(--color-background);border:1px solid var(--color-border);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;padding:6px;display:none;will-change:opacity,transform}.tc-popover--opened{display:block;animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards}.tc-popover__item{display:flex;align-items:center;padding:2px 14px 2px 2px;border-radius:5px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tc-popover__item:hover{background:var(--color-background-hover)}.tc-popover__item:not(:last-of-type){margin-bottom:2px}.tc-popover__item-icon{display:inline-flex;width:26px;height:26px;align-items:center;justify-content:center;background:var(--color-background);border-radius:5px;border:1px solid var(--color-border);margin-right:8px}.tc-popover__item-label{line-height:22px;font-size:14px;font-weight:500}.tc-popover__item--confirm{background:var(--color-background-confirm);color:var(--color-text-confirm)}.tc-popover__item--confirm:hover{background-color:var(--color-background-confirm-hover)}.tc-popover__item--confirm .tc-popover__item-icon{background:var(--color-background-confirm);border-color:#0000001a}.tc-popover__item--confirm .tc-popover__item-icon svg{transition:transform .2s ease-in;transform:rotate(90deg) scale(1.2)}.tc-popover__item--hidden{display:none}@keyframes menuShowing{0%{opacity:0;transform:translateY(-8px) scale(.9)}70%{opacity:1;transform:translateY(2px)}to{transform:translateY(0)}}')),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); +(function(d,p){typeof exports=="object"&&typeof module<"u"?module.exports=p():typeof define=="function"&&define.amd?define(p):(d=typeof globalThis<"u"?globalThis:d||self,d.Table=p())})(this,function(){"use strict";function d(a,t,e={}){const o=document.createElement(a);Array.isArray(t)?o.classList.add(...t):t&&o.classList.add(t);for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=e[i]);return o}function p(a){const t=a.getBoundingClientRect();return{y1:Math.floor(t.top+window.pageYOffset),x1:Math.floor(t.left+window.pageXOffset),x2:Math.floor(t.right+window.pageXOffset),y2:Math.floor(t.bottom+window.pageYOffset)}}function g(a,t){const e=p(a),o=p(t);return{fromTopBorder:o.y1-e.y1,fromLeftBorder:o.x1-e.x1,fromRightBorder:e.x2-o.x2,fromBottomBorder:e.y2-o.y2}}function k(a,t){const e=a.getBoundingClientRect(),{width:o,height:i,x:n,y:r}=e,{clientX:h,clientY:l}=t;return{width:o,height:i,x:h-n,y:l-r}}function m(a,t){return t.parentNode.insertBefore(a,t)}function C(a,t=!0){const e=document.createRange(),o=window.getSelection();e.selectNodeContents(a),e.collapse(t),o.removeAllRanges(),o.addRange(e)}class c{constructor({items:t}){this.items=t,this.wrapper=void 0,this.itemEls=[]}static get CSS(){return{popover:"tc-popover",popoverOpened:"tc-popover--opened",item:"tc-popover__item",itemHidden:"tc-popover__item--hidden",itemConfirmState:"tc-popover__item--confirm",itemIcon:"tc-popover__item-icon",itemLabel:"tc-popover__item-label"}}render(){return this.wrapper=d("div",c.CSS.popover),this.items.forEach((t,e)=>{const o=d("div",c.CSS.item),i=d("div",c.CSS.itemIcon,{innerHTML:t.icon}),n=d("div",c.CSS.itemLabel,{textContent:t.label});o.dataset.index=e,o.appendChild(i),o.appendChild(n),this.wrapper.appendChild(o),this.itemEls.push(o)}),this.wrapper.addEventListener("click",t=>{this.popoverClicked(t)}),this.wrapper}popoverClicked(t){const e=t.target.closest(`.${c.CSS.item}`);if(!e)return;const o=e.dataset.index,i=this.items[o];if(i.confirmationRequired&&!this.hasConfirmationState(e)){this.setConfirmationState(e);return}i.onClick()}setConfirmationState(t){t.classList.add(c.CSS.itemConfirmState)}clearConfirmationState(t){t.classList.remove(c.CSS.itemConfirmState)}hasConfirmationState(t){return t.classList.contains(c.CSS.itemConfirmState)}get opened(){return this.wrapper.classList.contains(c.CSS.popoverOpened)}open(){this.items.forEach((t,e)=>{typeof t.hideIf=="function"&&this.itemEls[e].classList.toggle(c.CSS.itemHidden,t.hideIf())}),this.wrapper.classList.add(c.CSS.popoverOpened)}close(){this.wrapper.classList.remove(c.CSS.popoverOpened),this.itemEls.forEach(t=>{this.clearConfirmationState(t)})}}const R='',b='',x='',S='',y='',L='',M='',v='',O='',T='',H='',A='';class w{constructor({api:t,items:e,onOpen:o,onClose:i,cssModifier:n=""}){this.api=t,this.items=e,this.onOpen=o,this.onClose=i,this.cssModifier=n,this.popover=null,this.wrapper=this.createToolbox()}static get CSS(){return{toolbox:"tc-toolbox",toolboxShowed:"tc-toolbox--showed",toggler:"tc-toolbox__toggler"}}get element(){return this.wrapper}createToolbox(){const t=d("div",[w.CSS.toolbox,this.cssModifier?`${w.CSS.toolbox}--${this.cssModifier}`:""]);t.dataset.mutationFree="true";const e=this.createPopover(),o=this.createToggler();return t.appendChild(o),t.appendChild(e),t}createToggler(){const t=d("div",w.CSS.toggler,{innerHTML:M});return t.addEventListener("click",()=>{this.togglerClicked()}),t}createPopover(){return this.popover=new c({items:this.items}),this.popover.render()}togglerClicked(){this.popover.opened?(this.popover.close(),this.onClose()):(this.popover.open(),this.onOpen())}show(t){const e=t();Object.entries(e).forEach(([o,i])=>{this.wrapper.style[o]=i}),this.wrapper.classList.add(w.CSS.toolboxShowed)}hide(){this.popover.close(),this.wrapper.classList.remove(w.CSS.toolboxShowed)}}function B(a,t){let e=0;return function(...o){const i=new Date().getTime();if(!(i-e{const r=n.target.closest(`.${s.table}`)!==null,h=n.target.closest(`.${s.wrapper}`)===null;(r||h)&&this.hideToolboxes();const u=n.target.closest(`.${s.addRow}`),f=n.target.closest(`.${s.addColumn}`);u&&u.parentNode===this.wrapper?(this.addRow(void 0,!0),this.hideToolboxes()):f&&f.parentNode===this.wrapper&&(this.addColumn(void 0,!0),this.hideToolboxes())},this.readOnly||this.bindEvents()}getWrapper(){return this.wrapper}bindEvents(){document.addEventListener("click",this.documentClicked),this.table.addEventListener("mousemove",B(150,t=>this.onMouseMoveInTable(t)),{passive:!0}),this.table.onkeypress=t=>this.onKeyPressListener(t),this.table.addEventListener("keydown",t=>this.onKeyDownListener(t)),this.table.addEventListener("focusin",t=>this.focusInTableListener(t))}createColumnToolbox(){return new w({api:this.api,cssModifier:"column",items:[{label:this.api.i18n.t("Add column to left"),icon:S,hideIf:()=>this.numberOfColumns===this.config.maxcols,onClick:()=>{this.addColumn(this.selectedColumn,!0),this.hideToolboxes()}},{label:this.api.i18n.t("Add column to right"),icon:y,hideIf:()=>this.numberOfColumns===this.config.maxcols,onClick:()=>{this.addColumn(this.selectedColumn+1,!0),this.hideToolboxes()}},{label:this.api.i18n.t("Delete column"),icon:b,hideIf:()=>this.numberOfColumns===1,confirmationRequired:!0,onClick:()=>{this.deleteColumn(this.selectedColumn),this.hideToolboxes()}}],onOpen:()=>{this.selectColumn(this.hoveredColumn),this.hideRowToolbox()},onClose:()=>{this.unselectColumn()}})}createRowToolbox(){return new w({api:this.api,cssModifier:"row",items:[{label:this.api.i18n.t("Add row above"),icon:L,hideIf:()=>this.numberOfRows===this.config.maxrows,onClick:()=>{this.addRow(this.selectedRow,!0),this.hideToolboxes()}},{label:this.api.i18n.t("Add row below"),icon:x,hideIf:()=>this.numberOfRows===this.config.maxrows,onClick:()=>{this.addRow(this.selectedRow+1,!0),this.hideToolboxes()}},{label:this.api.i18n.t("Delete row"),icon:b,hideIf:()=>this.numberOfRows===1,confirmationRequired:!0,onClick:()=>{this.deleteRow(this.selectedRow),this.hideToolboxes()}}],onOpen:()=>{this.selectRow(this.hoveredRow),this.hideColumnToolbox()},onClose:()=>{this.unselectRow()}})}moveCursorToNextRow(){this.focusedCell.row!==this.numberOfRows?(this.focusedCell.row+=1,this.focusCell(this.focusedCell)):(this.addRow(),this.focusedCell.row+=1,this.focusCell(this.focusedCell),this.updateToolboxesPosition(0,0))}getCell(t,e){return this.table.querySelectorAll(`.${s.row}:nth-child(${t}) .${s.cell}`)[e-1]}getRow(t){return this.table.querySelector(`.${s.row}:nth-child(${t})`)}getRowByCell(t){return t.parentElement}getRowFirstCell(t){return t.querySelector(`.${s.cell}:first-child`)}setCellContent(t,e,o){const i=this.getCell(t,e);i.innerHTML=o}addColumn(t=-1,e=!1){var n;let o=this.numberOfColumns;if(this.config&&this.config.maxcols&&this.numberOfColumns>=this.config.maxcols)return;for(let r=1;r<=this.numberOfRows;r++){let h;const l=this.createCell();if(t>0&&t<=o?(h=this.getCell(r,t),m(l,h)):h=this.getRow(r).appendChild(l),r===1){const u=this.getCell(r,t>0?t:o+1);u&&e&&C(u)}}const i=this.wrapper.querySelector(`.${s.addColumn}`);(n=this.config)!=null&&n.maxcols&&this.numberOfColumns>this.config.maxcols-1&&i&&i.classList.add(s.addColumnDisabled),this.addHeadingAttrToFirstRow()}addRow(t=-1,e=!1){let o,i=d("div",s.row);this.tunes.withHeadings&&this.removeHeadingAttrFromFirstRow();let n=this.numberOfColumns;if(this.config&&this.config.maxrows&&this.numberOfRows>=this.config.maxrows&&h)return;if(t>0&&t<=this.numberOfRows){let l=this.getRow(t);o=m(i,l)}else o=this.table.appendChild(i);this.fillRow(o,n),this.tunes.withHeadings&&this.addHeadingAttrToFirstRow();const r=this.getRowFirstCell(o);r&&e&&C(r);const h=this.wrapper.querySelector(`.${s.addRow}`);return this.config&&this.config.maxrows&&this.numberOfRows>=this.config.maxrows&&h&&h.classList.add(s.addRowDisabled),o}deleteColumn(t){for(let o=1;o<=this.numberOfRows;o++){const i=this.getCell(o,t);if(!i)return;i.remove()}const e=this.wrapper.querySelector(`.${s.addColumn}`);e&&e.classList.remove(s.addColumnDisabled)}deleteRow(t){this.getRow(t).remove();const e=this.wrapper.querySelector(`.${s.addRow}`);e&&e.classList.remove(s.addRowDisabled),this.addHeadingAttrToFirstRow()}createTableWrapper(){if(this.wrapper=d("div",s.wrapper),this.table=d("div",s.table),this.readOnly&&this.wrapper.classList.add(s.wrapperReadOnly),this.wrapper.appendChild(this.toolboxRow.element),this.wrapper.appendChild(this.toolboxColumn.element),this.wrapper.appendChild(this.table),!this.readOnly){const t=d("div",s.addColumn,{innerHTML:v}),e=d("div",s.addRow,{innerHTML:v});this.wrapper.appendChild(t),this.wrapper.appendChild(e)}}computeInitialSize(){const t=this.data&&this.data.content,e=Array.isArray(t),o=e?t.length:!1,i=e?t.length:void 0,n=o?t[0].length:void 0,r=Number.parseInt(this.config&&this.config.rows),h=Number.parseInt(this.config&&this.config.cols),l=!isNaN(r)&&r>0?r:void 0,u=!isNaN(h)&&h>0?h:void 0;return{rows:i||l||2,cols:n||u||2}}resize(){const{rows:t,cols:e}=this.computeInitialSize();for(let o=0;o0&&e<=this.numberOfColumns&&this.toolboxColumn.show(()=>({left:`calc((100% - var(--cell-size)) / (${this.numberOfColumns} * 2) * (1 + (${e} - 1) * 2))`})),this.isRowMenuShowing||t>0&&t<=this.numberOfRows&&this.toolboxRow.show(()=>{const o=this.getRow(t),{fromTopBorder:i}=g(this.table,o),{height:n}=o.getBoundingClientRect();return{top:`${Math.ceil(i+n/2)}px`}})}setHeadingsSetting(t){this.tunes.withHeadings=t,t?(this.table.classList.add(s.withHeadings),this.addHeadingAttrToFirstRow()):(this.table.classList.remove(s.withHeadings),this.removeHeadingAttrFromFirstRow())}addHeadingAttrToFirstRow(){for(let t=1;t<=this.numberOfColumns;t++){let e=this.getCell(1,t);e&&e.setAttribute("heading",this.api.i18n.t("Heading"))}}removeHeadingAttrFromFirstRow(){for(let t=1;t<=this.numberOfColumns;t++){let e=this.getCell(1,t);e&&e.removeAttribute("heading")}}selectRow(t){const e=this.getRow(t);e&&(this.selectedRow=t,e.classList.add(s.rowSelected))}unselectRow(){if(this.selectedRow<=0)return;const t=this.table.querySelector(`.${s.rowSelected}`);t&&t.classList.remove(s.rowSelected),this.selectedRow=0}selectColumn(t){for(let e=1;e<=this.numberOfRows;e++){const o=this.getCell(e,t);o&&o.classList.add(s.cellSelected)}this.selectedColumn=t}unselectColumn(){if(this.selectedColumn<=0)return;let t=this.table.querySelectorAll(`.${s.cellSelected}`);Array.from(t).forEach(e=>{e.classList.remove(s.cellSelected)}),this.selectedColumn=0}getHoveredCell(t){let e=this.hoveredRow,o=this.hoveredColumn;const{width:i,height:n,x:r,y:h}=k(this.table,t);return r>=0&&(o=this.binSearch(this.numberOfColumns,l=>this.getCell(1,l),({fromLeftBorder:l})=>rr>i-l)),h>=0&&(e=this.binSearch(this.numberOfRows,l=>this.getCell(l,1),({fromTopBorder:l})=>hh>n-l)),{row:e||this.hoveredRow,column:o||this.hoveredColumn}}binSearch(t,e,o,i){let n=0,r=t+1,h=0,l;for(;n!r.textContent.trim())||t.push(i.map(r=>r.innerHTML))}return t}destroy(){document.removeEventListener("click",this.documentClicked)}}class ${static get isReadOnlySupported(){return!0}static get enableLineBreaks(){return!0}constructor({data:t,config:e,api:o,readOnly:i,block:n}){this.api=o,this.readOnly=i,this.config=e,this.data={withHeadings:this.getConfig("withHeadings",!1,t),stretched:this.getConfig("stretched",!1,t),content:t&&t.content?t.content:[]},this.table=null,this.block=n}static get toolbox(){return{icon:A,title:"Table"}}render(){return this.table=new E(this.readOnly,this.api,this.data,this.config),this.container=d("div",this.api.styles.block),this.container.appendChild(this.table.getWrapper()),this.table.setHeadingsSetting(this.data.withHeadings),this.container}renderSettings(){return[{label:this.api.i18n.t("With headings"),icon:T,isActive:this.data.withHeadings,closeOnActivate:!0,toggle:!0,onActivate:()=>{this.data.withHeadings=!0,this.table.setHeadingsSetting(this.data.withHeadings)}},{label:this.api.i18n.t("Without headings"),icon:H,isActive:!this.data.withHeadings,closeOnActivate:!0,toggle:!0,onActivate:()=>{this.data.withHeadings=!1,this.table.setHeadingsSetting(this.data.withHeadings)}},{label:this.data.stretched?this.api.i18n.t("Collapse"):this.api.i18n.t("Stretch"),icon:this.data.stretched?R:O,closeOnActivate:!0,toggle:!0,onActivate:()=>{this.data.stretched=!this.data.stretched,this.block.stretched=this.data.stretched}}]}save(){const t=this.table.getData();return{withHeadings:this.data.withHeadings,stretched:this.data.stretched,content:t}}destroy(){this.table.destroy()}getConfig(t,e=void 0,o=void 0){const i=this.data||o;return i?i[t]?i[t]:e:this.config&&this.config[t]?this.config[t]:e}static get pasteConfig(){return{tags:["TABLE","TR","TH","TD"]}}onPaste(t){const e=t.detail.data,o=e.querySelector(":scope > thead, tr:first-of-type th"),n=Array.from(e.querySelectorAll("tr")).map(r=>Array.from(r.querySelectorAll("th, td")).map(l=>l.innerHTML));this.data={withHeadings:o!==null,content:n},this.table.wrapper&&this.table.wrapper.replaceWith(this.render())}}const I="";return $}); diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/table.umd.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/table.umd.js.download:Zone.Identifier new file mode 100644 index 00000000..b0bfb71a Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/table.umd.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tag.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tag.js.download new file mode 100644 index 00000000..c5021c3d --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tag.js.download @@ -0,0 +1,201 @@ +/** + * SISTagTool — Custom HTML Tag Opening, Closing & Wrapper Block Tool for Editor.js + * Allows content managers to define custom HTML tags (div, section, article, header, footer, etc.) + * with custom Class(es), ID, and Attributes (data-*, style, aria-*, etc.). + */ +class SISTagTool { + static get toolbox() { + return { + title: 'HTML Tag (Open/Close)', + icon: '' + }; + } + + constructor({ data, api, readOnly }) { + this.api = api; + this.readOnly = readOnly; + this.data = { + mode: data && data.mode ? data.mode : 'open', // 'open' or 'close' + tagName: data && data.tagName ? data.tagName : 'div', + elementId: data && data.elementId ? data.elementId : '', + elementClass: data && data.elementClass ? data.elementClass : '', + attributes: data && data.attributes ? data.attributes : '' + }; + this.wrapper = undefined; + } + + render() { + this.wrapper = document.createElement('div'); + this.wrapper.className = 'p-3 bg-light border rounded mb-3 ce-tag-tool-wrapper'; + this.wrapper.style.fontFamily = 'inherit'; + this.wrapper.style.borderLeft = '4px solid #007bff'; + + const headerDiv = document.createElement('div'); + headerDiv.className = 'font-weight-bold text-primary small mb-3 d-flex justify-content-between align-items-center'; + headerDiv.innerHTML = ' HTML Custom Tag Settings<div>'; + this.wrapper.appendChild(headerDiv); + + const formRow = document.createElement('div'); + formRow.className = 'form-row'; + + // 1. Tag Mode (Opening Tag / Closing Tag) + const modeDiv = document.createElement('div'); + modeDiv.className = 'col-md-3 mb-2'; + modeDiv.innerHTML = ''; + const modeSelect = document.createElement('select'); + modeSelect.className = 'form-control form-control-sm'; + + const optOpen = document.createElement('option'); + optOpen.value = 'open'; + optOpen.textContent = 'Opening Tag ()'; + if (this.data.mode === 'open') optOpen.selected = true; + modeSelect.appendChild(optOpen); + + const optClose = document.createElement('option'); + optClose.value = 'close'; + optClose.textContent = 'Closing Tag ()'; + if (this.data.mode === 'close') optClose.selected = true; + modeSelect.appendChild(optClose); + + if (this.readOnly) modeSelect.disabled = true; + this.modeSelect = modeSelect; + modeDiv.appendChild(modeSelect); + formRow.appendChild(modeDiv); + + // 2. Tag Name (div, section, article, header, footer, etc.) + const nameDiv = document.createElement('div'); + nameDiv.className = 'col-md-3 mb-2'; + nameDiv.innerHTML = ''; + const nameInput = document.createElement('input'); + nameInput.type = 'text'; + nameInput.className = 'form-control form-control-sm'; + nameInput.placeholder = 'e.g. div, section, article'; + nameInput.value = this.data.tagName || 'div'; + if (this.readOnly) nameInput.disabled = true; + this.nameInput = nameInput; + nameDiv.appendChild(nameInput); + formRow.appendChild(nameDiv); + + // 3. Element ID + const idDiv = document.createElement('div'); + idDiv.className = 'col-md-3 mb-2'; + idDiv.innerHTML = ''; + const idInput = document.createElement('input'); + idInput.type = 'text'; + idInput.className = 'form-control form-control-sm'; + idInput.placeholder = 'e.g. heroSection'; + idInput.value = this.data.elementId || ''; + if (this.readOnly) idInput.disabled = true; + this.idInput = idInput; + idDiv.appendChild(idInput); + formRow.appendChild(idDiv); + + // 4. Element CSS Class(es) + const classDiv = document.createElement('div'); + classDiv.className = 'col-md-3 mb-2'; + classDiv.innerHTML = ''; + const classInput = document.createElement('input'); + classInput.type = 'text'; + classInput.className = 'form-control form-control-sm'; + classInput.placeholder = 'e.g. container py-5 my-section'; + classInput.value = this.data.elementClass || ''; + if (this.readOnly) classInput.disabled = true; + this.classInput = classInput; + classDiv.appendChild(classInput); + formRow.appendChild(classDiv); + + // 5. Custom Attributes Row + const attrRow = document.createElement('div'); + attrRow.className = 'form-row mt-2 attr-row'; + const attrDiv = document.createElement('div'); + attrDiv.className = 'col-12'; + attrDiv.innerHTML = ''; + const attrInput = document.createElement('input'); + attrInput.type = 'text'; + attrInput.className = 'form-control form-control-sm'; + attrInput.placeholder = 'e.g. data-aos="fade-up" style="background: #f8f9fa;" aria-label="Section"'; + attrInput.value = this.data.attributes || ''; + if (this.readOnly) attrInput.disabled = true; + this.attrInput = attrInput; + attrDiv.appendChild(attrInput); + attrRow.appendChild(attrDiv); + + // Live HTML Code Preview Box + const previewBox = document.createElement('div'); + previewBox.className = 'mt-3 p-2 bg-dark text-success rounded small font-weight-bold text-monospace live-tag-preview'; + previewBox.style.fontSize = '12px'; + + const updatePreview = () => { + const mode = this.modeSelect.value; + const tag = (this.nameInput.value.trim() || 'div').toLowerCase(); + const idVal = this.idInput.value.trim(); + const classVal = this.classInput.value.trim(); + const attrVal = this.attrInput.value.trim(); + + if (mode === 'close') { + previewBox.textContent = ``; + attrRow.style.display = 'none'; + idDiv.style.display = 'none'; + classDiv.style.display = 'none'; + } else { + attrRow.style.display = 'flex'; + idDiv.style.display = 'block'; + classDiv.style.display = 'block'; + let tagStr = `<${tag}`; + if (idVal) tagStr += ` id="${idVal}"`; + if (classVal) tagStr += ` class="${classVal}"`; + if (attrVal) tagStr += ` ${attrVal}`; + tagStr += `>`; + previewBox.textContent = tagStr; + } + + const previewBadge = this.wrapper.querySelector('.tag-preview-badge'); + if (previewBadge) previewBadge.textContent = previewBox.textContent; + }; + + this.modeSelect.addEventListener('change', updatePreview); + this.nameInput.addEventListener('input', updatePreview); + this.idInput.addEventListener('input', updatePreview); + this.classInput.addEventListener('input', updatePreview); + this.attrInput.addEventListener('input', updatePreview); + + this.wrapper.appendChild(formRow); + this.wrapper.appendChild(attrRow); + this.wrapper.appendChild(previewBox); + + updatePreview(); + return this.wrapper; + } + + save() { + const mode = this.modeSelect ? this.modeSelect.value : (this.data.mode || 'open'); + const tagName = this.nameInput ? (this.nameInput.value.trim().toLowerCase() || 'div') : (this.data.tagName || 'div'); + const elementId = this.idInput ? this.idInput.value.trim() : (this.data.elementId || ''); + const elementClass = this.classInput ? this.classInput.value.trim() : (this.data.elementClass || ''); + const attributes = this.attrInput ? this.attrInput.value.trim() : (this.data.attributes || ''); + + let rawHtmlTag = ''; + if (mode === 'close') { + rawHtmlTag = ``; + } else { + rawHtmlTag = `<${tagName}`; + if (elementId) rawHtmlTag += ` id="${elementId}"`; + if (elementClass) rawHtmlTag += ` class="${elementClass}"`; + if (attributes) rawHtmlTag += ` ${attributes}`; + rawHtmlTag += `>`; + } + + return { + mode: mode, + tagName: tagName, + elementId: elementId, + elementClass: elementClass, + attributes: attributes, + rawHtmlTag: rawHtmlTag + }; + } +} + +// Register the plugin globally +window.SISEditorPlugins = window.SISEditorPlugins || {}; +window.SISEditorPlugins['tag'] = { class: SISTagTool }; diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/text-styling.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/text-styling.js.download new file mode 100644 index 00000000..7c6e4575 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/text-styling.js.download @@ -0,0 +1,182 @@ +/** + * TextStylingTune — Block Tune for Editor.js + * Adds alignment, custom CSS class, custom CSS style, and HTML ID settings to blocks. + */ +class TextStylingTune { + constructor({ api, block, data }) { + this.api = api; + this.block = block; + this.data = data || { + alignment: '', + cssClass: '', + customStyle: '', + elementId: '', + customAttrs: '' + }; + } + + static get isTune() { + return true; + } + + render() { + const wrapper = document.createElement('div'); + wrapper.className = 'cdx-settings-text-styling p-2 border-top'; + wrapper.style.fontFamily = 'inherit'; + + const title = document.createElement('div'); + title.className = 'small font-weight-bold text-primary mb-2'; + title.innerHTML = ' Style & Alignment'; + wrapper.appendChild(title); + + // Alignment row + const alignWrapper = document.createElement('div'); + alignWrapper.className = 'd-flex mb-2 align-items-center justify-content-start'; + + const alignments = [ + { name: 'left', icon: '', title: 'Align Left' }, + { name: 'center', icon: '', title: 'Align Center' }, + { name: 'right', icon: '', title: 'Align Right' }, + { name: 'justify', icon: '', title: 'Align Justify' } + ]; + + alignments.forEach(align => { + const btn = document.createElement('button'); + btn.type = 'button'; + btn.className = 'btn btn-xs btn-light mr-1 border'; + btn.style.width = '30px'; + btn.style.height = '30px'; + btn.style.padding = '0'; + btn.title = align.title; + if (this.data.alignment === align.name) { + btn.className = 'btn btn-xs btn-info mr-1 border'; + } + btn.innerHTML = align.icon; + btn.addEventListener('click', () => { + this.data.alignment = this.data.alignment === align.name ? '' : align.name; + alignWrapper.querySelectorAll('button').forEach((b, idx) => { + b.className = (this.data.alignment === alignments[idx].name) ? 'btn btn-xs btn-info mr-1 border' : 'btn btn-xs btn-light mr-1 border'; + }); + this.applyTuneToBlock(); + }); + alignWrapper.appendChild(btn); + }); + wrapper.appendChild(alignWrapper); + + // CSS Class Group + const classGroup = document.createElement('div'); + classGroup.className = 'form-group mb-1'; + const classLabel = document.createElement('label'); + classLabel.className = 'small font-weight-bold text-secondary mb-0 d-block'; + classLabel.innerText = 'CSS Class'; + const classInput = document.createElement('input'); + classInput.type = 'text'; + classInput.className = 'form-control form-control-sm py-0'; + classInput.style.height = '24px'; + classInput.placeholder = 'e.g. lead text-primary font-weight-bold'; + classInput.value = this.data.cssClass || ''; + classInput.addEventListener('input', (e) => { + this.data.cssClass = e.target.value.trim(); + this.applyTuneToBlock(); + }); + classGroup.appendChild(classLabel); + classGroup.appendChild(classInput); + wrapper.appendChild(classGroup); + + // Custom CSS Style Group + const styleGroup = document.createElement('div'); + styleGroup.className = 'form-group mb-1'; + const styleLabel = document.createElement('label'); + styleLabel.className = 'small font-weight-bold text-secondary mb-0 d-block'; + styleLabel.innerText = 'CSS Style'; + const styleInput = document.createElement('input'); + styleInput.type = 'text'; + styleInput.className = 'form-control form-control-sm py-0'; + styleInput.style.height = '24px'; + styleInput.placeholder = 'e.g. color: #dc3545; font-size: 1.5rem;'; + styleInput.value = this.data.customStyle || ''; + styleInput.addEventListener('input', (e) => { + this.data.customStyle = e.target.value.trim(); + this.applyTuneToBlock(); + }); + styleGroup.appendChild(styleLabel); + styleGroup.appendChild(styleInput); + wrapper.appendChild(styleGroup); + + // HTML ID Group + const idGroup = document.createElement('div'); + idGroup.className = 'form-group mb-1'; + const idLabel = document.createElement('label'); + idLabel.className = 'small font-weight-bold text-secondary mb-0 d-block'; + idLabel.innerText = 'Element ID'; + const idInput = document.createElement('input'); + idInput.type = 'text'; + idInput.className = 'form-control form-control-sm py-0'; + idInput.style.height = '24px'; + idInput.placeholder = 'e.g. section-main-title'; + idInput.value = this.data.elementId || ''; + idInput.addEventListener('input', (e) => { + this.data.elementId = e.target.value.trim(); + this.applyTuneToBlock(); + }); + idGroup.appendChild(idLabel); + idGroup.appendChild(idInput); + wrapper.appendChild(idGroup); + + // Custom HTML Attributes Group + const attrsGroup = document.createElement('div'); + attrsGroup.className = 'form-group mb-0'; + const attrsLabel = document.createElement('label'); + attrsLabel.className = 'small font-weight-bold text-secondary mb-0 d-block'; + attrsLabel.innerText = 'Custom Attributes'; + const attrsInput = document.createElement('input'); + attrsInput.type = 'text'; + attrsInput.className = 'form-control form-control-sm py-0'; + attrsInput.style.height = '24px'; + attrsInput.placeholder = 'e.g. data-aos="fade-up" target="_blank"'; + attrsInput.value = this.data.customAttrs || ''; + attrsInput.addEventListener('input', (e) => { + this.data.customAttrs = e.target.value.trim(); + }); + attrsGroup.appendChild(attrsLabel); + attrsGroup.appendChild(attrsInput); + wrapper.appendChild(attrsGroup); + + return wrapper; + } + + applyTuneToBlock() { + if (!this.block || !this.block.holder) return; + const blockContent = this.block.holder.querySelector('.ce-block__content'); + if (blockContent) { + // Live alignment preview + blockContent.style.textAlign = this.data.alignment || ''; + // Live styling preview + const currentElement = blockContent.firstElementChild; + if (currentElement) { + // Apply custom inline styles on top of defaults + currentElement.style.cssText = this.data.customStyle || ''; + } + } + } + + save() { + return this.data; + } + + wrap(blockContent) { + // Applies styling during initial render / loading + if (this.data.alignment) { + blockContent.style.textAlign = this.data.alignment; + } + const currentElement = blockContent.firstElementChild; + if (currentElement && this.data.customStyle) { + currentElement.style.cssText = this.data.customStyle; + } + return blockContent; + } +} + +// Register globally +window.SISEditorPlugins = window.SISEditorPlugins || {}; +window.SISEditorPlugins['textStyling'] = { class: TextStylingTune }; diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/timeline.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/timeline.js.download new file mode 100644 index 00000000..5205044e --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/timeline.js.download @@ -0,0 +1,338 @@ +class SISTimelineTool { + static get toolbox() { + return { + title: 'Timeline Group', + icon: '' + }; + } + + constructor({ data, api, readOnly }) { + this.api = api; + this.readOnly = readOnly; + this.data = { + globalAttributes: (data && data.globalAttributes) || (data && data.attributes) || '', + items: (data && data.items && Array.isArray(data.items)) ? data.items : [] + }; + // Add an initial empty item if list is empty + if (this.data.items.length === 0) { + this.data.items.push({ date: '', description: '', imageUrl: '' }); + } + this.wrapper = undefined; + } + + render() { + this.wrapper = document.createElement('div'); + this.wrapper.className = 'timeline-tool-wrapper'; + this.wrapper.style.border = '1px solid #e3e6f0'; + this.wrapper.style.borderRadius = '8px'; + this.wrapper.style.padding = '14px'; + this.wrapper.style.background = '#f8f9fc'; + this.wrapper.style.marginBottom = '12px'; + + const headerLabel = document.createElement('label'); + headerLabel.className = 'font-weight-bold text-primary small mb-2 d-block'; + headerLabel.innerHTML = ' Timeline Group Settings'; + this.wrapper.appendChild(headerLabel); + + const globalAttrGroup = this._createInput('e.g. data-aos="fade-up" style="..."', this.data.globalAttributes, 'global-attr', ' Global Custom Attributes'); + this.wrapper.appendChild(globalAttrGroup); + + this.itemsContainer = document.createElement('div'); + this.wrapper.appendChild(this.itemsContainer); + + this.data.items.forEach((item, index) => { + this._renderItem(item, index); + }); + + if (!this.readOnly) { + const addButton = document.createElement('button'); + addButton.type = 'button'; + addButton.className = 'btn btn-sm btn-outline-primary mt-2'; + addButton.innerHTML = ' Add Event'; + addButton.addEventListener('click', () => { + const newItem = { date: '', description: '', imageUrl: '' }; + this.data.items.push(newItem); + this._renderItem(newItem, this.data.items.length - 1); + }); + this.wrapper.appendChild(addButton); + } + + return this.wrapper; + } + + _renderItem(item, index) { + const itemBox = document.createElement('div'); + itemBox.className = 'timeline-item-edit-box mb-3 p-3 bg-white border rounded'; + itemBox.style.position = 'relative'; + + if (!this.readOnly) { + const removeBtn = document.createElement('button'); + removeBtn.type = 'button'; + removeBtn.className = 'btn btn-sm btn-danger'; + removeBtn.style.position = 'absolute'; + removeBtn.style.top = '10px'; + removeBtn.style.right = '10px'; + removeBtn.innerHTML = ''; + removeBtn.addEventListener('click', () => { + itemBox.remove(); + }); + itemBox.appendChild(removeBtn); + } + + const dateGroup = this._createInput('Date (e.g. 10/04/1994)', item.date, 'date', ' Date / Milestone'); + const descGroup = this._createTextarea('Description (e.g. Bệnh viện khai trương)', item.description, 'desc', ' Description'); + + // Image input with preview, upload, and media library buttons + const imageGroup = document.createElement('div'); + imageGroup.className = 'form-group mb-2'; + + const imageLabel = document.createElement('label'); + imageLabel.className = 'small font-weight-bold text-secondary mb-1 d-block'; + imageLabel.innerHTML = ' Image URL (Optional)'; + + const inputRow = document.createElement('div'); + inputRow.className = 'input-group input-group-sm mb-2'; + + const imageInput = document.createElement('input'); + imageInput.type = 'text'; + imageInput.className = 'form-control ce-timeline-input-image'; + imageInput.placeholder = 'Paste image URL here...'; + imageInput.value = item.imageUrl || ''; + if (this.readOnly) imageInput.disabled = true; + + const appendDiv = document.createElement('div'); + appendDiv.className = 'input-group-append'; + + const chooseBtn = document.createElement('button'); + chooseBtn.type = 'button'; + chooseBtn.className = 'btn btn-info'; + chooseBtn.innerHTML = ' Choose'; + if (this.readOnly) chooseBtn.disabled = true; + + const uploadBtn = document.createElement('button'); + uploadBtn.type = 'button'; + uploadBtn.className = 'btn btn-primary'; + uploadBtn.innerHTML = ' Upload'; + if (this.readOnly) uploadBtn.disabled = true; + + // Hidden file input for uploading + const fileInput = document.createElement('input'); + fileInput.type = 'file'; + fileInput.accept = 'image/*'; + fileInput.style.display = 'none'; + + chooseBtn.addEventListener('click', () => { + if (window.SISMediaPicker) { + SISMediaPicker.open((url, mediaObj, config) => { + imageInput.value = url; + // Store config in hidden inputs on the item box + let styleInp = itemBox.querySelector('.ce-timeline-input-imgstyle'); + if (!styleInp) { + styleInp = document.createElement('input'); styleInp.type = 'hidden'; + styleInp.className = 'ce-timeline-input-imgstyle'; itemBox.appendChild(styleInp); + } + let classInp = itemBox.querySelector('.ce-timeline-input-imgclass'); + if (!classInp) { + classInp = document.createElement('input'); classInp.type = 'hidden'; + classInp.className = 'ce-timeline-input-imgclass'; itemBox.appendChild(classInp); + } + let altInp = itemBox.querySelector('.ce-timeline-input-imgalt'); + if (!altInp) { + altInp = document.createElement('input'); altInp.type = 'hidden'; + altInp.className = 'ce-timeline-input-imgalt'; itemBox.appendChild(altInp); + } + let attrsInp = itemBox.querySelector('.ce-timeline-input-imgattrs'); + if (!attrsInp) { + attrsInp = document.createElement('input'); attrsInp.type = 'hidden'; + attrsInp.className = 'ce-timeline-input-imgattrs'; itemBox.appendChild(attrsInp); + } + let arInp = itemBox.querySelector('.ce-timeline-input-imgar'); + if (!arInp) { + arInp = document.createElement('input'); arInp.type = 'hidden'; + arInp.className = 'ce-timeline-input-imgar'; itemBox.appendChild(arInp); + } + if (config) { + styleInp.value = config.style || ''; + classInp.value = config.cssClass || ''; + altInp.value = config.alt || ''; + attrsInp.value = config.customAttributes || ''; + arInp.value = config.aspectRatio || ''; + } + updatePreview(); + }); + } else { + alert('SISMediaPicker is not loaded.'); + } + }); + + uploadBtn.addEventListener('click', () => { + fileInput.click(); + }); + + const updatePreview = () => { + const url = imageInput.value.trim(); + if (url) { + imagePreview.style.backgroundImage = 'url("' + url + '")'; + imagePreview.style.display = 'block'; + } else { + imagePreview.style.backgroundImage = 'none'; + imagePreview.style.display = 'none'; + } + }; + + fileInput.addEventListener('change', (e) => { + if (e.target.files && e.target.files[0]) { + const formData = new FormData(); + formData.append('file', e.target.files[0]); + + uploadBtn.innerHTML = ''; + uploadBtn.disabled = true; + + fetch('/api/manage/media/upload', { + method: 'POST', + body: formData + }) + .then(response => response.json()) + .then(data => { + if (data.success === 1 && data.file && data.file.url) { + imageInput.value = data.file.url; + updatePreview(); + } else { + alert('Upload failed: ' + (data.message || 'Unknown error')); + } + }) + .catch(err => { + console.error('Error uploading image', err); + alert('Upload failed: ' + err.message); + }) + .finally(() => { + uploadBtn.innerHTML = ' Upload'; + uploadBtn.disabled = false; + fileInput.value = ''; // Reset + }); + } + }); + + appendDiv.appendChild(chooseBtn); + appendDiv.appendChild(uploadBtn); + inputRow.appendChild(imageInput); + inputRow.appendChild(appendDiv); + inputRow.appendChild(fileInput); + + // Image Preview Container + const imagePreview = document.createElement('div'); + imagePreview.style.width = '100%'; + imagePreview.style.height = '180px'; + imagePreview.style.backgroundColor = '#f8f9fc'; + imagePreview.style.border = '1px dashed #d1d3e2'; + imagePreview.style.borderRadius = '6px'; + imagePreview.style.backgroundSize = 'cover'; + imagePreview.style.backgroundPosition = 'center'; + imagePreview.style.display = 'none'; + + imageInput.addEventListener('input', updatePreview); + updatePreview(); + + imageGroup.appendChild(imageLabel); + imageGroup.appendChild(inputRow); + imageGroup.appendChild(imagePreview); + + const attrGroup = this._createInput('e.g. data-aos="fade-right" style="..."', item.attributes, 'attr', ' Step Custom Attributes'); + + itemBox.appendChild(dateGroup); + itemBox.appendChild(descGroup); + itemBox.appendChild(imageGroup); + itemBox.appendChild(attrGroup); + + this.itemsContainer.appendChild(itemBox); + } + + _createInput(placeholder, value, type, labelHtml) { + const wrapper = document.createElement('div'); + wrapper.className = 'form-group mb-2'; + + if (labelHtml) { + const label = document.createElement('label'); + label.className = 'small font-weight-bold text-secondary mb-1 d-block'; + label.innerHTML = labelHtml; + wrapper.appendChild(label); + } + + const inp = document.createElement('input'); + inp.type = 'text'; + inp.className = 'form-control form-control-sm ce-timeline-input-' + type; + inp.placeholder = placeholder; + inp.value = value || ''; + if (this.readOnly) inp.disabled = true; + + wrapper.appendChild(inp); + return wrapper; + } + + _createTextarea(placeholder, value, type, labelHtml) { + const wrapper = document.createElement('div'); + wrapper.className = 'form-group mb-2'; + + if (labelHtml) { + const label = document.createElement('label'); + label.className = 'small font-weight-bold text-secondary mb-1 d-block'; + label.innerHTML = labelHtml; + wrapper.appendChild(label); + } + + const inp = document.createElement('textarea'); + inp.className = 'form-control form-control-sm ce-timeline-input-' + type; + inp.placeholder = placeholder; + inp.value = value || ''; + inp.style.minHeight = '70px'; + if (this.readOnly) inp.disabled = true; + + wrapper.appendChild(inp); + return wrapper; + } + + save(blockContent) { + const itemBoxes = this.itemsContainer.querySelectorAll('.timeline-item-edit-box'); + const items = []; + itemBoxes.forEach(box => { + const date = box.querySelector('.ce-timeline-input-date').value.trim(); + const desc = box.querySelector('.ce-timeline-input-desc').value.trim(); + const img = box.querySelector('.ce-timeline-input-image').value.trim(); + const attrEl = box.querySelector('.ce-timeline-input-attr'); + const attr = attrEl ? attrEl.value.trim() : ''; + const imgStyle = (box.querySelector('.ce-timeline-input-imgstyle') || {}).value || ''; + const imgClass = (box.querySelector('.ce-timeline-input-imgclass') || {}).value || ''; + const imgAlt = (box.querySelector('.ce-timeline-input-imgalt') || {}).value || ''; + const imgAttrs = (box.querySelector('.ce-timeline-input-imgattrs') || {}).value || ''; + const imgAspectRatio = (box.querySelector('.ce-timeline-input-imgar') || {}).value || ''; + if (date || desc || img || attr) { + items.push({ + date: date, description: desc, imageUrl: img, attributes: attr, + imageStyle: imgStyle, imageClass: imgClass, imageAlt: imgAlt, + imageAttrs: imgAttrs, imageAspectRatio: imgAspectRatio + }); + } + }); + const globalAttrEl = this.wrapper.querySelector('.ce-timeline-input-global-attr'); + return { + globalAttributes: globalAttrEl ? globalAttrEl.value.trim() : (this.data.globalAttributes || ''), + items: items + }; + } +} + +// Register the plugin globally +window.SISEditorPlugins = window.SISEditorPlugins || {}; +window.SISEditorPlugins['timeline'] = { + class: SISTimelineTool +}; + +// openMediaPickerModal — legacy stub, replaced by SISMediaPicker +function openMediaPickerModal(onSelectCallback) { + if (window.SISMediaPicker) { + SISMediaPicker.open(function(url) { onSelectCallback(url); }); + } else { + var url = prompt('Enter image URL:'); + if (url) onSelectCallback(url); + } +} diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tiny-mce.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tiny-mce.js.download new file mode 100644 index 00000000..61dafb92 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tiny-mce.js.download @@ -0,0 +1,130 @@ +(function() { + 'use strict'; + + class SISTinyMceTool { + static get toolbox() { + return { + title: 'TinyMCE Editor', + icon: '' + }; + } + + constructor({ data, api, readOnly }) { + this.api = api; + this.readOnly = readOnly; + this.data = { + html: data.html || '' + }; + this.editorId = 'tinymce-editor-' + Math.random().toString(36).substring(7); + this.editorInstance = null; + } + + render() { + const wrapper = document.createElement('div'); + wrapper.className = 'sis-tinymce-block-wrapper border rounded p-2 bg-white'; + wrapper.style.minHeight = '280px'; + + const textarea = document.createElement('textarea'); + textarea.id = this.editorId; + textarea.value = this.data.html; + textarea.style.width = '100%'; + textarea.style.minHeight = '250px'; + wrapper.appendChild(textarea); + this.textareaElement = textarea; + + this._initTinyMCE(); + + return wrapper; + } + + _initTinyMCE() { + const self = this; + if (typeof tinymce !== 'undefined') { + self._createEditor(); + return; + } + + // Global loading queue to prevent duplicate script tags + window.SISTinyMceLoading = window.SISTinyMceLoading || { + loaded: false, + callbacks: [] + }; + + if (window.SISTinyMceLoading.loaded) { + self._createEditor(); + return; + } + + window.SISTinyMceLoading.callbacks.push(() => { + self._createEditor(); + }); + + if (window.SISTinyMceLoading.callbacks.length === 1) { + const script = document.createElement('script'); + script.src = 'https://cdn.jsdelivr.net/npm/tinymce@6/tinymce.min.js'; + script.referrerPolicy = 'origin'; + script.onload = () => { + window.SISTinyMceLoading.loaded = true; + while (window.SISTinyMceLoading.callbacks.length > 0) { + const cb = window.SISTinyMceLoading.callbacks.shift(); + try { cb(); } catch (e) { console.error(e); } + } + }; + document.head.appendChild(script); + } + } + + _createEditor() { + const self = this; + const textarea = this.textareaElement || document.getElementById(this.editorId); + if (!textarea) return; + + // Wait until the element is actually attached to the document DOM + const checkAndInit = () => { + if (!document.body.contains(textarea)) { + requestAnimationFrame(checkAndInit); + return; + } + + tinymce.init({ + target: textarea, + height: 250, + menubar: false, + readonly: !!self.readOnly, + plugins: 'advlist autolink lists link image charmap preview anchor searchreplace visualblocks code fullscreen insertdatetime media table code help wordcount', + toolbar: 'undo redo | blocks | bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table link image | code removeformat', + setup: function(editor) { + self.editorInstance = editor; + editor.on('change keyup undo redo', function() { + self.data.html = editor.getContent(); + }); + } + }); + }; + + checkAndInit(); + } + + save(blockContent) { + if (this.editorInstance) { + this.data.html = this.editorInstance.getContent(); + } + return { + html: this.data.html + }; + } + + destroy() { + if (this.editorInstance) { + tinymce.remove(this.editorInstance); + this.editorInstance = null; + } + } + } + + // Register globally + window.SISEditorPlugins = window.SISEditorPlugins || {}; + window.SISEditorPlugins['tinymce'] = { + class: SISTinyMceTool + }; +})(); diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tinymce.min.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tinymce.min.js.download new file mode 100644 index 00000000..9c921277 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tinymce.min.js.download @@ -0,0 +1,11 @@ +/** + * TinyMCE version 6.8.6 (TBD) + */ + +/** + * This file bundles the code of + * DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE + * The code included in this file has been modified. + */ + +!function(){"use strict";var e=function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},t=function(e){return{eq:e}},n=t((function(e,t){return e===t})),o=function(e){return t((function(t,n){if(t.length!==n.length)return!1;for(var o=t.length,r=0;r{var o;return!!n(e,t.prototype)||(null===(o=e.constructor)||void 0===o?void 0:o.name)===t.name},l=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&i(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,d=e=>t=>typeof t===e,c=e=>t=>e===t,u=(e,t)=>f(e)&&i(e,t,((e,t)=>a(e)===t)),m=l("string"),f=l("object"),g=e=>u(e,Object),p=l("array"),h=c(null),b=d("boolean"),v=c(void 0),y=e=>null==e,C=e=>!y(e),w=d("function"),x=d("number"),E=(e,t)=>{if(p(e)){for(let n=0,o=e.length;n{},S=(e,t)=>(...n)=>e(t.apply(null,n)),k=(e,t)=>n=>e(t(n)),N=e=>()=>e,R=e=>e,A=(e,t)=>e===t;function T(e,...t){return(...n)=>{const o=t.concat(n);return e.apply(null,o)}}const O=e=>t=>!e(t),B=e=>()=>{throw new Error(e)},P=e=>e(),D=e=>{e()},L=N(!1),M=N(!0);class I{constructor(e,t){this.tag=e,this.value=t}static some(e){return new I(!0,e)}static none(){return I.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?I.some(e(this.value)):I.none()}bind(e){return this.tag?e(this.value):I.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:I.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return C(e)?I.some(e):I.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}I.singletonNone=new I(!1);const F=Array.prototype.slice,U=Array.prototype.indexOf,z=Array.prototype.push,j=(e,t)=>U.call(e,t),H=(e,t)=>j(e,t)>-1,$=(e,t)=>{for(let n=0,o=e.length;n{const n=e.length,o=new Array(n);for(let r=0;r{for(let n=0,o=e.length;n{for(let n=e.length-1;n>=0;n--)t(e[n],n)},K=(e,t)=>{const n=[],o=[];for(let r=0,s=e.length;r{const n=[];for(let o=0,r=e.length;o(W(e,((e,o)=>{n=t(n,e,o)})),n),X=(e,t,n)=>(V(e,((e,o)=>{n=t(n,e,o)})),n),Q=(e,t,n)=>{for(let o=0,r=e.length;oQ(e,t,L),Z=(e,t)=>{for(let n=0,o=e.length;n{const t=[];for(let n=0,o=e.length;nee(q(e,t)),ne=(e,t)=>{for(let n=0,o=e.length;n{const t=F.call(e,0);return t.reverse(),t},re=(e,t)=>Y(e,(e=>!H(t,e))),se=(e,t)=>{const n={};for(let o=0,r=e.length;o{const n=F.call(e,0);return n.sort(t),n},ie=(e,t)=>t>=0&&tie(e,0),de=e=>ie(e,e.length-1),ce=w(Array.from)?Array.from:e=>F.call(e),ue=(e,t)=>{for(let n=0;n{const n=me(e);for(let o=0,r=n.length;ohe(e,((e,n)=>({k:n,v:t(e,n)}))),he=(e,t)=>{const n={};return ge(e,((e,o)=>{const r=t(e,o);n[r.k]=r.v})),n},be=e=>(t,n)=>{e[n]=t},ve=(e,t,n,o)=>{ge(e,((e,r)=>{(t(e,r)?n:o)(e,r)}))},ye=(e,t)=>{const n={};return ve(e,t,be(n),_),n},Ce=(e,t)=>{const n=[];return ge(e,((e,o)=>{n.push(t(e,o))})),n},we=e=>Ce(e,R),xe=(e,t)=>Ee(e,t)?I.from(e[t]):I.none(),Ee=(e,t)=>fe.call(e,t),_e=(e,t)=>Ee(e,t)&&void 0!==e[t]&&null!==e[t],Se=e=>{const t={};return V(e,(e=>{t[e]={}})),me(t)},ke=e=>void 0!==e.length,Ne=Array.isArray,Re=(e,t,n)=>{if(!e)return!1;if(n=n||e,ke(e)){for(let o=0,r=e.length;o{const n=[];return Re(e,((o,r)=>{n.push(t(o,r,e))})),n},Te=(e,t)=>{const n=[];return Re(e,((o,r)=>{t&&!t(o,r,e)||n.push(o)})),n},Oe=(e,t,n,o)=>{let r=v(n)?e[0]:n;for(let n=0;n{for(let o=0,r=e.length;oe[e.length-1],De=e=>{let t,n=!1;return(...o)=>(n||(n=!0,t=e.apply(null,o)),t)},Le=()=>Me(0,0),Me=(e,t)=>({major:e,minor:t}),Ie={nu:Me,detect:(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?Le():((e,t)=>{const n=((e,t)=>{for(let n=0;nNumber(t.replace(n,"$"+e));return Me(o(1),o(2))})(e,n)},unknown:Le},Fe=(e,t)=>{const n=String(t).toLowerCase();return J(e,(e=>e.search(n)))},Ue=(e,t,n)=>""===t||e.length>=t.length&&e.substr(n,n+t.length)===t,ze=(e,t)=>He(e,t)?((e,t)=>e.substring(t))(e,t.length):e,je=(e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!v(o)||r+t.length<=o)},He=(e,t)=>Ue(e,t,0),$e=(e,t)=>Ue(e,t,e.length-t.length),qe=e=>t=>t.replace(e,""),Ve=qe(/^\s+|\s+$/g),We=qe(/^\s+/g),Ke=qe(/\s+$/g),Ye=e=>e.length>0,Ge=e=>!Ye(e),Xe=(e,t=10)=>{const n=parseInt(e,t);return isNaN(n)?I.none():I.some(n)},Qe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Je=e=>t=>je(t,e),Ze=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>je(e,"edge/")&&je(e,"chrome")&&je(e,"safari")&&je(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Qe],search:e=>je(e,"chrome")&&!je(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>je(e,"msie")||je(e,"trident")},{name:"Opera",versionRegexes:[Qe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Je("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Je("firefox")},{name:"Safari",versionRegexes:[Qe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(je(e,"safari")||je(e,"mobile/"))&&je(e,"applewebkit")}],et=[{name:"Windows",search:Je("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>je(e,"iphone")||je(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Je("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Je("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Je("linux"),versionRegexes:[]},{name:"Solaris",search:Je("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Je("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Je("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],tt={browsers:N(Ze),oses:N(et)},nt="Edge",ot="Chromium",rt="Opera",st="Firefox",at="Safari",it=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isEdge:o(nt),isChromium:o(ot),isIE:o("IE"),isOpera:o(rt),isFirefox:o(st),isSafari:o(at)}},lt=()=>it({current:void 0,version:Ie.unknown()}),dt=it,ct=(N(nt),N(ot),N("IE"),N(rt),N(st),N(at),"Windows"),ut="Android",mt="Linux",ft="macOS",gt="Solaris",pt="FreeBSD",ht="ChromeOS",bt=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isWindows:o(ct),isiOS:o("iOS"),isAndroid:o(ut),isMacOS:o(ft),isLinux:o(mt),isSolaris:o(gt),isFreeBSD:o(pt),isChromeOS:o(ht)}},vt=()=>bt({current:void 0,version:Ie.unknown()}),yt=bt,Ct=(N(ct),N("iOS"),N(ut),N(mt),N(ft),N(gt),N(pt),N(ht),e=>window.matchMedia(e).matches);let wt=De((()=>((e,t,n)=>{const o=tt.browsers(),r=tt.oses(),s=t.bind((e=>((e,t)=>ue(t.brands,(t=>{const n=t.brand.toLowerCase();return J(e,(e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:Ie.nu(parseInt(t.version,10),0)})))})))(o,e))).orThunk((()=>((e,t)=>Fe(e,t).map((e=>{const n=Ie.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(o,e))).fold(lt,dt),a=((e,t)=>Fe(e,t).map((e=>{const n=Ie.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(r,e).fold(vt,yt),i=((e,t,n,o)=>{const r=e.isiOS()&&!0===/ipad/i.test(n),s=e.isiOS()&&!r,a=e.isiOS()||e.isAndroid(),i=a||o("(pointer:coarse)"),l=r||!s&&a&&o("(min-device-width:768px)"),d=s||a&&!l,c=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),u=!d&&!l&&!c;return{isiPad:N(r),isiPhone:N(s),isTablet:N(l),isPhone:N(d),isTouch:N(i),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:N(c),isDesktop:N(u)}})(a,s,e,n);return{browser:s,os:a,deviceType:i}})(navigator.userAgent,I.from(navigator.userAgentData),Ct)));const xt=()=>wt(),Et=navigator.userAgent,_t=xt(),St=_t.browser,kt=_t.os,Nt=_t.deviceType,Rt=-1!==Et.indexOf("Windows Phone"),At={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:St.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!St.isIE(),windowsPhone:Rt,browser:{current:St.current,version:St.version,isChromium:St.isChromium,isEdge:St.isEdge,isFirefox:St.isFirefox,isIE:St.isIE,isOpera:St.isOpera,isSafari:St.isSafari},os:{current:kt.current,version:kt.version,isAndroid:kt.isAndroid,isChromeOS:kt.isChromeOS,isFreeBSD:kt.isFreeBSD,isiOS:kt.isiOS,isLinux:kt.isLinux,isMacOS:kt.isMacOS,isSolaris:kt.isSolaris,isWindows:kt.isWindows},deviceType:{isDesktop:Nt.isDesktop,isiPad:Nt.isiPad,isiPhone:Nt.isiPhone,isPhone:Nt.isPhone,isTablet:Nt.isTablet,isTouch:Nt.isTouch,isWebView:Nt.isWebView}},Tt=/^\s*|\s*$/g,Ot=e=>y(e)?"":(""+e).replace(Tt,""),Bt=function(e,t,n,o){o=o||this,e&&(n&&(e=e[n]),Re(e,((e,r)=>!1!==t.call(o,e,r,n)&&(Bt(e,t,n,o),!0))))},Pt={trim:Ot,isArray:Ne,is:(e,t)=>t?!("array"!==t||!Ne(e))||typeof e===t:void 0!==e,toArray:e=>{if(Ne(e))return e;{const t=[];for(let n=0,o=e.length;n{const o=m(e)?e.split(t||","):e||[];let r=o.length;for(;r--;)n[o[r]]={};return n},each:Re,map:Ae,grep:Te,inArray:(e,t)=>{if(e)for(let n=0,o=e.length;n{for(let n=0;n{const n=e.split(".");for(let e=0,o=n.length;ep(e)?e:""===e?[]:Ae(e.split(t||","),Ot),_addCacheSuffix:e=>{const t=At.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},Dt=(e,t,n=A)=>e.exists((e=>n(e,t))),Lt=(e,t,n=A)=>Mt(e,t,n).getOr(e.isNone()&&t.isNone()),Mt=(e,t,n)=>e.isSome()&&t.isSome()?I.some(n(e.getOrDie(),t.getOrDie())):I.none(),It=(e,t)=>e?I.some(t):I.none(),Ft="undefined"!=typeof window?window:Function("return this;")(),Ut=(e,t)=>((e,t)=>{let n=null!=t?t:Ft;for(let t=0;t{const t=Ut("ownerDocument.defaultView",e);return f(e)&&((e=>((e,t)=>{const n=((e,t)=>Ut(e,t))(e,t);if(null==n)throw new Error(e+" not available on this browser");return n})("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(zt(e).constructor.name))},Ht=e=>e.dom.nodeName.toLowerCase(),$t=e=>e.dom.nodeType,qt=e=>t=>$t(t)===e,Vt=e=>Wt(e)&&jt(e.dom),Wt=qt(1),Kt=qt(3),Yt=qt(9),Gt=qt(11),Xt=e=>t=>Wt(t)&&Ht(t)===e,Qt=(e,t,n)=>{if(!(m(n)||b(n)||x(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Jt=(e,t,n)=>{Qt(e.dom,t,n)},Zt=(e,t)=>{const n=e.dom;ge(t,((e,t)=>{Qt(n,t,e)}))},en=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},tn=(e,t)=>I.from(en(e,t)),nn=(e,t)=>{const n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},on=(e,t)=>{e.dom.removeAttribute(t)},rn=e=>X(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),sn=(e,t)=>{const n=en(e,t);return void 0===n||""===n?[]:n.split(" ")},an=e=>void 0!==e.dom.classList,ln=e=>sn(e,"class"),dn=(e,t)=>((e,t,n)=>{const o=sn(e,t).concat([n]);return Jt(e,t,o.join(" ")),!0})(e,"class",t),cn=(e,t)=>((e,t,n)=>{const o=Y(sn(e,t),(e=>e!==n));return o.length>0?Jt(e,t,o.join(" ")):on(e,t),!1})(e,"class",t),un=(e,t)=>{an(e)?e.dom.classList.add(t):dn(e,t)},mn=e=>{0===(an(e)?e.dom.classList:ln(e)).length&&on(e,"class")},fn=(e,t)=>{an(e)?e.dom.classList.remove(t):cn(e,t),mn(e)},gn=(e,t)=>an(e)&&e.dom.classList.contains(t),pn=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},hn=(e,t)=>{const n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return pn(n.childNodes[0])},bn=(e,t)=>{const n=(t||document).createElement(e);return pn(n)},vn=(e,t)=>{const n=(t||document).createTextNode(e);return pn(n)},yn=pn,Cn=(e,t,n)=>I.from(e.dom.elementFromPoint(t,n)).map(pn),wn=(e,t)=>{const n=[],o=e=>(n.push(e),t(e));let r=t(e);do{r=r.bind(o)}while(r.isSome());return n},xn=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},En=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,_n=(e,t)=>e.dom===t.dom,Sn=(e,t)=>{const n=e.dom,o=t.dom;return n!==o&&n.contains(o)},kn=e=>yn(e.dom.ownerDocument),Nn=e=>Yt(e)?e:kn(e),Rn=e=>yn(Nn(e).dom.defaultView),An=e=>I.from(e.dom.parentNode).map(yn),Tn=e=>I.from(e.dom.parentElement).map(yn),On=(e,t)=>{const n=w(t)?t:L;let o=e.dom;const r=[];for(;null!==o.parentNode&&void 0!==o.parentNode;){const e=o.parentNode,t=yn(e);if(r.push(t),!0===n(t))break;o=e}return r},Bn=e=>I.from(e.dom.previousSibling).map(yn),Pn=e=>I.from(e.dom.nextSibling).map(yn),Dn=e=>oe(wn(e,Bn)),Ln=e=>wn(e,Pn),Mn=e=>q(e.dom.childNodes,yn),In=(e,t)=>{const n=e.dom.childNodes;return I.from(n[t]).map(yn)},Fn=e=>In(e,0),Un=e=>In(e,e.dom.childNodes.length-1),zn=e=>e.dom.childNodes.length,jn=e=>Gt(e)&&C(e.dom.host),Hn=w(Element.prototype.attachShadow)&&w(Node.prototype.getRootNode),$n=N(Hn),qn=Hn?e=>yn(e.dom.getRootNode()):Nn,Vn=e=>jn(e)?e:(e=>{const t=e.dom.head;if(null==t)throw new Error("Head is not available yet");return yn(t)})(Nn(e)),Wn=e=>yn(e.dom.host),Kn=e=>{if($n()&&C(e.target)){const t=yn(e.target);if(Wt(t)&&Yn(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return le(t)}}return I.from(e.target)},Yn=e=>C(e.dom.shadowRoot),Gn=e=>{const t=Kt(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return(e=>{const t=qn(e);return jn(t)?I.some(t):I.none()})(yn(t)).fold((()=>n.body.contains(t)),k(Gn,Wn))};var Xn=(e,t,n,o,r)=>e(n,o)?I.some(n):w(r)&&r(n)?I.none():t(n,o,r);const Qn=(e,t,n)=>{let o=e.dom;const r=w(n)?n:L;for(;o.parentNode;){o=o.parentNode;const e=yn(o);if(t(e))return I.some(e);if(r(e))break}return I.none()},Jn=(e,t,n)=>Xn(((e,t)=>t(e)),Qn,e,t,n),Zn=(e,t)=>{const n=e=>{for(let o=0;oQn(e,(e=>xn(e,t)),n),to=(e,t)=>((e,t)=>{const n=void 0===t?document:t.dom;return En(n)?I.none():I.from(n.querySelector(e)).map(yn)})(t,e),no=(e,t,n)=>Xn(((e,t)=>xn(e,t)),eo,e,t,n),oo=(e,t=!1)=>{return Gn(e)?e.dom.isContentEditable:(n=e,no(n,"[contenteditable]")).fold(N(t),(e=>"true"===ro(e)));var n},ro=e=>e.dom.contentEditable,so=e=>void 0!==e.style&&w(e.style.getPropertyValue),ao=(e,t,n)=>{if(!m(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);so(e)&&e.style.setProperty(t,n)},io=(e,t,n)=>{const o=e.dom;ao(o,t,n)},lo=(e,t)=>{const n=e.dom;ge(t,((e,t)=>{ao(n,t,e)}))},co=(e,t)=>{const n=e.dom,o=window.getComputedStyle(n).getPropertyValue(t);return""!==o||Gn(e)?o:uo(n,t)},uo=(e,t)=>so(e)?e.style.getPropertyValue(t):"",mo=(e,t)=>{const n=e.dom,o=uo(n,t);return I.from(o).filter((e=>e.length>0))},fo=e=>{const t={},n=e.dom;if(so(n))for(let e=0;e{((e,t)=>{so(e)&&e.style.removeProperty(t)})(e.dom,t),Dt(tn(e,"style").map(Ve),"")&&on(e,"style")},po=(e,t)=>{An(e).each((n=>{n.dom.insertBefore(t.dom,e.dom)}))},ho=(e,t)=>{Pn(e).fold((()=>{An(e).each((e=>{vo(e,t)}))}),(e=>{po(e,t)}))},bo=(e,t)=>{Fn(e).fold((()=>{vo(e,t)}),(n=>{e.dom.insertBefore(t.dom,n.dom)}))},vo=(e,t)=>{e.dom.appendChild(t.dom)},yo=(e,t)=>{po(e,t),vo(t,e)},Co=(e,t)=>{V(t,(t=>{vo(e,t)}))},wo=e=>{e.dom.textContent="",V(Mn(e),(e=>{xo(e)}))},xo=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Eo=e=>{const t=Mn(e);var n,o;t.length>0&&(n=e,V(o=t,((e,t)=>{const r=0===t?n:o[t-1];ho(r,e)}))),xo(e)},_o=e=>q(e,yn),So=e=>e.dom.innerHTML,ko=(e,t)=>{const n=kn(e).dom,o=yn(n.createDocumentFragment()),r=((e,t)=>{const n=(t||document).createElement("div");return n.innerHTML=e,Mn(yn(n))})(t,n);Co(o,r),wo(e),vo(e,o)},No=(e,t,n,o)=>((e,t,n,o,r)=>{const s=((e,t)=>n=>{e(n)&&t((e=>{const t=yn(Kn(e).getOr(e.target)),n=()=>e.stopPropagation(),o=()=>e.preventDefault(),r=S(o,n);return((e,t,n,o,r,s,a)=>({target:e,x:t,y:n,stop:o,prevent:r,kill:s,raw:a}))(t,e.clientX,e.clientY,n,o,r,e)})(n))})(n,o);return e.dom.addEventListener(t,s,false),{unbind:T(Ro,e,t,s,false)}})(e,t,n,o),Ro=(e,t,n,o)=>{e.dom.removeEventListener(t,n,o)},Ao=(e,t)=>({left:e,top:t,translate:(n,o)=>Ao(e+n,t+o)}),To=Ao,Oo=(e,t)=>void 0!==e?e:void 0!==t?t:0,Bo=e=>{const t=e.dom,n=t.ownerDocument.body;return n===t?To(n.offsetLeft,n.offsetTop):Gn(e)?(e=>{const t=e.getBoundingClientRect();return To(t.left,t.top)})(t):To(0,0)},Po=e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,o=t.body.scrollTop||t.documentElement.scrollTop;return To(n,o)},Do=(e,t,n)=>{const o=(void 0!==n?n.dom:document).defaultView;o&&o.scrollTo(e,t)},Lo=(e,t)=>{xt().browser.isSafari()&&w(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},Mo=(e,t,n,o)=>({x:e,y:t,width:n,height:o,right:e+n,bottom:t+o}),Io=e=>{const t=void 0===e?window:e,n=t.document,o=Po(yn(n));return(e=>{const t=void 0===e?window:e;return xt().browser.isFirefox()?I.none():I.from(t.visualViewport)})(t).fold((()=>{const e=t.document.documentElement,n=e.clientWidth,r=e.clientHeight;return Mo(o.left,o.top,n,r)}),(e=>Mo(Math.max(e.pageLeft,o.left),Math.max(e.pageTop,o.top),e.width,e.height)))},Fo=(e,t)=>{let n=[];return V(Mn(e),(e=>{t(e)&&(n=n.concat([e])),n=n.concat(Fo(e,t))})),n},Uo=(e,t)=>((e,t)=>{const n=void 0===t?document:t.dom;return En(n)?[]:q(n.querySelectorAll(e),yn)})(t,e),zo=(e,t,n)=>eo(e,t,n).isSome();class jo{constructor(e,t){this.node=e,this.rootNode=t,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}current(){return this.node}next(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node}prev(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node}prev2(e){return this.node=this.findPreviousNode(this.node,e),this.node}findSibling(e,t,n,o){if(e){if(!o&&e[t])return e[t];if(e!==this.rootNode){let t=e[n];if(t)return t;for(let o=e.parentNode;o&&o!==this.rootNode;o=o.parentNode)if(t=o[n],t)return t}}}findPreviousNode(e,t){if(e){const n=e.previousSibling;if(this.rootNode&&n===this.rootNode)return;if(n){if(!t)for(let e=n.lastChild;e;e=e.lastChild)if(!e.lastChild)return e;return n}const o=e.parentNode;if(o&&o!==this.rootNode)return o}}}const Ho=e=>t=>!!t&&t.nodeType===e,$o=e=>!!e&&!Object.getPrototypeOf(e),qo=Ho(1),Vo=e=>qo(e)&&Vt(yn(e)),Wo=e=>{const t=e.toLowerCase();return e=>C(e)&&e.nodeName.toLowerCase()===t},Ko=e=>{const t=e.map((e=>e.toLowerCase()));return e=>{if(e&&e.nodeName){const n=e.nodeName.toLowerCase();return H(t,n)}return!1}},Yo=(e,t)=>{const n=t.toLowerCase().split(" ");return t=>{if(qo(t)){const o=t.ownerDocument.defaultView;if(o)for(let r=0;rt=>qo(t)&&t.hasAttribute(e),Xo=e=>qo(e)&&e.hasAttribute("data-mce-bogus"),Qo=e=>qo(e)&&"TABLE"===e.tagName,Jo=e=>t=>{if(Vo(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1},Zo=Ko(["textarea","input"]),er=Ho(3),tr=Ho(4),nr=Ho(7),or=Ho(8),rr=Ho(9),sr=Ho(11),ar=Wo("br"),ir=Wo("img"),lr=Jo("true"),dr=Jo("false"),cr=Ko(["td","th"]),ur=Ko(["td","th","caption"]),mr=Ko(["video","audio","object","embed"]),fr=Wo("li"),gr=Wo("details"),pr=Wo("summary"),hr="\ufeff",br="\xa0",vr=e=>e===hr,yr=((e,t)=>{const n=t=>e(t)?I.from(t.dom.nodeValue):I.none();return{get:t=>{if(!e(t))throw new Error("Can only get text value of a text node");return n(t).getOr("")},getOption:n,set:(t,n)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=n}}})(Kt),Cr=e=>yr.get(e),wr=e=>yr.getOption(e),xr=e=>{let t;return n=>(t=t||se(e,M),Ee(t,Ht(n)))},Er=e=>Wt(e)&&"br"===Ht(e),_r=xr(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),Sr=xr(["ul","ol","dl"]),kr=xr(["li","dd","dt"]),Nr=xr(["thead","tbody","tfoot"]),Rr=xr(["td","th"]),Ar=xr(["pre","script","textarea","style"]),Tr=()=>{const e=bn("br");return Jt(e,"data-mce-bogus","1"),e},Or=e=>{wo(e),vo(e,Tr())},Br=hr,Pr=vr,Dr=e=>e.replace(/\uFEFF/g,""),Lr=qo,Mr=er,Ir=e=>(Mr(e)&&(e=e.parentNode),Lr(e)&&e.hasAttribute("data-mce-caret")),Fr=e=>Mr(e)&&Pr(e.data),Ur=e=>Ir(e)||Fr(e),zr=e=>e.firstChild!==e.lastChild||!ar(e.firstChild),jr=e=>{const t=e.container();return!!er(t)&&(t.data.charAt(e.offset())===Br||e.isAtStart()&&Fr(t.previousSibling))},Hr=e=>{const t=e.container();return!!er(t)&&(t.data.charAt(e.offset()-1)===Br||e.isAtEnd()&&Fr(t.nextSibling))},$r=e=>Mr(e)&&e.data[0]===Br,qr=e=>Mr(e)&&e.data[e.data.length-1]===Br,Vr=e=>e&&e.hasAttribute("data-mce-caret")?((e=>{var t;const n=e.getElementsByTagName("br"),o=n[n.length-1];Xo(o)&&(null===(t=o.parentNode)||void 0===t||t.removeChild(o))})(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("data-mce-style"),e.removeAttribute("_moz_abspos"),e):null,Wr=e=>Ir(e.startContainer),Kr=lr,Yr=dr,Gr=ar,Xr=er,Qr=Ko(["script","style","textarea"]),Jr=Ko(["img","input","textarea","hr","iframe","video","audio","object","embed"]),Zr=Ko(["table"]),es=Ur,ts=e=>!es(e)&&(Xr(e)?!Qr(e.parentNode):Jr(e)||Gr(e)||Zr(e)||ns(e)),ns=e=>!(e=>qo(e)&&"true"===e.getAttribute("unselectable"))(e)&&Yr(e),os=(e,t)=>ts(e)&&((e,t)=>{for(let n=e.parentNode;n&&n!==t;n=n.parentNode){if(ns(n))return!1;if(Kr(n))return!0}return!0})(e,t),rs=/^[ \t\r\n]*$/,ss=e=>rs.test(e),as=e=>{for(const t of e)if(!vr(t))return!1;return!0},is=e=>"\n"===e||"\r"===e,ls=(e,t=4,n=!0,o=!0)=>{const r=((e,t)=>t<=0?"":new Array(t+1).join(" "))(0,t),s=e.replace(/\t/g,r),a=X(s,((e,t)=>(e=>-1!==" \f\t\v".indexOf(e))(t)||t===br?e.pcIsSpace||""===e.str&&n||e.str.length===s.length-1&&o||((e,t)=>t=0&&is(e[t]))(s,e.str.length+1)?{pcIsSpace:!1,str:e.str+br}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:is(t),str:e.str+t}),{pcIsSpace:!1,str:""});return a.str},ds=(e,t)=>ts(e)&&!((e,t)=>er(e)&&ss(e.data)&&!((e,t)=>{const n=yn(t),o=yn(e);return zo(o,"pre,code",T(_n,n))})(e,t))(e,t)||(e=>qo(e)&&"A"===e.nodeName&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id")))(e)||cs(e),cs=Go("data-mce-bookmark"),us=Go("data-mce-bogus"),ms=("data-mce-bogus","all",e=>qo(e)&&"all"===e.getAttribute("data-mce-bogus"));const fs=e=>Tn(yn(e)).exists((e=>!oo(e))),gs=(e,t=!0)=>((e,t)=>{let n=0;if(ds(e,e))return!1;{let o=e.firstChild;if(!o)return!0;const r=new jo(o,e);do{if(t){if(ms(o)){o=r.next(!0);continue}if(us(o)){o=r.next();continue}}if(lr(o)&&fs(o))return!1;if(ar(o))n++,o=r.next();else{if(ds(o,e))return!1;o=r.next()}}while(o);return n<=1}})(e.dom,t),ps=e=>"svg"===e.toLowerCase(),hs=e=>ps(e.nodeName),bs=e=>"svg"===(null==e?void 0:e.nodeName)?"svg":"html",vs=["svg"],ys="data-mce-block",Cs=e=>q((e=>Y(me(e),(e=>!/[A-Z]/.test(e))))(e),(e=>`${e}:`+q(vs,(t=>`not(${t} ${e})`)).join(":"))).join(","),ws=(e,t)=>C(t.querySelector(e))?(t.setAttribute(ys,"true"),"inline-boundary"===t.getAttribute("data-mce-selected")&&t.removeAttribute("data-mce-selected"),!0):(t.removeAttribute(ys),!1),xs=(e,t)=>{const n=Cs(e.getTransparentElements()),o=Cs(e.getBlockElements());return Y(t.querySelectorAll(n),(e=>ws(o,e)))},Es=(e,t)=>{var n;const o=t?"lastChild":"firstChild";for(let t=e[o];t;t=t[o])if(gs(yn(t)))return void(null===(n=t.parentNode)||void 0===n||n.removeChild(t))},_s=(e,t,n)=>{const o=e.getBlockElements(),r=yn(t),s=e=>Ht(e)in o,a=e=>_n(e,r);V(_o(n),(t=>{Qn(t,s,a).each((n=>{const o=((t,o)=>Y(Mn(t),(t=>s(t)&&!e.isValidChild(Ht(n),Ht(t)))))(t);if(o.length>0){const t=Tn(n);V(o,(e=>{Qn(e,s,a).each((t=>{((e,t)=>{const n=document.createRange(),o=e.parentNode;if(o){n.setStartBefore(e),n.setEndBefore(t);const r=n.extractContents();Es(r,!0),n.setStartAfter(t),n.setEndAfter(e);const s=n.extractContents();Es(s,!1),gs(yn(r))||o.insertBefore(r,e),gs(yn(t))||o.insertBefore(t,e),gs(yn(s))||o.insertBefore(s,e),o.removeChild(e)}})(t.dom,e.dom)}))})),t.each((t=>xs(e,t.dom)))}}))}))},Ss=(e,t)=>{const n=xs(e,t);_s(e,t,n),((e,t,n)=>{V([...n,...Ts(e,t)?[t]:[]],(t=>V(Uo(yn(t),t.nodeName.toLowerCase()),(t=>{Os(e,t.dom)&&Eo(t)}))))})(e,t,n)},ks=(e,t)=>{if(As(e,t)){const n=Cs(e.getBlockElements());ws(n,t)}},Ns=e=>e.hasAttribute(ys),Rs=(e,t)=>Ee(e.getTransparentElements(),t),As=(e,t)=>qo(t)&&Rs(e,t.nodeName),Ts=(e,t)=>As(e,t)&&Ns(t),Os=(e,t)=>As(e,t)&&!Ns(t),Bs=(e,t)=>1===t.type&&Rs(e,t.name)&&m(t.attr(ys)),Ps=xt().browser,Ds=e=>J(e,Wt),Ls=(e,t)=>e.children&&H(e.children,t),Ms=(e,t={})=>{let n=0;const o={},r=yn(e),s=Nn(r),a=e=>{vo(Vn(r),e)},i=e=>{const t=Vn(r);to(t,"#"+e).each(xo)},l=e=>xe(o,e).getOrThunk((()=>({id:"mce-u"+n++,passed:[],failed:[],count:0}))),d=e=>new Promise(((n,r)=>{let i;const d=Pt._addCacheSuffix(e),c=l(d);o[d]=c,c.count++;const u=(e,t)=>{V(e,D),c.status=t,c.passed=[],c.failed=[],i&&(i.onload=null,i.onerror=null,i=null)},m=()=>u(c.passed,2),f=()=>u(c.failed,3);if(n&&c.passed.push(n),r&&c.failed.push(r),1===c.status)return;if(2===c.status)return void m();if(3===c.status)return void f();c.status=1;const g=bn("link",s.dom);Zt(g,{rel:"stylesheet",type:"text/css",id:c.id}),t.contentCssCors&&Jt(g,"crossOrigin","anonymous"),t.referrerPolicy&&Jt(g,"referrerpolicy",t.referrerPolicy),i=g.dom,i.onload=m,i.onerror=f,a(g),Jt(g,"href",d)})),c=e=>{const t=Pt._addCacheSuffix(e);xe(o,t).each((e=>{0==--e.count&&(delete o[t],i(e.id))}))};return{load:d,loadRawCss:(e,t)=>{const n=l(e);o[e]=n,n.count++;const r=bn("style",s.dom);Zt(r,{rel:"stylesheet",type:"text/css",id:n.id}),r.dom.innerHTML=t,a(r)},loadAll:e=>Promise.allSettled(q(e,(e=>d(e).then(N(e))))).then((e=>{const t=K(e,(e=>"fulfilled"===e.status));return t.fail.length>0?Promise.reject(q(t.fail,(e=>e.reason))):q(t.pass,(e=>e.value))})),unload:c,unloadRawCss:e=>{xe(o,e).each((t=>{0==--t.count&&(delete o[e],i(t.id))}))},unloadAll:e=>{V(e,(e=>{c(e)}))},_setReferrerPolicy:e=>{t.referrerPolicy=e},_setContentCssCors:e=>{t.contentCssCors=e}}},Is=(()=>{const e=new WeakMap;return{forElement:(t,n)=>{const o=qn(t).dom;return I.from(e.get(o)).getOrThunk((()=>{const t=Ms(o,n);return e.set(o,t),t}))}}})(),Fs=(e,t,n)=>C(e)&&(ds(e,t)||n.isInline(e.nodeName.toLowerCase())),Us=e=>(e=>"span"===e.nodeName.toLowerCase())(e)&&"bookmark"===e.getAttribute("data-mce-type"),zs=(e,t,n,o)=>{var r;const s=o||t;if(qo(t)&&Us(t))return t;const a=t.childNodes;for(let t=a.length-1;t>=0;t--)zs(e,a[t],n,s);if(qo(t)){const e=t.childNodes;1===e.length&&Us(e[0])&&(null===(r=t.parentNode)||void 0===r||r.insertBefore(e[0],t))}return(e=>sr(e)||rr(e))(t)||ds(t,s)||(e=>!!qo(e)&&e.childNodes.length>0)(t)||((e,t,n)=>er(e)&&e.data.length>0&&((e,t,n)=>{const o=new jo(e,t).prev(!1),r=new jo(e,t).next(!1),s=v(o)||Fs(o,t,n),a=v(r)||Fs(r,t,n);return s&&a})(e,t,n))(t,s,n)||e.remove(t),t},js=Pt.makeMap,Hs=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,$s=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qs=/[<>&\"\']/g,Vs=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Ws={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"},Ks={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},Ys={"<":"<",">":">","&":"&",""":'"',"'":"'"},Gs=(e,t)=>{const n={};if(e){const o=e.split(",");t=t||10;for(let e=0;ee.replace(t?Hs:$s,(e=>Ks[e]||e)),Js=(e,t)=>e.replace(t?Hs:$s,(e=>e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":Ks[e]||"&#"+e.charCodeAt(0)+";")),Zs=(e,t,n)=>{const o=n||Xs;return e.replace(t?Hs:$s,(e=>Ks[e]||o[e]||e))},ea={encodeRaw:Qs,encodeAllRaw:e=>(""+e).replace(qs,(e=>Ks[e]||e)),encodeNumeric:Js,encodeNamed:Zs,getEncodeFunc:(e,t)=>{const n=Gs(t)||Xs,o=js(e.replace(/\+/g,","));return o.named&&o.numeric?(e,t)=>e.replace(t?Hs:$s,(e=>void 0!==Ks[e]?Ks[e]:void 0!==n[e]?n[e]:e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";")):o.named?t?(e,t)=>Zs(e,t,n):Zs:o.numeric?Js:Qs},decode:e=>e.replace(Vs,((e,t)=>t?(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))>65535?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):Ws[t]||String.fromCharCode(t):Ys[e]||Xs[e]||(e=>{const t=bn("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e})(e)))},ta=(e,t)=>(e=Pt.trim(e))?e.split(t||" "):[],na=e=>new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$"),oa={},ra=Pt.makeMap,sa=Pt.each,aa=Pt.extend,ia=Pt.explode,la=(e,t={})=>{const n=ra(e," ",ra(e.toUpperCase()," "));return aa(n,t)},da=e=>la("td th li dt dd figcaption caption details summary",e.getTextBlockElements()),ca=(e,t)=>{if(e){const n={};return m(e)&&(e={"*":e}),sa(e,((e,o)=>{n[o]=n[o.toUpperCase()]="map"===t?ra(e,/[, ]/):ia(e,/[, ]/)})),n}},ua=(e={})=>{var t;const n={},o={};let r=[];const s={},a={},i=(t,n,o)=>{const r=e[t];if(r)return ra(r,/[, ]/,ra(r.toUpperCase(),/[, ]/));{let e=oa[t];return e||(e=la(n,o),oa[t]=e),e}},l=null!==(t=e.schema)&&void 0!==t?t:"html5",d=(e=>{const{globalAttributes:t,phrasingContent:n,flowContent:o}=(e=>{let t,n,o;t="id accesskey class dir lang style tabindex title role",n="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",o="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==e&&(t+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",n+=" article aside details dialog figure main header footer hgroup section nav a ins del canvas map",o+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen svg"),"html5-strict"!==e&&(t+=" xml:lang",o=[o,"acronym applet basefont big font strike tt"].join(" "),n=[n,"center dir isindex noframes"].join(" "));const r=[n,o].join(" ");return{globalAttributes:t,blockContent:n,phrasingContent:o,flowContent:r}})(e),r={},s=(e,t,n)=>{r[e]={attributes:se(t,N({})),attributesOrder:t,children:se(n,N({}))}},a=(e,n="",o="")=>{const r=ta(o),a=ta(e);let i=a.length;const l=ta([t,n].join(" "));for(;i--;)s(a[i],l.slice(),r)},i=(e,t)=>{const n=ta(e),o=ta(t);let s=n.length;for(;s--;){const e=r[n[s]];for(let t=0,n=o.length;t{a(e,"",n)})),V(ta("center dir isindex noframes"),(e=>{a(e,"",o)}))),a("html","manifest","head body"),a("head","","base command link meta noscript script style title"),a("title hr noscript br"),a("base","href target"),a("link","href rel media hreflang type sizes hreflang"),a("meta","name http-equiv content charset"),a("style","media type scoped"),a("script","src async defer type charset"),a("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",o),a("dd div","",o),a("address dt caption","","html4"===e?n:o),a("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",n),a("blockquote","cite",o),a("ol","reversed start type","li"),a("ul","","li"),a("li","value",o),a("dl","","dt dd"),a("a","href target rel media hreflang type","html4"===e?n:o),a("q","cite",n),a("ins del","cite datetime",o),a("img","src sizes srcset alt usemap ismap width height"),a("iframe","src name width height",o),a("embed","src type width height"),a("object","data type typemustmatch name usemap form width height",[o,"param"].join(" ")),a("param","name value"),a("map","name",[o,"area"].join(" ")),a("area","alt coords shape href target rel media hreflang type"),a("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),a("colgroup","span","col"),a("col","span"),a("tbody thead tfoot","","tr"),a("tr","","td th"),a("td","colspan rowspan headers",o),a("th","colspan rowspan headers scope abbr",o),a("form","accept-charset action autocomplete enctype method name novalidate target",o),a("fieldset","disabled form name",[o,"legend"].join(" ")),a("label","form for",n),a("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),a("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?o:n),a("select","disabled form multiple name required size","option optgroup"),a("optgroup","disabled label","option"),a("option","disabled label selected value"),a("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),a("menu","type label",[o,"li"].join(" ")),a("noscript","",o),"html4"!==e&&(a("wbr"),a("ruby","",[n,"rt rp"].join(" ")),a("figcaption","",o),a("mark rt rp bdi","",n),a("summary","",[n,"h1 h2 h3 h4 h5 h6"].join(" ")),a("canvas","width height",o),a("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[o,"track source"].join(" ")),a("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[o,"track source"].join(" ")),a("picture","","img source"),a("source","src srcset type media sizes"),a("track","kind src srclang label default"),a("datalist","",[n,"option"].join(" ")),a("article section nav aside main header footer","",o),a("hgroup","","h1 h2 h3 h4 h5 h6"),a("figure","",[o,"figcaption"].join(" ")),a("time","datetime",n),a("dialog","open",o),a("command","type label icon disabled checked radiogroup command"),a("output","for form name",n),a("progress","value max",n),a("meter","value min max low high optimum",n),a("details","open",[o,"summary"].join(" ")),a("keygen","autofocus challenge disabled form keytype name"),s("svg","id tabindex lang xml:space class style x y width height viewBox preserveAspectRatio zoomAndPan transform".split(" "),[])),"html5-strict"!==e&&(i("script","language xml:space"),i("style","xml:space"),i("object","declare classid code codebase codetype archive standby align border hspace vspace"),i("embed","align name hspace vspace"),i("param","valuetype type"),i("a","charset name rev shape coords"),i("br","clear"),i("applet","codebase archive code object alt name width height align hspace vspace"),i("img","name longdesc align border hspace vspace"),i("iframe","longdesc frameborder marginwidth marginheight scrolling align"),i("font basefont","size color face"),i("input","usemap align"),i("select"),i("textarea"),i("h1 h2 h3 h4 h5 h6 div p legend caption","align"),i("ul","type compact"),i("li","type"),i("ol dl menu dir","compact"),i("pre","width xml:space"),i("hr","align noshade size width"),i("isindex","prompt"),i("table","summary width frame rules cellspacing cellpadding align bgcolor"),i("col","width align char charoff valign"),i("colgroup","width align char charoff valign"),i("thead","align char charoff valign"),i("tr","align char charoff valign bgcolor"),i("th","axis align char charoff valign nowrap bgcolor width height"),i("form","accept"),i("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),i("tfoot","align char charoff valign"),i("tbody","align char charoff valign"),i("area","nohref"),i("body","background bgcolor text link vlink alink")),"html4"!==e&&(i("input button select textarea","autofocus"),i("input textarea","placeholder"),i("a","download"),i("link script img","crossorigin"),i("img","loading"),i("iframe","sandbox seamless allow allowfullscreen loading")),"html4"!==e&&V([r.video,r.audio],(e=>{delete e.children.audio,delete e.children.video})),V(ta("a form meter progress dfn"),(e=>{r[e]&&delete r[e].children[e]})),delete r.caption.children.table,delete r.script,r})(l);!1===e.verify_html&&(e.valid_elements="*[*]");const c=ca(e.valid_styles),u=ca(e.invalid_styles,"map"),m=ca(e.valid_classes,"map"),f=i("whitespace_elements","pre script noscript style textarea video audio iframe object code"),g=i("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),p=i("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),h=i("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),b="td th iframe video audio object script code",v=i("non_empty_elements",b+" pre svg",p),y=i("move_caret_before_on_enter_elements",b+" table",p),C="h1 h2 h3 h4 h5 h6",w=i("text_block_elements",C+" p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),x=i("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary html body multicol listing",w),E=i("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),_=i("transparent_elements","a ins del canvas map"),S=i("wrap_block_elements","pre "+C);sa("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),(e=>{a[e]=new RegExp("]*>","gi")}));const k=e=>{const t=I.from(n["@"]),o=/[*?+]/;V(((e,t)=>{const n=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/;return te(ta(t,","),(t=>{const o=n.exec(t);if(o){const t=o[1],n=o[2],r=o[3],s=o[4],a=o[5],i={attributes:{},attributesOrder:[]};if(e.each((e=>((e,t)=>{ge(e.attributes,((e,n)=>{t.attributes[n]=e})),t.attributesOrder.push(...e.attributesOrder)})(e,i))),"#"===t?i.paddEmpty=!0:"-"===t&&(i.removeEmpty=!0),"!"===s&&(i.removeEmptyAttrs=!0),a&&((e,t)=>{const n=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,o=/[*?+]/,{attributes:r,attributesOrder:s}=t;V(ta(e,"|"),(e=>{const a=n.exec(e);if(a){const e={},n=a[1],i=a[2].replace(/[\\:]:/g,":"),l=a[3],d=a[4];if("!"===n&&(t.attributesRequired=t.attributesRequired||[],t.attributesRequired.push(i),e.required=!0),"-"===n)return delete r[i],void s.splice(Pt.inArray(s,i),1);if(l&&("="===l?(t.attributesDefault=t.attributesDefault||[],t.attributesDefault.push({name:i,value:d}),e.defaultValue=d):"~"===l?(t.attributesForced=t.attributesForced||[],t.attributesForced.push({name:i,value:d}),e.forcedValue=d):"<"===l&&(e.validValues=Pt.makeMap(d,"?"))),o.test(i)){const n=e;t.attributePatterns=t.attributePatterns||[],n.pattern=na(i),t.attributePatterns.push(n)}else r[i]||s.push(i),r[i]=e}}))})(a,i),r&&(i.outputName=n),"@"===n){if(!e.isNone())return[];e=I.some(i)}return[r?{name:n,element:i,aliasName:r}:{name:n,element:i}]}return[]}))})(t,null!=e?e:""),(({name:e,element:t,aliasName:s})=>{if(s&&(n[s]=t),o.test(e)){const n=t;n.pattern=na(e),r.push(n)}else n[e]=t}))},R=e=>{r=[],V(me(n),(e=>{delete n[e]})),k(e)},A=e=>{delete oa.text_block_elements,delete oa.block_elements,V((e=>{const t=/^(~)?(.+)$/;return te(ta(e,","),(e=>{const n=t.exec(e);if(n){const e="~"===n[1];return[{inline:e,cloneName:e?"span":"div",name:n[2]}]}return[]}))})(null!=e?e:""),(({inline:e,name:t,cloneName:r})=>{if(o[t]=o[r],s[t]=r,v[t.toUpperCase()]={},v[t]={},e||(x[t.toUpperCase()]={},x[t]={}),!n[t]){let e=n[r];e=aa({},e),delete e.removeEmptyAttrs,delete e.removeEmpty,n[t]=e}ge(o,((e,n)=>{e[r]&&(o[n]=e=aa({},o[n]),e[t]=e[r])}))}))},T=e=>{V((e=>{const t=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;return te(ta(e,","),(e=>{const n=t.exec(e);if(n){const e=n[1],t=e?(e=>"-"===e?"remove":"add")(e):"replace";return[{operation:t,name:n[2],validChildren:ta(n[3],"|")}]}return[]}))})(null!=e?e:""),(({operation:e,name:t,validChildren:n})=>{const r="replace"===e?{"#comment":{}}:o[t];V(n,(t=>{"remove"===e?delete r[t]:r[t]={}})),o[t]=r}))},O=e=>{const t=n[e];if(t)return t;let o=r.length;for(;o--;){const t=r[o];if(t.pattern.test(e))return t}};e.valid_elements?(R(e.valid_elements),sa(d,((e,t)=>{o[t]=e.children}))):(sa(d,((e,t)=>{n[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},o[t]=e.children})),sa(ta("strong/b em/i"),(e=>{const t=ta(e,"/");n[t[1]].outputName=t[0]})),sa(E,((t,o)=>{n[o]&&(e.padd_empty_block_inline_children&&(n[o].paddInEmptyBlock=!0),n[o].removeEmpty=!0)})),sa(ta("ol ul blockquote a table tbody"),(e=>{n[e]&&(n[e].removeEmpty=!0)})),sa(ta("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"),(e=>{n[e]&&(n[e].paddEmpty=!0)})),sa(ta("span"),(e=>{n[e].removeEmptyAttrs=!0}))),delete n.svg,A(e.custom_elements),T(e.valid_children),k(e.extended_valid_elements),T("+ol[ul|ol],+ul[ul|ol]"),sa({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},((e,t)=>{n[t]&&(n[t].parentsRequired=ta(e))})),e.invalid_elements&&sa(ia(e.invalid_elements),(e=>{n[e]&&delete n[e]})),O("span")||k("span[!data-mce-type|*]");const B=N(c),P=N(u),D=N(m),L=N(h),M=N(x),F=N(w),U=N(E),z=N(Object.seal(p)),j=N(g),H=N(v),$=N(y),q=N(f),W=N(_),K=N(S),Y=N(Object.seal(a)),G=(e,t)=>{const n=O(e);if(n){if(!t)return!0;{if(n.attributes[t])return!0;const e=n.attributePatterns;if(e){let n=e.length;for(;n--;)if(e[n].pattern.test(t))return!0}}}return!1},X=e=>Ee(M(),e),Q=e=>!He(e,"#")&&G(e)&&!X(e),J=N(s);return{type:l,children:o,elements:n,getValidStyles:B,getValidClasses:D,getBlockElements:M,getInvalidStyles:P,getVoidElements:z,getTextBlockElements:F,getTextInlineElements:U,getBoolAttrs:L,getElementRule:O,getSelfClosingElements:j,getNonEmptyElements:H,getMoveCaretBeforeOnEnterElements:$,getWhitespaceElements:q,getTransparentElements:W,getSpecialElements:Y,isValidChild:(e,t)=>{const n=o[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:G,isBlock:X,isInline:Q,isWrapper:e=>Ee(K(),e)||Q(e),getCustomElements:J,addValidElements:k,setValidElements:R,addCustomElements:A,addValidChildren:T}},ma=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},fa=e=>(e=>{return{value:(t=e,ze(t,"#").toUpperCase())};var t})(ma(e.red)+ma(e.green)+ma(e.blue)),ga=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,pa=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,ha=(e,t,n,o)=>({red:e,green:t,blue:n,alpha:o}),ba=(e,t,n,o)=>{const r=parseInt(e,10),s=parseInt(t,10),a=parseInt(n,10),i=parseFloat(o);return ha(r,s,a,i)},va=e=>{if("transparent"===e)return I.some(ha(0,0,0,0));const t=ga.exec(e);if(null!==t)return I.some(ba(t[1],t[2],t[3],"1"));const n=pa.exec(e);return null!==n?I.some(ba(n[1],n[2],n[3],n[4])):I.none()},ya=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,Ca=e=>va(e).map(fa).map((e=>"#"+e.value)).getOr(e),wa=(e={},t)=>{const n=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,r=/\s+$/,s={};let a,i;const l=hr;t&&(a=t.getValidStyles(),i=t.getInvalidStyles());const d="\\\" \\' \\; \\: ; : \ufeff".split(" ");for(let e=0;e{const a={};let i=!1;const d=e.url_converter,u=e.url_converter_scope||c,f=(e,t,n)=>{const o=a[e+"-top"+t];if(!o)return;const r=a[e+"-right"+t];if(!r)return;const s=a[e+"-bottom"+t];if(!s)return;const i=a[e+"-left"+t];if(!i)return;const l=[o,r,s,i];let d=l.length-1;for(;d--&&l[d]===l[d+1];);d>-1&&n||(a[e+t]=-1===d?l[0]:l.join(" "),delete a[e+"-top"+t],delete a[e+"-right"+t],delete a[e+"-bottom"+t],delete a[e+"-left"+t])},g=e=>{const t=a[e];if(!t)return;const n=t.indexOf(",")>-1?[t]:t.split(" ");let o=n.length;for(;o--;)if(n[o]!==n[0])return!1;return a[e]=n[0],!0},p=e=>(i=!0,s[e]),h=(e,t)=>(i&&(e=e.replace(/\uFEFF[0-9]/g,(e=>s[e]))),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e),b=e=>String.fromCharCode(parseInt(e.slice(1),16)),v=e=>e.replace(/\\[0-9a-f]+/gi,b),y=(t,n,o,r,s,a)=>{if(s=s||a)return"'"+(s=h(s)).replace(/\'/g,"\\'")+"'";if(n=h(n||o||r||""),!e.allow_script_urls){const t=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(t))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(t))return""}return d&&(n=d.call(u,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(t){let s;for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,p).replace(/\"[^\"]+\"|\'[^\']+\'/g,(e=>e.replace(/[;:]/g,p)));s=o.exec(t);){o.lastIndex=s.index+s[0].length;let t=s[1].replace(r,"").toLowerCase(),d=s[2].replace(r,"");if(t&&d){if(t=v(t),d=v(d),-1!==t.indexOf(l)||-1!==t.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"===t||/expression\s*\(|\/\*|\*\//.test(d)))continue;"font-weight"===t&&"700"===d?d="bold":"color"!==t&&"background-color"!==t||(d=d.toLowerCase()),m(e.force_hex_color)&&"off"!==e.force_hex_color&&va(d).each((t=>{"always"!==e.force_hex_color&&1!==t.alpha||(d=Ca(ya(t)))})),d=d.replace(n,y),a[t]=i?h(d,!0):d}}f("border","",!0),f("border","-width"),f("border","-color"),f("border","-style"),f("padding",""),f("margin",""),"border",w="border-style",x="border-color",g(C="border-width")&&g(w)&&g(x)&&(a.border=a[C]+" "+a[w]+" "+a[x],delete a[C],delete a[w],delete a[x]),"medium none"===a.border&&delete a.border,"none"===a["border-image"]&&delete a["border-image"]}var C,w,x;return a},serialize:(e,t)=>{let n="";const o=(t,o)=>{const r=o[t];if(r)for(let t=0,o=r.length;t0?" ":"")+o+": "+s+";")}};return t&&a?(o("*",a),o(t,a)):ge(e,((e,o)=>{e&&((e,t)=>{if(!i||!t)return!0;let n=i["*"];return!(n&&n[e]||(n=i[t],n&&n[e]))})(o,t)&&(n+=(n.length>0?" ":"")+o+": "+e+";")})),n}};return c},xa={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Ea=(e,t)=>{const n=null!=t?t:{};for(const t in e)Ee(xa,t)||(n[t]=e[t]);return C(e.composedPath)&&(n.composedPath=()=>e.composedPath()),C(e.getModifierState)&&(n.getModifierState=t=>e.getModifierState(t)),C(e.getTargetRanges)&&(n.getTargetRanges=()=>e.getTargetRanges()),n},_a=(e,t,n,o)=>{var r;const s=Ea(t,o);return s.type=e,y(s.target)&&(s.target=null!==(r=s.srcElement)&&void 0!==r?r:n),(e=>y(e.preventDefault)||(e=>e instanceof Event||w(e.initEvent))(e))(t)&&(s.preventDefault=()=>{s.defaultPrevented=!0,s.isDefaultPrevented=M,w(t.preventDefault)&&t.preventDefault()},s.stopPropagation=()=>{s.cancelBubble=!0,s.isPropagationStopped=M,w(t.stopPropagation)&&t.stopPropagation()},s.stopImmediatePropagation=()=>{s.isImmediatePropagationStopped=M,s.stopPropagation()},(e=>e.isDefaultPrevented===M||e.isDefaultPrevented===L)(s)||(s.isDefaultPrevented=!0===s.defaultPrevented?M:L,s.isPropagationStopped=!0===s.cancelBubble?M:L,s.isImmediatePropagationStopped=L)),s},Sa=/^(?:mouse|contextmenu)|click/,ka=(e,t,n,o)=>{e.addEventListener(t,n,o||!1)},Na=(e,t,n,o)=>{e.removeEventListener(t,n,o||!1)},Ra=(e,t)=>{const n=_a(e.type,e,document,t);if((e=>C(e)&&Sa.test(e.type))(e)&&v(e.pageX)&&!v(e.clientX)){const t=n.target.ownerDocument||document,o=t.documentElement,r=t.body,s=n;s.pageX=e.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),s.pageY=e.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)}return n},Aa=(e,t,n)=>{const o=e.document,r={type:"ready"};if(n.domLoaded)return void t(r);const s=()=>{Na(e,"DOMContentLoaded",s),Na(e,"load",s),n.domLoaded||(n.domLoaded=!0,t(r)),e=null};"complete"===o.readyState||"interactive"===o.readyState&&o.body?s():ka(e,"DOMContentLoaded",s),n.domLoaded||ka(e,"load",s)};class Ta{constructor(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(e,t,n,o){const r=this;let s;const a=window,i=e=>{r.executeHandlers(Ra(e||a.event),l)};if(!e||er(e)||or(e))return n;let l;e[r.expando]?l=e[r.expando]:(l=r.count++,e[r.expando]=l,r.events[l]={}),o=o||e;const d=t.split(" ");let c=d.length;for(;c--;){let t=d[c],u=i,m=!1,f=!1;"DOMContentLoaded"===t&&(t="ready"),r.domLoaded&&"ready"===t&&"complete"===e.readyState?n.call(o,Ra({type:t})):(r.hasFocusIn||"focusin"!==t&&"focusout"!==t||(m=!0,f="focusin"===t?"focus":"blur",u=e=>{const t=Ra(e||a.event);t.type="focus"===t.type?"focusin":"focusout",r.executeHandlers(t,l)}),s=r.events[l][t],s?"ready"===t&&r.domLoaded?n(Ra({type:t})):s.push({func:n,scope:o}):(r.events[l][t]=s=[{func:n,scope:o}],s.fakeName=f,s.capture=m,s.nativeHandler=u,"ready"===t?Aa(e,u,r):ka(e,f||t,u,m)))}return e=s=null,n}unbind(e,t,n){if(!e||er(e)||or(e))return this;const o=e[this.expando];if(o){let r=this.events[o];if(t){const o=t.split(" ");let s=o.length;for(;s--;){const t=o[s],a=r[t];if(a){if(n){let e=a.length;for(;e--;)if(a[e].func===n){const n=a.nativeHandler,o=a.fakeName,s=a.capture,i=a.slice(0,e).concat(a.slice(e+1));i.nativeHandler=n,i.fakeName=o,i.capture=s,r[t]=i}}n&&0!==a.length||(delete r[t],Na(e,a.fakeName||t,a.nativeHandler,a.capture))}}}else ge(r,((t,n)=>{Na(e,t.fakeName||n,t.nativeHandler,t.capture)})),r={};for(const e in r)if(Ee(r,e))return this;delete this.events[o];try{delete e[this.expando]}catch(t){e[this.expando]=null}}return this}fire(e,t,n){return this.dispatch(e,t,n)}dispatch(e,t,n){if(!e||er(e)||or(e))return this;const o=Ra({type:t,target:e},n);do{const t=e[this.expando];t&&this.executeHandlers(o,t),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow}while(e&&!o.isPropagationStopped());return this}clean(e){if(!e||er(e)||or(e))return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName){this.unbind(e);const t=e.getElementsByTagName("*");let n=t.length;for(;n--;)(e=t[n])[this.expando]&&this.unbind(e)}return this}destroy(){this.events={}}cancel(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}executeHandlers(e,t){const n=this.events[t],o=n&&n[e.type];if(o)for(let t=0,n=o.length;t{y(n)||""===n?on(e,t):Jt(e,t,n)},Ma=e=>e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),Ia=(e,t)=>{let n=0;if(e)for(let o=e.nodeType,r=e.previousSibling;r;r=r.previousSibling){const e=r.nodeType;(!t||!er(r)||e!==o&&r.data.length)&&(n++,o=e)}return n},Fa=(e,t)=>{const n=en(t,"style"),o=e.serialize(e.parse(n),Ht(t));La(t,Pa,o)},Ua=(e,t,n)=>{const o=Ma(t);y(n)||""===n?go(e,o):io(e,o,((e,t)=>x(e)?Ee(Da,t)?e+"":e+"px":e)(n,o))},za=(e,t={})=>{const n={},o=window,r={};let s=0;const a=Is.forElement(yn(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),i=[],l=t.schema?t.schema:ua({}),d=wa({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope,force_hex_color:t.force_hex_color},t.schema),c=t.ownEvents?new Ta:Ta.Event,u=l.getBlockElements(),f=t=>t&&e&&m(t)?e.getElementById(t):t,g=e=>{const t=f(e);return C(t)?yn(t):null},h=(e,t,n="")=>{let o;const r=g(e);if(C(r)&&Wt(r)){const e=G[t];o=e&&e.get?e.get(r.dom,t):en(r,t)}return C(o)?o:n},b=e=>{const t=f(e);return y(t)?[]:t.attributes},v=(e,n,o)=>{O(e,(e=>{if(qo(e)){const r=yn(e),s=""===o?null:o,a=en(r,n),i=G[n];i&&i.set?i.set(r.dom,s,n):La(r,n,s),a!==s&&t.onSetAttrib&&t.onSetAttrib({attrElm:r.dom,attrName:n,attrValue:s})}}))},x=()=>t.root_element||e.body,E=(t,n)=>((e,t,n)=>{let o=0,r=0;const s=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===co(yn(e),"position")){const n=t.getBoundingClientRect();return o=n.left+(s.documentElement.scrollLeft||e.scrollLeft)-s.documentElement.clientLeft,r=n.top+(s.documentElement.scrollTop||e.scrollTop)-s.documentElement.clientTop,{x:o,y:r}}let a=t;for(;a&&a!==n&&a.nodeType&&!Ls(a,n);){const e=a;o+=e.offsetLeft||0,r+=e.offsetTop||0,a=e.offsetParent}for(a=t.parentNode;a&&a!==n&&a.nodeType&&!Ls(a,n);)o-=a.scrollLeft||0,r-=a.scrollTop||0,a=a.parentNode;r+=(e=>Ps.isFirefox()&&"table"===Ht(e)?Ds(Mn(e)).filter((e=>"caption"===Ht(e))).bind((e=>Ds(Ln(e)).map((t=>{const n=t.dom.offsetTop,o=e.dom.offsetTop,r=e.dom.offsetHeight;return n<=o?-r:0})))).getOr(0):0)(yn(t))}return{x:o,y:r}})(e.body,f(t),n),S=(e,t,n)=>{const o=f(e);var r;if(!y(o)&&(Vo(o)||qo(r=o)&&"http://www.w3.org/2000/svg"===r.namespaceURI))return n?co(yn(o),Ma(t)):("float"===(t=t.replace(/-(\D)/g,((e,t)=>t.toUpperCase())))&&(t="cssFloat"),o.style?o.style[t]:void 0)},k=e=>{const t=f(e);if(!t)return{w:0,h:0};let n=S(t,"width"),o=S(t,"height");return n&&-1!==n.indexOf("px")||(n="0"),o&&-1!==o.indexOf("px")||(o="0"),{w:parseInt(n,10)||t.offsetWidth||t.clientWidth,h:parseInt(o,10)||t.offsetHeight||t.clientHeight}},R=(e,t)=>{if(!e)return!1;const n=p(e)?e:[e];return $(n,(e=>xn(yn(e),t)))},A=(e,t,n,o)=>{const r=[];let s=f(e);o=void 0===o;const a=n||("BODY"!==x().nodeName?x().parentNode:null);if(m(t))if("*"===t)t=qo;else{const e=t;t=t=>R(t,e)}for(;s&&!(s===a||y(s.nodeType)||rr(s)||sr(s));){if(!t||t(s)){if(!o)return[s];r.push(s)}s=s.parentNode}return o?r:null},T=(e,t,n)=>{let o=t;if(e){m(t)&&(o=e=>R(e,t));for(let t=e[n];t;t=t[n])if(w(o)&&o(t))return t}return null},O=function(e,t,n){const o=null!=n?n:this;if(p(e)){const n=[];return Oa(e,((e,r)=>{const s=f(e);s&&n.push(t.call(o,s,r))})),n}{const n=f(e);return!!n&&t.call(o,n)}},B=(e,t)=>{O(e,(e=>{ge(t,((t,n)=>{v(e,n,t)}))}))},P=(e,t)=>{O(e,(e=>{const n=yn(e);ko(n,t)}))},D=(t,n,o,r,s)=>O(t,(t=>{const a=m(n)?e.createElement(n):n;return C(o)&&B(a,o),r&&(!m(r)&&r.nodeType?a.appendChild(r):m(r)&&P(a,r)),s?a:t.appendChild(a)})),L=(t,n,o)=>D(e.createElement(t),t,n,o,!0),M=ea.encodeAllRaw,I=(e,t)=>O(e,(e=>{const n=yn(e);return t&&V(Mn(n),(e=>{Kt(e)&&0===e.dom.length?xo(e):po(n,e)})),xo(n),n.dom})),F=(e,t,n)=>{O(e,(e=>{if(qo(e)){const o=yn(e),r=t.split(" ");V(r,(e=>{C(n)?(n?un:fn)(o,e):((e,t)=>{const n=an(e)?e.dom.classList.toggle(t):((e,t)=>H(ln(e),t)?cn(e,t):dn(e,t))(e,t);mn(e)})(o,e)}))}}))},U=(e,t,n)=>O(t,(o=>{var r;const s=p(t)?e.cloneNode(!0):e;return n&&Oa(Ba(o.childNodes),(e=>{s.appendChild(e)})),null===(r=o.parentNode)||void 0===r||r.replaceChild(s,o),o})),z=e=>{if(qo(e)){const t="a"===e.nodeName.toLowerCase()&&!h(e,"href")&&h(e,"id");if(h(e,"name")||h(e,"data-mce-bookmark")||t)return!0}return!1},j=()=>e.createRange(),q=(n,r,s,a)=>{if(p(n)){let e=n.length;const t=[];for(;e--;)t[e]=q(n[e],r,s,a);return t}return!t.collect||n!==e&&n!==o||i.push([n,r,s,a]),c.bind(n,r,s,a||Y)},W=(t,n,r)=>{if(p(t)){let e=t.length;const o=[];for(;e--;)o[e]=W(t[e],n,r);return o}if(i.length>0&&(t===e||t===o)){let e=i.length;for(;e--;){const[o,s,a]=i[e];t!==o||n&&n!==s||r&&r!==a||c.unbind(o,s,a)}}return c.unbind(t,n,r)},K=e=>{if(e&&Vo(e)){const t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},Y={doc:e,settings:t,win:o,files:r,stdMode:!0,boxModel:!0,styleSheetLoader:a,boundEvents:i,styles:d,schema:l,events:c,isBlock:e=>m(e)?Ee(u,e):qo(e)&&(Ee(u,e.nodeName)||Ts(l,e)),root:null,clone:(e,t)=>e.cloneNode(t),getRoot:x,getViewPort:e=>{const t=Io(e);return{x:t.x,y:t.y,w:t.width,h:t.height}},getRect:e=>{const t=f(e),n=E(t),o=k(t);return{x:n.x,y:n.y,w:o.w,h:o.h}},getSize:k,getParent:(e,t,n)=>{const o=A(e,t,n,!1);return o&&o.length>0?o[0]:null},getParents:A,get:f,getNext:(e,t)=>T(e,t,"nextSibling"),getPrev:(e,t)=>T(e,t,"previousSibling"),select:(n,o)=>{var r,s;const a=null!==(s=null!==(r=f(o))&&void 0!==r?r:t.root_element)&&void 0!==s?s:e;return w(a.querySelectorAll)?ce(a.querySelectorAll(n)):[]},is:R,add:D,create:L,createHTML:(e,t,n="")=>{let o="<"+e;for(const e in t)_e(t,e)&&(o+=" "+e+'="'+M(t[e])+'"');return Ge(n)&&Ee(l.getVoidElements(),e)?o+" />":o+">"+n+""},createFragment:t=>{const n=e.createElement("div"),o=e.createDocumentFragment();let r;for(o.appendChild(n),t&&(n.innerHTML=t);r=n.firstChild;)o.appendChild(r);return o.removeChild(n),o},remove:I,setStyle:(e,n,o)=>{O(e,(e=>{const r=yn(e);Ua(r,n,o),t.update_styles&&Fa(d,r)}))},getStyle:S,setStyles:(e,n)=>{O(e,(e=>{const o=yn(e);ge(n,((e,t)=>{Ua(o,t,e)})),t.update_styles&&Fa(d,o)}))},removeAllAttribs:e=>O(e,(e=>{const t=e.attributes;for(let n=t.length-1;n>=0;n--)e.removeAttributeNode(t.item(n))})),setAttrib:v,setAttribs:B,getAttrib:h,getPos:E,parseStyle:e=>d.parse(e),serializeStyle:(e,t)=>d.serialize(e,t),addStyle:t=>{if(Y!==za.DOM&&e===document){if(n[t])return;n[t]=!0}let o=e.getElementById("mceDefaultStyles");if(!o){o=e.createElement("style"),o.id="mceDefaultStyles",o.type="text/css";const t=e.head;t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o)}o.styleSheet?o.styleSheet.cssText+=t:o.appendChild(e.createTextNode(t))},loadCSS:e=>{e||(e=""),V(e.split(","),(e=>{r[e]=!0,a.load(e).catch(_)}))},addClass:(e,t)=>{F(e,t,!0)},removeClass:(e,t)=>{F(e,t,!1)},hasClass:(e,t)=>{const n=g(e),o=t.split(" ");return C(n)&&ne(o,(e=>gn(n,e)))},toggleClass:F,show:e=>{O(e,(e=>go(yn(e),"display")))},hide:e=>{O(e,(e=>io(yn(e),"display","none")))},isHidden:e=>{const t=g(e);return C(t)&&Dt(mo(t,"display"),"none")},uniqueId:e=>(e||"mce_")+s++,setHTML:P,getOuterHTML:e=>{const t=g(e);return C(t)?qo(t.dom)?t.dom.outerHTML:(e=>{const t=bn("div"),n=yn(e.dom.cloneNode(!0));return vo(t,n),So(t)})(t):""},setOuterHTML:(e,t)=>{O(e,(e=>{qo(e)&&(e.outerHTML=t)}))},decode:ea.decode,encode:M,insertAfter:(e,t)=>{const n=f(t);return O(e,(e=>{const t=null==n?void 0:n.parentNode,o=null==n?void 0:n.nextSibling;return t&&(o?t.insertBefore(e,o):t.appendChild(e)),e}))},replace:U,rename:(e,t)=>{if(e.nodeName!==t.toUpperCase()){const n=L(t);return Oa(b(e),(t=>{v(n,t.nodeName,h(e,t.nodeName))})),U(n,e,!0),n}return e},findCommonAncestor:(e,t)=>{let n=e;for(;n;){let e=t;for(;e&&n!==e;)e=e.parentNode;if(n===e)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},run:O,getAttribs:b,isEmpty:(e,t,n)=>{let o=0;if(z(e))return!1;const r=e.firstChild;if(r){const s=new jo(r,e),a=l?l.getWhitespaceElements():{},i=t||(l?l.getNonEmptyElements():null);let d=r;do{if(qo(d)){const e=d.getAttribute("data-mce-bogus");if(e){d=s.next("all"===e);continue}const t=d.nodeName.toLowerCase();if(i&&i[t]){if("br"===t){o++,d=s.next();continue}return!1}if(z(d))return!1}if(or(d))return!1;if(er(d)&&!ss(d.data)&&(!(null==n?void 0:n.includeZwsp)||!as(d.data)))return!1;if(er(d)&&d.parentNode&&a[d.parentNode.nodeName]&&ss(d.data))return!1;d=s.next()}while(d)}return o<=1},createRng:j,nodeIndex:Ia,split:(e,t,n)=>{let o,r,s=j();if(e&&t&&e.parentNode&&t.parentNode){const a=e.parentNode;return s.setStart(a,Ia(e)),s.setEnd(t.parentNode,Ia(t)),o=s.extractContents(),s=j(),s.setStart(t.parentNode,Ia(t)+1),s.setEnd(a,Ia(e)+1),r=s.extractContents(),a.insertBefore(zs(Y,o,l),e),n?a.insertBefore(n,e):a.insertBefore(t,e),a.insertBefore(zs(Y,r,l),e),I(e),n||t}},bind:q,unbind:W,fire:(e,t,n)=>c.dispatch(e,t,n),dispatch:(e,t,n)=>c.dispatch(e,t,n),getContentEditable:K,getContentEditableParent:e=>{const t=x();let n=null;for(let o=e;o&&o!==t&&(n=K(o),null===n);o=o.parentNode);return n},isEditable:e=>{if(C(e)){const t=qo(e)?e:e.parentElement;return C(t)&&Vo(t)&&oo(yn(t))}return!1},destroy:()=>{if(i.length>0){let e=i.length;for(;e--;){const[t,n,o]=i[e];c.unbind(t,n,o)}}ge(r,((e,t)=>{a.unload(t),delete r[t]}))},isChildOf:(e,t)=>e===t||t.contains(e),dumpRng:e=>"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},G=((e,t,n)=>{const o=t.keep_values,r={set:(e,o,r)=>{const s=yn(e);w(t.url_converter)&&C(o)&&(o=t.url_converter.call(t.url_converter_scope||n(),String(o),r,e)),La(s,"data-mce-"+r,o),La(s,r,o)},get:(e,t)=>{const n=yn(e);return en(n,"data-mce-"+t)||en(n,t)}},s={style:{set:(t,n)=>{const r=yn(t);o&&La(r,Pa,n),on(r,"style"),m(n)&&lo(r,e.parse(n))},get:t=>{const n=yn(t),o=en(n,Pa)||en(n,"style");return e.serialize(e.parse(o),Ht(n))}}};return o&&(s.href=s.src=r),s})(d,t,N(Y));return Y};za.DOM=za(document),za.nodeIndex=Ia;const ja=za.DOM;class Ha{constructor(e={}){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=!1,this.settings=e}_setReferrerPolicy(e){this.settings.referrerPolicy=e}loadScript(e){return new Promise(((t,n)=>{const o=ja;let r;const s=()=>{o.remove(a),r&&(r.onerror=r.onload=r=null)},a=o.uniqueId();r=document.createElement("script"),r.id=a,r.type="text/javascript",r.src=Pt._addCacheSuffix(e),this.settings.referrerPolicy&&o.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=()=>{s(),t()},r.onerror=()=>{s(),n("Failed to load script: "+e)},(document.getElementsByTagName("head")[0]||document.body).appendChild(r)}))}isDone(e){return 2===this.states[e]}markDone(e){this.states[e]=2}add(e){const t=this;return t.queue.push(e),void 0===t.states[e]&&(t.states[e]=0),new Promise(((n,o)=>{t.scriptLoadedCallbacks[e]||(t.scriptLoadedCallbacks[e]=[]),t.scriptLoadedCallbacks[e].push({resolve:n,reject:o})}))}load(e){return this.add(e)}remove(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]}loadQueue(){const e=this.queue;return this.queue=[],this.loadScripts(e)}loadScripts(e){const t=this,n=(e,n)=>{xe(t.scriptLoadedCallbacks,n).each((t=>{V(t,(t=>t[e](n)))})),delete t.scriptLoadedCallbacks[n]},o=e=>{const t=Y(e,(e=>"rejected"===e.status));return t.length>0?Promise.reject(te(t,(({reason:e})=>p(e)?e:[e]))):Promise.resolve()},r=e=>Promise.allSettled(q(e,(e=>2===t.states[e]?(n("resolve",e),Promise.resolve()):3===t.states[e]?(n("reject",e),Promise.reject(e)):(t.states[e]=1,t.loadScript(e).then((()=>{t.states[e]=2,n("resolve",e);const s=t.queue;return s.length>0?(t.queue=[],r(s).then(o)):Promise.resolve()}),(()=>(t.states[e]=3,n("reject",e),Promise.reject(e)))))))),s=e=>(t.loading=!0,r(e).then((e=>{t.loading=!1;const n=t.queueLoadedCallbacks.shift();return I.from(n).each(D),o(e)}))),a=Se(e);return t.loading?new Promise(((e,n)=>{t.queueLoadedCallbacks.push((()=>{s(a).then(e,n)}))})):s(a)}}Ha.ScriptLoader=new Ha;const $a=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},qa={},Va=$a("en"),Wa=()=>xe(qa,Va.get()),Ka={getData:()=>pe(qa,(e=>({...e}))),setCode:e=>{e&&Va.set(e)},getCode:()=>Va.get(),add:(e,t)=>{let n=qa[e];n||(qa[e]=n={});const o=q(me(t),(e=>e.toLowerCase()));ge(t,((e,r)=>{const s=r.toLowerCase();s!==r&&((e,t)=>{const n=e.indexOf(t);return-1!==n&&e.indexOf(t,n+1)>n})(o,s)?(Ee(t,s)||(n[s]=e),n[r]=e):n[s]=e}))},translate:e=>{const t=Wa().getOr({}),n=e=>w(e)?Object.prototype.toString.call(e):o(e)?"":""+e,o=e=>""===e||null==e,r=e=>{const o=n(e);return Ee(t,o)?n(t[o]):xe(t,o.toLowerCase()).map(n).getOr(o)},s=e=>e.replace(/{context:\w+}$/,"");if(o(e))return"";if(f(a=e)&&Ee(a,"raw"))return n(e.raw);var a;if((e=>p(e)&&e.length>1)(e)){const t=e.slice(1);return s(r(e[0]).replace(/\{([0-9]+)\}/g,((e,o)=>Ee(t,o)?n(t[o]):e)))}return s(r(e))},isRtl:()=>Wa().bind((e=>xe(e,"_dir"))).exists((e=>"rtl"===e)),hasCode:e=>Ee(qa,e)},Ya=()=>{const e=[],t={},n={},o=[],r=(e,t)=>{const n=Y(o,(n=>n.name===e&&n.state===t));V(n,(e=>e.resolve()))},s=e=>Ee(t,e),a=(e,n)=>{const o=Ka.getCode();!o||n&&-1===(","+(n||"")+",").indexOf(","+o+",")||Ha.ScriptLoader.add(t[e]+"/langs/"+o+".js")},i=(e,t="added")=>"added"===t&&(e=>Ee(n,e))(e)||"loaded"===t&&s(e)?Promise.resolve():new Promise((n=>{o.push({name:e,state:t,resolve:n})}));return{items:e,urls:t,lookup:n,get:e=>{if(n[e])return n[e].instance},requireLangPack:(e,t)=>{!1!==Ya.languageLoad&&(s(e)?a(e,t):i(e,"loaded").then((()=>a(e,t))))},add:(t,o)=>(e.push(o),n[t]={instance:o},r(t,"added"),o),remove:e=>{delete t[e],delete n[e]},createUrl:(e,t)=>m(t)?m(e)?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}:t,load:(e,o)=>{if(t[e])return Promise.resolve();let s=m(o)?o:o.prefix+o.resource+o.suffix;0!==s.indexOf("/")&&-1===s.indexOf("://")&&(s=Ya.baseURL+"/"+s),t[e]=s.substring(0,s.lastIndexOf("/"));const a=()=>(r(e,"loaded"),Promise.resolve());return n[e]?a():Ha.ScriptLoader.add(s).then(a)},waitFor:i}};Ya.languageLoad=!0,Ya.baseURL="",Ya.PluginManager=Ya(),Ya.ThemeManager=Ya(),Ya.ModelManager=Ya();const Ga=e=>{const t=$a(I.none()),n=()=>t.get().each((e=>clearInterval(e)));return{clear:()=>{n(),t.set(I.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:o=>{n(),t.set(I.some(setInterval(o,e)))}}},Xa=()=>{const e=(e=>{const t=$a(I.none()),n=()=>t.get().each(e);return{clear:()=>{n(),t.set(I.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{n(),t.set(I.some(e))}}})(_);return{...e,on:t=>e.get().each(t)}},Qa=(e,t)=>{let n=null;return{cancel:()=>{h(n)||(clearTimeout(n),n=null)},throttle:(...o)=>{h(n)&&(n=setTimeout((()=>{n=null,e.apply(null,o)}),t))}}},Ja=(e,t)=>{let n=null;const o=()=>{h(n)||(clearTimeout(n),n=null)};return{cancel:o,throttle:(...r)=>{o(),n=setTimeout((()=>{n=null,e.apply(null,r)}),t)}}},Za=N("mce-annotation"),ei=N("data-mce-annotation"),ti=N("data-mce-annotation-uid"),ni=N("data-mce-annotation-active"),oi=N("data-mce-annotation-classes"),ri=N("data-mce-annotation-attrs"),si=e=>t=>_n(t,e),ai=(e,t)=>{const n=e.selection.getRng(),o=yn(n.startContainer),r=yn(e.getBody()),s=t.fold((()=>"."+Za()),(e=>`[${ei()}="${e}"]`)),a=In(o,n.startOffset).getOr(o);return no(a,s,si(r)).bind((t=>tn(t,`${ti()}`).bind((n=>tn(t,`${ei()}`).map((t=>{const o=li(e,n);return{uid:n,name:t,elements:o}}))))))},ii=(e,t)=>nn(e,"data-mce-bogus")||zo(e,'[data-mce-bogus="all"]',si(t)),li=(e,t)=>{const n=yn(e.getBody()),o=Uo(n,`[${ti()}="${t}"]`);return Y(o,(e=>!ii(e,n)))},di=(e,t)=>{const n=yn(e.getBody()),o=Uo(n,`[${ei()}="${t}"]`),r={};return V(o,(e=>{if(!ii(e,n)){const t=en(e,ti()),n=xe(r,t).getOr([]);r[t]=n.concat([e])}})),r};let ci=0;const ui=e=>{const t=(new Date).getTime(),n=Math.floor(1e9*Math.random());return ci++,e+"_"+n+ci+String(t)},mi=(e,t)=>yn(e.dom.cloneNode(t)),fi=e=>mi(e,!1),gi=e=>mi(e,!0),pi=(e,t,n=L)=>{const o=new jo(e,t),r=e=>{let t;do{t=o[e]()}while(t&&!er(t)&&!n(t));return I.from(t).filter(er)};return{current:()=>I.from(o.current()).filter(er),next:()=>r("next"),prev:()=>r("prev"),prev2:()=>r("prev2")}},hi=(e,t)=>{const n=t||(t=>e.isBlock(t)||ar(t)||dr(t)),o=(e,t,n,r)=>{if(er(e)){const n=r(e,t,e.data);if(-1!==n)return I.some({container:e,offset:n})}return n().bind((e=>o(e.container,e.offset,n,r)))};return{backwards:(t,r,s,a)=>{const i=pi(t,null!=a?a:e.getRoot(),n);return o(t,r,(()=>i.prev().map((e=>({container:e,offset:e.length})))),s).getOrNull()},forwards:(t,r,s,a)=>{const i=pi(t,null!=a?a:e.getRoot(),n);return o(t,r,(()=>i.next().map((e=>({container:e,offset:0})))),s).getOrNull()}}},bi=Math.round,vi=e=>e?{left:bi(e.left),top:bi(e.top),bottom:bi(e.bottom),right:bi(e.right),width:bi(e.width),height:bi(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},yi=(e,t)=>(e=vi(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e),Ci=(e,t,n)=>e>=0&&e<=Math.min(t.height,n.height)/2,wi=(e,t)=>{const n=Math.min(t.height/2,e.height/2);return e.bottom-nt.bottom)&&Ci(t.top-e.bottom,e,t)},xi=(e,t)=>e.top>t.bottom||!(e.bottom{const o=Math.max(Math.min(t,e.left+e.width),e.left),r=Math.max(Math.min(n,e.top+e.height),e.top);return Math.sqrt((t-o)*(t-o)+(n-r)*(n-r))},_i=e=>{const t=e.startContainer,n=e.startOffset;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},Si=(e,t)=>{if(qo(e)&&e.hasChildNodes()){const n=e.childNodes,o=((e,t,n)=>Math.min(Math.max(e,0),n))(t,0,n.length-1);return n[o]}return e},ki=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]"),Ni=e=>m(e)&&e.charCodeAt(0)>=768&&ki.test(e),Ri=qo,Ai=ts,Ti=Yo("display","block table"),Oi=Yo("float","left right"),Bi=((...e)=>t=>{for(let n=0;nt<0&&qo(e)&&e.hasChildNodes()?void 0:Si(e,t),Fi=e=>e?e.createRange():za.DOM.createRng(),Ui=e=>m(e)&&/[\r\n\t ]/.test(e),zi=e=>!!e.setStart&&!!e.setEnd,ji=e=>{const t=e.startContainer,n=e.startOffset;if(Ui(e.toString())&&Pi(t.parentNode)&&er(t)){const e=t.data;if(Ui(e[n-1])||Ui(e[n+1]))return!0}return!1},Hi=e=>0===e.left&&0===e.right&&0===e.top&&0===e.bottom,$i=e=>{var t;let n;const o=e.getClientRects();return n=o.length>0?vi(o[0]):vi(e.getBoundingClientRect()),!zi(e)&&Li(e)&&Hi(n)?(e=>{const t=e.ownerDocument,n=Fi(t),o=t.createTextNode(br),r=e.parentNode;r.insertBefore(o,e),n.setStart(o,0),n.setEnd(o,1);const s=vi(n.getBoundingClientRect());return r.removeChild(o),s})(e):Hi(n)&&zi(e)&&null!==(t=(e=>{const t=e.startContainer,n=e.endContainer,o=e.startOffset,r=e.endOffset;if(t===n&&er(n)&&0===o&&1===r){const t=e.cloneRange();return t.setEndAfter(n),$i(t)}return null})(e))&&void 0!==t?t:n},qi=(e,t)=>{const n=yi(e,t);return n.width=1,n.right=n.left+1,n},Vi=(e,t,n)=>{const o=()=>(n||(n=(e=>{const t=[],n=e=>{var n,o;0!==e.height&&(t.length>0&&(n=e,o=t[t.length-1],n.left===o.left&&n.top===o.top&&n.bottom===o.bottom&&n.right===o.right)||t.push(e))},o=(e,t)=>{const o=Fi(e.ownerDocument);if(t0&&(o.setStart(e,t-1),o.setEnd(e,t),ji(o)||n(qi($i(o),!1))),t{const n=Fi(e.ownerDocument);return n.setStart(e,t),n.setEnd(e,t),n},getClientRects:o,isVisible:()=>o().length>0,isAtStart:()=>(Di(e),0===t),isAtEnd:()=>Di(e)?t>=e.data.length:t>=e.childNodes.length,isEqual:n=>n&&e===n.container()&&t===n.offset(),getNode:n=>Ii(e,n?t-1:t)}};Vi.fromRangeStart=e=>Vi(e.startContainer,e.startOffset),Vi.fromRangeEnd=e=>Vi(e.endContainer,e.endOffset),Vi.after=e=>Vi(e.parentNode,Mi(e)+1),Vi.before=e=>Vi(e.parentNode,Mi(e)),Vi.isAbove=(e,t)=>Mt(le(t.getClientRects()),de(e.getClientRects()),wi).getOr(!1),Vi.isBelow=(e,t)=>Mt(de(t.getClientRects()),le(e.getClientRects()),xi).getOr(!1),Vi.isAtStart=e=>!!e&&e.isAtStart(),Vi.isAtEnd=e=>!!e&&e.isAtEnd(),Vi.isTextPosition=e=>!!e&&er(e.container()),Vi.isElementPosition=e=>!Vi.isTextPosition(e);const Wi=(e,t)=>{er(t)&&0===t.data.length&&e.remove(t)},Ki=(e,t,n)=>{sr(n)?((e,t,n)=>{const o=I.from(n.firstChild),r=I.from(n.lastChild);t.insertNode(n),o.each((t=>Wi(e,t.previousSibling))),r.each((t=>Wi(e,t.nextSibling)))})(e,t,n):((e,t,n)=>{t.insertNode(n),Wi(e,n.previousSibling),Wi(e,n.nextSibling)})(e,t,n)},Yi=er,Gi=Xo,Xi=za.nodeIndex,Qi=e=>{const t=e.parentNode;return Gi(t)?Qi(t):t},Ji=e=>e?Oe(e.childNodes,((e,t)=>(Gi(t)&&"BR"!==t.nodeName?e=e.concat(Ji(t)):e.push(t),e)),[]):[],Zi=e=>t=>e===t,el=e=>(Yi(e)?"text()":e.nodeName.toLowerCase())+"["+(e=>{let t,n;t=Ji(Qi(e)),n=Be(t,Zi(e),e),t=t.slice(0,n+1);const o=Oe(t,((e,n,o)=>(Yi(n)&&Yi(t[o-1])&&e++,e)),0);return t=Te(t,Ko([e.nodeName])),n=Be(t,Zi(e),e),n-o})(e)+"]",tl=(e,t)=>{let n,o=[],r=t.container(),s=t.offset();if(Yi(r))n=((e,t)=>{let n=e;for(;(n=n.previousSibling)&&Yi(n);)t+=n.data.length;return t})(r,s);else{const e=r.childNodes;s>=e.length?(n="after",s=e.length-1):n="before",r=e[s]}o.push(el(r));let a=((e,t,n)=>{const o=[];for(let n=t.parentNode;n&&n!==e;n=n.parentNode)o.push(n);return o})(e,r);return a=Te(a,O(Xo)),o=o.concat(Ae(a,(e=>el(e)))),o.reverse().join("/")+","+n},nl=(e,t)=>{if(!t)return null;const n=t.split(","),o=n[0].split("/"),r=n.length>1?n[1]:"before",s=Oe(o,((e,t)=>{const n=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t);return n?("text()"===n[1]&&(n[1]="#text"),((e,t,n)=>{let o=Ji(e);return o=Te(o,((e,t)=>!Yi(e)||!Yi(o[t-1]))),o=Te(o,Ko([t])),o[n]})(e,n[1],parseInt(n[2],10))):null}),e);if(!s)return null;if(!Yi(s)&&s.parentNode){let e;return e="after"===r?Xi(s)+1:Xi(s),Vi(s.parentNode,e)}return((e,t)=>{let n=e,o=0;for(;Yi(n);){const r=n.data.length;if(t>=o&&t<=o+r){e=n,t-=o;break}if(!Yi(n.nextSibling)){e=n,t=r;break}o+=r,n=n.nextSibling}return Yi(e)&&t>e.data.length&&(t=e.data.length),Vi(e,t)})(s,parseInt(r,10))},ol=dr,rl=(e,t,n,o,r)=>{const s=r?o.startContainer:o.endContainer;let a=r?o.startOffset:o.endOffset;const i=[],l=e.getRoot();if(er(s))i.push(n?((e,t,n)=>{let o=e(t.data.slice(0,n)).length;for(let n=t.previousSibling;n&&er(n);n=n.previousSibling)o+=e(n.data).length;return o})(t,s,a):a);else{let t=0;const o=s.childNodes;a>=o.length&&o.length&&(t=1,a=Math.max(0,o.length-1)),i.push(e.nodeIndex(o[a],n)+t)}for(let t=s;t&&t!==l;t=t.parentNode)i.push(e.nodeIndex(t,n));return i},sl=(e,t,n)=>{let o=0;return Pt.each(e.select(t),(e=>"all"===e.getAttribute("data-mce-bogus")?void 0:e!==n&&void o++)),o},al=(e,t)=>{let n=t?e.startContainer:e.endContainer,o=t?e.startOffset:e.endOffset;if(qo(n)&&"TR"===n.nodeName){const r=n.childNodes;n=r[Math.min(t?o:o-1,r.length-1)],n&&(o=t?0:n.childNodes.length,t?e.setStart(n,o):e.setEnd(n,o))}},il=e=>(al(e,!0),al(e,!1),e),ll=(e,t)=>{if(qo(e)&&(e=Si(e,t),ol(e)))return e;if(Ur(e)){er(e)&&Ir(e)&&(e=e.parentNode);let t=e.previousSibling;if(ol(t))return t;if(t=e.nextSibling,ol(t))return t}},dl=(e,t,n)=>{const o=n.getNode(),r=n.getRng();if("IMG"===o.nodeName||ol(o)){const e=o.nodeName;return{name:e,index:sl(n.dom,e,o)}}const s=(e=>ll(e.startContainer,e.startOffset)||ll(e.endContainer,e.endOffset))(r);if(s){const e=s.tagName;return{name:e,index:sl(n.dom,e,s)}}return((e,t,n,o)=>{const r=t.dom,s=rl(r,e,n,o,!0),a=t.isForward(),i=Wr(o)?{isFakeCaret:!0}:{};return t.isCollapsed()?{start:s,forward:a,...i}:{start:s,end:rl(r,e,n,o,!1),forward:a,...i}})(e,n,t,r)},cl=(e,t,n)=>{const o={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",o,""):e.create("span",o)},ul=(e,t)=>{const n=e.dom;let o=e.getRng();const r=n.uniqueId(),s=e.isCollapsed(),a=e.getNode(),i=a.nodeName,l=e.isForward();if("IMG"===i)return{name:i,index:sl(n,i,a)};const d=il(o.cloneRange());if(!s){d.collapse(!1);const e=cl(n,r+"_end",t);Ki(n,d,e)}o=il(o),o.collapse(!0);const c=cl(n,r+"_start",t);return Ki(n,o,c),e.moveToBookmark({id:r,keep:!0,forward:l}),{id:r,forward:l}},ml=T(dl,R,!0),fl=e=>{const t=t=>t(e),n=N(e),o=()=>r,r={tag:!0,inner:e,fold:(t,n)=>n(e),isValue:M,isError:L,map:t=>pl.value(t(e)),mapError:o,bind:t,exists:t,forall:t,getOr:n,or:o,getOrThunk:n,orThunk:o,getOrDie:n,each:t=>{t(e)},toOptional:()=>I.some(e)};return r},gl=e=>{const t=()=>n,n={tag:!1,inner:e,fold:(t,n)=>t(e),isValue:L,isError:M,map:t,mapError:t=>pl.error(t(e)),bind:t,exists:L,forall:M,getOr:R,or:R,getOrThunk:P,orThunk:P,getOrDie:B(String(e)),each:_,toOptional:I.none};return n},pl={value:fl,error:gl,fromOption:(e,t)=>e.fold((()=>gl(t)),fl)},hl=e=>{if(!p(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],n={};return V(e,((o,r)=>{const s=me(o);if(1!==s.length)throw new Error("one and only one name per case");const a=s[0],i=o[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!p(i))throw new Error("case arguments must be an array");t.push(a),n[a]=(...n)=>{const o=n.length;if(o!==i.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+i.length+" ("+i+"), got "+o);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,n)},match:e=>{const o=me(e);if(t.length!==o.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+o.join(","));if(!ne(t,(e=>H(o,e))))throw new Error("Not all branches were specified when using match. Specified: "+o.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,n)},log:e=>{console.log(e,{constructors:t,constructor:a,params:n})}}}})),n};hl([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const bl=e=>"inline-command"===e.type||"inline-format"===e.type,vl=e=>"block-command"===e.type||"block-format"===e.type,yl=e=>{const t=t=>pl.error({message:t,pattern:e}),n=(n,o,r)=>{if(void 0!==e.format){let r;if(p(e.format)){if(!ne(e.format,m))return t(n+" pattern has non-string items in the `format` array");r=e.format}else{if(!m(e.format))return t(n+" pattern has non-string `format` parameter");r=[e.format]}return pl.value(o(r))}return void 0!==e.cmd?m(e.cmd)?pl.value(r(e.cmd,e.value)):t(n+" pattern has non-string `cmd` parameter"):t(n+" pattern is missing both `format` and `cmd` parameters")};if(!f(e))return t("Raw pattern is not an object");if(!m(e.start))return t("Raw pattern is missing `start` parameter");if(void 0!==e.end){if(!m(e.end))return t("Inline pattern has non-string `end` parameter");if(0===e.start.length&&0===e.end.length)return t("Inline pattern has empty `start` and `end` parameters");let o=e.start,r=e.end;return 0===r.length&&(r=o,o=""),n("Inline",(e=>({type:"inline-format",start:o,end:r,format:e})),((e,t)=>({type:"inline-command",start:o,end:r,cmd:e,value:t})))}return void 0!==e.replacement?m(e.replacement)?0===e.start.length?t("Replacement pattern has empty `start` parameter"):pl.value({type:"inline-command",start:"",end:e.start,cmd:"mceInsertContent",value:e.replacement}):t("Replacement pattern has non-string `replacement` parameter"):0===e.start.length?t("Block pattern has empty `start` parameter"):n("Block",(t=>({type:"block-format",start:e.start,format:t[0]})),((t,n)=>({type:"block-command",start:e.start,cmd:t,value:n})))},Cl=e=>Y(e,vl),wl=e=>Y(e,bl),xl=e=>{const t=(e=>{const t=[],n=[];return V(e,(e=>{e.fold((e=>{t.push(e)}),(e=>{n.push(e)}))})),{errors:t,values:n}})(q(e,yl));return V(t.errors,(e=>console.error(e.message,e.pattern))),t.values},El=xt().deviceType,_l=El.isTouch(),Sl=za.DOM,kl=e=>u(e,RegExp),Nl=e=>t=>t.options.get(e),Rl=e=>m(e)||f(e),Al=(e,t="")=>n=>{const o=m(n);if(o){if(-1!==n.indexOf("=")){const r=(e=>{const t=e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(",");return X(t,((e,t)=>{const n=t.split("="),o=n[0],r=n.length>1?n[1]:o;return e[Ve(o)]=Ve(r),e}),{})})(n);return{value:xe(r,e.id).getOr(t),valid:o}}return{value:n,valid:o}}return{valid:!1,message:"Must be a string."}},Tl=Nl("iframe_attrs"),Ol=Nl("doctype"),Bl=Nl("document_base_url"),Pl=Nl("body_id"),Dl=Nl("body_class"),Ll=Nl("content_security_policy"),Ml=Nl("br_in_pre"),Il=Nl("forced_root_block"),Fl=Nl("forced_root_block_attrs"),Ul=Nl("newline_behavior"),zl=Nl("br_newline_selector"),jl=Nl("no_newline_selector"),Hl=Nl("keep_styles"),$l=Nl("end_container_on_empty_block"),ql=Nl("automatic_uploads"),Vl=Nl("images_reuse_filename"),Wl=Nl("images_replace_blob_uris"),Kl=Nl("icons"),Yl=Nl("icons_url"),Gl=Nl("images_upload_url"),Xl=Nl("images_upload_base_path"),Ql=Nl("images_upload_credentials"),Jl=Nl("images_upload_handler"),Zl=Nl("content_css_cors"),ed=Nl("referrer_policy"),td=Nl("language"),nd=Nl("language_url"),od=Nl("indent_use_margin"),rd=Nl("indentation"),sd=Nl("content_css"),ad=Nl("content_style"),id=Nl("font_css"),ld=Nl("directionality"),dd=Nl("inline_boundaries_selector"),cd=Nl("object_resizing"),ud=Nl("resize_img_proportional"),md=Nl("placeholder"),fd=Nl("event_root"),gd=Nl("service_message"),pd=Nl("theme"),hd=Nl("theme_url"),bd=Nl("model"),vd=Nl("model_url"),yd=Nl("inline_boundaries"),Cd=Nl("formats"),wd=Nl("preview_styles"),xd=Nl("format_empty_lines"),Ed=Nl("format_noneditable_selector"),_d=Nl("custom_ui_selector"),Sd=Nl("inline"),kd=Nl("hidden_input"),Nd=Nl("submit_patch"),Rd=Nl("add_form_submit_trigger"),Ad=Nl("add_unload_trigger"),Td=Nl("custom_undo_redo_levels"),Od=Nl("disable_nodechange"),Bd=Nl("readonly"),Pd=Nl("editable_root"),Dd=Nl("content_css_cors"),Ld=Nl("plugins"),Md=Nl("external_plugins"),Id=Nl("block_unsupported_drop"),Fd=Nl("visual"),Ud=Nl("visual_table_class"),zd=Nl("visual_anchor_class"),jd=Nl("iframe_aria_text"),Hd=Nl("setup"),$d=Nl("init_instance_callback"),qd=Nl("urlconverter_callback"),Vd=Nl("auto_focus"),Wd=Nl("browser_spellcheck"),Kd=Nl("protect"),Yd=Nl("paste_block_drop"),Gd=Nl("paste_data_images"),Xd=Nl("paste_preprocess"),Qd=Nl("paste_postprocess"),Jd=Nl("newdocument_content"),Zd=Nl("paste_webkit_styles"),ec=Nl("paste_remove_styles_if_webkit"),tc=Nl("paste_merge_formats"),nc=Nl("smart_paste"),oc=Nl("paste_as_text"),rc=Nl("paste_tab_spaces"),sc=Nl("allow_html_data_urls"),ac=Nl("text_patterns"),ic=Nl("text_patterns_lookup"),lc=Nl("noneditable_class"),dc=Nl("editable_class"),cc=Nl("noneditable_regexp"),uc=Nl("preserve_cdata"),mc=Nl("highlight_on_focus"),fc=Nl("xss_sanitization"),gc=Nl("init_content_sync"),pc=e=>Pt.explode(e.options.get("images_file_types")),hc=Nl("table_tab_navigation"),bc=Nl("details_initial_state"),vc=Nl("details_serialized_state"),yc=Nl("force_hex_color"),Cc=Nl("sandbox_iframes"),wc=qo,xc=er,Ec=e=>{const t=e.parentNode;t&&t.removeChild(e)},_c=e=>{const t=Dr(e);return{count:e.length-t.length,text:t}},Sc=e=>{let t;for(;-1!==(t=e.data.lastIndexOf(Br));)e.deleteData(t,1)},kc=(e,t)=>(Rc(e),t),Nc=(e,t)=>Vi.isTextPosition(t)?((e,t)=>xc(e)&&t.container()===e?((e,t)=>{const n=_c(e.data.substr(0,t.offset())),o=_c(e.data.substr(t.offset()));return(n.text+o.text).length>0?(Sc(e),Vi(e,t.offset()-n.count)):t})(e,t):kc(e,t))(e,t):((e,t)=>t.container()===e.parentNode?((e,t)=>{const n=t.container(),o=((e,t)=>{const n=j(e,t);return-1===n?I.none():I.some(n)})(ce(n.childNodes),e).map((e=>e{wc(e)&&Ur(e)&&(zr(e)?e.removeAttribute("data-mce-caret"):Ec(e)),xc(e)&&(Sc(e),0===e.data.length&&Ec(e))},Ac=dr,Tc=mr,Oc=cr,Bc=(e,t,n)=>{const o=yi(t.getBoundingClientRect(),n);let r,s;if("BODY"===e.tagName){const t=e.ownerDocument.documentElement;r=e.scrollLeft||t.scrollLeft,s=e.scrollTop||t.scrollTop}else{const t=e.getBoundingClientRect();r=e.scrollLeft-t.left,s=e.scrollTop-t.top}o.left+=r,o.right+=r,o.top+=s,o.bottom+=s,o.width=1;let a=t.offsetWidth-t.clientWidth;return a>0&&(n&&(a*=-1),o.left+=a,o.right+=a),o},Pc=(e,t,n,o)=>{const r=Xa();let s,a;const i=Il(e),l=e.dom,d=()=>{(e=>{var t,n;const o=Uo(yn(e),"*[contentEditable=false],video,audio,embed,object");for(let e=0;e{l.remove(e.caret),r.clear()})),s&&(clearInterval(s),s=void 0)};return{show:(e,c)=>{let u;if(d(),Oc(c))return null;if(!n(c))return a=((e,t)=>{var n;const o=(null!==(n=e.ownerDocument)&&void 0!==n?n:document).createTextNode(Br),r=e.parentNode;if(t){const t=e.previousSibling;if(Mr(t)){if(Ur(t))return t;if(qr(t))return t.splitText(t.data.length-1)}null==r||r.insertBefore(o,e)}else{const t=e.nextSibling;if(Mr(t)){if(Ur(t))return t;if($r(t))return t.splitText(1),t}e.nextSibling?null==r||r.insertBefore(o,e.nextSibling):null==r||r.appendChild(o)}return o})(c,e),u=c.ownerDocument.createRange(),Lc(a.nextSibling)?(u.setStart(a,0),u.setEnd(a,0)):(u.setStart(a,1),u.setEnd(a,1)),u;{const n=((e,t,n)=>{var o;const r=(null!==(o=t.ownerDocument)&&void 0!==o?o:document).createElement(e);r.setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(Tr().dom);const s=t.parentNode;return n?null==s||s.insertBefore(r,t):t.nextSibling?null==s||s.insertBefore(r,t.nextSibling):null==s||s.appendChild(r),r})(i,c,e),d=Bc(t,c,e);l.setStyle(n,"top",d.top),a=n;const m=l.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});l.setStyles(m,{...d}),l.add(t,m),r.set({caret:m,element:c,before:e}),e&&l.addClass(m,"mce-visual-caret-before"),s=setInterval((()=>{r.on((e=>{o()?l.toggleClass(e.caret,"mce-visual-caret-hidden"):l.addClass(e.caret,"mce-visual-caret-hidden")}))}),500),u=c.ownerDocument.createRange(),u.setStart(n,0),u.setEnd(n,0)}return u},hide:d,getCss:()=>".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}",reposition:()=>{r.on((e=>{const n=Bc(t,e.element,e.before);l.setStyles(e.caret,{...n})}))},destroy:()=>clearInterval(s)}},Dc=()=>At.browser.isFirefox(),Lc=e=>Ac(e)||Tc(e),Mc=e=>(Lc(e)||Qo(e)&&Dc())&&Tn(yn(e)).exists(oo),Ic=lr,Fc=dr,Uc=mr,zc=Yo("display","block table table-cell table-caption list-item"),jc=Ur,Hc=Ir,$c=qo,qc=er,Vc=ts,Wc=e=>e>0,Kc=e=>e<0,Yc=(e,t)=>{let n;for(;n=e(t);)if(!Hc(n))return n;return null},Gc=(e,t,n,o,r)=>{const s=new jo(e,o),a=Fc(e)||Hc(e);let i;if(Kc(t)){if(a&&(i=Yc(s.prev.bind(s),!0),n(i)))return i;for(;i=Yc(s.prev.bind(s),r);)if(n(i))return i}if(Wc(t)){if(a&&(i=Yc(s.next.bind(s),!0),n(i)))return i;for(;i=Yc(s.next.bind(s),r);)if(n(i))return i}return null},Xc=(e,t)=>{for(;e&&e!==t;){if(zc(e))return e;e=e.parentNode}return null},Qc=(e,t,n)=>Xc(e.container(),n)===Xc(t.container(),n),Jc=(e,t)=>{if(!t)return I.none();const n=t.container(),o=t.offset();return $c(n)?I.from(n.childNodes[o+e]):I.none()},Zc=(e,t)=>{var n;const o=(null!==(n=t.ownerDocument)&&void 0!==n?n:document).createRange();return e?(o.setStartBefore(t),o.setEndBefore(t)):(o.setStartAfter(t),o.setEndAfter(t)),o},eu=(e,t,n)=>Xc(t,e)===Xc(n,e),tu=(e,t,n)=>{const o=e?"previousSibling":"nextSibling";let r=n;for(;r&&r!==t;){let e=r[o];if(e&&jc(e)&&(e=e[o]),Fc(e)||Uc(e)){if(eu(t,e,r))return e;break}if(Vc(e))break;r=r.parentNode}return null},nu=T(Zc,!0),ou=T(Zc,!1),ru=(e,t,n)=>{let o;const r=T(tu,!0,t),s=T(tu,!1,t),a=n.startContainer,i=n.startOffset;if(Ir(a)){const e=qc(a)?a.parentNode:a,t=e.getAttribute("data-mce-caret");if("before"===t&&(o=e.nextSibling,Mc(o)))return nu(o);if("after"===t&&(o=e.previousSibling,Mc(o)))return ou(o)}if(!n.collapsed)return n;if(er(a)){if(jc(a)){if(1===e){if(o=s(a),o)return nu(o);if(o=r(a),o)return ou(o)}if(-1===e){if(o=r(a),o)return ou(o);if(o=s(a),o)return nu(o)}return n}if(qr(a)&&i>=a.data.length-1)return 1===e&&(o=s(a),o)?nu(o):n;if($r(a)&&i<=1)return-1===e&&(o=r(a),o)?ou(o):n;if(i===a.data.length)return o=s(a),o?nu(o):n;if(0===i)return o=r(a),o?ou(o):n}return n},su=(e,t)=>Jc(e?0:-1,t).filter(Fc),au=(e,t,n)=>{const o=ru(e,t,n);return-1===e?Vi.fromRangeStart(o):Vi.fromRangeEnd(o)},iu=e=>I.from(e.getNode()).map(yn),lu=(e,t)=>{let n=t;for(;n=e(n);)if(n.isVisible())return n;return n},du=(e,t)=>{const n=Qc(e,t);return!(n||!ar(e.getNode()))||n};var cu;!function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"}(cu||(cu={}));const uu=dr,mu=er,fu=qo,gu=ar,pu=ts,hu=e=>Jr(e)||(e=>!!ns(e)&&!X(ce(e.getElementsByTagName("*")),((e,t)=>e||Kr(t)),!1))(e),bu=os,vu=(e,t)=>e.hasChildNodes()&&t{if(Wc(e)){if(pu(t.previousSibling)&&!mu(t.previousSibling))return Vi.before(t);if(mu(t))return Vi(t,0)}if(Kc(e)){if(pu(t.nextSibling)&&!mu(t.nextSibling))return Vi.after(t);if(mu(t))return Vi(t,t.data.length)}return Kc(e)?gu(t)?Vi.before(t):Vi.after(t):Vi.before(t)},Cu=(e,t,n)=>{let o,r,s,a;if(!fu(n)||!t)return null;if(t.isEqual(Vi.after(n))&&n.lastChild){if(a=Vi.after(n.lastChild),Kc(e)&&pu(n.lastChild)&&fu(n.lastChild))return gu(n.lastChild)?Vi.before(n.lastChild):a}else a=t;const i=a.container();let l=a.offset();if(mu(i)){if(Kc(e)&&l>0)return Vi(i,--l);if(Wc(e)&&l0&&(r=vu(i,l-1),pu(r)))return!hu(r)&&(s=Gc(r,e,bu,r),s)?mu(s)?Vi(s,s.data.length):Vi.after(s):mu(r)?Vi(r,r.data.length):Vi.before(r);if(Wc(e)&&l{const n=t.nextSibling;return n&&pu(n)?mu(n)?Vi(n,0):Vi.before(n):Cu(cu.Forwards,Vi.after(t),e)})(n,r):!hu(r)&&(s=Gc(r,e,bu,r),s)?mu(s)?Vi(s,0):Vi.before(s):mu(r)?Vi(r,0):Vi.after(r);o=r||a.getNode()}if(o&&(Wc(e)&&a.isAtEnd()||Kc(e)&&a.isAtStart())&&(o=Gc(o,e,M,n,!0),bu(o,n)))return yu(e,o);r=o?Gc(o,e,bu,n):o;const d=Pe(Y(((e,t)=>{const n=[];let o=e;for(;o&&o!==t;)n.push(o),o=o.parentNode;return n})(i,n),uu));return!d||r&&d.contains(r)?r?yu(e,r):null:(a=Wc(e)?Vi.after(d):Vi.before(d),a)},wu=e=>({next:t=>Cu(cu.Forwards,t,e),prev:t=>Cu(cu.Backwards,t,e)}),xu=e=>Vi.isTextPosition(e)?0===e.offset():ts(e.getNode()),Eu=e=>{if(Vi.isTextPosition(e)){const t=e.container();return e.offset()===t.data.length}return ts(e.getNode(!0))},_u=(e,t)=>!Vi.isTextPosition(e)&&!Vi.isTextPosition(t)&&e.getNode()===t.getNode(!0),Su=(e,t,n)=>{const o=wu(t);return I.from(e?o.next(n):o.prev(n))},ku=(e,t,n)=>Su(e,t,n).bind((o=>Qc(n,o,t)&&((e,t,n)=>{return e?!_u(t,n)&&(o=t,!(!Vi.isTextPosition(o)&&ar(o.getNode())))&&Eu(t)&&xu(n):!_u(n,t)&&xu(t)&&Eu(n);var o})(e,n,o)?Su(e,t,o):I.some(o))),Nu=(e,t,n,o)=>ku(e,t,n).bind((n=>o(n)?Nu(e,t,n,o):I.some(n))),Ru=(e,t)=>{const n=e?t.firstChild:t.lastChild;return er(n)?I.some(Vi(n,e?0:n.data.length)):n?ts(n)?I.some(e?Vi.before(n):ar(o=n)?Vi.before(o):Vi.after(o)):((e,t,n)=>{const o=e?Vi.before(n):Vi.after(n);return Su(e,t,o)})(e,t,n):I.none();var o},Au=T(Su,!0),Tu=T(Su,!1),Ou=T(Ru,!0),Bu=T(Ru,!1),Pu="_mce_caret",Du=e=>qo(e)&&e.id===Pu,Lu=(e,t)=>{let n=t;for(;n&&n!==e;){if(Du(n))return n;n=n.parentNode}return null},Mu=e=>Ee(e,"name"),Iu=e=>Pt.isArray(e.start),Fu=e=>!(!Mu(e)&&b(e.forward))||e.forward,Uu=(e,t)=>(qo(t)&&e.isBlock(t)&&!t.innerHTML&&(t.innerHTML='
'),t),zu=(e,t)=>Bu(e).fold(L,(e=>(t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0))),ju=(e,t,n)=>!(!(e=>!e.hasChildNodes())(t)||!Lu(e,t)||(((e,t)=>{var n;const o=(null!==(n=e.ownerDocument)&&void 0!==n?n:document).createTextNode(Br);e.appendChild(o),t.setStart(o,0),t.setEnd(o,0)})(t,n),0)),Hu=(e,t,n,o)=>{const r=n[t?"start":"end"],s=e.getRoot();if(r){let e=s,n=r[0];for(let t=r.length-1;e&&t>=1;t--){const n=e.childNodes;if(ju(s,e,o))return!0;if(r[t]>n.length-1)return!!ju(s,e,o)||zu(e,o);e=n[r[t]]}er(e)&&(n=Math.min(r[0],e.data.length)),qo(e)&&(n=Math.min(r[0],e.childNodes.length)),t?o.setStart(e,n):o.setEnd(e,n)}return!0},$u=e=>er(e)&&e.data.length>0,qu=(e,t,n)=>{const o=e.get(n.id+"_"+t),r=null==o?void 0:o.parentNode,s=n.keep;if(o&&r){let a,i;if("start"===t?s?o.hasChildNodes()?(a=o.firstChild,i=1):$u(o.nextSibling)?(a=o.nextSibling,i=0):$u(o.previousSibling)?(a=o.previousSibling,i=o.previousSibling.data.length):(a=r,i=e.nodeIndex(o)+1):(a=r,i=e.nodeIndex(o)):s?o.hasChildNodes()?(a=o.firstChild,i=1):$u(o.previousSibling)?(a=o.previousSibling,i=o.previousSibling.data.length):(a=r,i=e.nodeIndex(o)):(a=r,i=e.nodeIndex(o)),!s){const r=o.previousSibling,s=o.nextSibling;let l;for(Pt.each(Pt.grep(o.childNodes),(e=>{er(e)&&(e.data=e.data.replace(/\uFEFF/g,""))}));l=e.get(n.id+"_"+t);)e.remove(l,!0);if(er(s)&&er(r)&&!At.browser.isOpera()){const t=r.data.length;r.appendData(s.data),e.remove(s),a=r,i=t}}return I.some(Vi(a,i))}return I.none()},Vu=(e,t,n)=>((e,t,n=!1)=>2===t?dl(Dr,n,e):3===t?(e=>{const t=e.getRng();return{start:tl(e.dom.getRoot(),Vi.fromRangeStart(t)),end:tl(e.dom.getRoot(),Vi.fromRangeEnd(t)),forward:e.isForward()}})(e):t?(e=>({rng:e.getRng(),forward:e.isForward()}))(e):ul(e,!1))(e,t,n),Wu=(e,t)=>{((e,t)=>{const n=e.dom;if(t){if(Iu(t))return((e,t)=>{const n=e.createRng();return Hu(e,!0,t,n)&&Hu(e,!1,t,n)?I.some({range:n,forward:Fu(t)}):I.none()})(n,t);if((e=>m(e.start))(t))return((e,t)=>{const n=I.from(nl(e.getRoot(),t.start)),o=I.from(nl(e.getRoot(),t.end));return Mt(n,o,((n,o)=>{const r=e.createRng();return r.setStart(n.container(),n.offset()),r.setEnd(o.container(),o.offset()),{range:r,forward:Fu(t)}}))})(n,t);if((e=>Ee(e,"id"))(t))return((e,t)=>{const n=qu(e,"start",t),o=qu(e,"end",t);return Mt(n,o.or(n),((n,o)=>{const r=e.createRng();return r.setStart(Uu(e,n.container()),n.offset()),r.setEnd(Uu(e,o.container()),o.offset()),{range:r,forward:Fu(t)}}))})(n,t);if(Mu(t))return((e,t)=>I.from(e.select(t.name)[t.index]).map((t=>{const n=e.createRng();return n.selectNode(t),{range:n,forward:!0}})))(n,t);if((e=>Ee(e,"rng"))(t))return I.some({range:t.rng,forward:Fu(t)})}return I.none()})(e,t).each((({range:t,forward:n})=>{e.setRng(t,n)}))},Ku=e=>qo(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type"),Yu=(Gu=br,e=>Gu===e);var Gu;const Xu=e=>""!==e&&-1!==" \f\n\r\t\v".indexOf(e),Qu=e=>!Xu(e)&&!Yu(e)&&!vr(e),Ju=e=>{const t=[];if(e)for(let n=0;n{const n=Uo(t,"td[data-mce-selected],th[data-mce-selected]");return n.length>0?n:(e=>Y((e=>te(e,(e=>{const t=_i(e);return t?[yn(t)]:[]})))(e),Rr))(e)},em=e=>Zu(Ju(e.selection.getSel()),yn(e.getBody())),tm=(e,t)=>eo(e,"table",t),nm=e=>Fn(e).fold(N([e]),(t=>[e].concat(nm(t)))),om=e=>Un(e).fold(N([e]),(t=>"br"===Ht(t)?Bn(t).map((t=>[e].concat(om(t)))).getOr([]):[e].concat(om(t)))),rm=(e,t)=>Mt((e=>{const t=e.startContainer,n=e.startOffset;return er(t)?0===n?I.some(yn(t)):I.none():I.from(t.childNodes[n]).map(yn)})(t),(e=>{const t=e.endContainer,n=e.endOffset;return er(t)?n===t.data.length?I.some(yn(t)):I.none():I.from(t.childNodes[n-1]).map(yn)})(t),((t,n)=>{const o=J(nm(e),T(_n,t)),r=J(om(e),T(_n,n));return o.isSome()&&r.isSome()})).getOr(!1),sm=(e,t,n,o)=>{const r=n,s=new jo(n,r),a=ye(e.schema.getMoveCaretBeforeOnEnterElements(),((e,t)=>!H(["td","th","table"],t.toLowerCase())));let i=n;do{if(er(i)&&0!==Pt.trim(i.data).length)return void(o?t.setStart(i,0):t.setEnd(i,i.data.length));if(a[i.nodeName])return void(o?t.setStartBefore(i):"BR"===i.nodeName?t.setEndBefore(i):t.setEndAfter(i))}while(i=o?s.next():s.prev());"BODY"===r.nodeName&&(o?t.setStart(r,0):t.setEnd(r,r.childNodes.length))},am=e=>{const t=e.selection.getSel();return C(t)&&t.rangeCount>0},im=(e,t)=>{const n=em(e);n.length>0?V(n,(n=>{const o=n.dom,r=e.dom.createRng();r.setStartBefore(o),r.setEndAfter(o),t(r,!0)})):t(e.selection.getRng(),!1)},lm=(e,t,n)=>{const o=ul(e,t);n(o),e.moveToBookmark(o)},dm=e=>x(null==e?void 0:e.nodeType),cm=e=>qo(e)&&!Ku(e)&&!Du(e)&&!Xo(e),um=(e,t,n)=>{const{selection:o,dom:r}=e,s=o.getNode(),a=dr(s);lm(o,!0,(()=>{t()})),a&&dr(s)&&r.isChildOf(s,e.getBody())?e.selection.select(s):n(o.getStart())&&mm(r,o)},mm=(e,t)=>{var n,o;const r=t.getRng(),{startContainer:s,startOffset:a}=r;if(!((e,t)=>{if(cm(t)&&!/^(TD|TH)$/.test(t.nodeName)){const n=e.getAttrib(t,"data-mce-selected"),o=parseInt(n,10);return!isNaN(o)&&o>0}return!1})(e,t.getNode())&&qo(s)){const i=s.childNodes,l=e.getRoot();let d;if(a{if(e){const o=t?"nextSibling":"previousSibling";for(e=n?e:e[o];e;e=e[o])if(qo(e)||!hm(e))return e}},gm=(e,t)=>!!e.getTextBlockElements()[t.nodeName.toLowerCase()]||Ts(e,t),pm=(e,t,n)=>e.schema.isValidChild(t,n),hm=(e,t=!1)=>{if(C(e)&&er(e)){const n=t?e.data.replace(/ /g,"\xa0"):e.data;return ss(n)}return!1},bm=(e,t)=>{const n=e.dom;return cm(t)&&"false"===n.getContentEditable(t)&&((e,t)=>{const n="[data-mce-cef-wrappable]",o=Ed(e),r=Ge(o)?n:`${n},${o}`;return xn(yn(t),r)})(e,t)&&0===n.select('[contenteditable="true"]',t).length},vm=(e,t)=>w(e)?e(t):(C(t)&&(e=e.replace(/%(\w+)/g,((e,n)=>t[n]||e))),e),ym=(e,t)=>(t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()),Cm=(e,t)=>{if(y(e))return null;{let n=String(e);return"color"!==t&&"backgroundColor"!==t||(n=Ca(n)),"fontWeight"===t&&700===e&&(n="bold"),"fontFamily"===t&&(n=n.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),n}},wm=(e,t,n)=>{const o=e.getStyle(t,n);return Cm(o,n)},xm=(e,t)=>{let n;return e.getParent(t,(t=>!!qo(t)&&(n=e.getStyle(t,"text-decoration"),!!n&&"none"!==n))),n},Em=(e,t,n)=>e.getParents(t,n,e.getRoot()),_m=(e,t,n)=>{const o=e.formatter.get(t);return C(o)&&$(o,n)},Sm=e=>_e(e,"block"),km=e=>_e(e,"selector"),Nm=e=>_e(e,"inline"),Rm=e=>km(e)&&!1!==e.expand&&!Nm(e),Am=e=>(e=>{const t=[];let n=e;for(;n;){if(er(n)&&n.data!==Br||n.childNodes.length>1)return[];qo(n)&&t.push(n),n=n.firstChild}return t})(e).length>0,Tm=e=>Du(e.dom)&&Am(e.dom),Om=Ku,Bm=Em,Pm=hm,Dm=gm,Lm=(e,t)=>{let n=t;for(;n;){if(qo(n)&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},Mm=(e,t,n,o)=>{const r=t.data;if(e){for(let e=n;e>0;e--)if(o(r.charAt(e-1)))return e}else for(let e=n;eMm(e,t,n,(e=>Yu(e)||Xu(e))),Fm=(e,t,n)=>Mm(e,t,n,Qu),Um=(e,t,n,o,r,s)=>{let a;const i=e.getParent(n,e.isBlock)||t,l=(t,n,o)=>{const s=hi(e),l=r?s.backwards:s.forwards;return I.from(l(t,n,((e,t)=>Om(e.parentNode)?-1:(a=e,o(r,e,t))),i))};return l(n,o,Im).bind((e=>s?l(e.container,e.offset+(r?-1:0),Fm):I.some(e))).orThunk((()=>a?I.some({container:a,offset:r?0:a.length}):I.none()))},zm=(e,t,n,o,r)=>{const s=o[r];er(o)&&Ge(o.data)&&s&&(o=s);const a=Bm(e,o);for(let o=0;o{var r;let s=n;const a=e.getRoot(),i=t[0];if(Sm(i)&&(s=i.wrapper?null:e.getParent(n,i.block,a)),!s){const t=null!==(r=e.getParent(n,"LI,TD,TH,SUMMARY"))&&void 0!==r?r:a;s=e.getParent(er(n)?n.parentNode:n,(t=>t!==a&&Dm(e.schema,t)),t)}if(s&&Sm(i)&&i.wrapper&&(s=Bm(e,s,"ul,ol").reverse()[0]||s),!s)for(s=n;s&&s[o]&&!e.isBlock(s[o])&&(s=s[o],!ym(s,"br")););return s||n},Hm=(e,t,n,o)=>{const r=n.parentNode;return!C(n[o])&&(!(r!==t&&!y(r)&&!e.isBlock(r))||Hm(e,t,r,o))},$m=(e,t,n,o,r)=>{let s=n;const a=r?"previousSibling":"nextSibling",i=e.getRoot();if(er(n)&&!Pm(n)&&(r?o>0:oOm(e.parentNode)||Om(e),Vm=(e,t,n,o=!1)=>{let{startContainer:r,startOffset:s,endContainer:a,endOffset:i}=t;const l=n[0];return qo(r)&&r.hasChildNodes()&&(r=Si(r,s),er(r)&&(s=0)),qo(a)&&a.hasChildNodes()&&(a=Si(a,t.collapsed?i:i-1),er(a)&&(i=a.data.length)),r=Lm(e,r),a=Lm(e,a),qm(r)&&(r=Om(r)?r:r.parentNode,r=t.collapsed?r.previousSibling||r:r.nextSibling||r,er(r)&&(s=t.collapsed?r.length:0)),qm(a)&&(a=Om(a)?a:a.parentNode,a=t.collapsed?a.nextSibling||a:a.previousSibling||a,er(a)&&(i=t.collapsed?0:a.length)),t.collapsed&&(Um(e,e.getRoot(),r,s,!0,o).each((({container:e,offset:t})=>{r=e,s=t})),Um(e,e.getRoot(),a,i,!1,o).each((({container:e,offset:t})=>{a=e,i=t}))),(Nm(l)||l.block_expand)&&(Nm(l)&&er(r)&&0!==s||(r=$m(e,n,r,s,!0)),Nm(l)&&er(a)&&i!==a.data.length||(a=$m(e,n,a,i,!1))),Rm(l)&&(r=zm(e,n,t,r,"previousSibling"),a=zm(e,n,t,a,"nextSibling")),(Sm(l)||km(l))&&(r=jm(e,n,r,"previousSibling"),a=jm(e,n,a,"nextSibling"),Sm(l)&&(e.isBlock(r)||(r=$m(e,n,r,s,!0)),e.isBlock(a)||(a=$m(e,n,a,i,!1)))),qo(r)&&r.parentNode&&(s=e.nodeIndex(r),r=r.parentNode),qo(a)&&a.parentNode&&(i=e.nodeIndex(a)+1,a=a.parentNode),{startContainer:r,startOffset:s,endContainer:a,endOffset:i}},Wm=(e,t,n)=>{var o;const r=t.startOffset,s=Si(t.startContainer,r),a=t.endOffset,i=Si(t.endContainer,a-1),l=e=>{const t=e[0];er(t)&&t===s&&r>=t.data.length&&e.splice(0,1);const n=e[e.length-1];return 0===a&&e.length>0&&n===i&&er(n)&&e.splice(e.length-1,1),e},d=(e,t,n)=>{const o=[];for(;e&&e!==n;e=e[t])o.push(e);return o},c=(t,n)=>e.getParent(t,(e=>e.parentNode===n),n),u=(e,t,o)=>{const r=o?"nextSibling":"previousSibling";for(let s=e,a=s.parentNode;s&&s!==t;s=a){a=s.parentNode;const t=d(s===e?s:s[r],r);t.length&&(o||t.reverse(),n(l(t)))}};if(s===i)return n(l([s]));const m=null!==(o=e.findCommonAncestor(s,i))&&void 0!==o?o:e.getRoot();if(e.isChildOf(s,i))return u(s,m,!0);if(e.isChildOf(i,s))return u(i,m);const f=c(s,m)||s,g=c(i,m)||i;u(s,f,!0);const p=d(f===s?f:f.nextSibling,"nextSibling",g===i?g.nextSibling:g);p.length&&n(l(p)),u(i,g)},Km=['pre[class*=language-][contenteditable="false"]',"figure.image","div[data-ephox-embed-iri]","div.tiny-pageembed","div.mce-toc","div[data-mce-toc]"],Ym=(e,t,n,o,r,s)=>{const{uid:a=t,...i}=n;un(e,Za()),Jt(e,`${ti()}`,a),Jt(e,`${ei()}`,o);const{attributes:l={},classes:d=[]}=r(a,i);if(Zt(e,l),((e,t)=>{V(t,(t=>{un(e,t)}))})(e,d),s){d.length>0&&Jt(e,`${oi()}`,d.join(","));const t=me(l);t.length>0&&Jt(e,`${ri()}`,t.join(","))}},Gm=(e,t,n,o,r)=>{const s=bn("span",e);return Ym(s,t,n,o,r,!1),s},Xm=(e,t,n,o,r,s)=>{const a=[],i=Gm(e.getDoc(),n,s,o,r),l=Xa(),d=()=>{l.clear()},c=e=>{V(e,u)},u=t=>{switch(((e,t,n,o)=>An(t).fold((()=>"skipping"),(r=>"br"===o||(e=>Kt(e)&&Cr(e)===Br)(t)?"valid":(e=>Wt(e)&&gn(e,Za()))(t)?"existing":Du(t.dom)?"caret":$(Km,(e=>xn(t,e)))?"valid-block":pm(e,n,o)&&pm(e,Ht(r),n)?"valid":"invalid-child")))(e,t,"span",Ht(t))){case"invalid-child":{d();const e=Mn(t);c(e),d();break}case"valid-block":d(),Ym(t,n,s,o,r,!0);break;case"valid":{const e=l.get().getOrThunk((()=>{const e=fi(i);return a.push(e),l.set(e),e}));yo(t,e);break}}};return Wm(e.dom,t,(e=>{d(),(e=>{const t=q(e,yn);c(t)})(e)})),a},Qm=e=>{const t=(()=>{const e={};return{register:(t,n)=>{e[t]={name:t,settings:n}},lookup:t=>xe(e,t).map((e=>e.settings)),getNames:()=>me(e)}})();((e,t)=>{const n=ei(),o=e=>I.from(e.attr(n)).bind(t.lookup),r=e=>{var t,n;e.attr(ti(),null),e.attr(ei(),null),e.attr(ni(),null);const o=I.from(e.attr(ri())).map((e=>e.split(","))).getOr([]),r=I.from(e.attr(oi())).map((e=>e.split(","))).getOr([]);V(o,(t=>e.attr(t,null)));const s=null!==(n=null===(t=e.attr("class"))||void 0===t?void 0:t.split(" "))&&void 0!==n?n:[],a=re(s,[Za()].concat(r));e.attr("class",a.length>0?a.join(" "):null),e.attr(oi(),null),e.attr(ri(),null)};e.serializer.addTempAttr(ni()),e.serializer.addAttributeFilter(n,(e=>{for(const t of e)o(t).each((e=>{!1===e.persistent&&("span"===t.name?t.unwrap():r(t))}))}))})(e,t);const n=((e,t)=>{const n=$a({}),o=()=>({listeners:[],previous:Xa()}),r=(e,t)=>{s(e,(e=>(t(e),e)))},s=(e,t)=>{const r=n.get(),s=t(xe(r,e).getOrThunk(o));r[e]=s,n.set(r)},a=(t,n)=>{V(li(e,t),(e=>{n?Jt(e,ni(),"true"):on(e,ni())}))},i=Ja((()=>{const n=ae(t.getNames());V(n,(t=>{s(t,(n=>{const o=n.previous.get();return ai(e,I.some(t)).fold((()=>{o.each((e=>{(e=>{r(e,(t=>{V(t.listeners,(t=>t(!1,e)))}))})(t),n.previous.clear(),a(e,!1)}))}),(({uid:e,name:t,elements:s})=>{Dt(o,e)||(o.each((e=>a(e,!1))),((e,t,n)=>{r(e,(o=>{V(o.listeners,(o=>o(!0,e,{uid:t,nodes:q(n,(e=>e.dom))})))}))})(t,e,s),n.previous.set(e),a(e,!0))})),{previous:n.previous,listeners:n.listeners}}))}))}),30);return e.on("remove",(()=>{i.cancel()})),e.on("NodeChange",(()=>{i.throttle()})),{addListener:(e,t)=>{s(e,(e=>({previous:e.previous,listeners:e.listeners.concat([t])})))}}})(e,t),o=Xt("span"),r=e=>{V(e,(e=>{o(e)?Eo(e):(e=>{fn(e,Za()),on(e,`${ti()}`),on(e,`${ei()}`),on(e,`${ni()}`);const t=tn(e,`${ri()}`).map((e=>e.split(","))).getOr([]),n=tn(e,`${oi()}`).map((e=>e.split(","))).getOr([]);var o;V(t,(t=>on(e,t))),o=e,V(n,(e=>{fn(o,e)})),on(e,`${oi()}`),on(e,`${ri()}`)})(e)}))};return{register:(e,n)=>{t.register(e,n)},annotate:(n,o)=>{t.lookup(n).each((t=>{((e,t,n,o)=>{e.undoManager.transact((()=>{const r=e.selection,s=r.getRng(),a=em(e).length>0,i=ui("mce-annotation");if(s.collapsed&&!a&&((e,t)=>{const n=Vm(e.dom,t,[{inline:"span"}]);t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)})(e,s),r.getRng().collapsed&&!a){const s=Gm(e.getDoc(),i,o,t,n.decorate);ko(s,br),r.getRng().insertNode(s.dom),r.select(s.dom)}else lm(r,!1,(()=>{im(e,(r=>{Xm(e,r,i,t,n.decorate,o)}))}))}))})(e,n,t,o)}))},annotationChanged:(e,t)=>{n.addListener(e,t)},remove:t=>{ai(e,I.some(t)).each((({elements:t})=>{const n=e.selection.getBookmark();r(t),e.selection.moveToBookmark(n)}))},removeAll:t=>{const n=e.selection.getBookmark();ge(di(e,t),((e,t)=>{r(e)})),e.selection.moveToBookmark(n)},getAll:t=>{const n=di(e,t);return pe(n,(e=>q(e,(e=>e.dom))))}}},Jm=e=>({getBookmark:T(Vu,e),moveToBookmark:T(Wu,e)});Jm.isBookmarkNode=Ku;const Zm=(e,t,n)=>!n.collapsed&&$(n.getClientRects(),(n=>((e,t,n)=>t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom)(n,e,t))),ef=(e,t,n)=>{e.dispatch(t,n)},tf=(e,t,n,o)=>{e.dispatch("FormatApply",{format:t,node:n,vars:o})},nf=(e,t,n,o)=>{e.dispatch("FormatRemove",{format:t,node:n,vars:o})},of=(e,t)=>e.dispatch("SetContent",t),rf=(e,t)=>e.dispatch("GetContent",t),sf=(e,t)=>e.dispatch("PastePlainTextToggle",{state:t}),af={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:e=>e.shiftKey||e.ctrlKey||e.altKey||af.metaKeyPressed(e),metaKeyPressed:e=>At.os.isMacOS()||At.os.isiOS()?e.metaKey:e.ctrlKey&&!e.altKey},lf="data-mce-selected",df=Math.abs,cf=Math.round,uf={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},mf=(e,t)=>{const n=t.dom,o=t.getDoc(),r=document,s=t.getBody();let a,i,l,d,c,u,m,f,g,p,h,b,v,y,w;const x=e=>C(e)&&(ir(e)||n.is(e,"figure.image")),E=e=>mr(e)||n.hasClass(e,"mce-preview-object"),_=e=>{const n=e.target;((e,t)=>{if((e=>"longpress"===e.type||0===e.type.indexOf("touch"))(e)){const n=e.touches[0];return x(e.target)&&!Zm(n.clientX,n.clientY,t)}return x(e.target)&&!Zm(e.clientX,e.clientY,t)})(e,t.selection.getRng())&&!e.isDefaultPrevented()&&t.selection.select(n)},S=e=>n.hasClass(e,"mce-preview-object")&&C(e.firstElementChild)?[e,e.firstElementChild]:n.is(e,"figure.image")?[e.querySelector("img")]:[e],k=e=>{const o=cd(t);return!!o&&"false"!==e.getAttribute("data-mce-resize")&&e!==t.getBody()&&(n.hasClass(e,"mce-preview-object")&&C(e.firstElementChild)?xn(yn(e.firstElementChild),o):xn(yn(e),o))},N=(e,o,r)=>{if(C(r)){const s=S(e);V(s,(e=>{e.style[o]||!t.schema.isValid(e.nodeName.toLowerCase(),o)?n.setStyle(e,o,r):n.setAttrib(e,o,""+r)}))}},R=(e,t,n)=>{N(e,"width",t),N(e,"height",n)},A=e=>{let o,r,c,C,_;o=e.screenX-u,r=e.screenY-m,b=o*d[2]+f,v=r*d[3]+g,b=b<5?5:b,v=v<5?5:v,c=(x(a)||E(a))&&!1!==ud(t)?!af.modifierPressed(e):af.modifierPressed(e),c&&(df(o)>df(r)?(v=cf(b*p),b=cf(v/p)):(b=cf(v/p),v=cf(b*p))),R(i,b,v),C=d.startPos.x+o,_=d.startPos.y+r,C=C>0?C:0,_=_>0?_:0,n.setStyles(l,{left:C,top:_,display:"block"}),l.innerHTML=b+" × "+v,d[2]<0&&i.clientWidth<=b&&n.setStyle(i,"left",void 0+(f-b)),d[3]<0&&i.clientHeight<=v&&n.setStyle(i,"top",void 0+(g-v)),o=s.scrollWidth-y,r=s.scrollHeight-w,o+r!==0&&n.setStyles(l,{left:C-o,top:_-r}),h||(((e,t,n,o,r)=>{e.dispatch("ObjectResizeStart",{target:t,width:n,height:o,origin:r})})(t,a,f,g,"corner-"+d.name),h=!0)},T=()=>{const e=h;h=!1,e&&(N(a,"width",b),N(a,"height",v)),n.unbind(o,"mousemove",A),n.unbind(o,"mouseup",T),r!==o&&(n.unbind(r,"mousemove",A),n.unbind(r,"mouseup",T)),n.remove(i),n.remove(l),n.remove(c),O(a),e&&(((e,t,n,o,r)=>{e.dispatch("ObjectResized",{target:t,width:n,height:o,origin:r})})(t,a,b,v,"corner-"+d.name),n.setAttrib(a,"style",n.getAttrib(a,"style"))),t.nodeChanged()},O=e=>{M();const h=n.getPos(e,s),C=h.x,x=h.y,_=e.getBoundingClientRect(),N=_.width||_.right-_.left,O=_.height||_.bottom-_.top;a!==e&&(P(),a=e,b=v=0);const B=t.dispatch("ObjectSelected",{target:e});k(e)&&!B.isDefaultPrevented()?ge(uf,((e,t)=>{let h=n.get("mceResizeHandle"+t);h&&n.remove(h),h=n.add(s,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),n.bind(h,"mousedown",(h=>{h.stopImmediatePropagation(),h.preventDefault(),(h=>{const b=S(a)[0];var v;u=h.screenX,m=h.screenY,f=b.clientWidth,g=b.clientHeight,p=g/f,d=e,d.name=t,d.startPos={x:N*e[0]+C,y:O*e[1]+x},y=s.scrollWidth,w=s.scrollHeight,c=n.add(s,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),n.setStyles(c,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),i=E(v=a)?n.create("img",{src:At.transparentSrc}):v.cloneNode(!0),n.addClass(i,"mce-clonedresizable"),n.setAttrib(i,"data-mce-bogus","all"),i.contentEditable="false",n.setStyles(i,{left:C,top:x,margin:0}),R(i,N,O),i.removeAttribute(lf),s.appendChild(i),n.bind(o,"mousemove",A),n.bind(o,"mouseup",T),r!==o&&(n.bind(r,"mousemove",A),n.bind(r,"mouseup",T)),l=n.add(s,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},f+" × "+g)})(h)})),e.elm=h,n.setStyles(h,{left:N*e[0]+C-h.offsetWidth/2,top:O*e[1]+x-h.offsetHeight/2})})):P(!1)},B=Qa(O,0),P=(e=!0)=>{B.cancel(),M(),a&&e&&a.removeAttribute(lf),ge(uf,((e,t)=>{const o=n.get("mceResizeHandle"+t);o&&(n.unbind(o),n.remove(o))}))},D=(e,t)=>n.isChildOf(e,t),L=o=>{if(h||t.removed||t.composing)return;const r="mousedown"===o.type?o.target:e.getNode(),a=no(yn(r),"table,img,figure.image,hr,video,span.mce-preview-object,details").map((e=>e.dom)).filter((e=>n.isEditable(e.parentElement)||"IMG"===e.nodeName&&n.isEditable(e))).getOrUndefined(),i=C(a)?n.getAttrib(a,lf,"1"):"1";if(V(n.select(`img[${lf}],hr[${lf}]`),(e=>{e.removeAttribute(lf)})),C(a)&&D(a,s)&&t.hasFocus()){I();const t=e.getStart(!0);if(D(t,a)&&D(e.getEnd(!0),a))return n.setAttrib(a,lf,i),void B.throttle(a)}P()},M=()=>{ge(uf,(e=>{e.elm&&(n.unbind(e.elm),delete e.elm)}))},I=()=>{try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(e){}};return t.on("init",(()=>{I(),t.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",L),t.on("keyup compositionend",(e=>{a&&"TABLE"===a.nodeName&&L(e)})),t.on("hide blur",P),t.on("contextmenu longpress",_,!0)})),t.on("remove",M),{isResizable:k,showResizeRect:O,hideResizeRect:P,updateResizeRect:L,destroy:()=>{B.cancel(),a=i=c=null}}},ff=(e,t,n)=>{const o=e.document.createRange();var r;return r=o,t.fold((e=>{r.setStartBefore(e.dom)}),((e,t)=>{r.setStart(e.dom,t)}),(e=>{r.setStartAfter(e.dom)})),((e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,n)=>{e.setEnd(t.dom,n)}),(t=>{e.setEndAfter(t.dom)}))})(o,n),o},gf=(e,t,n,o,r)=>{const s=e.document.createRange();return s.setStart(t.dom,n),s.setEnd(o.dom,r),s},pf=hl([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),hf=(e,t,n)=>t(yn(n.startContainer),n.startOffset,yn(n.endContainer),n.endOffset);pf.ltr,pf.rtl;const bf=(e,t,n,o)=>({start:e,soffset:t,finish:n,foffset:o}),vf=document.caretPositionFromPoint?(e,t,n)=>{var o,r;return I.from(null===(r=(o=e.dom).caretPositionFromPoint)||void 0===r?void 0:r.call(o,t,n)).bind((t=>{if(null===t.offsetNode)return I.none();const n=e.dom.createRange();return n.setStart(t.offsetNode,t.offset),n.collapse(),I.some(n)}))}:document.caretRangeFromPoint?(e,t,n)=>{var o,r;return I.from(null===(r=(o=e.dom).caretRangeFromPoint)||void 0===r?void 0:r.call(o,t,n))}:I.none,yf=hl([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Cf={before:yf.before,on:yf.on,after:yf.after,cata:(e,t,n,o)=>e.fold(t,n,o),getStart:e=>e.fold(R,R,R)},wf=hl([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),xf={domRange:wf.domRange,relative:wf.relative,exact:wf.exact,exactFromRange:e=>wf.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>yn(e.startContainer),relative:(e,t)=>Cf.getStart(e),exact:(e,t,n,o)=>e}))(e);return Rn(t)},range:bf},Ef=(e,t)=>{const n=Ht(e);return"input"===n?Cf.after(e):H(["br","img"],n)?0===t?Cf.before(e):Cf.after(e):Cf.on(e,t)},_f=(e,t)=>{const n=e.fold(Cf.before,Ef,Cf.after),o=t.fold(Cf.before,Ef,Cf.after);return xf.relative(n,o)},Sf=(e,t,n,o)=>{const r=Ef(e,t),s=Ef(n,o);return xf.relative(r,s)},kf=(e,t)=>{const n=(t||document).createDocumentFragment();return V(e,(e=>{n.appendChild(e.dom)})),yn(n)},Nf=e=>{const t=xf.getWin(e).dom,n=(e,n,o,r)=>gf(t,e,n,o,r),o=(e=>e.match({domRange:e=>{const t=yn(e.startContainer),n=yn(e.endContainer);return Sf(t,e.startOffset,n,e.endOffset)},relative:_f,exact:Sf}))(e);return((e,t)=>{const n=((e,t)=>t.match({domRange:e=>({ltr:N(e),rtl:I.none}),relative:(t,n)=>({ltr:De((()=>ff(e,t,n))),rtl:De((()=>I.some(ff(e,n,t))))}),exact:(t,n,o,r)=>({ltr:De((()=>gf(e,t,n,o,r))),rtl:De((()=>I.some(gf(e,o,r,t,n))))})}))(e,t);return((e,t)=>{const n=t.ltr();return n.collapsed?t.rtl().filter((e=>!1===e.collapsed)).map((e=>pf.rtl(yn(e.endContainer),e.endOffset,yn(e.startContainer),e.startOffset))).getOrThunk((()=>hf(0,pf.ltr,n))):hf(0,pf.ltr,n)})(0,n)})(t,o).match({ltr:n,rtl:n})},Rf=(e,t,n)=>((e,t,n)=>((e,t,n)=>{const o=yn(e.document);return vf(o,t,n).map((e=>bf(yn(e.startContainer),e.startOffset,yn(e.endContainer),e.endOffset)))})(e,t,n))(Rn(yn(n)).dom,e,t).map((e=>{const t=n.createRange();return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),t})).getOrUndefined(),Af=(e,t)=>C(e)&&C(t)&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset,Tf=(e,t,n)=>null!==((e,t,n)=>{let o=e;for(;o&&o!==t;){if(n(o))return o;o=o.parentNode}return null})(e,t,n),Of=(e,t,n)=>Tf(e,t,(e=>e.nodeName===n)),Bf=(e,t)=>Ur(e)&&!Tf(e,t,Du),Pf=(e,t,n)=>{const o=t.parentNode;if(o){const r=new jo(t,e.getParent(o,e.isBlock)||e.getRoot());let s;for(;s=r[n?"prev":"next"]();)if(ar(s))return!0}return!1},Df=(e,t,n,o,r)=>{const s=e.getRoot(),a=e.schema.getNonEmptyElements(),i=r.parentNode;let l,d;if(!i)return I.none();const c=e.getParent(i,e.isBlock)||s;if(o&&ar(r)&&t&&e.isEmpty(c))return I.some(Vi(i,e.nodeIndex(r)));const u=new jo(r,c);for(;d=u[o?"prev":"next"]();){if("false"===e.getContentEditableParent(d)||Bf(d,s))return I.none();if(er(d)&&d.data.length>0)return Of(d,s,"A")?I.none():I.some(Vi(d,o?d.data.length:0));if(e.isBlock(d)||a[d.nodeName.toLowerCase()])return I.none();l=d}return or(l)?I.none():n&&l?I.some(Vi(l,0)):I.none()},Lf=(e,t,n,o)=>{const r=e.getRoot();let s,a=!1,i=n?o.startContainer:o.endContainer,l=n?o.startOffset:o.endOffset;const d=qo(i)&&l===i.childNodes.length,c=e.schema.getNonEmptyElements();let u=n;if(Ur(i))return I.none();if(qo(i)&&l>i.childNodes.length-1&&(u=!1),rr(i)&&(i=r,l=0),i===r){if(u&&(s=i.childNodes[l>0?l-1:0],s)){if(Ur(s))return I.none();if(c[s.nodeName]||Qo(s))return I.none()}if(i.hasChildNodes()){if(l=Math.min(!u&&l>0?l-1:l,i.childNodes.length-1),i=i.childNodes[l],l=er(i)&&d?i.data.length:0,!t&&i===r.lastChild&&Qo(i))return I.none();if(((e,t)=>{let n=t;for(;n&&n!==e;){if(dr(n))return!0;n=n.parentNode}return!1})(r,i)||Ur(i))return I.none();if(gr(i))return I.none();if(i.hasChildNodes()&&!Qo(i)){s=i;const t=new jo(i,r);do{if(dr(s)||Ur(s)){a=!1;break}if(er(s)&&s.data.length>0){l=u?0:s.data.length,i=s,a=!0;break}if(c[s.nodeName.toLowerCase()]&&!ur(s)){l=e.nodeIndex(s),i=s.parentNode,u||l++,a=!0;break}}while(s=u?t.next():t.prev())}}}return t&&(er(i)&&0===l&&Df(e,d,t,!0,i).each((e=>{i=e.container(),l=e.offset(),a=!0})),qo(i)&&(s=i.childNodes[l],s||(s=i.childNodes[l-1]),!s||!ar(s)||((e,t)=>{var n;return"A"===(null===(n=e.previousSibling)||void 0===n?void 0:n.nodeName)})(s)||Pf(e,s,!1)||Pf(e,s,!0)||Df(e,d,t,!0,s).each((e=>{i=e.container(),l=e.offset(),a=!0})))),u&&!t&&er(i)&&l===i.data.length&&Df(e,d,t,!1,i).each((e=>{i=e.container(),l=e.offset(),a=!0})),a&&i?I.some(Vi(i,l)):I.none()},Mf=(e,t)=>{const n=t.collapsed,o=t.cloneRange(),r=Vi.fromRangeStart(t);return Lf(e,n,!0,o).each((e=>{n&&Vi.isAbove(r,e)||o.setStart(e.container(),e.offset())})),n||Lf(e,n,!1,o).each((e=>{o.setEnd(e.container(),e.offset())})),n&&o.collapse(!0),Af(t,o)?I.none():I.some(o)},If=(e,t)=>e.splitText(t),Ff=e=>{let t=e.startContainer,n=e.startOffset,o=e.endContainer,r=e.endOffset;if(t===o&&er(t)){if(n>0&&nn){r-=n;const e=If(o,r).previousSibling;t=o=e,r=e.data.length,n=0}else r=0}else if(er(t)&&n>0&&n0&&r({walk:(t,n)=>Wm(e,t,n),split:Ff,expand:(t,n={type:"word"})=>{if("word"===n.type){const n=Vm(e,t,[{inline:"span"}]),o=e.createRng();return o.setStart(n.startContainer,n.startOffset),o.setEnd(n.endContainer,n.endOffset),o}return t},normalize:t=>Mf(e,t).fold(L,(e=>(t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0)))});Uf.compareRanges=Af,Uf.getCaretRangeFromPoint=Rf,Uf.getSelectedNode=_i,Uf.getNode=Si;const zf=((e,t)=>{const n=t=>{const n=(e=>{const t=e.dom;return Gn(e)?t.getBoundingClientRect().height:t.offsetHeight})(t);if(n<=0||null===n){const n=co(t,e);return parseFloat(n)||0}return n},o=(e,t)=>X(t,((t,n)=>{const o=co(e,n),r=void 0===o?0:parseInt(o,10);return isNaN(r)?t:t+r}),0);return{set:(t,n)=>{if(!x(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);const o=t.dom;so(o)&&(o.style[e]=n+"px")},get:n,getOuter:n,aggregate:o,max:(e,t,n)=>{const r=o(e,n);return t>r?t-r:0}}})("height"),jf=()=>yn(document),Hf=(e,t)=>e.view(t).fold(N([]),(t=>{const n=e.owner(t),o=Hf(e,n);return[t].concat(o)}));var $f=Object.freeze({__proto__:null,view:e=>{var t;return(e.dom===document?I.none():I.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(yn)},owner:e=>Nn(e)});const qf=e=>"textarea"===Ht(e),Vf=(e,t)=>{const n=(e=>{const t=e.dom.ownerDocument,n=t.body,o=t.defaultView,r=t.documentElement;if(n===e.dom)return To(n.offsetLeft,n.offsetTop);const s=Oo(null==o?void 0:o.pageYOffset,r.scrollTop),a=Oo(null==o?void 0:o.pageXOffset,r.scrollLeft),i=Oo(r.clientTop,n.clientTop),l=Oo(r.clientLeft,n.clientLeft);return Bo(e).translate(a-l,s-i)})(e),o=(e=>zf.get(e))(e);return{element:e,bottom:n.top+o,height:o,pos:n,cleanup:t}},Wf=(e,t,n,o)=>{Xf(e,((r,s)=>Yf(e,t,n,o)),n)},Kf=(e,t,n,o,r)=>{const s={elm:o.element.dom,alignToTop:r};((e,t)=>e.dispatch("ScrollIntoView",t).isDefaultPrevented())(e,s)||(n(e,t,Po(t).top,o,r),((e,t)=>{e.dispatch("AfterScrollIntoView",t)})(e,s))},Yf=(e,t,n,o)=>{const r=yn(e.getBody()),s=yn(e.getDoc());r.dom.offsetWidth;const a=((e,t)=>{const n=((e,t)=>{const n=Mn(e);if(0===n.length||qf(e))return{element:e,offset:t};if(t\ufeff');return po(n.element,o),Vf(o,(()=>xo(o)))})(yn(n.startContainer),n.startOffset);Kf(e,s,t,a,o),a.cleanup()},Gf=(e,t,n,o)=>{const r=yn(e.getDoc());Kf(e,r,n,(e=>Vf(yn(e),_))(t),o)},Xf=(e,t,n)=>{const o=n.startContainer,r=n.startOffset,s=n.endContainer,a=n.endOffset;t(yn(o),yn(s));const i=e.dom.createRng();i.setStart(o,r),i.setEnd(s,a),e.selection.setRng(n)},Qf=(e,t,n,o,r)=>{const s=t.pos;if(o)Do(s.left,s.top,r);else{const o=s.top-n+t.height;Do(-e.getBody().getBoundingClientRect().left,o,r)}},Jf=(e,t,n,o,r,s)=>{const a=o+n,i=r.pos.top,l=r.bottom,d=l-i>=o;ia?Qf(e,r,o,d?!1!==s:!0===s,t):l>a&&!d&&Qf(e,r,o,!0===s,t)},Zf=(e,t,n,o,r)=>{const s=Rn(t).dom.innerHeight;Jf(e,t,n,s,o,r)},eg=(e,t,n,o,r)=>{const s=Rn(t).dom.innerHeight;Jf(e,t,n,s,o,r);const a=(e=>{const t=jf(),n=Po(t),o=((e,t)=>{const n=t.owner(e);return Hf(t,n)})(e,$f),r=Bo(e),s=G(o,((e,t)=>{const n=Bo(t);return{left:e.left+n.left,top:e.top+n.top}}),{left:0,top:0});return To(s.left+r.left+n.left,s.top+r.top+n.top)})(o.element),i=Io(window);a.topi.bottom&&Lo(o.element,!0===r)},tg=(e,t,n)=>Wf(e,Zf,t,n),ng=(e,t,n)=>Gf(e,t,Zf,n),og=(e,t,n)=>Wf(e,eg,t,n),rg=(e,t,n)=>Gf(e,t,eg,n),sg=(e,t,n)=>{(e.inline?tg:og)(e,t,n)},ag=(e,t=!1)=>e.dom.focus({preventScroll:t}),ig=e=>{const t=qn(e).dom;return e.dom===t.activeElement},lg=(e=jf())=>I.from(e.dom.activeElement).map(yn),dg=(e,t)=>{const n=Kt(t)?Cr(t).length:Mn(t).length+1;return e>n?n:e<0?0:e},cg=e=>xf.range(e.start,dg(e.soffset,e.start),e.finish,dg(e.foffset,e.finish)),ug=(e,t)=>!$o(t.dom)&&(Sn(e,t)||_n(e,t)),mg=e=>t=>ug(e,t.start)&&ug(e,t.finish),fg=e=>xf.range(yn(e.startContainer),e.startOffset,yn(e.endContainer),e.endOffset),gg=e=>{const t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),I.some(t)}catch(e){return I.none()}},pg=e=>{const t=(e=>e.inline||At.browser.isFirefox())(e)?(n=yn(e.getBody()),(e=>{const t=e.getSelection();return(t&&0!==t.rangeCount?I.from(t.getRangeAt(0)):I.none()).map(fg)})(Rn(n).dom).filter(mg(n))):I.none();var n;e.bookmark=t.isSome()?t:e.bookmark},hg=e=>(e.bookmark?e.bookmark:I.none()).bind((t=>{return n=yn(e.getBody()),o=t,I.from(o).filter(mg(n)).map(cg);var n,o})).bind(gg),bg={isEditorUIElement:e=>{const t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},vg={setEditorTimeout:(e,t,n)=>((e,t)=>(x(t)||(t=0),setTimeout(e,t)))((()=>{e.removed||t()}),n),setEditorInterval:(e,t,n)=>{const o=((e,t)=>(x(t)||(t=0),setInterval(e,t)))((()=>{e.removed?clearInterval(o):t()}),n);return o}};let yg;const Cg=za.DOM,wg=e=>{const t=e.classList;return void 0!==t&&(t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"))},xg=(e,t)=>{const n=_d(e),o=Cg.getParent(t,(t=>(e=>qo(e)&&bg.isEditorUIElement(e))(t)||!!n&&e.dom.is(t,n)));return null!==o},Eg=e=>{try{const t=qn(yn(e.getElement()));return lg(t).fold((()=>document.body),(e=>e.dom))}catch(e){return document.body}},_g=(e,t)=>{const n=t.editor;(e=>{const t=Qa((()=>{pg(e)}),0);e.on("init",(()=>{e.inline&&((e,t)=>{const n=()=>{t.throttle()};za.DOM.bind(document,"mouseup",n),e.on("remove",(()=>{za.DOM.unbind(document,"mouseup",n)}))})(e,t),((e,t)=>{((e,t)=>{e.on("mouseup touchend",(e=>{t.throttle()}))})(e,t),e.on("keyup NodeChange AfterSetSelectionRange",(t=>{(e=>"nodechange"===e.type&&e.selectionChange)(t)||pg(e)}))})(e,t)})),e.on("remove",(()=>{t.cancel()}))})(n);const o=(e,t)=>{mc(e)&&!0!==e.inline&&t(yn(e.getContainer()),"tox-edit-focus")};n.on("focusin",(()=>{const t=e.focusedEditor;wg(Eg(n))&&o(n,un),t!==n&&(t&&t.dispatch("blur",{focusedEditor:n}),e.setActive(n),e.focusedEditor=n,n.dispatch("focus",{blurredEditor:t}),n.focus(!0))})),n.on("focusout",(()=>{vg.setEditorTimeout(n,(()=>{const t=e.focusedEditor;wg(Eg(n))&&t===n||o(n,fn),xg(n,Eg(n))||t!==n||(n.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null)}))})),yg||(yg=t=>{const n=e.activeEditor;n&&Kn(t).each((t=>{const o=t;o.ownerDocument===document&&(o===document.body||xg(n,o)||e.focusedEditor!==n||(n.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null))}))},Cg.bind(document,"focusin",yg))},Sg=(e,t)=>{e.focusedEditor===t.editor&&(e.focusedEditor=null),!e.activeEditor&&yg&&(Cg.unbind(document,"focusin",yg),yg=null)},kg=(e,t)=>{((e,t)=>(e=>e.collapsed?I.from(Si(e.startContainer,e.startOffset)).map(yn):I.none())(t).bind((t=>Nr(t)?I.some(t):Sn(e,t)?I.none():I.some(e))))(yn(e.getBody()),t).bind((e=>Ou(e.dom))).fold((()=>{e.selection.normalize()}),(t=>e.selection.setRng(t.toRange())))},Ng=e=>{if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},Rg=e=>e.inline?(e=>{const t=e.getBody();return t&&(n=yn(t),ig(n)||(o=n,lg(qn(o)).filter((e=>o.dom.contains(e.dom)))).isSome());var n,o})(e):(e=>C(e.iframeElement)&&ig(yn(e.iframeElement)))(e),Ag=e=>Rg(e)||(e=>{const t=qn(yn(e.getElement()));return lg(t).filter((t=>!wg(t.dom)&&xg(e,t.dom))).isSome()})(e),Tg=e=>e.editorManager.setActive(e),Og=(e,t)=>t.collapsed?e.isEditable(t.startContainer):e.isEditable(t.startContainer)&&e.isEditable(t.endContainer),Bg=(e,t,n,o,r)=>{const s=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return I.from(s).map(yn).map((e=>o&&t.collapsed?e:In(e,r(e,a)).getOr(e))).bind((e=>Wt(e)?I.some(e):An(e).filter(Wt))).map((e=>e.dom)).getOr(e)},Pg=(e,t,n=!1)=>Bg(e,t,!0,n,((e,t)=>Math.min(zn(e),t))),Dg=(e,t,n=!1)=>Bg(e,t,!1,n,((e,t)=>t>0?t-1:t)),Lg=(e,t)=>{const n=e;for(;e&&er(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},Mg=(e,t)=>q(t,(t=>{const n=e.dispatch("GetSelectionRange",{range:t});return n.range!==t?n.range:t})),Ig=["img","br"],Fg=e=>{const t=wr(e).filter((e=>0!==e.trim().length||e.indexOf(br)>-1)).isSome();return t||H(Ig,Ht(e))||(e=>Vt(e)&&"false"===en(e,"contenteditable"))(e)},Ug="[data-mce-autocompleter]",zg=(e,t)=>{if(jg(yn(e.getBody())).isNone()){const o=hn('',e.getDoc());vo(o,yn(t.extractContents())),t.insertNode(o.dom),An(o).each((e=>e.dom.normalize())),(n=o,((e,t)=>{const n=e=>{const o=Mn(e);for(let e=o.length-1;e>=0;e--){const r=o[e];if(t(r))return I.some(r);const s=n(r);if(s.isSome())return s}return I.none()};return n(e)})(n,Fg)).map((t=>{e.selection.setCursorLocation(t.dom,(e=>"img"===Ht(e)?1:wr(e).fold((()=>Mn(e).length),(e=>e.length)))(t))}))}var n},jg=e=>to(e,Ug),Hg={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},$g=(e,t,n)=>{const o=n?"lastChild":"firstChild",r=n?"prev":"next";if(e[o])return e[o];if(e!==t){let n=e[r];if(n)return n;for(let o=e.parent;o&&o!==t;o=o.parent)if(n=o[r],n)return n}},qg=e=>{var t;const n=null!==(t=e.value)&&void 0!==t?t:"";if(!ss(n))return!1;const o=e.parent;return!o||"span"===o.name&&!o.attr("style")||!/^[ ]+$/.test(n)},Vg=e=>{const t="a"===e.name&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t};class Wg{static create(e,t){const n=new Wg(e,Hg[e]||1);return t&&ge(t,((e,t)=>{n.attr(t,e)})),n}constructor(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}replace(e){const t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t}attr(e,t){const n=this;if(!m(e))return C(e)&&ge(e,((e,t)=>{n.attr(t,e)})),n;const o=n.attributes;if(o){if(void 0!==t){if(null===t){if(e in o.map){delete o.map[e];let t=o.length;for(;t--;)if(o[t].name===e)return o.splice(t,1),n}return n}if(e in o.map){let n=o.length;for(;n--;)if(o[n].name===e){o[n].value=t;break}}else o.push({name:e,value:t});return o.map[e]=t,n}return o.map[e]}}clone(){const e=this,t=new Wg(e.name,e.type),n=e.attributes;if(n){const e=[];e.map={};for(let t=0,o=n.length;tm(e.nodeValue)&&e.nodeValue.includes(Br),Gg=e=>(0===e.length?"":`${q(e,(e=>`[${e}]`)).join(",")},`)+'[data-mce-bogus="all"]',Xg=e=>document.createTreeWalker(e,NodeFilter.SHOW_COMMENT,(e=>Yg(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP)),Qg=e=>document.createTreeWalker(e,NodeFilter.SHOW_TEXT,(e=>{if(Yg(e)){const t=e.parentNode;return t&&Ee(Kg,t.nodeName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_SKIP})),Jg=e=>null!==Xg(e).nextNode(),Zg=e=>null!==Qg(e).nextNode(),ep=(e,t)=>null!==t.querySelector(Gg(e)),tp=(e,t)=>{V(((e,t)=>t.querySelectorAll(Gg(e)))(e,t),(t=>{const n=yn(t);"all"===en(n,"data-mce-bogus")?xo(n):V(e,(e=>{nn(n,e)&&on(n,e)}))}))},np=e=>{let t=e.nextNode();for(;null!==t;)t.nodeValue=null,t=e.nextNode()},op=S(np,Xg),rp=S(np,Qg),sp=(e,t)=>{const n=[{condition:T(ep,t),action:T(tp,t)},{condition:Jg,action:op},{condition:Zg,action:rp}];let o=e,r=!1;return V(n,(({condition:t,action:n})=>{t(o)&&(r||(o=e.cloneNode(!0),r=!0),n(o))})),o},ap=e=>{const t=Uo(e,"[data-mce-bogus]");V(t,(e=>{"all"===en(e,"data-mce-bogus")?xo(e):Er(e)?(po(e,vn(hr)),xo(e)):Eo(e)}))},ip=e=>{const t=Uo(e,"input");V(t,(e=>{on(e,"name")}))},lp=(e,t,n)=>{let o;return o="raw"===t.format?Pt.trim(Dr(sp(n,e.serializer.getTempAttrs()).innerHTML)):"text"===t.format?((e,t)=>{const n=e.getDoc(),o=qn(yn(e.getBody())),r=bn("div",n);Jt(r,"data-mce-bogus","all"),lo(r,{position:"fixed",left:"-9999999px",top:"0"}),ko(r,t.innerHTML),ap(r),ip(r);const s=(e=>jn(e)?e:yn(Nn(e).dom.body))(o);vo(s,r);const a=Dr(r.dom.innerText);return xo(r),a})(e,n):"tree"===t.format?e.serializer.serialize(n,t):((e,t)=>{const n=Il(e),o=new RegExp(`^(<${n}[^>]*>( | |\\s|\xa0|
|)<\\/${n}>[\r\n]*|
[\r\n]*)$`);return t.replace(o,"")})(e,e.serializer.serialize(n,t)),"text"!==t.format&&!Ar(yn(n))&&m(o)?Pt.trim(o):o},dp=Pt.makeMap,cp=e=>{const t=[],n=(e=e||{}).indent,o=dp(e.indent_before||""),r=dp(e.indent_after||""),s=ea.getEncodeFunc(e.entity_encoding||"raw",e.entities),a="xhtml"!==e.element_format;return{start:(e,i,l)=>{if(n&&o[e]&&t.length>0){const e=t[t.length-1];e.length>0&&"\n"!==e&&t.push("\n")}if(t.push("<",e),i)for(let e=0,n=i.length;e":" />",l&&n&&r[e]&&t.length>0){const e=t[t.length-1];e.length>0&&"\n"!==e&&t.push("\n")}},end:e=>{let o;t.push(""),n&&r[e]&&t.length>0&&(o=t[t.length-1],o.length>0&&"\n"!==o&&t.push("\n"))},text:(e,n)=>{e.length>0&&(t[t.length]=n?e:s(e))},cdata:e=>{t.push("")},comment:e=>{t.push("\x3c!--",e,"--\x3e")},pi:(e,o)=>{o?t.push(""):t.push(""),n&&t.push("\n")},doctype:e=>{t.push("",n?"\n":"")},reset:()=>{t.length=0},getContent:()=>t.join("").replace(/\n$/,"")}},up=(e={},t=ua())=>{const n=cp(e);return e.validate=!("validate"in e)||e.validate,{serialize:o=>{const r=e.validate,s={3:e=>{var t;n.text(null!==(t=e.value)&&void 0!==t?t:"",e.raw)},8:e=>{var t;n.comment(null!==(t=e.value)&&void 0!==t?t:"")},7:e=>{n.pi(e.name,e.value)},10:e=>{var t;n.doctype(null!==(t=e.value)&&void 0!==t?t:"")},4:e=>{var t;n.cdata(null!==(t=e.value)&&void 0!==t?t:"")},11:e=>{let t=e;if(t=t.firstChild)do{a(t)}while(t=t.next)}};n.reset();const a=e=>{var o;const i=s[e.type];if(i)i(e);else{const s=e.name,i=s in t.getVoidElements();let l=e.attributes;if(r&&l&&l.length>1){const n=[];n.map={};const o=t.getElementRule(e.name);if(o){for(let e=0,t=o.attributesOrder.length;e{mp.add(e)}));const fp=["font","text-decoration","text-emphasis"],gp=(e,t)=>me(e.parseStyle(e.getAttrib(t,"style"))),pp=(e,t,n)=>{const o=gp(e,t),r=gp(e,n),s=o=>{var r,s;const a=null!==(r=e.getStyle(t,o))&&void 0!==r?r:"",i=null!==(s=e.getStyle(n,o))&&void 0!==s?s:"";return Ye(a)&&Ye(i)&&a!==i};return $(o,(e=>{const t=t=>$(t,(t=>t===e));if(!t(r)&&t(fp)){const e=Y(r,(e=>$(fp,(t=>He(e,t)))));return $(e,s)}return s(e)}))},hp=(e,t,n)=>I.from(n.container()).filter(er).exists((o=>{const r=e?0:-1;return t(o.data.charAt(n.offset()+r))})),bp=T(hp,!0,Xu),vp=T(hp,!1,Xu),yp=e=>{const t=e.container();return er(t)&&(0===t.data.length||Pr(t.data)&&Jm.isBookmarkNode(t.parentNode))},Cp=(e,t)=>n=>Jc(e?0:-1,n).filter(t).isSome(),wp=e=>ir(e)&&"block"===co(yn(e),"display"),xp=e=>dr(e)&&!(e=>qo(e)&&"all"===e.getAttribute("data-mce-bogus"))(e),Ep=Cp(!0,wp),_p=Cp(!1,wp),Sp=Cp(!0,mr),kp=Cp(!1,mr),Np=Cp(!0,Qo),Rp=Cp(!1,Qo),Ap=Cp(!0,xp),Tp=Cp(!1,xp),Op=(e,t)=>((e,t,n)=>Sn(t,e)?On(e,(e=>n(e)||_n(e,t))).slice(0,-1):[])(e,t,L),Bp=(e,t)=>[e].concat(Op(e,t)),Pp=(e,t,n)=>Nu(e,t,n,yp),Dp=(e,t,n)=>J(Bp(yn(t.container()),e),(e=>t=>e.isBlock(Ht(t)))(n)),Lp=(e,t,n,o)=>Pp(e,t.dom,n).forall((e=>Dp(t,n,o).fold((()=>!Qc(e,n,t.dom)),(o=>!Qc(e,n,t.dom)&&Sn(o,yn(e.container())))))),Mp=(e,t,n,o)=>Dp(t,n,o).fold((()=>Pp(e,t.dom,n).forall((e=>!Qc(e,n,t.dom)))),(t=>Pp(e,t.dom,n).isNone())),Ip=T(Mp,!1),Fp=T(Mp,!0),Up=T(Lp,!1),zp=T(Lp,!0),jp=e=>iu(e).exists(Er),Hp=(e,t,n,o)=>{const r=Y(Bp(yn(n.container()),t),(e=>o.isBlock(Ht(e)))),s=le(r).getOr(t);return Su(e,s.dom,n).filter(jp)},$p=(e,t,n)=>iu(t).exists(Er)||Hp(!0,e,t,n).isSome(),qp=(e,t,n)=>(e=>I.from(e.getNode(!0)).map(yn))(t).exists(Er)||Hp(!1,e,t,n).isSome(),Vp=T(Hp,!1),Wp=T(Hp,!0),Kp=e=>Vi.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd(),Yp=(e,t,n)=>{const o=Y(Bp(yn(t.container()),e),(e=>n.isBlock(Ht(e))));return le(o).getOr(e)},Gp=(e,t,n)=>Kp(t)?vp(t):vp(t)||Tu(Yp(e,t,n).dom,t).exists(vp),Xp=(e,t,n)=>Kp(t)?bp(t):bp(t)||Au(Yp(e,t,n).dom,t).exists(bp),Qp=e=>iu(e).bind((e=>Jn(e,Wt))).exists((e=>(e=>H(["pre","pre-wrap"],e))(co(e,"white-space")))),Jp=(e,t)=>n=>{return o=new jo(n,e)[t](),C(o)&&dr(o)&&zc(o);var o},Zp=(e,t,n)=>!Qp(t)&&(((e,t,n)=>((e,t)=>Tu(e.dom,t).isNone())(e,t)||((e,t)=>Au(e.dom,t).isNone())(e,t)||Ip(e,t,n)||Fp(e,t,n)||qp(e,t,n)||$p(e,t,n))(e,t,n)||Gp(e,t,n)||Xp(e,t,n)),eh=(e,t,n)=>!Qp(t)&&(Ip(e,t,n)||Up(e,t,n)||qp(e,t,n)||Gp(e,t,n)||((e,t)=>{const n=Tu(e.dom,t).getOr(t),o=Jp(e.dom,"prev");return t.isAtStart()&&(o(t.container())||o(n.container()))})(e,t)),th=(e,t,n)=>!Qp(t)&&(Fp(e,t,n)||zp(e,t,n)||$p(e,t,n)||Xp(e,t,n)||((e,t)=>{const n=Au(e.dom,t).getOr(t),o=Jp(e.dom,"next");return t.isAtEnd()&&(o(t.container())||o(n.container()))})(e,t)),nh=(e,t,n)=>eh(e,t,n)||th(e,(e=>{const t=e.container(),n=e.offset();return er(t)&&nYu(e.charAt(t)),rh=(e,t)=>Xu(e.charAt(t)),sh=(e,t,n,o)=>{const r=t.data,s=Vi(t,0);return n||!oh(r,0)||nh(e,s,o)?!!(n&&rh(r,0)&&eh(e,s,o))&&(t.data=br+r.slice(1),!0):(t.data=" "+r.slice(1),!0)},ah=(e,t,n,o)=>{const r=t.data,s=Vi(t,r.length-1);return n||!oh(r,r.length-1)||nh(e,s,o)?!!(n&&rh(r,r.length-1)&&th(e,s,o))&&(t.data=r.slice(0,-1)+br,!0):(t.data=r.slice(0,-1)+" ",!0)},ih=(e,t,n)=>{const o=t.container();if(!er(o))return I.none();if((e=>{const t=e.container();return er(t)&&je(t.data,br)})(t)){const r=sh(e,o,!1,n)||(e=>{const t=e.data,n=(e=>{const t=e.split("");return q(t,((e,n)=>Yu(e)&&n>0&&n{if(0===n)return;const r=yn(e),s=Qn(r,(e=>o.isBlock(Ht(e)))).getOr(r),a=e.data.slice(t,t+n),i=t+n>=e.data.length&&th(s,Vi(e,e.data.length),o),l=0===t&&eh(s,Vi(e,0),o);e.replaceData(t,n,ls(a,4,l,i))},dh=(e,t,n)=>{const o=e.data.slice(t),r=o.length-We(o).length;lh(e,t,r,n)},ch=(e,t,n)=>{const o=e.data.slice(0,t),r=o.length-Ke(o).length;lh(e,t-r,r,n)},uh=(e,t,n,o,r=!0)=>{const s=Ke(e.data).length,a=r?e:t,i=r?t:e;return r?a.appendData(i.data):a.insertData(0,i.data),xo(yn(i)),o&&dh(a,s,n),a},mh=(e,t)=>((e,t)=>{const n=e.container(),o=e.offset();return!Vi.isTextPosition(e)&&n===t.parentNode&&o>Vi.before(t).offset()})(t,e)?Vi(t.container(),t.offset()-1):t,fh=e=>{return ts(e.previousSibling)?I.some((t=e.previousSibling,er(t)?Vi(t,t.data.length):Vi.after(t))):e.previousSibling?Bu(e.previousSibling):I.none();var t},gh=e=>{return ts(e.nextSibling)?I.some((t=e.nextSibling,er(t)?Vi(t,0):Vi.before(t))):e.nextSibling?Ou(e.nextSibling):I.none();var t},ph=(e,t,n)=>((e,t,n)=>e?((e,t)=>gh(t).orThunk((()=>fh(t))).orThunk((()=>((e,t)=>Au(e,Vi.after(t)).orThunk((()=>Tu(e,Vi.before(t)))))(e,t))))(t,n):((e,t)=>fh(t).orThunk((()=>gh(t))).orThunk((()=>((e,t)=>I.from(t.previousSibling?t.previousSibling:t.parentNode).bind((t=>Tu(e,Vi.before(t)))).orThunk((()=>Au(e,Vi.after(t)))))(e,t))))(t,n))(e,t,n).map(T(mh,n)),hh=(e,t,n)=>{n.fold((()=>{e.focus()}),(n=>{e.selection.setRng(n.toRange(),t)}))},bh=(e,t)=>t&&Ee(e.schema.getBlockElements(),Ht(t)),vh=(e,t,n,o=!0,r=!1)=>{const s=ph(t,e.getBody(),n.dom),a=Qn(n,T(bh,e),(i=e.getBody(),e=>e.dom===i));var i;const l=((e,t,n,o)=>{const r=Bn(e).filter(Kt),s=Pn(e).filter(Kt);return xo(e),(a=r,i=s,l=t,d=(e,t,r)=>{const s=e.dom,a=t.dom,i=s.data.length;return uh(s,a,n,o),r.container()===a?Vi(s,i):r},a.isSome()&&i.isSome()&&l.isSome()?I.some(d(a.getOrDie(),i.getOrDie(),l.getOrDie())):I.none()).orThunk((()=>(o&&(r.each((e=>ch(e.dom,e.dom.length,n))),s.each((e=>dh(e.dom,0,n)))),t)));var a,i,l,d})(n,s,e.schema,((e,t)=>Ee(e.schema.getTextInlineElements(),Ht(t)))(e,n));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):a.bind((e=>((e,t)=>{if(gs(e)){const n=hn('
');return t?V(Mn(e),(e=>{Tm(e)||xo(e)})):wo(e),vo(e,n),I.some(Vi.before(n.dom))}return I.none()})(e,r))).fold((()=>{o&&hh(e,t,l)}),(n=>{o&&hh(e,t,I.some(n))}))},yh=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Ch=(e,t)=>xn(yn(t),dd(e))&&!Ts(e.schema,t)&&e.dom.isEditable(t),wh=e=>{var t;return"rtl"===za.DOM.getStyle(e,"direction",!0)||(e=>yh.test(e))(null!==(t=e.textContent)&&void 0!==t?t:"")},xh=(e,t,n)=>{const o=((e,t,n)=>Y(za.DOM.getParents(n.container(),"*",t),e))(e,t,n);return I.from(o[o.length-1])},Eh=(e,t)=>{const n=t.container(),o=t.offset();return e?Fr(n)?er(n.nextSibling)?Vi(n.nextSibling,0):Vi.after(n):jr(t)?Vi(n,o+1):t:Fr(n)?er(n.previousSibling)?Vi(n.previousSibling,n.previousSibling.data.length):Vi.before(n):Hr(t)?Vi(n,o-1):t},_h=T(Eh,!0),Sh=T(Eh,!1),kh=(e,t)=>{const n=e=>e.stopImmediatePropagation();e.on("beforeinput input",n,!0),e.getDoc().execCommand(t),e.off("beforeinput input",n)},Nh=e=>kh(e,"Delete"),Rh=e=>_r(e)||kr(e),Ah=(e,t)=>Sn(e,t)?Jn(t,Rh,(e=>t=>Dt(An(t),e,_n))(e)):I.none(),Th=(e,t=!0)=>{e.dom.isEmpty(e.getBody())&&e.setContent("",{no_selection:!t})},Oh=(e,t,n)=>Mt(Ou(n),Bu(n),((o,r)=>{const s=Eh(!0,o),a=Eh(!1,r),i=Eh(!1,t);return e?Au(n,i).exists((e=>e.isEqual(a)&&t.isEqual(s))):Tu(n,i).exists((e=>e.isEqual(s)&&t.isEqual(a)))})).getOr(!0),Bh=e=>{var t;return(8===$t(t=e)||"#comment"===Ht(t)?Bn(e):Un(e)).bind(Bh).orThunk((()=>I.some(e)))},Ph=(e,t,n,o=!0)=>{var r;t.deleteContents();const s=Bh(n).getOr(n),a=yn(null!==(r=e.dom.getParent(s.dom,e.dom.isBlock))&&void 0!==r?r:n.dom);if(a.dom===e.getBody()?Th(e,o):gs(a)&&(Or(a),o&&e.selection.setCursorLocation(a.dom,0)),!_n(n,a)){const e=Dt(An(a),n)?[]:An(i=a).map(Mn).map((e=>Y(e,(e=>!_n(i,e))))).getOr([]);V(e.concat(Mn(n)),(e=>{_n(e,a)||Sn(e,a)||!gs(e)||xo(e)}))}var i},Dh=(e,t)=>((e,t)=>{const n=e.dom;return n.parentNode?((e,t)=>J(e.dom.childNodes,(e=>t(yn(e)))).map(yn))(yn(n.parentNode),(n=>!_n(e,n)&&t(n))):I.none()})(e,t).isSome(),Lh=(e,t)=>Zn(e,t).isSome(),Mh=e=>Uo(e,"td,th"),Ih=(e,t)=>tm(yn(e),t),Fh=(e,t)=>({start:e,end:t}),Uh=hl([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),zh=(e,t)=>no(yn(e),"td,th",t),jh=e=>!_n(e.start,e.end),Hh=(e,t)=>tm(e.start,t).bind((n=>tm(e.end,t).bind((e=>It(_n(n,e),n))))),$h=e=>t=>Hh(t,e).map((e=>((e,t,n)=>({rng:e,table:t,cells:n}))(t,e,Mh(e)))),qh=(e,t,n,o)=>{if(n.collapsed||!e.forall(jh))return I.none();if(t.isSameTable){const t=e.bind($h(o));return I.some({start:t,end:t})}{const e=zh(n.startContainer,o),t=zh(n.endContainer,o),r=e.bind((e=>t=>tm(t,e).bind((e=>de(Mh(e)).map((e=>Fh(t,e))))))(o)).bind($h(o)),s=t.bind((e=>t=>tm(t,e).bind((e=>le(Mh(e)).map((e=>Fh(e,t))))))(o)).bind($h(o));return I.some({start:r,end:s})}},Vh=(e,t)=>Z(e,(e=>_n(e,t))),Wh=e=>Mt(Vh(e.cells,e.rng.start),Vh(e.cells,e.rng.end),((t,n)=>e.cells.slice(t,n+1))),Kh=(e,t)=>{const{startTable:n,endTable:o}=t,r=e.cloneRange();return n.each((e=>r.setStartAfter(e.dom))),o.each((e=>r.setEndBefore(e.dom))),r},Yh=(e,t)=>{const n=(e=>t=>_n(e,t))(e),o=((e,t)=>{const n=zh(e.startContainer,t),o=zh(e.endContainer,t);return Mt(n,o,Fh)})(t,n),r=((e,t)=>{const n=Ih(e.startContainer,t),o=Ih(e.endContainer,t),r=n.isSome(),s=o.isSome(),a=Mt(n,o,_n).getOr(!1);return(e=>Mt(e.startTable,e.endTable,((t,n)=>{const o=Lh(t,(e=>_n(e,n))),r=Lh(n,(e=>_n(e,t)));return o||r?{...e,startTable:o?I.none():e.startTable,endTable:r?I.none():e.endTable,isSameTable:!1,isMultiTable:!1}:e})).getOr(e))({startTable:n,endTable:o,isStartInTable:r,isEndInTable:s,isSameTable:a,isMultiTable:!a&&r&&s})})(t,n);return((e,t,n)=>e.exists((e=>((e,t)=>!jh(e)&&Hh(e,t).exists((e=>{const t=e.dom.rows;return 1===t.length&&1===t[0].cells.length})))(e,n)&&rm(e.start,t))))(o,t,n)?o.map((e=>Uh.singleCellTable(t,e.start))):r.isMultiTable?((e,t,n,o)=>qh(e,t,n,o).bind((({start:e,end:o})=>{const r=e.bind(Wh).getOr([]),s=o.bind(Wh).getOr([]);if(r.length>0&&s.length>0){const e=Kh(n,t);return I.some(Uh.multiTable(r,s,e))}return I.none()})))(o,r,t,n):((e,t,n,o)=>qh(e,t,n,o).bind((({start:e,end:t})=>e.or(t))).bind((e=>{const{isSameTable:o}=t,r=Wh(e).getOr([]);if(o&&e.cells.length===r.length)return I.some(Uh.fullTable(e.table));if(r.length>0){if(o)return I.some(Uh.partialTable(r,I.none()));{const e=Kh(n,t);return I.some(Uh.partialTable(r,I.some({...t,rng:e})))}}return I.none()})))(o,r,t,n)},Gh=e=>V(e,(e=>{on(e,"contenteditable"),Or(e)})),Xh=(e,t,n,o)=>{const r=n.cloneRange();o?(r.setStart(n.startContainer,n.startOffset),r.setEndAfter(t.dom.lastChild)):(r.setStartBefore(t.dom.firstChild),r.setEnd(n.endContainer,n.endOffset)),eb(e,r,t,!1).each((e=>e()))},Qh=e=>{const t=em(e),n=yn(e.selection.getNode());cr(n.dom)&&gs(n)?e.selection.setCursorLocation(n.dom,0):e.selection.collapse(!0),t.length>1&&$(t,(e=>_n(e,n)))&&Jt(n,"data-mce-selected","1")},Jh=(e,t,n)=>I.some((()=>{const o=e.selection.getRng(),r=n.bind((({rng:n,isStartInTable:r})=>{const s=((e,t)=>I.from(e.dom.getParent(t,e.dom.isBlock)).map(yn))(e,r?n.endContainer:n.startContainer);n.deleteContents(),((e,t,n)=>{n.each((n=>{t?xo(n):(Or(n),e.selection.setCursorLocation(n.dom,0))}))})(e,r,s.filter(gs));const a=r?t[0]:t[t.length-1];return Xh(e,a,o,r),gs(a)?I.none():I.some(r?t.slice(1):t.slice(0,-1))})).getOr(t);Gh(r),Qh(e)})),Zh=(e,t,n,o)=>I.some((()=>{const r=e.selection.getRng(),s=t[0],a=n[n.length-1];Xh(e,s,r,!0),Xh(e,a,r,!1);const i=gs(s)?t:t.slice(1),l=gs(a)?n:n.slice(0,-1);Gh(i.concat(l)),o.deleteContents(),Qh(e)})),eb=(e,t,n,o=!0)=>I.some((()=>{Ph(e,t,n,o)})),tb=(e,t)=>I.some((()=>vh(e,!1,t))),nb=(e,t)=>J(Bp(t,e),Rr),ob=(e,t)=>J(Bp(t,e),Xt("caption")),rb=(e,t)=>I.some((()=>{Or(t),e.selection.setCursorLocation(t.dom,0)})),sb=(e,t)=>e?Np(t):Rp(t),ab=(e,t,n)=>{const o=yn(e.getBody());return ob(o,n).fold((()=>((e,t,n,o)=>{const r=Vi.fromRangeStart(e.selection.getRng());return nb(n,o).bind((o=>gs(o)?rb(e,o):((e,t,n,o,r)=>ku(n,e.getBody(),r).bind((e=>nb(t,yn(e.getNode())).bind((e=>_n(e,o)?I.none():I.some(_))))))(e,n,t,o,r)))})(e,t,o,n).orThunk((()=>It(((e,t)=>{const n=Vi.fromRangeStart(e.selection.getRng());return sb(t,n)||Su(t,e.getBody(),n).exists((e=>sb(t,e)))})(e,t),_)))),(n=>((e,t,n,o)=>{const r=Vi.fromRangeStart(e.selection.getRng());return gs(o)?rb(e,o):((e,t,n,o,r)=>ku(n,e.getBody(),r).fold((()=>I.some(_)),(s=>((e,t,n,o)=>Ou(e.dom).bind((r=>Bu(e.dom).map((e=>t?n.isEqual(r)&&o.isEqual(e):n.isEqual(e)&&o.isEqual(r))))).getOr(!0))(o,n,r,s)?((e,t)=>rb(e,t))(e,o):((e,t,n)=>ob(e,yn(n.getNode())).fold((()=>I.some(_)),(e=>It(!_n(e,t),_))))(t,o,s))))(e,n,t,o,r)})(e,t,o,n)))},ib=(e,t)=>{const n=yn(e.selection.getStart(!0)),o=em(e);return e.selection.isCollapsed()&&0===o.length?ab(e,t,n):((e,t,n)=>{const o=yn(e.getBody()),r=e.selection.getRng();return 0!==n.length?Jh(e,n,I.none()):((e,t,n,o)=>ob(t,o).fold((()=>((e,t,n)=>Yh(t,n).bind((t=>t.fold(T(eb,e),T(tb,e),T(Jh,e),T(Zh,e)))))(e,t,n)),(t=>((e,t)=>rb(e,t))(e,t))))(e,o,r,t)})(e,n,o)},lb=(e,t)=>{let n=t;for(;n&&n!==e;){if(lr(n)||dr(n))return n;n=n.parentNode}return null},db=["data-ephox-","data-mce-","data-alloy-","data-snooker-","_"],cb=Pt.each,ub=e=>{const t=e.dom,n=new Set(e.serializer.getTempAttrs()),o=e=>$(db,(t=>He(e,t)))||n.has(e);return{compare:(e,n)=>{if(e.nodeName!==n.nodeName||e.nodeType!==n.nodeType)return!1;const r=e=>{const n={};return cb(t.getAttribs(e),(r=>{const s=r.nodeName.toLowerCase();"style"===s||o(s)||(n[s]=t.getAttrib(e,s))})),n},s=(e,t)=>{for(const n in e)if(Ee(e,n)){const o=t[n];if(v(o))return!1;if(e[n]!==o)return!1;delete t[n]}for(const e in t)if(Ee(t,e))return!1;return!0};if(qo(e)&&qo(n)){if(!s(r(e),r(n)))return!1;if(!s(t.parseStyle(t.getAttrib(e,"style")),t.parseStyle(t.getAttrib(n,"style"))))return!1}return!Ku(e)&&!Ku(n)},isAttributeInternal:o}},mb=e=>["h1","h2","h3","h4","h5","h6"].includes(e.name),fb=(e,t,n,o)=>{const r=n.name;for(let t=0,s=e.length;t{const n=(e,n)=>{ge(e,(e=>{const o=ce(e.nodes);V(e.filter.callbacks,(r=>{for(let t=o.length-1;t>=0;t--){const r=o[t];(n?void 0!==r.attr(e.filter.name):r.name===e.filter.name)&&!y(r.parent)||o.splice(t,1)}o.length>0&&r(o,e.filter.name,t)}))}))};n(e.nodes,!1),n(e.attributes,!0)},pb=(e,t,n,o={})=>{const r=((e,t,n)=>{const o={nodes:{},attributes:{}};return n.firstChild&&((n,r)=>{let s=n;for(;s=s.walk();)fb(e,t,s,o)})(n),o})(e,t,n);gb(r,o)},hb=(e,t,n,o)=>{if((e.pad_empty_with_br||t.insert)&&n(o)){const e=new Wg("br",1);t.insert&&e.attr("data-mce-bogus","1"),o.empty().append(e)}else o.empty().append(new Wg("#text",3)).value=br},bb=(e,t)=>{const n=null==e?void 0:e.firstChild;return C(n)&&n===e.lastChild&&n.name===t},vb=(e,t,n,o)=>o.isEmpty(t,n,(t=>((e,t)=>{const n=e.getElementRule(t.name);return!0===(null==n?void 0:n.paddEmpty)})(e,t))),yb=e=>{let t;for(let n=e;n;n=n.parent){const e=n.attr("contenteditable");if("false"===e)break;"true"===e&&(t=n)}return I.from(t)},Cb=(e,t,n=e.parent)=>{if(t.getSpecialElements()[e.name])e.empty().remove();else{const o=e.children();for(const e of o)n&&!t.isValidChild(n.name,e.name)&&Cb(e,t,n);e.unwrap()}},wb=(e,t,n,o=_)=>{const r=t.getTextBlockElements(),s=t.getNonEmptyElements(),a=t.getWhitespaceElements(),i=Pt.makeMap("tr,td,th,tbody,thead,tfoot,table,summary"),l=new Set,d=e=>e!==n&&!i[e.name];for(let n=0;n1)if(xb(t,i,c))Cb(i,t);else{f.reverse(),u=f[0].clone(),o(u);let e=u;for(let n=0;n0?(m=f[n].clone(),o(m),e.append(m)):m=e;for(let e=f[n].firstChild;e&&e!==f[n+1];){const t=e.next;m.append(e),e=t}e=m}vb(t,s,a,u)?c.insert(i,f[0],!0):(c.insert(u,f[0],!0),c.insert(i,u)),c=f[0],(vb(t,s,a,c)||bb(c,"br"))&&c.empty().remove()}else if(i.parent){if("li"===i.name){let e=i.prev;if(e&&("ul"===e.name||"ol"===e.name)){e.append(i);continue}if(e=i.next,e&&("ul"===e.name||"ol"===e.name)&&e.firstChild){e.insert(i,e.firstChild,!0);continue}const t=new Wg("ul",1);o(t),i.wrap(t);continue}if(t.isValidChild(i.parent.name,"div")&&t.isValidChild("div",i.name)){const e=new Wg("div",1);o(e),i.wrap(e)}else Cb(i,t)}}},xb=(e,t,n=t.parent)=>!(!n||(!e.children[t.name]||e.isValidChild(n.name,t.name))&&("a"!==t.name||!((e,t)=>{let n=e;for(;n;){if("a"===n.name)return!0;n=n.parent}return!1})(n))&&(!(e=>"summary"===e.name)(n)||!mb(t)||(null==n?void 0:n.firstChild)===t&&(null==n?void 0:n.lastChild)===t)),Eb=e=>e.collapsed?e:(e=>{const t=Vi.fromRangeStart(e),n=Vi.fromRangeEnd(e),o=e.commonAncestorContainer;return Su(!1,o,n).map((r=>!Qc(t,n,o)&&Qc(t,r,o)?((e,t,n,o)=>{const r=document.createRange();return r.setStart(e,t),r.setEnd(n,o),r})(t.container(),t.offset(),r.container(),r.offset()):e)).getOr(e)})(e),_b=(e,t)=>{let n=t.firstChild,o=t.lastChild;return n&&"meta"===n.name&&(n=n.next),o&&"mce_marker"===o.attr("id")&&(o=o.prev),((e,t)=>{const n=e.getNonEmptyElements();return C(t)&&(t.isEmpty(n)||((e,t)=>e.getBlockElements()[t.name]&&(e=>C(e.firstChild)&&e.firstChild===e.lastChild)(t)&&(e=>"br"===e.name||e.value===br)(t.firstChild))(e,t))})(e,o)&&(o=null==o?void 0:o.prev),!(!n||n!==o||"ul"!==n.name&&"ol"!==n.name)},Sb=e=>{return e.length>0&&(!(n=e[e.length-1]).firstChild||C(null==(t=n)?void 0:t.firstChild)&&t.firstChild===t.lastChild&&(e=>e.data===br||ar(e))(t.firstChild))?e.slice(0,-1):e;var t,n},kb=(e,t)=>{const n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},Nb=(e,t)=>{const n=Vi.after(e),o=wu(t).prev(n);return o?o.toRange():null},Rb=(e,t,n,o)=>{const r=((e,t,n)=>{const o=t.serialize(n);return(e=>{var t,n;const o=e.firstChild,r=e.lastChild;return o&&"META"===o.nodeName&&(null===(t=o.parentNode)||void 0===t||t.removeChild(o)),r&&"mce_marker"===r.id&&(null===(n=r.parentNode)||void 0===n||n.removeChild(r)),e})(e.createFragment(o))})(t,e,o),s=kb(t,n.startContainer),a=Sb((i=r.firstChild,Y(null!==(l=null==i?void 0:i.childNodes)&&void 0!==l?l:[],(e=>"LI"===e.nodeName))));var i,l;const d=t.getRoot(),c=e=>{const o=Vi.fromRangeStart(n),r=wu(t.getRoot()),a=1===e?r.prev(o):r.next(o),i=null==a?void 0:a.getNode();return!i||kb(t,i)!==s};return s?c(1)?((e,t,n)=>{const o=e.parentNode;return o&&Pt.each(t,(t=>{o.insertBefore(t,e)})),((e,t)=>{const n=Vi.before(e),o=wu(t).next(n);return o?o.toRange():null})(e,n)})(s,a,d):c(2)?((e,t,n,o)=>(o.insertAfter(t.reverse(),e),Nb(t[0],n)))(s,a,d,t):((e,t,n,o)=>{const r=((e,t)=>{const n=t.cloneRange(),o=t.cloneRange();return n.setStartBefore(e),o.setEndAfter(e),[n.cloneContents(),o.cloneContents()]})(e,o),s=e.parentNode;return s&&(s.insertBefore(r[0],e),Pt.each(t,(t=>{s.insertBefore(t,e)})),s.insertBefore(r[1],e),s.removeChild(e)),Nb(t[t.length-1],n)})(s,a,d,n):null},Ab=["pre"],Tb=cr,Ob=(e,t,n)=>{var o,r;const s=e.selection,a=e.dom,i=e.parser,l=n.merge,d=up({validate:!0},e.schema),c='';n.preserve_zwsp||(t=Dr(t)),-1===t.indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,c);let u=s.getRng();const m=u.startContainer,f=e.getBody();m===f&&s.isCollapsed()&&a.isBlock(f.firstChild)&&((e,t)=>C(t)&&!e.schema.getVoidElements()[t.nodeName])(e,f.firstChild)&&a.isEmpty(f.firstChild)&&(u=a.createRng(),u.setStart(f.firstChild,0),u.setEnd(f.firstChild,0),s.setRng(u)),s.isCollapsed()||(e=>{const t=e.dom,n=Eb(e.selection.getRng());e.selection.setRng(n);const o=t.getParent(n.startContainer,Tb);((e,t,n)=>!!C(n)&&n===e.getParent(t.endContainer,Tb)&&rm(yn(n),t))(t,n,o)?eb(e,n,yn(o)):n.startContainer===n.endContainer&&n.endOffset-n.startOffset==1&&er(n.startContainer.childNodes[n.startOffset])?n.deleteContents():e.getDoc().execCommand("Delete",!1)})(e);const g=s.getNode(),p={context:g.nodeName.toLowerCase(),data:n.data,insert:!0},h=i.parse(t,p);if(!0===n.paste&&_b(e.schema,h)&&((e,t)=>!!kb(e,t))(a,g))return u=Rb(d,a,s.getRng(),h),u&&s.setRng(u),t;!0===n.paste&&((e,t,n,o)=>{var r;const s=t.firstChild,a=t.lastChild,i=s===("bookmark"===a.attr("data-mce-type")?a.prev:a),l=H(Ab,s.name);if(i&&l){const t="false"!==s.attr("contenteditable"),a=(null===(r=e.getParent(n,e.isBlock))||void 0===r?void 0:r.nodeName.toLowerCase())===s.name,i=I.from(lb(o,n)).forall(lr);return t&&a&&i}return!1})(a,h,g,e.getBody())&&(null===(o=h.firstChild)||void 0===o||o.unwrap()),(e=>{let t=e;for(;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")})(h);let b=h.lastChild;if(b&&"mce_marker"===b.attr("id")){const t=b;for(b=b.prev;b;b=b.walk(!0))if(3===b.type||!a.isBlock(b.name)){b.parent&&e.schema.isValidChild(b.parent.name,"span")&&b.parent.insert(t,b,"br"===b.name);break}}if(e._selectionOverrides.showBlockCaretContainer(g),p.invalid||((e,t,n)=>{var o;return $(n.children(),mb)&&"SUMMARY"===(null===(o=e.getParent(t,e.isBlock))||void 0===o?void 0:o.nodeName)})(a,g,h)){e.selection.setContent(c);let n,o=s.getNode();const l=e.getBody();for(rr(o)?o=n=l:n=o;n&&n!==l;)o=n,n=n.parentNode;t=o===l?l.innerHTML:a.getOuterHTML(o);const u=i.parse(t),m=(e=>{for(let t=e;t;t=t.walk())if("mce_marker"===t.attr("id"))return I.some(t);return I.none()})(u),f=m.bind(yb).getOr(u);m.each((e=>e.replace(h)));const g=h.children(),p=null!==(r=h.parent)&&void 0!==r?r:u;h.unwrap();const b=Y(g,(t=>xb(e.schema,t,p)));wb(b,e.schema,f),pb(i.getNodeFilters(),i.getAttributeFilters(),u),t=d.serialize(u),o===l?a.setHTML(l,t):a.setOuterHTML(o,t)}else t=d.serialize(h),((e,t,n)=>{var o;if("all"===n.getAttribute("data-mce-bogus"))null===(o=n.parentNode)||void 0===o||o.insertBefore(e.dom.createFragment(t),n);else{const o=n.firstChild,r=n.lastChild;!o||o===r&&"BR"===o.nodeName?e.dom.setHTML(n,t):e.selection.setContent(t,{no_events:!0})}})(e,t,g);var v;return((e,t)=>{const n=e.schema.getTextInlineElements(),o=e.dom;if(t){const t=e.getBody(),r=ub(e);Pt.each(o.select("*[data-mce-fragment]"),(e=>{if(C(n[e.nodeName.toLowerCase()])&&((e,t)=>ne(gp(e,t),(e=>!(e=>mp.has(e))(e))))(o,e))for(let n=e.parentElement;C(n)&&n!==t&&!pp(o,e,n);n=n.parentElement)if(r.compare(n,e)){o.remove(e,!0);break}}))}})(e,l),((e,t)=>{var n,o,r;let s;const a=e.dom,i=e.selection;if(!t)return;i.scrollIntoView(t);const l=lb(e.getBody(),t);if(l&&"false"===a.getContentEditable(l))return a.remove(t),void i.select(l);let d=a.createRng();const c=t.previousSibling;if(er(c)){d.setStart(c,null!==(o=null===(n=c.nodeValue)||void 0===n?void 0:n.length)&&void 0!==o?o:0);const e=t.nextSibling;er(e)&&(c.appendData(e.data),null===(r=e.parentNode)||void 0===r||r.removeChild(e))}else d.setStartBefore(t),d.setEndBefore(t);const u=a.getParent(t,a.isBlock);if(a.remove(t),u&&a.isEmpty(u)){const t=Tb(u);wo(yn(u)),d.setStart(u,0),d.setEnd(u,0),t||(e=>!!e.getAttribute("data-mce-fragment"))(u)||!(s=(t=>{let n=Vi.fromRangeStart(t);return n=wu(e.getBody()).next(n),null==n?void 0:n.toRange()})(d))?a.add(u,a.create("br",t?{}:{"data-mce-bogus":"1"})):(d=s,a.remove(u))}i.setRng(d)})(e,a.get("mce_marker")),v=e.getBody(),Pt.each(v.getElementsByTagName("*"),(e=>{e.removeAttribute("data-mce-fragment")})),((e,t,n)=>{I.from(e.getParent(t,"td,th")).map(yn).each((e=>((e,t)=>{Un(e).each((n=>{Bn(n).each((o=>{t.isBlock(Ht(e))&&Er(n)&&t.isBlock(Ht(o))&&xo(n)}))}))})(e,n)))})(a,s.getStart(),e.schema),((e,t,n)=>{const o=On(yn(n),(e=>_n(e,yn(t))));ie(o,o.length-2).filter(Wt).fold((()=>Ss(e,t)),(t=>Ss(e,t.dom)))})(e.schema,e.getBody(),s.getStart()),t},Bb=e=>e instanceof Wg,Pb=(e,t,n)=>{e.dom.setHTML(e.getBody(),t),!0!==n&&(e=>{Rg(e)&&Ou(e.getBody()).each((t=>{const n=t.getNode(),o=Qo(n)?Ou(n).getOr(t):t;e.selection.setRng(o.toRange())}))})(e)},Db=e=>w(e)?e:L,Lb=(e,t,n)=>{const o=t(e),r=Db(n);return o.orThunk((()=>r(e)?I.none():((e,t,n)=>{let o=e.dom;const r=Db(n);for(;o.parentNode;){o=o.parentNode;const e=yn(o),n=t(e);if(n.isSome())return n;if(r(e))break}return I.none()})(e,t,r)))},Mb=ym,Ib=(e,t,n)=>{const o=e.formatter.get(n);if(o)for(let n=0;n{const s=e.dom.getRoot();if(t===s)return!1;const a=e.dom.getParent(t,(t=>!!Ib(e,t,n)||t.parentNode===s||!!jb(e,t,n,o,!0)));return!!jb(e,a,n,o,r)},Ub=(e,t,n)=>!(!Nm(n)||!Mb(t,n.inline))||!(!Sm(n)||!Mb(t,n.block))||!!km(n)&&qo(t)&&e.is(t,n.selector),zb=(e,t,n,o,r,s)=>{const a=n[o],i="attributes"===o;if(w(n.onmatch))return n.onmatch(t,n,o);if(a)if(ke(a)){for(let n=0;n{const s=e.formatter.get(n),a=e.dom;if(s&&qo(t))for(let n=0;n{if(o)return Fb(e,o,t,n,r);if(o=e.selection.getNode(),Fb(e,o,t,n,r))return!0;const s=e.selection.getStart();return!(s===o||!Fb(e,s,t,n,r))},$b=Br,qb=e=>{if(e){const t=new jo(e,e);for(let e=t.current();e;e=t.next())if(er(e))return e}return null},Vb=e=>{const t=bn("span");return Zt(t,{id:Pu,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&vo(t,vn($b)),t},Wb=(e,t,n)=>{const o=e.dom,r=e.selection;if(Am(t))vh(e,!1,yn(t),n,!0);else{const e=r.getRng(),n=o.getParent(t,o.isBlock),s=e.startContainer,a=e.startOffset,i=e.endContainer,l=e.endOffset,d=(e=>{const t=qb(e);return t&&t.data.charAt(0)===$b&&t.deleteData(0,1),t})(t);o.remove(t,!0),s===d&&a>0&&e.setStart(d,a-1),i===d&&l>0&&e.setEnd(d,l-1),n&&o.isEmpty(n)&&Or(yn(n)),r.setRng(e)}},Kb=(e,t,n)=>{const o=e.dom,r=e.selection;if(t)Wb(e,t,n);else if(!(t=Lu(e.getBody(),r.getStart())))for(;t=o.get(Pu);)Wb(e,t,n)},Yb=(e,t)=>(e.appendChild(t),t),Gb=(e,t)=>{var n;const o=G(e,((e,t)=>Yb(e,t.cloneNode(!1))),t),r=null!==(n=o.ownerDocument)&&void 0!==n?n:document;return Yb(o,r.createTextNode($b))},Xb=(e,t,n,o)=>{const a=e.dom,i=e.selection;let l=!1;const d=e.formatter.get(t);if(!d)return;const c=i.getRng(),u=c.startContainer,m=c.startOffset;let f=u;er(u)&&(m!==u.data.length&&(l=!0),f=f.parentNode);const g=[];let h;for(;f;){if(jb(e,f,t,n,o)){h=f;break}f.nextSibling&&(l=!0),g.push(f),f=f.parentNode}if(h)if(l){const r=i.getBookmark();c.collapse(!0);let s=Vm(a,c,d,!0);s=Ff(s),e.formatter.remove(t,n,s,o),i.moveToBookmark(r)}else{const l=Lu(e.getBody(),h),d=C(l)?a.getParents(h.parentNode,M,l):[],c=Vb(!1).dom;((e,t,n)=>{var o,r;const s=e.dom,a=s.getParent(n,T(gm,e.schema));a&&s.isEmpty(a)?null===(o=n.parentNode)||void 0===o||o.replaceChild(t,n):((e=>{const t=Uo(e,"br"),n=Y((e=>{const t=[];let n=e.dom;for(;n;)t.push(yn(n)),n=n.lastChild;return t})(e).slice(-1),Er);t.length===n.length&&V(n,xo)})(yn(n)),s.isEmpty(n)?null===(r=n.parentNode)||void 0===r||r.replaceChild(t,n):s.insertAfter(t,n))})(e,c,null!=l?l:h);const u=((e,t,n,o,a,i)=>{const l=e.formatter,d=e.dom,c=Y(me(l.get()),(e=>e!==o&&!je(e,"removeformat"))),u=((e,t,n)=>X(n,((n,o)=>{const r=((e,t)=>_m(e,t,(e=>{const t=e=>w(e)||e.length>1&&"%"===e.charAt(0);return $(["styles","attributes"],(n=>xe(e,n).exists((e=>{const n=p(e)?e:we(e);return $(n,t)}))))})))(e,o);return e.formatter.matchNode(t,o,{},r)?n.concat([o]):n}),[]))(e,n,c);if(Y(u,(t=>!((e,t,n)=>{const o=["inline","block","selector","attributes","styles","classes"],a=e=>ye(e,((e,t)=>$(o,(e=>e===t))));return _m(e,t,(t=>{const o=a(t);return _m(e,n,(e=>{const t=a(e);return((e,t,n=s)=>r(n).eq(e,t))(o,t)}))}))})(e,t,o))).length>0){const e=n.cloneNode(!1);return d.add(t,e),l.remove(o,a,e,i),d.remove(e),I.some(e)}return I.none()})(e,c,h,t,n,o),m=Gb([...g,...u.toArray(),...d],c);l&&Wb(e,l,C(l)),i.setCursorLocation(m,1),a.isEmpty(h)&&a.remove(h)}},Qb=e=>{const t=Vb(!1),n=Gb(e,t.dom);return{caretContainer:t,caretPosition:Vi(n,0)}},Jb=(e,t)=>{const{caretContainer:n,caretPosition:o}=Qb(t);return po(yn(e),n),xo(yn(e)),o},Zb=(e,t)=>{if(Du(t.dom))return!1;const n=e.schema.getTextInlineElements();return Ee(n,Ht(t))&&!Du(t.dom)&&!Xo(t.dom)},ev={},tv=Ko(["pre"]);((e,t)=>{ev[e]||(ev[e]=[]),ev[e].push((e=>{if(!e.selection.getRng().collapsed){const t=e.selection.getSelectedBlocks(),n=Y(Y(t,tv),(e=>t=>{const n=t.previousSibling;return tv(n)&&H(e,n)})(t));V(n,(e=>{((e,t)=>{const n=yn(t),o=Nn(n).dom;xo(n),Co(yn(e),[bn("br",o),bn("br",o),...Mn(n)])})(e.previousSibling,e)}))}}))})("pre");const nv=["fontWeight","fontStyle","color","fontSize","fontFamily"],ov=(e,t)=>{const n=e.get(t);return p(n)?J(n,(e=>Nm(e)&&"span"===e.inline&&(e=>f(e.styles)&&$(me(e.styles),(e=>H(nv,e))))(e))):I.none()},rv=(e,t)=>Tu(t,Vi.fromRangeStart(e)).isNone(),sv=(e,t)=>!1===Au(t,Vi.fromRangeEnd(e)).exists((e=>!ar(e.getNode())||Au(t,e).isSome())),av=e=>t=>fr(t)&&e.isEditable(t),iv=e=>Y(e.getSelectedBlocks(),av(e.dom)),lv=Pt.each,dv=e=>qo(e)&&!Ku(e)&&!Du(e)&&!Xo(e),cv=(e,t)=>{for(let n=e;n;n=n[t]){if(er(n)&&Ye(n.data))return e;if(qo(n)&&!Ku(n))return n}return e},uv=(e,t,n)=>{const o=ub(e),r=Vo(t)&&e.dom.isEditable(t),s=Vo(n)&&e.dom.isEditable(n);if(r&&s){const r=cv(t,"previousSibling"),s=cv(n,"nextSibling");if(o.compare(r,s)){for(let e=r.nextSibling;e&&e!==s;){const t=e;e=e.nextSibling,r.appendChild(t)}return e.dom.remove(s),Pt.each(Pt.grep(s.childNodes),(e=>{r.appendChild(e)})),r}}return n},mv=(e,t,n,o)=>{var r;if(o&&!1!==t.merge_siblings){const t=null!==(r=uv(e,fm(o),o))&&void 0!==r?r:o;uv(e,t,fm(t,!0))}},fv=(e,t,n)=>{lv(e.childNodes,(e=>{dv(e)&&(t(e)&&n(e),e.hasChildNodes()&&fv(e,t,n))}))},gv=(e,t)=>n=>!(!n||!wm(e,n,t)),pv=(e,t,n)=>o=>{e.setStyle(o,t,n),""===o.getAttribute("style")&&o.removeAttribute("style"),((e,t)=>{"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)})(e,o)},hv=hl([{keep:[]},{rename:["name"]},{removed:[]}]),bv=/^(src|href|style)$/,vv=Pt.each,yv=ym,Cv=(e,t,n)=>e.isChildOf(t,n)&&t!==n&&!e.isBlock(n),wv=(e,t,n)=>{let o=t[n?"startContainer":"endContainer"],r=t[n?"startOffset":"endOffset"];if(qo(o)){const e=o.childNodes.length-1;!n&&r&&r--,o=o.childNodes[r>e?e:r]}return er(o)&&n&&r>=o.data.length&&(o=new jo(o,e.getBody()).next()||o),er(o)&&!n&&0===r&&(o=new jo(o,e.getBody()).prev()||o),o},xv=(e,t)=>{const n=t?"firstChild":"lastChild",o=e[n];return(e=>/^(TR|TH|TD)$/.test(e.nodeName))(e)&&o?"TR"===e.nodeName&&o[n]||o:e},Ev=(e,t,n,o)=>{var r;const s=e.create(n,o);return null===(r=t.parentNode)||void 0===r||r.insertBefore(s,t),s.appendChild(t),s},_v=(e,t,n,o,r)=>{const s=yn(t),a=yn(e.create(o,r)),i=n?Ln(s):Dn(s);return Co(a,i),n?(po(s,a),bo(a,s)):(ho(s,a),vo(a,s)),a.dom},Sv=(e,t,n)=>{const o=t.parentNode;let r;const s=e.dom,a=Il(e);Sm(n)&&o===s.getRoot()&&(n.list_block&&yv(t,n.list_block)||V(ce(t.childNodes),(t=>{pm(e,a,t.nodeName.toLowerCase())?r?r.appendChild(t):(r=Ev(s,t,a),s.setAttribs(r,Fl(e))):r=null}))),(e=>km(e)&&Nm(e)&&Dt(xe(e,"mixed"),!0))(n)&&!yv(n.inline,t)||s.remove(t,!0)},kv=(e,t,n)=>x(e)?{name:t,value:null}:{name:e,value:vm(t,n)},Nv=(e,t)=>{""===e.getAttrib(t,"style")&&(t.removeAttribute("style"),t.removeAttribute("data-mce-style"))},Rv=(e,t,n,o,r)=>{let s=!1;vv(n.styles,((a,i)=>{const{name:l,value:d}=kv(i,a,o),c=Cm(d,l);(n.remove_similar||h(d)||!qo(r)||yv(wm(e,r,l),c))&&e.setStyle(t,l,""),s=!0})),s&&Nv(e,t)},Av=(e,t,n,o,r)=>{const s=e.dom,a=ub(e),i=e.schema;if(Nm(t)&&Rs(i,t.inline)&&Ts(i,o)&&o.parentElement===e.getBody())return Sv(e,o,t),hv.removed();if(!t.ceFalseOverride&&o&&"false"===s.getContentEditableParent(o))return hv.keep();if(o&&!Ub(s,o,t)&&!((e,t)=>t.links&&"A"===e.nodeName)(o,t))return hv.keep();const l=o,d=t.preserve_attributes;if(Nm(t)&&"all"===t.remove&&p(d)){const e=Y(s.getAttribs(l),(e=>H(d,e.name.toLowerCase())));if(s.removeAllAttribs(l),V(e,(e=>s.setAttrib(l,e.name,e.value))),e.length>0)return hv.rename("span")}if("all"!==t.remove){Rv(s,l,t,n,r),vv(t.attributes,((e,o)=>{const{name:a,value:i}=kv(o,e,n);if(t.remove_similar||h(i)||!qo(r)||yv(s.getAttrib(r,a),i)){if("class"===a){const e=s.getAttrib(l,a);if(e){let t="";if(V(e.split(/\s+/),(e=>{/mce\-\w+/.test(e)&&(t+=(t?" ":"")+e)})),t)return void s.setAttrib(l,a,t)}}if(bv.test(a)&&l.removeAttribute("data-mce-"+a),"style"===a&&Ko(["li"])(l)&&"none"===s.getStyle(l,"list-style-type"))return l.removeAttribute(a),void s.setStyle(l,"list-style-type","none");"class"===a&&l.removeAttribute("className"),l.removeAttribute(a)}})),vv(t.classes,(e=>{e=vm(e,n),qo(r)&&!s.hasClass(r,e)||s.removeClass(l,e)}));const e=s.getAttribs(l);for(let t=0;tAv(e,t,n,o,o).fold(N(o),(t=>(e.dom.createFragment().appendChild(o),e.dom.rename(o,t))),N(null)),Ov=(e,t,n,o,r)=>{(o||e.selection.isEditable())&&((e,t,n,o,r)=>{const s=e.formatter.get(t),a=s[0],i=e.dom,l=e.selection,d=o=>{const i=((e,t,n,o,r)=>{let s;return t.parentNode&&V(Em(e.dom,t.parentNode).reverse(),(t=>{if(!s&&qo(t)&&"_start"!==t.id&&"_end"!==t.id){const a=jb(e,t,n,o,r);a&&!1!==a.split&&(s=t)}})),s})(e,o,t,n,r);return((e,t,n,o,r,s,a,i)=>{var l,d;let c,u;const m=e.dom;if(n){const s=n.parentNode;for(let n=o.parentNode;n&&n!==s;n=n.parentNode){let o=m.clone(n,!1);for(let n=0;n$(s,(o=>Bv(e,o,n,t,t))),u=t=>{const n=ce(t.childNodes),o=c(t)||$(s,(e=>Ub(i,t,e))),r=t.parentNode;if(!o&&C(r)&&Rm(a)&&c(r),a.deep&&n.length)for(let e=0;e{qo(t)&&e.dom.getStyle(t,"text-decoration")===n&&t.parentNode&&xm(i,t.parentNode)===n&&Bv(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:n}},void 0,t)}))},m=e=>{const t=i.get(e?"_start":"_end");if(t){let n=t[e?"firstChild":"lastChild"];return(e=>Ku(e)&&qo(e)&&("_start"===e.id||"_end"===e.id))(n)&&(n=n[e?"firstChild":"lastChild"]),er(n)&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),i.remove(t,!0),n}return null},f=t=>{let n,o,r=Vm(i,t,s,t.collapsed);if(a.split){if(r=Ff(r),n=wv(e,r,!0),o=wv(e,r),n!==o){if(n=xv(n,!0),o=xv(o,!1),Cv(i,n,o)){const e=I.from(n.firstChild).getOr(n);return d(_v(i,e,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void m(!0)}if(Cv(i,o,n)){const e=I.from(o.lastChild).getOr(o);return d(_v(i,e,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void m(!1)}n=Ev(i,n,"span",{id:"_start","data-mce-type":"bookmark"}),o=Ev(i,o,"span",{id:"_end","data-mce-type":"bookmark"});const e=i.createRng();e.setStartAfter(n),e.setEndBefore(o),Wm(i,e,(e=>{V(e,(e=>{Ku(e)||Ku(e.parentNode)||d(e)}))})),d(n),d(o),n=m(!0),o=m()}else n=o=d(n);r.startContainer=n.parentNode?n.parentNode:n,r.startOffset=i.nodeIndex(n),r.endContainer=o.parentNode?o.parentNode:o,r.endOffset=i.nodeIndex(o)+1}Wm(i,r,(e=>{V(e,u)}))};if(o){if(dm(o)){const e=i.createRng();e.setStartBefore(o),e.setEndAfter(o),f(e)}else f(o);nf(e,t,o,n)}else l.isCollapsed()&&Nm(a)&&!em(e).length?Xb(e,t,n,r):(um(e,(()=>im(e,f)),(o=>Nm(a)&&Hb(e,t,n,o))),e.nodeChanged()),((e,t,n)=>{"removeformat"===t?V(iv(e.selection),(t=>{V(nv,(n=>e.dom.setStyle(t,n,""))),Nv(e.dom,t)})):ov(e.formatter,t).each((t=>{V(iv(e.selection),(o=>Rv(e.dom,o,t,n,null)))}))})(e,t,n),nf(e,t,o,n)})(e,t,n,o,r)},Bv=(e,t,n,o,r)=>Av(e,t,n,o,r).fold(L,(t=>(e.dom.rename(o,t),!0)),M),Pv=Pt.each,Dv=Pt.each,Lv=(e,t,n,o)=>{if(Dv(n.styles,((n,r)=>{e.setStyle(t,r,vm(n,o))})),n.styles){const n=e.getAttrib(t,"style");n&&e.setAttrib(t,"data-mce-style",n)}},Mv=(e,t,n,o)=>{const r=e.formatter.get(t),s=r[0],a=!o&&e.selection.isCollapsed(),i=e.dom,l=e.selection,d=(e,t=s)=>{w(t.onformat)&&t.onformat(e,t,n,o),Lv(i,e,t,n),Dv(t.attributes,((t,o)=>{i.setAttrib(e,o,vm(t,n))})),Dv(t.classes,(t=>{const o=vm(t,n);i.hasClass(e,o)||i.addClass(e,o)}))},c=(e,t)=>{let n=!1;return Dv(e,(e=>!(!km(e)||("false"!==i.getContentEditable(t)||e.ceFalseOverride)&&(!C(e.collapsed)||e.collapsed===a)&&i.is(t,e.selector)&&!Du(t)&&(d(t,e),n=!0,1)))),n},u=e=>{if(m(e)){const t=i.create(e);return d(t),t}return null},f=(o,a,i)=>{const l=[];let m=!0;const f=s.inline||s.block,g=u(f);Wm(o,a,(a=>{let u;const p=a=>{let h=!1,b=m,v=!1;const y=a.parentNode,w=y.nodeName.toLowerCase(),x=o.getContentEditable(a);C(x)&&(b=m,m="true"===x,h=!0,v=bm(e,a));const E=m&&!h;if(ar(a)&&!((e,t,n,o)=>{if(xd(e)&&Nm(t)&&n.parentNode){const t=da(e.schema),r=Dh(yn(n),(e=>Du(e.dom)));return _e(t,o)&&gs(yn(n.parentNode),!1)&&!r}return!1})(e,s,a,w))return u=null,void(Sm(s)&&o.remove(a));if((o=>(e=>Sm(e)&&!0===e.wrapper)(s)&&jb(e,o,t,n))(a))u=null;else{if(((t,n,o)=>{const r=(e=>Sm(e)&&!0!==e.wrapper)(s)&&gm(e.schema,t)&&pm(e,n,f);return o&&r})(a,w,E)){const e=o.rename(a,f);return d(e),l.push(e),void(u=null)}if(km(s)){let e=c(r,a);if(!e&&C(y)&&Rm(s)&&(e=c(r,y)),!Nm(s)||e)return void(u=null)}C(g)&&((t,n,r,a)=>{const l=t.nodeName.toLowerCase(),d=pm(e,f,l)&&pm(e,n,f),c=!i&&er(t)&&Pr(t.data),u=Du(t),m=!Nm(s)||!o.isBlock(t);return(r||a)&&d&&!c&&!u&&m})(a,w,E,v)?(u||(u=o.clone(g,!1),y.insertBefore(u,a),l.push(u)),v&&h&&(m=b),u.appendChild(a)):(u=null,V(ce(a.childNodes),p),h&&(m=b),u=null)}};V(a,p)})),!0===s.links&&V(l,(e=>{const t=e=>{"A"===e.nodeName&&d(e,s),V(ce(e.childNodes),t)};t(e)})),V(l,(a=>{const i=(e=>{let t=0;return V(e.childNodes,(e=>{(e=>C(e)&&er(e)&&0===e.length)(e)||Ku(e)||t++})),t})(a);!(l.length>1)&&o.isBlock(a)||0!==i?(Nm(s)||Sm(s)&&s.wrapper)&&(s.exact||1!==i||(a=(e=>{const t=J(e.childNodes,cm).filter((e=>"false"!==o.getContentEditable(e)&&Ub(o,e,s)));return t.map((t=>{const n=o.clone(t,!1);return d(n),o.replace(n,e,!0),o.remove(t,!0),n})).getOr(e)})(a)),((e,t,n,o)=>{Pv(t,(t=>{Nm(t)&&Pv(e.dom.select(t.inline,o),(o=>{dv(o)&&Bv(e,t,n,o,t.exact?o:null)})),((e,t,n)=>{if(t.clear_child_styles){const o=t.links?"*:not(a)":"*";lv(e.select(o,n),(n=>{dv(n)&&e.isEditable(n)&&lv(t.styles,((t,o)=>{e.setStyle(n,o,"")}))}))}})(e.dom,t,o)}))})(e,r,n,a),((e,t,n,o,r)=>{const s=r.parentNode;jb(e,s,n,o)&&Bv(e,t,o,r)||t.merge_with_parents&&s&&e.dom.getParent(s,(s=>!!jb(e,s,n,o)&&(Bv(e,t,o,r),!0)))})(e,s,t,n,a),((e,t,n,o)=>{if(t.styles&&t.styles.backgroundColor){const r=gv(e,"fontSize");fv(o,(t=>r(t)&&e.isEditable(t)),pv(e,"backgroundColor",vm(t.styles.backgroundColor,n)))}})(o,s,n,a),((e,t,n,o)=>{const r=t=>{if(Vo(t)&&qo(t.parentNode)&&e.isEditable(t)){const n=xm(e,t.parentNode);e.getStyle(t,"color")&&n?e.setStyle(t,"text-decoration",n):e.getStyle(t,"text-decoration")===n&&e.setStyle(t,"text-decoration",null)}};t.styles&&(t.styles.color||t.styles.textDecoration)&&(Pt.walk(o,r,"childNodes"),r(o))})(o,s,0,a),((e,t,n,o)=>{if(Nm(t)&&("sub"===t.inline||"sup"===t.inline)){const n=gv(e,"fontSize");fv(o,(t=>n(t)&&e.isEditable(t)),pv(e,"fontSize",""));const r=Y(e.select("sup"===t.inline?"sub":"sup",o),e.isEditable);e.remove(r,!0)}})(o,s,0,a),mv(e,s,0,a)):o.remove(a,!0)}))},g=dm(o)?o:l.getNode();if("false"===i.getContentEditable(g)&&!bm(e,g))return c(r,o=g),void tf(e,t,o,n);if(s){if(o)if(dm(o)){if(!c(r,o)){const e=i.createRng();e.setStartBefore(o),e.setEndAfter(o),f(i,Vm(i,e,r),!0)}}else f(i,o,!0);else a&&Nm(s)&&!em(e).length?((e,t,n)=>{let o;const r=e.selection,s=e.formatter.get(t);if(!s)return;const a=r.getRng();let i=a.startOffset;const l=a.startContainer.nodeValue;o=Lu(e.getBody(),r.getStart());const d=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(l&&i>0&&i{im(e,((e,t)=>{const n=t?e:Vm(i,e,r);f(i,n,!1)}))}),M),e.nodeChanged()),ov(e.formatter,t).each((t=>{V((e=>Y((e=>{const t=e.getSelectedBlocks(),n=e.getRng();if(e.isCollapsed())return[];if(1===t.length)return rv(n,t[0])&&sv(n,t[0])?t:[];{const e=le(t).filter((e=>rv(n,e))).toArray(),o=de(t).filter((e=>sv(n,e))).toArray(),r=t.slice(1,-1);return e.concat(r).concat(o)}})(e),av(e.dom)))(e.selection),(e=>Lv(i,e,t,n)))}));((e,t)=>{Ee(ev,e)&&V(ev[e],(e=>{e(t)}))})(t,e)}tf(e,t,o,n)},Iv=(e,t,n,o)=>{(o||e.selection.isEditable())&&Mv(e,t,n,o)},Fv=e=>Ee(e,"vars"),Uv=e=>e.selection.getStart(),zv=(e,t,n,o,r)=>Q(t,(t=>{const s=e.formatter.matchNode(t,n,null!=r?r:{},o);return!v(s)}),(t=>!!Ib(e,t,n)||!o&&C(e.formatter.matchNode(t,n,r,!0)))),jv=(e,t)=>{const n=null!=t?t:Uv(e);return Y(Em(e.dom,n),(e=>qo(e)&&!Xo(e)))},Hv=(e,t,n)=>{const o=jv(e,t);ge(n,((n,r)=>{const s=n=>{const s=zv(e,o,r,n.similar,Fv(n)?n.vars:void 0),a=s.isSome();if(n.state.get()!==a){n.state.set(a);const e=s.getOr(t);Fv(n)?n.callback(a,{node:e,format:r,parents:o}):V(n.callbacks,(t=>t(a,{node:e,format:r,parents:o})))}};V([n.withSimilar,n.withoutSimilar],s),V(n.withVars,s)}))},$v=Pt.explode,qv=()=>{const e={};return{addFilter:(t,n)=>{V($v(t),(t=>{Ee(e,t)||(e[t]={name:t,callbacks:[]}),e[t].callbacks.push(n)}))},getFilters:()=>we(e),removeFilter:(t,n)=>{V($v(t),(t=>{if(Ee(e,t))if(C(n)){const o=e[t],r=Y(o.callbacks,(e=>e!==n));r.length>0?o.callbacks=r:delete e[t]}else delete e[t]}))}}},Vv=(e,t,n)=>{var o;const r=wa();t.convert_fonts_to_spans&&((e,t,n)=>{e.addNodeFilter("font",(e=>{V(e,(e=>{const o=t.parse(e.attr("style")),r=e.attr("color"),s=e.attr("face"),a=e.attr("size");r&&(o.color=r),s&&(o["font-family"]=s),a&&Xe(a).each((e=>{o["font-size"]=n[e-1]})),e.name="span",e.attr("style",t.serialize(o)),((e,t)=>{V(["color","face","size"],(t=>{e.attr(t,null)}))})(e)}))}))})(e,r,Pt.explode(null!==(o=t.font_size_legacy_values)&&void 0!==o?o:"")),((e,t,n)=>{e.addNodeFilter("strike",(e=>{const o="html4"!==t.type;V(e,(e=>{if(o)e.name="s";else{const t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))}}))}))})(e,n,r)},Wv=(e,t,n)=>{t.addNodeFilter("br",((t,o,r)=>{const s=Pt.extend({},n.getBlockElements()),a=n.getNonEmptyElements(),i=n.getWhitespaceElements();s.body=1;const l=e=>e.name in s||Bs(n,e);for(let o=0,d=t.length;o{const[t,...n]=e.split(","),o=n.join(","),r=/data:([^/]+\/[^;]+)(;.+)?/.exec(t);if(r){const e=";base64"===r[2],t=e?(e=>{const t=/([a-z0-9+\/=\s]+)/i.exec(e);return t?t[1]:""})(o):decodeURIComponent(o);return I.some({type:r[1],data:t,base64Encoded:e})}return I.none()},Yv=(e,t,n=!0)=>{let o=t;if(n)try{o=atob(t)}catch(e){return I.none()}const r=new Uint8Array(o.length);for(let e=0;enew Promise(((t,n)=>{const o=new FileReader;o.onloadend=()=>{t(o.result)},o.onerror=()=>{var e;n(null===(e=o.error)||void 0===e?void 0:e.message)},o.readAsDataURL(e)}));let Xv=0;const Qv=(e,t,n)=>Kv(e).bind((({data:e,type:o,base64Encoded:r})=>{if(t&&!r)return I.none();{const t=r?e:btoa(e);return n(t,o)}})),Jv=(e,t,n)=>{const o=e.create("blobid"+Xv++,t,n);return e.add(o),o},Zv=(e,t,n=!1)=>Qv(t,n,((t,n)=>I.from(e.getByData(t,n)).orThunk((()=>Yv(n,t).map((n=>Jv(e,n,t))))))),ey=(e,t)=>He(e,`${t}/`),ty=(e,t)=>{const n=e.schema;t.remove_trailing_brs&&Wv(t,e,n),e.addAttributeFilter("href",(e=>{let n=e.length;const o=e=>{const t=e?Pt.trim(e):"";return/\b(noopener)\b/g.test(t)?t:(e=>e.split(" ").filter((e=>e.length>0)).concat(["noopener"]).sort().join(" "))(t)};if(!t.allow_unsafe_link_target)for(;n--;){const t=e[n];"a"===t.name&&"_blank"===t.attr("target")&&t.attr("rel",o(t.attr("rel")))}})),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",(e=>{let t,n,o,r,s=e.length;for(;s--;)if(r=e[s],"a"===r.name&&r.firstChild&&!r.attr("href"))for(o=r.parent,t=r.lastChild;t&&o;)n=t.prev,o.insert(t,r),t=n})),t.fix_list_elements&&e.addNodeFilter("ul,ol",(e=>{let t,n,o=e.length;for(;o--;)if(t=e[o],n=t.parent,n&&("ul"===n.name||"ol"===n.name))if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{const e=new Wg("li",1);e.attr("style","list-style-type: none"),t.wrap(e)}}));const o=n.getValidClasses();t.validate&&o&&e.addAttributeFilter("class",(e=>{var t;let n=e.length;for(;n--;){const r=e[n],s=null!==(t=r.attr("class"))&&void 0!==t?t:"",a=Pt.explode(s," ");let i="";for(let e=0;e{const{blob_cache:n}=t;if(n){const t=e=>{const t=e.attr("src");(e=>e.attr("src")===At.transparentSrc||C(e.attr("data-mce-placeholder")))(e)||(e=>C(e.attr("data-mce-bogus")))(e)||y(t)||Zv(n,t,!0).each((t=>{e.attr("src",t.blobUri())}))};e.addAttributeFilter("src",(e=>V(e,t)))}})(e,t),t.convert_unsafe_embeds&&e.addNodeFilter("object,embed",(e=>V(e,(e=>{e.replace(((e,t,n,o,r)=>{let s;s=v(e)?"iframe":ey(e,"image")?"img":ey(e,"video")?"video":ey(e,"audio")?"audio":"iframe";const a=new Wg(s,1);return a.attr("audio"===s?{src:t}:{src:t,width:n,height:o}),"audio"!==s&&"video"!==s||a.attr("controls",""),"iframe"===s&&r&&a.attr("sandbox",""),a})(e.attr("type"),"object"===e.name?e.attr("data"):e.attr("src"),e.attr("width"),e.attr("height"),t.sandbox_iframes))})))),t.sandbox_iframes&&e.addNodeFilter("iframe",(e=>V(e,(e=>e.attr("sandbox","")))))},{entries:ny,setPrototypeOf:oy,isFrozen:ry,getPrototypeOf:sy,getOwnPropertyDescriptor:ay}=Object;let{freeze:iy,seal:ly,create:dy}=Object,{apply:cy,construct:uy}="undefined"!=typeof Reflect&&Reflect;iy||(iy=function(e){return e}),ly||(ly=function(e){return e}),cy||(cy=function(e,t,n){return e.apply(t,n)}),uy||(uy=function(e,t){return new e(...t)});const my=Sy(Array.prototype.forEach),fy=Sy(Array.prototype.pop),gy=Sy(Array.prototype.push),py=Sy(String.prototype.toLowerCase),hy=Sy(String.prototype.toString),by=Sy(String.prototype.match),vy=Sy(String.prototype.replace),yy=Sy(String.prototype.indexOf),Cy=Sy(String.prototype.trim),wy=Sy(Object.prototype.hasOwnProperty),xy=Sy(RegExp.prototype.test),Ey=(_y=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:py;oy&&oy(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(ry(t)||(t[o]=e),r=e)}e[r]=!0}return e}function Ny(e){for(let t=0;t/gm),$y=ly(/\${[\w\W]*}/gm),qy=ly(/^data-[\-\w.\u00B7-\uFFFF]/),Vy=ly(/^aria-[\-\w]+$/),Wy=ly(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ky=ly(/^(?:\w+script|data):/i),Yy=ly(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gy=ly(/^html$/i),Xy=ly(/^[a-z][.\w]*(-[.\w]+)+$/i);var Qy=Object.freeze({__proto__:null,MUSTACHE_EXPR:jy,ERB_EXPR:Hy,TMPLIT_EXPR:$y,DATA_ATTR:qy,ARIA_ATTR:Vy,IS_ALLOWED_URI:Wy,IS_SCRIPT_OR_DATA:Ky,ATTR_WHITESPACE:Yy,DOCTYPE_NAME:Gy,CUSTOM_ELEMENT:Xy});const Jy=function(){return"undefined"==typeof window?null:window};var Zy=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jy();const n=t=>e(t);if(n.version="3.1.7",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:o}=t;const r=o,s=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:i,Node:l,Element:d,NodeFilter:c,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:f,trustedTypes:g}=t,p=d.prototype,h=Ay(p,"cloneNode"),b=Ay(p,"remove"),v=Ay(p,"nextSibling"),y=Ay(p,"childNodes"),C=Ay(p,"parentNode");if("function"==typeof i){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let w,x="";const{implementation:E,createNodeIterator:_,createDocumentFragment:S,getElementsByTagName:k}=o,{importNode:N}=r;let R={};n.isSupported="function"==typeof ny&&"function"==typeof C&&E&&void 0!==E.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:T,TMPLIT_EXPR:O,DATA_ATTR:B,ARIA_ATTR:P,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:M}=Qy;let{IS_ALLOWED_URI:I}=Qy,F=null;const U=ky({},[...Ty,...Oy,...By,...Dy,...My]);let z=null;const j=ky({},[...Iy,...Fy,...Uy,...zy]);let H=Object.seal(dy(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,q=null,V=!0,W=!0,K=!1,Y=!0,G=!1,X=!0,Q=!1,J=!1,Z=!1,ee=!1,te=!1,ne=!1,oe=!0,re=!1,se=!0,ae=!1,ie={},le=null;const de=ky({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ce=null;const ue=ky({},["audio","video","img","source","image","track"]);let me=null;const fe=ky({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",pe="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml";let be=he,ve=!1,ye=null;const Ce=ky({},[ge,pe,he],hy);let we=null;const xe=["application/xhtml+xml","text/html"];let Ee=null,_e=null;const Se=o.createElement("form"),ke=function(e){return e instanceof RegExp||e instanceof Function},Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!_e||_e!==e){if(e&&"object"==typeof e||(e={}),e=Ry(e),we=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===we?hy:py,F=wy(e,"ALLOWED_TAGS")?ky({},e.ALLOWED_TAGS,Ee):U,z=wy(e,"ALLOWED_ATTR")?ky({},e.ALLOWED_ATTR,Ee):j,ye=wy(e,"ALLOWED_NAMESPACES")?ky({},e.ALLOWED_NAMESPACES,hy):Ce,me=wy(e,"ADD_URI_SAFE_ATTR")?ky(Ry(fe),e.ADD_URI_SAFE_ATTR,Ee):fe,ce=wy(e,"ADD_DATA_URI_TAGS")?ky(Ry(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=wy(e,"FORBID_CONTENTS")?ky({},e.FORBID_CONTENTS,Ee):de,$=wy(e,"FORBID_TAGS")?ky({},e.FORBID_TAGS,Ee):{},q=wy(e,"FORBID_ATTR")?ky({},e.FORBID_ATTR,Ee):{},ie=!!wy(e,"USE_PROFILES")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,K=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,G=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,oe=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,se=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,I=e.ALLOWED_URI_REGEXP||Wy,be=e.NAMESPACE||he,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),G&&(W=!1),te&&(ee=!0),ie&&(F=ky({},My),z=[],!0===ie.html&&(ky(F,Ty),ky(z,Iy)),!0===ie.svg&&(ky(F,Oy),ky(z,Fy),ky(z,zy)),!0===ie.svgFilters&&(ky(F,By),ky(z,Fy),ky(z,zy)),!0===ie.mathMl&&(ky(F,Dy),ky(z,Uy),ky(z,zy))),e.ADD_TAGS&&(F===U&&(F=Ry(F)),ky(F,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(z===j&&(z=Ry(z)),ky(z,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&ky(me,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===de&&(le=Ry(le)),ky(le,e.FORBID_CONTENTS,Ee)),se&&(F["#text"]=!0),Q&&ky(F,["html","head","body"]),F.table&&(ky(F,["tbody"]),delete $.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ey('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ey('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,x=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(g,s)),null!==w&&"string"==typeof x&&(x=w.createHTML(""));iy&&iy(e),_e=e}},Re=ky({},["mi","mo","mn","ms","mtext"]),Ae=ky({},["annotation-xml"]),Te=ky({},["title","style","font","a","script"]),Oe=ky({},[...Oy,...By,...Py]),Be=ky({},[...Dy,...Ly]),Pe=function(e){gy(n.removed,{element:e});try{C(e).removeChild(e)}catch(t){b(e)}},De=function(e,t){try{gy(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){gy(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!z[e])if(ee||te)try{Pe(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Le=function(e){let t=null,n=null;if(Z)e=""+e;else{const t=by(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===we&&be===he&&(e=''+e+"");const r=w?w.createHTML(e):e;if(be===he)try{t=(new f).parseFromString(r,we)}catch(e){}if(!t||!t.documentElement){t=E.createDocument(be,"template",null);try{t.documentElement.innerHTML=ve?x:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),be===he?k.call(t,Q?"html":"body")[0]:Q?t.documentElement:s},Me=function(e){return _.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ie=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Fe=function(e){return"function"==typeof l&&e instanceof l},Ue=function(e,t,o){R[e]&&my(R[e],(e=>{e.call(n,t,o,_e)}))},ze=function(e){let t=null;if(Ue("beforeSanitizeElements",e,null),Ie(e))return Pe(e),!0;const o=Ee(e.nodeName);if(Ue("uponSanitizeElement",e,{tagName:o,allowedTags:F}),e.hasChildNodes()&&!Fe(e.firstElementChild)&&xy(/<[/\w]/g,e.innerHTML)&&xy(/<[/\w]/g,e.textContent))return Pe(e),!0;if(7===e.nodeType)return Pe(e),!0;if(X&&8===e.nodeType&&xy(/<[/\w]/g,e.data))return Pe(e),!0;if(!F[o]||$[o]){if(!$[o]&&He(o)){if(H.tagNameCheck instanceof RegExp&&xy(H.tagNameCheck,o))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(o))return!1}if(se&&!le[o]){const t=C(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=h(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,v(e))}}return Pe(e),!0}return e instanceof d&&!function(e){let t=C(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const n=py(e.tagName),o=py(t.tagName);return!!ye[e.namespaceURI]&&(e.namespaceURI===pe?t.namespaceURI===he?"svg"===n:t.namespaceURI===ge?"svg"===n&&("annotation-xml"===o||Re[o]):Boolean(Oe[n]):e.namespaceURI===ge?t.namespaceURI===he?"math"===n:t.namespaceURI===pe?"math"===n&&Ae[o]:Boolean(Be[n]):e.namespaceURI===he?!(t.namespaceURI===pe&&!Ae[o])&&!(t.namespaceURI===ge&&!Re[o])&&!Be[n]&&(Te[n]||!Oe[n]):!("application/xhtml+xml"!==we||!ye[e.namespaceURI]))}(e)?(Pe(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!xy(/<\/no(script|embed|frames)/i,e.innerHTML)?(G&&3===e.nodeType&&(t=e.textContent,my([A,T,O],(e=>{t=vy(t,e," ")})),e.textContent!==t&&(gy(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ue("afterSanitizeElements",e,null),!1):(Pe(e),!0)},je=function(e,t,n){if(oe&&("id"===t||"name"===t)&&(n in o||n in Se))return!1;if(W&&!q[t]&&xy(B,t));else if(V&&xy(P,t));else if(!z[t]||q[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&xy(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&xy(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&xy(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(me[t]);else if(xy(I,vy(n,L,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==yy(n,"data:")||!ce[e])if(K&&!xy(D,vy(n,L,"")));else if(n)return!1;return!0},He=function(e){return"annotation-xml"!==e&&by(e,M)},$e=function(e){Ue("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};let r=t.length;for(;r--;){const s=t[r],{name:a,namespaceURI:i,value:l}=s,d=Ee(a);let c="value"===a?l:Cy(l);const u=c;if(o.attrName=d,o.attrValue=c,o.keepAttr=!0,o.forceKeepAttr=void 0,Ue("uponSanitizeAttribute",e,o),c=o.attrValue,o.forceKeepAttr)continue;if(!o.keepAttr){De(a,e);continue}if(!Y&&xy(/\/>/i,c)){De(a,e);continue}G&&my([A,T,O],(e=>{c=vy(c,e," ")}));const m=Ee(e.nodeName);if(je(m,d,c))if(!re||"id"!==d&&"name"!==d||(De(a,e),c="user-content-"+c),X&&xy(/((--!?|])>)|<\/(style|title)/i,c))De(a,e);else{if(w&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(i);else switch(g.getAttributeType(m,d)){case"TrustedHTML":c=w.createHTML(c);break;case"TrustedScriptURL":c=w.createScriptURL(c)}if(c!==u)try{i?e.setAttributeNS(i,a,c):e.setAttribute(a,c),Ie(e)?Pe(e):fy(n.removed)}catch(e){}}else De(a,e)}Ue("afterSanitizeAttributes",e,null)},qe=function e(t){let n=null;const o=Me(t);for(Ue("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Ue("uponSanitizeShadowNode",n,null),ze(n)||(n.content instanceof a&&e(n.content),$e(n));Ue("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,s=null,i=null,d=null;if(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Fe(e)){if("function"!=typeof e.toString)throw Ey("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ey("dirty is not a string, aborting")}if(!n.isSupported)return e;if(J||Ne(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!F[t]||$[t])throw Ey("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)o=Le("\x3c!----\x3e"),s=o.ownerDocument.importNode(e,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?o=s:o.appendChild(s);else{if(!ee&&!G&&!Q&&-1===e.indexOf("<"))return w&&ne?w.createHTML(e):e;if(o=Le(e),!o)return ee?null:ne?x:""}o&&Z&&Pe(o.firstChild);const c=Me(ae?e:o);for(;i=c.nextNode();)ze(i)||(i.content instanceof a&&qe(i.content),$e(i));if(ae)return e;if(ee){if(te)for(d=S.call(o.ownerDocument);o.firstChild;)d.appendChild(o.firstChild);else d=o;return(z.shadowroot||z.shadowrootmode)&&(d=N.call(r,d,!0)),d}let u=Q?o.outerHTML:o.innerHTML;return Q&&F["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&xy(Gy,o.ownerDocument.doctype.name)&&(u="\n"+u),G&&my([A,T,O],(e=>{u=vy(u,e," ")})),w&&ne?w.createHTML(u):u},n.setConfig=function(){Ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},n.clearConfig=function(){_e=null,J=!1},n.isValidAttribute=function(e,t,n){_e||Ne({});const o=Ee(e),r=Ee(t);return je(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&(R[e]=R[e]||[],gy(R[e],t))},n.removeHook=function(e){if(R[e])return fy(R[e])},n.removeHooks=function(e){R[e]&&(R[e]=[])},n.removeAllHooks=function(){R={}},n}();const eC=Pt.each,tC=Pt.trim,nC=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],oC={ftp:21,http:80,https:443,mailto:25},rC=["img","video"],sC=(e,t,n)=>{const o=(e=>{try{return decodeURIComponent(e)}catch(t){return unescape(e)}})(t).replace(/\s/g,"");return!e.allow_script_urls&&(!!/((java|vb)script|mhtml):/i.test(o)||!e.allow_html_data_urls&&(/^data:image\//i.test(o)?((e,t)=>C(e)?!e:!C(t)||!H(rC,t))(e.allow_svg_data_urls,n)&&/^data:image\/svg\+xml/i.test(o):/^data:/i.test(o)))};class aC{static parseDataUri(e){let t;const n=decodeURIComponent(e).split(","),o=/data:([^;]+)/.exec(n[0]);return o&&(t=o[1]),{type:t,data:n[1]}}static isDomSafe(e,t,n={}){if(n.allow_script_urls)return!0;{const o=ea.decode(e).replace(/[\s\u0000-\u001F]+/g,"");return!sC(n,o,t)}}static getDocumentBaseUrl(e){var t;let n;return n=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?null!==(t=e.href)&&void 0!==t?t:"":e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/")),n}constructor(e,t={}){this.path="",this.directory="",e=tC(e),this.settings=t;const n=t.base_uri,o=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(o.source=e);const r=0===e.indexOf("//");if(0!==e.indexOf("/")||r||(e=(n&&n.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){const t=n?n.path:new aC(document.location.href).directory;if(""===(null==n?void 0:n.protocol))e="//mce_host"+o.toAbsPath(t,e);else{const r=/([^#?]*)([#?]?.*)/.exec(e);r&&(e=(n&&n.protocol||"http")+"://mce_host"+o.toAbsPath(t,r[1])+r[2])}}e=e.replace(/@@/g,"(mce_at)");const s=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);s&&eC(nC,((e,t)=>{let n=s[t];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[e]=n})),n&&(o.protocol||(o.protocol=n.protocol),o.userInfo||(o.userInfo=n.userInfo),o.port||"mce_host"!==o.host||(o.port=n.port),o.host&&"mce_host"!==o.host||(o.host=n.host),o.source=""),r&&(o.protocol="")}setPath(e){const t=/^(.*?)\/?(\w+)?$/.exec(e);t&&(this.path=t[0],this.directory=t[1],this.file=t[2]),this.source="",this.getURI()}toRelative(e){if("./"===e)return e;const t=new aC(e,{base_uri:this});if("mce_host"!==t.host&&this.host!==t.host&&t.host||this.port!==t.port||this.protocol!==t.protocol&&""!==t.protocol)return t.getURI();const n=this.getURI(),o=t.getURI();if(n===o||"/"===n.charAt(n.length-1)&&n.substr(0,n.length-1)===o)return n;let r=this.toRelPath(this.path,t.path);return t.query&&(r+="?"+t.query),t.anchor&&(r+="#"+t.anchor),r}toAbsolute(e,t){const n=new aC(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))}isSameOrigin(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;const t=this.protocol?oC[this.protocol]:null;if(t&&(this.port||t)==(e.port||t))return!0}return!1}toRelPath(e,t){let n,o,r=0,s="";const a=e.substring(0,e.lastIndexOf("/")).split("/"),i=t.split("/");if(a.length>=i.length)for(n=0,o=a.length;n=i.length||a[n]!==i[n]){r=n+1;break}if(a.length=a.length||a[n]!==i[n]){r=n+1;break}if(1===r)return t;for(n=0,o=a.length-(r-1);n{e&&a.push(e)}));const i=[];for(let e=s.length-1;e>=0;e--)0!==s[e].length&&"."!==s[e]&&(".."!==s[e]?n>0?n--:i.push(s[e]):n++);const l=a.length-n;let d;return d=l<=0?oe(i).join("/"):a.slice(0,l).join("/")+"/"+oe(i).join("/"),0!==d.indexOf("/")&&(d="/"+d),o&&d.lastIndexOf("/")!==d.length-1&&(d+=o),d}getURI(e=!1){let t;return this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source}}const iC=Pt.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),lC="data-mce-type";let dC=0;const cC=(e,t,n,o,r)=>{var s,a,i,l;const d=t.validate,c=n.getSpecialElements();8===e.nodeType&&!t.allow_conditional_comments&&/^\[if/i.test(null!==(s=e.nodeValue)&&void 0!==s?s:"")&&(e.nodeValue=" "+e.nodeValue);const u=null!==(a=null==r?void 0:r.tagName)&&void 0!==a?a:e.nodeName.toLowerCase();if("html"!==o&&n.isValid(o))return void(C(r)&&(r.allowedTags[u]=!0));if(1!==e.nodeType||"body"===u)return;const f=yn(e),g=nn(f,lC),p=en(f,"data-mce-bogus");if(!g&&m(p))return void("all"===p?xo(f):Eo(f));const h=n.getElementRule(u);if(!d||h){if(C(r)&&(r.allowedTags[u]=!0),d&&h&&!g){if(V(null!==(i=h.attributesForced)&&void 0!==i?i:[],(e=>{Jt(f,e.name,"{$uid}"===e.value?"mce_"+dC++:e.value)})),V(null!==(l=h.attributesDefault)&&void 0!==l?l:[],(e=>{nn(f,e.name)||Jt(f,e.name,"{$uid}"===e.value?"mce_"+dC++:e.value)})),h.attributesRequired&&!$(h.attributesRequired,(e=>nn(f,e))))return void Eo(f);if(h.removeEmptyAttrs&&(e=>{const t=e.dom.attributes;return null==t||0===t.length})(f))return void Eo(f);h.outputName&&h.outputName!==u&&((e,t)=>{const n=((e,t)=>{const n=bn(t),o=rn(e);return Zt(n,o),n})(e,t);ho(e,n);const o=Mn(e);Co(n,o),xo(e)})(f,h.outputName)}}else Ee(c,u)?xo(f):Eo(f)},uC=(e,t,n,o,r,s)=>"html"!==n&&!ps(o)||!(r in iC&&sC(e,s,o))&&(!e.validate||t.isValid(o,r)||He(r,"data-")||He(r,"aria-")),mC=(e,t)=>e.hasAttribute(lC)&&("id"===t||"class"===t||"style"===t),fC=(e,t)=>e in t.getBoolAttrs(),gC=(e,t,n,o)=>{const{attributes:r}=e;for(let s=r.length-1;s>=0;s--){const a=r[s],i=a.name,l=a.value;uC(t,n,o,e.tagName.toLowerCase(),i,l)||mC(e,i)?fC(i,n)&&e.setAttribute(i,i):e.removeAttribute(i)}},pC=(e,t,n)=>{const o=Zy();return o.addHook("uponSanitizeElement",((o,r)=>{cC(o,e,t,n.track(o),r)})),o.addHook("uponSanitizeAttribute",((o,r)=>{((e,t,n,o,r)=>{const s=e.tagName.toLowerCase(),{attrName:a,attrValue:i}=r;r.keepAttr=uC(t,n,o,s,a,i),r.keepAttr?(r.allowedAttributes[a]=!0,fC(a,n)&&(r.attrValue=a),t.allow_svg_data_urls&&He(i,"data:image/svg+xml")&&(r.forceKeepAttr=!0)):mC(e,a)&&(r.forceKeepAttr=!0)})(o,e,t,n.current(),r)})),o},hC=e=>{const t=["type","href","role","arcrole","title","show","actuate","label","from","to"].map((e=>`xlink:${e}`)),n={IN_PLACE:!0,USE_PROFILES:{html:!0,svg:!0,svgFilters:!0},ALLOWED_ATTR:t};return Zy().sanitize(e,n),e.innerHTML},bC=Pt.makeMap,vC=Pt.extend,yC=(e,t,n,o)=>{const r=e.name,s=r in n&&"title"!==r&&"textarea"!==r&&"noscript"!==r,a=t.childNodes;for(let t=0,r=a.length;t{const n=qv(),o=qv(),r={validate:!0,root_name:"body",sanitize:!0,...e},s=new DOMParser,a=((e,t)=>{const n=(()=>{let e=[];const t=()=>e[e.length-1];return{track:n=>{hs(n)&&e.push(n);let o=t();return o&&!o.contains(n)&&(e.pop(),o=t()),bs(o)},current:()=>bs(t()),reset:()=>{e=[]}}})();if(e.sanitize){const o=pC(e,t,n),r=(t,r)=>{o.sanitize(t,((e,t)=>{const n={IN_PLACE:!0,ALLOW_UNKNOWN_PROTOCOLS:!0,ALLOWED_TAGS:["#comment","#cdata-section","body"],ALLOWED_ATTR:[],SAFE_FOR_XML:!1};return n.PARSER_MEDIA_TYPE=t,e.allow_script_urls?n.ALLOWED_URI_REGEXP=/.*/:e.allow_html_data_urls&&(n.ALLOWED_URI_REGEXP=/^(?!(\w+script|mhtml):)/i),n})(e,r)),o.removed=[],n.reset()};return{sanitizeHtmlElement:r,sanitizeNamespaceElement:hC}}return{sanitizeHtmlElement:(o,r)=>{const s=document.createNodeIterator(o,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT);let a;for(;a=s.nextNode();){const o=n.track(a);cC(a,e,t,o),qo(a)&&gC(a,e,t,o)}n.reset()},sanitizeNamespaceElement:_}})(r,t),i=n.addFilter,l=n.getFilters,d=n.removeFilter,c=o.addFilter,u=o.getFilters,f=o.removeFilter,g=(e,n)=>{const o=m(n.attr(lC)),r=1===n.type&&!Ee(e,n.name)&&!Bs(t,n)&&!ps(n.name);return 3===n.type||r&&!o},p={schema:t,addAttributeFilter:c,getAttributeFilters:u,removeAttributeFilter:f,addNodeFilter:i,getNodeFilters:l,removeNodeFilter:d,parse:(e,n={})=>{var o;const i=r.validate,d=null!==(o=n.context)&&void 0!==o?o:r.root_name,c=((e,n,o="html")=>{const r="xhtml"===o?"application/xhtml+xml":"text/html",i=Ee(t.getSpecialElements(),n.toLowerCase()),l=i?`<${n}>${e}`:e,d="xhtml"===o?`${l}`:`${l}`,c=s.parseFromString(d,r).body;return a.sanitizeHtmlElement(c,r),i?c.firstChild:c})(e,d,n.format);Ss(t,c);const m=new Wg(d,11);yC(m,c,t.getSpecialElements(),a.sanitizeNamespaceElement),c.innerHTML="";const[f,p]=((e,t,n,o)=>{const r=n.validate,s=t.getNonEmptyElements(),a=t.getWhitespaceElements(),i=vC(bC("script,style,head,html,body,title,meta,param"),t.getBlockElements()),l=da(t),d=/[ \t\r\n]+/g,c=/^[ \t\r\n]+/,u=/[ \t\r\n]+$/,m=e=>{let t=e.parent;for(;C(t);){if(t.name in a)return!0;t=t.parent}return!1},f=n=>n.name in i||Bs(t,n)||ps(n.name)&&n.parent===e,g=(t,n)=>{const r=n?t.prev:t.next;return!C(r)&&!y(t.parent)&&f(t.parent)&&(t.parent!==e||!0===o.isRootContent)};return[e=>{var t;if(3===e.type&&!m(e)){let n=null!==(t=e.value)&&void 0!==t?t:"";n=n.replace(d," "),(((e,t)=>C(e)&&(t(e)||"br"===e.name))(e.prev,f)||g(e,!0))&&(n=n.replace(c,"")),0===n.length?e.remove():e.value=n}},e=>{var i;if(1===e.type){const i=t.getElementRule(e.name);if(r&&i){const r=vb(t,s,a,e);i.paddInEmptyBlock&&r&&(e=>{let n=e;for(;C(n);){if(n.name in l)return vb(t,s,a,n);n=n.parent}return!1})(e)?hb(n,o,f,e):i.removeEmpty&&r?f(e)?e.remove():e.unwrap():i.paddEmpty&&(r||(e=>{var t;return bb(e,"#text")&&(null===(t=null==e?void 0:e.firstChild)||void 0===t?void 0:t.value)===br})(e))&&hb(n,o,f,e)}}else if(3===e.type&&!m(e)){let t=null!==(i=e.value)&&void 0!==i?i:"";(e.next&&f(e.next)||g(e,!1))&&(t=t.replace(u,"")),0===t.length?e.remove():e.value=t}}]})(m,t,r,n),h=[],b=i?e=>((e,n)=>{xb(t,e)&&n.push(e)})(e,h):_,v={nodes:{},attributes:{}},w=e=>fb(l(),u(),e,v);if(((e,t,n)=>{const o=[];for(let n=e,r=n;n;r=n,n=n.walk()){const s=n;V(t,(e=>e(s))),y(s.parent)&&s!==e?n=r:o.push(s)}for(let e=o.length-1;e>=0;e--){const t=o[e];V(n,(e=>e(t)))}})(m,[f,w],[p,b]),h.reverse(),i&&h.length>0)if(n.context){const{pass:e,fail:o}=K(h,(e=>e.parent===m));wb(o,t,m,w),n.invalid=e.length>0}else wb(h,t,m,w);const x=((e,t)=>{var n;const o=null!==(n=t.forced_root_block)&&void 0!==n?n:e.forced_root_block;return!1===o?"":!0===o?"p":o})(r,n);return x&&("body"===m.name||n.isRootContent)&&((e,n)=>{const o=vC(bC("script,style,head,html,body,title,meta,param"),t.getBlockElements()),s=/^[ \t\r\n]+/,a=/[ \t\r\n]+$/;let i=e.firstChild,l=null;const d=e=>{var t,n;e&&(i=e.firstChild,i&&3===i.type&&(i.value=null===(t=i.value)||void 0===t?void 0:t.replace(s,"")),i=e.lastChild,i&&3===i.type&&(i.value=null===(n=i.value)||void 0===n?void 0:n.replace(a,"")))};if(t.isValidChild(e.name,n.toLowerCase())){for(;i;){const t=i.next;g(o,i)?(l||(l=new Wg(n,1),l.attr(r.forced_root_block_attrs),e.insert(l,i)),l.append(i)):(d(l),l=null),i=t}d(l)}})(m,x),n.invalid||gb(v,n),m}};return ty(p,r),((e,t,n)=>{t.inline_styles&&Vv(e,t,n)})(p,r,t),p},wC=(e,t,n)=>{const o=(e=>Bb(e)?up({validate:!1}).serialize(e):e)(e),r=t(o);if(r.isDefaultPrevented())return r;if(Bb(e)){if(r.content!==o){const t=CC({validate:!1,forced_root_block:!1,...n}).parse(r.content,{context:e.name});return{...r,content:t}}return{...r,content:e}}return r},xC=(e,t)=>{if(t.no_events)return pl.value(t);{const n=((e,t)=>e.dispatch("BeforeGetContent",t))(e,t);return n.isDefaultPrevented()?pl.error(rf(e,{content:"",...n}).content):pl.value(n)}},EC=(e,t,n)=>{if(n.no_events)return t;{const o=wC(t,(t=>rf(e,{...n,content:t})),{sanitize:fc(e),sandbox_iframes:Cc(e)});return o.content}},_C=(e,t)=>{if(t.no_events)return pl.value(t);{const n=wC(t.content,(n=>((e,t)=>e.dispatch("BeforeSetContent",t))(e,{...t,content:n})),{sanitize:fc(e),sandbox_iframes:Cc(e)});return n.isDefaultPrevented()?(of(e,n),pl.error(void 0)):pl.value(n)}},SC=(e,t,n)=>{n.no_events||of(e,{...n,content:t})},kC=(e,t,n)=>({element:e,width:t,rows:n}),NC=(e,t)=>({element:e,cells:t}),RC=(e,t)=>({x:e,y:t}),AC=(e,t)=>tn(e,t).bind(Xe).getOr(1),TC=(e,t,n)=>{const o=e.rows;return!!(o[n]?o[n].cells:[])[t]},OC=e=>X(e,((e,t)=>t.cells.length>e?t.cells.length:e),0),BC=(e,t)=>{const n=e.rows;for(let e=0;e{const s=[],a=e.rows;for(let e=n;e<=r;e++){const n=a[e].cells,r=t((e,t)=>{const n=fi(e.element),o=bn("tbody");return Co(o,t),vo(n,o),n})(e,(e=>q(e.rows,(e=>{const t=q(e.cells,(e=>{const t=gi(e);return on(t,"colspan"),on(t,"rowspan"),t})),n=fi(e.element);return Co(n,t),n})))(e)),LC=(e,t,n)=>{const o=yn(t.commonAncestorContainer),r=Bp(o,e),s=Y(r,(e=>n.isWrapper(Ht(e)))),a=((e,t)=>J(e,(e=>"li"===Ht(e)&&rm(e,t))).fold(N([]),(t=>(e=>J(e,(e=>"ul"===Ht(e)||"ol"===Ht(e))))(e).map((e=>{const t=bn(Ht(e)),n=ye(fo(e),((e,t)=>He(t,"list-style")));return lo(t,n),[bn("li"),t]})).getOr([]))))(r,t),i=s.concat(a.length?a:(e=>kr(e)?An(e).filter(Sr).fold(N([]),(t=>[e,t])):Sr(e)?[e]:[])(o));return q(i,fi)},MC=()=>kf([]),IC=(e,t)=>((e,t)=>eo(t,"table",T(_n,e)))(e,t[0]).bind((e=>{const n=t[0],o=t[t.length-1],r=(e=>{const t=kC(fi(e),0,[]);return V(Uo(e,"tr"),((e,n)=>{V(Uo(e,"td,th"),((o,r)=>{((e,t,n,o,r)=>{const s=AC(r,"rowspan"),a=AC(r,"colspan"),i=e.rows;for(let e=n;e{for(;TC(e,t,n);)t++;return t})(t,r,n),n,e,o)}))})),kC(t.element,OC(t.rows),t.rows)})(e);return((e,t,n)=>BC(e,t).bind((t=>BC(e,n).map((n=>((e,t,n)=>{const o=t.x,r=t.y,s=n.x,a=n.y,i=rkf([DC(e)])))})).getOrThunk(MC),FC=(e,t,n)=>{const o=Zu(t,e);return o.length>0?IC(e,o):((e,t,n)=>t.length>0&&t[0].collapsed?MC():((e,t,n)=>((e,t)=>{const n=X(t,((e,t)=>(vo(t,e),t)),e);return t.length>0?kf([n]):n})(yn(t.cloneContents()),LC(e,t,n)))(e,t[0],n))(e,t,n)},UC=(e,t)=>t>=0&&tDr(e.innerText),jC=e=>qo(e)?e.outerHTML:er(e)?ea.encodeRaw(e.data,!1):or(e)?"\x3c!--"+e.data+"--\x3e":"",HC=(e,t)=>(((e,t)=>{let n=0;V(e,(e=>{0===e[0]?n++:1===e[0]?(((e,t,n)=>{const o=(e=>{let t;const n=document.createElement("div"),o=document.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)o.appendChild(t);return o})(t);if(e.hasChildNodes()&&n{if(e.hasChildNodes()&&t{const n=e.length+t.length+2,o=new Array(n),r=new Array(n),s=(n,o,r,a,l)=>{const d=i(n,o,r,a);if(null===d||d.start===o&&d.diag===o-a||d.end===n&&d.diag===n-r){let s=n,i=r;for(;sa-r?(l.push([2,e[s]]),++s):(l.push([1,t[i]]),++i)}else{s(n,d.start,r,d.start-d.diag,l);for(let t=d.start;t{let a=n;for(;a-o({start:e,end:t,diag:n}))(n,a,o)},i=(n,s,i,l)=>{const d=s-n,c=l-i;if(0===d||0===c)return null;const u=d-c,m=c+d,f=(m%2==0?m:m+1)/2;let g,p,h,b,v;for(o[1+f]=n,r[1+f]=s+1,g=0;g<=f;++g){for(p=-g;p<=g;p+=2){for(h=p+f,p===-g||p!==g&&o[h-1]=n&&v>=i&&e[b]===t[v];)r[h]=b--,v--;if(u%2==0&&-g<=p&&p<=g&&r[h]<=o[h+u])return a(r[h],p+n-i,s,l)}}return null},l=[];return s(0,e.length,0,t.length,l),l})(q(ce(t.childNodes),jC),e),t),t),$C=De((()=>document.implementation.createHTMLDocument("undo"))),qC=e=>{const t=e.serializer.getTempAttrs(),n=sp(e.getBody(),t);return(e=>null!==e.querySelector("iframe"))(n)?{type:"fragmented",fragments:Y(q(ce(n.childNodes),S(Dr,jC)),(e=>e.length>0)),content:"",bookmark:null,beforeBookmark:null}:{type:"complete",fragments:null,content:Dr(n.innerHTML),bookmark:null,beforeBookmark:null}},VC=(e,t,n)=>{const o=n?t.beforeBookmark:t.bookmark;"fragmented"===t.type?HC(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw",no_selection:!C(o)||!Iu(o)||!o.isFakeCaret}),o&&(e.selection.moveToBookmark(o),e.selection.scrollIntoView())},WC=e=>"fragmented"===e.type?e.fragments.join(""):e.content,KC=e=>{const t=bn("body",$C());return ko(t,WC(e)),V(Uo(t,"*[data-mce-bogus]"),Eo),So(t)},YC=(e,t)=>!(!e||!t)&&(!!((e,t)=>WC(e)===WC(t))(e,t)||((e,t)=>KC(e)===KC(t))(e,t)),GC=e=>0===e.get(),XC=(e,t,n)=>{GC(n)&&(e.typing=t)},QC=(e,t)=>{e.typing&&(XC(e,!1,t),e.add())},JC=e=>({init:{bindEvents:_},undoManager:{beforeChange:(t,n)=>((e,t,n)=>{GC(t)&&n.set(ml(e.selection))})(e,t,n),add:(t,n,o,r,s,a)=>((e,t,n,o,r,s,a)=>{const i=qC(e),l=Pt.extend(s||{},i);if(!GC(o)||e.removed)return null;const d=t.data[n.get()];if(e.dispatch("BeforeAddUndo",{level:l,lastLevel:d,originalEvent:a}).isDefaultPrevented())return null;if(d&&YC(d,l))return null;t.data[n.get()]&&r.get().each((e=>{t.data[n.get()].beforeBookmark=e}));const c=Td(e);if(c&&t.data.length>c){for(let e=0;e0?(e.setDirty(!0),e.dispatch("AddUndo",u),e.dispatch("change",u)):e.dispatch("AddUndo",u),l})(e,t,n,o,r,s,a),undo:(t,n,o)=>((e,t,n,o)=>{let r;return t.typing&&(t.add(),t.typing=!1,XC(t,!1,n)),o.get()>0&&(o.set(o.get()-1),r=t.data[o.get()],VC(e,r,!0),e.setDirty(!0),e.dispatch("Undo",{level:r})),r})(e,t,n,o),redo:(t,n)=>((e,t,n)=>{let o;return t.get()((e,t,n)=>{t.data=[],n.set(0),t.typing=!1,e.dispatch("ClearUndos")})(e,t,n),reset:e=>(e=>{e.clear(),e.add()})(e),hasUndo:(t,n)=>((e,t,n)=>n.get()>0||t.typing&&t.data[0]&&!YC(qC(e),t.data[0]))(e,t,n),hasRedo:(e,t)=>((e,t)=>t.get()((e,t,n)=>(QC(e,t),e.beforeChange(),e.ignore(n),e.add()))(e,t,n),ignore:(e,t)=>((e,t)=>{try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}})(e,t),extra:(t,n,o,r)=>((e,t,n,o,r)=>{if(t.transact(o)){const o=t.data[n.get()].bookmark,s=t.data[n.get()-1];VC(e,s,!0),t.transact(r)&&(t.data[n.get()-1].beforeBookmark=o)}})(e,t,n,o,r)},formatter:{match:(t,n,o,r)=>Hb(e,t,n,o,r),matchAll:(t,n)=>((e,t,n)=>{const o=[],r={},s=e.selection.getStart();return e.dom.getParent(s,(s=>{for(let a=0;ajb(e,t,n,o,r),canApply:t=>((e,t)=>{const n=e.formatter.get(t),o=e.dom;if(n&&e.selection.isEditable()){const t=e.selection.getStart(),r=Em(o,t);for(let e=n.length-1;e>=0;e--){const t=n[e];if(!km(t))return!0;for(let e=r.length-1;e>=0;e--)if(o.is(r[e],t.selector))return!0}}return!1})(e,t),closest:t=>((e,t)=>{const n=t=>_n(t,yn(e.getBody()));return I.from(e.selection.getStart(!0)).bind((o=>Lb(yn(o),(n=>ue(t,(t=>((t,n)=>jb(e,t.dom,n)?I.some(n):I.none())(n,t)))),n))).getOrNull()})(e,t),apply:(t,n,o)=>Iv(e,t,n,o),remove:(t,n,o,r)=>Ov(e,t,n,o,r),toggle:(t,n,o)=>((e,t,n,o)=>{const r=e.formatter.get(t);r&&(!Hb(e,t,n,o)||"toggle"in r[0]&&!r[0].toggle?Iv(e,t,n,o):Ov(e,t,n,o))})(e,t,n,o),formatChanged:(t,n,o,r,s)=>((e,t,n,o,r,s)=>(((e,t,n,o,r,s)=>{const a=t.get();V(n.split(","),(t=>{const n=xe(a,t).getOrThunk((()=>{const e={withSimilar:{state:$a(!1),similar:!0,callbacks:[]},withoutSimilar:{state:$a(!1),similar:!1,callbacks:[]},withVars:[]};return a[t]=e,e})),i=()=>{const n=jv(e);return zv(e,n,t,r,s).isSome()};if(v(s)){const e=r?n.withSimilar:n.withoutSimilar;e.callbacks.push(o),1===e.callbacks.length&&e.state.set(i())}else n.withVars.push({state:$a(i()),similar:r,vars:s,callback:o})})),t.set(a)})(e,t,n,o,r,s),{unbind:()=>((e,t,n)=>{const o=e.get();V(t.split(","),(e=>xe(o,e).each((t=>{o[e]={withSimilar:{...t.withSimilar,callbacks:Y(t.withSimilar.callbacks,(e=>e!==n))},withoutSimilar:{...t.withoutSimilar,callbacks:Y(t.withoutSimilar.callbacks,(e=>e!==n))},withVars:Y(t.withVars,(e=>e.callback!==n))}})))),e.set(o)})(t,n,o)}))(e,t,n,o,r,s)},editor:{getContent:t=>((e,t)=>I.from(e.getBody()).fold(N("tree"===t.format?new Wg("body",11):""),(n=>lp(e,t,n))))(e,t),setContent:(t,n)=>((e,t,n)=>I.from(e.getBody()).map((o=>Bb(t)?((e,t,n,o)=>{pb(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);const r=up({validate:!1},e.schema).serialize(n),s=Dr(Ar(yn(t))?r:Pt.trim(r));return Pb(e,s,o.no_selection),{content:n,html:s}})(e,o,t,n):((e,t,n,o)=>{if(0===(n=Dr(n)).length||/^\s+$/.test(n)){const r='
';"TABLE"===t.nodeName?n=""+r+"":/^(UL|OL)$/.test(t.nodeName)&&(n="
  • "+r+"
  • ");const s=Il(e);return e.schema.isValidChild(t.nodeName.toLowerCase(),s.toLowerCase())?(n=r,n=e.dom.createHTML(s,Fl(e),n)):n||(n=r),Pb(e,n,o.no_selection),{content:n,html:n}}{"raw"!==o.format&&(n=up({validate:!1},e.schema).serialize(e.parser.parse(n,{isRootContent:!0,insert:!0})));const r=Ar(yn(t))?n:Pt.trim(n);return Pb(e,r,o.no_selection),{content:r,html:r}}})(e,o,t,n))).getOr({content:t,html:Bb(n.content)?"":n.content}))(e,t,n),insertContent:(t,n)=>Ob(e,t,n),addVisual:t=>((e,t)=>{const n=e.dom,o=C(t)?t:e.getBody();V(n.select("table,a",o),(t=>{switch(t.nodeName){case"TABLE":const o=Ud(e),r=n.getAttrib(t,"border");r&&"0"!==r||!e.hasVisual?n.removeClass(t,o):n.addClass(t,o);break;case"A":if(!n.getAttrib(t,"href")){const o=n.getAttrib(t,"name")||t.id,r=zd(e);o&&e.hasVisual?n.addClass(t,r):n.removeClass(t,r)}}})),e.dispatch("VisualAid",{element:t,hasVisual:e.hasVisual})})(e,t)},selection:{getContent:(t,n)=>((e,t,n={})=>{const o=((e,t)=>({...e,format:t,get:!0,selection:!0,getInner:!0}))(n,t);return xC(e,o).fold(R,(t=>{const n=((e,t)=>{if("text"===t.format)return(e=>I.from(e.selection.getRng()).map((t=>{var n;const o=I.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock)),r=e.getBody(),s=(e=>e.map((e=>e.nodeName)).getOr("div").toLowerCase())(o),a=yn(t.cloneContents());ap(a),ip(a);const i=e.dom.add(r,s,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},a.dom),l=zC(i),d=Dr(null!==(n=i.textContent)&&void 0!==n?n:"");if(e.dom.remove(i),UC(d,0)||UC(d,d.length-1)){const e=o.getOr(r),t=zC(e),n=t.indexOf(l);return-1===n?l:(UC(t,n-1)?" ":"")+l+(UC(t,n+l.length)?" ":"")}return l})).getOr(""))(e);{const n=((e,t)=>{const n=e.selection.getRng(),o=e.dom.create("body"),r=e.selection.getSel(),s=Mg(e,Ju(r)),a=t.contextual?FC(yn(e.getBody()),s,e.schema).dom:n.cloneContents();return a&&o.appendChild(a),e.selection.serializer.serialize(o,t)})(e,t);return"tree"===t.format?n:e.selection.isCollapsed()?"":n}})(e,t);return EC(e,n,t)}))})(e,t,n)},autocompleter:{addDecoration:t=>zg(e,t),removeDecoration:()=>((e,t)=>jg(t).each((t=>{const n=e.selection.getBookmark();Eo(t),e.selection.moveToBookmark(n)})))(e,yn(e.getBody()))},raw:{getModel:()=>I.none()}}),ZC=e=>Ee(e.plugins,"rtc"),ew=e=>e.rtcInstance?e.rtcInstance:JC(e),tw=e=>{const t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},nw=e=>tw(e).init.bindEvents(),ow=e=>0===e.dom.length?(xo(e),I.none()):I.some(e),rw=(e,t,n,o,r)=>{e.bind((e=>((o?ch:dh)(e.dom,o?e.dom.length:0,r),t.filter(Kt).map((t=>((e,t,n,o,r)=>{const s=e.dom,a=t.dom,i=o?s.length:a.length;o?(uh(s,a,r,!1,!o),n.setStart(a,i)):(uh(a,s,r,!1,!o),n.setEnd(a,i))})(e,t,n,o,r)))))).orThunk((()=>{const e=((e,t)=>e.filter((e=>Jm.isBookmarkNode(e.dom))).bind(t?Pn:Bn))(t,o).or(t).filter(Kt);return e.map((e=>((e,t,n)=>{An(e).each((o=>{const r=e.dom;t&&eh(o,Vi(r,0),n)?dh(r,0,n):!t&&th(o,Vi(r,r.length),n)&&ch(r,r.length,n)}))})(e,o,r)))}))},sw=(e,t,n)=>{if(Ee(e,t)){const o=Y(e[t],(e=>e!==n));0===o.length?delete e[t]:e[t]=o}};const aw=e=>!(!e||!e.ownerDocument)&&Sn(yn(e.ownerDocument),yn(e)),iw=(e,t,n,o)=>{let r,s;const{selectorChangedWithUnbind:a}=((e,t)=>{let n,o;const r=(t,n)=>J(n,(n=>e.is(n,t))),s=t=>e.getParents(t,void 0,e.getRoot());return{selectorChangedWithUnbind:(e,a)=>(n||(n={},o={},t.on("NodeChange",(e=>{const t=e.element,a=s(t),i={};ge(n,((e,t)=>{r(t,a).each((n=>{o[t]||(V(e,(e=>{e(!0,{node:n,selector:t,parents:a})})),o[t]=e),i[t]=e}))})),ge(o,((e,n)=>{i[n]||(delete o[n],V(e,(e=>{e(!1,{node:t,selector:n,parents:a})})))}))}))),n[e]||(n[e]=[]),n[e].push(a),r(e,s(t.selection.getStart())).each((()=>{o[e]=n[e]})),{unbind:()=>{sw(n,e,a),sw(o,e,a)}})}})(e,o),i=(e,t)=>((e,t,n={})=>{const o=((e,t)=>({format:"html",...e,set:!0,selection:!0,content:t}))(n,t);_C(e,o).each((t=>{const n=((e,t)=>{if("raw"!==t.format){const n=e.selection.getRng(),o=e.dom.getParent(n.commonAncestorContainer,e.dom.isBlock),r=o?{context:o.nodeName.toLowerCase()}:{},s=e.parser.parse(t.content,{forced_root_block:!1,...r,...t});return up({validate:!1},e.schema).serialize(s)}return t.content})(e,t),o=e.selection.getRng();((e,t,n)=>{const o=I.from(t.firstChild).map(yn),r=I.from(t.lastChild).map(yn);e.deleteContents(),e.insertNode(t);const s=o.bind(Bn).filter(Kt).bind(ow),a=r.bind(Pn).filter(Kt).bind(ow);rw(s,o,e,!0,n),rw(a,r,e,!1,n),e.collapse(!1)})(o,o.createContextualFragment(n),e.schema),e.selection.setRng(o),sg(e,o),SC(e,n,t)}))})(o,e,t),l=e=>{const t=c();t.collapse(!!e),u(t)},d=()=>t.getSelection?t.getSelection():t.document.selection,c=()=>{let n;const a=(e,t,n)=>{try{return t.compareBoundaryPoints(e,n)}catch(e){return-1}},i=t.document;if(C(o.bookmark)&&!Rg(o)){const e=hg(o);if(e.isSome())return e.map((e=>Mg(o,[e])[0])).getOr(i.createRange())}try{const e=d();e&&!$o(e.anchorNode)&&(n=e.rangeCount>0?e.getRangeAt(0):i.createRange(),n=Mg(o,[n])[0])}catch(e){}if(n||(n=i.createRange()),rr(n.startContainer)&&n.collapsed){const t=e.getRoot();n.setStart(t,0),n.setEnd(t,0)}return r&&s&&(0===a(n.START_TO_START,n,r)&&0===a(n.END_TO_END,n,r)?n=s:(r=null,s=null)),n},u=(e,t)=>{if(!(e=>!!e&&aw(e.startContainer)&&aw(e.endContainer))(e))return;const n=d();if(e=o.dispatch("SetSelectionRange",{range:e,forward:t}).range,n){s=e;try{n.removeAllRanges(),n.addRange(e)}catch(e){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),r=n.rangeCount>0?n.getRangeAt(0):null}if(!e.collapsed&&e.startContainer===e.endContainer&&(null==n?void 0:n.setBaseAndExtent)&&e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()){const t=e.startContainer.childNodes[e.startOffset];t&&"IMG"===t.nodeName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(t,0,t,1))}o.dispatch("AfterSetSelectionRange",{range:e,forward:t})},m=()=>{const t=d(),n=null==t?void 0:t.anchorNode,o=null==t?void 0:t.focusNode;if(!t||!n||!o||$o(n)||$o(o))return!0;const r=e.createRng(),s=e.createRng();try{r.setStart(n,t.anchorOffset),r.collapse(!0),s.setStart(o,t.focusOffset),s.collapse(!0)}catch(e){return!0}return r.compareBoundaryPoints(r.START_TO_START,s)<=0},f={dom:e,win:t,serializer:n,editor:o,expand:(t={type:"word"})=>u(Uf(e).expand(c(),t)),collapse:l,setCursorLocation:(t,n)=>{const r=e.createRng();C(t)&&C(n)?(r.setStart(t,n),r.setEnd(t,n),u(r),l(!1)):(sm(e,r,o.getBody(),!0),u(r))},getContent:e=>((e,t={})=>((e,t,n)=>tw(e).selection.getContent(t,n))(e,t.format?t.format:"html",t))(o,e),setContent:i,getBookmark:(e,t)=>g.getBookmark(e,t),moveToBookmark:e=>g.moveToBookmark(e),select:(t,n)=>(((e,t,n)=>I.from(t).bind((t=>I.from(t.parentNode).map((o=>{const r=e.nodeIndex(t),s=e.createRng();return s.setStart(o,r),s.setEnd(o,r+1),n&&(sm(e,s,t,!0),sm(e,s,t,!1)),s})))))(e,t,n).each(u),t),isCollapsed:()=>{const e=c(),t=d();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isEditable:()=>{const t=c(),n=o.getBody().querySelectorAll('[data-mce-selected="1"]');return n.length>0?ne(n,(t=>e.isEditable(t.parentElement))):Og(e,t)},isForward:m,setNode:t=>(i(e.getOuterHTML(t)),t),getNode:()=>((e,t)=>{if(!t)return e;let n=t.startContainer,o=t.endContainer;const r=t.startOffset,s=t.endOffset;let a=t.commonAncestorContainer;t.collapsed||(n===o&&s-r<2&&n.hasChildNodes()&&(a=n.childNodes[r]),er(n)&&er(o)&&(n=n.length===r?Lg(n.nextSibling,!0):n.parentNode,o=0===s?Lg(o.previousSibling,!1):o.parentNode,n&&n===o&&(a=n)));const i=er(a)?a.parentNode:a;return Vo(i)?i:e})(o.getBody(),c()),getSel:d,setRng:u,getRng:c,getStart:e=>Pg(o.getBody(),c(),e),getEnd:e=>Dg(o.getBody(),c(),e),getSelectedBlocks:(t,n)=>((e,t,n,o)=>{const r=[],s=e.getRoot(),a=e.getParent(n||Pg(s,t,t.collapsed),e.isBlock),i=e.getParent(o||Dg(s,t,t.collapsed),e.isBlock);if(a&&a!==s&&r.push(a),a&&i&&a!==i){let t;const n=new jo(a,s);for(;(t=n.next())&&t!==i;)e.isBlock(t)&&r.push(t)}return i&&a!==i&&i!==s&&r.push(i),r})(e,c(),t,n),normalize:()=>{const t=c(),n=d();if(!(Ju(n).length>1)&&am(o)){const n=Mf(e,t);return n.each((e=>{u(e,m())})),n.getOr(t)}return t},selectorChanged:(e,t)=>(a(e,t),f),selectorChangedWithUnbind:a,getScrollContainer:()=>{let t,n=e.getRoot();for(;n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},scrollIntoView:(e,t)=>{C(e)?((e,t,n)=>{(e.inline?ng:rg)(e,t,n)})(o,e,t):sg(o,c(),t)},placeCaretAt:(e,t)=>u(Rf(e,t,o.getDoc())),getBoundingClientRect:()=>{const e=c();return e.collapsed?Vi.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:()=>{t=r=s=null,p.destroy()}},g=Jm(f),p=mf(f,o);return f.bookmarkManager=g,f.controlSelection=p,f},lw=(e,t,n)=>{-1===Pt.inArray(t,n)&&(e.addAttributeFilter(n,((e,t)=>{let n=e.length;for(;n--;)e[n].attr(t,null)})),t.push(n))},dw=(e,t)=>{const n=["data-mce-selected"],o={entity_encoding:"named",remove_trailing_brs:!0,pad_empty_with_br:!1,...e},r=t&&t.dom?t.dom:za.DOM,s=t&&t.schema?t.schema:ua(o),a=CC(o,s);return((e,t,n)=>{e.addAttributeFilter("data-mce-tabindex",((e,t)=>{let n=e.length;for(;n--;){const o=e[n];o.attr("tabindex",o.attr("data-mce-tabindex")),o.attr(t,null)}})),e.addAttributeFilter("src,href,style",((e,o)=>{const r="data-mce-"+o,s=t.url_converter,a=t.url_converter_scope;let i=e.length;for(;i--;){const t=e[i];let l=t.attr(r);void 0!==l?(t.attr(o,l.length>0?l:null),t.attr(r,null)):(l=t.attr(o),"style"===o?l=n.serializeStyle(n.parseStyle(l),t.name):s&&(l=s.call(a,l,o,t.name)),t.attr(o,l.length>0?l:null))}})),e.addAttributeFilter("class",(e=>{let t=e.length;for(;t--;){const n=e[t];let o=n.attr("class");o&&(o=o.replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",o.length>0?o:null))}})),e.addAttributeFilter("data-mce-type",((e,t,n)=>{let o=e.length;for(;o--;){const t=e[o];if("bookmark"===t.attr("data-mce-type")&&!n.cleanup){const e=I.from(t.firstChild).exists((e=>{var t;return!Pr(null!==(t=e.value)&&void 0!==t?t:"")}));e?t.unwrap():t.remove()}}})),e.addNodeFilter("script,style",((e,n)=>{var o;const r=e=>e.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"");let s=e.length;for(;s--;){const a=e[s],i=a.firstChild,l=null!==(o=null==i?void 0:i.value)&&void 0!==o?o:"";if("script"===n){const e=a.attr("type");e&&a.attr("type","mce-no/type"===e?null:e.replace(/^mce\-/,"")),"xhtml"===t.element_format&&i&&l.length>0&&(i.value="// ")}else"xhtml"===t.element_format&&i&&l.length>0&&(i.value="\x3c!--\n"+r(l)+"\n--\x3e")}})),e.addNodeFilter("#comment",(e=>{let o=e.length;for(;o--;){const r=e[o],s=r.value;t.preserve_cdata&&0===(null==s?void 0:s.indexOf("[CDATA["))?(r.name="#cdata",r.type=4,r.value=n.decode(s.replace(/^\[CDATA\[|\]\]$/g,""))):0===(null==s?void 0:s.indexOf("mce:protected "))&&(r.name="#text",r.type=3,r.raw=!0,r.value=unescape(s).substr(14))}})),e.addNodeFilter("xml:namespace,input",((e,t)=>{let n=e.length;for(;n--;){const o=e[n];7===o.type?o.remove():1===o.type&&("input"!==t||o.attr("type")||o.attr("type","text"))}})),e.addAttributeFilter("data-mce-type",(t=>{V(t,(t=>{"format-caret"===t.attr("data-mce-type")&&(t.isEmpty(e.schema.getNonEmptyElements())?t.remove():t.unwrap())}))})),e.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-block,data-mce-type,data-mce-resize,data-mce-placeholder",((e,t)=>{let n=e.length;for(;n--;)e[n].attr(t,null)})),t.remove_trailing_brs&&Wv(t,e,e.schema)})(a,o,r),{schema:s,addNodeFilter:a.addNodeFilter,addAttributeFilter:a.addAttributeFilter,serialize:(e,n={})=>{const i={format:"html",...n},l=((e,t,n)=>((e,t)=>C(e)&&e.hasEventListeners("PreProcess")&&!t.no_events)(e,n)?((e,t,n)=>{let o;const r=e.dom;let s=t.cloneNode(!0);const a=document.implementation;if(a.createHTMLDocument){const e=a.createHTMLDocument("");Pt.each("BODY"===s.nodeName?s.childNodes:[s],(t=>{e.body.appendChild(e.importNode(t,!0))})),s="BODY"!==s.nodeName?e.body.firstChild:e.body,o=r.doc,r.doc=e}return((e,t)=>{e.dispatch("PreProcess",t)})(e,{...n,node:s}),o&&(r.doc=o),s})(e,t,n):t)(t,e,i),d=((e,t,n)=>{const o=Dr(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||Ar(yn(t))?o:Pt.trim(o)})(r,l,i),c=((e,t,n)=>{const o=n.selection?{forced_root_block:!1,...n}:n,r=e.parse(t,o);return(e=>{const t=e=>"br"===(null==e?void 0:e.name),n=e.lastChild;if(t(n)){const e=n.prev;t(e)&&(n.remove(),e.remove())}})(r),r})(a,d,i);return"tree"===i.format?c:((e,t,n,o,r)=>{const s=((e,t,n)=>up(e,t).serialize(n))(t,n,o);return((e,t,n)=>{if(!t.no_events&&e){const o=((e,t)=>e.dispatch("PostProcess",t))(e,{...t,content:n});return o.content}return n})(e,r,s)})(t,o,s,c,i)},addRules:s.addValidElements,setRules:s.setValidElements,addTempAttr:T(lw,a,n),getTempAttrs:N(n),getNodeFilters:a.getNodeFilters,getAttributeFilters:a.getAttributeFilters,removeNodeFilter:a.removeNodeFilter,removeAttributeFilter:a.removeAttributeFilter}},cw=(e,t)=>{const n=dw(e,t);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters,removeNodeFilter:n.removeNodeFilter,removeAttributeFilter:n.removeAttributeFilter}},uw=(e,t,n={})=>{const o=((e,t)=>({format:"html",...e,set:!0,content:t}))(n,t);return _C(e,o).map((t=>{const n=((e,t,n)=>ew(e).editor.setContent(t,n))(e,t.content,t);return SC(e,n.html,t),n.content})).getOr(t)},mw="autoresize_on_init,content_editable_state,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,tabfocus_elements,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_enable_default_filters,paste_filter_drop,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists".split(","),fw="template_cdate_classes,template_mdate_classes,template_selected_content_classes,template_preview_replace_values,template_replace_values,templates,template_cdate_format,template_mdate_format".split(","),gw="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),pw=[{name:"template",replacedWith:"Advanced Template"},{name:"rtc"}],hw=(e,t)=>{const n=Y(t,(t=>Ee(e,t)));return ae(n)},bw=e=>{const t=hw(e,mw),n=e.forced_root_block;return!1!==n&&""!==n||t.push("forced_root_block (false only)"),ae(t)},vw=e=>hw(e,fw),yw=(e,t)=>{const n=Pt.makeMap(e.plugins," "),o=Y(t,(e=>Ee(n,e)));return ae(o)},Cw=e=>yw(e,gw),ww=e=>yw(e,pw.map((e=>e.name))),xw=e=>J(pw,(t=>t.name===e)).fold((()=>e),(t=>t.replacedWith?`${e}, replaced by ${t.replacedWith}`:e)),Ew=za.DOM,_w=e=>I.from(e).each((e=>e.destroy())),Sw=(()=>{const e={};return{add:(t,n)=>{e[t]=n},get:t=>e[t]?e[t]:{icons:{}},has:t=>Ee(e,t)}})(),kw=Ya.ModelManager,Nw=(e,t)=>t.dom[e],Rw=(e,t)=>parseInt(co(t,e),10),Aw=T(Nw,"clientWidth"),Tw=T(Nw,"clientHeight"),Ow=T(Rw,"margin-top"),Bw=T(Rw,"margin-left"),Pw=e=>{const t=[],n=()=>{const t=e.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():(()=>{const e=()=>{throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,getArgs:e}})()},o=()=>I.from(t[0]),r=()=>{V(t,(e=>{e.reposition()}))},s=e=>{Z(t,(t=>t===e)).each((e=>{t.splice(e,1)}))},a=(a,i=!0)=>e.removed||!(e=>{return(t=e.inline?e.getBody():e.getContentAreaContainer(),I.from(t).map(yn)).map(Gn).getOr(!1);var t})(e)?{}:(i&&e.dispatch("BeforeOpenNotification",{notification:a}),J(t,(e=>{return t=n().getArgs(e),o=a,!(t.type!==o.type||t.text!==o.text||t.progressBar||t.timeout||o.progressBar||o.timeout);var t,o})).getOrThunk((()=>{e.editorManager.setActive(e);const i=n().open(a,(()=>{s(i),r(),Ag(e)&&o().fold((()=>e.focus()),(e=>ag(yn(e.getEl()))))}));return(e=>{t.push(e)})(i),r(),e.dispatch("OpenNotification",{notification:{...i}}),i}))),i=N(t);return(e=>{e.on("SkinLoaded",(()=>{const t=gd(e);t&&a({text:t,type:"warning",timeout:0},!1),r()})),e.on("show ResizeEditor ResizeWindow NodeChange",(()=>{requestAnimationFrame(r)})),e.on("remove",(()=>{V(t.slice(),(e=>{n().close(e)}))}))})(e),{open:a,close:()=>{o().each((e=>{n().close(e),s(e),r()}))},getNotifications:i}},Dw=Ya.PluginManager,Lw=Ya.ThemeManager,Mw=e=>{let t=[];const n=()=>{const t=e.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():(()=>{const e=()=>{throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e}})()},o=(e,t)=>(...n)=>t?t.apply(e,n):void 0,r=n=>{(t=>{e.dispatch("CloseWindow",{dialog:t})})(n),t=Y(t,(e=>e!==n)),0===t.length&&e.focus()},s=n=>{e.editorManager.setActive(e),pg(e),e.ui.show();const o=n();return(n=>{t.push(n),(t=>{e.dispatch("OpenWindow",{dialog:t})})(n)})(o),o};return e.on("remove",(()=>{V(t,(e=>{n().close(e)}))})),{open:(e,t)=>s((()=>n().open(e,t,r))),openUrl:e=>s((()=>n().openUrl(e,r))),alert:(e,t,r)=>{const s=n();s.alert(e,o(r||s,t))},confirm:(e,t,r)=>{const s=n();s.confirm(e,o(r||s,t))},close:()=>{I.from(t[t.length-1]).each((e=>{n().close(e),r(e)}))}}},Iw=(e,t)=>{e.notificationManager.open({type:"error",text:t})},Fw=(e,t)=>{e._skinLoaded?Iw(e,t):e.on("SkinLoaded",(()=>{Iw(e,t)}))},Uw=(e,t,n)=>{ef(e,t,{message:n}),console.error(n)},zw=(e,t,n)=>n?`Failed to load ${e}: ${n} from url ${t}`:`Failed to load ${e} url: ${t}`,jw=(e,...t)=>{const n=window.console;n&&(n.error?n.error(e,...t):n.log(e,...t))},Hw=e=>"content/"+e+"/content.css",$w=(e,t)=>{const n=e.editorManager.baseURL+"/skins/content",o=`content${e.editorManager.suffix}.css`;return q(t,(t=>(e=>tinymce.Resource.has(Hw(e)))(t)?t:(e=>/^[a-z0-9\-]+$/i.test(e))(t)&&!e.inline?`${n}/${t}/${o}`:e.documentBaseURI.toAbsolute(t)))},qw=(e,t)=>{const n={};return{findAll:(o,r=M)=>{const s=Y((e=>e?ce(e.getElementsByTagName("img")):[])(o),(t=>{const n=t.src;return!t.hasAttribute("data-mce-bogus")&&!t.hasAttribute("data-mce-placeholder")&&!(!n||n===At.transparentSrc)&&(He(n,"blob:")?!e.isUploaded(n)&&r(t):!!He(n,"data:")&&r(t))})),a=q(s,(e=>{const o=e.src;if(Ee(n,o))return n[o].then((t=>m(t)?t:{image:e,blobInfo:t.blobInfo}));{const r=((e,t)=>{const n=()=>Promise.reject("Invalid data URI");if(He(t,"blob:")){const s=e.getByUri(t);return C(s)?Promise.resolve(s):(o=t,He(o,"blob:")?(e=>fetch(e).then((e=>e.ok?e.blob():Promise.reject())).catch((()=>Promise.reject({message:`Cannot convert ${e} to Blob. Resource might not exist or is inaccessible.`,uriType:"blob"}))))(o):He(o,"data:")?(r=o,new Promise(((e,t)=>{Kv(r).bind((({type:e,data:t,base64Encoded:n})=>Yv(e,t,n))).fold((()=>t("Invalid data URI")),e)}))):Promise.reject("Unknown URI format")).then((t=>Gv(t).then((o=>Qv(o,!1,(n=>I.some(Jv(e,t,n)))).getOrThunk(n)))))}var o,r;return He(t,"data:")?Zv(e,t).fold(n,(e=>Promise.resolve(e))):Promise.reject("Unknown image data format")})(t,o).then((t=>(delete n[o],{image:e,blobInfo:t}))).catch((e=>(delete n[o],e)));return n[o]=r,r}}));return Promise.all(a)}}},Vw=()=>{let e={};const t=(e,t)=>({status:e,resultUri:t}),n=t=>t in e;return{hasBlobUri:n,getResultUri:t=>{const n=e[t];return n?n.resultUri:null},isPending:t=>!!n(t)&&1===e[t].status,isUploaded:t=>!!n(t)&&2===e[t].status,markPending:n=>{e[n]=t(1,null)},markUploaded:(n,o)=>{e[n]=t(2,o)},removeFailed:t=>{delete e[t]},destroy:()=>{e={}}}};let Ww=0;const Kw=(e,t)=>{const n={},o=(e,n)=>new Promise(((o,r)=>{const s=new XMLHttpRequest;s.open("POST",t.url),s.withCredentials=t.credentials,s.upload.onprogress=e=>{n(e.loaded/e.total*100)},s.onerror=()=>{r("Image upload failed due to a XHR Transport error. Code: "+s.status)},s.onload=()=>{if(s.status<200||s.status>=300)return void r("HTTP Error: "+s.status);const e=JSON.parse(s.responseText);var n,a;e&&m(e.location)?o((n=t.basePath,a=e.location,n?n.replace(/\/$/,"")+"/"+a.replace(/^\//,""):a)):r("Invalid JSON: "+s.responseText)};const a=new FormData;a.append("file",e.blob(),e.filename()),s.send(a)})),r=w(t.handler)?t.handler:o,s=(e,t)=>({url:t,blobInfo:e,status:!0}),a=(e,t)=>({url:"",blobInfo:e,status:!1,error:t}),i=(e,t)=>{Pt.each(n[e],(e=>{e(t)})),delete n[e]};return{upload:(l,d)=>t.url||r!==o?((t,o)=>(t=Pt.grep(t,(t=>!e.isUploaded(t.blobUri()))),Promise.all(Pt.map(t,(t=>e.isPending(t.blobUri())?(e=>{const t=e.blobUri();return new Promise((e=>{n[t]=n[t]||[],n[t].push(e)}))})(t):((t,n,o)=>(e.markPending(t.blobUri()),new Promise((r=>{let l,d;try{const c=()=>{l&&(l.close(),d=_)},u=n=>{c(),e.markUploaded(t.blobUri(),n),i(t.blobUri(),s(t,n)),r(s(t,n))},f=n=>{c(),e.removeFailed(t.blobUri()),i(t.blobUri(),a(t,n)),r(a(t,n))};d=e=>{e<0||e>100||I.from(l).orThunk((()=>I.from(o).map(P))).each((t=>{l=t,t.progressBar.value(e)}))},n(t,d).then(u,(e=>{f(m(e)?{message:e}:e)}))}catch(e){r(a(t,e))}}))))(t,r,o))))))(l,d):new Promise((e=>{e([])}))}},Yw=e=>()=>e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0}),Gw=(e,t)=>Kw(t,{url:Gl(e),basePath:Xl(e),credentials:Ql(e),handler:Jl(e)}),Xw=e=>{const t=(()=>{let e=[];const t=e=>{if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");const t=e.id||"blobid"+Ww+++(()=>{const e=()=>Math.round(4294967295*Math.random()).toString(36);return"s"+(new Date).getTime().toString(36)+e()+e()+e()})(),n=e.name||t,o=e.blob;var r;return{id:N(t),name:N(n),filename:N(e.filename||n+"."+(r=o.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"}[r.toLowerCase()]||"dat")),blob:N(o),base64:N(e.base64),blobUri:N(e.blobUri||URL.createObjectURL(o)),uri:N(e.uri)}},n=t=>J(e,t).getOrUndefined(),o=e=>n((t=>t.id()===e));return{create:(e,n,o,r,s)=>{if(m(e))return t({id:e,name:r,filename:s,blob:n,base64:o});if(f(e))return t(e);throw new Error("Unknown input type")},add:t=>{o(t.id())||e.push(t)},get:o,getByUri:e=>n((t=>t.blobUri()===e)),getByData:(e,t)=>n((n=>n.base64()===e&&n.blob().type===t)),findFirst:n,removeByUri:t=>{e=Y(e,(e=>e.blobUri()!==t||(URL.revokeObjectURL(e.blobUri()),!1)))},destroy:()=>{V(e,(e=>{URL.revokeObjectURL(e.blobUri())})),e=[]}}})();let n,o;const r=Vw(),s=[],a=t=>n=>e.selection?t(n):[],i=(e,t,n)=>{let o=0;do{o=e.indexOf(t,o),-1!==o&&(e=e.substring(0,o)+n+e.substr(o+t.length),o+=n.length-t.length+1)}while(-1!==o);return e},l=(e,t,n)=>{const o=`src="${n}"${n===At.transparentSrc?' data-mce-placeholder="1"':""}`;return e=i(e,`src="${t}"`,o),i(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},d=(t,n)=>{V(e.undoManager.data,(e=>{"fragmented"===e.type?e.fragments=q(e.fragments,(e=>l(e,t,n))):e.content=l(e.content,t,n)}))},c=()=>(n||(n=Gw(e,r)),p().then(a((o=>{const r=q(o,(e=>e.blobInfo));return n.upload(r,Yw(e)).then(a((n=>{const r=[];let s=!1;const a=q(n,((n,a)=>{const{blobInfo:i,image:l}=o[a];let c=!1;return n.status&&Wl(e)?(n.url&&!je(l.src,n.url)&&(s=!0),t.removeByUri(l.src),ZC(e)||((t,n)=>{const o=e.convertURL(n,"src");var r;d(t.src,n),Zt(yn(t),{src:Vl(e)?(r=n,r+(-1===r.indexOf("?")?"?":"&")+(new Date).getTime()):n,"data-mce-src":o})})(l,n.url)):n.error&&(n.error.remove&&(d(l.src,At.transparentSrc),r.push(l),c=!0),((e,t)=>{Fw(e,Ka.translate(["Failed to upload image: {0}",t]))})(e,n.error.message)),{element:l,status:n.status,uploadUri:n.url,blobInfo:i,removed:c}}));return r.length>0&&!ZC(e)?e.undoManager.transact((()=>{V(_o(r),(n=>{const o=An(n);xo(n),o.each((e=>t=>{((e,t)=>e.dom.isEmpty(t.dom)&&C(e.schema.getTextBlockElements()[Ht(t)]))(e,t)&&vo(t,hn('
    '))})(e)),t.removeByUri(n.dom.src)}))})):s&&e.undoManager.dispatchChange(),a})))})))),u=()=>ql(e)?c():Promise.resolve([]),g=e=>ne(s,(t=>t(e))),p=()=>(o||(o=qw(r,t)),o.findAll(e.getBody(),g).then(a((t=>{const n=Y(t,(t=>m(t)?(Fw(e,t),!1):"blob"!==t.uriType));return ZC(e)||V(n,(e=>{d(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")})),n})))),h=n=>n.replace(/src="(blob:[^"]+)"/g,((n,o)=>{const s=r.getResultUri(o);if(s)return'src="'+s+'"';let a=t.getByUri(o);return a||(a=X(e.editorManager.get(),((e,t)=>e||t.editorUpload&&t.editorUpload.blobCache.getByUri(o)),void 0)),a?'src="data:'+a.blob().type+";base64,"+a.base64()+'"':n}));return e.on("SetContent",(()=>{ql(e)?u():p()})),e.on("RawSaveContent",(e=>{e.content=h(e.content)})),e.on("GetContent",(e=>{e.source_view||"raw"===e.format||"tree"===e.format||(e.content=h(e.content))})),e.on("PostRender",(()=>{e.parser.addNodeFilter("img",(e=>{V(e,(e=>{const n=e.attr("src");if(!n||t.getByUri(n))return;const o=r.getResultUri(n);o&&e.attr("src",o)}))}))})),{blobCache:t,addFilter:e=>{s.push(e)},uploadImages:c,uploadImagesAuto:u,scanForImages:p,destroy:()=>{t.destroy(),r.destroy(),o=n=null}}},Qw={remove_similar:!0,inherit:!1},Jw={selector:"td,th",...Qw},Zw={tablecellbackgroundcolor:{styles:{backgroundColor:"%value"},...Jw},tablecellverticalalign:{styles:{"vertical-align":"%value"},...Jw},tablecellbordercolor:{styles:{borderColor:"%value"},...Jw},tablecellclass:{classes:["%value"],...Jw},tableclass:{selector:"table",classes:["%value"],...Qw},tablecellborderstyle:{styles:{borderStyle:"%value"},...Jw},tablecellborderwidth:{styles:{borderWidth:"%value"},...Jw}},ex=N(Zw),tx=Pt.each,nx=za.DOM,ox=e=>C(e)&&f(e),rx=(e,t)=>{const n=t&&t.schema||ua({}),o=e=>{const t=m(e)?{name:e,classes:[],attrs:{}}:e,n=nx.create(t.name);return((e,t)=>{t.classes.length>0&&nx.addClass(e,t.classes.join(" ")),nx.setAttribs(e,t.attrs)})(n,t),n},r=(e,t,s)=>{let a;const i=t[0],l=ox(i)?i.name:void 0,d=((e,t)=>{const o=n.getElementRule(e.nodeName.toLowerCase()),r=null==o?void 0:o.parentsRequired;return!(!r||!r.length)&&(t&&H(r,t)?t:r[0])})(e,l);if(d)l===d?(a=i,t=t.slice(1)):a=d;else if(i)a=i,t=t.slice(1);else if(!s)return e;const c=a?o(a):nx.create("div");c.appendChild(e),s&&Pt.each(s,(t=>{const n=o(t);c.insertBefore(n,e)}));const u=ox(a)?a.siblings:void 0;return r(c,t,u)},s=nx.create("div");if(e.length>0){const t=e[0],n=o(t),a=ox(t)?t.siblings:void 0;s.appendChild(r(n,e.slice(1),a))}return s},sx=e=>{let t="div";const n={name:t,classes:[],attrs:{},selector:e=Pt.trim(e)};return"*"!==e&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,((e,t,o,r,s)=>{switch(t){case"#":n.attrs.id=o;break;case".":n.classes.push(o);break;case":":-1!==Pt.inArray("checked disabled enabled read-only required".split(" "),o)&&(n.attrs[o]=o)}if("["===r){const e=s.match(/([\w\-]+)(?:\=\"([^\"]+))?/);e&&(n.attrs[e[1]]=e[2])}return""}))),n.name=t||"div",n},ax=(e,t)=>{let n="",o=wd(e);if(""===o)return"";const r=e=>m(e)?e.replace(/%(\w+)/g,""):"",s=(t,n)=>nx.getStyle(null!=n?n:e.getBody(),t,!0);if(m(t)){const n=e.formatter.get(t);if(!n)return"";t=n[0]}if("preview"in t){const e=t.preview;if(!1===e)return"";o=e||o}let a,i=t.block||t.inline||"span";const l=(d=t.selector,m(d)?(d=(d=d.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Pt.map(d.split(/(?:>|\s+(?![^\[\]]+\]))/),(e=>{const t=Pt.map(e.split(/(?:~\+|~|\+)/),sx),n=t.pop();return t.length&&(n.siblings=t),n})).reverse()):[]);var d;l.length>0?(l[0].name||(l[0].name=i),i=t.selector,a=rx(l,e)):a=rx([i],e);const c=nx.select(i,a)[0]||a.firstChild;tx(t.styles,((e,t)=>{const n=r(e);n&&nx.setStyle(c,t,n)})),tx(t.attributes,((e,t)=>{const n=r(e);n&&nx.setAttrib(c,t,n)})),tx(t.classes,(e=>{const t=r(e);nx.hasClass(c,t)||nx.addClass(c,t)})),e.dispatch("PreviewFormats"),nx.setStyles(a,{position:"absolute",left:-65535}),e.getBody().appendChild(a);const u=s("fontSize"),f=/px$/.test(u)?parseInt(u,10):0;return tx(o.split(" "),(e=>{let t=s(e,c);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=s(e),"#ffffff"===Ca(t).toLowerCase())||"color"===e&&"#000000"===Ca(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===f)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*f+"px"}"border"===e&&t&&(n+="padding:0 2px;"),n+=e+":"+t+";"}})),e.dispatch("AfterPreviewFormats"),nx.remove(a),n},ix=e=>{const t=(e=>{const t={},n=(e,o)=>{e&&(m(e)?(p(o)||(o=[o]),V(o,(e=>{v(e.deep)&&(e.deep=!km(e)),v(e.split)&&(e.split=!km(e)||Nm(e)),v(e.remove)&&km(e)&&!Nm(e)&&(e.remove="none"),km(e)&&Nm(e)&&(e.mixed=!0,e.block_expand=!0),m(e.classes)&&(e.classes=e.classes.split(/\s+/))})),t[e]=o):ge(e,((e,t)=>{n(t,e)})))};return n((e=>{const t=e.dom,n=e.schema.type,o={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"left"},inherit:!1,preview:!1},{selector:"img,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"},{selector:"table",collapsed:!1,styles:{marginLeft:"0px",marginRight:"auto"},onformat:e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"},{selector:".mce-preview-object",ceFalseOverride:!0,styles:{display:"table",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{marginLeft:"auto",marginRight:"auto"},preview:!1}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"},{selector:"table",collapsed:!1,styles:{marginRight:"0px",marginLeft:"auto"},onformat:e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"right"},preview:!1}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"justify"},inherit:!1,preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:(()=>{const e={inline:"span",styles:{textDecoration:"line-through"},exact:!0},t={inline:"strike",remove:"all",preserve_attributes:["class","style"]},o={inline:"s",remove:"all",preserve_attributes:["class","style"]};return"html4"!==n?[o,e,t]:[e,o,t]})(),forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:(e,t,n)=>qo(e)&&e.hasAttribute("href"),onformat:(e,n,o)=>{Pt.each(o,((n,o)=>{t.setAttrib(e,o,n)}))}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":e=>{var t;return null!==(t=null==e?void 0:e.customValue)&&void 0!==t?t:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return Pt.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),(e=>{o[e]={block:e,remove:"all"}})),o})(e)),n(ex()),n(Cd(e)),{get:e=>C(e)?t[e]:t,has:e=>Ee(t,e),register:n,unregister:e=>(e&&t[e]&&delete t[e],t)}})(e),n=$a({});return(e=>{e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(let t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])})(e),(e=>{e.on("mouseup keydown",(t=>{var n;((e,t,n)=>{const o=e.selection,r=e.getBody();Kb(e,null,n),8!==t&&46!==t||!o.isCollapsed()||o.getStart().innerHTML!==$b||Kb(e,Lu(r,o.getStart()),!0),37!==t&&39!==t||Kb(e,Lu(r,o.getStart()),!0)})(e,t.keyCode,(n=e.selection.getRng().endContainer,er(n)&&$e(n.data,br)))}))})(e),ZC(e)||((e,t)=>{e.set({}),t.on("NodeChange",(n=>{Hv(t,n.element,e.get())})),t.on("FormatApply FormatRemove",(n=>{const o=I.from(n.node).map((e=>dm(e)?e:e.startContainer)).bind((e=>qo(e)?I.some(e):I.from(e.parentElement))).getOrThunk((()=>Uv(t)));Hv(t,o,e.get())}))})(n,e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:(t,n,o)=>{((e,t,n,o)=>{tw(e).formatter.apply(t,n,o)})(e,t,n,o)},remove:(t,n,o,r)=>{((e,t,n,o,r)=>{tw(e).formatter.remove(t,n,o,r)})(e,t,n,o,r)},toggle:(t,n,o)=>{((e,t,n,o)=>{tw(e).formatter.toggle(t,n,o)})(e,t,n,o)},match:(t,n,o,r)=>((e,t,n,o,r)=>tw(e).formatter.match(t,n,o,r))(e,t,n,o,r),closest:t=>((e,t)=>tw(e).formatter.closest(t))(e,t),matchAll:(t,n)=>((e,t,n)=>tw(e).formatter.matchAll(t,n))(e,t,n),matchNode:(t,n,o,r)=>((e,t,n,o,r)=>tw(e).formatter.matchNode(t,n,o,r))(e,t,n,o,r),canApply:t=>((e,t)=>tw(e).formatter.canApply(t))(e,t),formatChanged:(t,o,r,s)=>((e,t,n,o,r,s)=>tw(e).formatter.formatChanged(t,n,o,r,s))(e,n,t,o,r,s),getCssText:T(ax,e)}},lx=e=>{switch(e.toLowerCase()){case"undo":case"redo":case"mcefocus":return!0;default:return!1}},dx=e=>{const t=Xa(),n=$a(0),o=$a(0),r={data:[],typing:!1,beforeChange:()=>{((e,t,n)=>{tw(e).undoManager.beforeChange(t,n)})(e,n,t)},add:(s,a)=>((e,t,n,o,r,s,a)=>tw(e).undoManager.add(t,n,o,r,s,a))(e,r,o,n,t,s,a),dispatchChange:()=>{e.setDirty(!0);const t=qC(e);t.bookmark=ml(e.selection),e.dispatch("change",{level:t,lastLevel:ie(r.data,o.get()).getOrUndefined()})},undo:()=>((e,t,n,o)=>tw(e).undoManager.undo(t,n,o))(e,r,n,o),redo:()=>((e,t,n)=>tw(e).undoManager.redo(t,n))(e,o,r.data),clear:()=>{((e,t,n)=>{tw(e).undoManager.clear(t,n)})(e,r,o)},reset:()=>{((e,t)=>{tw(e).undoManager.reset(t)})(e,r)},hasUndo:()=>((e,t,n)=>tw(e).undoManager.hasUndo(t,n))(e,r,o),hasRedo:()=>((e,t,n)=>tw(e).undoManager.hasRedo(t,n))(e,r,o),transact:t=>((e,t,n,o)=>tw(e).undoManager.transact(t,n,o))(e,r,n,t),ignore:t=>{((e,t,n)=>{tw(e).undoManager.ignore(t,n)})(e,n,t)},extra:(t,n)=>{((e,t,n,o,r)=>{tw(e).undoManager.extra(t,n,o,r)})(e,r,o,t,n)}};return ZC(e)||((e,t,n)=>{const o=$a(!1),r=e=>{XC(t,!1,n),t.add({},e)};e.on("init",(()=>{t.add()})),e.on("BeforeExecCommand",(e=>{const o=e.command;lx(o)||(QC(t,n),t.beforeChange())})),e.on("ExecCommand",(e=>{const t=e.command;lx(t)||r(e)})),e.on("ObjectResizeStart cut",(()=>{t.beforeChange()})),e.on("SaveContent ObjectResized blur",r),e.on("dragend",r),e.on("keyup",(n=>{const s=n.keyCode;if(n.isDefaultPrevented())return;const a=At.os.isMacOS()&&"Meta"===n.key;(s>=33&&s<=36||s>=37&&s<=40||45===s||n.ctrlKey||a)&&(r(),e.nodeChanged()),46!==s&&8!==s||e.nodeChanged(),o.get()&&t.typing&&!YC(qC(e),t.data[0])&&(e.isDirty()||e.setDirty(!0),e.dispatch("TypingUndo"),o.set(!1),e.nodeChanged())})),e.on("keydown",(e=>{const s=e.keyCode;if(e.isDefaultPrevented())return;if(s>=33&&s<=36||s>=37&&s<=40||45===s)return void(t.typing&&r(e));const a=e.ctrlKey&&!e.altKey||e.metaKey;if((s<16||s>20)&&224!==s&&91!==s&&!t.typing&&!a)return t.beforeChange(),XC(t,!0,n),t.add({},e),void o.set(!0);(At.os.isMacOS()?e.metaKey:e.ctrlKey&&!e.altKey)&&t.beforeChange()})),e.on("mousedown",(e=>{t.typing&&r(e)})),e.on("input",(e=>{var t;e.inputType&&("insertReplacementText"===e.inputType||"insertText"===(t=e).inputType&&null===t.data||(e=>"insertFromPaste"===e.inputType||"insertFromDrop"===e.inputType)(e))&&r(e)})),e.on("AddUndo Undo Redo ClearUndos",(t=>{t.isDefaultPrevented()||e.nodeChanged()}))})(e,r,n),(e=>{e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")})(e),r},cx=[9,27,af.HOME,af.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,af.DOWN,af.UP,af.LEFT,af.RIGHT].concat(At.browser.isFirefox()?[224]:[]),ux="data-mce-placeholder",mx=e=>"keydown"===e.type||"keyup"===e.type,fx=e=>{const t=e.keyCode;return t===af.BACKSPACE||t===af.DELETE},gx=(e,t)=>({from:e,to:t}),px=(e,t)=>{const n=yn(e),o=yn(t.container());return Ah(n,o).map((e=>((e,t)=>({block:e,position:t}))(e,t)))},hx=(e,t)=>Jn(t,(e=>Rr(e)||lr(e.dom)),(t=>_n(t,e))).filter(Wt).getOr(e),bx=(e,t)=>{const n=((e,t)=>{const n=Mn(e);return Z(n,(e=>t.isBlock(Ht(e)))).fold(N(n),(e=>n.slice(0,e)))})(e,t);return V(n,xo),n},vx=(e,t)=>{const n=Bp(t,e);return J(n.reverse(),(e=>gs(e))).each(xo)},yx=(e,t,n,o,r)=>{if(gs(n))return Or(n),Ou(n.dom);0===Y(Dn(r),(e=>!gs(e))).length&&gs(t)&&po(r,bn("br"));const s=Tu(n.dom,Vi.before(r.dom));return V(bx(t,o),(e=>{po(r,e)})),vx(e,t),s},Cx=(e,t,n,o)=>{if(gs(n)){if(gs(t)){const e=e=>{const t=(e,n)=>Fn(e).fold((()=>n),(e=>((e,t)=>e.isInline(Ht(t)))(o,e)?t(e,n.concat(fi(e))):n));return t(e,[])},r=G(e(n),((e,t)=>(yo(e,t),t)),Tr());wo(t),vo(t,r)}return xo(n),Ou(t.dom)}const r=Bu(n.dom);return V(bx(t,o),(e=>{vo(n,e)})),vx(e,t),r},wx=(e,t)=>{Ru(e,t.dom).bind((e=>I.from(e.getNode()))).map(yn).filter(Er).each(xo)},xx=(e,t,n,o)=>(wx(!0,t),wx(!1,n),((e,t)=>Sn(t,e)?((e,t)=>{const n=Bp(t,e);return I.from(n[n.length-1])})(t,e):I.none())(t,n).fold(T(Cx,e,t,n,o),T(yx,e,t,n,o))),Ex=(e,t,n,o,r)=>t?xx(e,o,n,r):xx(e,n,o,r),_x=(e,t)=>{const n=yn(e.getBody()),o=((e,t,n)=>n.collapsed?((e,t,n)=>{const o=px(e,Vi.fromRangeStart(n)),r=o.bind((n=>Su(t,e,n.position).bind((n=>px(e,n).map((n=>((e,t,n)=>ar(n.position.getNode())&&!gs(n.block)?Ru(!1,n.block.dom).bind((o=>o.isEqual(n.position)?Su(t,e,o).bind((t=>px(e,t))):I.some(n))).getOr(n):n)(e,t,n)))))));return Mt(o,r,gx).filter((t=>(e=>!_n(e.from.block,e.to.block))(t)&&((e,t)=>{const n=yn(e);return _n(hx(n,t.from.block),hx(n,t.to.block))})(e,t)&&(e=>!1===dr(e.from.block.dom)&&!1===dr(e.to.block.dom))(t)&&(e=>{const t=e=>_r(e)||Ns(e.dom);return t(e.from.block)&&t(e.to.block)})(t)))})(e,t,n):I.none())(n.dom,t,e.selection.getRng()).map((o=>()=>{Ex(n,t,o.from.block,o.to.block,e.schema).each((t=>{e.selection.setRng(t.toRange())}))}));return o},Sx=(e,t)=>{const n=yn(t),o=T(_n,e);return Qn(n,Rr,o).isSome()},kx=e=>{const t=yn(e.getBody());return((e,t)=>{const n=Tu(e.dom,Vi.fromRangeStart(t)).isNone(),o=Au(e.dom,Vi.fromRangeEnd(t)).isNone();return!((e,t)=>Sx(e,t.startContainer)||Sx(e,t.endContainer))(e,t)&&n&&o})(t,e.selection.getRng())?(e=>I.some((()=>{e.setContent(""),e.selection.setCursorLocation()})))(e):((e,t,n)=>{const o=t.getRng();return Mt(Ah(e,yn(o.startContainer)),Ah(e,yn(o.endContainer)),((r,s)=>_n(r,s)?I.none():I.some((()=>{o.deleteContents(),Ex(e,!0,r,s,n).each((e=>{t.setRng(e.toRange())}))})))).getOr(I.none())})(t,e.selection,e.schema)},Nx=(e,t)=>e.selection.isCollapsed()?I.none():kx(e),Rx=(e,t,n,o,r)=>I.from(t._selectionOverrides.showCaret(e,n,o,r)),Ax=(e,t)=>e.dispatch("BeforeObjectSelected",{target:t}).isDefaultPrevented()?I.none():I.some((e=>{const t=e.ownerDocument.createRange();return t.selectNode(e),t})(t)),Tx=(e,t,n)=>t.collapsed?((e,t,n)=>{const o=ru(1,e.getBody(),t),r=Vi.fromRangeStart(o),s=r.getNode();if(Lc(s))return Rx(1,e,s,!r.isAtEnd(),!1);const a=r.getNode(!0);if(Lc(a))return Rx(1,e,a,!1,!1);const i=lb(e.dom.getRoot(),r.getNode());return Lc(i)?Rx(1,e,i,!1,n):I.none()})(e,t,n).getOr(t):t,Ox=e=>Ap(e)||Sp(e),Bx=e=>Tp(e)||kp(e),Px=(e,t,n,o,r,s)=>{Rx(o,e,s.getNode(!r),r,!0).each((n=>{if(t.collapsed){const e=t.cloneRange();r?e.setEnd(n.startContainer,n.startOffset):e.setStart(n.endContainer,n.endOffset),e.deleteContents()}else t.deleteContents();e.selection.setRng(n)})),((e,t)=>{er(t)&&0===t.data.length&&e.remove(t)})(e.dom,n)},Dx=(e,t)=>((e,t)=>{const n=e.selection.getRng();if(!er(n.commonAncestorContainer))return I.none();const o=t?cu.Forwards:cu.Backwards,r=wu(e.getBody()),s=T(lu,t?r.next:r.prev),a=t?Ox:Bx,i=au(o,e.getBody(),n),l=s(i),d=l?Eh(t,l):l;if(!d||!du(i,d))return I.none();if(a(d))return I.some((()=>Px(e,n,i.getNode(),o,t,d)));const c=s(d);return c&&a(c)&&du(d,c)?I.some((()=>Px(e,n,i.getNode(),o,t,c))):I.none()})(e,t),Lx=(e,t)=>{const n=e.getBody();return t?Ou(n).filter(Ap):Bu(n).filter(Tp)},Mx=e=>{const t=e.selection.getRng();return!t.collapsed&&(Lx(e,!0).exists((e=>e.isEqual(Vi.fromRangeStart(t))))||Lx(e,!1).exists((e=>e.isEqual(Vi.fromRangeEnd(t)))))},Ix=hl([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),Fx=(e,t,n,o)=>Su(t,e,n).bind((r=>{return s=r.getNode(),C(s)&&(Rr(yn(s))||kr(yn(s)))||((e,t,n,o,r)=>{const s=t=>r.isInline(t.nodeName.toLowerCase())&&!Qc(n,o,e);return su(!t,n).fold((()=>su(t,o).fold(L,s)),s)})(e,t,n,r,o)?I.none():t&&dr(r.getNode())||!t&&dr(r.getNode(!0))?((e,t,n,o)=>{const r=o.getNode(!t);return Ah(yn(e),yn(n.getNode())).map((e=>gs(e)?Ix.remove(e.dom):Ix.moveToElement(r))).orThunk((()=>I.some(Ix.moveToElement(r))))})(e,t,n,r):t&&Tp(n)||!t&&Ap(n)?I.some(Ix.moveToPosition(r)):I.none();var s})),Ux=(e,t)=>I.from(lb(e.getBody(),t)),zx=(e,t)=>{const n=e.selection.getNode();return Ux(e,n).filter(dr).fold((()=>((e,t,n,o)=>{const r=ru(t?1:-1,e,n),s=Vi.fromRangeStart(r),a=yn(e);return!t&&Tp(s)?I.some(Ix.remove(s.getNode(!0))):t&&Ap(s)?I.some(Ix.remove(s.getNode())):!t&&Ap(s)&&qp(a,s,o)?Vp(a,s,o).map((e=>Ix.remove(e.getNode()))):t&&Tp(s)&&$p(a,s,o)?Wp(a,s,o).map((e=>Ix.remove(e.getNode()))):((e,t,n,o)=>((e,t)=>{const n=t.getNode(!e),o=e?"after":"before";return qo(n)&&n.getAttribute("data-mce-caret")===o})(t,n)?((e,t)=>y(t)?I.none():e&&dr(t.nextSibling)?I.some(Ix.moveToElement(t.nextSibling)):!e&&dr(t.previousSibling)?I.some(Ix.moveToElement(t.previousSibling)):I.none())(t,n.getNode(!t)).orThunk((()=>Fx(e,t,n,o))):Fx(e,t,n,o).bind((t=>((e,t,n)=>n.fold((e=>I.some(Ix.remove(e))),(e=>I.some(Ix.moveToElement(e))),(n=>Qc(t,n,e)?I.none():I.some(Ix.moveToPosition(n)))))(e,n,t))))(e,t,s,o)})(e.getBody(),t,e.selection.getRng(),e.schema).map((n=>()=>n.fold(((e,t)=>n=>(e._selectionOverrides.hideFakeCaret(),vh(e,t,yn(n)),!0))(e,t),((e,t)=>n=>{const o=t?Vi.before(n):Vi.after(n);return e.selection.setRng(o.toRange()),!0})(e,t),(e=>t=>(e.selection.setRng(t.toRange()),!0))(e))))),(()=>I.some(_)))},jx=e=>{const t=e.dom,n=e.selection,o=lb(e.getBody(),n.getNode());if(lr(o)&&t.isBlock(o)&&t.isEmpty(o)){const e=t.create("br",{"data-mce-bogus":"1"});t.setHTML(o,""),o.appendChild(e),n.setRng(Vi.before(e).toRange())}return!0},Hx=(e,t)=>e.selection.isCollapsed()?zx(e,t):((e,t)=>{const n=e.selection.getNode();return dr(n)&&!cr(n)?Ux(e,n.parentNode).filter(dr).fold((()=>I.some((()=>{var n;n=yn(e.getBody()),V(Uo(n,".mce-offscreen-selection"),xo),vh(e,t,yn(e.selection.getNode())),Th(e)}))),(()=>I.some(_))):Mx(e)?I.some((()=>{Ph(e,e.selection.getRng(),yn(e.getBody()))})):I.none()})(e,t),$x=(e,t)=>e.selection.isCollapsed()?((e,t)=>{const n=Vi.fromRangeStart(e.selection.getRng());return Su(t,e.getBody(),n).filter((e=>t?Ep(e):_p(e))).bind((e=>Jc(t?0:-1,e))).map((t=>()=>e.selection.select(t)))})(e,t):I.none(),qx=er,Vx=e=>qx(e)&&e.data[0]===Br,Wx=e=>qx(e)&&e.data[e.data.length-1]===Br,Kx=e=>{var t;return(null!==(t=e.ownerDocument)&&void 0!==t?t:document).createTextNode(Br)},Yx=(e,t)=>e?(e=>{var t;if(qx(e.previousSibling))return Wx(e.previousSibling)||e.previousSibling.appendData(Br),e.previousSibling;if(qx(e))return Vx(e)||e.insertData(0,Br),e;{const n=Kx(e);return null===(t=e.parentNode)||void 0===t||t.insertBefore(n,e),n}})(t):(e=>{var t,n;if(qx(e.nextSibling))return Vx(e.nextSibling)||e.nextSibling.insertData(0,Br),e.nextSibling;if(qx(e))return Wx(e)||e.appendData(Br),e;{const o=Kx(e);return e.nextSibling?null===(t=e.parentNode)||void 0===t||t.insertBefore(o,e.nextSibling):null===(n=e.parentNode)||void 0===n||n.appendChild(o),o}})(t),Gx=T(Yx,!0),Xx=T(Yx,!1),Qx=(e,t)=>er(e.container())?Yx(t,e.container()):Yx(t,e.getNode()),Jx=(e,t)=>{const n=t.get();return n&&e.container()===n&&Fr(n)},Zx=(e,t)=>t.fold((t=>{Rc(e.get());const n=Gx(t);return e.set(n),I.some(Vi(n,n.length-1))}),(t=>Ou(t).map((t=>{if(Jx(t,e)){const t=e.get();return Vi(t,1)}{Rc(e.get());const n=Qx(t,!0);return e.set(n),Vi(n,1)}}))),(t=>Bu(t).map((t=>{if(Jx(t,e)){const t=e.get();return Vi(t,t.length-1)}{Rc(e.get());const n=Qx(t,!1);return e.set(n),Vi(n,n.length-1)}}))),(t=>{Rc(e.get());const n=Xx(t);return e.set(n),I.some(Vi(n,1))})),eE=(e,t)=>{for(let n=0;nXc(t,e)||e,oE=(e,t,n)=>{const o=_h(n),r=nE(t,o.container());return xh(e,r,o).fold((()=>Au(r,o).bind(T(xh,e,r)).map((e=>tE.before(e)))),I.none)},rE=(e,t)=>null===Lu(e,t),sE=(e,t,n)=>xh(e,t,n).filter(T(rE,t)),aE=(e,t,n)=>{const o=Sh(n);return sE(e,t,o).bind((e=>Tu(e,o).isNone()?I.some(tE.start(e)):I.none()))},iE=(e,t,n)=>{const o=_h(n);return sE(e,t,o).bind((e=>Au(e,o).isNone()?I.some(tE.end(e)):I.none()))},lE=(e,t,n)=>{const o=Sh(n),r=nE(t,o.container());return xh(e,r,o).fold((()=>Tu(r,o).bind(T(xh,e,r)).map((e=>tE.after(e)))),I.none)},dE=e=>!wh(uE(e)),cE=(e,t,n)=>eE([oE,aE,iE,lE],[e,t,n]).filter(dE),uE=e=>e.fold(R,R,R,R),mE=e=>e.fold(N("before"),N("start"),N("end"),N("after")),fE=e=>e.fold(tE.before,tE.before,tE.after,tE.after),gE=e=>e.fold(tE.start,tE.start,tE.end,tE.end),pE=(e,t,n,o,r,s)=>Mt(xh(t,n,o),xh(t,n,r),((t,o)=>t!==o&&((e,t,n)=>{const o=Xc(t,e),r=Xc(n,e);return C(o)&&o===r})(n,t,o)?tE.after(e?t:o):s)).getOr(s),hE=(e,t)=>e.fold(M,(e=>{return o=t,!(mE(n=e)===mE(o)&&uE(n)===uE(o));var n,o})),bE=(e,t)=>e?t.fold(S(I.some,tE.start),I.none,S(I.some,tE.after),I.none):t.fold(I.none,S(I.some,tE.before),I.none,S(I.some,tE.end)),vE=(e,t,n)=>{const o=e?1:-1;return t.setRng(Vi(n.container(),n.offset()+o).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0};var yE;!function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"}(yE||(yE={}));const CE=(e,t)=>e===cu.Backwards?oe(t):t,wE=(e,t,n)=>e===cu.Forwards?t.next(n):t.prev(n),xE=(e,t,n,o)=>ar(o.getNode(t===cu.Forwards))?yE.Br:!1===Qc(n,o)?yE.Block:yE.Wrap,EE=(e,t,n,o)=>{const r=wu(n);let s=o;const a=[];for(;s;){const n=wE(t,r,s);if(!n)break;if(ar(n.getNode(!1)))return t===cu.Forwards?{positions:CE(t,a).concat([n]),breakType:yE.Br,breakAt:I.some(n)}:{positions:CE(t,a),breakType:yE.Br,breakAt:I.some(n)};if(n.isVisible()){if(e(s,n)){const e=xE(0,t,s,n);return{positions:CE(t,a),breakType:e,breakAt:I.some(n)}}a.push(n),s=n}else s=n}return{positions:CE(t,a),breakType:yE.Eol,breakAt:I.none()}},_E=(e,t,n,o)=>t(n,o).breakAt.map((o=>{const r=t(n,o).positions;return e===cu.Backwards?r.concat(o):[o].concat(r)})).getOr([]),SE=(e,t)=>X(e,((e,n)=>e.fold((()=>I.some(n)),(o=>Mt(le(o.getClientRects()),le(n.getClientRects()),((e,r)=>{const s=Math.abs(t-e.left);return Math.abs(t-r.left)<=s?n:o})).or(e)))),I.none()),kE=(e,t)=>le(t.getClientRects()).bind((t=>SE(e,t.left))),NE=T(EE,Vi.isAbove,-1),RE=T(EE,Vi.isBelow,1),AE=T(_E,-1,NE),TE=T(_E,1,RE),OE=(e,t)=>NE(e,t).breakAt.isNone(),BE=(e,t)=>RE(e,t).breakAt.isNone(),PE=(e,t)=>kE(AE(e,t),t),DE=(e,t)=>kE(TE(e,t),t),LE=dr,ME=(e,t)=>Math.abs(e.left-t),IE=(e,t)=>Math.abs(e.right-t),FE=(e,t)=>Oe(e,((e,n)=>{const o=Math.min(ME(e,t),IE(e,t)),r=Math.min(ME(n,t),IE(n,t));return r===o&&_e(n,"node")&&LE(n.node)||r{const t=t=>q(t,(t=>{const n=vi(t);return n.node=e,n}));if(qo(e))return t(e.getClientRects());if(er(e)){const n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}return[]},zE=e=>te(e,UE);var jE;!function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(jE||(jE={}));const HE=(e,t,n,o,r,s)=>{let a=0;const i=[],l=o=>{let s=zE([o]);-1===e&&(s=s.reverse());for(let e=0;e0&&t(o,Pe(i))&&a++,o.line=a,r(o))return!0;i.push(o)}}return!1},d=Pe(s.getClientRects());if(!d)return i;const c=s.getNode();return c&&(l(c),((e,t,n,o)=>{let r=o;for(;r=Gc(r,e,os,t);)if(n(r))return})(e,o,l,c)),i},$E=T(HE,jE.Up,wi,xi),qE=T(HE,jE.Down,xi,wi),VE=e=>Pe(e.getClientRects()),WE=e=>t=>((e,t)=>t.line>e)(e,t),KE=e=>t=>((e,t)=>t.line===e)(e,t),YE=(e,t)=>{e.selection.setRng(t),sg(e,e.selection.getRng())},GE=(e,t,n)=>I.some(Tx(e,t,n)),XE=(e,t,n,o,r,s)=>{const a=t===cu.Forwards,i=wu(e.getBody()),l=T(lu,a?i.next:i.prev),d=a?o:r;if(!n.collapsed){const o=_i(n);if(s(o))return Rx(t,e,o,t===cu.Backwards,!1);if(Mx(e)){const e=n.cloneRange();return e.collapse(t===cu.Backwards),I.from(e)}}const c=au(t,e.getBody(),n);if(d(c))return Ax(e,c.getNode(!a));let u=l(c);const m=Wr(n);if(!u)return m?I.some(n):I.none();if(u=Eh(a,u),d(u))return Rx(t,e,u.getNode(!a),a,!1);const f=l(u);return f&&d(f)&&du(u,f)?Rx(t,e,f.getNode(!a),a,!1):m?GE(e,u.toRange(),!1):I.none()},QE=(e,t,n,o,r,s)=>{const a=au(t,e.getBody(),n),i=Pe(a.getClientRects()),l=t===jE.Down,d=e.getBody();if(!i)return I.none();if(Mx(e)){const e=l?Vi.fromRangeEnd(n):Vi.fromRangeStart(n);return(l?DE:PE)(d,e).orThunk((()=>I.from(e))).map((e=>e.toRange()))}const c=(l?qE:$E)(d,WE(1),a),u=Y(c,KE(1)),m=i.left,f=FE(u,m);if(f&&s(f.node)){const n=Math.abs(m-f.left),o=Math.abs(m-f.right);return Rx(t,e,f.node,n{const r=wu(t);let s,a,i,l;const d=[];let c=0;1===e?(s=r.next,a=xi,i=wi,l=Vi.after(o)):(s=r.prev,a=wi,i=xi,l=Vi.before(o));const u=VE(l);do{if(!l.isVisible())continue;const e=VE(l);if(i(e,u))continue;d.length>0&&a(e,Pe(d))&&c++;const t=vi(e);if(t.position=l,t.line=c,n(t))return d;d.push(t)}while(l=s(l));return d})(t,d,WE(1),g);let o=FE(Y(n,KE(1)),m);if(o)return GE(e,o.position.toRange(),!1);if(o=Pe(Y(n,KE(0))),o)return GE(e,o.position.toRange(),!1)}return 0===u.length?JE(e,l).filter(l?r:o).map((t=>Tx(e,t.toRange(),!1))):I.none()},JE=(e,t)=>{const n=e.selection.getRng(),o=t?Vi.fromRangeEnd(n):Vi.fromRangeStart(n),r=(s=o.container(),a=e.getBody(),Qn(yn(s),(e=>Ic(e.dom)),(e=>e.dom===a)).map((e=>e.dom)).getOr(a));var s,a;if(t){const e=RE(r,o);return de(e.positions)}{const e=NE(r,o);return le(e.positions)}},ZE=(e,t,n)=>JE(e,t).filter(n).exists((t=>(e.selection.setRng(t.toRange()),!0))),e_=(e,t)=>{const n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},t_=(e,t)=>{e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},n_=(e,t,n)=>Zx(t,n).map((t=>(e_(e,t),n))),o_=(e,t,n)=>{const o=e.getBody(),r=((e,t,n)=>{const o=Vi.fromRangeStart(e);if(e.collapsed)return o;{const r=Vi.fromRangeEnd(e);return n?Tu(t,r).getOr(r):Au(t,o).getOr(o)}})(e.selection.getRng(),o,n);return((e,t,n,o)=>{const r=Eh(e,o),s=cE(t,n,r);return cE(t,n,r).bind(T(bE,e)).orThunk((()=>((e,t,n,o,r)=>{const s=Eh(e,r);return Su(e,n,s).map(T(Eh,e)).fold((()=>o.map(fE)),(r=>cE(t,n,r).map(T(pE,e,t,n,s,r)).filter(T(hE,o)))).filter(dE)})(e,t,n,s,o)))})(n,T(Ch,e),o,r).bind((n=>n_(e,t,n)))},r_=(e,t,n)=>!!yd(e)&&o_(e,t,n).isSome(),s_=(e,t,n)=>!!yd(t)&&((e,t)=>{const n=t.selection.getRng(),o=e?Vi.fromRangeEnd(n):Vi.fromRangeStart(n);return!!(e=>w(e.selection.getSel().modify))(t)&&(e&&jr(o)?vE(!0,t.selection,o):!(e||!Hr(o))&&vE(!1,t.selection,o))})(e,t),a_=e=>{const t=$a(null),n=T(Ch,e);return e.on("NodeChange",(o=>{yd(e)&&(((e,t,n)=>{const o=q(Uo(yn(t.getRoot()),'*[data-mce-selected="inline-boundary"]'),(e=>e.dom)),r=Y(o,e),s=Y(n,e);V(re(r,s),T(t_,!1)),V(re(s,r),T(t_,!0))})(n,e.dom,o.parents),((e,t)=>{const n=t.get();if(e.selection.isCollapsed()&&!e.composing&&n){const o=Vi.fromRangeStart(e.selection.getRng());Vi.isTextPosition(o)&&!(e=>jr(e)||Hr(e))(o)&&(e_(e,Nc(n,o)),t.set(null))}})(e,t),((e,t,n,o)=>{if(t.selection.isCollapsed()){const r=Y(o,e);V(r,(o=>{const r=Vi.fromRangeStart(t.selection.getRng());cE(e,t.getBody(),r).bind((e=>n_(t,n,e)))}))}})(n,e,t,o.parents))})),t},i_=T(s_,!0),l_=T(s_,!1),d_=(e,t,n)=>{if(yd(e)){const o=JE(e,t).getOrThunk((()=>{const n=e.selection.getRng();return t?Vi.fromRangeEnd(n):Vi.fromRangeStart(n)}));return cE(T(Ch,e),e.getBody(),o).exists((t=>{const o=fE(t);return Zx(n,o).exists((t=>(e_(e,t),!0)))}))}return!1},c_=(e,t)=>n=>Zx(t,n).map((t=>()=>e_(e,t))),u_=(e,t,n,o)=>{const r=e.getBody(),s=T(Ch,e);e.undoManager.ignore((()=>{e.selection.setRng(((e,t)=>{const n=document.createRange();return n.setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n})(n,o)),Nh(e),cE(s,r,Vi.fromRangeStart(e.selection.getRng())).map(gE).bind(c_(e,t)).each(D)})),e.nodeChanged()},m_=(e,t,n)=>{if(e.selection.isCollapsed()&&yd(e)){const o=Vi.fromRangeStart(e.selection.getRng());return((e,t,n,o)=>{const r=((e,t)=>Xc(t,e)||e)(e.getBody(),o.container()),s=T(Ch,e),a=cE(s,r,o);return a.bind((e=>n?e.fold(N(I.some(gE(e))),I.none,N(I.some(fE(e))),I.none):e.fold(I.none,N(I.some(fE(e))),I.none,N(I.some(gE(e)))))).map(c_(e,t)).getOrThunk((()=>{const i=ku(n,r,o),l=i.bind((e=>cE(s,r,e)));return Mt(a,l,(()=>xh(s,r,o).bind((t=>(e=>Mt(Ou(e),Bu(e),((t,n)=>{const o=Eh(!0,t),r=Eh(!1,n);return Au(e,o).forall((e=>e.isEqual(r)))})).getOr(!0))(t)?I.some((()=>{vh(e,n,yn(t))})):I.none())))).getOrThunk((()=>l.bind((()=>i.map((r=>()=>{n?u_(e,t,o,r):u_(e,t,r,o)}))))))}))})(e,t,n,o)}return I.none()},f_=(e,t)=>{const n=yn(e.getBody()),o=yn(e.selection.getStart()),r=Bp(o,n);return Z(r,t).fold(N(r),(e=>r.slice(0,e)))},g_=e=>1===zn(e),p_=(e,t)=>{const n=T(Zb,e);return te(t,(e=>n(e)?[e.dom]:[]))},h_=e=>{const t=(e=>f_(e,(t=>e.schema.isBlock(Ht(t)))))(e);return p_(e,t)},b_=(e,t)=>{const n=Y((e=>f_(e,(t=>e.schema.isBlock(Ht(t))||(e=>zn(e)>1)(t))))(e),g_);return de(n).bind((o=>{const r=Vi.fromRangeStart(e.selection.getRng());return Oh(t,r,o.dom)&&!Tm(o)?I.some((()=>((e,t,n,o)=>{const r=p_(t,o);if(0===r.length)vh(t,e,n);else{const e=Jb(n.dom,r);t.selection.setRng(e.toRange())}})(t,e,o,n))):I.none()}))},v_=(e,t)=>{const n=e.selection.getStart(),o=((e,t)=>{const n=t.parentElement;return ar(t)&&!h(n)&&e.dom.isEmpty(n)})(e,n)||Tm(yn(n))?Jb(n,t):((e,t)=>{const{caretContainer:n,caretPosition:o}=Qb(t);return e.insertNode(n.dom),o})(e.selection.getRng(),t);e.selection.setRng(o.toRange())},y_=e=>er(e.startContainer),C_=e=>{const t=e.selection.getRng();return(e=>0===e.startOffset&&y_(e))(t)&&((e,t)=>{const n=t.startContainer.parentElement;return!h(n)&&Zb(e,yn(n))})(e,t)&&(e=>(e=>(e=>{const t=e.startContainer.parentNode,n=e.endContainer.parentNode;return!h(t)&&!h(n)&&t.isEqualNode(n)})(e)&&(e=>{const t=e.endContainer;return e.endOffset===(er(t)?t.length:t.childNodes.length)})(e))(e)||(e=>!e.endContainer.isEqualNode(e.commonAncestorContainer))(e))(t)},w_=(e,t)=>e.selection.isCollapsed()?b_(e,t):(e=>{if(C_(e)){const t=h_(e);return I.some((()=>{Nh(e),((e,t)=>{const n=re(t,h_(e));n.length>0&&v_(e,n)})(e,t)}))}return I.none()})(e),x_=(e,t)=>Qn(e,(e=>Du(e.dom)),(e=>t.isBlock(Ht(e)))).isSome(),E_=e=>((e=>{const t=e.selection.getRng();return t.collapsed&&(y_(t)||e.dom.isEmpty(t.startContainer))&&!(e=>x_(yn(e.selection.getStart()),e.schema))(e)})(e)&&v_(e,[]),!0),__=(e,t,n)=>C(n)?I.some((()=>{e._selectionOverrides.hideFakeCaret(),vh(e,t,yn(n))})):I.none(),S_=(e,t)=>e.selection.isCollapsed()?((e,t)=>{const n=t?Sp:kp,o=t?cu.Forwards:cu.Backwards,r=au(o,e.getBody(),e.selection.getRng());return n(r)?__(e,t,r.getNode(!t)):I.from(Eh(t,r)).filter((e=>n(e)&&du(r,e))).bind((n=>__(e,t,n.getNode(!t))))})(e,t):((e,t)=>{const n=e.selection.getNode();return mr(n)?__(e,t,n):I.none()})(e,t),k_=e=>Xe(null!=e?e:"").getOr(0),N_=(e,t)=>(e||"table"===Ht(t)?"margin":"padding")+("rtl"===co(t,"direction")?"-right":"-left"),R_=e=>{const t=T_(e);return!e.mode.isReadOnly()&&(t.length>1||((e,t)=>ne(t,(t=>{const n=N_(od(e),t),o=mo(t,n).map(k_).getOr(0);return"false"!==e.dom.getContentEditable(t.dom)&&o>0})))(e,t))},A_=e=>Sr(e)||kr(e),T_=e=>Y(_o(e.selection.getSelectedBlocks()),(e=>!A_(e)&&!(e=>An(e).exists(A_))(e)&&Jn(e,(e=>lr(e.dom)||dr(e.dom))).exists((e=>lr(e.dom))))),O_=(e,t)=>{var n,o;const{dom:r}=e,s=rd(e),a=null!==(o=null===(n=/[a-z%]+$/i.exec(s))||void 0===n?void 0:n[0])&&void 0!==o?o:"px",i=k_(s),l=od(e);V(T_(e),(e=>{((e,t,n,o,r,s)=>{const a=N_(n,yn(s)),i=k_(e.getStyle(s,a));if("outdent"===t){const t=Math.max(0,i-o);e.setStyle(s,a,t?t+r:"")}else{const t=i+o+r;e.setStyle(s,a,t)}})(r,t,l,i,a,e.dom)}))},B_=e=>O_(e,"outdent"),P_=e=>{if(e.selection.isCollapsed()&&R_(e)){const t=e.dom,n=e.selection.getRng(),o=Vi.fromRangeStart(n),r=t.getParent(n.startContainer,t.isBlock);if(null!==r&&Ip(yn(r),o,e.schema))return I.some((()=>B_(e)))}return I.none()},D_=(e,t,n)=>ue([P_,Hx,Dx,(e,n)=>m_(e,t,n),_x,ib,$x,S_,Nx,w_],(t=>t(e,n))).filter((t=>e.selection.isEditable())),L_=(e,t)=>{e.addCommand("delete",(()=>{((e,t)=>{D_(e,t,!1).fold((()=>{e.selection.isEditable()&&(Nh(e),Th(e))}),D)})(e,t)})),e.addCommand("forwardDelete",(()=>{((e,t)=>{D_(e,t,!0).fold((()=>{e.selection.isEditable()&&(e=>{kh(e,"ForwardDelete")})(e)}),D)})(e,t)}))},M_=e=>void 0===e.touches||1!==e.touches.length?I.none():I.some(e.touches[0]),I_=(e,t)=>Ee(e,t.nodeName),F_=(e,t)=>!!er(t)||!!qo(t)&&!(I_(e.getBlockElements(),t)||Ku(t)||Ts(e,t)||hs(t)),U_=(e,t)=>{if(er(t)){if(0===t.data.length)return!0;if(/^\s+$/.test(t.data))return!t.nextSibling||I_(e,t.nextSibling)||hs(t.nextSibling)}return!1},z_=e=>e.dom.create(Il(e),Fl(e)),j_=e=>{const t=e.dom,n=e.selection,o=e.schema,r=o.getBlockElements(),s=n.getStart(),a=e.getBody();let i,l,d=!1;const c=Il(e);if(!s||!qo(s))return;const u=a.nodeName.toLowerCase();if(!o.isValidChild(u,c.toLowerCase())||((e,t,n)=>$(Op(yn(n),yn(t)),(t=>I_(e,t.dom))))(r,a,s))return;const m=n.getRng(),{startContainer:f,startOffset:g,endContainer:p,endOffset:h}=m,b=Rg(e);let v=a.firstChild;for(;v;)if(qo(v)&&ks(o,v),F_(o,v)){if(U_(r,v)){l=v,v=v.nextSibling,t.remove(l);continue}i||(i=z_(e),a.insertBefore(i,v),d=!0),l=v,v=v.nextSibling,i.appendChild(l)}else i=null,v=v.nextSibling;d&&b&&(m.setStart(f,g),m.setEnd(p,h),n.setRng(m),e.nodeChanged())},H_=(e,t,n)=>{const o=yn(z_(e)),r=Tr();vo(o,r),n(t,o);const s=document.createRange();return s.setStartBefore(r.dom),s.setEndBefore(r.dom),s},$_=e=>t=>-1!==(" "+t.attr("class")+" ").indexOf(e),q_=(e,t,n)=>function(o){const r=arguments,s=r[r.length-2],a=s>0?t.charAt(s-1):"";if('"'===a)return o;if(">"===a){const e=t.lastIndexOf("<",s);if(-1!==e&&-1!==t.substring(e,s).indexOf('contenteditable="false"'))return o}return''+e.dom.encode("string"==typeof r[1]?r[1]:r[0])+""},V_=(e,t)=>ne(e,(e=>{const n=t.match(e);return null!==n&&n[0].length===t.length})),W_=(e,t)=>{t.hasAttribute("data-mce-caret")&&(Vr(t),e.selection.setRng(e.selection.getRng()),e.selection.scrollIntoView(t))},K_=(e,t)=>{const n=(e=>to(yn(e.getBody()),"*[data-mce-caret]").map((e=>e.dom)).getOrNull())(e);if(n)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void W_(e,n)):void(zr(n)&&(W_(e,n),e.undoManager.add()))},Y_=dr,G_=(e,t,n)=>{const o=wu(e.getBody()),r=T(lu,1===t?o.next:o.prev);if(n.collapsed){const o=e.dom.getParent(n.startContainer,"PRE");if(!o)return;if(!r(Vi.fromRangeStart(n))){const n=yn((e=>{const t=e.dom.create(Il(e));return t.innerHTML='
    ',t})(e));1===t?ho(yn(o),n):po(yn(o),n),e.selection.select(n.dom,!0),e.selection.collapse()}}},X_=(e,t)=>((e,t)=>{const n=t?cu.Forwards:cu.Backwards,o=e.selection.getRng();return((e,t,n)=>XE(t,e,n,Ap,Tp,Y_))(n,e,o).orThunk((()=>(G_(e,n,o),I.none())))})(e,((e,t)=>{const n=t?e.getEnd(!0):e.getStart(!0);return wh(n)?!t:t})(e.selection,t)).exists((t=>(YE(e,t),!0))),Q_=(e,t)=>((e,t)=>{const n=t?1:-1,o=e.selection.getRng();return((e,t,n)=>QE(t,e,n,(e=>Ap(e)||Np(e)),(e=>Tp(e)||Rp(e)),Y_))(n,e,o).orThunk((()=>(G_(e,n,o),I.none())))})(e,t).exists((t=>(YE(e,t),!0))),J_=(e,t)=>ZE(e,t,t?Tp:Ap),Z_=(e,t)=>Lx(e,!t).map((n=>{const o=n.toRange(),r=e.selection.getRng();return t?o.setStart(r.startContainer,r.startOffset):o.setEnd(r.endContainer,r.endOffset),o})).exists((t=>(YE(e,t),!0))),eS=e=>H(["figcaption"],Ht(e)),tS=(e,t)=>!!e.selection.isCollapsed()&&((e,t)=>{const n=yn(e.getBody()),o=Vi.fromRangeStart(e.selection.getRng());return((e,t,n)=>{const o=T(_n,t);return Jn(yn(e.container()),(e=>n.isBlock(Ht(e))),o).filter(eS)})(o,n,e.schema).exists((()=>{if(((e,t,n)=>t?BE(e.dom,n):OE(e.dom,n))(n,t,o)){const o=H_(e,n,t?vo:bo);return e.selection.setRng(o),!0}return!1}))})(e,t),nS=(e,t)=>((e,t)=>t?I.from(e.dom.getParent(e.selection.getNode(),"details")).map((t=>((e,t)=>{const n=e.selection.getRng(),o=Vi.fromRangeStart(n);return!(e.getBody().lastChild!==t||!BE(t,o)||(e.execCommand("InsertNewBlockAfter"),0))})(e,t))).getOr(!1):I.from(e.dom.getParent(e.selection.getNode(),"summary")).bind((t=>I.from(e.dom.getParent(t,"details")).map((n=>((e,t,n)=>{const o=e.selection.getRng(),r=Vi.fromRangeStart(o);return!(e.getBody().firstChild!==t||!OE(n,r)||(e.execCommand("InsertNewBlockBefore"),0))})(e,n,t))))).getOr(!1))(e,t),oS={shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0},rS=(e,t)=>t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey,sS=(e,...t)=>()=>e.apply(null,t),aS=(e,t)=>J(((e,t)=>te((e=>q(e,(e=>({...oS,...e}))))(e),(e=>rS(e,t)?[e]:[])))(e,t),(e=>e.action())),iS=(e,t)=>ue(((e,t)=>te((e=>q(e,(e=>({...oS,...e}))))(e),(e=>rS(e,t)?[e]:[])))(e,t),(e=>e.action())),lS=(e,t)=>{const n=t?cu.Forwards:cu.Backwards,o=e.selection.getRng();return XE(e,n,o,Sp,kp,mr).exists((t=>(YE(e,t),!0)))},dS=(e,t)=>{const n=t?1:-1,o=e.selection.getRng();return QE(e,n,o,Sp,kp,mr).exists((t=>(YE(e,t),!0)))},cS=(e,t)=>ZE(e,t,t?kp:Sp),uS=hl([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),mS={...uS,none:e=>uS.none(e)},fS=(e,t,n)=>te(Mn(e),(e=>xn(e,t)?n(e)?[e]:[]:fS(e,t,n))),gS=(e,t)=>no(e,"table",t),pS=(e,t,n,o,r=M)=>{const s=1===o;if(!s&&n<=0)return mS.first(e[0]);if(s&&n>=e.length-1)return mS.last(e[e.length-1]);{const s=n+o,a=e[s];return r(a)?mS.middle(t,a):pS(e,t,s,o,r)}},hS=(e,t)=>gS(e,t).bind((t=>{const n=fS(t,"th,td",M);return Z(n,(t=>_n(e,t))).map((e=>({index:e,all:n})))})),bS=(e,t,n,o,r)=>{const s=Uo(yn(n),"td,th,caption").map((e=>e.dom)),a=Y(((e,t)=>te(t,(t=>{const n=((e,t)=>({left:e.left-t,top:e.top-t,right:e.right+-2,bottom:e.bottom+-2,width:e.width+t,height:e.height+t}))(vi(t.getBoundingClientRect()),-1);return[{x:n.left,y:e(n),cell:t},{x:n.right,y:e(n),cell:t}]})))(e,s),(e=>t(e,r)));return((e,t,n)=>X(e,((e,o)=>e.fold((()=>I.some(o)),(e=>{const r=Math.sqrt(Math.abs(e.x-t)+Math.abs(e.y-n)),s=Math.sqrt(Math.abs(o.x-t)+Math.abs(o.y-n));return I.some(se.cell))},vS=T(bS,(e=>e.bottom),((e,t)=>e.ye.top),((e,t)=>e.y>t)),CS=(e,t,n)=>{const o=e(t,n);return(e=>e.breakType===yE.Wrap&&0===e.positions.length)(o)||!ar(n.getNode())&&(e=>e.breakType===yE.Br&&1===e.positions.length)(o)?!((e,t,n)=>n.breakAt.exists((n=>e(t,n).breakAt.isSome())))(e,t,o):o.breakAt.isNone()},wS=T(CS,NE),xS=T(CS,RE),ES=(e,t,n,o)=>{const r=e.selection.getRng(),s=t?1:-1;return!(!Dc()||!((e,t,n)=>{const o=Vi.fromRangeStart(t);return Ru(!e,n).exists((e=>e.isEqual(o)))})(t,r,n)||(Rx(s,e,n,!t,!1).each((t=>{YE(e,t)})),0))},_S=(e,t,n)=>{const o=((e,t)=>{const n=t.getNode(e);return Qo(n)?I.some(n):I.none()})(!!t,n),r=!1===t;o.fold((()=>YE(e,n.toRange())),(o=>Ru(r,e.getBody()).filter((e=>e.isEqual(n))).fold((()=>YE(e,n.toRange())),(n=>((e,t,n)=>{t.undoManager.transact((()=>{const o=e?ho:po,r=H_(t,yn(n),o);YE(t,r)}))})(t,e,o)))))},SS=(e,t,n,o)=>{const r=e.selection.getRng(),s=Vi.fromRangeStart(r),a=e.getBody();if(!t&&wS(o,s)){const o=((e,t,n)=>((e,t)=>le(t.getClientRects()).bind((t=>vS(e,t.left,t.top))).bind((e=>{return kE(Bu(n=e).map((e=>NE(n,e).positions.concat(e))).getOr([]),t);var n})))(t,n).orThunk((()=>le(n.getClientRects()).bind((n=>SE(AE(e,Vi.before(t)),n.left))))).getOr(Vi.before(t)))(a,n,s);return _S(e,t,o),!0}if(t&&xS(o,s)){const o=((e,t,n)=>((e,t)=>de(t.getClientRects()).bind((t=>yS(e,t.left,t.top))).bind((e=>{return kE(Ou(n=e).map((e=>[e].concat(RE(n,e).positions))).getOr([]),t);var n})))(t,n).orThunk((()=>le(n.getClientRects()).bind((n=>SE(TE(e,Vi.after(t)),n.left))))).getOr(Vi.after(t)))(a,n,s);return _S(e,t,o),!0}return!1},kS=(e,t,n)=>I.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind((o=>I.from(e.dom.getParent(o,"table")).map((r=>n(e,t,r,o))))).getOr(!1),NS=(e,t)=>kS(e,t,ES),RS=(e,t)=>kS(e,t,SS),AS=(e,t,n)=>n.fold(I.none,I.none,((e,t)=>{return(n=t,Zn(n,Fg)).map((e=>(e=>{const t=xf.exact(e,0,e,0);return Nf(t)})(e)));var n}),(n=>(e.execCommand("mceTableInsertRowAfter"),TS(e,t,n)))),TS=(e,t,n)=>{return AS(e,t,(r=oo,hS(o=n,void 0).fold((()=>mS.none(o)),(e=>pS(e.all,o,e.index,1,r)))));var o,r},OS=(e,t,n)=>{return AS(e,t,(r=oo,hS(o=n,void 0).fold((()=>mS.none()),(e=>pS(e.all,o,e.index,-1,r)))));var o,r},BS=(e,t)=>{const n=["table","li","dl"],o=yn(e.getBody()),r=e=>{const t=Ht(e);return _n(e,o)||H(n,t)},s=e.selection.getRng();return((e,t)=>((e,t,n=L)=>n(t)?I.none():H(e,Ht(t))?I.some(t):eo(t,e.join(","),(e=>xn(e,"table")||n(e))))(["td","th"],e,t))(yn(t?s.endContainer:s.startContainer),r).map((n=>(gS(n,r).each((t=>{e.model.table.clearSelectedCells(t.dom)})),e.selection.collapse(!t),(t?TS:OS)(e,r,n).each((t=>{e.selection.setRng(t)})),!0))).getOr(!1)},PS=(e,t)=>({container:e,offset:t}),DS=za.DOM,LS=e=>t=>e===t?-1:0,MS=(e,t,n)=>{if(er(e)&&t>=0)return I.some(PS(e,t));{const o=hi(DS);return I.from(o.backwards(e,t,LS(e),n)).map((e=>PS(e.container,e.container.data.length)))}},IS=(e,t,n)=>{if(!er(e))return I.none();const o=e.data;if(t>=0&&t<=o.length)return I.some(PS(e,t));{const o=hi(DS);return I.from(o.backwards(e,t,LS(e),n)).bind((e=>{const o=e.container.data;return IS(e.container,t+o.length,n)}))}},FS=(e,t,n)=>{if(!er(e))return I.none();const o=e.data;if(t<=o.length)return I.some(PS(e,t));{const r=hi(DS);return I.from(r.forwards(e,t,LS(e),n)).bind((e=>FS(e.container,t-o.length,n)))}},US=(e,t,n,o,r)=>{const s=hi(e,(e=>t=>e.isBlock(t)||H(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===e.getContentEditable(t))(e));return I.from(s.backwards(t,n,o,r))},zS=e=>Dr(e.toString().replace(/\u00A0/g," ")),jS=e=>""!==e&&-1!==" \xa0\f\n\r\t\v".indexOf(e),HS=(e,t)=>e.substring(t.length),$S=(e,t,n,o=0)=>{return(r=yn(t.startContainer),no(r,Ug)).fold((()=>((e,t,n,o=0)=>{if(!(r=t).collapsed||!er(r.startContainer))return I.none();var r;const s={text:"",offset:0},a=e.getParent(t.startContainer,e.isBlock)||e.getRoot();return US(e,t.startContainer,t.startOffset,((e,t,o)=>(s.text=o+s.text,s.offset+=t,((e,t,n)=>{let o;const r=n.charAt(0);for(o=t-1;o>=0;o--){const s=e.charAt(o);if(jS(s))return I.none();if(r===s&&je(e,n,o,t))break}return I.some(o)})(s.text,s.offset,n).getOr(t))),a).bind((e=>{const r=t.cloneRange();if(r.setStart(e.container,e.offset),r.setEnd(t.endContainer,t.endOffset),r.collapsed)return I.none();const s=zS(r);return 0!==s.lastIndexOf(n)||HS(s,n).length{const o=e.createRng();o.selectNode(t.dom);const r=zS(o);return I.some({range:o,text:HS(r,n),trigger:n})}));var r},qS=e=>{if((e=>3===e.nodeType)(e))return PS(e,e.data.length);{const t=e.childNodes;return t.length>0?qS(t[t.length-1]):PS(e,t.length)}},VS=(e,t)=>{const n=e.childNodes;return n.length>0&&t0&&(e=>1===e.nodeType)(e)&&n.length===t?qS(n[n.length-1]):PS(e,t)},WS=(e,t,n,o={})=>{var r;const s=t(),a=null!==(r=e.selection.getRng().startContainer.nodeValue)&&void 0!==r?r:"",i=Y(s.lookupByTrigger(n.trigger),(t=>n.text.length>=t.minChars&&t.matches.getOrThunk((()=>(e=>t=>{const n=VS(t.startContainer,t.startOffset);return!((e,t)=>{var n;const o=null!==(n=e.getParent(t.container,e.isBlock))&&void 0!==n?n:e.getRoot();return US(e,t.container,t.offset,((e,t)=>0===t?-1:t),o).filter((e=>{const t=e.container.data.charAt(e.offset-1);return!jS(t)})).isSome()})(e,n)})(e.dom)))(n.range,a,n.text)));if(0===i.length)return I.none();const l=Promise.all(q(i,(e=>e.fetch(n.text,e.maxResults,o).then((t=>({matchText:n.text,items:t,columns:e.columns,onAction:e.onAction,highlightOn:e.highlightOn}))))));return I.some({lookupData:l,context:n})};var KS;!function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"}(KS||(KS={}));const YS=(e,t,n)=>e.stype===KS.Error?t(e.serror):n(e.svalue),GS=e=>({stype:KS.Value,svalue:e}),XS=e=>({stype:KS.Error,serror:e}),QS=YS,JS=e=>f(e)&&me(e).length>100?" removed due to size":JSON.stringify(e,null,2),ZS=(e,t)=>XS([{path:e,getErrorInfo:t}]),ek=(e,t)=>({extract:(n,o)=>xe(o,e).fold((()=>((e,t)=>ZS(e,(()=>'Choice schema did not contain choice key: "'+t+'"')))(n,e)),(e=>((e,t,n,o)=>xe(n,o).fold((()=>((e,t,n)=>ZS(e,(()=>'The chosen schema: "'+n+'" did not exist in branches: '+JS(t))))(e,n,o)),(n=>n.extract(e.concat(["branch: "+o]),t))))(n,o,t,e))),toString:()=>"chooseOn("+e+"). Possible values: "+me(t)}),tk=e=>(...t)=>{if(0===t.length)throw new Error("Can't merge zero objects");const n={};for(let o=0;og(e)&&g(t)?nk(e,t):t)),ok=(tk(((e,t)=>t)),e=>({tag:"defaultedThunk",process:N(e)})),rk=e=>{const t=(e=>{const t=[],n=[];return V(e,(e=>{YS(e,(e=>n.push(e)),(e=>t.push(e)))})),{values:t,errors:n}})(e);return t.errors.length>0?(n=t.errors,S(XS,ee)(n)):GS(t.values);var n},sk=(e,t,n)=>{switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return n(e.newKey,e.instantiator)}},ak=e=>({extract:(t,n)=>{return o=e(n),r=e=>((e,t)=>ZS(e,N(t)))(t,e),o.stype===KS.Error?r(o.serror):o;var o,r},toString:N("val")}),ik=ak(GS),lk=(e,t,n,o)=>o(xe(e,t).getOrThunk((()=>n(e)))),dk=(e,t,n,o,r)=>{const s=e=>r.extract(t.concat([o]),e),a=e=>e.fold((()=>GS(I.none())),(e=>{const n=r.extract(t.concat([o]),e);return s=n,a=I.some,s.stype===KS.Value?{stype:KS.Value,svalue:a(s.svalue)}:s;var s,a}));switch(e.tag){case"required":return((e,t,n,o)=>xe(t,n).fold((()=>((e,t,n)=>ZS(e,(()=>'Could not find valid *required* value for "'+t+'" in '+JS(n))))(e,n,t)),o))(t,n,o,s);case"defaultedThunk":return lk(n,o,e.process,s);case"option":return((e,t,n)=>n(xe(e,t)))(n,o,a);case"defaultedOptionThunk":return((e,t,n,o)=>o(xe(e,t).map((t=>!0===t?n(e):t))))(n,o,e.process,a);case"mergeWithThunk":return lk(n,o,N({}),(t=>{const o=nk(e.process(n),t);return s(o)}))}},ck=e=>({extract:(t,n)=>((e,t,n)=>{const o={},r=[];for(const s of n)sk(s,((n,s,a,i)=>{const l=dk(a,e,t,n,i);QS(l,(e=>{r.push(...e)}),(e=>{o[s]=e}))}),((e,n)=>{o[e]=n(t)}));return r.length>0?XS(r):GS(o)})(t,n,e),toString:()=>{const t=q(e,(e=>sk(e,((e,t,n,o)=>e+" -> "+o.toString()),((e,t)=>"state("+e+")"))));return"obj{\n"+t.join("\n")+"}"}}),uk=e=>({extract:(t,n)=>{const o=q(n,((n,o)=>e.extract(t.concat(["["+o+"]"]),n)));return rk(o)},toString:()=>"array("+e.toString()+")"}),mk=(e,t,n)=>{return o=((e,t,n)=>((e,t)=>e.stype===KS.Error?{stype:KS.Error,serror:t(e.serror)}:e)(t.extract([e],n),(e=>({input:n,errors:e}))))(e,t,n),YS(o,pl.error,pl.value);var o},fk=(e,t)=>ek(e,pe(t,ck)),gk=N(ik),pk=(e,t)=>ak((n=>{const o=typeof n;return e(n)?GS(n):XS(`Expected type: ${t} but got: ${o}`)})),hk=pk(x,"number"),bk=pk(m,"string"),vk=pk(b,"boolean"),yk=pk(w,"function"),Ck=(e,t,n,o)=>({tag:"field",key:e,newKey:t,presence:n,prop:o}),wk=(e,t)=>({tag:"custom",newKey:e,instantiator:t}),xk=(e,t)=>Ck(e,e,{tag:"required",process:{}},t),Ek=e=>xk(e,bk),_k=e=>xk(e,yk),Sk=(e,t)=>Ck(e,e,{tag:"option",process:{}},t),kk=e=>Sk(e,bk),Nk=(e,t,n)=>Ck(e,e,ok(t),n),Rk=(e,t)=>Nk(e,t,hk),Ak=(e,t,n)=>Nk(e,t,(e=>{return t=t=>H(e,t)?pl.value(t):pl.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`),ak((e=>t(e).fold(XS,GS)));var t})(n)),Tk=(e,t)=>Nk(e,t,vk),Ok=(e,t)=>Nk(e,t,yk),Bk=Ek("type"),Pk=_k("fetch"),Dk=_k("onAction"),Lk=Ok("onSetup",(()=>_)),Mk=kk("text"),Ik=kk("icon"),Fk=kk("tooltip"),Uk=kk("label"),zk=Tk("active",!1),jk=Tk("enabled",!0),Hk=Tk("primary",!1),$k=e=>((e,t)=>Nk("type",t,bk))(0,e),qk=ck([Bk,Ek("trigger"),Rk("minChars",1),(1,((e,t)=>Ck(e,e,ok(1),gk()))("columns")),Rk("maxResults",10),("matches",Sk("matches",yk)),Pk,Dk,(Vk=bk,Nk("highlightOn",[],uk(Vk)))]);var Vk;const Wk=[jk,Fk,Ik,Mk,Lk],Kk=[zk].concat(Wk),Yk=[Ok("predicate",L),Ak("scope","node",["node","editor"]),Ak("position","selection",["node","selection","line"])],Gk=Wk.concat([$k("contextformbutton"),Hk,Dk,wk("original",R)]),Xk=Kk.concat([$k("contextformbutton"),Hk,Dk,wk("original",R)]),Qk=Wk.concat([$k("contextformbutton")]),Jk=Kk.concat([$k("contextformtogglebutton")]),Zk=fk("type",{contextformbutton:Gk,contextformtogglebutton:Xk});ck([$k("contextform"),Ok("initValue",N("")),Uk,((e,t)=>Ck(e,e,{tag:"required",process:{}},uk(t)))("commands",Zk),Sk("launch",fk("type",{contextformbutton:Qk,contextformtogglebutton:Jk}))].concat(Yk));const eN=e=>{const t=e.ui.registry.getAll().popups,n=pe(t,(e=>{return(t=e,mk("Autocompleter",qk,{trigger:t.ch,...t})).fold((e=>{throw new Error("Errors: \n"+(e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:N("... (only showing first ten failures)")}]):e;return q(t,(e=>"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()))})((t=e).errors).join("\n")+"\n\nInput object: "+JS(t.input));var t}),R);var t})),o=Se(Ce(n,(e=>e.trigger))),r=we(n);return{dataset:n,triggers:o,lookupByTrigger:e=>Y(r,(t=>t.trigger===e))}},tN=e=>{const t=Xa(),n=$a(!1),o=t.isSet,r=()=>{o()&&((e=>{tw(e).autocompleter.removeDecoration()})(e),(e=>{e.dispatch("AutocompleterEnd")})(e),n.set(!1),t.clear())},s=De((()=>eN(e))),a=a=>{(n=>t.get().map((t=>$S(e.dom,e.selection.getRng(),t.trigger).bind((t=>WS(e,s,t,n))))).getOrThunk((()=>((e,t)=>{const n=t(),o=e.selection.getRng();return((e,t,n)=>ue(n.triggers,(n=>$S(e,t,n))))(e.dom,o,n).bind((n=>WS(e,t,n)))})(e,s))))(a).fold(r,(s=>{(n=>{o()||(((e,t)=>{tw(e).autocompleter.addDecoration(t)})(e,n.range),t.set({trigger:n.trigger,matchLength:n.text.length}))})(s.context),s.lookupData.then((o=>{t.get().map((a=>{const i=s.context;a.trigger===i.trigger&&(i.text.length-a.matchLength>=10?r():(t.set({...a,matchLength:i.text.length}),n.get()?((e,t)=>{e.dispatch("AutocompleterUpdate",t)})(e,{lookupData:o}):(n.set(!0),((e,t)=>{e.dispatch("AutocompleterStart",t)})(e,{lookupData:o}))))}))}))}))};e.addCommand("mceAutocompleterReload",((e,t)=>{const n=f(t)?t.fetchOptions:{};a(n)})),e.addCommand("mceAutocompleterClose",r),((e,t)=>{const n=Ja(t.load,50);e.on("keypress compositionend",(e=>{27!==e.which&&n.throttle()})),e.on("keydown",(e=>{const o=e.which;8===o?n.throttle():27===o&&t.cancelIfNecessary()})),e.on("remove",n.cancel)})(e,{cancelIfNecessary:r,load:a})},nN=xt().browser.isSafari(),oN=e=>Or(yn(e)),rN=(e,t)=>{var n;return 0===e.startOffset&&e.endOffset===(null===(n=t.textContent)||void 0===n?void 0:n.length)},sN=(e,t)=>I.from(e.getParent(t.container(),"details")),aN=(e,t)=>sN(e,t).isSome(),iN=(e,t)=>{const n=t.getNode();v(n)||e.selection.setCursorLocation(n,t.offset())},lN=(e,t,n)=>{const o=e.dom.getParent(t.container(),"details");if(o&&!o.open){const t=e.dom.select("summary",o)[0];t&&(n?Ou(t):Bu(t)).each((t=>iN(e,t)))}else iN(e,t)},dN=(e,t,n)=>{const{dom:o,selection:r}=e,s=e.getBody();if("character"===n){const n=Vi.fromRangeStart(r.getRng()),a=o.getParent(n.container(),o.isBlock),i=sN(o,n),l=a&&o.isEmpty(a),d=h(null==a?void 0:a.previousSibling),c=h(null==a?void 0:a.nextSibling);return!!(l&&(t?c:d)&&ku(!t,s,n).exists((e=>aN(o,e)&&!Lt(i,sN(o,e)))))||ku(t,s,n).fold(L,(n=>{const r=sN(o,n);if(aN(o,n)&&!Lt(i,r)){if(t||lN(e,n,!1),a&&l){if(t&&d)return!0;if(!t&&c)return!0;lN(e,n,t),e.dom.remove(a)}return!0}return!1}))}return!1},cN=(e,t,n,o)=>{const r=e.selection.getRng(),s=Vi.fromRangeStart(r),a=e.getBody();return"selection"===o?((e,t)=>{const n=t.startSummary.exists((t=>t.contains(e.startContainer))),o=t.startSummary.exists((t=>t.contains(e.endContainer))),r=t.startDetails.forall((e=>t.endDetails.forall((t=>e!==t))));return(n||o)&&!(n&&o)||r})(r,t):n?((e,t)=>t.startSummary.exists((t=>((e,t)=>Bu(t).exists((n=>ar(n.getNode())&&Tu(t,n).exists((t=>t.isEqual(e)))||n.isEqual(e))))(e,t))))(s,t)||((e,t,n)=>n.startDetails.exists((n=>Au(e,t).forall((e=>!n.contains(e.container()))))))(a,s,t):((e,t)=>t.startSummary.exists((t=>((e,t)=>Ou(t).exists((t=>t.isEqual(e))))(e,t))))(s,t)||((e,t)=>t.startDetails.exists((n=>Tu(n,e).forall((n=>t.startSummary.exists((t=>!t.contains(e.container())&&t.contains(n.container()))))))))(s,t)},uN=(e,t,n)=>((e,t,n)=>((e,t)=>{const n=I.from(e.getParent(t.startContainer,"details")),o=I.from(e.getParent(t.endContainer,"details"));if(n.isSome()||o.isSome()){const t=n.bind((t=>I.from(e.select("summary",t)[0])));return I.some({startSummary:t,startDetails:n,endDetails:o})}return I.none()})(e.dom,e.selection.getRng()).fold((()=>dN(e,t,n)),(o=>cN(e,o,t,n)||dN(e,t,n))))(e,t,n)||nN&&((e,t,n)=>{const o=e.selection,r=o.getNode(),s=o.getRng(),a=Vi.fromRangeStart(s);return!!pr(r)&&("selection"===n&&rN(s,r)||Oh(t,a,r)?oN(r):e.undoManager.transact((()=>{const s=o.getSel();let{anchorNode:a,anchorOffset:i,focusNode:l,focusOffset:d}=null!=s?s:{};const c=()=>{C(a)&&C(i)&&C(l)&&C(d)&&(null==s||s.setBaseAndExtent(a,i,l,d))},u=(e,t)=>{V(e.childNodes,(e=>{dm(e)&&t.appendChild(e)}))},m=e.dom.create("span",{"data-mce-bogus":"1"});u(r,m),r.appendChild(m),c(),"word"!==n&&"line"!==n||null==s||s.modify("extend",t?"right":"left",n),!o.isCollapsed()&&rN(o.getRng(),m)?oN(r):(e.execCommand(t?"ForwardDelete":"Delete"),a=null==s?void 0:s.anchorNode,i=null==s?void 0:s.anchorOffset,l=null==s?void 0:s.focusNode,d=null==s?void 0:s.focusOffset,u(m,r),c()),e.dom.remove(m)})),!0)})(e,t,n)?I.some(_):I.none(),mN=e=>(t,n,o={})=>{const r=t.getBody(),s={bubbles:!0,composed:!0,data:null,isComposing:!1,detail:0,view:null,target:r,currentTarget:r,eventPhase:Event.AT_TARGET,originalTarget:r,explicitOriginalTarget:r,isTrusted:!1,srcElement:r,cancelable:!1,preventDefault:_,inputType:n},a=Ea(new InputEvent(e));return t.dispatch(e,{...a,...s,...o})},fN=mN("input"),gN=mN("beforeinput"),pN=xt(),hN=pN.os,bN=hN.isMacOS()||hN.isiOS(),vN=pN.browser.isFirefox(),yN=(e,t)=>{const n=e.dom,o=e.schema.getMoveCaretBeforeOnEnterElements();if(!t)return;if(/^(LI|DT|DD)$/.test(t.nodeName)){const e=(e=>{for(;e;){if(qo(e)||er(e)&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}return null})(t.firstChild);e&&/^(UL|OL|DL)$/.test(e.nodeName)&&t.insertBefore(n.doc.createTextNode(br),t.firstChild)}const r=n.createRng();if(t.normalize(),t.hasChildNodes()){const e=new jo(t,t);let n,s=t;for(;n=e.current();){if(er(n)){r.setStart(n,0),r.setEnd(n,0);break}if(o[n.nodeName.toLowerCase()]){r.setStartBefore(n),r.setEndBefore(n);break}s=n,n=e.next()}n||(r.setStart(s,0),r.setEnd(s,0))}else ar(t)?t.nextSibling&&n.isBlock(t.nextSibling)?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)):(r.setStart(t,0),r.setEnd(t,0));e.selection.setRng(r),sg(e,r)},CN=(e,t)=>{const n=e.getRoot();let o,r=t;for(;r!==n&&r&&"false"!==e.getContentEditable(r);){if("true"===e.getContentEditable(r)){o=r;break}r=r.parentNode}return r!==n?o:n},wN=e=>I.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock)),xN=e=>{e.innerHTML='
    '},EN=(e,t)=>{Il(e).toLowerCase()===t.tagName.toLowerCase()&&((e,t,n)=>{const o=e.dom;I.from(n.style).map(o.parseStyle).each((e=>{const n={...fo(yn(t)),...e};o.setStyles(t,n)}));const r=I.from(n.class).map((e=>e.split(/\s+/))),s=I.from(t.className).map((e=>Y(e.split(/\s+/),(e=>""!==e))));Mt(r,s,((e,n)=>{const r=Y(n,(t=>!H(e,t))),s=[...e,...r];o.setAttrib(t,"class",s.join(" "))}));const a=["style","class"],i=ye(n,((e,t)=>!H(a,t)));o.setAttribs(t,i)})(e,t,Fl(e))},_N=(e,t,n,o,r=!0,s,a)=>{const i=e.dom,l=e.schema,d=Il(e),c=n?n.nodeName.toUpperCase():"";let u=t;const m=l.getTextInlineElements();let f;f=s||"TABLE"===c||"HR"===c?i.create(s||d,a||{}):n.cloneNode(!1);let g=f;if(r){do{if(m[u.nodeName]){if(Du(u)||Ku(u))continue;const e=u.cloneNode(!1);i.setAttrib(e,"id",""),f.hasChildNodes()?(e.appendChild(f.firstChild),f.appendChild(e)):(g=e,f.appendChild(e))}}while((u=u.parentNode)&&u!==o)}else i.setAttrib(f,"style",null),i.setAttrib(f,"class",null);return EN(e,f),xN(g),f},SN=(e,t)=>{const n=null==e?void 0:e.parentNode;return C(n)&&n.nodeName===t},kN=e=>C(e)&&/^(OL|UL|LI)$/.test(e.nodeName),NN=e=>C(e)&&/^(LI|DT|DD)$/.test(e.nodeName),RN=e=>{const t=e.parentNode;return NN(t)?t:e},AN=(e,t,n)=>{let o=e[n?"firstChild":"lastChild"];for(;o&&!qo(o);)o=o[n?"nextSibling":"previousSibling"];return o===t},TN=e=>X(Ce(fo(yn(e)),((e,t)=>`${t}: ${e};`)),((e,t)=>e+t),""),ON=(e,t)=>t&&"A"===t.nodeName&&e.isEmpty(t),BN=(e,t)=>e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t,PN=(e,t)=>C(t)&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&e.isEditable(t.parentNode)&&"false"!==e.getContentEditable(t),DN=(e,t,n)=>er(t)?e?1===n&&t.data.charAt(n-1)===Br?0:n:n===t.data.length-1&&t.data.charAt(n)===Br?t.data.length:n:n,LN={insert:(e,t)=>{let n,o,r,s,a=!1;const i=e.dom,l=e.schema.getNonEmptyElements(),d=e.selection.getRng(),c=Il(e),u=yn(d.startContainer),f=In(u,d.startOffset),g=f.exists((e=>Vt(e)&&!oo(e))),p=d.collapsed&&g,b=(t,o)=>_N(e,n,S,_,Hl(e),t,o),v=e=>{const t=DN(e,n,o);if(er(n)&&(e?t>0:t{let t;return t=/^(H[1-6]|PRE|FIGURE)$/.test(r)&&"HGROUP"!==k?b(c):b(),((e,t)=>{const n=$l(e);return!y(t)&&(m(n)?H(Pt.explode(n),t.nodeName.toLowerCase()):n)})(e,s)&&PN(i,s)&&i.isEmpty(S,void 0,{includeZwsp:!0})?t=i.split(s,S):i.insertAfter(t,S),yN(e,t),t};Mf(i,d).each((e=>{d.setStart(e.startContainer,e.startOffset),d.setEnd(e.endContainer,e.endOffset)})),n=d.startContainer,o=d.startOffset;const x=!(!t||!t.shiftKey),E=!(!t||!t.ctrlKey);qo(n)&&n.hasChildNodes()&&!p&&(a=o>n.childNodes.length-1,n=n.childNodes[Math.min(o,n.childNodes.length-1)]||n,o=a&&er(n)?n.data.length:0);const _=CN(i,n);if(!_||((e,t)=>{const n=e.dom.getParent(t,"ol,ul,dl");return null!==n&&"false"===e.dom.getContentEditableParent(n)})(e,n))return;x||(n=((e,t,n,o,r)=>{var s,a;const i=e.dom,l=null!==(s=CN(i,o))&&void 0!==s?s:i.getRoot();let d=i.getParent(o,i.isBlock);if(!d||!PN(i,d)){if(d=d||l,!d.hasChildNodes()){const o=i.create(t);return EN(e,o),d.appendChild(o),n.setStart(o,0),n.setEnd(o,0),o}let s,c=o;for(;c&&c.parentNode!==d;)c=c.parentNode;for(;c&&!i.isBlock(c);)s=c,c=c.previousSibling;const u=null===(a=null==s?void 0:s.parentElement)||void 0===a?void 0:a.nodeName;if(s&&u&&e.schema.isValidChild(u,t.toLowerCase())){const a=s.parentNode,l=i.create(t);for(EN(e,l),a.insertBefore(l,s),c=s;c&&!i.isBlock(c);){const e=c.nextSibling;l.appendChild(c),c=e}n.setStart(o,r),n.setEnd(o,r)}}return o})(e,c,d,n,o));let S=i.getParent(n,i.isBlock)||i.getRoot();s=C(null==S?void 0:S.parentNode)?i.getParent(S.parentNode,i.isBlock):null,r=S?S.nodeName.toUpperCase():"";const k=s?s.nodeName.toUpperCase():"";if("LI"!==k||E||(S=s,s=s.parentNode,r=k),qo(s)&&((e,t,n)=>!t&&n.nodeName.toLowerCase()===Il(e)&&e.dom.isEmpty(n)&&((t,n,o)=>{let r=n;for(;r&&r!==t&&h(r.nextSibling);){const t=r.parentElement;if(!t||(s=t,!Ee(e.schema.getTextBlockElements(),s.nodeName.toLowerCase())))return gr(t);r=t}var s;return!1})(e.getBody(),n))(e,x,S))return((e,t,n)=>{var o,r,s;const a=t(Il(e)),i=((e,t)=>e.dom.getParent(t,gr))(e,n);i&&(e.dom.insertAfter(a,i),yN(e,a),(null!==(s=null===(r=null===(o=n.parentElement)||void 0===o?void 0:o.childNodes)||void 0===r?void 0:r.length)&&void 0!==s?s:0)>1&&e.dom.remove(n))})(e,b,S);if(/^(LI|DT|DD)$/.test(r)&&qo(s)&&i.isEmpty(S))return void((e,t,n,o,r)=>{const s=e.dom,a=e.selection.getRng(),i=n.parentNode;if(n===e.getBody()||!i)return;var l;kN(l=n)&&kN(l.parentNode)&&(r="LI");const d=NN(o)?TN(o):void 0;let c=NN(o)&&d?t(r,{style:TN(o)}):t(r);if(AN(n,o,!0)&&AN(n,o,!1))if(SN(n,"LI")){const e=RN(n);s.insertAfter(c,e),(e=>{var t;return(null===(t=e.parentNode)||void 0===t?void 0:t.firstChild)===e})(n)?s.remove(e):s.remove(n)}else s.replace(c,n);else if(AN(n,o,!0))SN(n,"LI")?(s.insertAfter(c,RN(n)),c.appendChild(s.doc.createTextNode(" ")),c.appendChild(n)):i.insertBefore(c,n),s.remove(o);else if(AN(n,o,!1))s.insertAfter(c,RN(n)),s.remove(o);else{n=RN(n);const e=a.cloneRange();e.setStartAfter(o),e.setEndAfter(n);const t=e.extractContents();if("LI"===r&&((e,t)=>e.firstChild&&"LI"===e.firstChild.nodeName)(t)){const e=Y(q(c.children,yn),O(Xt("br")));c=t.firstChild,s.insertAfter(t,n),V(e,(e=>bo(yn(c),e))),d&&c.setAttribute("style",d)}else s.insertAfter(t,n),s.insertAfter(c,n);s.remove(o)}yN(e,c)})(e,b,s,S,c);if(!(p||S!==e.getBody()&&PN(i,S)))return;const N=S.parentNode;let R;if(p)R=b(c),f.fold((()=>{vo(u,yn(R))}),(e=>{po(e,yn(R))})),e.selection.setCursorLocation(R,0);else if(Ir(S))R=Vr(S),i.isEmpty(S)&&xN(S),EN(e,R),yN(e,R);else if(v(!1))R=w();else if(v(!0)&&N){R=N.insertBefore(b(),S);const t=yn(d.startContainer).dom.hasChildNodes()&&d.collapsed;yN(e,BN(S,"HR")||t?R:S)}else{const t=(e=>{const t=e.cloneRange();return t.setStart(e.startContainer,DN(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,DN(!1,e.endContainer,e.endOffset)),t})(d).cloneRange();t.setEndAfter(S);const n=t.extractContents();(e=>{V(Fo(yn(e),Kt),(e=>{const t=e.dom;t.nodeValue=Dr(t.data)}))})(n),(e=>{let t=e;do{er(t)&&(t.data=t.data.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)})(n),R=n.firstChild,i.insertAfter(n,S),((e,t,n)=>{var o;const r=[];if(!n)return;let s=n;for(;s=s.firstChild;){if(e.isBlock(s))return;qo(s)&&!t[s.nodeName.toLowerCase()]&&r.push(s)}let a=r.length;for(;a--;)s=r[a],(!s.hasChildNodes()||s.firstChild===s.lastChild&&""===(null===(o=s.firstChild)||void 0===o?void 0:o.nodeValue)||ON(e,s))&&e.remove(s)})(i,l,R),((e,t)=>{t.normalize();const n=t.lastChild;(!n||qo(n)&&/^(left|right)$/gi.test(e.getStyle(n,"float",!0)))&&e.add(t,"br")})(i,S),i.isEmpty(S)&&xN(S),R.normalize(),i.isEmpty(R)?(i.remove(R),w()):(EN(e,R),yN(e,R))}i.setAttrib(R,"id",""),e.dispatch("NewBlock",{newBlock:R})},fakeEventName:"insertParagraph"},MN=(e,t,n)=>{const o=e.dom.createRng();n?(o.setStartBefore(t),o.setEndBefore(t)):(o.setStartAfter(t),o.setEndAfter(t)),e.selection.setRng(o),sg(e,o)},IN=(e,t)=>{const n=bn("br");po(yn(t),n),e.undoManager.add()},FN=(e,t)=>{UN(e.getBody(),t)||ho(yn(t),bn("br"));const n=bn("br");ho(yn(t),n),MN(e,n.dom,!1),e.undoManager.add()},UN=(e,t)=>{return n=Vi.after(t),!!ar(n.getNode())||Au(e,Vi.after(t)).map((e=>ar(e.getNode()))).getOr(!1);var n},zN=e=>e&&"A"===e.nodeName&&"href"in e,jN=e=>e.fold(L,zN,zN,L),HN=(e,t)=>{t.fold(_,T(IN,e),T(FN,e),_)},$N={insert:(e,t)=>{const n=(e=>{const t=T(Ch,e),n=Vi.fromRangeStart(e.selection.getRng());return cE(t,e.getBody(),n).filter(jN)})(e);n.isSome()?n.each(T(HN,e)):((e,t)=>{const n=e.selection,o=e.dom,r=n.getRng();let s,a=!1;Mf(o,r).each((e=>{r.setStart(e.startContainer,e.startOffset),r.setEnd(e.endContainer,e.endOffset)}));let i=r.startOffset,l=r.startContainer;if(qo(l)&&l.hasChildNodes()){const e=i>l.childNodes.length-1;l=l.childNodes[Math.min(i,l.childNodes.length-1)]||l,i=e&&er(l)?l.data.length:0}let d=o.getParent(l,o.isBlock);const c=d&&d.parentNode?o.getParent(d.parentNode,o.isBlock):null,u=c?c.nodeName.toUpperCase():"",m=!(!t||!t.ctrlKey);"LI"!==u||m||(d=c),er(l)&&i>=l.data.length&&(((e,t,n)=>{const o=new jo(t,n);let r;const s=e.getNonEmptyElements();for(;r=o.next();)if(s[r.nodeName.toLowerCase()]||er(r)&&r.length>0)return!0;return!1})(e.schema,l,d||o.getRoot())||(s=o.create("br"),r.insertNode(s),r.setStartAfter(s),r.setEndAfter(s),a=!0)),s=o.create("br"),Ki(o,r,s),MN(e,s,a),e.undoManager.add()})(e,t)},fakeEventName:"insertLineBreak"},qN=(e,t)=>wN(e).filter((e=>t.length>0&&xn(yn(e),t))).isSome(),VN=hl([{br:[]},{block:[]},{none:[]}]),WN=(e,t)=>(e=>qN(e,jl(e)))(e),KN=e=>(t,n)=>(e=>wN(e).filter((e=>kr(yn(e)))).isSome())(t)===e,YN=(e,t)=>(n,o)=>{const r=(e=>wN(e).fold(N(""),(e=>e.nodeName.toUpperCase())))(n)===e.toUpperCase();return r===t},GN=e=>{const t=CN(e.dom,e.selection.getStart());return y(t)},XN=e=>YN("pre",e),QN=e=>(t,n)=>Ml(t)===e,JN=(e,t)=>(e=>qN(e,zl(e)))(e),ZN=(e,t)=>t,eR=e=>{const t=Il(e),n=CN(e.dom,e.selection.getStart());return C(n)&&e.schema.isValidChild(n.nodeName,t)},tR=e=>{const t=e.selection.getRng(),n=yn(t.startContainer),o=In(n,t.startOffset).map((e=>Vt(e)&&!oo(e)));return t.collapsed&&o.getOr(!0)},nR=(e,t)=>(n,o)=>X(e,((e,t)=>e&&t(n,o)),!0)?I.some(t):I.none(),oR=(e,t,n)=>{t.selection.isCollapsed()||(e=>{e.execCommand("delete")})(t),C(n)&&gN(t,e.fakeEventName).isDefaultPrevented()||(e.insert(t,n),C(n)&&fN(t,e.fakeEventName))},rR=(e,t)=>{const n=()=>oR($N,e,t),o=()=>oR(LN,e,t),r=((e,t)=>eE([nR([WN],VN.none()),nR([XN(!0),GN],VN.none()),nR([YN("summary",!0)],VN.br()),nR([XN(!0),QN(!1),ZN],VN.br()),nR([XN(!0),QN(!1)],VN.block()),nR([XN(!0),QN(!0),ZN],VN.block()),nR([XN(!0),QN(!0)],VN.br()),nR([KN(!0),ZN],VN.br()),nR([KN(!0)],VN.block()),nR([JN],VN.br()),nR([ZN],VN.br()),nR([eR],VN.block()),nR([tR],VN.block())],[e,!(!t||!t.shiftKey)]).getOr(VN.none()))(e,t);switch(Ul(e)){case"linebreak":r.fold(n,n,_);break;case"block":r.fold(o,o,_);break;case"invert":r.fold(o,n,_);break;default:r.fold(n,o,_)}},sR=xt(),aR=sR.os.isiOS()&&sR.browser.isSafari(),iR=(e,t)=>{var n;t.isDefaultPrevented()||(t.preventDefault(),(n=e.undoManager).typing&&(n.typing=!1,n.add()),e.undoManager.transact((()=>{rR(e,t)})))},lR=xt(),dR=e=>e.stopImmediatePropagation(),cR=e=>e.keyCode===af.PAGE_UP||e.keyCode===af.PAGE_DOWN,uR=(e,t,n)=>{n&&!e.get()?t.on("NodeChange",dR,!0):!n&&e.get()&&t.off("NodeChange",dR),e.set(n)},mR=(e,t)=>{const n=t.container(),o=t.offset();return er(n)?(n.insertData(o,e),I.some(Vi(n,o+e.length))):iu(t).map((n=>{const o=vn(e);return t.isAtEnd()?ho(n,o):po(n,o),Vi(o.dom,e.length)}))},fR=T(mR,br),gR=T(mR," "),pR=e=>t=>{e.selection.setRng(t.toRange()),e.nodeChanged()},hR=e=>{const t=Vi.fromRangeStart(e.selection.getRng()),n=yn(e.getBody());if(e.selection.isCollapsed()){const o=T(Ch,e),r=Vi.fromRangeStart(e.selection.getRng());return cE(o,e.getBody(),r).bind((e=>t=>t.fold((t=>Tu(e.dom,Vi.before(t))),(e=>Ou(e)),(e=>Bu(e)),(t=>Au(e.dom,Vi.after(t)))))(n)).map((o=>()=>((e,t,n)=>o=>Zp(e,o,n)?fR(t):gR(t))(n,t,e.schema)(o).each(pR(e))))}return I.none()},bR=e=>{return It(At.browser.isFirefox()&&e.selection.isEditable()&&(t=e.dom,n=e.selection.getRng().startContainer,t.isEditable(t.getParent(n,"summary"))),(()=>{const t=yn(e.getBody());e.selection.isCollapsed()||e.getDoc().execCommand("Delete"),((e,t,n)=>Zp(e,t,n)?fR(t):gR(t))(t,Vi.fromRangeStart(e.selection.getRng()),e.schema).each(pR(e))}));var t,n},vR=e=>hc(e)?[{keyCode:af.TAB,action:sS(BS,e,!0)},{keyCode:af.TAB,shiftKey:!0,action:sS(BS,e,!1)}]:[],yR=e=>{if(e.addShortcut("Meta+P","","mcePrint"),tN(e),ZC(e))return $a(null);{const t=a_(e);return(e=>{e.on("beforeinput",(t=>{e.selection.isEditable()&&!$(t.getTargetRanges(),(t=>!Og(e.dom,t)))||t.preventDefault()}))})(e),(e=>{e.on("keyup compositionstart",T(K_,e))})(e),((e,t)=>{e.on("keydown",(n=>{n.isDefaultPrevented()||((e,t,n)=>{const o=At.os.isMacOS()||At.os.isiOS();aS([{keyCode:af.RIGHT,action:sS(X_,e,!0)},{keyCode:af.LEFT,action:sS(X_,e,!1)},{keyCode:af.UP,action:sS(Q_,e,!1)},{keyCode:af.DOWN,action:sS(Q_,e,!0)},...o?[{keyCode:af.UP,action:sS(Z_,e,!1),metaKey:!0,shiftKey:!0},{keyCode:af.DOWN,action:sS(Z_,e,!0),metaKey:!0,shiftKey:!0}]:[],{keyCode:af.RIGHT,action:sS(NS,e,!0)},{keyCode:af.LEFT,action:sS(NS,e,!1)},{keyCode:af.UP,action:sS(RS,e,!1)},{keyCode:af.DOWN,action:sS(RS,e,!0)},{keyCode:af.UP,action:sS(RS,e,!1)},{keyCode:af.UP,action:sS(nS,e,!1)},{keyCode:af.DOWN,action:sS(nS,e,!0)},{keyCode:af.RIGHT,action:sS(lS,e,!0)},{keyCode:af.LEFT,action:sS(lS,e,!1)},{keyCode:af.UP,action:sS(dS,e,!1)},{keyCode:af.DOWN,action:sS(dS,e,!0)},{keyCode:af.RIGHT,action:sS(r_,e,t,!0)},{keyCode:af.LEFT,action:sS(r_,e,t,!1)},{keyCode:af.RIGHT,ctrlKey:!o,altKey:o,action:sS(i_,e,t)},{keyCode:af.LEFT,ctrlKey:!o,altKey:o,action:sS(l_,e,t)},{keyCode:af.UP,action:sS(tS,e,!1)},{keyCode:af.DOWN,action:sS(tS,e,!0)}],n).each((e=>{n.preventDefault()}))})(e,t,n)}))})(e,t),((e,t)=>{let n=!1;e.on("keydown",(o=>{n=o.keyCode===af.BACKSPACE,o.isDefaultPrevented()||((e,t,n)=>{const o=n.keyCode===af.BACKSPACE?"deleteContentBackward":"deleteContentForward",r=e.selection.isCollapsed(),s=r?"character":"selection",a=e=>r?e?"word":"line":"selection";iS([{keyCode:af.BACKSPACE,action:sS(P_,e)},{keyCode:af.BACKSPACE,action:sS(Hx,e,!1)},{keyCode:af.DELETE,action:sS(Hx,e,!0)},{keyCode:af.BACKSPACE,action:sS(Dx,e,!1)},{keyCode:af.DELETE,action:sS(Dx,e,!0)},{keyCode:af.BACKSPACE,action:sS(m_,e,t,!1)},{keyCode:af.DELETE,action:sS(m_,e,t,!0)},{keyCode:af.BACKSPACE,action:sS(ib,e,!1)},{keyCode:af.DELETE,action:sS(ib,e,!0)},{keyCode:af.BACKSPACE,action:sS(uN,e,!1,s)},{keyCode:af.DELETE,action:sS(uN,e,!0,s)},...bN?[{keyCode:af.BACKSPACE,altKey:!0,action:sS(uN,e,!1,a(!0))},{keyCode:af.DELETE,altKey:!0,action:sS(uN,e,!0,a(!0))},{keyCode:af.BACKSPACE,metaKey:!0,action:sS(uN,e,!1,a(!1))}]:[{keyCode:af.BACKSPACE,ctrlKey:!0,action:sS(uN,e,!1,a(!0))},{keyCode:af.DELETE,ctrlKey:!0,action:sS(uN,e,!0,a(!0))}],{keyCode:af.BACKSPACE,action:sS($x,e,!1)},{keyCode:af.DELETE,action:sS($x,e,!0)},{keyCode:af.BACKSPACE,action:sS(S_,e,!1)},{keyCode:af.DELETE,action:sS(S_,e,!0)},{keyCode:af.BACKSPACE,action:sS(Nx,e,!1)},{keyCode:af.DELETE,action:sS(Nx,e,!0)},{keyCode:af.BACKSPACE,action:sS(_x,e,!1)},{keyCode:af.DELETE,action:sS(_x,e,!0)},{keyCode:af.BACKSPACE,action:sS(w_,e,!1)},{keyCode:af.DELETE,action:sS(w_,e,!0)}],n).filter((t=>e.selection.isEditable())).each((t=>{n.preventDefault(),gN(e,o).isDefaultPrevented()||(t(),fN(e,o))}))})(e,t,o)})),e.on("keyup",(t=>{t.isDefaultPrevented()||((e,t,n)=>{aS([{keyCode:af.BACKSPACE,action:sS(jx,e)},{keyCode:af.DELETE,action:sS(jx,e)},...bN?[{keyCode:af.BACKSPACE,altKey:!0,action:sS(E_,e)},{keyCode:af.DELETE,altKey:!0,action:sS(E_,e)},...n?[{keyCode:vN?224:91,action:sS(E_,e)}]:[]]:[{keyCode:af.BACKSPACE,ctrlKey:!0,action:sS(E_,e)},{keyCode:af.DELETE,ctrlKey:!0,action:sS(E_,e)}]],t)})(e,t,n),n=!1}))})(e,t),(e=>{let t=I.none();e.on("keydown",(n=>{n.keyCode===af.ENTER&&(aR&&(e=>{if(!e.collapsed)return!1;const t=e.startContainer;if(er(t)){const n=/^[\uAC00-\uD7AF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]$/,o=t.data.charAt(e.startOffset-1);return n.test(o)}return!1})(e.selection.getRng())?(e=>{t=I.some(e.selection.getBookmark()),e.undoManager.add()})(e):iR(e,n))})),e.on("keyup",(n=>{n.keyCode===af.ENTER&&t.each((()=>((e,n)=>{e.undoManager.undo(),t.fold(_,(t=>e.selection.moveToBookmark(t))),iR(e,n),t=I.none()})(e,n)))}))})(e),(e=>{e.on("keydown",(t=>{t.isDefaultPrevented()||((e,t)=>{iS([{keyCode:af.SPACEBAR,action:sS(hR,e)},{keyCode:af.SPACEBAR,action:sS(bR,e)}],t).each((n=>{t.preventDefault(),gN(e,"insertText",{data:" "}).isDefaultPrevented()||(n(),fN(e,"insertText",{data:" "}))}))})(e,t)}))})(e),(e=>{e.on("input",(t=>{t.isComposing||(e=>{const t=yn(e.getBody());e.selection.isCollapsed()&&ih(t,Vi.fromRangeStart(e.selection.getRng()),e.schema).each((t=>{e.selection.setRng(t.toRange())}))})(e)}))})(e),(e=>{e.on("keydown",(t=>{t.isDefaultPrevented()||((e,t)=>{aS([...vR(e)],t).each((e=>{t.preventDefault()}))})(e,t)}))})(e),((e,t)=>{e.on("keydown",(n=>{n.isDefaultPrevented()||((e,t,n)=>{const o=At.os.isMacOS()||At.os.isiOS();aS([{keyCode:af.END,action:sS(J_,e,!0)},{keyCode:af.HOME,action:sS(J_,e,!1)},...o?[]:[{keyCode:af.HOME,action:sS(Z_,e,!1),ctrlKey:!0,shiftKey:!0},{keyCode:af.END,action:sS(Z_,e,!0),ctrlKey:!0,shiftKey:!0}],{keyCode:af.END,action:sS(cS,e,!0)},{keyCode:af.HOME,action:sS(cS,e,!1)},{keyCode:af.END,action:sS(d_,e,!0,t)},{keyCode:af.HOME,action:sS(d_,e,!1,t)}],n).each((e=>{n.preventDefault()}))})(e,t,n)}))})(e,t),((e,t)=>{if(lR.os.isMacOS())return;const n=$a(!1);e.on("keydown",(t=>{cR(t)&&uR(n,e,!0)})),e.on("keyup",(o=>{o.isDefaultPrevented()||((e,t,n)=>{aS([{keyCode:af.PAGE_UP,action:sS(d_,e,!1,t)},{keyCode:af.PAGE_DOWN,action:sS(d_,e,!0,t)}],n)})(e,t,o),cR(o)&&n.get()&&(uR(n,e,!1),e.nodeChanged())}))})(e,t),t}};class CR{constructor(e){let t;this.lastPath=[],this.editor=e;const n=this;"onselectionchange"in e.getDoc()||e.on("NodeChange click mouseup keyup focus",(n=>{const o=e.selection.getRng(),r={startContainer:o.startContainer,startOffset:o.startOffset,endContainer:o.endContainer,endOffset:o.endOffset};"nodechange"!==n.type&&Af(r,t)||e.dispatch("SelectionChange"),t=r})),e.on("contextmenu",(()=>{e.dispatch("SelectionChange")})),e.on("SelectionChange",(()=>{const t=e.selection.getStart(!0);t&&am(e)&&!n.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})})),e.on("mouseup",(t=>{!t.isDefaultPrevented()&&am(e)&&("IMG"===e.selection.getNode().nodeName?vg.setEditorTimeout(e,(()=>{e.nodeChanged()})):e.nodeChanged())}))}nodeChanged(e={}){const t=this.editor.selection;let n;if(this.editor.initialized&&t&&!Od(this.editor)&&!this.editor.mode.isReadOnly()){const o=this.editor.getBody();n=t.getStart(!0)||o,n.ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(n,o)||(n=o);const r=[];this.editor.dom.getParent(n,(e=>e===o||(r.push(e),!1))),this.editor.dispatch("NodeChange",{...e,element:n,parents:r})}}isSameElementPath(e){let t;const n=this.editor,o=oe(n.dom.getParents(e,M,n.getBody()));if(o.length===this.lastPath.length){for(t=o.length;t>=0&&o[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=o,!0}return this.lastPath=o,!1}}const wR=ui("image"),xR=ui("event"),ER=e=>t=>{t[xR]=e},_R=ER(0),SR=ER(2),kR=ER(1),NR=(0,e=>{const t=e;return I.from(t[xR]).exists((e=>0===e))});const RR=ui("mode"),AR=e=>t=>{t[RR]=e},TR=(e,t)=>AR(t)(e),OR=AR(0),BR=AR(2),PR=AR(1),DR=e=>t=>{const n=t;return I.from(n[RR]).exists((t=>t===e))},LR=DR(0),MR=DR(1),IR=["none","copy","link","move"],FR=["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"],UR=()=>{const e=new window.DataTransfer;let t="move",n="all";const o={get dropEffect(){return t},set dropEffect(e){H(IR,e)&&(t=e)},get effectAllowed(){return n},set effectAllowed(e){NR(o)&&H(FR,e)&&(n=e)},get items(){return((e,t)=>({...t,get length(){return t.length},add:(n,o)=>{if(LR(e)){if(!m(n))return t.add(n);if(!v(o))return t.add(n,o)}return null},remove:n=>{LR(e)&&t.remove(n)},clear:()=>{LR(e)&&t.clear()}}))(o,e.items)},get files(){return MR(o)?Object.freeze({length:0,item:e=>null}):e.files},get types(){return e.types},setDragImage:(t,n,r)=>{var s;LR(o)&&(s={image:t,x:n,y:r},o[wR]=s,e.setDragImage(t,n,r))},getData:t=>MR(o)?"":e.getData(t),setData:(t,n)=>{LR(o)&&e.setData(t,n)},clearData:t=>{LR(o)&&e.clearData(t)}};return OR(o),o},zR=(e,t)=>e.setData("text/html",t),jR="x-tinymce/html",HR=N(jR),$R="\x3c!-- "+jR+" --\x3e",qR=e=>$R+e,VR=e=>-1!==e.indexOf($R),WR="%MCEPASTEBIN%",KR=e=>e.dom.get("mcepastebin"),YR=e=>C(e)&&"mcepastebin"===e.id,GR=e=>e===WR,XR=(e,t)=>(Pt.each(t,(t=>{e=u(t,RegExp)?e.replace(t,""):e.replace(t[0],t[1])})),e),QR=e=>XR(e,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/|/g,[/( ?)\u00a0<\/span>( ?)/g,(e,t,n)=>t||n?br:" "],/
    /g,/
    $/i]),JR=(e,t)=>({content:e,cancelled:t}),ZR=(e,t)=>(e.insertContent(t,{merge:tc(e),paste:!0}),!0),eA=e=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(e),tA=(e,t,n)=>!(e.selection.isCollapsed()||!eA(t))&&((e,t,n)=>(e.undoManager.extra((()=>{n(e,t)}),(()=>{e.execCommand("mceInsertLink",!1,t)})),!0))(e,t,n),nA=(e,t,n)=>!!((e,t)=>eA(t)&&$(pc(e),(e=>$e(t.toLowerCase(),`.${e.toLowerCase()}`))))(e,t)&&((e,t,n)=>(e.undoManager.extra((()=>{n(e,t)}),(()=>{e.insertContent('')})),!0))(e,t,n),oA=(e=>{let t=0;return()=>"mceclip"+t++})(),rA=e=>{const t=UR();return zR(t,e),BR(t),t},sA=(e,t,n,o,r)=>{const s=((e,t,n)=>((e,t,n)=>{const o=((e,t,n)=>e.dispatch("PastePreProcess",{content:t,internal:n}))(e,t,n),r=((e,t)=>{const n=CC({sanitize:fc(e),sandbox_iframes:Cc(e)},e.schema);n.addNodeFilter("meta",(e=>{Pt.each(e,(e=>{e.remove()}))}));const o=n.parse(t,{forced_root_block:!1,isRootContent:!0});return up({validate:!0},e.schema).serialize(o)})(e,o.content);return e.hasEventListeners("PastePostProcess")&&!o.isDefaultPrevented()?((e,t,n)=>{const o=e.dom.create("div",{style:"display:none"},t),r=((e,t,n)=>e.dispatch("PastePostProcess",{node:t,internal:n}))(e,o,n);return JR(r.node.innerHTML,r.isDefaultPrevented())})(e,r,n):JR(r,o.isDefaultPrevented())})(e,t,n))(e,t,n);if(!s.cancelled){const t=s.content,n=()=>((e,t,n)=>{n||!nc(e)?ZR(e,t):((e,t)=>{Pt.each([tA,nA,ZR],(n=>!n(e,t,ZR)))})(e,t)})(e,t,o);r?gN(e,"insertFromPaste",{dataTransfer:rA(t)}).isDefaultPrevented()||(n(),fN(e,"insertFromPaste")):n()}},aA=(e,t,n,o)=>{const r=n||VR(t);sA(e,(e=>e.replace($R,""))(t),r,!1,o)},iA=(e,t,n)=>{const o=e.dom.encode(t).replace(/\r\n/g,"\n"),r=((e,t,n)=>{const o=e.split(/\n\n/),r=((e,t)=>{let n="<"+e;const o=Ce(t,((e,t)=>t+'="'+ea.encodeAllRaw(e)+'"'));return o.length&&(n+=" "+o.join(" ")),n+">"})(t,n),s="",a=q(o,(e=>e.split(/\n/).join("
    ")));return 1===a.length?a[0]:q(a,(e=>r+e+s)).join("")})(ls(o,rc(e)),Il(e),Fl(e));sA(e,r,!1,!0,n)},lA=e=>{const t={};if(e&&e.types)for(let n=0;nt in e&&e[t].length>0,cA=e=>dA(e,"text/html")||dA(e,"text/plain"),uA=(e,t,n)=>{const o="paste"===t.type?t.clipboardData:t.dataTransfer;var r;if(Gd(e)&&o){const s=((e,t)=>{const n=t.items?te(ce(t.items),(e=>"file"===e.kind?[e.getAsFile()]:[])):[],o=t.files?ce(t.files):[];return Y(n.length>0?n:o,(e=>{const t=pc(e);return e=>He(e.type,"image/")&&$(t,(t=>(e=>{const t=e.toLowerCase(),n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return Pt.hasOwn(n,t)?"image/"+n[t]:"image/"+t})(t)===e.type))})(e))})(e,o);if(s.length>0)return t.preventDefault(),(r=s,Promise.all(q(r,(e=>Gv(e).then((t=>({file:e,uri:t}))))))).then((t=>{n&&e.selection.setRng(n),V(t,(t=>{((e,t)=>{Kv(t.uri).each((({data:n,type:o,base64Encoded:r})=>{const s=r?n:btoa(n),a=t.file,i=e.editorUpload.blobCache,l=i.getByData(s,o),d=null!=l?l:((e,t,n,o)=>{const r=oA(),s=Vl(e)&&C(n.name),a=s?((e,t)=>{const n=t.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return C(n)?e.dom.encode(n[1]):void 0})(e,n.name):r,i=s?n.name:void 0,l=t.create(r,n,o,a,i);return t.add(l),l})(e,i,a,s);aA(e,``,!1,!0)}))})(e,t)}))})),!0}return!1},mA=(e,t,n,o,r)=>{let s=QR(n);const a=dA(t,HR())||VR(n),i=!a&&(e=>!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e))(s),l=eA(s);(GR(s)||!s.length||i&&!l)&&(o=!0),(o||l)&&(s=dA(t,"text/plain")&&i?t["text/plain"]:(e=>{const t=ua(),n=CC({},t);let o="";const r=t.getVoidElements(),s=Pt.makeMap("script noscript style textarea video audio iframe object"," "),a=t.getBlockElements(),i=e=>{const n=e.name,l=e;if("br"!==n){if("wbr"!==n)if(r[n]&&(o+=" "),s[n])o+=" ";else{if(3===e.type&&(o+=e.value),!(e.name in t.getVoidElements())){let t=e.firstChild;if(t)do{i(t)}while(t=t.next)}a[n]&&l.next&&(o+="\n","p"===n&&(o+="\n"))}}else o+="\n"};return e=XR(e,[//g]),i(n.parse(e)),o})(s)),GR(s)||(o?iA(e,s,r):aA(e,s,a,r))},fA=(e,t,n)=>{((e,t,n)=>{let o;e.on("keydown",(e=>{(e=>af.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode)(e)&&!e.isDefaultPrevented()&&(o=e.shiftKey&&86===e.keyCode)})),e.on("paste",(r=>{if(r.isDefaultPrevented()||(e=>{var t,n;return At.os.isAndroid()&&0===(null===(n=null===(t=e.clipboardData)||void 0===t?void 0:t.items)||void 0===n?void 0:n.length)})(r))return;const s="text"===n.get()||o;o=!1;const a=lA(r.clipboardData);!cA(a)&&uA(e,r,t.getLastRng()||e.selection.getRng())||(dA(a,"text/html")?(r.preventDefault(),mA(e,a,a["text/html"],s,!0)):dA(a,"text/plain")&&dA(a,"text/uri-list")?(r.preventDefault(),mA(e,a,a["text/plain"],s,!0)):(t.create(),vg.setEditorTimeout(e,(()=>{const n=t.getHtml();t.remove(),mA(e,a,n,s,!1)}),0)))}))})(e,t,n),(e=>{const t=e=>He(e,"webkit-fake-url"),n=e=>He(e,"data:");e.parser.addNodeFilter("img",((o,r,s)=>{if(!Gd(e)&&(e=>{var t;return!0===(null===(t=e.data)||void 0===t?void 0:t.paste)})(s))for(const r of o){const o=r.attr("src");m(o)&&!r.attr("data-mce-object")&&o!==At.transparentSrc&&(t(o)||!sc(e)&&n(o))&&r.remove()}}))})(e)},gA=(e,t,n,o)=>{((e,t,n)=>{if(!e)return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(HR(),t),!0}catch(e){return!1}})(e.clipboardData,t.html,t.text)?(e.preventDefault(),o()):n(t.html,o)},pA=e=>(t,n)=>{const{dom:o,selection:r}=e,s=o.create("div",{contenteditable:"false","data-mce-bogus":"all"}),a=o.create("div",{contenteditable:"true"},t);o.setStyles(s,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),s.appendChild(a),o.add(e.getBody(),s);const i=r.getRng();a.focus();const l=o.createRng();l.selectNodeContents(a),r.setRng(l),vg.setEditorTimeout(e,(()=>{r.setRng(i),o.remove(s),n()}),0)},hA=e=>({html:qR(e.selection.getContent({contextual:!0})),text:e.selection.getContent({format:"text"})}),bA=e=>!e.selection.isCollapsed()||(e=>!!e.dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody()))(e),vA=(e,t)=>{var n,o;return Uf.getCaretRangeFromPoint(null!==(n=t.clientX)&&void 0!==n?n:0,null!==(o=t.clientY)&&void 0!==o?o:0,e.getDoc())},yA=(e,t)=>{e.focus(),t&&e.selection.setRng(t)},CA=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,wA=e=>Pt.trim(e).replace(CA,Ca).toLowerCase(),xA=(e,t,n)=>{const o=Zd(e);if(n||"all"===o||!ec(e))return t;const r=o?o.split(/[, ]/):[];if(r&&"none"!==o){const n=e.dom,o=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,((e,t,s,a)=>{const i=n.parseStyle(n.decode(s)),l={};for(let e=0;e]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,((e,t,n,o)=>t+' style="'+n+'"'+o)),t},EA=e=>{const t=$a(!1),n=$a(oc(e)?"text":"html"),o=(e=>{const t=$a(null);return{create:()=>((e,t)=>{const{dom:n,selection:o}=e,r=e.getBody();t.set(o.getRng());const s=n.add(e.getBody(),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},WR);At.browser.isFirefox()&&n.setStyle(s,"left","rtl"===n.getStyle(r,"direction",!0)?65535:-65535),n.bind(s,"beforedeactivate focusin focusout",(e=>{e.stopPropagation()})),s.focus(),o.select(s,!0)})(e,t),remove:()=>((e,t)=>{const n=e.dom;if(KR(e)){let o;const r=t.get();for(;o=KR(e);)n.remove(o),n.unbind(o);r&&e.selection.setRng(r)}t.set(null)})(e,t),getEl:()=>KR(e),getHtml:()=>(e=>{const t=e.dom,n=(e,n)=>{e.appendChild(n),t.remove(n,!0)},[o,...r]=Y(e.getBody().childNodes,YR);V(r,(e=>{n(o,e)}));const s=t.select("div[id=mcepastebin]",o);for(let e=s.length-1;e>=0;e--){const r=t.create("div");o.insertBefore(r,s[e]),n(r,s[e])}return o?o.innerHTML:""})(e),getLastRng:t.get}})(e);(e=>{(At.browser.isChromium()||At.browser.isSafari())&&((e,t)=>{e.on("PastePreProcess",(n=>{n.content=t(e,n.content,n.internal)}))})(e,xA)})(e),((e,t)=>{e.addCommand("mceTogglePlainTextPaste",(()=>{((e,t)=>{"text"===t.get()?(t.set("html"),sf(e,!1)):(t.set("text"),sf(e,!0)),e.focus()})(e,t)})),e.addCommand("mceInsertClipboardContent",((t,n)=>{n.html&&aA(e,n.html,n.internal,!1),n.text&&iA(e,n.text,!1)}))})(e,n),(e=>{const t=t=>n=>{t(e,n)},n=Xd(e);w(n)&&e.on("PastePreProcess",t(n));const o=Qd(e);w(o)&&e.on("PastePostProcess",t(o))})(e),e.on("PreInit",(()=>{(e=>{e.on("cut",(e=>t=>{!t.isDefaultPrevented()&&bA(e)&&e.selection.isEditable()&&gA(t,hA(e),pA(e),(()=>{if(At.browser.isChromium()||At.browser.isFirefox()){const t=e.selection.getRng();vg.setEditorTimeout(e,(()=>{e.selection.setRng(t),e.execCommand("Delete")}),0)}else e.execCommand("Delete")}))})(e)),e.on("copy",(e=>t=>{!t.isDefaultPrevented()&&bA(e)&&gA(t,hA(e),pA(e),_)})(e))})(e),((e,t)=>{Yd(e)&&e.on("dragend dragover draggesture dragdrop drop drag",(e=>{e.preventDefault(),e.stopPropagation()})),Gd(e)||e.on("drop",(e=>{const t=e.dataTransfer;t&&(e=>$(e.files,(e=>/^image\//.test(e.type))))(t)&&e.preventDefault()})),e.on("drop",(n=>{if(n.isDefaultPrevented())return;const o=vA(e,n);if(y(o))return;const r=lA(n.dataTransfer),s=dA(r,HR());if((!cA(r)||(e=>{const t=e["text/plain"];return!!t&&0===t.indexOf("file://")})(r))&&uA(e,n,o))return;const a=r[HR()],i=a||r["text/html"]||r["text/plain"],l=((e,t,n,o)=>{const r=e.getParent(n,(e=>Ts(t,e)));if(!h(e.getParent(n,"summary")))return!0;if(r&&Ee(o,"text/html")){const e=(new DOMParser).parseFromString(o["text/html"],"text/html").body;return!h(e.querySelector(r.nodeName.toLowerCase()))}return!1})(e.dom,e.schema,o.startContainer,r),d=t.get();d&&!l||i&&(n.preventDefault(),vg.setEditorTimeout(e,(()=>{e.undoManager.transact((()=>{(a||d&&l)&&e.execCommand("Delete"),yA(e,o);const t=QR(i);r["text/html"]?aA(e,t,s,!0):iA(e,t,!0)}))})))})),e.on("dragstart",(e=>{t.set(!0)})),e.on("dragover dragend",(n=>{Gd(e)&&!t.get()&&(n.preventDefault(),yA(e,vA(e,n))),"dragend"===n.type&&t.set(!1)})),(e=>{e.on("input",(t=>{const n=e=>h(e.querySelector("summary"));if("deleteByDrag"===t.inputType){const t=Y(e.dom.select("details"),n);V(t,(t=>{ar(t.firstChild)&&t.firstChild.remove();const n=e.dom.create("summary");n.appendChild(Tr().dom),t.prepend(n)}))}}))})(e)})(e,t),fA(e,o,n)}))},_A=ar,SA=er,kA=e=>dr(e.dom),NA=e=>t=>_n(yn(e),t),RA=(e,t)=>Jn(yn(e),kA,NA(t)),AA=(e,t,n)=>{const o=new jo(e,t),r=n?o.next.bind(o):o.prev.bind(o);let s=e;for(let t=n?e:r();t&&!_A(t);t=r())ts(t)&&(s=t);return s},TA=e=>{const t=((e,t,n)=>{const o=Vi.fromRangeStart(e).getNode(),r=((e,t,n)=>Jn(yn(e),(e=>(e=>lr(e.dom))(e)||n.isBlock(Ht(e))),NA(t)).getOr(yn(t)).dom)(o,t,n),s=AA(o,r,!1),a=AA(o,r,!0),i=document.createRange();return RA(s,r).fold((()=>{SA(s)?i.setStart(s,0):i.setStartBefore(s)}),(e=>i.setStartBefore(e.dom))),RA(a,r).fold((()=>{SA(a)?i.setEnd(a,a.data.length):i.setEndAfter(a)}),(e=>i.setEndAfter(e.dom))),i})(e.selection.getRng(),e.getBody(),e.schema);e.selection.setRng(Eb(t))};var OA;!function(e){e.Before="before",e.After="after"}(OA||(OA={}));const BA=(e,t)=>Math.abs(e.left-t),PA=(e,t)=>Math.abs(e.right-t),DA=(e,t)=>(e=>X(e,((e,t)=>e.fold((()=>I.some(t)),(e=>{const n=Math.min(t.left,e.left),o=Math.min(t.top,e.top),r=Math.max(t.right,e.right),s=Math.max(t.bottom,e.bottom);return I.some({top:o,right:r,bottom:s,left:n,width:r-n,height:s-o})}))),I.none()))(Y(e,(e=>{return(n=t)>=(o=e).top&&n<=o.bottom;var n,o}))).fold((()=>[[],e]),(t=>{const{pass:n,fail:o}=K(e,(e=>((e,t)=>{const n=((e,t)=>Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top)))(e,t)/Math.min(e.height,t.height);return((e,t)=>e.topt.top)(e,t)&&n>.5})(e,t)));return[n,o]})),LA=(e,t,n)=>t>e.left&&t{const r=e=>ts(e.node)?I.some(e):qo(e.node)?MA(ce(e.node.childNodes),t,n,!1):I.none(),s=(e,s)=>{const a=ae(e,((e,o)=>s(e,t,n)-s(o,t,n)));return ue(a,r).map((e=>o&&!er(e.node)&&a.length>1?((e,o,s)=>r(o).filter((o=>Math.abs(s(e,t,n)-s(o,t,n))<2&&er(o.node))))(e,a[1],s).getOr(e):e))},[a,i]=DA(zE(e),n),{pass:l,fail:d}=K(i,(e=>e.tops(d,Ei))).orThunk((()=>s(l,Ei)))},IA=(e,t,n)=>((e,t,n)=>{const o=yn(e),r=Nn(o),s=Cn(r,t,n).filter((e=>Sn(o,e))).getOr(o);return((e,t,n,o)=>{const r=(t,s)=>{const a=Y(t.dom.childNodes,O((e=>qo(e)&&e.classList.contains("mce-drag-container"))));return s.fold((()=>MA(a,n,o,!0)),(e=>{const t=Y(a,(t=>t!==e.dom));return MA(t,n,o,!0)})).orThunk((()=>(_n(t,e)?I.none():Tn(t)).bind((e=>r(e,I.some(t))))))};return r(t,I.none())})(o,s,t,n)})(e,t,n).filter((e=>Mc(e.node))).map((e=>((e,t)=>({node:e.node,position:BA(e,t){var t,n;const o=e.getBoundingClientRect(),r=e.ownerDocument,s=r.documentElement,a=r.defaultView;return{top:o.top+(null!==(t=null==a?void 0:a.scrollY)&&void 0!==t?t:0)-s.clientTop,left:o.left+(null!==(n=null==a?void 0:a.scrollX)&&void 0!==n?n:0)-s.clientLeft}},UA=e=>({target:e,srcElement:e}),zA=(e,t,n,o)=>{const r=((e,t)=>{const n=(e=>{const t=UR(),n=(e=>{const t=e;return I.from(t[RR])})(e);return BR(e),_R(t),t.dropEffect=e.dropEffect,t.effectAllowed=e.effectAllowed,(e=>{const t=e;return I.from(t[wR])})(e).each((e=>t.setDragImage(e.image,e.x,e.y))),V(e.types,(n=>{"Files"!==n&&t.setData(n,e.getData(n))})),V(e.files,(e=>t.items.add(e))),(e=>{const t=e;return I.from(t[xR])})(e).each((e=>{((e,t)=>{ER(t)(e)})(t,e)})),n.each((n=>{TR(e,n),TR(t,n)})),t})(e);return"dragstart"===t?(_R(n),OR(n)):"drop"===t?(SR(n),BR(n)):(kR(n),PR(n)),n})(n,e);return v(o)?((e,t,n)=>{const o=B("Function not supported on simulated event.");return{bubbles:!0,cancelBubble:!1,cancelable:!0,composed:!1,currentTarget:null,defaultPrevented:!1,eventPhase:0,isTrusted:!0,returnValue:!1,timeStamp:0,type:e,composedPath:o,initEvent:o,preventDefault:_,stopImmediatePropagation:_,stopPropagation:_,AT_TARGET:window.Event.AT_TARGET,BUBBLING_PHASE:window.Event.BUBBLING_PHASE,CAPTURING_PHASE:window.Event.CAPTURING_PHASE,NONE:window.Event.NONE,altKey:!1,button:0,buttons:0,clientX:0,clientY:0,ctrlKey:!1,metaKey:!1,movementX:0,movementY:0,offsetX:0,offsetY:0,pageX:0,pageY:0,relatedTarget:null,screenX:0,screenY:0,shiftKey:!1,x:0,y:0,detail:0,view:null,which:0,initUIEvent:o,initMouseEvent:o,getModifierState:o,dataTransfer:n,...UA(t)}})(e,t,r):((e,t,n,o)=>({...t,dataTransfer:o,type:e,...UA(n)}))(e,o,t,r)},jA=dr,HA=((...e)=>t=>{for(let n=0;n{const r=e.dom,s=t.cloneNode(!0);r.setStyles(s,{width:n,height:o}),r.setAttrib(s,"data-mce-selected",null);const a=r.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return r.setStyles(a,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:o}),r.setStyles(s,{margin:0,boxSizing:"border-box"}),a.appendChild(s),a},qA=(e,t)=>n=>()=>{const o="left"===e?n.scrollX:n.scrollY;n.scroll({[e]:o+t,behavior:"smooth"})},VA=qA("left",-32),WA=qA("left",32),KA=qA("top",-32),YA=qA("top",32),GA=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},XA=(e,t,n,o,r)=>{"dragstart"===t&&zR(o,e.dom.getOuterHTML(n));const s=zA(t,n,o,r);return e.dispatch(t,s)},QA=(e,t)=>{const n=Qa(((e,n)=>((e,t,n)=>{e._selectionOverrides.hideFakeCaret(),IA(e.getBody(),t,n).fold((()=>e.selection.placeCaretAt(t,n)),(o=>{const r=e._selectionOverrides.showCaret(1,o.node,o.position===OA.Before,!1);r?e.selection.setRng(r):e.selection.placeCaretAt(t,n)}))})(t,e,n)),0);t.on("remove",n.cancel);const o=e;return r=>e.on((e=>{const s=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(!e.dragging&&s>10){const n=XA(t,"dragstart",e.element,e.dataTransfer,r);if(C(n.dataTransfer)&&(e.dataTransfer=n.dataTransfer),n.isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){const s=r.currentTarget===t.getDoc().documentElement,l=((e,t)=>({pageX:t.pageX-e.relX,pageY:t.pageY+5}))(e,((e,t)=>{return n=(e=>e.inline?FA(e.getBody()):{left:0,top:0})(e),o=(e=>{const t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}})(e),r=((e,t)=>{if(t.target.ownerDocument!==e.getDoc()){const n=FA(e.getContentAreaContainer()),o=(e=>{const t=e.getBody(),n=e.getDoc().documentElement,o={left:t.scrollLeft,top:t.scrollTop},r={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?o:r})(e);return{left:t.pageX-n.left+o.left,top:t.pageY-n.top+o.top}}return{left:t.pageX,top:t.pageY}})(e,t),{pageX:r.left-n.left+o.left,pageY:r.top-n.top+o.top};var n,o,r})(t,r));a=e.ghost,i=t.getBody(),a.parentNode!==i&&i.appendChild(a),((e,t,n,o,r,s,a,i,l,d,c,u)=>{let m=0,f=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>r&&(m=t.pageX+n-r),t.pageY+o>s&&(f=t.pageY+o-s),e.style.width=n-m+"px",e.style.height=o-f+"px";const g=l.clientHeight,p=l.clientWidth,h=a+l.getBoundingClientRect().top,b=i+l.getBoundingClientRect().left;c.on((e=>{e.intervalId.clear(),e.dragging&&u&&(a+8>=g?e.intervalId.set(YA(d)):a-8<=0?e.intervalId.set(KA(d)):i+8>=p?e.intervalId.set(WA(d)):i-8<=0?e.intervalId.set(VA(d)):h+16>=window.innerHeight?e.intervalId.set(YA(window)):h-16<=0?e.intervalId.set(KA(window)):b+16>=window.innerWidth?e.intervalId.set(WA(window)):b-16<=0&&e.intervalId.set(VA(window)))}))})(e.ghost,l,e.width,e.height,e.maxX,e.maxY,r.clientY,r.clientX,t.getContentAreaContainer(),t.getWin(),o,s),n.throttle(r.clientX,r.clientY)}var a,i}))},JA=(e,t,n)=>{e.on((e=>{e.intervalId.clear(),e.dragging&&n.fold((()=>XA(t,"dragend",e.element,e.dataTransfer)),(n=>XA(t,"dragend",e.element,e.dataTransfer,n)))})),ZA(e)},ZA=e=>{e.on((e=>{e.intervalId.clear(),GA(e.ghost)})),e.clear()},eT=e=>{const t=Xa(),n=za.DOM,o=document,r=((e,t)=>n=>{if((e=>0===e.button)(n)){const o=J(t.dom.getParents(n.target),HA).getOr(null);if(C(o)&&((e,t,n)=>jA(n)&&n!==t&&e.isEditable(n.parentElement))(t.dom,t.getBody(),o)){const r=t.dom.getPos(o),s=t.getBody(),a=t.getDoc().documentElement;e.set({element:o,dataTransfer:UR(),dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(t.inline?s.scrollWidth:a.offsetWidth)-2,maxY:(t.inline?s.scrollHeight:a.offsetHeight)-2,relX:n.pageX-r.x,relY:n.pageY-r.y,width:o.offsetWidth,height:o.offsetHeight,ghost:$A(t,o,o.offsetWidth,o.offsetHeight),intervalId:Ga(100)})}}})(t,e),s=QA(t,e),a=((e,t)=>n=>{e.on((e=>{var o;if(e.intervalId.clear(),e.dragging){if(((e,t,n)=>!y(t)&&t!==n&&!e.dom.isChildOf(t,n)&&e.dom.isEditable(t))(t,(e=>{const t=e.getSel();if(C(t)){const e=t.getRangeAt(0).startContainer;return er(e)?e.parentNode:e}return null})(t.selection),e.element)){const r=null!==(o=t.getDoc().elementFromPoint(n.clientX,n.clientY))&&void 0!==o?o:t.getBody();XA(t,"drop",r,e.dataTransfer,n).isDefaultPrevented()||t.undoManager.transact((()=>{((e,t)=>{const n=e.getParent(t.parentNode,e.isBlock);GA(t),n&&n!==e.getRoot()&&e.isEmpty(n)&&Or(yn(n))})(t.dom,e.element),(e=>{const t=e.getData("text/html");return""===t?I.none():I.some(t)})(e.dataTransfer).each((e=>t.insertContent(e))),t._selectionOverrides.hideFakeCaret()}))}XA(t,"dragend",t.getBody(),e.dataTransfer,n)}})),ZA(e)})(t,e),i=((e,t)=>n=>JA(e,t,I.some(n)))(t,e);e.on("mousedown",r),e.on("mousemove",s),e.on("mouseup",a),n.bind(o,"mousemove",s),n.bind(o,"mouseup",i),e.on("remove",(()=>{n.unbind(o,"mousemove",s),n.unbind(o,"mouseup",i)})),e.on("keydown",(n=>{n.keyCode===af.ESC&&JA(t,e,I.none())}))},tT=dr,nT=(e,t)=>lb(e.getBody(),t),oT=e=>{const t=e.selection,n=e.dom,o=e.getBody(),r=Pc(e,o,n.isBlock,(()=>Rg(e))),s="sel-"+n.uniqueId(),a="data-mce-selected";let i;const l=e=>e!==o&&(tT(e)||mr(e))&&n.isChildOf(e,o)&&n.isEditable(e.parentNode),d=(n,o,s,a=!0)=>e.dispatch("ShowCaret",{target:o,direction:n,before:s}).isDefaultPrevented()?null:(a&&t.scrollIntoView(o,-1===n),r.show(s,o)),c=e=>Ur(e)||$r(e)||qr(e),u=e=>c(e.startContainer)||c(e.endContainer),m=t=>{const o=e.schema.getVoidElements(),r=n.createRng(),s=t.startContainer,a=t.startOffset,i=t.endContainer,l=t.endOffset;return Ee(o,s.nodeName.toLowerCase())?0===a?r.setStartBefore(s):r.setStartAfter(s):r.setStart(s,a),Ee(o,i.nodeName.toLowerCase())?0===l?r.setEndBefore(i):r.setEndAfter(i):r.setEnd(i,l),r},f=(r,c)=>{if(!r)return null;if(r.collapsed){if(!u(r)){const e=c?1:-1,t=au(e,o,r),s=t.getNode(!c);if(C(s)){if(Mc(s))return d(e,s,!!c&&!t.isAtEnd(),!1);if(Fr(s)&&dr(s.nextSibling)){const e=n.createRng();return e.setStart(s,0),e.setEnd(s,0),e}}const a=t.getNode(c);if(C(a)){if(Mc(a))return d(e,a,!c&&!t.isAtEnd(),!1);if(Fr(a)&&dr(a.previousSibling)){const e=n.createRng();return e.setStart(a,1),e.setEnd(a,1),e}}}return null}let m=r.startContainer,f=r.startOffset;const g=r.endOffset;if(er(m)&&0===f&&tT(m.parentNode)&&(m=m.parentNode,f=n.nodeIndex(m),m=m.parentNode),!qo(m))return null;if(g===f+1&&m===r.endContainer){const o=m.childNodes[f];if(l(o))return(o=>{const r=o.cloneNode(!0),l=e.dispatch("ObjectSelected",{target:o,targetClone:r});if(l.isDefaultPrevented())return null;const d=((o,r)=>{const a=yn(e.getBody()),i=e.getDoc(),l=to(a,"#"+s).getOrThunk((()=>{const e=hn('
    ',i);return Jt(e,"id",s),vo(a,e),e})),d=n.createRng();wo(l),Co(l,[vn(br,i),yn(r),vn(br,i)]),d.setStart(l.dom.firstChild,1),d.setEnd(l.dom.lastChild,0),lo(l,{top:n.getPos(o,e.getBody()).y+"px"}),ag(l);const c=t.getSel();return c&&(c.removeAllRanges(),c.addRange(d)),d})(o,l.targetClone),c=yn(o);return V(Uo(yn(e.getBody()),`*[${a}]`),(e=>{_n(c,e)||on(e,a)})),n.getAttrib(o,a)||o.setAttribute(a,"1"),i=o,p(),d})(o)}return null},g=()=>{i&&i.removeAttribute(a),to(yn(e.getBody()),"#"+s).each(xo),i=null},p=()=>{r.hide()};return ZC(e)||(e.on("click",(t=>{n.isEditable(t.target)||(t.preventDefault(),e.focus())})),e.on("blur NewBlock",g),e.on("ResizeWindow FullscreenStateChanged",r.reposition),e.on("tap",(t=>{const n=t.target,o=nT(e,n);tT(o)?(t.preventDefault(),Ax(e,o).each(f)):l(n)&&Ax(e,n).each(f)}),!0),e.on("mousedown",(r=>{const s=r.target;if(s!==o&&"HTML"!==s.nodeName&&!n.isChildOf(s,o))return;if(!((e,t,n)=>{const o=yn(e.getBody()),r=e.inline?o:yn(Nn(o).dom.documentElement),s=((e,t,n,o)=>{const r=(e=>e.dom.getBoundingClientRect())(t);return{x:n-(e?r.left+t.dom.clientLeft+Bw(t):0),y:o-(e?r.top+t.dom.clientTop+Ow(t):0)}})(e.inline,r,t,n);return((e,t,n)=>{const o=Aw(e),r=Tw(e);return t>=0&&n>=0&&t<=o&&n<=r})(r,s.x,s.y)})(e,r.clientX,r.clientY))return;g(),p();const a=nT(e,s);tT(a)?(r.preventDefault(),Ax(e,a).each(f)):IA(o,r.clientX,r.clientY).each((n=>{var o;r.preventDefault(),(o=d(1,n.node,n.position===OA.Before,!1))&&t.setRng(o),Vo(a)?a.focus():e.getBody().focus()}))})),e.on("keypress",(e=>{af.modifierPressed(e)||tT(t.getNode())&&e.preventDefault()})),e.on("GetSelectionRange",(e=>{let t=e.range;if(i){if(!i.parentNode)return void(i=null);t=t.cloneRange(),t.selectNode(i),e.range=t}})),e.on("SetSelectionRange",(e=>{e.range=m(e.range);const t=f(e.range,e.forward);t&&(e.range=t)})),e.on("AfterSetSelectionRange",(e=>{const t=e.range,o=t.startContainer.parentElement;var r;u(t)||qo(r=o)&&"mcepastebin"===r.id||p(),(e=>C(e)&&n.hasClass(e,"mce-offscreen-selection"))(o)||g()})),(e=>{eT(e),Id(e)&&(e=>{const t=t=>{if(!t.isDefaultPrevented()){const n=t.dataTransfer;n&&(H(n.types,"Files")||n.files.length>0)&&(t.preventDefault(),"drop"===t.type&&Fw(e,"Dropped file type is not supported"))}},n=n=>{xg(e,n.target)&&t(n)},o=()=>{const o=za.DOM,r=e.dom,s=document,a=e.inline?e.getBody():e.getDoc(),i=["drop","dragover"];V(i,(e=>{o.bind(s,e,n),r.bind(a,e,t)})),e.on("remove",(()=>{V(i,(e=>{o.unbind(s,e,n),r.unbind(a,e,t)}))}))};e.on("init",(()=>{vg.setEditorTimeout(e,o,0)}))})(e)})(e),(e=>{const t=Qa((()=>{if(!e.removed&&e.getBody().contains(document.activeElement)){const t=e.selection.getRng();if(t.collapsed){const n=Tx(e,t,!1);e.selection.setRng(n)}}}),0);e.on("focus",(()=>{t.throttle()})),e.on("blur",(()=>{t.cancel()}))})(e),(e=>{e.on("init",(()=>{e.on("focusin",(t=>{const n=t.target;if(mr(n)){const t=lb(e.getBody(),n),o=dr(t)?t:n;e.selection.getNode()!==o&&Ax(e,o).each((t=>e.selection.setRng(t)))}}))}))})(e)),{showCaret:d,showBlockCaretContainer:e=>{e.hasAttribute("data-mce-caret")&&(Vr(e),t.scrollIntoView(e))},hideFakeCaret:p,destroy:()=>{r.destroy(),i=null}}},rT=(e,t)=>{let n=t;for(let t=e.previousSibling;er(t);t=t.previousSibling)n+=t.data.length;return n},sT=(e,t,n,o,r)=>{if(er(n)&&(o<0||o>n.data.length))return[];const s=r&&er(n)?[rT(n,o)]:[o];let a=n;for(;a!==t&&a.parentNode;)s.push(e.nodeIndex(a,r)),a=a.parentNode;return a===t?s.reverse():[]},aT=(e,t,n,o,r,s,a=!1)=>({start:sT(e,t,n,o,a),end:sT(e,t,r,s,a)}),iT=(e,t)=>{const n=t.slice(),o=n.pop();return x(o)?X(n,((e,t)=>e.bind((e=>I.from(e.childNodes[t])))),I.some(e)).bind((e=>er(e)&&(o<0||o>e.data.length)?I.none():I.some({node:e,offset:o}))):I.none()},lT=(e,t)=>iT(e,t.start).bind((({node:n,offset:o})=>iT(e,t.end).map((({node:e,offset:t})=>{const r=document.createRange();return r.setStart(n,o),r.setEnd(e,t),r})))),dT=(e,t,n)=>{if(t&&e.isEmpty(t)&&!n(t)){const o=t.parentNode;e.remove(t,er(t.firstChild)&&ss(t.firstChild.data)),dT(e,o,n)}},cT=(e,t,n,o=!0)=>{const r=t.startContainer.parentNode,s=t.endContainer.parentNode;t.deleteContents(),o&&!n(t.startContainer)&&(er(t.startContainer)&&0===t.startContainer.data.length&&e.remove(t.startContainer),er(t.endContainer)&&0===t.endContainer.data.length&&e.remove(t.endContainer),dT(e,r,n),r!==s&&dT(e,s,n))},uT=(e,t)=>I.from(e.dom.getParent(t.startContainer,e.dom.isBlock)),mT=(e,t,n)=>{const o=e.dynamicPatternsLookup({text:n,block:t});return{...e,blockPatterns:Cl(o).concat(e.blockPatterns),inlinePatterns:wl(o).concat(e.inlinePatterns)}},fT=(e,t,n,o)=>{const r=e.createRng();return r.setStart(t,0),r.setEnd(n,o),r.toString()},gT=(e,t,n)=>{((e,t,n)=>{if(er(e)&&0>=e.length)return I.some(PS(e,0));{const t=hi(DS);return I.from(t.forwards(e,0,LS(e),n)).map((e=>PS(e.container,0)))}})(t,0,t).each((o=>{const r=o.container;FS(r,n.start.length,t).each((n=>{const o=e.createRng();o.setStart(r,0),o.setEnd(n.container,n.offset),cT(e,o,(e=>e===t))}));const s=yn(r),a=Cr(s);/^\s[^\s]/.test(a)&&((e,t)=>{yr.set(e,t)})(s,a.slice(1))}))},pT=(e,t)=>e.create("span",{"data-mce-type":"bookmark",id:t}),hT=(e,t)=>{const n=e.createRng();return n.setStartAfter(t.start),n.setEndBefore(t.end),n},bT=(e,t,n)=>{const o=lT(e.getRoot(),n).getOrDie("Unable to resolve path range"),r=o.startContainer,s=o.endContainer,a=0===o.endOffset?s:s.splitText(o.endOffset),i=0===o.startOffset?r:r.splitText(o.startOffset),l=i.parentNode;return{prefix:t,end:a.parentNode.insertBefore(pT(e,t+"-end"),a),start:l.insertBefore(pT(e,t+"-start"),i)}},vT=(e,t,n)=>{dT(e,e.get(t.prefix+"-end"),n),dT(e,e.get(t.prefix+"-start"),n)},yT=e=>0===e.start.length,CT=(e,t,n,o)=>{const r=t.start;var s;return US(e,o.container,o.offset,(s=r,(e,t)=>{const n=e.data.substring(0,t),o=n.lastIndexOf(s.charAt(s.length-1)),r=n.lastIndexOf(s);return-1!==r?r+s.length:-1!==o?o+1:-1}),n).bind((o=>{var s,a;const i=null!==(a=null===(s=n.textContent)||void 0===s?void 0:s.indexOf(r))&&void 0!==a?a:-1;if(-1!==i&&o.offset>=i+r.length){const t=e.createRng();return t.setStart(o.container,o.offset-r.length),t.setEnd(o.container,o.offset),I.some(t)}{const s=o.offset-r.length;return IS(o.container,s,n).map((t=>{const n=e.createRng();return n.setStart(t.container,t.offset),n.setEnd(o.container,o.offset),n})).filter((e=>e.toString()===r)).orThunk((()=>CT(e,t,n,PS(o.container,0))))}}))},wT=(e,t,n,o)=>{const r=e.dom,s=r.getRoot(),a=n.pattern,i=n.position.container,l=n.position.offset;return IS(i,l-n.pattern.end.length,t).bind((d=>{const c=aT(r,s,d.container,d.offset,i,l,o);if(yT(a))return I.some({matches:[{pattern:a,startRng:c,endRng:c}],position:d});{const i=xT(e,n.remainingPatterns,d.container,d.offset,t,o),l=i.getOr({matches:[],position:d}),u=l.position,m=((e,t,n,o,r,s=!1)=>{if(0===t.start.length&&!s){const t=e.createRng();return t.setStart(n,o),t.setEnd(n,o),I.some(t)}return MS(n,o,r).bind((n=>CT(e,t,r,n).bind((e=>{var t;if(s){if(e.endContainer===n.container&&e.endOffset===n.offset)return I.none();if(0===n.offset&&(null===(t=e.endContainer.textContent)||void 0===t?void 0:t.length)===e.endOffset)return I.none()}return I.some(e)}))))})(r,a,u.container,u.offset,t,i.isNone());return m.map((e=>{const t=((e,t,n,o=!1)=>aT(e,t,n.startContainer,n.startOffset,n.endContainer,n.endOffset,o))(r,s,e,o);return{matches:l.matches.concat([{pattern:a,startRng:t,endRng:c}]),position:PS(e.startContainer,e.startOffset)}}))}}))},xT=(e,t,n,o,r,s)=>{const a=e.dom;return MS(n,o,a.getRoot()).bind((i=>{const l=fT(a,r,n,o);for(let a=0;a0)return xT(e,t,n,o-1,r,s);if(u.isSome())return u}return I.none()}))},ET=(e,t,n)=>{e.selection.setRng(n),"inline-format"===t.type?V(t.format,(t=>{e.formatter.apply(t)})):e.execCommand(t.cmd,!1,t.value)},_T=(e,t,n,o,r,s)=>{var a;return((e,t)=>{const n=ne(e,(e=>$(t,(t=>e.pattern.start===t.pattern.start&&e.pattern.end===t.pattern.end))));return e.length===t.length?n?e:t:e.length>t.length?e:t})(xT(e,r.inlinePatterns,n,o,t,s).fold((()=>[]),(e=>e.matches)),xT(e,(a=r.inlinePatterns,ae(a,((e,t)=>t.end.length-e.end.length))),n,o,t,s).fold((()=>[]),(e=>e.matches)))},ST=(e,t)=>{if(0===t.length)return;const n=e.dom,o=e.selection.getBookmark(),r=((e,t)=>{const n=ui("mce_textpattern"),o=G(t,((t,o)=>{const r=bT(e,n+`_end${t.length}`,o.endRng);return t.concat([{...o,endMarker:r}])}),[]);return G(o,((t,r)=>{const s=o.length-t.length-1,a=yT(r.pattern)?r.endMarker:bT(e,n+`_start${s}`,r.startRng);return t.concat([{...r,startMarker:a}])}),[])})(n,t);V(r,(t=>{const o=n.getParent(t.startMarker.start,n.isBlock),r=e=>e===o;yT(t.pattern)?((e,t,n,o)=>{const r=hT(e.dom,n);cT(e.dom,r,o),ET(e,t,r)})(e,t.pattern,t.endMarker,r):((e,t,n,o,r)=>{const s=e.dom,a=hT(s,o),i=hT(s,n);cT(s,i,r),cT(s,a,r);const l={prefix:n.prefix,start:n.end,end:o.start},d=hT(s,l);ET(e,t,d)})(e,t.pattern,t.startMarker,t.endMarker,r),vT(n,t.endMarker,r),vT(n,t.startMarker,r)})),e.selection.moveToBookmark(o)},kT=(e,t)=>{const n=e.selection.getRng();return uT(e,n).map((o=>{var r;const s=Math.max(0,n.startOffset),a=mT(t,o,null!==(r=o.textContent)&&void 0!==r?r:""),i=_T(e,o,n.startContainer,s,a,!0),l=((e,t,n,o)=>{var r;const s=e.dom,a=Il(e);if(!s.is(t,a))return[];const i=null!==(r=t.textContent)&&void 0!==r?r:"";return((e,t)=>{const n=(e=>ae(e,((e,t)=>t.start.length-e.start.length)))(e),o=t.replace(br," ");return J(n,(e=>0===t.indexOf(e.start)||0===o.indexOf(e.start)))})(n.blockPatterns,i).map((e=>Pt.trim(i).length===e.start.length?[]:[{pattern:e,range:aT(s,s.getRoot(),t,0,t,0,true)}])).getOr([])})(e,o,a);return(l.length>0||i.length>0)&&(e.undoManager.add(),e.undoManager.extra((()=>{e.execCommand("mceInsertNewLine")}),(()=>{(e=>{e.insertContent(Br,{preserve_zwsp:!0})})(e),ST(e,i),((e,t)=>{if(0===t.length)return;const n=e.selection.getBookmark();V(t,(t=>((e,t)=>{const n=e.dom,o=t.pattern,r=lT(n.getRoot(),t.range).getOrDie("Unable to resolve path range");return uT(e,r).each((t=>{"block-format"===o.type?((e,t)=>{const n=t.get(e);return p(n)&&le(n).exists((e=>Ee(e,"block")))})(o.format,e.formatter)&&e.undoManager.transact((()=>{gT(e.dom,t,o),e.formatter.apply(o.format)})):"block-command"===o.type&&e.undoManager.transact((()=>{gT(e.dom,t,o),e.execCommand(o.cmd,!1,o.value)}))})),!0})(e,t))),e.selection.moveToBookmark(n)})(e,l);const t=e.selection.getRng(),n=MS(t.startContainer,t.startOffset,e.dom.getRoot());e.execCommand("mceInsertNewLine"),n.each((t=>{const n=t.container;n.data.charAt(t.offset-1)===hr&&(n.deleteData(t.offset-1,1),dT(e.dom,n.parentNode,(t=>t===e.dom.getRoot())))}))})),!0)})).getOr(!1)},NT=(e,t,n)=>{for(let o=0;o{const t=Pt.each,n=af.BACKSPACE,o=af.DELETE,r=e.dom,s=e.selection,a=e.parser,i=At.browser,l=i.isFirefox(),d=i.isChromium()||i.isSafari(),c=At.deviceType.isiPhone()||At.deviceType.isiPad(),u=At.os.isMacOS()||At.os.isiOS(),f=(t,n)=>{try{e.getDoc().execCommand(t,!1,String(n))}catch(e){}},g=e=>e.isDefaultPrevented(),p=()=>{e.shortcuts.add("meta+a",null,"SelectAll")},h=()=>{e.inline||r.bind(e.getDoc(),"mousedown mouseup",(t=>{let n;if(t.target===e.getDoc().documentElement)if(n=s.getRng(),e.getBody().focus(),"mousedown"===t.type){if(Ur(n.startContainer))return;s.placeCaretAt(t.clientX,t.clientY)}else s.setRng(n)}))},b=()=>{Range.prototype.getClientRects||e.on("mousedown",(t=>{if(!g(t)&&"HTML"===t.target.nodeName){const t=e.getBody();t.blur(),vg.setEditorTimeout(e,(()=>{t.focus()}))}}))},v=()=>{const t=zd(e);e.on("click",(n=>{const o=n.target;/^(IMG|HR)$/.test(o.nodeName)&&r.isEditable(o)&&(n.preventDefault(),e.selection.select(o),e.nodeChanged()),"A"===o.nodeName&&r.hasClass(o,t)&&0===o.childNodes.length&&r.isEditable(o.parentNode)&&(n.preventDefault(),s.select(o))}))},y=()=>{e.on("keydown",(e=>{if(!g(e)&&e.keyCode===n&&s.isCollapsed()&&0===s.getRng().startOffset){const t=s.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}return!0}))},C=()=>{Bd(e)||e.on("BeforeExecCommand mousedown",(()=>{f("StyleWithCSS",!1),f("enableInlineTableEditing",!1),cd(e)||f("enableObjectResizing",!1)}))},w=()=>{e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},x=()=>{e.inline||e.on("keydown",(()=>{document.activeElement===document.body&&e.getWin().focus()}))},E=()=>{e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",(t=>{let n;"HTML"===t.target.nodeName&&(n=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(n),e.selection.normalize(),e.nodeChanged())})))},S=()=>{u&&e.on("keydown",(t=>{!af.metaKeyPressed(t)||t.shiftKey||37!==t.keyCode&&39!==t.keyCode||(t.preventDefault(),e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary"))}))},k=()=>{e.on("click",(e=>{let t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)})),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},N=()=>{e.on("init",(()=>{e.dom.bind(e.getBody(),"submit",(e=>{e.preventDefault()}))}))},R=_;return ZC(e)?(d&&(h(),v(),N(),p(),c&&(x(),E(),k())),l&&(b(),C(),w(),S())):(e.on("keydown",(t=>{if(g(t)||t.keyCode!==af.BACKSPACE)return;let n=s.getRng();const o=n.startContainer,a=n.startOffset,i=r.getRoot();let l=o;if(n.collapsed&&0===a){for(;l.parentNode&&l.parentNode.firstChild===l&&l.parentNode!==i;)l=l.parentNode;"BLOCKQUOTE"===l.nodeName&&(e.formatter.toggle("blockquote",void 0,l),n=r.createRng(),n.setStart(o,0),n.setEnd(o,0),s.setRng(n))}})),(()=>{const t=e=>{const t=r.create("body"),n=e.cloneContents();return t.appendChild(n),s.serializer.serialize(t,{format:"html"})};e.on("keydown",(s=>{const a=s.keyCode;if(!g(s)&&(a===o||a===n)&&e.selection.isEditable()){const n=e.selection.isCollapsed(),o=e.getBody();if(n&&!gs(yn(o)))return;if(!n&&!(n=>{const o=t(n),s=r.createRng();return s.selectNode(e.getBody()),o===t(s)})(e.selection.getRng()))return;s.preventDefault(),e.setContent(""),o.firstChild&&r.isBlock(o.firstChild)?e.selection.setCursorLocation(o.firstChild,0):e.selection.setCursorLocation(o,0),e.nodeChanged()}}))})(),At.windowsPhone||e.on("keyup focusin mouseup",(t=>{af.modifierPressed(t)||(e=>{const t=e.getBody(),n=e.selection.getRng();return n.startContainer===n.endContainer&&n.startContainer===t&&0===n.startOffset&&n.endOffset===t.childNodes.length})(e)||s.normalize()}),!0),d&&(h(),v(),e.on("init",(()=>{f("DefaultParagraphSeparator",Il(e))})),N(),y(),a.addNodeFilter("br",(e=>{let t=e.length;for(;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()})),c?(x(),E(),k()):p()),l&&(e.on("keydown",(t=>{if(!g(t)&&t.keyCode===n){if(!e.getBody().getElementsByTagName("hr").length)return;if(s.isCollapsed()&&0===s.getRng().startOffset){const e=s.getNode(),n=e.previousSibling;if("HR"===e.nodeName)return r.remove(e),void t.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(r.remove(n),t.preventDefault())}}})),b(),(()=>{const n=()=>{const n=r.getAttribs(s.getStart().cloneNode(!1));return()=>{const o=s.getStart();o!==e.getBody()&&(r.setAttrib(o,"style",null),t(n,(e=>{o.setAttributeNode(e.cloneNode(!0))})))}},o=()=>!s.isCollapsed()&&r.getParent(s.getStart(),r.isBlock)!==r.getParent(s.getEnd(),r.isBlock);e.on("keypress",(t=>{let r;return!(!(g(t)||8!==t.keyCode&&46!==t.keyCode)&&o()&&(r=n(),e.getDoc().execCommand("delete",!1),r(),t.preventDefault(),1))})),r.bind(e.getDoc(),"cut",(t=>{if(!g(t)&&o()){const t=n();vg.setEditorTimeout(e,(()=>{t()}))}}))})(),C(),e.on("SetContent ExecCommand",(e=>{"setcontent"!==e.type&&"mceInsertLink"!==e.command||t(r.select("a:not([data-mce-block])"),(e=>{var t;let n=e.parentNode;const o=r.getRoot();if((null==n?void 0:n.lastChild)===e){for(;n&&!r.isBlock(n);){if((null===(t=n.parentNode)||void 0===t?void 0:t.lastChild)!==n||n===o)return;n=n.parentNode}r.add(n,"br",{"data-mce-bogus":1})}}))})),w(),S(),y(),e.on("drop",(t=>{var n;const o=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/html");m(o)&&/^]*>$/.test(o)&&e.dispatch("dragend",new window.DragEvent("dragend",t))})))),{refreshContentEditable:R,isHidden:()=>{if(!l||e.removed)return!1;const t=e.selection.getSel();return!t||!t.rangeCount||0===t.rangeCount}}},AT=za.DOM,TT=e=>e.inline?e.getElement().nodeName.toLowerCase():void 0,OT=e=>ye(e,(e=>!1===v(e))),BT=e=>{const t=e.options.get,n=e.editorUpload.blobCache;return OT({allow_conditional_comments:t("allow_conditional_comments"),allow_html_data_urls:t("allow_html_data_urls"),allow_svg_data_urls:t("allow_svg_data_urls"),allow_html_in_named_anchor:t("allow_html_in_named_anchor"),allow_script_urls:t("allow_script_urls"),allow_unsafe_link_target:t("allow_unsafe_link_target"),convert_unsafe_embeds:t("convert_unsafe_embeds"),convert_fonts_to_spans:t("convert_fonts_to_spans"),fix_list_elements:t("fix_list_elements"),font_size_legacy_values:t("font_size_legacy_values"),forced_root_block:t("forced_root_block"),forced_root_block_attrs:t("forced_root_block_attrs"),preserve_cdata:t("preserve_cdata"),inline_styles:t("inline_styles"),root_name:TT(e),sandbox_iframes:t("sandbox_iframes"),sanitize:t("xss_sanitization"),validate:!0,blob_cache:n,document:e.getDoc()})},PT=e=>{const t=e.options.get;return OT({custom_elements:t("custom_elements"),extended_valid_elements:t("extended_valid_elements"),invalid_elements:t("invalid_elements"),invalid_styles:t("invalid_styles"),schema:t("schema"),valid_children:t("valid_children"),valid_classes:t("valid_classes"),valid_elements:t("valid_elements"),valid_styles:t("valid_styles"),verify_html:t("verify_html"),padd_empty_block_inline_children:t("format_empty_lines")})},DT=e=>e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader,LT=e=>{const t=DT(e),n=id(e),o=e.contentCSS,r=()=>{t.unloadAll(o),e.inline||e.ui.styleSheetLoader.unloadAll(n)},s=()=>{e.removed?r():e.on("remove",r)};if(e.contentStyles.length>0){let t="";Pt.each(e.contentStyles,(e=>{t+=e+"\r\n"})),e.dom.addStyle(t)}const a=Promise.all(((e,t,n)=>{const{pass:o,fail:r}=K(t,(e=>tinymce.Resource.has(Hw(e)))),s=o.map((t=>{const n=tinymce.Resource.get(Hw(t));return m(n)?Promise.resolve(DT(e).loadRawCss(t,n)):Promise.resolve()})),a=[...s,DT(e).loadAll(r)];return e.inline?a:a.concat([e.ui.styleSheetLoader.loadAll(n)])})(e,o,n)).then(s).catch(s),i=ad(e);return i&&((e,t)=>{const n=yn(e.getBody()),o=Vn(qn(n)),r=bn("style");Jt(r,"type","text/css"),vo(r,vn(t)),vo(o,r),e.on("remove",(()=>{xo(r)}))})(e,i),a},MT=e=>{!0!==e.removed&&((e=>{ZC(e)||e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"})})(e),(e=>{e.bindPendingEventDelegates(),e.initialized=!0,(e=>{e.dispatch("Init")})(e),e.focus(!0),(e=>{const t=e.dom.getRoot();e.inline||am(e)&&e.selection.getStart(!0)!==t||Ou(t).each((t=>{const n=t.getNode(),o=Qo(n)?Ou(n).getOr(t):t;e.selection.setRng(o.toRange())}))})(e),e.nodeChanged({initial:!0});const t=$d(e);w(t)&&t.call(e,e),(e=>{const t=Vd(e);t&&vg.setEditorTimeout(e,(()=>{let n;n=!0===t?e:e.editorManager.get(t),n&&!n.destroyed&&(n.focus(),n.selection.scrollIntoView())}),100)})(e)})(e))},IT=e=>{const t=e.getElement();let n=e.getDoc();e.inline&&(AT.addClass(t,"mce-content-body"),e.contentDocument=n=document,e.contentWindow=window,e.bodyElement=t,e.contentAreaContainer=t);const o=e.getBody();o.disabled=!0,e.readonly=Bd(e),e._editableRoot=Pd(e),!e.readonly&&e.hasEditableRoot()&&(e.inline&&"static"===AT.getStyle(o,"position",!0)&&(o.style.position="relative"),o.contentEditable="true"),o.disabled=!1,e.editorUpload=Xw(e),e.schema=ua(PT(e)),e.dom=za(n,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,update_styles:!0,root_element:e.inline?e.getBody():null,collect:e.inline,schema:e.schema,contentCssCors:Zl(e),referrerPolicy:ed(e),onSetAttrib:t=>{e.dispatch("SetAttrib",t)},force_hex_color:yc(e)}),e.parser=(e=>{const t=CC(BT(e),e.schema);return t.addAttributeFilter("src,href,style,tabindex",((t,n)=>{const o=e.dom,r="data-mce-"+n;let s=t.length;for(;s--;){const a=t[s];let i=a.attr(n);if(i&&!a.attr(r)){if(0===i.indexOf("data:")||0===i.indexOf("blob:"))continue;"style"===n?(i=o.serializeStyle(o.parseStyle(i),a.name),i.length||(i=null),a.attr(r,i),a.attr(n,i)):"tabindex"===n?(a.attr(r,i),a.attr(n,null)):a.attr(r,e.convertURL(i,n,a.name))}}})),t.addNodeFilter("script",(e=>{let t=e.length;for(;t--;){const n=e[t],o=n.attr("type")||"no/type";0!==o.indexOf("mce-")&&n.attr("type","mce-"+o)}})),uc(e)&&t.addNodeFilter("#cdata",(t=>{var n;let o=t.length;for(;o--;){const r=t[o];r.type=8,r.name="#comment",r.value="[CDATA["+e.dom.encode(null!==(n=r.value)&&void 0!==n?n:"")+"]]"}})),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(t=>{let n=t.length;const o=e.schema.getNonEmptyElements();for(;n--;){const e=t[n];e.isEmpty(o)&&0===e.getAll("br").length&&e.append(new Wg("br",1))}})),t})(e),e.serializer=cw((e=>{const t=e.options.get;return{...BT(e),...PT(e),...OT({remove_trailing_brs:t("remove_trailing_brs"),pad_empty_with_br:t("pad_empty_with_br"),url_converter:t("url_converter"),url_converter_scope:t("url_converter_scope"),element_format:t("element_format"),entities:t("entities"),entity_encoding:t("entity_encoding"),indent:t("indent"),indent_after:t("indent_after"),indent_before:t("indent_before")})}})(e),e),e.selection=iw(e.dom,e.getWin(),e.serializer,e),e.annotator=Qm(e),e.formatter=ix(e),e.undoManager=dx(e),e._nodeChangeDispatcher=new CR(e),e._selectionOverrides=oT(e),(e=>{const t=Xa(),n=$a(!1),o=Ja((t=>{e.dispatch("longpress",{...t,type:"longpress"}),n.set(!0)}),400);e.on("touchstart",(e=>{M_(e).each((r=>{o.cancel();const s={x:r.clientX,y:r.clientY,target:e.target};o.throttle(e),n.set(!1),t.set(s)}))}),!0),e.on("touchmove",(r=>{o.cancel(),M_(r).each((o=>{t.on((r=>{((e,t)=>{const n=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y);return n>5||o>5})(o,r)&&(t.clear(),n.set(!1),e.dispatch("longpresscancel"))}))}))}),!0),e.on("touchend touchcancel",(r=>{o.cancel(),"touchcancel"!==r.type&&t.get().filter((e=>e.target.isEqualNode(r.target))).each((()=>{n.get()?r.preventDefault():e.dispatch("tap",{...r,type:"tap"})}))}),!0)})(e),(e=>{(e=>{e.on("click",(t=>{e.dom.getParent(t.target,"details")&&t.preventDefault()}))})(e),(e=>{e.parser.addNodeFilter("details",(t=>{const n=bc(e);V(t,(e=>{"expanded"===n?e.attr("open","open"):"collapsed"===n&&e.attr("open",null)}))})),e.serializer.addNodeFilter("details",(t=>{const n=vc(e);V(t,(e=>{"expanded"===n?e.attr("open","open"):"collapsed"===n&&e.attr("open",null)}))}))})(e)})(e),(e=>{const t="contenteditable",n=" "+Pt.trim(dc(e))+" ",o=" "+Pt.trim(lc(e))+" ",r=$_(n),s=$_(o),a=cc(e);a.length>0&&e.on("BeforeSetContent",(t=>{((e,t,n)=>{let o=t.length,r=n.content;if("raw"!==n.format){for(;o--;)r=r.replace(t[o],q_(e,r,lc(e)));n.content=r}})(e,a,t)})),e.parser.addAttributeFilter("class",(e=>{let n=e.length;for(;n--;){const o=e[n];r(o)?o.attr(t,"true"):s(o)&&o.attr(t,"false")}})),e.serializer.addAttributeFilter(t,(e=>{let n=e.length;for(;n--;){const o=e[n];if(!r(o)&&!s(o))continue;const i=o.attr("data-mce-content");a.length>0&&i?V_(a,i)?(o.name="#text",o.type=3,o.raw=!0,o.value=i):o.remove():o.attr(t,null)}}))})(e),ZC(e)||((e=>{e.on("mousedown",(t=>{t.detail>=3&&(t.preventDefault(),TA(e))}))})(e),(e=>{(e=>{const t=[",",".",";",":","!","?"],n=[32],o=()=>{return t=ac(e),n=ic(e),{inlinePatterns:wl(t),blockPatterns:Cl(t),dynamicPatternsLookup:n};var t,n},r=()=>(e=>e.options.isSet("text_patterns_lookup"))(e);e.on("keydown",(t=>{if(13===t.keyCode&&!af.modifierPressed(t)&&e.selection.isCollapsed()){const n=o();(n.inlinePatterns.length>0||n.blockPatterns.length>0||r())&&kT(e,n)&&t.preventDefault()}}),!0);const s=()=>{if(e.selection.isCollapsed()){const t=o();(t.inlinePatterns.length>0||r())&&((e,t)=>{const n=e.selection.getRng();uT(e,n).map((o=>{const r=Math.max(0,n.startOffset-1),s=fT(e.dom,o,n.startContainer,r),a=mT(t,o,s),i=_T(e,o,n.startContainer,r,a,!1);i.length>0&&e.undoManager.transact((()=>{ST(e,i)}))}))})(e,t)}};e.on("keyup",(e=>{NT(n,e,((e,t)=>e===t.keyCode&&!af.modifierPressed(t)))&&s()})),e.on("keypress",(n=>{NT(t,n,((e,t)=>e.charCodeAt(0)===t.charCode))&&vg.setEditorTimeout(e,s)}))})(e)})(e));const r=yR(e);L_(e,r),(e=>{e.on("NodeChange",T(j_,e))})(e),(e=>{var t;const n=e.dom,o=Il(e),r=null!==(t=md(e))&&void 0!==t?t:"",s=(t,a)=>{if((e=>{if(mx(e)){const t=e.keyCode;return!fx(e)&&(af.metaKeyPressed(e)||e.altKey||t>=112&&t<=123||H(cx,t))}return!1})(t))return;const i=e.getBody(),l=!(e=>mx(e)&&!(fx(e)||"keyup"===e.type&&229===e.keyCode))(t)&&((e,t,n)=>{if(gs(yn(t),!1)){const o=t.firstElementChild;return!o||!e.getStyle(t.firstElementChild,"padding-left")&&!e.getStyle(t.firstElementChild,"padding-right")&&n===o.nodeName.toLowerCase()}return!1})(n,i,o);(""!==n.getAttrib(i,ux)!==l||a)&&(n.setAttrib(i,ux,l?r:null),n.setAttrib(i,"aria-placeholder",l?r:null),((e,t)=>{e.dispatch("PlaceholderToggle",{state:t})})(e,l),e.on(l?"keydown":"keyup",s),e.off(l?"keyup":"keydown",s))};Ye(r)&&e.on("init",(t=>{s(t,!0),e.on("change SetContent ExecCommand",s),e.on("paste",(t=>vg.setEditorTimeout(e,(()=>s(t)))))}))})(e),EA(e);const s=(e=>{const t=e;return(e=>xe(e.plugins,"rtc").bind((e=>I.from(e.setup))))(e).fold((()=>(t.rtcInstance=JC(e),I.none())),(e=>(t.rtcInstance=(()=>{const e=N(null),t=N("");return{init:{bindEvents:_},undoManager:{beforeChange:_,add:e,undo:e,redo:e,clear:_,reset:_,hasUndo:L,hasRedo:L,transact:e,ignore:_,extra:_},formatter:{match:L,matchAll:N([]),matchNode:N(void 0),canApply:L,closest:t,apply:_,remove:_,toggle:_,formatChanged:N({unbind:_})},editor:{getContent:t,setContent:N({content:"",html:""}),insertContent:N(""),addVisual:_},selection:{getContent:t},autocompleter:{addDecoration:_,removeDecoration:_},raw:{getModel:N(I.none())}}})(),I.some((()=>e().then((e=>(t.rtcInstance=(e=>{const t=e=>f(e)?e:{},{init:n,undoManager:o,formatter:r,editor:s,selection:a,autocompleter:i,raw:l}=e;return{init:{bindEvents:n.bindEvents},undoManager:{beforeChange:o.beforeChange,add:o.add,undo:o.undo,redo:o.redo,clear:o.clear,reset:o.reset,hasUndo:o.hasUndo,hasRedo:o.hasRedo,transact:(e,t,n)=>o.transact(n),ignore:(e,t)=>o.ignore(t),extra:(e,t,n,r)=>o.extra(n,r)},formatter:{match:(e,n,o,s)=>r.match(e,t(n),s),matchAll:r.matchAll,matchNode:r.matchNode,canApply:e=>r.canApply(e),closest:e=>r.closest(e),apply:(e,n,o)=>r.apply(e,t(n)),remove:(e,n,o,s)=>r.remove(e,t(n)),toggle:(e,n,o)=>r.toggle(e,t(n)),formatChanged:(e,t,n,o,s)=>r.formatChanged(t,n,o,s)},editor:{getContent:e=>s.getContent(e),setContent:(e,t)=>({content:s.setContent(e,t),html:""}),insertContent:(e,t)=>(s.insertContent(e),""),addVisual:s.addVisual},selection:{getContent:(e,t)=>a.getContent(t)},autocompleter:{addDecoration:i.addDecoration,removeDecoration:i.removeDecoration},raw:{getModel:()=>I.some(l.getRawModel())}}})(e),e.rtc.isRemote))))))))})(e);(e=>{const t=e.getDoc(),n=e.getBody();(e=>{e.dispatch("PreInit")})(e),Wd(e)||(t.body.spellcheck=!1,AT.setAttrib(n,"spellcheck","false")),e.quirks=RT(e),(e=>{e.dispatch("PostRender")})(e);const o=ld(e);void 0!==o&&(n.dir=o);const r=Kd(e);r&&e.on("BeforeSetContent",(e=>{Pt.each(r,(t=>{e.content=e.content.replace(t,(e=>"\x3c!--mce:protected "+escape(e)+"--\x3e"))}))})),e.on("SetContent",(()=>{e.addVisual(e.getBody())})),e.on("compositionstart compositionend",(t=>{e.composing="compositionstart"===t.type}))})(e),s.fold((()=>{const t=(e=>{let t=!1;const n=setTimeout((()=>{t||e.setProgressState(!0)}),500);return()=>{clearTimeout(n),t=!0,e.setProgressState(!1)}})(e);LT(e).then((()=>{MT(e),t()}))}),(t=>{e.setProgressState(!0),LT(e).then((()=>{t().then((t=>{e.setProgressState(!1),MT(e),nw(e)}),(t=>{e.notificationManager.open({type:"error",text:String(t)}),MT(e),nw(e)}))}))}))},FT=M,UT=za.DOM,zT=za.DOM,jT=(e,t)=>({editorContainer:e,iframeContainer:t,api:{}}),HT=e=>{const t=e.getElement();return e.inline?jT(null):(e=>{const t=zT.create("div");return zT.insertAfter(t,e),jT(t,t)})(t)},$T=async e=>{e.dispatch("ScriptsLoaded"),(e=>{const t=Pt.trim(Kl(e)),n=e.ui.registry.getAll().icons,o={...Sw.get("default").icons,...Sw.get(t).icons};ge(o,((t,o)=>{Ee(n,o)||e.ui.registry.addIcon(o,t)}))})(e),(e=>{const t=pd(e);if(m(t)){const n=Lw.get(t);e.theme=n(e,Lw.urls[t])||{},w(e.theme.init)&&e.theme.init(e,Lw.urls[t]||e.documentBaseUrl.replace(/\/$/,""))}else e.theme={}})(e),(e=>{const t=bd(e),n=kw.get(t);e.model=n(e,kw.urls[t])})(e),(e=>{const t=[];V(Ld(e),(n=>{((e,t,n)=>{const o=Dw.get(n),r=Dw.urls[n]||e.documentBaseUrl.replace(/\/$/,"");if(n=Pt.trim(n),o&&-1===Pt.inArray(t,n)){if(e.plugins[n])return;try{const s=o(e,r)||{};e.plugins[n]=s,w(s.init)&&(s.init(e,r),t.push(n))}catch(t){((e,t,n)=>{const o=Ka.translate(["Failed to initialize plugin: {0}",t]);ef(e,"PluginLoadError",{message:o}),jw(o,n),Fw(e,o)})(e,n,t)}}})(e,t,(e=>e.replace(/^\-/,""))(n))}))})(e);const t=await(e=>{const t=e.getElement();return e.orgDisplay=t.style.display,m(pd(e))?(e=>{const t=e.theme.renderUI;return t?t():HT(e)})(e):w(pd(e))?(e=>{const t=e.getElement(),n=pd(e)(e,t);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||e.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||e.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:t.offsetHeight,n})(e):HT(e)})(e);((e,t)=>{const n={show:I.from(t.show).getOr(_),hide:I.from(t.hide).getOr(_),isEnabled:I.from(t.isEnabled).getOr(M),setEnabled:n=>{e.mode.isReadOnly()||I.from(t.setEnabled).each((e=>e(n)))}};e.ui={...e.ui,...n}})(e,I.from(t.api).getOr({})),e.editorContainer=t.editorContainer,(e=>{e.contentCSS=e.contentCSS.concat((e=>$w(e,sd(e)))(e),(e=>$w(e,id(e)))(e))})(e),e.inline?IT(e):((e,t)=>{((e,t)=>{const n=e.translate("Rich Text Area"),o=tn(yn(e.getElement()),"tabindex").bind(Xe),r=((e,t,n,o)=>{const r=bn("iframe");return o.each((e=>Jt(r,"tabindex",e))),Zt(r,n),Zt(r,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),un(r,"tox-edit-area__iframe"),r})(e.id,n,Tl(e),o).dom;r.onload=()=>{r.onload=null,e.dispatch("load")},e.contentAreaContainer=t.iframeContainer,e.iframeElement=r,e.iframeHTML=(e=>{let t=Ol(e)+"";Bl(e)!==e.documentBaseUrl&&(t+=''),t+='';const n=Pl(e),o=Dl(e),r=e.translate(jd(e));return Ll(e)&&(t+=''),t+=`
    `,t})(e),UT.add(t.iframeContainer,r)})(e,t),t.editorContainer&&(t.editorContainer.style.display=e.orgDisplay,e.hidden=UT.isHidden(t.editorContainer)),e.getElement().style.display="none",UT.setAttrib(e.id,"aria-hidden","true"),e.getElement().style.visibility=e.orgVisibility,(e=>{const t=e.iframeElement,n=()=>{e.contentDocument=t.contentDocument,IT(e)};if(gc(e)||At.browser.isFirefox()){const t=e.getDoc();t.open(),t.write(e.iframeHTML),t.close(),n()}else{const r=(o=yn(t),No(o,"load",FT,(()=>{r.unbind(),n()})));t.srcdoc=e.iframeHTML}var o})(e)})(e,{editorContainer:t.editorContainer,iframeContainer:t.iframeContainer})},qT=za.DOM,VT=e=>"-"===e.charAt(0),WT=(e,t,n)=>I.from(t).filter((e=>Ye(e)&&!Sw.has(e))).map((t=>({url:`${e.editorManager.baseURL}/icons/${t}/icons${n}.js`,name:I.some(t)}))),KT=(e,t)=>{const n=Ha.ScriptLoader,o=()=>{!e.removed&&(e=>{const t=pd(e);return!m(t)||C(Lw.get(t))})(e)&&(e=>{const t=bd(e);return C(kw.get(t))})(e)&&$T(e)};((e,t)=>{const n=pd(e);if(m(n)&&!VT(n)&&!Ee(Lw.urls,n)){const o=hd(e),r=o?e.documentBaseURI.toAbsolute(o):`themes/${n}/theme${t}.js`;Lw.load(n,r).catch((()=>{((e,t,n)=>{Uw(e,"ThemeLoadError",zw("theme",t,n))})(e,r,n)}))}})(e,t),((e,t)=>{const n=bd(e);if("plugin"!==n&&!Ee(kw.urls,n)){const o=vd(e),r=m(o)?e.documentBaseURI.toAbsolute(o):`models/${n}/model${t}.js`;kw.load(n,r).catch((()=>{((e,t,n)=>{Uw(e,"ModelLoadError",zw("model",t,n))})(e,r,n)}))}})(e,t),((e,t)=>{const n=td(t),o=nd(t);if(!Ka.hasCode(n)&&"en"!==n){const r=Ye(o)?o:`${t.editorManager.baseURL}/langs/${n}.js`;e.add(r).catch((()=>{((e,t,n)=>{Uw(e,"LanguageLoadError",zw("language",t,n))})(t,r,n)}))}})(n,e),((e,t,n)=>{const o=WT(t,"default",n),r=(e=>I.from(Yl(e)).filter(Ye).map((e=>({url:e,name:I.none()}))))(t).orThunk((()=>WT(t,Kl(t),"")));V((e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t{e.add(n.url).catch((()=>{((e,t,n)=>{Uw(e,"IconsLoadError",zw("icons",t,n))})(t,n.url,n.name.getOrUndefined())}))}))})(n,e,t),((e,t)=>{const n=(t,n)=>{Dw.load(t,n).catch((()=>{((e,t,n)=>{Uw(e,"PluginLoadError",zw("plugin",t,n))})(e,n,t)}))};ge(Md(e),((t,o)=>{n(o,t),e.options.set("plugins",Ld(e).concat(o))})),V(Ld(e),(e=>{!(e=Pt.trim(e))||Dw.urls[e]||VT(e)||n(e,`plugins/${e}/plugin${t}.js`)}))})(e,t),n.loadQueue().then(o,o)},YT=xt().deviceType,GT=YT.isPhone(),XT=YT.isTablet(),QT=e=>{if(y(e))return[];{const t=p(e)?e:e.split(/[ ,]/),n=q(t,Ve);return Y(n,Ye)}},JT=(e,t)=>{const n=((t,n)=>{const o={},r={};return ve(t,((t,n)=>H(e,n)),be(o),be(r)),{t:o,f:r}})(t);return o=n.t,r=n.f,{sections:N(o),options:N(r)};var o,r},ZT=(e,t)=>Ee(e.sections(),t),eO=(e,t)=>({table_grid:!1,object_resizing:!1,resize:!1,toolbar_mode:xe(e,"toolbar_mode").getOr("scrolling"),toolbar_sticky:!1,...t?{menubar:!1}:{}}),tO=(e,t)=>{var n;const o=null!==(n=t.external_plugins)&&void 0!==n?n:{};return e&&e.external_plugins?Pt.extend({},e.external_plugins,o):o},nO=(e,t,n,o,r)=>{var s;const a=e?{mobile:eO(null!==(s=r.mobile)&&void 0!==s?s:{},t)}:{},i=JT(["mobile"],nk(a,r)),l=Pt.extend(n,o,i.options(),((e,t)=>e&&ZT(t,"mobile"))(e,i)?((e,t,n={})=>{const o=e.sections(),r=xe(o,t).getOr({});return Pt.extend({},n,r)})(i,"mobile"):{},{external_plugins:tO(o,i.options())});return((e,t,n,o)=>{const r=QT(n.forced_plugins),s=QT(o.plugins),a=((e,t)=>ZT(e,t)?e.sections()[t]:{})(t,"mobile"),i=((e,t,n,o)=>e&&ZT(t,"mobile")?o:n)(e,t,s,a.plugins?QT(a.plugins):s),l=((e,t)=>[...QT(e),...QT(t)])(r,i);return Pt.extend(o,{forced_plugins:r,plugins:l})})(e,i,o,l)},oO=e=>{(e=>{const t=t=>()=>{V("left,center,right,justify".split(","),(n=>{t!==n&&e.formatter.remove("align"+n)})),"none"!==t&&((t,n)=>{e.formatter.toggle(t,void 0),e.nodeChanged()})("align"+t)};e.editorCommands.addCommands({JustifyLeft:t("left"),JustifyCenter:t("center"),JustifyRight:t("right"),JustifyFull:t("justify"),JustifyNone:t("none")})})(e),(e=>{const t=t=>()=>{const n=e.selection,o=n.isCollapsed()?[e.dom.getParent(n.getNode(),e.dom.isBlock)]:n.getSelectedBlocks();return $(o,(n=>C(e.formatter.matchNode(n,t))))};e.editorCommands.addCommands({JustifyLeft:t("alignleft"),JustifyCenter:t("aligncenter"),JustifyRight:t("alignright"),JustifyFull:t("alignjustify")},"state")})(e)},rO=(e,t)=>{const n=e.selection,o=e.dom;return/^ | $/.test(t)?((e,t,n,o)=>{const r=yn(e.getRoot());return n=eh(r,Vi.fromRangeStart(t),o)?n.replace(/^ /," "):n.replace(/^ /," "),th(r,Vi.fromRangeEnd(t),o)?n.replace(/( | )()?$/," "):n.replace(/ ()?$/," ")})(o,n.getRng(),t,e.schema):t},sO=(e,t)=>{if(e.selection.isEditable()){const{content:n,details:o}=(e=>{if("string"!=typeof e){const t=Pt.extend({paste:e.paste,data:{paste:e.paste}},e);return{content:e.content,details:t}}return{content:e,details:{}}})(t);_C(e,{...o,content:rO(e,n),format:"html",set:!1,selection:!0}).each((t=>{const n=((e,t,n)=>ew(e).editor.insertContent(t,n))(e,t.content,o);SC(e,n,t),e.addVisual()}))}},aO={"font-size":"size","font-family":"face"},iO=Xt("font"),lO=e=>(t,n)=>I.from(n).map(yn).filter(Wt).bind((n=>((e,t,n)=>Lb(yn(n),(t=>(t=>mo(t,e).orThunk((()=>iO(t)?xe(aO,e).bind((e=>tn(t,e))):I.none())))(t)),(e=>_n(yn(t),e))))(e,t,n.dom).or(((e,t)=>I.from(za.DOM.getStyle(t,e,!0)))(e,n.dom)))).getOr(""),dO=lO("font-size"),cO=S((e=>e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")),lO("font-family")),uO=e=>Ou(e.getBody()).bind((e=>{const t=e.container();return I.from(er(t)?t.parentNode:t)})),mO=(e,t)=>((e,t)=>(e=>I.from(e.selection.getRng()).bind((t=>{const n=e.getBody();return t.startContainer===n&&0===t.startOffset?I.none():I.from(e.selection.getStart(!0))})))(e).orThunk(T(uO,e)).map(yn).filter(Wt).bind(t))(e,k(I.some,t)),fO=(e,t)=>{if(/^[0-9.]+$/.test(t)){const n=parseInt(t,10);if(n>=1&&n<=7){const o=(e=>Pt.explode(e.options.get("font_size_style_values")))(e),r=(e=>Pt.explode(e.options.get("font_size_classes")))(e);return r.length>0?r[n-1]||t:o[n-1]||t}return t}return t},gO=e=>{const t=e.split(/\s*,\s*/);return q(t,(e=>-1===e.indexOf(" ")||He(e,'"')||He(e,"'")?e:`'${e}'`)).join(",")},pO=(e,t)=>{const n=e.dom,o=e.selection.getRng(),r=t?e.selection.getStart():e.selection.getEnd(),s=t?o.startContainer:o.endContainer,a=CN(n,s);if(!a||!a.isContentEditable)return;const i=t?po:ho,l=Il(e);((e,t,n,o)=>{const r=e.dom,s=e=>r.isBlock(e)&&e.parentElement===n,a=s(t)?t:r.getParent(o,s,n);return I.from(a).map(yn)})(e,r,a,s).each((t=>{const n=_N(e,s,t.dom,a,!1,l);i(t,yn(n)),e.selection.setCursorLocation(n,0),e.dispatch("NewBlock",{newBlock:n}),fN(e,"insertParagraph")}))},hO=e=>{oO(e),(e=>{e.editorCommands.addCommands({"Cut,Copy,Paste":t=>{const n=e.getDoc();let o;try{n.execCommand(t)}catch(e){o=!0}if("paste"!==t||n.queryCommandEnabled(t)||(o=!0),o||!n.queryCommandSupported(t)){let t=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");(At.os.isMacOS()||At.os.isiOS())&&(t=t.replace(/Ctrl\+/g,"\u2318+")),e.notificationManager.open({text:t,type:"error"})}}})})(e),(e=>{e.editorCommands.addCommands({mceAddUndoLevel:()=>{e.undoManager.add()},mceEndUndoLevel:()=>{e.undoManager.add()},Undo:()=>{e.undoManager.undo()},Redo:()=>{e.undoManager.redo()}})})(e),(e=>{e.editorCommands.addCommands({mceSelectNodeDepth:(t,n,o)=>{let r=0;e.dom.getParent(e.selection.getNode(),(t=>!qo(t)||r++!==o||(e.selection.select(t),!1)),e.getBody())},mceSelectNode:(t,n,o)=>{e.selection.select(o)},selectAll:()=>{const t=e.dom.getParent(e.selection.getStart(),lr);if(t){const n=e.dom.createRng();n.selectNodeContents(t),e.selection.setRng(n)}}})})(e),(e=>{e.editorCommands.addCommands({mceCleanup:()=>{const t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},insertImage:(t,n,o)=>{sO(e,e.dom.createHTML("img",{src:o}))},insertHorizontalRule:()=>{e.execCommand("mceInsertContent",!1,"
    ")},insertText:(t,n,o)=>{sO(e,e.dom.encode(o))},insertHTML:(t,n,o)=>{sO(e,o)},mceInsertContent:(t,n,o)=>{sO(e,o)},mceSetContent:(t,n,o)=>{e.setContent(o)},mceReplaceContent:(t,n,o)=>{e.execCommand("mceInsertContent",!1,o.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceNewDocument:()=>{e.setContent(Jd(e))}})})(e),(e=>{const t=(t,n,o)=>{const r=m(o)?{href:o}:o,s=e.dom.getParent(e.selection.getNode(),"a");f(r)&&m(r.href)&&(r.href=r.href.replace(/ /g,"%20"),s&&r.href||e.formatter.remove("link"),r.href&&e.formatter.apply("link",r,s))};e.editorCommands.addCommands({unlink:()=>{if(e.selection.isEditable()){if(e.selection.isCollapsed()){const t=e.dom.getParent(e.selection.getStart(),"a");return void(t&&e.dom.remove(t,!0))}e.formatter.remove("link")}},mceInsertLink:t,createLink:t})})(e),(e=>{e.editorCommands.addCommands({Indent:()=>{(e=>{O_(e,"indent")})(e)},Outdent:()=>{B_(e)}}),e.editorCommands.addCommands({Outdent:()=>R_(e)},"state")})(e),(e=>{e.editorCommands.addCommands({InsertNewBlockBefore:()=>{(e=>{pO(e,!0)})(e)},InsertNewBlockAfter:()=>{(e=>{pO(e,!1)})(e)}})})(e),(e=>{e.editorCommands.addCommands({insertParagraph:()=>{oR(LN,e)},mceInsertNewLine:(t,n,o)=>{rR(e,o)},InsertLineBreak:(t,n,o)=>{oR($N,e)}})})(e),(e=>{(e=>{e.editorCommands.addCommands({"InsertUnorderedList,InsertOrderedList":t=>{e.getDoc().execCommand(t);const n=e.dom.getParent(e.selection.getNode(),"ol,ul");if(n){const t=n.parentNode;if(t&&/^(H[1-6]|P|ADDRESS|PRE)$/.test(t.nodeName)){const o=e.selection.getBookmark();e.dom.split(t,n),e.selection.moveToBookmark(o)}}}})})(e),(e=>{e.editorCommands.addCommands({"InsertUnorderedList,InsertOrderedList":t=>{const n=e.dom.getParent(e.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===t&&"UL"===n.tagName||"insertorderedlist"===t&&"OL"===n.tagName)}},"state")})(e)})(e),(e=>{(e=>{const t=(t,n)=>{e.formatter.toggle(t,n),e.nodeChanged()};e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":e=>{t(e)},"ForeColor,HiliteColor":(e,n,o)=>{t(e,{value:o})},BackColor:(e,n,o)=>{t("hilitecolor",{value:o})},FontName:(t,n,o)=>{((e,t)=>{const n=fO(e,t);e.formatter.toggle("fontname",{value:gO(n)}),e.nodeChanged()})(e,o)},FontSize:(t,n,o)=>{((e,t)=>{e.formatter.toggle("fontsize",{value:fO(e,t)}),e.nodeChanged()})(e,o)},LineHeight:(t,n,o)=>{((e,t)=>{e.formatter.toggle("lineheight",{value:String(t)}),e.nodeChanged()})(e,o)},Lang:(e,n,o)=>{var r;t(e,{value:o.code,customValue:null!==(r=o.customCode)&&void 0!==r?r:null})},RemoveFormat:t=>{e.formatter.remove(t)},mceBlockQuote:()=>{t("blockquote")},FormatBlock:(e,n,o)=>{t(m(o)?o:"p")},mceToggleFormat:(e,n,o)=>{t(o)}})})(e),(e=>{const t=t=>e.formatter.match(t);e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":e=>t(e),mceBlockQuote:()=>t("blockquote")},"state"),e.editorCommands.addQueryValueHandler("FontName",(()=>(e=>mO(e,(t=>cO(e.getBody(),t.dom))).getOr(""))(e))),e.editorCommands.addQueryValueHandler("FontSize",(()=>(e=>mO(e,(t=>dO(e.getBody(),t.dom))).getOr(""))(e))),e.editorCommands.addQueryValueHandler("LineHeight",(()=>(e=>mO(e,(t=>{const n=yn(e.getBody()),o=Lb(t,(e=>mo(e,"line-height")),T(_n,n));return o.getOrThunk((()=>{const e=parseFloat(co(t,"line-height")),n=parseFloat(co(t,"font-size"));return String(e/n)}))})).getOr(""))(e)))})(e)})(e),(e=>{e.editorCommands.addCommands({mceRemoveNode:(t,n,o)=>{const r=null!=o?o:e.selection.getNode();if(r!==e.getBody()){const t=e.selection.getBookmark();e.dom.remove(r,!0),e.selection.moveToBookmark(t)}},mcePrint:()=>{e.getWin().print()},mceFocus:(t,n,o)=>{((e,t)=>{e.removed||(t?Tg(e):(e=>{const t=e.selection,n=e.getBody();let o=t.getRng();e.quirks.refreshContentEditable(),C(e.bookmark)&&!Rg(e)&&hg(e).each((t=>{e.selection.setRng(t),o=t}));const r=((e,t)=>e.dom.getParent(t,(t=>"true"===e.dom.getContentEditable(t))))(e,t.getNode());if(r&&e.dom.isChildOf(r,n))return Ng(r),kg(e,o),void Tg(e);e.inline||(At.browser.isOpera()||Ng(n),e.getWin().focus()),(At.browser.isFirefox()||e.inline)&&(Ng(n),kg(e,o)),Tg(e)})(e))})(e,!0===o)},mceToggleVisualAid:()=>{e.hasVisual=!e.hasVisual,e.addVisual()}})})(e)},bO=["toggleview"],vO=e=>H(bO,e.toLowerCase());class yO{constructor(e){this.commands={state:{},exec:{},value:{}},this.editor=e}execCommand(e,t=!1,n,o){const r=this.editor,s=e.toLowerCase(),a=null==o?void 0:o.skip_focus;if(r.removed)return!1;if("mcefocus"!==s&&(/^(mceAddUndoLevel|mceEndUndoLevel)$/i.test(s)||a?(e=>{hg(e).each((t=>e.selection.setRng(t)))})(r):r.focus()),r.dispatch("BeforeExecCommand",{command:e,ui:t,value:n}).isDefaultPrevented())return!1;const i=this.commands.exec[s];return!!w(i)&&(i(s,t,n),r.dispatch("ExecCommand",{command:e,ui:t,value:n}),!0)}queryCommandState(e){if(!vO(e)&&this.editor.quirks.isHidden()||this.editor.removed)return!1;const t=e.toLowerCase(),n=this.commands.state[t];return!!w(n)&&n(t)}queryCommandValue(e){if(!vO(e)&&this.editor.quirks.isHidden()||this.editor.removed)return"";const t=e.toLowerCase(),n=this.commands.value[t];return w(n)?n(t):""}addCommands(e,t="exec"){const n=this.commands;ge(e,((e,o)=>{V(o.toLowerCase().split(","),(o=>{n[t][o]=e}))}))}addCommand(e,t,n){const o=e.toLowerCase();this.commands.exec[o]=(e,o,r)=>t.call(null!=n?n:this.editor,o,r)}queryCommandSupported(e){const t=e.toLowerCase();return!!this.commands.exec[t]}addQueryStateHandler(e,t,n){this.commands.state[e.toLowerCase()]=()=>t.call(null!=n?n:this.editor)}addQueryValueHandler(e,t,n){this.commands.value[e.toLowerCase()]=()=>t.call(null!=n?n:this.editor)}}const CO="data-mce-contenteditable",wO=(e,t,n)=>{try{e.getDoc().execCommand(t,!1,String(n))}catch(e){}},xO=(e,t)=>{e.dom.contentEditable=t?"true":"false"},EO=e=>e.readonly,_O=e=>{e.parser.addAttributeFilter("contenteditable",(t=>{EO(e)&&V(t,(e=>{e.attr(CO,e.attr("contenteditable")),e.attr("contenteditable","false")}))})),e.serializer.addAttributeFilter(CO,(t=>{EO(e)&&V(t,(e=>{e.attr("contenteditable",e.attr(CO))}))})),e.serializer.addTempAttr(CO)},SO=["copy"],kO=Pt.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," ");class NO{static isNative(e){return!!kO[e.toLowerCase()]}constructor(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||L}fire(e,t){return this.dispatch(e,t)}dispatch(e,t){const n=e.toLowerCase(),o=_a(n,null!=t?t:{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(o);const r=this.bindings[n];if(r)for(let e=0,t=r.length;e{this.toggleEvent(t,!1),delete this.bindings[t]})),this;if(s){if(t){const e=K(s,(e=>e.func===t));s=e.fail,this.bindings[r]=s,V(e.pass,(e=>{e.removed=!0}))}else s.length=0;s.length||(this.toggleEvent(e,!1),delete this.bindings[r])}}}else ge(this.bindings,((e,t)=>{this.toggleEvent(t,!1)})),this.bindings={};return this}once(e,t,n){return this.on(e,t,n,{once:!0})}has(e){e=e.toLowerCase();const t=this.bindings[e];return!(!t||0===t.length)}}const RO=e=>(e._eventDispatcher||(e._eventDispatcher=new NO({scope:e,toggleEvent:(t,n)=>{NO.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,n)}})),e._eventDispatcher),AO={fire(e,t,n){return this.dispatch(e,t,n)},dispatch(e,t,n){const o=this;if(o.removed&&"remove"!==e&&"detach"!==e)return _a(e.toLowerCase(),null!=t?t:{},o);const r=RO(o).dispatch(e,t);if(!1!==n&&o.parent){let t=o.parent();for(;t&&!r.isPropagationStopped();)t.dispatch(e,r,!1),t=t.parent?t.parent():void 0}return r},on(e,t,n){return RO(this).on(e,t,n)},off(e,t){return RO(this).off(e,t)},once(e,t){return RO(this).once(e,t)},hasEventListeners(e){return RO(this).has(e)}},TO=za.DOM;let OO;const BO=(e,t)=>{if("selectionchange"===t)return e.getDoc();if(!e.inline&&/^(?:mouse|touch|click|contextmenu|drop|dragover|dragend)/.test(t))return e.getDoc().documentElement;const n=fd(e);return n?(e.eventRoot||(e.eventRoot=TO.select(n)[0]),e.eventRoot):e.getBody()},PO=(e,t,n)=>{(e=>!e.hidden&&!EO(e))(e)?e.dispatch(t,n):EO(e)&&((e,t)=>{if((e=>"click"===e.type)(t)&&!af.metaKeyPressed(t)){const n=yn(t.target);((e,t)=>no(t,"a",(t=>_n(t,yn(e.getBody())))).bind((e=>tn(e,"href"))))(e,n).each((n=>{if(t.preventDefault(),/^#/.test(n)){const t=e.dom.select(`${n},[name="${ze(n,"#")}"]`);t.length&&e.selection.scrollIntoView(t[0],!0)}else window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")}))}else(e=>H(SO,e.type))(t)&&e.dispatch(t.type,t)})(e,n)},DO=(e,t)=>{if(e.delegates||(e.delegates={}),e.delegates[t]||e.removed)return;const n=BO(e,t);if(fd(e)){if(OO||(OO={},e.editorManager.on("removeEditor",(()=>{e.editorManager.activeEditor||OO&&(ge(OO,((t,n)=>{e.dom.unbind(BO(e,n))})),OO=null)}))),OO[t])return;const o=n=>{const o=n.target,r=e.editorManager.get();let s=r.length;for(;s--;){const e=r[s].getBody();(e===o||TO.isChildOf(o,e))&&PO(r[s],t,n)}};OO[t]=o,TO.bind(n,t,o)}else{const o=n=>{PO(e,t,n)};TO.bind(n,t,o),e.delegates[t]=o}},LO={...AO,bindPendingEventDelegates(){const e=this;Pt.each(e._pendingNativeEvents,(t=>{DO(e,t)}))},toggleNativeEvent(e,t){const n=this;"focus"!==e&&"blur"!==e&&(n.removed||(t?n.initialized?DO(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&n.delegates&&(n.dom.unbind(BO(n,e),e,n.delegates[e]),delete n.delegates[e])))},unbindAllNativeEvents(){const e=this,t=e.getBody(),n=e.dom;e.delegates&&(ge(e.delegates,((t,n)=>{e.dom.unbind(BO(e,n),n,t)})),delete e.delegates),!e.inline&&t&&n&&(t.onload=null,n.unbind(e.getWin()),n.unbind(e.getDoc())),n&&(n.unbind(t),n.unbind(e.getContainer()))}},MO=e=>m(e)?{value:e.split(/[ ,]/),valid:!0}:E(e,m)?{value:e,valid:!0}:{valid:!1,message:"The value must be a string[] or a comma/space separated string."},IO=(e,t)=>e+(Ge(t.message)?"":`. ${t.message}`),FO=e=>e.valid,UO=(e,t,n="")=>{const o=t(e);return b(o)?o?{value:e,valid:!0}:{valid:!1,message:n}:o},zO=["design","readonly"],jO=(e,t,n,o)=>{const r=n[t.get()],s=n[o];try{s.activate()}catch(e){return void console.error(`problem while activating editor mode ${o}:`,e)}r.deactivate(),r.editorReadOnly!==s.editorReadOnly&&((e,t)=>{const n=yn(e.getBody());((e,t,n)=>{gn(e,t)&&!n?fn(e,t):n&&un(e,t)})(n,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),(e=>{I.from(e.selection.getNode()).each((e=>{e.removeAttribute("data-mce-selected")}))})(e),e.readonly=!0,xO(n,!1),V(Uo(n,'*[contenteditable="true"]'),(e=>{Jt(e,CO,"true"),xO(e,!1)}))):(e.readonly=!1,e.hasEditableRoot()&&xO(n,!0),V(Uo(n,`*[${CO}="true"]`),(e=>{on(e,CO),xO(e,!0)})),wO(e,"StyleWithCSS",!1),wO(e,"enableInlineTableEditing",!1),wO(e,"enableObjectResizing",!1),Ag(e)&&e.focus(),(e=>{e.selection.setRng(e.selection.getRng())})(e),e.nodeChanged())})(e,s.editorReadOnly),t.set(o),((e,t)=>{e.dispatch("SwitchMode",{mode:t})})(e,o)},HO=Pt.each,$O=Pt.explode,qO={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},VO=Pt.makeMap("alt,ctrl,shift,meta,access"),WO=e=>{const t={},n=At.os.isMacOS()||At.os.isiOS();HO($O(e.toLowerCase(),"+"),(e=>{(e=>e in VO)(e)?t[e]=!0:/^[0-9]{2,}$/.test(e)?t.keyCode=parseInt(e,10):(t.charCode=e.charCodeAt(0),t.keyCode=qO[e]||e.toUpperCase().charCodeAt(0))}));const o=[t.keyCode];let r;for(r in VO)t[r]?o.push(r):t[r]=!1;return t.id=o.join(","),t.access&&(t.alt=!0,n?t.ctrl=!0:t.shift=!0),t.meta&&(n?t.meta=!0:(t.ctrl=!0,t.meta=!1)),t};class KO{constructor(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;const t=this;e.on("keyup keypress keydown",(e=>{!t.hasModifier(e)&&!t.isFunctionKey(e)||e.isDefaultPrevented()||(HO(t.shortcuts,(n=>{t.matchShortcut(e,n)&&(t.pendingPatterns=n.subpatterns.slice(0),"keydown"===e.type&&t.executeShortcutAction(n))})),t.matchShortcut(e,t.pendingPatterns[0])&&(1===t.pendingPatterns.length&&"keydown"===e.type&&t.executeShortcutAction(t.pendingPatterns[0]),t.pendingPatterns.shift()))}))}add(e,t,n,o){const r=this,s=r.normalizeCommandFunc(n);return HO($O(Pt.trim(e)),(e=>{const n=r.createShortcut(e,t,s,o);r.shortcuts[n.id]=n})),!0}remove(e){const t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)}normalizeCommandFunc(e){const t=this,n=e;return"string"==typeof n?()=>{t.editor.execCommand(n,!1,null)}:Pt.isArray(n)?()=>{t.editor.execCommand(n[0],n[1],n[2])}:n}createShortcut(e,t,n,o){const r=Pt.map($O(e,">"),WO);return r[r.length-1]=Pt.extend(r[r.length-1],{func:n,scope:o||this.editor}),Pt.extend(r[0],{desc:this.editor.translate(t),subpatterns:r.slice(1)})}hasModifier(e){return e.altKey||e.ctrlKey||e.metaKey}isFunctionKey(e){return"keydown"===e.type&&e.keyCode>=112&&e.keyCode<=123}matchShortcut(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)}executeShortcutAction(e){return e.func?e.func.call(e.scope):null}}const YO=()=>{const e=(()=>{const e={},t={},n={},o={},r={},s={},a={},i={},l=(e,t)=>(n,o)=>{e[n.toLowerCase()]={...o,type:t}};return{addButton:l(e,"button"),addGroupToolbarButton:l(e,"grouptoolbarbutton"),addToggleButton:l(e,"togglebutton"),addMenuButton:l(e,"menubutton"),addSplitButton:l(e,"splitbutton"),addMenuItem:l(t,"menuitem"),addNestedMenuItem:l(t,"nestedmenuitem"),addToggleMenuItem:l(t,"togglemenuitem"),addAutocompleter:l(n,"autocompleter"),addContextMenu:l(r,"contextmenu"),addContextToolbar:l(s,"contexttoolbar"),addContextForm:l(s,"contextform"),addSidebar:l(a,"sidebar"),addView:l(i,"views"),addIcon:(e,t)=>o[e.toLowerCase()]=t,getAll:()=>({buttons:e,menuItems:t,icons:o,popups:n,contextMenus:r,contextToolbars:s,sidebars:a,views:i})}})();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addGroupToolbarButton:e.addGroupToolbarButton,addToggleMenuItem:e.addToggleMenuItem,addView:e.addView,getAll:e.getAll}},GO=za.DOM,XO=Pt.extend,QO=Pt.each;class JO{constructor(e,t,n){this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.composing=!1,this.destroyed=!1,this.hasHiddenInput=!1,this.iframeElement=null,this.initialized=!1,this.readonly=!1,this.removed=!1,this.startContent="",this._pendingNativeEvents=[],this._skinLoaded=!1,this._editableRoot=!0,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,XO(this,LO);const o=this;this.id=e,this.hidden=!1;const r=((e,t)=>nO(GT||XT,GT,t,e,t))(n.defaultOptions,t);this.options=((e,t)=>{const n={},o={},r=(e,t,n)=>{const r=UO(t,n);return FO(r)?(o[e]=r.value,!0):(console.warn(IO(`Invalid value passed for the ${e} option`,r)),!1)},s=e=>Ee(n,e);return{register:(e,s)=>{const a=(e=>m(e.processor))(s)?(e=>{const t=(()=>{switch(e){case"array":return p;case"boolean":return b;case"function":return w;case"number":return x;case"object":return f;case"string":return m;case"string[]":return MO;case"object[]":return e=>E(e,f);case"regexp":return e=>u(e,RegExp);default:return M}})();return n=>UO(n,t,`The value must be a ${e}.`)})(s.processor):s.processor,i=((e,t,n)=>{if(!v(t)){const o=UO(t,n);if(FO(o))return o.value;console.error(IO(`Invalid default value passed for the "${e}" option`,o))}})(e,s.default,a);n[e]={...s,default:i,processor:a},xe(o,e).orThunk((()=>xe(t,e))).each((t=>r(e,t,a)))},isRegistered:s,get:e=>xe(o,e).orThunk((()=>xe(n,e).map((e=>e.default)))).getOrUndefined(),set:(e,t)=>{if(s(e)){const o=n[e];return o.immutable?(console.error(`"${e}" is an immutable option and cannot be updated`),!1):r(e,t,o.processor)}return console.warn(`"${e}" is not a registered option. Ensure the option has been registered before setting a value.`),!1},unset:e=>{const t=s(e);return t&&delete o[e],t},isSet:e=>Ee(o,e)}})(0,r),(e=>{const t=e.options.register;t("id",{processor:"string",default:e.id}),t("selector",{processor:"string"}),t("target",{processor:"object"}),t("suffix",{processor:"string"}),t("cache_suffix",{processor:"string"}),t("base_url",{processor:"string"}),t("referrer_policy",{processor:"string",default:""}),t("language_load",{processor:"boolean",default:!0}),t("inline",{processor:"boolean",default:!1}),t("iframe_attrs",{processor:"object",default:{}}),t("doctype",{processor:"string",default:""}),t("document_base_url",{processor:"string",default:e.documentBaseUrl}),t("body_id",{processor:Al(e,"tinymce"),default:"tinymce"}),t("body_class",{processor:Al(e),default:""}),t("content_security_policy",{processor:"string",default:""}),t("br_in_pre",{processor:"boolean",default:!0}),t("forced_root_block",{processor:e=>{const t=m(e)&&Ye(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),t("forced_root_block_attrs",{processor:"object",default:{}}),t("newline_behavior",{processor:e=>{const t=H(["block","linebreak","invert","default"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),t("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),t("no_newline_selector",{processor:"string",default:""}),t("keep_styles",{processor:"boolean",default:!0}),t("end_container_on_empty_block",{processor:e=>b(e)||m(e)?{valid:!0,value:e}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),t("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"}),t("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"}),t("font_size_classes",{processor:"string",default:""}),t("automatic_uploads",{processor:"boolean",default:!0}),t("images_reuse_filename",{processor:"boolean",default:!1}),t("images_replace_blob_uris",{processor:"boolean",default:!0}),t("icons",{processor:"string",default:""}),t("icons_url",{processor:"string",default:""}),t("images_upload_url",{processor:"string",default:""}),t("images_upload_base_path",{processor:"string",default:""}),t("images_upload_credentials",{processor:"boolean",default:!1}),t("images_upload_handler",{processor:"function"}),t("language",{processor:"string",default:"en"}),t("language_url",{processor:"string",default:""}),t("entity_encoding",{processor:"string",default:"named"}),t("indent",{processor:"boolean",default:!0}),t("indent_before",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),t("indent_after",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),t("indent_use_margin",{processor:"boolean",default:!1}),t("indentation",{processor:"string",default:"40px"}),t("content_css",{processor:e=>{const t=!1===e||m(e)||E(e,m);return t?m(e)?{value:q(e.split(","),Ve),valid:t}:p(e)?{value:e,valid:t}:!1===e?{value:[],valid:t}:{value:e,valid:t}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:Sd(e)?[]:["default"]}),t("content_style",{processor:"string"}),t("content_css_cors",{processor:"boolean",default:!1}),t("font_css",{processor:e=>{const t=m(e)||E(e,m);return t?{value:p(e)?e:q(e.split(","),Ve),valid:t}:{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),t("inline_boundaries",{processor:"boolean",default:!0}),t("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),t("object_resizing",{processor:e=>{const t=b(e)||m(e);return t?!1===e||El.isiPhone()||El.isiPad()?{value:"",valid:t}:{value:!0===e?"table,img,figure.image,div,video,iframe":e,valid:t}:{valid:!1,message:"Must be boolean or a string"}},default:!_l}),t("resize_img_proportional",{processor:"boolean",default:!0}),t("event_root",{processor:"object"}),t("service_message",{processor:"string"}),t("theme",{processor:e=>!1===e||m(e)||w(e),default:"silver"}),t("theme_url",{processor:"string"}),t("formats",{processor:"object"}),t("format_empty_lines",{processor:"boolean",default:!1}),t("format_noneditable_selector",{processor:"string",default:""}),t("preview_styles",{processor:e=>{const t=!1===e||m(e);return t?{value:!1===e?"":e,valid:t}:{valid:!1,message:"Must be false or a string"}},default:"font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"}),t("custom_ui_selector",{processor:"string",default:""}),t("hidden_input",{processor:"boolean",default:!0}),t("submit_patch",{processor:"boolean",default:!0}),t("encoding",{processor:"string"}),t("add_form_submit_trigger",{processor:"boolean",default:!0}),t("add_unload_trigger",{processor:"boolean",default:!0}),t("custom_undo_redo_levels",{processor:"number",default:0}),t("disable_nodechange",{processor:"boolean",default:!1}),t("readonly",{processor:"boolean",default:!1}),t("editable_root",{processor:"boolean",default:!0}),t("plugins",{processor:"string[]",default:[]}),t("external_plugins",{processor:"object"}),t("forced_plugins",{processor:"string[]"}),t("model",{processor:"string",default:e.hasPlugin("rtc")?"plugin":"dom"}),t("model_url",{processor:"string"}),t("block_unsupported_drop",{processor:"boolean",default:!0}),t("visual",{processor:"boolean",default:!0}),t("visual_table_class",{processor:"string",default:"mce-item-table"}),t("visual_anchor_class",{processor:"string",default:"mce-item-anchor"}),t("iframe_aria_text",{processor:"string",default:"Rich Text Area. Press ALT-0 for help."}),t("setup",{processor:"function"}),t("init_instance_callback",{processor:"function"}),t("url_converter",{processor:"function",default:e.convertURL}),t("url_converter_scope",{processor:"object",default:e}),t("urlconverter_callback",{processor:"function"}),t("allow_conditional_comments",{processor:"boolean",default:!1}),t("allow_html_data_urls",{processor:"boolean",default:!1}),t("allow_svg_data_urls",{processor:"boolean"}),t("allow_html_in_named_anchor",{processor:"boolean",default:!1}),t("allow_script_urls",{processor:"boolean",default:!1}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),t("fix_list_elements",{processor:"boolean",default:!1}),t("preserve_cdata",{processor:"boolean",default:!1}),t("remove_trailing_brs",{processor:"boolean",default:!0}),t("pad_empty_with_br",{processor:"boolean",default:!1}),t("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),t("element_format",{processor:"string",default:"html"}),t("entities",{processor:"string"}),t("schema",{processor:"string",default:"html5"}),t("convert_urls",{processor:"boolean",default:!0}),t("relative_urls",{processor:"boolean",default:!0}),t("remove_script_host",{processor:"boolean",default:!0}),t("custom_elements",{processor:"string"}),t("extended_valid_elements",{processor:"string"}),t("invalid_elements",{processor:"string"}),t("invalid_styles",{processor:Rl}),t("valid_children",{processor:"string"}),t("valid_classes",{processor:Rl}),t("valid_elements",{processor:"string"}),t("valid_styles",{processor:Rl}),t("verify_html",{processor:"boolean",default:!0}),t("auto_focus",{processor:e=>m(e)||!0===e}),t("browser_spellcheck",{processor:"boolean",default:!1}),t("protect",{processor:"array"}),t("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"}),t("deprecation_warnings",{processor:"boolean",default:!0}),t("a11y_advanced_options",{processor:"boolean",default:!1}),t("api_key",{processor:"string"}),t("paste_block_drop",{processor:"boolean",default:!1}),t("paste_data_images",{processor:"boolean",default:!0}),t("paste_preprocess",{processor:"function"}),t("paste_postprocess",{processor:"function"}),t("paste_webkit_styles",{processor:"string",default:"none"}),t("paste_remove_styles_if_webkit",{processor:"boolean",default:!0}),t("paste_merge_formats",{processor:"boolean",default:!0}),t("smart_paste",{processor:"boolean",default:!0}),t("paste_as_text",{processor:"boolean",default:!1}),t("paste_tab_spaces",{processor:"number",default:4}),t("text_patterns",{processor:e=>E(e,f)||!1===e?{value:xl(!1===e?[]:e),valid:!0}:{valid:!1,message:"Must be an array of objects or false."},default:[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}]}),t("text_patterns_lookup",{processor:e=>{return w(e)?{value:(t=e,e=>{const n=t(e);return xl(n)}),valid:!0}:{valid:!1,message:"Must be a single function"};var t},default:e=>[]}),t("noneditable_class",{processor:"string",default:"mceNonEditable"}),t("editable_class",{processor:"string",default:"mceEditable"}),t("noneditable_regexp",{processor:e=>E(e,kl)?{value:e,valid:!0}:kl(e)?{value:[e],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),t("table_tab_navigation",{processor:"boolean",default:!0}),t("highlight_on_focus",{processor:"boolean",default:!1}),t("xss_sanitization",{processor:"boolean",default:!0}),t("details_initial_state",{processor:e=>{const t=H(["inherited","collapsed","expanded"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("details_serialized_state",{processor:e=>{const t=H(["inherited","collapsed","expanded"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("init_content_sync",{processor:"boolean",default:!1}),t("newdocument_content",{processor:"string",default:""}),t("force_hex_color",{processor:e=>{const t=["always","rgb_only","off"],n=H(t,e);return n?{value:e,valid:n}:{valid:!1,message:`Must be one of: ${t.join(", ")}.`}},default:"off"}),t("sandbox_iframes",{processor:"boolean",default:!1}),t("convert_unsafe_embeds",{processor:"boolean",default:!1}),e.on("ScriptsLoaded",(()=>{t("directionality",{processor:"string",default:Ka.isRtl()?"rtl":void 0}),t("placeholder",{processor:"string",default:Sl.getAttrib(e.getElement(),"placeholder")})}))})(o);const s=this.options.get;s("deprecation_warnings")&&((e,t)=>{((e,t)=>{const n=bw(e),o=Cw(t),r=o.length>0,s=n.length>0,a="mobile"===t.theme;if(r||s||a){const e="\n- ",t=a?`\n\nThemes:${e}mobile`:"",i=r?`\n\nPlugins:${e}${o.join(e)}`:"",l=s?`\n\nOptions:${e}${n.join(e)}`:"";console.warn("The following deprecated features are currently enabled and have been removed in TinyMCE 6.0. These features will no longer work and should be removed from the TinyMCE configuration. See https://www.tiny.cloud/docs/tinymce/6/migration-from-5x/ for more information."+t+i+l)}})(e,t),((e,t)=>{const n=vw(e),o=ww(t),r=o.length>0,s=n.length>0;if(r||s){const e="\n- ",t=r?`\n\nPlugins:${e}${o.map(xw).join(e)}`:"",a=s?`\n\nOptions:${e}${n.join(e)}`:"";console.warn("The following deprecated features are currently enabled but will be removed soon."+t+a)}})(e,t)})(t,r);const a=s("suffix");a&&(n.suffix=a),this.suffix=n.suffix;const i=s("base_url");i&&n._setBaseUrl(i),this.baseUri=n.baseURI;const l=ed(o);l&&(Ha.ScriptLoader._setReferrerPolicy(l),za.DOM.styleSheetLoader._setReferrerPolicy(l));const d=Dd(o);C(d)&&za.DOM.styleSheetLoader._setContentCssCors(d),Ya.languageLoad=s("language_load"),Ya.baseURL=n.baseURL,this.setDirty(!1),this.documentBaseURI=new aC(Bl(o),{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=Sd(o),this.hasVisual=Fd(o),this.shortcuts=new KO(this),this.editorCommands=new yO(this),hO(this);const c=s("cache_suffix");c&&(At.cacheSuffix=c.replace(/^[\?\&]+/,"")),this.ui={registry:YO(),styleSheetLoader:void 0,show:_,hide:_,setEnabled:_,isEnabled:M},this.mode=(e=>{const t=$a("design"),n=$a({design:{activate:_,deactivate:_,editorReadOnly:!1},readonly:{activate:_,deactivate:_,editorReadOnly:!0}});return(e=>{e.serializer?_O(e):e.on("PreInit",(()=>{_O(e)}))})(e),(e=>{e.on("ShowCaret",(t=>{EO(e)&&t.preventDefault()})),e.on("ObjectSelected",(t=>{EO(e)&&t.preventDefault()}))})(e),{isReadOnly:()=>EO(e),set:o=>((e,t,n,o)=>{if(o!==n.get()){if(!Ee(t,o))throw new Error(`Editor mode '${o}' is invalid`);e.initialized?jO(e,n,t,o):e.on("init",(()=>jO(e,n,t,o)))}})(e,n.get(),t,o),get:()=>t.get(),register:(e,t)=>{n.set(((e,t,n)=>{if(H(zO,t))throw new Error(`Cannot override default mode ${t}`);return{...e,[t]:{...n,deactivate:()=>{try{n.deactivate()}catch(e){console.error(`problem while deactivating editor mode ${t}:`,e)}}}}})(n.get(),e,t))}}})(o),n.dispatch("SetupEditor",{editor:this});const g=Hd(o);w(g)&&g.call(o,o)}render(){(e=>{const t=e.id;Ka.setCode(td(e));const n=()=>{qT.unbind(window,"ready",n),e.render()};if(!Ta.Event.domLoaded)return void qT.bind(window,"ready",n);if(!e.getElement())return;const o=yn(e.getElement()),r=rn(o);e.on("remove",(()=>{W(o.dom.attributes,(e=>on(o,e.name))),Zt(o,r)})),e.ui.styleSheetLoader=((e,t)=>Is.forElement(e,{contentCssCors:Dd(t),referrerPolicy:ed(t)}))(o,e),Sd(e)?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden");const s=e.getElement().form||qT.getParent(t,"form");s&&(e.formElement=s,kd(e)&&!Zo(e.getElement())&&(qT.insertAfter(qT.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate=t=>{e.dispatch(t.type,t)},qT.bind(s,"submit reset",e.formEventDelegate),e.on("reset",(()=>{e.resetContent()})),!Nd(e)||s.submit.nodeType||s.submit.length||s._mceOldSubmit||(s._mceOldSubmit=s.submit,s.submit=()=>(e.editorManager.triggerSave(),e.setDirty(!1),s._mceOldSubmit(s)))),e.windowManager=Mw(e),e.notificationManager=Pw(e),(e=>"xml"===e.options.get("encoding"))(e)&&e.on("GetContent",(e=>{e.save&&(e.content=qT.encode(e.content))})),Rd(e)&&e.on("submit",(()=>{e.initialized&&e.save()})),Ad(e)&&(e._beforeUnload=()=>{!e.initialized||e.destroyed||e.isHidden()||e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),KT(e,e.suffix)})(this)}focus(e){this.execCommand("mceFocus",!1,e)}hasFocus(){return Rg(this)}translate(e){return Ka.translate(e)}getParam(e,t,n){const o=this.options;return o.isRegistered(e)||(C(n)?o.register(e,{processor:n,default:t}):o.register(e,{processor:M,default:t})),o.isSet(e)||v(t)?o.get(e):t}hasPlugin(e,t){return!(!H(Ld(this),e)||t&&void 0===Dw.get(e))}nodeChanged(e){this._nodeChangeDispatcher.nodeChanged(e)}addCommand(e,t,n){this.editorCommands.addCommand(e,t,n)}addQueryStateHandler(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)}addQueryValueHandler(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)}addShortcut(e,t,n,o){this.shortcuts.add(e,t,n,o)}execCommand(e,t,n,o){return this.editorCommands.execCommand(e,t,n,o)}queryCommandState(e){return this.editorCommands.queryCommandState(e)}queryCommandValue(e){return this.editorCommands.queryCommandValue(e)}queryCommandSupported(e){return this.editorCommands.queryCommandSupported(e)}show(){const e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable="true":(GO.show(e.getContainer()),GO.hide(e.id)),e.load(),e.dispatch("show"))}hide(){const e=this;e.hidden||(e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(GO.hide(e.getContainer()),GO.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.dispatch("hide"))}isHidden(){return this.hidden}setProgressState(e,t){this.dispatch("ProgressState",{state:e,time:t})}load(e={}){const t=this,n=t.getElement();if(t.removed)return"";if(n){const o={...e,load:!0},r=Zo(n)?n.value:n.innerHTML,s=t.setContent(r,o);return o.no_events||t.dispatch("LoadContent",{...o,element:n}),s}return""}save(e={}){const t=this;let n=t.getElement();if(!n||!t.initialized||t.removed)return"";const o={...e,save:!0,element:n};let r=t.getContent(o);const s={...o,content:r};if(s.no_events||t.dispatch("SaveContent",s),"raw"===s.format&&t.dispatch("RawSaveContent",s),r=s.content,Zo(n))n.value=r;else{!e.is_removing&&t.inline||(n.innerHTML=r);const o=GO.getParent(t.id,"form");o&&QO(o.elements,(e=>e.name!==t.id||(e.value=r,!1)))}return s.element=o.element=n=null,!1!==s.set_dirty&&t.setDirty(!1),r}setContent(e,t){return uw(this,e,t)}getContent(e){return((e,t={})=>{const n=((e,t)=>({...e,format:t,get:!0,getInner:!0}))(t,t.format?t.format:"html");return xC(e,n).fold(R,(t=>{const n=((e,t)=>ew(e).editor.getContent(t))(e,t);return EC(e,n,t)}))})(this,e)}insertContent(e,t){t&&(e=XO({content:e},t)),this.execCommand("mceInsertContent",!1,e)}resetContent(e){void 0===e?uw(this,this.startContent,{format:"raw"}):uw(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()}isDirty(){return!this.isNotDirty}setDirty(e){const t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.dispatch("dirty")}getContainer(){const e=this;return e.container||(e.container=e.editorContainer||GO.get(e.id+"_parent")),e.container}getContentAreaContainer(){return this.contentAreaContainer}getElement(){return this.targetElm||(this.targetElm=GO.get(this.id)),this.targetElm}getWin(){const e=this;if(!e.contentWindow){const t=e.iframeElement;t&&(e.contentWindow=t.contentWindow)}return e.contentWindow}getDoc(){const e=this;if(!e.contentDocument){const t=e.getWin();t&&(e.contentDocument=t.document)}return e.contentDocument}getBody(){var e,t;const n=this.getDoc();return null!==(t=null!==(e=this.bodyElement)&&void 0!==e?e:null==n?void 0:n.body)&&void 0!==t?t:null}convertURL(e,t,n){const o=this,r=o.options.get,s=qd(o);if(w(s))return s.call(o,e,n,!0,t);if(!r("convert_urls")||"link"===n||f(n)&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length)return e;const a=new aC(e);return"http"!==a.protocol&&"https"!==a.protocol&&""!==a.protocol?e:r("relative_urls")?o.documentBaseURI.toRelative(e):e=o.documentBaseURI.toAbsolute(e,r("remove_script_host"))}addVisual(e){((e,t)=>{((e,t)=>{tw(e).editor.addVisual(t)})(e,t)})(this,e)}setEditableRoot(e){((e,t)=>{e._editableRoot!==t&&(e._editableRoot=t,e.readonly||(e.getBody().contentEditable=String(e.hasEditableRoot()),e.nodeChanged()),((e,t)=>{e.dispatch("EditableRootStateChange",{state:t})})(e,t))})(this,e)}hasEditableRoot(){return this._editableRoot}remove(){(e=>{if(!e.removed){const{_selectionOverrides:t,editorUpload:n}=e,o=e.getBody(),r=e.getElement();o&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&C(null==r?void 0:r.nextSibling)&&Ew.remove(r.nextSibling),(e=>{e.dispatch("remove")})(e),e.editorManager.remove(e),!e.inline&&o&&(e=>{Ew.setStyle(e.id,"display",e.orgDisplay)})(e),(e=>{e.dispatch("detach")})(e),Ew.remove(e.getContainer()),_w(t),_w(n),e.destroy()}})(this)}destroy(e){((e,t)=>{const{selection:n,dom:o}=e;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),_w(n),_w(o)),(e=>{const t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,delete t._mceOldSubmit),Ew.unbind(t,"submit reset",e.formEventDelegate))})(e),(e=>{const t=e;t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null;const n=e.selection;if(n){const e=n.dom;t.selection=n.win=n.dom=e.doc=null}})(e),e.destroyed=!0):e.remove())})(this,e)}uploadImages(){return this.editorUpload.uploadImages()}_scanForImages(){return this.editorUpload.scanForImages()}}const ZO=za.DOM,eB=Pt.each;let tB,nB=!1,oB=[];const rB=e=>{const t=e.type;eB(lB.get(),(n=>{switch(t){case"scroll":n.dispatch("ScrollWindow",e);break;case"resize":n.dispatch("ResizeWindow",e)}}))},sB=e=>{if(e!==nB){const t=za.DOM;e?(t.bind(window,"resize",rB),t.bind(window,"scroll",rB)):(t.unbind(window,"resize",rB),t.unbind(window,"scroll",rB)),nB=e}},aB=e=>{const t=oB;return oB=Y(oB,(t=>e!==t)),lB.activeEditor===e&&(lB.activeEditor=oB.length>0?oB[0]:null),lB.focusedEditor===e&&(lB.focusedEditor=null),t.length!==oB.length},iB="CSS1Compat"!==document.compatMode,lB={...AO,baseURI:null,baseURL:null,defaultOptions:{},documentBaseURL:null,suffix:null,majorVersion:"6",minorVersion:"8.6",releaseDate:"TBD",i18n:Ka,activeEditor:null,focusedEditor:null,setup(){const e=this;let t="",n="",o=aC.getDocumentBaseUrl(document.location);/^[^:]+:\/\/\/?[^\/]+\//.test(o)&&(o=o.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(o)||(o+="/"));const r=window.tinymce||window.tinyMCEPreInit;if(r)t=r.base||r.baseURL,n=r.suffix;else{const e=document.getElementsByTagName("script");for(let o=0;o{Ya.PluginManager.urls[t]=e}))},init(e){const t=this;let n;const o=Pt.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," ");let r=e=>{n=e};const s=()=>{let n=0;const a=[];let i;ZO.unbind(window,"ready",s),(n=>{const o=e.onpageload;o&&o.apply(t,[])})(),i=((e,t)=>{const n=[],o=w(t)?e=>$(n,(n=>t(n,e))):e=>H(n,e);for(let t=0,r=e.length;tAt.browser.isIE()||At.browser.isEdge()?(jw("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tiny.cloud/docs/tinymce/6/support/#supportedwebbrowsers"),[]):iB?(jw("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[]):m(e.selector)?ZO.select(e.selector):C(e.target)?[e.target]:[])(e)),Pt.each(i,(e=>{var n;(n=t.get(e.id))&&n.initialized&&!(n.getContainer()||n.getBody()).parentNode&&(aB(n),n.unbindAllNativeEvents(),n.destroy(!0),n.removed=!0)})),i=Pt.grep(i,(e=>!t.get(e.id))),0===i.length?r([]):eB(i,(s=>{((e,t)=>e.inline&&t.tagName.toLowerCase()in o)(e,s)?jw("Could not initialize inline editor on invalid inline target element",s):((e,o,s)=>{const l=new JO(e,o,t);a.push(l),l.on("init",(()=>{++n===i.length&&r(a)})),l.targetElm=l.targetElm||s,l.render()})((e=>{let t=e.id;return t||(t=xe(e,"name").filter((e=>!ZO.get(e))).getOrThunk(ZO.uniqueId),e.setAttribute("id",t)),t})(s),e,s)}))};return ZO.bind(window,"ready",s),new Promise((e=>{n?e(n):r=t=>{e(t)}}))},get(e){return 0===arguments.length?oB.slice(0):m(e)?J(oB,(t=>t.id===e)).getOr(null):x(e)&&oB[e]?oB[e]:null},add(e){const t=this,n=t.get(e.id);return n===e||(null===n&&oB.push(e),sB(!0),t.activeEditor=e,t.dispatch("AddEditor",{editor:e}),tB||(tB=e=>{const n=t.dispatch("BeforeUnload");if(n.returnValue)return e.preventDefault(),e.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",tB))),e},createEditor(e,t){return this.add(new JO(e,t,this))},remove(e){const t=this;let n;if(e){if(!m(e))return n=e,h(t.get(n.id))?null:(aB(n)&&t.dispatch("RemoveEditor",{editor:n}),0===oB.length&&window.removeEventListener("beforeunload",tB),n.remove(),sB(oB.length>0),n);eB(ZO.select(e),(e=>{n=t.get(e.id),n&&t.remove(n)}))}else for(let e=oB.length-1;e>=0;e--)t.remove(oB[e])},execCommand(e,t,n){var o;const r=this,s=f(n)?null!==(o=n.id)&&void 0!==o?o:n.index:n;switch(e){case"mceAddEditor":if(!r.get(s)){const e=n.options;new JO(s,e,r).render()}return!0;case"mceRemoveEditor":{const e=r.get(s);return e&&e.remove(),!0}case"mceToggleEditor":{const e=r.get(s);return e?(e.isHidden()?e.show():e.hide(),!0):(r.execCommand("mceAddEditor",!1,n),!0)}}return!!r.activeEditor&&r.activeEditor.execCommand(e,t,n)},triggerSave:()=>{eB(oB,(e=>{e.save()}))},addI18n:(e,t)=>{Ka.add(e,t)},translate:e=>Ka.translate(e),setActive(e){const t=this.activeEditor;this.activeEditor!==e&&(t&&t.dispatch("deactivate",{relatedTarget:e}),e.dispatch("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl(e){this.baseURL=new aC(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new aC(this.baseURL)}};lB.setup();const dB=(()=>{const e=Xa();return{FakeClipboardItem:e=>({items:e,types:me(e),getType:t=>xe(e,t).getOrUndefined()}),write:t=>{e.set(t)},read:()=>e.get().getOrUndefined(),clear:e.clear}})(),cB=Math.min,uB=Math.max,mB=Math.round,fB=(e,t,n)=>{let o=t.x,r=t.y;const s=e.w,a=e.h,i=t.w,l=t.h,d=(n||"").split("");return"b"===d[0]&&(r+=l),"r"===d[1]&&(o+=i),"c"===d[0]&&(r+=mB(l/2)),"c"===d[1]&&(o+=mB(i/2)),"b"===d[3]&&(r-=a),"r"===d[4]&&(o-=s),"c"===d[3]&&(r-=mB(a/2)),"c"===d[4]&&(o-=mB(s/2)),gB(o,r,s,a)},gB=(e,t,n,o)=>({x:e,y:t,w:n,h:o}),pB={inflate:(e,t,n)=>gB(e.x-t,e.y-n,e.w+2*t,e.h+2*n),relativePosition:fB,findBestRelativePosition:(e,t,n,o)=>{for(let r=0;r=n.x&&s.x+s.w<=n.w+n.x&&s.y>=n.y&&s.y+s.h<=n.h+n.y)return o[r]}return null},intersect:(e,t)=>{const n=uB(e.x,t.x),o=uB(e.y,t.y),r=cB(e.x+e.w,t.x+t.w),s=cB(e.y+e.h,t.y+t.h);return r-n<0||s-o<0?null:gB(n,o,r-n,s-o)},clamp:(e,t,n)=>{let o=e.x,r=e.y,s=e.x+e.w,a=e.y+e.h;const i=t.x+t.w,l=t.y+t.h,d=uB(0,t.x-o),c=uB(0,t.y-r),u=uB(0,s-i),m=uB(0,a-l);return o+=d,r+=c,n&&(s+=d,a+=c,o-=u,r-=m),s-=u,a-=m,gB(o,r,s-o,a-r)},create:gB,fromClientRect:e=>gB(e.left,e.top,e.width,e.height)},hB=(()=>{const e={},t={},n={};return{load:(n,o)=>{const r=`Script at URL "${o}" failed to load`,s=`Script at URL "${o}" did not call \`tinymce.Resource.add('${n}', data)\` within 1 second`;if(void 0!==e[n])return e[n];{const a=new Promise(((e,a)=>{const i=((e,t,n=1e3)=>{let o=!1,r=null;const s=e=>(...t)=>{o||(o=!0,null!==r&&(clearTimeout(r),r=null),e.apply(null,t))},a=s(e),i=s(t);return{start:(...e)=>{o||null!==r||(r=setTimeout((()=>i.apply(null,e)),n))},resolve:a,reject:i}})(e,a);t[n]=i.resolve,Ha.ScriptLoader.loadScript(o).then((()=>i.start(s)),(()=>i.reject(r)))}));return e[n]=a,a}},add:(o,r)=>{void 0!==t[o]&&(t[o](r),delete t[o]),e[o]=Promise.resolve(r),n[o]=r},has:e=>e in n,get:e=>n[e],unload:t=>{delete e[t]}}})();let bB;try{const e="__storage_test__";bB=window.localStorage,bB.setItem(e,e),bB.removeItem(e)}catch(e){bB=(()=>{let e={},t=[];const n={getItem:t=>e[t]||null,setItem:(n,o)=>{t.push(n),e[n]=String(o)},key:e=>t[e],removeItem:n=>{t=t.filter((e=>e===n)),delete e[n]},clear:()=>{t=[],e={}},length:0};return Object.defineProperty(n,"length",{get:()=>t.length,configurable:!1,enumerable:!1}),n})()}const vB={geom:{Rect:pB},util:{Delay:vg,Tools:Pt,VK:af,URI:aC,EventDispatcher:NO,Observable:AO,I18n:Ka,LocalStorage:bB,ImageUploader:e=>{const t=Vw(),n=Gw(e,t);return{upload:(t,o=!0)=>n.upload(t,o?Yw(e):void 0)}}},dom:{EventUtils:Ta,TreeWalker:jo,TextSeeker:hi,DOMUtils:za,ScriptLoader:Ha,RangeUtils:Uf,Serializer:cw,StyleSheetLoader:Ms,ControlSelection:mf,BookmarkManager:Jm,Selection:iw,Event:Ta.Event},html:{Styles:wa,Entities:ea,Node:Wg,Schema:ua,DomParser:CC,Writer:cp,Serializer:up},Env:At,AddOnManager:Ya,Annotator:Qm,Formatter:ix,UndoManager:dx,EditorCommands:yO,WindowManager:Mw,NotificationManager:Pw,EditorObservable:LO,Shortcuts:KO,Editor:JO,FocusManager:bg,EditorManager:lB,DOM:za.DOM,ScriptLoader:Ha.ScriptLoader,PluginManager:Dw,ThemeManager:Lw,ModelManager:kw,IconManager:Sw,Resource:hB,FakeClipboard:dB,trim:Pt.trim,isArray:Pt.isArray,is:Pt.is,toArray:Pt.toArray,makeMap:Pt.makeMap,each:Pt.each,map:Pt.map,grep:Pt.grep,inArray:Pt.inArray,extend:Pt.extend,walk:Pt.walk,resolve:Pt.resolve,explode:Pt.explode,_addCacheSuffix:Pt._addCacheSuffix},yB=Pt.extend(lB,vB);(e=>{window.tinymce=e,window.tinyMCE=e})(yB),(e=>{if("object"==typeof module)try{module.exports=e}catch(e){}})(yB)}(); \ No newline at end of file diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tinymce.min.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tinymce.min.js.download:Zone.Identifier new file mode 100644 index 00000000..49f94538 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/tinymce.min.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/undraw_profile.svg b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/undraw_profile.svg new file mode 100644 index 00000000..98023417 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/undraw_profile.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/undraw_profile.svg:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/undraw_profile.svg:Zone.Identifier new file mode 100644 index 00000000..3b2a264e Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/undraw_profile.svg:Zone.Identifier differ diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/warning.umd.js.download b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/warning.umd.js.download new file mode 100644 index 00000000..2474aca9 --- /dev/null +++ b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/warning.umd.js.download @@ -0,0 +1,2 @@ +(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`.cdx-warning{position:relative}@media all and (min-width: 736px){.cdx-warning{padding-left:36px}}.cdx-warning [contentEditable=true][data-placeholder]:before{position:absolute;content:attr(data-placeholder);color:#707684;font-weight:400;opacity:0}.cdx-warning [contentEditable=true][data-placeholder]:empty:before{opacity:1}.cdx-warning [contentEditable=true][data-placeholder]:empty:focus:before{opacity:0}.cdx-warning:before{content:"";background-image:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='5' y='5' width='14' height='14' rx='4' stroke='black' stroke-width='2'/%3E%3Cline x1='12' y1='9' x2='12' y2='12' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M12 15.02V15.01' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");width:24px;height:24px;background-size:24px 24px;position:absolute;margin-top:8px;left:0}@media all and (max-width: 735px){.cdx-warning:before{display:none}}.cdx-warning__message{min-height:85px}.cdx-warning__title{margin-bottom:6px}`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})(); +(function(r,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self,r.Warning=n())})(this,function(){"use strict";const r='',n="";class a{static get isReadOnlySupported(){return!0}static get toolbox(){return{icon:r,title:"Warning"}}static get enableLineBreaks(){return!0}static get DEFAULT_TITLE_PLACEHOLDER(){return"Title"}static get DEFAULT_MESSAGE_PLACEHOLDER(){return"Message"}get CSS(){return{baseClass:this.api.styles.block,wrapper:"cdx-warning",title:"cdx-warning__title",input:this.api.styles.input,message:"cdx-warning__message"}}constructor({data:t,config:e,api:s,readOnly:i}){this.api=s,this.readOnly=i,this.titlePlaceholder=(e==null?void 0:e.titlePlaceholder)||a.DEFAULT_TITLE_PLACEHOLDER,this.messagePlaceholder=(e==null?void 0:e.messagePlaceholder)||a.DEFAULT_MESSAGE_PLACEHOLDER,this.data={title:t.title||"",message:t.message||""}}render(){const t=this._make("div",[this.CSS.baseClass,this.CSS.wrapper]),e=this._make("div",[this.CSS.input,this.CSS.title],{contentEditable:!this.readOnly,innerHTML:this.data.title}),s=this._make("div",[this.CSS.input,this.CSS.message],{contentEditable:!this.readOnly,innerHTML:this.data.message});return e.dataset.placeholder=this.titlePlaceholder,s.dataset.placeholder=this.messagePlaceholder,t.appendChild(e),t.appendChild(s),t}save(t){const e=t.querySelector(`.${this.CSS.title}`),s=t.querySelector(`.${this.CSS.message}`);return Object.assign(this.data,{title:(e==null?void 0:e.innerHTML)??"",message:(s==null?void 0:s.innerHTML)??""})}_make(t,e=null,s={}){const i=document.createElement(t);Array.isArray(e)?i.classList.add(...e):e&&i.classList.add(e);for(const l in s)i[l]=s[l];return i}static get sanitize(){return{title:{},message:{}}}}return a}); diff --git a/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/warning.umd.js.download:Zone.Identifier b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/warning.umd.js.download:Zone.Identifier new file mode 100644 index 00000000..31590363 Binary files /dev/null and b/sisvietnamvn_Trang chính thức hiện tại/Edit Page - SIS Vietnam - Manage_files/warning.umd.js.download:Zone.Identifier differ diff --git a/sisvietnamvn_main/.temp/output.html b/sisvietnamvn_main/.temp/output.html index 8e60d991..16cf0592 100644 --- a/sisvietnamvn_main/.temp/output.html +++ b/sisvietnamvn_main/.temp/output.html @@ -1744,10 +1744,10 @@ Date: Wed, 29 Jul 2026 15:57:14 GMT
    Students collaborate using a driving simulator in the UMass Center for Transportation.
    diff --git a/sisvietnamvn_main/.temp/snippets/content-top.html b/sisvietnamvn_main/.temp/snippets/content-top.html index 9d666ecb..99a2b04b 100644 --- a/sisvietnamvn_main/.temp/snippets/content-top.html +++ b/sisvietnamvn_main/.temp/snippets/content-top.html @@ -7,11 +7,9 @@
    Students collaborate using a driving simulator in the UMass Center for Transportation.
    - - - -