System.register([],function(_export,_context){"use strict";function t(t,n){for(;t&&t!==n;){var _t;if(t instanceof HTMLElement){var _n=getComputedStyle(t).display;if(t.tagName.match(/^(P|DIV|H1|H2|H3|H4|H5|H6|LI)$/)||"block"===_n||"list-item"===_n)return t;}t=((_t=t)===null||_t===void 0?void 0:_t.parentNode)||null;}return n;}function n(n,e){var o=document.getSelection();if(!o||0===o.rangeCount)return;var r=t(o.getRangeAt(0).startContainer,n);if(!r)return;if(r.tagName.toLowerCase()===e)return;var c=document.createElement(e);for(;r.firstChild;)c.appendChild(r.firstChild);r.replaceWith(c);var i=document.createRange();i.selectNodeContents(c),i.collapse(!0),o.removeAllRanges(),o.addRange(i);}function e(n,e){var o=window.getSelection();if(!o||0===o.rangeCount)return;var r=o.getRangeAt(0),c=r.commonAncestorContainer,i=[],u=document.createTreeWalker(c,NodeFilter.SHOW_ELEMENT,{acceptNode:function acceptNode(t){var n=t;return r.intersectsNode(n)&&/^(P|DIV|LI|H[1-6])$/.test(n.tagName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP;}});var f=u.nextNode();for(;f;)i.push(f),f=u.nextNode();if(0===i.length){var _e=t(o.focusNode,n);_e&&i.push(_e);}i.forEach(function(t){t.style.textAlign=e;});}function o(t){for(;t&&!(t instanceof HTMLElement);)t=t.parentNode;return t;}_export({a:n,c:t,n:o,s:e});return{setters:[],execute:function execute(){}};});
//# sourceMappingURL=block-utils.cjs.js.map
