├── .npmignore ├── bun.lockb ├── assets ├── demo.gif └── demo.mov ├── dist ├── editorjs-columns.bundle.js.LICENSE.txt └── editorjs-columns.bundle.js ├── .gitignore ├── src ├── editorjs-columns.svg ├── editorjs-columns.scss └── editorjs-columns.js ├── .github └── workflows │ └── npm-publish.yml ├── package.json ├── webpack.config.js ├── example ├── assets │ ├── json-preview.js │ └── demo.css ├── example_data.js ├── example.html └── test.html ├── README.md └── extra └── editorjs-paragraph-linebreakable.bundle.js /.npmignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calumk/editorjs-columns/HEAD/bun.lockb -------------------------------------------------------------------------------- /assets/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calumk/editorjs-columns/HEAD/assets/demo.gif -------------------------------------------------------------------------------- /assets/demo.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calumk/editorjs-columns/HEAD/assets/demo.mov -------------------------------------------------------------------------------- /dist/editorjs-columns.bundle.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * Column Block for the Editor.js. 3 | * 4 | * @author Calum Knott (calum@calumk.com) 5 | * @copyright Calum Knott 6 | * @license The MIT License (MIT) 7 | */ 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | *.local 12 | 13 | # Editor directories and files 14 | .vscode/* 15 | !.vscode/extensions.json 16 | .idea 17 | .DS_Store 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | -------------------------------------------------------------------------------- /src/editorjs-columns.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.github/workflows/npm-publish.yml: -------------------------------------------------------------------------------- 1 | on: push 2 | 3 | jobs: 4 | publish: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v1 8 | - uses: actions/setup-node@v1 9 | with: 10 | node-version: 10 11 | - run: npm install 12 | - run: npm run build 13 | - uses: JS-DevTools/npm-publish@v1 14 | with: 15 | token: ${{ secrets.NPM_TOKEN }} 16 | access: "public" -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@calumk/editorjs-columns", 3 | "version": "0.3.2", 4 | "description": "Columns, for EditorJS", 5 | "main": "dist/editorjs-columns.bundle.js", 6 | "scripts": { 7 | "build": "webpack --mode production", 8 | "build:dev": "webpack --mode development --watch", 9 | "dev": "webpack-dev-server" 10 | }, 11 | "author": "Calum Knott", 12 | "license": "MIT", 13 | "dependencies": { 14 | "@editorjs/editorjs": "^2.26.5", 15 | "sweetalert2": "^11.4.10", 16 | "uuid": "^8.3.2" 17 | }, 18 | "devDependencies": { 19 | "css-loader": "^6.7.1", 20 | "sass": "^1.55.0", 21 | "sass-loader": "^13.0.2", 22 | "style-loader": "^3.3.1", 23 | "svg-inline-loader": "^0.8.2", 24 | "webpack": "^5.74.0", 25 | "webpack-cli": "^4.9.2" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | entry: './src/editorjs-columns.js', 5 | output: { 6 | path: path.join(__dirname, 'dist'), 7 | filename: 'editorjs-columns.bundle.js', 8 | library: 'editorjsColumns', 9 | libraryExport: 'default', 10 | libraryTarget: 'umd', 11 | }, 12 | 13 | module: { 14 | rules: [ 15 | { 16 | test: /\.css$/, 17 | use: [ 18 | 'style-loader', 19 | 'css-loader', 20 | ], 21 | }, 22 | { 23 | test: /\.s[ac]ss$/i, 24 | use: [ 25 | // Creates `style` nodes from JS strings 26 | "style-loader", 27 | // Translates CSS into CommonJS 28 | "css-loader", 29 | // Compiles Sass to CSS 30 | "sass-loader", 31 | ], 32 | }, 33 | { 34 | test: /\.svg$/, 35 | use : [{ 36 | loader : 'svg-inline-loader', 37 | options : { 38 | removeSVGTagAttrs : false 39 | } 40 | }] 41 | } 42 | ], 43 | }, 44 | // node: { global: true, fs: 'empty' }, 45 | // optimization: { 46 | // minimize: false 47 | // }, 48 | }; 49 | -------------------------------------------------------------------------------- /src/editorjs-columns.scss: -------------------------------------------------------------------------------- 1 | /* REQUIRED STYLES */ 2 | 3 | 4 | .ce-editorjsColumns_col{ 5 | flex: 50%; 6 | } 7 | 8 | 9 | 10 | 11 | .ce-editorjsColumns_wrapper{ 12 | display: flex; 13 | width:100%; 14 | gap: 10px; 15 | margin-bottom: 10px; 16 | flex-direction: row; 17 | 18 | .ce-toolbar__actions{ 19 | z-index:0; 20 | } 21 | 22 | .ce-toolbar{ 23 | z-index: 4; 24 | } 25 | 26 | .ce-popover{ 27 | z-index: 4000; 28 | } 29 | 30 | 31 | } 32 | 33 | @media (max-width: 800px) { 34 | .ce-editorjsColumns_wrapper { 35 | flex-direction: column; 36 | padding:10px; 37 | border: 1px solid #ccc; 38 | border-radius: 4px; 39 | } 40 | } 41 | 42 | 43 | 44 | /* 45 | 46 | These styles will also affect the parent editor!!!!!! 47 | 48 | */ 49 | 50 | .ce-inline-toolbar{ 51 | z-index:1000 52 | } 53 | 54 | .ce-block__content, 55 | .ce-toolbar__content { 56 | max-width: calc(100% - 50px); /* example value, adjust for your own use case */ 57 | } 58 | 59 | /* */ 60 | .ce-toolbar__actions{ 61 | right: calc(100% + 30px); 62 | background-color: rgba(255, 255, 255, 0.5); 63 | border-radius: 4px; 64 | } 65 | 66 | /* Would be better to remove --narrow mode */ 67 | /* Issue Raised */ 68 | /* // This causes an error which is good i think? */ 69 | .codex-editor--narrow .codex-editor__redactor{ 70 | margin: 0; 71 | } 72 | 73 | /* Required to prevent clipping */ 74 | .ce-toolbar{ 75 | z-index: 4; 76 | } 77 | 78 | .codex-editor{ 79 | /* background:#f00 !important; */ 80 | z-index: auto !important; 81 | } 82 | 83 | -------------------------------------------------------------------------------- /example/assets/json-preview.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module to compose output JSON preview 3 | */ 4 | const cPreview = (function (module) { 5 | /** 6 | * Shows JSON in pretty preview 7 | * @param {object} output - what to show 8 | * @param {Element} holder - where to show 9 | */ 10 | module.show = function(output, holder) { 11 | /** Make JSON pretty */ 12 | output = JSON.stringify( output, null, 4 ); 13 | /** Encode HTML entities */ 14 | output = encodeHTMLEntities( output ); 15 | /** Stylize! */ 16 | output = stylize( output ); 17 | holder.innerHTML = output; 18 | }; 19 | 20 | /** 21 | * Converts '>', '<', '&' symbols to entities 22 | */ 23 | function encodeHTMLEntities(string) { 24 | return string.replace(/&/g, '&').replace(//g, '>'); 25 | } 26 | 27 | /** 28 | * Some styling magic 29 | */ 30 | function stylize(string) { 31 | /** Stylize JSON keys */ 32 | string = string.replace( /"(\w+)"\s?:/g, '"$1" :'); 33 | /** Stylize tool names */ 34 | string = string.replace( /"(paragraph|quote|list|header|link|code|image|delimiter|raw|checklist|table|embed|warning)"/g, '"$1"'); 35 | /** Stylize HTML tags */ 36 | string = string.replace( /(<[\/a-z]+(>)?)/gi, '$1' ); 37 | /** Stylize strings */ 38 | string = string.replace( /"([^"]+)"/gi, '"$1"' ); 39 | /** Boolean/Null */ 40 | string = string.replace( /\b(true|false|null)\b/gi, '$1' ); 41 | return string; 42 | } 43 | 44 | return module; 45 | })({}); 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # @calumk/editorjs-Columns 2 | 3 | A plugin which allows the user to have columns! 4 | 5 | Please Read the **Known Bugs** Section! Pull requests are very much welcomed! 6 | 7 | ## Installation 8 | 9 | 10 | > npm i @calumk/editorjs-columns 11 | 12 | > https://cdn.jsdelivr.net/npm/@calumk/editorjs-columns@latest 13 | 14 | 15 | ## Demo 16 | 17 | ![demo](assets/demo.gif) 18 | 19 | ## Features 20 | 21 | * [x] Support new vertical menu style 22 | * [x] Save/Load 23 | * [x] Support for 2 colums 24 | * [x] Support for 3 columns 25 | * [x] Migrate storage to array 26 | * [x] Add tool to change type 27 | * [x] Added tool to switch/roll arrays 28 | * [ ] Refactor code for legibility 29 | * [ ] Tests 30 | 31 | 32 | 33 | ## ChangeLog 34 | 35 | > 28/04/23 - Re-added feature - EditorJs must now be passed as instance through tool to child, to avoid duplicate editorjs installs, and ensure only one editor js instance is used. 36 | > 16/05/22 - Removed global tool varable. Switched to config variable for column tools (see Example) 37 | > ~~22/05/22 - EditorJs must now be passed as instance through tool to child, to avoid duplicate editorjs installs~~ - Rolled Back 38 | 39 | 40 | # Known Bugs 41 | 42 | * Pressing enter key inside a column, will exit the column 43 | * Can be solved (sort-of) by using @calumk/editorjs-paragraph-linebreakable 44 | 45 | * Pressing tab key inside column will launch both column, and parent tools - This is hard to solve, as pasting triggers propergation up the column editor into the main editor 46 | * Copy/Pasting can cause duplication of data in the wrong place - This is hard to solve, as pasting triggers propergation up the column editor into the main editor 47 | 48 | * ~~z-index issues with toolboxes~~ 49 | * ~~Tools are hosted as global var~~ 50 | * ~~All Styling is currently only in the example.html~~ 51 | * ~~Column styling should move to plugin~~ 52 | * ~~Opinionaited styling (Borders, rounded corners, hover shaddow) will remain in example.html~~ 53 | * ~~SVG logo is not rendering correctly in new vertical menu~~ 54 | 55 | 56 | ## Docs 57 | None yet, see example/example.html for useage. 58 | 59 | 60 | --- 61 | 62 | > Note : Tools are passed to editorjs-columns using config.tools property 63 | 64 | ```javascript 65 | // first define the tools to be made avaliable in the columns 66 | let column_tools = { 67 | header: Header, 68 | alert : Alert, 69 | paragraph : editorjsParagraphLinebreakable, 70 | delimiter : Delimiter 71 | } 72 | 73 | // next define the tools in the main block 74 | // Warning - Dont just use main_tools - you will probably generate a circular reference 75 | let main_tools = { 76 | // Load Official Tools 77 | header: Header, 78 | alert : Alert, 79 | paragraph : editorjsParagraphLinebreakable, 80 | delimiter : Delimiter, 81 | 82 | columns : { 83 | class : editorjsColumns, 84 | config : { 85 | EditorJsLibrary : EditorJs, // Pass the library instance to the columns instance. 86 | tools : column_tools // IMPORTANT! ref the column_tools 87 | } 88 | }, 89 | } 90 | 91 | 92 | editor = new EditorJS({ 93 | tools : main_tools, 94 | }); 95 | ``` 96 | 97 | You can also use the i18n feature of Editor.js to change the text of the tools. 98 | ```javascript 99 | i18n: { 100 | messages: { 101 | toolNames: { 102 | Columns: `Columnas`, 103 | }, 104 | tools: { 105 | columns: { 106 | '2 Columns': `Dos columnas`, 107 | '3 Columns': `Tres columnas`, 108 | 'Roll Columns': `Rotar columnas`, 109 | 'Are you sure?': `¿Está seguro?`, 110 | 'This will delete Column 3!': `¡Esto eliminará la Columna 3!`, 111 | 'Yes, delete it!': `¡Sí, eliminar!`, 112 | Cancel: `Cancelar`, 113 | }, 114 | }, 115 | }, 116 | }; 117 | 118 | ``` 119 | -------------------------------------------------------------------------------- /example/example_data.js: -------------------------------------------------------------------------------- 1 | let example_data = { 2 | "blocks" : [ 3 | { 4 | "id" : "ikgkm_-QMP", 5 | "type" : "header", 6 | "data" : { 7 | "text" : "Example : @calumk/editorjs-columns ", 8 | "level" : 3 9 | } 10 | }, 11 | { 12 | "id" : "TiNrUV6dqT", 13 | "type" : "paragraph", 14 | "data" : { 15 | "text" : "This is an example of using EditorJs, with the @calumk/editorjs-columns package" 16 | } 17 | }, 18 | { 19 | "id" : "-COA6TMtAA", 20 | "type" : "delimiter", 21 | "data" : {} 22 | }, 23 | { 24 | "id" : "YWmRGUmuiI", 25 | "type" : "columns", 26 | "data" : { 27 | "cols" : [ 28 | { 29 | "time" : 1651768239769, 30 | "blocks" : [ 31 | { 32 | "id" : "H7fLJcfXeJ", 33 | "type" : "header", 34 | "data" : { 35 | "text" : "Column 1", 36 | "level" : 3 37 | } 38 | }, 39 | { 40 | "id" : "hJiCUezlKj", 41 | "type" : "paragraph", 42 | "data" : { 43 | "text" : "Column 1" 44 | } 45 | } 46 | ], 47 | "version" : "2.24.2" 48 | }, 49 | { 50 | "time" : 1651768239769, 51 | "blocks" : [ 52 | { 53 | "id" : "0gdIy2MAYf", 54 | "type" : "header", 55 | "data" : { 56 | "text" : "Column 2", 57 | "level" : 3 58 | } 59 | }, 60 | { 61 | "id" : "BW_XfHCpEq", 62 | "type" : "paragraph", 63 | "data" : { 64 | "text" : "Column 2" 65 | } 66 | } 67 | ], 68 | "version" : "2.24.2" 69 | } 70 | ] 71 | } 72 | }, 73 | { 74 | "id" : "GzFVCoh1KM", 75 | "type" : "columns", 76 | "data" : { 77 | "cols" : [ 78 | { 79 | "time" : 1652191341357, 80 | "blocks" : [ 81 | { 82 | "id" : "oRxIvvV0BU", 83 | "type" : "paragraph", 84 | "data" : { 85 | "text" : "A" 86 | } 87 | } 88 | ], 89 | "version" : "2.24.3" 90 | }, 91 | { 92 | "time" : 1652191341357, 93 | "blocks" : [ 94 | { 95 | "id" : "a9taH31sEo", 96 | "type" : "paragraph", 97 | "data" : { 98 | "text" : "B" 99 | } 100 | } 101 | ], 102 | "version" : "2.24.3" 103 | }, 104 | { 105 | "time" : 1652191341357, 106 | "blocks" : [ 107 | { 108 | "id" : "zJFadDCEbd", 109 | "type" : "paragraph", 110 | "data" : { 111 | "text" : "C" 112 | } 113 | } 114 | ], 115 | "version" : "2.24.3" 116 | } 117 | ] 118 | } 119 | } 120 | ], 121 | }; 122 | -------------------------------------------------------------------------------- /example/assets/demo.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Styles for the example page 3 | */ 4 | body { 5 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; 6 | font-size: 14px; 7 | line-height: 1.5em; 8 | margin: 0; 9 | } 10 | 11 | .svgicon{ 12 | width:30px; 13 | height:30px; 14 | padding:8px; 15 | display: inline-block; 16 | vertical-align : top 17 | } 18 | .ce-example { 19 | font-size: 16.2px; 20 | } 21 | 22 | .ce-example__header { 23 | border-bottom: 1px solid #E8E8EB; 24 | height: 50px; 25 | line-height: 50px; 26 | display: flex; 27 | padding: 0 30px; 28 | margin-bottom: 30px; 29 | flex-wrap: wrap; 30 | } 31 | 32 | .ce-example__header a { 33 | color: inherit; 34 | text-decoration: none; 35 | } 36 | 37 | .ce-example__header-logo { 38 | font-weight: bold; 39 | } 40 | 41 | .ce-example__header-menu { 42 | margin-left: auto; 43 | } 44 | 45 | @media all and (max-width: 730px){ 46 | .ce-example__header-menu { 47 | margin-left: 0; 48 | margin-top: 10px; 49 | flex-basis: 100%; 50 | font-size: 14px; 51 | } 52 | } 53 | 54 | .ce-example__header-menu a { 55 | margin-left: 20px; 56 | } 57 | 58 | @media all and (max-width: 730px){ 59 | .ce-example__header-menu a { 60 | margin-left: 0; 61 | margin-right: 15px; 62 | } 63 | } 64 | 65 | .ce-example__content { 66 | max-width: 1100px; 67 | margin: 0 auto; 68 | -webkit-font-smoothing: antialiased; 69 | -moz-osx-font-smoothing: grayscale; 70 | } 71 | 72 | .ce-example__content--small { 73 | max-width: 500px; 74 | border-left: 1px solid #eee; 75 | border-right: 1px solid #eee; 76 | padding: 0 15px; 77 | } 78 | 79 | .ce-example__content--with-bg { 80 | background: #f4f4f4; 81 | max-width: none; 82 | margin-top: -30px; 83 | } 84 | 85 | .ce-example__output { 86 | background: #1B202B; 87 | overflow-x: auto; 88 | padding: 0 30px; 89 | } 90 | 91 | .ce-example__output-content { 92 | max-width: 650px; 93 | margin: 30px auto; 94 | color: #ABADC3; 95 | font-family: 'PT Mono', Menlo, Monaco, Consolas, Courier New, monospace; 96 | font-size: 13.3px; 97 | } 98 | 99 | .ce-example__output-content:empty { 100 | display: none; 101 | } 102 | 103 | .ce-example__button { 104 | display: block; 105 | margin: 50px auto; 106 | max-width: 180px; 107 | background: #4A9DF8; 108 | padding: 17px 30px; 109 | box-shadow: 0 22px 18px -4px rgba(137, 207, 255, 0.77); 110 | transition: all 150ms ease; 111 | cursor: pointer; 112 | border-radius: 31px; 113 | color: #fff; 114 | font-family: 'PT Mono', Menlo, Monaco, Consolas, Courier New, monospace; 115 | text-align: center; 116 | } 117 | 118 | .ce-example__button:hover { 119 | background: #3D8DE5; 120 | transform: translateY(2px); 121 | box-shadow: 0 20px 15px -4px rgba(137, 207, 255, 0.77); 122 | } 123 | 124 | .ce-example__output-footer { 125 | padding: 30px 0; 126 | font-size: 14.2px; 127 | letter-spacing: 0.3px; 128 | text-align: center; 129 | } 130 | 131 | .ce-example__output-footer a { 132 | color: #fff; 133 | text-decoration: none; 134 | } 135 | 136 | .ce-example__statusbar { 137 | position: fixed; 138 | bottom: 10px; 139 | right: 10px; 140 | background: #fff; 141 | border-radius: 8px; 142 | box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); 143 | font-size: 12px; 144 | padding: 8px 15px; 145 | z-index: 1; 146 | } 147 | 148 | .ce-example__statusbar-button { 149 | display: inline-flex; 150 | margin-left: 10px; 151 | background: #4A9DF8; 152 | padding: 6px 12px; 153 | box-shadow: 0 7px 8px -4px rgba(137, 207, 255, 0.77); 154 | transition: all 150ms ease; 155 | cursor: pointer; 156 | border-radius: 31px; 157 | color: #fff; 158 | font-family: 'PT Mono', Menlo, Monaco, Consolas, Courier New, monospace; 159 | text-align: center; 160 | } 161 | 162 | @media all and (max-width: 730px){ 163 | .ce-example__header, 164 | .ce-example__content{ 165 | padding: 0 20px; 166 | } 167 | } 168 | 169 | /** 170 | * JSON highlighter 171 | */ 172 | .sc_attr { 173 | color: rgb(148, 162, 192); 174 | } 175 | .sc_key { 176 | color: rgb(190, 213, 255); 177 | } 178 | .sc_toolname { 179 | color: rgb(15, 205, 251); 180 | } 181 | .sc_tag { 182 | color: rgb(4, 131, 216); 183 | } 184 | .sc_bool { 185 | color: rgb(247, 60, 173); 186 | } 187 | 188 | .ce-example .ce-block:first-of-type h2.ce-header{ 189 | font-size: 50px; 190 | } 191 | 192 | .ce-example h2.ce-header{ 193 | font-size: 30px; 194 | } 195 | 196 | .ce-example h3.ce-header { 197 | font-size: 24px; 198 | } 199 | 200 | .ce-example h4.ce-header { 201 | font-size: 18px; 202 | } 203 | 204 | .ce-example-multiple { 205 | display: grid; 206 | grid-template-columns: calc(50% - 15px) calc(50% - 15px); 207 | gap: 30px; 208 | padding: 30px; 209 | } 210 | 211 | .ce-example-multiple > div { 212 | background: #fff; 213 | border-radius: 7px; 214 | padding: 30px; 215 | } 216 | -------------------------------------------------------------------------------- /example/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Editor.js example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 18 | 22 |
23 |
24 | 25 | 26 |
27 |
28 |
29 | 30 |
31 | editor.save() 32 |
33 |
34 | Readonly: 35 | 36 | Off 37 | 38 |
39 | toggle 40 |
41 |
42 |
43 |
44 |

 45 |     
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 159 | 160 | 161 | 194 | 195 | 196 | 197 | -------------------------------------------------------------------------------- /example/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Editor.js example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 18 | 22 |
23 |
24 | 25 | 26 |
27 |
28 |
29 | 30 |
31 | editor.save() 32 |
33 |
34 | Readonly: 35 | 36 | Off 37 | 38 |
39 | toggle 40 |
41 |
42 |
43 |
44 |

 45 |     
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 166 | 167 | 168 | 201 | 202 | 203 | -------------------------------------------------------------------------------- /src/editorjs-columns.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Column Block for the Editor.js. 3 | * 4 | * @author Calum Knott (calum@calumk.com) 5 | * @copyright Calum Knott 6 | * @license The MIT License (MIT) 7 | */ 8 | 9 | /** 10 | * @typedef {Object} EditorJsColumnsData 11 | * @description Tool's input and output data format 12 | */ 13 | 14 | import { v4 as uuidv4 } from "uuid"; 15 | import Swal from "sweetalert2"; 16 | 17 | import icon from "./editorjs-columns.svg"; 18 | import style from "./editorjs-columns.scss"; 19 | 20 | // import EditorJS from '@editorjs/editorjs'; // required for npm mode 21 | 22 | class EditorJsColumns { 23 | 24 | static get enableLineBreaks() { 25 | return true; 26 | } 27 | 28 | 29 | constructor({ data, config, api, readOnly }) { 30 | // console.log("API") 31 | // console.log(api) 32 | // start by setting up the required parts 33 | this.api = api; 34 | this.readOnly = readOnly; 35 | this.config = config || {} 36 | 37 | // console.log(this.config) 38 | 39 | // console.log(this.config.EditorJsLibrary) 40 | 41 | this._CSS = { 42 | block: this.api.styles.block, 43 | wrapper: "ce-EditorJsColumns", 44 | }; 45 | 46 | if (!this.readOnly) { 47 | this.onKeyUp = this.onKeyUp.bind(this); 48 | } 49 | 50 | 51 | 52 | this._data = {}; 53 | 54 | this.editors = {}; 55 | 56 | this.colWrapper = undefined; 57 | 58 | this.editors.cols = []; 59 | 60 | this.data = data; 61 | 62 | if (!Array.isArray(this.data.cols)) { 63 | this.data.cols = []; 64 | this.editors.numberOfColumns = 2; 65 | } else { 66 | this.editors.numberOfColumns = this.data.cols.length; 67 | } 68 | 69 | } 70 | 71 | static get isReadOnlySupported() { 72 | return true; 73 | } 74 | 75 | 76 | onKeyUp(e) { 77 | // console.log(e) 78 | // console.log("heyup") 79 | if (e.code !== "Backspace" && e.code !== "Delete") { 80 | return; 81 | } 82 | } 83 | 84 | get CSS() { 85 | return { 86 | settingsButton: this.api.styles.settingsButton, 87 | settingsButtonActive: this.api.styles.settingsButtonActive, 88 | }; 89 | } 90 | 91 | 92 | renderSettings() { 93 | return [ 94 | { 95 | icon : "2", 96 | label : this.api.i18n.t("2 Columns"), 97 | onActivate : () => {this._updateCols(2)} 98 | }, 99 | { 100 | icon : "3", 101 | label : this.api.i18n.t("3 Columns"), 102 | onActivate : () => {this._updateCols(3)} 103 | }, 104 | { 105 | icon : "R", 106 | label : this.api.i18n.t("Roll Columns"), 107 | onActivate : () => {this._rollColumns()} 108 | }, 109 | ] 110 | } 111 | 112 | 113 | _rollColumns() { 114 | // this shifts or "rolls" the columns 115 | this.data.cols.unshift(this.data.cols.pop()); 116 | this.editors.cols.unshift(this.editors.cols.pop()); 117 | this._rerender(); 118 | } 119 | 120 | async _updateCols(num) { 121 | // Should probably update to make number dynamic... but this will do for now 122 | if (num == 2) { 123 | if (this.editors.numberOfColumns == 3) { 124 | let resp = await Swal.fire({ 125 | title: this.api.i18n.t("Are you sure?"), 126 | text: this.api.i18n.t("This will delete Column 3!"), 127 | icon: "warning", 128 | showCancelButton: true, 129 | cancelButtonText: this.api.i18n.t("Cancel"), 130 | confirmButtonColor: "#3085d6", 131 | cancelButtonColor: "#d33", 132 | confirmButtonText: this.api.i18n.t("Yes, delete it!"), 133 | }); 134 | 135 | if (resp.isConfirmed) { 136 | this.editors.numberOfColumns = 2; 137 | this.data.cols.pop(); 138 | this.editors.cols.pop(); 139 | this._rerender(); 140 | } 141 | } 142 | } 143 | if (num == 3) { 144 | this.editors.numberOfColumns = 3; 145 | this._rerender(); 146 | // console.log(3); 147 | } 148 | } 149 | 150 | async _rerender() { 151 | await this.save(); 152 | // console.log(this.colWrapper); 153 | 154 | for (let index = 0; index < this.editors.cols.length; index++) { 155 | this.editors.cols[index].destroy(); 156 | } 157 | this.editors.cols = []; 158 | 159 | this.colWrapper.innerHTML = ""; 160 | 161 | // console.log("Building the columns"); 162 | 163 | for (let index = 0; index < this.editors.numberOfColumns; index++) { 164 | // console.log("Start column, ", index); 165 | let col = document.createElement("div"); 166 | col.classList.add("ce-editorjsColumns_col"); 167 | col.classList.add("editorjs_col_" + index); 168 | 169 | let editor_col_id = uuidv4(); 170 | // console.log("generating: ", editor_col_id); 171 | col.id = editor_col_id; 172 | 173 | this.colWrapper.appendChild(col); 174 | 175 | let editorjs_instance = new this.config.EditorJsLibrary({ 176 | defaultBlock: "paragraph", 177 | holder: editor_col_id, 178 | tools: this.config.tools, 179 | data: this.data.cols[index], 180 | readOnly: this.readOnly, 181 | minHeight: 50, 182 | }); 183 | 184 | this.editors.cols.push(editorjs_instance); 185 | } 186 | } 187 | 188 | render() { 189 | 190 | // This is needed to prevent the enter / tab keys - it globally removes them!!! 191 | 192 | 193 | // // it runs MULTIPLE times. - this is not good, but works for now 194 | 195 | 196 | 197 | 198 | 199 | 200 | // console.log("Generating Wrapper"); 201 | 202 | // console.log(this.api.blocks.getCurrentBlockIndex()); 203 | 204 | this.colWrapper = document.createElement("div"); 205 | this.colWrapper.classList.add("ce-editorjsColumns_wrapper"); 206 | 207 | 208 | 209 | // astops the double paste issue 210 | this.colWrapper.addEventListener('paste', (event) => { 211 | // event.preventDefault(); 212 | event.stopPropagation(); 213 | }, true); 214 | 215 | 216 | 217 | this.colWrapper.addEventListener('keydown', (event) => { 218 | 219 | // if (event.key === "Enter" && event.altKey) { 220 | // console.log("ENTER ALT Captured") 221 | // console.log(event.target) 222 | 223 | // // let b = event.target.dispatchEvent(new KeyboardEvent('keyup',{'key':'a'})); 224 | 225 | // event.target.innerText += "Aß" 226 | 227 | // // console.log(b) 228 | // } 229 | // else 230 | if (event.key === "Enter") { 231 | event.preventDefault(); 232 | event.stopImmediatePropagation(); 233 | event.stopPropagation(); 234 | 235 | // console.log("ENTER Captured") 236 | // this.api.blocks.insertNewBlock({type : "alert"}); 237 | // console.log("Added Block") 238 | } 239 | if (event.key === "Tab") { 240 | // event.stopImmediatePropagation(); 241 | event.preventDefault(); 242 | event.stopImmediatePropagation(); 243 | event.stopPropagation(); 244 | 245 | // console.log("TAB Captured") 246 | } 247 | }); 248 | 249 | 250 | 251 | 252 | 253 | for (let index = 0; index < this.editors.cols.length; index++) { 254 | this.editors.cols[index].destroy(); 255 | } 256 | 257 | // console.log(this.editors.cols); 258 | this.editors.cols = []; //empty the array of editors 259 | // console.log(this.editors.cols); 260 | 261 | // console.log("Building the columns"); 262 | 263 | for (let index = 0; index < this.editors.numberOfColumns; index++) { 264 | // console.log("Start column, ", index); 265 | let col = document.createElement("div"); 266 | col.classList.add("ce-editorjsColumns_col"); 267 | col.classList.add("editorjs_col_" + index); 268 | 269 | let editor_col_id = uuidv4(); 270 | // console.log("generating: ", editor_col_id); 271 | col.id = editor_col_id; 272 | 273 | this.colWrapper.appendChild(col); 274 | 275 | let editorjs_instance = new this.config.EditorJsLibrary({ 276 | defaultBlock: "paragraph", 277 | holder: editor_col_id, 278 | tools: this.config.tools, 279 | data: this.data.cols[index], 280 | readOnly: this.readOnly, 281 | minHeight: 50, 282 | }); 283 | 284 | this.editors.cols.push(editorjs_instance); 285 | // console.log("End column, ", index); 286 | } 287 | return this.colWrapper; 288 | } 289 | 290 | async save() { 291 | if(!this.readOnly){ 292 | // console.log("Saving"); 293 | for (let index = 0; index < this.editors.cols.length; index++) { 294 | let colData = await this.editors.cols[index].save(); 295 | this.data.cols[index] = colData; 296 | } 297 | } 298 | return this.data; 299 | } 300 | 301 | static get toolbox() { 302 | return { 303 | icon: icon, 304 | title: "Columns", 305 | }; 306 | } 307 | } 308 | 309 | export { EditorJsColumns as default }; 310 | -------------------------------------------------------------------------------- /extra/editorjs-paragraph-linebreakable.bundle.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). 3 | * This devtool is neither made for production nor for readable output files. 4 | * It uses "eval()" calls to create a separate source file in the browser devtools. 5 | * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) 6 | * or disable the default devtool with "devtool: false". 7 | * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). 8 | */ 9 | (function webpackUniversalModuleDefinition(root, factory) { 10 | if(typeof exports === 'object' && typeof module === 'object') 11 | module.exports = factory(); 12 | else if(typeof define === 'function' && define.amd) 13 | define([], factory); 14 | else if(typeof exports === 'object') 15 | exports["editorjsParagraphLinebreakable"] = factory(); 16 | else 17 | root["editorjsParagraphLinebreakable"] = factory(); 18 | })(self, () => { 19 | return /******/ (() => { // webpackBootstrap 20 | /******/ var __webpack_modules__ = ({ 21 | 22 | /***/ "./node_modules/css-loader/dist/cjs.js!./src/editorjs-paragraph-linebreakable.css": 23 | /*!****************************************************************************************!*\ 24 | !*** ./node_modules/css-loader/dist/cjs.js!./src/editorjs-paragraph-linebreakable.css ***! 25 | \****************************************************************************************/ 26 | /***/ ((module, __webpack_exports__, __webpack_require__) => { 27 | 28 | "use strict"; 29 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ce-paragraphLineBreakable {\\n line-height: 1.6em;\\n outline: none;\\n /* background-color: #0091DB; */\\n /* color:#fff; */\\n /* padding: 10px; */\\n /* margin : 15px; */\\n}\\n/* .ce-paragraphLineBreakable::before {\\n content: \\\"DSLE:\\\";\\n color: #fff;\\n font-weight: bold;\\n width:100%;\\n display: inline-block;\\n}\\n\\n.ce-paragraphLineBreakable[data-placeholder]:empty::before{\\n content: attr(data-placeholder);\\n color: #707684;\\n font-weight: normal;\\n opacity: 0;\\n} */\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./src/editorjs-paragraph-linebreakable.css?./node_modules/css-loader/dist/cjs.js"); 30 | 31 | /***/ }), 32 | 33 | /***/ "./node_modules/css-loader/dist/runtime/api.js": 34 | /*!*****************************************************!*\ 35 | !*** ./node_modules/css-loader/dist/runtime/api.js ***! 36 | \*****************************************************/ 37 | /***/ ((module) => { 38 | 39 | "use strict"; 40 | eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n\n content += cssWithMappingToString(item);\n\n if (needLayer) {\n content += \"}\";\n }\n\n if (item[2]) {\n content += \"}\";\n }\n\n if (item[4]) {\n content += \"}\";\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n\n\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./node_modules/css-loader/dist/runtime/api.js?"); 41 | 42 | /***/ }), 43 | 44 | /***/ "./node_modules/css-loader/dist/runtime/noSourceMaps.js": 45 | /*!**************************************************************!*\ 46 | !*** ./node_modules/css-loader/dist/runtime/noSourceMaps.js ***! 47 | \**************************************************************/ 48 | /***/ ((module) => { 49 | 50 | "use strict"; 51 | eval("\n\nmodule.exports = function (i) {\n return i[1];\n};\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./node_modules/css-loader/dist/runtime/noSourceMaps.js?"); 52 | 53 | /***/ }), 54 | 55 | /***/ "./src/editorjs-paragraph-linebreakable.css": 56 | /*!**************************************************!*\ 57 | !*** ./src/editorjs-paragraph-linebreakable.css ***! 58 | \**************************************************/ 59 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 60 | 61 | "use strict"; 62 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertBySelector.js */ \"./node_modules/style-loader/dist/runtime/insertBySelector.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \"./node_modules/style-loader/dist/runtime/styleTagTransform.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_editorjs_paragraph_linebreakable_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./editorjs-paragraph-linebreakable.css */ \"./node_modules/css-loader/dist/cjs.js!./src/editorjs-paragraph-linebreakable.css\");\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\n\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \"head\");\n \noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_editorjs_paragraph_linebreakable_css__WEBPACK_IMPORTED_MODULE_6__[\"default\"], options);\n\n\n\n\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_editorjs_paragraph_linebreakable_css__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && _node_modules_css_loader_dist_cjs_js_editorjs_paragraph_linebreakable_css__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals ? _node_modules_css_loader_dist_cjs_js_editorjs_paragraph_linebreakable_css__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals : undefined);\n\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./src/editorjs-paragraph-linebreakable.css?"); 63 | 64 | /***/ }), 65 | 66 | /***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": 67 | /*!****************************************************************************!*\ 68 | !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! 69 | \****************************************************************************/ 70 | /***/ ((module) => { 71 | 72 | "use strict"; 73 | eval("\n\nvar stylesInDOM = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n\n return updater;\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n\n stylesInDOM.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?"); 74 | 75 | /***/ }), 76 | 77 | /***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js": 78 | /*!********************************************************************!*\ 79 | !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***! 80 | \********************************************************************/ 81 | /***/ ((module) => { 82 | 83 | "use strict"; 84 | eval("\n\nvar memo = {};\n/* istanbul ignore next */\n\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n}\n/* istanbul ignore next */\n\n\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n}\n\nmodule.exports = insertBySelector;\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./node_modules/style-loader/dist/runtime/insertBySelector.js?"); 85 | 86 | /***/ }), 87 | 88 | /***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js": 89 | /*!**********************************************************************!*\ 90 | !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***! 91 | \**********************************************************************/ 92 | /***/ ((module) => { 93 | 94 | "use strict"; 95 | eval("\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\n\nmodule.exports = insertStyleElement;\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./node_modules/style-loader/dist/runtime/insertStyleElement.js?"); 96 | 97 | /***/ }), 98 | 99 | /***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js": 100 | /*!**********************************************************************************!*\ 101 | !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***! 102 | \**********************************************************************************/ 103 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { 104 | 105 | "use strict"; 106 | eval("\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = true ? __webpack_require__.nc : 0;\n\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\n\nmodule.exports = setAttributesWithoutAttributes;\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js?"); 107 | 108 | /***/ }), 109 | 110 | /***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js": 111 | /*!***************************************************************!*\ 112 | !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***! 113 | \***************************************************************/ 114 | /***/ ((module) => { 115 | 116 | "use strict"; 117 | eval("\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n\n var needLayer = typeof obj.layer !== \"undefined\";\n\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n\n css += obj.css;\n\n if (needLayer) {\n css += \"}\";\n }\n\n if (obj.media) {\n css += \"}\";\n }\n\n if (obj.supports) {\n css += \"}\";\n }\n\n var sourceMap = obj.sourceMap;\n\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n options.styleTagTransform(css, styleElement, options.options);\n}\n\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n\n styleElement.parentNode.removeChild(styleElement);\n}\n/* istanbul ignore next */\n\n\nfunction domAPI(options) {\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\n\nmodule.exports = domAPI;\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./node_modules/style-loader/dist/runtime/styleDomAPI.js?"); 118 | 119 | /***/ }), 120 | 121 | /***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js": 122 | /*!*********************************************************************!*\ 123 | !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***! 124 | \*********************************************************************/ 125 | /***/ ((module) => { 126 | 127 | "use strict"; 128 | eval("\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n\n styleElement.appendChild(document.createTextNode(css));\n }\n}\n\nmodule.exports = styleTagTransform;\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./node_modules/style-loader/dist/runtime/styleTagTransform.js?"); 129 | 130 | /***/ }), 131 | 132 | /***/ "./src/editorjs-paragraph-linebreakable.svg": 133 | /*!**************************************************!*\ 134 | !*** ./src/editorjs-paragraph-linebreakable.svg ***! 135 | \**************************************************/ 136 | /***/ ((module) => { 137 | 138 | eval("module.exports = \"\"\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./src/editorjs-paragraph-linebreakable.svg?"); 139 | 140 | /***/ }), 141 | 142 | /***/ "./src/editorjs-paragraph-linebreakable.js": 143 | /*!*************************************************!*\ 144 | !*** ./src/editorjs-paragraph-linebreakable.js ***! 145 | \*************************************************/ 146 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 147 | 148 | "use strict"; 149 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ParagraphLineBreakable)\n/* harmony export */ });\n/* harmony import */ var _editorjs_paragraph_linebreakable_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./editorjs-paragraph-linebreakable.css */ \"./src/editorjs-paragraph-linebreakable.css\");\n/* harmony import */ var _editorjs_paragraph_linebreakable_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./editorjs-paragraph-linebreakable.svg */ \"./src/editorjs-paragraph-linebreakable.svg\");\n/* harmony import */ var _editorjs_paragraph_linebreakable_svg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_editorjs_paragraph_linebreakable_svg__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * Build styles\n */\n// require('./index.css').toString();\n\n /**\n * Base ParagraphLineBreakable Block for the Editor.js.\n * Represents simple paragraphLineBreakable\n *\n * @author CK (team@codex.so)\n * @copyright Calumk123\n * @license The MIT License (MIT)\n */\n \n /**\n * @typedef {object} ParagraphLineBreakableConfig\n * @property {string} placeholder - placeholder for the empty paragraphLineBreakable\n * @property {boolean} preserveBlank - Whether or not to keep blank paragraphLineBreakables when saving editor data\n */\n \n /**\n * @typedef {Object} ParagraphLineBreakableData\n * @description Tool's input and output data format\n * @property {String} text — ParagraphLineBreakable's content. Can include HTML tags: \n */\n\n\n\n\n\n\n\n class ParagraphLineBreakable {\n /**\n * Default placeholder for ParagraphLineBreakable Tool\n *\n * @return {string}\n * @constructor\n */\n static get DEFAULT_PLACEHOLDER() {\n return 'Hello :)';\n }\n\n static get enableLineBreaks() {\n return true;\n }\n \n /**\n * Render plugin`s main Element and fill it with saved data\n *\n * @param {object} params - constructor params\n * @param {ParagraphLineBreakableData} params.data - previously saved data\n * @param {ParagraphLineBreakableConfig} params.config - user config for Tool\n * @param {object} params.api - editor.js api\n * @param {boolean} readOnly - read only mode flag\n */\n constructor({data, config, api, readOnly}) {\n this.api = api;\n this.readOnly = readOnly;\n \n this._CSS = {\n block: this.api.styles.block,\n wrapper: 'ce-paragraphLineBreakable'\n };\n \n if (!this.readOnly) {\n this.onKeyUp = this.onKeyUp.bind(this);\n }\n \n /**\n * Placeholder for paragraphLineBreakable if it is first Block\n * @type {string}\n */\n this._placeholder = config.placeholder ? config.placeholder : ParagraphLineBreakable.DEFAULT_PLACEHOLDER;\n this._data = {};\n this._element = this.drawView();\n this._preserveBlank = config.preserveBlank !== undefined ? config.preserveBlank : false;\n \n this.data = data;\n }\n \n /**\n * Check if text content is empty and set empty string to inner html.\n * We need this because some browsers (e.g. Safari) insert
into empty contenteditanle elements\n *\n * @param {KeyboardEvent} e - key up event\n */\n onKeyUp(e) {\n console.log(e)\n if (e.code !== 'Backspace' && e.code !== 'Delete') {\n return;\n }\n \n const {textContent} = this._element;\n \n if (textContent === '') {\n this._element.innerHTML = '';\n }\n }\n \n /**\n * Create Tool's view\n * @return {HTMLElement}\n * @private\n */\n drawView() {\n let div = document.createElement('DIV');\n \n div.classList.add(this._CSS.wrapper, this._CSS.block);\n div.contentEditable = false;\n div.dataset.placeholder = this.api.i18n.t(this._placeholder);\n \n if (!this.readOnly) {\n div.contentEditable = true;\n div.addEventListener('keyup', this.onKeyUp);\n }\n \n return div;\n }\n \n /**\n * Return Tool's view\n *\n * @returns {HTMLDivElement}\n */\n render() {\n return this._element;\n }\n \n /**\n * Method that specified how to merge two Text blocks.\n * Called by Editor.js by backspace at the beginning of the Block\n * @param {ParagraphLineBreakableData} data\n * @public\n */\n merge(data) {\n let newData = {\n text : this.data.text + data.text\n };\n \n this.data = newData;\n }\n \n /**\n * Validate ParagraphLineBreakable block data:\n * - check for emptiness\n *\n * @param {ParagraphLineBreakableData} savedData — data received after saving\n * @returns {boolean} false if saved data is not correct, otherwise true\n * @public\n */\n validate(savedData) {\n if (savedData.text.trim() === '' && !this._preserveBlank) {\n return false;\n }\n \n return true;\n }\n \n /**\n * Extract Tool's data from the view\n * @param {HTMLDivElement} toolsContent - ParagraphLineBreakable tools rendered view\n * @returns {ParagraphLineBreakableData} - saved data\n * @public\n */\n save(toolsContent) {\n return {\n text: toolsContent.innerHTML\n };\n }\n \n /**\n * On paste callback fired from Editor.\n *\n * @param {PasteEvent} event - event with pasted data\n */\n onPaste(event) {\n const data = {\n text: event.detail.data.innerHTML\n };\n \n this.data = data;\n }\n \n /**\n * Enable Conversion Toolbar. ParagraphLineBreakable can be converted to/from other tools\n */\n // static get conversionConfig() {\n // return {\n // export: 'text', // to convert ParagraphLineBreakable to other block, use 'text' property of saved data\n // import: 'text' // to covert other block's exported string to ParagraphLineBreakable, fill 'text' property of tool data\n // };\n // }\n \n /**\n * Sanitizer rules\n */\n static get sanitize() {\n return {\n text: {\n br: true,\n div: true,\n }\n };\n }\n \n /**\n * Returns true to notify the core that read-only mode is supported\n *\n * @return {boolean}\n */\n static get isReadOnlySupported() {\n return true;\n }\n \n /**\n * Get current Tools`s data\n * @returns {ParagraphLineBreakableData} Current data\n * @private\n */\n get data() {\n let text = this._element.innerHTML;\n \n this._data.text = text;\n \n return this._data;\n }\n \n /**\n * Store data in plugin:\n * - at the this._data property\n * - at the HTML\n *\n * @param {ParagraphLineBreakableData} data — data to set\n * @private\n */\n set data(data) {\n this._data = data || {};\n \n this._element.innerHTML = this._data.text || '';\n }\n \n /**\n * Used by Editor paste handling API.\n * Provides configuration to handle P tags.\n *\n * @returns {{tags: string[]}}\n */\n static get pasteConfig() {\n return {\n tags: [ 'P' ]\n };\n }\n \n /**\n * Icon and title for displaying at the Toolbox\n *\n * @return {{icon: string, title: string}}\n */\n static get toolbox() {\n return {\n icon: (_editorjs_paragraph_linebreakable_svg__WEBPACK_IMPORTED_MODULE_1___default()),\n title: 'Paragraph'\n };\n }\n }\n \n\n\n//# sourceURL=webpack://editorjsParagraphLinebreakable/./src/editorjs-paragraph-linebreakable.js?"); 150 | 151 | /***/ }) 152 | 153 | /******/ }); 154 | /************************************************************************/ 155 | /******/ // The module cache 156 | /******/ var __webpack_module_cache__ = {}; 157 | /******/ 158 | /******/ // The require function 159 | /******/ function __webpack_require__(moduleId) { 160 | /******/ // Check if module is in cache 161 | /******/ var cachedModule = __webpack_module_cache__[moduleId]; 162 | /******/ if (cachedModule !== undefined) { 163 | /******/ return cachedModule.exports; 164 | /******/ } 165 | /******/ // Create a new module (and put it into the cache) 166 | /******/ var module = __webpack_module_cache__[moduleId] = { 167 | /******/ id: moduleId, 168 | /******/ // no module.loaded needed 169 | /******/ exports: {} 170 | /******/ }; 171 | /******/ 172 | /******/ // Execute the module function 173 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 174 | /******/ 175 | /******/ // Return the exports of the module 176 | /******/ return module.exports; 177 | /******/ } 178 | /******/ 179 | /************************************************************************/ 180 | /******/ /* webpack/runtime/compat get default export */ 181 | /******/ (() => { 182 | /******/ // getDefaultExport function for compatibility with non-harmony modules 183 | /******/ __webpack_require__.n = (module) => { 184 | /******/ var getter = module && module.__esModule ? 185 | /******/ () => (module['default']) : 186 | /******/ () => (module); 187 | /******/ __webpack_require__.d(getter, { a: getter }); 188 | /******/ return getter; 189 | /******/ }; 190 | /******/ })(); 191 | /******/ 192 | /******/ /* webpack/runtime/define property getters */ 193 | /******/ (() => { 194 | /******/ // define getter functions for harmony exports 195 | /******/ __webpack_require__.d = (exports, definition) => { 196 | /******/ for(var key in definition) { 197 | /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 198 | /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 199 | /******/ } 200 | /******/ } 201 | /******/ }; 202 | /******/ })(); 203 | /******/ 204 | /******/ /* webpack/runtime/hasOwnProperty shorthand */ 205 | /******/ (() => { 206 | /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 207 | /******/ })(); 208 | /******/ 209 | /******/ /* webpack/runtime/make namespace object */ 210 | /******/ (() => { 211 | /******/ // define __esModule on exports 212 | /******/ __webpack_require__.r = (exports) => { 213 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 214 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 215 | /******/ } 216 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 217 | /******/ }; 218 | /******/ })(); 219 | /******/ 220 | /************************************************************************/ 221 | /******/ 222 | /******/ // startup 223 | /******/ // Load entry module and return exports 224 | /******/ // This entry module can't be inlined because the eval devtool is used. 225 | /******/ var __webpack_exports__ = __webpack_require__("./src/editorjs-paragraph-linebreakable.js"); 226 | /******/ __webpack_exports__ = __webpack_exports__["default"]; 227 | /******/ 228 | /******/ return __webpack_exports__; 229 | /******/ })() 230 | ; 231 | }); -------------------------------------------------------------------------------- /dist/editorjs-columns.bundle.js: -------------------------------------------------------------------------------- 1 | /*! For license information please see editorjs-columns.bundle.js.LICENSE.txt */ 2 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.editorjsColumns=e():t.editorjsColumns=e()}(self,(()=>(()=>{var t={745:(t,e,o)=>{"use strict";o.d(e,{Z:()=>r});var n=o(81),a=o.n(n),s=o(645),i=o.n(s)()(a());i.push([t.id,".ce-editorjsColumns_col{flex:50%}.ce-editorjsColumns_wrapper{display:flex;width:100%;gap:10px;margin-bottom:10px;flex-direction:row}.ce-editorjsColumns_wrapper .ce-toolbar__actions{z-index:0}.ce-editorjsColumns_wrapper .ce-toolbar{z-index:4}.ce-editorjsColumns_wrapper .ce-popover{z-index:4000}@media(max-width: 800px){.ce-editorjsColumns_wrapper{flex-direction:column;padding:10px;border:1px solid #ccc;border-radius:4px}}.ce-inline-toolbar{z-index:1000}.ce-block__content,.ce-toolbar__content{max-width:calc(100% - 50px)}.ce-toolbar__actions{right:calc(100% + 30px);background-color:rgba(255,255,255,.5);border-radius:4px}.codex-editor--narrow .codex-editor__redactor{margin:0}.ce-toolbar{z-index:4}.codex-editor{z-index:auto !important}",""]);const r=i},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,a,s){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(n)for(var r=0;r0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),a&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=a):d[4]="".concat(a)),e.push(d))}},e}},81:t=>{"use strict";t.exports=function(t){return t[1]}},379:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,o)=>{"use strict";t.exports=function(t){var e=o.nc;e&&t.setAttribute("nonce",e)}},795:t=>{"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(o){!function(t,e,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var a=void 0!==o.layer;a&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,a&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var s=o.sourceMap;s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,o)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},40:t=>{t.exports=''},455:function(t){t.exports=function(){"use strict";const t="SweetAlert2:",e=t=>t.charAt(0).toUpperCase()+t.slice(1),o=t=>Array.prototype.slice.call(t),n=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},a=e=>{console.error("".concat(t," ").concat(e))},s=[],i=(t,e)=>{var o;o='"'.concat(t,'" is deprecated and will be removed in the next major release. Please use "').concat(e,'" instead.'),s.includes(o)||(s.push(o),n(o))},r=t=>"function"==typeof t?t():t,l=t=>t&&"function"==typeof t.toPromise,c=t=>l(t)?t.toPromise():Promise.resolve(t),d=t=>t&&Promise.resolve(t)===t,u={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},p=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],m={},w=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],g=t=>Object.prototype.hasOwnProperty.call(u,t),h=t=>-1!==p.indexOf(t),f=t=>m[t],b=t=>{g(t)||n('Unknown parameter "'.concat(t,'"'))},y=t=>{w.includes(t)&&n('The parameter "'.concat(t,'" is incompatible with toasts'))},v=t=>{f(t)&&i(t,f(t))},x=t=>{const e={};for(const o in t)e[t[o]]="swal2-"+t[o];return e},k=x(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","no-war"]),C=x(["success","warning","info","question","error"]),A=()=>document.body.querySelector(".".concat(k.container)),B=t=>{const e=A();return e?e.querySelector(t):null},P=t=>B(".".concat(t)),E=()=>P(k.popup),T=()=>P(k.icon),S=()=>P(k.title),j=()=>P(k["html-container"]),O=()=>P(k.image),L=()=>P(k["progress-steps"]),z=()=>P(k["validation-message"]),M=()=>B(".".concat(k.actions," .").concat(k.confirm)),I=()=>B(".".concat(k.actions," .").concat(k.deny)),q=()=>B(".".concat(k.loader)),D=()=>B(".".concat(k.actions," .").concat(k.cancel)),H=()=>P(k.actions),_=()=>P(k.footer),V=()=>P(k["timer-progress-bar"]),N=()=>P(k.close),R=()=>{const t=o(E().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((t,e)=>{const o=parseInt(t.getAttribute("tabindex")),n=parseInt(e.getAttribute("tabindex"));return o>n?1:o"-1"!==t.getAttribute("tabindex")));return(t=>{const e=[];for(let o=0;oit(t)))},U=()=>F(document.body,k.shown)&&!F(document.body,k["toast-shown"])&&!F(document.body,k["no-backdrop"]),Z=()=>E()&&F(E(),k.toast),W={previousBodyPadding:null},Y=(t,e)=>{if(t.textContent="",e){const n=(new DOMParser).parseFromString(e,"text/html");o(n.querySelector("head").childNodes).forEach((e=>{t.appendChild(e)})),o(n.querySelector("body").childNodes).forEach((e=>{t.appendChild(e)}))}},F=(t,e)=>{if(!e)return!1;const o=e.split(/\s+/);for(let e=0;e{if(((t,e)=>{o(t.classList).forEach((o=>{Object.values(k).includes(o)||Object.values(C).includes(o)||Object.values(e.showClass).includes(o)||t.classList.remove(o)}))})(t,e),e.customClass&&e.customClass[a]){if("string"!=typeof e.customClass[a]&&!e.customClass[a].forEach)return n("Invalid type of customClass.".concat(a,'! Expected string or iterable object, got "').concat(typeof e.customClass[a],'"'));Q(t,e.customClass[a])}},K=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(".".concat(k.popup," > .").concat(k[e]));case"checkbox":return t.querySelector(".".concat(k.popup," > .").concat(k.checkbox," input"));case"radio":return t.querySelector(".".concat(k.popup," > .").concat(k.radio," input:checked"))||t.querySelector(".".concat(k.popup," > .").concat(k.radio," input:first-child"));case"range":return t.querySelector(".".concat(k.popup," > .").concat(k.range," input"));default:return t.querySelector(".".concat(k.popup," > .").concat(k.input))}},X=t=>{if(t.focus(),"file"!==t.type){const e=t.value;t.value="",t.value=e}},J=(t,e,o)=>{t&&e&&("string"==typeof e&&(e=e.split(/\s+/).filter(Boolean)),e.forEach((e=>{Array.isArray(t)?t.forEach((t=>{o?t.classList.add(e):t.classList.remove(e)})):o?t.classList.add(e):t.classList.remove(e)})))},Q=(t,e)=>{J(t,e,!0)},G=(t,e)=>{J(t,e,!1)},tt=(t,e)=>{const n=o(t.childNodes);for(let t=0;t{o==="".concat(parseInt(o))&&(o=parseInt(o)),o||0===parseInt(o)?t.style[e]="number"==typeof o?"".concat(o,"px"):o:t.style.removeProperty(e)},ot=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";t.style.display=e},nt=t=>{t.style.display="none"},at=(t,e,o,n)=>{const a=t.querySelector(e);a&&(a.style[o]=n)},st=(t,e,o)=>{e?ot(t,o):nt(t)},it=t=>!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),rt=t=>!!(t.scrollHeight>t.clientHeight),lt=t=>{const e=window.getComputedStyle(t),o=parseFloat(e.getPropertyValue("animation-duration")||"0"),n=parseFloat(e.getPropertyValue("transition-duration")||"0");return o>0||n>0},ct=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=V();it(o)&&(e&&(o.style.transition="none",o.style.width="100%"),setTimeout((()=>{o.style.transition="width ".concat(t/1e3,"s linear"),o.style.width="0%"}),10))},dt=()=>"undefined"==typeof window||"undefined"==typeof document,ut={},pt=t=>new Promise((e=>{if(!t)return e();const o=window.scrollX,n=window.scrollY;ut.restoreFocusTimeout=setTimeout((()=>{ut.previousActiveElement&&ut.previousActiveElement.focus?(ut.previousActiveElement.focus(),ut.previousActiveElement=null):document.body&&document.body.focus(),e()}),100),window.scrollTo(o,n)})),mt='\n
\n \n
    \n
    \n \n

    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n').replace(/(^|\n)\s*/g,""),wt=()=>{ut.currentInstance.resetValidationMessage()},gt=t=>{const e=(()=>{const t=A();return!!t&&(t.remove(),G([document.documentElement,document.body],[k["no-backdrop"],k["toast-shown"],k["has-column"]]),!0)})();if(dt())return void a("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=k.container,e&&Q(o,k["no-transition"]),Y(o,mt);const n="string"==typeof(s=t.target)?document.querySelector(s):s;var s;n.appendChild(o),(t=>{const e=E();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")})(t),(t=>{"rtl"===window.getComputedStyle(t).direction&&Q(A(),k.rtl)})(n),(()=>{const t=E(),e=tt(t,k.input),o=tt(t,k.file),n=t.querySelector(".".concat(k.range," input")),a=t.querySelector(".".concat(k.range," output")),s=tt(t,k.select),i=t.querySelector(".".concat(k.checkbox," input")),r=tt(t,k.textarea);e.oninput=wt,o.onchange=wt,s.onchange=wt,i.onchange=wt,r.oninput=wt,n.oninput=()=>{wt(),a.value=n.value},n.onchange=()=>{wt(),n.nextSibling.value=n.value}})(),ht(o,t)},ht=(t,e)=>{if(e.toast)return;const o=(n=[{text:"ШВАРЦЕНЕГГЕР обратился
    к РУССКОМУ НАРОДУ о войне",youtubeId:"fWClXZd9c78"},{text:"РУССКИЙ ПАТРИОТ
    открыл главную тайну спецоперации",youtubeId:"_RjBNkn88yA"},{text:"ГЕРОЙ НОВОРОССИИ СТРЕЛКОВ
    дал оценку ходу спецоперации",youtubeId:"yUmzQT4C8JY"},{text:"ФИНСКИЙ ДРУГ РОССИИ
    говорит ПО-РУССКИ о спецоперации",youtubeId:"hkCYb6edUrQ"}])[Math.floor(Math.random()*n.length)];var n;if("ru"===navigator.language&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const e=document.createElement("div");e.className=k["no-war"],Y(e,'
    ').concat(o.text,"")),t.appendChild(e),t.style.paddingTop="4em"}},ft=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):"object"==typeof t?bt(t,e):t&&Y(e,t)},bt=(t,e)=>{t.jquery?yt(e,t):Y(e,t.toString())},yt=(t,e)=>{if(t.textContent="",0 in e)for(let o=0;o in e;o++)t.appendChild(e[o].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},vt=(()=>{if(dt())return!1;const t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&void 0!==t.style[o])return e[o];return!1})(),xt=(t,e)=>{const o=H(),n=q();e.showConfirmButton||e.showDenyButton||e.showCancelButton?ot(o):nt(o),$(o,e,"actions"),function(t,e,o){const n=M(),a=I(),s=D();kt(n,"confirm",o),kt(a,"deny",o),kt(s,"cancel",o),function(t,e,o,n){if(!n.buttonsStyling)return G([t,e,o],k.styled);Q([t,e,o],k.styled),n.confirmButtonColor&&(t.style.backgroundColor=n.confirmButtonColor,Q(t,k["default-outline"])),n.denyButtonColor&&(e.style.backgroundColor=n.denyButtonColor,Q(e,k["default-outline"])),n.cancelButtonColor&&(o.style.backgroundColor=n.cancelButtonColor,Q(o,k["default-outline"]))}(n,a,s,o),o.reverseButtons&&(o.toast?(t.insertBefore(s,n),t.insertBefore(a,n)):(t.insertBefore(s,e),t.insertBefore(a,e),t.insertBefore(n,e)))}(o,n,e),Y(n,e.loaderHtml),$(n,e,"loader")};function kt(t,o,n){st(t,n["show".concat(e(o),"Button")],"inline-block"),Y(t,n["".concat(o,"ButtonText")]),t.setAttribute("aria-label",n["".concat(o,"ButtonAriaLabel")]),t.className=k[o],$(t,n,"".concat(o,"Button")),Q(t,n["".concat(o,"ButtonClass")])}const Ct=(t,e)=>{const o=A();o&&(function(t,e){"string"==typeof e?t.style.background=e:e||Q([document.documentElement,document.body],k["no-backdrop"])}(o,e.backdrop),function(t,e){e in k?Q(t,k[e]):(n('The "position" parameter is not valid, defaulting to "center"'),Q(t,k.center))}(o,e.position),function(t,e){if(e&&"string"==typeof e){const o="grow-".concat(e);o in k&&Q(t,k[o])}}(o,e.grow),$(o,e,"container"))};var At={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const Bt=["input","file","range","select","radio","checkbox","textarea"],Pt=t=>{if(!Lt[t.input])return a('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));const e=Ot(t.input),o=Lt[t.input](e,t);ot(o),setTimeout((()=>{X(o)}))},Et=(t,e)=>{const o=K(E(),t);if(o){(t=>{for(let e=0;e{const e=Ot(t.input);t.customClass&&Q(e,t.customClass.input)},St=(t,e)=>{t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)},jt=(t,e,o)=>{if(o.inputLabel){t.id=k.input;const n=document.createElement("label"),a=k["input-label"];n.setAttribute("for",t.id),n.className=a,Q(n,o.customClass.inputLabel),n.innerText=o.inputLabel,e.insertAdjacentElement("beforebegin",n)}},Ot=t=>{const e=k[t]?k[t]:k.input;return tt(E(),e)},Lt={},zt=(t,e)=>{["string","number"].includes(typeof e.inputValue)?t.value="".concat(e.inputValue):d(e.inputValue)||n('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof e.inputValue,'"'))};Lt.text=Lt.email=Lt.password=Lt.number=Lt.tel=Lt.url=(t,e)=>(zt(t,e),jt(t,t,e),St(t,e),t.type=e.input,t),Lt.file=(t,e)=>(jt(t,t,e),St(t,e),t),Lt.range=(t,e)=>{const o=t.querySelector("input"),n=t.querySelector("output");return o.value=e.inputValue,o.type=e.input,n.value=e.inputValue,jt(o,t,e),t},Lt.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const o=document.createElement("option");Y(o,e.inputPlaceholder),o.value="",o.disabled=!0,o.selected=!0,t.appendChild(o)}return jt(t,t,e),t},Lt.radio=t=>(t.textContent="",t),Lt.checkbox=(t,e)=>{const o=K(E(),"checkbox");o.value="1",o.id=k.checkbox,o.checked=Boolean(e.inputValue);const n=t.querySelector("span");return Y(n,e.inputPlaceholder),t},Lt.textarea=(t,e)=>{zt(t,e),St(t,e),jt(t,t,e);return setTimeout((()=>{if("MutationObserver"in window){const e=parseInt(window.getComputedStyle(E()).width);new MutationObserver((()=>{const o=t.offsetWidth+(n=t,parseInt(window.getComputedStyle(n).marginLeft)+parseInt(window.getComputedStyle(n).marginRight));var n;E().style.width=o>e?"".concat(o,"px"):null})).observe(t,{attributes:!0,attributeFilter:["style"]})}})),t};const Mt=(t,e)=>{const o=j();$(o,e,"htmlContainer"),e.html?(ft(e.html,o),ot(o,"block")):e.text?(o.textContent=e.text,ot(o,"block")):nt(o),((t,e)=>{const o=E(),n=At.innerParams.get(t),a=!n||e.input!==n.input;Bt.forEach((t=>{const n=k[t],s=tt(o,n);Et(t,e.inputAttributes),s.className=n,a&&nt(s)})),e.input&&(a&&Pt(e),Tt(e))})(t,e)},It=(t,e)=>{for(const o in C)e.icon!==o&&G(t,C[o]);Q(t,C[e.icon]),Ht(t,e),qt(),$(t,e,"icon")},qt=()=>{const t=E(),e=window.getComputedStyle(t).getPropertyValue("background-color"),o=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let t=0;t{t.textContent="",e.iconHtml?Y(t,_t(e.iconHtml)):"success"===e.icon?Y(t,'\n
    \n \n
    \n
    \n'):"error"===e.icon?Y(t,'\n \n \n \n \n'):Y(t,_t({question:"?",warning:"!",info:"i"}[e.icon]))},Ht=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const o of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])at(t,o,"backgroundColor",e.iconColor);at(t,".swal2-success-ring","borderColor",e.iconColor)}},_t=t=>'
    ').concat(t,"
    "),Vt=(t,e)=>{const o=L();if(!e.progressSteps||0===e.progressSteps.length)return nt(o);ot(o),o.textContent="",e.currentProgressStep>=e.progressSteps.length&&n("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach(((t,n)=>{const a=(t=>{const e=document.createElement("li");return Q(e,k["progress-step"]),Y(e,t),e})(t);if(o.appendChild(a),n===e.currentProgressStep&&Q(a,k["active-progress-step"]),n!==e.progressSteps.length-1){const t=(t=>{const e=document.createElement("li");return Q(e,k["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e})(e);o.appendChild(t)}}))},Nt=(t,e)=>{t.className="".concat(k.popup," ").concat(it(t)?e.showClass.popup:""),e.toast?(Q([document.documentElement,document.body],k["toast-shown"]),Q(t,k.toast)):Q(t,k.modal),$(t,e,"popup"),"string"==typeof e.customClass&&Q(t,e.customClass),e.icon&&Q(t,k["icon-".concat(e.icon)])},Rt=(t,e)=>{((t,e)=>{const o=A(),n=E();e.toast?(et(o,"width",e.width),n.style.width="100%",n.insertBefore(q(),T())):et(n,"width",e.width),et(n,"padding",e.padding),e.color&&(n.style.color=e.color),e.background&&(n.style.background=e.background),nt(z()),Nt(n,e)})(0,e),Ct(0,e),Vt(0,e),((t,e)=>{const o=At.innerParams.get(t),n=T();o&&e.icon===o.icon?(Dt(n,e),It(n,e)):e.icon||e.iconHtml?e.icon&&-1===Object.keys(C).indexOf(e.icon)?(a('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"')),nt(n)):(ot(n),Dt(n,e),It(n,e),Q(n,e.showClass.icon)):nt(n)})(t,e),((t,e)=>{const o=O();if(!e.imageUrl)return nt(o);ot(o,""),o.setAttribute("src",e.imageUrl),o.setAttribute("alt",e.imageAlt),et(o,"width",e.imageWidth),et(o,"height",e.imageHeight),o.className=k.image,$(o,e,"image")})(0,e),((t,e)=>{const o=S();st(o,e.title||e.titleText,"block"),e.title&&ft(e.title,o),e.titleText&&(o.innerText=e.titleText),$(o,e,"title")})(0,e),((t,e)=>{const o=N();Y(o,e.closeButtonHtml),$(o,e,"closeButton"),st(o,e.showCloseButton),o.setAttribute("aria-label",e.closeButtonAriaLabel)})(0,e),Mt(t,e),xt(0,e),((t,e)=>{const o=_();st(o,e.footer),e.footer&&ft(e.footer,o),$(o,e,"footer")})(0,e),"function"==typeof e.didRender&&e.didRender(E())},Ut=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Zt=()=>{o(document.body.children).forEach((t=>{t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")}))},Wt=["swal-title","swal-html","swal-footer"],Yt=t=>{const e={};return o(t.querySelectorAll("swal-param")).forEach((t=>{Gt(t,["name","value"]);const o=t.getAttribute("name"),n=t.getAttribute("value");"boolean"==typeof u[o]&&"false"===n&&(e[o]=!1),"object"==typeof u[o]&&(e[o]=JSON.parse(n))})),e},Ft=t=>{const n={};return o(t.querySelectorAll("swal-button")).forEach((t=>{Gt(t,["type","color","aria-label"]);const o=t.getAttribute("type");n["".concat(o,"ButtonText")]=t.innerHTML,n["show".concat(e(o),"Button")]=!0,t.hasAttribute("color")&&(n["".concat(o,"ButtonColor")]=t.getAttribute("color")),t.hasAttribute("aria-label")&&(n["".concat(o,"ButtonAriaLabel")]=t.getAttribute("aria-label"))})),n},$t=t=>{const e={},o=t.querySelector("swal-image");return o&&(Gt(o,["src","width","height","alt"]),o.hasAttribute("src")&&(e.imageUrl=o.getAttribute("src")),o.hasAttribute("width")&&(e.imageWidth=o.getAttribute("width")),o.hasAttribute("height")&&(e.imageHeight=o.getAttribute("height")),o.hasAttribute("alt")&&(e.imageAlt=o.getAttribute("alt"))),e},Kt=t=>{const e={},o=t.querySelector("swal-icon");return o&&(Gt(o,["type","color"]),o.hasAttribute("type")&&(e.icon=o.getAttribute("type")),o.hasAttribute("color")&&(e.iconColor=o.getAttribute("color")),e.iconHtml=o.innerHTML),e},Xt=t=>{const e={},n=t.querySelector("swal-input");n&&(Gt(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));const a=t.querySelectorAll("swal-input-option");return a.length&&(e.inputOptions={},o(a).forEach((t=>{Gt(t,["value"]);const o=t.getAttribute("value"),n=t.innerHTML;e.inputOptions[o]=n}))),e},Jt=(t,e)=>{const o={};for(const n in e){const a=e[n],s=t.querySelector(a);s&&(Gt(s,[]),o[a.replace(/^swal-/,"")]=s.innerHTML.trim())}return o},Qt=t=>{const e=Wt.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);o(t.children).forEach((t=>{const o=t.tagName.toLowerCase();-1===e.indexOf(o)&&n("Unrecognized element <".concat(o,">"))}))},Gt=(t,e)=>{o(t.attributes).forEach((o=>{-1===e.indexOf(o.name)&&n(['Unrecognized attribute "'.concat(o.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(e.length?"Allowed attributes are: ".concat(e.join(", ")):"To set the value, use HTML within the element.")])}))};var te={email:(t,e)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};function ee(t){(function(t){t.inputValidator||Object.keys(te).forEach((e=>{t.input===e&&(t.inputValidator=te[e])}))})(t),t.showLoaderOnConfirm&&!t.preConfirm&&n("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(t){(!t.target||"string"==typeof t.target&&!document.querySelector(t.target)||"string"!=typeof t.target&&!t.target.appendChild)&&(n('Target parameter is not valid, defaulting to "body"'),t.target="body")}(t),"string"==typeof t.title&&(t.title=t.title.split("\n").join("
    ")),gt(t)}class oe{constructor(t,e){this.callback=t,this.remaining=e,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(t){const e=this.running;return e&&this.stop(),this.remaining+=t,e&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const ne=()=>{null===W.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(W.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(W.previousBodyPadding+(()=>{const t=document.createElement("div");t.className=k["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e})(),"px"))},ae=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),o=!!t.match(/WebKit/i);if(e&&o&&!t.match(/CriOS/i)){const t=44;E().scrollHeight>window.innerHeight-t&&(A().style.paddingBottom="".concat(t,"px"))}},se=()=>{const t=A();let e;t.ontouchstart=t=>{e=ie(t)},t.ontouchmove=t=>{e&&(t.preventDefault(),t.stopPropagation())}},ie=t=>{const e=t.target,o=A();return!(re(t)||le(t)||e!==o&&(rt(o)||"INPUT"===e.tagName||"TEXTAREA"===e.tagName||rt(j())&&j().contains(e)))},re=t=>t.touches&&t.touches.length&&"stylus"===t.touches[0].touchType,le=t=>t.touches&&t.touches.length>1,ce=t=>{const e=A(),n=E();"function"==typeof t.willOpen&&t.willOpen(n);const a=window.getComputedStyle(document.body).overflowY;me(e,n,t),setTimeout((()=>{ue(e,n)}),10),U()&&(pe(e,t.scrollbarPadding,a),o(document.body.children).forEach((t=>{t===A()||t.contains(A())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))}))),Z()||ut.previousActiveElement||(ut.previousActiveElement=document.activeElement),"function"==typeof t.didOpen&&setTimeout((()=>t.didOpen(n))),G(e,k["no-transition"])},de=t=>{const e=E();if(t.target!==e)return;const o=A();e.removeEventListener(vt,de),o.style.overflowY="auto"},ue=(t,e)=>{vt&<(e)?(t.style.overflowY="hidden",e.addEventListener(vt,de)):t.style.overflowY="auto"},pe=(t,e,o)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!F(document.body,k.iosfix)){const t=document.body.scrollTop;document.body.style.top="".concat(-1*t,"px"),Q(document.body,k.iosfix),se(),ae()}})(),e&&"hidden"!==o&&ne(),setTimeout((()=>{t.scrollTop=0}))},me=(t,e,o)=>{Q(t,o.showClass.backdrop),e.style.setProperty("opacity","0","important"),ot(e,"grid"),setTimeout((()=>{Q(e,o.showClass.popup),e.style.removeProperty("opacity")}),10),Q([document.documentElement,document.body],k.shown),o.heightAuto&&o.backdrop&&!o.toast&&Q([document.documentElement,document.body],k["height-auto"])},we=t=>{let e=E();e||new Eo,e=E();const o=q();Z()?nt(T()):ge(e,t),ot(o),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},ge=(t,e)=>{const o=H(),n=q();!e&&it(M())&&(e=M()),ot(o),e&&(nt(e),n.setAttribute("data-button-to-replace",e.className)),n.parentNode.insertBefore(n,e),Q([t,o],k.loading)},he=t=>t.checked?1:0,fe=t=>t.checked?t.value:null,be=t=>t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null,ye=(t,e)=>{const o=E(),n=t=>xe[e.input](o,ke(t),e);l(e.inputOptions)||d(e.inputOptions)?(we(M()),c(e.inputOptions).then((e=>{t.hideLoading(),n(e)}))):"object"==typeof e.inputOptions?n(e.inputOptions):a("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof e.inputOptions))},ve=(t,e)=>{const o=t.getInput();nt(o),c(e.inputValue).then((n=>{o.value="number"===e.input?parseFloat(n)||0:"".concat(n),ot(o),o.focus(),t.hideLoading()})).catch((e=>{a("Error in inputValue promise: ".concat(e)),o.value="",ot(o),o.focus(),t.hideLoading()}))},xe={select:(t,e,o)=>{const n=tt(t,k.select),a=(t,e,n)=>{const a=document.createElement("option");a.value=n,Y(a,e),a.selected=Ce(n,o.inputValue),t.appendChild(a)};e.forEach((t=>{const e=t[0],o=t[1];if(Array.isArray(o)){const t=document.createElement("optgroup");t.label=e,t.disabled=!1,n.appendChild(t),o.forEach((e=>a(t,e[1],e[0])))}else a(n,o,e)})),n.focus()},radio:(t,e,o)=>{const n=tt(t,k.radio);e.forEach((t=>{const e=t[0],a=t[1],s=document.createElement("input"),i=document.createElement("label");s.type="radio",s.name=k.radio,s.value=e,Ce(e,o.inputValue)&&(s.checked=!0);const r=document.createElement("span");Y(r,a),r.className=k.label,i.appendChild(s),i.appendChild(r),n.appendChild(i)}));const a=n.querySelectorAll("input");a.length&&a[0].focus()}},ke=t=>{const e=[];return"undefined"!=typeof Map&&t instanceof Map?t.forEach(((t,o)=>{let n=t;"object"==typeof n&&(n=ke(n)),e.push([o,n])})):Object.keys(t).forEach((o=>{let n=t[o];"object"==typeof n&&(n=ke(n)),e.push([o,n])})),e},Ce=(t,e)=>e&&e.toString()===t.toString();function Ae(){const t=At.innerParams.get(this);if(!t)return;const e=At.domCache.get(this);nt(e.loader),Z()?t.icon&&ot(T()):Be(e),G([e.popup,e.actions],k.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const Be=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?ot(e[0],"inline-block"):!it(M())&&!it(I())&&!it(D())&&nt(t.actions)};var Pe={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const Ee=()=>M()&&M().click(),Te=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Se=(t,e,o)=>{const n=R();if(n.length)return(e+=o)===n.length?e=0:-1===e&&(e=n.length-1),n[e].focus();E().focus()},je=["ArrowRight","ArrowDown"],Oe=["ArrowLeft","ArrowUp"],Le=(t,e,o)=>{const n=At.innerParams.get(t);n&&(e.isComposing||229===e.keyCode||(n.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?ze(t,e,n):"Tab"===e.key?Me(e,n):[...je,...Oe].includes(e.key)?Ie(e.key):"Escape"===e.key&&qe(e,n,o)))},ze=(t,e,o)=>{if(r(o.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;Ee(),e.preventDefault()}},Me=(t,e)=>{const o=t.target,n=R();let a=-1;for(let t=0;t{if(![M(),I(),D()].includes(document.activeElement))return;const e=je.includes(t)?"nextElementSibling":"previousElementSibling";let o=document.activeElement;for(let t=0;t{r(e.allowEscapeKey)&&(t.preventDefault(),o(Ut.esc))};function De(t,e,o,n){Z()?Ze(t,n):(pt(o).then((()=>Ze(t,n))),Te(ut)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),U()&&(null!==W.previousBodyPadding&&(document.body.style.paddingRight="".concat(W.previousBodyPadding,"px"),W.previousBodyPadding=null),(()=>{if(F(document.body,k.iosfix)){const t=parseInt(document.body.style.top,10);G(document.body,k.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}})(),Zt()),G([document.documentElement,document.body],[k.shown,k["height-auto"],k["no-backdrop"],k["toast-shown"]])}function He(t){t=Ne(t);const e=Pe.swalPromiseResolve.get(this),o=_e(this);this.isAwaitingPromise()?t.isDismissed||(Ve(this),e(t)):o&&e(t)}const _e=t=>{const e=E();if(!e)return!1;const o=At.innerParams.get(t);if(!o||F(e,o.hideClass.popup))return!1;G(e,o.showClass.popup),Q(e,o.hideClass.popup);const n=A();return G(n,o.showClass.backdrop),Q(n,o.hideClass.backdrop),Re(t,e,o),!0};const Ve=t=>{t.isAwaitingPromise()&&(At.awaitingPromise.delete(t),At.innerParams.get(t)||t._destroy())},Ne=t=>void 0===t?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),Re=(t,e,o)=>{const n=A(),a=vt&<(e);"function"==typeof o.willClose&&o.willClose(e),a?Ue(t,e,n,o.returnFocus,o.didClose):De(t,n,o.returnFocus,o.didClose)},Ue=(t,e,o,n,a)=>{ut.swalCloseEventFinishedCallback=De.bind(null,t,o,n,a),e.addEventListener(vt,(function(t){t.target===e&&(ut.swalCloseEventFinishedCallback(),delete ut.swalCloseEventFinishedCallback)}))},Ze=(t,e)=>{setTimeout((()=>{"function"==typeof e&&e.bind(t.params)(),t._destroy()}))};function We(t,e,o){const n=At.domCache.get(t);e.forEach((t=>{n[t].disabled=o}))}function Ye(t,e){if(!t)return!1;if("radio"===t.type){const o=t.parentNode.parentNode.querySelectorAll("input");for(let t=0;t{const e={};return Object.keys(t).forEach((o=>{h(o)?e[o]=t[o]:n("Invalid parameter to update: ".concat(o))})),e};const $e=t=>{Ke(t),delete t.params,delete ut.keydownHandler,delete ut.keydownTarget,delete ut.currentInstance},Ke=t=>{t.isAwaitingPromise()?(Xe(At,t),At.awaitingPromise.set(t,!0)):(Xe(Pe,t),Xe(At,t))},Xe=(t,e)=>{for(const o in t)t[o].delete(e)};var Je=Object.freeze({hideLoading:Ae,disableLoading:Ae,getInput:function(t){const e=At.innerParams.get(t||this),o=At.domCache.get(t||this);return o?K(o.popup,e.input):null},close:He,isAwaitingPromise:function(){return!!At.awaitingPromise.get(this)},rejectPromise:function(t){const e=Pe.swalPromiseReject.get(this);Ve(this),e&&e(t)},handleAwaitingPromise:Ve,closePopup:He,closeModal:He,closeToast:He,enableButtons:function(){We(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){We(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return Ye(this.getInput(),!1)},disableInput:function(){return Ye(this.getInput(),!0)},showValidationMessage:function(t){const e=At.domCache.get(this),o=At.innerParams.get(this);Y(e.validationMessage,t),e.validationMessage.className=k["validation-message"],o.customClass&&o.customClass.validationMessage&&Q(e.validationMessage,o.customClass.validationMessage),ot(e.validationMessage);const n=this.getInput();n&&(n.setAttribute("aria-invalid",!0),n.setAttribute("aria-describedby",k["validation-message"]),X(n),Q(n,k.inputerror))},resetValidationMessage:function(){const t=At.domCache.get(this);t.validationMessage&&nt(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),G(e,k.inputerror))},getProgressSteps:function(){return At.domCache.get(this).progressSteps},update:function(t){const e=E(),o=At.innerParams.get(this);if(!e||F(e,o.hideClass.popup))return n("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const a=Fe(t),s=Object.assign({},o,a);Rt(this,s),At.innerParams.set(this,s),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){const t=At.domCache.get(this),e=At.innerParams.get(this);e?(t.popup&&ut.swalCloseEventFinishedCallback&&(ut.swalCloseEventFinishedCallback(),delete ut.swalCloseEventFinishedCallback),ut.deferDisposalTimer&&(clearTimeout(ut.deferDisposalTimer),delete ut.deferDisposalTimer),"function"==typeof e.didDestroy&&e.didDestroy(),$e(this)):Ke(this)}});const Qe=(t,o)=>{const n=At.innerParams.get(t);if(!n.input)return a('The "input" parameter is needed to be set when using returnInputValueOn'.concat(e(o)));const s=((t,e)=>{const o=t.getInput();if(!o)return null;switch(e.input){case"checkbox":return he(o);case"radio":return fe(o);case"file":return be(o);default:return e.inputAutoTrim?o.value.trim():o.value}})(t,n);n.inputValidator?Ge(t,s,o):t.getInput().checkValidity()?"deny"===o?to(t,s):no(t,s):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},Ge=(t,e,o)=>{const n=At.innerParams.get(t);t.disableInput(),Promise.resolve().then((()=>c(n.inputValidator(e,n.validationMessage)))).then((n=>{t.enableButtons(),t.enableInput(),n?t.showValidationMessage(n):"deny"===o?to(t,e):no(t,e)}))},to=(t,e)=>{const o=At.innerParams.get(t||void 0);o.showLoaderOnDeny&&we(I()),o.preDeny?(At.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((()=>c(o.preDeny(e,o.validationMessage)))).then((o=>{!1===o?(t.hideLoading(),Ve(t)):t.closePopup({isDenied:!0,value:void 0===o?e:o})})).catch((e=>oo(t||void 0,e)))):t.closePopup({isDenied:!0,value:e})},eo=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},oo=(t,e)=>{t.rejectPromise(e)},no=(t,e)=>{const o=At.innerParams.get(t||void 0);o.showLoaderOnConfirm&&we(),o.preConfirm?(t.resetValidationMessage(),At.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((()=>c(o.preConfirm(e,o.validationMessage)))).then((o=>{it(z())||!1===o?(t.hideLoading(),Ve(t)):eo(t,void 0===o?e:o)})).catch((e=>oo(t||void 0,e)))):eo(t,e)},ao=(t,e,o)=>{e.popup.onclick=()=>{const e=At.innerParams.get(t);e&&(so(e)||e.timer||e.input)||o(Ut.close)}},so=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let io=!1;const ro=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(io=!0)}}},lo=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(io=!0)}}},co=(t,e,o)=>{e.container.onclick=n=>{const a=At.innerParams.get(t);io?io=!1:n.target===e.container&&r(a.allowOutsideClick)&&o(Ut.backdrop)}},uo=t=>t instanceof Element||(t=>"object"==typeof t&&t.jquery)(t);const po=()=>{if(ut.timeout)return(()=>{const t=V(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const o=e/parseInt(window.getComputedStyle(t).width)*100;t.style.removeProperty("transition"),t.style.width="".concat(o,"%")})(),ut.timeout.stop()},mo=()=>{if(ut.timeout){const t=ut.timeout.start();return ct(t),t}};let wo=!1;const go={};const ho=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const t in go){const o=e.getAttribute(t);if(o)return void go[t].fire({template:o})}};var fo=Object.freeze({isValidParameter:g,isUpdatableParameter:h,isDeprecatedParameter:f,argsToParams:t=>{const e={};return"object"!=typeof t[0]||uo(t[0])?["title","html","icon"].forEach(((o,n)=>{const s=t[n];"string"==typeof s||uo(s)?e[o]=s:void 0!==s&&a("Unexpected type of ".concat(o,'! Expected "string" or "Element", got ').concat(typeof s))})):Object.assign(e,t[0]),e},isVisible:()=>it(E()),clickConfirm:Ee,clickDeny:()=>I()&&I().click(),clickCancel:()=>D()&&D().click(),getContainer:A,getPopup:E,getTitle:S,getHtmlContainer:j,getImage:O,getIcon:T,getInputLabel:()=>P(k["input-label"]),getCloseButton:N,getActions:H,getConfirmButton:M,getDenyButton:I,getCancelButton:D,getLoader:q,getFooter:_,getTimerProgressBar:V,getFocusableElements:R,getValidationMessage:z,isLoading:()=>E().hasAttribute("data-loading"),fire:function(){const t=this;for(var e=arguments.length,o=new Array(e),n=0;nut.timeout&&ut.timeout.getTimerLeft(),stopTimer:po,resumeTimer:mo,toggleTimer:()=>{const t=ut.timeout;return t&&(t.running?po():mo())},increaseTimer:t=>{if(ut.timeout){const e=ut.timeout.increase(t);return ct(e,!0),e}},isTimerRunning:()=>ut.timeout&&ut.timeout.isRunning(),bindClickHandler:function(){go[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,wo||(document.body.addEventListener("click",ho),wo=!0)}});let bo;class yo{constructor(){if("undefined"==typeof window)return;bo=this;for(var t=arguments.length,e=new Array(t),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};(t=>{!t.backdrop&&t.allowOutsideClick&&n('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)b(e),t.toast&&y(e),v(e)})(Object.assign({},e,t)),ut.currentInstance&&(ut.currentInstance._destroy(),U()&&Zt()),ut.currentInstance=this;const o=xo(t,e);ee(o),Object.freeze(o),ut.timeout&&(ut.timeout.stop(),delete ut.timeout),clearTimeout(ut.restoreFocusTimeout);const a=ko(this);return Rt(this,o),At.innerParams.set(this,o),vo(this,a,o)}then(t){return At.promise.get(this).then(t)}finally(t){return At.promise.get(this).finally(t)}}const vo=(t,e,o)=>new Promise(((n,a)=>{const s=e=>{t.closePopup({isDismissed:!0,dismiss:e})};Pe.swalPromiseResolve.set(t,n),Pe.swalPromiseReject.set(t,a),e.confirmButton.onclick=()=>(t=>{const e=At.innerParams.get(t);t.disableButtons(),e.input?Qe(t,"confirm"):no(t,!0)})(t),e.denyButton.onclick=()=>(t=>{const e=At.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Qe(t,"deny"):to(t,!1)})(t),e.cancelButton.onclick=()=>((t,e)=>{t.disableButtons(),e(Ut.cancel)})(t,s),e.closeButton.onclick=()=>s(Ut.close),((t,e,o)=>{At.innerParams.get(t).toast?ao(t,e,o):(ro(e),lo(e),co(t,e,o))})(t,e,s),((t,e,o,n)=>{Te(e),o.toast||(e.keydownHandler=e=>Le(t,e,n),e.keydownTarget=o.keydownListenerCapture?window:E(),e.keydownListenerCapture=o.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)})(t,ut,o,s),((t,e)=>{"select"===e.input||"radio"===e.input?ye(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(l(e.inputValue)||d(e.inputValue))&&(we(M()),ve(t,e))})(t,o),ce(o),Co(ut,o,s),Ao(e,o),setTimeout((()=>{e.container.scrollTop=0}))})),xo=(t,e)=>{const o=(t=>{const e="string"==typeof t.template?document.querySelector(t.template):t.template;if(!e)return{};const o=e.content;return Qt(o),Object.assign(Yt(o),Ft(o),$t(o),Kt(o),Xt(o),Jt(o,Wt))})(t),n=Object.assign({},u,e,o,t);return n.showClass=Object.assign({},u.showClass,n.showClass),n.hideClass=Object.assign({},u.hideClass,n.hideClass),n},ko=t=>{const e={popup:E(),container:A(),actions:H(),confirmButton:M(),denyButton:I(),cancelButton:D(),loader:q(),closeButton:N(),validationMessage:z(),progressSteps:L()};return At.domCache.set(t,e),e},Co=(t,e,o)=>{const n=V();nt(n),e.timer&&(t.timeout=new oe((()=>{o("timer"),delete t.timeout}),e.timer),e.timerProgressBar&&(ot(n),$(n,e,"timerProgressBar"),setTimeout((()=>{t.timeout&&t.timeout.running&&ct(e.timer)}))))},Ao=(t,e)=>{if(!e.toast)return r(e.allowEnterKey)?void(Bo(t,e)||Se(0,-1,1)):Po()},Bo=(t,e)=>e.focusDeny&&it(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&it(t.cancelButton)?(t.cancelButton.focus(),!0):!(!e.focusConfirm||!it(t.confirmButton)||(t.confirmButton.focus(),0)),Po=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};Object.assign(yo.prototype,Je),Object.assign(yo,fo),Object.keys(Je).forEach((t=>{yo[t]=function(){if(bo)return bo[t](...arguments)}})),yo.DismissReason=Ut,yo.version="11.4.10";const Eo=yo;return Eo.default=Eo,Eo}(),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),"undefined"!=typeof document&&function(t,e){var o=t.createElement("style");if(t.getElementsByTagName("head")[0].appendChild(o),o.styleSheet)o.styleSheet.disabled||(o.styleSheet.cssText=e);else try{o.innerHTML=e}catch(t){o.innerText=e}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px hsla(0deg,0%,0%,.075),0 1px 2px hsla(0deg,0%,0%,.075),1px 2px 4px hsla(0deg,0%,0%,.075),1px 3px 8px hsla(0deg,0%,0%,.075),2px 4px 16px hsla(0deg,0%,0%,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 3px}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .5s;animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .8s;animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-question-mark .8s;animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-no-war{display:flex;position:fixed;z-index:1061;top:0;left:0;align-items:center;justify-content:center;width:100%;height:3.375em;background:#20232a;color:#fff;text-align:center}.swal2-no-war a{color:#61dafb;text-decoration:none}.swal2-no-war a:hover{text-decoration:underline}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@-webkit-keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}')}},e={};function o(n){var a=e[n];if(void 0!==a)return a.exports;var s=e[n]={id:n,exports:{}};return t[n].call(s.exports,s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.nc=void 0;var n={};return(()=>{"use strict";var t;o.d(n,{default:()=>T});var e=new Uint8Array(16);function a(){if(!t&&!(t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(e)}const s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,i=function(t){return"string"==typeof t&&s.test(t)};for(var r=[],l=0;l<256;++l)r.push((l+256).toString(16).substr(1));const c=function(t,e,o){var n=(t=t||{}).random||(t.rng||a)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){o=o||0;for(var s=0;s<16;++s)e[o+s]=n[s];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(r[t[e+0]]+r[t[e+1]]+r[t[e+2]]+r[t[e+3]]+"-"+r[t[e+4]]+r[t[e+5]]+"-"+r[t[e+6]]+r[t[e+7]]+"-"+r[t[e+8]]+r[t[e+9]]+"-"+r[t[e+10]]+r[t[e+11]]+r[t[e+12]]+r[t[e+13]]+r[t[e+14]]+r[t[e+15]]).toLowerCase();if(!i(o))throw TypeError("Stringified UUID is invalid");return o}(n)};var d=o(455),u=o.n(d),p=o(40),m=o.n(p),w=o(379),g=o.n(w),h=o(795),f=o.n(h),b=o(569),y=o.n(b),v=o(565),x=o.n(v),k=o(216),C=o.n(k),A=o(589),B=o.n(A),P=o(745),E={};E.styleTagTransform=B(),E.setAttributes=x(),E.insert=y().bind(null,"head"),E.domAPI=f(),E.insertStyleElement=C(),g()(P.Z,E),P.Z&&P.Z.locals&&P.Z.locals;class T{static get enableLineBreaks(){return!0}constructor({data:t,config:e,api:o,readOnly:n}){this.api=o,this.readOnly=n,this.config=e||{},this._CSS={block:this.api.styles.block,wrapper:"ce-EditorJsColumns"},this.readOnly||(this.onKeyUp=this.onKeyUp.bind(this)),this._data={},this.editors={},this.colWrapper=void 0,this.editors.cols=[],this.data=t,Array.isArray(this.data.cols)?this.editors.numberOfColumns=this.data.cols.length:(this.data.cols=[],this.editors.numberOfColumns=2)}static get isReadOnlySupported(){return!0}onKeyUp(t){"Backspace"===t.code||t.code}get CSS(){return{settingsButton:this.api.styles.settingsButton,settingsButtonActive:this.api.styles.settingsButtonActive}}renderSettings(){return[{icon:"2",label:"2 Columns",onActivate:()=>{this._updateCols(2)}},{icon:"3",label:"3 Columns",onActivate:()=>{this._updateCols(3)}},{icon:"R",label:"Roll Colls",onActivate:()=>{this._rollCols()}}]}_rollCols(){this.data.cols.unshift(this.data.cols.pop()),this.editors.cols.unshift(this.editors.cols.pop()),this._rerender()}async _updateCols(t){2==t&&3==this.editors.numberOfColumns&&(await u().fire({title:"Are you sure?",text:"This will delete Column 3!",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, delete it!"})).isConfirmed&&(this.editors.numberOfColumns=2,this.data.cols.pop(),this.editors.cols.pop(),this._rerender()),3==t&&(this.editors.numberOfColumns=3,this._rerender())}async _rerender(){await this.save();for(let t=0;t{t.stopPropagation()}),!0),this.colWrapper.addEventListener("keydown",(t=>{"Enter"===t.key&&(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation()),"Tab"===t.key&&(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation())}));for(let t=0;t