Your IP : 3.17.181.181


Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/node/text/dist/
Upload File :
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/node/text/dist/text.bundle.js.map

{"version":3,"file":"text.bundle.js","sources":["../src/text.js"],"sourcesContent":["import { Event } from 'main.core';\nimport { Base } from 'landing.node.base';\nimport { TableEditor } from 'landing.node.tableeditor';\n\nconst escapeText = BX.Landing.Utils.escapeText;\nconst matchers = BX.Landing.Utils.Matchers;\nconst changeTagName = BX.Landing.Utils.changeTagName;\nconst textToPlaceholders = BX.Landing.Utils.textToPlaceholders;\n\nexport class Text extends Base\n{\n\tconstructor(options)\n\t{\n\t\tsuper(options);\n\n\t\tthis.currentNode = null;\n\t\tthis.type = 'text';\n\t\tthis.tableBaseFontSize = '22';\n\n\t\tthis.onClick = this.onClick.bind(this);\n\t\tthis.onPaste = this.onPaste.bind(this);\n\t\tthis.onDrop = this.onDrop.bind(this);\n\t\tthis.onInput = this.onInput.bind(this);\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\n\t\tthis.onMousedown = this.onMousedown.bind(this);\n\t\tthis.onMouseup = this.onMouseup.bind(this);\n\n\t\t// Bind on node events\n\t\tthis.bindEvents(this.node);\n\t\tEvent.bind(document, 'mouseup', this.onMouseup);\n\t}\n\n\tbindEvents(node)\n\t{\n\t\tEvent.bind(node, 'mousedown', this.onMousedown);\n\t\tEvent.bind(node, 'click', this.onClick);\n\t\tEvent.bind(node, 'paste', this.onPaste);\n\t\tEvent.bind(node, 'drop', this.onDrop);\n\t\tEvent.bind(node, 'input', this.onInput);\n\t\tEvent.bind(node, 'keydown', this.onKeyDown);\n\t}\n\n\t/**\n\t * Handles allow inline edit event\n\t */\n\tonAllowInlineEdit()\n\t{\n\t\t// Show title \"Click to edit\" for node\n\t\tthis.node.setAttribute('title', escapeText(BX.Landing.Loc.getMessage('LANDING_TITLE_OF_TEXT_NODE')));\n\t}\n\n\t/**\n\t * Handles change event\n\t * @param {boolean} [preventAdjustPosition]\n\t * @param {?boolean} [preventHistory = false]\n\t */\n\tonChange(preventAdjustPosition, preventHistory)\n\t{\n\t\tsuper.onChange.call(this, preventHistory);\n\t\tif (!preventAdjustPosition)\n\t\t{\n\t\t\tBX.Landing.UI.Panel.EditorPanel.getInstance().adjustPosition(this.node);\n\t\t}\n\n\t\tif (!preventHistory)\n\t\t{\n\t\t\tBX.Landing.History.getInstance().push();\n\t\t}\n\t}\n\n\tonKeyDown(event)\n\t{\n\t\tif (event.code === 'Backspace')\n\t\t{\n\t\t\tthis.onBackspaceDown(event);\n\t\t}\n\t\tthis.onInput(event);\n\t}\n\n\tonInput(event)\n\t{\n\t\tclearTimeout(this.inputTimeout);\n\n\t\tconst key = event.keyCode || event.which;\n\n\t\tif (!(key === 90 && (/win/i.test(top.window.navigator.userAgent) ? event.ctrlKey : event.metaKey)))\n\t\t{\n\t\t\tthis.inputTimeout = setTimeout(() => {\n\t\t\t\tif (this.lastValue !== this.getValue())\n\t\t\t\t{\n\t\t\t\t\tthis.onChange(true);\n\t\t\t\t\tthis.lastValue = this.getValue();\n\t\t\t\t}\n\t\t\t}, 400);\n\t\t}\n\n\t\tif (this.isTable(event))\n\t\t{\n\t\t\tconst tableFontSize = parseInt(window.getComputedStyle(event.srcElement).getPropertyValue('font-size'), 10);\n\t\t\tif (\n\t\t\t\tevent.srcElement.textContent === ''\n\t\t\t\t&& BX.Dom.hasClass(event.srcElement, 'landing-table-td')\n\t\t\t\t&& tableFontSize < this.tableBaseFontSize\n\t\t\t)\n\t\t\t{\n\t\t\t\tBX.Dom.addClass(event.srcElement, 'landing-table-td-height');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tBX.Dom.removeClass(event.srcElement, 'landing-table-td-height');\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Handles escape press event\n\t */\n\tonEscapePress()\n\t{\n\t\t// Hide editor by press on Escape button\n\t\tif (this.isEditable())\n\t\t{\n\t\t\tif (this === this.currentNode)\n\t\t\t{\n\t\t\t\tBX.Landing.UI.Panel.EditorPanel.getInstance().hide();\n\t\t\t}\n\n\t\t\tthis.disableEdit();\n\t\t}\n\t}\n\n\t/**\n\t * Handles drop event on this node\n\t *\n\t * @param {DragEvent} event\n\t */\n\tonDrop(event)\n\t{\n\t\t// Prevents drag and drop any content into editor area\n\t\tevent.preventDefault();\n\t}\n\n\t/**\n\t * Handles paste event on this node\n\t *\n\t * @param {ClipboardEvent} event\n\t * @param {function} event.preventDefault\n\t * @param {object} event.clipboardData\n\t */\n\tonPaste(event)\n\t{\n\t\tevent.preventDefault();\n\n\t\tif (event.clipboardData && event.clipboardData.getData)\n\t\t{\n\t\t\tconst sourceText = event.clipboardData.getData('text/plain');\n\t\t\tlet encodedText = BX.Text.encode(sourceText);\n\t\t\tif (this.isLinkPasted(sourceText))\n\t\t\t{\n\t\t\t\tencodedText = this.prepareToLink(encodedText);\n\t\t\t}\n\t\t\tconst formattedHtml = encodedText.replaceAll('\\n', '<br>');\n\t\t\tdocument.execCommand('insertHTML', false, formattedHtml);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// ie11\n\t\t\tconst text = window.clipboardData.getData('text');\n\t\t\tdocument.execCommand('paste', true, BX.Text.encode(text));\n\t\t}\n\n\t\tthis.onChange();\n\t}\n\n\t/**\n\t * Handles click on document\n\t */\n\tonDocumentClick(event)\n\t{\n\t\tif (this.isEditable() && !this.fromNode)\n\t\t{\n\t\t\tBX.Landing.UI.Panel.EditorPanel.getInstance().hide();\n\t\t\tthis.disableEdit();\n\t\t}\n\n\t\tthis.fromNode = false;\n\t}\n\n\tonMousedown(event)\n\t{\n\t\tBX.Event.EventEmitter.emit('BX.Landing.Node.Text:onMousedown');\n\t\tif (!this.manifest.group)\n\t\t{\n\t\t\tthis.fromNode = true;\n\n\t\t\tif (this.manifest.allowInlineEdit !== false\n\t\t\t\t&& BX.Landing.Main.getInstance().isControlsEnabled())\n\t\t\t{\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis.enableEdit();\n\t\t\t\tif (this.isTable(event))\n\t\t\t\t{\n\t\t\t\t\tthis.disableEdit();\n\t\t\t\t\tthis.currentNode.node.querySelectorAll('.landing-table-container')\n\t\t\t\t\t\t.forEach((table) => {\n\t\t\t\t\t\t\tif (!table.hasAttribute('table-prepare'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.prepareNewTable(table);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\tconst tableFontSize = parseInt(window.getComputedStyle(event.srcElement).getPropertyValue('font-size'), 10);\n\t\t\t\t\tif (\n\t\t\t\t\t\tevent.srcElement.textContent === ''\n\t\t\t\t\t\t&& BX.Dom.hasClass(event.srcElement, 'landing-table-td')\n\t\t\t\t\t\t&& tableFontSize < this.tableBaseFontSize\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tBX.Dom.addClass(event.srcElement, 'landing-table-td-height');\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tBX.Dom.removeClass(event.srcElement, 'landing-table-td-height');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (!this.manifest.textOnly && !BX.Landing.UI.Panel.StylePanel.getInstance().isShown())\n\t\t\t\t\t{\n\t\t\t\t\t\tBX.Landing.UI.Panel.EditorPanel.getInstance().show(this.node, null, this.buttons);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.nodeTableContainerList)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.nodeTableContainerList.forEach((tableContainer) => {\n\t\t\t\t\t\t\ttableContainer.tableEditor.unselect(tableContainer.tableEditor);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tBX.Landing.UI.Tool.ColorPicker.hideAll();\n\t\t\t}\n\n\t\t\trequestAnimationFrame(() => {\n\t\t\t\tif (event.target.nodeName === 'A'\n\t\t\t\t\t|| event.target.parentElement.nodeName === 'A')\n\t\t\t\t{\n\t\t\t\t\tconst range = document.createRange();\n\t\t\t\t\trange.selectNode(event.target);\n\t\t\t\t\twindow.getSelection().removeAllRanges();\n\t\t\t\t\twindow.getSelection().addRange(range);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tonMouseup()\n\t{\n\t\tsetTimeout(() => {\n\t\t\tthis.fromNode = false;\n\t\t}, 10);\n\t}\n\n\t/**\n\t * Click on field - switch edit mode.\n\t */\n\tonClick(event)\n\t{\n\t\tif (this.isTable(event))\n\t\t{\n\t\t\tthis.addTableButtons(event);\n\t\t}\n\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t\tthis.fromNode = false;\n\n\t\tif (event.target.nodeName === 'A'\n\t\t\t|| event.target.parentElement.nodeName === 'A')\n\t\t{\n\t\t\tconst range = document.createRange();\n\t\t\trange.selectNode(event.target);\n\t\t\twindow.getSelection().removeAllRanges();\n\t\t\twindow.getSelection().addRange(range);\n\t\t}\n\t}\n\n\t/**\n\t * Checks that is editable\n\t * @return {boolean}\n\t */\n\tisEditable(): boolean\n\t{\n\t\treturn this.node.isContentEditable;\n\t}\n\n\t/**\n\t * Enables edit mode\n\t */\n\tenableEdit(): void\n\t{\n\t\tconst currentNode = this.currentNode;\n\t\tif (currentNode)\n\t\t{\n\t\t\tconst node = this.currentNode.node;\n\t\t\tconst nodeTableContainerList = node.querySelectorAll('.landing-table-container');\n\t\t\tif (nodeTableContainerList.length > 0)\n\t\t\t{\n\t\t\t\tnodeTableContainerList.forEach((nodeTableContainer) => {\n\t\t\t\t\tif (!nodeTableContainer.tableEditor)\n\t\t\t\t\t{\n\t\t\t\t\t\tnodeTableContainer.tableEditor = new TableEditor(nodeTableContainer, this.currentNode);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthis.nodeTableContainerList = nodeTableContainerList;\n\t\t\t}\n\t\t}\n\n\t\tif (!this.isEditable() && !BX.Landing.UI.Panel.StylePanel.getInstance().isShown())\n\t\t{\n\t\t\tif (this !== this.currentNode && this.currentNode !== null)\n\t\t\t{\n\t\t\t\tthis.disableEdit();\n\t\t\t}\n\n\t\t\tthis.currentNode = this;\n\t\t\tBX.Landing.Node.Text.currentNode = this.currentNode;\n\n\t\t\tthis.buttons = [];\n\t\t\tthis.buttons.push(this.getDesignButton());\n\n\t\t\tif (this.isHeader())\n\t\t\t{\n\t\t\t\tthis.buttons.push(this.getChangeTagButton());\n\t\t\t\tthis.getChangeTagButton().onChangeHandler = this.onChangeTag.bind(this);\n\t\t\t}\n\n\t\t\tthis.lastValue = this.getValue();\n\t\t\tthis.node.contentEditable = true;\n\n\t\t\tthis.node.setAttribute('title', '');\n\t\t}\n\t}\n\n\t/**\n\t * Gets design button for editor\n\t * @return {BX.Landing.UI.Button.Design}\n\t */\n\tgetDesignButton(): BX.Landing.UI.Button.Design\n\t{\n\t\tif (!this.designButton)\n\t\t{\n\t\t\tthis.designButton = new BX.Landing.UI.Button.Design('design', {\n\t\t\t\thtml: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_DESIGN'),\n\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_DESIGN') },\n\t\t\t\tonClick: function() {\n\t\t\t\t\tBX.Landing.UI.Panel.EditorPanel.getInstance().hide();\n\t\t\t\t\tthis.disableEdit();\n\t\t\t\t\tthis.onDesignShow(this.manifest.code);\n\t\t\t\t}.bind(this),\n\t\t\t});\n\t\t}\n\n\t\tthis.designButton.insertBefore = 'ai_copilot';\n\n\t\treturn this.designButton;\n\t}\n\n\t/**\n\t * Disables edit mode\n\t */\n\tdisableEdit()\n\t{\n\t\tif (this.isEditable())\n\t\t{\n\t\t\tthis.node.contentEditable = false;\n\n\t\t\tif (this.lastValue !== this.getValue())\n\t\t\t{\n\t\t\t\tthis.onChange();\n\t\t\t\tthis.lastValue = this.getValue();\n\t\t\t}\n\n\t\t\tif (this.isAllowInlineEdit())\n\t\t\t{\n\t\t\t\tthis.node.setAttribute('title', escapeText(BX.Landing.Loc.getMessage('LANDING_TITLE_OF_TEXT_NODE')));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets form field\n\t * @return {BX.Landing.UI.Field.Text}\n\t */\n\tgetField(): BX.Landing.UI.Field.Text\n\t{\n\t\tif (this.field)\n\t\t{\n\t\t\tthis.field.setValue(this.node.innerHTML);\n\t\t\tthis.field.content = this.node.innerHTML;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.field = new BX.Landing.UI.Field.Text({\n\t\t\t\tselector: this.selector,\n\t\t\t\ttitle: this.manifest.name,\n\t\t\t\tcontent: this.node.innerHTML,\n\t\t\t\ttextOnly: this.manifest.textOnly,\n\t\t\t\tbind: this.node,\n\t\t\t});\n\n\t\t\tif (this.isHeader())\n\t\t\t{\n\t\t\t\tthis.field.changeTagButton = this.getChangeTagButton();\n\t\t\t}\n\t\t}\n\n\t\treturn this.field;\n\t}\n\n\t/**\n\t * Sets node value\n\t * @param value\n\t * @param {?boolean} [preventSave = false]\n\t * @param {?boolean} [preventHistory = false]\n\t */\n\tsetValue(value, preventSave, preventHistory)\n\t{\n\t\tthis.preventSave(preventSave);\n\t\tthis.lastValue = this.isSavePrevented() ? this.getValue() : this.lastValue;\n\t\tthis.node.innerHTML = value;\n\t\tthis.onChange(false, preventHistory);\n\t}\n\n\t/**\n\t * Gets node value\n\t * @return {string}\n\t */\n\tgetValue(): string\n\t{\n\t\tif (this.node.querySelector('.landing-table-container') !== null)\n\t\t{\n\t\t\tconst node = this.node.cloneNode(true);\n\t\t\tthis.prepareTable(node);\n\n\t\t\treturn textToPlaceholders(node.innerHTML);\n\t\t}\n\n\t\treturn textToPlaceholders(this.node.innerHTML);\n\t}\n\n\t/**\n\t * Checks that this node is header\n\t * @return {boolean}\n\t */\n\tisHeader(): boolean\n\t{\n\t\treturn matchers.headerTag.test(this.node.nodeName);\n\t}\n\n\t/**\n\t * Checks that this node is table\n\t * @return {boolean}\n\t */\n\tisTable(event): boolean\n\t{\n\t\tlet nodeIsTable = false;\n\t\tif (this.currentNode && event)\n\t\t{\n\t\t\tthis.currentNode.node.querySelectorAll('.landing-table-container')\n\t\t\t\t.forEach((table) => {\n\t\t\t\t\tif (table.contains(event.srcElement))\n\t\t\t\t\t{\n\t\t\t\t\t\tnodeIsTable = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}\n\n\t\treturn nodeIsTable;\n\t}\n\n\t/**\n\t * Delete br tags in new table and add flag after this\n\t */\n\tprepareNewTable(table)\n\t{\n\t\ttable.querySelectorAll('br').forEach((tdTag) => {\n\t\t\ttdTag.remove();\n\t\t});\n\t\ttable.setAttribute('table-prepare', 'true');\n\t\tthis.currentNode.onChange(true);\n\t}\n\n\taddTableButtons(event)\n\t{\n\t\tconst buttons = [];\n\t\tlet neededButtons = [];\n\t\tlet setTd = [];\n\t\tconst tableButtons = this.getTableButtons();\n\t\tconst tableAlignButtons = [tableButtons[0], tableButtons[1], tableButtons[2], tableButtons[3]];\n\t\tconst node = this.currentNode.node;\n\t\tlet table = null;\n\t\tlet isCell = false;\n\t\tlet isButtonAddRow = false;\n\t\tlet isButtonAddCol = false;\n\t\tlet isNeedTablePanel = true;\n\t\tif (\n\t\t\tBX.Dom.hasClass(event.srcElement, 'landing-table')\n\t\t\t|| BX.Dom.hasClass(event.srcElement, 'landing-table-col-dnd')\n\t\t)\n\t\t{\n\t\t\tisNeedTablePanel = false;\n\t\t}\n\n\t\tif (BX.Dom.hasClass(event.srcElement, 'landing-table-row-add'))\n\t\t{\n\t\t\tisButtonAddRow = true;\n\t\t}\n\n\t\tif (BX.Dom.hasClass(event.srcElement, 'landing-table-col-add'))\n\t\t{\n\t\t\tisButtonAddCol = true;\n\t\t}\n\t\tlet hideButtons = [];\n\t\tconst nodeTableList = node.querySelectorAll('.landing-table');\n\t\tif (nodeTableList.length > 0)\n\t\t{\n\t\t\tnodeTableList.forEach((nodeTable) => {\n\t\t\t\tif (nodeTable.contains(event.srcElement))\n\t\t\t\t{\n\t\t\t\t\ttable = nodeTable;\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\t\tlet isSelectedAll;\n\n\t\ttableButtons.forEach((tableButton) => {\n\t\t\ttableButton.options.srcElement = event.srcElement;\n\t\t\ttableButton.options.node = node;\n\t\t\ttableButton.options.table = table;\n\t\t});\n\n\t\tif (BX.Dom.hasClass(event.srcElement, 'landing-table-row-dnd'))\n\t\t{\n\t\t\tsetTd = event.srcElement.parentNode.children;\n\t\t\tsetTd = [...setTd];\n\t\t\tneededButtons = this.getAmountTableRows(table) > 1 ? [0, 1, 2, 3, 4, 5, 6] : [0, 1, 2, 3, 4, 5];\n\t\t\tneededButtons.forEach((neededButton) => {\n\t\t\t\ttableButtons[neededButton].options.target = 'row';\n\t\t\t\ttableButtons[neededButton].options.setTd = setTd;\n\t\t\t\tbuttons.push(tableButtons[neededButton]);\n\t\t\t});\n\t\t}\n\n\t\tif (BX.Dom.hasClass(event.srcElement.parentNode, 'landing-table-col-dnd'))\n\t\t{\n\t\t\tconst childNodes = event.srcElement.parentElement.parentElement.childNodes;\n\t\t\tconst childNodesArray = [...childNodes];\n\t\t\tconst childNodesArrayPrepare = [];\n\t\t\tchildNodesArray.forEach((childNode) => {\n\t\t\t\tif (childNode.nodeType === 1)\n\t\t\t\t{\n\t\t\t\t\tchildNodesArrayPrepare.push(childNode);\n\t\t\t\t}\n\t\t\t});\n\t\t\tconst neededPosition = childNodesArrayPrepare.indexOf(event.srcElement.parentElement);\n\t\t\tconst rows = event.srcElement.parentElement.parentElement.parentElement.childNodes;\n\t\t\trows.forEach((row) => {\n\t\t\t\tif (row.nodeType === 1)\n\t\t\t\t{\n\t\t\t\t\tconst rowChildPrepare = [];\n\t\t\t\t\trow.childNodes.forEach((rowChildNode) => {\n\t\t\t\t\t\tif (rowChildNode.nodeType === 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowChildPrepare.push(rowChildNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif (rowChildPrepare[neededPosition])\n\t\t\t\t\t{\n\t\t\t\t\t\tsetTd.push(rowChildPrepare[neededPosition]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tneededButtons = this.getAmountTableCols(table) > 1 ? [0, 1, 2, 3, 4, 5, 7] : [0, 1, 2, 3, 4, 5];\n\t\t\tneededButtons.forEach((neededButton) => {\n\t\t\t\ttableButtons[neededButton].options.target = 'col';\n\t\t\t\ttableButtons[neededButton].options.setTd = setTd;\n\t\t\t\tbuttons.push(tableButtons[neededButton]);\n\t\t\t});\n\t\t}\n\n\t\tif (BX.Dom.hasClass(event.srcElement, 'landing-table-th-select-all'))\n\t\t{\n\t\t\tif (BX.Dom.hasClass(event.srcElement, 'landing-table-th-select-all-selected'))\n\t\t\t{\n\t\t\t\tisSelectedAll = true;\n\t\t\t\tconst rows = event.srcElement.parentElement.parentElement.childNodes;\n\t\t\t\trows.forEach((row) => {\n\t\t\t\t\trow.childNodes.forEach((th) => {\n\t\t\t\t\t\tsetTd.push(th);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tneededButtons = [0, 1, 2, 3, 4, 5, 8, 9, 10];\n\t\t\t\tneededButtons.forEach((neededButton) => {\n\t\t\t\t\ttableButtons[neededButton].options.target = 'table';\n\t\t\t\t\ttableButtons[neededButton].options.setTd = setTd;\n\t\t\t\t\tbuttons.push(tableButtons[neededButton]);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tisSelectedAll = false;\n\t\t\t\tBX.Landing.UI.Panel.EditorPanel.getInstance().hide();\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\tBX.Dom.hasClass(event.srcElement, 'landing-table-td')\n\t\t\t|| event.srcElement.closest('.landing-table-td') !== null\n\t\t)\n\t\t{\n\t\t\tsetTd.push(event.srcElement);\n\t\t\tneededButtons = [3, 2, 1, 0];\n\t\t\tneededButtons.forEach((neededButton) => {\n\t\t\t\ttableButtons[neededButton].options.target = 'cell';\n\t\t\t\ttableButtons[neededButton].options.setTd = setTd;\n\t\t\t\ttableButtons[neededButton].insertAfter = 'strikeThrough';\n\t\t\t\tbuttons.push(tableButtons[neededButton]);\n\t\t\t});\n\t\t\tisCell = true;\n\t\t\thideButtons = ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'createTable', 'pasteTable'];\n\t\t}\n\n\t\tlet activeAlignButtonId = null;\n\t\tconst setActiveAlignButtonId = [];\n\t\tsetTd.forEach((th) => {\n\t\t\tif (th.nodeType === 1)\n\t\t\t{\n\t\t\t\tactiveAlignButtonId = undefined;\n\n\t\t\t\tif (BX.Dom.hasClass(th, 'text-left'))\n\t\t\t\t{\n\t\t\t\t\tactiveAlignButtonId = 'alignLeft';\n\t\t\t\t}\n\n\t\t\t\tif (BX.Dom.hasClass(th, 'text-center'))\n\t\t\t\t{\n\t\t\t\t\tactiveAlignButtonId = 'alignCenter';\n\t\t\t\t}\n\n\t\t\t\tif (BX.Dom.hasClass(th, 'text-right'))\n\t\t\t\t{\n\t\t\t\t\tactiveAlignButtonId = 'alignRight';\n\t\t\t\t}\n\n\t\t\t\tif (BX.Dom.hasClass(th, 'text-justify'))\n\t\t\t\t{\n\t\t\t\t\tactiveAlignButtonId = 'alignJustify';\n\t\t\t\t}\n\t\t\t\tsetActiveAlignButtonId.push(activeAlignButtonId);\n\t\t\t}\n\t\t});\n\t\tlet count = 0;\n\t\tlet isIdentical = true;\n\t\twhile (count < setActiveAlignButtonId.length && isIdentical)\n\t\t{\n\t\t\tif (count > 0 && setActiveAlignButtonId[count] !== setActiveAlignButtonId[count - 1])\n\t\t\t{\n\t\t\t\tisIdentical = false;\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\n\t\tactiveAlignButtonId = isIdentical ? setActiveAlignButtonId[0] : undefined;\n\t\tif (activeAlignButtonId)\n\t\t{\n\t\t\ttableAlignButtons.forEach((tableAlignButton) => {\n\t\t\t\tif (tableAlignButton.id === activeAlignButtonId)\n\t\t\t\t{\n\t\t\t\t\tBX.Dom.addClass(tableAlignButton.layout, 'landing-ui-active');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (buttons[0] && buttons[1] && buttons[2] && buttons[3])\n\t\t{\n\t\t\tbuttons[0].options.alignButtons = tableAlignButtons;\n\t\t\tbuttons[1].options.alignButtons = tableAlignButtons;\n\t\t\tbuttons[2].options.alignButtons = tableAlignButtons;\n\t\t\tbuttons[3].options.alignButtons = tableAlignButtons;\n\t\t}\n\n\t\tif (!this.manifest.textOnly)\n\t\t{\n\t\t\tif (isNeedTablePanel)\n\t\t\t{\n\t\t\t\tif (!isButtonAddRow && !isButtonAddCol && table)\n\t\t\t\t{\n\t\t\t\t\tif (isCell)\n\t\t\t\t\t{\n\t\t\t\t\t\tBX.Landing.UI.Panel.EditorPanel.getInstance().show(table.parentNode, null, buttons, true, hideButtons);\n\t\t\t\t\t}\n\t\t\t\t\telse if (isSelectedAll === false)\n\t\t\t\t\t{\n\t\t\t\t\t\tBX.Landing.UI.Panel.EditorPanel.getInstance().hide();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tBX.Landing.UI.Panel.EditorPanel.getInstance().show(table.parentNode, null, buttons, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tBX.Landing.UI.Panel.EditorPanel.getInstance().hide();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets change tag button\n\t * @return {BX.Landing.UI.Button.ChangeTag}\n\t */\n\tgetChangeTagButton(): BX.Landing.UI.Button.ChangeTag\n\t{\n\t\tif (!this.changeTagButton)\n\t\t{\n\t\t\tthis.changeTagButton = new BX.Landing.UI.Button.ChangeTag('changeTag', {\n\t\t\t\thtml: `<span class=\"landing-ui-icon-editor-${this.node.nodeName.toLowerCase()}\"></span>`,\n\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_CHANGE_TAG') },\n\t\t\t\tonChange: this.onChangeTag.bind(this),\n\t\t\t});\n\t\t}\n\n\t\tthis.changeTagButton.insertAfter = 'unlink';\n\n\t\tthis.changeTagButton.activateItem(this.node.nodeName);\n\n\t\treturn this.changeTagButton;\n\t}\n\n\tgetTableButtons(): []\n\t{\n\t\tthis.buttons = [];\n\t\tthis.buttons.push(\n\t\t\tnew BX.Landing.UI.Button.AlignTable(\n\t\t\t\t'alignLeft',\n\t\t\t\t{\n\t\t\t\t\thtml: '<span class=\"landing-ui-icon-editor-left\"></span>',\n\t\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_ALIGN_LEFT') },\n\t\t\t\t},\n\t\t\t\tthis.currentNode,\n\t\t\t),\n\t\t\tnew BX.Landing.UI.Button.AlignTable(\n\t\t\t\t'alignCenter',\n\t\t\t\t{\n\t\t\t\t\thtml: '<span class=\"landing-ui-icon-editor-center\"></span>',\n\t\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_ALIGN_CENTER') },\n\t\t\t\t},\n\t\t\t\tthis.currentNode,\n\t\t\t),\n\t\t\tnew BX.Landing.UI.Button.AlignTable(\n\t\t\t\t'alignRight',\n\t\t\t\t{\n\t\t\t\t\thtml: '<span class=\"landing-ui-icon-editor-right\"></span>',\n\t\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_ALIGN_RIGHT') },\n\t\t\t\t},\n\t\t\t\tthis.currentNode,\n\t\t\t),\n\t\t\tnew BX.Landing.UI.Button.AlignTable(\n\t\t\t\t'alignJustify',\n\t\t\t\t{\n\t\t\t\t\thtml: '<span class=\"landing-ui-icon-editor-justify\"></span>',\n\t\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_ALIGN_JUSTIFY') },\n\t\t\t\t},\n\t\t\t\tthis.currentNode,\n\t\t\t),\n\t\t\tnew BX.Landing.UI.Button.TableColorAction(\n\t\t\t\t'tableTextColor',\n\t\t\t\t{\n\t\t\t\t\ttext: BX.Landing.Loc.getMessage('EDITOR_ACTION_SET_FORE_COLOR'),\n\t\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_COLOR') },\n\t\t\t\t},\n\t\t\t\tthis.currentNode,\n\t\t\t),\n\t\t\tnew BX.Landing.UI.Button.TableColorAction(\n\t\t\t\t'tableBgColor',\n\t\t\t\t{\n\t\t\t\t\thtml: '<i class=\"landing-ui-icon-editor-fill-color\"></i>',\n\t\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_TABLE_CELL_BG') },\n\t\t\t\t},\n\t\t\t\tthis.currentNode,\n\t\t\t),\n\t\t\tnew BX.Landing.UI.Button.DeleteElementTable(\n\t\t\t\t'deleteRow',\n\t\t\t\t{\n\t\t\t\t\thtml: '<span class=\"landing-ui-icon-editor-delete\"></span>',\n\t\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_DELETE_ROW_TABLE') },\n\t\t\t\t},\n\t\t\t\tthis.currentNode,\n\t\t\t),\n\t\t\tnew BX.Landing.UI.Button.DeleteElementTable(\n\t\t\t\t'deleteCol',\n\t\t\t\t{\n\t\t\t\t\thtml: '<span class=\"landing-ui-icon-editor-delete\"></span>',\n\t\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_DELETE_COL_TABLE') },\n\t\t\t\t},\n\t\t\t\tthis.currentNode,\n\t\t\t),\n\t\t\tnew BX.Landing.UI.Button.StyleTable(\n\t\t\t\t'styleTable',\n\t\t\t\t{\n\t\t\t\t\thtml: `\n\t\t\t\t\t\t${BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_TABLE_STYLE')}\n\t\t\t\t\t\t\t<i class=\"fas fa-chevron-down g-ml-8\"></i>\n\t\t\t\t\t`,\n\t\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_TABLE_STYLE') },\n\t\t\t\t},\n\t\t\t\tthis.currentNode,\n\t\t\t),\n\t\t\tnew BX.Landing.UI.Button.CopyTable(\n\t\t\t\t'copyTable',\n\t\t\t\t{\n\t\t\t\t\ttext: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_TABLE_COPY'),\n\t\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_TABLE_COPY') },\n\t\t\t\t},\n\t\t\t\tthis.currentNode,\n\t\t\t),\n\t\t\tnew BX.Landing.UI.Button.DeleteTable(\n\t\t\t\t'deleteTable',\n\t\t\t\t{\n\t\t\t\t\thtml: '<span class=\"landing-ui-icon-editor-delete\"></span>',\n\t\t\t\t\tattrs: { title: BX.Landing.Loc.getMessage('LANDING_TITLE_OF_EDITOR_ACTION_TABLE_DELETE') },\n\t\t\t\t},\n\t\t\t\tthis.currentNode,\n\t\t\t),\n\t\t);\n\n\t\treturn this.buttons;\n\t}\n\n\t/**\n\t * Handles change tag event\n\t * @param value\n\t * @param {?boolean} [preventHistory = false]\n\t */\n\tonChangeTag(value, preventHistory)\n\t{\n\t\tthis.node = changeTagName(this.node, value);\n\n\t\tthis.bindEvents(this.node);\n\n\t\tif (!this.getField().isEditable() && !preventHistory)\n\t\t{\n\t\t\tthis.disableEdit();\n\t\t\tthis.enableEdit();\n\t\t}\n\n\t\tconst data = {};\n\t\tdata[this.selector] = value;\n\n\t\tif (!preventHistory)\n\t\t{\n\t\t\tthis.changeOptionsHandler(data)\n\t\t\t\t.then(() => {\n\t\t\t\t\tBX.Landing.History.getInstance().push();\n\t\t\t\t})\n\t\t\t\t.catch(() => {});\n\t\t}\n\t}\n\n\tgetAmountTableCols(table): number\n\t{\n\t\treturn table.querySelectorAll('.landing-table-col-dnd').length;\n\t}\n\n\tgetAmountTableRows(table): number\n\t{\n\t\treturn table.querySelectorAll('.landing-table-row-dnd').length;\n\t}\n\n\tprepareTable(node): HTMLElement\n\t{\n\t\tconst setClassesForRemove = [\n\t\t\t'table-selected-all',\n\t\t\t'landing-table-th-select-all-selected',\n\t\t\t'landing-table-cell-selected',\n\t\t\t'landing-table-row-selected',\n\t\t\t'landing-table-th-selected',\n\t\t\t'landing-table-th-selected-cell',\n\t\t\t'landing-table-th-selected-top',\n\t\t\t'landing-table-th-selected-x',\n\t\t\t'landing-table-tr-selected-left',\n\t\t\t'landing-table-tr-selected-y',\n\t\t\t'landing-table-col-selected',\n\t\t\t'landing-table-tr-selected',\n\t\t\t'table-selected-all-right',\n\t\t\t'table-selected-all-bottom',\n\t\t];\n\t\tsetClassesForRemove.forEach((className) => {\n\t\t\tnode.querySelectorAll(`.${className}`).forEach((element) => {\n\t\t\t\tBX.Dom.removeClass(element, className);\n\t\t\t});\n\t\t});\n\n\t\treturn node;\n\t}\n\n\tonBackspaceDown(event)\n\t{\n\t\tconst selection = window.getSelection();\n\t\tconst position = selection.getRangeAt(0).startOffset;\n\t\tif (position === 0)\n\t\t{\n\t\t\tlet focusNode = selection.focusNode;\n\t\t\tif (!BX.Type.isNil(focusNode) && focusNode.nodeType !== 3)\n\t\t\t{\n\t\t\t\tif (focusNode.firstChild.nodeType === 3 && focusNode.firstChild.firstChild.nodeType === 3)\n\t\t\t\t{\n\t\t\t\t\tfocusNode = focusNode.firstChild.firstChild;\n\t\t\t\t}\n\t\t\t\telse if (focusNode.firstChild.nodeType === 3)\n\t\t\t\t{\n\t\t\t\t\tfocusNode = null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfocusNode = focusNode.firstChild;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (focusNode)\n\t\t\t{\n\t\t\t\tconst focusNodeParent = focusNode.parentNode;\n\t\t\t\tconst allowedNodeName = new Set(['BLOCKQUOTE', 'UL']);\n\t\t\t\tif (focusNodeParent && allowedNodeName.has(focusNodeParent.nodeName))\n\t\t\t\t{\n\t\t\t\t\tconst focusNodeContainer = document.createElement('div');\n\t\t\t\t\tfocusNodeContainer.append(focusNode);\n\t\t\t\t\tfocusNodeParent.append(focusNodeContainer);\n\t\t\t\t}\n\t\t\t\tlet contentNode = focusNode.parentNode.parentNode;\n\t\t\t\twhile (contentNode && !allowedNodeName.has(contentNode.nodeName))\n\t\t\t\t{\n\t\t\t\t\tcontentNode = contentNode.parentNode;\n\t\t\t\t}\n\n\t\t\t\tif (contentNode && contentNode.childNodes.length === 1)\n\t\t\t\t{\n\t\t\t\t\tcontentNode.after(focusNode.parentNode);\n\t\t\t\t\tcontentNode.remove();\n\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tisLinkPasted(text): boolean\n\t{\n\t\tconst reg = /^https?:\\/\\/(?:www\\.)?[\\w#%+.:=@~-]{1,256}\\.[\\d()A-Za-z]{1,6}\\b[\\w#%&()+./:=?@~-]*$/;\n\n\t\treturn Boolean(reg.test(text));\n\t}\n\n\tprepareToLink(text): HTMLElement\n\t{\n\t\treturn `<a class='g-bg-transparent' href='${text}' target='_blank'> ${text} </a>`;\n\t}\n}\n"],"names":["escapeText","BX","Landing","Utils","matchers","Matchers","changeTagName","textToPlaceholders","Text","Base","constructor","options","currentNode","type","tableBaseFontSize","onClick","bind","onPaste","onDrop","onInput","onKeyDown","onMousedown","onMouseup","bindEvents","node","Event","document","onAllowInlineEdit","setAttribute","Loc","getMessage","onChange","preventAdjustPosition","preventHistory","call","UI","Panel","EditorPanel","getInstance","adjustPosition","History","push","event","code","onBackspaceDown","clearTimeout","inputTimeout","key","keyCode","which","test","top","window","navigator","userAgent","ctrlKey","metaKey","setTimeout","lastValue","getValue","isTable","tableFontSize","parseInt","getComputedStyle","srcElement","getPropertyValue","textContent","Dom","hasClass","addClass","removeClass","onEscapePress","isEditable","hide","disableEdit","preventDefault","clipboardData","getData","sourceText","encodedText","encode","isLinkPasted","prepareToLink","formattedHtml","replaceAll","execCommand","text","onDocumentClick","fromNode","EventEmitter","emit","manifest","group","allowInlineEdit","Main","isControlsEnabled","stopPropagation","enableEdit","querySelectorAll","forEach","table","hasAttribute","prepareNewTable","textOnly","StylePanel","isShown","show","buttons","nodeTableContainerList","tableContainer","tableEditor","unselect","Tool","ColorPicker","hideAll","requestAnimationFrame","target","nodeName","parentElement","range","createRange","selectNode","getSelection","removeAllRanges","addRange","addTableButtons","isContentEditable","length","nodeTableContainer","TableEditor","Node","getDesignButton","isHeader","getChangeTagButton","onChangeHandler","onChangeTag","contentEditable","designButton","Button","Design","html","attrs","title","onDesignShow","insertBefore","isAllowInlineEdit","getField","field","setValue","innerHTML","content","Field","selector","name","changeTagButton","value","preventSave","isSavePrevented","querySelector","cloneNode","prepareTable","headerTag","nodeIsTable","contains","tdTag","remove","neededButtons","setTd","tableButtons","getTableButtons","tableAlignButtons","isCell","isButtonAddRow","isButtonAddCol","isNeedTablePanel","hideButtons","nodeTableList","nodeTable","isSelectedAll","tableButton","parentNode","children","getAmountTableRows","neededButton","childNodes","childNodesArray","childNodesArrayPrepare","childNode","nodeType","neededPosition","indexOf","rows","row","rowChildPrepare","rowChildNode","getAmountTableCols","th","closest","insertAfter","activeAlignButtonId","setActiveAlignButtonId","undefined","count","isIdentical","tableAlignButton","id","layout","alignButtons","ChangeTag","toLowerCase","activateItem","AlignTable","TableColorAction","DeleteElementTable","StyleTable","CopyTable","DeleteTable","data","changeOptionsHandler","then","catch","setClassesForRemove","className","element","selection","position","getRangeAt","startOffset","focusNode","Type","isNil","firstChild","focusNodeParent","allowedNodeName","Set","has","focusNodeContainer","createElement","append","contentNode","after","reg","Boolean"],"mappings":";;;;;CAIA,MAAMA,UAAU,GAAGC,EAAE,CAACC,OAAO,CAAC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