"no use strict";(function(e){if(typeofe.window!="undefined"&&e.document)return;e.console=function(){vare=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console,e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){console.error("Worker "+(i?i.stack:e))},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){varr=n.split("!");returne.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){vari=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){vars=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}returnn},e.require=function(t,n){n||(n=t,t=null);if(!n.charAt)thrownewError("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);varr=e.require.modules[n];if(r)returnr.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;vari=n.split("/");if(!e.require.tlns)returnconsole.log("unable to load "+n);i[0]=e.require.tlns[i[0]]||i[0];vars=i.join("/")+".js";returne.require.id=n,importScripts(s),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeoft!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id),n.length||(n=["require","exports","module"]);if(t.indexOf("text!")===0)return;vari=function(n){returne.require(t,n)};e.require.modules[t]={exports:{},factory:function(){vare=this,t=r.apply(this,n.map(function(t){switch(t){case"require":returni;case"exports":returne.exports;case"module":returne;default:returni(t)}}));returnt&&(e.exports=t),e}}},e.define.amd={},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){vart=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};returnfunction(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),newr};vart=e.main=null,n=e.sender=null;e.onmessage=function(r){vari=r.data;if(i.command){if(!t[i.command])thrownewError("Unknown command:"+i.command);t[i.command].apply(t,i.args)}elseif(i.init){initBaseUrls(i.tlns),require("ace/lib/es5-shim"),n=e.sender=initSender();vars=require(i.module)[i.classname];t=e.main=news(n)}elsei.event&&n&&n._signal(i.event,i.data)}})(this),ace.define("ace/mode/xquery_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/xquery/xqlint","ace/mode/xquery/modules"],function(e,t,n){varr=e("../lib/oop"),i=e("../worker/mirror").Mirror,s=e("./xquery/xqlint"),o=s.XQLint,u=e("./xquery/modules").Modules,a=function(e){returnfunction(t){varn=e,r=n[t],i={},s={};returnr.functions.forEach(function(e){s[t+"#"+e.name+"#"+e.arity]={params:[]},e.parameters.forEach(function(n){s[t+"#"+e.name+"#"+e.arity].params.push("$"+n.name)})}),r.variables.forEach(function(e){varn=e.name.substring(e.name.indexOf(":")+1);i[t+"#"+n]={type:"VarDecl",annotations:[]}}),{variables:i,functions:s}}},f=t.XQueryWorker=function(e){i.call(this,e),this.setTimeout(200),this.opts={styleCheck:!1},this.availableModuleNamespaces=Object.keys(u),this.moduleResolver=a(u);vart=this;this.sender.on("complete",function(e){if(t.xqlint){varn={line:e.data.pos.row,col:e.data.pos.column},r=t.xqlint.getCompletions(n);t.sender.emit("complete",r)}}),this.sender.on("setAvailableModuleNamespaces",function(e){t.availableModuleNamespaces=e.data}),this.sender.on("setModuleResolver",function(e){t.moduleResolver=a(e.data)})};r.inherits(f,i),function(){this.onUpdate=function(){this.sender.emit("start");vare=this.doc.getValue(),t=s.createStaticContext();this.moduleResolver&&t.setModuleResolver(this.moduleResolver),this.availableModuleNamespaces&&(t.availableModuleNamespaces=this.availableModuleNamespaces);varn={styleCheck:this.styleCheck,staticContext:t};this.xqlint=newo(e,n),this.sender.emit("markers",this.xqlint.getMarkers())}}.call(f.prototype)}),ace.define("ace/lib/oop",["require","exports","module"],functio