filesbox/web/dist/27127.13b6d3ad.async.js

2 lines
2.4 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[27127],{27127:function(o,x,g){o=g.nmd(o),ace.define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"],function(a,$,w){"use strict";var c=[{name:"leftToRight",bindKey:{win:"Ctrl-Alt-Shift-L",mac:"Command-Alt-Shift-L"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!1)},readOnly:!0},{name:"rightToLeft",bindKey:{win:"Ctrl-Alt-Shift-R",mac:"Command-Alt-Shift-R"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!0)},readOnly:!0}],p=a("../editor").Editor;a("../config").defineOptions(p.prototype,"editor",{rtlText:{set:function(e){e?(this.on("change",h),this.on("changeSelection",d),this.renderer.on("afterRender",l),this.commands.on("exec",f),this.commands.addCommands(c)):(this.off("change",h),this.off("changeSelection",d),this.renderer.off("afterRender",l),this.commands.off("exec",f),this.commands.removeCommands(c),u(this.renderer)),this.renderer.updateFull()}},rtl:{set:function(e){this.session.$bidiHandler.$isRtl=e,e?(this.setOption("rtlText",!1),this.renderer.on("afterRender",l),this.session.$bidiHandler.seenBidi=!0):(this.renderer.off("afterRender",l),u(this.renderer)),this.renderer.updateFull()}}});function d(e,n){var i=n.getSelection().lead;n.session.$bidiHandler.isRtlLine(i.row)&&i.column===0&&(n.session.$bidiHandler.isMoveLeftOperation&&i.row>0?n.getSelection().moveCursorTo(i.row-1,n.session.getLine(i.row-1).length):n.getSelection().isEmpty()?i.column+=1:i.setPosition(i.row,i.column+1))}function f(e){e.editor.session.$bidiHandler.isMoveLeftOperation=/gotoleft|selectleft|backspace|removewordleft/.test(e.command.name)}function h(e,n){var i=n.session;if(i.$bidiHandler.currentRow=null,i.$bidiHandler.isRtlLine(e.start.row)&&e.action==="insert"&&e.lines.length>1)for(var t=e.start.row;t<e.end.row;t++)i.getLine(t+1).charAt(0)!==i.$bidiHandler.RLE&&(i.doc.$lines[t+1]=i.$bidiHandler.RLE+i.getLine(t+1))}function l(e,n){var i=n.session,t=i.$bidiHandler,r=n.$textLayer.$lines.cells,b=n.layerConfig.width-n.layerConfig.padding+"px";r.forEach(function(m){var s=m.element.style;t&&t.isRtlLine(m.row)?(s.direction="rtl",s.textAlign="right",s.width=b):(s.direction="",s.textAlign="",s.width="")})}function u(e){var n=e.$textLayer.$lines;n.cells.forEach(i),n.cellCache.forEach(i);function i(t){var r=t.element.style;r.direction=r.textAlign=r.width=""}}}),function(){ace.require(["ace/ext/rtl"],function(a){o&&(o.exports=a)})}()}}]);