nextcloud/apps/files_texteditor/js/aceeditor/worker-css.js

1 line
84 KiB
JavaScript
Raw Normal View History

2011-10-02 01:48:00 +04:00
function initSender(){var a=require("pilot/event_emitter").EventEmitter,b=require("pilot/oop"),c=function(){};(function(){b.implement(this,a),this.callback=function(a,b){postMessage({type:"call",id:b,data:a})},this.emit=function(a,b){postMessage({type:"event",name:a,data:b})}}).call(c.prototype);return new c}function initBaseUrls(a){require.tlns=a}var console={log:function(a){postMessage({type:"log",data:a})}},window={console:console},require=function(a){var b=require.modules[a];if(b){b.initialized||(b.exports=b.factory().exports,b.initialized=!0);return b.exports}var c=a.split("/");c[0]=require.tlns[c[0]]||c[0],path=c.join("/")+".js",require.id=a,importScripts(path);return require(a)};require.modules={},require.tlns={};var define=function(a,b,c){arguments.length==2?c=b:arguments.length==1&&(c=a,a=require.id);a.indexOf("text/")!==0&&(require.modules[a]={factory:function(){var a={exports:{}},b=c(require,a.exports,a);b&&(a.exports=b);return a}})},main,sender;onmessage=function(a){var b=a.data;if(b.command)main[b.command].apply(main,b.args);else if(b.init){initBaseUrls(b.tlns),require("pilot/fixoldbrowsers"),sender=initSender();var c=require(b.module)[b.classname];main=new c(sender)}else b.event&&sender&&sender._dispatchEvent(b.event,b.data)},define("pilot/fixoldbrowsers",["require","exports","module"],function(a,b,c){if(!Function.prototype.bind){var d=Array.prototype.slice;Function.prototype.bind=function(a){var b=this;if(typeof b.apply!="function"||typeof b.call!="function")return new TypeError;var c=d.call(arguments),e=function f(){if(this instanceof f){var a=Object.create(b.prototype);b.apply(a,c.concat(d.call(arguments)));return a}return b.call.apply(b,c.concat(d.call(arguments)))};e.length=typeof b=="function"?Math.max(b.length-c.length,0):0;return e}}var e=Function.prototype.call,f=Array.prototype,g=Object.prototype,h=e.bind(g.hasOwnProperty),i,j,k,l,m;if(m=h(g,"__defineGetter__"))i=e.bind(g.__defineGetter__),j=e.bind(g.__defineSetter__),k=e.bind(g.__lookupGetter__),l=e.bind(g.__lookupSetter__);Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=+this.length;for(var d=0;d<c;d++)d in this&&a.call(b,this[d],d,this)}),Array.prototype.map||(Array.prototype.map=function(a){var b=+this.length;if(typeof a!="function")throw new TypeError;var c=Array(b),d=arguments[1];for(var e=0;e<b;e++)e in this&&(c[e]=a.call(d,this[e],e,this));return c}),Array.prototype.filter||(Array.prototype.filter=function(a){var b=[],c=arguments[1];for(var d=0;d<this.length;d++)a.call(c,this[d])&&b.push(this[d]);return b}),Array.prototype.every||(Array.prototype.every=function(a){var b=arguments[1];for(var c=0;c<this.length;c++)if(!a.call(b,this[c]))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(a){var b=arguments[1];for(var c=0;c<this.length;c++)if(a.call(b,this[c]))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=+this.length;if(typeof a!="function")throw new TypeError;if(b===0&&arguments.length===1)throw new TypeError;var c=0;if(arguments.length>=2)var d=arguments[1];else do{if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}while(!0);for(;c<b;c++)c in this&&(d=a.call(null,d,this[c],c,this));return d}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=+this.length;if(typeof a!="function")throw new TypeError;if(b===0&&arguments.length===1)throw new TypeError;var c=b-1;if(arguments.length>=2)var d=arguments[1];else do{if(c in this){d=this[c--];break}if(--c<0)throw new TypeError}while(!0);for(;c>=0;c--)c in this&&(d=a.call(null,d,this[c],c,this));return d}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length;if(!b)return-1;var c=arguments[1]||0;if(c>=b)return-1;c<0&&(c+=b);for(;c<b;c++){if(!h(this,c))continue;if(a===this[c])return c}return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a){var b=this.length;if(!b)return-1;var c=arguments[1]||b;c<0&&(c+=b),c=Math.min(c,b-1);for(;c>=0