web-interface.assets.c8acc93023012737a3bf8fb767b66838.js Maven / Gradle / Ivy
(()=>{var X=(T,b)=>()=>(b||T((b={exports:{}}).exports,b),b.exports);var J=X((Y,V)=>{ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(T,b,W){"use strict";var z=T("./lib/dom"),B=T("./lib/oop"),j=T("./lib/event_emitter").EventEmitter,O=T("./lib/lang"),$=T("./range").Range,_=T("./range_list").RangeList,L=T("./keyboard/hash_handler").HashHandler,P=T("./tokenizer").Tokenizer,A=T("./clipboard"),R={CURRENT_WORD:function(r){return r.session.getTextRange(r.session.getWordRange())},SELECTION:function(r,e,t){var a=r.session.getTextRange();return t?a.replace(/\n\r?([ \t]*\S)/g,`
`+t+"$1"):a},CURRENT_LINE:function(r){return r.session.getLine(r.getCursorPosition().row)},PREV_LINE:function(r){return r.session.getLine(r.getCursorPosition().row-1)},LINE_INDEX:function(r){return r.getCursorPosition().row},LINE_NUMBER:function(r){return r.getCursorPosition().row+1},SOFT_TABS:function(r){return r.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(r){return r.session.getTabSize()},CLIPBOARD:function(r){return A.getText&&A.getText()},FILENAME:function(r){return/[^/\\]*$/.exec(this.FILEPATH(r))[0]},FILENAME_BASE:function(r){return/[^/\\]*$/.exec(this.FILEPATH(r))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(r){return this.FILEPATH(r).replace(/[^/\\]*$/,"")},FILEPATH:function(r){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(r){var e=r.session.$mode||{};return e.blockComment&&e.blockComment.start||""},BLOCK_COMMENT_END:function(r){var e=r.session.$mode||{};return e.blockComment&&e.blockComment.end||""},LINE_COMMENT:function(r){var e=r.session.$mode||{};return e.lineCommentStart||""},CURRENT_YEAR:E.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:E.bind(null,{year:"2-digit"}),CURRENT_MONTH:E.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:E.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:E.bind(null,{month:"short"}),CURRENT_DATE:E.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:E.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:E.bind(null,{weekday:"short"}),CURRENT_HOUR:E.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:E.bind(null,{minute:"2-digit"}),CURRENT_SECOND:E.bind(null,{second:"2-digit"})};R.SELECTED_TEXT=R.SELECTION;function E(r){var e=new Date().toLocaleString("en-us",r);return e.length==1?"0"+e:e}var I=function(){function r(){this.snippetMap={},this.snippetNameMap={},this.variables=R}return r.prototype.getTokenizer=function(){return r.$tokenizer||this.createTokenizer()},r.prototype.createTokenizer=function(){function e(i){return i=i.substr(1),/^\d+$/.test(i)?[{tabstopId:parseInt(i,10)}]:[{text:i}]}function t(i){return"(?:[^\\\\"+i+"]|\\\\.)"}var a={regex:"/("+t("/")+"+)/",onMatch:function(i,s,c){var n=c[0];return n.fmtString=!0,n.guard=i.slice(1,-1),n.flag="",""},next:"formatString"};return r.$tokenizer=new P({start:[{regex:/\\./,onMatch:function(i,s,c){var n=i[1];return(n=="}"&&c.length||"`$\\".indexOf(n)!=-1)&&(i=n),[i]}},{regex:/}/,onMatch:function(i,s,c){return[c.length?c.shift():i]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(i,s,c){var n=e(i.substr(1));return c.unshift(n[0]),n},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(i,s,c){var n=i.slice(1,-1).replace(/\\[,|\\]|,/g,function(p){return p.length==2?p[1]:"\0"}).split("\0").map(function(p){return{value:p}});return c[0].choices=n,[n[0]]},next:"start"},a,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(i,s,c){return c.length&&c[0].expectElse?(c[0].expectElse=!1,c[0].ifEnd={elseEnd:c[0]},[c[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(i,s,c){var n=i[1];return n=="}"&&c.length||"`$\\".indexOf(n)!=-1?i=n:n=="n"?i=`
`:n=="t"?i=" ":"ulULE".indexOf(n)!=-1&&(i={changeCase:n,local:n>"a"}),[i]}},{regex:"/\\w*}",onMatch:function(i,s,c){var n=c.shift();return n&&(n.flag=i.slice(1,-1)),this.next=n&&n.tabstopId?"start":"",[n||i]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(i,s,c){return[{text:i.slice(1)}]}},{regex:/\${\w+/,onMatch:function(i,s,c){var n={text:i.slice(2)};return c.unshift(n),[n]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(i,s,c){var n=c.shift();return this.next=n&&n.tabstopId?"start":"",[n||i]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(i,s,c){var n=c[0];return n.formatFunction=i.slice(2,-1),[c.shift()]},next:"formatString"},a,{regex:/:[\?\-+]?/,onMatch:function(i,s,c){i[1]=="+"&&(c[0].ifEnd=c[0]),i[1]=="?"&&(c[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),r.$tokenizer},r.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(a){return a.value||a})},r.prototype.getVariableValue=function(e,t,a){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var i=this.variables[t];return typeof i=="function"&&(i=this.variables[t](e,t,a)),i==null?"":i},r.prototype.tmStrFormat=function(e,t,a){if(!t.fmt)return e;var i=t.flag||"",s=t.guard;s=new RegExp(s,i.replace(/[^gim]/g,""));var c=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,n=this,p=e.replace(s,function(){var o=n.variables.__;n.variables.__=[].slice.call(arguments);for(var h=n.resolveVariables(c,a),v="E",u=0;u=0&&p.splice(o,1)}}e.content?s(e):Array.isArray(e)&&e.forEach(s)},r.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t=[],a={},i=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,s;s=i.exec(e);){if(s[1])try{a=JSON.parse(s[1]),t.push(a)}catch{}if(s[4])a.content=s[4].replace(/^\t/gm,""),t.push(a),a={};else{var c=s[2],n=s[3];if(c=="regex"){var p=/\/((?:[^\/\\]|\\.)*)|$/g;a.guard=p.exec(n)[1],a.trigger=p.exec(n)[1],a.endTrigger=p.exec(n)[1],a.endGuard=p.exec(n)[1]}else c=="snippet"?(a.tabTrigger=n.match(/^\S*/)[0],a.name||(a.name=n)):c&&(a[c]=n)}}return t},r.prototype.getSnippetByName=function(e,t){var a=this.snippetNameMap,i;return this.getActiveScopes(t).some(function(s){var c=a[s];return c&&(i=c[e]),!!i},this),i},r}();B.implement(I.prototype,j);var l=function(r,e,t){t===void 0&&(t={});var a=r.getCursorPosition(),i=r.session.getLine(a.row),s=r.session.getTabString(),c=i.match(/^\s*/)[0];a.column1?(F=w[w.length-1].length,D+=w.length-1):F+=m.length,K+=m}else m&&(m.start?m.end={row:D,column:F}:m.start={row:D,column:F})}),{text:K,tabstops:p,tokens:n}},f=function(){function r(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=O.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return r.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},r.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},r.prototype.onChange=function(e){for(var t=e.action[0]=="r",a=this.selectedTabstop||{},i=a.parents||{},s=this.tabstops.slice(),c=0;c2&&(this.tabstops.length&&n.push(n.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,n))},r.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(a){a.markerId||(a.markerId=t.addMarker(a,"ace_snippet-marker","text"))})},r.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(a){t.removeMarker(a.markerId),a.markerId=null})},r.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)}},r.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),t=this.ranges.indexOf(e),t!=-1&&this.ranges.splice(t,1),t=e.tabstop.rangeList.ranges.indexOf(e),t!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},r}();f.prototype.keyboardHandler=new L,f.prototype.keyboardHandler.bindKeys({Tab:function(r){b.snippetManager&&b.snippetManager.expandWithTab(r)||(r.tabstopManager.tabNext(1),r.renderer.scrollCursorIntoView())},"Shift-Tab":function(r){r.tabstopManager.tabNext(-1),r.renderer.scrollCursorIntoView()},Esc:function(r){r.tabstopManager.detach()}});var d=function(r,e){r.row==0&&(r.column+=e.column),r.row+=e.row},g=function(r,e){r.row==e.row&&(r.column-=e.column),r.row-=e.row};z.importCssString(`
.ace_snippet-marker {
-moz-box-sizing: border-box;
box-sizing: border-box;
background: rgba(194, 193, 208, 0.09);
border: 1px dotted rgba(211, 208, 235, 0.62);
position: absolute;
}`,"snippets.css",!1),b.snippetManager=new I;var M=T("./editor").Editor;(function(){this.insertSnippet=function(r,e){return b.snippetManager.insertSnippet(this,r,e)},this.expandSnippet=function(r){return b.snippetManager.expandWithTab(this,r)}}).call(M.prototype)});ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","ace/config","resources","resources","tabStops","resources","utils","actions"],function(T,b,W){"use strict";var z=T("../keyboard/hash_handler").HashHandler,B=T("../editor").Editor,j=T("../snippets").snippetManager,O=T("../range").Range,$=T("../config"),_,L,P=function(){function l(){}return l.prototype.setupContext=function(f){this.ace=f,this.indentation=f.session.getTabString(),_||(_=window.emmet);var d=_.resources||_.require("resources");d.setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},l.prototype.getSelectionRange=function(){var f=this.ace.getSelectionRange(),d=this.ace.session.doc;return{start:d.positionToIndex(f.start),end:d.positionToIndex(f.end)}},l.prototype.createSelection=function(f,d){var g=this.ace.session.doc;this.ace.selection.setRange({start:g.indexToPosition(f),end:g.indexToPosition(d)})},l.prototype.getCurrentLineRange=function(){var f=this.ace,d=f.getCursorPosition().row,g=f.session.getLine(d).length,M=f.session.doc.positionToIndex({row:d,column:0});return{start:M,end:M+g}},l.prototype.getCaretPos=function(){var f=this.ace.getCursorPosition();return this.ace.session.doc.positionToIndex(f)},l.prototype.setCaretPos=function(f){var d=this.ace.session.doc.indexToPosition(f);this.ace.selection.moveToPosition(d)},l.prototype.getCurrentLine=function(){var f=this.ace.getCursorPosition().row;return this.ace.session.getLine(f)},l.prototype.replaceContent=function(f,d,g,M){g==null&&(g=d==null?this.getContent().length:d),d==null&&(d=0);var r=this.ace,e=r.session.doc,t=O.fromPoints(e.indexToPosition(d),e.indexToPosition(g));r.session.remove(t),t.end=t.start,f=this.$updateTabstops(f),j.insertSnippet(r,f)},l.prototype.getContent=function(){return this.ace.getValue()},l.prototype.getSyntax=function(){if(this.$syntax)return this.$syntax;var f=this.ace.session.$modeId.split("/").pop();if(f=="html"||f=="php"){var d=this.ace.getCursorPosition(),g=this.ace.session.getState(d.row);typeof g!="string"&&(g=g[0]),g&&(g=g.split("-"),g.length>1?f=g[0]:f=="php"&&(f="html"))}return f},l.prototype.getProfileName=function(){var f=_.resources||_.require("resources");switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var d=f.getVariable("profile");return d||(d=this.ace.session.getLines(0,2).join("").search(/]+XHTML/i)!=-1?"xhtml":"html"),d;default:var g=this.ace.session.$mode;return g.emmetConfig&&g.emmetConfig.profile||"xhtml"}},l.prototype.prompt=function(f){return prompt(f)},l.prototype.getSelection=function(){return this.ace.session.getTextRange()},l.prototype.getFilePath=function(){return""},l.prototype.$updateTabstops=function(f){var d=1e3,g=0,M=null,r=_.tabStops||_.require("tabStops"),e=_.resources||_.require("resources"),t=e.getVocabulary("user"),a={tabstop:function(s){var c=parseInt(s.group,10),n=c===0;n?c=++g:c+=d;var p=s.placeholder;p&&(p=r.processText(p,a));var o="${"+c+(p?":"+p:"")+"}";return n&&(M=[s.start,o]),o},escape:function(s){return s=="$"?"\\$":s=="\\"?"\\\\":s}};if(f=r.processText(f,a),t.variables.insert_final_tabstop&&!/\$\{0\}$/.test(f))f+="${0}";else if(M){var i=_.utils?_.utils.common:_.require("utils");f=i.replaceSubstring(f,"${0}",M[0],M[1])}return f},l}(),A={expand_abbreviation:{mac:"ctrl+alt+e",win:"alt+e"},match_pair_outward:{mac:"ctrl+d",win:"ctrl+,"},match_pair_inward:{mac:"ctrl+j",win:"ctrl+shift+0"},matching_pair:{mac:"ctrl+alt+j",win:"alt+j"},next_edit_point:"alt+right",prev_edit_point:"alt+left",toggle_comment:{mac:"command+/",win:"ctrl+/"},split_join_tag:{mac:"shift+command+'",win:"shift+ctrl+`"},remove_tag:{mac:"command+'",win:"shift+ctrl+;"},evaluate_math_expression:{mac:"shift+command+y",win:"shift+ctrl+y"},increment_number_by_1:"ctrl+up",decrement_number_by_1:"ctrl+down",increment_number_by_01:"alt+up",decrement_number_by_01:"alt+down",increment_number_by_10:{mac:"alt+command+up",win:"shift+alt+up"},decrement_number_by_10:{mac:"alt+command+down",win:"shift+alt+down"},select_next_item:{mac:"shift+command+.",win:"shift+ctrl+."},select_previous_item:{mac:"shift+command+,",win:"shift+ctrl+,"},reflect_css_value:{mac:"shift+command+r",win:"shift+ctrl+r"},encode_decode_data_url:{mac:"shift+ctrl+d",win:"ctrl+'"},expand_abbreviation_with_tab:"Tab",wrap_with_abbreviation:{mac:"shift+ctrl+a",win:"shift+ctrl+a"}},R=new P;b.commands=new z,b.runEmmetCommand=function l(f){if(this.action=="expand_abbreviation_with_tab"){if(!f.selection.isEmpty())return!1;var d=f.selection.lead,g=f.session.getTokenAt(d.row,d.column);if(g&&/\btag\b/.test(g.type))return!1}try{R.setupContext(f);var M=_.actions||_.require("actions");if(this.action=="wrap_with_abbreviation")return setTimeout(function(){M.run("wrap_with_abbreviation",R)},0);var r=M.run(this.action,R)}catch(t){if(!_){var e=b.load(l.bind(this,f));return this.action=="expand_abbreviation_with_tab"?!1:e}f._signal("changeStatus",typeof t=="string"?t:t.message),$.warn(t),r=!1}return r};for(var E in A)b.commands.addCommand({name:"emmet:"+E,action:E,bindKey:A[E],exec:b.runEmmetCommand,multiSelectAction:"forEach"});b.updateCommands=function(l,f){f?l.keyBinding.addKeyboardHandler(b.commands):l.keyBinding.removeKeyboardHandler(b.commands)},b.isSupportedMode=function(l){if(!l)return!1;if(l.emmetConfig)return!0;var f=l.$id||l;return/css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(f)},b.isAvailable=function(l,f){if(/(evaluate_math_expression|expand_abbreviation)$/.test(f))return!0;var d=l.session.$mode,g=b.isSupportedMode(d);if(g&&d.$modes)try{R.setupContext(l),/js|php/.test(R.getSyntax())&&(g=!1)}catch{}return g};var I=function(l,f){var d=f;if(d){var g=b.isSupportedMode(d.session.$mode);l.enableEmmet===!1&&(g=!1),g&&b.load(),b.updateCommands(d,g)}};b.load=function(l){return typeof L!="string"?($.warn("script for emmet-core is not loaded"),!1):($.loadModule(L,function(){L=null,l&&l()}),!0)},b.AceEmmetEditor=P,$.defineOptions(B.prototype,"editor",{enableEmmet:{set:function(l){this[l?"on":"removeListener"]("changeMode",I),I({enableEmmet:!!l},this)},value:!0}}),b.setCore=function(l){typeof l=="string"?L=l:_=l}});(function(){ace.require(["ace/ext/emmet"],function(T){typeof V=="object"&&typeof Y=="object"&&V&&(V.exports=T)})})()});J();})();
//# sourceMappingURL=c8acc93023012737a3bf8fb767b66838.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy